@roll-agent/runtime 0.27.0 → 1.0.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/dist/engine/agent-session.d.ts +8 -5
- package/dist/engine/agent-session.js +1 -1
- package/dist/engine/cancelled-turn-recovery.d.ts +1 -11
- package/dist/engine/capability-manifest.d.ts +3 -3
- package/dist/engine/compaction-checkpoint.d.ts +486 -3903
- package/dist/engine/compaction-checkpoint.js +1 -1
- package/dist/engine/compaction-semantic-state.d.ts +210 -1804
- package/dist/engine/conversation-engine.d.ts +24 -42
- package/dist/engine/conversation-engine.js +1 -1
- package/dist/engine/explicit-skill-context.d.ts +6 -62
- package/dist/engine/explicit-skill-context.js +1 -1
- package/dist/engine/model-catalog.d.ts +3 -27
- package/dist/engine/request-budget.d.ts +9 -50
- package/dist/host-contracts/agent-host.d.ts +39 -0
- package/dist/host-contracts/agent-host.js +1 -0
- package/dist/host-contracts/index.d.ts +7 -0
- package/dist/host-contracts/index.js +1 -0
- package/dist/host-contracts/runtime-settings.d.ts +68 -0
- package/dist/host-contracts/runtime-settings.js +1 -0
- package/dist/host-contracts/schedule-tools.d.ts +138 -0
- package/dist/host-contracts/schedule-tools.js +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +1 -1
- package/dist/interaction/user-input-interaction-manager.d.ts +1 -1
- package/dist/scheduler/calendar.d.ts +13 -51
- package/dist/scheduler/trigger.d.ts +20 -156
- package/dist/server/protocol.d.ts +11 -73
- package/dist/server/runtime-client-interaction-lifecycle.d.ts +2 -2
- package/dist/skills/contracts.d.ts +24 -0
- package/dist/skills/contracts.js +1 -0
- package/dist/skills/index.d.ts +2 -0
- package/dist/skills/index.js +1 -0
- package/dist/skills/invocation.d.ts +29 -0
- package/dist/skills/invocation.js +1 -0
- package/dist/store/semantic-ledger.d.ts +27 -72
- package/dist/store/thread-origin.d.ts +8 -100
- package/dist/store/thread-store.d.ts +3 -3
- package/dist/store/turn-input.d.ts +11 -135
- package/dist/store/turn-input.js +1 -1
- package/dist/tool-bridge/bash-tool.d.ts +1 -13
- package/dist/tool-bridge/build-tools.d.ts +5 -5
- package/dist/tool-bridge/build-tools.js +1 -1
- package/dist/tool-bridge/file-tools/edit-file-tool.d.ts +2 -24
- package/dist/tool-bridge/file-tools/glob-tool.d.ts +1 -7
- package/dist/tool-bridge/file-tools/grep-tool.d.ts +1 -15
- package/dist/tool-bridge/file-tools/list-dir-tool.d.ts +1 -5
- package/dist/tool-bridge/file-tools/read-file-tool.d.ts +1 -9
- package/dist/tool-bridge/file-tools/verify-file-tool.d.ts +5 -8
- package/dist/tool-bridge/file-tools/write-file-tool.d.ts +1 -7
- package/dist/tool-bridge/model-input-schema.d.ts +3 -0
- package/dist/tool-bridge/model-input-schema.js +1 -0
- package/dist/tool-bridge/naming.d.ts +2 -2
- package/dist/tool-bridge/normalize-result.js +1 -1
- package/dist/tool-bridge/observation-recall-tool.d.ts +1 -9
- package/dist/tool-bridge/schedule-create-input.d.ts +9 -75
- package/dist/tool-bridge/schedule-tool.d.ts +1 -1
- package/dist/tool-bridge/schedule-tool.js +1 -1
- package/dist/tool-bridge/session-exec-tool.d.ts +3 -23
- package/dist/tool-bridge/skill-tool.d.ts +2 -8
- package/dist/tool-bridge/skill-tool.js +1 -1
- package/dist/tool-bridge/tool-approval-continuation.d.ts +1 -1
- package/dist/tool-bridge/tool-approval-continuation.js +1 -1
- package/dist/tool-bridge/tool-execution-coordinator.d.ts +3 -26
- package/dist/tool-bridge/tool-execution-coordinator.js +1 -1
- package/dist/tool-bridge/transcript-tool.d.ts +7 -35
- package/dist/tool-bridge/user-input-tool.js +1 -1
- package/dist/tool-contracts/agent-types.d.ts +32 -0
- package/dist/tool-contracts/agent-types.js +1 -0
- package/dist/tool-contracts/execution-timeout.d.ts +2 -0
- package/dist/tool-contracts/execution-timeout.js +1 -0
- package/dist/tool-contracts/index.d.ts +8 -0
- package/dist/tool-contracts/index.js +1 -0
- package/dist/tool-contracts/issues.d.ts +22 -0
- package/dist/tool-contracts/issues.js +1 -0
- package/dist/tool-contracts/json-schema-refs.d.ts +19 -0
- package/dist/tool-contracts/json-schema-refs.js +1 -0
- package/dist/tool-contracts/preflight.d.ts +16 -0
- package/dist/tool-contracts/preflight.js +1 -0
- package/dist/tool-contracts/resource-hints.d.ts +26 -0
- package/dist/tool-contracts/resource-hints.js +1 -0
- package/dist/tool-contracts/results.d.ts +7 -0
- package/dist/tool-contracts/results.js +1 -0
- package/dist/tool-contracts/schema.d.ts +13 -0
- package/dist/tool-contracts/schema.js +1 -0
- package/dist/types/cancellation.d.ts +6 -10
- package/package.json +17 -6
|
@@ -5,16 +5,11 @@ export declare const SEMANTIC_LEDGER_SQL = "\nCREATE TABLE IF NOT EXISTS compact
|
|
|
5
5
|
export declare const contextRecoveryItemSchema: z.ZodObject<{
|
|
6
6
|
itemId: z.ZodString;
|
|
7
7
|
version: z.ZodNumber;
|
|
8
|
-
category: z.ZodEnum<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, {
|
|
14
|
-
version: number;
|
|
15
|
-
itemId: string;
|
|
16
|
-
category: "goal" | "constraint";
|
|
17
|
-
}>;
|
|
8
|
+
category: z.ZodEnum<{
|
|
9
|
+
goal: "goal";
|
|
10
|
+
constraint: "constraint";
|
|
11
|
+
}>;
|
|
12
|
+
}, z.core.$strip>;
|
|
18
13
|
export declare const recoveryStateSchema: z.ZodObject<{
|
|
19
14
|
checkpointId: z.ZodString;
|
|
20
15
|
required: z.ZodBoolean;
|
|
@@ -23,77 +18,37 @@ export declare const recoveryStateSchema: z.ZodObject<{
|
|
|
23
18
|
requiredItems: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
24
19
|
itemId: z.ZodString;
|
|
25
20
|
version: z.ZodNumber;
|
|
26
|
-
category: z.ZodEnum<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
version: number;
|
|
33
|
-
itemId: string;
|
|
34
|
-
category: "goal" | "constraint";
|
|
35
|
-
}>, "many">>;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
required: boolean;
|
|
38
|
-
checkpointId: string;
|
|
39
|
-
unextracted: boolean;
|
|
40
|
-
memo: string;
|
|
41
|
-
requiredItems: {
|
|
42
|
-
version: number;
|
|
43
|
-
itemId: string;
|
|
44
|
-
category: "goal" | "constraint";
|
|
45
|
-
}[];
|
|
46
|
-
}, {
|
|
47
|
-
required: boolean;
|
|
48
|
-
checkpointId: string;
|
|
49
|
-
unextracted: boolean;
|
|
50
|
-
memo: string;
|
|
51
|
-
requiredItems?: {
|
|
52
|
-
version: number;
|
|
53
|
-
itemId: string;
|
|
54
|
-
category: "goal" | "constraint";
|
|
55
|
-
}[] | undefined;
|
|
56
|
-
}>;
|
|
21
|
+
category: z.ZodEnum<{
|
|
22
|
+
goal: "goal";
|
|
23
|
+
constraint: "constraint";
|
|
24
|
+
}>;
|
|
25
|
+
}, z.core.$strip>>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
57
27
|
export type ContextRecoveryState = z.infer<typeof recoveryStateSchema>;
|
|
58
28
|
export declare const contextRecoveryNoteSchema: z.ZodObject<{
|
|
59
29
|
checkpointId: z.ZodString;
|
|
60
30
|
notes: z.ZodString;
|
|
61
|
-
},
|
|
62
|
-
checkpointId: string;
|
|
63
|
-
notes: string;
|
|
64
|
-
}, {
|
|
65
|
-
checkpointId: string;
|
|
66
|
-
notes: string;
|
|
67
|
-
}>;
|
|
31
|
+
}, z.core.$strip>;
|
|
68
32
|
export type ContextRecoveryNote = z.infer<typeof contextRecoveryNoteSchema>;
|
|
69
33
|
export declare const ledgerRowSchema: z.ZodObject<{
|
|
70
34
|
item_id: z.ZodString;
|
|
71
35
|
generation: z.ZodNumber;
|
|
72
36
|
scope: z.ZodString;
|
|
73
|
-
category: z.ZodEnum<
|
|
37
|
+
category: z.ZodEnum<{
|
|
38
|
+
decision: "decision";
|
|
39
|
+
resource: "resource";
|
|
40
|
+
running_session: "running_session";
|
|
41
|
+
goal: "goal";
|
|
42
|
+
constraint: "constraint";
|
|
43
|
+
completed_work: "completed_work";
|
|
44
|
+
pending_work: "pending_work";
|
|
45
|
+
uncertainty: "uncertainty";
|
|
46
|
+
}>;
|
|
74
47
|
status: z.ZodString;
|
|
75
48
|
resolution_json: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
49
|
first_tool_sequence: z.ZodNumber;
|
|
77
50
|
item_json: z.ZodString;
|
|
78
|
-
},
|
|
79
|
-
status: string;
|
|
80
|
-
generation: number;
|
|
81
|
-
scope: string;
|
|
82
|
-
category: "resource" | "decision" | "running_session" | "goal" | "constraint" | "completed_work" | "pending_work" | "uncertainty";
|
|
83
|
-
item_id: string;
|
|
84
|
-
first_tool_sequence: number;
|
|
85
|
-
item_json: string;
|
|
86
|
-
resolution_json?: string | null | undefined;
|
|
87
|
-
}, {
|
|
88
|
-
status: string;
|
|
89
|
-
generation: number;
|
|
90
|
-
scope: string;
|
|
91
|
-
category: "resource" | "decision" | "running_session" | "goal" | "constraint" | "completed_work" | "pending_work" | "uncertainty";
|
|
92
|
-
item_id: string;
|
|
93
|
-
first_tool_sequence: number;
|
|
94
|
-
item_json: string;
|
|
95
|
-
resolution_json?: string | null | undefined;
|
|
96
|
-
}>;
|
|
51
|
+
}, z.core.$strip>;
|
|
97
52
|
export type SemanticLedgerRow = z.infer<typeof ledgerRowSchema>;
|
|
98
53
|
/** Compatibility reader/importer for historical V2 records. New checkpoints never append here. */
|
|
99
54
|
export declare class SemanticLedger {
|
|
@@ -102,14 +57,14 @@ export declare class SemanticLedger {
|
|
|
102
57
|
rows(threadId: string, generation: number, itemId?: string): SemanticLedgerRow[];
|
|
103
58
|
/** Stable ordinals within an immutable checkpoint generation; fetch only the requested page. */
|
|
104
59
|
page(threadId: string, generation: number, afterSequence: number, limit: number): {
|
|
105
|
-
|
|
60
|
+
item_id: string;
|
|
106
61
|
generation: number;
|
|
107
62
|
scope: string;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
item_id: string;
|
|
63
|
+
category: "decision" | "resource" | "running_session" | "goal" | "constraint" | "completed_work" | "pending_work" | "uncertainty";
|
|
64
|
+
status: string;
|
|
111
65
|
first_tool_sequence: number;
|
|
112
66
|
item_json: string;
|
|
67
|
+
sequence: number;
|
|
113
68
|
resolution_json?: string | null | undefined;
|
|
114
69
|
}[];
|
|
115
70
|
notes(threadId: string): ContextRecoveryNote[];
|
|
@@ -9,32 +9,10 @@ export declare const scheduledThreadOriginSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
9
9
|
cwd: z.ZodString;
|
|
10
10
|
scheduledFor: z.ZodString;
|
|
11
11
|
ledgerDir: z.ZodString;
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
name: string;
|
|
15
|
-
cwd: string;
|
|
16
|
-
attempt: number;
|
|
17
|
-
scheduleId: string;
|
|
18
|
-
invocationId: string;
|
|
19
|
-
scheduledFor: string;
|
|
20
|
-
ledgerDir: string;
|
|
21
|
-
}, {
|
|
22
|
-
kind: "scheduled";
|
|
23
|
-
name: string;
|
|
24
|
-
cwd: string;
|
|
25
|
-
attempt: number;
|
|
26
|
-
scheduleId: string;
|
|
27
|
-
invocationId: string;
|
|
28
|
-
scheduledFor: string;
|
|
29
|
-
ledgerDir: string;
|
|
30
|
-
}>>;
|
|
31
|
-
export declare const threadOriginSchema: z.ZodReadonly<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
12
|
+
}, z.core.$strict>>;
|
|
13
|
+
export declare const threadOriginSchema: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
14
|
kind: z.ZodLiteral<"interactive">;
|
|
33
|
-
},
|
|
34
|
-
kind: "interactive";
|
|
35
|
-
}, {
|
|
36
|
-
kind: "interactive";
|
|
37
|
-
}>, z.ZodObject<{
|
|
15
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
38
16
|
kind: z.ZodLiteral<"scheduled">;
|
|
39
17
|
scheduleId: z.ZodString;
|
|
40
18
|
invocationId: z.ZodString;
|
|
@@ -43,34 +21,12 @@ export declare const threadOriginSchema: z.ZodReadonly<z.ZodDiscriminatedUnion<"
|
|
|
43
21
|
cwd: z.ZodString;
|
|
44
22
|
scheduledFor: z.ZodString;
|
|
45
23
|
ledgerDir: z.ZodString;
|
|
46
|
-
},
|
|
47
|
-
kind: "scheduled";
|
|
48
|
-
name: string;
|
|
49
|
-
cwd: string;
|
|
50
|
-
attempt: number;
|
|
51
|
-
scheduleId: string;
|
|
52
|
-
invocationId: string;
|
|
53
|
-
scheduledFor: string;
|
|
54
|
-
ledgerDir: string;
|
|
55
|
-
}, {
|
|
56
|
-
kind: "scheduled";
|
|
57
|
-
name: string;
|
|
58
|
-
cwd: string;
|
|
59
|
-
attempt: number;
|
|
60
|
-
scheduleId: string;
|
|
61
|
-
invocationId: string;
|
|
62
|
-
scheduledFor: string;
|
|
63
|
-
ledgerDir: string;
|
|
64
|
-
}>]>>;
|
|
24
|
+
}, z.core.$strict>], "kind">>;
|
|
65
25
|
export declare const threadDerivedFromSchema: z.ZodReadonly<z.ZodObject<{
|
|
66
26
|
threadId: z.ZodString;
|
|
67
|
-
origin: z.ZodReadonly<z.ZodDiscriminatedUnion<
|
|
27
|
+
origin: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
28
|
kind: z.ZodLiteral<"interactive">;
|
|
69
|
-
},
|
|
70
|
-
kind: "interactive";
|
|
71
|
-
}, {
|
|
72
|
-
kind: "interactive";
|
|
73
|
-
}>, z.ZodObject<{
|
|
29
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
74
30
|
kind: z.ZodLiteral<"scheduled">;
|
|
75
31
|
scheduleId: z.ZodString;
|
|
76
32
|
invocationId: z.ZodString;
|
|
@@ -79,57 +35,9 @@ export declare const threadDerivedFromSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
79
35
|
cwd: z.ZodString;
|
|
80
36
|
scheduledFor: z.ZodString;
|
|
81
37
|
ledgerDir: z.ZodString;
|
|
82
|
-
},
|
|
83
|
-
kind: "scheduled";
|
|
84
|
-
name: string;
|
|
85
|
-
cwd: string;
|
|
86
|
-
attempt: number;
|
|
87
|
-
scheduleId: string;
|
|
88
|
-
invocationId: string;
|
|
89
|
-
scheduledFor: string;
|
|
90
|
-
ledgerDir: string;
|
|
91
|
-
}, {
|
|
92
|
-
kind: "scheduled";
|
|
93
|
-
name: string;
|
|
94
|
-
cwd: string;
|
|
95
|
-
attempt: number;
|
|
96
|
-
scheduleId: string;
|
|
97
|
-
invocationId: string;
|
|
98
|
-
scheduledFor: string;
|
|
99
|
-
ledgerDir: string;
|
|
100
|
-
}>]>>;
|
|
38
|
+
}, z.core.$strict>], "kind">>;
|
|
101
39
|
capturedAt: z.ZodString;
|
|
102
|
-
},
|
|
103
|
-
threadId: string;
|
|
104
|
-
origin: Readonly<{
|
|
105
|
-
kind: "scheduled";
|
|
106
|
-
name: string;
|
|
107
|
-
cwd: string;
|
|
108
|
-
attempt: number;
|
|
109
|
-
scheduleId: string;
|
|
110
|
-
invocationId: string;
|
|
111
|
-
scheduledFor: string;
|
|
112
|
-
ledgerDir: string;
|
|
113
|
-
}> | Readonly<{
|
|
114
|
-
kind: "interactive";
|
|
115
|
-
}>;
|
|
116
|
-
capturedAt: string;
|
|
117
|
-
}, {
|
|
118
|
-
threadId: string;
|
|
119
|
-
origin: Readonly<{
|
|
120
|
-
kind: "scheduled";
|
|
121
|
-
name: string;
|
|
122
|
-
cwd: string;
|
|
123
|
-
attempt: number;
|
|
124
|
-
scheduleId: string;
|
|
125
|
-
invocationId: string;
|
|
126
|
-
scheduledFor: string;
|
|
127
|
-
ledgerDir: string;
|
|
128
|
-
}> | Readonly<{
|
|
129
|
-
kind: "interactive";
|
|
130
|
-
}>;
|
|
131
|
-
capturedAt: string;
|
|
132
|
-
}>>;
|
|
40
|
+
}, z.core.$strict>>;
|
|
133
41
|
export type ThreadOrigin = z.infer<typeof threadOriginSchema>;
|
|
134
42
|
export type ScheduledThreadOrigin = z.infer<typeof scheduledThreadOriginSchema>;
|
|
135
43
|
export type ThreadDerivedFrom = z.infer<typeof threadDerivedFromSchema>;
|
|
@@ -270,11 +270,11 @@ export declare class ThreadStore {
|
|
|
270
270
|
getContextRecovery(threadId: string): ContextRecoveryState | undefined;
|
|
271
271
|
/** Historical ledger access; new task summaries do not add semantic facts. */
|
|
272
272
|
getSemanticLedgerRows(threadId: string): {
|
|
273
|
-
|
|
273
|
+
item_id: string;
|
|
274
274
|
generation: number;
|
|
275
275
|
scope: string;
|
|
276
|
-
category: "
|
|
277
|
-
|
|
276
|
+
category: "decision" | "resource" | "running_session" | "goal" | "constraint" | "completed_work" | "pending_work" | "uncertainty";
|
|
277
|
+
status: string;
|
|
278
278
|
first_tool_sequence: number;
|
|
279
279
|
item_json: string;
|
|
280
280
|
resolution_json?: string | null | undefined;
|
|
@@ -5,61 +5,15 @@ export declare const turnInputIdSchema: z.ZodString;
|
|
|
5
5
|
export declare const turnInputSkillCheckpointSchema: z.ZodReadonly<z.ZodObject<{
|
|
6
6
|
version: z.ZodLiteral<1>;
|
|
7
7
|
kind: z.ZodLiteral<"explicit-skill">;
|
|
8
|
-
|
|
9
|
-
snapshot: z.ZodReadonly<z.ZodObject<Pick<{
|
|
10
|
-
userPrompt: z.ZodString;
|
|
11
|
-
skillNames: z.ZodArray<z.ZodString, "many">;
|
|
8
|
+
snapshot: z.ZodReadonly<z.ZodObject<{
|
|
12
9
|
skills: z.ZodOptional<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
13
10
|
name: z.ZodString;
|
|
14
11
|
source: z.ZodString;
|
|
15
12
|
contentSha256: z.ZodString;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, {
|
|
21
|
-
name: string;
|
|
22
|
-
source: string;
|
|
23
|
-
contentSha256: string;
|
|
24
|
-
}>>, "many">>;
|
|
25
|
-
}, "skills" | "skillNames">, "strip", z.ZodTypeAny, {
|
|
26
|
-
skillNames: string[];
|
|
27
|
-
skills?: Readonly<{
|
|
28
|
-
name: string;
|
|
29
|
-
source: string;
|
|
30
|
-
contentSha256: string;
|
|
31
|
-
}>[] | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
skillNames: string[];
|
|
34
|
-
skills?: Readonly<{
|
|
35
|
-
name: string;
|
|
36
|
-
source: string;
|
|
37
|
-
contentSha256: string;
|
|
38
|
-
}>[] | undefined;
|
|
39
|
-
}>>;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
kind: "explicit-skill";
|
|
42
|
-
version: 1;
|
|
43
|
-
snapshot: Readonly<{
|
|
44
|
-
skillNames: string[];
|
|
45
|
-
skills?: Readonly<{
|
|
46
|
-
name: string;
|
|
47
|
-
source: string;
|
|
48
|
-
contentSha256: string;
|
|
49
|
-
}>[] | undefined;
|
|
50
|
-
}>;
|
|
51
|
-
}, {
|
|
52
|
-
kind: "explicit-skill";
|
|
53
|
-
version: 1;
|
|
54
|
-
snapshot: Readonly<{
|
|
55
|
-
skillNames: string[];
|
|
56
|
-
skills?: Readonly<{
|
|
57
|
-
name: string;
|
|
58
|
-
source: string;
|
|
59
|
-
contentSha256: string;
|
|
60
|
-
}>[] | undefined;
|
|
61
|
-
}>;
|
|
62
|
-
}>>;
|
|
13
|
+
}, z.core.$strip>>>>;
|
|
14
|
+
skillNames: z.ZodArray<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
63
17
|
export type TurnInputSkillCheckpoint = z.infer<typeof turnInputSkillCheckpointSchema>;
|
|
64
18
|
export declare const acceptedTurnInputSchema: z.ZodReadonly<z.ZodObject<{
|
|
65
19
|
inputId: z.ZodString;
|
|
@@ -68,94 +22,16 @@ export declare const acceptedTurnInputSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
68
22
|
skillCheckpoint: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
69
23
|
version: z.ZodLiteral<1>;
|
|
70
24
|
kind: z.ZodLiteral<"explicit-skill">;
|
|
71
|
-
|
|
72
|
-
snapshot: z.ZodReadonly<z.ZodObject<Pick<{
|
|
73
|
-
userPrompt: z.ZodString;
|
|
74
|
-
skillNames: z.ZodArray<z.ZodString, "many">;
|
|
25
|
+
snapshot: z.ZodReadonly<z.ZodObject<{
|
|
75
26
|
skills: z.ZodOptional<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
76
27
|
name: z.ZodString;
|
|
77
28
|
source: z.ZodString;
|
|
78
29
|
contentSha256: z.ZodString;
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
name: string;
|
|
85
|
-
source: string;
|
|
86
|
-
contentSha256: string;
|
|
87
|
-
}>>, "many">>;
|
|
88
|
-
}, "skills" | "skillNames">, "strip", z.ZodTypeAny, {
|
|
89
|
-
skillNames: string[];
|
|
90
|
-
skills?: Readonly<{
|
|
91
|
-
name: string;
|
|
92
|
-
source: string;
|
|
93
|
-
contentSha256: string;
|
|
94
|
-
}>[] | undefined;
|
|
95
|
-
}, {
|
|
96
|
-
skillNames: string[];
|
|
97
|
-
skills?: Readonly<{
|
|
98
|
-
name: string;
|
|
99
|
-
source: string;
|
|
100
|
-
contentSha256: string;
|
|
101
|
-
}>[] | undefined;
|
|
102
|
-
}>>;
|
|
103
|
-
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
kind: "explicit-skill";
|
|
105
|
-
version: 1;
|
|
106
|
-
snapshot: Readonly<{
|
|
107
|
-
skillNames: string[];
|
|
108
|
-
skills?: Readonly<{
|
|
109
|
-
name: string;
|
|
110
|
-
source: string;
|
|
111
|
-
contentSha256: string;
|
|
112
|
-
}>[] | undefined;
|
|
113
|
-
}>;
|
|
114
|
-
}, {
|
|
115
|
-
kind: "explicit-skill";
|
|
116
|
-
version: 1;
|
|
117
|
-
snapshot: Readonly<{
|
|
118
|
-
skillNames: string[];
|
|
119
|
-
skills?: Readonly<{
|
|
120
|
-
name: string;
|
|
121
|
-
source: string;
|
|
122
|
-
contentSha256: string;
|
|
123
|
-
}>[] | undefined;
|
|
124
|
-
}>;
|
|
125
|
-
}>>>;
|
|
126
|
-
}, "strip", z.ZodTypeAny, {
|
|
127
|
-
createdAt: string;
|
|
128
|
-
inputId: string;
|
|
129
|
-
transcriptSequence: number;
|
|
130
|
-
skillCheckpoint?: Readonly<{
|
|
131
|
-
kind: "explicit-skill";
|
|
132
|
-
version: 1;
|
|
133
|
-
snapshot: Readonly<{
|
|
134
|
-
skillNames: string[];
|
|
135
|
-
skills?: Readonly<{
|
|
136
|
-
name: string;
|
|
137
|
-
source: string;
|
|
138
|
-
contentSha256: string;
|
|
139
|
-
}>[] | undefined;
|
|
140
|
-
}>;
|
|
141
|
-
}> | undefined;
|
|
142
|
-
}, {
|
|
143
|
-
createdAt: string;
|
|
144
|
-
inputId: string;
|
|
145
|
-
transcriptSequence: number;
|
|
146
|
-
skillCheckpoint?: Readonly<{
|
|
147
|
-
kind: "explicit-skill";
|
|
148
|
-
version: 1;
|
|
149
|
-
snapshot: Readonly<{
|
|
150
|
-
skillNames: string[];
|
|
151
|
-
skills?: Readonly<{
|
|
152
|
-
name: string;
|
|
153
|
-
source: string;
|
|
154
|
-
contentSha256: string;
|
|
155
|
-
}>[] | undefined;
|
|
156
|
-
}>;
|
|
157
|
-
}> | undefined;
|
|
158
|
-
}>>;
|
|
30
|
+
}, z.core.$strip>>>>;
|
|
31
|
+
skillNames: z.ZodArray<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>>>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
159
35
|
export type AcceptedTurnInput = z.infer<typeof acceptedTurnInputSchema>;
|
|
160
36
|
/** A transient evidence projection only. Never rewrite raw transcript or load Skill bodies. */
|
|
161
37
|
export declare function projectTurnInputSkillCheckpoint(message: ModelMessage, checkpoint: TurnInputSkillCheckpoint | undefined): ModelMessage;
|
package/dist/store/turn-input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as t}from"zod";import{SKILL_INVOCATION_PARSE_KINDS as n,parseSkillInvocationResult as e}from"
|
|
1
|
+
import{z as t}from"zod";import{SKILL_INVOCATION_PARSE_KINDS as n,parseSkillInvocationResult as e}from"../skills/invocation.js";import{explicitSkillCheckpointV1Schema as o}from"../engine/explicit-skill-context.js";export const turnInputIdSchema=t.string().min(1).max(128);export const turnInputSkillCheckpointSchema=o.unwrap().extend({snapshot:o.unwrap().shape.snapshot.unwrap().pick({skillNames:!0,skills:!0}).readonly()}).readonly();export const acceptedTurnInputSchema=t.object({inputId:turnInputIdSchema,transcriptSequence:t.number().int().nonnegative(),createdAt:t.string().datetime(),skillCheckpoint:turnInputSkillCheckpointSchema.optional()}).readonly();export function projectTurnInputSkillCheckpoint(t,o){if(void 0===o||"user"!==t.role)return t;const i="string"==typeof t.content?t.content:t.content.filter(t=>"text"===t.type).map(t=>t.text).join("\n"),r=e(i,o.snapshot.skillNames.map(t=>({name:t,description:"",source:"project"}))),p=r.kind===n.valid?r.invocation.prompt:i;return{...t,providerOptions:{...t.providerOptions,rollHarness:{...t.providerOptions?.rollHarness,explicitSkillCheckpoint:{...o,snapshot:{...o.snapshot,userPrompt:p}}}}}}
|
|
@@ -36,19 +36,7 @@ declare const bashToolInputSchema: z.ZodObject<{
|
|
|
36
36
|
workdir: z.ZodOptional<z.ZodString>;
|
|
37
37
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
38
38
|
max_output_chars: z.ZodOptional<z.ZodNumber>;
|
|
39
|
-
},
|
|
40
|
-
command: string;
|
|
41
|
-
explanation?: string | undefined;
|
|
42
|
-
workdir?: string | undefined;
|
|
43
|
-
timeout_ms?: number | undefined;
|
|
44
|
-
max_output_chars?: number | undefined;
|
|
45
|
-
}, {
|
|
46
|
-
command: string;
|
|
47
|
-
explanation?: string | undefined;
|
|
48
|
-
workdir?: string | undefined;
|
|
49
|
-
timeout_ms?: number | undefined;
|
|
50
|
-
max_output_chars?: number | undefined;
|
|
51
|
-
}>;
|
|
39
|
+
}, z.core.$strip>;
|
|
52
40
|
export type BashToolInput = z.infer<typeof bashToolInputSchema>;
|
|
53
41
|
export declare function buildBashToolset(settings: SessionBashSettings, registry: ToolRegistry, ctx: BashToolContext, deps?: BashToolDeps): ToolSet;
|
|
54
42
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { type JsonSchemaRefIssue } from "
|
|
1
|
+
import { type JsonSchemaRefIssue } from "../tool-contracts/json-schema-refs.ts";
|
|
2
2
|
import { type ToolSet } from "ai";
|
|
3
3
|
import type { FileChangeDiff } from "@roll-agent/protocol";
|
|
4
4
|
import type { ObservationRetentionDeclaration } from "@roll-agent/protocol/observation-retention";
|
|
5
5
|
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
6
|
-
import type { AgentTool } from "
|
|
6
|
+
import type { AgentTool } from "../tool-contracts/agent-types.ts";
|
|
7
7
|
import type { SessionApprovalMemory } from "../approval/approval-memory.ts";
|
|
8
8
|
import type { ApprovalDecision } from "../approval/approval-gate.ts";
|
|
9
9
|
import type { ToolAnnotations, ToolPolicy } from "../types/policy.ts";
|
|
10
10
|
import { ToolRegistry, type ToolRouteMetadata } from "./naming.ts";
|
|
11
11
|
import { type NormalizedToolResult } from "./normalize-result.ts";
|
|
12
12
|
import { type ToolExecutionCoordinator, type ToolResourceHint } from "./tool-execution-coordinator.ts";
|
|
13
|
-
export { readExecutionTimeoutMs, ROLL_EXECUTION_TIMEOUT_META_KEY, } from "
|
|
14
|
-
export
|
|
13
|
+
export { readExecutionTimeoutMs, ROLL_EXECUTION_TIMEOUT_META_KEY, } from "../tool-contracts/execution-timeout.ts";
|
|
14
|
+
export { ROLL_RESOURCE_HINTS_META_KEY } from "../tool-contracts/resource-hints.ts";
|
|
15
15
|
export interface SourceTool {
|
|
16
16
|
readonly tool: AgentTool;
|
|
17
17
|
readonly annotations: ToolAnnotations | undefined;
|
|
@@ -20,7 +20,7 @@ export interface SourceTool {
|
|
|
20
20
|
}
|
|
21
21
|
export interface AgentToolSource {
|
|
22
22
|
readonly agentName: string;
|
|
23
|
-
readonly client: Client
|
|
23
|
+
readonly client: Pick<Client, "callTool">;
|
|
24
24
|
readonly tools: readonly SourceTool[];
|
|
25
25
|
readonly agentSource?: ToolRouteMetadata["agentSource"];
|
|
26
26
|
readonly transport?: ToolRouteMetadata["transport"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{lstatSync as o,readdirSync as t,readlinkSync as e,realpathSync as n,statSync as r}from"node:fs";import{inlineAcyclicLocalJsonSchemaReferences as i}from"
|
|
1
|
+
import{lstatSync as o,readdirSync as t,readlinkSync as e,realpathSync as n,statSync as r}from"node:fs";import{inlineAcyclicLocalJsonSchemaReferences as i}from"../tool-contracts/json-schema-refs.js";import{basename as s,dirname as a,isAbsolute as c,resolve as u}from"node:path";import{jsonSchema as l,tool as f}from"ai";import{preflightToolCall as p}from"../tool-contracts/preflight.js";import{modelToolInputSchema as d}from"./model-input-schema.js";import{readExecutionTimeoutMs as m,ROLL_EXECUTION_TIMEOUT_META_KEY as v}from"../tool-contracts/execution-timeout.js";import{ToolRegistry as g}from"./naming.js";import{TOOL_OUTCOME_KINDS as h,failedToolResult as y,toolResultToModelOutput as S}from"./normalize-result.js";import{TOOL_RESOURCE_ACCESS_MODES as b,TOOL_RESOURCE_HINT_KINDS as $,executeCoordinatedTool as w}from"./tool-execution-coordinator.js";import{executeWithToolApproval as j}from"./tool-approval-continuation.js";import{currentObservationModelOutput as O}from"../engine/observation-projection.js";export{readExecutionTimeoutMs,ROLL_EXECUTION_TIMEOUT_META_KEY}from"../tool-contracts/execution-timeout.js";export{ROLL_RESOURCE_HINTS_META_KEY}from"../tool-contracts/resource-hints.js";function T(o,t){const e=new Map;for(const n of[...o??[],...t])e.set(`${n.path}\0${n.ref}`,n);return[...e.values()]}function C(o){return"object"!=typeof o||null===o||Array.isArray(o)?{}:o}function x(o){return`参数校验失败: ${o.map(o=>o.message).join("; ")}`}function N(o){return!0===o?.readOnlyHint&&!0!==o.destructiveHint?b.read:b.write}function E(o){return"string"==typeof o||"number"==typeof o?[o]:Array.isArray(o)&&0!==o.length&&o.every(o=>"string"==typeof o||"number"==typeof o)?o:void 0}const k=256,A=new Map;function I(o,t){for(let e=0;e<o.length;e+=1){const n=o.charCodeAt(e),r=n>=65&&n<=90?String.fromCharCode(n+32):n>=97&&n<=122?String.fromCharCode(n-32):void 0;if(void 0===r)continue;const i=`${o.slice(0,e)}${r}${o.slice(e+1)}`;if(!t.has(i))return i}}function M(o){return"object"==typeof o&&null!==o&&"code"in o?o.code:void 0}function L(t,e,n){const r=I(e,n);if(void 0!==r)try{const n=o(u(t,e)),i=o(u(t,r));return n.dev===i.dev&&n.ino===i.ino}catch(o){const t=M(o);return"ENOENT"!==t&&"ENOTDIR"!==t&&void 0}}function R(o,t){if(A.size>=k){const o=A.keys().next().value;void 0!==o&&A.delete(o)}return A.set(o,t),t}function _(e){const n=A.get(e);if(void 0!==n)return n;let r;try{r=o(e).dev}catch{return R(e,!0)}let i=e;for(;;){const n=A.get(i);if(void 0!==n)return R(e,n);try{const o=t(i),n=new Set(o);for(const t of o){const o=L(i,t,n);if(void 0!==o)return R(i,o),R(e,o)}}catch{}const s=a(i);if(s===i)break;try{if(o(s).dev!==r)break}catch{break}i=s}return R(e,!0)}function D(o){let t=o.normalize("NFC");for(let o=0;o<8;o+=1){const o=t.toUpperCase().toLowerCase().normalize("NFC");if(o===t)return t;t=o}return t}function K(o,t){try{const e=r(o,{bigint:!0}),n=t.map(o=>D(o));return`file-unresolved-alias:${e.dev.toString()}:${e.ino.toString()}:${JSON.stringify(n)}`}catch{return}}function z(t,r=new Set){let i=t;const c=[];for(;;)try{const o=n.native(i),t=c.reverse().map(o=>o.normalize("NFC"));if(0===t.length)return{path:o};const e=_(o),r=u(o,...e?t.map(o=>o.toLowerCase()):t),s=e?K(o,t):void 0;return{path:r,...void 0===s?{}:{unresolvedAliasKey:s}}}catch{try{if(o(i).isSymbolicLink()&&!r.has(i)){const o=new Set(r);o.add(i);const t=e(i);return z(u(a(i),t,...[...c].reverse()),o)}}catch{}const n=a(i);if(n===i)return{path:t};c.push(s(i)),i=n}}function G(o){try{const t=r(o,{bigint:!0});return`file-inode:${t.dev.toString()}:${t.ino.toString()}`}catch{return}}function H(o,t,e){const n=String(t).trim();if(0!==n.length)switch(o.kind){case $.file:{if(!c(n)&&void 0===e)return;const o=z(u(e??"/",n)),t=G(o.path);return[`file:${o.path}`,...void 0===o.unresolvedAliasKey?[]:[o.unresolvedAliasKey],...void 0===t?[]:[t]]}case $.browserSession:return[`browser-session:${n}`];case $.conversation:return[`conversation:${n}`];case $.custom:{const t=o.namespace?.trim();return t?[`${t}:${n}`]:void 0}}}function U(o,t,e,n,r){const i=N(n),s=C(e),a=[{key:`agent:${o}`,mode:i}],c=[];for(const o of r??[]){if(!Object.hasOwn(s,o.field))continue;const e=E(s[o.field]);if(void 0===e)return a;for(const n of e){const e=H(o,n,t);if(void 0===e||0===e.length)return a;c.push(...e.map(t=>({key:t,mode:o.mode??i})))}}return 0===c.length?a:[{key:`agent:${o}`,mode:b.read},...c]}export async function gateToolCall(o,t,e,n,r,i){if(!o.policy)return;const s=o.policy.check({agentName:t,toolName:e,input:n,...r?{annotations:r}:{}});if("deny"===s.action)return y(h.policyDenied,"策略拒绝执行"+(s.reason?`: ${s.reason}`:""),s.reason?{reason:s.reason}:{});if("confirm"===s.action){const r=i?.memoryKey;if(void 0!==r&&o.approvalMemory?.isGranted(r))return;const a=await o.requestApproval({agentName:t,toolName:e,input:n,reason:!1===i?.includePolicyReason?void 0:s.reason,...void 0!==i?.explanation?{explanation:i.explanation}:{},...void 0!==i?.diff?{diff:i.diff}:{},...void 0!==i?.fullDiff?{fullDiff:i.fullDiff}:{},...void 0!==r&&void 0!==i?.sessionGrantLabel?{sessionGrantLabel:i.sessionGrantLabel}:{}});if(!a.approved)return y(h.userRejected,"已取消执行"+(a.reason?`: ${a.reason}`:""),a.reason?{reason:a.reason}:{});void 0!==r&&"session"===a.scope&&o.approvalMemory?.grant(r)}}export function buildAgentToolset(o,t,e=new g){const n={},r={},s=new Map;for(const a of o){const{client:o,agentName:c,agentSource:u,transport:g,runtimeOwnership:b,resourceBaseDir:$}=a;for(const{tool:N,annotations:E,resourceHints:k,observationRetention:A}of a.tools){const a=i(N.inputSchema),I=T(N.schemaIssues,a.unresolved),M={...N,inputSchema:a.schema,...I.length>0?{schemaIssues:I}:{}},L=e.register(c,M.name,{...u?{agentSource:u}:{},...g?{transport:g}:{},...b?{runtimeOwnership:b}:{},...E?{annotations:E}:{},...M.appOutput?{appOutput:M.appOutput}:{}});I.length>0&&(r[L]=I),A&&s.set(L,A);const R={prepare:async o=>{const e=C(o),n=p(M,e);return n.ok?gateToolCall(t,c,M.name,e,E):y(h.invalidInput,x(n.issues),{raw:n.issues})},resources:o=>U(c,$,o,E,k)};t.coordinator?.register(L,R),n[L]=f({description:M.description??`${M.name} (via ${c})`,inputSchema:d(l(M.inputSchema)),toModelOutput:({output:o})=>o.outcome.kind===h.success?O(o.raw,A)??S(o):S(o),execute:async(e,n)=>{const r=C(e);return w(t.coordinator,R,L,n.toolCallId,r,n.abortSignal,async()=>{const e=m({[v]:M.executionTimeoutMs}),i=n.abortSignal||void 0!==e?{...n.abortSignal?{signal:n.abortSignal}:{},...void 0===e?{}:{timeout:e}}:void 0;return j({input:r,agentName:c,agentTool:M,annotations:E,ctx:t,signal:n.abortSignal,call:async t=>await o.callTool({name:M.name,arguments:t},void 0,i)})})}})}}return{tools:n,registry:e,schemaIssuesByToolId:r,observationRetentionByToolId:s}}
|
|
@@ -13,30 +13,8 @@ declare const editFileInputSchema: z.ZodObject<{
|
|
|
13
13
|
old_string: z.ZodString;
|
|
14
14
|
new_string: z.ZodString;
|
|
15
15
|
replace_all: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
new_string: string;
|
|
19
|
-
replace_all?: boolean | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
old_string: string;
|
|
22
|
-
new_string: string;
|
|
23
|
-
replace_all?: boolean | undefined;
|
|
24
|
-
}>, "many">;
|
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
file_path: string;
|
|
27
|
-
edits: {
|
|
28
|
-
old_string: string;
|
|
29
|
-
new_string: string;
|
|
30
|
-
replace_all?: boolean | undefined;
|
|
31
|
-
}[];
|
|
32
|
-
}, {
|
|
33
|
-
file_path: string;
|
|
34
|
-
edits: {
|
|
35
|
-
old_string: string;
|
|
36
|
-
new_string: string;
|
|
37
|
-
replace_all?: boolean | undefined;
|
|
38
|
-
}[];
|
|
39
|
-
}>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
40
18
|
export type EditFileInput = z.infer<typeof editFileInputSchema>;
|
|
41
19
|
export declare function executeEditFile(settings: ResolvedFileToolsSettings, tracker: FileStateTracker, input: EditFileInput, approval?: FileWriteApproval): NormalizedToolResult;
|
|
42
20
|
export declare function buildEditFileTool(settings: ResolvedFileToolsSettings, tracker: FileStateTracker, registry: ToolRegistry, ctx: ToolBridgeContext): ToolSet;
|
|
@@ -8,13 +8,7 @@ export declare const GLOB_TOOL_NAME = "glob";
|
|
|
8
8
|
declare const globInputSchema: z.ZodObject<{
|
|
9
9
|
pattern: z.ZodString;
|
|
10
10
|
path: z.ZodOptional<z.ZodString>;
|
|
11
|
-
},
|
|
12
|
-
pattern: string;
|
|
13
|
-
path?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
pattern: string;
|
|
16
|
-
path?: string | undefined;
|
|
17
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
18
12
|
export type GlobInput = z.infer<typeof globInputSchema>;
|
|
19
13
|
export declare function executeGlob(settings: ResolvedFileToolsSettings, input: GlobInput, abortSignal?: AbortSignal): Promise<NormalizedToolResult>;
|
|
20
14
|
export declare function buildGlobTool(settings: ResolvedFileToolsSettings, registry: ToolRegistry, ctx: ToolBridgeContext): ToolSet;
|
|
@@ -12,21 +12,7 @@ declare const grepInputSchema: z.ZodObject<{
|
|
|
12
12
|
context: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
ignore_case: z.ZodOptional<z.ZodBoolean>;
|
|
14
14
|
max_results: z.ZodOptional<z.ZodNumber>;
|
|
15
|
-
},
|
|
16
|
-
pattern: string;
|
|
17
|
-
path?: string | undefined;
|
|
18
|
-
context?: number | undefined;
|
|
19
|
-
max_results?: number | undefined;
|
|
20
|
-
glob?: string | undefined;
|
|
21
|
-
ignore_case?: boolean | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
pattern: string;
|
|
24
|
-
path?: string | undefined;
|
|
25
|
-
context?: number | undefined;
|
|
26
|
-
max_results?: number | undefined;
|
|
27
|
-
glob?: string | undefined;
|
|
28
|
-
ignore_case?: boolean | undefined;
|
|
29
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
30
16
|
export type GrepInput = z.infer<typeof grepInputSchema>;
|
|
31
17
|
export declare function executeGrep(settings: ResolvedFileToolsSettings, input: GrepInput, abortSignal?: AbortSignal): Promise<NormalizedToolResult>;
|
|
32
18
|
export declare function buildGrepTool(settings: ResolvedFileToolsSettings, registry: ToolRegistry, ctx: ToolBridgeContext): ToolSet;
|
|
@@ -7,11 +7,7 @@ import { type ResolvedFileToolsSettings } from "./settings.ts";
|
|
|
7
7
|
export declare const LIST_DIR_TOOL_NAME = "list_dir";
|
|
8
8
|
declare const listDirInputSchema: z.ZodObject<{
|
|
9
9
|
path: z.ZodOptional<z.ZodString>;
|
|
10
|
-
},
|
|
11
|
-
path?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
path?: string | undefined;
|
|
14
|
-
}>;
|
|
10
|
+
}, z.core.$strip>;
|
|
15
11
|
export type ListDirInput = z.infer<typeof listDirInputSchema>;
|
|
16
12
|
export declare function executeListDir(settings: ResolvedFileToolsSettings, input: ListDirInput): NormalizedToolResult;
|
|
17
13
|
export declare function buildListDirTool(settings: ResolvedFileToolsSettings, registry: ToolRegistry, ctx: ToolBridgeContext): ToolSet;
|
|
@@ -10,15 +10,7 @@ declare const readFileInputSchema: z.ZodObject<{
|
|
|
10
10
|
path: z.ZodString;
|
|
11
11
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
12
12
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
},
|
|
14
|
-
path: string;
|
|
15
|
-
limit?: number | undefined;
|
|
16
|
-
offset?: number | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
path: string;
|
|
19
|
-
limit?: number | undefined;
|
|
20
|
-
offset?: number | undefined;
|
|
21
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
22
14
|
export type ReadFileInput = z.infer<typeof readFileInputSchema>;
|
|
23
15
|
export declare function executeReadFile(settings: ResolvedFileToolsSettings, tracker: FileStateTracker, input: ReadFileInput): NormalizedToolResult;
|
|
24
16
|
export declare function buildReadFileTool(settings: ResolvedFileToolsSettings, tracker: FileStateTracker, registry: ToolRegistry, ctx: ToolBridgeContext): ToolSet;
|