@osovv/vv-opencode 1.4.5 → 1.6.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 +23 -0
- package/README.md +47 -16
- package/dist/commands/patch-provider.d.ts +5 -5
- package/dist/commands/patch-provider.js +10 -6
- package/dist/commands/patch-provider.js.map +1 -1
- package/dist/lib/agent-tool-catalog.d.ts +144 -0
- package/dist/lib/agent-tool-catalog.js +2551 -0
- package/dist/lib/agent-tool-catalog.js.map +1 -0
- package/dist/lib/agent-tool-contract.d.ts +200 -0
- package/dist/lib/agent-tool-contract.js +407 -0
- package/dist/lib/agent-tool-contract.js.map +1 -0
- package/dist/lib/opencode/agent-registrations.d.ts +33 -0
- package/dist/lib/opencode/agent-registrations.js +469 -0
- package/dist/lib/opencode/agent-registrations.js.map +1 -0
- package/dist/lib/opencode/inspection.d.ts +84 -0
- package/dist/lib/opencode/inspection.js +367 -0
- package/dist/lib/opencode/inspection.js.map +1 -0
- package/dist/lib/opencode/model-overrides.d.ts +19 -0
- package/dist/lib/opencode/model-overrides.js +221 -0
- package/dist/lib/opencode/model-overrides.js.map +1 -0
- package/dist/lib/opencode/paths.d.ts +21 -0
- package/dist/lib/opencode/paths.js +62 -0
- package/dist/lib/opencode/paths.js.map +1 -0
- package/dist/lib/opencode/plugin-registration.d.ts +17 -0
- package/dist/lib/opencode/plugin-registration.js +210 -0
- package/dist/lib/opencode/plugin-registration.js.map +1 -0
- package/dist/lib/opencode/shared-utils.d.ts +30 -0
- package/dist/lib/opencode/shared-utils.js +183 -0
- package/dist/lib/opencode/shared-utils.js.map +1 -0
- package/dist/lib/opencode/vvoc-config-io.d.ts +9 -0
- package/dist/lib/opencode/vvoc-config-io.js +58 -0
- package/dist/lib/opencode/vvoc-config-io.js.map +1 -0
- package/dist/lib/opencode.d.ts +15 -174
- package/dist/lib/opencode.js +19 -1387
- package/dist/lib/opencode.js.map +1 -1
- package/dist/lib/spec-lint/cross-file-rules.d.ts +2 -0
- package/dist/lib/spec-lint/cross-file-rules.js +33 -0
- package/dist/lib/spec-lint/cross-file-rules.js.map +1 -0
- package/dist/lib/spec-lint/delegated-extraction.d.ts +8 -0
- package/dist/lib/spec-lint/delegated-extraction.js +112 -0
- package/dist/lib/spec-lint/delegated-extraction.js.map +1 -0
- package/dist/lib/spec-lint/lint.d.ts +7 -0
- package/dist/lib/spec-lint/lint.js +92 -0
- package/dist/lib/spec-lint/lint.js.map +1 -0
- package/dist/lib/spec-lint/parser.d.ts +101 -0
- package/dist/lib/spec-lint/parser.js +482 -0
- package/dist/lib/spec-lint/parser.js.map +1 -0
- package/dist/lib/spec-lint/plan-rules.d.ts +38 -0
- package/dist/lib/spec-lint/plan-rules.js +745 -0
- package/dist/lib/spec-lint/plan-rules.js.map +1 -0
- package/dist/lib/spec-lint/spec-rules.d.ts +8 -0
- package/dist/lib/spec-lint/spec-rules.js +188 -0
- package/dist/lib/spec-lint/spec-rules.js.map +1 -0
- package/dist/lib/spec-lint.d.ts +4 -63
- package/dist/lib/spec-lint.js +13 -1505
- package/dist/lib/spec-lint.js.map +1 -1
- package/dist/lib/vvoc-preset-registry.d.ts +7 -7
- package/dist/lib/vvoc-preset-registry.js +8 -8
- package/dist/lib/vvoc-preset-registry.js.map +1 -1
- package/dist/lib/workflow-contract.d.ts +12 -0
- package/dist/lib/workflow-contract.js +71 -18
- package/dist/lib/workflow-contract.js.map +1 -1
- package/dist/plugins/hashline-edit/index.js +102 -97
- package/dist/plugins/hashline-edit/index.js.map +1 -1
- package/dist/plugins/hashline-edit/normalize-edits.d.ts +2 -8
- package/dist/plugins/hashline-edit/normalize-edits.js +32 -17
- package/dist/plugins/hashline-edit/normalize-edits.js.map +1 -1
- package/dist/plugins/hashline-edit/schemas.d.ts +246 -0
- package/dist/plugins/hashline-edit/schemas.js +659 -0
- package/dist/plugins/hashline-edit/schemas.js.map +1 -0
- package/dist/plugins/hashline-edit/str-replace-editor.d.ts +6 -17
- package/dist/plugins/hashline-edit/str-replace-editor.js +19 -21
- package/dist/plugins/hashline-edit/str-replace-editor.js.map +1 -1
- package/dist/plugins/hashline-edit/tool-description.d.ts +1 -0
- package/dist/plugins/hashline-edit/tool-description.js +20 -4
- package/dist/plugins/hashline-edit/tool-description.js.map +1 -1
- package/dist/plugins/web-tools/fetch-service.d.ts +8 -5
- package/dist/plugins/web-tools/fetch-service.js +30 -45
- package/dist/plugins/web-tools/fetch-service.js.map +1 -1
- package/dist/plugins/web-tools/index.js +23 -5
- package/dist/plugins/web-tools/index.js.map +1 -1
- package/dist/plugins/web-tools/schemas.d.ts +469 -0
- package/dist/plugins/web-tools/schemas.js +523 -0
- package/dist/plugins/web-tools/schemas.js.map +1 -0
- package/dist/plugins/web-tools/search-service.d.ts +6 -3
- package/dist/plugins/web-tools/search-service.js +24 -29
- package/dist/plugins/web-tools/search-service.js.map +1 -1
- package/dist/plugins/workflow/authority.d.ts +6 -0
- package/dist/plugins/workflow/authority.js +45 -10
- package/dist/plugins/workflow/authority.js.map +1 -1
- package/dist/plugins/workflow/authorization.d.ts +30 -0
- package/dist/plugins/workflow/authorization.js +147 -0
- package/dist/plugins/workflow/authorization.js.map +1 -0
- package/dist/plugins/workflow/checkpoints.d.ts +41 -2
- package/dist/plugins/workflow/checkpoints.js +176 -47
- package/dist/plugins/workflow/checkpoints.js.map +1 -1
- package/dist/plugins/workflow/delegated.d.ts +15 -1
- package/dist/plugins/workflow/delegated.js +65 -35
- package/dist/plugins/workflow/delegated.js.map +1 -1
- package/dist/plugins/workflow/execution.d.ts +15 -30
- package/dist/plugins/workflow/execution.js +133 -33
- package/dist/plugins/workflow/execution.js.map +1 -1
- package/dist/plugins/workflow/index.js +197 -435
- package/dist/plugins/workflow/index.js.map +1 -1
- package/dist/plugins/workflow/input-validation.d.ts +48 -0
- package/dist/plugins/workflow/input-validation.js +536 -0
- package/dist/plugins/workflow/input-validation.js.map +1 -0
- package/dist/plugins/workflow/inspection.d.ts +60 -0
- package/dist/plugins/workflow/inspection.js +316 -0
- package/dist/plugins/workflow/inspection.js.map +1 -0
- package/dist/plugins/workflow/protocol.d.ts +2 -0
- package/dist/plugins/workflow/protocol.js +26 -4
- package/dist/plugins/workflow/protocol.js.map +1 -1
- package/dist/plugins/workflow/recovery.d.ts +18 -0
- package/dist/plugins/workflow/recovery.js +217 -0
- package/dist/plugins/workflow/recovery.js.map +1 -0
- package/dist/plugins/workflow/repair.d.ts +1 -1
- package/dist/plugins/workflow/repair.js +9 -10
- package/dist/plugins/workflow/repair.js.map +1 -1
- package/dist/plugins/workflow/results.d.ts +2566 -0
- package/dist/plugins/workflow/results.js +1111 -0
- package/dist/plugins/workflow/results.js.map +1 -0
- package/dist/plugins/workflow/schemas.d.ts +398 -0
- package/dist/plugins/workflow/schemas.js +399 -0
- package/dist/plugins/workflow/schemas.js.map +1 -0
- package/dist/plugins/workflow/state.d.ts +3 -2
- package/dist/plugins/workflow/state.js +15 -8
- package/dist/plugins/workflow/state.js.map +1 -1
- package/dist/plugins/workflow/system-instruction.md +17 -1
- package/dist/plugins/workflow/tooling.d.ts +11 -82
- package/dist/plugins/workflow/tooling.js +478 -461
- package/dist/plugins/workflow/tooling.js.map +1 -1
- package/dist/plugins/workflow/transactions.d.ts +13 -0
- package/dist/plugins/workflow/transactions.js +13 -3
- package/dist/plugins/workflow/transactions.js.map +1 -1
- package/package.json +6 -3
- package/schemas/vvoc/v3.json +1 -1
- package/templates/agents/vv-code-reviewer.md +13 -4
- package/templates/agents/vv-implementer.md +16 -9
- package/templates/agents/vv-spec-reviewer.md +13 -4
- package/templates/skills/vv-execute/SKILL.md +3 -3
- package/templates/skills/vv-execute/references/tool-contracts.md +1750 -0
- package/templates/skills/vv-review/SKILL.md +1 -1
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import type { z, ZodRawShape } from "zod";
|
|
2
|
+
import { type ContractIssue, type OwnedToolContract } from "../../lib/agent-tool-contract.js";
|
|
3
|
+
/** Registered tool id for the hash-anchored editor. */
|
|
4
|
+
export declare const HASHLINE_EDIT_TOOL_ID = "hashline_edit";
|
|
5
|
+
/** Registered tool id for the dsh str_replace_editor. */
|
|
6
|
+
export declare const STR_REPLACE_EDITOR_TOOL_ID = "str_replace_editor";
|
|
7
|
+
/** Canonical hash-anchored operation vocabulary. */
|
|
8
|
+
export declare const HASHLINE_EDIT_OPS: readonly ["replace", "replace_range", "append", "prepend"];
|
|
9
|
+
/** Union of hash-anchored operation identifiers. */
|
|
10
|
+
export type HashlineToolOp = (typeof HASHLINE_EDIT_OPS)[number];
|
|
11
|
+
/**
|
|
12
|
+
* Loose tool-facing edit input accepted by the normalizer. The registered schema
|
|
13
|
+
* below is stricter (required op/lines), but the normalizer must describe and
|
|
14
|
+
* reject malformed raw input deterministically for direct calls and tests.
|
|
15
|
+
*/
|
|
16
|
+
export interface RawHashlineEdit {
|
|
17
|
+
op?: HashlineToolOp;
|
|
18
|
+
pos?: string;
|
|
19
|
+
end?: string;
|
|
20
|
+
lines?: string | string[] | null;
|
|
21
|
+
}
|
|
22
|
+
/** Canonical str_replace_editor command vocabulary. */
|
|
23
|
+
export declare const STR_REPLACE_EDITOR_COMMANDS: readonly ["view", "create", "str_replace", "insert"];
|
|
24
|
+
/** Union of str_replace_editor command identifiers. */
|
|
25
|
+
export type StrReplaceEditorCommand = (typeof STR_REPLACE_EDITOR_COMMANDS)[number];
|
|
26
|
+
/** Closed single-edit shape shared by registration, args validation, and the direct normalizer. */
|
|
27
|
+
export declare const hashlineEditEntrySchema: z.ZodObject<{
|
|
28
|
+
op: z.ZodEnum<{
|
|
29
|
+
replace: "replace";
|
|
30
|
+
replace_range: "replace_range";
|
|
31
|
+
append: "append";
|
|
32
|
+
prepend: "prepend";
|
|
33
|
+
}>;
|
|
34
|
+
pos: z.ZodOptional<z.ZodString>;
|
|
35
|
+
end: z.ZodOptional<z.ZodString>;
|
|
36
|
+
lines: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodString, z.ZodNull]>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
/** Schema-derived shape of one raw hash-anchored edit entry. */
|
|
39
|
+
export type RawHashlineEditEntry = z.infer<typeof hashlineEditEntrySchema>;
|
|
40
|
+
/** Registered raw argument map for hashline_edit (single source of the tool surface). */
|
|
41
|
+
export declare const hashlineEditArgs: {
|
|
42
|
+
filePath: z.ZodString;
|
|
43
|
+
delete: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
rename: z.ZodOptional<z.ZodString>;
|
|
45
|
+
edits: z.ZodArray<z.ZodObject<{
|
|
46
|
+
op: z.ZodEnum<{
|
|
47
|
+
replace: "replace";
|
|
48
|
+
replace_range: "replace_range";
|
|
49
|
+
append: "append";
|
|
50
|
+
prepend: "prepend";
|
|
51
|
+
}>;
|
|
52
|
+
pos: z.ZodOptional<z.ZodString>;
|
|
53
|
+
end: z.ZodOptional<z.ZodString>;
|
|
54
|
+
lines: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodString, z.ZodNull]>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
};
|
|
57
|
+
declare const hashlineEditArgsObject: z.ZodObject<{
|
|
58
|
+
filePath: z.ZodString;
|
|
59
|
+
delete: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
rename: z.ZodOptional<z.ZodString>;
|
|
61
|
+
edits: z.ZodArray<z.ZodObject<{
|
|
62
|
+
op: z.ZodEnum<{
|
|
63
|
+
replace: "replace";
|
|
64
|
+
replace_range: "replace_range";
|
|
65
|
+
append: "append";
|
|
66
|
+
prepend: "prepend";
|
|
67
|
+
}>;
|
|
68
|
+
pos: z.ZodOptional<z.ZodString>;
|
|
69
|
+
end: z.ZodOptional<z.ZodString>;
|
|
70
|
+
lines: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodString, z.ZodNull]>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
/** hashline_edit argument shape, single-sourced from the registered schema. */
|
|
74
|
+
export type HashlineEditToolArgs = z.infer<typeof hashlineEditArgsObject>;
|
|
75
|
+
/** Registered raw argument map for str_replace_editor (single source of the tool surface). */
|
|
76
|
+
export declare const strReplaceEditorArgs: {
|
|
77
|
+
command: z.ZodEnum<{
|
|
78
|
+
view: "view";
|
|
79
|
+
create: "create";
|
|
80
|
+
str_replace: "str_replace";
|
|
81
|
+
insert: "insert";
|
|
82
|
+
}>;
|
|
83
|
+
path: z.ZodString;
|
|
84
|
+
file_text: z.ZodOptional<z.ZodString>;
|
|
85
|
+
old_str: z.ZodOptional<z.ZodString>;
|
|
86
|
+
new_str: z.ZodOptional<z.ZodString>;
|
|
87
|
+
insert_line: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
view_range: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
89
|
+
};
|
|
90
|
+
declare const strReplaceEditorArgsObject: z.ZodObject<{
|
|
91
|
+
command: z.ZodEnum<{
|
|
92
|
+
view: "view";
|
|
93
|
+
create: "create";
|
|
94
|
+
str_replace: "str_replace";
|
|
95
|
+
insert: "insert";
|
|
96
|
+
}>;
|
|
97
|
+
path: z.ZodString;
|
|
98
|
+
file_text: z.ZodOptional<z.ZodString>;
|
|
99
|
+
old_str: z.ZodOptional<z.ZodString>;
|
|
100
|
+
new_str: z.ZodOptional<z.ZodString>;
|
|
101
|
+
insert_line: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
view_range: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
/** str_replace_editor argument shape, single-sourced from the registered schema. */
|
|
105
|
+
export type StrReplaceEditorToolArgs = z.infer<typeof strReplaceEditorArgsObject>;
|
|
106
|
+
/** Concrete filediff metadata envelope published after a successful hashline edit. */
|
|
107
|
+
export declare const hashlineEditFilediffSchema: z.ZodObject<{
|
|
108
|
+
file: z.ZodString;
|
|
109
|
+
path: z.ZodString;
|
|
110
|
+
filePath: z.ZodString;
|
|
111
|
+
before: z.ZodString;
|
|
112
|
+
after: z.ZodString;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
/** Concrete success metadata envelope for hashline_edit (known fields, no blanket records). */
|
|
115
|
+
export declare const hashlineEditMetadataSchema: z.ZodObject<{
|
|
116
|
+
filePath: z.ZodString;
|
|
117
|
+
path: z.ZodString;
|
|
118
|
+
file: z.ZodString;
|
|
119
|
+
noopEdits: z.ZodNumber;
|
|
120
|
+
deduplicatedEdits: z.ZodNumber;
|
|
121
|
+
firstChangedLine: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
editMode: z.ZodEnum<{
|
|
123
|
+
hashline_edit: "hashline_edit";
|
|
124
|
+
str_replace_editor: "str_replace_editor";
|
|
125
|
+
edit: "edit";
|
|
126
|
+
apply_patch: "apply_patch";
|
|
127
|
+
}>;
|
|
128
|
+
providerID: z.ZodOptional<z.ZodString>;
|
|
129
|
+
modelID: z.ZodOptional<z.ZodString>;
|
|
130
|
+
filediff: z.ZodObject<{
|
|
131
|
+
file: z.ZodString;
|
|
132
|
+
path: z.ZodString;
|
|
133
|
+
filePath: z.ZodString;
|
|
134
|
+
before: z.ZodString;
|
|
135
|
+
after: z.ZodString;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
/** Concrete success metadata envelope for str_replace_editor. */
|
|
139
|
+
export declare const strReplaceEditorMetadataSchema: z.ZodObject<{
|
|
140
|
+
filePath: z.ZodString;
|
|
141
|
+
path: z.ZodString;
|
|
142
|
+
file: z.ZodString;
|
|
143
|
+
editMode: z.ZodEnum<{
|
|
144
|
+
hashline_edit: "hashline_edit";
|
|
145
|
+
str_replace_editor: "str_replace_editor";
|
|
146
|
+
edit: "edit";
|
|
147
|
+
apply_patch: "apply_patch";
|
|
148
|
+
}>;
|
|
149
|
+
providerID: z.ZodOptional<z.ZodString>;
|
|
150
|
+
modelID: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
/**
|
|
153
|
+
* Closed ok/error result schema for str_replace_editor producer/test checks.
|
|
154
|
+
* This is never applied as a throw-after-side-effect execute wrapper.
|
|
155
|
+
*/
|
|
156
|
+
export declare const strReplaceEditorResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
157
|
+
ok: z.ZodLiteral<true>;
|
|
158
|
+
output: z.ZodString;
|
|
159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
ok: z.ZodLiteral<false>;
|
|
161
|
+
error: z.ZodString;
|
|
162
|
+
}, z.core.$strip>]>;
|
|
163
|
+
/** Str editor ok/error result shape (producer/test contract). */
|
|
164
|
+
export type StrReplaceEditorResult = z.infer<typeof strReplaceEditorResultSchema>;
|
|
165
|
+
/** Owned contract for hashline_edit. */
|
|
166
|
+
export declare const hashlineEditContract: OwnedToolContract<{
|
|
167
|
+
filePath: z.ZodString;
|
|
168
|
+
delete: z.ZodOptional<z.ZodBoolean>;
|
|
169
|
+
rename: z.ZodOptional<z.ZodString>;
|
|
170
|
+
edits: z.ZodArray<z.ZodObject<{
|
|
171
|
+
op: z.ZodEnum<{
|
|
172
|
+
replace: "replace";
|
|
173
|
+
replace_range: "replace_range";
|
|
174
|
+
append: "append";
|
|
175
|
+
prepend: "prepend";
|
|
176
|
+
}>;
|
|
177
|
+
pos: z.ZodOptional<z.ZodString>;
|
|
178
|
+
end: z.ZodOptional<z.ZodString>;
|
|
179
|
+
lines: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodString, z.ZodNull]>;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
}>;
|
|
182
|
+
/** Owned contract for str_replace_editor. */
|
|
183
|
+
export declare const strReplaceEditorContract: OwnedToolContract<{
|
|
184
|
+
command: z.ZodEnum<{
|
|
185
|
+
view: "view";
|
|
186
|
+
create: "create";
|
|
187
|
+
str_replace: "str_replace";
|
|
188
|
+
insert: "insert";
|
|
189
|
+
}>;
|
|
190
|
+
path: z.ZodString;
|
|
191
|
+
file_text: z.ZodOptional<z.ZodString>;
|
|
192
|
+
old_str: z.ZodOptional<z.ZodString>;
|
|
193
|
+
new_str: z.ZodOptional<z.ZodString>;
|
|
194
|
+
insert_line: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
view_range: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
196
|
+
}>;
|
|
197
|
+
/** Owned contracts for both edit tools (input to the owned definition/pre-execute adapters). */
|
|
198
|
+
export declare const editToolContracts: readonly OwnedToolContract<ZodRawShape>[];
|
|
199
|
+
/** Successful parsed hashline args or bounded structural/branch issues. */
|
|
200
|
+
export type HashlineEditValidation = {
|
|
201
|
+
ok: true;
|
|
202
|
+
data: HashlineEditToolArgs;
|
|
203
|
+
} | {
|
|
204
|
+
ok: false;
|
|
205
|
+
issues: readonly ContractIssue[];
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Closed single-edit shape validation reused by the direct normalizer.
|
|
209
|
+
* Rejects unknown properties, malformed provided optional types, a provided
|
|
210
|
+
* non-canonical operation name, and (through the shared schema) missing
|
|
211
|
+
* op/lines. Blank `pos`/`end` are valid strings here and are rejected by the
|
|
212
|
+
* normalizer's anchor step so blank-versus-absent stays distinguishable.
|
|
213
|
+
*/
|
|
214
|
+
export declare function validateRawHashlineEditEntry(raw: unknown, index: number): {
|
|
215
|
+
ok: true;
|
|
216
|
+
data: RawHashlineEditEntry;
|
|
217
|
+
} | {
|
|
218
|
+
ok: false;
|
|
219
|
+
issues: readonly ContractIssue[];
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Strict structural plus args-only branch validation for hashline_edit.
|
|
223
|
+
* Unknown keys, enums, and nested shapes fail first; then non-empty paths,
|
|
224
|
+
* delete/rename/edits combinations, and per-operation anchor requirements are
|
|
225
|
+
* enforced. Current-file anchor validation, literal payload rejection, and
|
|
226
|
+
* creation remain in the normalizer/executor and stay authoritative.
|
|
227
|
+
*/
|
|
228
|
+
export declare function validateHashlineEditToolInput(raw: unknown): HashlineEditValidation;
|
|
229
|
+
/** Successful parsed str editor args or bounded structural/command issues. */
|
|
230
|
+
export type StrReplaceEditorValidation = {
|
|
231
|
+
ok: true;
|
|
232
|
+
data: StrReplaceEditorToolArgs;
|
|
233
|
+
} | {
|
|
234
|
+
ok: false;
|
|
235
|
+
issues: readonly ContractIssue[];
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Strict structural plus command-specific validation for str_replace_editor.
|
|
239
|
+
* Unknown keys, enums, and types fail first; then recognized fields that the
|
|
240
|
+
* selected command does not consume are rejected rather than dropped, the
|
|
241
|
+
* command's required fields are enforced, and view_range is required to be an
|
|
242
|
+
* exact two-integer range. Path existence, directory checks, the file-length
|
|
243
|
+
* insert bound, exact-match behavior, and freshness checks remain in the editor.
|
|
244
|
+
*/
|
|
245
|
+
export declare function validateStrReplaceEditorToolInput(raw: unknown): StrReplaceEditorValidation;
|
|
246
|
+
export {};
|