mirror of
https://github.com/coleam00/Archon
synced 2026-04-21 13:37:41 +00:00
* fix(bundled-defaults): auto-generate import list, emit inline strings
Root-cause fix for bundle drift (15 commands + 7 workflows previously
missing from binary distributions) and a prerequisite for packaging
@archon/workflows as a Node-loadable SDK.
The hand-maintained `bundled-defaults.ts` import list is replaced by
`scripts/generate-bundled-defaults.ts`, which walks
`.archon/{commands,workflows}/defaults/` and emits a generated source
file with inline string literals. `bundled-defaults.ts` becomes a thin
facade that re-exports the generated records and keeps the
`isBinaryBuild()` helper.
Inline strings (via JSON.stringify) replace Bun's
`import X from '...' with { type: 'text' }` attributes. The binary build
still embeds the data at compile time, but the module now loads under
Node too — removing SDK blocker #2.
- Generator: `scripts/generate-bundled-defaults.ts` (+ `--check` mode for CI)
- `package.json`: `generate:bundled`, `check:bundled`; wired into `validate`
- `build-binaries.sh`: regenerates defaults before compile
- Test: `bundle completeness` now derives expected set from on-disk files
- All 56 defaults (36 commands + 20 workflows) now in the bundle
* fix(bundled-defaults): address PR review feedback
Review: https://github.com/coleam00/Archon/pull/1263#issuecomment-4262719090
Generator:
- Guard against .yaml/.yml name collisions (previously silent overwrite)
- Add early access() check with actionable error when run from wrong cwd
- Type top-level catch as unknown; print only message for Error instances
- Drop redundant /* eslint-disable */ emission (global ignore covers it)
- Fix misleading CI-mechanism claim in header comment
- Collapse dead `if (!ext) continue` guard into a single typed pass
Scripts get real type-checking + linting:
- New scripts/tsconfig.json extending root config
- type-check now includes scripts/ via `tsc --noEmit -p scripts/tsconfig.json`
- Drop `scripts/**` from eslint ignores; add to projectService file scope
Tests:
- Inline listNames helper (Rule of Three)
- Drop redundant toBeDefined/typeof assertions; the Record<string, string>
type plus length > 50 already cover them
- Add content-fidelity round-trip assertion (defense against generator
content bugs, not just key-set drift)
Facade comment: drop dead reference to .claude/rules/dx-quirks.md.
CI: wire `bun run check:bundled` into .github/workflows/test.yml so the
header's CI-verification claim is truthful.
Docs: CLAUDE.md step count four→five; add contributor bullet about
`bun run generate:bundled` in the Defaults section and CONTRIBUTING.md.
* chore(e2e): bump Codex model to gpt-5.2
gpt-5.1-codex-mini is deprecated and unavailable on ChatGPT-account Codex
auth. Plain gpt-5.2 works. Verified end-to-end:
- e2e-codex-smoke: structured output returns {category:'math'}
- e2e-mixed-providers: claude+codex both return expected tokens
56 lines
1.9 KiB
JSON
56 lines
1.9 KiB
JSON
{
|
|
"name": "archon",
|
|
"version": "0.3.6",
|
|
"private": true,
|
|
"workspaces": [
|
|
"packages/*"
|
|
],
|
|
"type": "module",
|
|
"scripts": {
|
|
"cli": "bun --cwd packages/cli src/cli.ts",
|
|
"dev": "bun --filter '*' dev",
|
|
"dev:server": "bun --filter @archon/server dev",
|
|
"start": "bun --filter @archon/server start",
|
|
"build": "bun --filter '*' build",
|
|
"build:binaries": "bash scripts/build-binaries.sh",
|
|
"build:checksums": "bash scripts/checksums.sh",
|
|
"generate:bundled": "bun run scripts/generate-bundled-defaults.ts",
|
|
"check:bundled": "bun run scripts/generate-bundled-defaults.ts --check",
|
|
"test": "bun --filter '*' --parallel test",
|
|
"test:watch": "bun --filter @archon/server test:watch",
|
|
"type-check": "bun --filter '*' type-check && bun x tsc --noEmit -p scripts/tsconfig.json",
|
|
"lint": "bun x eslint . --cache",
|
|
"lint:fix": "bun x eslint . --cache --fix",
|
|
"format": "bun x prettier --write .",
|
|
"format:check": "bun x prettier --check .",
|
|
"dev:web": "bun --filter @archon/web dev",
|
|
"build:web": "bun --filter @archon/web build",
|
|
"dev:docs": "bun --filter @archon/docs-web dev",
|
|
"build:docs": "bun --filter @archon/docs-web build",
|
|
"validate": "bun run check:bundled && bun run type-check && bun run lint --max-warnings 0 && bun run format:check && bun run test",
|
|
"prepare": "husky",
|
|
"setup-auth": "bun --filter @archon/server setup-auth"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.39.1",
|
|
"@types/bun": "latest",
|
|
"bun-types": "^1.3.5",
|
|
"eslint": "^9.39.1",
|
|
"eslint-config-prettier": "10.1.8",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^15.2.0",
|
|
"prettier": "^3.7.4",
|
|
"typescript": "^5.3.0",
|
|
"pino-pretty": "^13",
|
|
"typescript-eslint": "^8.48.0"
|
|
},
|
|
"engines": {
|
|
"bun": "^1.3.0"
|
|
},
|
|
"overrides": {
|
|
"test-exclude": "^7.0.1"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/claude-agent-sdk": "^0.2.74"
|
|
}
|
|
}
|