apex-code 0.0.1-alpha.0 → 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/models.md
CHANGED
|
@@ -34,9 +34,9 @@ For local models (Ollama, LM Studio, vLLM), only `id` is required per model:
|
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
The `apiKey` value is a placeholder because Ollama ignores it.
|
|
37
|
+
The `apiKey` value is a placeholder because Ollama ignores it. Apex Code still treats models as requiring auth before they appear in `/model`, so keyless local servers should keep a dummy value, save a key for that provider with `/login`, or pass `--api-key` when selecting the model.
|
|
38
38
|
|
|
39
|
-
Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so
|
|
39
|
+
Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so Apex Code sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
|
|
40
40
|
|
|
41
41
|
You can set `compat` at the provider level to apply to all models, or at the model level to override a specific model. This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers.
|
|
42
42
|
|
|
@@ -169,7 +169,7 @@ The `apiKey` and `headers` fields support command execution, environment interpo
|
|
|
169
169
|
"apiKey": "sk-..."
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
For `models.json`, shell commands are resolved at request time.
|
|
172
|
+
For `models.json`, shell commands are resolved at request time. Apex Code intentionally does not apply built-in TTL, stale reuse, or recovery logic for arbitrary commands. Different commands need different caching and failure strategies, and Apex Code cannot infer the right one.
|
|
173
173
|
|
|
174
174
|
If your command is slow, expensive, rate-limited, or should keep using a previous value on transient failures, wrap it in your own script or command that implements the caching or TTL behavior you want.
|
|
175
175
|
|
|
@@ -202,7 +202,7 @@ If your command is slow, expensive, rate-limited, or should keep using a previou
|
|
|
202
202
|
| `name` | No | `id` | Human-readable model label. Used for matching (`--model` patterns) and shown as secondary model detail text. |
|
|
203
203
|
| `api` | No | provider's `api` | Override provider's API for this model |
|
|
204
204
|
| `reasoning` | No | `false` | Supports extended thinking |
|
|
205
|
-
| `thinkingLevelMap` | No | omitted | Maps
|
|
205
|
+
| `thinkingLevelMap` | No | omitted | Maps Apex Code thinking levels to provider values and marks unsupported levels (see below) |
|
|
206
206
|
| `input` | No | `["text"]` | Input types: `["text"]` or `["text", "image"]` |
|
|
207
207
|
| `contextWindow` | No | `128000` | Context window size in tokens |
|
|
208
208
|
| `maxTokens` | No | `16384` | Maximum output tokens |
|
|
@@ -238,7 +238,7 @@ Current behavior:
|
|
|
238
238
|
|
|
239
239
|
### Sampling Parameters
|
|
240
240
|
|
|
241
|
-
`samplingParams` is a free-form object merged verbatim into every request body for the model, after the fields
|
|
241
|
+
`samplingParams` is a free-form object merged verbatim into every request body for the model, after the fields Apex Code sets itself, so its keys win. Use it to send sampling parameters Apex Code does not model — including server-specific ones like llama.cpp's `min_p` or vLLM's `top_k`:
|
|
242
242
|
|
|
243
243
|
```json
|
|
244
244
|
{
|
|
@@ -252,11 +252,11 @@ Current behavior:
|
|
|
252
252
|
}
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
Only OpenAI-compatible APIs apply it (`openai-completions`, `openai-responses`, `azure-openai-responses`); other APIs ignore it. Keys override
|
|
255
|
+
Only OpenAI-compatible APIs apply it (`openai-completions`, `openai-responses`, `azure-openai-responses`); other APIs ignore it. Keys override Apex Code's named request fields (for example a `temperature` key here beats the request-level temperature), so prefer it as the single source of sampling truth for a model. In `modelOverrides`, `samplingParams` merges per key with the base model's value.
|
|
256
256
|
|
|
257
257
|
### Thinking Level Map
|
|
258
258
|
|
|
259
|
-
Use `thinkingLevelMap` on a model to describe model-specific thinking controls. Keys are
|
|
259
|
+
Use `thinkingLevelMap` on a model to describe model-specific thinking controls. Keys are Apex Code thinking levels: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. Maps may contain holes; for example, a model can expose `high` and `max` without exposing `xhigh`.
|
|
260
260
|
|
|
261
261
|
Values are tristate:
|
|
262
262
|
|
|
@@ -388,7 +388,7 @@ Behavior notes:
|
|
|
388
388
|
|
|
389
389
|
For providers or proxies using `api: "anthropic-messages"`, use `compat` to control Anthropic-specific request compatibility.
|
|
390
390
|
|
|
391
|
-
By default
|
|
391
|
+
By default Apex Code sends per-tool `eager_input_streaming: true`. If a proxy or Anthropic-compatible backend rejects that field, set `supportsEagerToolInputStreaming` to `false`. Apex Code will omit `tools[].eager_input_streaming` and send the legacy `fine-grained-tool-streaming-2025-05-14` beta header for tool-enabled requests instead.
|
|
392
392
|
|
|
393
393
|
Some Anthropic models require adaptive thinking (`thinking.type: "adaptive"` plus `output_config.effort`) instead of the legacy budget-based thinking payload. Built-in models set this automatically. For custom providers or aliases that route to those models, set `forceAdaptiveThinking` to `true`.
|
|
394
394
|
|
|
@@ -460,15 +460,15 @@ For providers with partial OpenAI compatibility, use the `compat` field.
|
|
|
460
460
|
| `supportsDeveloperRole` | Use `developer` vs `system` role |
|
|
461
461
|
| `supportsReasoningEffort` | Support for `reasoning_effort` parameter |
|
|
462
462
|
| `supportsUsageInStreaming` | Supports `stream_options: { include_usage: true }` (default: `true`) |
|
|
463
|
-
| `supportsFinishReason` | Whether streamed responses include `finish_reason`. When `false`,
|
|
463
|
+
| `supportsFinishReason` | Whether streamed responses include `finish_reason`. When `false`, Apex Code infers `stop` or `toolUse` when the stream ends. Default: `true`. |
|
|
464
464
|
| `maxTokensField` | Use `max_completion_tokens` or `max_tokens` |
|
|
465
465
|
| `requiresToolResultName` | Include `name` on tool result messages |
|
|
466
466
|
| `requiresAssistantAfterToolResult` | Insert an assistant message before a user message after tool results |
|
|
467
467
|
| `requiresThinkingAsText` | Convert thinking blocks to plain text |
|
|
468
468
|
| `requiresReasoningContentOnAssistantMessages` | Include empty `reasoning_content` on all replayed assistant messages when reasoning is enabled |
|
|
469
469
|
| `thinkingFormat` | Use `reasoning_effort`, `openrouter`, `deepseek`, `together`, `baseten`, `zai`, `qwen`, `chat-template`, or `qwen-chat-template` thinking parameters |
|
|
470
|
-
| `chatTemplateKwargs` | `chat_template_kwargs` values for `thinkingFormat: "chat-template"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.effort" }` for
|
|
471
|
-
| `chatTemplateArgs` | `chat_template_args` values for `thinkingFormat: "baseten"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.effort" }` for
|
|
470
|
+
| `chatTemplateKwargs` | `chat_template_kwargs` values for `thinkingFormat: "chat-template"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.effort" }` for Apex Code-controlled thinking values |
|
|
471
|
+
| `chatTemplateArgs` | `chat_template_args` values for `thinkingFormat: "baseten"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.effort" }` for Apex Code-controlled thinking values |
|
|
472
472
|
| `cacheControlFormat` | Use Anthropic-style `cache_control` markers on the system prompt, last tool definition, and last user, assistant, or tool-result text content. Currently only `anthropic` is supported. |
|
|
473
473
|
| `sendSessionAffinityHeaders` | For `openai-completions`, send session-affinity headers from the session id when caching is enabled. Default: `false`. |
|
|
474
474
|
| `sessionAffinityFormat` | For `openai-completions` and `openai-responses`, the session-affinity header format: `openai` sends `session_id`/`x-client-request-id` (completions also `x-session-affinity`), `openai-nosession` omits the underscore-containing `session_id` header, `openrouter` sends `x-session-id`. Does not affect the `prompt_cache_key` body param. Default: auto-detected. |
|
package/docs/packages.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
>
|
|
1
|
+
> Apex Code can help you create Apex Code packages. Ask it to bundle your extensions, skills, prompt templates, or themes.
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Apex Code Packages
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Apex Code packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `pi` key (Apex Code's retained package-manifest key), or use conventional directories.
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
9
9
|
- [Install and Manage](#install-and-manage)
|
|
10
10
|
- [Package Sources](#package-sources)
|
|
11
|
-
- [Creating
|
|
11
|
+
- [Creating an Apex Code Package](#creating-an-apex-code-package)
|
|
12
12
|
- [Package Structure](#package-structure)
|
|
13
13
|
- [Dependencies](#dependencies)
|
|
14
14
|
- [Package Filtering](#package-filtering)
|
|
@@ -17,41 +17,41 @@ Pi packages bundle extensions, skills, prompt templates, and themes so you can s
|
|
|
17
17
|
|
|
18
18
|
## Install and Manage
|
|
19
19
|
|
|
20
|
-
> **Security:**
|
|
20
|
+
> **Security:** Apex Code packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
apex-code install npm:@foo/bar@1.0.0
|
|
24
|
+
apex-code install git:github.com/user/repo@v1
|
|
25
|
+
apex-code install https://github.com/user/repo # raw URLs work too
|
|
26
|
+
apex-code install /absolute/path/to/package
|
|
27
|
+
apex-code install ./relative/path/to/package
|
|
28
|
+
|
|
29
|
+
apex-code remove npm:@foo/bar
|
|
30
|
+
apex-code list # show installed packages from settings
|
|
31
|
+
apex-code update # update Apex Code only
|
|
32
|
+
apex-code update --all # update Apex Code, update packages, and reconcile pinned git refs
|
|
33
|
+
apex-code update --extensions # update packages and reconcile pinned git refs only
|
|
34
|
+
apex-code update --models # refresh model catalogs only
|
|
35
|
+
apex-code update --self # update Apex Code only
|
|
36
|
+
apex-code update --self --force # reinstall Apex Code even if current
|
|
37
|
+
apex-code update npm:@foo/bar # update one package
|
|
38
|
+
apex-code update --extension npm:@foo/bar
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
These commands manage
|
|
41
|
+
These commands manage Apex Code packages and `apex-code update` can update the Apex Code CLI installation. To uninstall Apex Code itself, see [Quickstart](quickstart.md#uninstall).
|
|
42
42
|
|
|
43
|
-
By default, `install` and `remove` write to user settings (`~/.apex-code/agent/settings.json`). Use `-l` to write to project settings (`.apex-code/settings.json`) instead. Project settings can be shared with your team, and
|
|
43
|
+
By default, `install` and `remove` write to user settings (`~/.apex-code/agent/settings.json`). Use `-l` to write to project settings (`.apex-code/settings.json`) instead. Project settings can be shared with your team, and apex-code installs any missing packages automatically on startup after the project is trusted.
|
|
44
44
|
|
|
45
45
|
To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
apex-code -e npm:@foo/bar
|
|
49
|
+
apex-code -e git:github.com/user/repo
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
## Package Sources
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Apex Code accepts three source types in settings and `apex-code install`.
|
|
55
55
|
|
|
56
56
|
### npm
|
|
57
57
|
|
|
@@ -60,7 +60,7 @@ npm:@scope/pkg@1.2.3
|
|
|
60
60
|
npm:pkg
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
- Versioned specs are pinned and skipped by package updates (`
|
|
63
|
+
- Versioned specs are pinned and skipped by package updates (`apex-code update --extensions`, `apex-code update --all`).
|
|
64
64
|
- User installs go under `~/.apex-code/agent/npm/`.
|
|
65
65
|
- Project installs go under `.apex-code/npm/`.
|
|
66
66
|
- Set `npmCommand` in `settings.json` to pin npm package lookup and install operations to a specific wrapper command such as `mise` or `asdf`.
|
|
@@ -87,21 +87,21 @@ ssh://git@github.com/user/repo@v1
|
|
|
87
87
|
- HTTPS and SSH URLs are both supported.
|
|
88
88
|
- SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`).
|
|
89
89
|
- For non-interactive runs (for example CI), you can set `GIT_TERMINAL_PROMPT=0` to disable credential prompts and set `GIT_SSH_COMMAND` (for example `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast.
|
|
90
|
-
- Refs are pinned tags or commits. `
|
|
91
|
-
- Use `
|
|
90
|
+
- Refs are pinned tags or commits. `apex-code update --extensions` and `apex-code update --all` do not move them to newer refs, but they do reconcile an existing clone to the configured ref.
|
|
91
|
+
- Use `apex-code install git:host/user/repo@new-ref` to update settings and move an existing package to a new pinned ref.
|
|
92
92
|
- Cloned to `~/.apex-code/agent/git/<host>/<path>` (global) or `.apex-code/git/<host>/<path>` (project).
|
|
93
|
-
- When reconciliation changes the checkout,
|
|
93
|
+
- When reconciliation changes the checkout, Apex Code resets and cleans the clone, then runs `npm install` if `package.json` exists.
|
|
94
94
|
|
|
95
95
|
**SSH examples:**
|
|
96
96
|
```bash
|
|
97
97
|
# git@host:path shorthand (requires git: prefix)
|
|
98
|
-
|
|
98
|
+
apex-code install git:git@github.com:user/repo
|
|
99
99
|
|
|
100
100
|
# ssh:// protocol format
|
|
101
|
-
|
|
101
|
+
apex-code install ssh://git@github.com/user/repo
|
|
102
102
|
|
|
103
103
|
# With version ref
|
|
104
|
-
|
|
104
|
+
apex-code install git:git@github.com:user/repo@v1.0.0
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
### Local Paths
|
|
@@ -111,11 +111,11 @@ pi install git:git@github.com:user/repo@v1.0.0
|
|
|
111
111
|
./relative/path/to/package
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory,
|
|
114
|
+
Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, Apex Code loads resources using package rules.
|
|
115
115
|
|
|
116
|
-
## Creating
|
|
116
|
+
## Creating an Apex Code Package
|
|
117
117
|
|
|
118
|
-
Add a `pi` manifest to `package.json` or use conventional directories. Include the `pi-package` keyword for discoverability.
|
|
118
|
+
Add a `pi` manifest to `package.json` or use conventional directories. `pi` is Apex Code's retained package-manifest key (see [Environment compatibility](../README.md#environment-compatibility)). Include the `pi-package` keyword for discoverability.
|
|
119
119
|
|
|
120
120
|
```json
|
|
121
121
|
{
|
|
@@ -134,7 +134,11 @@ Paths are relative to the package root. Arrays support glob patterns and `!exclu
|
|
|
134
134
|
|
|
135
135
|
### Gallery Metadata
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
Apex Code does not operate or depend on a hosted package gallery (see ADR 0013). The
|
|
138
|
+
`video`/`image` fields below are retained upstream vocabulary from Pi's own package
|
|
139
|
+
gallery, kept for cross-compatibility if you publish the same package to both
|
|
140
|
+
ecosystems — they have no effect within Apex Code itself. Add them to show a preview
|
|
141
|
+
there:
|
|
138
142
|
|
|
139
143
|
```json
|
|
140
144
|
{
|
|
@@ -157,7 +161,7 @@ If both are set, video takes precedence.
|
|
|
157
161
|
|
|
158
162
|
### Convention Directories
|
|
159
163
|
|
|
160
|
-
If no `pi` manifest is present,
|
|
164
|
+
If no `pi` manifest is present, Apex Code auto-discovers resources from these directories:
|
|
161
165
|
|
|
162
166
|
- `extensions/` loads `.ts` and `.js` files
|
|
163
167
|
- `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills
|
|
@@ -166,11 +170,11 @@ If no `pi` manifest is present, pi auto-discovers resources from these directori
|
|
|
166
170
|
|
|
167
171
|
## Dependencies
|
|
168
172
|
|
|
169
|
-
Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When
|
|
173
|
+
Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When apex-code installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically.
|
|
170
174
|
|
|
171
|
-
|
|
175
|
+
Apex Code bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@earendil-works/pi-ai`, `apex-code-agent-core`, `apex-code`, `@earendil-works/pi-tui`, `typebox`.
|
|
172
176
|
|
|
173
|
-
Other
|
|
177
|
+
Other Apex Code packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Apex Code loads packages with separate module roots, so separate installs do not collide or share modules.
|
|
174
178
|
|
|
175
179
|
Example:
|
|
176
180
|
|
|
@@ -217,7 +221,7 @@ Filter what a package loads using the object form in settings:
|
|
|
217
221
|
|
|
218
222
|
## Enable and Disable Resources
|
|
219
223
|
|
|
220
|
-
Use `
|
|
224
|
+
Use `apex-code config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. `apex-code config` starts in global settings (`~/.apex-code/agent/settings.json`); press Tab to switch between global and project-local modes. Use `apex-code config -l` to start in project overrides (`.apex-code/settings.json`) with inherited global resources dimmed.
|
|
221
225
|
|
|
222
226
|
## Scope and Deduplication
|
|
223
227
|
|
package/docs/prompt-templates.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
>
|
|
1
|
+
> Apex Code can create prompt templates. Ask it to build one for your workflow.
|
|
2
2
|
|
|
3
3
|
# Prompt Templates
|
|
4
4
|
|
|
@@ -6,11 +6,11 @@ Prompt templates are Markdown snippets that expand into full prompts. Type `/nam
|
|
|
6
6
|
|
|
7
7
|
## Locations
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Apex Code loads prompt templates from:
|
|
10
10
|
|
|
11
11
|
- Global: `~/.apex-code/agent/prompts/*.md`
|
|
12
12
|
- Project: `.apex-code/prompts/*.md` (only after the project is trusted)
|
|
13
|
-
- Packages: `prompts/` directories or `pi.prompts` entries in `package.json`
|
|
13
|
+
- Packages: `prompts/` directories or `pi.prompts` entries in `package.json` (`pi` is Apex Code's retained package-manifest key)
|
|
14
14
|
- Settings: `prompts` array with files or directories
|
|
15
15
|
- CLI: `--prompt-template <path>` (repeatable)
|
|
16
16
|
|
package/docs/providers.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Providers
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Apex Code supports subscription-based providers via OAuth and API key providers via environment variables or auth file. Built-in catalogs ship with Apex Code; configured providers may refresh newer catalogs and cache them in `~/.apex-code/agent/models-store.json` for offline use.
|
|
4
4
|
|
|
5
5
|
## Table of Contents
|
|
6
6
|
|
|
@@ -63,7 +63,7 @@ Use `/login` in interactive mode and select a provider to store an API key in `a
|
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
65
|
export ANTHROPIC_API_KEY=sk-ant-...
|
|
66
|
-
|
|
66
|
+
apex-code
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
| Provider | Environment Variable | `auth.json` key |
|
|
@@ -154,7 +154,7 @@ API key credentials can also include provider-scoped environment values. These v
|
|
|
154
154
|
}
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
Use this when
|
|
157
|
+
Use this when Apex Code should use different provider settings than the project shell environment.
|
|
158
158
|
|
|
159
159
|
### Key Resolution
|
|
160
160
|
|
|
@@ -224,14 +224,14 @@ export AWS_REGION=us-west-2
|
|
|
224
224
|
Also supports ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_IDENTITY_TOKEN_FILE`).
|
|
225
225
|
|
|
226
226
|
```bash
|
|
227
|
-
|
|
227
|
+
apex-code --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
Prompt caching is enabled automatically for Claude models whose ID contains a recognizable model name (base models and system-defined inference profiles). For application inference profiles (whose ARNs don't contain the model name), set `AWS_BEDROCK_FORCE_CACHE=1` to enable cache points:
|
|
231
231
|
|
|
232
232
|
```bash
|
|
233
233
|
export AWS_BEDROCK_FORCE_CACHE=1
|
|
234
|
-
|
|
234
|
+
apex-code --provider amazon-bedrock --model arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123
|
|
235
235
|
```
|
|
236
236
|
|
|
237
237
|
If you are connecting to a Bedrock API proxy, the following environment variables can be used:
|
|
@@ -255,7 +255,7 @@ export AWS_BEDROCK_FORCE_HTTP1=1
|
|
|
255
255
|
export CLOUDFLARE_API_KEY=... # or use /login
|
|
256
256
|
export CLOUDFLARE_ACCOUNT_ID=...
|
|
257
257
|
export CLOUDFLARE_GATEWAY_ID=... # create at dash.cloudflare.com → AI → AI Gateway
|
|
258
|
-
|
|
258
|
+
apex-code --provider cloudflare-ai-gateway --model "claude-sonnet-4-5"
|
|
259
259
|
```
|
|
260
260
|
|
|
261
261
|
Routes to OpenAI, Anthropic, and Workers AI through Cloudflare AI Gateway. Workers AI uses the Unified API (`/compat`) and prefixed model IDs (`workers-ai/@cf/...`). OpenAI uses the OpenAI passthrough route (`/openai`) with native OpenAI model IDs such as `gpt-5.1`. Anthropic uses the Anthropic passthrough route (`/anthropic`) with native Anthropic model IDs such as `claude-sonnet-4-5`.
|
|
@@ -269,7 +269,7 @@ AI Gateway authentication uses `CLOUDFLARE_API_KEY` as `cf-aig-authorization`. U
|
|
|
269
269
|
| Stored BYOK | Cloudflare token only | Cloudflare injects provider keys stored in the AI Gateway dashboard |
|
|
270
270
|
| Inline BYOK | Cloudflare token plus upstream `Authorization` header | The request supplies the upstream provider key |
|
|
271
271
|
|
|
272
|
-
For normal
|
|
272
|
+
For normal Apex Code usage, prefer unified billing or stored BYOK. Inline BYOK requires configuring an additional upstream `Authorization` header for the Cloudflare AI Gateway provider, for example via a `models.json` provider/model override.
|
|
273
273
|
|
|
274
274
|
### Cloudflare Workers AI
|
|
275
275
|
|
|
@@ -278,10 +278,10 @@ For normal pi usage, prefer unified billing or stored BYOK. Inline BYOK requires
|
|
|
278
278
|
```bash
|
|
279
279
|
export CLOUDFLARE_API_KEY=... # or use /login
|
|
280
280
|
export CLOUDFLARE_ACCOUNT_ID=...
|
|
281
|
-
|
|
281
|
+
apex-code --provider cloudflare-workers-ai --model "@cf/moonshotai/kimi-k2.6"
|
|
282
282
|
```
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
Apex Code automatically sets `x-session-affinity` for [prefix caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/) discounts.
|
|
285
285
|
|
|
286
286
|
### Google Vertex AI
|
|
287
287
|
|
|
@@ -297,7 +297,7 @@ Or set `GOOGLE_APPLICATION_CREDENTIALS` to a service account key file.
|
|
|
297
297
|
|
|
298
298
|
## llama.cpp
|
|
299
299
|
|
|
300
|
-
|
|
300
|
+
Apex Code supports the llama.cpp router server. Configure it with `/login llama.cpp`, manage loaded models with `/llama`, and select a loaded model with `/model`.
|
|
301
301
|
|
|
302
302
|
See [llama.cpp](llama-cpp.md) for server setup, model directory layout, environment variables, and command usage.
|
|
303
303
|
|
package/docs/quickstart.md
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
|
-
This page gets you from install to a useful first
|
|
3
|
+
This page gets you from install to a useful first Apex Code session.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Apex Code is distributed as an npm package and installs the same way with npm, pnpm,
|
|
8
|
+
Yarn, or Bun — all four resolve it from the same npm registry:
|
|
8
9
|
|
|
9
10
|
```bash
|
|
11
|
+
# npm
|
|
10
12
|
npm install -g --ignore-scripts apex-code
|
|
13
|
+
|
|
14
|
+
# pnpm
|
|
15
|
+
pnpm add -g apex-code
|
|
16
|
+
|
|
17
|
+
# Yarn
|
|
18
|
+
yarn global add apex-code
|
|
19
|
+
|
|
20
|
+
# Bun
|
|
21
|
+
bun add -g apex-code
|
|
11
22
|
```
|
|
12
23
|
|
|
13
|
-
`--ignore-scripts` disables dependency lifecycle scripts during install.
|
|
24
|
+
`--ignore-scripts` disables dependency lifecycle scripts during install. Apex Code does
|
|
25
|
+
not require install scripts for normal npm installs; pnpm, Yarn, and Bun installs do not
|
|
26
|
+
run them by default.
|
|
27
|
+
|
|
28
|
+
Apex Code does not operate a separate shell/curl installer or a standalone binary release
|
|
29
|
+
channel — the package manager install above is the only distribution channel.
|
|
14
30
|
|
|
15
31
|
### Uninstall
|
|
16
32
|
|
|
17
|
-
Use the package manager that installed
|
|
33
|
+
Use the package manager that installed Apex Code:
|
|
18
34
|
|
|
19
35
|
```bash
|
|
20
|
-
#
|
|
36
|
+
# npm
|
|
21
37
|
npm uninstall -g apex-code
|
|
22
38
|
|
|
23
39
|
# pnpm
|
|
@@ -30,22 +46,23 @@ yarn global remove apex-code
|
|
|
30
46
|
bun uninstall -g apex-code
|
|
31
47
|
```
|
|
32
48
|
|
|
33
|
-
Uninstalling
|
|
49
|
+
Uninstalling Apex Code leaves settings, credentials, sessions, and installed Apex Code
|
|
50
|
+
packages in `~/.apex-code/agent/`.
|
|
34
51
|
|
|
35
|
-
Then start
|
|
52
|
+
Then start Apex Code in the project directory you want it to work on:
|
|
36
53
|
|
|
37
54
|
```bash
|
|
38
55
|
cd /path/to/project
|
|
39
|
-
|
|
56
|
+
apex-code
|
|
40
57
|
```
|
|
41
58
|
|
|
42
59
|
## Authenticate
|
|
43
60
|
|
|
44
|
-
|
|
61
|
+
Apex Code can use subscription providers through `/login`, or API-key providers through environment variables or the auth file.
|
|
45
62
|
|
|
46
63
|
### Option 1: subscription login
|
|
47
64
|
|
|
48
|
-
Start
|
|
65
|
+
Start Apex Code and run:
|
|
49
66
|
|
|
50
67
|
```text
|
|
51
68
|
/login
|
|
@@ -55,11 +72,11 @@ Then select a provider. Built-in subscription logins include Claude Pro/Max, Cha
|
|
|
55
72
|
|
|
56
73
|
### Option 2: API key
|
|
57
74
|
|
|
58
|
-
Set an API key before launching
|
|
75
|
+
Set an API key before launching Apex Code:
|
|
59
76
|
|
|
60
77
|
```bash
|
|
61
78
|
export ANTHROPIC_API_KEY=sk-ant-...
|
|
62
|
-
|
|
79
|
+
apex-code
|
|
63
80
|
```
|
|
64
81
|
|
|
65
82
|
You can also run `/login` and select an API-key provider to store the key in `~/.apex-code/agent/auth.json`.
|
|
@@ -68,24 +85,24 @@ See [Providers](providers.md) for all supported providers, environment variables
|
|
|
68
85
|
|
|
69
86
|
## First session
|
|
70
87
|
|
|
71
|
-
Once
|
|
88
|
+
Once Apex Code starts, type a request and press Enter:
|
|
72
89
|
|
|
73
90
|
```text
|
|
74
91
|
Summarize this repository and tell me how to run its checks.
|
|
75
92
|
```
|
|
76
93
|
|
|
77
|
-
By default,
|
|
94
|
+
By default, Apex Code gives the model four tools:
|
|
78
95
|
|
|
79
96
|
- `read` - read files
|
|
80
97
|
- `write` - create or overwrite files
|
|
81
98
|
- `edit` - patch files
|
|
82
99
|
- `bash` - run shell commands
|
|
83
100
|
|
|
84
|
-
Additional built-in read-only tools (`grep`, `find`, `ls`) are available through tool options.
|
|
101
|
+
Additional built-in read-only tools (`grep`, `find`, `ls`) are available through tool options. Apex Code runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
|
|
85
102
|
|
|
86
|
-
## Give
|
|
103
|
+
## Give Apex Code project instructions
|
|
87
104
|
|
|
88
|
-
|
|
105
|
+
Apex Code loads context files at startup. Add an `AGENTS.md` file to tell it how to work in a project:
|
|
89
106
|
|
|
90
107
|
```markdown
|
|
91
108
|
# Project Instructions
|
|
@@ -95,14 +112,14 @@ Pi loads context files at startup. Add an `AGENTS.md` file to tell it how to wor
|
|
|
95
112
|
- Keep responses concise.
|
|
96
113
|
```
|
|
97
114
|
|
|
98
|
-
|
|
115
|
+
Apex Code loads:
|
|
99
116
|
|
|
100
117
|
- `~/.apex-code/agent/AGENTS.md` for global instructions
|
|
101
118
|
- `AGENTS.md` or `CLAUDE.md` from parent directories and the current directory
|
|
102
119
|
|
|
103
|
-
If a directory contains `AGENTS.override.md`,
|
|
120
|
+
If a directory contains `AGENTS.override.md`, Apex Code loads it instead of `AGENTS.md` or `CLAUDE.md` from that directory.
|
|
104
121
|
|
|
105
|
-
Restart
|
|
122
|
+
Restart Apex Code, or run `/reload`, after changing context files.
|
|
106
123
|
|
|
107
124
|
## Common things to try
|
|
108
125
|
|
|
@@ -111,8 +128,8 @@ Restart pi, or run `/reload`, after changing context files.
|
|
|
111
128
|
Type `@` in the editor to fuzzy-search files, or pass files on the command line:
|
|
112
129
|
|
|
113
130
|
```bash
|
|
114
|
-
|
|
115
|
-
|
|
131
|
+
apex-code @README.md "Summarize this"
|
|
132
|
+
apex-code @src/app.ts @src/app.test.ts "Review these together"
|
|
116
133
|
```
|
|
117
134
|
|
|
118
135
|
Images or text can be pasted with Ctrl+V (Alt+V on Windows); images can also be dragged into supported terminals.
|
|
@@ -136,32 +153,32 @@ Use `/model` or Ctrl+L to choose a model. Use Shift+Tab to cycle thinking level.
|
|
|
136
153
|
Sessions are saved automatically:
|
|
137
154
|
|
|
138
155
|
```bash
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
156
|
+
apex-code -c # Continue most recent session
|
|
157
|
+
apex-code -r # Browse previous sessions
|
|
158
|
+
apex-code --name "my task" # Set session display name at startup
|
|
159
|
+
apex-code --session <path|id> # Open a specific session
|
|
143
160
|
```
|
|
144
161
|
|
|
145
|
-
Inside
|
|
162
|
+
Inside Apex Code, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions.
|
|
146
163
|
|
|
147
164
|
### Non-interactive mode
|
|
148
165
|
|
|
149
166
|
For one-shot prompts:
|
|
150
167
|
|
|
151
168
|
```bash
|
|
152
|
-
|
|
153
|
-
cat README.md |
|
|
154
|
-
|
|
169
|
+
apex-code -p "Summarize this codebase"
|
|
170
|
+
cat README.md | apex-code -p "Summarize this text"
|
|
171
|
+
apex-code -p @screenshot.png "What's in this image?"
|
|
155
172
|
```
|
|
156
173
|
|
|
157
174
|
Use `--mode json` for JSON event output or `--mode rpc` for process integration.
|
|
158
175
|
|
|
159
176
|
## Next steps
|
|
160
177
|
|
|
161
|
-
- [Using
|
|
178
|
+
- [Using Apex Code](usage.md) - interactive mode, slash commands, sessions, context files, and CLI reference.
|
|
162
179
|
- [Providers](providers.md) - authentication and model setup.
|
|
163
180
|
- [Settings](settings.md) - global and project configuration.
|
|
164
181
|
- [Keybindings](keybindings.md) - shortcuts and customization.
|
|
165
|
-
- [
|
|
182
|
+
- [Apex Code Packages](packages.md) - install shared extensions, skills, prompts, and themes.
|
|
166
183
|
|
|
167
184
|
Platform notes: [Windows](windows.md), [Termux](termux.md), [tmux](tmux.md), [Terminal setup](terminal-setup.md), [Shell aliases](shell-aliases.md).
|
package/docs/rpc.md
CHANGED
|
@@ -7,7 +7,7 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over
|
|
|
7
7
|
## Starting RPC Mode
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
apex-code --mode rpc [options]
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Common options:
|
|
@@ -490,7 +490,7 @@ If output was truncated, includes `fullOutputPath`:
|
|
|
490
490
|
"exitCode": 0,
|
|
491
491
|
"cancelled": false,
|
|
492
492
|
"truncated": true,
|
|
493
|
-
"fullOutputPath": "/tmp/
|
|
493
|
+
"fullOutputPath": "/tmp/apex-code-bash-abc123.log"
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
```
|
|
@@ -786,7 +786,7 @@ Response:
|
|
|
786
786
|
}
|
|
787
787
|
```
|
|
788
788
|
|
|
789
|
-
The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `
|
|
789
|
+
The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `apex-code --mode rpc` process.
|
|
790
790
|
|
|
791
791
|
### Commands
|
|
792
792
|
|
|
@@ -806,9 +806,9 @@ Response:
|
|
|
806
806
|
"success": true,
|
|
807
807
|
"data": {
|
|
808
808
|
"commands": [
|
|
809
|
-
{"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.
|
|
810
|
-
{"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.
|
|
811
|
-
{"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.
|
|
809
|
+
{"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.apex-code/agent/extensions/session.ts"},
|
|
810
|
+
{"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.apex-code/agent/prompts/fix-tests.md"},
|
|
811
|
+
{"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.apex-code/agent/skills/brave-search/SKILL.md"}
|
|
812
812
|
]
|
|
813
813
|
}
|
|
814
814
|
}
|
|
@@ -823,7 +823,7 @@ Each command has:
|
|
|
823
823
|
- `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`)
|
|
824
824
|
- `location`: Where it was loaded from (optional, not present for extensions):
|
|
825
825
|
- `"user"`: User-level (`~/.apex-code/agent/`)
|
|
826
|
-
- `"project"`: Project-level (`./.
|
|
826
|
+
- `"project"`: Project-level (`./.apex-code/agent/`)
|
|
827
827
|
- `"path"`: Explicit path via CLI or settings
|
|
828
828
|
- `path`: Absolute file path to the command source (optional)
|
|
829
829
|
|
|
@@ -881,7 +881,7 @@ Emitted when one low-level agent run completes. Contains all messages generated
|
|
|
881
881
|
|
|
882
882
|
### agent_settled
|
|
883
883
|
|
|
884
|
-
Emitted after the full session-level run settles. At this point
|
|
884
|
+
Emitted after the full session-level run settles. At this point Apex Code will not continue automatically through retry, compaction retry, or queued follow-up messages.
|
|
885
885
|
|
|
886
886
|
```json
|
|
887
887
|
{"type": "agent_settled"}
|
|
@@ -1292,7 +1292,7 @@ Set the terminal window/tab title. Fire-and-forget.
|
|
|
1292
1292
|
"type": "extension_ui_request",
|
|
1293
1293
|
"id": "uuid-8",
|
|
1294
1294
|
"method": "setTitle",
|
|
1295
|
-
"title": "
|
|
1295
|
+
"title": "apex-code - my project"
|
|
1296
1296
|
}
|
|
1297
1297
|
```
|
|
1298
1298
|
|
|
@@ -1490,7 +1490,7 @@ import subprocess
|
|
|
1490
1490
|
import json
|
|
1491
1491
|
|
|
1492
1492
|
proc = subprocess.Popen(
|
|
1493
|
-
["
|
|
1493
|
+
["apex-code", "--mode", "rpc", "--no-session"],
|
|
1494
1494
|
stdin=subprocess.PIPE,
|
|
1495
1495
|
stdout=subprocess.PIPE,
|
|
1496
1496
|
text=True
|
|
@@ -1529,7 +1529,7 @@ For a complete example of handling the extension UI protocol, see [`examples/rpc
|
|
|
1529
1529
|
const { spawn } = require("child_process");
|
|
1530
1530
|
const { StringDecoder } = require("string_decoder");
|
|
1531
1531
|
|
|
1532
|
-
const agent = spawn("
|
|
1532
|
+
const agent = spawn("apex-code", ["--mode", "rpc", "--no-session"]);
|
|
1533
1533
|
|
|
1534
1534
|
function attachJsonlReader(stream, onLine) {
|
|
1535
1535
|
const decoder = new StringDecoder("utf8");
|