apex-code 0.0.1-alpha.8 → 0.0.4
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 +231 -0
- package/README.md +9 -8
- package/dist/cli/args.d.ts +26 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +72 -10
- package/dist/cli/args.js.map +1 -1
- 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/mcp-command.d.ts +9 -0
- package/dist/cli/mcp-command.d.ts.map +1 -0
- package/dist/cli/mcp-command.js +53 -0
- package/dist/cli/mcp-command.js.map +1 -0
- package/dist/cli/project-trust.d.ts.map +1 -1
- package/dist/cli/project-trust.js +3 -1
- package/dist/cli/project-trust.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +2 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +94 -5
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +3 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +45 -18
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +3 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +183 -15
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +728 -117
- 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 -7
- 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 +7 -0
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/checkpoints/git-checkpoints.d.ts +39 -0
- package/dist/core/checkpoints/git-checkpoints.d.ts.map +1 -0
- package/dist/core/checkpoints/git-checkpoints.js +251 -0
- package/dist/core/checkpoints/git-checkpoints.js.map +1 -0
- package/dist/core/checkpoints/session-checkpoints.d.ts +23 -0
- package/dist/core/checkpoints/session-checkpoints.d.ts.map +1 -0
- package/dist/core/checkpoints/session-checkpoints.js +36 -0
- package/dist/core/checkpoints/session-checkpoints.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +7 -3
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +9 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +59 -36
- package/dist/core/compaction/compaction.js.map +1 -1
- 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/runtime.d.ts +6 -5
- package/dist/core/delegation/runtime.d.ts.map +1 -1
- package/dist/core/delegation/runtime.js +4 -3
- package/dist/core/delegation/runtime.js.map +1 -1
- package/dist/core/durable-state/sqlite.d.ts.map +1 -1
- package/dist/core/durable-state/sqlite.js +26 -2
- package/dist/core/durable-state/sqlite.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +5 -2
- package/dist/core/exec.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 +123 -50
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +5 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +45 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/source-runtime.d.ts +14 -0
- package/dist/core/extensions/source-runtime.d.ts.map +1 -0
- package/dist/core/extensions/source-runtime.js +56 -0
- package/dist/core/extensions/source-runtime.js.map +1 -0
- package/dist/core/extensions/types.d.ts +60 -11
- 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/formatter-lifecycle.d.ts +69 -0
- package/dist/core/formatter-lifecycle.d.ts.map +1 -0
- package/dist/core/formatter-lifecycle.js +360 -0
- package/dist/core/formatter-lifecycle.js.map +1 -0
- package/dist/core/hooks/command-handler.d.ts +19 -0
- package/dist/core/hooks/command-handler.d.ts.map +1 -0
- package/dist/core/hooks/command-handler.js +112 -0
- package/dist/core/hooks/command-handler.js.map +1 -0
- package/dist/core/hooks/http-handler.d.ts +10 -0
- package/dist/core/hooks/http-handler.d.ts.map +1 -0
- package/dist/core/hooks/http-handler.js +36 -0
- package/dist/core/hooks/http-handler.js.map +1 -0
- package/dist/core/hooks/loader.d.ts +29 -0
- package/dist/core/hooks/loader.d.ts.map +1 -0
- package/dist/core/hooks/loader.js +139 -0
- package/dist/core/hooks/loader.js.map +1 -0
- package/dist/core/hooks/runtime.d.ts +13 -0
- package/dist/core/hooks/runtime.d.ts.map +1 -0
- package/dist/core/hooks/runtime.js +63 -0
- package/dist/core/hooks/runtime.js.map +1 -0
- package/dist/core/hooks/types.d.ts +83 -0
- package/dist/core/hooks/types.d.ts.map +1 -0
- package/dist/core/hooks/types.js +24 -0
- package/dist/core/hooks/types.js.map +1 -0
- package/dist/core/keybindings.d.ts +20 -19
- 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/mcp/config.d.ts +16 -0
- package/dist/core/mcp/config.d.ts.map +1 -0
- package/dist/core/mcp/config.js +166 -0
- package/dist/core/mcp/config.js.map +1 -0
- package/dist/core/mcp/connector.d.ts +35 -0
- package/dist/core/mcp/connector.d.ts.map +1 -0
- package/dist/core/mcp/connector.js +105 -0
- package/dist/core/mcp/connector.js.map +1 -0
- package/dist/core/mcp/contract.d.ts +19 -0
- package/dist/core/mcp/contract.d.ts.map +1 -0
- package/dist/core/mcp/contract.js +89 -0
- package/dist/core/mcp/contract.js.map +1 -0
- package/dist/core/mcp/mcp-tool.d.ts +32 -0
- package/dist/core/mcp/mcp-tool.d.ts.map +1 -0
- package/dist/core/mcp/mcp-tool.js +171 -0
- package/dist/core/mcp/mcp-tool.js.map +1 -0
- package/dist/core/mcp/metadata-cache.d.ts +29 -0
- package/dist/core/mcp/metadata-cache.d.ts.map +1 -0
- package/dist/core/mcp/metadata-cache.js +99 -0
- package/dist/core/mcp/metadata-cache.js.map +1 -0
- package/dist/core/mcp/oauth/authorize.d.ts +21 -0
- package/dist/core/mcp/oauth/authorize.d.ts.map +1 -0
- package/dist/core/mcp/oauth/authorize.js +32 -0
- package/dist/core/mcp/oauth/authorize.js.map +1 -0
- package/dist/core/mcp/oauth/discover.d.ts +27 -0
- package/dist/core/mcp/oauth/discover.d.ts.map +1 -0
- package/dist/core/mcp/oauth/discover.js +116 -0
- package/dist/core/mcp/oauth/discover.js.map +1 -0
- package/dist/core/mcp/oauth/flow.d.ts +31 -0
- package/dist/core/mcp/oauth/flow.d.ts.map +1 -0
- package/dist/core/mcp/oauth/flow.js +175 -0
- package/dist/core/mcp/oauth/flow.js.map +1 -0
- package/dist/core/mcp/oauth/mcp-token.d.ts +51 -0
- package/dist/core/mcp/oauth/mcp-token.d.ts.map +1 -0
- package/dist/core/mcp/oauth/mcp-token.js +129 -0
- package/dist/core/mcp/oauth/mcp-token.js.map +1 -0
- package/dist/core/mcp/oauth/pkce.d.ts +12 -0
- package/dist/core/mcp/oauth/pkce.d.ts.map +1 -0
- package/dist/core/mcp/oauth/pkce.js +11 -0
- package/dist/core/mcp/oauth/pkce.js.map +1 -0
- package/dist/core/mcp/oauth/register.d.ts +16 -0
- package/dist/core/mcp/oauth/register.d.ts.map +1 -0
- package/dist/core/mcp/oauth/register.js +42 -0
- package/dist/core/mcp/oauth/register.js.map +1 -0
- package/dist/core/mcp/oauth/token-client.d.ts +33 -0
- package/dist/core/mcp/oauth/token-client.d.ts.map +1 -0
- package/dist/core/mcp/oauth/token-client.js +65 -0
- package/dist/core/mcp/oauth/token-client.js.map +1 -0
- package/dist/core/mcp/runtime.d.ts +20 -0
- package/dist/core/mcp/runtime.d.ts.map +1 -0
- package/dist/core/mcp/runtime.js +37 -0
- package/dist/core/mcp/runtime.js.map +1 -0
- package/dist/core/mcp/schema.d.ts +22 -0
- package/dist/core/mcp/schema.d.ts.map +1 -0
- package/dist/core/mcp/schema.js +20 -0
- package/dist/core/mcp/schema.js.map +1 -0
- package/dist/core/mcp/server-manager.d.ts +43 -0
- package/dist/core/mcp/server-manager.d.ts.map +1 -0
- package/dist/core/mcp/server-manager.js +142 -0
- package/dist/core/mcp/server-manager.js.map +1 -0
- package/dist/core/mcp/types.d.ts +100 -0
- package/dist/core/mcp/types.d.ts.map +1 -0
- package/dist/core/mcp/types.js +8 -0
- package/dist/core/mcp/types.js.map +1 -0
- package/dist/core/model-config.d.ts +5 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +3 -1
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -0
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +14 -8
- package/dist/core/model-resolver.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/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +22 -14
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permissions/gate.d.ts.map +1 -1
- package/dist/core/permissions/gate.js +45 -4
- package/dist/core/permissions/gate.js.map +1 -1
- package/dist/core/permissions/operations.d.ts +20 -0
- package/dist/core/permissions/operations.d.ts.map +1 -0
- package/dist/core/permissions/operations.js +9 -0
- package/dist/core/permissions/operations.js.map +1 -0
- package/dist/core/permissions/policy-command.d.ts +42 -0
- package/dist/core/permissions/policy-command.d.ts.map +1 -0
- package/dist/core/permissions/policy-command.js +44 -0
- package/dist/core/permissions/policy-command.js.map +1 -0
- package/dist/core/permissions/responder.d.ts +49 -2
- package/dist/core/permissions/responder.d.ts.map +1 -1
- package/dist/core/permissions/responder.js +20 -8
- package/dist/core/permissions/responder.js.map +1 -1
- package/dist/core/permissions/rules.d.ts.map +1 -1
- package/dist/core/permissions/rules.js +11 -1
- package/dist/core/permissions/rules.js.map +1 -1
- package/dist/core/permissions/store.d.ts +18 -0
- package/dist/core/permissions/store.d.ts.map +1 -1
- package/dist/core/permissions/store.js +89 -8
- package/dist/core/permissions/store.js.map +1 -1
- 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/policy-executor.d.ts +47 -0
- package/dist/core/policy-executor.d.ts.map +1 -0
- package/dist/core/policy-executor.js +228 -0
- package/dist/core/policy-executor.js.map +1 -0
- package/dist/core/policy-loader.d.ts +72 -0
- package/dist/core/policy-loader.d.ts.map +1 -0
- package/dist/core/policy-loader.js +195 -0
- package/dist/core/policy-loader.js.map +1 -0
- package/dist/core/project-trust.d.ts +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +2 -1
- 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 +41 -0
- package/dist/core/sandbox/bwrap-arguments.d.ts.map +1 -0
- package/dist/core/sandbox/bwrap-arguments.js +136 -0
- package/dist/core/sandbox/bwrap-arguments.js.map +1 -0
- package/dist/core/sandbox/child-entry.d.ts.map +1 -1
- package/dist/core/sandbox/child-entry.js +3 -1
- package/dist/core/sandbox/child-entry.js.map +1 -1
- package/dist/core/sandbox/cli-launch.d.ts +84 -4
- package/dist/core/sandbox/cli-launch.d.ts.map +1 -1
- package/dist/core/sandbox/cli-launch.js +115 -16
- package/dist/core/sandbox/cli-launch.js.map +1 -1
- package/dist/core/sandbox/cli-supervisor.d.ts +2 -0
- package/dist/core/sandbox/cli-supervisor.d.ts.map +1 -1
- package/dist/core/sandbox/cli-supervisor.js +50 -2
- package/dist/core/sandbox/cli-supervisor.js.map +1 -1
- 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 +14 -0
- package/dist/core/sandbox/linux-backend.d.ts.map +1 -1
- package/dist/core/sandbox/linux-backend.js +158 -80
- package/dist/core/sandbox/linux-backend.js.map +1 -1
- package/dist/core/sandbox/macos-backend.d.ts +5 -0
- package/dist/core/sandbox/macos-backend.d.ts.map +1 -1
- package/dist/core/sandbox/macos-backend.js +164 -5
- package/dist/core/sandbox/macos-backend.js.map +1 -1
- package/dist/core/sandbox/network-proxy.d.ts +19 -0
- package/dist/core/sandbox/network-proxy.d.ts.map +1 -1
- package/dist/core/sandbox/network-proxy.js +93 -19
- package/dist/core/sandbox/network-proxy.js.map +1 -1
- package/dist/core/sandbox/policy.d.ts +8 -0
- package/dist/core/sandbox/policy.d.ts.map +1 -1
- package/dist/core/sandbox/policy.js +29 -12
- package/dist/core/sandbox/policy.js.map +1 -1
- 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-proxy.d.ts.map +1 -1
- package/dist/core/sandbox/rpc/credential-proxy.js +2 -96
- package/dist/core/sandbox/rpc/credential-proxy.js.map +1 -1
- 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 +47 -0
- package/dist/core/sandbox/rpc/git-credential-helper.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/git-credential-helper.js +222 -0
- package/dist/core/sandbox/rpc/git-credential-helper.js.map +1 -0
- package/dist/core/sandbox/rpc/git-credential-proxy.d.ts +66 -0
- package/dist/core/sandbox/rpc/git-credential-proxy.d.ts.map +1 -0
- package/dist/core/sandbox/rpc/git-credential-proxy.js +209 -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 +12 -1
- package/dist/core/sandbox/supervisor.d.ts.map +1 -1
- package/dist/core/sandbox/supervisor.js +15 -1
- package/dist/core/sandbox/supervisor.js.map +1 -1
- package/dist/core/sandbox/terminal-handoff.d.ts +68 -0
- package/dist/core/sandbox/terminal-handoff.d.ts.map +1 -0
- package/dist/core/sandbox/terminal-handoff.js +221 -0
- package/dist/core/sandbox/terminal-handoff.js.map +1 -0
- package/dist/core/sandbox/terminal-size.d.ts +13 -0
- package/dist/core/sandbox/terminal-size.d.ts.map +1 -1
- package/dist/core/sandbox/terminal-size.js +23 -2
- package/dist/core/sandbox/terminal-size.js.map +1 -1
- package/dist/core/sdk.d.ts +24 -2
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +63 -4
- 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-manager.d.ts +13 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +34 -6
- package/dist/core/session-manager.js.map +1 -1
- 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 +172 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +160 -11
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +51 -33
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +8 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/background-shell.d.ts +39 -0
- package/dist/core/tools/background-shell.d.ts.map +1 -0
- package/dist/core/tools/background-shell.js +81 -0
- package/dist/core/tools/background-shell.js.map +1 -0
- package/dist/core/tools/bash-command-segments.d.ts.map +1 -1
- package/dist/core/tools/bash-command-segments.js +2 -0
- package/dist/core/tools/bash-command-segments.js.map +1 -1
- package/dist/core/tools/bash.d.ts +44 -16
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +264 -32
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/contract-snapshot.d.ts +58 -0
- package/dist/core/tools/contract-snapshot.d.ts.map +1 -0
- package/dist/core/tools/contract-snapshot.js +51 -0
- package/dist/core/tools/contract-snapshot.js.map +1 -0
- package/dist/core/tools/contract.d.ts +53 -5
- package/dist/core/tools/contract.d.ts.map +1 -1
- package/dist/core/tools/contract.js +22 -2
- package/dist/core/tools/contract.js.map +1 -1
- package/dist/core/tools/delegate.d.ts +6 -4
- package/dist/core/tools/delegate.d.ts.map +1 -1
- package/dist/core/tools/delegate.js +21 -11
- package/dist/core/tools/delegate.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +48 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +217 -8
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts +8 -0
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +72 -10
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +5 -2
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +5 -2
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +14 -2
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +12 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +5 -2
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/lsp.d.ts +19 -1
- package/dist/core/tools/lsp.d.ts.map +1 -1
- package/dist/core/tools/lsp.js +163 -10
- package/dist/core/tools/lsp.js.map +1 -1
- package/dist/core/tools/path-permission.d.ts +3 -0
- package/dist/core/tools/path-permission.d.ts.map +1 -1
- package/dist/core/tools/path-permission.js +16 -4
- package/dist/core/tools/path-permission.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts +27 -2
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js +221 -4
- package/dist/core/tools/path-utils.js.map +1 -1
- 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.map +1 -1
- package/dist/core/tools/read.js +20 -11
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/test.d.ts +54 -9
- package/dist/core/tools/test.d.ts.map +1 -1
- package/dist/core/tools/test.js +239 -19
- package/dist/core/tools/test.js.map +1 -1
- package/dist/core/tools/write.d.ts +7 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +64 -9
- 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/verification-lifecycle.d.ts +77 -0
- package/dist/core/verification-lifecycle.d.ts.map +1 -0
- package/dist/core/verification-lifecycle.js +146 -0
- package/dist/core/verification-lifecycle.js.map +1 -0
- package/dist/core/workspace/artifacts.d.ts +45 -0
- package/dist/core/workspace/artifacts.d.ts.map +1 -0
- package/dist/core/workspace/artifacts.js +165 -0
- package/dist/core/workspace/artifacts.js.map +1 -0
- package/dist/core/workspace/comparison.d.ts +27 -0
- package/dist/core/workspace/comparison.d.ts.map +1 -0
- package/dist/core/workspace/comparison.js +94 -0
- package/dist/core/workspace/comparison.js.map +1 -0
- package/dist/core/workspace/git-observer.d.ts +48 -0
- package/dist/core/workspace/git-observer.d.ts.map +1 -0
- package/dist/core/workspace/git-observer.js +346 -0
- package/dist/core/workspace/git-observer.js.map +1 -0
- package/dist/core/workspace/projection.d.ts +3 -0
- package/dist/core/workspace/projection.d.ts.map +1 -0
- package/dist/core/workspace/projection.js +56 -0
- package/dist/core/workspace/projection.js.map +1 -0
- package/dist/core/workspace/state.d.ts +133 -0
- package/dist/core/workspace/state.d.ts.map +1 -0
- package/dist/core/workspace/state.js +96 -0
- package/dist/core/workspace/state.js.map +1 -0
- package/dist/extensions/llama/client.d.ts +6 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +7 -0
- package/dist/extensions/llama/client.js.map +1 -1
- 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 +3 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +29 -4
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +6 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +58 -23
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +4 -3
- package/dist/migrations.js.map +1 -1
- package/dist/modes/acp/server.d.ts +55 -0
- package/dist/modes/acp/server.d.ts.map +1 -0
- package/dist/modes/acp/server.js +244 -0
- package/dist/modes/acp/server.js.map +1 -0
- package/dist/modes/acp/translate.d.ts +37 -0
- package/dist/modes/acp/translate.d.ts.map +1 -0
- package/dist/modes/acp/translate.js +50 -0
- package/dist/modes/acp/translate.js.map +1 -0
- package/dist/modes/index.d.ts +1 -0
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js +1 -0
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +29 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +182 -23
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +7 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +20 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +9 -4
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +20 -9
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +7 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +7 -3
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +19 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +70 -10
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +10 -3
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +56 -14
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/permission-preview.d.ts +15 -0
- package/dist/modes/interactive/components/permission-preview.d.ts.map +1 -0
- package/dist/modes/interactive/components/permission-preview.js +33 -0
- package/dist/modes/interactive/components/permission-preview.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +2 -2
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +9 -2
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +128 -56
- 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/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 +23 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +64 -10
- 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 +2 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +45 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +395 -43
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +12 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +20 -9
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/json-event.d.ts +16 -13
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js +20 -6
- package/dist/modes/json-event.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +27 -12
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +7 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +3 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +12 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.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 +196 -10
- package/dist/package-manager-cli.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 +23 -9
- 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/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +6 -4
- package/dist/utils/version-check.js.map +1 -1
- package/docs/compaction.md +19 -0
- package/docs/custom-provider.md +12 -9
- package/docs/environment-variables.md +1 -1
- package/docs/extensions.md +35 -7
- package/docs/json.md +7 -2
- package/docs/keybindings.md +9 -9
- package/docs/llama-cpp.md +2 -0
- package/docs/models.md +8 -2
- package/docs/packages.md +2 -2
- package/docs/quickstart.md +1 -1
- package/docs/rpc.md +32 -3
- package/docs/sdk.md +32 -2
- package/docs/settings.md +23 -7
- package/docs/skills.md +4 -3
- package/docs/terminal-setup.md +23 -7
- package/docs/usage.md +10 -5
- package/docs/windows.md +24 -2
- package/examples/extensions/border-status-editor.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +8 -4
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/git-checkpoint.ts +24 -36
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +2 -2
- package/examples/extensions/notify.ts +3 -1
- package/examples/extensions/permission-gate.ts +1 -1
- package/examples/extensions/plan-mode/index.ts +1 -1
- package/examples/extensions/rpc-demo.ts +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +1 -1
- package/examples/extensions/subagent/index.ts +6 -1
- 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 +439 -405
- package/package.json +17 -17
- package/dist/server/create-harness.d.ts +0 -26
- package/dist/server/create-harness.d.ts.map +0 -1
- package/dist/server/create-harness.js +0 -107
- package/dist/server/create-harness.js.map +0 -1
package/docs/extensions.md
CHANGED
|
@@ -330,7 +330,8 @@ user sends another prompt ◄─────────────────
|
|
|
330
330
|
|
|
331
331
|
/compact or auto-compaction
|
|
332
332
|
├─► session_before_compact (can cancel or customize)
|
|
333
|
-
|
|
333
|
+
├─► session_compact (success)
|
|
334
|
+
└─► session_compact_failed (failure or abort)
|
|
334
335
|
|
|
335
336
|
/tree navigation
|
|
336
337
|
├─► session_before_tree (can cancel or customize)
|
|
@@ -448,7 +449,7 @@ pi.on("session_before_fork", async (event, ctx) => {
|
|
|
448
449
|
After a successful fork or clone, Apex Code emits `session_shutdown` for the old extension instance, reloads and rebinds extensions for the new session, then emits `session_start` with `reason: "fork"` and `previousSessionFile`.
|
|
449
450
|
Do cleanup work in `session_shutdown`, then reestablish any in-memory state in `session_start`.
|
|
450
451
|
|
|
451
|
-
#### session_before_compact / session_compact
|
|
452
|
+
#### session_before_compact / session_compact / session_compact_failed
|
|
452
453
|
|
|
453
454
|
Fired on compaction. See [compaction.md](compaction.md) for details.
|
|
454
455
|
|
|
@@ -479,6 +480,14 @@ pi.on("session_compact", async (event, ctx) => {
|
|
|
479
480
|
// event.reason - "manual" (/compact), "threshold", or "overflow"
|
|
480
481
|
// event.willRetry - whether the aborted turn is retried after compaction (overflow recovery)
|
|
481
482
|
});
|
|
483
|
+
|
|
484
|
+
pi.on("session_compact_failed", async (event, ctx) => {
|
|
485
|
+
// event.reason - "manual" (/compact), "threshold", or "overflow"
|
|
486
|
+
// event.errorMessage - present for non-abort failures
|
|
487
|
+
// event.aborted - true for cancelled/aborted compactions
|
|
488
|
+
// event.willRetry - whether the aborted turn would have retried after compaction
|
|
489
|
+
// event.fromExtension - whether extension-provided compaction content was being used
|
|
490
|
+
});
|
|
482
491
|
```
|
|
483
492
|
|
|
484
493
|
#### session_before_tree / session_tree
|
|
@@ -571,6 +580,24 @@ pi.on("agent_settled", async (_event, ctx) => {
|
|
|
571
580
|
});
|
|
572
581
|
```
|
|
573
582
|
|
|
583
|
+
#### ui_prompt_start / ui_prompt_end
|
|
584
|
+
|
|
585
|
+
Notification-only lifecycle events for blocking user-facing extension UI prompts. They fire around `ctx.ui.select()`, `ctx.ui.confirm()`, `ctx.ui.input()`, `ctx.ui.editor()`, and `ctx.ui.custom()` so host/status integrations can report "waiting for user" instead of just "running".
|
|
586
|
+
|
|
587
|
+
Nested or overlapping prompts are coalesced into one outer waiting span. Handlers are invoked best-effort and are not awaited before showing or closing the prompt.
|
|
588
|
+
|
|
589
|
+
```typescript
|
|
590
|
+
pi.on("ui_prompt_start", async (event, ctx) => {
|
|
591
|
+
// event.reason === "ui_prompt"
|
|
592
|
+
// event.kind: "select" | "confirm" | "input" | "editor" | "custom"
|
|
593
|
+
// event.title: prompt title when available
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
pi.on("ui_prompt_end", async (event, ctx) => {
|
|
597
|
+
// Pi is no longer waiting on that UI prompt span.
|
|
598
|
+
});
|
|
599
|
+
```
|
|
600
|
+
|
|
574
601
|
#### turn_start / turn_end
|
|
575
602
|
|
|
576
603
|
Fired for each turn (one LLM response + tool calls).
|
|
@@ -2050,7 +2077,7 @@ pi.registerTool({
|
|
|
2050
2077
|
|
|
2051
2078
|
### Overriding Built-in Tools
|
|
2052
2079
|
|
|
2053
|
-
Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`) by registering a tool with the same name. Interactive mode displays a warning when this happens.
|
|
2080
|
+
Extensions can override built-in tools (`read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, `ls`) by registering a tool with the same name. Interactive mode displays a warning when this happens.
|
|
2054
2081
|
|
|
2055
2082
|
```bash
|
|
2056
2083
|
# Extension's read tool replaces built-in read
|
|
@@ -2074,6 +2101,7 @@ See [examples/extensions/tool-override.ts](../examples/extensions/tool-override.
|
|
|
2074
2101
|
Built-in tool implementations:
|
|
2075
2102
|
- [read.ts](https://github.com/Fchery87/apex-code/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails`
|
|
2076
2103
|
- [bash.ts](https://github.com/Fchery87/apex-code/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails`
|
|
2104
|
+
- [powershell.ts](https://github.com/Fchery87/apex-code/blob/main/packages/coding-agent/src/core/tools/powershell.ts) - `PowerShellToolDetails`
|
|
2077
2105
|
- [edit.ts](https://github.com/Fchery87/apex-code/blob/main/packages/coding-agent/src/core/tools/edit.ts)
|
|
2078
2106
|
- [write.ts](https://github.com/Fchery87/apex-code/blob/main/packages/coding-agent/src/core/tools/write.ts)
|
|
2079
2107
|
- [grep.ts](https://github.com/Fchery87/apex-code/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails`
|
|
@@ -2109,11 +2137,11 @@ pi.registerTool({
|
|
|
2109
2137
|
});
|
|
2110
2138
|
```
|
|
2111
2139
|
|
|
2112
|
-
**Operations interfaces:** `ReadOperations`, `WriteOperations`, `EditOperations`, `BashOperations`, `LsOperations`, `GrepOperations`, `FindOperations`
|
|
2140
|
+
**Operations interfaces:** `ReadOperations`, `WriteOperations`, `EditOperations`, `BashOperations`, `PowerShellOperations`, `LsOperations`, `GrepOperations`, `FindOperations`
|
|
2113
2141
|
|
|
2114
2142
|
For `user_bash`, extensions can reuse Apex Code's local shell backend via `createLocalBashOperations()` instead of reimplementing local process spawning, shell resolution, and process-tree termination.
|
|
2115
2143
|
|
|
2116
|
-
The bash
|
|
2144
|
+
The `bash` and `powershell` tools also support a spawn hook to adjust the command, cwd, or env before execution:
|
|
2117
2145
|
|
|
2118
2146
|
```typescript
|
|
2119
2147
|
import { createBashTool } from "apex-code";
|
|
@@ -2127,7 +2155,7 @@ const bashTool = createBashTool(cwd, {
|
|
|
2127
2155
|
});
|
|
2128
2156
|
```
|
|
2129
2157
|
|
|
2130
|
-
`createBashTool()`
|
|
2158
|
+
`createBashTool()` and `createPowerShellTool()` expose the current session to commands through `PI_SESSION_ID`, `PI_SESSION_FILE`, `PI_PROVIDER`, `PI_MODEL`, and `PI_REASONING_LEVEL`. Injection happens before `spawnHook`, so hooks receive these values in `env` and preserve them when they spread the existing environment as above. Set `exposeSessionEnvironment: false` to disable them:
|
|
2131
2159
|
|
|
2132
2160
|
```typescript
|
|
2133
2161
|
const bashTool = createBashTool(cwd, {
|
|
@@ -2135,7 +2163,7 @@ const bashTool = createBashTool(cwd, {
|
|
|
2135
2163
|
});
|
|
2136
2164
|
```
|
|
2137
2165
|
|
|
2138
|
-
See [
|
|
2166
|
+
See [Shell tool session environment](environment-variables.md#shell-tool-session-environment) for variable semantics. See [examples/extensions/ssh.ts](../examples/extensions/ssh.ts) for a complete SSH example with `--ssh` flag.
|
|
2139
2167
|
|
|
2140
2168
|
### Output Truncation
|
|
2141
2169
|
|
package/docs/json.md
CHANGED
|
@@ -15,12 +15,16 @@ except that streaming message updates omit cumulative snapshots:
|
|
|
15
15
|
```typescript
|
|
16
16
|
type WithoutPartial<T> = T extends { partial: unknown } ? Omit<T, "partial"> : T;
|
|
17
17
|
|
|
18
|
+
type JsonAssistantMessageEvent<T> = T extends { type: "toolcall_start"; partial: unknown }
|
|
19
|
+
? WithoutPartial<T> & { id: string; toolName: string }
|
|
20
|
+
: WithoutPartial<T>;
|
|
21
|
+
|
|
18
22
|
type JsonAgentSessionEvent =
|
|
19
23
|
| Exclude<AgentSessionEvent, { type: "message_update" }>
|
|
20
24
|
| {
|
|
21
25
|
type: "message_update";
|
|
22
26
|
usage: Usage;
|
|
23
|
-
assistantMessageEvent:
|
|
27
|
+
assistantMessageEvent: JsonAssistantMessageEvent<AssistantMessageEvent>;
|
|
24
28
|
};
|
|
25
29
|
```
|
|
26
30
|
|
|
@@ -84,7 +88,8 @@ Followed by events as they occur:
|
|
|
84
88
|
`assistantMessageEvent.partial` to keep stream size linear. The top-level `usage` field contains
|
|
85
89
|
the latest cumulative provider-reported usage and may remain zero when a provider only reports
|
|
86
90
|
usage at completion. Use `contentIndex` and `delta` to assemble live text, thinking, or tool-call
|
|
87
|
-
arguments if needed. `
|
|
91
|
+
arguments if needed. A `toolcall_start` event also includes the constant-sized `id` and `toolName`
|
|
92
|
+
fields. `message_end` contains the final authoritative message.
|
|
88
93
|
|
|
89
94
|
## Example
|
|
90
95
|
|
package/docs/keybindings.md
CHANGED
|
@@ -70,7 +70,7 @@ The dedicated history actions always change history entries, regardless of the c
|
|
|
70
70
|
|--------|---------|-------------|
|
|
71
71
|
| `tui.editor.yank` | `ctrl+y` | Paste most recently deleted text |
|
|
72
72
|
| `tui.editor.yankPop` | `alt+y` | Cycle through deleted text after yank |
|
|
73
|
-
| `tui.editor.undo` | `ctrl+-` | Undo last edit |
|
|
73
|
+
| `tui.editor.undo` | `ctrl+-` (`ctrl+z` on Windows; `alt+z` on WSL) | Undo last edit |
|
|
74
74
|
|
|
75
75
|
### TUI Clipboard and Selection
|
|
76
76
|
|
|
@@ -107,9 +107,9 @@ This routing remains configurable through the ordinary action bindings. For exam
|
|
|
107
107
|
| `tui.altScreen.halfPageDown` | *(none)* | Scroll the transcript down by half a page |
|
|
108
108
|
| `tui.altScreen.lineUp` | *(none)* | Scroll the transcript up by one line |
|
|
109
109
|
| `tui.altScreen.lineDown` | *(none)* | Scroll the transcript down by one line |
|
|
110
|
-
| `tui.altScreen.previousPrompt` | `ctrl+shift+up` | Jump to the previous marked message |
|
|
111
|
-
| `tui.altScreen.nextPrompt` | `ctrl+shift+down` | Jump to the next marked message |
|
|
112
|
-
| `tui.altScreen.search` | `ctrl+shift+f` | Search the rendered transcript |
|
|
110
|
+
| `tui.altScreen.previousPrompt` | `ctrl+shift+up`, `ctrl+up` (`ctrl+up` only on Windows and WSL) | Jump to the previous marked message |
|
|
111
|
+
| `tui.altScreen.nextPrompt` | `ctrl+shift+down`, `ctrl+down` (`ctrl+down` only on Windows and WSL) | Jump to the next marked message |
|
|
112
|
+
| `tui.altScreen.search` | `ctrl+shift+f` (`ctrl+f` on Windows and WSL) | Search the rendered transcript |
|
|
113
113
|
| `tui.altScreen.searchNext` | `enter`, `ctrl+g` | Select the next search match while searching |
|
|
114
114
|
| `tui.altScreen.searchPrevious` | `shift+enter`, `ctrl+shift+g` | Select the previous search match while searching |
|
|
115
115
|
| `tui.altScreen.searchClose` | `escape` | Close transcript search |
|
|
@@ -125,7 +125,7 @@ This routing remains configurable through the ordinary action bindings. For exam
|
|
|
125
125
|
| `app.exit` | `ctrl+d` | Exit (when editor empty) |
|
|
126
126
|
| `app.suspend` | `ctrl+z` (none on Windows) | Suspend to background |
|
|
127
127
|
| `app.editor.external` | `ctrl+g` | Open in external editor (`externalEditor`, `$VISUAL`, `$EDITOR`, Notepad on Windows, or `nano` elsewhere) |
|
|
128
|
-
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste image or text from clipboard |
|
|
128
|
+
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows and WSL) | Paste image or text from clipboard |
|
|
129
129
|
|
|
130
130
|
### Sessions
|
|
131
131
|
|
|
@@ -148,7 +148,7 @@ This routing remains configurable through the ordinary action bindings. For exam
|
|
|
148
148
|
|--------|---------|-------------|
|
|
149
149
|
| `app.model.select` | `ctrl+l` | Open model selector |
|
|
150
150
|
| `app.model.cycleForward` | `ctrl+p` | Cycle to next model |
|
|
151
|
-
| `app.model.cycleBackward` | `shift+ctrl+p` | Cycle to previous model |
|
|
151
|
+
| `app.model.cycleBackward` | `shift+ctrl+p` (`alt+p` on Windows and WSL) | Cycle to previous model |
|
|
152
152
|
| `app.thinking.cycle` | `shift+tab` | Cycle thinking level |
|
|
153
153
|
| `app.thinking.toggle` | `ctrl+t` | Collapse or expand thinking blocks |
|
|
154
154
|
|
|
@@ -157,9 +157,9 @@ This routing remains configurable through the ordinary action bindings. For exam
|
|
|
157
157
|
| Keybinding id | Default | Description |
|
|
158
158
|
|--------|---------|-------------|
|
|
159
159
|
| `app.tools.expand` | `ctrl+o` | Collapse or expand tool output |
|
|
160
|
-
| `app.message.copy` | `ctrl+x` | Copy the last assistant message, or the
|
|
161
|
-
| `app.message.followUp` | `alt+enter` | Queue follow-up message |
|
|
162
|
-
| `app.message.dequeue` | `alt+up` | Restore queued messages to editor |
|
|
160
|
+
| `app.message.copy` | `ctrl+x` | Copy the selected message in `/tree`; otherwise copy the last assistant message, or the active fullscreen text selection when `fullscreenCopyOnSelect` is disabled |
|
|
161
|
+
| `app.message.followUp` | `alt+enter` (`ctrl+q` on Windows and WSL) | Queue follow-up message |
|
|
162
|
+
| `app.message.dequeue` | `alt+up` (`alt+q` on Windows and WSL) | Restore queued messages to editor |
|
|
163
163
|
|
|
164
164
|
### Tree Navigation
|
|
165
165
|
|
package/docs/llama-cpp.md
CHANGED
|
@@ -53,6 +53,8 @@ Start Apex Code and configure the provider:
|
|
|
53
53
|
|
|
54
54
|
Enter the router URL and optional API key. The default URL is `http://127.0.0.1:8080`.
|
|
55
55
|
|
|
56
|
+
If you start the router with `--no-models-autoload`, `/login llama.cpp` only stores the connection. Run `/llama` to load a model, then `/model` to select the loaded model for the current session.
|
|
57
|
+
|
|
56
58
|
Environment variables can configure the same values without `/login`:
|
|
57
59
|
|
|
58
60
|
```bash
|
package/docs/models.md
CHANGED
|
@@ -254,6 +254,8 @@ Current behavior:
|
|
|
254
254
|
|
|
255
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
|
+
A constant thinking-token cap can go here too, but it will not follow `thinkingBudgets` or leave room for the answer. Prefer `compat.thinkingTokenBudgetField` (or the `supportsThinkingTokenBudget` alias) for that.
|
|
258
|
+
|
|
257
259
|
### Thinking Level Map
|
|
258
260
|
|
|
259
261
|
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`.
|
|
@@ -467,8 +469,10 @@ For providers with partial OpenAI compatibility, use the `compat` field.
|
|
|
467
469
|
| `requiresThinkingAsText` | Convert thinking blocks to plain text |
|
|
468
470
|
| `requiresReasoningContentOnAssistantMessages` | Include empty `reasoning_content` on all replayed assistant messages when reasoning is enabled |
|
|
469
471
|
| `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.
|
|
471
|
-
| `chatTemplateArgs` | `chat_template_args` values for `thinkingFormat: "baseten"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.
|
|
472
|
+
| `chatTemplateKwargs` | `chat_template_kwargs` values for `thinkingFormat: "chat-template"`; use `{ "$var": "thinking.enabled" }`, `{ "$var": "thinking.effort" }`, or `{ "$var": "thinking.budget" }` for Apex Code-controlled thinking values |
|
|
473
|
+
| `chatTemplateArgs` | `chat_template_args` values for `thinkingFormat: "baseten"`; use `{ "$var": "thinking.enabled" }`, `{ "$var": "thinking.effort" }`, or `{ "$var": "thinking.budget" }` for Apex Code-controlled thinking values |
|
|
474
|
+
| `thinkingTokenBudgetField` | Top-level request field used to cap reasoning tokens from `thinkingBudgets`, clamped so at least 1024 tokens remain for the answer. `"thinking_token_budget"` (vLLM), `"thinking_budget"` (Qwen/DashScope/SGLang), `"thinking_budget_tokens"` (llama.cpp). Off by default; not set on the generated catalog. |
|
|
475
|
+
| `supportsThinkingTokenBudget` | Alias for `thinkingTokenBudgetField: "thinking_token_budget"` (vLLM). Prefer `thinkingTokenBudgetField`. Default: `false`. |
|
|
472
476
|
| `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
477
|
| `sendSessionAffinityHeaders` | For `openai-completions`, send session-affinity headers from the session id when caching is enabled. Default: `false`. |
|
|
474
478
|
| `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. |
|
|
@@ -481,6 +485,8 @@ For providers with partial OpenAI compatibility, use the `compat` field.
|
|
|
481
485
|
|
|
482
486
|
`openrouter` uses `reasoning: { effort }`. `together` uses `reasoning: { enabled }` and also `reasoning_effort` when `supportsReasoningEffort` is enabled. `qwen` uses top-level `enable_thinking`. Use `qwen-chat-template` for local Qwen-compatible servers that require `chat_template_kwargs.enable_thinking` and `preserve_thinking`. Use `chat-template` for vLLM/Hugging Face chat templates that need configurable `chat_template_kwargs`, such as `chatTemplateKwargs: { "thinking": { "$var": "thinking.enabled" } }` for DeepSeek V3.x templates. Use `thinkingFormat: "baseten"` with `chatTemplateArgs` for providers that expose toggle controls through `chat_template_args` and optionally support top-level `reasoning_effort`.
|
|
483
487
|
|
|
488
|
+
`thinkingTokenBudgetField` is independent of `thinkingFormat`. Do not enable it on the generated Qwen catalog: those models already send `reasoning_effort`, and DashScope rejects `thinking_budget` together with `reasoning_effort`.
|
|
489
|
+
|
|
484
490
|
`cacheControlFormat: "anthropic"` is for OpenAI-compatible providers that expose Anthropic-style prompt caching through `cache_control` markers on text content and tool definitions.
|
|
485
491
|
|
|
486
492
|
Example:
|
package/docs/packages.md
CHANGED
|
@@ -38,7 +38,7 @@ apex-code update npm:@foo/bar # update one package
|
|
|
38
38
|
apex-code update --extension npm:@foo/bar
|
|
39
39
|
```
|
|
40
40
|
|
|
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).
|
|
41
|
+
These commands manage Apex Code packages and `apex-code update` can update the Apex Code CLI installation. For experimental installer-managed installations, `apex-code update` installs the exact checked version into a staged, lockfile-backed release and activates it only after verification, leaving the current release intact if the update fails. Managed installations do not support `--force`; rerun the installer to repair one. To uninstall Apex Code itself, see [Quickstart](quickstart.md#uninstall).
|
|
42
42
|
|
|
43
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
|
|
|
@@ -130,7 +130,7 @@ Add a `pi` manifest to `package.json` or use conventional directories. `pi` is A
|
|
|
130
130
|
}
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
Paths are relative to the package root. Arrays support glob patterns and `!exclusions`.
|
|
133
|
+
Paths are relative to the package root. Arrays support glob patterns and `!exclusions`. Positive manifest globs discover visible paths in lexical order. List dot-prefixed paths directly. If a glob would need to continue through a symlink, list the symlinked resource root directly.
|
|
134
134
|
|
|
135
135
|
### Gallery Metadata
|
|
136
136
|
|
package/docs/quickstart.md
CHANGED
|
@@ -146,7 +146,7 @@ The command output is sent to the model. Use `!!command` to run a command withou
|
|
|
146
146
|
|
|
147
147
|
### Switch models
|
|
148
148
|
|
|
149
|
-
Use `/model` or Ctrl+L to choose a model. Use Shift+Tab to cycle thinking level. Use Ctrl+P / Shift+Ctrl+P to cycle through scoped models.
|
|
149
|
+
Use `/model` or Ctrl+L to choose a model for the current session. Press Ctrl+S in the model picker to save the highlighted model as the startup default. Use `/thinking` to choose a thinking level for the current session, or Ctrl+S in that picker to save the startup default thinking level. Use Shift+Tab to cycle thinking level. Use Ctrl+P / Shift+Ctrl+P to cycle through scoped models.
|
|
150
150
|
|
|
151
151
|
### Continue later
|
|
152
152
|
|
package/docs/rpc.md
CHANGED
|
@@ -134,6 +134,29 @@ Response:
|
|
|
134
134
|
{"type": "response", "command": "abort", "success": true}
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
+
#### clear_queue
|
|
138
|
+
|
|
139
|
+
Remove queued steering and follow-up messages and return their text.
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{"type": "clear_queue"}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Response:
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"type": "response",
|
|
149
|
+
"command": "clear_queue",
|
|
150
|
+
"success": true,
|
|
151
|
+
"data": {
|
|
152
|
+
"steering": ["Change direction"],
|
|
153
|
+
"followUp": ["Summarize when finished"]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
To implement interactive Esc behavior, send `clear_queue` before `abort`, then restore the returned text in the client editor. `abort` continues queued messages when they remain in the session.
|
|
159
|
+
|
|
137
160
|
#### new_session
|
|
138
161
|
|
|
139
162
|
Start a fresh session. Can be cancelled by a `session_before_switch` extension event handler.
|
|
@@ -945,7 +968,7 @@ The `assistantMessageEvent` field contains one of these delta types:
|
|
|
945
968
|
| `thinking_start` | Thinking block started |
|
|
946
969
|
| `thinking_delta` | Thinking content chunk |
|
|
947
970
|
| `thinking_end` | Thinking block ended |
|
|
948
|
-
| `toolcall_start` | Tool call started |
|
|
971
|
+
| `toolcall_start` | Tool call started (includes `id` and `toolName`) |
|
|
949
972
|
| `toolcall_delta` | Tool call arguments chunk |
|
|
950
973
|
| `toolcall_end` | Tool call ended (includes full `toolCall` object) |
|
|
951
974
|
|
|
@@ -960,11 +983,17 @@ Example streaming a text response:
|
|
|
960
983
|
The top-level `usage` field contains the latest cumulative provider-reported usage. It may remain
|
|
961
984
|
zero until completion when a provider does not report usage during streaming.
|
|
962
985
|
|
|
986
|
+
Example starting a tool call:
|
|
987
|
+
```json
|
|
988
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"toolcall_start","contentIndex":1,"id":"call_abc123","toolName":"write"}}
|
|
989
|
+
```
|
|
990
|
+
|
|
963
991
|
`message_update` intentionally omits the former cumulative `message` field and
|
|
964
992
|
`assistantMessageEvent.partial`. Clients that need a live partial message must assemble it
|
|
965
993
|
from `message_start` and subsequent events using `contentIndex`. Treat `message_end.message`
|
|
966
|
-
as authoritative. For tool calls,
|
|
967
|
-
contains the completed
|
|
994
|
+
as authoritative. For tool calls, `toolcall_start` provides the call `id` and `toolName`;
|
|
995
|
+
buffer `toolcall_delta.delta` for arguments. `toolcall_end.toolCall` contains the completed
|
|
996
|
+
call.
|
|
968
997
|
|
|
969
998
|
### bash_execution_update
|
|
970
999
|
|
package/docs/sdk.md
CHANGED
|
@@ -49,6 +49,31 @@ The main factory function for a single `AgentSession`.
|
|
|
49
49
|
|
|
50
50
|
`createAgentSession()` uses a `ResourceLoader` to supply extensions, skills, prompt templates, themes, and context files. If you do not provide one, it uses `DefaultResourceLoader` with standard discovery.
|
|
51
51
|
|
|
52
|
+
#### Sandbox contract
|
|
53
|
+
|
|
54
|
+
The SDK cannot determine whether its host process is contained. Choose the
|
|
55
|
+
contract that describes how the embedding runs:
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
const { session, sandboxContract, sandboxDiagnostic } = await createAgentSession({
|
|
59
|
+
sandbox: "required",
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
* `"required"` refuses to create the session unless Apex's enforcing supervisor
|
|
64
|
+
marker is present. Use this when the SDK runs inside an Apex CLI child.
|
|
65
|
+
* `"external"` creates the session and reports that containment belongs to
|
|
66
|
+
another system. The SDK does not verify that system.
|
|
67
|
+
* `"none"` creates the session without asserting OS containment. This is the
|
|
68
|
+
default for compatibility.
|
|
69
|
+
|
|
70
|
+
The result always reports `sandboxContract`. It includes `sandboxDiagnostic` for
|
|
71
|
+
`"external"` and `"none"`. Delegated children inherit the selected contract.
|
|
72
|
+
Do not treat a normal SDK process, a permission gate, or a read-only tool list
|
|
73
|
+
as an OS sandbox. See [ADR 0031](../../docs/adr/0031-sdk-sandbox-contract.md)
|
|
74
|
+
and [ADR 0005](../../docs/adr/0005-sandbox-boundary-guarantees.md) for the
|
|
75
|
+
platform limits.
|
|
76
|
+
|
|
52
77
|
```typescript
|
|
53
78
|
import { createAgentSession, SessionManager } from "apex-code";
|
|
54
79
|
|
|
@@ -519,7 +544,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
519
544
|
|
|
520
545
|
Specify which built-in tools to enable:
|
|
521
546
|
|
|
522
|
-
- Built-in tool names: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
|
|
547
|
+
- Built-in tool names: `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, `ls`
|
|
523
548
|
- Default built-ins: `read`, `bash`, `edit`, `write`
|
|
524
549
|
- `noTools: "all"` disables all tools
|
|
525
550
|
- `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
|
|
@@ -540,6 +565,11 @@ const { session } = await createAgentSession({
|
|
|
540
565
|
tools: ["read", "bash", "grep"],
|
|
541
566
|
});
|
|
542
567
|
|
|
568
|
+
// Use PowerShell instead of Bash on Windows
|
|
569
|
+
const { session } = await createAgentSession({
|
|
570
|
+
tools: ["read", "powershell", "edit", "write"],
|
|
571
|
+
});
|
|
572
|
+
|
|
543
573
|
// Disable one tool while keeping the rest available
|
|
544
574
|
const { session } = await createAgentSession({
|
|
545
575
|
excludeTools: ["ask_question"],
|
|
@@ -1196,7 +1226,7 @@ SettingsManager
|
|
|
1196
1226
|
// Tool factories
|
|
1197
1227
|
createCodingTools
|
|
1198
1228
|
createReadOnlyTools
|
|
1199
|
-
createReadTool, createBashTool, createEditTool, createWriteTool
|
|
1229
|
+
createReadTool, createBashTool, createPowerShellTool, createEditTool, createWriteTool
|
|
1200
1230
|
createGrepTool, createFindTool, createLsTool
|
|
1201
1231
|
|
|
1202
1232
|
// Types
|
package/docs/settings.md
CHANGED
|
@@ -7,7 +7,7 @@ Apex Code uses JSON settings files with project settings overriding global setti
|
|
|
7
7
|
| `~/.apex-code/agent/settings.json` | Global (all projects) |
|
|
8
8
|
| `.apex-code/settings.json` | Project (current directory) |
|
|
9
9
|
|
|
10
|
-
Edit directly or use `/settings` for common options.
|
|
10
|
+
Edit directly or use `/settings` for common options. To save startup model defaults interactively, use `/model` and press Ctrl+S on the desired model. To save the startup thinking level, use `/thinking` and press Ctrl+S.
|
|
11
11
|
|
|
12
12
|
## Project Trust
|
|
13
13
|
|
|
@@ -27,12 +27,13 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
|
|
|
27
27
|
|
|
28
28
|
| Setting | Type | Default | Description |
|
|
29
29
|
|---------|------|---------|-------------|
|
|
30
|
-
| `defaultProvider` | string | - |
|
|
31
|
-
| `defaultModel` | string | - |
|
|
32
|
-
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
|
|
30
|
+
| `defaultProvider` | string | - | Startup provider (e.g., `"anthropic"`, `"openai"`; saved with Ctrl+S in `/model`, or edited manually) |
|
|
31
|
+
| `defaultModel` | string | - | Startup model ID (saved with Ctrl+S in `/model`, or edited manually) |
|
|
32
|
+
| `defaultThinkingLevel` | string | - | Startup thinking level (saved with Ctrl+S in `/thinking`, or edited manually): `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
|
|
33
|
+
| `modelThinkingLevels` | object | - | Per-model startup thinking levels keyed by `"provider/modelId"`; configure from `/settings` → Default thinking level per model or edit manually |
|
|
33
34
|
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
|
|
34
|
-
| `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
|
|
35
|
-
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
|
|
35
|
+
| `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses and compaction or branch-summary usage |
|
|
36
|
+
| `thinkingBudgets` | object | - | Custom token budgets per thinking level. Anthropic, Google, and Bedrock use these natively. OpenAI-compatible models use them when `compat.thinkingTokenBudgetField` (or `supportsThinkingTokenBudget`) is set. |
|
|
36
37
|
|
|
37
38
|
#### thinkingBudgets
|
|
38
39
|
|
|
@@ -65,6 +66,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
|
|
|
65
66
|
| `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
|
|
66
67
|
| `fullscreenExitOutput` | string | `"transcript"` | Fullscreen exit output: `"transcript"` prints the final transcript and resume hint, while `"resume-hint"` restores the previous screen and prints only the resume hint. Has no effect in regular TUI mode |
|
|
67
68
|
| `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling, `"always"` reserves the rightmost column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
|
|
69
|
+
| `fullscreenCopyOnSelect` | boolean | `true` | Automatically copy selected text in fullscreen mode. When disabled, selections stay highlighted and `Ctrl+X` copies the active selection |
|
|
68
70
|
|
|
69
71
|
For VS Code, include `--wait` so Apex Code resumes after the editor exits:
|
|
70
72
|
|
|
@@ -209,6 +211,9 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explic
|
|
|
209
211
|
| `terminal.showImages` | boolean | `true` | Show images in terminal (if supported) |
|
|
210
212
|
| `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells |
|
|
211
213
|
| `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when content shrinks (can cause flicker) |
|
|
214
|
+
| `terminal.hyperlinks` | boolean or `"auto"` | `"auto"` | Override OSC 8 hyperlink support (advanced, JSON-only) |
|
|
215
|
+
| `terminal.images` | string or boolean | `"auto"` | Override image protocol support with `"kitty"`, `"iterm2"`, `false`, or `"auto"` (advanced, JSON-only) |
|
|
216
|
+
| `terminal.trueColor` | boolean or `"auto"` | `"auto"` | Override truecolor support (advanced, JSON-only) |
|
|
212
217
|
| `images.autoResize` | boolean | `true` | Resize images to 2000x2000 max. Applies to `@file` attachments, `read`, and images returned by tools |
|
|
213
218
|
| `images.blockImages` | boolean | `false` | Block all images from being sent to LLM |
|
|
214
219
|
|
|
@@ -248,7 +253,7 @@ Windows paths in JSON must use forward slashes or escaped backslashes:
|
|
|
248
253
|
|---------|------|---------|-------------|
|
|
249
254
|
| `defaultTools` | string[] | - | Built-in tools enabled initially. When omitted, Pi uses its standard defaults |
|
|
250
255
|
|
|
251
|
-
`defaultTools` selects the built-in tools enabled at startup. Extension and SDK custom tools remain enabled
|
|
256
|
+
`defaultTools` selects the built-in tools enabled at startup. Extension and SDK custom tools remain enabled. Available built-ins are `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, and `ls`:
|
|
252
257
|
|
|
253
258
|
```json
|
|
254
259
|
{
|
|
@@ -256,6 +261,14 @@ Windows paths in JSON must use forward slashes or escaped backslashes:
|
|
|
256
261
|
}
|
|
257
262
|
```
|
|
258
263
|
|
|
264
|
+
On Windows, select `powershell` instead of `bash`, or include both:
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"defaultTools": ["read", "powershell", "edit", "write"]
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
259
272
|
An empty array starts with no built-in tools while preserving extension and SDK custom tools. `--tools` replaces this behavior with a strict allowlist for all tools, `--no-tools` disables all tools, and `--no-builtin-tools` disables the built-in defaults. `--exclude-tools` filters the resulting list. A project `defaultTools` array replaces the global array.
|
|
260
273
|
|
|
261
274
|
### Sessions
|
|
@@ -339,6 +352,9 @@ See [packages.md](packages.md) for package management details.
|
|
|
339
352
|
"defaultProvider": "anthropic",
|
|
340
353
|
"defaultModel": "claude-sonnet-4-20250514",
|
|
341
354
|
"defaultThinkingLevel": "medium",
|
|
355
|
+
"modelThinkingLevels": {
|
|
356
|
+
"anthropic/claude-sonnet-4-20250514": "high"
|
|
357
|
+
},
|
|
342
358
|
"theme": "dark",
|
|
343
359
|
"compaction": {
|
|
344
360
|
"enabled": true,
|
package/docs/skills.md
CHANGED
|
@@ -43,9 +43,10 @@ Apex Code loads skills from:
|
|
|
43
43
|
> whichever of these roots they resolve under.
|
|
44
44
|
|
|
45
45
|
Discovery rules:
|
|
46
|
-
- In `~/.apex-code/agent/skills/` and `.apex-code/skills/`, direct root `.md` files are discovered as individual skills
|
|
46
|
+
- In `~/.apex-code/agent/skills/` and `.apex-code/skills/`, direct root `.md` files are discovered as individual skills when they have valid skill frontmatter with a non-empty `description`
|
|
47
47
|
- In all skill locations, directories containing `SKILL.md` are discovered recursively
|
|
48
|
-
- In `~/.agents/skills/` and project `.agents/skills/`, root `.md` files are ignored
|
|
48
|
+
- In `~/.agents/skills/` and project `.agents/skills/`, root `.md` files are ignored, but nested `.md` files in grouping folders are discovered when they declare skill frontmatter
|
|
49
|
+
- Root Markdown files other than `SKILL.md` that do not look like skills are ignored silently
|
|
49
50
|
|
|
50
51
|
Disable discovery with `--no-skills` (explicit `--skill` paths still load).
|
|
51
52
|
|
|
@@ -233,7 +234,7 @@ Apex Code validates skills against the Agent Skills standard. Most issues produc
|
|
|
233
234
|
|
|
234
235
|
Unknown frontmatter fields are ignored.
|
|
235
236
|
|
|
236
|
-
|
|
237
|
+
Declared skills with missing descriptions are not loaded. Malformed `SKILL.md` files and `SKILL.md` files without a description produce warnings and are not loaded. Other Markdown files without valid skill frontmatter are ignored.
|
|
237
238
|
|
|
238
239
|
Name collisions (same name from different locations) warn and keep the first skill found.
|
|
239
240
|
|
package/docs/terminal-setup.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Apex Code uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.
|
|
4
4
|
|
|
5
|
+
## Capability Overrides
|
|
6
|
+
|
|
7
|
+
Pi auto-detects OSC 8 hyperlinks, inline image protocols, and truecolor. If detection fails behind a terminal proxy or multiplexer, use these advanced overrides:
|
|
8
|
+
|
|
9
|
+
| Capability | Environment variable | JSON setting |
|
|
10
|
+
|------------|----------------------|--------------|
|
|
11
|
+
| OSC 8 hyperlinks | `PI_HYPERLINKS=1\|0\|auto` | `terminal.hyperlinks: true\|false\|"auto"` |
|
|
12
|
+
| Inline images | `PI_IMAGE_PROTOCOL=kitty\|iterm2\|none\|auto` | `terminal.images: "kitty"\|"iterm2"\|false\|"auto"` |
|
|
13
|
+
| Truecolor | `PI_TRUE_COLOR=1\|0\|auto` | `terminal.trueColor: true\|false\|"auto"` |
|
|
14
|
+
|
|
15
|
+
Settings take precedence over environment variables; unset or `auto` preserves detection. Only force capabilities supported by the complete terminal path, since unsupported escape sequences can corrupt rendering.
|
|
16
|
+
|
|
5
17
|
## Kitty
|
|
6
18
|
|
|
7
19
|
Works out of the box.
|
|
@@ -120,7 +132,15 @@ Add to `keybindings.json`:
|
|
|
120
132
|
|
|
121
133
|
## Windows Terminal
|
|
122
134
|
|
|
123
|
-
|
|
135
|
+
Apex Code uses Windows-style keybindings when running natively on Windows or in WSL:
|
|
136
|
+
|
|
137
|
+
- `Alt+V` pastes an image or clipboard text.
|
|
138
|
+
- `Ctrl+F` searches the transcript in fullscreen mode, and `Ctrl+Up`/`Ctrl+Down` jump between marked messages.
|
|
139
|
+
- `Alt+P` cycles to the previous model.
|
|
140
|
+
- `Ctrl+Z` undoes editing on native Windows; WSL uses `Alt+Z` so `Ctrl+Z` can suspend Apex Code.
|
|
141
|
+
- `Ctrl+Q` queues a follow-up message and `Alt+Q` restores queued messages.
|
|
142
|
+
|
|
143
|
+
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward `Shift+Enter` for inserting a new line:
|
|
124
144
|
|
|
125
145
|
```json
|
|
126
146
|
{
|
|
@@ -128,10 +148,6 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
|
|
|
128
148
|
{
|
|
129
149
|
"command": { "action": "sendInput", "input": "\u001b[13;2u" },
|
|
130
150
|
"keys": "shift+enter"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"command": { "action": "sendInput", "input": "\u001b[13;3u" },
|
|
134
|
-
"keys": "alt+enter"
|
|
135
151
|
}
|
|
136
152
|
]
|
|
137
153
|
}
|
|
@@ -139,9 +155,9 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
|
|
|
139
155
|
|
|
140
156
|
- `Shift+Enter` inserts a new line.
|
|
141
157
|
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents Apex Code from receiving `Alt+Enter` for follow-up queueing.
|
|
142
|
-
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to Apex Code instead.
|
|
158
|
+
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to Apex Code instead, or configure Windows Terminal to send the key and bind `app.message.followUp` to `alt+enter` in Apex Code to use it instead of the `Ctrl+Q` default.
|
|
143
159
|
|
|
144
|
-
If you already have an `actions` array, add the
|
|
160
|
+
If you already have an `actions` array, add the object to it. Fully close and reopen Windows Terminal after changing its settings.
|
|
145
161
|
|
|
146
162
|
## xfce4-terminal, terminator
|
|
147
163
|
|
package/docs/usage.md
CHANGED
|
@@ -22,7 +22,7 @@ The editor can be replaced temporarily by built-in UI such as `/settings` or by
|
|
|
22
22
|
| File reference | Type `@` to fuzzy-search project files |
|
|
23
23
|
| Path completion | Press Tab to complete paths |
|
|
24
24
|
| Multi-line input | Shift+Enter, or Ctrl+Enter on Windows Terminal |
|
|
25
|
-
| Copy response | Ctrl+X copies the
|
|
25
|
+
| Copy response | Ctrl+X copies the selected message in `/tree`; otherwise it copies the last assistant message, or the active fullscreen text selection when `fullscreenCopyOnSelect` is disabled |
|
|
26
26
|
| Images | Paste with Ctrl+V, Alt+V on Windows, or drag into the terminal |
|
|
27
27
|
| Shell command | `!command` runs and sends output to the model |
|
|
28
28
|
| Hidden shell command | `!!command` runs without sending output to the model |
|
|
@@ -38,9 +38,10 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
38
38
|
|---------|-------------|
|
|
39
39
|
| `/login`, `/logout` | Manage OAuth or API-key credentials |
|
|
40
40
|
| [`/llama`](llama-cpp.md) | Download, load, and unload llama.cpp router models |
|
|
41
|
-
| `/model` | Switch models |
|
|
41
|
+
| `/model` | Switch models; Ctrl+S in the picker saves the startup default |
|
|
42
|
+
| `/thinking` | Switch thinking level; Ctrl+S in the picker saves the startup default |
|
|
42
43
|
| `/scoped-models` | Enable/disable models for Ctrl+P cycling |
|
|
43
|
-
| `/settings` |
|
|
44
|
+
| `/settings` | Theme, message delivery, transport, and other preferences |
|
|
44
45
|
| `/resume` | Pick from previous sessions |
|
|
45
46
|
| `/new` | Start a new session |
|
|
46
47
|
| `/name <name>` | Set session display name |
|
|
@@ -142,7 +143,7 @@ If you use Apex Code for open source work and want to publish sessions for model
|
|
|
142
143
|
## CLI Reference
|
|
143
144
|
|
|
144
145
|
```bash
|
|
145
|
-
apex-code [options] [@files...] [messages...]
|
|
146
|
+
apex-code [options] [--] [@files...] [messages...]
|
|
146
147
|
```
|
|
147
148
|
|
|
148
149
|
### Package Commands
|
|
@@ -215,7 +216,7 @@ cat README.md | apex-code -p "Summarize this text"
|
|
|
215
216
|
| `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
|
|
216
217
|
| `--no-tools`, `-nt` | Disable all tools |
|
|
217
218
|
|
|
218
|
-
Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`.
|
|
219
|
+
Built-in tools: `read`, `bash`, `powershell` (Windows), `edit`, `write`, `grep`, `find`, `ls`.
|
|
219
220
|
|
|
220
221
|
### Resource Options
|
|
221
222
|
|
|
@@ -248,6 +249,7 @@ apex-code --no-extensions -e ./my-extension.ts
|
|
|
248
249
|
| `--verbose` | Force verbose startup |
|
|
249
250
|
| `-a`, `--approve` | Trust project-local files for this run |
|
|
250
251
|
| `-na`, `--no-approve` | Ignore project-local files for this run |
|
|
252
|
+
| `--` | Stop option parsing; remaining arguments are prompts or `@file` inputs |
|
|
251
253
|
| `-h`, `--help` | Show help |
|
|
252
254
|
| `-v`, `--version` | Show version |
|
|
253
255
|
|
|
@@ -274,6 +276,9 @@ apex-code "List all .ts files in src/"
|
|
|
274
276
|
# Non-interactive
|
|
275
277
|
apex-code -p "Summarize this codebase"
|
|
276
278
|
|
|
279
|
+
# Prompt beginning with a dash
|
|
280
|
+
pi -p -- "- Summarize these points"
|
|
281
|
+
|
|
277
282
|
# Non-interactive with piped stdin
|
|
278
283
|
cat README.md | apex-code -p "Summarize this text"
|
|
279
284
|
|
package/docs/windows.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Windows Setup
|
|
2
2
|
|
|
3
|
-
Apex Code
|
|
3
|
+
Apex Code uses Git Bash by default on Windows. Checked locations (in order):
|
|
4
4
|
|
|
5
5
|
1. Custom path from `~/.apex-code/agent/settings.json`
|
|
6
6
|
2. Git Bash (`C:\Program Files\Git\bin\bash.exe`)
|
|
@@ -8,7 +8,29 @@ Apex Code requires a bash shell on Windows. Checked locations (in order):
|
|
|
8
8
|
|
|
9
9
|
For most users, [Git for Windows](https://git-scm.com/download/win) is sufficient.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## PowerShell Tool
|
|
12
|
+
|
|
13
|
+
The optional `powershell` tool runs commands through `pwsh.exe` when available, otherwise Windows PowerShell. It starts PowerShell with `-NoProfile -NonInteractive -ExecutionPolicy Bypass`. Administrator-enforced execution policies can still take precedence.
|
|
14
|
+
|
|
15
|
+
Use `defaultTools` to replace the model-facing `bash` tool:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"defaultTools": ["read", "powershell", "edit", "write"]
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or enable both while comparing behavior:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"defaultTools": ["read", "bash", "powershell", "edit", "write"]
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The `!` and `!!` editor commands still use Bash.
|
|
32
|
+
|
|
33
|
+
## Custom Bash Path
|
|
12
34
|
|
|
13
35
|
```json
|
|
14
36
|
{
|