stitchkit 0.85.1 → 0.86.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 +178 -0
- package/README.md +3 -0
- package/dist/agent-runtime/agent-tool.d.ts +25 -0
- package/dist/agent-runtime/agent-tool.d.ts.map +1 -0
- package/dist/agent-runtime/child-tools.d.ts +69 -0
- package/dist/agent-runtime/child-tools.d.ts.map +1 -0
- package/dist/agent-runtime/children.d.ts +113 -0
- package/dist/agent-runtime/children.d.ts.map +1 -0
- package/dist/agent-runtime/coding-tool-contract.d.ts +29 -0
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-refusals.d.ts +2 -0
- package/dist/agent-runtime/coding-tool-refusals.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 +1 -0
- package/dist/agent-runtime/coding-tools.d.ts.map +1 -1
- package/dist/agent-runtime/control-schema.d.ts +17 -0
- package/dist/agent-runtime/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/event-schema.d.ts +34 -0
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/event-search-tools.d.ts +53 -0
- package/dist/agent-runtime/event-search-tools.d.ts.map +1 -0
- package/dist/agent-runtime/event-search.d.ts +23 -0
- package/dist/agent-runtime/event-search.d.ts.map +1 -0
- package/dist/agent-runtime/fault-bench.d.ts +45 -0
- package/dist/agent-runtime/fault-bench.d.ts.map +1 -0
- package/dist/agent-runtime/observability.d.ts +6 -0
- package/dist/agent-runtime/observability.d.ts.map +1 -1
- package/dist/agent-runtime/projections.d.ts +69 -0
- package/dist/agent-runtime/projections.d.ts.map +1 -0
- package/dist/agent-runtime/provider-failure.d.ts +5 -1
- package/dist/agent-runtime/provider-failure.d.ts.map +1 -1
- package/dist/agent-runtime/provider-origin.d.ts +12 -0
- package/dist/agent-runtime/provider-origin.d.ts.map +1 -0
- package/dist/agent-runtime/retry-policy.d.ts +27 -0
- package/dist/agent-runtime/retry-policy.d.ts.map +1 -0
- package/dist/agent-runtime/run-execution.d.ts +0 -9
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/run-mutation-queue.d.ts +21 -0
- package/dist/agent-runtime/run-mutation-queue.d.ts.map +1 -0
- package/dist/agent-runtime/run-operation-lifecycle.d.ts +3 -0
- package/dist/agent-runtime/run-operation-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/runtime.d.ts +15 -0
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox.d.ts +66 -0
- package/dist/agent-runtime/sandbox.d.ts.map +1 -0
- package/dist/agent-runtime/schedule-tools.d.ts +35 -0
- package/dist/agent-runtime/schedule-tools.d.ts.map +1 -0
- package/dist/agent-runtime/schedules.d.ts +63 -0
- package/dist/agent-runtime/schedules.d.ts.map +1 -0
- package/dist/agent-runtime/schemas.d.ts +9 -0
- package/dist/agent-runtime/schemas.d.ts.map +1 -1
- package/dist/agent-runtime/spill.d.ts +24 -0
- package/dist/agent-runtime/spill.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite.d.ts +26 -0
- package/dist/agent-runtime/sqlite.d.ts.map +1 -1
- package/dist/agent-runtime/state-slots.d.ts +48 -0
- package/dist/agent-runtime/state-slots.d.ts.map +1 -0
- package/dist/agent-runtime/state-tools.d.ts +58 -0
- package/dist/agent-runtime/state-tools.d.ts.map +1 -0
- package/dist/agent-runtime/store-driver.d.ts +13 -0
- package/dist/agent-runtime/store-driver.d.ts.map +1 -1
- package/dist/agent-runtime/store-events.d.ts +829 -0
- package/dist/agent-runtime/store-events.d.ts.map +1 -0
- package/dist/agent-runtime/store-migrations/v1-to-v2.d.ts +6 -0
- package/dist/agent-runtime/store-migrations/v1-to-v2.d.ts.map +1 -0
- package/dist/agent-runtime/store.d.ts +45 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +1 -1
- package/dist/agent-runtime-browser.js +5 -3
- package/dist/agent-runtime-coding-tools.js +144 -15
- package/dist/agent-runtime-harness.js +12 -10
- 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-bun.js +4 -3
- 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-node.js +4 -3
- package/dist/agent-runtime-testing.d.ts +3 -0
- package/dist/agent-runtime-testing.d.ts.map +1 -0
- package/dist/agent-runtime-testing.js +156 -0
- package/dist/agent-runtime.d.ts +16 -2
- package/dist/agent-runtime.d.ts.map +1 -1
- package/dist/agent-runtime.js +1591 -154
- package/dist/application.js +14 -14
- package/dist/cli.js +6 -6
- package/dist/{index-fwbkp2jn.js → index-0vfdh685.js} +2 -2
- package/dist/{index-5z8tezpx.js → index-0ydchz76.js} +3 -3
- package/dist/{index-3ds42w1w.js → index-1szetq6f.js} +33 -4
- package/dist/{index-jpp7jd1p.js → index-33xckd7h.js} +898 -425
- package/dist/{index-27487ay5.js → index-9hw9eq48.js} +4 -4
- package/dist/{index-66nxrgy0.js → index-b7qwhbzq.js} +428 -46
- package/dist/index-cnyk6te3.js +77 -0
- package/dist/index-gskm1k5a.js +50 -0
- package/dist/{index-fq492hg0.js → index-hber83mk.js} +254 -157
- package/dist/{index-4hk633vz.js → index-hkm6wysp.js} +9 -2
- package/dist/{index-dx9xehwt.js → index-kc6h6hg0.js} +1 -1
- package/dist/{index-x15ss2dx.js → index-p1b1y93x.js} +3 -0
- package/dist/{index-mgtxfe6b.js → index-r159gjwy.js} +8 -1
- package/dist/{index-s4ckmrac.js → index-rcgsnrr6.js} +3 -3
- package/dist/index-vfgb58nf.js +252 -0
- package/dist/{index-dggwnnjv.js → index-wn9cb82y.js} +1 -1
- package/dist/{index-ff0kcqvp.js → index-z2452tsw.js} +3 -3
- package/dist/testing/agent-store-conformance.d.ts.map +1 -1
- package/dist/testing.js +54 -80
- package/dist/tool-invoker.js +4 -4
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +16 -0
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +10 -8
- package/llms-full.txt +321 -13
- package/package.json +6 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
AgentRunStateSchema,
|
|
11
11
|
AgentTerminalReasonSchema,
|
|
12
12
|
AgentTimestampSchema
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-p1b1y93x.js";
|
|
14
14
|
|
|
15
15
|
// src/agent-runtime/event-schema.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -51,6 +51,12 @@ var AgentReasoningDeltaEventSchema = AgentTransientReasoningIdentitySchema.exten
|
|
|
51
51
|
var AgentReasoningEndEventSchema = AgentTransientReasoningIdentitySchema.extend({
|
|
52
52
|
type: z.literal("reasoning-end")
|
|
53
53
|
});
|
|
54
|
+
var AgentAttemptResetEventSchema = EventIdentitySchema.extend({
|
|
55
|
+
type: z.literal("attempt-reset"),
|
|
56
|
+
runtimeEpoch: z.string().min(1),
|
|
57
|
+
sequence: z.int().nonnegative(),
|
|
58
|
+
attempt: z.int().positive()
|
|
59
|
+
});
|
|
54
60
|
var AgentCheckpointEventSchema = EventIdentitySchema.extend({
|
|
55
61
|
type: z.literal("assistant-checkpoint"),
|
|
56
62
|
eventId: AgentRecordIdSchema,
|
|
@@ -95,6 +101,7 @@ var AgentRuntimeEventSchema = z.discriminatedUnion("type", [
|
|
|
95
101
|
AgentReasoningStartEventSchema,
|
|
96
102
|
AgentReasoningDeltaEventSchema,
|
|
97
103
|
AgentReasoningEndEventSchema,
|
|
104
|
+
AgentAttemptResetEventSchema,
|
|
98
105
|
AgentCheckpointEventSchema,
|
|
99
106
|
AgentRunStateEventSchema,
|
|
100
107
|
AgentRunOperationEventSchema,
|
|
@@ -140,4 +147,4 @@ function agentDurableEventId(type, runId, snapshotVersion) {
|
|
|
140
147
|
return `${runId}:${type}:${snapshotVersion}`;
|
|
141
148
|
}
|
|
142
149
|
|
|
143
|
-
export { AgentAdmissionEventSchema, AgentTransientDeltaEventSchema, AgentReasoningStartEventSchema, AgentReasoningDeltaEventSchema, AgentReasoningEndEventSchema, AgentCheckpointEventSchema, AgentRunStateEventSchema, AgentRunOperationEventSchema, AgentToolStatusEventSchema, AgentTerminalEventSchema, AgentRuntimeEventSchema, AgentRuntimeEventCursorSchema, advanceAgentRuntimeEventCursor, agentDurableEventId };
|
|
150
|
+
export { AgentAdmissionEventSchema, AgentTransientDeltaEventSchema, AgentReasoningStartEventSchema, AgentReasoningDeltaEventSchema, AgentReasoningEndEventSchema, AgentAttemptResetEventSchema, AgentCheckpointEventSchema, AgentRunStateEventSchema, AgentRunOperationEventSchema, AgentToolStatusEventSchema, AgentTerminalEventSchema, AgentRuntimeEventSchema, AgentRuntimeEventCursorSchema, advanceAgentRuntimeEventCursor, agentDurableEventId };
|
|
@@ -858,11 +858,18 @@ function assertProjectedName(name, serviceName, action, transport, derived) {
|
|
|
858
858
|
function projectToolSurface(surface, transport, config = {}) {
|
|
859
859
|
const projected = [];
|
|
860
860
|
const names = new Set;
|
|
861
|
+
const origins = new Map;
|
|
861
862
|
const append = (tool) => {
|
|
862
863
|
if (config.assertUniqueNames ?? true) {
|
|
863
|
-
|
|
864
|
+
if (names.has(tool.name)) {
|
|
865
|
+
const previous = origins.get(tool.name) ?? "unknown";
|
|
866
|
+
const current = `${tool.serviceName}.${tool.action}`;
|
|
867
|
+
throw new Error(`Duplicate ${duplicateLabel(transport)} "${tool.name}" across mounted operations: ${previous}, ${current}`);
|
|
868
|
+
}
|
|
869
|
+
assertUniqueToolName(tool.name, false, duplicateLabel(transport));
|
|
864
870
|
}
|
|
865
871
|
names.add(tool.name);
|
|
872
|
+
origins.set(tool.name, `${tool.serviceName}.${tool.action}`);
|
|
866
873
|
projected.push(tool);
|
|
867
874
|
};
|
|
868
875
|
for (const service of surface.services ?? []) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runtimeToolMountable
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-kc6h6hg0.js";
|
|
4
4
|
import {
|
|
5
5
|
contractToolMountable
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-0vfdh685.js";
|
|
7
7
|
import {
|
|
8
8
|
projectToolSurface
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-r159gjwy.js";
|
|
10
10
|
|
|
11
11
|
// src/tools/surface.ts
|
|
12
12
|
function collectToolSurface({
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentMessageSchema,
|
|
3
|
+
AgentRecordIdSchema,
|
|
4
|
+
AgentRecordVersionSchema,
|
|
5
|
+
AgentRunOperationSchema,
|
|
6
|
+
AgentRunSchema,
|
|
7
|
+
AgentSnapshotSchema,
|
|
8
|
+
AgentTerminalReasonSchema,
|
|
9
|
+
AgentUsageSchema
|
|
10
|
+
} from "./index-p1b1y93x.js";
|
|
11
|
+
|
|
12
|
+
// src/agent-runtime/store.ts
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
var AgentStoreConflictSchema = z.object({
|
|
15
|
+
outcome: z.literal("conflict"),
|
|
16
|
+
actualVersion: AgentRecordVersionSchema
|
|
17
|
+
});
|
|
18
|
+
var AgentStoreNotFoundSchema = z.object({ outcome: z.literal("not_found") });
|
|
19
|
+
var AgentStoreAppliedSchema = z.object({
|
|
20
|
+
outcome: z.literal("applied"),
|
|
21
|
+
snapshot: AgentSnapshotSchema
|
|
22
|
+
});
|
|
23
|
+
var AgentStoreDuplicateSchema = z.object({
|
|
24
|
+
outcome: z.literal("duplicate"),
|
|
25
|
+
input: AgentMessageSchema,
|
|
26
|
+
inputMessageId: AgentRecordIdSchema,
|
|
27
|
+
runId: AgentRecordIdSchema,
|
|
28
|
+
assistantMessageId: AgentRecordIdSchema,
|
|
29
|
+
run: AgentRunSchema,
|
|
30
|
+
assistant: AgentMessageSchema.optional(),
|
|
31
|
+
snapshot: AgentSnapshotSchema
|
|
32
|
+
});
|
|
33
|
+
var AgentStoreMutationResultSchema = z.discriminatedUnion("outcome", [
|
|
34
|
+
AgentStoreAppliedSchema,
|
|
35
|
+
AgentStoreDuplicateSchema,
|
|
36
|
+
AgentStoreConflictSchema,
|
|
37
|
+
AgentStoreNotFoundSchema
|
|
38
|
+
]);
|
|
39
|
+
var AgentRunViewSchema = z.object({
|
|
40
|
+
snapshotVersion: AgentRecordVersionSchema,
|
|
41
|
+
run: AgentRunSchema,
|
|
42
|
+
assistant: AgentMessageSchema.optional()
|
|
43
|
+
});
|
|
44
|
+
var AcceptInputAndAssignRunSchema = z.object({
|
|
45
|
+
idempotencyKey: z.string().min(1),
|
|
46
|
+
expectedVersion: AgentRecordVersionSchema.optional(),
|
|
47
|
+
input: AgentMessageSchema,
|
|
48
|
+
run: AgentRunSchema,
|
|
49
|
+
coalesceIntoRunId: AgentRecordIdSchema.optional()
|
|
50
|
+
});
|
|
51
|
+
var AcquireAgentRunSchema = z.object({
|
|
52
|
+
conversationId: AgentRecordIdSchema,
|
|
53
|
+
runId: AgentRecordIdSchema,
|
|
54
|
+
expectedRevision: AgentRecordVersionSchema,
|
|
55
|
+
ownerId: z.string().min(1)
|
|
56
|
+
});
|
|
57
|
+
var CheckpointRunAssistantSchema = z.object({
|
|
58
|
+
conversationId: AgentRecordIdSchema,
|
|
59
|
+
runId: AgentRecordIdSchema,
|
|
60
|
+
expectedRevision: AgentRecordVersionSchema,
|
|
61
|
+
ownerId: z.string().min(1),
|
|
62
|
+
fencingToken: AgentRecordVersionSchema.optional(),
|
|
63
|
+
assistant: AgentMessageSchema,
|
|
64
|
+
usage: AgentUsageSchema.optional()
|
|
65
|
+
});
|
|
66
|
+
var RecordRunOperationSchema = z.object({
|
|
67
|
+
conversationId: AgentRecordIdSchema,
|
|
68
|
+
runId: AgentRecordIdSchema,
|
|
69
|
+
expectedRevision: AgentRecordVersionSchema,
|
|
70
|
+
ownerId: z.string().min(1),
|
|
71
|
+
fencingToken: AgentRecordVersionSchema.optional(),
|
|
72
|
+
operation: AgentRunOperationSchema
|
|
73
|
+
});
|
|
74
|
+
var CommitRunTerminalSchema = z.object({
|
|
75
|
+
conversationId: AgentRecordIdSchema,
|
|
76
|
+
runId: AgentRecordIdSchema,
|
|
77
|
+
expectedRevision: AgentRecordVersionSchema,
|
|
78
|
+
ownerId: z.string().min(1),
|
|
79
|
+
fencingToken: AgentRecordVersionSchema.optional(),
|
|
80
|
+
assistant: AgentMessageSchema,
|
|
81
|
+
reason: AgentTerminalReasonSchema,
|
|
82
|
+
policyName: z.string().min(1).optional(),
|
|
83
|
+
usage: AgentUsageSchema.optional(),
|
|
84
|
+
absorb: z.array(z.object({
|
|
85
|
+
runId: AgentRecordIdSchema,
|
|
86
|
+
inputMessageIds: z.array(AgentRecordIdSchema).min(1)
|
|
87
|
+
})).min(1).optional()
|
|
88
|
+
});
|
|
89
|
+
var RequestRunInterruptSchema = z.object({
|
|
90
|
+
conversationId: AgentRecordIdSchema,
|
|
91
|
+
runId: AgentRecordIdSchema,
|
|
92
|
+
expectedRevision: AgentRecordVersionSchema
|
|
93
|
+
});
|
|
94
|
+
var RecoverAgentRunSchema = z.object({
|
|
95
|
+
conversationId: AgentRecordIdSchema,
|
|
96
|
+
runId: AgentRecordIdSchema,
|
|
97
|
+
expectedRevision: AgentRecordVersionSchema,
|
|
98
|
+
action: z.enum(["requeue", "abandon"]),
|
|
99
|
+
replaySafe: z.boolean().optional()
|
|
100
|
+
});
|
|
101
|
+
var ReplaceCompactedRangeSchema = z.object({
|
|
102
|
+
conversationId: AgentRecordIdSchema,
|
|
103
|
+
expectedVersion: AgentRecordVersionSchema,
|
|
104
|
+
replacedMessageIds: z.array(AgentRecordIdSchema).min(1),
|
|
105
|
+
summary: AgentMessageSchema
|
|
106
|
+
});
|
|
107
|
+
var AgentRecoverableDescriptorSchema = z.object({
|
|
108
|
+
conversationId: AgentRecordIdSchema,
|
|
109
|
+
run: AgentRunSchema
|
|
110
|
+
});
|
|
111
|
+
var AgentRecoverablePageSchema = z.object({
|
|
112
|
+
items: z.array(AgentRecoverableDescriptorSchema),
|
|
113
|
+
nextCursor: z.string().min(1).optional()
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// src/agent-runtime/store-events.ts
|
|
117
|
+
import { randomUUID } from "node:crypto";
|
|
118
|
+
import { z as z2 } from "zod";
|
|
119
|
+
var AgentStoreEventKindSchema = z2.enum([
|
|
120
|
+
"runtime/baseline",
|
|
121
|
+
"runtime/transition",
|
|
122
|
+
"provider/request",
|
|
123
|
+
"provider/message",
|
|
124
|
+
"state/set",
|
|
125
|
+
"spill/created",
|
|
126
|
+
"spill/deleted",
|
|
127
|
+
"schedule/set",
|
|
128
|
+
"schedule/fired",
|
|
129
|
+
"schedule/cancelled",
|
|
130
|
+
"schedule/late",
|
|
131
|
+
"schedule/failed",
|
|
132
|
+
"child/spawned",
|
|
133
|
+
"child/state",
|
|
134
|
+
"retry/scheduled",
|
|
135
|
+
"retry/started",
|
|
136
|
+
"sandbox/probed"
|
|
137
|
+
]);
|
|
138
|
+
var AgentStoreTransitionSchema = z2.discriminatedUnion("type", [
|
|
139
|
+
z2.object({ type: z2.literal("accept"), input: AcceptInputAndAssignRunSchema }).strict(),
|
|
140
|
+
z2.object({ type: z2.literal("acquire"), input: AcquireAgentRunSchema }).strict(),
|
|
141
|
+
z2.object({ type: z2.literal("checkpoint"), input: CheckpointRunAssistantSchema }).strict(),
|
|
142
|
+
z2.object({ type: z2.literal("operation"), input: RecordRunOperationSchema }).strict(),
|
|
143
|
+
z2.object({ type: z2.literal("interrupt"), input: RequestRunInterruptSchema }).strict(),
|
|
144
|
+
z2.object({ type: z2.literal("recover"), input: RecoverAgentRunSchema }).strict(),
|
|
145
|
+
z2.object({ type: z2.literal("terminal"), input: CommitRunTerminalSchema }).strict(),
|
|
146
|
+
z2.object({ type: z2.literal("compact"), input: ReplaceCompactedRangeSchema }).strict()
|
|
147
|
+
]);
|
|
148
|
+
var AgentStoreEventEnvelopeSchema = z2.object({
|
|
149
|
+
schemaVersion: z2.int().positive(),
|
|
150
|
+
eventId: z2.string().min(1),
|
|
151
|
+
conversationId: z2.string().min(1),
|
|
152
|
+
seq: z2.int().positive(),
|
|
153
|
+
kind: z2.string().min(1),
|
|
154
|
+
occurredAt: z2.iso.datetime({ offset: true }),
|
|
155
|
+
payload: z2.json(),
|
|
156
|
+
ignorable: z2.literal(true).optional()
|
|
157
|
+
}).strict();
|
|
158
|
+
var AppendAgentStoreEventSchema = z2.object({
|
|
159
|
+
conversationId: z2.string().min(1),
|
|
160
|
+
kind: AgentStoreEventKindSchema,
|
|
161
|
+
occurredAt: z2.iso.datetime({ offset: true }).optional(),
|
|
162
|
+
payload: z2.json(),
|
|
163
|
+
ignorable: z2.literal(true).optional()
|
|
164
|
+
}).strict();
|
|
165
|
+
var ReadAgentStoreEventsSchema = z2.object({
|
|
166
|
+
conversationId: z2.string().min(1),
|
|
167
|
+
fromSeq: z2.int().positive().optional(),
|
|
168
|
+
toSeq: z2.int().positive().optional(),
|
|
169
|
+
limit: z2.int().positive().max(1e4).default(1000)
|
|
170
|
+
}).strict().refine((input) => input.fromSeq === undefined || input.toSeq === undefined || input.fromSeq <= input.toSeq, { message: "fromSeq must not exceed toSeq" });
|
|
171
|
+
var AgentStoreEventPageSchema = z2.object({
|
|
172
|
+
items: z2.array(AgentStoreEventEnvelopeSchema),
|
|
173
|
+
nextSeq: z2.int().positive().optional()
|
|
174
|
+
}).strict();
|
|
175
|
+
var CURRENT_EVENT_SCHEMA_VERSION = 1;
|
|
176
|
+
function decodeAgentStoreEvent(value) {
|
|
177
|
+
const envelope = AgentStoreEventEnvelopeSchema.parse(value);
|
|
178
|
+
const knownVersion = envelope.schemaVersion === CURRENT_EVENT_SCHEMA_VERSION;
|
|
179
|
+
const knownKind = AgentStoreEventKindSchema.safeParse(envelope.kind).success;
|
|
180
|
+
if (knownVersion && knownKind)
|
|
181
|
+
return { outcome: "accepted", event: envelope };
|
|
182
|
+
if (!envelope.ignorable) {
|
|
183
|
+
throw new TypeError(`Unsupported agent store event at ${envelope.conversationId}:${envelope.seq} ` + `(${envelope.eventId}): schema ${envelope.schemaVersion}, kind ${envelope.kind}`);
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
outcome: "ignored",
|
|
187
|
+
eventId: envelope.eventId,
|
|
188
|
+
conversationId: envelope.conversationId,
|
|
189
|
+
seq: envelope.seq,
|
|
190
|
+
schemaVersion: envelope.schemaVersion,
|
|
191
|
+
kind: envelope.kind
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function agentStoreEventDraft(input) {
|
|
195
|
+
const parsed = AppendAgentStoreEventSchema.parse(input);
|
|
196
|
+
return {
|
|
197
|
+
schemaVersion: CURRENT_EVENT_SCHEMA_VERSION,
|
|
198
|
+
eventId: randomUUID(),
|
|
199
|
+
conversationId: parsed.conversationId,
|
|
200
|
+
kind: parsed.kind,
|
|
201
|
+
occurredAt: parsed.occurredAt ?? new Date().toISOString(),
|
|
202
|
+
payload: parsed.payload,
|
|
203
|
+
...parsed.ignorable && { ignorable: true }
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function canonicalJsonValue(value) {
|
|
207
|
+
if (value === null || typeof value === "boolean" || typeof value === "number") {
|
|
208
|
+
return JSON.stringify(value);
|
|
209
|
+
}
|
|
210
|
+
if (typeof value === "string")
|
|
211
|
+
return JSON.stringify(value);
|
|
212
|
+
if (Array.isArray(value))
|
|
213
|
+
return `[${value.map(canonicalJsonValue).join(",")}]`;
|
|
214
|
+
const record = z2.record(z2.string(), z2.json()).parse(value);
|
|
215
|
+
return `{${Object.keys(record).sort().map((key) => `${JSON.stringify(key)}:${canonicalJsonValue(record[key])}`).join(",")}}`;
|
|
216
|
+
}
|
|
217
|
+
function canonicalAgentJson(value) {
|
|
218
|
+
return canonicalJsonValue(z2.json().parse(value));
|
|
219
|
+
}
|
|
220
|
+
var AgentConversationArchiveSchema = z2.object({
|
|
221
|
+
format: z2.literal("stitchkit.agent-conversation"),
|
|
222
|
+
formatVersion: z2.literal(1),
|
|
223
|
+
conversationId: z2.string().min(1),
|
|
224
|
+
events: z2.array(AgentStoreEventEnvelopeSchema),
|
|
225
|
+
projections: z2.array(z2.json()).default([]),
|
|
226
|
+
spills: z2.array(z2.json()).default([])
|
|
227
|
+
}).strict();
|
|
228
|
+
function encodeAgentConversationArchive(archive) {
|
|
229
|
+
const parsed = AgentConversationArchiveSchema.parse(archive);
|
|
230
|
+
return new TextEncoder().encode(canonicalAgentJson(parsed));
|
|
231
|
+
}
|
|
232
|
+
function decodeAgentConversationArchive(bytes) {
|
|
233
|
+
const value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
|
|
234
|
+
const archive = AgentConversationArchiveSchema.parse(value);
|
|
235
|
+
let previous = 0;
|
|
236
|
+
const ids = new Set;
|
|
237
|
+
for (const event of archive.events) {
|
|
238
|
+
if (event.conversationId !== archive.conversationId) {
|
|
239
|
+
throw new TypeError("Conversation archive contains an event for another conversation");
|
|
240
|
+
}
|
|
241
|
+
if (event.seq <= previous)
|
|
242
|
+
throw new TypeError("Conversation archive event sequence is not increasing");
|
|
243
|
+
if (ids.has(event.eventId))
|
|
244
|
+
throw new TypeError("Conversation archive contains a duplicate event id");
|
|
245
|
+
decodeAgentStoreEvent(event);
|
|
246
|
+
previous = event.seq;
|
|
247
|
+
ids.add(event.eventId);
|
|
248
|
+
}
|
|
249
|
+
return archive;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export { AgentStoreConflictSchema, AgentStoreNotFoundSchema, AgentStoreAppliedSchema, AgentStoreDuplicateSchema, AgentStoreMutationResultSchema, AgentRunViewSchema, AcceptInputAndAssignRunSchema, AcquireAgentRunSchema, CheckpointRunAssistantSchema, RecordRunOperationSchema, CommitRunTerminalSchema, RequestRunInterruptSchema, RecoverAgentRunSchema, ReplaceCompactedRangeSchema, AgentRecoverableDescriptorSchema, AgentRecoverablePageSchema, AgentStoreEventKindSchema, AgentStoreTransitionSchema, AgentStoreEventEnvelopeSchema, AppendAgentStoreEventSchema, ReadAgentStoreEventsSchema, AgentStoreEventPageSchema, decodeAgentStoreEvent, agentStoreEventDraft, canonicalAgentJson, AgentConversationArchiveSchema, encodeAgentConversationArchive, decodeAgentConversationArchive };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRuntimeEventSchema
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-hkm6wysp.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentMessagePartSchema,
|
|
6
6
|
AgentSnapshotSchema
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-p1b1y93x.js";
|
|
8
8
|
|
|
9
9
|
// src/agent-runtime/control-schema.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -179,7 +179,7 @@ function reduceAgentControlEvent(view, rawEvent) {
|
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
181
|
const transient = current.transientByRun[event.runId] ?? { text: "", reasoning: "" };
|
|
182
|
-
const nextTransient = event.type === "assistant-delta" ? { ...transient, text: transient.text + event.textDelta } : event.type === "reasoning-delta" ? { ...transient, reasoning: transient.reasoning + event.textDelta } : transient;
|
|
182
|
+
const nextTransient = event.type === "assistant-delta" ? { ...transient, text: transient.text + event.textDelta } : event.type === "reasoning-delta" ? { ...transient, reasoning: transient.reasoning + event.textDelta } : event.type === "attempt-reset" ? { text: "", reasoning: "" } : transient;
|
|
183
183
|
const snapshotStale = durable(event) && current.snapshot?.version !== event.snapshotVersion;
|
|
184
184
|
const transientByRun = event.type === "terminal" ? Object.fromEntries(Object.entries(current.transientByRun).filter(([runId]) => runId !== event.runId)) : { ...current.transientByRun, [event.runId]: nextTransient };
|
|
185
185
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-store-conformance.d.ts","sourceRoot":"","sources":["../../src/testing/agent-store-conformance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-store-conformance.d.ts","sourceRoot":"","sources":["../../src/testing/agent-store-conformance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;;;;;;;;GASG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,WAAW,CACT,OAAO,EAAE,4BAA4B,GACpC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAClD;;;;;;;;OAQG;IACH,OAAO,CAAC,CAAC,OAAO,EAAE,4BAA4B,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvE;AAwCD,gFAAgF;AAChF,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
package/dist/testing.js
CHANGED
|
@@ -4,10 +4,18 @@ import {
|
|
|
4
4
|
import"./index-2k4yrqkc.js";
|
|
5
5
|
import"./index-3gye9wzb.js";
|
|
6
6
|
import"./index-3z73fh2c.js";
|
|
7
|
+
import {
|
|
8
|
+
createAgentRaceBarrier,
|
|
9
|
+
createAgentRaceDriver,
|
|
10
|
+
createAgentRaceTrace
|
|
11
|
+
} from "./index-cnyk6te3.js";
|
|
12
|
+
import {
|
|
13
|
+
decodeAgentConversationArchive
|
|
14
|
+
} from "./index-vfgb58nf.js";
|
|
7
15
|
import {
|
|
8
16
|
AgentMessageSchema,
|
|
9
17
|
AgentRunSchema
|
|
10
|
-
} from "./index-
|
|
18
|
+
} from "./index-p1b1y93x.js";
|
|
11
19
|
import {
|
|
12
20
|
RealtimeRejectDirectionSchema,
|
|
13
21
|
RealtimeRejectFaultSchema,
|
|
@@ -23,7 +31,7 @@ import {
|
|
|
23
31
|
mcpProjectionCandidate,
|
|
24
32
|
prepareProjectedMcpTools,
|
|
25
33
|
projectToolSurface
|
|
26
|
-
} from "./index-
|
|
34
|
+
} from "./index-r159gjwy.js";
|
|
27
35
|
import {
|
|
28
36
|
toJsonSchema
|
|
29
37
|
} from "./index-cby4ar3v.js";
|
|
@@ -44,82 +52,6 @@ import"./index-kzfs85xp.js";
|
|
|
44
52
|
import {
|
|
45
53
|
isRecord
|
|
46
54
|
} from "./index-77fekveh.js";
|
|
47
|
-
|
|
48
|
-
// src/agent-runtime/testing.ts
|
|
49
|
-
function createAgentRaceBarrier(timeoutMs = 5000) {
|
|
50
|
-
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1) {
|
|
51
|
-
throw new TypeError("Agent race barrier timeoutMs must be a positive safe integer");
|
|
52
|
-
}
|
|
53
|
-
const reached = Promise.withResolvers();
|
|
54
|
-
const released = Promise.withResolvers();
|
|
55
|
-
let announced = false;
|
|
56
|
-
return {
|
|
57
|
-
reached: reached.promise,
|
|
58
|
-
async wait() {
|
|
59
|
-
if (!announced) {
|
|
60
|
-
announced = true;
|
|
61
|
-
reached.resolve();
|
|
62
|
-
}
|
|
63
|
-
let timer;
|
|
64
|
-
try {
|
|
65
|
-
await Promise.race([
|
|
66
|
-
released.promise,
|
|
67
|
-
new Promise((_resolve, reject) => {
|
|
68
|
-
timer = setTimeout(() => reject(new Error(`Agent race barrier exceeded ${timeoutMs}ms teardown bound`)), timeoutMs);
|
|
69
|
-
})
|
|
70
|
-
]);
|
|
71
|
-
} finally {
|
|
72
|
-
if (timer !== undefined)
|
|
73
|
-
clearTimeout(timer);
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
release: released.resolve
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function createAgentRaceTrace() {
|
|
80
|
-
const recorded = [];
|
|
81
|
-
return {
|
|
82
|
-
record(name) {
|
|
83
|
-
const entry = { name, sequence: recorded.length };
|
|
84
|
-
recorded.push(entry);
|
|
85
|
-
return entry;
|
|
86
|
-
},
|
|
87
|
-
entries: () => recorded.map((entry) => ({ ...entry })),
|
|
88
|
-
assertBefore(first, second) {
|
|
89
|
-
const firstEntry = recorded.find((entry) => entry.name === first);
|
|
90
|
-
const secondEntry = recorded.find((entry) => entry.name === second);
|
|
91
|
-
if (!firstEntry || !secondEntry || firstEntry.sequence >= secondEntry.sequence) {
|
|
92
|
-
throw new Error(`Expected ${first} before ${second}`);
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
assertSequence(names) {
|
|
96
|
-
const actual = recorded.map((entry) => entry.name);
|
|
97
|
-
if (actual.length !== names.length || actual.some((name, index) => name !== names[index])) {
|
|
98
|
-
throw new Error(`Expected trace ${names.join(" -> ")}, received ${actual.join(" -> ")}`);
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
count: (name) => recorded.filter((entry) => entry.name === name).length
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function createAgentRaceDriver(timeoutMs = 5000) {
|
|
105
|
-
const trace = createAgentRaceTrace();
|
|
106
|
-
const barriers = new Map;
|
|
107
|
-
return {
|
|
108
|
-
trace,
|
|
109
|
-
barrier(name) {
|
|
110
|
-
const existing = barriers.get(name);
|
|
111
|
-
if (existing)
|
|
112
|
-
return existing;
|
|
113
|
-
const created = createAgentRaceBarrier(timeoutMs);
|
|
114
|
-
barriers.set(name, created);
|
|
115
|
-
return created;
|
|
116
|
-
},
|
|
117
|
-
releaseAll() {
|
|
118
|
-
for (const barrier of barriers.values())
|
|
119
|
-
barrier.release();
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
55
|
// src/testing/agent-store-conformance.ts
|
|
124
56
|
function userMessage(conversationId, id) {
|
|
125
57
|
return AgentMessageSchema.parse({
|
|
@@ -160,7 +92,8 @@ async function runAgentStoreConformance(config) {
|
|
|
160
92
|
`${run}-absorb`,
|
|
161
93
|
`${run}-causal-history`,
|
|
162
94
|
`${run}-causal-active`,
|
|
163
|
-
`${run}-interrupt-priority
|
|
95
|
+
`${run}-interrupt-priority`,
|
|
96
|
+
`${run}-ledger`
|
|
164
97
|
]
|
|
165
98
|
};
|
|
166
99
|
const store = await config.createStore(context);
|
|
@@ -187,8 +120,11 @@ async function conformanceScenario(store, conversationIds) {
|
|
|
187
120
|
absorbConversationId,
|
|
188
121
|
causalHistoryConversationId,
|
|
189
122
|
causalActiveConversationId,
|
|
190
|
-
interruptPriorityConversationId
|
|
123
|
+
interruptPriorityConversationId,
|
|
124
|
+
ledgerConversationId
|
|
191
125
|
] = conversationIds;
|
|
126
|
+
if (ledgerConversationId)
|
|
127
|
+
await ledgerScenario(store, ledgerConversationId);
|
|
192
128
|
if (!conversationId || !recoveryConversationId || !absorbConversationId || !causalHistoryConversationId || !causalActiveConversationId || !interruptPriorityConversationId) {
|
|
193
129
|
throw new Error("Agent store conformance requires six conversation identities");
|
|
194
130
|
}
|
|
@@ -845,6 +781,44 @@ async function assertAbsorptionIsAtomic(store, conversationId) {
|
|
|
845
781
|
throw new Error("A retried absorbed key must still name its own input");
|
|
846
782
|
}
|
|
847
783
|
}
|
|
784
|
+
async function ledgerScenario(store, conversationId) {
|
|
785
|
+
const first = await store.appendEvent({
|
|
786
|
+
conversationId,
|
|
787
|
+
kind: "state/set",
|
|
788
|
+
payload: { n: 1 }
|
|
789
|
+
});
|
|
790
|
+
if (first.seq !== 1)
|
|
791
|
+
throw new Error(`Agent store conformance expected seq 1, received ${first.seq}`);
|
|
792
|
+
const appended = await Promise.all(Array.from({ length: 20 }, (_, index) => store.appendEvent({ conversationId, kind: "state/set", payload: { n: index + 2 } })));
|
|
793
|
+
const seqs = [first.seq, ...appended.map((event) => event.seq)].sort((a, b) => a - b);
|
|
794
|
+
for (let index = 0;index < seqs.length; index += 1) {
|
|
795
|
+
if (seqs[index] !== index + 1) {
|
|
796
|
+
throw new Error(`Agent store conformance expected contiguous seq, received ${seqs.join(",")}`);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
const page = await store.readEvents({ conversationId, fromSeq: 5, toSeq: 9, limit: 3 });
|
|
800
|
+
if (page.items.map((event) => event.seq).join(",") !== "5,6,7" || page.nextSeq !== 8) {
|
|
801
|
+
throw new Error(`Agent store conformance expected events 5,6,7 then 8, received ${page.items.map((event) => event.seq).join(",")} then ${page.nextSeq}`);
|
|
802
|
+
}
|
|
803
|
+
const ignorable = await store.appendEvent({
|
|
804
|
+
conversationId,
|
|
805
|
+
kind: "state/set",
|
|
806
|
+
payload: { n: "ignorable" },
|
|
807
|
+
ignorable: true
|
|
808
|
+
});
|
|
809
|
+
if (ignorable.ignorable !== true) {
|
|
810
|
+
throw new Error("Agent store conformance expected the ignorable flag to persist");
|
|
811
|
+
}
|
|
812
|
+
const archive = await store.exportConversation(conversationId);
|
|
813
|
+
const again = await store.exportConversation(conversationId);
|
|
814
|
+
if (Buffer.compare(Buffer.from(archive), Buffer.from(again)) !== 0) {
|
|
815
|
+
throw new Error("Agent store conformance expected two exports of a quiet store to be byte-equal");
|
|
816
|
+
}
|
|
817
|
+
const decoded = decodeAgentConversationArchive(archive);
|
|
818
|
+
if (decoded.events.length !== 22) {
|
|
819
|
+
throw new Error(`Agent store conformance expected 22 archived events, received ${decoded.events.length}`);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
848
822
|
// src/testing/managed-resource-conformance-contract.ts
|
|
849
823
|
import { z } from "zod";
|
|
850
824
|
var ManagedResourceConformanceScenarioIdSchema = z.enum([
|
package/dist/tool-invoker.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createToolInvoker
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-0ydchz76.js";
|
|
4
|
+
import"./index-0vfdh685.js";
|
|
5
|
+
import"./index-wn9cb82y.js";
|
|
6
6
|
import"./index-vsbzgd7b.js";
|
|
7
7
|
import"./index-f9mb610r.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-r159gjwy.js";
|
|
9
9
|
import"./index-cby4ar3v.js";
|
|
10
10
|
import"./index-7zbps32p.js";
|
|
11
11
|
import"./index-7evdsyez.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-projector.d.ts","sourceRoot":"","sources":["../../../src/tools/internal/surface-projector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAK,MAAM,KAAK,CAAC;AACtD,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AASzD,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;AAE7D,wFAAwF;AACxF,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,UAAU,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;IACF,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,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1
|
+
{"version":3,"file":"surface-projector.d.ts","sourceRoot":"","sources":["../../../src/tools/internal/surface-projector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAK,MAAM,KAAK,CAAC;AACtD,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AASzD,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;AAE7D,wFAAwF;AACxF,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,UAAU,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;IACF,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAC/C,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,EAAE,CAAC,EAAE,cAAc,CAAC;IACpB,GAAG,CAAC,EAAE,iBAAiB,CAAC;CACzB;AAED,iFAAiF;AACjF,MAAM,WAAW,iCAAkC,SAAQ,4BAA4B;IACrF,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC/B;AAED,sFAAsF;AACtF,MAAM,WAAW,oBAAoB,CACnC,QAA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AC,EAAE,yBAAyB,CAAC;IAC7C,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE;QAAE,eAAe,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D;AAED,MAAM,WAAW,sBAAsB,CAAC,KAAK;IAC3C,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB,CAAC,KAAK;IAC7C,IAAI,EAAE,KAAK,CAAC;IACZ,WAAW,EAAE,sBAAsB,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,SAAS,4BAA4B,EAClF,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,GAC5B,sBAAsB,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CA0BjD;AAeD,0EAA0E;AAC1E,wBAAgB,wBAAwB,CAAC,KAAK,EAC5C,KAAK,EAAE,SAAS,sBAAsB,CAAC,KAAK,CAAC,EAAE,EAC/C,MAAM,GAAE,8BAAmC,GAC1C,wBAAwB,CAAC,KAAK,CAAC,EAAE,CA6GnC"}
|
package/dist/tools/manifest.d.ts
CHANGED
|
@@ -12,6 +12,22 @@ export interface ToolManifestConfig extends ToolSurfaceDefinition {
|
|
|
12
12
|
extend?: CollectToolsConfig['extend'];
|
|
13
13
|
flattenUnionInput?: boolean;
|
|
14
14
|
}
|
|
15
|
+
export interface ToolCatalogEntry extends ToolManifestEntry {
|
|
16
|
+
source: {
|
|
17
|
+
kind: 'contract' | 'runtime';
|
|
18
|
+
service: string;
|
|
19
|
+
action: string;
|
|
20
|
+
};
|
|
21
|
+
schemaBytes: number;
|
|
22
|
+
deferred: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ToolCatalogConfig extends ToolManifestConfig {
|
|
25
|
+
deferredNames?: readonly string[];
|
|
26
|
+
/** Refuses only when explicitly configured. */
|
|
27
|
+
maxSchemaBytes?: number;
|
|
28
|
+
}
|
|
29
|
+
/** Inspect the exact model-facing catalog using the same projection as the live mount. */
|
|
30
|
+
export declare function describeToolCatalog(config: ToolCatalogConfig): ToolCatalogEntry[];
|
|
15
31
|
/**
|
|
16
32
|
* Build a searchable manifest from the complete contract/runtime surface —
|
|
17
33
|
* name, description and JSON Schema for each. Use it to power a `tool_search`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/tools/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAsB,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAE3E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,0EAA0E;IAC1E,SAAS,EAAE,oBAAoB,CAAC;IAChC,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,EAAE,CAWjF"}
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/tools/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAsB,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAE3E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,0EAA0E;IAC1E,SAAS,EAAE,oBAAoB,CAAC;IAChC,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,MAAM,EAAE;QAAE,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,gBAAgB,EAAE,CA2BjF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,EAAE,CAWjF"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export { flattenToolJsonSchema, type ToolPresentationSchema, } from './tools/fla
|
|
|
18
18
|
export { createToolInvoker, type ToolInvocationOptions, type ToolInvoker, type ToolInvokerConfig, type ToolInvokerTransport, } from './tools/invoker.js';
|
|
19
19
|
export { composeToolLifecycle } from './tools/lifecycle.js';
|
|
20
20
|
export { listContractToolNames, listToolNames, type ToolNameEntry, } from './tools/list-names.js';
|
|
21
|
-
export { buildToolManifest, type ToolManifestConfig, type ToolManifestEntry, } from './tools/manifest.js';
|
|
21
|
+
export { buildToolManifest, describeToolCatalog, type ToolCatalogConfig, type ToolCatalogEntry, type ToolManifestConfig, type ToolManifestEntry, } from './tools/manifest.js';
|
|
22
22
|
export { buildMcpServer, type DirectMcpSurfaceConfig, type FiniteMcpSurfaceConfig, type McpMountConfig, type McpServerBuildConfig, type McpServerSharedConfig, mountMcp, mountMcpResource, validateMcpSchemas, } from './tools/mcp.js';
|
|
23
23
|
export { EXT_APPS_BUNDLE_PLACEHOLDER, inlineMcpAppBundle, type McpAppCsp, type McpAppResourceMeta, type McpResourceDef, RESOURCE_MIME_TYPE, } from './tools/mcp-app.js';
|
|
24
24
|
export { createMcpHandler, createMcpHttpRoute, type McpHandlerConfig, type McpHttpConfig, type McpHttpHandler, type McpHttpSecurityConfig, type McpLegacyPolicy, } from './tools/mcp-handler.js';
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,sCAAsC,EAC3C,KAAK,qCAAqC,EAC1C,KAAK,oCAAoC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