apex-code 0.0.1-alpha.0 → 0.0.1-alpha.10
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 +471 -0
- package/README.md +74 -680
- package/dist/cli/args.d.ts +21 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +119 -15
- 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/concurrent-session.d.ts +3 -0
- package/dist/cli/concurrent-session.d.ts.map +1 -0
- package/dist/cli/concurrent-session.js +13 -0
- package/dist/cli/concurrent-session.js.map +1 -0
- 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/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +2 -1
- package/dist/cli/file-processor.js.map +1 -1
- 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 +99 -16
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +5 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +35 -20
- 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 +28 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +140 -4
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +121 -9
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +364 -123
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +4 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +17 -14
- 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 +11 -10
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +3 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +4 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +41 -32
- package/dist/core/compaction/compaction.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/defaults.d.ts +1 -0
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/defaults.js +9 -0
- package/dist/core/defaults.js.map +1 -1
- 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 +355 -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 +4 -0
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js +6 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +115 -48
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +44 -9
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +3 -0
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts +1 -2
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +2 -17
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/http-idle-timeout.d.ts +12 -0
- package/dist/core/http-idle-timeout.d.ts.map +1 -0
- package/dist/core/http-idle-timeout.js +27 -0
- package/dist/core/http-idle-timeout.js.map +1 -0
- 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/keybindings.d.ts +38 -13
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +26 -5
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/lsp/client.d.ts +78 -0
- package/dist/core/lsp/client.d.ts.map +1 -0
- package/dist/core/lsp/client.js +494 -0
- package/dist/core/lsp/client.js.map +1 -0
- package/dist/core/lsp/diagnostics.d.ts +47 -0
- package/dist/core/lsp/diagnostics.d.ts.map +1 -0
- package/dist/core/lsp/diagnostics.js +224 -0
- package/dist/core/lsp/diagnostics.js.map +1 -0
- package/dist/core/lsp/pool.d.ts +48 -0
- package/dist/core/lsp/pool.d.ts.map +1 -0
- package/dist/core/lsp/pool.js +150 -0
- package/dist/core/lsp/pool.js.map +1 -0
- package/dist/core/lsp/registry.d.ts +49 -0
- package/dist/core/lsp/registry.d.ts.map +1 -0
- package/dist/core/lsp/registry.js +215 -0
- package/dist/core/lsp/registry.js.map +1 -0
- package/dist/core/lsp/status.d.ts +23 -0
- package/dist/core/lsp/status.d.ts.map +1 -0
- package/dist/core/lsp/status.js +35 -0
- package/dist/core/lsp/status.js.map +1 -0
- package/dist/core/lsp/sync.d.ts +13 -0
- package/dist/core/lsp/sync.d.ts.map +1 -0
- package/dist/core/lsp/sync.js +71 -0
- package/dist/core/lsp/sync.js.map +1 -0
- package/dist/core/model-config.d.ts +18 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +25 -6
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts +21 -0
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +73 -8
- 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/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js +2 -1
- package/dist/core/models-store.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 +40 -16
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permissions/gate.d.ts +42 -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 +45 -0
- package/dist/core/permissions/startup.d.ts.map +1 -0
- package/dist/core/permissions/startup.js +63 -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/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +2 -1
- package/dist/core/pi-manifest.js.map +1 -1
- 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 +22 -17
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +3 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sandbox/bwrap-arguments.d.ts +52 -0
- package/dist/core/sandbox/bwrap-arguments.d.ts.map +1 -0
- package/dist/core/sandbox/bwrap-arguments.js +86 -0
- package/dist/core/sandbox/bwrap-arguments.js.map +1 -0
- 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 +22 -0
- package/dist/core/sandbox/child-entry.js.map +1 -0
- package/dist/core/sandbox/cli-launch.d.ts +88 -0
- package/dist/core/sandbox/cli-launch.d.ts.map +1 -0
- package/dist/core/sandbox/cli-launch.js +272 -0
- package/dist/core/sandbox/cli-launch.js.map +1 -0
- package/dist/core/sandbox/cli-supervisor.d.ts +30 -0
- package/dist/core/sandbox/cli-supervisor.d.ts.map +1 -0
- package/dist/core/sandbox/cli-supervisor.js +123 -0
- package/dist/core/sandbox/cli-supervisor.js.map +1 -0
- package/dist/core/sandbox/default-hosts.d.ts +28 -0
- package/dist/core/sandbox/default-hosts.d.ts.map +1 -0
- package/dist/core/sandbox/default-hosts.js +69 -0
- package/dist/core/sandbox/default-hosts.js.map +1 -0
- package/dist/core/sandbox/full-access.d.ts +28 -0
- package/dist/core/sandbox/full-access.d.ts.map +1 -0
- package/dist/core/sandbox/full-access.js +63 -0
- package/dist/core/sandbox/full-access.js.map +1 -0
- package/dist/core/sandbox/git-identity.d.ts +57 -0
- package/dist/core/sandbox/git-identity.d.ts.map +1 -0
- package/dist/core/sandbox/git-identity.js +78 -0
- package/dist/core/sandbox/git-identity.js.map +1 -0
- package/dist/core/sandbox/host-approval.d.ts +42 -0
- package/dist/core/sandbox/host-approval.d.ts.map +1 -0
- package/dist/core/sandbox/host-approval.js +99 -0
- package/dist/core/sandbox/host-approval.js.map +1 -0
- package/dist/core/sandbox/linux-backend.d.ts +46 -0
- package/dist/core/sandbox/linux-backend.d.ts.map +1 -0
- package/dist/core/sandbox/linux-backend.js +304 -0
- package/dist/core/sandbox/linux-backend.js.map +1 -0
- package/dist/core/sandbox/macos-backend.d.ts +28 -0
- package/dist/core/sandbox/macos-backend.d.ts.map +1 -0
- package/dist/core/sandbox/macos-backend.js +313 -0
- package/dist/core/sandbox/macos-backend.js.map +1 -0
- package/dist/core/sandbox/network-proxy.d.ts +38 -0
- package/dist/core/sandbox/network-proxy.d.ts.map +1 -0
- package/dist/core/sandbox/network-proxy.js +153 -0
- package/dist/core/sandbox/network-proxy.js.map +1 -0
- package/dist/core/sandbox/network-refusal.d.ts +24 -0
- package/dist/core/sandbox/network-refusal.d.ts.map +1 -0
- package/dist/core/sandbox/network-refusal.js +72 -0
- package/dist/core/sandbox/network-refusal.js.map +1 -0
- package/dist/core/sandbox/policy.d.ts +40 -0
- package/dist/core/sandbox/policy.d.ts.map +1 -0
- package/dist/core/sandbox/policy.js +55 -0
- package/dist/core/sandbox/policy.js.map +1 -0
- package/dist/core/sandbox/profiles.d.ts +25 -0
- package/dist/core/sandbox/profiles.d.ts.map +1 -0
- package/dist/core/sandbox/profiles.js +23 -0
- package/dist/core/sandbox/profiles.js.map +1 -0
- package/dist/core/sandbox/rpc/command-client.d.ts +28 -0
- package/dist/core/sandbox/rpc/command-client.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/command-client.js +86 -0
- package/dist/core/sandbox/rpc/command-client.js.map +1 -0
- package/dist/core/sandbox/rpc/command-proxy.d.ts +48 -0
- package/dist/core/sandbox/rpc/command-proxy.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/command-proxy.js +120 -0
- package/dist/core/sandbox/rpc/command-proxy.js.map +1 -0
- package/dist/core/sandbox/rpc/credential-client.d.ts +20 -0
- package/dist/core/sandbox/rpc/credential-client.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/credential-client.js +170 -0
- package/dist/core/sandbox/rpc/credential-client.js.map +1 -0
- package/dist/core/sandbox/rpc/credential-proxy.d.ts +44 -0
- package/dist/core/sandbox/rpc/credential-proxy.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/credential-proxy.js +287 -0
- package/dist/core/sandbox/rpc/credential-proxy.js.map +1 -0
- package/dist/core/sandbox/rpc/framing.d.ts +35 -0
- package/dist/core/sandbox/rpc/framing.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/framing.js +114 -0
- package/dist/core/sandbox/rpc/framing.js.map +1 -0
- package/dist/core/sandbox/rpc/git-credential-helper.d.ts +40 -0
- package/dist/core/sandbox/rpc/git-credential-helper.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/git-credential-helper.js +152 -0
- package/dist/core/sandbox/rpc/git-credential-helper.js.map +1 -0
- package/dist/core/sandbox/rpc/git-credential-proxy.d.ts +48 -0
- package/dist/core/sandbox/rpc/git-credential-proxy.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/git-credential-proxy.js +142 -0
- package/dist/core/sandbox/rpc/git-credential-proxy.js.map +1 -0
- package/dist/core/sandbox/supervisor-temp.d.ts +18 -0
- package/dist/core/sandbox/supervisor-temp.d.ts.map +1 -0
- package/dist/core/sandbox/supervisor-temp.js +21 -0
- package/dist/core/sandbox/supervisor-temp.js.map +1 -0
- package/dist/core/sandbox/supervisor.d.ts +51 -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/terminal-handoff.d.ts +45 -0
- package/dist/core/sandbox/terminal-handoff.d.ts.map +1 -0
- package/dist/core/sandbox/terminal-handoff.js +176 -0
- package/dist/core/sandbox/terminal-handoff.js.map +1 -0
- package/dist/core/sandbox/terminal-size.d.ts +40 -0
- package/dist/core/sandbox/terminal-size.d.ts.map +1 -0
- package/dist/core/sandbox/terminal-size.js +105 -0
- package/dist/core/sandbox/terminal-size.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 +32 -41
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +161 -6
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-export.d.ts +4 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +32 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-lease.d.ts +31 -0
- package/dist/core/session-lease.d.ts.map +1 -0
- package/dist/core/session-lease.js +138 -0
- package/dist/core/session-lease.js.map +1 -0
- package/dist/core/session-manager.d.ts +46 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +62 -4
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-share.d.ts +31 -0
- package/dist/core/session-share.d.ts.map +1 -0
- package/dist/core/session-share.js +45 -0
- package/dist/core/session-share.js.map +1 -0
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +92 -9
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +138 -36
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +19 -7
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +128 -52
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +5 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts +2 -2
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +59 -68
- 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 +40 -4
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +183 -32
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/contract.d.ts +183 -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 +90 -0
- package/dist/core/tools/delegate.js.map +1 -0
- package/dist/core/tools/diagnostics.d.ts +39 -0
- package/dist/core/tools/diagnostics.d.ts.map +1 -0
- package/dist/core/tools/diagnostics.js +62 -0
- package/dist/core/tools/diagnostics.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +0 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +2 -5
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts +12 -2
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +61 -10
- 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 +13 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +4 -2
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +47 -10
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +51 -6
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +145 -2
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +4 -2
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +17 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/lsp.d.ts +62 -0
- package/dist/core/tools/lsp.d.ts.map +1 -0
- package/dist/core/tools/lsp.js +216 -0
- package/dist/core/tools/lsp.js.map +1 -0
- 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/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +39 -0
- package/dist/core/tools/powershell.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 +14 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/skill-search.d.ts +32 -0
- package/dist/core/tools/skill-search.d.ts.map +1 -0
- package/dist/core/tools/skill-search.js +56 -0
- package/dist/core/tools/skill-search.js.map +1 -0
- 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-exa.d.ts +33 -0
- package/dist/core/tools/web-search-exa.d.ts.map +1 -0
- package/dist/core/tools/web-search-exa.js +128 -0
- package/dist/core/tools/web-search-exa.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 +16 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +48 -2
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +2 -1
- package/dist/core/trust-manager.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/core/web-search-provider.d.ts +64 -0
- package/dist/core/web-search-provider.d.ts.map +1 -0
- package/dist/core/web-search-provider.js +149 -0
- package/dist/core/web-search-provider.js.map +1 -0
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +2 -0
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +6 -2
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +5 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +87 -22
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +6 -5
- 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/custom-editor.d.ts +72 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +338 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +7 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +11 -2
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +4 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +24 -6
- package/dist/modes/interactive/components/extension-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 +17 -41
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/first-use-hints.d.ts +8 -0
- package/dist/modes/interactive/components/first-use-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-use-hints.js +22 -0
- package/dist/modes/interactive/components/first-use-hints.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +23 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +182 -21
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +2 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +2 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +31 -9
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +236 -96
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +25 -5
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +226 -58
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/splash-header.d.ts +66 -0
- package/dist/modes/interactive/components/splash-header.d.ts.map +1 -0
- package/dist/modes/interactive/components/splash-header.js +180 -0
- package/dist/modes/interactive/components/splash-header.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +74 -17
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +16 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +113 -35
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-panel.d.ts +30 -0
- package/dist/modes/interactive/components/tool-panel.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-panel.js +130 -0
- package/dist/modes/interactive/components/tool-panel.js.map +1 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +60 -10
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +61 -5
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +642 -203
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/theme/apex.json +93 -0
- package/dist/modes/interactive/theme/dark.json +2 -0
- package/dist/modes/interactive/theme/light.json +3 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +10 -2
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +25 -11
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +11 -3
- package/dist/modes/interactive/theme/theme.d.ts +14 -3
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +65 -10
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/json-event.d.ts +18 -12
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js +22 -5
- package/dist/modes/json-event.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +2 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +211 -14
- 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 +8 -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/themes/apex-logo.d.ts +41 -0
- package/dist/themes/apex-logo.d.ts.map +1 -0
- package/dist/themes/apex-logo.js +35 -0
- package/dist/themes/apex-logo.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/changelog.d.ts +7 -2
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +82 -13
- package/dist/utils/changelog.js.map +1 -1
- 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/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +2 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/management-http.d.ts +5 -3
- package/dist/utils/management-http.d.ts.map +1 -1
- package/dist/utils/management-http.js +14 -10
- package/dist/utils/management-http.js.map +1 -1
- package/dist/utils/shell.d.ts +3 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +17 -5
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +60 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +70 -2
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +280 -124
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +7 -5
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +25 -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 +39 -24
- package/docs/containerization.md +24 -21
- package/docs/custom-provider.md +15 -12
- package/docs/development.md +11 -11
- package/docs/environment-variables.md +37 -77
- package/docs/extensions.md +68 -54
- package/docs/index.md +12 -24
- package/docs/json.md +18 -11
- package/docs/keybindings.md +18 -12
- package/docs/llama-cpp.md +9 -7
- package/docs/models.md +17 -11
- package/docs/packages.md +47 -43
- package/docs/prompt-templates.md +3 -3
- package/docs/providers.md +10 -10
- package/docs/quickstart.md +49 -32
- package/docs/rpc.md +35 -18
- package/docs/sdk.md +20 -6
- package/docs/security.md +18 -18
- package/docs/session-format.md +9 -9
- package/docs/sessions.md +13 -13
- package/docs/settings.md +83 -16
- package/docs/shell-aliases.md +1 -1
- package/docs/skills.md +66 -15
- package/docs/terminal-setup.md +44 -19
- package/docs/termux.md +4 -4
- package/docs/themes.md +32 -11
- package/docs/tmux.md +4 -4
- package/docs/tui.md +5 -5
- package/docs/usage.md +61 -53
- package/docs/windows.md +24 -2
- package/examples/extensions/border-status-editor.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/git-checkpoint.ts +2 -2
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/notify.ts +3 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +3 -1
- package/examples/extensions/subagent/agents.ts +40 -9
- package/examples/extensions/subagent/index.ts +27 -4
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/rpc-extension-ui.ts +1 -1
- package/examples/sdk/06-extensions.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/npm-shrinkwrap.json +280 -445
- package/package.json +9 -12
- 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/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"}
|
|
@@ -919,6 +919,14 @@ Emitted during streaming of assistant messages. Contains a delta event without a
|
|
|
919
919
|
```json
|
|
920
920
|
{
|
|
921
921
|
"type": "message_update",
|
|
922
|
+
"usage": {
|
|
923
|
+
"input": 100,
|
|
924
|
+
"output": 1,
|
|
925
|
+
"cacheRead": 0,
|
|
926
|
+
"cacheWrite": 0,
|
|
927
|
+
"totalTokens": 101,
|
|
928
|
+
"cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}
|
|
929
|
+
},
|
|
922
930
|
"assistantMessageEvent": {
|
|
923
931
|
"type": "text_delta",
|
|
924
932
|
"contentIndex": 0,
|
|
@@ -937,23 +945,32 @@ The `assistantMessageEvent` field contains one of these delta types:
|
|
|
937
945
|
| `thinking_start` | Thinking block started |
|
|
938
946
|
| `thinking_delta` | Thinking content chunk |
|
|
939
947
|
| `thinking_end` | Thinking block ended |
|
|
940
|
-
| `toolcall_start` | Tool call started |
|
|
948
|
+
| `toolcall_start` | Tool call started (includes `id` and `toolName`) |
|
|
941
949
|
| `toolcall_delta` | Tool call arguments chunk |
|
|
942
950
|
| `toolcall_end` | Tool call ended (includes full `toolCall` object) |
|
|
943
951
|
|
|
944
952
|
Example streaming a text response:
|
|
945
953
|
```json
|
|
946
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_start","contentIndex":0}}
|
|
947
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello"}}
|
|
948
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":" world"}}
|
|
949
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world"}}
|
|
954
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_start","contentIndex":0}}
|
|
955
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello"}}
|
|
956
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":" world"}}
|
|
957
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world"}}
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
The top-level `usage` field contains the latest cumulative provider-reported usage. It may remain
|
|
961
|
+
zero until completion when a provider does not report usage during streaming.
|
|
962
|
+
|
|
963
|
+
Example starting a tool call:
|
|
964
|
+
```json
|
|
965
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"toolcall_start","contentIndex":1,"id":"call_abc123","toolName":"write"}}
|
|
950
966
|
```
|
|
951
967
|
|
|
952
968
|
`message_update` intentionally omits the former cumulative `message` field and
|
|
953
969
|
`assistantMessageEvent.partial`. Clients that need a live partial message must assemble it
|
|
954
970
|
from `message_start` and subsequent events using `contentIndex`. Treat `message_end.message`
|
|
955
|
-
as authoritative. For tool calls,
|
|
956
|
-
contains the completed
|
|
971
|
+
as authoritative. For tool calls, `toolcall_start` provides the call `id` and `toolName`;
|
|
972
|
+
buffer `toolcall_delta.delta` for arguments. `toolcall_end.toolCall` contains the completed
|
|
973
|
+
call.
|
|
957
974
|
|
|
958
975
|
### bash_execution_update
|
|
959
976
|
|
|
@@ -1292,7 +1309,7 @@ Set the terminal window/tab title. Fire-and-forget.
|
|
|
1292
1309
|
"type": "extension_ui_request",
|
|
1293
1310
|
"id": "uuid-8",
|
|
1294
1311
|
"method": "setTitle",
|
|
1295
|
-
"title": "
|
|
1312
|
+
"title": "apex-code - my project"
|
|
1296
1313
|
}
|
|
1297
1314
|
```
|
|
1298
1315
|
|
|
@@ -1490,7 +1507,7 @@ import subprocess
|
|
|
1490
1507
|
import json
|
|
1491
1508
|
|
|
1492
1509
|
proc = subprocess.Popen(
|
|
1493
|
-
["
|
|
1510
|
+
["apex-code", "--mode", "rpc", "--no-session"],
|
|
1494
1511
|
stdin=subprocess.PIPE,
|
|
1495
1512
|
stdout=subprocess.PIPE,
|
|
1496
1513
|
text=True
|
|
@@ -1529,7 +1546,7 @@ For a complete example of handling the extension UI protocol, see [`examples/rpc
|
|
|
1529
1546
|
const { spawn } = require("child_process");
|
|
1530
1547
|
const { StringDecoder } = require("string_decoder");
|
|
1531
1548
|
|
|
1532
|
-
const agent = spawn("
|
|
1549
|
+
const agent = spawn("apex-code", ["--mode", "rpc", "--no-session"]);
|
|
1533
1550
|
|
|
1534
1551
|
function attachJsonlReader(stream, onLine) {
|
|
1535
1552
|
const decoder = new StringDecoder("utf8");
|
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)
|
|
@@ -372,6 +372,13 @@ import { ModelRuntime } from "apex-code";
|
|
|
372
372
|
|
|
373
373
|
const modelRuntime = await ModelRuntime.create();
|
|
374
374
|
|
|
375
|
+
// create() restores cached catalogs but does not refresh them from pi.dev by default.
|
|
376
|
+
// Opt in to a create-time network refresh and bound how long it may take:
|
|
377
|
+
const refreshedRuntime = await ModelRuntime.create({
|
|
378
|
+
allowModelNetwork: true,
|
|
379
|
+
modelRefreshTimeoutMs: 15_000,
|
|
380
|
+
});
|
|
381
|
+
|
|
375
382
|
// Find specific built-in model (doesn't check if API key exists)
|
|
376
383
|
const opus = getModel("anthropic", "claude-opus-4-5");
|
|
377
384
|
if (!opus) throw new Error("Model not found");
|
|
@@ -402,6 +409,8 @@ If no model is provided:
|
|
|
402
409
|
2. Uses default from settings
|
|
403
410
|
3. Falls back to first available model
|
|
404
411
|
|
|
412
|
+
Remote catalogs are persisted locally so later runtimes can restore them without a network request. The default file is `~/.pi/agent/models-store.json`; set `modelsStorePath` to choose another location, or inject `modelsStore` to control persistence. Network refreshes are throttled to once per provider every four hours unless forced. To force an immediate refresh, call `await modelRuntime.refresh({ allowNetwork: true, force: true, signal })`. Setting `PI_OFFLINE` disables model network access.
|
|
413
|
+
|
|
405
414
|
To match CLI model parsing, use the exported resolver helpers:
|
|
406
415
|
|
|
407
416
|
```typescript
|
|
@@ -510,13 +519,13 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
510
519
|
|
|
511
520
|
Specify which built-in tools to enable:
|
|
512
521
|
|
|
513
|
-
- Built-in tool names: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
|
|
522
|
+
- Built-in tool names: `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, `ls`
|
|
514
523
|
- Default built-ins: `read`, `bash`, `edit`, `write`
|
|
515
524
|
- `noTools: "all"` disables all tools
|
|
516
525
|
- `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
|
|
517
526
|
- `excludeTools` disables specific built-in, extension, or custom tool names after any `tools` allowlist is applied
|
|
518
527
|
|
|
519
|
-
The `edit` tool returns `details.diff` for
|
|
528
|
+
The `edit` tool returns `details.diff` for Apex Code's TUI display and `details.patch` as a standard unified patch for SDK consumers.
|
|
520
529
|
|
|
521
530
|
```typescript
|
|
522
531
|
import { createAgentSession } from "apex-code";
|
|
@@ -531,6 +540,11 @@ const { session } = await createAgentSession({
|
|
|
531
540
|
tools: ["read", "bash", "grep"],
|
|
532
541
|
});
|
|
533
542
|
|
|
543
|
+
// Use PowerShell instead of Bash on Windows
|
|
544
|
+
const { session } = await createAgentSession({
|
|
545
|
+
tools: ["read", "powershell", "edit", "write"],
|
|
546
|
+
});
|
|
547
|
+
|
|
534
548
|
// Disable one tool while keeping the rest available
|
|
535
549
|
const { session } = await createAgentSession({
|
|
536
550
|
excludeTools: ["ask_question"],
|
|
@@ -1133,7 +1147,7 @@ See [RPC documentation](rpc.md) for the JSON protocol.
|
|
|
1133
1147
|
For subprocess-based integration without building with the SDK, use the CLI directly:
|
|
1134
1148
|
|
|
1135
1149
|
```bash
|
|
1136
|
-
|
|
1150
|
+
apex-code --mode rpc --no-session
|
|
1137
1151
|
```
|
|
1138
1152
|
|
|
1139
1153
|
See [RPC documentation](rpc.md) for the JSON protocol.
|
|
@@ -1187,7 +1201,7 @@ SettingsManager
|
|
|
1187
1201
|
// Tool factories
|
|
1188
1202
|
createCodingTools
|
|
1189
1203
|
createReadOnlyTools
|
|
1190
|
-
createReadTool, createBashTool, createEditTool, createWriteTool
|
|
1204
|
+
createReadTool, createBashTool, createPowerShellTool, createEditTool, createWriteTool
|
|
1191
1205
|
createGrepTool, createFindTool, createLsTool
|
|
1192
1206
|
|
|
1193
1207
|
// Types
|
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
|
|