stitchkit 0.126.0 → 0.127.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 +1636 -0
- package/README.md +12 -4
- package/dist/agent-executor/acp/scenarios.d.ts +4 -0
- package/dist/agent-executor/acp/scenarios.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-connect.d.ts +89 -0
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-driver.d.ts +31 -0
- package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-map.d.ts +41 -0
- package/dist/agent-executor/acp/v1-map.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-protocol.d.ts +270 -0
- package/dist/agent-executor/acp/v1-protocol.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-session.d.ts +22 -0
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-turn.d.ts +25 -0
- package/dist/agent-executor/acp/v1-turn.d.ts.map +1 -0
- package/dist/agent-executor/claude/classify.d.ts +54 -0
- package/dist/agent-executor/claude/classify.d.ts.map +1 -0
- package/dist/agent-executor/claude/cli-driver.d.ts +27 -0
- package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -0
- package/dist/agent-executor/claude/limits.d.ts +8 -0
- package/dist/agent-executor/claude/limits.d.ts.map +1 -0
- package/dist/agent-executor/claude/protocol.d.ts +188 -0
- package/dist/agent-executor/claude/protocol.d.ts.map +1 -0
- package/dist/agent-executor/claude/scenarios.d.ts +4 -0
- package/dist/agent-executor/claude/scenarios.d.ts.map +1 -0
- package/dist/agent-executor/claude/session.d.ts +22 -0
- package/dist/agent-executor/claude/session.d.ts.map +1 -0
- package/dist/agent-executor/claude/transcript.d.ts +33 -0
- package/dist/agent-executor/claude/transcript.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts +31 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/session.d.ts +10 -0
- package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -0
- package/dist/agent-executor/codex/classify.d.ts +28 -0
- package/dist/agent-executor/codex/classify.d.ts.map +1 -0
- package/dist/agent-executor/codex/driver.d.ts +23 -0
- package/dist/agent-executor/codex/driver.d.ts.map +1 -0
- package/dist/agent-executor/codex/limits.d.ts +4 -0
- package/dist/agent-executor/codex/limits.d.ts.map +1 -0
- package/dist/agent-executor/codex/protocol.d.ts +152 -0
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -0
- package/dist/agent-executor/codex/scenarios.d.ts +4 -0
- package/dist/agent-executor/codex/scenarios.d.ts.map +1 -0
- package/dist/agent-executor/codex/session.d.ts +41 -0
- package/dist/agent-executor/codex/session.d.ts.map +1 -0
- package/dist/agent-executor/contract.d.ts +454 -0
- package/dist/agent-executor/contract.d.ts.map +1 -0
- package/dist/agent-executor/dispatch.d.ts +41 -0
- package/dist/agent-executor/dispatch.d.ts.map +1 -0
- package/dist/agent-executor/engine-process.d.ts +45 -0
- package/dist/agent-executor/engine-process.d.ts.map +1 -0
- package/dist/agent-executor/engine-requests.d.ts +63 -0
- package/dist/agent-executor/engine-requests.d.ts.map +1 -0
- package/dist/agent-executor/engine.d.ts +64 -0
- package/dist/agent-executor/engine.d.ts.map +1 -0
- package/dist/agent-executor/executor-contract.d.ts +387 -0
- package/dist/agent-executor/executor-contract.d.ts.map +1 -0
- package/dist/agent-executor/executor-machine.d.ts +50 -0
- package/dist/agent-executor/executor-machine.d.ts.map +1 -0
- package/dist/agent-executor/hello.d.ts +235 -0
- package/dist/agent-executor/hello.d.ts.map +1 -0
- package/dist/agent-executor/json-rpc-peer.d.ts +48 -0
- package/dist/agent-executor/json-rpc-peer.d.ts.map +1 -0
- package/dist/agent-executor/leases.d.ts +159 -0
- package/dist/agent-executor/leases.d.ts.map +1 -0
- package/dist/agent-executor/plan-limits.d.ts +25 -0
- package/dist/agent-executor/plan-limits.d.ts.map +1 -0
- package/dist/agent-executor/profile.d.ts +52 -0
- package/dist/agent-executor/profile.d.ts.map +1 -0
- package/dist/agent-executor/projection.d.ts +14 -0
- package/dist/agent-executor/projection.d.ts.map +1 -0
- package/dist/agent-executor/session-primitives.d.ts +72 -0
- package/dist/agent-executor/session-primitives.d.ts.map +1 -0
- package/dist/agent-executor/testing/conformance.d.ts +55 -0
- package/dist/agent-executor/testing/conformance.d.ts.map +1 -0
- package/dist/agent-executor/testing/fake-claude-engine.d.ts +18 -0
- package/dist/agent-executor/testing/fake-claude-engine.d.ts.map +1 -0
- package/dist/agent-executor/testing/fake-engine.d.ts +52 -0
- package/dist/agent-executor/testing/fake-engine.d.ts.map +1 -0
- package/dist/agent-executor/turn-phases.d.ts +10 -0
- package/dist/agent-executor/turn-phases.d.ts.map +1 -0
- package/dist/agent-executor/vocabulary.d.ts +353 -0
- package/dist/agent-executor/vocabulary.d.ts.map +1 -0
- package/dist/agent-parts/parts.d.ts +160 -0
- package/dist/agent-parts/parts.d.ts.map +1 -0
- package/dist/agent-runtime/agent-tool.d.ts +1 -1
- package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
- package/dist/agent-runtime/archive-projection.d.ts +5 -0
- package/dist/agent-runtime/archive-projection.d.ts.map +1 -1
- package/dist/agent-runtime/branch-contract.d.ts +59 -2
- package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
- package/dist/agent-runtime/branch-events.d.ts +7 -0
- package/dist/agent-runtime/branch-events.d.ts.map +1 -1
- package/dist/agent-runtime/branch-identities.d.ts +40 -6
- package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
- package/dist/agent-runtime/branch-messages.d.ts +11 -29
- package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/branch-observations.d.ts +138 -28
- package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
- package/dist/agent-runtime/branch-provider.d.ts +32 -51
- package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
- package/dist/agent-runtime/branch-refusal.d.ts +60 -0
- package/dist/agent-runtime/branch-refusal.d.ts.map +1 -0
- package/dist/agent-runtime/branch-runtime-tools.d.ts +14 -0
- package/dist/agent-runtime/branch-runtime-tools.d.ts.map +1 -0
- package/dist/agent-runtime/branch-source.d.ts +7 -2
- package/dist/agent-runtime/branch-source.d.ts.map +1 -1
- package/dist/agent-runtime/branch-transitions.d.ts.map +1 -1
- package/dist/agent-runtime/browser-control-contract.d.ts +2 -2
- package/dist/agent-runtime/browser-controller.d.ts.map +1 -1
- package/dist/agent-runtime/child-blocking.d.ts +17 -6
- package/dist/agent-runtime/child-blocking.d.ts.map +1 -1
- package/dist/agent-runtime/child-budget-policy.d.ts +4 -9
- package/dist/agent-runtime/child-budget-policy.d.ts.map +1 -1
- package/dist/agent-runtime/child-tools.d.ts +19 -8
- package/dist/agent-runtime/child-tools.d.ts.map +1 -1
- package/dist/agent-runtime/children-contract.d.ts +84 -3
- package/dist/agent-runtime/children-contract.d.ts.map +1 -1
- package/dist/agent-runtime/children-control.d.ts +23 -2
- package/dist/agent-runtime/children-control.d.ts.map +1 -1
- package/dist/agent-runtime/children-spawn.d.ts +9 -0
- package/dist/agent-runtime/children-spawn.d.ts.map +1 -1
- package/dist/agent-runtime/children-state.d.ts +121 -19
- package/dist/agent-runtime/children-state.d.ts.map +1 -1
- package/dist/agent-runtime/children-usage.d.ts +10 -1
- package/dist/agent-runtime/children-usage.d.ts.map +1 -1
- package/dist/agent-runtime/children.d.ts +3 -3
- package/dist/agent-runtime/children.d.ts.map +1 -1
- package/dist/agent-runtime/{sandbox-coding.d.ts → coding-sandbox.d.ts} +2 -9
- package/dist/agent-runtime/coding-sandbox.d.ts.map +1 -0
- package/dist/agent-runtime/coding-shell-process.d.ts +2 -0
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts +32 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tools.d.ts.map +1 -1
- package/dist/agent-runtime/compaction.d.ts.map +1 -1
- package/dist/agent-runtime/companion-host.d.ts +38 -0
- package/dist/agent-runtime/companion-host.d.ts.map +1 -0
- package/dist/agent-runtime/context-issue.d.ts +5 -0
- package/dist/agent-runtime/context-issue.d.ts.map +1 -0
- package/dist/agent-runtime/control-schema.d.ts +2 -2
- package/dist/agent-runtime/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/conversations.d.ts.map +1 -1
- package/dist/agent-runtime/coordinator.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tool-types.d.ts +17 -5
- package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tools-internal.d.ts +2 -0
- package/dist/agent-runtime/deferred-tools-internal.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tools.d.ts.map +1 -1
- package/dist/agent-runtime/event-durability.d.ts +8 -0
- package/dist/agent-runtime/event-durability.d.ts.map +1 -0
- package/dist/agent-runtime/event-schema.d.ts +13 -5
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/event-search-postgres.d.ts +38 -0
- package/dist/agent-runtime/event-search-postgres.d.ts.map +1 -0
- package/dist/agent-runtime/event-search-terms.d.ts +37 -0
- package/dist/agent-runtime/event-search-terms.d.ts.map +1 -0
- package/dist/agent-runtime/event-search-tools.d.ts +64 -4
- package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
- package/dist/agent-runtime/event-search.d.ts +16 -3
- package/dist/agent-runtime/event-search.d.ts.map +1 -1
- package/dist/agent-runtime/fault-bench.d.ts.map +1 -1
- package/dist/agent-runtime/harness-control.d.ts +8 -0
- package/dist/agent-runtime/harness-control.d.ts.map +1 -1
- package/dist/agent-runtime/harness-realtime.d.ts +0 -2
- package/dist/agent-runtime/harness-realtime.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-schema.d.ts +23 -0
- package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-spend.d.ts +9 -0
- package/dist/agent-runtime/invocation-spend.d.ts.map +1 -0
- package/dist/agent-runtime/invocations.d.ts.map +1 -1
- package/dist/agent-runtime/managed-tools.d.ts +2 -2
- package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
- package/dist/agent-runtime/observability.d.ts +42 -4
- package/dist/agent-runtime/observability.d.ts.map +1 -1
- package/dist/agent-runtime/openrouter-admission.d.ts +81 -0
- package/dist/agent-runtime/openrouter-admission.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-catalog.d.ts +83 -0
- package/dist/agent-runtime/openrouter-catalog.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-models.d.ts +66 -0
- package/dist/agent-runtime/openrouter-models.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-options.d.ts +106 -0
- package/dist/agent-runtime/openrouter-options.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-route.d.ts +50 -0
- package/dist/agent-runtime/openrouter-route.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-spend.d.ts +24 -0
- package/dist/agent-runtime/openrouter-spend.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter.d.ts +23 -2
- package/dist/agent-runtime/openrouter.d.ts.map +1 -1
- package/dist/agent-runtime/owned-provider-stream.d.ts.map +1 -1
- package/dist/agent-runtime/postgres-schema.d.ts +34 -0
- package/dist/agent-runtime/postgres-schema.d.ts.map +1 -0
- package/dist/agent-runtime/postgres-transactions.d.ts +54 -0
- package/dist/agent-runtime/postgres-transactions.d.ts.map +1 -0
- package/dist/agent-runtime/postgres.d.ts +72 -0
- package/dist/agent-runtime/postgres.d.ts.map +1 -0
- package/dist/agent-runtime/projections.d.ts +57 -17
- package/dist/agent-runtime/projections.d.ts.map +1 -1
- package/dist/agent-runtime/provider-journal.d.ts +57 -0
- package/dist/agent-runtime/provider-journal.d.ts.map +1 -1
- package/dist/agent-runtime/purge.d.ts.map +1 -1
- package/dist/agent-runtime/retry-policy.d.ts +6 -0
- package/dist/agent-runtime/retry-policy.d.ts.map +1 -1
- package/dist/agent-runtime/run-acquisition.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution-state.d.ts +26 -2
- package/dist/agent-runtime/run-execution-state.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/run-failure.d.ts.map +1 -1
- package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -1
- package/dist/agent-runtime/run-provider-ledger.d.ts +2 -0
- package/dist/agent-runtime/run-provider-ledger.d.ts.map +1 -1
- package/dist/agent-runtime/run-step-barriers.d.ts +72 -0
- package/dist/agent-runtime/run-step-barriers.d.ts.map +1 -0
- package/dist/agent-runtime/run-step-spend.d.ts +319 -0
- package/dist/agent-runtime/run-step-spend.d.ts.map +1 -0
- package/dist/agent-runtime/run-stream-parts.d.ts +2 -0
- package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/{tool-progress.d.ts → run-tool-progress.d.ts} +1 -1
- package/dist/agent-runtime/run-tool-progress.d.ts.map +1 -0
- package/dist/agent-runtime/run-turn-preparation.d.ts +3 -1
- package/dist/agent-runtime/run-turn-preparation.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-admission-gate.d.ts +0 -14
- package/dist/agent-runtime/runtime-admission-gate.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +6 -0
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-state.d.ts.map +1 -1
- package/dist/agent-runtime/runtime.d.ts +31 -2
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-binding.d.ts +10 -0
- package/dist/agent-runtime/sandbox-binding.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-contract.d.ts +1 -1
- package/dist/agent-runtime/sandbox-contract.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox.d.ts +5 -0
- package/dist/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-contract.d.ts +3 -2
- package/dist/agent-runtime/schedule-contract.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-dispatch.d.ts +3 -2
- package/dist/agent-runtime/schedule-dispatch.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-records.d.ts +6 -6
- package/dist/agent-runtime/schedule-records.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-tools.d.ts +19 -8
- package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
- package/dist/agent-runtime/schedules.d.ts +13 -3
- package/dist/agent-runtime/schedules.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-message.d.ts +118 -0
- package/dist/agent-runtime/schemas-message.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-provider.d.ts +8 -0
- package/dist/agent-runtime/schemas-provider.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-records.d.ts +5 -0
- package/dist/agent-runtime/schemas-records.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-run.d.ts +487 -0
- package/dist/agent-runtime/schemas-run.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-usage.d.ts +129 -0
- package/dist/agent-runtime/schemas-usage.d.ts.map +1 -0
- package/dist/agent-runtime/schemas.d.ts +11 -886
- package/dist/agent-runtime/schemas.d.ts.map +1 -1
- package/dist/agent-runtime/spill.d.ts +9 -7
- package/dist/agent-runtime/spill.d.ts.map +1 -1
- package/dist/agent-runtime/sql-events.d.ts +6 -0
- package/dist/agent-runtime/sql-events.d.ts.map +1 -0
- package/dist/agent-runtime/sql-history.d.ts +8 -0
- package/dist/agent-runtime/sql-history.d.ts.map +1 -0
- package/dist/agent-runtime/sql-ledger.d.ts +5 -0
- package/dist/agent-runtime/sql-ledger.d.ts.map +1 -0
- package/dist/agent-runtime/sql-purge.d.ts +13 -0
- package/dist/agent-runtime/sql-purge.d.ts.map +1 -0
- package/dist/agent-runtime/sql-reads.d.ts +16 -0
- package/dist/agent-runtime/sql-reads.d.ts.map +1 -0
- package/dist/agent-runtime/{sqlite-rows.d.ts → sql-rows.d.ts} +24 -10
- package/dist/agent-runtime/sql-rows.d.ts.map +1 -0
- package/dist/agent-runtime/sql-session.d.ts +71 -0
- package/dist/agent-runtime/sql-session.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-bun.d.ts +1 -1
- package/dist/agent-runtime/sqlite-bun.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-node.d.ts +1 -1
- package/dist/agent-runtime/sqlite-node.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-purge.d.ts +2 -3
- package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-schema.d.ts +1 -1
- package/dist/agent-runtime/sqlite-schema.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-transactions.d.ts +10 -6
- package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite.d.ts +10 -29
- package/dist/agent-runtime/sqlite.d.ts.map +1 -1
- package/dist/agent-runtime/state-tools.d.ts +8 -4
- package/dist/agent-runtime/state-tools.d.ts.map +1 -1
- package/dist/agent-runtime/store-archive.d.ts.map +1 -1
- package/dist/agent-runtime/store-branch.d.ts +6 -1
- package/dist/agent-runtime/store-branch.d.ts.map +1 -1
- package/dist/agent-runtime/store-capabilities.d.ts +42 -0
- package/dist/agent-runtime/store-capabilities.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-branch.d.ts +5 -2
- package/dist/agent-runtime/store-conformance-branch.d.ts.map +1 -1
- package/dist/agent-runtime/store-conformance-capabilities.d.ts +6 -0
- package/dist/agent-runtime/store-conformance-capabilities.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-event-once.d.ts +12 -0
- package/dist/agent-runtime/store-conformance-event-once.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
- package/dist/agent-runtime/store-conformance-seed.d.ts +8 -0
- package/dist/agent-runtime/store-conformance-seed.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance.d.ts +31 -8
- package/dist/agent-runtime/store-conformance.d.ts.map +1 -1
- package/dist/agent-runtime/store-create.d.ts +1 -1
- package/dist/agent-runtime/store-create.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver-contract.d.ts +15 -8
- package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/store-event-once.d.ts.map +1 -1
- package/dist/agent-runtime/store-events.d.ts +114 -0
- package/dist/agent-runtime/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory-archive.d.ts +2 -0
- package/dist/agent-runtime/store-memory-archive.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory.d.ts +2 -2
- package/dist/agent-runtime/store-memory.d.ts.map +1 -1
- package/dist/agent-runtime/store-mutate.d.ts.map +1 -1
- package/dist/agent-runtime/store-reduce-shared.d.ts +2 -1
- package/dist/agent-runtime/store-reduce-shared.d.ts.map +1 -1
- package/dist/agent-runtime/store-reducer.d.ts.map +1 -1
- package/dist/agent-runtime/store-replay.d.ts.map +1 -1
- package/dist/agent-runtime/store.d.ts +15 -2
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +10 -10
- package/dist/application/admission-run.d.ts.map +1 -1
- package/dist/application/admission.d.ts.map +1 -1
- package/dist/application/change-subscription.d.ts.map +1 -1
- package/dist/application/decisions.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-lock-format.d.ts +9 -0
- package/dist/application/diagnostic-journal-lock-format.d.ts.map +1 -0
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/directory-inbox-delivery.d.ts.map +1 -1
- package/dist/application/grammy-update-admission.d.ts.map +1 -1
- package/dist/application/health.d.ts.map +1 -1
- package/dist/application/kernel-admission.d.ts.map +1 -1
- package/dist/application/kernel-contract.d.ts.map +1 -1
- package/dist/application/kernel-restart.d.ts.map +1 -1
- package/dist/application/kernel-rollback.d.ts.map +1 -1
- package/dist/application/kernel-shutdown.d.ts.map +1 -1
- package/dist/application/kernel-state.d.ts.map +1 -1
- package/dist/application/notification-outbox-state.d.ts.map +1 -1
- package/dist/application/notification-outbox.d.ts +1 -1
- package/dist/application/notification-outbox.d.ts.map +1 -1
- package/dist/application/revision-signal.d.ts.map +1 -1
- package/dist/application/schedule-run.d.ts.map +1 -1
- package/dist/application/schedule.d.ts.map +1 -1
- package/dist/application/sqlite-migrations.d.ts +104 -0
- package/dist/application/sqlite-migrations.d.ts.map +1 -0
- package/dist/application/watch-hub-core.d.ts.map +1 -1
- package/dist/browser/bridge-errors.d.ts +24 -0
- package/dist/browser/bridge-errors.d.ts.map +1 -0
- package/dist/browser/bridge-fetch.d.ts +30 -0
- package/dist/browser/bridge-fetch.d.ts.map +1 -0
- package/dist/browser/bridge-inbound.d.ts +28 -0
- package/dist/browser/bridge-inbound.d.ts.map +1 -0
- package/dist/browser/cancellation.d.ts +10 -2
- package/dist/browser/cancellation.d.ts.map +1 -1
- package/dist/browser/chunked-upload.d.ts +1 -1
- package/dist/browser/chunked-upload.d.ts.map +1 -1
- package/dist/browser/client-call-arguments.d.ts +31 -0
- package/dist/browser/client-call-arguments.d.ts.map +1 -0
- package/dist/browser/client-executors.d.ts +6 -0
- package/dist/browser/client-executors.d.ts.map +1 -1
- package/dist/browser/client.d.ts +9 -0
- package/dist/browser/client.d.ts.map +1 -1
- package/dist/browser/http.d.ts +17 -2
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/browser/realtime-client.d.ts +0 -5
- package/dist/browser/realtime-client.d.ts.map +1 -1
- package/dist/browser/session-credentials-storage.d.ts +48 -0
- package/dist/browser/session-credentials-storage.d.ts.map +1 -0
- package/dist/browser/session-credentials.d.ts +26 -5
- package/dist/browser/session-credentials.d.ts.map +1 -1
- package/dist/browser/session-refresh-policy.d.ts +124 -0
- package/dist/browser/session-refresh-policy.d.ts.map +1 -0
- package/dist/browser/session-refresh-timer.d.ts +30 -0
- package/dist/browser/session-refresh-timer.d.ts.map +1 -0
- package/dist/browser/session.d.ts.map +1 -1
- package/dist/browser/socket-io-connection.d.ts.map +1 -1
- package/dist/browser/socket-io-explicit-peer.d.ts +0 -1
- package/dist/browser/socket-io-explicit-peer.d.ts.map +1 -1
- package/dist/browser/stream.d.ts +1 -1
- package/dist/browser/stream.d.ts.map +1 -1
- package/dist/browser/upload-progress.d.ts +3 -0
- package/dist/browser/upload-progress.d.ts.map +1 -1
- package/dist/contract/bridge-envelope.d.ts +155 -0
- package/dist/contract/bridge-envelope.d.ts.map +1 -0
- package/dist/contract/define-validation.d.ts +2 -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.d.ts +4 -4
- package/dist/contract/errors.d.ts.map +1 -1
- package/dist/contract/normalize.d.ts +3 -1
- package/dist/contract/normalize.d.ts.map +1 -1
- package/dist/contract/operation-effect.d.ts +29 -0
- package/dist/contract/operation-effect.d.ts.map +1 -0
- package/dist/contract/runtime-context.d.ts +2 -0
- package/dist/contract/runtime-context.d.ts.map +1 -1
- package/dist/contract/tool-options.d.ts +7 -0
- package/dist/contract/tool-options.d.ts.map +1 -1
- package/dist/declaration/command.d.ts +26 -0
- package/dist/declaration/command.d.ts.map +1 -0
- package/dist/declaration/declaration.d.ts +4 -22
- package/dist/declaration/declaration.d.ts.map +1 -1
- package/dist/declaration/machine-names.d.ts +11 -0
- package/dist/declaration/machine-names.d.ts.map +1 -0
- package/dist/durability/effect.d.ts.map +1 -1
- package/dist/durability/engine.d.ts.map +1 -1
- package/dist/durability/events.d.ts +5 -8
- package/dist/durability/events.d.ts.map +1 -1
- package/dist/durability/parks.d.ts +0 -5
- package/dist/durability/parks.d.ts.map +1 -1
- package/dist/durability/scheduler.d.ts +5 -0
- package/dist/durability/scheduler.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.d.ts +4 -0
- package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/acp.js +910 -0
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts +2 -0
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/claude-sdk.js +309 -0
- package/dist/entrypoints/agent-executor/claude.d.ts +5 -0
- package/dist/entrypoints/agent-executor/claude.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/claude.js +403 -0
- package/dist/entrypoints/agent-executor/codex.d.ts +4 -0
- package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/codex.js +798 -0
- package/dist/entrypoints/agent-executor/testing.d.ts +4 -0
- package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/testing.js +375 -0
- package/dist/entrypoints/agent-executor.d.ts +15 -0
- package/dist/entrypoints/agent-executor.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor.js +455 -0
- package/dist/entrypoints/agent-runtime/browser.d.ts +1 -0
- package/dist/entrypoints/agent-runtime/browser.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/browser.js +60 -30
- package/dist/entrypoints/agent-runtime/coding-tools.js +9 -12
- package/dist/entrypoints/agent-runtime/harness.js +35 -22
- package/dist/entrypoints/agent-runtime/openrouter.d.ts +6 -0
- package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/openrouter.js +675 -45
- package/dist/entrypoints/agent-runtime/postgres.d.ts +4 -0
- package/dist/entrypoints/agent-runtime/postgres.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/postgres.js +330 -0
- package/dist/entrypoints/agent-runtime/realtime.js +46 -49
- package/dist/entrypoints/agent-runtime/sandbox.d.ts +3 -1
- package/dist/entrypoints/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/sandbox.js +74 -67
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +18 -18
- package/dist/entrypoints/agent-runtime/sqlite/node.js +18 -18
- package/dist/entrypoints/agent-runtime/testing.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/testing.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/testing.js +394 -95
- package/dist/entrypoints/agent-runtime.d.ts +21 -13
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +1280 -1086
- package/dist/entrypoints/application/diagnostic-journal.js +16 -11
- package/dist/entrypoints/application/directory-inbox.js +20 -14
- package/dist/entrypoints/application/grammy.js +11 -8
- package/dist/entrypoints/application/opentelemetry.js +3 -3
- package/dist/entrypoints/application.d.ts +4 -2
- package/dist/entrypoints/application.d.ts.map +1 -1
- package/dist/entrypoints/application.js +409 -108
- package/dist/entrypoints/bin/upgrade-cli.d.ts +0 -12
- package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -1
- package/dist/entrypoints/bin/upgrade-cli.js +11 -7
- package/dist/entrypoints/cli/publish.js +10 -9
- package/dist/entrypoints/cli.d.ts +10 -3
- package/dist/entrypoints/cli.d.ts.map +1 -1
- package/dist/entrypoints/cli.js +91 -29
- package/dist/entrypoints/contract.d.ts +2 -1
- package/dist/entrypoints/contract.d.ts.map +1 -1
- package/dist/entrypoints/contract.js +13 -7
- package/dist/entrypoints/declaration.d.ts +2 -0
- package/dist/entrypoints/declaration.d.ts.map +1 -1
- package/dist/entrypoints/declaration.js +55 -44
- package/dist/entrypoints/files/packaging.js +8 -5
- package/dist/entrypoints/files.d.ts +5 -0
- package/dist/entrypoints/files.d.ts.map +1 -1
- package/dist/entrypoints/files.js +236 -47
- package/dist/entrypoints/geo.js +9 -4
- package/dist/entrypoints/google.js +14 -13
- package/dist/entrypoints/handler.d.ts +12 -0
- package/dist/entrypoints/handler.d.ts.map +1 -0
- package/dist/entrypoints/handler.js +350 -0
- package/dist/entrypoints/http.d.ts +4 -0
- package/dist/entrypoints/http.d.ts.map +1 -1
- package/dist/entrypoints/http.js +411 -5
- package/dist/entrypoints/index.d.ts +2 -0
- package/dist/entrypoints/index.d.ts.map +1 -1
- package/dist/entrypoints/index.js +664 -91
- package/dist/entrypoints/live.js +22 -12
- package/dist/entrypoints/node.d.ts +2 -1
- package/dist/entrypoints/node.d.ts.map +1 -1
- package/dist/entrypoints/node.js +34 -25
- package/dist/entrypoints/observability.d.ts +2 -0
- package/dist/entrypoints/observability.d.ts.map +1 -1
- package/dist/entrypoints/observability.js +205 -131
- package/dist/entrypoints/primitives.js +152 -14
- package/dist/entrypoints/process/owner-loss.js +2 -2
- package/dist/entrypoints/process.js +18 -92
- package/dist/entrypoints/react.js +6 -5
- package/dist/entrypoints/realtime.d.ts +1 -0
- package/dist/entrypoints/realtime.d.ts.map +1 -1
- package/dist/entrypoints/realtime.js +6 -3
- package/dist/entrypoints/release.js +4 -0
- package/dist/entrypoints/remote.js +7 -6
- package/dist/entrypoints/server.d.ts +3 -1
- package/dist/entrypoints/server.d.ts.map +1 -1
- package/dist/entrypoints/server.js +295 -194
- package/dist/entrypoints/service-host/macos.d.ts +16 -0
- package/dist/entrypoints/service-host/macos.d.ts.map +1 -0
- package/dist/entrypoints/service-host/macos.js +1998 -0
- package/dist/entrypoints/service-host.d.ts +23 -0
- package/dist/entrypoints/service-host.d.ts.map +1 -0
- package/dist/entrypoints/service-host.js +2544 -0
- package/dist/entrypoints/spend/testing.d.ts +2 -0
- package/dist/entrypoints/spend/testing.d.ts.map +1 -0
- package/dist/entrypoints/spend/testing.js +442 -0
- package/dist/entrypoints/spend.d.ts +8 -0
- package/dist/entrypoints/spend.d.ts.map +1 -0
- package/dist/entrypoints/spend.js +593 -0
- package/dist/entrypoints/sync/postgres.d.ts +12 -0
- package/dist/entrypoints/sync/postgres.d.ts.map +1 -0
- package/dist/entrypoints/sync/postgres.js +737 -0
- package/dist/entrypoints/sync.d.ts +12 -0
- package/dist/entrypoints/sync.d.ts.map +1 -0
- package/dist/entrypoints/sync.js +782 -0
- package/dist/entrypoints/telegram/grammy.js +5 -5
- package/dist/entrypoints/telegram/html.d.ts +2 -0
- package/dist/entrypoints/telegram/html.d.ts.map +1 -1
- package/dist/entrypoints/telegram/html.js +839 -2
- package/dist/entrypoints/telegram/screens.js +13 -15
- package/dist/entrypoints/telegram.d.ts +1 -1
- package/dist/entrypoints/telegram.d.ts.map +1 -1
- package/dist/entrypoints/telegram.js +286 -76
- package/dist/entrypoints/testing.js +33 -41
- package/dist/entrypoints/tools/agent.js +12 -9
- package/dist/entrypoints/tools/connections.js +664 -63
- package/dist/entrypoints/tools/contract.d.ts +2 -2
- package/dist/entrypoints/tools/contract.js +4 -1
- package/dist/entrypoints/tools/invoker.js +9 -7
- package/dist/entrypoints/tools/mcp.js +16 -13
- package/dist/entrypoints/tools/toolkit.js +21 -18
- package/dist/entrypoints/tools.d.ts +3 -1
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +105 -92
- package/dist/entrypoints/tracking/contract.js +2 -1
- package/dist/entrypoints/tracking/performance.js +4 -0
- package/dist/entrypoints/tracking.js +6 -1
- package/dist/entrypoints/voice.js +3 -3
- package/dist/entrypoints/xlsx.js +1 -1
- package/dist/files/boundary.d.ts.map +1 -1
- package/dist/files/chunk-spool.d.ts +27 -0
- package/dist/files/chunk-spool.d.ts.map +1 -1
- package/dist/files/directory-appearance.d.ts +44 -0
- package/dist/files/directory-appearance.d.ts.map +1 -0
- package/dist/files/file-io.d.ts.map +1 -1
- package/dist/files/file-stamp.d.ts +35 -0
- package/dist/files/file-stamp.d.ts.map +1 -0
- package/dist/files/json-file-reading.d.ts +37 -0
- package/dist/files/json-file-reading.d.ts.map +1 -0
- package/dist/files/native-packaging.d.ts.map +1 -1
- package/dist/files/polled-json.d.ts +121 -0
- package/dist/files/polled-json.d.ts.map +1 -0
- package/dist/files/regular-file.d.ts +125 -0
- package/dist/files/regular-file.d.ts.map +1 -0
- package/dist/geo/index.d.ts +2 -1
- package/dist/geo/index.d.ts.map +1 -1
- package/dist/geo/resolver.d.ts.map +1 -1
- package/dist/geo/types.d.ts +0 -1
- package/dist/geo/types.d.ts.map +1 -1
- package/dist/google/google.d.ts +6 -0
- package/dist/google/google.d.ts.map +1 -1
- package/dist/{index-w0eqdhyd.js → index-09f7w2qq.js} +6 -1
- package/dist/index-0djnptn8.js +501 -0
- package/dist/index-0hdm5sx6.js +1457 -0
- package/dist/{index-t05a2ry4.js → index-0p0s5hrj.js} +8 -14
- package/dist/{index-1c945ten.js → index-0r15pkjq.js} +1 -1
- package/dist/{index-v1swr26p.js → index-0tyt97nk.js} +2 -2
- package/dist/{index-332d0m9g.js → index-0x4mnwg5.js} +4 -0
- package/dist/index-118aebbg.js +48 -0
- package/dist/index-1q0n6zek.js +184 -0
- package/dist/index-27hck3z2.js +307 -0
- package/dist/index-2rf33y2h.js +77 -0
- package/dist/index-360j58vb.js +63 -0
- package/dist/{index-tt30h7mr.js → index-39n02e0q.js} +1 -1
- package/dist/index-3agqmmrg.js +42 -0
- package/dist/{index-n6hvd1r2.js → index-3b31z0pc.js} +22 -15
- package/dist/index-3djgv3ch.js +472 -0
- package/dist/{index-mfntvj58.js → index-3dq8466w.js} +1 -1
- package/dist/index-3gwp8ez6.js +200 -0
- package/dist/{index-x2d51zay.js → index-3ypvpkwr.js} +309 -345
- package/dist/index-4gk6k3zc.js +248 -0
- package/dist/index-4qvyhn23.js +40 -0
- package/dist/index-4s2w4g37.js +647 -0
- package/dist/index-4ynw5ktx.js +78 -0
- package/dist/index-5awtbyns.js +19 -0
- package/dist/{index-kxff9e9w.js → index-5e0zsbf7.js} +5 -4
- package/dist/{index-nz06qw5a.js → index-5jyjb4s0.js} +1 -1
- package/dist/{index-7zksb1ty.js → index-5ptwb6ka.js} +1 -1
- package/dist/{index-w3nv6kr8.js → index-5q0qpw3v.js} +54 -9
- package/dist/{index-mm89hd8v.js → index-5t4fpdct.js} +1 -1
- package/dist/{index-0v9xb8pz.js → index-5y7j383h.js} +5 -5
- package/dist/index-5zwac8ft.js +221 -0
- package/dist/{index-v62cpkx3.js → index-6g85s734.js} +1 -1
- package/dist/{index-sqc6ezrb.js → index-6kec3b14.js} +17 -4
- package/dist/{index-kqnd6a85.js → index-7416mhyh.js} +1 -1
- package/dist/{index-m0wsfmrc.js → index-7csn6pva.js} +37 -24
- package/dist/{index-dqpesdck.js → index-7grgs8cx.js} +25 -5
- package/dist/{index-jjvr9f15.js → index-7kfcb576.js} +129 -39
- package/dist/{index-cvjddnvd.js → index-7xp05h20.js} +19 -10
- package/dist/{index-48acz7z0.js → index-83n766x4.js} +91 -50
- package/dist/{index-ss67fxhj.js → index-877e9y8r.js} +7 -7
- package/dist/{index-aw6kx2e6.js → index-8gmmdz7k.js} +1 -1
- package/dist/{index-wt6rw7rf.js → index-8xr2eq99.js} +29 -21
- package/dist/{index-rz3z13e9.js → index-97q9kykw.js} +1 -1
- package/dist/index-97rp94ff.js +8 -0
- package/dist/{index-0w0hxp7n.js → index-9pv126eh.js} +3 -9
- package/dist/{index-x2rvpbtj.js → index-9wh98cpa.js} +110 -16
- package/dist/{index-egg0yp2j.js → index-9xr44d2g.js} +86 -210
- package/dist/{index-b2sey031.js → index-9y0afd5f.js} +24 -23
- package/dist/index-a725ayvz.js +405 -0
- package/dist/{index-nmaqxdx7.js → index-ac5rj3d4.js} +203 -90
- package/dist/{index-wqzw3qg9.js → index-agy5fqgf.js} +32 -13
- package/dist/index-ajmtxsky.js +193 -0
- package/dist/{index-ndjzbt2v.js → index-akf0xkrm.js} +4 -3
- package/dist/index-akfgymyr.js +8 -0
- package/dist/index-apv5xfef.js +13 -0
- package/dist/index-ax3wns1a.js +93 -0
- package/dist/{index-ft2wvst5.js → index-bbzvrq66.js} +1603 -342
- package/dist/index-bh4pmtr9.js +317 -0
- package/dist/{index-fa53vygr.js → index-bmaz3jzy.js} +3 -3
- package/dist/{index-8kzct1d6.js → index-bn2baakz.js} +143 -143
- package/dist/{index-m8ddk770.js → index-brhhaygm.js} +1 -1
- package/dist/index-caywx1c0.js +199 -0
- package/dist/index-cbhxhma2.js +90 -0
- package/dist/index-cfnmvcq8.js +11 -0
- package/dist/index-cv9b7fz2.js +42 -0
- package/dist/index-d4svrknj.js +156 -0
- package/dist/{index-a3z56mtn.js → index-d96c1n1q.js} +5 -3
- package/dist/{index-3ymcmpa9.js → index-dvd1qdwa.js} +33 -163
- package/dist/{index-v7rbjatr.js → index-dwa6pskj.js} +1837 -1151
- package/dist/{index-ne4j9998.js → index-e06z0tkb.js} +123 -94
- package/dist/{index-99nnsz39.js → index-en8e5zsj.js} +15 -135
- package/dist/index-fcw255hd.js +929 -0
- package/dist/{index-20hn8pbh.js → index-fmzg39a8.js} +1 -1
- package/dist/{index-fvd6pvw3.js → index-g1q7fwn9.js} +2 -2
- package/dist/index-g56ht6qf.js +98 -0
- package/dist/{index-f56ct5gb.js → index-gj1rjf78.js} +4 -3
- package/dist/{index-g6a3na27.js → index-gnjgkecx.js} +7 -3
- package/dist/index-hy4653g4.js +345 -0
- package/dist/index-j13gzgdv.js +403 -0
- package/dist/{index-pa9bhefy.js → index-j516jaaz.js} +37 -11
- package/dist/{index-t8jz0e20.js → index-j903yhp4.js} +30 -38
- package/dist/{index-9ypczvpj.js → index-jb4m241t.js} +2 -0
- package/dist/index-jrka9029.js +177 -0
- package/dist/{index-cjzaj7ev.js → index-jxtg307y.js} +23 -21
- package/dist/index-kmbpej2y.js +1152 -0
- package/dist/{index-bz9cmnqq.js → index-kt6dh1n6.js} +4 -4
- package/dist/index-ky3ardqn.js +80 -0
- package/dist/index-kyejf658.js +14 -0
- package/dist/{index-zyc64nbh.js → index-kynwa08q.js} +52 -47
- package/dist/index-kzavdze2.js +15 -0
- package/dist/{index-m200b8hs.js → index-mbd92r1w.js} +5 -3
- package/dist/index-mxt0wfjy.js +58 -0
- package/dist/{index-9cxxfkhb.js → index-n20tybgk.js} +14 -9
- package/dist/index-nbv44x0x.js +250 -0
- package/dist/index-ngwf1s3c.js +51 -0
- package/dist/{index-zfncctjp.js → index-nk0cy9g1.js} +5 -4
- package/dist/index-p1m9djt6.js +108 -0
- package/dist/{index-hs76yzt7.js → index-paff5y0r.js} +17 -11
- package/dist/{index-qaet40b2.js → index-prf6ayhf.js} +5 -7
- package/dist/{index-hkxgennw.js → index-ps3djm8d.js} +7 -1
- package/dist/{index-1v3k5zgx.js → index-qnzhmk2s.js} +528 -1129
- package/dist/{index-3bzk2645.js → index-r9kq5ark.js} +1 -1
- package/dist/{index-hkw233vx.js → index-rbd2rq3z.js} +2 -2
- package/dist/{index-r0xr7y4m.js → index-rhb33thr.js} +138 -33
- package/dist/{index-kffm4r8w.js → index-rj32hkkp.js} +2 -2
- package/dist/index-rptj3qnc.js +96 -0
- package/dist/{index-hqsbtvta.js → index-rpyn7geq.js} +11 -3
- package/dist/{index-m9hb9wnk.js → index-sfzfd2m2.js} +2 -2
- package/dist/{index-sqkttz7z.js → index-sv5svtq7.js} +1 -1
- package/dist/{index-srs8hj9c.js → index-sx3g49y2.js} +5 -1
- package/dist/{index-9mjrnqxs.js → index-t1a2jrg7.js} +21 -91
- package/dist/{index-a6w6mwda.js → index-tazm4dxf.js} +1 -1
- package/dist/{index-b51tzcgh.js → index-tf70nm22.js} +2 -2
- package/dist/index-ttexdtjj.js +28 -0
- package/dist/{index-103dp7fz.js → index-v37b2cd6.js} +1956 -3151
- package/dist/{index-0ndz5r8z.js → index-v59pxmf1.js} +17 -9
- package/dist/{index-rfkh44ss.js → index-vgytj9wp.js} +1 -1
- package/dist/{index-tnnmekgb.js → index-wa6h4tz6.js} +3 -3
- package/dist/{index-4efxzrht.js → index-wavv538x.js} +211 -196
- package/dist/{index-1szhrfsf.js → index-wbnpa8z6.js} +7 -5
- package/dist/index-werjqesf.js +43 -0
- package/dist/{index-7qyv50r4.js → index-wv8dqy7q.js} +2 -2
- package/dist/index-wz392jyz.js +10 -0
- package/dist/{index-1d7s7da0.js → index-x6sp5vpa.js} +36 -5
- package/dist/{index-bqzgaj57.js → index-x90w78yz.js} +183 -61
- package/dist/index-xgae0bn7.js +37 -0
- package/dist/index-xmr47znh.js +160 -0
- package/dist/{index-ftk3838x.js → index-xq4s9mka.js} +7 -2
- package/dist/{index-ww3gss55.js → index-xrgn784x.js} +1 -1
- package/dist/{index-fpwbskp2.js → index-xtby8rj3.js} +1 -1
- package/dist/index-xtkw9866.js +107 -0
- package/dist/{index-btjwc7xr.js → index-xypxnzhp.js} +15 -14
- package/dist/{index-yex7eg1v.js → index-y7sy1xdp.js} +6 -2
- package/dist/index-z4k0hqp9.js +476 -0
- package/dist/{index-a7ebd769.js → index-zwgwyvdt.js} +3 -3
- package/dist/internal/abort-error.d.ts +9 -0
- package/dist/internal/abort-error.d.ts.map +1 -0
- package/dist/internal/abort-race.d.ts +47 -4
- package/dist/internal/abort-race.d.ts.map +1 -1
- package/dist/internal/atomic-file.d.ts +19 -0
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/backoff.d.ts.map +1 -1
- package/dist/internal/bounded-body.d.ts +37 -1
- package/dist/internal/bounded-body.d.ts.map +1 -1
- package/dist/internal/bounded-file-read.d.ts +31 -15
- package/dist/internal/bounded-file-read.d.ts.map +1 -1
- package/dist/internal/bun-command.d.ts +11 -0
- package/dist/internal/bun-command.d.ts.map +1 -1
- package/dist/internal/channel.d.ts.map +1 -1
- package/dist/internal/darwin-binding-error.d.ts.map +1 -1
- package/dist/internal/darwin-binding.d.ts +10 -0
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/internal/deadline.d.ts +22 -2
- package/dist/internal/deadline.d.ts.map +1 -1
- package/dist/internal/exclusive-lock-owner.d.ts +20 -1
- package/dist/internal/exclusive-lock-owner.d.ts.map +1 -1
- package/dist/internal/exclusive-lock-read.d.ts +2 -0
- package/dist/internal/exclusive-lock-read.d.ts.map +1 -1
- package/dist/internal/exclusive-lock.d.ts +26 -0
- package/dist/internal/exclusive-lock.d.ts.map +1 -1
- package/dist/internal/file-observation.d.ts +49 -0
- package/dist/internal/file-observation.d.ts.map +1 -1
- package/dist/internal/json-response.d.ts +10 -0
- package/dist/internal/json-response.d.ts.map +1 -0
- package/dist/internal/open-descriptors.d.ts +5 -0
- package/dist/internal/open-descriptors.d.ts.map +1 -1
- package/dist/internal/optional-peer.d.ts.map +1 -1
- package/dist/internal/pinned-http.d.ts.map +1 -1
- package/dist/internal/positive-integer.d.ts +14 -6
- package/dist/internal/positive-integer.d.ts.map +1 -1
- package/dist/internal/postgres-query.d.ts +16 -0
- package/dist/internal/postgres-query.d.ts.map +1 -0
- package/dist/internal/process-identity.d.ts +21 -1
- package/dist/internal/process-identity.d.ts.map +1 -1
- package/dist/internal/process-instance.d.ts +6 -0
- package/dist/internal/process-instance.d.ts.map +1 -1
- package/dist/internal/request.d.ts +4 -0
- package/dist/internal/request.d.ts.map +1 -1
- package/dist/internal/secret-equal.d.ts +11 -0
- package/dist/internal/secret-equal.d.ts.map +1 -0
- package/dist/internal/secure-fetch.d.ts.map +1 -1
- package/dist/internal/sqlite.d.ts +8 -0
- package/dist/internal/sqlite.d.ts.map +1 -1
- package/dist/internal/timers.d.ts +20 -0
- package/dist/internal/timers.d.ts.map +1 -1
- package/dist/internal/typed.d.ts +11 -0
- package/dist/internal/typed.d.ts.map +1 -1
- package/dist/internal/unix-client-error.d.ts +21 -0
- package/dist/internal/unix-client-error.d.ts.map +1 -0
- package/dist/internal/unix-socket-lock.d.ts +23 -0
- package/dist/internal/unix-socket-lock.d.ts.map +1 -0
- package/dist/internal/unix-socket.d.ts +60 -0
- package/dist/internal/unix-socket.d.ts.map +1 -1
- package/dist/internal/upgrade-affects.d.ts +3 -3
- package/dist/internal/upgrade-affects.d.ts.map +1 -1
- package/dist/internal/upgrade-plan.d.ts.map +1 -1
- package/dist/json-schema/dialect.d.ts +0 -6
- package/dist/json-schema/dialect.d.ts.map +1 -1
- package/dist/json-schema/keywords.d.ts +116 -0
- package/dist/json-schema/keywords.d.ts.map +1 -0
- package/dist/json-schema/string-format.d.ts.map +1 -1
- package/dist/live/events.d.ts.map +1 -1
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/observability/bounded-logger.d.ts +3 -0
- package/dist/observability/bounded-logger.d.ts.map +1 -1
- package/dist/observability/bounded-sink.d.ts.map +1 -1
- package/dist/observability/context.d.ts +12 -2
- package/dist/observability/context.d.ts.map +1 -1
- package/dist/observability/event-loop-delay.d.ts +62 -0
- package/dist/observability/event-loop-delay.d.ts.map +1 -0
- package/dist/observability/json-logger.d.ts.map +1 -1
- package/dist/observability/log-repeat.d.ts +44 -0
- package/dist/observability/log-repeat.d.ts.map +1 -0
- package/dist/observability/spool-core.d.ts +95 -0
- package/dist/observability/spool-core.d.ts.map +1 -0
- package/dist/observability/spool-file.d.ts +46 -0
- package/dist/observability/spool-file.d.ts.map +1 -0
- package/dist/observability/spool.d.ts +14 -8
- package/dist/observability/spool.d.ts.map +1 -1
- package/dist/observability/trace.d.ts.map +1 -1
- package/dist/observability/work.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/order-key.d.ts +37 -0
- package/dist/primitives/order-key.d.ts.map +1 -0
- package/dist/process/bun-child.d.ts.map +1 -1
- package/dist/process/command-owner.d.ts.map +1 -1
- package/dist/process/contract.d.ts +4 -3
- package/dist/process/contract.d.ts.map +1 -1
- package/dist/process/group-presence.d.ts.map +1 -1
- package/dist/process/group.d.ts +5 -1
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/launch.d.ts +5 -3
- package/dist/process/launch.d.ts.map +1 -1
- package/dist/process/owner-loss-guard.d.ts.map +1 -1
- package/dist/react/cache-bridge.d.ts.map +1 -1
- package/dist/release/watcher.d.ts.map +1 -1
- package/dist/server/bridge-host.d.ts +51 -0
- package/dist/server/bridge-host.d.ts.map +1 -0
- package/dist/server/bun.d.ts +4 -4
- package/dist/server/bun.d.ts.map +1 -1
- package/dist/server/context-contribution.d.ts.map +1 -1
- package/dist/server/contract-method.d.ts.map +1 -1
- package/dist/server/create.d.ts +1 -0
- package/dist/server/create.d.ts.map +1 -1
- package/dist/server/endpoint-dispatch.d.ts.map +1 -1
- package/dist/server/endpoint-response.d.ts.map +1 -1
- package/dist/server/error-dispatch.d.ts +2 -0
- package/dist/server/error-dispatch.d.ts.map +1 -1
- package/dist/server/error-hook.d.ts +2 -0
- package/dist/server/error-hook.d.ts.map +1 -1
- package/dist/server/handler-state.d.ts +13 -2
- package/dist/server/handler-state.d.ts.map +1 -1
- package/dist/server/implement.d.ts +1 -0
- package/dist/server/implement.d.ts.map +1 -1
- package/dist/server/local-host.d.ts +47 -0
- package/dist/server/local-host.d.ts.map +1 -0
- package/dist/server/logger.d.ts +20 -3
- package/dist/server/logger.d.ts.map +1 -1
- package/dist/server/logging.d.ts +2 -1
- package/dist/server/logging.d.ts.map +1 -1
- package/dist/server/middleware/cors.d.ts +1 -0
- package/dist/server/middleware/cors.d.ts.map +1 -1
- package/dist/server/middleware/signed-link.d.ts +42 -0
- package/dist/server/middleware/signed-link.d.ts.map +1 -0
- package/dist/server/multipart-reader.d.ts +3 -1
- package/dist/server/multipart-reader.d.ts.map +1 -1
- package/dist/server/multipart.d.ts.map +1 -1
- package/dist/server/oauth/cimd.d.ts.map +1 -1
- package/dist/server/oauth/endpoints.d.ts.map +1 -1
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/server/protocol-outcome.d.ts +17 -0
- package/dist/server/protocol-outcome.d.ts.map +1 -0
- package/dist/server/raw.d.ts.map +1 -1
- package/dist/server/request-completion.d.ts +3 -1
- package/dist/server/request-completion.d.ts.map +1 -1
- package/dist/server/shutdown.d.ts.map +1 -1
- package/dist/server/socket-io-config.d.ts +1 -1
- package/dist/server/socket-io-config.d.ts.map +1 -1
- package/dist/server/streaming-route.d.ts.map +1 -1
- package/dist/server/types.d.ts +13 -10
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/unix-client-body.d.ts +4 -1
- package/dist/server/unix-client-body.d.ts.map +1 -1
- package/dist/server/unix-client-bun.d.ts.map +1 -1
- package/dist/server/unix-client.d.ts +1 -1
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/service-host/artifact-activation.d.ts +58 -0
- package/dist/service-host/artifact-activation.d.ts.map +1 -0
- package/dist/service-host/artifact-manifest.d.ts +68 -0
- package/dist/service-host/artifact-manifest.d.ts.map +1 -0
- package/dist/service-host/artifact.d.ts +43 -0
- package/dist/service-host/artifact.d.ts.map +1 -0
- package/dist/service-host/config-reloader-contract.d.ts +66 -0
- package/dist/service-host/config-reloader-contract.d.ts.map +1 -0
- package/dist/service-host/config-reloader-helpers.d.ts +32 -0
- package/dist/service-host/config-reloader-helpers.d.ts.map +1 -0
- package/dist/service-host/config-reloader-source.d.ts +47 -0
- package/dist/service-host/config-reloader-source.d.ts.map +1 -0
- package/dist/service-host/config-reloader.d.ts +6 -0
- package/dist/service-host/config-reloader.d.ts.map +1 -0
- package/dist/service-host/host-adapter.d.ts +72 -0
- package/dist/service-host/host-adapter.d.ts.map +1 -0
- package/dist/service-host/identity-unix-socket.d.ts +101 -0
- package/dist/service-host/identity-unix-socket.d.ts.map +1 -0
- package/dist/service-host/identity.d.ts +117 -0
- package/dist/service-host/identity.d.ts.map +1 -0
- package/dist/service-host/launchd-plist.d.ts +77 -0
- package/dist/service-host/launchd-plist.d.ts.map +1 -0
- package/dist/service-host/launchd-render.d.ts +91 -0
- package/dist/service-host/launchd-render.d.ts.map +1 -0
- package/dist/service-host/launchd.d.ts +82 -0
- package/dist/service-host/launchd.d.ts.map +1 -0
- package/dist/service-host/macos/bundle-plist.d.ts +50 -0
- package/dist/service-host/macos/bundle-plist.d.ts.map +1 -0
- package/dist/service-host/macos/bundle.d.ts +66 -0
- package/dist/service-host/macos/bundle.d.ts.map +1 -0
- package/dist/service-host/macos/codesign.d.ts +95 -0
- package/dist/service-host/macos/codesign.d.ts.map +1 -0
- package/dist/service-host/macos/icon.d.ts +93 -0
- package/dist/service-host/macos/icon.d.ts.map +1 -0
- package/dist/service-host/macos/launch-services.d.ts +88 -0
- package/dist/service-host/macos/launch-services.d.ts.map +1 -0
- package/dist/service-host/macos/launcher.d.ts +59 -0
- package/dist/service-host/macos/launcher.d.ts.map +1 -0
- package/dist/service-host/macos/responsibility.d.ts +90 -0
- package/dist/service-host/macos/responsibility.d.ts.map +1 -0
- package/dist/service-host/macos/runner.d.ts +69 -0
- package/dist/service-host/macos/runner.d.ts.map +1 -0
- package/dist/service-host/plist-xml.d.ts +48 -0
- package/dist/service-host/plist-xml.d.ts.map +1 -0
- package/dist/service-host/process-evidence.d.ts +17 -0
- package/dist/service-host/process-evidence.d.ts.map +1 -0
- package/dist/service-host/systemd-inspect.d.ts +126 -0
- package/dist/service-host/systemd-inspect.d.ts.map +1 -0
- package/dist/service-host/systemd-links.d.ts +23 -0
- package/dist/service-host/systemd-links.d.ts.map +1 -0
- package/dist/service-host/systemd-render.d.ts +93 -0
- package/dist/service-host/systemd-render.d.ts.map +1 -0
- package/dist/service-host/systemd.d.ts +50 -0
- package/dist/service-host/systemd.d.ts.map +1 -0
- package/dist/spend/attribution.d.ts +17 -0
- package/dist/spend/attribution.d.ts.map +1 -0
- package/dist/spend/coverage-guard.d.ts +60 -0
- package/dist/spend/coverage-guard.d.ts.map +1 -0
- package/dist/spend/coverage-lexer.d.ts +20 -0
- package/dist/spend/coverage-lexer.d.ts.map +1 -0
- package/dist/spend/facts.d.ts +23 -0
- package/dist/spend/facts.d.ts.map +1 -0
- package/dist/spend/gateway-stream.d.ts +25 -0
- package/dist/spend/gateway-stream.d.ts.map +1 -0
- package/dist/spend/gateway.d.ts +64 -0
- package/dist/spend/gateway.d.ts.map +1 -0
- package/dist/spend/receipt-merge.d.ts +13 -0
- package/dist/spend/receipt-merge.d.ts.map +1 -0
- package/dist/spend/receipt-spool.d.ts +35 -0
- package/dist/spend/receipt-spool.d.ts.map +1 -0
- package/dist/spend/reconcile.d.ts +45 -0
- package/dist/spend/reconcile.d.ts.map +1 -0
- package/dist/spend/schemas.d.ts +249 -0
- package/dist/spend/schemas.d.ts.map +1 -0
- package/dist/sync/outbox.d.ts +131 -0
- package/dist/sync/outbox.d.ts.map +1 -0
- package/dist/sync/overlay.d.ts +59 -0
- package/dist/sync/overlay.d.ts.map +1 -0
- package/dist/sync/protocol.d.ts +132 -0
- package/dist/sync/protocol.d.ts.map +1 -0
- package/dist/sync/server-store-check.d.ts +10 -0
- package/dist/sync/server-store-check.d.ts.map +1 -0
- package/dist/sync/server-store-memory.d.ts +14 -0
- package/dist/sync/server-store-memory.d.ts.map +1 -0
- package/dist/sync/server-store-postgres.d.ts +25 -0
- package/dist/sync/server-store-postgres.d.ts.map +1 -0
- package/dist/sync/server-store.d.ts +139 -0
- package/dist/sync/server-store.d.ts.map +1 -0
- package/dist/sync/session-machine.d.ts +79 -0
- package/dist/sync/session-machine.d.ts.map +1 -0
- package/dist/sync/session-snapshot.d.ts +19 -0
- package/dist/sync/session-snapshot.d.ts.map +1 -0
- package/dist/sync/session-steps.d.ts +15 -0
- package/dist/sync/session-steps.d.ts.map +1 -0
- package/dist/sync/session.d.ts +142 -0
- package/dist/sync/session.d.ts.map +1 -0
- package/dist/sync/tombstones.d.ts +53 -0
- package/dist/sync/tombstones.d.ts.map +1 -0
- package/dist/telegram/bot-api.d.ts.map +1 -1
- package/dist/telegram/broadcast-failure.d.ts.map +1 -1
- package/dist/telegram/budget-transformer.d.ts.map +1 -1
- package/dist/telegram/crypto.d.ts +2 -10
- package/dist/telegram/crypto.d.ts.map +1 -1
- package/dist/telegram/html/markdown-inline.d.ts +19 -0
- package/dist/telegram/html/markdown-inline.d.ts.map +1 -0
- package/dist/telegram/html/markdown-lines.d.ts +51 -0
- package/dist/telegram/html/markdown-lines.d.ts.map +1 -0
- package/dist/telegram/html/markdown-split.d.ts +49 -0
- package/dist/telegram/html/markdown-split.d.ts.map +1 -0
- package/dist/telegram/html/markdown.d.ts +14 -0
- package/dist/telegram/html/markdown.d.ts.map +1 -0
- package/dist/telegram/html/nodes.d.ts +26 -4
- package/dist/telegram/html/nodes.d.ts.map +1 -1
- package/dist/telegram/html/parse.d.ts.map +1 -1
- package/dist/telegram/html/render.d.ts.map +1 -1
- package/dist/telegram/init-data.d.ts.map +1 -1
- package/dist/telegram/local-files.d.ts.map +1 -1
- package/dist/telegram/operator-channel.d.ts +15 -2
- package/dist/telegram/operator-channel.d.ts.map +1 -1
- package/dist/telegram/outbound-budget.d.ts.map +1 -1
- package/dist/telegram/outbound-cost.d.ts +9 -1
- package/dist/telegram/outbound-cost.d.ts.map +1 -1
- package/dist/telegram/outbound-queue.d.ts +2 -1
- package/dist/telegram/outbound-queue.d.ts.map +1 -1
- package/dist/telegram/screens/outcome.d.ts.map +1 -1
- package/dist/telegram/send-failure.d.ts.map +1 -1
- package/dist/telegram/transport-connect.d.ts.map +1 -1
- package/dist/telegram/transport.d.ts.map +1 -1
- package/dist/telegram/update-intake.d.ts.map +1 -1
- package/dist/telegram/update-store-postgres.d.ts +2 -2
- package/dist/telegram/update-store-postgres.d.ts.map +1 -1
- package/dist/telegram/webhook.d.ts.map +1 -1
- package/dist/testing/managed-resource-conformance.d.ts.map +1 -1
- package/dist/testing/surface-conformance.d.ts.map +1 -1
- package/dist/testing/surface-manifest.d.ts +2 -0
- package/dist/testing/surface-manifest.d.ts.map +1 -1
- package/dist/tools/access.d.ts +34 -0
- package/dist/tools/access.d.ts.map +1 -0
- package/dist/tools/agent.d.ts +14 -6
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/args-classify.d.ts +154 -0
- package/dist/tools/cli/args-classify.d.ts.map +1 -0
- package/dist/tools/cli/args-fields.d.ts +14 -7
- package/dist/tools/cli/args-fields.d.ts.map +1 -1
- package/dist/tools/cli/args-json.d.ts +1 -1
- package/dist/tools/cli/args-json.d.ts.map +1 -1
- package/dist/tools/cli/args-route.d.ts +4 -48
- package/dist/tools/cli/args-route.d.ts.map +1 -1
- package/dist/tools/cli/args-scan.d.ts +70 -0
- package/dist/tools/cli/args-scan.d.ts.map +1 -0
- package/dist/tools/cli/args-tokens.d.ts +2 -1
- package/dist/tools/cli/args-tokens.d.ts.map +1 -1
- package/dist/tools/cli/args.d.ts +31 -19
- package/dist/tools/cli/args.d.ts.map +1 -1
- package/dist/tools/cli/checkpoint.d.ts.map +1 -1
- package/dist/tools/cli/command-shape.d.ts +5 -0
- package/dist/tools/cli/command-shape.d.ts.map +1 -1
- package/dist/tools/cli/command.d.ts +57 -2
- package/dist/tools/cli/command.d.ts.map +1 -1
- package/dist/tools/cli/config.d.ts +15 -58
- package/dist/tools/cli/config.d.ts.map +1 -1
- package/dist/tools/cli/create-cli.d.ts +7 -3
- package/dist/tools/cli/create-cli.d.ts.map +1 -1
- package/dist/tools/cli/format.d.ts.map +1 -1
- package/dist/tools/cli/help.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +70 -20
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/io.d.ts.map +1 -1
- package/dist/tools/cli/managed-surface.d.ts.map +1 -1
- package/dist/tools/cli/notices.d.ts.map +1 -1
- package/dist/tools/cli/policy.d.ts +66 -10
- package/dist/tools/cli/policy.d.ts.map +1 -1
- package/dist/tools/cli/prepare.d.ts +5 -4
- package/dist/tools/cli/prepare.d.ts.map +1 -1
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/run-native.d.ts.map +1 -1
- package/dist/tools/cli/run-stream.d.ts.map +1 -1
- package/dist/tools/cli/runner.d.ts +28 -0
- package/dist/tools/cli/runner.d.ts.map +1 -0
- package/dist/tools/cli/session.d.ts +12 -6
- package/dist/tools/cli/session.d.ts.map +1 -1
- package/dist/tools/cli/stream-surface.d.ts.map +1 -1
- package/dist/tools/cli/stream.d.ts.map +1 -1
- package/dist/tools/cli/unavailable.d.ts +2 -0
- package/dist/tools/cli/unavailable.d.ts.map +1 -1
- package/dist/tools/cli/unix-outcome.d.ts +8 -0
- package/dist/tools/cli/unix-outcome.d.ts.map +1 -0
- package/dist/tools/cli/update.d.ts.map +1 -1
- package/dist/tools/cli/view-columns.d.ts +18 -0
- package/dist/tools/cli/view-columns.d.ts.map +1 -0
- package/dist/tools/cli/view.d.ts.map +1 -1
- package/dist/tools/connections/define.d.ts.map +1 -1
- package/dist/tools/connections/foreign-schema-join.d.ts +28 -0
- package/dist/tools/connections/foreign-schema-join.d.ts.map +1 -0
- package/dist/tools/connections/foreign-schema.d.ts +9 -0
- package/dist/tools/connections/foreign-schema.d.ts.map +1 -0
- package/dist/tools/connections/limits.d.ts +1 -1
- package/dist/tools/connections/limits.d.ts.map +1 -1
- package/dist/tools/connections/mcp-client.d.ts.map +1 -1
- package/dist/tools/connections/mcp.d.ts.map +1 -1
- package/dist/tools/connections/openapi.d.ts.map +1 -1
- package/dist/tools/connections/runtime.d.ts +18 -6
- package/dist/tools/connections/runtime.d.ts.map +1 -1
- package/dist/tools/connections/sse-session.d.ts.map +1 -1
- package/dist/tools/connections/types.d.ts +12 -2
- package/dist/tools/connections/types.d.ts.map +1 -1
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/internal/expose.d.ts +6 -0
- package/dist/tools/internal/expose.d.ts.map +1 -0
- package/dist/tools/internal/json-projection.d.ts +17 -0
- package/dist/tools/internal/json-projection.d.ts.map +1 -0
- package/dist/tools/internal/surface-projector.d.ts +18 -4
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/invoker.d.ts +9 -2
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/lifecycle.d.ts +8 -2
- package/dist/tools/lifecycle.d.ts.map +1 -1
- package/dist/tools/list-names.d.ts +1 -1
- package/dist/tools/list-names.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/mount.d.ts +26 -14
- package/dist/tools/mcp/mount.d.ts.map +1 -1
- package/dist/tools/mcp/prepare.d.ts +2 -0
- package/dist/tools/mcp/prepare.d.ts.map +1 -1
- package/dist/tools/mcp/register.d.ts.map +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
- package/dist/tools/mcp/stdio.d.ts.map +1 -1
- package/dist/tools/mount.d.ts +7 -2
- package/dist/tools/mount.d.ts.map +1 -1
- package/dist/tools/native-definition.d.ts +1 -1
- package/dist/tools/native-definition.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-runtime-tools.d.ts +2 -2
- package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-runtime-types.d.ts +1 -1
- package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -1
- package/dist/tools/operations/define-wait-tool.d.ts.map +1 -1
- package/dist/tools/operations/mount-wait.d.ts.map +1 -1
- package/dist/tools/operations/wait-core.d.ts.map +1 -1
- package/dist/tools/read-operation.d.ts +6 -4
- package/dist/tools/read-operation.d.ts.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/runtime-tool-declaration.d.ts +4 -1
- package/dist/tools/runtime-tool-declaration.d.ts.map +1 -1
- package/dist/tools/runtime-tool.d.ts +6 -1
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/dist/tools/schema/coerce.d.ts.map +1 -1
- package/dist/tools/schema/inline-references.d.ts +7 -0
- package/dist/tools/schema/inline-references.d.ts.map +1 -0
- package/dist/tools/schema/json-schema-origin.d.ts +1 -1
- package/dist/tools/schema/json-schema-origin.d.ts.map +1 -1
- package/dist/tools/schema/presentation.d.ts +6 -0
- package/dist/tools/schema/presentation.d.ts.map +1 -1
- package/dist/tools/schema/schema.d.ts +2 -0
- package/dist/tools/schema/schema.d.ts.map +1 -1
- package/dist/tools/schema/untyped-properties.d.ts.map +1 -1
- package/dist/tools/surface.d.ts.map +1 -1
- package/dist/tools/toolkit.d.ts +6 -3
- package/dist/tools/toolkit.d.ts.map +1 -1
- package/dist/tools/transfer/define-download-tool.d.ts.map +1 -1
- package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -1
- package/dist/tools/transfer/define-view-file-tool.d.ts +2 -1
- package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -1
- package/dist/tools/transfer/mount-download.d.ts.map +1 -1
- package/dist/tools/transfer/view-file-contract.d.ts +2 -2
- package/dist/tools/transfer/view-file.d.ts +1 -2
- package/dist/tools/transfer/view-file.d.ts.map +1 -1
- package/dist/tracking/client.d.ts +0 -13
- package/dist/tracking/client.d.ts.map +1 -1
- package/dist/tracking/delivery.d.ts.map +1 -1
- package/dist/tracking/performance/collector.d.ts.map +1 -1
- package/llms/agent-executor-acp.txt +51 -0
- package/llms/agent-executor-claude-sdk.txt +31 -0
- package/llms/agent-executor-claude.txt +29 -0
- package/llms/agent-executor-codex.txt +25 -0
- package/llms/agent-executor-testing.txt +26 -0
- package/llms/agent-executor.txt +40 -0
- package/llms/agent-runtime-harness.txt +68 -5
- package/llms/agent-runtime-openrouter.txt +8 -2
- package/llms/agent-runtime-postgres.txt +30 -0
- package/llms/agent-runtime-react.txt +1 -1
- package/llms/agent-runtime-realtime.txt +1 -1
- package/llms/agent-runtime-sandbox.txt +5 -2
- package/llms/agent-runtime-sqlite-bun.txt +2 -2
- package/llms/agent-runtime-sqlite-node.txt +2 -2
- package/llms/agent-runtime-testing.txt +2 -1
- package/llms/agent-runtime.2.txt +450 -501
- package/llms/agent-runtime.3.txt +229 -267
- package/llms/agent-runtime.4.txt +23 -242
- package/llms/agent-runtime.5.txt +1 -1
- package/llms/agent-runtime.txt +551 -2
- package/llms/application-diagnostic-journal.txt +2 -0
- package/llms/application.2.txt +3 -0
- package/llms/application.3.txt +21 -4
- package/llms/application.txt +4 -1
- package/llms/cli.2.txt +259 -99
- package/llms/cli.3.txt +90 -0
- package/llms/cli.txt +95 -184
- package/llms/contract.txt +7 -6
- package/llms/declaration.txt +1 -1
- package/llms/files.txt +11 -0
- package/llms/handler.txt +25 -0
- package/llms/http.txt +18 -1
- package/llms/node.txt +3 -2
- package/llms/observability.2.txt +105 -0
- package/llms/observability.txt +14 -90
- package/llms/primitives.txt +27 -0
- package/llms/process.2.txt +2 -2
- package/llms/process.txt +10 -9
- package/llms/realtime.txt +11 -0
- package/llms/server.2.txt +355 -0
- package/llms/server.4.txt +45 -6
- package/llms/server.5.txt +6 -1
- package/llms/server.txt +143 -256
- package/llms/service-host-macos.txt +53 -0
- package/llms/service-host.txt +69 -0
- package/llms/spend-testing.txt +21 -0
- package/llms/spend.txt +173 -0
- package/llms/stitchkit.2.txt +368 -42
- package/llms/stitchkit.3.txt +164 -13
- package/llms/stitchkit.txt +95 -417
- package/llms/sync-postgres.txt +31 -0
- package/llms/sync.txt +396 -0
- package/llms/telegram-html.txt +4 -1
- package/llms/telegram.2.txt +4 -4
- package/llms/telegram.txt +105 -14
- package/llms/testing.txt +4 -3
- package/llms/tools-connections.txt +4 -4
- package/llms/tools.2.txt +78 -17
- package/llms/tools.3.txt +12 -8
- package/llms/tools.txt +85 -78
- package/llms/upgrading-0.127.0.txt +1059 -0
- package/llms/upgrading.txt +1 -0
- package/llms-full.txt +3557 -531
- package/llms.txt +43 -27
- package/native/darwin-arm64.node +0 -0
- package/native/darwin-x64.node +0 -0
- package/native-assets.json +4 -4
- package/package.json +67 -9
- package/dist/agent-runtime/sandbox-coding.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-events.d.ts +0 -5
- package/dist/agent-runtime/sqlite-events.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-history.d.ts +0 -7
- package/dist/agent-runtime/sqlite-history.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-ledger.d.ts +0 -7
- package/dist/agent-runtime/sqlite-ledger.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-reads.d.ts +0 -14
- package/dist/agent-runtime/sqlite-reads.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-rows.d.ts.map +0 -1
- package/dist/agent-runtime/tool-progress.d.ts.map +0 -1
- package/dist/entrypoints/application/schemas.d.ts +0 -15
- package/dist/entrypoints/application/schemas.d.ts.map +0 -1
- package/dist/entrypoints/application/schemas.js +0 -27
- package/dist/index-0s4xebbg.js +0 -8
- package/dist/index-57ppvpw0.js +0 -1150
- package/dist/index-5dmk54h9.js +0 -256
- package/dist/index-7cn66qdk.js +0 -92
- package/dist/index-8x0q6yfb.js +0 -247
- package/dist/index-a5qr2rj6.js +0 -26
- package/dist/index-b0kddvzw.js +0 -35
- package/dist/index-drcjjhy1.js +0 -40
- package/dist/index-eemvahkc.js +0 -21
- package/dist/index-gfk7nrht.js +0 -0
- package/dist/index-jp2qd9jb.js +0 -108
- package/dist/index-nx6eazt0.js +0 -160
- package/dist/index-wxadzdb7.js +0 -55
- package/dist/internal/until-aborted.d.ts +0 -9
- package/dist/internal/until-aborted.d.ts.map +0 -1
- package/dist/server/unix-client-error.d.ts +0 -9
- package/dist/server/unix-client-error.d.ts.map +0 -1
- package/llms/application-schemas.txt +0 -42
|
@@ -0,0 +1,929 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RegularFileError2,
|
|
3
|
+
readRegularFile2
|
|
4
|
+
} from "./index-3gwp8ez6.js";
|
|
5
|
+
import {
|
|
6
|
+
runNativeCommand2
|
|
7
|
+
} from "./index-5ptwb6ka.js";
|
|
8
|
+
import {
|
|
9
|
+
writeFileAtomic2
|
|
10
|
+
} from "./index-5zwac8ft.js";
|
|
11
|
+
import {
|
|
12
|
+
errnoOf
|
|
13
|
+
} from "./index-jj9228tt.js";
|
|
14
|
+
import {
|
|
15
|
+
compareCodeUnits,
|
|
16
|
+
serializeCanonicalJson
|
|
17
|
+
} from "./index-fmzg39a8.js";
|
|
18
|
+
|
|
19
|
+
// src/service-host/artifact-manifest.ts
|
|
20
|
+
import { createHash } from "node:crypto";
|
|
21
|
+
import { z } from "zod";
|
|
22
|
+
var ARTIFACT_MANIFEST_FILENAME2 = "manifest.json";
|
|
23
|
+
var DEFAULT_ARTIFACT_MAX_FILE_BYTES2 = 256 * 1024 * 1024;
|
|
24
|
+
var DEFAULT_ARTIFACT_MAX_FILES2 = 1e4;
|
|
25
|
+
|
|
26
|
+
class ArtifactVerificationError2 extends Error {
|
|
27
|
+
code;
|
|
28
|
+
path;
|
|
29
|
+
constructor(code, message, options) {
|
|
30
|
+
super(message, options);
|
|
31
|
+
this.name = "ArtifactVerificationError";
|
|
32
|
+
this.code = code;
|
|
33
|
+
this.path = options?.path;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function artifactRelativePathIssue(relPath, manifestFileName) {
|
|
37
|
+
if (relPath.length === 0)
|
|
38
|
+
return "Artifact file path must not be empty";
|
|
39
|
+
if (relPath.includes("\x00"))
|
|
40
|
+
return `Artifact file path contains NUL byte: ${relPath}`;
|
|
41
|
+
if (relPath.includes("\\"))
|
|
42
|
+
return `Artifact file path contains backslash: ${relPath}`;
|
|
43
|
+
if (relPath.startsWith("/"))
|
|
44
|
+
return `Artifact file path must be relative: ${relPath}`;
|
|
45
|
+
if (relPath.endsWith("/"))
|
|
46
|
+
return `Artifact file path must not end with '/': ${relPath}`;
|
|
47
|
+
if (manifestFileName !== undefined && relPath === manifestFileName) {
|
|
48
|
+
return `Artifact manifest cannot declare itself (${manifestFileName})`;
|
|
49
|
+
}
|
|
50
|
+
const segments = relPath.split("/");
|
|
51
|
+
for (const segment of segments) {
|
|
52
|
+
if (segment === "" || segment === "." || segment === "..") {
|
|
53
|
+
return `Artifact file path contains invalid segment '${segment}': ${relPath}`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
function assertSafeSingleSegment(label, value, errorCode = "ACTIVATION_FAILED") {
|
|
59
|
+
if (value.length === 0 || value === "." || value === ".." || value.includes("\x00") || !/^[A-Za-z0-9._-]+$/.test(value)) {
|
|
60
|
+
throw new ArtifactVerificationError2(errorCode, `${label} must be a safe single path segment: ${JSON.stringify(value)}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
var ArtifactFileEntrySchema2 = z.strictObject({
|
|
64
|
+
path: z.string().min(1),
|
|
65
|
+
sha256: z.string().regex(/^[0-9a-f]{64}$/),
|
|
66
|
+
size: z.number().int().nonnegative().optional(),
|
|
67
|
+
executable: z.boolean().optional()
|
|
68
|
+
}).check((ctx) => {
|
|
69
|
+
const issue = artifactRelativePathIssue(ctx.value.path);
|
|
70
|
+
if (issue !== null) {
|
|
71
|
+
ctx.issues.push({
|
|
72
|
+
code: "custom",
|
|
73
|
+
input: ctx.value.path,
|
|
74
|
+
path: ["path"],
|
|
75
|
+
message: issue
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
var ArtifactManifestSchema2 = z.strictObject({
|
|
80
|
+
version: z.string().min(1),
|
|
81
|
+
files: z.array(ArtifactFileEntrySchema2).min(1),
|
|
82
|
+
metadata: z.record(z.string(), z.unknown()).optional()
|
|
83
|
+
}).check((ctx) => {
|
|
84
|
+
const seen = new Set;
|
|
85
|
+
for (let index = 0;index < ctx.value.files.length; index += 1) {
|
|
86
|
+
const entry = ctx.value.files[index];
|
|
87
|
+
if (!entry)
|
|
88
|
+
continue;
|
|
89
|
+
if (seen.has(entry.path)) {
|
|
90
|
+
ctx.issues.push({
|
|
91
|
+
code: "custom",
|
|
92
|
+
input: entry.path,
|
|
93
|
+
path: ["files", index, "path"],
|
|
94
|
+
message: `Duplicate artifact file entry: ${entry.path}`
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
seen.add(entry.path);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
function computeSha256Hex(data) {
|
|
101
|
+
return createHash("sha256").update(data).digest("hex");
|
|
102
|
+
}
|
|
103
|
+
function computeArtifactManifestDigest2(manifest) {
|
|
104
|
+
const sortedFiles = [...manifest.files].sort((left, right) => compareCodeUnits(left.path, right.path));
|
|
105
|
+
const canonical = {
|
|
106
|
+
version: manifest.version,
|
|
107
|
+
files: sortedFiles,
|
|
108
|
+
...manifest.metadata !== undefined ? { metadata: manifest.metadata } : {}
|
|
109
|
+
};
|
|
110
|
+
return computeSha256Hex(serializeCanonicalJson(canonical));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// src/service-host/process-evidence.ts
|
|
114
|
+
function isProcessGoneError(error) {
|
|
115
|
+
const code = errnoOf(error);
|
|
116
|
+
return code === "ENOENT" || code === "ESRCH";
|
|
117
|
+
}
|
|
118
|
+
function classifyOwnerEvidence(pid, owner) {
|
|
119
|
+
if (owner.identity === "reused-pid" || owner.identity === "different-boot") {
|
|
120
|
+
return { status: "runtime-conflict", reason: "pid-reused", pid };
|
|
121
|
+
}
|
|
122
|
+
if (owner.identity === "pid-gone" || owner.liveness === "gone") {
|
|
123
|
+
return { status: "runtime-unavailable", reason: "process-gone", pid };
|
|
124
|
+
}
|
|
125
|
+
if (owner.identity !== "matched") {
|
|
126
|
+
return {
|
|
127
|
+
status: "runtime-unavailable",
|
|
128
|
+
reason: "process-unobservable",
|
|
129
|
+
pid,
|
|
130
|
+
cause: owner.cause
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// src/service-host/host-adapter.ts
|
|
137
|
+
import { lstat, readlink, realpath, unlink } from "node:fs/promises";
|
|
138
|
+
import { basename, dirname, join, posix } from "node:path";
|
|
139
|
+
var DEFAULT_COMMAND_TIMEOUT_MS = 30000;
|
|
140
|
+
var DEFAULT_MAX_OUTPUT_BYTES = 1024 * 1024;
|
|
141
|
+
var HOST_COMMAND_PATH = "/usr/sbin:/usr/bin:/sbin:/bin";
|
|
142
|
+
var HOST_COMMAND_SESSION_KEYS = [
|
|
143
|
+
"HOME",
|
|
144
|
+
"XDG_RUNTIME_DIR",
|
|
145
|
+
"DBUS_SESSION_BUS_ADDRESS"
|
|
146
|
+
];
|
|
147
|
+
function hostCommandEnv() {
|
|
148
|
+
const env = { PATH: HOST_COMMAND_PATH };
|
|
149
|
+
for (const key of HOST_COMMAND_SESSION_KEYS) {
|
|
150
|
+
const value = process.env[key];
|
|
151
|
+
if (value !== undefined)
|
|
152
|
+
env[key] = value;
|
|
153
|
+
}
|
|
154
|
+
return env;
|
|
155
|
+
}
|
|
156
|
+
function isAbsoluteNormalPath(path) {
|
|
157
|
+
return path.startsWith("/") && !path.includes("\x00") && posix.normalize(path) === path && !(path.length > 1 && path.endsWith("/"));
|
|
158
|
+
}
|
|
159
|
+
async function canonicalHostPath(path) {
|
|
160
|
+
try {
|
|
161
|
+
return join(await realpath(dirname(path)), basename(path));
|
|
162
|
+
} catch (cause) {
|
|
163
|
+
const code = errnoOf(cause);
|
|
164
|
+
if (code === "ENOENT" || code === "ENOTDIR")
|
|
165
|
+
return path;
|
|
166
|
+
throw cause;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
async function sameHostPath(adapter, reported, path) {
|
|
170
|
+
if (reported === path)
|
|
171
|
+
return true;
|
|
172
|
+
return await adapter.canonicalPath(reported) === await adapter.canonicalPath(path);
|
|
173
|
+
}
|
|
174
|
+
function isNonRegularFileError(error) {
|
|
175
|
+
return error instanceof RegularFileError2 && error.reason === "not-regular";
|
|
176
|
+
}
|
|
177
|
+
function createBaseServiceHostAdapter(adapterOptions) {
|
|
178
|
+
const decoder = new TextDecoder;
|
|
179
|
+
const nullOnNonRegular = adapterOptions.nullOnNonRegularFile ?? false;
|
|
180
|
+
return {
|
|
181
|
+
async runCommand(executable, args, options) {
|
|
182
|
+
const result = await runNativeCommand2({
|
|
183
|
+
executable,
|
|
184
|
+
args: [...args],
|
|
185
|
+
envPolicy: "declared-only",
|
|
186
|
+
env: hostCommandEnv(),
|
|
187
|
+
capture: true,
|
|
188
|
+
maxOutputBytes: DEFAULT_MAX_OUTPUT_BYTES,
|
|
189
|
+
timeoutMs: options?.timeoutMs ?? DEFAULT_COMMAND_TIMEOUT_MS,
|
|
190
|
+
...options?.stdin !== undefined ? { stdin: options.stdin } : {}
|
|
191
|
+
});
|
|
192
|
+
return {
|
|
193
|
+
exitCode: result.exitCode ?? 1,
|
|
194
|
+
stdout: decoder.decode(result.stdout),
|
|
195
|
+
stderr: decoder.decode(result.stderr)
|
|
196
|
+
};
|
|
197
|
+
},
|
|
198
|
+
async readFile(path) {
|
|
199
|
+
try {
|
|
200
|
+
return await readRegularFile2(path);
|
|
201
|
+
} catch (cause) {
|
|
202
|
+
if (errnoOf(cause) === "ENOENT" || nullOnNonRegular && isNonRegularFileError(cause)) {
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
throw cause;
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
async writeFileAtomic(path, content, options) {
|
|
209
|
+
await writeFileAtomic2(path, content, {
|
|
210
|
+
mode: options?.mode ?? adapterOptions.defaultFileMode
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
async removeFile(path) {
|
|
214
|
+
try {
|
|
215
|
+
await unlink(path);
|
|
216
|
+
} catch (cause) {
|
|
217
|
+
if (errnoOf(cause) !== "ENOENT")
|
|
218
|
+
throw cause;
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
canonicalPath: canonicalHostPath,
|
|
222
|
+
async inspectPath(path) {
|
|
223
|
+
let info;
|
|
224
|
+
try {
|
|
225
|
+
info = await lstat(path);
|
|
226
|
+
} catch (cause) {
|
|
227
|
+
if (errnoOf(cause) === "ENOENT")
|
|
228
|
+
return { kind: "missing" };
|
|
229
|
+
throw cause;
|
|
230
|
+
}
|
|
231
|
+
if (info.isSymbolicLink())
|
|
232
|
+
return { kind: "symlink", target: await readlink(path) };
|
|
233
|
+
if (info.isFile())
|
|
234
|
+
return { kind: "file", mode: info.mode & 4095 };
|
|
235
|
+
return { kind: "other" };
|
|
236
|
+
},
|
|
237
|
+
now: () => Date.now(),
|
|
238
|
+
sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// src/service-host/launchd-plist.ts
|
|
243
|
+
import { z as z3 } from "zod";
|
|
244
|
+
|
|
245
|
+
// src/service-host/launchd-render.ts
|
|
246
|
+
import { z as z2 } from "zod";
|
|
247
|
+
|
|
248
|
+
// src/service-host/plist-xml.ts
|
|
249
|
+
var defaultErrorFactory = (message) => new RangeError(message);
|
|
250
|
+
function isXml10Char(cp) {
|
|
251
|
+
return cp === 9 || cp === 10 || cp === 13 || cp >= 32 && cp <= 55295 || cp >= 57344 && cp <= 65533 || cp >= 65536 && cp <= 1114111;
|
|
252
|
+
}
|
|
253
|
+
function hasIllegalXml10Char(text, options) {
|
|
254
|
+
const allowWhitespace = options?.allowWhitespaceControls ?? true;
|
|
255
|
+
const rejectDel = options?.rejectDel ?? false;
|
|
256
|
+
for (let i = 0;i < text.length; ) {
|
|
257
|
+
const cp = text.codePointAt(i);
|
|
258
|
+
if (cp === undefined || !isXml10Char(cp))
|
|
259
|
+
return true;
|
|
260
|
+
if (rejectDel && cp === 127)
|
|
261
|
+
return true;
|
|
262
|
+
if (!allowWhitespace && (cp === 9 || cp === 10 || cp === 13))
|
|
263
|
+
return true;
|
|
264
|
+
i += cp > 65535 ? 2 : 1;
|
|
265
|
+
}
|
|
266
|
+
return false;
|
|
267
|
+
}
|
|
268
|
+
function hasInvalidXmlControlChar(value, allowWhitespaceControls = false) {
|
|
269
|
+
return hasIllegalXml10Char(value, { allowWhitespaceControls, rejectDel: true });
|
|
270
|
+
}
|
|
271
|
+
function assertPlistXmlSafe(field, value, allowWhitespaceControls = false, createError = defaultErrorFactory) {
|
|
272
|
+
if (hasInvalidXmlControlChar(value, allowWhitespaceControls)) {
|
|
273
|
+
throw createError(`Plist field '${field}' contains forbidden XML 1.0 characters`);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function escapePlistXml(value) {
|
|
277
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'").replaceAll("\r", " ");
|
|
278
|
+
}
|
|
279
|
+
function renderPlistStringElement(field, value, options) {
|
|
280
|
+
assertPlistXmlSafe(field, value, options?.allowWhitespaceControls ?? false, options?.createError);
|
|
281
|
+
return `<string>${escapePlistXml(value)}</string>`;
|
|
282
|
+
}
|
|
283
|
+
function renderPlistKeyElement(field, key, createError = defaultErrorFactory) {
|
|
284
|
+
if (key.length === 0) {
|
|
285
|
+
throw createError(`Plist key for '${field}' must not be empty`);
|
|
286
|
+
}
|
|
287
|
+
assertPlistXmlSafe(field, key, false, createError);
|
|
288
|
+
return `<key>${escapePlistXml(key)}</key>`;
|
|
289
|
+
}
|
|
290
|
+
function renderPlistValue(field, value, options) {
|
|
291
|
+
const indent = options?.indent ?? 4;
|
|
292
|
+
const pad = " ".repeat(indent);
|
|
293
|
+
const createError = options?.createError ?? defaultErrorFactory;
|
|
294
|
+
if (typeof value === "string") {
|
|
295
|
+
return `${pad}${renderPlistStringElement(field, value, options)}`;
|
|
296
|
+
}
|
|
297
|
+
if (typeof value === "boolean") {
|
|
298
|
+
return `${pad}<${value ? "true" : "false"}/>`;
|
|
299
|
+
}
|
|
300
|
+
if (typeof value === "number") {
|
|
301
|
+
if (!Number.isFinite(value)) {
|
|
302
|
+
throw createError(`Plist numeric field '${field}' must be finite`);
|
|
303
|
+
}
|
|
304
|
+
return Number.isSafeInteger(value) ? `${pad}<integer>${value}</integer>` : `${pad}<real>${value}</real>`;
|
|
305
|
+
}
|
|
306
|
+
if (Array.isArray(value)) {
|
|
307
|
+
if (value.length === 0)
|
|
308
|
+
return `${pad}<array/>`;
|
|
309
|
+
const items = value.map((item, index) => renderPlistValue(`${field}[${index}]`, item, {
|
|
310
|
+
...options,
|
|
311
|
+
indent: indent + 2
|
|
312
|
+
}));
|
|
313
|
+
return `${pad}<array>
|
|
314
|
+
${items.join(`
|
|
315
|
+
`)}
|
|
316
|
+
${pad}</array>`;
|
|
317
|
+
}
|
|
318
|
+
const entries = Object.entries(value).filter((entry) => entry[1] !== undefined).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0);
|
|
319
|
+
if (entries.length === 0)
|
|
320
|
+
return `${pad}<dict/>`;
|
|
321
|
+
const innerPad = " ".repeat(indent + 2);
|
|
322
|
+
const lines = [];
|
|
323
|
+
for (const [key, item] of entries) {
|
|
324
|
+
lines.push(`${innerPad}${renderPlistKeyElement(`${field}.${key}`, key, createError)}`);
|
|
325
|
+
lines.push(renderPlistValue(`${field}.${key}`, item, {
|
|
326
|
+
...options,
|
|
327
|
+
indent: indent + 2
|
|
328
|
+
}));
|
|
329
|
+
}
|
|
330
|
+
return `${pad}<dict>
|
|
331
|
+
${lines.join(`
|
|
332
|
+
`)}
|
|
333
|
+
${pad}</dict>`;
|
|
334
|
+
}
|
|
335
|
+
function renderPlistDocument(entries) {
|
|
336
|
+
return [
|
|
337
|
+
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
338
|
+
'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
|
|
339
|
+
'<plist version="1.0">',
|
|
340
|
+
" <dict>",
|
|
341
|
+
entries.join(`
|
|
342
|
+
`),
|
|
343
|
+
" </dict>",
|
|
344
|
+
"</plist>",
|
|
345
|
+
""
|
|
346
|
+
].join(`
|
|
347
|
+
`);
|
|
348
|
+
}
|
|
349
|
+
var NAMED_XML_ENTITIES = {
|
|
350
|
+
amp: "&",
|
|
351
|
+
lt: "<",
|
|
352
|
+
gt: ">",
|
|
353
|
+
quot: '"',
|
|
354
|
+
apos: "'"
|
|
355
|
+
};
|
|
356
|
+
var XML_TAG_NAME = /^[A-Za-z_][\w:.-]*$/;
|
|
357
|
+
function decodeXmlText(raw, allowCdataClose = false) {
|
|
358
|
+
if (!allowCdataClose && raw.includes("]]>"))
|
|
359
|
+
return;
|
|
360
|
+
let out = "";
|
|
361
|
+
let cursor = 0;
|
|
362
|
+
while (cursor < raw.length) {
|
|
363
|
+
const amp = raw.indexOf("&", cursor);
|
|
364
|
+
if (amp < 0) {
|
|
365
|
+
out += raw.slice(cursor);
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
out += raw.slice(cursor, amp);
|
|
369
|
+
const semi = raw.indexOf(";", amp + 1);
|
|
370
|
+
if (semi < 0)
|
|
371
|
+
return;
|
|
372
|
+
const body = raw.slice(amp + 1, semi);
|
|
373
|
+
if (body.startsWith("#")) {
|
|
374
|
+
let cp;
|
|
375
|
+
if (body.startsWith("#x")) {
|
|
376
|
+
const hex = body.slice(2);
|
|
377
|
+
if (!/^[0-9a-fA-F]+$/.test(hex))
|
|
378
|
+
return;
|
|
379
|
+
cp = Number.parseInt(hex, 16);
|
|
380
|
+
} else {
|
|
381
|
+
const dec = body.slice(1);
|
|
382
|
+
if (!/^[0-9]+$/.test(dec))
|
|
383
|
+
return;
|
|
384
|
+
cp = Number.parseInt(dec, 10);
|
|
385
|
+
}
|
|
386
|
+
if (!isXml10Char(cp))
|
|
387
|
+
return;
|
|
388
|
+
out += String.fromCodePoint(cp);
|
|
389
|
+
} else {
|
|
390
|
+
const resolved = NAMED_XML_ENTITIES[body];
|
|
391
|
+
if (resolved === undefined)
|
|
392
|
+
return;
|
|
393
|
+
out += resolved;
|
|
394
|
+
}
|
|
395
|
+
cursor = semi + 1;
|
|
396
|
+
}
|
|
397
|
+
return out;
|
|
398
|
+
}
|
|
399
|
+
function scanDoctypeEnd(content, start) {
|
|
400
|
+
if (!/[ \t\r\n]/.test(content[start + 9] ?? ""))
|
|
401
|
+
return -1;
|
|
402
|
+
let quote = null;
|
|
403
|
+
for (let i = start + 10;i < content.length; i += 1) {
|
|
404
|
+
const ch = content[i];
|
|
405
|
+
if (quote !== null) {
|
|
406
|
+
if (ch === quote)
|
|
407
|
+
quote = null;
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
if (ch === '"' || ch === "'")
|
|
411
|
+
quote = ch;
|
|
412
|
+
else if (ch === "[" || ch === "<")
|
|
413
|
+
return -1;
|
|
414
|
+
else if (ch === ">")
|
|
415
|
+
return i;
|
|
416
|
+
}
|
|
417
|
+
return -1;
|
|
418
|
+
}
|
|
419
|
+
function scanOpenTag(content, start) {
|
|
420
|
+
let quote = null;
|
|
421
|
+
let attrStart = -1;
|
|
422
|
+
let end = -1;
|
|
423
|
+
for (let i = start + 1;i < content.length; i += 1) {
|
|
424
|
+
const ch = content[i];
|
|
425
|
+
if (quote !== null) {
|
|
426
|
+
if (ch === "<")
|
|
427
|
+
return null;
|
|
428
|
+
if (ch === quote) {
|
|
429
|
+
if (decodeXmlText(content.slice(attrStart, i), true) === undefined)
|
|
430
|
+
return null;
|
|
431
|
+
quote = null;
|
|
432
|
+
attrStart = -1;
|
|
433
|
+
}
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
436
|
+
if (ch === '"' || ch === "'") {
|
|
437
|
+
quote = ch;
|
|
438
|
+
attrStart = i + 1;
|
|
439
|
+
} else if (ch === "<") {
|
|
440
|
+
return null;
|
|
441
|
+
} else if (ch === ">") {
|
|
442
|
+
end = i;
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
if (end < 0)
|
|
447
|
+
return null;
|
|
448
|
+
let inner = content.slice(start + 1, end).trimEnd();
|
|
449
|
+
const selfClosing = inner.endsWith("/");
|
|
450
|
+
if (selfClosing)
|
|
451
|
+
inner = inner.slice(0, -1).trimEnd();
|
|
452
|
+
const nameEnd = inner.search(/[ \t\r\n]/);
|
|
453
|
+
const name = nameEnd < 0 ? inner : inner.slice(0, nameEnd);
|
|
454
|
+
if (!XML_TAG_NAME.test(name))
|
|
455
|
+
return null;
|
|
456
|
+
return { end, name, selfClosing };
|
|
457
|
+
}
|
|
458
|
+
function extractPlistLabel(content) {
|
|
459
|
+
if (hasIllegalXml10Char(content))
|
|
460
|
+
return;
|
|
461
|
+
const stack = [];
|
|
462
|
+
let sawRootPlist = false;
|
|
463
|
+
let seenLabelKey = false;
|
|
464
|
+
let expectValueForLabel = false;
|
|
465
|
+
let capturing = null;
|
|
466
|
+
let buffer = "";
|
|
467
|
+
let foundLabel;
|
|
468
|
+
let pos = 0;
|
|
469
|
+
while (pos < content.length) {
|
|
470
|
+
if (content[pos] !== "<") {
|
|
471
|
+
const nextLt = content.indexOf("<", pos);
|
|
472
|
+
const rawText = nextLt < 0 ? content.slice(pos) : content.slice(pos, nextLt);
|
|
473
|
+
pos = nextLt < 0 ? content.length : nextLt;
|
|
474
|
+
const decoded = decodeXmlText(rawText);
|
|
475
|
+
if (decoded === undefined)
|
|
476
|
+
return;
|
|
477
|
+
if (stack.length === 0) {
|
|
478
|
+
if (decoded.trim().length > 0)
|
|
479
|
+
return;
|
|
480
|
+
} else if (capturing !== null) {
|
|
481
|
+
buffer += decoded;
|
|
482
|
+
}
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
if (content.startsWith("<![CDATA[", pos)) {
|
|
486
|
+
if (stack.length === 0)
|
|
487
|
+
return;
|
|
488
|
+
const end = content.indexOf("]]>", pos + 9);
|
|
489
|
+
if (end < 0)
|
|
490
|
+
return;
|
|
491
|
+
if (capturing !== null)
|
|
492
|
+
buffer += content.slice(pos + 9, end);
|
|
493
|
+
pos = end + 3;
|
|
494
|
+
continue;
|
|
495
|
+
}
|
|
496
|
+
if (content.startsWith("<!--", pos)) {
|
|
497
|
+
const end = content.indexOf("-->", pos + 4);
|
|
498
|
+
if (end < 0)
|
|
499
|
+
return;
|
|
500
|
+
const body = content.slice(pos + 4, end);
|
|
501
|
+
if (body.includes("--") || body.endsWith("-"))
|
|
502
|
+
return;
|
|
503
|
+
pos = end + 3;
|
|
504
|
+
continue;
|
|
505
|
+
}
|
|
506
|
+
if (content.startsWith("<?", pos)) {
|
|
507
|
+
const end = content.indexOf("?>", pos + 2);
|
|
508
|
+
if (end < 0)
|
|
509
|
+
return;
|
|
510
|
+
pos = end + 2;
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
if (content.startsWith("<!DOCTYPE", pos)) {
|
|
514
|
+
if (stack.length !== 0 || sawRootPlist)
|
|
515
|
+
return;
|
|
516
|
+
const end = scanDoctypeEnd(content, pos);
|
|
517
|
+
if (end < 0)
|
|
518
|
+
return;
|
|
519
|
+
pos = end + 1;
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
522
|
+
if (content.startsWith("<!", pos))
|
|
523
|
+
return;
|
|
524
|
+
if (content.startsWith("</", pos)) {
|
|
525
|
+
const end = content.indexOf(">", pos + 2);
|
|
526
|
+
if (end < 0)
|
|
527
|
+
return;
|
|
528
|
+
const closeName = content.slice(pos + 2, end).trimEnd();
|
|
529
|
+
if (!XML_TAG_NAME.test(closeName) || stack.pop() !== closeName)
|
|
530
|
+
return;
|
|
531
|
+
if (capturing === "key") {
|
|
532
|
+
capturing = null;
|
|
533
|
+
if (buffer === "Label") {
|
|
534
|
+
if (seenLabelKey)
|
|
535
|
+
return;
|
|
536
|
+
seenLabelKey = true;
|
|
537
|
+
expectValueForLabel = true;
|
|
538
|
+
}
|
|
539
|
+
buffer = "";
|
|
540
|
+
} else if (capturing === "string") {
|
|
541
|
+
capturing = null;
|
|
542
|
+
foundLabel = buffer;
|
|
543
|
+
buffer = "";
|
|
544
|
+
}
|
|
545
|
+
pos = end + 1;
|
|
546
|
+
continue;
|
|
547
|
+
}
|
|
548
|
+
const tag = scanOpenTag(content, pos);
|
|
549
|
+
if (tag === null || capturing !== null)
|
|
550
|
+
return;
|
|
551
|
+
if (stack.length === 0) {
|
|
552
|
+
if (sawRootPlist || tag.name !== "plist")
|
|
553
|
+
return;
|
|
554
|
+
sawRootPlist = true;
|
|
555
|
+
if (!tag.selfClosing)
|
|
556
|
+
stack.push(tag.name);
|
|
557
|
+
} else if (stack.length === 2 && stack[0] === "plist" && stack[1] === "dict") {
|
|
558
|
+
if (tag.name === "key") {
|
|
559
|
+
if (expectValueForLabel)
|
|
560
|
+
return;
|
|
561
|
+
if (!tag.selfClosing) {
|
|
562
|
+
stack.push("key");
|
|
563
|
+
capturing = "key";
|
|
564
|
+
buffer = "";
|
|
565
|
+
}
|
|
566
|
+
} else if (expectValueForLabel) {
|
|
567
|
+
expectValueForLabel = false;
|
|
568
|
+
if (tag.name === "string") {
|
|
569
|
+
if (tag.selfClosing)
|
|
570
|
+
foundLabel = "";
|
|
571
|
+
else {
|
|
572
|
+
stack.push("string");
|
|
573
|
+
capturing = "string";
|
|
574
|
+
buffer = "";
|
|
575
|
+
}
|
|
576
|
+
} else if (!tag.selfClosing) {
|
|
577
|
+
stack.push(tag.name);
|
|
578
|
+
}
|
|
579
|
+
} else if (!tag.selfClosing) {
|
|
580
|
+
stack.push(tag.name);
|
|
581
|
+
}
|
|
582
|
+
} else if (!tag.selfClosing) {
|
|
583
|
+
stack.push(tag.name);
|
|
584
|
+
}
|
|
585
|
+
pos = tag.end + 1;
|
|
586
|
+
}
|
|
587
|
+
if (stack.length !== 0 || !sawRootPlist || expectValueForLabel)
|
|
588
|
+
return;
|
|
589
|
+
return foundLabel;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// src/service-host/launchd-render.ts
|
|
593
|
+
class LaunchdJobError2 extends Error {
|
|
594
|
+
code;
|
|
595
|
+
rolledBack;
|
|
596
|
+
rollbackError;
|
|
597
|
+
constructor(code, message, options) {
|
|
598
|
+
super(message, options);
|
|
599
|
+
this.name = "LaunchdJobError";
|
|
600
|
+
this.code = code;
|
|
601
|
+
this.rolledBack = options?.rolledBack ?? false;
|
|
602
|
+
this.rollbackError = options?.rollbackError;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
var LaunchdKeepAliveSchema2 = z2.strictObject({
|
|
606
|
+
successfulExit: z2.boolean().optional(),
|
|
607
|
+
crashed: z2.boolean().optional(),
|
|
608
|
+
networkState: z2.boolean().optional()
|
|
609
|
+
});
|
|
610
|
+
var LaunchdSessionTypeSchema2 = z2.enum([
|
|
611
|
+
"Aqua",
|
|
612
|
+
"Background",
|
|
613
|
+
"LoginWindow",
|
|
614
|
+
"StandardIO",
|
|
615
|
+
"System"
|
|
616
|
+
]);
|
|
617
|
+
function isValidIdentifierToken(value) {
|
|
618
|
+
return !value.includes("/") && !value.includes("\\") && !/\s/.test(value);
|
|
619
|
+
}
|
|
620
|
+
var LaunchdPlistConfigSchema2 = z2.strictObject({
|
|
621
|
+
label: z2.string().min(1),
|
|
622
|
+
programArguments: z2.array(z2.string()).min(1),
|
|
623
|
+
environmentVariables: z2.record(z2.string(), z2.string()).optional(),
|
|
624
|
+
workingDirectory: z2.string().min(1).optional(),
|
|
625
|
+
keepAlive: z2.union([z2.boolean(), LaunchdKeepAliveSchema2]).default(true),
|
|
626
|
+
runAtLoad: z2.boolean().default(true),
|
|
627
|
+
standardOutPath: z2.string().min(1).optional(),
|
|
628
|
+
standardErrorPath: z2.string().min(1).optional(),
|
|
629
|
+
throttleInterval: z2.number().int().nonnegative().optional(),
|
|
630
|
+
processType: z2.enum(["Background", "Standard", "Adaptive", "Interactive"]).optional(),
|
|
631
|
+
associatedBundleIdentifiers: z2.union([z2.string().min(1), z2.array(z2.string().min(1)).min(1)]).optional(),
|
|
632
|
+
limitLoadToSessionType: LaunchdSessionTypeSchema2.optional()
|
|
633
|
+
}).check((ctx) => {
|
|
634
|
+
const value = ctx.value;
|
|
635
|
+
if ((value.programArguments[0] ?? "").length === 0) {
|
|
636
|
+
ctx.issues.push({
|
|
637
|
+
code: "custom",
|
|
638
|
+
input: value.programArguments,
|
|
639
|
+
path: ["programArguments", 0],
|
|
640
|
+
message: "programArguments[0] must be a non-empty executable path"
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
if (!isValidIdentifierToken(value.label)) {
|
|
644
|
+
ctx.issues.push({
|
|
645
|
+
code: "custom",
|
|
646
|
+
input: value.label,
|
|
647
|
+
path: ["label"],
|
|
648
|
+
message: "LaunchAgent label must not contain whitespace or path separators"
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
const associated = value.associatedBundleIdentifiers;
|
|
652
|
+
if (typeof associated === "string") {
|
|
653
|
+
if (!isValidIdentifierToken(associated)) {
|
|
654
|
+
ctx.issues.push({
|
|
655
|
+
code: "custom",
|
|
656
|
+
input: associated,
|
|
657
|
+
path: ["associatedBundleIdentifiers"],
|
|
658
|
+
message: "associatedBundleIdentifiers must not contain whitespace or path separators"
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
} else if (Array.isArray(associated)) {
|
|
662
|
+
for (let index = 0;index < associated.length; index += 1) {
|
|
663
|
+
const entry = associated[index];
|
|
664
|
+
if (entry !== undefined && !isValidIdentifierToken(entry)) {
|
|
665
|
+
ctx.issues.push({
|
|
666
|
+
code: "custom",
|
|
667
|
+
input: entry,
|
|
668
|
+
path: ["associatedBundleIdentifiers", index],
|
|
669
|
+
message: "associatedBundleIdentifiers entries must not contain whitespace or path separators"
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
var configError = (message) => new LaunchdJobError2("INVALID_CONFIG", message);
|
|
676
|
+
function assertSingleLine(field, value) {
|
|
677
|
+
if (value.includes(`
|
|
678
|
+
`))
|
|
679
|
+
throw configError(`${field} must not contain a line break: launchctl print shows it unescaped`);
|
|
680
|
+
}
|
|
681
|
+
function xmlString(field, value, allowWhitespaceControls = false) {
|
|
682
|
+
return renderPlistStringElement(field, value, {
|
|
683
|
+
allowWhitespaceControls,
|
|
684
|
+
createError: configError
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
function renderLaunchdPlist2(config) {
|
|
688
|
+
const parsedResult = LaunchdPlistConfigSchema2.safeParse(config);
|
|
689
|
+
if (!parsedResult.success) {
|
|
690
|
+
throw new LaunchdJobError2("INVALID_CONFIG", `Invalid launchd plist configuration: ${parsedResult.error.message}`, { cause: parsedResult.error });
|
|
691
|
+
}
|
|
692
|
+
const parsed = parsedResult.data;
|
|
693
|
+
const entries = [` <key>Label</key>
|
|
694
|
+
${xmlString("label", parsed.label)}`];
|
|
695
|
+
if (parsed.associatedBundleIdentifiers !== undefined) {
|
|
696
|
+
if (typeof parsed.associatedBundleIdentifiers === "string") {
|
|
697
|
+
entries.push(` <key>AssociatedBundleIdentifiers</key>
|
|
698
|
+
${xmlString("associatedBundleIdentifiers", parsed.associatedBundleIdentifiers)}`);
|
|
699
|
+
} else {
|
|
700
|
+
const idLines = parsed.associatedBundleIdentifiers.map((id, index) => ` ${xmlString(`associatedBundleIdentifiers[${index}]`, id)}`);
|
|
701
|
+
entries.push(` <key>AssociatedBundleIdentifiers</key>
|
|
702
|
+
<array>
|
|
703
|
+
${idLines.join(`
|
|
704
|
+
`)}
|
|
705
|
+
</array>`);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
const argLines = parsed.programArguments.map((arg, index) => {
|
|
709
|
+
assertSingleLine(`programArguments[${index}]`, arg);
|
|
710
|
+
return ` ${xmlString(`programArguments[${index}]`, arg, index > 0)}`;
|
|
711
|
+
});
|
|
712
|
+
entries.push(` <key>ProgramArguments</key>
|
|
713
|
+
<array>
|
|
714
|
+
${argLines.join(`
|
|
715
|
+
`)}
|
|
716
|
+
</array>`);
|
|
717
|
+
if (parsed.workingDirectory !== undefined) {
|
|
718
|
+
entries.push(` <key>WorkingDirectory</key>
|
|
719
|
+
${xmlString("workingDirectory", parsed.workingDirectory)}`);
|
|
720
|
+
}
|
|
721
|
+
if (parsed.environmentVariables !== undefined) {
|
|
722
|
+
const keys = Object.keys(parsed.environmentVariables).sort();
|
|
723
|
+
if (keys.length > 0) {
|
|
724
|
+
const envLines = [];
|
|
725
|
+
for (const key of keys) {
|
|
726
|
+
const value = parsed.environmentVariables[key];
|
|
727
|
+
if (value === undefined)
|
|
728
|
+
continue;
|
|
729
|
+
if (key.length === 0 || key.includes("=")) {
|
|
730
|
+
throw new LaunchdJobError2("INVALID_CONFIG", `Invalid launchd environment variable key: ${JSON.stringify(key)}`);
|
|
731
|
+
}
|
|
732
|
+
assertPlistXmlSafe(`environmentVariables.${key}`, key, false, configError);
|
|
733
|
+
envLines.push(` <key>${escapePlistXml(key)}</key>`);
|
|
734
|
+
assertSingleLine(`environmentVariables.${key}`, value);
|
|
735
|
+
envLines.push(` ${xmlString(`environmentVariables.${key}`, value, true)}`);
|
|
736
|
+
}
|
|
737
|
+
entries.push(` <key>EnvironmentVariables</key>
|
|
738
|
+
<dict>
|
|
739
|
+
${envLines.join(`
|
|
740
|
+
`)}
|
|
741
|
+
</dict>`);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
if (typeof parsed.keepAlive === "boolean") {
|
|
745
|
+
entries.push(` <key>KeepAlive</key>
|
|
746
|
+
<${parsed.keepAlive ? "true" : "false"}/>`);
|
|
747
|
+
} else {
|
|
748
|
+
const keepLines = [];
|
|
749
|
+
if (parsed.keepAlive.successfulExit !== undefined) {
|
|
750
|
+
keepLines.push(` <key>SuccessfulExit</key>
|
|
751
|
+
<${parsed.keepAlive.successfulExit ? "true" : "false"}/>`);
|
|
752
|
+
}
|
|
753
|
+
if (parsed.keepAlive.crashed !== undefined) {
|
|
754
|
+
keepLines.push(` <key>Crashed</key>
|
|
755
|
+
<${parsed.keepAlive.crashed ? "true" : "false"}/>`);
|
|
756
|
+
}
|
|
757
|
+
if (parsed.keepAlive.networkState !== undefined) {
|
|
758
|
+
keepLines.push(` <key>NetworkState</key>
|
|
759
|
+
<${parsed.keepAlive.networkState ? "true" : "false"}/>`);
|
|
760
|
+
}
|
|
761
|
+
entries.push(` <key>KeepAlive</key>
|
|
762
|
+
<dict>
|
|
763
|
+
${keepLines.join(`
|
|
764
|
+
`)}
|
|
765
|
+
</dict>`);
|
|
766
|
+
}
|
|
767
|
+
entries.push(` <key>RunAtLoad</key>
|
|
768
|
+
<${parsed.runAtLoad ? "true" : "false"}/>`);
|
|
769
|
+
if (parsed.standardOutPath !== undefined) {
|
|
770
|
+
entries.push(` <key>StandardOutPath</key>
|
|
771
|
+
${xmlString("standardOutPath", parsed.standardOutPath)}`);
|
|
772
|
+
}
|
|
773
|
+
if (parsed.standardErrorPath !== undefined) {
|
|
774
|
+
entries.push(` <key>StandardErrorPath</key>
|
|
775
|
+
${xmlString("standardErrorPath", parsed.standardErrorPath)}`);
|
|
776
|
+
}
|
|
777
|
+
if (parsed.throttleInterval !== undefined) {
|
|
778
|
+
entries.push(` <key>ThrottleInterval</key>
|
|
779
|
+
<integer>${parsed.throttleInterval}</integer>`);
|
|
780
|
+
}
|
|
781
|
+
if (parsed.processType !== undefined) {
|
|
782
|
+
entries.push(` <key>ProcessType</key>
|
|
783
|
+
${xmlString("processType", parsed.processType)}`);
|
|
784
|
+
}
|
|
785
|
+
if (parsed.limitLoadToSessionType !== undefined) {
|
|
786
|
+
entries.push(` <key>LimitLoadToSessionType</key>
|
|
787
|
+
${xmlString("limitLoadToSessionType", parsed.limitLoadToSessionType)}`);
|
|
788
|
+
}
|
|
789
|
+
return renderPlistDocument(entries);
|
|
790
|
+
}
|
|
791
|
+
function parseLaunchctlPrint2(stdout) {
|
|
792
|
+
let inJob = false;
|
|
793
|
+
let inNestedBlock = false;
|
|
794
|
+
let state = null;
|
|
795
|
+
let program = null;
|
|
796
|
+
let pid = null;
|
|
797
|
+
let path = null;
|
|
798
|
+
let lastExitCode = null;
|
|
799
|
+
for (const rawLine of stdout.split(`
|
|
800
|
+
`)) {
|
|
801
|
+
const line = rawLine.trimEnd();
|
|
802
|
+
if (line.length === 0)
|
|
803
|
+
continue;
|
|
804
|
+
if (!inJob) {
|
|
805
|
+
if (!line.startsWith("\t") && line.endsWith("{")) {
|
|
806
|
+
inJob = true;
|
|
807
|
+
}
|
|
808
|
+
continue;
|
|
809
|
+
}
|
|
810
|
+
if (inNestedBlock) {
|
|
811
|
+
if (line === "\t}")
|
|
812
|
+
inNestedBlock = false;
|
|
813
|
+
continue;
|
|
814
|
+
}
|
|
815
|
+
if (line === "}") {
|
|
816
|
+
inJob = false;
|
|
817
|
+
continue;
|
|
818
|
+
}
|
|
819
|
+
if (!line.startsWith("\t") || line.startsWith("\t\t"))
|
|
820
|
+
continue;
|
|
821
|
+
const body = line.slice(1);
|
|
822
|
+
if (body.endsWith("{")) {
|
|
823
|
+
inNestedBlock = true;
|
|
824
|
+
continue;
|
|
825
|
+
}
|
|
826
|
+
const eq = body.indexOf(" = ");
|
|
827
|
+
if (eq <= 0)
|
|
828
|
+
continue;
|
|
829
|
+
const key = body.slice(0, eq).trim();
|
|
830
|
+
const value = body.slice(eq + 3).trim();
|
|
831
|
+
if (key === "state" && value.length > 0)
|
|
832
|
+
state ??= value;
|
|
833
|
+
else if (key === "program" && value.length > 0)
|
|
834
|
+
program ??= value;
|
|
835
|
+
else if (key === "path" && value.length > 0)
|
|
836
|
+
path ??= value;
|
|
837
|
+
else if (key === "pid" && /^\d+$/.test(value)) {
|
|
838
|
+
const parsedPid = Number(value);
|
|
839
|
+
if (Number.isSafeInteger(parsedPid) && parsedPid > 0)
|
|
840
|
+
pid = parsedPid;
|
|
841
|
+
} else if (key === "last exit code" && /^-?\d+$/.test(value)) {
|
|
842
|
+
const parsedCode = Number(value);
|
|
843
|
+
if (Number.isSafeInteger(parsedCode))
|
|
844
|
+
lastExitCode = parsedCode;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return {
|
|
848
|
+
loaded: true,
|
|
849
|
+
state,
|
|
850
|
+
program,
|
|
851
|
+
pid,
|
|
852
|
+
path,
|
|
853
|
+
lastExitCode
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
// src/service-host/launchd-plist.ts
|
|
858
|
+
var PLUTIL_PATH2 = "/usr/bin/plutil";
|
|
859
|
+
var LAUNCHCTL_PATH = "/bin/launchctl";
|
|
860
|
+
var DEFAULT_PLIST_MODE = 420;
|
|
861
|
+
var PlistRecordSchema = z3.record(z3.string(), z3.unknown());
|
|
862
|
+
function createDefaultLaunchdHostAdapter2() {
|
|
863
|
+
return createBaseServiceHostAdapter({
|
|
864
|
+
defaultFileMode: DEFAULT_PLIST_MODE,
|
|
865
|
+
nullOnNonRegularFile: false
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
function assertAbsolutePlistPath(path) {
|
|
869
|
+
if (!isAbsoluteNormalPath(path)) {
|
|
870
|
+
throw new LaunchdJobError2("INVALID_CONFIG", `Plist path must be an absolute, normal path without NUL bytes: ${JSON.stringify(path)}`);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
async function lintLaunchdPlist2(options) {
|
|
874
|
+
const hasContent = options.content !== undefined;
|
|
875
|
+
const hasPath = options.path !== undefined;
|
|
876
|
+
if (hasContent === hasPath) {
|
|
877
|
+
throw new LaunchdJobError2("INVALID_CONFIG", "lintLaunchdPlist requires exactly one of content or path");
|
|
878
|
+
}
|
|
879
|
+
const adapter = options.adapter ?? createDefaultLaunchdHostAdapter2();
|
|
880
|
+
let result;
|
|
881
|
+
if (options.content !== undefined) {
|
|
882
|
+
result = await adapter.runCommand(PLUTIL_PATH2, ["-lint", "-"], {
|
|
883
|
+
stdin: new TextEncoder().encode(options.content),
|
|
884
|
+
...options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}
|
|
885
|
+
});
|
|
886
|
+
} else {
|
|
887
|
+
const path = options.path ?? "";
|
|
888
|
+
assertAbsolutePlistPath(path);
|
|
889
|
+
result = await adapter.runCommand(PLUTIL_PATH2, ["-lint", path], {
|
|
890
|
+
...options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
if (result.exitCode !== 0) {
|
|
894
|
+
const detail = (result.stderr || result.stdout).trim();
|
|
895
|
+
throw new LaunchdJobError2("INVALID_PLIST", `plutil -lint rejected plist (exit ${result.exitCode})${detail ? `: ${detail}` : ""}`);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
function isMissingPlistOutput(text) {
|
|
899
|
+
if (/\bCode=257\b/.test(text))
|
|
900
|
+
return false;
|
|
901
|
+
return /No such file or directory/i.test(text) || /file does not exist/i.test(text) || /\bCode=260\b/.test(text);
|
|
902
|
+
}
|
|
903
|
+
async function readLaunchdPlist2(options) {
|
|
904
|
+
assertAbsolutePlistPath(options.path);
|
|
905
|
+
const adapter = options.adapter ?? createDefaultLaunchdHostAdapter2();
|
|
906
|
+
const existing = await adapter.readFile(options.path);
|
|
907
|
+
if (existing === null)
|
|
908
|
+
return null;
|
|
909
|
+
const result = await adapter.runCommand(PLUTIL_PATH2, ["-convert", "json", "-o", "-", options.path], options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : undefined);
|
|
910
|
+
if (result.exitCode !== 0) {
|
|
911
|
+
const detail = (result.stderr || result.stdout).trim();
|
|
912
|
+
if (isMissingPlistOutput(detail))
|
|
913
|
+
return null;
|
|
914
|
+
throw new LaunchdJobError2("INVALID_PLIST", `plutil failed to read ${options.path} (exit ${result.exitCode})${detail ? `: ${detail}` : ""}`);
|
|
915
|
+
}
|
|
916
|
+
let parsed;
|
|
917
|
+
try {
|
|
918
|
+
parsed = JSON.parse(result.stdout);
|
|
919
|
+
} catch (cause) {
|
|
920
|
+
throw new LaunchdJobError2("INVALID_PLIST", `plutil returned invalid JSON for ${options.path}`, { cause });
|
|
921
|
+
}
|
|
922
|
+
const checked = PlistRecordSchema.safeParse(parsed);
|
|
923
|
+
if (!checked.success) {
|
|
924
|
+
throw new LaunchdJobError2("INVALID_PLIST", `Plist top-level value at ${options.path} must be a dictionary`, { cause: checked.error });
|
|
925
|
+
}
|
|
926
|
+
return checked.data;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
export { ARTIFACT_MANIFEST_FILENAME2, DEFAULT_ARTIFACT_MAX_FILE_BYTES2, DEFAULT_ARTIFACT_MAX_FILES2, ArtifactVerificationError2, artifactRelativePathIssue, assertSafeSingleSegment, ArtifactFileEntrySchema2, ArtifactManifestSchema2, computeSha256Hex, computeArtifactManifestDigest2, isProcessGoneError, classifyOwnerEvidence, isAbsoluteNormalPath, sameHostPath, createBaseServiceHostAdapter, renderPlistStringElement, renderPlistKeyElement, renderPlistValue, renderPlistDocument, extractPlistLabel, LaunchdJobError2, LaunchdKeepAliveSchema2, LaunchdSessionTypeSchema2, LaunchdPlistConfigSchema2, renderLaunchdPlist2, parseLaunchctlPrint2, PLUTIL_PATH2, LAUNCHCTL_PATH, createDefaultLaunchdHostAdapter2, assertAbsolutePlistPath, lintLaunchdPlist2, readLaunchdPlist2 };
|