Tags: kksudo/AgentFS
Tags
feat: AI-friendly CLI, compiler hardening, design docs (#45) * feat(cli): add AI-friendly non-interactive mode Add --json, --config, --output json, --dir flags for all commands. AI agents can now scaffold vaults without interactive prompts: agentfs init --json '{"vaultName":"x","profile":"personal"}' agentfs init --config setup.yaml agentfs compile --output json resolveSetupAnswers() auto-selects interactive vs JSON mode. parseCliFlags() extracts common flags from any command's args. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add AI agent non-interactive usage guide to AGENTS.md Document --json, --config, --output json, --dir flags with examples for AI agent consumption. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test(cli): add tests for AI-friendly CLI flags and resolveSetupAnswers 23 new tests covering: - parseCliFlags: --json, --config, --output, --dir, edge cases - loadConfigFile: JSON and YAML formats - resolveInput: priority, fallback to null - resolveSetupAnswers: JSON mode, config file, YAML, partial input, defaults merge, --dir override Fix: undefined JSON fields no longer override defaults in createDefaultAnswers spread. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add comprehensive test plan (100+ test cases) Covers: unit tests (18 suites, gaps in generators/), integration tests (scaffold, compile, onboard, memory, security, cron, sync, doctor), CLI tests (15 commands, error cases), edge cases (idempotency, corrupted data, unicode), AI-agent interaction tests (--json, --output). Identifies P0 gaps: generators/ has 0% direct test coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: remove Russian text from git, move internal docs to _local/ - Move docs/architecture.md, competitive-research.md, test-plan.md to _local/docs/ (gitignored) — internal docs with Russian content - Translate all templates to English: claude.md.hbs, agent-map.md.hbs, code-review.md, debugging.md - Translate pathTable descriptions in compilers/base.ts to English - Add _local/ to .gitignore All tracked files are now English-only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cli): wire --json flag into scaffold, fix ESM module resolution - Move resolveSetupAnswers from generators/prompts.ts to utils/cli-flags.ts to avoid Jest ESM circular resolution issue - Wire parseCliFlags + resolveSetupAnswers into runScaffold - Support --json, --config, --output json, --dir in scaffold command - Remove Russian text from all tracked files (templates, base.ts) - Move internal docs to _local/ (gitignored) - Update cli.test.ts for new flag parsing behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(compile): rename AGENTS.md to AGENT-MAP.md and implement secret get * feat(cron): implement file-based locking and signaling for jobs * refactor(openclaw): decouple from OMC and implement correct .openclaw structure * feat(cursor): modernize rules to use .cursor/rules/*.mdc format * feat(claude): add .claude/settings.json with native permission enforcement * feat(cli): standardize CliFlags and JSON output across subcommands * fix(security): resolve credential leakage and refine Claude security templates * refactor(sync): final removal of sync.ts in favor of openclaw-sync.ts * docs(readme): simplify README, add hero section, fix docs consistency - Rewrite README: hero section, quick start, two usage modes (persistent vs session agents), agent prompt, full CLI reference - Create docs/internals.md for detailed subsystem docs (memory, boot, security, FHS) - Restore docs/architecture.md from git history, fix AgentOS → AgentFS naming - Fix Node.js version: 18+ → >= 24.0.0 across all docs - Fix VERSION constant: 0.1.0 → 0.1.4 in cli.ts - Fix Cursor output path: .cursorrules → .cursor/rules/agentfs-global.mdc - Document missing CLI commands: init, migrate, cron, secret - Remove migrate from roadmap (already implemented) - Add disclaimer to architecture.md about legacy paths - Remove dead competitive-research.md reference from AGENTS.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore:sync * fix(ci): resolve lint errors and update tests for new compiler outputs - Remove unused imports: path, yaml, SecurityPolicy (claude.ts), printError (doctor.ts) - Remove unused variables: corrections (claude.ts), stat (runner.ts), err (security.ts) - Update claude test: expect multiple outputs (CLAUDE.md + settings.json) - Update cursor test: .cursorrules → .cursor/rules/agentfs-global.mdc - Update openclaw test: expect multiple .openclaw/ outputs (SOUL, IDENTITY, etc.) - Rewrite sync test: remove deleted importFromOmc/exportToOmc, keep detectDrift + syncCommand Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(cli): resolve isEntryPoint detection for npm global symlinks When installed globally via `npm install -g`, the binary is a symlink (e.g. /usr/bin/agentfs → ../lib/node_modules/create-agentfs/dist/cli.js). The previous isEntryPoint check compared import.meta.url (ending in "cli.js") against argv[1] basename ("agentfs"), which never matched. This caused the CLI to silently exit with code 0 and no output. Also fixes: - memory subcommand args not being shifted before dispatch, causing `agentfs memory add semantic --json '...'` to fail with INVALID_TARGET - quickstart.md missing --json examples for non-interactive setup and documenting `memory add` with incorrect syntax Constraint: isEntryPoint must work for both direct node invocation and npm global symlink invocation Rejected: url.pathToFileURL comparison | breaks on Windows Confidence: high Scope-risk: narrow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(design): add modules and secrets design drafts, remove tracked bug/roadmap docs Design docs for plugin system and SOPS/age secrets added to git. BUGS.md and github-issues-roadmap.md removed — content now lives in GitHub Issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(lint): replace all no-explicit-any with proper types - compile.ts, onboard.ts: err: any → err: unknown with NodeJS.ErrnoException cast - memory.ts: status as any → status as EntryStatus - openclaw.ts: securityPolicy: any → Record<string, unknown> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: bump version to 0.1.5 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore(cli): add version and release npm scripts preversion runs lint+build+test as gate, postversion pushes with tags. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Kirill Kazakov <spb.k.kirill@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PreviousNext