@kenkaiiii/ggcoder 5.49.5 → 5.49.6
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/dist/core/settings-manager.d.ts +2 -2
- package/package.json +5 -5
- package/dist/app-sidecar-auth-broadcast.test.d.ts +0 -2
- package/dist/app-sidecar-auth-broadcast.test.d.ts.map +0 -1
- package/dist/app-sidecar-auth-broadcast.test.js +0 -383
- package/dist/app-sidecar-auth-broadcast.test.js.map +0 -1
- package/dist/app-sidecar-sessions.test.d.ts +0 -2
- package/dist/app-sidecar-sessions.test.d.ts.map +0 -1
- package/dist/app-sidecar-sessions.test.js +0 -178
- package/dist/app-sidecar-sessions.test.js.map +0 -1
- package/dist/chat-agents/general.test.d.ts +0 -2
- package/dist/chat-agents/general.test.d.ts.map +0 -1
- package/dist/chat-agents/general.test.js +0 -53
- package/dist/chat-agents/general.test.js.map +0 -1
- package/dist/chat-agents/jiwa.test.d.ts +0 -2
- package/dist/chat-agents/jiwa.test.d.ts.map +0 -1
- package/dist/chat-agents/jiwa.test.js +0 -66
- package/dist/chat-agents/jiwa.test.js.map +0 -1
- package/dist/chat-agents/memory.test.d.ts +0 -2
- package/dist/chat-agents/memory.test.d.ts.map +0 -1
- package/dist/chat-agents/memory.test.js +0 -165
- package/dist/chat-agents/memory.test.js.map +0 -1
- package/dist/chat-agents/specialists.test.d.ts +0 -2
- package/dist/chat-agents/specialists.test.d.ts.map +0 -1
- package/dist/chat-agents/specialists.test.js +0 -98
- package/dist/chat-agents/specialists.test.js.map +0 -1
- package/dist/cli/command-routing.test.d.ts +0 -2
- package/dist/cli/command-routing.test.d.ts.map +0 -1
- package/dist/cli/command-routing.test.js +0 -60
- package/dist/cli/command-routing.test.js.map +0 -1
- package/dist/config.test.d.ts +0 -2
- package/dist/config.test.d.ts.map +0 -1
- package/dist/config.test.js +0 -148
- package/dist/config.test.js.map +0 -1
- package/dist/core/agent-mcp-passthrough.test.d.ts +0 -2
- package/dist/core/agent-mcp-passthrough.test.d.ts.map +0 -1
- package/dist/core/agent-mcp-passthrough.test.js +0 -61
- package/dist/core/agent-mcp-passthrough.test.js.map +0 -1
- package/dist/core/agent-notifications.test.d.ts +0 -2
- package/dist/core/agent-notifications.test.d.ts.map +0 -1
- package/dist/core/agent-notifications.test.js +0 -97
- package/dist/core/agent-notifications.test.js.map +0 -1
- package/dist/core/agent-session-add-dir.test.d.ts +0 -2
- package/dist/core/agent-session-add-dir.test.d.ts.map +0 -1
- package/dist/core/agent-session-add-dir.test.js +0 -110
- package/dist/core/agent-session-add-dir.test.js.map +0 -1
- package/dist/core/agent-session-checkpoint-flush.test.d.ts +0 -2
- package/dist/core/agent-session-checkpoint-flush.test.d.ts.map +0 -1
- package/dist/core/agent-session-checkpoint-flush.test.js +0 -201
- package/dist/core/agent-session-checkpoint-flush.test.js.map +0 -1
- package/dist/core/agent-session-compaction.test.d.ts +0 -2
- package/dist/core/agent-session-compaction.test.d.ts.map +0 -1
- package/dist/core/agent-session-compaction.test.js +0 -1157
- package/dist/core/agent-session-compaction.test.js.map +0 -1
- package/dist/core/agent-session-crash-durability.test.d.ts +0 -2
- package/dist/core/agent-session-crash-durability.test.d.ts.map +0 -1
- package/dist/core/agent-session-crash-durability.test.js +0 -102
- package/dist/core/agent-session-crash-durability.test.js.map +0 -1
- package/dist/core/agent-session-marker-anchors.test.d.ts +0 -2
- package/dist/core/agent-session-marker-anchors.test.d.ts.map +0 -1
- package/dist/core/agent-session-marker-anchors.test.js +0 -326
- package/dist/core/agent-session-marker-anchors.test.js.map +0 -1
- package/dist/core/agent-session-memory-tail.test.d.ts +0 -2
- package/dist/core/agent-session-memory-tail.test.d.ts.map +0 -1
- package/dist/core/agent-session-memory-tail.test.js +0 -119
- package/dist/core/agent-session-memory-tail.test.js.map +0 -1
- package/dist/core/agent-session-model-switch.test.d.ts +0 -2
- package/dist/core/agent-session-model-switch.test.d.ts.map +0 -1
- package/dist/core/agent-session-model-switch.test.js +0 -161
- package/dist/core/agent-session-model-switch.test.js.map +0 -1
- package/dist/core/agent-session-notifications.test.d.ts +0 -2
- package/dist/core/agent-session-notifications.test.d.ts.map +0 -1
- package/dist/core/agent-session-notifications.test.js +0 -114
- package/dist/core/agent-session-notifications.test.js.map +0 -1
- package/dist/core/agent-session-pre-init-arming.test.d.ts +0 -2
- package/dist/core/agent-session-pre-init-arming.test.d.ts.map +0 -1
- package/dist/core/agent-session-pre-init-arming.test.js +0 -60
- package/dist/core/agent-session-pre-init-arming.test.js.map +0 -1
- package/dist/core/agent-session-process-gate.test.d.ts +0 -2
- package/dist/core/agent-session-process-gate.test.d.ts.map +0 -1
- package/dist/core/agent-session-process-gate.test.js +0 -98
- package/dist/core/agent-session-process-gate.test.js.map +0 -1
- package/dist/core/agent-session-queue.test.d.ts +0 -2
- package/dist/core/agent-session-queue.test.d.ts.map +0 -1
- package/dist/core/agent-session-queue.test.js +0 -184
- package/dist/core/agent-session-queue.test.js.map +0 -1
- package/dist/core/agent-session-review-coverage.test.d.ts +0 -2
- package/dist/core/agent-session-review-coverage.test.d.ts.map +0 -1
- package/dist/core/agent-session-review-coverage.test.js +0 -191
- package/dist/core/agent-session-review-coverage.test.js.map +0 -1
- package/dist/core/agent-session-slash-restore.test.d.ts +0 -2
- package/dist/core/agent-session-slash-restore.test.d.ts.map +0 -1
- package/dist/core/agent-session-slash-restore.test.js +0 -121
- package/dist/core/agent-session-slash-restore.test.js.map +0 -1
- package/dist/core/agent-session-subagent-policy.test.d.ts +0 -2
- package/dist/core/agent-session-subagent-policy.test.d.ts.map +0 -1
- package/dist/core/agent-session-subagent-policy.test.js +0 -40
- package/dist/core/agent-session-subagent-policy.test.js.map +0 -1
- package/dist/core/agent-session-tool-result-policy.test.d.ts +0 -2
- package/dist/core/agent-session-tool-result-policy.test.d.ts.map +0 -1
- package/dist/core/agent-session-tool-result-policy.test.js +0 -25
- package/dist/core/agent-session-tool-result-policy.test.js.map +0 -1
- package/dist/core/agent-session-tool-tiers.test.d.ts +0 -2
- package/dist/core/agent-session-tool-tiers.test.d.ts.map +0 -1
- package/dist/core/agent-session-tool-tiers.test.js +0 -138
- package/dist/core/agent-session-tool-tiers.test.js.map +0 -1
- package/dist/core/agent-session-verification-flow.test.d.ts +0 -2
- package/dist/core/agent-session-verification-flow.test.d.ts.map +0 -1
- package/dist/core/agent-session-verification-flow.test.js +0 -125
- package/dist/core/agent-session-verification-flow.test.js.map +0 -1
- package/dist/core/agent-session-verification-gate.test.d.ts +0 -2
- package/dist/core/agent-session-verification-gate.test.d.ts.map +0 -1
- package/dist/core/agent-session-verification-gate.test.js +0 -137
- package/dist/core/agent-session-verification-gate.test.js.map +0 -1
- package/dist/core/agent-tools-allowlist.test.d.ts +0 -2
- package/dist/core/agent-tools-allowlist.test.d.ts.map +0 -1
- package/dist/core/agent-tools-allowlist.test.js +0 -74
- package/dist/core/agent-tools-allowlist.test.js.map +0 -1
- package/dist/core/agents.test.d.ts +0 -2
- package/dist/core/agents.test.d.ts.map +0 -1
- package/dist/core/agents.test.js +0 -147
- package/dist/core/agents.test.js.map +0 -1
- package/dist/core/auto-update.test.d.ts +0 -2
- package/dist/core/auto-update.test.d.ts.map +0 -1
- package/dist/core/auto-update.test.js +0 -204
- package/dist/core/auto-update.test.js.map +0 -1
- package/dist/core/autopilot-cycle.test.d.ts +0 -2
- package/dist/core/autopilot-cycle.test.d.ts.map +0 -1
- package/dist/core/autopilot-cycle.test.js +0 -375
- package/dist/core/autopilot-cycle.test.js.map +0 -1
- package/dist/core/autopilot-gate.test.d.ts +0 -2
- package/dist/core/autopilot-gate.test.d.ts.map +0 -1
- package/dist/core/autopilot-gate.test.js +0 -298
- package/dist/core/autopilot-gate.test.js.map +0 -1
- package/dist/core/autopilot-verdict.test.d.ts +0 -2
- package/dist/core/autopilot-verdict.test.d.ts.map +0 -1
- package/dist/core/autopilot-verdict.test.js +0 -153
- package/dist/core/autopilot-verdict.test.js.map +0 -1
- package/dist/core/checkpoint-store.test.d.ts +0 -2
- package/dist/core/checkpoint-store.test.d.ts.map +0 -1
- package/dist/core/checkpoint-store.test.js +0 -111
- package/dist/core/checkpoint-store.test.js.map +0 -1
- package/dist/core/code-retrieval-chunkers.test.d.ts +0 -2
- package/dist/core/code-retrieval-chunkers.test.d.ts.map +0 -1
- package/dist/core/code-retrieval-chunkers.test.js +0 -203
- package/dist/core/code-retrieval-chunkers.test.js.map +0 -1
- package/dist/core/compaction/active-context.test.d.ts +0 -2
- package/dist/core/compaction/active-context.test.d.ts.map +0 -1
- package/dist/core/compaction/active-context.test.js +0 -57
- package/dist/core/compaction/active-context.test.js.map +0 -1
- package/dist/core/compaction/compactor.test.d.ts +0 -2
- package/dist/core/compaction/compactor.test.d.ts.map +0 -1
- package/dist/core/compaction/compactor.test.js +0 -1072
- package/dist/core/compaction/compactor.test.js.map +0 -1
- package/dist/core/compaction/policy.test.d.ts +0 -2
- package/dist/core/compaction/policy.test.d.ts.map +0 -1
- package/dist/core/compaction/policy.test.js +0 -35
- package/dist/core/compaction/policy.test.js.map +0 -1
- package/dist/core/compaction/query-aware-selector.test.d.ts +0 -2
- package/dist/core/compaction/query-aware-selector.test.d.ts.map +0 -1
- package/dist/core/compaction/query-aware-selector.test.js +0 -96
- package/dist/core/compaction/query-aware-selector.test.js.map +0 -1
- package/dist/core/compaction/token-estimator.test.d.ts +0 -2
- package/dist/core/compaction/token-estimator.test.d.ts.map +0 -1
- package/dist/core/compaction/token-estimator.test.js +0 -283
- package/dist/core/compaction/token-estimator.test.js.map +0 -1
- package/dist/core/compaction/tool-result-pruner.test.d.ts +0 -2
- package/dist/core/compaction/tool-result-pruner.test.d.ts.map +0 -1
- package/dist/core/compaction/tool-result-pruner.test.js +0 -320
- package/dist/core/compaction/tool-result-pruner.test.js.map +0 -1
- package/dist/core/context-limits.test.d.ts +0 -2
- package/dist/core/context-limits.test.d.ts.map +0 -1
- package/dist/core/context-limits.test.js +0 -55
- package/dist/core/context-limits.test.js.map +0 -1
- package/dist/core/continue-replay-inventory.test.d.ts +0 -2
- package/dist/core/continue-replay-inventory.test.d.ts.map +0 -1
- package/dist/core/continue-replay-inventory.test.js +0 -42
- package/dist/core/continue-replay-inventory.test.js.map +0 -1
- package/dist/core/encode-cwd.test.d.ts +0 -2
- package/dist/core/encode-cwd.test.d.ts.map +0 -1
- package/dist/core/encode-cwd.test.js +0 -80
- package/dist/core/encode-cwd.test.js.map +0 -1
- package/dist/core/event-bus.test.d.ts +0 -2
- package/dist/core/event-bus.test.d.ts.map +0 -1
- package/dist/core/event-bus.test.js +0 -33
- package/dist/core/event-bus.test.js.map +0 -1
- package/dist/core/extensions/plugin-bundles.test.d.ts +0 -2
- package/dist/core/extensions/plugin-bundles.test.d.ts.map +0 -1
- package/dist/core/extensions/plugin-bundles.test.js +0 -110
- package/dist/core/extensions/plugin-bundles.test.js.map +0 -1
- package/dist/core/foreign-session-import.test.d.ts +0 -2
- package/dist/core/foreign-session-import.test.d.ts.map +0 -1
- package/dist/core/foreign-session-import.test.js +0 -220
- package/dist/core/foreign-session-import.test.js.map +0 -1
- package/dist/core/hashline-edit-benchmark.test.d.ts +0 -2
- package/dist/core/hashline-edit-benchmark.test.d.ts.map +0 -1
- package/dist/core/hashline-edit-benchmark.test.js +0 -190
- package/dist/core/hashline-edit-benchmark.test.js.map +0 -1
- package/dist/core/ideal-review.test.d.ts +0 -2
- package/dist/core/ideal-review.test.d.ts.map +0 -1
- package/dist/core/ideal-review.test.js +0 -242
- package/dist/core/ideal-review.test.js.map +0 -1
- package/dist/core/input-normalization.test.d.ts +0 -2
- package/dist/core/input-normalization.test.d.ts.map +0 -1
- package/dist/core/input-normalization.test.js +0 -75
- package/dist/core/input-normalization.test.js.map +0 -1
- package/dist/core/json-mode-flag-parity.test.d.ts +0 -2
- package/dist/core/json-mode-flag-parity.test.d.ts.map +0 -1
- package/dist/core/json-mode-flag-parity.test.js +0 -66
- package/dist/core/json-mode-flag-parity.test.js.map +0 -1
- package/dist/core/ken-context.test.d.ts +0 -2
- package/dist/core/ken-context.test.d.ts.map +0 -1
- package/dist/core/ken-context.test.js +0 -342
- package/dist/core/ken-context.test.js.map +0 -1
- package/dist/core/ken-model.test.d.ts +0 -2
- package/dist/core/ken-model.test.d.ts.map +0 -1
- package/dist/core/ken-model.test.js +0 -51
- package/dist/core/ken-model.test.js.map +0 -1
- package/dist/core/ken-prompt.test.d.ts +0 -2
- package/dist/core/ken-prompt.test.d.ts.map +0 -1
- package/dist/core/ken-prompt.test.js +0 -191
- package/dist/core/ken-prompt.test.js.map +0 -1
- package/dist/core/language-detector.test.d.ts +0 -2
- package/dist/core/language-detector.test.d.ts.map +0 -1
- package/dist/core/language-detector.test.js +0 -109
- package/dist/core/language-detector.test.js.map +0 -1
- package/dist/core/local-endpoint-store.test.d.ts +0 -2
- package/dist/core/local-endpoint-store.test.d.ts.map +0 -1
- package/dist/core/local-endpoint-store.test.js +0 -123
- package/dist/core/local-endpoint-store.test.js.map +0 -1
- package/dist/core/loop-breaker.test.d.ts +0 -2
- package/dist/core/loop-breaker.test.d.ts.map +0 -1
- package/dist/core/loop-breaker.test.js +0 -238
- package/dist/core/loop-breaker.test.js.map +0 -1
- package/dist/core/lsp/client-navigation.test.d.ts +0 -2
- package/dist/core/lsp/client-navigation.test.d.ts.map +0 -1
- package/dist/core/lsp/client-navigation.test.js +0 -135
- package/dist/core/lsp/client-navigation.test.js.map +0 -1
- package/dist/core/lsp/format.test.d.ts +0 -2
- package/dist/core/lsp/format.test.d.ts.map +0 -1
- package/dist/core/lsp/format.test.js +0 -56
- package/dist/core/lsp/format.test.js.map +0 -1
- package/dist/core/lsp/integration.test.d.ts +0 -2
- package/dist/core/lsp/integration.test.d.ts.map +0 -1
- package/dist/core/lsp/integration.test.js +0 -60
- package/dist/core/lsp/integration.test.js.map +0 -1
- package/dist/core/lsp/jsonrpc.test.d.ts +0 -2
- package/dist/core/lsp/jsonrpc.test.d.ts.map +0 -1
- package/dist/core/lsp/jsonrpc.test.js +0 -127
- package/dist/core/lsp/jsonrpc.test.js.map +0 -1
- package/dist/core/lsp/manager-navigation.test.d.ts +0 -2
- package/dist/core/lsp/manager-navigation.test.d.ts.map +0 -1
- package/dist/core/lsp/manager-navigation.test.js +0 -121
- package/dist/core/lsp/manager-navigation.test.js.map +0 -1
- package/dist/core/lsp/manager.test.d.ts +0 -2
- package/dist/core/lsp/manager.test.d.ts.map +0 -1
- package/dist/core/lsp/manager.test.js +0 -286
- package/dist/core/lsp/manager.test.js.map +0 -1
- package/dist/core/lsp/pool.test.d.ts +0 -2
- package/dist/core/lsp/pool.test.d.ts.map +0 -1
- package/dist/core/lsp/pool.test.js +0 -286
- package/dist/core/lsp/pool.test.js.map +0 -1
- package/dist/core/lsp/servers.test.d.ts +0 -2
- package/dist/core/lsp/servers.test.d.ts.map +0 -1
- package/dist/core/lsp/servers.test.js +0 -67
- package/dist/core/lsp/servers.test.js.map +0 -1
- package/dist/core/lsp/uri.test.d.ts +0 -2
- package/dist/core/lsp/uri.test.d.ts.map +0 -1
- package/dist/core/lsp/uri.test.js +0 -56
- package/dist/core/lsp/uri.test.js.map +0 -1
- package/dist/core/lsp/windows.test.d.ts +0 -2
- package/dist/core/lsp/windows.test.d.ts.map +0 -1
- package/dist/core/lsp/windows.test.js +0 -239
- package/dist/core/lsp/windows.test.js.map +0 -1
- package/dist/core/mcp/catalog-cache.test.d.ts +0 -2
- package/dist/core/mcp/catalog-cache.test.d.ts.map +0 -1
- package/dist/core/mcp/catalog-cache.test.js +0 -99
- package/dist/core/mcp/catalog-cache.test.js.map +0 -1
- package/dist/core/mcp/client-session-recovery.test.d.ts +0 -2
- package/dist/core/mcp/client-session-recovery.test.d.ts.map +0 -1
- package/dist/core/mcp/client-session-recovery.test.js +0 -231
- package/dist/core/mcp/client-session-recovery.test.js.map +0 -1
- package/dist/core/mcp/content.test.d.ts +0 -2
- package/dist/core/mcp/content.test.d.ts.map +0 -1
- package/dist/core/mcp/content.test.js +0 -152
- package/dist/core/mcp/content.test.js.map +0 -1
- package/dist/core/mcp/defaults.test.d.ts +0 -2
- package/dist/core/mcp/defaults.test.d.ts.map +0 -1
- package/dist/core/mcp/defaults.test.js +0 -60
- package/dist/core/mcp/defaults.test.js.map +0 -1
- package/dist/core/mcp/elicitation.test.d.ts +0 -2
- package/dist/core/mcp/elicitation.test.d.ts.map +0 -1
- package/dist/core/mcp/elicitation.test.js +0 -158
- package/dist/core/mcp/elicitation.test.js.map +0 -1
- package/dist/core/mcp/legacy-negotiation.test.d.ts +0 -2
- package/dist/core/mcp/legacy-negotiation.test.d.ts.map +0 -1
- package/dist/core/mcp/legacy-negotiation.test.js +0 -80
- package/dist/core/mcp/legacy-negotiation.test.js.map +0 -1
- package/dist/core/mcp/loopback.test.d.ts +0 -2
- package/dist/core/mcp/loopback.test.d.ts.map +0 -1
- package/dist/core/mcp/loopback.test.js +0 -87
- package/dist/core/mcp/loopback.test.js.map +0 -1
- package/dist/core/mcp/oauth-store.test.d.ts +0 -2
- package/dist/core/mcp/oauth-store.test.d.ts.map +0 -1
- package/dist/core/mcp/oauth-store.test.js +0 -94
- package/dist/core/mcp/oauth-store.test.js.map +0 -1
- package/dist/core/mcp/parse-add-command.test.d.ts +0 -2
- package/dist/core/mcp/parse-add-command.test.d.ts.map +0 -1
- package/dist/core/mcp/parse-add-command.test.js +0 -81
- package/dist/core/mcp/parse-add-command.test.js.map +0 -1
- package/dist/core/mcp/resolve-stdio.test.d.ts +0 -2
- package/dist/core/mcp/resolve-stdio.test.d.ts.map +0 -1
- package/dist/core/mcp/resolve-stdio.test.js +0 -239
- package/dist/core/mcp/resolve-stdio.test.js.map +0 -1
- package/dist/core/mcp/session-elicitation-wiring.test.d.ts +0 -2
- package/dist/core/mcp/session-elicitation-wiring.test.d.ts.map +0 -1
- package/dist/core/mcp/session-elicitation-wiring.test.js +0 -138
- package/dist/core/mcp/session-elicitation-wiring.test.js.map +0 -1
- package/dist/core/mcp/shared-pool.test.d.ts +0 -2
- package/dist/core/mcp/shared-pool.test.d.ts.map +0 -1
- package/dist/core/mcp/shared-pool.test.js +0 -425
- package/dist/core/mcp/shared-pool.test.js.map +0 -1
- package/dist/core/mcp/store.test.d.ts +0 -2
- package/dist/core/mcp/store.test.d.ts.map +0 -1
- package/dist/core/mcp/store.test.js +0 -110
- package/dist/core/mcp/store.test.js.map +0 -1
- package/dist/core/mcp/when-connected.test.d.ts +0 -2
- package/dist/core/mcp/when-connected.test.d.ts.map +0 -1
- package/dist/core/mcp/when-connected.test.js +0 -46
- package/dist/core/mcp/when-connected.test.js.map +0 -1
- package/dist/core/message-images.test.d.ts +0 -2
- package/dist/core/message-images.test.d.ts.map +0 -1
- package/dist/core/message-images.test.js +0 -62
- package/dist/core/message-images.test.js.map +0 -1
- package/dist/core/network-guard.test.d.ts +0 -2
- package/dist/core/network-guard.test.d.ts.map +0 -1
- package/dist/core/network-guard.test.js +0 -72
- package/dist/core/network-guard.test.js.map +0 -1
- package/dist/core/persistent-shell.test.d.ts +0 -2
- package/dist/core/persistent-shell.test.d.ts.map +0 -1
- package/dist/core/persistent-shell.test.js +0 -84
- package/dist/core/persistent-shell.test.js.map +0 -1
- package/dist/core/process-gate.test.d.ts +0 -2
- package/dist/core/process-gate.test.d.ts.map +0 -1
- package/dist/core/process-gate.test.js +0 -87
- package/dist/core/process-gate.test.js.map +0 -1
- package/dist/core/process-manager-dev-server-repro.test.d.ts +0 -2
- package/dist/core/process-manager-dev-server-repro.test.d.ts.map +0 -1
- package/dist/core/process-manager-dev-server-repro.test.js +0 -225
- package/dist/core/process-manager-dev-server-repro.test.js.map +0 -1
- package/dist/core/process-manager-notifications.test.d.ts +0 -2
- package/dist/core/process-manager-notifications.test.d.ts.map +0 -1
- package/dist/core/process-manager-notifications.test.js +0 -245
- package/dist/core/process-manager-notifications.test.js.map +0 -1
- package/dist/core/process-manager-wake.test.d.ts +0 -2
- package/dist/core/process-manager-wake.test.d.ts.map +0 -1
- package/dist/core/process-manager-wake.test.js +0 -100
- package/dist/core/process-manager-wake.test.js.map +0 -1
- package/dist/core/progress/engine.test.d.ts +0 -2
- package/dist/core/progress/engine.test.d.ts.map +0 -1
- package/dist/core/progress/engine.test.js +0 -136
- package/dist/core/progress/engine.test.js.map +0 -1
- package/dist/core/progress/git-xp.test.d.ts +0 -2
- package/dist/core/progress/git-xp.test.d.ts.map +0 -1
- package/dist/core/progress/git-xp.test.js +0 -88
- package/dist/core/progress/git-xp.test.js.map +0 -1
- package/dist/core/progress/ranks.test.d.ts +0 -2
- package/dist/core/progress/ranks.test.d.ts.map +0 -1
- package/dist/core/progress/ranks.test.js +0 -100
- package/dist/core/progress/ranks.test.js.map +0 -1
- package/dist/core/progress/rebuild.test.d.ts +0 -2
- package/dist/core/progress/rebuild.test.d.ts.map +0 -1
- package/dist/core/progress/rebuild.test.js +0 -103
- package/dist/core/progress/rebuild.test.js.map +0 -1
- package/dist/core/progress/store.test.d.ts +0 -2
- package/dist/core/progress/store.test.d.ts.map +0 -1
- package/dist/core/progress/store.test.js +0 -108
- package/dist/core/progress/store.test.js.map +0 -1
- package/dist/core/project-discovery.test.d.ts +0 -2
- package/dist/core/project-discovery.test.d.ts.map +0 -1
- package/dist/core/project-discovery.test.js +0 -519
- package/dist/core/project-discovery.test.js.map +0 -1
- package/dist/core/prompt-commands.test.d.ts +0 -2
- package/dist/core/prompt-commands.test.d.ts.map +0 -1
- package/dist/core/prompt-commands.test.js +0 -180
- package/dist/core/prompt-commands.test.js.map +0 -1
- package/dist/core/provider-cache.e2e.test.d.ts +0 -2
- package/dist/core/provider-cache.e2e.test.d.ts.map +0 -1
- package/dist/core/provider-cache.e2e.test.js +0 -125
- package/dist/core/provider-cache.e2e.test.js.map +0 -1
- package/dist/core/radio.test.d.ts +0 -2
- package/dist/core/radio.test.d.ts.map +0 -1
- package/dist/core/radio.test.js +0 -117
- package/dist/core/radio.test.js.map +0 -1
- package/dist/core/regrounding.test.d.ts +0 -2
- package/dist/core/regrounding.test.d.ts.map +0 -1
- package/dist/core/regrounding.test.js +0 -38
- package/dist/core/regrounding.test.js.map +0 -1
- package/dist/core/resolve-start.test.d.ts +0 -2
- package/dist/core/resolve-start.test.d.ts.map +0 -1
- package/dist/core/resolve-start.test.js +0 -68
- package/dist/core/resolve-start.test.js.map +0 -1
- package/dist/core/run-claim.test.d.ts +0 -2
- package/dist/core/run-claim.test.d.ts.map +0 -1
- package/dist/core/run-claim.test.js +0 -107
- package/dist/core/run-claim.test.js.map +0 -1
- package/dist/core/run-journal.test.d.ts +0 -2
- package/dist/core/run-journal.test.d.ts.map +0 -1
- package/dist/core/run-journal.test.js +0 -195
- package/dist/core/run-journal.test.js.map +0 -1
- package/dist/core/run-lifecycle.test.d.ts +0 -2
- package/dist/core/run-lifecycle.test.d.ts.map +0 -1
- package/dist/core/run-lifecycle.test.js +0 -64
- package/dist/core/run-lifecycle.test.js.map +0 -1
- package/dist/core/sandbox-feedback.test.d.ts +0 -2
- package/dist/core/sandbox-feedback.test.d.ts.map +0 -1
- package/dist/core/sandbox-feedback.test.js +0 -32
- package/dist/core/sandbox-feedback.test.js.map +0 -1
- package/dist/core/sandbox.test.d.ts +0 -2
- package/dist/core/sandbox.test.d.ts.map +0 -1
- package/dist/core/sandbox.test.js +0 -288
- package/dist/core/sandbox.test.js.map +0 -1
- package/dist/core/semantic-search-benchmark.test.d.ts +0 -2
- package/dist/core/semantic-search-benchmark.test.d.ts.map +0 -1
- package/dist/core/semantic-search-benchmark.test.js +0 -89
- package/dist/core/semantic-search-benchmark.test.js.map +0 -1
- package/dist/core/session-compaction.test.d.ts +0 -2
- package/dist/core/session-compaction.test.d.ts.map +0 -1
- package/dist/core/session-compaction.test.js +0 -92
- package/dist/core/session-compaction.test.js.map +0 -1
- package/dist/core/session-export.test.d.ts +0 -2
- package/dist/core/session-export.test.d.ts.map +0 -1
- package/dist/core/session-export.test.js +0 -353
- package/dist/core/session-export.test.js.map +0 -1
- package/dist/core/session-history.test.d.ts +0 -2
- package/dist/core/session-history.test.d.ts.map +0 -1
- package/dist/core/session-history.test.js +0 -272
- package/dist/core/session-history.test.js.map +0 -1
- package/dist/core/session-injections.test.d.ts +0 -2
- package/dist/core/session-injections.test.d.ts.map +0 -1
- package/dist/core/session-injections.test.js +0 -117
- package/dist/core/session-injections.test.js.map +0 -1
- package/dist/core/session-manager.test.d.ts +0 -2
- package/dist/core/session-manager.test.d.ts.map +0 -1
- package/dist/core/session-manager.test.js +0 -571
- package/dist/core/session-manager.test.js.map +0 -1
- package/dist/core/session-notification-visibility.test.d.ts +0 -2
- package/dist/core/session-notification-visibility.test.d.ts.map +0 -1
- package/dist/core/session-notification-visibility.test.js +0 -113
- package/dist/core/session-notification-visibility.test.js.map +0 -1
- package/dist/core/session-reconstructability.test.d.ts +0 -2
- package/dist/core/session-reconstructability.test.d.ts.map +0 -1
- package/dist/core/session-reconstructability.test.js +0 -105
- package/dist/core/session-reconstructability.test.js.map +0 -1
- package/dist/core/session-restore-display.test.d.ts +0 -2
- package/dist/core/session-restore-display.test.d.ts.map +0 -1
- package/dist/core/session-restore-display.test.js +0 -103
- package/dist/core/session-restore-display.test.js.map +0 -1
- package/dist/core/session-storage-fd-leak.test.d.ts +0 -2
- package/dist/core/session-storage-fd-leak.test.d.ts.map +0 -1
- package/dist/core/session-storage-fd-leak.test.js +0 -116
- package/dist/core/session-storage-fd-leak.test.js.map +0 -1
- package/dist/core/session-storage.test.d.ts +0 -2
- package/dist/core/session-storage.test.d.ts.map +0 -1
- package/dist/core/session-storage.test.js +0 -277
- package/dist/core/session-storage.test.js.map +0 -1
- package/dist/core/setup-history.test.d.ts +0 -2
- package/dist/core/setup-history.test.d.ts.map +0 -1
- package/dist/core/setup-history.test.js +0 -59
- package/dist/core/setup-history.test.js.map +0 -1
- package/dist/core/shell.test.d.ts +0 -2
- package/dist/core/shell.test.d.ts.map +0 -1
- package/dist/core/shell.test.js +0 -87
- package/dist/core/shell.test.js.map +0 -1
- package/dist/core/shutdown.test.d.ts +0 -2
- package/dist/core/shutdown.test.d.ts.map +0 -1
- package/dist/core/shutdown.test.js +0 -160
- package/dist/core/shutdown.test.js.map +0 -1
- package/dist/core/sidecar-error-reporter.test.d.ts +0 -2
- package/dist/core/sidecar-error-reporter.test.d.ts.map +0 -1
- package/dist/core/sidecar-error-reporter.test.js +0 -61
- package/dist/core/sidecar-error-reporter.test.js.map +0 -1
- package/dist/core/skills-routing.test.d.ts +0 -2
- package/dist/core/skills-routing.test.d.ts.map +0 -1
- package/dist/core/skills-routing.test.js +0 -310
- package/dist/core/skills-routing.test.js.map +0 -1
- package/dist/core/slash-commands.test.d.ts +0 -2
- package/dist/core/slash-commands.test.d.ts.map +0 -1
- package/dist/core/slash-commands.test.js +0 -59
- package/dist/core/slash-commands.test.js.map +0 -1
- package/dist/core/source-maps.test.d.ts +0 -2
- package/dist/core/source-maps.test.d.ts.map +0 -1
- package/dist/core/source-maps.test.js +0 -175
- package/dist/core/source-maps.test.js.map +0 -1
- package/dist/core/speed-benchmark.test.d.ts +0 -2
- package/dist/core/speed-benchmark.test.d.ts.map +0 -1
- package/dist/core/speed-benchmark.test.js +0 -102
- package/dist/core/speed-benchmark.test.js.map +0 -1
- package/dist/core/subagent-manager.test.d.ts +0 -2
- package/dist/core/subagent-manager.test.d.ts.map +0 -1
- package/dist/core/subagent-manager.test.js +0 -536
- package/dist/core/subagent-manager.test.js.map +0 -1
- package/dist/core/subagent-store.test.d.ts +0 -2
- package/dist/core/subagent-store.test.d.ts.map +0 -1
- package/dist/core/subagent-store.test.js +0 -106
- package/dist/core/subagent-store.test.js.map +0 -1
- package/dist/core/subagent-turn-record.test.d.ts +0 -2
- package/dist/core/subagent-turn-record.test.d.ts.map +0 -1
- package/dist/core/subagent-turn-record.test.js +0 -70
- package/dist/core/subagent-turn-record.test.js.map +0 -1
- package/dist/core/verification-evidence.test.d.ts +0 -2
- package/dist/core/verification-evidence.test.d.ts.map +0 -1
- package/dist/core/verification-evidence.test.js +0 -103
- package/dist/core/verification-evidence.test.js.map +0 -1
- package/dist/core/verification-gate.test.d.ts +0 -2
- package/dist/core/verification-gate.test.d.ts.map +0 -1
- package/dist/core/verification-gate.test.js +0 -138
- package/dist/core/verification-gate.test.js.map +0 -1
- package/dist/core/verify-commands.test.d.ts +0 -2
- package/dist/core/verify-commands.test.d.ts.map +0 -1
- package/dist/core/verify-commands.test.js +0 -81
- package/dist/core/verify-commands.test.js.map +0 -1
- package/dist/core/workspace-guard.test.d.ts +0 -2
- package/dist/core/workspace-guard.test.d.ts.map +0 -1
- package/dist/core/workspace-guard.test.js +0 -107
- package/dist/core/workspace-guard.test.js.map +0 -1
- package/dist/hf-pull.test.d.ts +0 -2
- package/dist/hf-pull.test.d.ts.map +0 -1
- package/dist/hf-pull.test.js +0 -112
- package/dist/hf-pull.test.js.map +0 -1
- package/dist/modes/acp-mode.test.d.ts +0 -2
- package/dist/modes/acp-mode.test.d.ts.map +0 -1
- package/dist/modes/acp-mode.test.js +0 -1067
- package/dist/modes/acp-mode.test.js.map +0 -1
- package/dist/modes/json-mode.test.d.ts +0 -2
- package/dist/modes/json-mode.test.d.ts.map +0 -1
- package/dist/modes/json-mode.test.js +0 -84
- package/dist/modes/json-mode.test.js.map +0 -1
- package/dist/modes/subagent-worker-mode.test.d.ts +0 -2
- package/dist/modes/subagent-worker-mode.test.d.ts.map +0 -1
- package/dist/modes/subagent-worker-mode.test.js +0 -52
- package/dist/modes/subagent-worker-mode.test.js.map +0 -1
- package/dist/session.test.d.ts +0 -2
- package/dist/session.test.d.ts.map +0 -1
- package/dist/session.test.js +0 -35
- package/dist/session.test.js.map +0 -1
- package/dist/system-prompt.test.d.ts +0 -2
- package/dist/system-prompt.test.d.ts.map +0 -1
- package/dist/system-prompt.test.js +0 -684
- package/dist/system-prompt.test.js.map +0 -1
- package/dist/system-prompt.tiering.test.d.ts +0 -2
- package/dist/system-prompt.tiering.test.d.ts.map +0 -1
- package/dist/system-prompt.tiering.test.js +0 -112
- package/dist/system-prompt.tiering.test.js.map +0 -1
- package/dist/tools/bash.test.d.ts +0 -2
- package/dist/tools/bash.test.d.ts.map +0 -1
- package/dist/tools/bash.test.js +0 -248
- package/dist/tools/bash.test.js.map +0 -1
- package/dist/tools/checkpoint-hook.test.d.ts +0 -2
- package/dist/tools/checkpoint-hook.test.d.ts.map +0 -1
- package/dist/tools/checkpoint-hook.test.js +0 -65
- package/dist/tools/checkpoint-hook.test.js.map +0 -1
- package/dist/tools/code-nav.test.d.ts +0 -2
- package/dist/tools/code-nav.test.d.ts.map +0 -1
- package/dist/tools/code-nav.test.js +0 -136
- package/dist/tools/code-nav.test.js.map +0 -1
- package/dist/tools/code-skeleton.test.d.ts +0 -2
- package/dist/tools/code-skeleton.test.d.ts.map +0 -1
- package/dist/tools/code-skeleton.test.js +0 -115
- package/dist/tools/code-skeleton.test.js.map +0 -1
- package/dist/tools/compress-integration.test.d.ts +0 -2
- package/dist/tools/compress-integration.test.d.ts.map +0 -1
- package/dist/tools/compress-integration.test.js +0 -59
- package/dist/tools/compress-integration.test.js.map +0 -1
- package/dist/tools/compress.test.d.ts +0 -2
- package/dist/tools/compress.test.d.ts.map +0 -1
- package/dist/tools/compress.test.js +0 -60
- package/dist/tools/compress.test.js.map +0 -1
- package/dist/tools/edit-diff.test.d.ts +0 -2
- package/dist/tools/edit-diff.test.d.ts.map +0 -1
- package/dist/tools/edit-diff.test.js +0 -329
- package/dist/tools/edit-diff.test.js.map +0 -1
- package/dist/tools/edit-robustness.test.d.ts +0 -2
- package/dist/tools/edit-robustness.test.d.ts.map +0 -1
- package/dist/tools/edit-robustness.test.js +0 -417
- package/dist/tools/edit-robustness.test.js.map +0 -1
- package/dist/tools/edit.test.d.ts +0 -2
- package/dist/tools/edit.test.d.ts.map +0 -1
- package/dist/tools/edit.test.js +0 -1037
- package/dist/tools/edit.test.js.map +0 -1
- package/dist/tools/exit-plan.test.d.ts +0 -2
- package/dist/tools/exit-plan.test.d.ts.map +0 -1
- package/dist/tools/exit-plan.test.js +0 -72
- package/dist/tools/exit-plan.test.js.map +0 -1
- package/dist/tools/generate-image.test.d.ts +0 -2
- package/dist/tools/generate-image.test.d.ts.map +0 -1
- package/dist/tools/generate-image.test.js +0 -240
- package/dist/tools/generate-image.test.js.map +0 -1
- package/dist/tools/grep-parity.test.d.ts +0 -2
- package/dist/tools/grep-parity.test.d.ts.map +0 -1
- package/dist/tools/grep-parity.test.js +0 -92
- package/dist/tools/grep-parity.test.js.map +0 -1
- package/dist/tools/grep-recall.test.d.ts +0 -2
- package/dist/tools/grep-recall.test.d.ts.map +0 -1
- package/dist/tools/grep-recall.test.js +0 -114
- package/dist/tools/grep-recall.test.js.map +0 -1
- package/dist/tools/grep-spawn.test.d.ts +0 -2
- package/dist/tools/grep-spawn.test.d.ts.map +0 -1
- package/dist/tools/grep-spawn.test.js +0 -66
- package/dist/tools/grep-spawn.test.js.map +0 -1
- package/dist/tools/grep.test.d.ts +0 -2
- package/dist/tools/grep.test.d.ts.map +0 -1
- package/dist/tools/grep.test.js +0 -82
- package/dist/tools/grep.test.js.map +0 -1
- package/dist/tools/html-extract.test.d.ts +0 -2
- package/dist/tools/html-extract.test.d.ts.map +0 -1
- package/dist/tools/html-extract.test.js +0 -60
- package/dist/tools/html-extract.test.js.map +0 -1
- package/dist/tools/index.test.d.ts +0 -2
- package/dist/tools/index.test.d.ts.map +0 -1
- package/dist/tools/index.test.js +0 -55
- package/dist/tools/index.test.js.map +0 -1
- package/dist/tools/overflow.test.d.ts +0 -2
- package/dist/tools/overflow.test.d.ts.map +0 -1
- package/dist/tools/overflow.test.js +0 -59
- package/dist/tools/overflow.test.js.map +0 -1
- package/dist/tools/path-utils.test.d.ts +0 -2
- package/dist/tools/path-utils.test.d.ts.map +0 -1
- package/dist/tools/path-utils.test.js +0 -110
- package/dist/tools/path-utils.test.js.map +0 -1
- package/dist/tools/pdf-extract.test.d.ts +0 -2
- package/dist/tools/pdf-extract.test.d.ts.map +0 -1
- package/dist/tools/pdf-extract.test.js +0 -15
- package/dist/tools/pdf-extract.test.js.map +0 -1
- package/dist/tools/plan-mode.test.d.ts +0 -2
- package/dist/tools/plan-mode.test.d.ts.map +0 -1
- package/dist/tools/plan-mode.test.js +0 -91
- package/dist/tools/plan-mode.test.js.map +0 -1
- package/dist/tools/read-only-bash.test.d.ts +0 -2
- package/dist/tools/read-only-bash.test.d.ts.map +0 -1
- package/dist/tools/read-only-bash.test.js +0 -96
- package/dist/tools/read-only-bash.test.js.map +0 -1
- package/dist/tools/read.test.d.ts +0 -2
- package/dist/tools/read.test.d.ts.map +0 -1
- package/dist/tools/read.test.js +0 -146
- package/dist/tools/read.test.js.map +0 -1
- package/dist/tools/screenshot.test.d.ts +0 -2
- package/dist/tools/screenshot.test.d.ts.map +0 -1
- package/dist/tools/screenshot.test.js +0 -145
- package/dist/tools/screenshot.test.js.map +0 -1
- package/dist/tools/search-code.test.d.ts +0 -2
- package/dist/tools/search-code.test.d.ts.map +0 -1
- package/dist/tools/search-code.test.js +0 -83
- package/dist/tools/search-code.test.js.map +0 -1
- package/dist/tools/source-path.test.d.ts +0 -2
- package/dist/tools/source-path.test.d.ts.map +0 -1
- package/dist/tools/source-path.test.js +0 -80
- package/dist/tools/source-path.test.js.map +0 -1
- package/dist/tools/subagent-control.test.d.ts +0 -2
- package/dist/tools/subagent-control.test.d.ts.map +0 -1
- package/dist/tools/subagent-control.test.js +0 -73
- package/dist/tools/subagent-control.test.js.map +0 -1
- package/dist/tools/subagent-shared.test.d.ts +0 -2
- package/dist/tools/subagent-shared.test.d.ts.map +0 -1
- package/dist/tools/subagent-shared.test.js +0 -83
- package/dist/tools/subagent-shared.test.js.map +0 -1
- package/dist/tools/subagent.test.d.ts +0 -2
- package/dist/tools/subagent.test.d.ts.map +0 -1
- package/dist/tools/subagent.test.js +0 -180
- package/dist/tools/subagent.test.js.map +0 -1
- package/dist/tools/task-send.test.d.ts +0 -2
- package/dist/tools/task-send.test.d.ts.map +0 -1
- package/dist/tools/task-send.test.js +0 -104
- package/dist/tools/task-send.test.js.map +0 -1
- package/dist/tools/tool-catalog.test.d.ts +0 -2
- package/dist/tools/tool-catalog.test.d.ts.map +0 -1
- package/dist/tools/tool-catalog.test.js +0 -124
- package/dist/tools/tool-catalog.test.js.map +0 -1
- package/dist/tools/tool-search.test.d.ts +0 -2
- package/dist/tools/tool-search.test.d.ts.map +0 -1
- package/dist/tools/tool-search.test.js +0 -127
- package/dist/tools/tool-search.test.js.map +0 -1
- package/dist/tools/tool-tiers.test.d.ts +0 -2
- package/dist/tools/tool-tiers.test.d.ts.map +0 -1
- package/dist/tools/tool-tiers.test.js +0 -48
- package/dist/tools/tool-tiers.test.js.map +0 -1
- package/dist/tools/truncate-utils.test.d.ts +0 -2
- package/dist/tools/truncate-utils.test.d.ts.map +0 -1
- package/dist/tools/truncate-utils.test.js +0 -93
- package/dist/tools/truncate-utils.test.js.map +0 -1
- package/dist/tools/truncate.test.d.ts +0 -2
- package/dist/tools/truncate.test.d.ts.map +0 -1
- package/dist/tools/truncate.test.js +0 -100
- package/dist/tools/truncate.test.js.map +0 -1
- package/dist/tools/web-fetch.test.d.ts +0 -2
- package/dist/tools/web-fetch.test.d.ts.map +0 -1
- package/dist/tools/web-fetch.test.js +0 -692
- package/dist/tools/web-fetch.test.js.map +0 -1
- package/dist/tools/web-search.test.d.ts +0 -2
- package/dist/tools/web-search.test.d.ts.map +0 -1
- package/dist/tools/web-search.test.js +0 -333
- package/dist/tools/web-search.test.js.map +0 -1
- package/dist/tools/write.test.d.ts +0 -2
- package/dist/tools/write.test.d.ts.map +0 -1
- package/dist/tools/write.test.js +0 -176
- package/dist/tools/write.test.js.map +0 -1
- package/dist/ui/anchor-pad-reclaim.test.d.ts +0 -2
- package/dist/ui/anchor-pad-reclaim.test.d.ts.map +0 -1
- package/dist/ui/anchor-pad-reclaim.test.js +0 -146
- package/dist/ui/anchor-pad-reclaim.test.js.map +0 -1
- package/dist/ui/app-items.test.d.ts +0 -2
- package/dist/ui/app-items.test.d.ts.map +0 -1
- package/dist/ui/app-items.test.js +0 -54
- package/dist/ui/app-items.test.js.map +0 -1
- package/dist/ui/app-state-persistence.test.d.ts +0 -2
- package/dist/ui/app-state-persistence.test.d.ts.map +0 -1
- package/dist/ui/app-state-persistence.test.js +0 -71
- package/dist/ui/app-state-persistence.test.js.map +0 -1
- package/dist/ui/assistant-stream-flush-parity.test.d.ts +0 -2
- package/dist/ui/assistant-stream-flush-parity.test.d.ts.map +0 -1
- package/dist/ui/assistant-stream-flush-parity.test.js +0 -85
- package/dist/ui/assistant-stream-flush-parity.test.js.map +0 -1
- package/dist/ui/atomic-flush-regression.test.d.ts +0 -2
- package/dist/ui/atomic-flush-regression.test.d.ts.map +0 -1
- package/dist/ui/atomic-flush-regression.test.js +0 -218
- package/dist/ui/atomic-flush-regression.test.js.map +0 -1
- package/dist/ui/chat-layout-pinning.test.d.ts +0 -2
- package/dist/ui/chat-layout-pinning.test.d.ts.map +0 -1
- package/dist/ui/chat-layout-pinning.test.js +0 -525
- package/dist/ui/chat-layout-pinning.test.js.map +0 -1
- package/dist/ui/components/ActivityIndicator.test.d.ts +0 -2
- package/dist/ui/components/ActivityIndicator.test.d.ts.map +0 -1
- package/dist/ui/components/ActivityIndicator.test.js +0 -40
- package/dist/ui/components/ActivityIndicator.test.js.map +0 -1
- package/dist/ui/components/AssistantMessage.test.d.ts +0 -2
- package/dist/ui/components/AssistantMessage.test.d.ts.map +0 -1
- package/dist/ui/components/AssistantMessage.test.js +0 -418
- package/dist/ui/components/AssistantMessage.test.js.map +0 -1
- package/dist/ui/components/Footer.test.d.ts +0 -2
- package/dist/ui/components/Footer.test.d.ts.map +0 -1
- package/dist/ui/components/Footer.test.js +0 -16
- package/dist/ui/components/Footer.test.js.map +0 -1
- package/dist/ui/components/InputArea.test.d.ts +0 -2
- package/dist/ui/components/InputArea.test.d.ts.map +0 -1
- package/dist/ui/components/InputArea.test.js +0 -95
- package/dist/ui/components/InputArea.test.js.map +0 -1
- package/dist/ui/components/PlanOverlay.test.d.ts +0 -2
- package/dist/ui/components/PlanOverlay.test.d.ts.map +0 -1
- package/dist/ui/components/PlanOverlay.test.js +0 -24
- package/dist/ui/components/PlanOverlay.test.js.map +0 -1
- package/dist/ui/components/StreamingArea.test.d.ts +0 -2
- package/dist/ui/components/StreamingArea.test.d.ts.map +0 -1
- package/dist/ui/components/StreamingArea.test.js +0 -18
- package/dist/ui/components/StreamingArea.test.js.map +0 -1
- package/dist/ui/components/UserMessage.test.d.ts +0 -2
- package/dist/ui/components/UserMessage.test.d.ts.map +0 -1
- package/dist/ui/components/UserMessage.test.js +0 -39
- package/dist/ui/components/UserMessage.test.js.map +0 -1
- package/dist/ui/components/themed-output.test.d.ts +0 -2
- package/dist/ui/components/themed-output.test.d.ts.map +0 -1
- package/dist/ui/components/themed-output.test.js +0 -111
- package/dist/ui/components/themed-output.test.js.map +0 -1
- package/dist/ui/footer-jump-regression.test.d.ts +0 -2
- package/dist/ui/footer-jump-regression.test.d.ts.map +0 -1
- package/dist/ui/footer-jump-regression.test.js +0 -224
- package/dist/ui/footer-jump-regression.test.js.map +0 -1
- package/dist/ui/footer-status-layout.test.d.ts +0 -2
- package/dist/ui/footer-status-layout.test.d.ts.map +0 -1
- package/dist/ui/footer-status-layout.test.js +0 -71
- package/dist/ui/footer-status-layout.test.js.map +0 -1
- package/dist/ui/frame-clip-regression.test.d.ts +0 -2
- package/dist/ui/frame-clip-regression.test.d.ts.map +0 -1
- package/dist/ui/frame-clip-regression.test.js +0 -215
- package/dist/ui/frame-clip-regression.test.js.map +0 -1
- package/dist/ui/hooks/stall-retry-duplicate.test.d.ts +0 -2
- package/dist/ui/hooks/stall-retry-duplicate.test.d.ts.map +0 -1
- package/dist/ui/hooks/stall-retry-duplicate.test.js +0 -94
- package/dist/ui/hooks/stall-retry-duplicate.test.js.map +0 -1
- package/dist/ui/hooks/useAgentLoop.test.d.ts +0 -2
- package/dist/ui/hooks/useAgentLoop.test.d.ts.map +0 -1
- package/dist/ui/hooks/useAgentLoop.test.js +0 -66
- package/dist/ui/hooks/useAgentLoop.test.js.map +0 -1
- package/dist/ui/hooks/useContextCompaction.test.d.ts +0 -2
- package/dist/ui/hooks/useContextCompaction.test.d.ts.map +0 -1
- package/dist/ui/hooks/useContextCompaction.test.js +0 -135
- package/dist/ui/hooks/useContextCompaction.test.js.map +0 -1
- package/dist/ui/hooks/useTranscriptHistory.sessionstore.test.d.ts +0 -2
- package/dist/ui/hooks/useTranscriptHistory.sessionstore.test.d.ts.map +0 -1
- package/dist/ui/hooks/useTranscriptHistory.sessionstore.test.js +0 -81
- package/dist/ui/hooks/useTranscriptHistory.sessionstore.test.js.map +0 -1
- package/dist/ui/hooks/useTranscriptHistory.test.d.ts +0 -2
- package/dist/ui/hooks/useTranscriptHistory.test.d.ts.map +0 -1
- package/dist/ui/hooks/useTranscriptHistory.test.js +0 -61
- package/dist/ui/hooks/useTranscriptHistory.test.js.map +0 -1
- package/dist/ui/hooks/useTranscriptScroll.test.d.ts +0 -2
- package/dist/ui/hooks/useTranscriptScroll.test.d.ts.map +0 -1
- package/dist/ui/hooks/useTranscriptScroll.test.js +0 -119
- package/dist/ui/hooks/useTranscriptScroll.test.js.map +0 -1
- package/dist/ui/live-area-clamp.test.d.ts +0 -2
- package/dist/ui/live-area-clamp.test.d.ts.map +0 -1
- package/dist/ui/live-area-clamp.test.js +0 -125
- package/dist/ui/live-area-clamp.test.js.map +0 -1
- package/dist/ui/live-area-height.test.d.ts +0 -2
- package/dist/ui/live-area-height.test.d.ts.map +0 -1
- package/dist/ui/live-area-height.test.js +0 -76
- package/dist/ui/live-area-height.test.js.map +0 -1
- package/dist/ui/live-frame-height.test.d.ts +0 -2
- package/dist/ui/live-frame-height.test.d.ts.map +0 -1
- package/dist/ui/live-frame-height.test.js +0 -116
- package/dist/ui/live-frame-height.test.js.map +0 -1
- package/dist/ui/live-item-flush.test.d.ts +0 -2
- package/dist/ui/live-item-flush.test.d.ts.map +0 -1
- package/dist/ui/live-item-flush.test.js +0 -437
- package/dist/ui/live-item-flush.test.js.map +0 -1
- package/dist/ui/long-prompt-regression-harness.test.d.ts +0 -2
- package/dist/ui/long-prompt-regression-harness.test.d.ts.map +0 -1
- package/dist/ui/long-prompt-regression-harness.test.js +0 -195
- package/dist/ui/long-prompt-regression-harness.test.js.map +0 -1
- package/dist/ui/plan-overlay.test.d.ts +0 -2
- package/dist/ui/plan-overlay.test.d.ts.map +0 -1
- package/dist/ui/plan-overlay.test.js +0 -305
- package/dist/ui/plan-overlay.test.js.map +0 -1
- package/dist/ui/queued-message.test.d.ts +0 -2
- package/dist/ui/queued-message.test.d.ts.map +0 -1
- package/dist/ui/queued-message.test.js +0 -172
- package/dist/ui/queued-message.test.js.map +0 -1
- package/dist/ui/render.test.d.ts +0 -2
- package/dist/ui/render.test.d.ts.map +0 -1
- package/dist/ui/render.test.js +0 -42
- package/dist/ui/render.test.js.map +0 -1
- package/dist/ui/scroll-stabilization.test.d.ts +0 -2
- package/dist/ui/scroll-stabilization.test.d.ts.map +0 -1
- package/dist/ui/scroll-stabilization.test.js +0 -64
- package/dist/ui/scroll-stabilization.test.js.map +0 -1
- package/dist/ui/slash-command-images.test.d.ts +0 -2
- package/dist/ui/slash-command-images.test.d.ts.map +0 -1
- package/dist/ui/slash-command-images.test.js +0 -110
- package/dist/ui/slash-command-images.test.js.map +0 -1
- package/dist/ui/startup-banner-order.test.d.ts +0 -2
- package/dist/ui/startup-banner-order.test.d.ts.map +0 -1
- package/dist/ui/startup-banner-order.test.js +0 -105
- package/dist/ui/startup-banner-order.test.js.map +0 -1
- package/dist/ui/stores/transcript-scroll-store.test.d.ts +0 -2
- package/dist/ui/stores/transcript-scroll-store.test.d.ts.map +0 -1
- package/dist/ui/stores/transcript-scroll-store.test.js +0 -73
- package/dist/ui/stores/transcript-scroll-store.test.js.map +0 -1
- package/dist/ui/streaming-flush-bounce.test.d.ts +0 -2
- package/dist/ui/streaming-flush-bounce.test.d.ts.map +0 -1
- package/dist/ui/streaming-flush-bounce.test.js +0 -177
- package/dist/ui/streaming-flush-bounce.test.js.map +0 -1
- package/dist/ui/submit-boundary-gap.test.d.ts +0 -2
- package/dist/ui/submit-boundary-gap.test.d.ts.map +0 -1
- package/dist/ui/submit-boundary-gap.test.js +0 -180
- package/dist/ui/submit-boundary-gap.test.js.map +0 -1
- package/dist/ui/terminal-history-repaint.test.d.ts +0 -2
- package/dist/ui/terminal-history-repaint.test.d.ts.map +0 -1
- package/dist/ui/terminal-history-repaint.test.js +0 -73
- package/dist/ui/terminal-history-repaint.test.js.map +0 -1
- package/dist/ui/terminal-history-retry-dedup.test.d.ts +0 -2
- package/dist/ui/terminal-history-retry-dedup.test.d.ts.map +0 -1
- package/dist/ui/terminal-history-retry-dedup.test.js +0 -61
- package/dist/ui/terminal-history-retry-dedup.test.js.map +0 -1
- package/dist/ui/terminal-history.test.d.ts +0 -2
- package/dist/ui/terminal-history.test.d.ts.map +0 -1
- package/dist/ui/terminal-history.test.js +0 -557
- package/dist/ui/terminal-history.test.js.map +0 -1
- package/dist/ui/thinking-level-cycle.test.d.ts +0 -2
- package/dist/ui/thinking-level-cycle.test.d.ts.map +0 -1
- package/dist/ui/thinking-level-cycle.test.js +0 -45
- package/dist/ui/thinking-level-cycle.test.js.map +0 -1
- package/dist/ui/tool-group-summary.test.d.ts +0 -2
- package/dist/ui/tool-group-summary.test.d.ts.map +0 -1
- package/dist/ui/tool-group-summary.test.js +0 -79
- package/dist/ui/tool-group-summary.test.js.map +0 -1
- package/dist/ui/transcript/spacing.test.d.ts +0 -2
- package/dist/ui/transcript/spacing.test.d.ts.map +0 -1
- package/dist/ui/transcript/spacing.test.js +0 -187
- package/dist/ui/transcript/spacing.test.js.map +0 -1
- package/dist/ui/transcript/transcript-lines.test.d.ts +0 -2
- package/dist/ui/transcript/transcript-lines.test.d.ts.map +0 -1
- package/dist/ui/transcript/transcript-lines.test.js +0 -76
- package/dist/ui/transcript/transcript-lines.test.js.map +0 -1
- package/dist/ui/transcript-viewport-pinning.test.d.ts +0 -2
- package/dist/ui/transcript-viewport-pinning.test.d.ts.map +0 -1
- package/dist/ui/transcript-viewport-pinning.test.js +0 -148
- package/dist/ui/transcript-viewport-pinning.test.js.map +0 -1
- package/dist/ui/tui-history-parity.test.d.ts +0 -2
- package/dist/ui/tui-history-parity.test.d.ts.map +0 -1
- package/dist/ui/tui-history-parity.test.js +0 -369
- package/dist/ui/tui-history-parity.test.js.map +0 -1
- package/dist/ui/tui-simulation.test.d.ts +0 -2
- package/dist/ui/tui-simulation.test.d.ts.map +0 -1
- package/dist/ui/tui-simulation.test.js +0 -145
- package/dist/ui/tui-simulation.test.js.map +0 -1
- package/dist/ui/tui-terminal-recorder.test.d.ts +0 -2
- package/dist/ui/tui-terminal-recorder.test.d.ts.map +0 -1
- package/dist/ui/tui-terminal-recorder.test.js +0 -134
- package/dist/ui/tui-terminal-recorder.test.js.map +0 -1
- package/dist/ui/utils/assistant-stream-split.test.d.ts +0 -2
- package/dist/ui/utils/assistant-stream-split.test.d.ts.map +0 -1
- package/dist/ui/utils/assistant-stream-split.test.js +0 -74
- package/dist/ui/utils/assistant-stream-split.test.js.map +0 -1
- package/dist/ui/utils/markdown-renderer.test.d.ts +0 -2
- package/dist/ui/utils/markdown-renderer.test.d.ts.map +0 -1
- package/dist/ui/utils/markdown-renderer.test.js +0 -63
- package/dist/ui/utils/markdown-renderer.test.js.map +0 -1
- package/dist/ui/utils/table-text.test.d.ts +0 -2
- package/dist/ui/utils/table-text.test.d.ts.map +0 -1
- package/dist/ui/utils/table-text.test.js +0 -202
- package/dist/ui/utils/table-text.test.js.map +0 -1
- package/dist/ui/utils/terminal-graphics.test.d.ts +0 -2
- package/dist/ui/utils/terminal-graphics.test.d.ts.map +0 -1
- package/dist/ui/utils/terminal-graphics.test.js +0 -100
- package/dist/ui/utils/terminal-graphics.test.js.map +0 -1
- package/dist/ui/utils/terminal-input.test.d.ts +0 -2
- package/dist/ui/utils/terminal-input.test.d.ts.map +0 -1
- package/dist/ui/utils/terminal-input.test.js +0 -15
- package/dist/ui/utils/terminal-input.test.js.map +0 -1
- package/dist/ui/utils/text-utils.test.d.ts +0 -2
- package/dist/ui/utils/text-utils.test.d.ts.map +0 -1
- package/dist/ui/utils/text-utils.test.js +0 -31
- package/dist/ui/utils/text-utils.test.js.map +0 -1
- package/dist/utils/git.test.d.ts +0 -2
- package/dist/utils/git.test.d.ts.map +0 -1
- package/dist/utils/git.test.js +0 -36
- package/dist/utils/git.test.js.map +0 -1
- package/dist/utils/github.test.d.ts +0 -2
- package/dist/utils/github.test.d.ts.map +0 -1
- package/dist/utils/github.test.js +0 -23
- package/dist/utils/github.test.js.map +0 -1
- package/dist/utils/http-body.test.d.ts +0 -2
- package/dist/utils/http-body.test.d.ts.map +0 -1
- package/dist/utils/http-body.test.js +0 -68
- package/dist/utils/http-body.test.js.map +0 -1
- package/dist/utils/image.test.d.ts +0 -2
- package/dist/utils/image.test.d.ts.map +0 -1
- package/dist/utils/image.test.js +0 -139
- package/dist/utils/image.test.js.map +0 -1
- package/dist/utils/plan-steps.test.d.ts +0 -2
- package/dist/utils/plan-steps.test.d.ts.map +0 -1
- package/dist/utils/plan-steps.test.js +0 -159
- package/dist/utils/plan-steps.test.js.map +0 -1
- package/dist/utils/process.test.d.ts +0 -2
- package/dist/utils/process.test.d.ts.map +0 -1
- package/dist/utils/process.test.js +0 -42
- package/dist/utils/process.test.js.map +0 -1
- package/dist/utils/text.test.d.ts +0 -2
- package/dist/utils/text.test.d.ts.map +0 -1
- package/dist/utils/text.test.js +0 -91
- package/dist/utils/text.test.js.map +0 -1
|
@@ -1,684 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs/promises";
|
|
2
|
-
import os from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { buildSubAgentSystemPrompt, buildSystemPrompt, collectProjectContext, PROJECT_CONTEXT_MAX_BYTES, } from "./system-prompt.js";
|
|
6
|
-
import { buildKenSystemPrompt } from "./core/ken-prompt.js";
|
|
7
|
-
import { resolveContextLimits } from "./core/context-limits.js";
|
|
8
|
-
const tempDirs = [];
|
|
9
|
-
async function makeProject(files = {}) {
|
|
10
|
-
const cwd = await fs.mkdtemp(path.join(os.tmpdir(), "ggcoder-system-prompt-"));
|
|
11
|
-
tempDirs.push(cwd);
|
|
12
|
-
for (const [relativePath, content] of Object.entries(files)) {
|
|
13
|
-
const filePath = path.join(cwd, relativePath);
|
|
14
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
15
|
-
await fs.writeFile(filePath, content, "utf-8");
|
|
16
|
-
}
|
|
17
|
-
return cwd;
|
|
18
|
-
}
|
|
19
|
-
function sectionIndex(prompt, heading) {
|
|
20
|
-
const index = prompt.indexOf(heading);
|
|
21
|
-
expect(index, `${heading} should exist`).toBeGreaterThanOrEqual(0);
|
|
22
|
-
return index;
|
|
23
|
-
}
|
|
24
|
-
function toolsSection(prompt) {
|
|
25
|
-
const start = sectionIndex(prompt, "## Tools");
|
|
26
|
-
const rest = prompt.slice(start);
|
|
27
|
-
const next = rest.indexOf("\n\n## ", "## Tools".length);
|
|
28
|
-
return next === -1 ? rest : rest.slice(0, next);
|
|
29
|
-
}
|
|
30
|
-
function promptSize(prompt) {
|
|
31
|
-
return {
|
|
32
|
-
characters: prompt.length,
|
|
33
|
-
lines: prompt.split("\n").length,
|
|
34
|
-
sections: prompt.match(/^## /gm)?.length ?? 0,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function promptAudit(prompt) {
|
|
38
|
-
const flags = [];
|
|
39
|
-
const obsoleteOrContradictory = [
|
|
40
|
-
"what observable artifact would prove the requested outcome worked end-to-end",
|
|
41
|
-
"the simplest reliable local/free proof path",
|
|
42
|
-
"generic tests, scripts, screenshots, benchmarks, or simulations; use them by default",
|
|
43
|
-
"After meaningful edits, run the relevant verification commands below",
|
|
44
|
-
"Run relevant checks after edits",
|
|
45
|
-
"Run only targeted verification needed for the change",
|
|
46
|
-
"Run targeted verification that is appropriate to the change before calling work complete",
|
|
47
|
-
"plan multi-file work first",
|
|
48
|
-
"otherwise follow through and verify",
|
|
49
|
-
];
|
|
50
|
-
for (const phrase of obsoleteOrContradictory) {
|
|
51
|
-
if (prompt.includes(phrase))
|
|
52
|
-
flags.push(`obsolete/contradictory guidance: ${phrase}`);
|
|
53
|
-
}
|
|
54
|
-
const repeatedSentences = new Map();
|
|
55
|
-
for (const sentence of prompt
|
|
56
|
-
.replace(/\s+/g, " ")
|
|
57
|
-
.split(/(?<=[.!?])\s+/)
|
|
58
|
-
.map((item) => item.trim())
|
|
59
|
-
.filter((item) => item.length >= 80)) {
|
|
60
|
-
repeatedSentences.set(sentence, (repeatedSentences.get(sentence) ?? 0) + 1);
|
|
61
|
-
}
|
|
62
|
-
for (const [sentence, count] of repeatedSentences) {
|
|
63
|
-
if (count > 1)
|
|
64
|
-
flags.push(`duplicate sentence x${count}: ${sentence}`);
|
|
65
|
-
}
|
|
66
|
-
return { size: promptSize(prompt), flags };
|
|
67
|
-
}
|
|
68
|
-
afterEach(async () => {
|
|
69
|
-
await Promise.all(tempDirs.splice(0).map((dir) => fs.rm(dir, { recursive: true, force: true })));
|
|
70
|
-
});
|
|
71
|
-
describe("buildSystemPrompt", () => {
|
|
72
|
-
it("renders deterministic section order and keeps only the volatile date after the marker", async () => {
|
|
73
|
-
const cwd = await makeProject({
|
|
74
|
-
"CLAUDE.md": "Project rules win.",
|
|
75
|
-
"package.json": JSON.stringify({ scripts: { check: "tsc --noEmit" } }),
|
|
76
|
-
"tsconfig.json": "{}",
|
|
77
|
-
});
|
|
78
|
-
const prompt = await buildSystemPrompt(cwd, [{ name: "find-skills", description: "Find skills.", content: "", source: "test" }], false, undefined, ["read", "edit", "web_search", "skill"], new Set(["typescript"]));
|
|
79
|
-
expect(prompt.startsWith("You are GG Coder by Ken Kai")).toBe(true);
|
|
80
|
-
expect(sectionIndex(prompt, "## How to Talk")).toBeLessThan(sectionIndex(prompt, "## How to Work"));
|
|
81
|
-
expect(sectionIndex(prompt, "## How to Work")).toBeLessThan(sectionIndex(prompt, "## Research & Verification"));
|
|
82
|
-
expect(sectionIndex(prompt, "## Research & Verification")).toBeLessThan(sectionIndex(prompt, "## Code Quality"));
|
|
83
|
-
expect(prompt).toContain("Woops I just farted!");
|
|
84
|
-
expect(prompt).toContain("never repeat, never force, never explain");
|
|
85
|
-
// The one-approach rule must carve out command flows that ship their own
|
|
86
|
-
// A/B/C option list, or the model second-guesses those prompts.
|
|
87
|
-
expect(prompt).toContain("ONE recommended approach — default to X, switch to Y only when [condition] — not a menu, unless a command's flow defines its own options.");
|
|
88
|
-
// The user-facing ask gets a dedicated markdown blockquote (rendered with a
|
|
89
|
-
// left gutter in both the TUI and GG App), and nothing else may use one, so
|
|
90
|
-
// a `>` in a reply always means "the agent is waiting on you".
|
|
91
|
-
expect(prompt).toContain("**Blockquote = the ask.**");
|
|
92
|
-
expect(prompt).toContain("Blockquote nothing else");
|
|
93
|
-
expect(prompt).not.toContain("Do not default to generic tests, scripts, screenshots, benchmarks, or simulations");
|
|
94
|
-
// The ladder's value is the *order* and the stop-at-first-hit rule, not the
|
|
95
|
-
// individual rungs — "reuse what this repo already has" ranking above
|
|
96
|
-
// stdlib, and both above reaching for a dependency, is what stops the model
|
|
97
|
-
// rewriting a helper that already exists. The character budgets in the size
|
|
98
|
-
// test are upper bounds only — deleting the ladder shrinks the prompt and
|
|
99
|
-
// passes every one of them, so these assertions are what hold it in place.
|
|
100
|
-
expect(prompt).toContain("stop at the first rung that holds");
|
|
101
|
-
expect(prompt).toContain("Already in this codebase? Reuse the helper, util, or pattern");
|
|
102
|
-
// "Shortest working diff wins" is only safe while the counterweight below it
|
|
103
|
-
// survives; without the fence, minimization reads as licence to skip
|
|
104
|
-
// validation and error handling.
|
|
105
|
-
expect(prompt).toContain("Never lazy about: input validation at trust boundaries");
|
|
106
|
-
expect(prompt.indexOf("Shortest working diff wins")).toBeLessThan(prompt.indexOf("Write the safe version first"));
|
|
107
|
-
// Security has to be a default of normal feature work, not a mode the user
|
|
108
|
-
// has to know to ask for: nearly nobody runs a review, and the safe version
|
|
109
|
-
// costs nothing when written the first time.
|
|
110
|
-
expect(prompt).toContain("Write the safe version first, without being asked");
|
|
111
|
-
expect(prompt).toContain("repo contents, fetched pages, model and tool output");
|
|
112
|
-
expect(prompt).toContain("Never commit or log a secret");
|
|
113
|
-
// Models invent package names at a measurable rate and squatters register
|
|
114
|
-
// them, so "it resolved" is not evidence the dependency is the real one.
|
|
115
|
-
expect(prompt).toContain("Confirm a dependency actually exists");
|
|
116
|
-
// Silently deleting a control to make something pass is the most damaging
|
|
117
|
-
// thing an agent can do unsupervised.
|
|
118
|
-
expect(prompt).toContain("Never silently weaken a security control");
|
|
119
|
-
expect(sectionIndex(prompt, "## Code Quality")).toBeLessThan(sectionIndex(prompt, "## Tools"));
|
|
120
|
-
expect(sectionIndex(prompt, "## Tools")).toBeLessThan(sectionIndex(prompt, "## Project Context"));
|
|
121
|
-
expect(sectionIndex(prompt, "## Project Context")).toBeLessThan(sectionIndex(prompt, "## Language Style Packs"));
|
|
122
|
-
expect(sectionIndex(prompt, "## Language Style Packs")).toBeLessThan(sectionIndex(prompt, "## Verification"));
|
|
123
|
-
expect(sectionIndex(prompt, "## Verification")).toBeLessThan(sectionIndex(prompt, "## Skills"));
|
|
124
|
-
expect(sectionIndex(prompt, "## Skills")).toBeLessThan(sectionIndex(prompt, "## Environment"));
|
|
125
|
-
const marker = "<!-- uncached -->";
|
|
126
|
-
expect(prompt.match(new RegExp(marker, "g"))).toHaveLength(1);
|
|
127
|
-
const afterMarker = prompt.slice(prompt.indexOf(marker) + marker.length).trim();
|
|
128
|
-
expect(afterMarker).toMatch(/^Today's date: \d{1,2} [A-Za-z]+ \d{4}$/);
|
|
129
|
-
});
|
|
130
|
-
it("lists exactly available known tools", async () => {
|
|
131
|
-
const cwd = await makeProject();
|
|
132
|
-
const prompt = await buildSystemPrompt(cwd, undefined, false, undefined, [
|
|
133
|
-
"read",
|
|
134
|
-
"write",
|
|
135
|
-
"edit",
|
|
136
|
-
"web_search",
|
|
137
|
-
"not_a_tool",
|
|
138
|
-
]);
|
|
139
|
-
const renderedTools = toolsSection(prompt);
|
|
140
|
-
// Core file tools (read/write/edit) no longer carry a per-tool hint — they
|
|
141
|
-
// rely on their schema description plus the cross-tool steering line (which
|
|
142
|
-
// renders here because edit + write are both active). Tools with non-obvious
|
|
143
|
-
// usage (web_search) still render a hint. Unknown tools never do.
|
|
144
|
-
expect(renderedTools).toContain("Prefer `edit` over `write`");
|
|
145
|
-
expect(renderedTools).toContain("**web_search**");
|
|
146
|
-
expect(renderedTools).not.toContain("not_a_tool");
|
|
147
|
-
expect(renderedTools).not.toContain("**read**");
|
|
148
|
-
expect(renderedTools).not.toContain("**edit**");
|
|
149
|
-
});
|
|
150
|
-
it("keeps the reply-shape rules free of contradictions", async () => {
|
|
151
|
-
const cwd = await makeProject();
|
|
152
|
-
const prompt = await buildSystemPrompt(cwd, undefined, false, undefined, ["read", "edit"]);
|
|
153
|
-
const talk = prompt.slice(sectionIndex(prompt, "## How to Talk"), sectionIndex(prompt, "## How to Work"));
|
|
154
|
-
// "never ask permission" and "end with the ask" only coexist if the ask is
|
|
155
|
-
// gated by one stop list. How to Work owns it; How to Talk must defer to it
|
|
156
|
-
// instead of publishing a second, drifting list of reasons to stop.
|
|
157
|
-
expect(talk).toContain("When something in How to Work genuinely stops you");
|
|
158
|
-
expect(prompt).toContain("Stop only for user decisions, secrets/access, cost");
|
|
159
|
-
// The blockquote is the ask and only the ask, so exactly one blockquote
|
|
160
|
-
// template may exist anywhere in the prompt — a second one teaches the model
|
|
161
|
-
// that `>` is general formatting and the "you're up" signal dies.
|
|
162
|
-
expect(prompt.match(/^\s*`?> /gm) ?? []).toHaveLength(0);
|
|
163
|
-
expect(prompt.match(/`> \*\*/g) ?? []).toHaveLength(1);
|
|
164
|
-
// The budget is the whole reply or it is nothing. Every earlier version
|
|
165
|
-
// carved out the parts that actually carried the bloat (step lists, the
|
|
166
|
-
// ask, batched question lists), so a 900-word reply satisfied every rule.
|
|
167
|
-
// These assertions keep the cap total and the escape hatches deleted.
|
|
168
|
-
expect(talk).toContain("Prose, lists, headers, the ask — everything counts, nothing is exempt");
|
|
169
|
-
expect(talk).toContain("still inside the budget");
|
|
170
|
-
expect(talk).not.toContain("prose only; a step list or the ask doesn't count");
|
|
171
|
-
expect(talk).not.toContain("exempt from the reply and list caps");
|
|
172
|
-
expect(talk).not.toContain("Question lists are payload");
|
|
173
|
-
// "exempt" survives in exactly one place: the line that denies exemptions.
|
|
174
|
-
expect(talk.match(/exempt/g) ?? []).toHaveLength(1);
|
|
175
|
-
// Cutting How to Talk was the point: it competes with the task for the
|
|
176
|
-
// model's attention, so the meta-instructions stay smaller than the reply
|
|
177
|
-
// budget they enforce is generous.
|
|
178
|
-
expect(talk.split(/\s+/).filter(Boolean).length).toBeLessThan(360);
|
|
179
|
-
// Mid-turn speech and the cut rule must agree: a bare "finding" cannot both
|
|
180
|
-
// trigger a message and be cut for not changing the next move.
|
|
181
|
-
expect(talk).toContain("speak only when the plan changes");
|
|
182
|
-
expect(talk).not.toContain("unless you hit a decision, tradeoff, finding");
|
|
183
|
-
});
|
|
184
|
-
it("states rule precedence exactly once and keeps project context before style packs", async () => {
|
|
185
|
-
const cwd = await makeProject({
|
|
186
|
-
"AGENTS.md": "Use tabs for this fixture.",
|
|
187
|
-
"tsconfig.json": "{}",
|
|
188
|
-
});
|
|
189
|
-
const prompt = await buildSystemPrompt(cwd, undefined, false, undefined, ["read"], new Set(["typescript"]));
|
|
190
|
-
// Precedence lives in How to Work only — not restated in Project Context or Style Packs.
|
|
191
|
-
expect(prompt).toContain("Rule precedence: project context files");
|
|
192
|
-
expect(prompt.match(/Rule precedence/g)).toHaveLength(1);
|
|
193
|
-
expect(prompt).not.toContain("**Highest precedence**");
|
|
194
|
-
expect(prompt).not.toContain("override default guidance");
|
|
195
|
-
expect(prompt).not.toContain("override these defaults");
|
|
196
|
-
expect(sectionIndex(prompt, "## Project Context")).toBeLessThan(sectionIndex(prompt, "## Language Style Packs"));
|
|
197
|
-
});
|
|
198
|
-
it("renders normal mode as direct coding mode", async () => {
|
|
199
|
-
const cwd = await makeProject();
|
|
200
|
-
const prompt = await buildSystemPrompt(cwd, undefined, false, undefined, [
|
|
201
|
-
"read",
|
|
202
|
-
"edit",
|
|
203
|
-
"write",
|
|
204
|
-
"bash",
|
|
205
|
-
"subagent",
|
|
206
|
-
]);
|
|
207
|
-
expect(prompt).toContain("works directly in the user's codebase");
|
|
208
|
-
expect(prompt).toContain("completing tasks end-to-end");
|
|
209
|
-
});
|
|
210
|
-
it("preserves critical operating rules concisely", async () => {
|
|
211
|
-
const cwd = await makeProject({ "AGENTS.md": "Project rules win." });
|
|
212
|
-
const prompt = await buildSystemPrompt(cwd, undefined, true, undefined, [
|
|
213
|
-
"read",
|
|
214
|
-
"edit",
|
|
215
|
-
"write",
|
|
216
|
-
"bash",
|
|
217
|
-
"web_search",
|
|
218
|
-
"web_fetch",
|
|
219
|
-
"source_path",
|
|
220
|
-
"mcp__kencode-search__referenceSources",
|
|
221
|
-
"mcp__kencode-search__discoverRepos",
|
|
222
|
-
"mcp__kencode-search__searchCode",
|
|
223
|
-
]);
|
|
224
|
-
for (const required of [
|
|
225
|
-
"works directly in the user's codebase",
|
|
226
|
-
"completing tasks end-to-end",
|
|
227
|
-
"**Budget: ~120 words, whole reply.**",
|
|
228
|
-
"everything counts, nothing is exempt",
|
|
229
|
-
"**One line per item, ≤15 words, max 5 items.**",
|
|
230
|
-
"Take every safe, reversible step the goal implies",
|
|
231
|
-
"never ask permission, merely suggest it, or leave it for the user",
|
|
232
|
-
"ONE action that unblocks you",
|
|
233
|
-
"what already works so finished work is never buried",
|
|
234
|
-
"conclusion, not investigation",
|
|
235
|
-
// Jargon is opt-in, not default: an identifier only earns a mention when
|
|
236
|
-
// the user has to act on it, and then it carries its stake in the same
|
|
237
|
-
// breath. Everything else is described by behavior, not by name.
|
|
238
|
-
"**Plain words by default.**",
|
|
239
|
-
"only when the user must act on it",
|
|
240
|
-
"say what it does, not what it's called",
|
|
241
|
-
"Read before `edit`/`write`",
|
|
242
|
-
"re-read after formatters",
|
|
243
|
-
"Compute in bash; write with `edit`/`write`",
|
|
244
|
-
"Match neighbors",
|
|
245
|
-
"When none exist, infer from the task and project",
|
|
246
|
-
"ask only when a missing product or taste decision would materially change the result",
|
|
247
|
-
"Keep edits small",
|
|
248
|
-
"plan only complex/risky multi-file work",
|
|
249
|
-
"Stop only for user decisions, secrets/access, cost",
|
|
250
|
-
"otherwise continue through completion",
|
|
251
|
-
"Preserve user work",
|
|
252
|
-
"Rule precedence: project context files",
|
|
253
|
-
"file/module patterns → applicable skill instructions",
|
|
254
|
-
"Your training data has a cutoff",
|
|
255
|
-
"treat it as a stale hint to verify, never as ground truth",
|
|
256
|
-
"Do not rely on memory for APIs",
|
|
257
|
-
"Use `source_path`",
|
|
258
|
-
"web_search` then `web_fetch",
|
|
259
|
-
"mcp__kencode-search__searchCode",
|
|
260
|
-
"Build from real samples, not assumptions",
|
|
261
|
-
"curated, categorized reference repos",
|
|
262
|
-
"Search GitHub repos live",
|
|
263
|
-
"literal text or RE2 regex; NOT semantic",
|
|
264
|
-
"Skip checks after simple edits",
|
|
265
|
-
"At coherent checkpoints or after risky/non-obvious changes",
|
|
266
|
-
"run one targeted check",
|
|
267
|
-
// Guardrails added in the 2026-08 prompt audit (P1/P2):
|
|
268
|
-
"A question is not a fix request",
|
|
269
|
-
"only when the user explicitly asks — never update git config or force-push",
|
|
270
|
-
"Never revert or reset changes you did not make",
|
|
271
|
-
"reproduce it first",
|
|
272
|
-
"If the same fix fails three times, stop retrying",
|
|
273
|
-
"Never make a failing check pass by weakening it",
|
|
274
|
-
"never fork them into variants",
|
|
275
|
-
"exercise real code paths rather than mocks",
|
|
276
|
-
// Facts-vs-decisions + batched questions (alignment guardrails):
|
|
277
|
-
// asking is sanctioned for decisions only, and asking well means one
|
|
278
|
-
// batched, recommendation-annotated list instead of an interrogation drip.
|
|
279
|
-
"only decisions (taste, product calls, real tradeoffs) reach the user",
|
|
280
|
-
"one numbered list, every open question",
|
|
281
|
-
]) {
|
|
282
|
-
expect(prompt).toContain(required);
|
|
283
|
-
}
|
|
284
|
-
expect(prompt).not.toContain("doable in under 2 minutes");
|
|
285
|
-
expect(prompt).not.toContain("Estimate time only when");
|
|
286
|
-
expect(prompt).not.toContain("plan multi-file work first");
|
|
287
|
-
expect(prompt).not.toContain("otherwise follow through and verify");
|
|
288
|
-
expect(prompt).not.toContain("Run only targeted verification needed for the change");
|
|
289
|
-
});
|
|
290
|
-
it("keeps kencode guidance concise while separating repo discovery from exact search", async () => {
|
|
291
|
-
const cwd = await makeProject();
|
|
292
|
-
const prompt = await buildSystemPrompt(cwd, undefined, false, undefined, [
|
|
293
|
-
"mcp__kencode-search__referenceSources",
|
|
294
|
-
"mcp__kencode-search__discoverRepos",
|
|
295
|
-
"mcp__kencode-search__searchCode",
|
|
296
|
-
]);
|
|
297
|
-
const tools = toolsSection(prompt);
|
|
298
|
-
expect(tools).toContain("curated, categorized reference repos");
|
|
299
|
-
expect(tools).toContain("Search GitHub repos live");
|
|
300
|
-
expect(tools).toContain("returns metadata, not snippets");
|
|
301
|
-
expect(tools).toContain("literal text or RE2 regex");
|
|
302
|
-
expect(tools).toContain("NOT semantic");
|
|
303
|
-
expect(tools).toContain("path` is a literal file-path substring");
|
|
304
|
-
expect(tools).not.toContain("zero hits, every time");
|
|
305
|
-
expect(tools.length).toBeLessThan(950);
|
|
306
|
-
});
|
|
307
|
-
it("routes public-code research guidance through tool_search when MCP tools are deferred", async () => {
|
|
308
|
-
const cwd = await makeProject();
|
|
309
|
-
// Deferred MCP loading: kencode tools live in the catalog, tool_search is active.
|
|
310
|
-
const deferred = await buildSystemPrompt(cwd, undefined, false, undefined, [
|
|
311
|
-
"read",
|
|
312
|
-
"bash",
|
|
313
|
-
"tool_search",
|
|
314
|
-
]);
|
|
315
|
-
// Research section must not name tools the model can't call yet…
|
|
316
|
-
expect(deferred).not.toContain("kencode-search tools");
|
|
317
|
-
expect(deferred).not.toContain("ReferenceSources");
|
|
318
|
-
// …and must point discovery at tool_search instead (research + tools hint).
|
|
319
|
-
expect(deferred).toContain("call `tool_search` first");
|
|
320
|
-
expect(deferred).toContain("Check the catalog BEFORE concluding");
|
|
321
|
-
// Neither kencode nor tool_search active: the public-code sentence is omitted.
|
|
322
|
-
const bare = await buildSystemPrompt(cwd, undefined, false, undefined, ["read", "bash"]);
|
|
323
|
-
expect(bare).not.toContain("kencode-search tools");
|
|
324
|
-
expect(bare).not.toContain("tool_search");
|
|
325
|
-
});
|
|
326
|
-
it("measures representative system prompt sizes", async () => {
|
|
327
|
-
const normalCwd = await makeProject();
|
|
328
|
-
const normalToolNames = [
|
|
329
|
-
"read",
|
|
330
|
-
"grep",
|
|
331
|
-
"find",
|
|
332
|
-
"ls",
|
|
333
|
-
"web_search",
|
|
334
|
-
"web_fetch",
|
|
335
|
-
"source_path",
|
|
336
|
-
"mcp__kencode-search__referenceSources",
|
|
337
|
-
"mcp__kencode-search__discoverRepos",
|
|
338
|
-
"mcp__kencode-search__searchCode",
|
|
339
|
-
];
|
|
340
|
-
const normalPrompt = await buildSystemPrompt(normalCwd, undefined, false, undefined, normalToolNames);
|
|
341
|
-
const planModePrompt = await buildSystemPrompt(normalCwd, undefined, true, undefined, normalToolNames);
|
|
342
|
-
const typescriptCwd = await makeProject({
|
|
343
|
-
"AGENTS.md": "Prefer strict TypeScript. Run the focused test before reporting completion.",
|
|
344
|
-
"package.json": JSON.stringify({
|
|
345
|
-
scripts: {
|
|
346
|
-
test: "vitest",
|
|
347
|
-
typecheck: "tsc --noEmit",
|
|
348
|
-
},
|
|
349
|
-
devDependencies: {
|
|
350
|
-
typescript: "^5.0.0",
|
|
351
|
-
vitest: "^3.0.0",
|
|
352
|
-
},
|
|
353
|
-
}),
|
|
354
|
-
"tsconfig.json": JSON.stringify({ compilerOptions: { strict: true } }),
|
|
355
|
-
});
|
|
356
|
-
const typescriptPrompt = await buildSystemPrompt(typescriptCwd, [
|
|
357
|
-
{
|
|
358
|
-
name: "find-skills",
|
|
359
|
-
description: "Find and install agent skills from the open ecosystem.",
|
|
360
|
-
content: "Use this when the user asks whether a skill exists for a task.",
|
|
361
|
-
source: "test-fixture",
|
|
362
|
-
},
|
|
363
|
-
], false, undefined, [
|
|
364
|
-
"read",
|
|
365
|
-
"edit",
|
|
366
|
-
"bash",
|
|
367
|
-
"grep",
|
|
368
|
-
"find",
|
|
369
|
-
"ls",
|
|
370
|
-
"web_search",
|
|
371
|
-
"web_fetch",
|
|
372
|
-
"source_path",
|
|
373
|
-
"skill",
|
|
374
|
-
"mcp__kencode-search__referenceSources",
|
|
375
|
-
"mcp__kencode-search__discoverRepos",
|
|
376
|
-
"mcp__kencode-search__searchCode",
|
|
377
|
-
], new Set(["typescript"]));
|
|
378
|
-
const measurements = {
|
|
379
|
-
normal: promptSize(normalPrompt),
|
|
380
|
-
planMode: promptSize(planModePrompt),
|
|
381
|
-
typescriptProjectContextToolsSkills: promptSize(typescriptPrompt),
|
|
382
|
-
};
|
|
383
|
-
console.info(`system prompt size measurements: ${JSON.stringify(measurements)}`);
|
|
384
|
-
// Budget raised once for the "How to Talk" reply-shape rules (blockquote
|
|
385
|
-
// ask, cut-what-they-can't-act-on, jargon stakes); overlapping lines were
|
|
386
|
-
// folded to pay for part of it. ~640 chars of cached prefix buys replies the
|
|
387
|
-
// user can act on without re-reading.
|
|
388
|
-
//
|
|
389
|
-
// Raised again (~490 chars) for the always-on security defaults in Code
|
|
390
|
-
// Quality. The `bulletproof` skill only fires when the model routes to it,
|
|
391
|
-
// and almost no user asks for a security review before shipping — so the
|
|
392
|
-
// controls that must hold on every edit (hostile input, parameterized
|
|
393
|
-
// queries, secrets, dependency existence, never weakening a control) have
|
|
394
|
-
// to live in the prefix instead. Keep these caps tight so drift stays
|
|
395
|
-
// deliberate.
|
|
396
|
-
//
|
|
397
|
-
// Raised again (~1.6k chars) for the Code Quality minimization ladder.
|
|
398
|
-
// This spend is the rare one that pays for itself inside the same budget:
|
|
399
|
-
// A/B benchmarked at 5 iterations per cell with every generated artifact
|
|
400
|
-
// executed against functional tests, the ladder held correctness flat
|
|
401
|
-
// (100% exec pass, no new dependencies, no turn-cap hits) while cutting
|
|
402
|
-
// generated code 50–76% and output tokens 21–38%. Input tokens fell too,
|
|
403
|
-
// despite the longer prefix: stopping at the first rung that holds costs
|
|
404
|
-
// fewer turns than re-deriving an over-built solution.
|
|
405
|
-
// Raised with the 2026-08 guardrail additions (git safety, anti-fake-green,
|
|
406
|
-
// reproduce-first, circuit-breaker, question-vs-fix, no-variants, test
|
|
407
|
-
// guidance) — each line field-verified as load-bearing across Tier-1 agents.
|
|
408
|
-
// Raised once more for the explicit kencode-search staple sentence in
|
|
409
|
-
// Research (names the MCP tools + build-from-samples philosophy).
|
|
410
|
-
// Raised for the alignment guardrails (facts-vs-decisions sorting,
|
|
411
|
-
// batched questions with recommended answers) — misalignment is the most
|
|
412
|
-
// common failure mode, and these two lines are the always-on floor the
|
|
413
|
-
// `clarify` skill then deepens on demand.
|
|
414
|
-
expect(measurements.normal.characters).toBeLessThan(9_600);
|
|
415
|
-
expect(measurements.planMode.characters).toBeLessThan(10_800);
|
|
416
|
-
expect(measurements.typescriptProjectContextToolsSkills.characters).toBeLessThan(14_000);
|
|
417
|
-
expect(measurements.planMode.characters).toBeGreaterThan(measurements.normal.characters);
|
|
418
|
-
expect(measurements.typescriptProjectContextToolsSkills.characters).toBeGreaterThan(measurements.normal.characters);
|
|
419
|
-
});
|
|
420
|
-
it("audits representative prompts for obsolete, duplicate, or contradictory guidance", async () => {
|
|
421
|
-
const cwd = await makeProject({
|
|
422
|
-
"AGENTS.md": "Prefer project-specific rules.",
|
|
423
|
-
"package.json": JSON.stringify({ scripts: { test: "vitest" } }),
|
|
424
|
-
"tsconfig.json": "{}",
|
|
425
|
-
});
|
|
426
|
-
const prompt = await buildSystemPrompt(cwd, [{ name: "find-skills", description: "Find skills.", content: "", source: "test" }], false, undefined, [
|
|
427
|
-
"read",
|
|
428
|
-
"edit",
|
|
429
|
-
"write",
|
|
430
|
-
"bash",
|
|
431
|
-
"web_search",
|
|
432
|
-
"web_fetch",
|
|
433
|
-
"source_path",
|
|
434
|
-
"skill",
|
|
435
|
-
"mcp__kencode-search__referenceSources",
|
|
436
|
-
"mcp__kencode-search__discoverRepos",
|
|
437
|
-
"mcp__kencode-search__searchCode",
|
|
438
|
-
], new Set(["typescript"]));
|
|
439
|
-
const audit = promptAudit(prompt);
|
|
440
|
-
console.info(`system prompt audit: ${JSON.stringify(audit)}`);
|
|
441
|
-
expect(audit.flags).toEqual([]);
|
|
442
|
-
// Raised with the Code Quality minimization ladder — see the size-budget
|
|
443
|
-
// test above for the measured return that justifies the spend.
|
|
444
|
-
// Raised again with the 2026-08 guardrail additions (see size-budget test).
|
|
445
|
-
// And again for the kencode-search staple sentence in Research.
|
|
446
|
-
// And again for the alignment guardrails (see size-budget test).
|
|
447
|
-
expect(audit.size.characters).toBeLessThan(13_700);
|
|
448
|
-
expect(audit.size.sections).toBeGreaterThanOrEqual(8);
|
|
449
|
-
});
|
|
450
|
-
it("only references web_search in Research when it is an active tool", async () => {
|
|
451
|
-
const cwd = await makeProject();
|
|
452
|
-
// Anthropic-shaped tool set: no client-side web_search tool, but native
|
|
453
|
-
// server-side search really exists — the prompt may claim it.
|
|
454
|
-
const anthropicNoSearch = await buildSystemPrompt(cwd, undefined, false, undefined, ["read", "bash", "web_fetch"], undefined, "anthropic");
|
|
455
|
-
expect(anthropicNoSearch).not.toContain("web_search");
|
|
456
|
-
expect(anthropicNoSearch).toContain("use `web_fetch` for authoritative docs (native web search is available)");
|
|
457
|
-
// Non-Anthropic provider without the web_search tool: no native-search
|
|
458
|
-
// capability exists, so the prompt must not claim one.
|
|
459
|
-
const otherNoSearch = await buildSystemPrompt(cwd, undefined, false, undefined, ["read", "bash", "web_fetch"], undefined, "openai");
|
|
460
|
-
expect(otherNoSearch).not.toContain("web_search");
|
|
461
|
-
expect(otherNoSearch).not.toContain("native web search is available");
|
|
462
|
-
expect(otherNoSearch).toContain("use `web_fetch` for authoritative docs");
|
|
463
|
-
const withSearch = await buildSystemPrompt(cwd, undefined, false, undefined, [
|
|
464
|
-
"read",
|
|
465
|
-
"bash",
|
|
466
|
-
"web_search",
|
|
467
|
-
"web_fetch",
|
|
468
|
-
]);
|
|
469
|
-
expect(withSearch).toContain("use `web_search` then `web_fetch` for authoritative docs");
|
|
470
|
-
});
|
|
471
|
-
it("reports the resolved shell in the Environment section", async () => {
|
|
472
|
-
const cwd = await makeProject();
|
|
473
|
-
const prompt = await buildSystemPrompt(cwd, undefined, false, undefined, ["read"]);
|
|
474
|
-
// Non-Windows hosts (and Windows with Git Bash) run POSIX bash.
|
|
475
|
-
expect(prompt).toContain("- Shell: bash (POSIX)");
|
|
476
|
-
});
|
|
477
|
-
it("lists additional roots and the network allowlist in the Environment section", async () => {
|
|
478
|
-
const cwd = await makeProject();
|
|
479
|
-
const plain = await buildSystemPrompt(cwd, undefined, false, undefined, ["read"]);
|
|
480
|
-
expect(plain).not.toContain("Additional roots:");
|
|
481
|
-
expect(plain).not.toContain("Network allowlist:");
|
|
482
|
-
const scoped = await buildSystemPrompt(cwd, undefined, false, undefined, ["read"], undefined, undefined, { additionalRoots: ["/work/sdk"], networkAllow: ["*.github.com"] });
|
|
483
|
-
expect(scoped).toContain("- Additional roots: /work/sdk");
|
|
484
|
-
expect(scoped).toContain("- Network allowlist: *.github.com");
|
|
485
|
-
});
|
|
486
|
-
it("states the nearest-wins precedence rule in the project context section", async () => {
|
|
487
|
-
const cwd = await makeProject({ "AGENTS.md": "Project rules." });
|
|
488
|
-
const prompt = await buildSystemPrompt(cwd, undefined, false, undefined, ["read"]);
|
|
489
|
-
expect(prompt).toContain("Files are ordered broadest → nearest.");
|
|
490
|
-
expect(prompt).toContain("the nearest file wins");
|
|
491
|
-
});
|
|
492
|
-
it("uses the Claude Code identity for Anthropic and GG Coder for other providers", async () => {
|
|
493
|
-
const cwd = await makeProject();
|
|
494
|
-
const anthropic = await buildSystemPrompt(cwd, undefined, false, undefined, ["read"], undefined, "anthropic");
|
|
495
|
-
const openai = await buildSystemPrompt(cwd, undefined, false, undefined, ["read"], undefined, "openai");
|
|
496
|
-
expect(anthropic.startsWith("You are Claude Code")).toBe(true);
|
|
497
|
-
expect(anthropic).not.toContain("GG Coder by Ken Kai");
|
|
498
|
-
expect(openai.startsWith("You are GG Coder by Ken Kai")).toBe(true);
|
|
499
|
-
expect(openai).not.toContain("You are Claude Code");
|
|
500
|
-
});
|
|
501
|
-
it("is byte-stable across builds in one process (prefix-cache safety)", async () => {
|
|
502
|
-
// Deterministic arm of bench/baseline/04-prefix-stability.mjs, promoted to
|
|
503
|
-
// a unit test so a volatile section landing in the cached prefix fails
|
|
504
|
-
// `pnpm test`, not a manual bench run. The live cache-hit e2e
|
|
505
|
-
// (core/provider-cache.e2e.test.ts) guards the same property end-to-end.
|
|
506
|
-
const cwd = await makeProject({
|
|
507
|
-
"CLAUDE.md": "Project rules win.",
|
|
508
|
-
"package.json": JSON.stringify({ scripts: { check: "tsc --noEmit" } }),
|
|
509
|
-
});
|
|
510
|
-
const args = {
|
|
511
|
-
skills: [],
|
|
512
|
-
planMode: false,
|
|
513
|
-
approvedPlanPath: undefined,
|
|
514
|
-
toolNames: ["read", "edit", "bash"],
|
|
515
|
-
activeLanguages: new Set(["typescript"]),
|
|
516
|
-
};
|
|
517
|
-
const a = await buildSystemPrompt(cwd, args.skills, args.planMode, args.approvedPlanPath, args.toolNames, args.activeLanguages);
|
|
518
|
-
const b = await buildSystemPrompt(cwd, args.skills, args.planMode, args.approvedPlanPath, args.toolNames, args.activeLanguages);
|
|
519
|
-
expect(a).toBe(b);
|
|
520
|
-
// Same for the Ken advisor prompt — its marker must also partition
|
|
521
|
-
// volatile bytes out of the cached prefix (ken-prompt.ts pins the marker
|
|
522
|
-
// as byte-identical to the build prompt's).
|
|
523
|
-
const kenA = await buildKenSystemPrompt(cwd);
|
|
524
|
-
const kenB = await buildKenSystemPrompt(cwd);
|
|
525
|
-
expect(kenA).toBe(kenB);
|
|
526
|
-
for (const prompt of [a, kenA]) {
|
|
527
|
-
expect(prompt).toContain("<!-- uncached -->");
|
|
528
|
-
// All volatile content (currently only the date) sits AFTER the marker.
|
|
529
|
-
const markerAt = prompt.indexOf("<!-- uncached -->");
|
|
530
|
-
expect(prompt.slice(markerAt)).toMatch(/Today's date: \d{1,2} \w+ \d{4}/);
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
});
|
|
534
|
-
describe("collectProjectContext", () => {
|
|
535
|
-
it("picks one file per directory — AGENTS.md shadows CLAUDE.md and the rest", async () => {
|
|
536
|
-
const cwd = await makeProject({
|
|
537
|
-
"AGENTS.md": "agents rules",
|
|
538
|
-
"CLAUDE.md": "claude rules",
|
|
539
|
-
".cursorrules": "cursor rules",
|
|
540
|
-
});
|
|
541
|
-
const parts = await collectProjectContext(cwd);
|
|
542
|
-
expect(parts).toHaveLength(1);
|
|
543
|
-
expect(parts[0]).toContain("AGENTS.md");
|
|
544
|
-
expect(parts[0]).toContain("agents rules");
|
|
545
|
-
expect(parts.join("\n")).not.toContain("claude rules");
|
|
546
|
-
expect(parts.join("\n")).not.toContain("cursor rules");
|
|
547
|
-
});
|
|
548
|
-
it("AGENTS.override.md beats AGENTS.md in the same directory", async () => {
|
|
549
|
-
const cwd = await makeProject({
|
|
550
|
-
"AGENTS.override.md": "local override rules",
|
|
551
|
-
"AGENTS.md": "checked-in rules",
|
|
552
|
-
});
|
|
553
|
-
const parts = await collectProjectContext(cwd);
|
|
554
|
-
expect(parts).toHaveLength(1);
|
|
555
|
-
expect(parts[0]).toContain("AGENTS.override.md");
|
|
556
|
-
expect(parts[0]).toContain("local override rules");
|
|
557
|
-
expect(parts.join("\n")).not.toContain("checked-in rules");
|
|
558
|
-
});
|
|
559
|
-
it("renders broad → narrow: the nearest file comes last", async () => {
|
|
560
|
-
const root = await makeProject({
|
|
561
|
-
"AGENTS.md": "root-level rules",
|
|
562
|
-
"nested/CLAUDE.md": "nested rules",
|
|
563
|
-
});
|
|
564
|
-
const cwd = path.join(root, "nested");
|
|
565
|
-
const parts = await collectProjectContext(cwd);
|
|
566
|
-
const rendered = parts.join("\n\n");
|
|
567
|
-
expect(rendered.indexOf("root-level rules")).toBeGreaterThanOrEqual(0);
|
|
568
|
-
expect(rendered.indexOf("root-level rules")).toBeLessThan(rendered.indexOf("nested rules"));
|
|
569
|
-
expect(parts[parts.length - 1]).toContain("CLAUDE.md");
|
|
570
|
-
});
|
|
571
|
-
it("skips empty or whitespace-only files", async () => {
|
|
572
|
-
const cwd = await makeProject({ "AGENTS.md": " \n\t\n" });
|
|
573
|
-
expect(await collectProjectContext(cwd)).toHaveLength(0);
|
|
574
|
-
});
|
|
575
|
-
it("strips a BOM so the content renders clean", async () => {
|
|
576
|
-
const cwd = await makeProject({ "AGENTS.md": "\uFEFFbom rules" });
|
|
577
|
-
const parts = await collectProjectContext(cwd);
|
|
578
|
-
expect(parts).toHaveLength(1);
|
|
579
|
-
expect(parts[0]).toContain("bom rules");
|
|
580
|
-
expect(parts[0]).not.toContain("\uFEFF");
|
|
581
|
-
});
|
|
582
|
-
it("budgets nearest-first at 32 KiB and reports skipped files", async () => {
|
|
583
|
-
const bigParent = "x".repeat(PROJECT_CONTEXT_MAX_BYTES + 1_000);
|
|
584
|
-
const root = await makeProject({
|
|
585
|
-
"AGENTS.md": bigParent,
|
|
586
|
-
"nested/CLAUDE.md": "nearest rules survive",
|
|
587
|
-
});
|
|
588
|
-
const cwd = path.join(root, "nested");
|
|
589
|
-
const parts = await collectProjectContext(cwd);
|
|
590
|
-
const rendered = parts.join("\n\n");
|
|
591
|
-
expect(rendered).toContain("nearest rules survive");
|
|
592
|
-
expect(rendered).not.toContain(bigParent);
|
|
593
|
-
expect(rendered).toContain("Skipped (context budget)");
|
|
594
|
-
expect(rendered).toMatch(/Skipped \(context budget\): .*AGENTS\.md \(\d+KB\)/);
|
|
595
|
-
});
|
|
596
|
-
it("keeps the nearest file when the budget cannot fit both", async () => {
|
|
597
|
-
const nearBig = "n".repeat(PROJECT_CONTEXT_MAX_BYTES - 100);
|
|
598
|
-
const parentRules = `parent rules ${"p".repeat(200)}`; // larger than the 100B leftover
|
|
599
|
-
const root = await makeProject({
|
|
600
|
-
"AGENTS.md": parentRules,
|
|
601
|
-
"nested/AGENTS.md": nearBig,
|
|
602
|
-
});
|
|
603
|
-
const cwd = path.join(root, "nested");
|
|
604
|
-
const parts = await collectProjectContext(cwd);
|
|
605
|
-
const rendered = parts.join("\n\n");
|
|
606
|
-
// The nearest (big) file consumed the budget; the parent was dropped.
|
|
607
|
-
expect(rendered).toContain(nearBig);
|
|
608
|
-
expect(rendered).not.toContain(parentRules);
|
|
609
|
-
expect(rendered).toContain("Skipped (context budget)");
|
|
610
|
-
});
|
|
611
|
-
});
|
|
612
|
-
describe("buildSubAgentSystemPrompt", () => {
|
|
613
|
-
it("composes the agent body with tools, context, contract and environment", async () => {
|
|
614
|
-
const cwd = await makeProject({ "CLAUDE.md": "Project rules win." });
|
|
615
|
-
const prompt = await buildSubAgentSystemPrompt("You are Owl. Explore this repo.", {
|
|
616
|
-
cwd,
|
|
617
|
-
toolNames: ["read", "grep", "code_search"],
|
|
618
|
-
});
|
|
619
|
-
expect(prompt.startsWith("You are Owl. Explore this repo.")).toBe(true);
|
|
620
|
-
expect(sectionIndex(prompt, "## Tools")).toBeLessThan(sectionIndex(prompt, "## Project Context"));
|
|
621
|
-
expect(sectionIndex(prompt, "## Project Context")).toBeLessThan(sectionIndex(prompt, "## Report"));
|
|
622
|
-
expect(sectionIndex(prompt, "## Report")).toBeLessThan(sectionIndex(prompt, "## Environment"));
|
|
623
|
-
expect(prompt).toContain("Project rules win.");
|
|
624
|
-
// The volatile date stays behind the cache marker, exactly as the parent's.
|
|
625
|
-
expect(prompt.indexOf("<!-- uncached -->")).toBeGreaterThan(sectionIndex(prompt, "## Environment"));
|
|
626
|
-
});
|
|
627
|
-
it("never advertises a tool the child's allow-list strips", async () => {
|
|
628
|
-
const cwd = await makeProject();
|
|
629
|
-
const prompt = await buildSubAgentSystemPrompt("You are Owl.", {
|
|
630
|
-
cwd,
|
|
631
|
-
toolNames: ["read", "grep", "code_search"],
|
|
632
|
-
});
|
|
633
|
-
const toolsSection = prompt.slice(sectionIndex(prompt, "## Tools"), sectionIndex(prompt, "## Report"));
|
|
634
|
-
expect(toolsSection).toContain("code_search");
|
|
635
|
-
expect(toolsSection).not.toContain("**write**");
|
|
636
|
-
expect(toolsSection).not.toContain("**bash**");
|
|
637
|
-
expect(prompt).not.toContain("## Delegation");
|
|
638
|
-
});
|
|
639
|
-
it("skips project instruction files when the agent opts out of context", async () => {
|
|
640
|
-
const cwd = await makeProject({ "CLAUDE.md": "Project rules win." });
|
|
641
|
-
const prompt = await buildSubAgentSystemPrompt("You are Owl.", {
|
|
642
|
-
cwd,
|
|
643
|
-
toolNames: ["read"],
|
|
644
|
-
context: "none",
|
|
645
|
-
});
|
|
646
|
-
expect(prompt).not.toContain("Project rules win.");
|
|
647
|
-
expect(prompt).toContain("## Environment");
|
|
648
|
-
});
|
|
649
|
-
it("briefs a delegating child on standalone task briefs", async () => {
|
|
650
|
-
const cwd = await makeProject();
|
|
651
|
-
const prompt = await buildSubAgentSystemPrompt("You are Bee.", {
|
|
652
|
-
cwd,
|
|
653
|
-
toolNames: ["read", "subagent"],
|
|
654
|
-
});
|
|
655
|
-
expect(prompt).toContain("## Delegation");
|
|
656
|
-
expect(prompt).toContain("sees none of this conversation");
|
|
657
|
-
});
|
|
658
|
-
});
|
|
659
|
-
describe("system prompt byte ceiling", () => {
|
|
660
|
-
it("bounds a hostile AGENTS.md + skill catalog by per-input budgets, not the ceiling", async () => {
|
|
661
|
-
const cwd = await makeProject({
|
|
662
|
-
"AGENTS.md": `# Hostile\n\n${"inject ".repeat(20_000)}`, // ~120KB
|
|
663
|
-
});
|
|
664
|
-
const skills = Array.from({ length: 80 }, (_, i) => ({
|
|
665
|
-
name: `skill-${i}`,
|
|
666
|
-
description: "y".repeat(2_000), // 160KB raw descriptions
|
|
667
|
-
content: "x",
|
|
668
|
-
source: "global",
|
|
669
|
-
}));
|
|
670
|
-
const prompt = await buildSystemPrompt(cwd, skills);
|
|
671
|
-
// Per-input budgets do the work: well under the 1MB ceiling regardless.
|
|
672
|
-
expect(Buffer.byteLength(prompt, "utf8")).toBeLessThan(64 * 1024);
|
|
673
|
-
expect(prompt).toContain("Skipped (context budget)");
|
|
674
|
-
});
|
|
675
|
-
it("enforces the emergency ceiling when sections overflow it", async () => {
|
|
676
|
-
const cwd = await makeProject({
|
|
677
|
-
"AGENTS.md": `${"a".repeat(31 * 1024)}`, // just under the 32KB file budget
|
|
678
|
-
});
|
|
679
|
-
const prompt = await buildSystemPrompt(cwd, [], false, undefined, undefined, undefined, undefined, undefined, undefined, resolveContextLimits({ systemPromptCeilingBytes: 16 * 1024 }));
|
|
680
|
-
expect(Buffer.byteLength(prompt, "utf8")).toBeLessThanOrEqual(16 * 1024);
|
|
681
|
-
expect(prompt).toContain("system prompt exceeded the 16384-byte ceiling");
|
|
682
|
-
});
|
|
683
|
-
});
|
|
684
|
-
//# sourceMappingURL=system-prompt.test.js.map
|