stitchkit 0.132.2 → 0.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +181 -1
- package/dist/agent-executor/acp/v1-connect.d.ts +12 -1
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-driver.d.ts +3 -1
- package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-handlers.d.ts +9 -1
- package/dist/agent-executor/acp/v1-handlers.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-permission.d.ts +3 -2
- package/dist/agent-executor/acp/v1-permission.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-probe.d.ts +10 -1
- package/dist/agent-executor/acp/v1-probe.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts +11 -2
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-turn.d.ts +13 -10
- package/dist/agent-executor/acp/v1-turn.d.ts.map +1 -1
- package/dist/agent-executor/claude/cli-driver.d.ts +6 -0
- package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
- package/dist/agent-executor/claude/record-router.d.ts +44 -0
- package/dist/agent-executor/claude/record-router.d.ts.map +1 -0
- package/dist/agent-executor/claude/session.d.ts +2 -0
- package/dist/agent-executor/claude/session.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/controls.d.ts +1 -0
- package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/driver.d.ts +20 -2
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/engine-spawn.d.ts +18 -0
- package/dist/agent-executor/claude-sdk/engine-spawn.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/query-loop.d.ts +9 -7
- package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/query-manager.d.ts +42 -0
- package/dist/agent-executor/claude-sdk/query-manager.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/query-options.d.ts +4 -1
- package/dist/agent-executor/claude-sdk/query-options.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/capabilities.d.ts +8 -0
- package/dist/agent-executor/codex/capabilities.d.ts.map +1 -0
- package/dist/agent-executor/codex/connect.d.ts +6 -1
- package/dist/agent-executor/codex/connect.d.ts.map +1 -1
- package/dist/agent-executor/codex/driver.d.ts +10 -0
- package/dist/agent-executor/codex/driver.d.ts.map +1 -1
- package/dist/agent-executor/codex/event-routing.d.ts +23 -1
- package/dist/agent-executor/codex/event-routing.d.ts.map +1 -1
- package/dist/agent-executor/codex/handlers.d.ts +24 -4
- package/dist/agent-executor/codex/handlers.d.ts.map +1 -1
- package/dist/agent-executor/codex/limits.d.ts +17 -0
- package/dist/agent-executor/codex/limits.d.ts.map +1 -1
- package/dist/agent-executor/codex/request-answers.d.ts +23 -3
- package/dist/agent-executor/codex/request-answers.d.ts.map +1 -1
- package/dist/agent-executor/codex/session-bind.d.ts +6 -1
- package/dist/agent-executor/codex/session-bind.d.ts.map +1 -1
- package/dist/agent-executor/codex/session-types.d.ts +5 -1
- package/dist/agent-executor/codex/session-types.d.ts.map +1 -1
- package/dist/agent-executor/codex/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/shared-server.d.ts.map +1 -1
- package/dist/agent-executor/codex/shared-thread.d.ts +7 -7
- package/dist/agent-executor/codex/shared-thread.d.ts.map +1 -1
- package/dist/agent-executor/codex/thread-open.d.ts +12 -3
- package/dist/agent-executor/codex/thread-open.d.ts.map +1 -1
- package/dist/agent-executor/engine-requests.d.ts +42 -0
- package/dist/agent-executor/engine-requests.d.ts.map +1 -1
- package/dist/agent-executor/handoff-schemas.d.ts.map +1 -1
- package/dist/agent-executor/handoff.d.ts.map +1 -1
- package/dist/agent-executor/image-input.d.ts +6 -5
- package/dist/agent-executor/image-input.d.ts.map +1 -1
- package/dist/agent-executor/profile.d.ts +3 -5
- package/dist/agent-executor/profile.d.ts.map +1 -1
- package/dist/agent-executor/session-primitives.d.ts +64 -3
- package/dist/agent-executor/session-primitives.d.ts.map +1 -1
- package/dist/agent-executor/testing/claude-sdk-stubs.d.ts +5 -0
- package/dist/agent-executor/testing/claude-sdk-stubs.d.ts.map +1 -0
- package/dist/agent-executor/testing/conformance-lifecycle.d.ts +11 -0
- package/dist/agent-executor/testing/conformance-lifecycle.d.ts.map +1 -0
- package/dist/agent-executor/testing/conformance-support.d.ts +23 -0
- package/dist/agent-executor/testing/conformance-support.d.ts.map +1 -0
- package/dist/agent-executor/testing/conformance.d.ts +7 -2
- package/dist/agent-executor/testing/conformance.d.ts.map +1 -1
- package/dist/agent-executor/testing/consumer-stubs.d.ts +5 -3
- package/dist/agent-executor/testing/consumer-stubs.d.ts.map +1 -1
- package/dist/agent-executor/testing/fake-codex-app-server.d.ts +5 -1
- package/dist/agent-executor/testing/fake-codex-app-server.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-driver.d.ts +6 -0
- package/dist/agent-executor/testing/replay-driver.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-gate.d.ts +4 -1
- package/dist/agent-executor/testing/replay-gate.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tool-types.d.ts +2 -0
- package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tools.d.ts.map +1 -1
- package/dist/agent-runtime/sql-rows.d.ts +10 -10
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
- package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
- package/dist/agent-runtime/terminal-commit.d.ts +10 -10
- package/dist/browser/client.d.ts.map +1 -1
- package/dist/browser/operation-refusal.d.ts +10 -0
- package/dist/browser/operation-refusal.d.ts.map +1 -0
- package/dist/contract/client-types.d.ts +13 -4
- package/dist/contract/client-types.d.ts.map +1 -1
- package/dist/contract/define-validation.d.ts +6 -0
- package/dist/contract/define-validation.d.ts.map +1 -1
- package/dist/contract/define.d.ts +3 -0
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/errors-factory.d.ts +8 -2
- package/dist/contract/errors-factory.d.ts.map +1 -1
- package/dist/contract/errors.d.ts +9 -0
- package/dist/contract/errors.d.ts.map +1 -1
- package/dist/contract/fingerprint.d.ts +4 -1
- package/dist/contract/fingerprint.d.ts.map +1 -1
- package/dist/contract/operation-refusals.d.ts +51 -0
- package/dist/contract/operation-refusals.d.ts.map +1 -0
- package/dist/contract/tool-options.d.ts +4 -0
- package/dist/contract/tool-options.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +254 -196
- package/dist/entrypoints/agent-executor/claude-sdk.js +467 -294
- package/dist/entrypoints/agent-executor/claude.js +130 -99
- package/dist/entrypoints/agent-executor/codex.js +441 -314
- package/dist/entrypoints/agent-executor/testing/claude-sdk.d.ts +3 -0
- package/dist/entrypoints/agent-executor/testing/claude-sdk.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/testing/claude-sdk.js +329 -0
- package/dist/entrypoints/agent-executor/testing.d.ts +1 -2
- package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/testing.js +413 -667
- package/dist/entrypoints/agent-executor.d.ts +1 -1
- package/dist/entrypoints/agent-executor.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor.js +12 -12
- package/dist/entrypoints/agent-runtime/browser.js +2 -2
- package/dist/entrypoints/agent-runtime/coding-tools.js +3 -3
- package/dist/entrypoints/agent-runtime/harness.js +8 -8
- package/dist/entrypoints/agent-runtime/postgres.js +5 -5
- package/dist/entrypoints/agent-runtime/realtime.js +2 -2
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +6 -6
- package/dist/entrypoints/agent-runtime/sqlite/node.js +6 -6
- package/dist/entrypoints/agent-runtime/testing.js +5 -5
- package/dist/entrypoints/agent-runtime.js +26 -18
- package/dist/entrypoints/application/grammy.js +1 -1
- package/dist/entrypoints/application.js +2 -2
- package/dist/entrypoints/cli.js +8 -8
- package/dist/entrypoints/contract.d.ts +3 -2
- package/dist/entrypoints/contract.d.ts.map +1 -1
- package/dist/entrypoints/contract.js +6 -4
- package/dist/entrypoints/files/packaging.d.ts +4 -1
- package/dist/entrypoints/files/packaging.d.ts.map +1 -1
- package/dist/entrypoints/files/packaging.js +868 -167
- package/dist/entrypoints/files.js +1 -1
- package/dist/entrypoints/handler.js +7 -7
- package/dist/entrypoints/http.js +2 -2
- package/dist/entrypoints/index.js +10 -8
- package/dist/entrypoints/node.js +11 -11
- package/dist/entrypoints/observability.js +1 -1
- package/dist/entrypoints/process/bootstrap.d.ts +3 -0
- package/dist/entrypoints/process/bootstrap.d.ts.map +1 -0
- package/dist/entrypoints/process/bootstrap.js +16 -0
- package/dist/entrypoints/process.js +7 -7
- package/dist/entrypoints/realtime.js +3 -3
- package/dist/entrypoints/remote.js +8 -7
- package/dist/entrypoints/server.js +30 -14
- package/dist/entrypoints/service-host/macos.js +72 -206
- package/dist/entrypoints/service-host/work.d.ts +15 -0
- package/dist/entrypoints/service-host/work.d.ts.map +1 -0
- package/dist/entrypoints/service-host/work.js +676 -0
- package/dist/entrypoints/service-host.js +146 -536
- package/dist/entrypoints/telegram/screens.js +4 -4
- package/dist/entrypoints/telegram.js +4 -4
- package/dist/entrypoints/testing.d.ts +2 -1
- package/dist/entrypoints/testing.d.ts.map +1 -1
- package/dist/entrypoints/testing.js +27 -8
- package/dist/entrypoints/tools/agent.js +6 -6
- package/dist/entrypoints/tools/connections.js +2 -2
- package/dist/entrypoints/tools/invoker.js +5 -5
- package/dist/entrypoints/tools/mcp.js +8 -6
- package/dist/entrypoints/tools/toolkit.js +11 -9
- package/dist/entrypoints/tools.js +19 -17
- package/dist/entrypoints/tracking/contract.js +1 -1
- package/dist/entrypoints/tracking/performance.js +3 -3
- package/dist/files/client-artifact.d.ts +14 -42
- package/dist/files/client-artifact.d.ts.map +1 -1
- package/dist/files/client-build.d.ts +57 -0
- package/dist/files/client-build.d.ts.map +1 -0
- package/dist/files/client-declarations.d.ts +35 -0
- package/dist/files/client-declarations.d.ts.map +1 -0
- package/dist/files/client-package-contract.d.ts +162 -0
- package/dist/files/client-package-contract.d.ts.map +1 -0
- package/dist/files/client-package-proof.d.ts +38 -0
- package/dist/files/client-package-proof.d.ts.map +1 -0
- package/dist/files/client-package.d.ts +17 -0
- package/dist/files/client-package.d.ts.map +1 -0
- package/dist/files/declaration-specifiers.d.ts +30 -0
- package/dist/files/declaration-specifiers.d.ts.map +1 -0
- package/dist/{index-v759mzed.js → index-02r5sq9p.js} +36 -23
- package/dist/{index-0r15pkjq.js → index-0k1ba0ss.js} +1 -1
- package/dist/{index-znd1b57f.js → index-1dn2wjq6.js} +5 -4
- package/dist/{index-p06z7g7w.js → index-1p8q0yrt.js} +6 -5
- package/dist/{index-wa6h4tz6.js → index-1qwd54n3.js} +6 -5
- package/dist/index-2dzc7mv9.js +174 -0
- package/dist/index-2mz8hj58.js +155 -0
- package/dist/{index-17qgm6xe.js → index-34k82crg.js} +2 -2
- package/dist/index-3mcbr8sx.js +349 -0
- package/dist/{index-ybdq8kk2.js → index-3y2tzhr8.js} +3 -3
- package/dist/{index-fgahdc7s.js → index-5n3a8hd8.js} +5 -3
- package/dist/{index-jb4m241t.js → index-6918kxbf.js} +45 -1
- package/dist/{index-n3bm7zqq.js → index-6kmjcm81.js} +4 -4
- package/dist/{index-akf0xkrm.js → index-78da4g74.js} +1 -1
- package/dist/{index-9pv126eh.js → index-7fjbdga8.js} +7 -1
- package/dist/{index-zhshhxew.js → index-8jf4bt7v.js} +1 -1
- package/dist/{index-p16q492v.js → index-8t9dr41h.js} +18 -5
- package/dist/{index-xq4s9mka.js → index-8yt3rwe7.js} +1 -1
- package/dist/{index-39c2hj6h.js → index-9c76vfxf.js} +7 -3
- package/dist/index-9ft4n9j1.js +432 -0
- package/dist/{index-sd4e5x5j.js → index-9wdrwx3b.js} +8 -7
- package/dist/{index-z114ax5e.js → index-an7vcmwf.js} +49 -2
- package/dist/{index-pzhqydxb.js → index-d04w81fz.js} +1 -1
- package/dist/index-d2drhb9c.js +219 -0
- package/dist/{index-8gmmdz7k.js → index-dacxr7nf.js} +1 -1
- package/dist/{index-dnzxxf8a.js → index-dm6nxkn1.js} +1 -1
- package/dist/index-dxft2mnm.js +42 -0
- package/dist/{index-rxh3qy4x.js → index-fzd477xk.js} +1 -1
- package/dist/{index-xgae0bn7.js → index-g4gstmp1.js} +2 -2
- package/dist/{index-athc412x.js → index-g5fgeb6v.js} +1 -1
- package/dist/{index-z9d74jmb.js → index-gbhj370g.js} +3 -3
- package/dist/{index-3fym4j8n.js → index-gtaaxe9d.js} +1 -1
- package/dist/{index-v59pxmf1.js → index-jpecjm30.js} +2 -2
- package/dist/index-k9g061ma.js +164 -0
- package/dist/{index-669374qc.js → index-ma26mfnt.js} +84 -315
- package/dist/{index-ryxb427v.js → index-msxf2r8x.js} +16 -3
- package/dist/{index-rbd2rq3z.js → index-nr4fhfn4.js} +1 -1
- package/dist/{index-qa2jjb65.js → index-pbekeqzm.js} +1 -1
- package/dist/{index-mkfhpk11.js → index-pq6g1k9t.js} +2 -2
- package/dist/{index-gya4hwh3.js → index-pws5c3x6.js} +21 -1
- package/dist/{index-x2fb37t0.js → index-q427q23r.js} +3 -2
- package/dist/{index-jcrj0b8z.js → index-qggqqja2.js} +39 -2
- package/dist/{index-jxtg307y.js → index-rkjfzs0a.js} +1 -1
- package/dist/{index-5tdc0q43.js → index-rw8ze745.js} +5 -3
- package/dist/index-s43tr4my.js +129 -0
- package/dist/{index-f9p62ean.js → index-stpy56r3.js} +175 -249
- package/dist/index-t5g5rm9n.js +213 -0
- package/dist/{index-z20pdxeb.js → index-tmv3ez1h.js} +3 -3
- package/dist/{index-dcsxj68j.js → index-tqjamnax.js} +1 -1
- package/dist/{index-j15dhkda.js → index-wddcfbng.js} +1 -325
- package/dist/{index-9sfhje6y.js → index-wh70tmpd.js} +24 -234
- package/dist/index-wxjv4sqx.js +82 -0
- package/dist/{index-qhjmmsm2.js → index-x46y9z26.js} +2 -2
- package/dist/{index-nk0cy9g1.js → index-y53cqwke.js} +1 -1
- package/dist/{index-sv5svtq7.js → index-y68gavb5.js} +1 -1
- package/dist/{index-5y7j383h.js → index-yrhw10ef.js} +1 -1
- package/dist/process/bootstrap.d.ts +12 -0
- package/dist/process/bootstrap.d.ts.map +1 -0
- package/dist/process/owner-loss-guard.d.ts +2 -9
- package/dist/process/owner-loss-guard.d.ts.map +1 -1
- package/dist/process/work-root.d.ts +20 -0
- package/dist/process/work-root.d.ts.map +1 -0
- package/dist/server/contract-identity.d.ts.map +1 -1
- package/dist/server/contract-method.d.ts +12 -0
- package/dist/server/contract-method.d.ts.map +1 -1
- package/dist/server/implement.d.ts.map +1 -1
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/server/types.d.ts +10 -9
- package/dist/server/types.d.ts.map +1 -1
- package/dist/service-host/host-adapter.d.ts +2 -0
- package/dist/service-host/host-adapter.d.ts.map +1 -1
- package/dist/service-host/work/command.d.ts +72 -0
- package/dist/service-host/work/command.d.ts.map +1 -0
- package/dist/service-host/work/errors.d.ts +29 -0
- package/dist/service-host/work/errors.d.ts.map +1 -0
- package/dist/service-host/work/host.d.ts +38 -0
- package/dist/service-host/work/host.d.ts.map +1 -0
- package/dist/service-host/work/launch.d.ts +51 -0
- package/dist/service-host/work/launch.d.ts.map +1 -0
- package/dist/service-host/work/membership.d.ts +51 -0
- package/dist/service-host/work/membership.d.ts.map +1 -0
- package/dist/service-host/work/origin.d.ts +79 -0
- package/dist/service-host/work/origin.d.ts.map +1 -0
- package/dist/service-host/work/owner.d.ts +45 -0
- package/dist/service-host/work/owner.d.ts.map +1 -0
- package/dist/service-host/work/placement.d.ts +55 -0
- package/dist/service-host/work/placement.d.ts.map +1 -0
- package/dist/service-host/work/probe.d.ts +24 -0
- package/dist/service-host/work/probe.d.ts.map +1 -0
- package/dist/service-host/work/scope-command.d.ts +68 -0
- package/dist/service-host/work/scope-command.d.ts.map +1 -0
- package/dist/sync/session.d.ts +4 -1
- package/dist/sync/session.d.ts.map +1 -1
- package/dist/testing/surface-manifest-digest.d.ts +2 -0
- package/dist/testing/surface-manifest-digest.d.ts.map +1 -1
- package/dist/testing/surface-manifest.d.ts +32 -3
- package/dist/testing/surface-manifest.d.ts.map +1 -1
- package/dist/tools/agent.d.ts +2 -0
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/stream-surface.d.ts.map +1 -1
- package/dist/tools/internal/mcp-projection.d.ts +58 -0
- package/dist/tools/internal/mcp-projection.d.ts.map +1 -0
- package/dist/tools/internal/surface-projector.d.ts +3 -47
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/invoker.d.ts +2 -0
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +2 -0
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/mcp/handler.d.ts.map +1 -1
- package/dist/tools/mcp/lazy-discovery.d.ts.map +1 -1
- package/dist/tools/mcp/mount.d.ts +4 -0
- package/dist/tools/mcp/mount.d.ts.map +1 -1
- package/dist/tools/mcp/prepare.d.ts +5 -2
- package/dist/tools/mcp/prepare.d.ts.map +1 -1
- package/dist/tools/mount.d.ts +2 -0
- package/dist/tools/mount.d.ts.map +1 -1
- package/dist/tools/remote.d.ts.map +1 -1
- package/dist/tools/schema/nesting-limit.d.ts +8 -0
- package/dist/tools/schema/nesting-limit.d.ts.map +1 -0
- package/dist/tools/schema/presentation.d.ts +7 -0
- package/dist/tools/schema/presentation.d.ts.map +1 -1
- package/dist/tools/surface.d.ts.map +1 -1
- package/llms/agent-executor-acp.txt +3 -3
- package/llms/agent-executor-claude-sdk.txt +1 -1
- package/llms/agent-executor-claude.txt +1 -1
- package/llms/agent-executor-codex.txt +1 -1
- package/llms/agent-executor-testing-claude-sdk.txt +28 -0
- package/llms/agent-executor-testing.txt +7 -8
- package/llms/agent-executor.txt +27 -4
- package/llms/agent-runtime.txt +1 -1
- package/llms/contract.txt +8 -2
- package/llms/files-packaging.txt +11 -6
- package/llms/process-bootstrap.txt +18 -0
- package/llms/process.2.txt +215 -18
- package/llms/process.txt +130 -92
- package/llms/server.4.txt +49 -1
- package/llms/service-host-work.txt +34 -0
- package/llms/stitchkit.2.txt +31 -0
- package/llms/stitchkit.txt +78 -75
- package/llms/sync.txt +5 -2
- package/llms/testing.txt +1 -0
- package/llms/tools.2.txt +747 -775
- package/llms/tools.3.txt +846 -210
- package/llms/tools.4.txt +226 -0
- package/llms/tools.txt +3 -790
- package/llms/{upgrading-0.128.0-0.132.0.txt → upgrading-0.128.0-0.133.0.txt} +194 -6
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +746 -135
- package/llms.txt +18 -16
- package/package.json +12 -4
- package/dist/entrypoints/process/owner-loss.d.ts +0 -3
- package/dist/entrypoints/process/owner-loss.d.ts.map +0 -1
- package/dist/entrypoints/process/owner-loss.js +0 -7
- package/llms/process-owner-loss.txt +0 -18
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createStubClaudeSdkSession } from '../../../agent-executor/testing/claude-sdk-stubs.js';
|
|
2
|
+
export { createFakeClaudeSdkQuery, type FakeClaudeSdkQueryConfig, type FakeClaudeSdkQueryHarness, type FakeClaudeSdkRecordedCall, type FakeClaudeSdkRunController, type FakeClaudeSdkScriptedTurn, } from '../../../agent-executor/testing/fake-claude-sdk-query.js';
|
|
3
|
+
//# sourceMappingURL=claude-sdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-sdk.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/agent-executor/testing/claude-sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,GAC/B,MAAM,uDAAuD,CAAC"}
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import"../../../index-kwsr7j5k.js";
|
|
2
|
+
import"../../../index-3mcbr8sx.js";
|
|
3
|
+
import"../../../index-2rf33y2h.js";
|
|
4
|
+
import"../../../index-s43tr4my.js";
|
|
5
|
+
import {
|
|
6
|
+
unexpected,
|
|
7
|
+
noopClose,
|
|
8
|
+
pickOptional
|
|
9
|
+
} from "../../../index-t5g5rm9n.js";
|
|
10
|
+
import {
|
|
11
|
+
untilAborted,
|
|
12
|
+
linkAbortSignals
|
|
13
|
+
} from "../../../index-rptj3qnc.js";
|
|
14
|
+
|
|
15
|
+
// src/agent-executor/testing/claude-sdk-stubs.ts
|
|
16
|
+
function createStubClaudeSdkSession(overrides) {
|
|
17
|
+
const stubName = "StubClaudeSdkSession";
|
|
18
|
+
return {
|
|
19
|
+
nativeThreadId: overrides?.nativeThreadId ?? "stub-session-1",
|
|
20
|
+
providerPid: pickOptional(overrides, "providerPid", overrides?.providerPid, undefined),
|
|
21
|
+
startTurn: overrides?.startTurn ?? unexpected(stubName, "startTurn"),
|
|
22
|
+
setModel: overrides?.setModel ?? unexpected(stubName, "setModel"),
|
|
23
|
+
setPermissionMode: overrides?.setPermissionMode ?? unexpected(stubName, "setPermissionMode"),
|
|
24
|
+
applyFlagSettings: overrides?.applyFlagSettings ?? unexpected(stubName, "applyFlagSettings"),
|
|
25
|
+
initializationResult: overrides?.initializationResult ?? unexpected(stubName, "initializationResult"),
|
|
26
|
+
supportedModels: overrides?.supportedModels ?? unexpected(stubName, "supportedModels"),
|
|
27
|
+
supportedCommands: overrides?.supportedCommands ?? unexpected(stubName, "supportedCommands"),
|
|
28
|
+
accountInfo: overrides?.accountInfo ?? unexpected(stubName, "accountInfo"),
|
|
29
|
+
getContextUsage: overrides?.getContextUsage ?? unexpected(stubName, "getContextUsage"),
|
|
30
|
+
readUsage: overrides?.readUsage ?? unexpected(stubName, "readUsage"),
|
|
31
|
+
mcpServerStatus: overrides?.mcpServerStatus ?? unexpected(stubName, "mcpServerStatus"),
|
|
32
|
+
setMcpServers: overrides?.setMcpServers ?? unexpected(stubName, "setMcpServers"),
|
|
33
|
+
toggleMcpServer: overrides?.toggleMcpServer ?? unexpected(stubName, "toggleMcpServer"),
|
|
34
|
+
reconnectMcpServer: overrides?.reconnectMcpServer ?? unexpected(stubName, "reconnectMcpServer"),
|
|
35
|
+
stopTask: overrides?.stopTask ?? unexpected(stubName, "stopTask"),
|
|
36
|
+
backgroundTasks: overrides?.backgroundTasks ?? unexpected(stubName, "backgroundTasks"),
|
|
37
|
+
rewindFiles: overrides?.rewindFiles ?? unexpected(stubName, "rewindFiles"),
|
|
38
|
+
close: overrides?.close ?? noopClose
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// src/agent-executor/testing/fake-claude-sdk-query.ts
|
|
42
|
+
function createRecordQueue(onFinish) {
|
|
43
|
+
const buffered = [];
|
|
44
|
+
let wake;
|
|
45
|
+
let done = false;
|
|
46
|
+
let failure;
|
|
47
|
+
const notify = () => {
|
|
48
|
+
const current = wake;
|
|
49
|
+
wake = undefined;
|
|
50
|
+
current?.();
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
push(record) {
|
|
54
|
+
if (done)
|
|
55
|
+
return;
|
|
56
|
+
buffered.push(record);
|
|
57
|
+
notify();
|
|
58
|
+
},
|
|
59
|
+
end() {
|
|
60
|
+
if (done)
|
|
61
|
+
return;
|
|
62
|
+
done = true;
|
|
63
|
+
onFinish();
|
|
64
|
+
notify();
|
|
65
|
+
},
|
|
66
|
+
fail(error) {
|
|
67
|
+
if (done)
|
|
68
|
+
return;
|
|
69
|
+
done = true;
|
|
70
|
+
failure = { error };
|
|
71
|
+
onFinish();
|
|
72
|
+
notify();
|
|
73
|
+
},
|
|
74
|
+
async* [Symbol.asyncIterator]() {
|
|
75
|
+
for (;; ) {
|
|
76
|
+
if (buffered.length > 0) {
|
|
77
|
+
yield buffered.shift();
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (failure !== undefined)
|
|
81
|
+
throw failure.error;
|
|
82
|
+
if (done)
|
|
83
|
+
return;
|
|
84
|
+
await new Promise((resolve) => {
|
|
85
|
+
wake = resolve;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function buildCanUseToolOptions(signal, permOptions) {
|
|
92
|
+
const result = {
|
|
93
|
+
signal,
|
|
94
|
+
toolUseID: permOptions?.toolUseID ?? "tool-1",
|
|
95
|
+
requestId: permOptions?.requestId ?? "req-1"
|
|
96
|
+
};
|
|
97
|
+
if (permOptions?.decisionReason !== undefined)
|
|
98
|
+
result.decisionReason = permOptions.decisionReason;
|
|
99
|
+
if (permOptions?.blockedPath !== undefined)
|
|
100
|
+
result.blockedPath = permOptions.blockedPath;
|
|
101
|
+
if (permOptions?.title !== undefined)
|
|
102
|
+
result.title = permOptions.title;
|
|
103
|
+
if (permOptions?.displayName !== undefined)
|
|
104
|
+
result.displayName = permOptions.displayName;
|
|
105
|
+
if (permOptions?.description !== undefined)
|
|
106
|
+
result.description = permOptions.description;
|
|
107
|
+
if (permOptions?.agentID !== undefined)
|
|
108
|
+
result.agentID = permOptions.agentID;
|
|
109
|
+
if (permOptions?.defaultToNo !== undefined)
|
|
110
|
+
result.defaultToNo = permOptions.defaultToNo;
|
|
111
|
+
if (permOptions?.suppressAlwaysAllowRule !== undefined) {
|
|
112
|
+
result.suppressAlwaysAllowRule = permOptions.suppressAlwaysAllowRule;
|
|
113
|
+
}
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
function createFakeRunController(options, runMessages, output) {
|
|
117
|
+
return {
|
|
118
|
+
options,
|
|
119
|
+
promptMessages: runMessages,
|
|
120
|
+
emit(entry) {
|
|
121
|
+
output.push(entry);
|
|
122
|
+
},
|
|
123
|
+
async askPermission(toolName, input, permOptions) {
|
|
124
|
+
if (options?.canUseTool === undefined) {
|
|
125
|
+
throw new Error("[stitchkit] FakeClaudeSdkRunController.askPermission: driver did not supply canUseTool");
|
|
126
|
+
}
|
|
127
|
+
const abortController = new AbortController;
|
|
128
|
+
const forwardAbort = () => abortController.abort();
|
|
129
|
+
const parentSignal = options.abortController?.signal;
|
|
130
|
+
const customSignal = permOptions?.signal;
|
|
131
|
+
if (parentSignal?.aborted || customSignal?.aborted) {
|
|
132
|
+
abortController.abort();
|
|
133
|
+
} else {
|
|
134
|
+
parentSignal?.addEventListener("abort", forwardAbort, { once: true });
|
|
135
|
+
customSignal?.addEventListener("abort", forwardAbort, { once: true });
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
return await options.canUseTool(toolName, input, buildCanUseToolOptions(abortController.signal, permOptions));
|
|
139
|
+
} finally {
|
|
140
|
+
parentSignal?.removeEventListener("abort", forwardAbort);
|
|
141
|
+
customSignal?.removeEventListener("abort", forwardAbort);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
end() {
|
|
145
|
+
output.end();
|
|
146
|
+
},
|
|
147
|
+
fail(error) {
|
|
148
|
+
output.fail(error);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function createFakeRunObject(config, output, record, close) {
|
|
153
|
+
return {
|
|
154
|
+
[Symbol.asyncIterator]: () => output[Symbol.asyncIterator](),
|
|
155
|
+
async interrupt() {
|
|
156
|
+
record("interrupt", []);
|
|
157
|
+
},
|
|
158
|
+
close,
|
|
159
|
+
async setModel(model) {
|
|
160
|
+
record("setModel", [model]);
|
|
161
|
+
},
|
|
162
|
+
async setPermissionMode(mode) {
|
|
163
|
+
record("setPermissionMode", [mode]);
|
|
164
|
+
return config.onSetPermissionMode !== undefined ? config.onSetPermissionMode(mode) : { mode };
|
|
165
|
+
},
|
|
166
|
+
async applyFlagSettings(settings) {
|
|
167
|
+
record("applyFlagSettings", [settings]);
|
|
168
|
+
},
|
|
169
|
+
async initializationResult() {
|
|
170
|
+
record("initializationResult", []);
|
|
171
|
+
return config.initializationResult ?? {
|
|
172
|
+
commands: [...config.commands ?? []],
|
|
173
|
+
agents: [],
|
|
174
|
+
output_style: "default",
|
|
175
|
+
available_output_styles: ["default"],
|
|
176
|
+
models: [...config.models ?? []],
|
|
177
|
+
account: config.account ?? {}
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
async supportedModels() {
|
|
181
|
+
record("supportedModels", []);
|
|
182
|
+
return [...config.models ?? []];
|
|
183
|
+
},
|
|
184
|
+
async supportedCommands() {
|
|
185
|
+
record("supportedCommands", []);
|
|
186
|
+
return [...config.commands ?? []];
|
|
187
|
+
},
|
|
188
|
+
async accountInfo() {
|
|
189
|
+
record("accountInfo", []);
|
|
190
|
+
return config.account ?? {};
|
|
191
|
+
},
|
|
192
|
+
async getContextUsage(opts) {
|
|
193
|
+
record("getContextUsage", [opts]);
|
|
194
|
+
return config.contextUsage ?? {
|
|
195
|
+
categories: [],
|
|
196
|
+
totalTokens: 0,
|
|
197
|
+
maxTokens: 200000,
|
|
198
|
+
rawMaxTokens: 200000,
|
|
199
|
+
percentage: 0,
|
|
200
|
+
gridRows: [],
|
|
201
|
+
model: "claude-sonnet-4-6",
|
|
202
|
+
isAutoCompactEnabled: true,
|
|
203
|
+
memoryFiles: [],
|
|
204
|
+
mcpTools: [],
|
|
205
|
+
agents: [],
|
|
206
|
+
apiUsage: null
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
...config.usage !== undefined && {
|
|
210
|
+
async usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET(opts) {
|
|
211
|
+
record("usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET", [opts]);
|
|
212
|
+
const provider = config.usage;
|
|
213
|
+
if (typeof provider === "function")
|
|
214
|
+
return provider();
|
|
215
|
+
if (provider !== undefined)
|
|
216
|
+
return provider;
|
|
217
|
+
throw new Error("Fake usage provider missing");
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
async mcpServerStatus() {
|
|
221
|
+
record("mcpServerStatus", []);
|
|
222
|
+
return [...config.mcpServers ?? []];
|
|
223
|
+
},
|
|
224
|
+
async setMcpServers(servers) {
|
|
225
|
+
record("setMcpServers", [servers]);
|
|
226
|
+
return config.setMcpServersResult ?? { added: [], removed: [], errors: {} };
|
|
227
|
+
},
|
|
228
|
+
async toggleMcpServer(serverName, enabled) {
|
|
229
|
+
record("toggleMcpServer", [serverName, enabled]);
|
|
230
|
+
},
|
|
231
|
+
async reconnectMcpServer(serverName) {
|
|
232
|
+
record("reconnectMcpServer", [serverName]);
|
|
233
|
+
},
|
|
234
|
+
async stopTask(taskId) {
|
|
235
|
+
record("stopTask", [taskId]);
|
|
236
|
+
},
|
|
237
|
+
async backgroundTasks(toolUseId) {
|
|
238
|
+
record("backgroundTasks", [toolUseId]);
|
|
239
|
+
return true;
|
|
240
|
+
},
|
|
241
|
+
async rewindFiles(userMessageId, rewindOptions) {
|
|
242
|
+
record("rewindFiles", [userMessageId, rewindOptions]);
|
|
243
|
+
return config.rewindFilesResult ?? { canRewind: true };
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function createFakeClaudeSdkQuery(config = {}) {
|
|
248
|
+
const calls = [];
|
|
249
|
+
const promptMessages = [];
|
|
250
|
+
const runs = [];
|
|
251
|
+
let turnCursor = 0;
|
|
252
|
+
const record = (method, args) => {
|
|
253
|
+
calls.push({ method, args });
|
|
254
|
+
};
|
|
255
|
+
const query = ({ prompt, options }) => {
|
|
256
|
+
const lifetime = new AbortController;
|
|
257
|
+
const input = linkAbortSignals(options?.abortController?.signal, lifetime.signal);
|
|
258
|
+
const output = createRecordQueue(() => {
|
|
259
|
+
lifetime.abort();
|
|
260
|
+
input.release();
|
|
261
|
+
});
|
|
262
|
+
const runMessages = [];
|
|
263
|
+
let closed = false;
|
|
264
|
+
const controller = createFakeRunController(options, runMessages, output);
|
|
265
|
+
runs.push(controller);
|
|
266
|
+
const signal = input.signal;
|
|
267
|
+
const close = () => {
|
|
268
|
+
if (closed)
|
|
269
|
+
return;
|
|
270
|
+
closed = true;
|
|
271
|
+
record("close", []);
|
|
272
|
+
output.end();
|
|
273
|
+
};
|
|
274
|
+
if (signal.aborted)
|
|
275
|
+
output.end();
|
|
276
|
+
else
|
|
277
|
+
signal.addEventListener("abort", () => output.end(), { once: true });
|
|
278
|
+
if (config.onRun !== undefined && !signal.aborted) {
|
|
279
|
+
Promise.resolve().then(() => signal.aborted ? undefined : config.onRun?.(controller)).catch((error) => output.fail(error));
|
|
280
|
+
}
|
|
281
|
+
(async () => {
|
|
282
|
+
if (signal.aborted)
|
|
283
|
+
return;
|
|
284
|
+
let iterator;
|
|
285
|
+
let exhausted = false;
|
|
286
|
+
try {
|
|
287
|
+
iterator = prompt[Symbol.asyncIterator]();
|
|
288
|
+
while (!signal.aborted) {
|
|
289
|
+
const next = await untilAborted(iterator.next(), signal);
|
|
290
|
+
if (next.aborted || signal.aborted)
|
|
291
|
+
break;
|
|
292
|
+
if (next.value.done) {
|
|
293
|
+
exhausted = true;
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
const message = next.value.value;
|
|
297
|
+
runMessages.push(message);
|
|
298
|
+
promptMessages.push(message);
|
|
299
|
+
const scripted = config.turns?.[turnCursor];
|
|
300
|
+
turnCursor += 1;
|
|
301
|
+
if (scripted === undefined)
|
|
302
|
+
continue;
|
|
303
|
+
if (typeof scripted === "function") {
|
|
304
|
+
await untilAborted(Promise.resolve(scripted(message, controller)), signal);
|
|
305
|
+
} else {
|
|
306
|
+
for (const entry of scripted.records)
|
|
307
|
+
output.push(entry);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
} catch (error) {
|
|
311
|
+
output.fail(error);
|
|
312
|
+
} finally {
|
|
313
|
+
if (!exhausted && iterator?.return) {
|
|
314
|
+
try {
|
|
315
|
+
await iterator.return();
|
|
316
|
+
} catch (error) {
|
|
317
|
+
output.fail(error);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
})();
|
|
322
|
+
return createFakeRunObject(config, output, record, close);
|
|
323
|
+
};
|
|
324
|
+
return { query, calls, promptMessages, runs };
|
|
325
|
+
}
|
|
326
|
+
export {
|
|
327
|
+
createFakeClaudeSdkQuery,
|
|
328
|
+
createStubClaudeSdkSession
|
|
329
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { type AgentEngineConformanceConfig, type AgentEngineDialectScenarios, runAgentEngineConformance, } from '../../agent-executor/testing/conformance.js';
|
|
2
|
-
export { createStubAcpSession, createStubAgentEngineTurn,
|
|
2
|
+
export { createStubAcpSession, createStubAgentEngineTurn, createStubCodexControlClient, createStubCodexControlConnection, createStubCodexSession, createStubCodexSharedServer, createStubCodexTurn, type StubAgentEngineTurnOverrides, type StubCodexTurnOverrides, type StubOverrides, } from '../../agent-executor/testing/consumer-stubs.js';
|
|
3
3
|
export { runFakeClaudeEngine } from '../../agent-executor/testing/fake-claude-engine.js';
|
|
4
|
-
export { createFakeClaudeSdkQuery, type FakeClaudeSdkQueryConfig, type FakeClaudeSdkQueryHarness, type FakeClaudeSdkRecordedCall, type FakeClaudeSdkRunController, type FakeClaudeSdkScriptedTurn, } from '../../agent-executor/testing/fake-claude-sdk-query.js';
|
|
5
4
|
export { createFakeCodexAppServer, type FakeCodexAppServer, type FakeCodexAppServerConfig, type FakeCodexRpcErrorOutcome, type FakeCodexRpcHandler, type FakeCodexRpcHandlerOutcome, type RecordedJsonRpcRequest, } from '../../agent-executor/testing/fake-codex-app-server.js';
|
|
6
5
|
export { type FakeEngineScenario, FakeEngineScenarioSchema, type FakeEngineStep, FakeEngineStepSchema, } from '../../agent-executor/testing/fake-engine.js';
|
|
7
6
|
export { type CodexNotificationEventOverrides, type ExecutorDeltaInput, makeCodexNotificationEvent, makeCodexThreadFixture, makeExecutorDelta, } from '../../agent-executor/testing/fixtures.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/agent-executor/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,yBAAyB,GAC1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/agent-executor/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,yBAAyB,GAC1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,4BAA4B,EAC5B,gCAAgC,EAChC,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GACnB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,GAC5B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,cAAc,EACnB,oBAAoB,GACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,wBAAwB,EAC7B,8BAA8B,EAC9B,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,qBAAqB,GACtB,MAAM,gDAAgD,CAAC"}
|