apex-code 0.0.1-alpha.1 → 0.0.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +66 -681
- package/dist/cli/args.d.ts +5 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +45 -6
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-command.d.ts.map +1 -1
- package/dist/cli/auth-command.js +3 -3
- package/dist/cli/auth-command.js.map +1 -1
- package/dist/cli/cost-command.d.ts +19 -0
- package/dist/cli/cost-command.d.ts.map +1 -0
- package/dist/cli/cost-command.js +107 -0
- package/dist/cli/cost-command.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +1 -2
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +45 -16
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -7
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +2 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +9 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +30 -4
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +46 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +137 -19
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +6 -6
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/context/deferred-schemas.d.ts +92 -0
- package/dist/core/context/deferred-schemas.d.ts.map +1 -0
- package/dist/core/context/deferred-schemas.js +74 -0
- package/dist/core/context/deferred-schemas.js.map +1 -0
- package/dist/core/context/eviction.d.ts +47 -0
- package/dist/core/context/eviction.d.ts.map +1 -0
- package/dist/core/context/eviction.js +83 -0
- package/dist/core/context/eviction.js.map +1 -0
- package/dist/core/context/pipeline.d.ts +90 -0
- package/dist/core/context/pipeline.d.ts.map +1 -0
- package/dist/core/context/pipeline.js +109 -0
- package/dist/core/context/pipeline.js.map +1 -0
- package/dist/core/credential-failover.d.ts +30 -0
- package/dist/core/credential-failover.d.ts.map +1 -0
- package/dist/core/credential-failover.js +46 -0
- package/dist/core/credential-failover.js.map +1 -0
- package/dist/core/credential-pool.d.ts +60 -0
- package/dist/core/credential-pool.d.ts.map +1 -0
- package/dist/core/credential-pool.js +84 -0
- package/dist/core/credential-pool.js.map +1 -0
- package/dist/core/delegation/agents.d.ts +15 -0
- package/dist/core/delegation/agents.d.ts.map +1 -0
- package/dist/core/delegation/agents.js +55 -0
- package/dist/core/delegation/agents.js.map +1 -0
- package/dist/core/delegation/ceiling.d.ts +29 -0
- package/dist/core/delegation/ceiling.d.ts.map +1 -0
- package/dist/core/delegation/ceiling.js +34 -0
- package/dist/core/delegation/ceiling.js.map +1 -0
- package/dist/core/delegation/runtime.d.ts +94 -0
- package/dist/core/delegation/runtime.d.ts.map +1 -0
- package/dist/core/delegation/runtime.js +117 -0
- package/dist/core/delegation/runtime.js.map +1 -0
- package/dist/core/durable-state/daemon.d.ts +37 -0
- package/dist/core/durable-state/daemon.d.ts.map +1 -0
- package/dist/core/durable-state/daemon.js +62 -0
- package/dist/core/durable-state/daemon.js.map +1 -0
- package/dist/core/durable-state/provenance.d.ts +7 -0
- package/dist/core/durable-state/provenance.d.ts.map +1 -0
- package/dist/core/durable-state/provenance.js +24 -0
- package/dist/core/durable-state/provenance.js.map +1 -0
- package/dist/core/durable-state/sqlite.d.ts +84 -0
- package/dist/core/durable-state/sqlite.d.ts.map +1 -0
- package/dist/core/durable-state/sqlite.js +331 -0
- package/dist/core/durable-state/sqlite.js.map +1 -0
- package/dist/core/environment.d.ts +12 -0
- package/dist/core/environment.d.ts.map +1 -0
- package/dist/core/environment.js +69 -0
- package/dist/core/environment.js.map +1 -0
- package/dist/core/evidence-policy.d.ts +17 -0
- package/dist/core/evidence-policy.d.ts.map +1 -0
- package/dist/core/evidence-policy.js +25 -0
- package/dist/core/evidence-policy.js.map +1 -0
- package/dist/core/evidence.d.ts +16 -0
- package/dist/core/evidence.d.ts.map +1 -0
- package/dist/core/evidence.js +51 -0
- package/dist/core/evidence.js.map +1 -0
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js +2 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/model-config.d.ts +8 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +21 -5
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts +20 -0
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +59 -0
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +73 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +225 -8
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/observability/aggregate.d.ts +21 -0
- package/dist/core/observability/aggregate.d.ts.map +1 -0
- package/dist/core/observability/aggregate.js +36 -0
- package/dist/core/observability/aggregate.js.map +1 -0
- package/dist/core/observability/otlp.d.ts +66 -0
- package/dist/core/observability/otlp.d.ts.map +1 -0
- package/dist/core/observability/otlp.js +95 -0
- package/dist/core/observability/otlp.js.map +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +3 -2
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permissions/gate.d.ts +35 -0
- package/dist/core/permissions/gate.d.ts.map +1 -0
- package/dist/core/permissions/gate.js +72 -0
- package/dist/core/permissions/gate.js.map +1 -0
- package/dist/core/permissions/modes.d.ts +18 -0
- package/dist/core/permissions/modes.d.ts.map +1 -0
- package/dist/core/permissions/modes.js +57 -0
- package/dist/core/permissions/modes.js.map +1 -0
- package/dist/core/permissions/responder.d.ts +30 -0
- package/dist/core/permissions/responder.d.ts.map +1 -0
- package/dist/core/permissions/responder.js +32 -0
- package/dist/core/permissions/responder.js.map +1 -0
- package/dist/core/permissions/rules.d.ts +34 -0
- package/dist/core/permissions/rules.d.ts.map +1 -0
- package/dist/core/permissions/rules.js +74 -0
- package/dist/core/permissions/rules.js.map +1 -0
- package/dist/core/permissions/startup.d.ts +33 -0
- package/dist/core/permissions/startup.d.ts.map +1 -0
- package/dist/core/permissions/startup.js +55 -0
- package/dist/core/permissions/startup.js.map +1 -0
- package/dist/core/permissions/store.d.ts +114 -0
- package/dist/core/permissions/store.d.ts.map +1 -0
- package/dist/core/permissions/store.js +229 -0
- package/dist/core/permissions/store.js.map +1 -0
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js +6 -7
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +2 -2
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +20 -16
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/sandbox/child-entry.d.ts +2 -0
- package/dist/core/sandbox/child-entry.d.ts.map +1 -0
- package/dist/core/sandbox/child-entry.js +11 -0
- package/dist/core/sandbox/child-entry.js.map +1 -0
- package/dist/core/sandbox/cli-launch.d.ts +27 -0
- package/dist/core/sandbox/cli-launch.d.ts.map +1 -0
- package/dist/core/sandbox/cli-launch.js +133 -0
- package/dist/core/sandbox/cli-launch.js.map +1 -0
- package/dist/core/sandbox/cli-supervisor.d.ts +25 -0
- package/dist/core/sandbox/cli-supervisor.d.ts.map +1 -0
- package/dist/core/sandbox/cli-supervisor.js +57 -0
- package/dist/core/sandbox/cli-supervisor.js.map +1 -0
- package/dist/core/sandbox/linux-backend.d.ts +18 -0
- package/dist/core/sandbox/linux-backend.d.ts.map +1 -0
- package/dist/core/sandbox/linux-backend.js +186 -0
- package/dist/core/sandbox/linux-backend.js.map +1 -0
- package/dist/core/sandbox/macos-backend.d.ts +18 -0
- package/dist/core/sandbox/macos-backend.d.ts.map +1 -0
- package/dist/core/sandbox/macos-backend.js +195 -0
- package/dist/core/sandbox/macos-backend.js.map +1 -0
- package/dist/core/sandbox/network-proxy.d.ts +19 -0
- package/dist/core/sandbox/network-proxy.d.ts.map +1 -0
- package/dist/core/sandbox/network-proxy.js +79 -0
- package/dist/core/sandbox/network-proxy.js.map +1 -0
- package/dist/core/sandbox/policy.d.ts +32 -0
- package/dist/core/sandbox/policy.d.ts.map +1 -0
- package/dist/core/sandbox/policy.js +38 -0
- package/dist/core/sandbox/policy.js.map +1 -0
- package/dist/core/sandbox/supervisor.d.ts +31 -0
- package/dist/core/sandbox/supervisor.d.ts.map +1 -0
- package/dist/core/sandbox/supervisor.js +18 -0
- package/dist/core/sandbox/supervisor.js.map +1 -0
- package/dist/core/sandbox/violations.d.ts +23 -0
- package/dist/core/sandbox/violations.d.ts.map +1 -0
- package/dist/core/sandbox/violations.js +30 -0
- package/dist/core/sandbox/violations.js.map +1 -0
- package/dist/core/sdk.d.ts +20 -36
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +129 -2
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +41 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +57 -0
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-share.d.ts +16 -0
- package/dist/core/session-share.d.ts.map +1 -0
- package/dist/core/session-share.js +22 -0
- package/dist/core/session-share.js.map +1 -0
- package/dist/core/settings-manager.d.ts +38 -9
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +39 -24
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -5
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/timings.d.ts +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +3 -2
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/ask-user.d.ts +25 -0
- package/dist/core/tools/ask-user.d.ts.map +1 -0
- package/dist/core/tools/ask-user.js +49 -0
- package/dist/core/tools/ask-user.js.map +1 -0
- package/dist/core/tools/bash-command-segments.d.ts +22 -0
- package/dist/core/tools/bash-command-segments.d.ts.map +1 -0
- package/dist/core/tools/bash-command-segments.js +128 -0
- package/dist/core/tools/bash-command-segments.js.map +1 -0
- package/dist/core/tools/bash.d.ts +26 -3
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +105 -16
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/contract.d.ts +156 -0
- package/dist/core/tools/contract.d.ts.map +1 -0
- package/dist/core/tools/contract.js +48 -0
- package/dist/core/tools/contract.js.map +1 -0
- package/dist/core/tools/delegate.d.ts +38 -0
- package/dist/core/tools/delegate.d.ts.map +1 -0
- package/dist/core/tools/delegate.js +66 -0
- package/dist/core/tools/delegate.js.map +1 -0
- package/dist/core/tools/edit.d.ts +2 -2
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +24 -0
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +2 -2
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +12 -0
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +2 -2
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +12 -0
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +29 -4
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +118 -2
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +2 -2
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +12 -0
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +1 -1
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-permission.d.ts +18 -0
- package/dist/core/tools/path-permission.d.ts.map +1 -0
- package/dist/core/tools/path-permission.js +28 -0
- package/dist/core/tools/path-permission.js.map +1 -0
- package/dist/core/tools/plan-present.d.ts +27 -0
- package/dist/core/tools/plan-present.d.ts.map +1 -0
- package/dist/core/tools/plan-present.js +55 -0
- package/dist/core/tools/plan-present.js.map +1 -0
- package/dist/core/tools/read.d.ts +2 -2
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +12 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/test.d.ts +34 -0
- package/dist/core/tools/test.d.ts.map +1 -0
- package/dist/core/tools/test.js +75 -0
- package/dist/core/tools/test.js.map +1 -0
- package/dist/core/tools/todo-write.d.ts +31 -0
- package/dist/core/tools/todo-write.d.ts.map +1 -0
- package/dist/core/tools/todo-write.js +51 -0
- package/dist/core/tools/todo-write.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +13 -2
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +11 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/tool-schema.d.ts +22 -0
- package/dist/core/tools/tool-schema.d.ts.map +1 -0
- package/dist/core/tools/tool-schema.js +45 -0
- package/dist/core/tools/tool-schema.js.map +1 -0
- package/dist/core/tools/web-fetch.d.ts +26 -0
- package/dist/core/tools/web-fetch.d.ts.map +1 -0
- package/dist/core/tools/web-fetch.js +62 -0
- package/dist/core/tools/web-fetch.js.map +1 -0
- package/dist/core/tools/web-search.d.ts +26 -0
- package/dist/core/tools/web-search.d.ts.map +1 -0
- package/dist/core/tools/web-search.js +53 -0
- package/dist/core/tools/web-search.js.map +1 -0
- package/dist/core/tools/write.d.ts +6 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +32 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/usage-performance-store.d.ts +56 -0
- package/dist/core/usage-performance-store.d.ts.map +1 -0
- package/dist/core/usage-performance-store.js +85 -0
- package/dist/core/usage-performance-store.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +48 -6
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +2 -2
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +9 -6
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +1 -4
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +11 -39
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +8 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +49 -20
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -2
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +6 -6
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +2 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +58 -9
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -3
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +92 -104
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +2 -2
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +15 -10
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/rpc-entry.d.ts.map +1 -1
- package/dist/rpc-entry.js +2 -1
- package/dist/rpc-entry.js.map +1 -1
- package/dist/server/create-harness.d.ts +1 -1
- package/dist/server/create-harness.d.ts.map +1 -1
- package/dist/server/create-harness.js +6 -5
- package/dist/server/create-harness.js.map +1 -1
- package/dist/testing/replay/metrics.d.ts +24 -0
- package/dist/testing/replay/metrics.d.ts.map +1 -0
- package/dist/testing/replay/metrics.js +35 -0
- package/dist/testing/replay/metrics.js.map +1 -0
- package/dist/testing/replay/recorded-provider.d.ts +10 -0
- package/dist/testing/replay/recorded-provider.d.ts.map +1 -0
- package/dist/testing/replay/recorded-provider.js +108 -0
- package/dist/testing/replay/recorded-provider.js.map +1 -0
- package/dist/testing/replay/runner.d.ts +56 -0
- package/dist/testing/replay/runner.d.ts.map +1 -0
- package/dist/testing/replay/runner.js +406 -0
- package/dist/testing/replay/runner.js.map +1 -0
- package/dist/utils/apex-code-user-agent.d.ts +2 -0
- package/dist/utils/apex-code-user-agent.d.ts.map +1 -0
- package/dist/utils/apex-code-user-agent.js +5 -0
- package/dist/utils/apex-code-user-agent.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +32 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +198 -100
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +5 -5
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +23 -14
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/compaction.md +21 -21
- package/docs/containerization.md +24 -21
- package/docs/custom-provider.md +9 -9
- package/docs/development.md +11 -11
- package/docs/environment-variables.md +36 -77
- package/docs/extensions.md +47 -47
- package/docs/index.md +12 -24
- package/docs/json.md +6 -6
- package/docs/keybindings.md +3 -3
- package/docs/llama-cpp.md +7 -7
- package/docs/models.md +11 -11
- package/docs/packages.md +46 -42
- package/docs/prompt-templates.md +3 -3
- package/docs/providers.md +10 -10
- package/docs/quickstart.md +49 -32
- package/docs/rpc.md +11 -11
- package/docs/sdk.md +4 -4
- package/docs/security.md +18 -18
- package/docs/session-format.md +9 -9
- package/docs/sessions.md +13 -13
- package/docs/settings.md +10 -14
- package/docs/shell-aliases.md +1 -1
- package/docs/skills.md +8 -8
- package/docs/terminal-setup.md +12 -12
- package/docs/termux.md +4 -4
- package/docs/themes.md +8 -8
- package/docs/tmux.md +4 -4
- package/docs/tui.md +3 -3
- package/docs/usage.md +54 -51
- package/docs/windows.md +1 -1
- package/npm-shrinkwrap.json +5 -5
- package/package.json +2 -3
- package/dist/core/telemetry.d.ts +0 -3
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js +0 -9
- package/dist/core/telemetry.js.map +0 -1
- package/dist/utils/pi-user-agent.d.ts +0 -2
- package/dist/utils/pi-user-agent.d.ts.map +0 -1
- package/dist/utils/pi-user-agent.js +0 -5
- package/dist/utils/pi-user-agent.js.map +0 -1
package/docs/sdk.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
>
|
|
1
|
+
> Apex Code can help you use the SDK. Ask it to build an integration for your use case.
|
|
2
2
|
|
|
3
3
|
# SDK
|
|
4
4
|
|
|
5
|
-
The SDK provides programmatic access to
|
|
5
|
+
The SDK provides programmatic access to Apex Code's agent capabilities. Use it to embed Apex Code in other applications, build custom interfaces, or integrate with automated workflows.
|
|
6
6
|
|
|
7
7
|
**Example use cases:**
|
|
8
8
|
- Build a custom UI (web, desktop, mobile)
|
|
@@ -516,7 +516,7 @@ Specify which built-in tools to enable:
|
|
|
516
516
|
- `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
|
|
517
517
|
- `excludeTools` disables specific built-in, extension, or custom tool names after any `tools` allowlist is applied
|
|
518
518
|
|
|
519
|
-
The `edit` tool returns `details.diff` for
|
|
519
|
+
The `edit` tool returns `details.diff` for Apex Code's TUI display and `details.patch` as a standard unified patch for SDK consumers.
|
|
520
520
|
|
|
521
521
|
```typescript
|
|
522
522
|
import { createAgentSession } from "apex-code";
|
|
@@ -1133,7 +1133,7 @@ See [RPC documentation](rpc.md) for the JSON protocol.
|
|
|
1133
1133
|
For subprocess-based integration without building with the SDK, use the CLI directly:
|
|
1134
1134
|
|
|
1135
1135
|
```bash
|
|
1136
|
-
|
|
1136
|
+
apex-code --mode rpc --no-session
|
|
1137
1137
|
```
|
|
1138
1138
|
|
|
1139
1139
|
See [RPC documentation](rpc.md) for the JSON protocol.
|
package/docs/security.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
# Security
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Apex Code is a local coding agent. It runs with the permissions of the user account that starts it, and it treats files writable by that user as inside the same local trust boundary.
|
|
4
|
+
|
|
5
|
+
See also [`SECURITY.md`](https://github.com/Fchery87/apex-code/blob/main/SECURITY.md) at the repository root for the reporting process, maintainer ownership, and what is in and out of scope; this page covers the underlying project-trust and sandboxing mechanics in more detail.
|
|
4
6
|
|
|
5
7
|
## Project Trust
|
|
6
8
|
|
|
7
|
-
Project trust controls whether
|
|
9
|
+
Project trust controls whether Apex Code loads project-local settings, resources, packages, and extensions. It is not a sandbox and it does not restrict what the model can ask tools to do after you start working in a directory.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
Apex Code considers a project to have resources that require trust when it finds any of these from the current working directory:
|
|
10
12
|
|
|
11
13
|
- `.apex-code/settings.json`
|
|
12
14
|
- `.apex-code/extensions`, `.apex-code/skills`, `.apex-code/prompts`, or `.apex-code/themes`
|
|
13
15
|
- `.apex-code/SYSTEM.md` or `.apex-code/APPEND_SYSTEM.md`
|
|
14
16
|
- project `.agents/skills` in the current directory or an ancestor directory
|
|
15
17
|
|
|
16
|
-
A bare `.pi` directory does not count as a project resource that requires trust.
|
|
18
|
+
A bare `.pi` directory does not count as a project resource that requires trust — `.apex-code` is the canonical project directory name (see [Environment compatibility](../README.md#environment-compatibility)).
|
|
17
19
|
|
|
18
|
-
When an interactive session starts in a project with resources that require trust and no saved decision for the current directory or a parent directory,
|
|
20
|
+
When an interactive session starts in a project with resources that require trust and no saved decision for the current directory or a parent directory, Apex Code follows `defaultProjectTrust` from global settings. The default value is `"ask"`, which asks whether to trust the project when UI is available. Saved decisions are stored by canonical directory in `~/.apex-code/agent/trust.json`, and the closest saved decision on the current or parent path applies before the global default.
|
|
19
21
|
|
|
20
|
-
Trusting a project allows
|
|
22
|
+
Trusting a project allows Apex Code to load project resources that require trust, including:
|
|
21
23
|
|
|
22
24
|
- `.apex-code/settings.json`
|
|
23
|
-
- `.
|
|
25
|
+
- `.apex-code` resources such as extensions, skills, prompt templates, themes, and system prompt files
|
|
24
26
|
- missing project packages configured through project settings
|
|
25
27
|
- project-local extensions and project package-managed extensions
|
|
26
28
|
|
|
27
|
-
Declining trust skips protected resources. Context files such as `AGENTS.override.md`, `AGENTS.md`, and `CLAUDE.md` are loaded regardless of project trust unless context loading is disabled. Before trust is resolved,
|
|
29
|
+
Declining trust skips protected resources. Context files such as `AGENTS.override.md`, `AGENTS.md`, and `CLAUDE.md` are loaded regardless of project trust unless context loading is disabled. Before trust is resolved, Apex Code only loads context files, user/global extensions, and CLI `-e` extensions. User/global and CLI extensions can handle the `project_trust` event; the first extension that returns a yes/no decision owns the decision.
|
|
28
30
|
|
|
29
31
|
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, `defaultProjectTrust: "ask"` and `"never"` ignore such resources, while `"always"` trusts them. Use `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
30
32
|
|
|
31
|
-
##
|
|
32
|
-
|
|
33
|
-
Pi does not include a built-in sandbox. Built-in tools can read files, write files, edit files, and run shell commands with the permissions of the pi process. Extensions are TypeScript modules that run with the same permissions. Package installs, shell commands, language servers, test commands, and other developer tools behave as ordinary local processes.
|
|
33
|
+
## OS Sandbox and Permissions
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Unlike upstream Pi, Apex Code adds a permission gate in front of every tool call and an OS-level sandbox on Linux and macOS (Bubblewrap and Seatbelt respectively) — see [ADR 0005](https://github.com/Fchery87/apex-code/blob/main/docs/adr/0005-sandbox-boundary-guarantees.md) for exactly what that boundary does and does not guarantee, and the root [`SECURITY.md`](https://github.com/Fchery87/apex-code/blob/main/SECURITY.md) for what counts as a reportable bypass. Windows has no supported sandbox backend. Outside of the permission gate and OS sandbox, built-in tools, extensions, package installs, shell commands, language servers, and other developer tools still run with the permissions of the Apex Code process.
|
|
36
36
|
|
|
37
|
-
Project trust is only an input-loading guard. It prevents a repository from silently changing
|
|
37
|
+
Project trust is only an input-loading guard, layered underneath the permission gate and sandbox. It prevents a repository from silently changing Apex Code's settings or extensions before you approve it. It does not make untrusted code, untrusted prompts, or untrusted model output safe by itself. Prompt injection from repository files, comments, documentation, context files, or build output is expected local-agent risk and cannot be reliably prevented by Apex Code.
|
|
38
38
|
|
|
39
39
|
## Running Untrusted or Unmonitored Work
|
|
40
40
|
|
|
41
|
-
For untrusted repositories, generated code you do not intend to monitor closely, or unattended automation, run
|
|
41
|
+
For untrusted repositories, generated code you do not intend to monitor closely, or unattended automation, run Apex Code in a contained environment in addition to its own sandbox. Use a container, VM, micro-VM, remote sandbox, or policy-controlled sandbox with only the files and credentials required for the task.
|
|
42
42
|
|
|
43
43
|
Common patterns are documented in [Containerization](containerization.md):
|
|
44
44
|
|
|
45
|
-
- run the whole
|
|
46
|
-
- run host
|
|
45
|
+
- run the whole Apex Code process inside a container/sandbox
|
|
46
|
+
- run host Apex Code while routing built-in tool execution into a Gondolin micro-VM
|
|
47
47
|
- mount only the workspace paths the agent should access
|
|
48
48
|
- avoid mounting host `~/.apex-code/agent` unless the container should access host sessions, settings, and credentials
|
|
49
49
|
- pass the minimum required API keys or use short-lived credentials
|
|
@@ -54,6 +54,6 @@ If you bind-mount a host workspace read/write, writes from inside the container
|
|
|
54
54
|
|
|
55
55
|
## Reporting Security Issues
|
|
56
56
|
|
|
57
|
-
To report a security issue, follow
|
|
57
|
+
To report a security issue, follow Apex Code's own [Security Policy](https://github.com/Fchery87/apex-code/blob/main/SECURITY.md) — private disclosure via [GitHub private vulnerability reporting](https://github.com/Fchery87/apex-code/security/advisories/new). Do not open a public issue for security-sensitive reports.
|
|
58
58
|
|
|
59
|
-
Expected local-agent behavior,
|
|
59
|
+
Expected local-agent behavior, prompt injection from untrusted content, and behavior of user-installed extensions or skills are generally outside the security boundary unless the report demonstrates a real bypass of the permission gate or OS sandbox, or shows how Apex Code grants access that the local user did not already have. See `SECURITY.md`'s "In scope"/"Out of scope" sections for the current, authoritative boundary.
|
package/docs/session-format.md
CHANGED
|
@@ -14,7 +14,7 @@ Where `<path>` is the working directory with `/` replaced by `-`.
|
|
|
14
14
|
|
|
15
15
|
Sessions can be removed by deleting their `.jsonl` files under `~/.apex-code/agent/sessions/`.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Apex Code also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, Apex Code uses the `trash` CLI to avoid permanent deletion.
|
|
18
18
|
|
|
19
19
|
## Session Version
|
|
20
20
|
|
|
@@ -28,11 +28,11 @@ Existing sessions are automatically migrated to the current version (v3) when lo
|
|
|
28
28
|
|
|
29
29
|
## Source Files
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/
|
|
33
|
-
- [`packages/coding-agent/src/core/messages.ts`](https://github.com/
|
|
31
|
+
Forked source on GitHub ([apex-code](https://github.com/Fchery87/apex-code)); base message types remain in frozen, consumed `pi-ai` ([pi-mono](https://github.com/earendil-works/pi-mono)):
|
|
32
|
+
- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/Fchery87/apex-code/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager
|
|
33
|
+
- [`packages/coding-agent/src/core/messages.ts`](https://github.com/Fchery87/apex-code/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.)
|
|
34
34
|
- [`packages/ai/src/types.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage)
|
|
35
|
-
- [`packages/agent/src/types.ts`](https://github.com/
|
|
35
|
+
- [`packages/agent/src/types.ts`](https://github.com/Fchery87/apex-code/blob/main/packages/agent/src/types.ts) - AgentMessage union type
|
|
36
36
|
|
|
37
37
|
For TypeScript definitions in your project, inspect `node_modules/apex-code/dist/` and `node_modules/@earendil-works/pi-ai/dist/`.
|
|
38
38
|
|
|
@@ -117,9 +117,9 @@ interface Usage {
|
|
|
117
117
|
}
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
The exported pi-ai `StopReason` type also includes `"pending"`, but that value is reserved for partial messages in streaming events. Terminal `done`/`error` messages replace it with a completion reason before
|
|
120
|
+
The exported pi-ai `StopReason` type also includes `"pending"`, but that value is reserved for partial messages in streaming events. Terminal `done`/`error` messages replace it with a completion reason before Apex Code persists the assistant message, so `"pending"` should never appear in session JSONL.
|
|
121
121
|
|
|
122
|
-
### Extended Message Types (from
|
|
122
|
+
### Extended Message Types (from Apex Code)
|
|
123
123
|
|
|
124
124
|
```typescript
|
|
125
125
|
interface BashExecutionMessage {
|
|
@@ -244,7 +244,7 @@ Optional fields:
|
|
|
244
244
|
- `usage`: LLM usage from generating the summary; included in session token and cost totals
|
|
245
245
|
- `retainedTail`: Materialized `AgentMessage[]` kept after compaction. This is optional only for backward compatibility with older sessions. Newer harness-generated compactions include it so we can rebuild context from this checkpoint without walking older entries before the compaction entry.
|
|
246
246
|
- `details`: Implementation-specific data (e.g., `{ readFiles: string[], modifiedFiles: string[] }` for default, or custom data for extensions)
|
|
247
|
-
- `fromHook`: `true` if generated by an extension, `false`/`undefined` if
|
|
247
|
+
- `fromHook`: `true` if generated by an extension, `false`/`undefined` if generated by Apex Code itself (legacy field name)
|
|
248
248
|
- `firstKeptEntryId`: for compatibility with old entry format.
|
|
249
249
|
|
|
250
250
|
### BranchSummaryEntry
|
|
@@ -258,7 +258,7 @@ Created when switching branches via `/tree` with an LLM generated summary of the
|
|
|
258
258
|
Optional fields:
|
|
259
259
|
- `usage`: LLM usage from generating the summary; included in session token and cost totals
|
|
260
260
|
- `details`: File tracking data (`{ readFiles: string[], modifiedFiles: string[] }`) for default, or custom data for extensions
|
|
261
|
-
- `fromHook`: `true` if generated by an extension, `false`/`undefined` if
|
|
261
|
+
- `fromHook`: `true` if generated by an extension, `false`/`undefined` if generated by Apex Code itself (legacy field name)
|
|
262
262
|
|
|
263
263
|
### CustomEntry
|
|
264
264
|
|
package/docs/sessions.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Sessions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Apex Code saves conversations as sessions so you can continue work, branch from earlier turns, and revisit previous paths.
|
|
4
4
|
|
|
5
5
|
## Session Storage
|
|
6
6
|
|
|
7
7
|
Sessions auto-save to `~/.apex-code/agent/sessions/`, organized by working directory. Each session is a JSONL file with a tree structure.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
apex-code -c # Continue most recent session
|
|
11
|
+
apex-code -r # Browse and select from past sessions
|
|
12
|
+
apex-code --no-session # Ephemeral mode; do not save
|
|
13
|
+
apex-code --name "my task" # Set session display name at startup
|
|
14
|
+
apex-code --session <path|id> # Use a specific session file or partial session ID
|
|
15
|
+
apex-code --fork <path|id> # Fork a session file or partial session ID into a new session
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Use `/session` in interactive mode to see the current session file, session ID, message count, tokens, and cost.
|
|
@@ -36,7 +36,7 @@ For the JSONL file format and SessionManager API, see [Session Format](session-f
|
|
|
36
36
|
|
|
37
37
|
## Resuming and Deleting Sessions
|
|
38
38
|
|
|
39
|
-
`/resume` opens an interactive session picker for the current project. `
|
|
39
|
+
`/resume` opens an interactive session picker for the current project. `apex-code -r` opens the same picker at startup.
|
|
40
40
|
|
|
41
41
|
In the picker you can:
|
|
42
42
|
|
|
@@ -47,7 +47,7 @@ In the picker you can:
|
|
|
47
47
|
- rename with Ctrl+R
|
|
48
48
|
- delete with Ctrl+D, then confirm
|
|
49
49
|
|
|
50
|
-
When available,
|
|
50
|
+
When available, Apex Code uses the `trash` CLI for deletion instead of permanently removing files.
|
|
51
51
|
|
|
52
52
|
## Naming Sessions
|
|
53
53
|
|
|
@@ -60,11 +60,11 @@ Use `/name <name>` to set a human-readable session name:
|
|
|
60
60
|
Set the name at startup with `--name` or `-n`:
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
apex-code --name "Refactor auth module"
|
|
64
|
+
apex-code --name "CI audit" -p "Review this build failure"
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Named sessions are easier to find in `/resume` and `
|
|
67
|
+
Named sessions are easier to find in `/resume` and `apex-code -r`.
|
|
68
68
|
|
|
69
69
|
## Branching with `/tree`
|
|
70
70
|
|
|
@@ -128,7 +128,7 @@ Use `/tree` when you want to keep alternatives together. Use `/fork` or `/clone`
|
|
|
128
128
|
|
|
129
129
|
## Branch Summaries
|
|
130
130
|
|
|
131
|
-
When `/tree` switches away from one branch to another,
|
|
131
|
+
When `/tree` switches away from one branch to another, Apex Code can summarize the abandoned branch and attach that summary at the new position. This preserves important context from the path you left without replaying the whole branch.
|
|
132
132
|
|
|
133
133
|
When prompted, choose one of:
|
|
134
134
|
|
package/docs/settings.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Settings
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Apex Code uses JSON settings files with project settings overriding global settings.
|
|
4
4
|
|
|
5
5
|
| Location | Scope |
|
|
6
6
|
|----------|-------|
|
|
@@ -11,15 +11,15 @@ Edit directly or use `/settings` for common options.
|
|
|
11
11
|
|
|
12
12
|
## Project Trust
|
|
13
13
|
|
|
14
|
-
On interactive startup,
|
|
14
|
+
On interactive startup, Apex Code asks before trusting a project folder that contains project-local settings, resources, or project `.agents/skills` and has no saved decision for the folder or a parent folder in `~/.apex-code/agent/trust.json`. Trusting a project allows Apex Code to load `.apex-code/settings.json` and other project-local resources, install missing project packages, and execute project extensions.
|
|
15
15
|
|
|
16
16
|
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore those project resources, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
17
17
|
|
|
18
18
|
If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.apex-code/agent/settings.json`, or change it with `/settings`.
|
|
19
19
|
|
|
20
|
-
`
|
|
20
|
+
`apex-code config` and package commands use the same project trust flow, except `apex-code update` never prompts. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
|
|
21
21
|
|
|
22
|
-
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.apex-code/agent/trust.json` only; the current session is not reloaded, so restart
|
|
22
|
+
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.apex-code/agent/trust.json` only; the current session is not reloaded, so restart Apex Code for changes to take effect.
|
|
23
23
|
|
|
24
24
|
## All Settings
|
|
25
25
|
|
|
@@ -56,9 +56,6 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
|
|
|
56
56
|
| `quietStartup` | boolean | `false` | Hide startup header |
|
|
57
57
|
| `defaultProjectTrust` | string | `"ask"` | Fallback project trust behavior: `"ask"`, `"always"`, or `"never"`. Global setting only |
|
|
58
58
|
| `collapseChangelog` | boolean | `false` | Show condensed changelog after updates |
|
|
59
|
-
| `enableInstallTelemetry` | boolean | `true` | Send an anonymous install/update version ping after first install or changelog-detected updates. This does not control update checks |
|
|
60
|
-
| `enableAnalytics` | boolean | `false` | Opt-in analytics data sharing. Currently only asked for during the experimental first-time setup (`PI_EXPERIMENTAL=1`) |
|
|
61
|
-
| `trackingId` | string | - | Analytics tracking identifier, generated when `enableAnalytics` is turned on |
|
|
62
59
|
| `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
|
|
63
60
|
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
|
|
64
61
|
| `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
|
|
@@ -68,7 +65,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
|
|
|
68
65
|
| `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
|
|
69
66
|
| `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling, `"always"` reserves the rightmost column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
|
|
70
67
|
|
|
71
|
-
For VS Code, include `--wait` so
|
|
68
|
+
For VS Code, include `--wait` so Apex Code resumes after the editor exits:
|
|
72
69
|
|
|
73
70
|
```json
|
|
74
71
|
{
|
|
@@ -78,9 +75,8 @@ For VS Code, include `--wait` so pi resumes after the editor exits:
|
|
|
78
75
|
|
|
79
76
|
### Telemetry and update checks
|
|
80
77
|
|
|
81
|
-
`enableInstallTelemetry` only controls the anonymous install/update ping to `https://pi.dev/api/report-install`. Opting out of telemetry does not disable update checks; Pi can still fetch `https://pi.dev/api/latest-version` to look for the latest version.
|
|
82
78
|
|
|
83
|
-
Set `
|
|
79
|
+
Set `APEX_CODE_SKIP_VERSION_CHECK=1` to disable the Apex Code version update check. Use `--offline` or `APEX_CODE_OFFLINE=1` to disable all startup network operations described here, including update checks and package update checks. Apex Code sends no install or update telemetry to this project (see [`README.md`](../README.md#network-and-privacy)). The temporary `PI_SKIP_VERSION_CHECK`/`PI_OFFLINE` aliases also work; see [Environment variables](environment-variables.md).
|
|
84
80
|
|
|
85
81
|
### Network
|
|
86
82
|
|
|
@@ -146,7 +142,7 @@ Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--off
|
|
|
146
142
|
|
|
147
143
|
When a provider requests a retry delay longer than `retry.provider.maxRetryDelayMs`, the request fails immediately with an informative error instead of waiting silently. Set it to `0` to disable the limit.
|
|
148
144
|
|
|
149
|
-
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before
|
|
145
|
+
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before Apex Code sees them, which may block the agent until the provider quota resets in some circumstances.
|
|
150
146
|
|
|
151
147
|
```json
|
|
152
148
|
{
|
|
@@ -206,10 +202,10 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explic
|
|
|
206
202
|
| `sessionDir` | string | - | Directory where session files are stored. Accepts absolute or relative paths, plus `~`. |
|
|
207
203
|
|
|
208
204
|
```json
|
|
209
|
-
{ "sessionDir": ".
|
|
205
|
+
{ "sessionDir": ".apex-code/sessions" }
|
|
210
206
|
```
|
|
211
207
|
|
|
212
|
-
When multiple sources specify a session directory, precedence is `--session-dir`, `
|
|
208
|
+
When multiple sources specify a session directory, precedence is `--session-dir`, `APEX_CODE_CODING_AGENT_SESSION_DIR`, then `sessionDir` in settings.json.
|
|
213
209
|
|
|
214
210
|
### Model Cycling
|
|
215
211
|
|
|
@@ -234,7 +230,7 @@ When multiple sources specify a session directory, precedence is `--session-dir`
|
|
|
234
230
|
|
|
235
231
|
These settings define where to load extensions, skills, prompts, and themes from.
|
|
236
232
|
|
|
237
|
-
Paths in `~/.apex-code/agent/settings.json` resolve relative to `~/.apex-code/agent`. Paths in `.apex-code/settings.json` resolve relative to
|
|
233
|
+
Paths in `~/.apex-code/agent/settings.json` resolve relative to `~/.apex-code/agent`. Paths in `.apex-code/settings.json` resolve relative to the project root (the current working directory). Absolute paths and `~` are supported.
|
|
238
234
|
|
|
239
235
|
| Setting | Type | Default | Description |
|
|
240
236
|
|---------|------|---------|-------------|
|
package/docs/shell-aliases.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Shell Aliases
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Apex Code runs bash in non-interactive mode (`bash -c`), which doesn't expand aliases by default.
|
|
4
4
|
|
|
5
5
|
To enable your shell aliases, add to `~/.apex-code/agent/settings.json`:
|
|
6
6
|
|
package/docs/skills.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
>
|
|
1
|
+
> Apex Code can create skills. Ask it to build one for your use case.
|
|
2
2
|
|
|
3
3
|
# Skills
|
|
4
4
|
|
|
5
5
|
Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Apex Code implements the [Agent Skills standard](https://agentskills.io/specification), warning about most violations but remaining lenient. Apex Code allows skill names to differ from their parent directory even though the standard disallows it; that rule is suboptimal for shared skill directories used across multiple agent harnesses.
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ Pi implements the [Agent Skills standard](https://agentskills.io/specification),
|
|
|
21
21
|
|
|
22
22
|
> **Security:** Skills can instruct the model to perform any action and may include executable code the model invokes. Review skill content before use.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Apex Code loads skills from:
|
|
25
25
|
|
|
26
26
|
- Global:
|
|
27
27
|
- `~/.apex-code/agent/skills/`
|
|
@@ -29,7 +29,7 @@ Pi loads skills from:
|
|
|
29
29
|
- Project (only after the project is trusted):
|
|
30
30
|
- `.apex-code/skills/`
|
|
31
31
|
- `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo)
|
|
32
|
-
- Packages: `skills/` directories or `pi.skills` entries in `package.json`
|
|
32
|
+
- Packages: `skills/` directories or `pi.skills` entries in `package.json` (`pi` is Apex Code's retained package-manifest key)
|
|
33
33
|
- Settings: `skills` array with files or directories
|
|
34
34
|
- CLI: `--skill <path>` (repeatable, additive even with `--no-skills`)
|
|
35
35
|
|
|
@@ -63,7 +63,7 @@ For project-level Claude Code skills, add to `.apex-code/settings.json`:
|
|
|
63
63
|
|
|
64
64
|
## How Skills Work
|
|
65
65
|
|
|
66
|
-
1. At startup,
|
|
66
|
+
1. At startup, Apex Code scans skill locations and extracts names and descriptions
|
|
67
67
|
2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills)
|
|
68
68
|
3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
|
|
69
69
|
4. The agent follows the instructions, using relative paths to reference scripts and assets
|
|
@@ -140,7 +140,7 @@ Per the [Agent Skills specification](https://agentskills.io/specification#frontm
|
|
|
140
140
|
|
|
141
141
|
| Field | Required | Description |
|
|
142
142
|
|-------|----------|-------------|
|
|
143
|
-
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Unlike the standard,
|
|
143
|
+
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Unlike the standard, Apex Code does not require this to match the parent directory because that standard requirement is suboptimal for shared skill directories. |
|
|
144
144
|
| `description` | Yes | Max 1024 chars. What the skill does and when to use it. |
|
|
145
145
|
| `license` | No | License name or reference to bundled file. |
|
|
146
146
|
| `compatibility` | No | Max 500 chars. Environment requirements. |
|
|
@@ -154,7 +154,7 @@ Per the [Agent Skills specification](https://agentskills.io/specification#frontm
|
|
|
154
154
|
- Lowercase letters, numbers, hyphens only
|
|
155
155
|
- No leading/trailing hyphens
|
|
156
156
|
- No consecutive hyphens
|
|
157
|
-
|
|
157
|
+
Apex Code does not require the name to match the parent directory. The Agent Skills standard does, but that requirement is suboptimal for shared skill directories used by multiple tools.
|
|
158
158
|
|
|
159
159
|
Valid: `pdf-processing`, `data-analysis`, `code-review`
|
|
160
160
|
Invalid: `PDF-Processing`, `-pdf`, `pdf--processing`
|
|
@@ -175,7 +175,7 @@ description: Helps with PDFs.
|
|
|
175
175
|
|
|
176
176
|
## Validation
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
Apex Code validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill:
|
|
179
179
|
|
|
180
180
|
- Name exceeds 64 characters or contains invalid characters
|
|
181
181
|
- Name starts/ends with hyphen or has consecutive hyphens
|
package/docs/terminal-setup.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Terminal Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Apex Code uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.
|
|
4
4
|
|
|
5
5
|
## Kitty, iTerm2
|
|
6
6
|
|
|
@@ -8,9 +8,9 @@ Work out of the box.
|
|
|
8
8
|
|
|
9
9
|
## Apple Terminal
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Apex Code enables enhanced key reporting when available. If Terminal.app still sends plain Return for `Shift+Enter`, Apex Code uses a local macOS modifier fallback to treat that Return as `Shift+Enter`.
|
|
12
12
|
|
|
13
|
-
This fallback only works when
|
|
13
|
+
This fallback only works when Apex Code runs on the same Mac as Terminal.app. It cannot detect the local keyboard over remote SSH.
|
|
14
14
|
|
|
15
15
|
## Ghostty
|
|
16
16
|
|
|
@@ -26,11 +26,11 @@ Older Claude Code versions may have added this Ghostty mapping:
|
|
|
26
26
|
keybind = shift+enter=text:\n
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
That mapping sends a raw linefeed byte. Inside
|
|
29
|
+
That mapping sends a raw linefeed byte. Inside Apex Code, that is indistinguishable from `Ctrl+J`, so tmux and Apex Code no longer see a real `shift+enter` key event.
|
|
30
30
|
|
|
31
31
|
If Claude Code 2.x or newer is the only reason you added that mapping, you can remove it, unless you want to use Claude Code in tmux, where it still requires that Ghostty mapping.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Apex Code binds `Ctrl+J` as a default newline alias, so `Shift+Enter` keeps working in tmux via that remap without extra apex-code configuration.
|
|
34
34
|
|
|
35
35
|
## WezTerm
|
|
36
36
|
|
|
@@ -43,7 +43,7 @@ config.enable_kitty_keyboard = true
|
|
|
43
43
|
return config
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
On macOS, WezTerm binds `Option+Enter` to fullscreen by default. To use `Option+Enter` for
|
|
46
|
+
On macOS, WezTerm binds `Option+Enter` to fullscreen by default. To use `Option+Enter` for Apex Code follow-up queueing, add this key override:
|
|
47
47
|
|
|
48
48
|
```lua
|
|
49
49
|
local wezterm = require 'wezterm'
|
|
@@ -60,11 +60,11 @@ return config
|
|
|
60
60
|
|
|
61
61
|
If you already have a `config.keys` table, add the entry to it.
|
|
62
62
|
|
|
63
|
-
On WSL, WezTerm may require a visible hardware cursor for IME candidate window positioning. If CJK IME candidates do not follow the text cursor, set `
|
|
63
|
+
On WSL, WezTerm may require a visible hardware cursor for IME candidate window positioning. If CJK IME candidates do not follow the text cursor, set `APEX_CODE_HARDWARE_CURSOR=1` before running Apex Code or set `showHardwareCursor` to `true` in settings. The temporary `PI_HARDWARE_CURSOR` alias also works.
|
|
64
64
|
|
|
65
65
|
## Alacritty
|
|
66
66
|
|
|
67
|
-
Alacritty usually works out of the box for `Shift+Enter`. On macOS, `Option+Enter` may arrive as plain `Enter`. To use `Option+Enter` for
|
|
67
|
+
Alacritty usually works out of the box for `Shift+Enter`. On macOS, `Option+Enter` may arrive as plain `Enter`. To use `Option+Enter` for Apex Code follow-up queueing, add to `~/.config/alacritty/alacritty.toml`:
|
|
68
68
|
|
|
69
69
|
```toml
|
|
70
70
|
[[keyboard.bindings]]
|
|
@@ -99,7 +99,7 @@ Add to `keybindings.json`:
|
|
|
99
99
|
|
|
100
100
|
## Windows Terminal
|
|
101
101
|
|
|
102
|
-
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward the modified Enter keys
|
|
102
|
+
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward the modified Enter keys Apex Code uses:
|
|
103
103
|
|
|
104
104
|
```json
|
|
105
105
|
{
|
|
@@ -117,8 +117,8 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
|
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
- `Shift+Enter` inserts a new line.
|
|
120
|
-
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents
|
|
121
|
-
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to
|
|
120
|
+
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents Apex Code from receiving `Alt+Enter` for follow-up queueing.
|
|
121
|
+
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to Apex Code instead.
|
|
122
122
|
|
|
123
123
|
If you already have an `actions` array, add the objects to it. If the old fullscreen behavior persists, fully close and reopen Windows Terminal.
|
|
124
124
|
|
|
@@ -137,6 +137,6 @@ For the best experience, use a terminal that supports the Kitty keyboard protoco
|
|
|
137
137
|
|
|
138
138
|
The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal.
|
|
139
139
|
|
|
140
|
-
If you want the hardware cursor visible, set `
|
|
140
|
+
If you want the hardware cursor visible, set `APEX_CODE_HARDWARE_CURSOR=1` before running Apex Code (disabled by default for compatibility; the temporary `PI_HARDWARE_CURSOR` alias also works).
|
|
141
141
|
|
|
142
142
|
Consider using a dedicated terminal emulator for the best experience.
|
package/docs/termux.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Termux (Android) Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Apex Code runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
@@ -16,14 +16,14 @@ pkg update && pkg upgrade
|
|
|
16
16
|
# Install dependencies
|
|
17
17
|
pkg install nodejs termux-api git
|
|
18
18
|
|
|
19
|
-
# Install
|
|
19
|
+
# Install Apex Code
|
|
20
20
|
npm install -g --ignore-scripts apex-code
|
|
21
21
|
|
|
22
22
|
# Create config directory
|
|
23
23
|
mkdir -p ~/.apex-code/agent
|
|
24
24
|
|
|
25
|
-
# Run
|
|
26
|
-
|
|
25
|
+
# Run Apex Code
|
|
26
|
+
apex-code
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Clipboard Support
|
package/docs/themes.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
>
|
|
1
|
+
> Apex Code can create themes. Ask it to build one for your setup.
|
|
2
2
|
|
|
3
3
|
# Themes
|
|
4
4
|
|
|
@@ -16,12 +16,12 @@ Themes are JSON files that define colors for the TUI.
|
|
|
16
16
|
|
|
17
17
|
## Locations
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Apex Code loads themes from:
|
|
20
20
|
|
|
21
21
|
- Built-in: `dark`, `light`
|
|
22
22
|
- Global: `~/.apex-code/agent/themes/*.json`
|
|
23
23
|
- Project: `.apex-code/themes/*.json` (only after the project is trusted)
|
|
24
|
-
- Packages: `themes/` directories or `pi.themes` entries in `package.json`
|
|
24
|
+
- Packages: `themes/` directories or `pi.themes` entries in `package.json` (`pi` is Apex Code's retained package-manifest key; see [Environment compatibility](../README.md#environment-compatibility))
|
|
25
25
|
- Settings: `themes` array with files or directories
|
|
26
26
|
- CLI: `--theme <path>` (repeatable)
|
|
27
27
|
|
|
@@ -37,7 +37,7 @@ Select a theme via `/settings` or in `settings.json`:
|
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
On first run,
|
|
40
|
+
On first run, Apex Code detects your terminal background and defaults to `dark` or `light`.
|
|
41
41
|
|
|
42
42
|
## Creating a Custom Theme
|
|
43
43
|
|
|
@@ -52,7 +52,7 @@ vim ~/.apex-code/agent/themes/my-theme.json
|
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
55
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
55
|
+
"$schema": "https://raw.githubusercontent.com/Fchery87/apex-code/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
56
56
|
"name": "my-theme",
|
|
57
57
|
"vars": {
|
|
58
58
|
"primary": "#00aaff",
|
|
@@ -118,13 +118,13 @@ vim ~/.apex-code/agent/themes/my-theme.json
|
|
|
118
118
|
|
|
119
119
|
3. Select the theme via `/settings`.
|
|
120
120
|
|
|
121
|
-
**Hot reload:** When you edit the currently active custom theme file,
|
|
121
|
+
**Hot reload:** When you edit the currently active custom theme file, Apex Code reloads it automatically for immediate visual feedback.
|
|
122
122
|
|
|
123
123
|
## Theme Format
|
|
124
124
|
|
|
125
125
|
```json
|
|
126
126
|
{
|
|
127
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
127
|
+
"$schema": "https://raw.githubusercontent.com/Fchery87/apex-code/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
128
128
|
"name": "my-theme",
|
|
129
129
|
"vars": {
|
|
130
130
|
"blue": "#0066cc",
|
|
@@ -272,7 +272,7 @@ Four formats are supported:
|
|
|
272
272
|
|
|
273
273
|
### Terminal Compatibility
|
|
274
274
|
|
|
275
|
-
|
|
275
|
+
Apex Code uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, Apex Code falls back to the nearest approximation.
|
|
276
276
|
|
|
277
277
|
Check truecolor support:
|
|
278
278
|
|
package/docs/tmux.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tmux Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Apex Code works inside tmux, but tmux strips modifier information from certain keys by default. Without configuration, `Shift+Enter` and `Ctrl+Enter` are usually indistinguishable from plain `Enter`.
|
|
4
4
|
|
|
5
5
|
## Recommended Configuration
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ tmux kill-server
|
|
|
18
18
|
tmux
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Apex Code requests extended key reporting automatically when Kitty keyboard protocol is not available. With `extended-keys-format csi-u`, tmux forwards modified keys in CSI-u format, which is the most reliable configuration. The `extended-keys-format` option requires tmux 3.5 or later.
|
|
22
22
|
|
|
23
23
|
## Why `csi-u` Is Recommended
|
|
24
24
|
|
|
@@ -40,7 +40,7 @@ With `extended-keys-format csi-u`, the same keys are forwarded as:
|
|
|
40
40
|
- `Ctrl+D` → `\x1b[100;5u`
|
|
41
41
|
- `Ctrl+Enter` → `\x1b[13;5u`
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Apex Code supports both formats, but `csi-u` is the recommended tmux setup.
|
|
44
44
|
|
|
45
45
|
## What This Fixes
|
|
46
46
|
|
|
@@ -60,4 +60,4 @@ This affects the default keybindings (`Enter` to submit, `Shift+Enter` for newli
|
|
|
60
60
|
- tmux 3.5 or later for `extended-keys-format csi-u` (run `tmux -V` to check)
|
|
61
61
|
- A terminal emulator that supports extended keys (Ghostty, Kitty, iTerm2, WezTerm, Windows Terminal)
|
|
62
62
|
|
|
63
|
-
With tmux 3.2 through 3.4, omit `extended-keys-format csi-u`;
|
|
63
|
+
With tmux 3.2 through 3.4, omit `extended-keys-format csi-u`; Apex Code still supports tmux's default xterm `modifyOtherKeys` format.
|