stitchkit 0.88.0 → 0.90.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 +182 -0
- package/dist/agent-runtime/child-blocking.d.ts +17 -0
- package/dist/agent-runtime/child-blocking.d.ts.map +1 -0
- package/dist/agent-runtime/child-budget-policy.d.ts +23 -0
- package/dist/agent-runtime/child-budget-policy.d.ts.map +1 -0
- package/dist/agent-runtime/children-contract.d.ts +155 -0
- package/dist/agent-runtime/children-contract.d.ts.map +1 -0
- package/dist/agent-runtime/children.d.ts +4 -99
- package/dist/agent-runtime/children.d.ts.map +1 -1
- package/dist/agent-runtime/coding-shell-process.d.ts +33 -0
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -0
- package/dist/agent-runtime/coding-tool-contract.d.ts +18 -0
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-utf8.d.ts +28 -0
- package/dist/agent-runtime/coding-tool-utf8.d.ts.map +1 -0
- package/dist/agent-runtime/contained-files.d.ts +20 -0
- package/dist/agent-runtime/contained-files.d.ts.map +1 -1
- package/dist/agent-runtime/durability-contract.d.ts +176 -0
- package/dist/agent-runtime/durability-contract.d.ts.map +1 -0
- package/dist/agent-runtime/durability-json.d.ts +3 -0
- package/dist/agent-runtime/durability-json.d.ts.map +1 -0
- package/dist/agent-runtime/durability-ledger.d.ts +16 -0
- package/dist/agent-runtime/durability-ledger.d.ts.map +1 -0
- package/dist/agent-runtime/durability-scheduler.d.ts +29 -0
- package/dist/agent-runtime/durability-scheduler.d.ts.map +1 -0
- package/dist/agent-runtime/durability.d.ts +14 -0
- package/dist/agent-runtime/durability.d.ts.map +1 -0
- package/dist/agent-runtime/event-search.d.ts.map +1 -1
- package/dist/agent-runtime/harness-contract.d.ts +37 -0
- package/dist/agent-runtime/harness-contract.d.ts.map +1 -1
- package/dist/agent-runtime/harness.d.ts +8 -0
- package/dist/agent-runtime/harness.d.ts.map +1 -1
- package/dist/agent-runtime/prompt.d.ts +23 -0
- package/dist/agent-runtime/prompt.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +4 -0
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/runtime.d.ts +13 -0
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-broker.d.ts +7 -0
- package/dist/agent-runtime/sandbox-broker.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-bubblewrap-args.d.ts +9 -0
- package/dist/agent-runtime/sandbox-bubblewrap-args.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts +22 -0
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-bubblewrap.d.ts +14 -0
- package/dist/agent-runtime/sandbox-bubblewrap.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-coding-adapter.d.ts +15 -0
- package/dist/agent-runtime/sandbox-coding-adapter.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-coding.d.ts +15 -0
- package/dist/agent-runtime/sandbox-coding.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-contract.d.ts +93 -0
- package/dist/agent-runtime/sandbox-contract.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-process-owner.d.ts +11 -0
- package/dist/agent-runtime/sandbox-process-owner.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-process.d.ts +8 -0
- package/dist/agent-runtime/sandbox-process.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-session.d.ts +5 -0
- package/dist/agent-runtime/sandbox-session.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox.d.ts +19 -0
- package/dist/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver.d.ts +127 -0
- package/dist/agent-runtime/store-driver.d.ts.map +1 -1
- package/dist/agent-runtime/store-events.d.ts +104 -0
- package/dist/agent-runtime/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/store-migrations/v2-to-v3.d.ts +14 -0
- package/dist/agent-runtime/store-migrations/v2-to-v3.d.ts.map +1 -0
- package/dist/agent-runtime/store.d.ts +115 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/agent-runtime-coding-tools.js +11 -1247
- package/dist/agent-runtime-harness.d.ts +1 -1
- package/dist/agent-runtime-harness.d.ts.map +1 -1
- package/dist/agent-runtime-harness.js +65 -15
- package/dist/agent-runtime-openrouter.d.ts +3 -12
- package/dist/agent-runtime-openrouter.d.ts.map +1 -1
- package/dist/agent-runtime-openrouter.js +10 -7
- package/dist/agent-runtime-sandbox.d.ts +5 -0
- package/dist/agent-runtime-sandbox.d.ts.map +1 -0
- package/dist/agent-runtime-sandbox.js +797 -0
- package/dist/agent-runtime-sqlite-bun.js +3 -3
- package/dist/agent-runtime-sqlite-node.js +3 -3
- package/dist/agent-runtime.d.ts +5 -4
- package/dist/agent-runtime.d.ts.map +1 -1
- package/dist/agent-runtime.js +259 -65
- package/dist/application/watch-hub.d.ts +24 -2
- package/dist/application/watch-hub.d.ts.map +1 -1
- package/dist/application.js +127 -37
- package/dist/cli.js +8 -8
- package/dist/index-2na0qrfn.js +214 -0
- package/dist/{index-rcgsnrr6.js → index-31jw8fjq.js} +3 -3
- package/dist/{index-9hw9eq48.js → index-7601qfg1.js} +14 -14
- package/dist/{index-3xnq72rz.js → index-7rkhw9ec.js} +14 -1
- package/dist/{index-0vfdh685.js → index-8c3a7m4g.js} +1 -1
- package/dist/{index-t7gh5w3v.js → index-bn2cjajt.js} +27 -6
- package/dist/index-cp20z0n6.js +1351 -0
- package/dist/{index-qp3vshvc.js → index-fadnxwna.js} +87 -5
- package/dist/{index-v1qk37y9.js → index-hrbajay7.js} +106 -4
- package/dist/{index-p86mxmpp.js → index-hw2chdvy.js} +646 -43
- package/dist/{index-0ydchz76.js → index-mnm4qp0p.js} +5 -5
- package/dist/{index-1szetq6f.js → index-q3ve2d1k.js} +30 -8
- package/dist/{index-6krwcdcf.js → index-zwkgfq1s.js} +95 -85
- package/dist/{index-wn9cb82y.js → index-zyvby92n.js} +12 -9
- package/dist/index.js +13 -13
- package/dist/live/watch-client.d.ts +2 -1
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/live/watch-contract.d.ts +70 -4
- package/dist/live/watch-contract.d.ts.map +1 -1
- package/dist/live/watch-delta.d.ts +110 -0
- package/dist/live/watch-delta.d.ts.map +1 -0
- package/dist/live.d.ts +2 -1
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +56 -4
- package/dist/observability/changes.d.ts +55 -0
- package/dist/observability/changes.d.ts.map +1 -0
- package/dist/observability/index.d.ts +2 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +127 -0
- package/dist/observability/spool.d.ts +53 -0
- package/dist/observability/spool.d.ts.map +1 -0
- package/dist/server/index.js +9 -9
- package/dist/testing/agent-store-conformance.d.ts.map +1 -1
- package/dist/testing.js +57 -23
- package/dist/tool-invoker.js +6 -6
- package/dist/tools/agent.d.ts +6 -0
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/connections/define.d.ts +6 -0
- package/dist/tools/connections/define.d.ts.map +1 -0
- package/dist/tools/connections/errors.d.ts +50 -0
- package/dist/tools/connections/errors.d.ts.map +1 -0
- package/dist/tools/connections/http.d.ts +3 -0
- package/dist/tools/connections/http.d.ts.map +1 -0
- package/dist/tools/connections/index.d.ts +19 -0
- package/dist/tools/connections/index.d.ts.map +1 -0
- package/dist/tools/connections/index.js +1047 -0
- package/dist/tools/connections/instance.d.ts +3 -0
- package/dist/tools/connections/instance.d.ts.map +1 -0
- package/dist/tools/connections/json-rpc.d.ts +8 -0
- package/dist/tools/connections/json-rpc.d.ts.map +1 -0
- package/dist/tools/connections/limits.d.ts +36 -0
- package/dist/tools/connections/limits.d.ts.map +1 -0
- package/dist/tools/connections/mcp-client.d.ts +44 -0
- package/dist/tools/connections/mcp-client.d.ts.map +1 -0
- package/dist/tools/connections/mcp.d.ts +5 -0
- package/dist/tools/connections/mcp.d.ts.map +1 -0
- package/dist/tools/connections/mount.d.ts +12 -0
- package/dist/tools/connections/mount.d.ts.map +1 -0
- package/dist/tools/connections/openapi-document.d.ts +4 -0
- package/dist/tools/connections/openapi-document.d.ts.map +1 -0
- package/dist/tools/connections/openapi.d.ts +5 -0
- package/dist/tools/connections/openapi.d.ts.map +1 -0
- package/dist/tools/connections/runtime.d.ts +29 -0
- package/dist/tools/connections/runtime.d.ts.map +1 -0
- package/dist/tools/connections/schema-budget.d.ts +8 -0
- package/dist/tools/connections/schema-budget.d.ts.map +1 -0
- package/dist/tools/connections/sse-frames.d.ts +7 -0
- package/dist/tools/connections/sse-frames.d.ts.map +1 -0
- package/dist/tools/connections/sse-session.d.ts +26 -0
- package/dist/tools/connections/sse-session.d.ts.map +1 -0
- package/dist/tools/connections/ssrf.d.ts +15 -0
- package/dist/tools/connections/ssrf.d.ts.map +1 -0
- package/dist/tools/connections/types.d.ts +60 -0
- package/dist/tools/connections/types.d.ts.map +1 -0
- package/dist/tools/durability-context.d.ts +7 -0
- package/dist/tools/durability-context.d.ts.map +1 -0
- package/dist/tools/execute.d.ts +2 -0
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/registry.d.ts +38 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/runtime-tool.d.ts +4 -0
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/dist/tools.d.ts +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +83 -26
- package/llms-full.txt +386 -16
- package/llms.txt +1 -0
- package/package.json +9 -1
- package/dist/index-dre2ywck.js +0 -48
- package/dist/{index-evcnmsc3.js → index-t7fkyxcr.js} +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSqliteAgentRuntimeStore,
|
|
3
3
|
initializeAgentRuntimeSqlite
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-fadnxwna.js";
|
|
5
5
|
import"./index-crykmqkr.js";
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
6
|
+
import"./index-hrbajay7.js";
|
|
7
|
+
import"./index-zwkgfq1s.js";
|
|
8
8
|
import"./index-gtj3zc53.js";
|
|
9
9
|
|
|
10
10
|
// src/agent-runtime-sqlite-bun.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSqliteAgentRuntimeStore,
|
|
3
3
|
initializeAgentRuntimeSqlite
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-fadnxwna.js";
|
|
5
5
|
import"./index-crykmqkr.js";
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
6
|
+
import"./index-hrbajay7.js";
|
|
7
|
+
import"./index-zwkgfq1s.js";
|
|
8
8
|
import"./index-gtj3zc53.js";
|
|
9
9
|
|
|
10
10
|
// src/agent-runtime-sqlite-node.ts
|
package/dist/agent-runtime.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export type { AgentToolDefinition } from './agent-runtime/agent-tool.js';
|
|
2
2
|
export { createAgentChildTools } from './agent-runtime/child-tools.js';
|
|
3
|
-
export { type AgentChildBudget, AgentChildBudgetSchema, type AgentChildHandle, type AgentChildManager, type AgentChildRecord, AgentChildRecordSchema, type AgentChildState, AgentChildStateSchema, agentChildBudgetStopPolicy, createSqliteAgentChildManager, } from './agent-runtime/children.js';
|
|
3
|
+
export { type AgentChildBlockingDecision, type AgentChildBlockingEvent, AgentChildBlockingEventSchema, type AgentChildBlockingKind, AgentChildBlockingKindSchema, type AgentChildBlockingSource, AgentChildBlockingSourceSchema, type AgentChildBudget, AgentChildBudgetSchema, type AgentChildHandle, type AgentChildManager, type AgentChildRecord, AgentChildRecordSchema, type AgentChildState, AgentChildStateSchema, agentChildBudgetStopPolicy, createSqliteAgentChildManager, } from './agent-runtime/children.js';
|
|
4
4
|
export { type AgentCompactionContext, type AgentCompactionResult, type CompactableHistory, type SelectCompactableHistoryOptions, type StructuredCompactionConfig, selectCompactableHistory, structuredCompaction, } from './agent-runtime/compaction.js';
|
|
5
5
|
export { AgentContextOverflowError } from './agent-runtime/context-refusal.js';
|
|
6
6
|
export { type AgentConversationMessagePage, AgentConversationMessagePageSchema, type AgentConversationPage, AgentConversationPageSchema, type AgentConversationReader, type AgentConversationSummary, AgentConversationSummarySchema, } from './agent-runtime/conversations.js';
|
|
7
7
|
export { type AgentCoordinatedRun, type AgentInputPolicy, type AgentRunTicket, type AgentSessionCloseOptions, type AgentSessionCloseResult, type AgentSessionCoordinator, type AgentStopReason, createAgentSessionCoordinator, } from './agent-runtime/coordinator.js';
|
|
8
8
|
export { createDeferredAgentToolSurface, type DeferredAgentRuntimeToolDefinition, type DeferredAgentToolCommonConfig, type DeferredAgentToolController, type DeferredAgentToolEvent, type DeferredAgentToolManifestEntry, DeferredAgentToolMatchSchema, type DeferredAgentToolMountConfig, type DeferredAgentToolReceipt, DeferredAgentToolReceiptSchema, type DeferredAgentToolSearchContext, DeferredAgentToolSearchInputSchema, type DeferredAgentToolSurfaceConfig, type DeferredAgentToolSurfaceDefinition, } from './agent-runtime/deferred-tools.js';
|
|
9
|
+
export { createLocalStepDurability, DURABILITY_STEP_EVENT_KIND, type LocalStepDurability, type LocalStepDurabilityOptions, ParkAbortedError, ParkRecordDecodeError, StepAbortedError, type StepDurabilityLedger, StepResultDecodeError, StepResultNotSerializableError, type StepRunOptions, } from './agent-runtime/durability.js';
|
|
9
10
|
export { type AgentEventSearchResult, AgentEventSearchResultSchema, createSqliteAgentEventSearch, } from './agent-runtime/event-search.js';
|
|
10
11
|
export { createAgentEventSearchTools } from './agent-runtime/event-search-tools.js';
|
|
11
12
|
export { AgentAdmissionEventSchema, AgentAttemptResetEventSchema, AgentCheckpointEventSchema, AgentReasoningDeltaEventSchema, AgentReasoningEndEventSchema, AgentReasoningStartEventSchema, AgentRunOperationEventSchema, AgentRunStateEventSchema, type AgentRuntimeCursorAdvance, type AgentRuntimeEvent, type AgentRuntimeEventCursor, AgentRuntimeEventCursorSchema, AgentRuntimeEventSchema, type AgentRuntimeEventSink, type AgentRuntimeEventSinkConfig, type AgentRuntimePublisher, AgentTerminalEventSchema, AgentToolStatusEventSchema, AgentTransientDeltaEventSchema, advanceAgentRuntimeEventCursor, agentDurableEventId, createAgentRuntimeEventSink, } from './agent-runtime/events.js';
|
|
@@ -21,15 +22,15 @@ export { AgentConversationPurgedError, type AgentConversationPurgeInput, AgentCo
|
|
|
21
22
|
export { type AgentRetryPolicy, recordAgentRetryDecision } from './agent-runtime/retry-policy.js';
|
|
22
23
|
export { type AgentContextUsage, type AgentRuntime, type AgentRuntimeAbandonInput, type AgentRuntimeAdmission, type AgentRuntimeConfig, type AgentRuntimeInput, type AgentRuntimeInterruptInput, type AgentRuntimePrepareStep, type AgentRuntimeProtocolInput, type AgentRuntimeRecordIds, type AgentRuntimeRecoverOptions, type AgentRuntimeRecoveryDecision, type AgentRuntimeRecoveryInput, type AgentRuntimeRecoveryOutcome, type AgentRuntimeRunContext, type AgentRuntimeStopPolicy, createAgentRuntime, } from './agent-runtime/runtime.js';
|
|
23
24
|
export type { AgentRuntimeResult } from './agent-runtime/runtime-result.js';
|
|
24
|
-
export { type AgentProcessSandbox, type AgentSandboxGrade, AgentSandboxGradeSchema, type AgentSandboxRestriction, AgentSandboxRestrictionSchema, missingSandboxRestrictions, probeAgentProcessSandbox, recordAgentSandboxProbe, } from './agent-runtime/sandbox.js';
|
|
25
|
+
export { type AgentProcessSandbox, type AgentSandboxGrade, AgentSandboxGradeSchema, type AgentSandboxOutputStream, type AgentSandboxProcess, type AgentSandboxRestriction, AgentSandboxRestrictionSchema, missingSandboxRestrictions, probeAgentProcessSandbox, recordAgentSandboxProbe, } from './agent-runtime/sandbox.js';
|
|
25
26
|
export { createAgentScheduleTools } from './agent-runtime/schedule-tools.js';
|
|
26
27
|
export { type AgentSchedule, AgentScheduleSchema, type AgentScheduleService, createAgentScheduleService, } from './agent-runtime/schedules.js';
|
|
27
28
|
export * from './agent-runtime/schemas.js';
|
|
28
29
|
export { createSqliteAgentSpillStore } from './agent-runtime/spill.js';
|
|
29
30
|
export { type AgentStateSlotDefinition, type AgentStateSlotStore, type AgentStateSlotValue, type AnyAgentStateSlot, agentGoalStateSlot, agentTodoStateSlot, createAgentStateSlotStore, defineStateSlot, renderAgentStateSlots, } from './agent-runtime/state-slots.js';
|
|
30
31
|
export { createAgentStateTools } from './agent-runtime/state-tools.js';
|
|
31
|
-
export { type AcceptInputAndAssignRun, AcceptInputAndAssignRunSchema, type AcquireAgentRun, AcquireAgentRunSchema, type AgentRecoverableDescriptor, AgentRecoverableDescriptorSchema, type AgentRecoverablePage, AgentRecoverablePageSchema, type AgentRuntimeStore, type AgentRunView, AgentRunViewSchema, AgentStoreAppliedSchema, AgentStoreConflictSchema, AgentStoreDuplicateSchema, type AgentStoreMutationResult, AgentStoreMutationResultSchema, AgentStoreNotFoundSchema, type CheckpointRunAssistant, CheckpointRunAssistantSchema, type CommitRunTerminal, CommitRunTerminalSchema, type RecordRunOperation, RecordRunOperationSchema, type RecoverAgentRun, RecoverAgentRunSchema, type ReplaceCompactedRange, ReplaceCompactedRangeSchema, type RequestRunInterrupt, RequestRunInterruptSchema, } from './agent-runtime/store.js';
|
|
32
|
-
export { ACTIVE_AGENT_RUN_STATES, type AgentAdmissionReceipt, AgentAdmissionReceiptSchema, type AgentHistoryMutation, AgentHistoryMutationSchema, type AgentRuntimeHead, AgentRuntimeHeadSchema, type AgentRuntimeStoreDriver, type AgentStoreCompareAndSwapResult, type AgentStoredRun, AgentStoredRunSchema, createAgentRuntimeStore, createMemoryAgentRuntimeStore, } from './agent-runtime/store-driver.js';
|
|
32
|
+
export { type AcceptInputAndAssignRun, AcceptInputAndAssignRunSchema, type AcquireAgentRun, AcquireAgentRunSchema, type AgentRecoverableDescriptor, AgentRecoverableDescriptorSchema, type AgentRecoverablePage, AgentRecoverablePageSchema, type AgentRuntimeStore, type AgentRunView, AgentRunViewSchema, AgentStoreAppliedSchema, AgentStoreConflictSchema, AgentStoreDuplicateSchema, type AgentStoreMutationResult, AgentStoreMutationResultSchema, AgentStoreNotFoundSchema, type CheckpointRunAssistant, CheckpointRunAssistantSchema, type CommitRunTerminal, CommitRunTerminalSchema, type RecordRunOperation, RecordRunOperationSchema, type RecoverAgentRun, RecoverAgentRunSchema, type ReplaceCompactedRange, ReplaceCompactedRangeSchema, type RequestRunInterrupt, RequestRunInterruptSchema, type SeedConversationInput, SeedConversationInputSchema, } from './agent-runtime/store.js';
|
|
33
|
+
export { ACTIVE_AGENT_RUN_STATES, type AgentAdmissionReceipt, AgentAdmissionReceiptSchema, type AgentHistoryMutation, AgentHistoryMutationSchema, type AgentRuntimeHead, AgentRuntimeHeadSchema, type AgentRuntimeStoreDriver, type AgentSeedReceipt, AgentSeedReceiptSchema, type AgentStoreCompareAndSwapResult, type AgentStoredRun, AgentStoredRunSchema, createAgentRuntimeStore, createMemoryAgentRuntimeStore, } from './agent-runtime/store-driver.js';
|
|
33
34
|
export { type AgentConversationArchive, AgentConversationArchiveSchema, type AgentStoreEventDecodeAccepted, type AgentStoreEventDecodeIgnored, type AgentStoreEventDecodeResult, type AgentStoreEventDraft, type AgentStoreEventEnvelope, AgentStoreEventEnvelopeSchema, type AgentStoreEventKind, AgentStoreEventKindSchema, type AgentStoreEventPage, AgentStoreEventPageSchema, type AgentStoreTransition, AgentStoreTransitionSchema, type AppendAgentStoreEvent, AppendAgentStoreEventSchema, canonicalAgentJson, decodeAgentConversationArchive, decodeAgentStoreEvent, encodeAgentConversationArchive, type ReadAgentStoreEvents, ReadAgentStoreEventsSchema, } from './agent-runtime/store-events.js';
|
|
34
35
|
export type { AgentConversationPurgeDriver } from './agent-runtime/store-purge.js';
|
|
35
36
|
export { AgentRuntimeConflictError } from './agent-runtime/terminal-commit.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../src/agent-runtime.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EACL,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,KAAK,eAAe,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EACL,KAAK,4BAA4B,EACjC,kCAAkC,EAClC,KAAK,qBAAqB,EAC1B,2BAA2B,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,8BAA8B,GAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,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B,EACzB,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,KAAK,qBAAqB,EAC1B,2BAA2B,EAC3B,kBAAkB,EAClB,8BAA8B,EAC9B,qBAAqB,EACrB,8BAA8B,EAC9B,KAAK,oBAAoB,EACzB,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EACL,KAAK,0BAA0B,EAC/B,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC"}
|
package/dist/agent-runtime.js
CHANGED
|
@@ -1,26 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AgentConversationMessagePageSchema,
|
|
3
|
-
AgentConversationPageSchema,
|
|
4
|
-
AgentConversationSummarySchema
|
|
5
|
-
} from "./index-crykmqkr.js";
|
|
6
|
-
import {
|
|
7
|
-
ACTIVE_AGENT_RUN_STATES,
|
|
8
|
-
AgentAdmissionReceiptSchema,
|
|
9
|
-
AgentConversationPurgeInputSchema,
|
|
10
|
-
AgentConversationPurgeResultSchema,
|
|
11
|
-
AgentConversationPurgedError,
|
|
12
|
-
AgentHistoryMutationSchema,
|
|
13
|
-
AgentRuntimeHeadSchema,
|
|
14
|
-
AgentStoredRunSchema,
|
|
15
|
-
createAgentRuntimeStore,
|
|
16
|
-
createMemoryAgentRuntimeStore,
|
|
17
|
-
purgeAgentConversation
|
|
18
|
-
} from "./index-v1qk37y9.js";
|
|
19
1
|
import {
|
|
20
2
|
AgentContextOverflowError,
|
|
21
3
|
AgentProviderStreamCutError,
|
|
22
4
|
AgentRuntimeConflictError,
|
|
23
5
|
AgentTokenCountSchema,
|
|
6
|
+
DURABILITY_STEP_EVENT_KIND,
|
|
7
|
+
ParkAbortedError,
|
|
8
|
+
ParkRecordDecodeError,
|
|
9
|
+
StepAbortedError,
|
|
10
|
+
StepResultDecodeError,
|
|
11
|
+
StepResultNotSerializableError,
|
|
24
12
|
agentGoalStateSlot,
|
|
25
13
|
agentTodoStateSlot,
|
|
26
14
|
classifyProviderFailure,
|
|
@@ -30,6 +18,7 @@ import {
|
|
|
30
18
|
createAgentSessionCoordinator,
|
|
31
19
|
createAgentStateSlotStore,
|
|
32
20
|
createAgentToolFenceLifecycle,
|
|
21
|
+
createLocalStepDurability,
|
|
33
22
|
deferredToolCatalog,
|
|
34
23
|
defineStateSlot,
|
|
35
24
|
isToolResultFailure,
|
|
@@ -42,7 +31,7 @@ import {
|
|
|
42
31
|
renderAgentStateSlots,
|
|
43
32
|
repairedSearchCall,
|
|
44
33
|
selectAgentHistory
|
|
45
|
-
} from "./index-
|
|
34
|
+
} from "./index-hw2chdvy.js";
|
|
46
35
|
import"./index-p13mwz16.js";
|
|
47
36
|
import {
|
|
48
37
|
AgentAdmissionEventSchema,
|
|
@@ -78,6 +67,25 @@ import {
|
|
|
78
67
|
searchAgentModelCatalog,
|
|
79
68
|
validateAgentModelSnapshot
|
|
80
69
|
} from "./index-mqv3b5rh.js";
|
|
70
|
+
import {
|
|
71
|
+
AgentConversationMessagePageSchema,
|
|
72
|
+
AgentConversationPageSchema,
|
|
73
|
+
AgentConversationSummarySchema
|
|
74
|
+
} from "./index-crykmqkr.js";
|
|
75
|
+
import {
|
|
76
|
+
ACTIVE_AGENT_RUN_STATES,
|
|
77
|
+
AgentAdmissionReceiptSchema,
|
|
78
|
+
AgentConversationPurgeInputSchema,
|
|
79
|
+
AgentConversationPurgeResultSchema,
|
|
80
|
+
AgentConversationPurgedError,
|
|
81
|
+
AgentHistoryMutationSchema,
|
|
82
|
+
AgentRuntimeHeadSchema,
|
|
83
|
+
AgentSeedReceiptSchema,
|
|
84
|
+
AgentStoredRunSchema,
|
|
85
|
+
createAgentRuntimeStore,
|
|
86
|
+
createMemoryAgentRuntimeStore,
|
|
87
|
+
purgeAgentConversation
|
|
88
|
+
} from "./index-hrbajay7.js";
|
|
81
89
|
import {
|
|
82
90
|
AcceptInputAndAssignRunSchema,
|
|
83
91
|
AcquireAgentRunSchema,
|
|
@@ -102,13 +110,14 @@ import {
|
|
|
102
110
|
RecoverAgentRunSchema,
|
|
103
111
|
ReplaceCompactedRangeSchema,
|
|
104
112
|
RequestRunInterruptSchema,
|
|
113
|
+
SeedConversationInputSchema,
|
|
105
114
|
canonicalAgentJson,
|
|
106
115
|
decodeAgentConversationArchive,
|
|
107
116
|
decodeAgentStoreEvent,
|
|
108
117
|
encodeAgentConversationArchive,
|
|
109
118
|
isAssistantHistoryEvidence,
|
|
110
119
|
isCompleteAgentHistoryTurn
|
|
111
|
-
} from "./index-
|
|
120
|
+
} from "./index-zwkgfq1s.js";
|
|
112
121
|
import {
|
|
113
122
|
AgentAssistantPlaceholderSchema,
|
|
114
123
|
AgentControlPartSchema,
|
|
@@ -159,19 +168,13 @@ import {
|
|
|
159
168
|
import {
|
|
160
169
|
buildToolManifest,
|
|
161
170
|
mountAgent
|
|
162
|
-
} from "./index-
|
|
163
|
-
import"./index-
|
|
164
|
-
import"./index-
|
|
165
|
-
import
|
|
166
|
-
|
|
167
|
-
} from "./index-kc6h6hg0.js";
|
|
168
|
-
import"./index-0vfdh685.js";
|
|
169
|
-
import"./index-wn9cb82y.js";
|
|
171
|
+
} from "./index-q3ve2d1k.js";
|
|
172
|
+
import"./index-7rkhw9ec.js";
|
|
173
|
+
import"./index-31jw8fjq.js";
|
|
174
|
+
import"./index-8c3a7m4g.js";
|
|
175
|
+
import"./index-zyvby92n.js";
|
|
170
176
|
import"./index-vsbzgd7b.js";
|
|
171
177
|
import"./index-f9mb610r.js";
|
|
172
|
-
import"./index-r159gjwy.js";
|
|
173
|
-
import"./index-cby4ar3v.js";
|
|
174
|
-
import"./index-7zbps32p.js";
|
|
175
178
|
import"./index-7evdsyez.js";
|
|
176
179
|
import"./index-2bxcmqkb.js";
|
|
177
180
|
import"./index-6k1937bx.js";
|
|
@@ -180,7 +183,13 @@ import {
|
|
|
180
183
|
childSpan,
|
|
181
184
|
createTraceContext
|
|
182
185
|
} from "./index-zcgf3gqf.js";
|
|
186
|
+
import"./index-7zbps32p.js";
|
|
183
187
|
import"./index-kzfs85xp.js";
|
|
188
|
+
import {
|
|
189
|
+
defineRuntimeTool
|
|
190
|
+
} from "./index-kc6h6hg0.js";
|
|
191
|
+
import"./index-r159gjwy.js";
|
|
192
|
+
import"./index-cby4ar3v.js";
|
|
184
193
|
import {
|
|
185
194
|
executableAgentRuntimeTools
|
|
186
195
|
} from "./index-77fekveh.js";
|
|
@@ -198,6 +207,8 @@ function defineAgentTool(definition) {
|
|
|
198
207
|
|
|
199
208
|
// src/agent-runtime/children.ts
|
|
200
209
|
import { randomUUID } from "node:crypto";
|
|
210
|
+
|
|
211
|
+
// src/agent-runtime/children-contract.ts
|
|
201
212
|
import { z } from "zod";
|
|
202
213
|
var AgentChildBudgetSchema = z.object({
|
|
203
214
|
usd: z.number().positive().optional(),
|
|
@@ -226,6 +237,35 @@ var AgentChildRecordSchema = z.object({
|
|
|
226
237
|
createdAt: z.string(),
|
|
227
238
|
updatedAt: z.string()
|
|
228
239
|
}).strict();
|
|
240
|
+
var AgentChildBlockingKindSchema = z.enum(["approval", "input"]);
|
|
241
|
+
var AgentChildBlockingSourceSchema = z.object({
|
|
242
|
+
approvalId: z.string().min(1),
|
|
243
|
+
callId: z.string().min(1),
|
|
244
|
+
toolName: z.string().min(1),
|
|
245
|
+
input: z.json(),
|
|
246
|
+
kind: AgentChildBlockingKindSchema.default("approval"),
|
|
247
|
+
batchId: z.string().min(1).optional()
|
|
248
|
+
}).strict();
|
|
249
|
+
var AgentChildBlockingEventSchema = z.object({
|
|
250
|
+
parentConversationId: z.string().min(1),
|
|
251
|
+
childConversationId: z.string().min(1),
|
|
252
|
+
kind: AgentChildBlockingKindSchema,
|
|
253
|
+
approvalId: z.string().min(1),
|
|
254
|
+
childApprovalId: z.string().min(1),
|
|
255
|
+
callId: z.string().min(1),
|
|
256
|
+
toolName: z.string().min(1),
|
|
257
|
+
input: z.json(),
|
|
258
|
+
batchId: z.string().min(1),
|
|
259
|
+
presentedAt: z.string()
|
|
260
|
+
}).strict();
|
|
261
|
+
var ChildBlockingDecisionSchema = z.union([
|
|
262
|
+
z.object({
|
|
263
|
+
approvalId: z.string().min(1),
|
|
264
|
+
approved: z.boolean(),
|
|
265
|
+
reason: z.string().optional()
|
|
266
|
+
}).strict(),
|
|
267
|
+
z.object({ approvalId: z.string().min(1), value: z.json() }).strict()
|
|
268
|
+
]);
|
|
229
269
|
var ChildRowSchema = z.object({
|
|
230
270
|
parent_conversation_id: z.string(),
|
|
231
271
|
child_conversation_id: z.string(),
|
|
@@ -259,6 +299,139 @@ function usageNumbers(usage) {
|
|
|
259
299
|
...usage.cost?.currency === "USD" && usage.cost.value !== undefined ? { usd: usage.cost.value } : {}
|
|
260
300
|
};
|
|
261
301
|
}
|
|
302
|
+
|
|
303
|
+
// src/agent-runtime/child-blocking.ts
|
|
304
|
+
function createChildBlockingRelay(input) {
|
|
305
|
+
const { store, now, handles, listChildren, activeChild, bounded } = input;
|
|
306
|
+
const presentedBlocking = new Map;
|
|
307
|
+
const retiredBlocking = new Set;
|
|
308
|
+
let blockingQueue = Promise.resolve();
|
|
309
|
+
const serializeBlocking = (work) => {
|
|
310
|
+
const run = blockingQueue.then(work, work);
|
|
311
|
+
blockingQueue = run.then(() => {
|
|
312
|
+
return;
|
|
313
|
+
}, () => {
|
|
314
|
+
return;
|
|
315
|
+
});
|
|
316
|
+
return run;
|
|
317
|
+
};
|
|
318
|
+
const childScopedBlockingId = (childConversationId, childApprovalId) => `${encodeURIComponent(childConversationId)}:${encodeURIComponent(childApprovalId)}`;
|
|
319
|
+
const retireChildBlocking = (childConversationId) => {
|
|
320
|
+
for (const [id, entry] of presentedBlocking) {
|
|
321
|
+
if (entry.event.childConversationId === childConversationId) {
|
|
322
|
+
presentedBlocking.delete(id);
|
|
323
|
+
retiredBlocking.add(id);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
const listChildBlockingInner = async (parentConversationId) => {
|
|
328
|
+
const live = listChildren(parentConversationId).filter((record) => record.state === "spawned" || record.state === "running");
|
|
329
|
+
for (const record of live) {
|
|
330
|
+
const handle = handles.get(record.childConversationId);
|
|
331
|
+
if (!handle?.blockingEvents)
|
|
332
|
+
continue;
|
|
333
|
+
const reported = await bounded(Promise.resolve(handle.blockingEvents()), []);
|
|
334
|
+
const fresh = reported.map((source) => AgentChildBlockingSourceSchema.parse(source)).filter((source) => {
|
|
335
|
+
const id = childScopedBlockingId(record.childConversationId, source.approvalId);
|
|
336
|
+
return !presentedBlocking.has(id) && !retiredBlocking.has(id);
|
|
337
|
+
});
|
|
338
|
+
if (fresh.length === 0)
|
|
339
|
+
continue;
|
|
340
|
+
const presentedAt = now().toISOString();
|
|
341
|
+
for (const source of fresh) {
|
|
342
|
+
const approvalId = childScopedBlockingId(record.childConversationId, source.approvalId);
|
|
343
|
+
const batchId = source.batchId ? `${record.childConversationId}:${source.batchId}` : approvalId;
|
|
344
|
+
const event = AgentChildBlockingEventSchema.parse({
|
|
345
|
+
parentConversationId,
|
|
346
|
+
childConversationId: record.childConversationId,
|
|
347
|
+
kind: source.kind,
|
|
348
|
+
approvalId,
|
|
349
|
+
childApprovalId: source.approvalId,
|
|
350
|
+
callId: source.callId,
|
|
351
|
+
toolName: source.toolName,
|
|
352
|
+
input: source.input,
|
|
353
|
+
batchId,
|
|
354
|
+
presentedAt
|
|
355
|
+
});
|
|
356
|
+
await store.appendEvent({
|
|
357
|
+
conversationId: parentConversationId,
|
|
358
|
+
kind: "child/state",
|
|
359
|
+
occurredAt: presentedAt,
|
|
360
|
+
payload: {
|
|
361
|
+
action: "blocking-presented",
|
|
362
|
+
childConversationId: event.childConversationId,
|
|
363
|
+
approvalId: event.approvalId,
|
|
364
|
+
childApprovalId: event.childApprovalId,
|
|
365
|
+
kind: event.kind,
|
|
366
|
+
callId: event.callId,
|
|
367
|
+
toolName: event.toolName,
|
|
368
|
+
input: event.input,
|
|
369
|
+
batchId: event.batchId,
|
|
370
|
+
presentedAt
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
presentedBlocking.set(approvalId, { event, batchId });
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return [...presentedBlocking.values()].map((entry) => entry.event).filter((event) => event.parentConversationId === parentConversationId);
|
|
377
|
+
};
|
|
378
|
+
const listChildBlocking = (parentConversationId) => serializeBlocking(() => listChildBlockingInner(parentConversationId));
|
|
379
|
+
const respondToChildBlockingInner = async (parentConversationId, decision) => {
|
|
380
|
+
const entry = presentedBlocking.get(decision.approvalId);
|
|
381
|
+
if (!entry || entry.event.parentConversationId !== parentConversationId) {
|
|
382
|
+
throw new TypeError("Child blocking request is missing, stale or already answered");
|
|
383
|
+
}
|
|
384
|
+
const { handle } = activeChild(parentConversationId, entry.event.childConversationId);
|
|
385
|
+
if (!handle.respondToBlocking) {
|
|
386
|
+
throw new TypeError("Child host cannot answer blocking requests");
|
|
387
|
+
}
|
|
388
|
+
const parsed = ChildBlockingDecisionSchema.parse(decision);
|
|
389
|
+
if (entry.event.kind === "input" !== "value" in parsed)
|
|
390
|
+
throw new TypeError("Child response kind does not match the pending request");
|
|
391
|
+
await handle.respondToBlocking({ ...parsed, approvalId: entry.event.childApprovalId });
|
|
392
|
+
presentedBlocking.delete(decision.approvalId);
|
|
393
|
+
retiredBlocking.add(decision.approvalId);
|
|
394
|
+
await store.appendEvent({
|
|
395
|
+
conversationId: parentConversationId,
|
|
396
|
+
kind: "child/state",
|
|
397
|
+
payload: {
|
|
398
|
+
action: "blocking-resolved",
|
|
399
|
+
childConversationId: entry.event.childConversationId,
|
|
400
|
+
approvalId: entry.event.approvalId,
|
|
401
|
+
batchId: entry.batchId,
|
|
402
|
+
..."approved" in parsed ? { approved: parsed.approved } : { kind: "input" }
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
const respondToChildBlocking = (parentConversationId, decision) => serializeBlocking(() => respondToChildBlockingInner(parentConversationId, decision));
|
|
407
|
+
return { retireChildBlocking, listChildBlocking, respondToChildBlocking };
|
|
408
|
+
}
|
|
409
|
+
// src/agent-runtime/child-budget-policy.ts
|
|
410
|
+
function agentChildBudgetStopPolicy(input) {
|
|
411
|
+
let stepsSeen = 0;
|
|
412
|
+
let lastBoundary = performance.now();
|
|
413
|
+
return {
|
|
414
|
+
name: "child-budget",
|
|
415
|
+
when: async ({ steps }) => {
|
|
416
|
+
const step = steps.at(-1);
|
|
417
|
+
if (!step || steps.length <= stepsSeen)
|
|
418
|
+
return false;
|
|
419
|
+
stepsSeen = steps.length;
|
|
420
|
+
const elapsedMs = Math.max(0, performance.now() - lastBoundary);
|
|
421
|
+
lastBoundary = performance.now();
|
|
422
|
+
const usage = normalizeSdkUsage(step.usage);
|
|
423
|
+
const cost = input.cost?.({ usage: step.usage });
|
|
424
|
+
const boundary = await input.manager.recordStepUsage({
|
|
425
|
+
childConversationId: input.childConversationId,
|
|
426
|
+
usage: { ...usage, ...cost && { cost } },
|
|
427
|
+
elapsedMs
|
|
428
|
+
});
|
|
429
|
+
return boundary.stop;
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// src/agent-runtime/children.ts
|
|
262
435
|
function createSqliteAgentChildManager(input) {
|
|
263
436
|
const now = input.now ?? (() => new Date);
|
|
264
437
|
const database = input.sqlite.database;
|
|
@@ -408,33 +581,56 @@ function createSqliteAgentChildManager(input) {
|
|
|
408
581
|
childInput: request.childInput,
|
|
409
582
|
budget
|
|
410
583
|
});
|
|
411
|
-
|
|
412
|
-
|
|
584
|
+
handle.result.catch(() => {
|
|
585
|
+
return;
|
|
586
|
+
});
|
|
587
|
+
try {
|
|
588
|
+
await input.sqlite.transaction(async (scope) => {
|
|
589
|
+
scope.database.prepare(`
|
|
413
590
|
INSERT INTO stitchkit_agent_runtime_children (
|
|
414
591
|
parent_conversation_id, child_conversation_id, seed_upto_seq, state,
|
|
415
592
|
budget_payload, usage_payload, result_reference, created_at, updated_at
|
|
416
593
|
) VALUES (?, ?, ?, ?, ?, ?, NULL, ?, ?)
|
|
417
594
|
`).run(record.parentConversationId, record.childConversationId, record.seedUptoSeq, record.state, JSON.stringify(record.budget), JSON.stringify(record.usage), createdAt, createdAt);
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
595
|
+
await scope.appendEvent({
|
|
596
|
+
conversationId: record.parentConversationId,
|
|
597
|
+
kind: "child/spawned",
|
|
598
|
+
occurredAt: createdAt,
|
|
599
|
+
payload: { childConversationId, seedUptoSeq, budget }
|
|
600
|
+
});
|
|
423
601
|
});
|
|
424
|
-
|
|
602
|
+
await updateState(record, "running");
|
|
603
|
+
} catch (cause) {
|
|
604
|
+
try {
|
|
605
|
+
await handle.stopPolicy("spawn-persistence-failed");
|
|
606
|
+
} catch (cleanup) {
|
|
607
|
+
throw new AggregateError([cause, cleanup], "Child persistence and stop both failed");
|
|
608
|
+
}
|
|
609
|
+
try {
|
|
610
|
+
if (isLive(childConversationId))
|
|
611
|
+
await updateState(record, "lost", undefined, { reason: "spawn-persistence-failed" });
|
|
612
|
+
} catch (cleanup) {
|
|
613
|
+
throw new AggregateError([cause, cleanup], "Child stopped but persistence reconciliation failed");
|
|
614
|
+
}
|
|
615
|
+
throw cause;
|
|
616
|
+
}
|
|
425
617
|
handles.set(childConversationId, handle);
|
|
426
|
-
await updateState(record, "running");
|
|
427
618
|
const settlement = handle.result.then(async (result) => {
|
|
428
619
|
handles.delete(childConversationId);
|
|
620
|
+
retireChildBlocking(childConversationId);
|
|
429
621
|
if (settleable(childConversationId)) {
|
|
430
622
|
await updateState(record, "finished", result.resultReference);
|
|
431
623
|
}
|
|
432
624
|
}, async () => {
|
|
433
625
|
handles.delete(childConversationId);
|
|
626
|
+
retireChildBlocking(childConversationId);
|
|
434
627
|
if (settleable(childConversationId))
|
|
435
628
|
await updateState(record, "stopped");
|
|
436
629
|
});
|
|
437
630
|
settlements.set(childConversationId, settlement);
|
|
631
|
+
settlement.catch(() => {
|
|
632
|
+
return;
|
|
633
|
+
});
|
|
438
634
|
return { ...record, state: "running", updatedAt: now().toISOString() };
|
|
439
635
|
};
|
|
440
636
|
const recordStepUsage = async (request) => {
|
|
@@ -506,6 +702,7 @@ function createSqliteAgentChildManager(input) {
|
|
|
506
702
|
stopDurationMs: Math.max(0, performance.now() - startedAt)
|
|
507
703
|
});
|
|
508
704
|
}
|
|
705
|
+
retireChildBlocking(record.childConversationId);
|
|
509
706
|
return;
|
|
510
707
|
}
|
|
511
708
|
await bounded(Promise.resolve(handle?.stopPolicy("parent-stopped")).then(() => true), false);
|
|
@@ -514,6 +711,7 @@ function createSqliteAgentChildManager(input) {
|
|
|
514
711
|
await updateState(record, "stopped", undefined, {
|
|
515
712
|
stopDurationMs: Math.max(0, performance.now() - startedAt)
|
|
516
713
|
});
|
|
714
|
+
retireChildBlocking(record.childConversationId);
|
|
517
715
|
}));
|
|
518
716
|
};
|
|
519
717
|
const activeChild = (parentConversationId, childConversationId) => {
|
|
@@ -528,6 +726,7 @@ function createSqliteAgentChildManager(input) {
|
|
|
528
726
|
throw new TypeError("Child host handle is unavailable");
|
|
529
727
|
return { child, handle };
|
|
530
728
|
};
|
|
729
|
+
const { retireChildBlocking, listChildBlocking, respondToChildBlocking } = createChildBlockingRelay({ store, now, handles, listChildren, activeChild, bounded });
|
|
531
730
|
const sendMessage = async (parentConversationId, childConversationId, message) => {
|
|
532
731
|
const { handle } = activeChild(parentConversationId, childConversationId);
|
|
533
732
|
if (!handle.sendMessage)
|
|
@@ -547,6 +746,7 @@ function createSqliteAgentChildManager(input) {
|
|
|
547
746
|
policyName: "parent-interrupt",
|
|
548
747
|
stopDurationMs: Math.max(0, performance.now() - startedAt)
|
|
549
748
|
});
|
|
749
|
+
retireChildBlocking(childConversationId);
|
|
550
750
|
};
|
|
551
751
|
const waitChild = async (childConversationId) => {
|
|
552
752
|
await settlements.get(childConversationId);
|
|
@@ -558,30 +758,9 @@ function createSqliteAgentChildManager(input) {
|
|
|
558
758
|
stopChildren,
|
|
559
759
|
sendMessage,
|
|
560
760
|
interruptChild,
|
|
561
|
-
waitChild
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
function agentChildBudgetStopPolicy(input) {
|
|
565
|
-
let stepsSeen = 0;
|
|
566
|
-
let lastBoundary = performance.now();
|
|
567
|
-
return {
|
|
568
|
-
name: "child-budget",
|
|
569
|
-
when: async ({ steps }) => {
|
|
570
|
-
const step = steps.at(-1);
|
|
571
|
-
if (!step || steps.length <= stepsSeen)
|
|
572
|
-
return false;
|
|
573
|
-
stepsSeen = steps.length;
|
|
574
|
-
const elapsedMs = Math.max(0, performance.now() - lastBoundary);
|
|
575
|
-
lastBoundary = performance.now();
|
|
576
|
-
const usage = normalizeSdkUsage(step.usage);
|
|
577
|
-
const cost = input.cost?.({ usage: step.usage });
|
|
578
|
-
const boundary = await input.manager.recordStepUsage({
|
|
579
|
-
childConversationId: input.childConversationId,
|
|
580
|
-
usage: { ...usage, ...cost && { cost } },
|
|
581
|
-
elapsedMs
|
|
582
|
-
});
|
|
583
|
-
return boundary.stop;
|
|
584
|
-
}
|
|
761
|
+
waitChild,
|
|
762
|
+
listChildBlocking,
|
|
763
|
+
respondToChildBlocking
|
|
585
764
|
};
|
|
586
765
|
}
|
|
587
766
|
|
|
@@ -1170,7 +1349,10 @@ var SearchRowSchema = z4.object({
|
|
|
1170
1349
|
snippet: z4.string()
|
|
1171
1350
|
});
|
|
1172
1351
|
function literalFtsQuery(query) {
|
|
1173
|
-
|
|
1352
|
+
const terms = query.split(/\s+/u).filter((term) => /[\p{L}\p{N}]/u.test(term));
|
|
1353
|
+
if (terms.length === 0)
|
|
1354
|
+
throw new TypeError("Event search query must contain searchable terms");
|
|
1355
|
+
return terms.map((term) => `"${term.replaceAll('"', '""')}"`).join(" AND ");
|
|
1174
1356
|
}
|
|
1175
1357
|
function createSqliteAgentEventSearch(input) {
|
|
1176
1358
|
return async (request) => {
|
|
@@ -2282,6 +2464,7 @@ export {
|
|
|
2282
2464
|
createSqliteAgentChildManager,
|
|
2283
2465
|
createMemoryAgentRuntimeStore,
|
|
2284
2466
|
createMemoryAgentModelSelectionStore,
|
|
2467
|
+
createLocalStepDurability,
|
|
2285
2468
|
createDeferredAgentToolSurface,
|
|
2286
2469
|
createAgentToolFenceLifecycle,
|
|
2287
2470
|
createAgentStateTools,
|
|
@@ -2310,14 +2493,21 @@ export {
|
|
|
2310
2493
|
agentConversationCardProjection,
|
|
2311
2494
|
agentChildBudgetStopPolicy,
|
|
2312
2495
|
advanceAgentRuntimeEventCursor,
|
|
2496
|
+
StepResultNotSerializableError,
|
|
2497
|
+
StepResultDecodeError,
|
|
2498
|
+
StepAbortedError,
|
|
2499
|
+
SeedConversationInputSchema,
|
|
2313
2500
|
RequestRunInterruptSchema,
|
|
2314
2501
|
ReplaceCompactedRangeSchema,
|
|
2315
2502
|
RecoverAgentRunSchema,
|
|
2316
2503
|
RecordRunOperationSchema,
|
|
2317
2504
|
ReadAgentStoreEventsSchema,
|
|
2505
|
+
ParkRecordDecodeError,
|
|
2506
|
+
ParkAbortedError,
|
|
2318
2507
|
DeferredAgentToolSearchInputSchema,
|
|
2319
2508
|
DeferredAgentToolReceiptSchema,
|
|
2320
2509
|
DeferredAgentToolMatchSchema,
|
|
2510
|
+
DURABILITY_STEP_EVENT_KIND,
|
|
2321
2511
|
CommitRunTerminalSchema,
|
|
2322
2512
|
CheckpointRunAssistantSchema,
|
|
2323
2513
|
AppendAgentStoreEventSchema,
|
|
@@ -2347,6 +2537,7 @@ export {
|
|
|
2347
2537
|
AgentStepFinishedEventSchema,
|
|
2348
2538
|
AgentSourcePartSchema,
|
|
2349
2539
|
AgentSnapshotSchema,
|
|
2540
|
+
AgentSeedReceiptSchema,
|
|
2350
2541
|
AgentScheduleSchema,
|
|
2351
2542
|
AgentSandboxRestrictionSchema,
|
|
2352
2543
|
AgentSandboxGradeSchema,
|
|
@@ -2412,6 +2603,9 @@ export {
|
|
|
2412
2603
|
AgentChildStateSchema,
|
|
2413
2604
|
AgentChildRecordSchema,
|
|
2414
2605
|
AgentChildBudgetSchema,
|
|
2606
|
+
AgentChildBlockingSourceSchema,
|
|
2607
|
+
AgentChildBlockingKindSchema,
|
|
2608
|
+
AgentChildBlockingEventSchema,
|
|
2415
2609
|
AgentCheckpointEventSchema,
|
|
2416
2610
|
AgentAttemptResetEventSchema,
|
|
2417
2611
|
AgentAssistantPlaceholderSchema,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* → ADR 0153.
|
|
39
39
|
*/
|
|
40
40
|
import { type BackoffPolicy } from '../browser/resumable.js';
|
|
41
|
-
import { type WatchKey, type WatchStateFrame, type WatchValueFrame } from '../live/watch-contract.js';
|
|
41
|
+
import { type WatchHave, type WatchKey, type WatchStateFrame, type WatchValueFrame } from '../live/watch-contract.js';
|
|
42
42
|
import type { StitchLogger } from '../logger.js';
|
|
43
43
|
/** The operation a watched read runs — `OperationIdentity`'s two stable halves. */
|
|
44
44
|
export interface WatchOperation {
|
|
@@ -52,7 +52,15 @@ export interface WatchSubscriber {
|
|
|
52
52
|
state(frame: WatchStateFrame): void;
|
|
53
53
|
}
|
|
54
54
|
export interface AttachedWatcher {
|
|
55
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Start watching a key.
|
|
57
|
+
*
|
|
58
|
+
* `have` is what the caller already holds from an earlier connection. Offered,
|
|
59
|
+
* it turns a reconnection into a difference — or into nothing at all when the
|
|
60
|
+
* answer has not moved — instead of the whole value again. Omitted, the caller
|
|
61
|
+
* is treated as holding nothing, which is what a first subscription is.
|
|
62
|
+
*/
|
|
63
|
+
open(key: WatchKey, args: unknown, have?: WatchHave): {
|
|
56
64
|
accepted: boolean;
|
|
57
65
|
reason?: string;
|
|
58
66
|
};
|
|
@@ -105,6 +113,20 @@ export interface WatchHubConfig {
|
|
|
105
113
|
holdMs?: number;
|
|
106
114
|
/** Retry pacing after a failed read. */
|
|
107
115
|
backoff?: BackoffPolicy;
|
|
116
|
+
/**
|
|
117
|
+
* How many bytes of superseded values one key may keep, for differences.
|
|
118
|
+
*
|
|
119
|
+
* A difference needs the value the receiver actually holds, which is no longer
|
|
120
|
+
* the current one. This is the ceiling on that memory, per key, and it is a
|
|
121
|
+
* byte budget rather than a count of revisions because the thing being
|
|
122
|
+
* protected is the process's heap and revisions have no size.
|
|
123
|
+
*
|
|
124
|
+
* Zero disables differences entirely: every frame carries the whole value,
|
|
125
|
+
* which is what this hub did before they existed. Default 262144 (256 KiB),
|
|
126
|
+
* which holds several revisions of the large answers differences are for and
|
|
127
|
+
* a great many small ones.
|
|
128
|
+
*/
|
|
129
|
+
deltaMemoryBytes?: number;
|
|
108
130
|
/** Whether two answers are the same. Defaults to key-order-independent JSON equality. */
|
|
109
131
|
same?(previous: unknown, next: unknown): boolean;
|
|
110
132
|
logger?: StitchLogger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch-hub.d.ts","sourceRoot":"","sources":["../../src/application/watch-hub.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"watch-hub.d.ts","sourceRoot":"","sources":["../../src/application/watch-hub.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EACL,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAEhC,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