@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,469 @@
|
|
|
1
|
+
import type { z, ZodRawShape } from "zod";
|
|
2
|
+
import { type ContractIssue, type OwnedToolContract } from "../../lib/agent-tool-contract.js";
|
|
3
|
+
/** Registered tool id for provider-neutral web search. */
|
|
4
|
+
export declare const WEB_SEARCH_TOOL_ID = "web_search";
|
|
5
|
+
/** Registered tool id for provider-neutral web fetch. */
|
|
6
|
+
export declare const WEB_FETCH_TOOL_ID = "web_fetch";
|
|
7
|
+
/** Canonical search provider vocabulary. */
|
|
8
|
+
export declare const WEB_SEARCH_PROVIDERS: readonly ["exa", "brave", "zai"];
|
|
9
|
+
/** Canonical fetch provider vocabulary. */
|
|
10
|
+
export declare const WEB_FETCH_PROVIDERS: readonly ["native", "spider", "zai"];
|
|
11
|
+
/** Credential provenance vocabulary reported in result metadata. */
|
|
12
|
+
export declare const WEB_CREDENTIAL_SOURCES: readonly ["env", "config"];
|
|
13
|
+
/** Canonical Z.AI region vocabulary (matches the canonical vvoc web region enum). */
|
|
14
|
+
export declare const WEB_REGIONS: readonly ["international", "china"];
|
|
15
|
+
/** Union of supported Z.AI region identifiers. */
|
|
16
|
+
export type WebRegion = (typeof WEB_REGIONS)[number];
|
|
17
|
+
/** Canonical freshness window vocabulary. */
|
|
18
|
+
export declare const SEARCH_FRESHNESS_WINDOWS: readonly ["day", "week", "month", "year"];
|
|
19
|
+
/** Union of supported freshness window identifiers. */
|
|
20
|
+
export type WebSearchFreshness = (typeof SEARCH_FRESHNESS_WINDOWS)[number];
|
|
21
|
+
/** Canonical textual output format vocabulary. */
|
|
22
|
+
export declare const FETCH_FORMATS: readonly ["markdown", "text", "html"];
|
|
23
|
+
/** Union of supported textual output format identifiers. */
|
|
24
|
+
export type WebFetchFormat = (typeof FETCH_FORMATS)[number];
|
|
25
|
+
/** Default result count. */
|
|
26
|
+
export declare const WEB_SEARCH_DEFAULT_COUNT = 8;
|
|
27
|
+
/** Minimum result count. */
|
|
28
|
+
export declare const WEB_SEARCH_MIN_COUNT = 1;
|
|
29
|
+
/** Maximum result count. */
|
|
30
|
+
export declare const WEB_SEARCH_MAX_COUNT = 20;
|
|
31
|
+
/** Default per-call timeout in seconds. */
|
|
32
|
+
export declare const WEB_FETCH_DEFAULT_TIMEOUT_SECONDS = 30;
|
|
33
|
+
/** Maximum model-configurable timeout in seconds. */
|
|
34
|
+
export declare const WEB_FETCH_MAX_TIMEOUT_SECONDS = 120;
|
|
35
|
+
/**
|
|
36
|
+
* Registered raw argument map for web_search (single source of the tool surface).
|
|
37
|
+
* Provider-neutral: no credential, provider, or region arguments are accepted.
|
|
38
|
+
* count carries a representable 1..20 integer bound and the documented default;
|
|
39
|
+
* the execute boundary re-applies the default because the host forwards raw args.
|
|
40
|
+
*/
|
|
41
|
+
export declare const webSearchArgs: {
|
|
42
|
+
query: z.ZodString;
|
|
43
|
+
count: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
day: "day";
|
|
46
|
+
week: "week";
|
|
47
|
+
month: "month";
|
|
48
|
+
year: "year";
|
|
49
|
+
}>>;
|
|
50
|
+
};
|
|
51
|
+
declare const webSearchArgsObject: z.ZodObject<{
|
|
52
|
+
query: z.ZodString;
|
|
53
|
+
count: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
day: "day";
|
|
56
|
+
week: "week";
|
|
57
|
+
month: "month";
|
|
58
|
+
year: "year";
|
|
59
|
+
}>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
/** web_search argument shape with defaults applied, single-sourced from the registered schema. */
|
|
62
|
+
export type WebSearchToolArgs = z.infer<typeof webSearchArgsObject>;
|
|
63
|
+
/**
|
|
64
|
+
* Registered raw argument map for web_fetch (single source of the tool surface).
|
|
65
|
+
* Provider-neutral: no credential or provider arguments are accepted.
|
|
66
|
+
* format and timeout carry the documented defaults; the execute boundary re-applies
|
|
67
|
+
* them because the host forwards raw args. A provider may drop the numeric bound
|
|
68
|
+
* during schema lowering, so the positive/maximum rule stays runtime-enforced.
|
|
69
|
+
*/
|
|
70
|
+
export declare const webFetchArgs: {
|
|
71
|
+
url: z.ZodString;
|
|
72
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
73
|
+
text: "text";
|
|
74
|
+
markdown: "markdown";
|
|
75
|
+
html: "html";
|
|
76
|
+
}>>;
|
|
77
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
78
|
+
};
|
|
79
|
+
declare const webFetchArgsObject: z.ZodObject<{
|
|
80
|
+
url: z.ZodString;
|
|
81
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
82
|
+
text: "text";
|
|
83
|
+
markdown: "markdown";
|
|
84
|
+
html: "html";
|
|
85
|
+
}>>;
|
|
86
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
/** web_fetch argument shape with defaults applied, single-sourced from the registered schema. */
|
|
89
|
+
export type WebFetchToolArgs = z.infer<typeof webFetchArgsObject>;
|
|
90
|
+
/** Owned contract for web_search. */
|
|
91
|
+
export declare const webSearchContract: OwnedToolContract<{
|
|
92
|
+
query: z.ZodString;
|
|
93
|
+
count: z.ZodDefault<z.ZodNumber>;
|
|
94
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
day: "day";
|
|
96
|
+
week: "week";
|
|
97
|
+
month: "month";
|
|
98
|
+
year: "year";
|
|
99
|
+
}>>;
|
|
100
|
+
}>;
|
|
101
|
+
/** Owned contract for web_fetch. */
|
|
102
|
+
export declare const webFetchContract: OwnedToolContract<{
|
|
103
|
+
url: z.ZodString;
|
|
104
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
105
|
+
text: "text";
|
|
106
|
+
markdown: "markdown";
|
|
107
|
+
html: "html";
|
|
108
|
+
}>>;
|
|
109
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
110
|
+
}>;
|
|
111
|
+
/** Owned contracts for both web tools (input to the owned definition/pre-execute adapters). */
|
|
112
|
+
export declare const webToolContracts: readonly OwnedToolContract<ZodRawShape>[];
|
|
113
|
+
/** Successful parsed search args or bounded structural issues. */
|
|
114
|
+
export type WebSearchValidation = {
|
|
115
|
+
ok: true;
|
|
116
|
+
data: WebSearchToolArgs;
|
|
117
|
+
} | {
|
|
118
|
+
ok: false;
|
|
119
|
+
issues: readonly ContractIssue[];
|
|
120
|
+
};
|
|
121
|
+
/** Successful parsed fetch args or bounded structural/URL issues. */
|
|
122
|
+
export type WebFetchValidation = {
|
|
123
|
+
ok: true;
|
|
124
|
+
data: WebFetchToolArgs;
|
|
125
|
+
} | {
|
|
126
|
+
ok: false;
|
|
127
|
+
issues: readonly ContractIssue[];
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Strict structural validation for web_search.
|
|
131
|
+
* Unknown root keys, malformed provided values, unsupported freshness windows, and
|
|
132
|
+
* out-of-bounds counts reject; the documented count default is applied for execute.
|
|
133
|
+
* The query text is preserved verbatim.
|
|
134
|
+
*/
|
|
135
|
+
export declare function validateWebSearchToolInput(raw: unknown): WebSearchValidation;
|
|
136
|
+
/**
|
|
137
|
+
* Strict structural plus URL scheme/shape validation for web_fetch.
|
|
138
|
+
* Structural failures reject first; then the URL must parse as an absolute HTTP or
|
|
139
|
+
* HTTPS URL. Diagnostics identify the offending `url` field with a bounded message
|
|
140
|
+
* that never echoes the raw URL (which may carry credentials) or an error payload.
|
|
141
|
+
* The format and timeout defaults are applied for execute.
|
|
142
|
+
*/
|
|
143
|
+
export declare function validateWebFetchToolInput(raw: unknown): WebFetchValidation;
|
|
144
|
+
/**
|
|
145
|
+
* Closed search metadata schemas for the actual delivery variants.
|
|
146
|
+
* `region` is present only for the direct Z.AI provider; unknown fields and
|
|
147
|
+
* missing known fields reject.
|
|
148
|
+
*/
|
|
149
|
+
export declare const webSearchMetadataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
150
|
+
provider: z.ZodLiteral<"exa">;
|
|
151
|
+
resultCount: z.ZodNumber;
|
|
152
|
+
credentialSource: z.ZodEnum<{
|
|
153
|
+
config: "config";
|
|
154
|
+
env: "env";
|
|
155
|
+
}>;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
provider: z.ZodLiteral<"brave">;
|
|
158
|
+
resultCount: z.ZodNumber;
|
|
159
|
+
credentialSource: z.ZodEnum<{
|
|
160
|
+
config: "config";
|
|
161
|
+
env: "env";
|
|
162
|
+
}>;
|
|
163
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
164
|
+
provider: z.ZodLiteral<"zai">;
|
|
165
|
+
region: z.ZodEnum<{
|
|
166
|
+
international: "international";
|
|
167
|
+
china: "china";
|
|
168
|
+
}>;
|
|
169
|
+
resultCount: z.ZodNumber;
|
|
170
|
+
credentialSource: z.ZodEnum<{
|
|
171
|
+
config: "config";
|
|
172
|
+
env: "env";
|
|
173
|
+
}>;
|
|
174
|
+
}, z.core.$strip>]>;
|
|
175
|
+
/**
|
|
176
|
+
* Closed result envelope for web_search producer/test checks.
|
|
177
|
+
* `output` is the rendered Markdown document and stays a declared opaque string.
|
|
178
|
+
* This is never applied as a throw-after-side-effect execute wrapper.
|
|
179
|
+
*/
|
|
180
|
+
export declare const webSearchResultSchema: z.ZodObject<{
|
|
181
|
+
title: z.ZodString;
|
|
182
|
+
output: z.ZodString;
|
|
183
|
+
metadata: z.ZodUnion<readonly [z.ZodObject<{
|
|
184
|
+
provider: z.ZodLiteral<"exa">;
|
|
185
|
+
resultCount: z.ZodNumber;
|
|
186
|
+
credentialSource: z.ZodEnum<{
|
|
187
|
+
config: "config";
|
|
188
|
+
env: "env";
|
|
189
|
+
}>;
|
|
190
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
191
|
+
provider: z.ZodLiteral<"brave">;
|
|
192
|
+
resultCount: z.ZodNumber;
|
|
193
|
+
credentialSource: z.ZodEnum<{
|
|
194
|
+
config: "config";
|
|
195
|
+
env: "env";
|
|
196
|
+
}>;
|
|
197
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
198
|
+
provider: z.ZodLiteral<"zai">;
|
|
199
|
+
region: z.ZodEnum<{
|
|
200
|
+
international: "international";
|
|
201
|
+
china: "china";
|
|
202
|
+
}>;
|
|
203
|
+
resultCount: z.ZodNumber;
|
|
204
|
+
credentialSource: z.ZodEnum<{
|
|
205
|
+
config: "config";
|
|
206
|
+
env: "env";
|
|
207
|
+
}>;
|
|
208
|
+
}, z.core.$strip>]>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
/**
|
|
211
|
+
* Closed fetch metadata schemas for the actual provider/delivery variants.
|
|
212
|
+
* Native reports its status; Spider may add status/duration; Z.AI reader text
|
|
213
|
+
* carries its regional request metadata while direct Z.AI media reports only the
|
|
214
|
+
* region/format/credential provenance. Region is required for every Z.AI variant.
|
|
215
|
+
*/
|
|
216
|
+
export declare const webFetchMetadataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
217
|
+
provider: z.ZodLiteral<"native">;
|
|
218
|
+
format: z.ZodEnum<{
|
|
219
|
+
text: "text";
|
|
220
|
+
markdown: "markdown";
|
|
221
|
+
html: "html";
|
|
222
|
+
}>;
|
|
223
|
+
status: z.ZodNumber;
|
|
224
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
225
|
+
provider: z.ZodLiteral<"spider">;
|
|
226
|
+
format: z.ZodEnum<{
|
|
227
|
+
text: "text";
|
|
228
|
+
markdown: "markdown";
|
|
229
|
+
html: "html";
|
|
230
|
+
}>;
|
|
231
|
+
credentialSource: z.ZodEnum<{
|
|
232
|
+
config: "config";
|
|
233
|
+
env: "env";
|
|
234
|
+
}>;
|
|
235
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
236
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
238
|
+
provider: z.ZodLiteral<"zai">;
|
|
239
|
+
region: z.ZodEnum<{
|
|
240
|
+
international: "international";
|
|
241
|
+
china: "china";
|
|
242
|
+
}>;
|
|
243
|
+
format: z.ZodEnum<{
|
|
244
|
+
text: "text";
|
|
245
|
+
markdown: "markdown";
|
|
246
|
+
html: "html";
|
|
247
|
+
}>;
|
|
248
|
+
credentialSource: z.ZodEnum<{
|
|
249
|
+
config: "config";
|
|
250
|
+
env: "env";
|
|
251
|
+
}>;
|
|
252
|
+
status: z.ZodNumber;
|
|
253
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
254
|
+
model: z.ZodOptional<z.ZodString>;
|
|
255
|
+
created: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
title: z.ZodOptional<z.ZodString>;
|
|
257
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
258
|
+
provider: z.ZodLiteral<"zai">;
|
|
259
|
+
region: z.ZodEnum<{
|
|
260
|
+
international: "international";
|
|
261
|
+
china: "china";
|
|
262
|
+
}>;
|
|
263
|
+
format: z.ZodEnum<{
|
|
264
|
+
text: "text";
|
|
265
|
+
markdown: "markdown";
|
|
266
|
+
html: "html";
|
|
267
|
+
}>;
|
|
268
|
+
credentialSource: z.ZodEnum<{
|
|
269
|
+
config: "config";
|
|
270
|
+
env: "env";
|
|
271
|
+
}>;
|
|
272
|
+
}, z.core.$strip>]>;
|
|
273
|
+
/** Closed textual fetch result envelope producer schema (no attachments region). */
|
|
274
|
+
export declare const webFetchTextResultSchema: z.ZodObject<{
|
|
275
|
+
title: z.ZodString;
|
|
276
|
+
output: z.ZodString;
|
|
277
|
+
metadata: z.ZodUnion<readonly [z.ZodObject<{
|
|
278
|
+
provider: z.ZodLiteral<"native">;
|
|
279
|
+
format: z.ZodEnum<{
|
|
280
|
+
text: "text";
|
|
281
|
+
markdown: "markdown";
|
|
282
|
+
html: "html";
|
|
283
|
+
}>;
|
|
284
|
+
status: z.ZodNumber;
|
|
285
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
286
|
+
provider: z.ZodLiteral<"spider">;
|
|
287
|
+
format: z.ZodEnum<{
|
|
288
|
+
text: "text";
|
|
289
|
+
markdown: "markdown";
|
|
290
|
+
html: "html";
|
|
291
|
+
}>;
|
|
292
|
+
credentialSource: z.ZodEnum<{
|
|
293
|
+
config: "config";
|
|
294
|
+
env: "env";
|
|
295
|
+
}>;
|
|
296
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
298
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
299
|
+
provider: z.ZodLiteral<"zai">;
|
|
300
|
+
region: z.ZodEnum<{
|
|
301
|
+
international: "international";
|
|
302
|
+
china: "china";
|
|
303
|
+
}>;
|
|
304
|
+
format: z.ZodEnum<{
|
|
305
|
+
text: "text";
|
|
306
|
+
markdown: "markdown";
|
|
307
|
+
html: "html";
|
|
308
|
+
}>;
|
|
309
|
+
credentialSource: z.ZodEnum<{
|
|
310
|
+
config: "config";
|
|
311
|
+
env: "env";
|
|
312
|
+
}>;
|
|
313
|
+
status: z.ZodNumber;
|
|
314
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
315
|
+
model: z.ZodOptional<z.ZodString>;
|
|
316
|
+
created: z.ZodOptional<z.ZodNumber>;
|
|
317
|
+
title: z.ZodOptional<z.ZodString>;
|
|
318
|
+
}, z.core.$strip>]>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
/** Closed media fetch result envelope producer schema requiring a real attachment. */
|
|
321
|
+
export declare const webFetchMediaResultSchema: z.ZodObject<{
|
|
322
|
+
title: z.ZodString;
|
|
323
|
+
output: z.ZodString;
|
|
324
|
+
metadata: z.ZodUnion<readonly [z.ZodObject<{
|
|
325
|
+
provider: z.ZodLiteral<"native">;
|
|
326
|
+
format: z.ZodEnum<{
|
|
327
|
+
text: "text";
|
|
328
|
+
markdown: "markdown";
|
|
329
|
+
html: "html";
|
|
330
|
+
}>;
|
|
331
|
+
status: z.ZodNumber;
|
|
332
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
333
|
+
provider: z.ZodLiteral<"spider">;
|
|
334
|
+
format: z.ZodEnum<{
|
|
335
|
+
text: "text";
|
|
336
|
+
markdown: "markdown";
|
|
337
|
+
html: "html";
|
|
338
|
+
}>;
|
|
339
|
+
credentialSource: z.ZodEnum<{
|
|
340
|
+
config: "config";
|
|
341
|
+
env: "env";
|
|
342
|
+
}>;
|
|
343
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
345
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
346
|
+
provider: z.ZodLiteral<"zai">;
|
|
347
|
+
region: z.ZodEnum<{
|
|
348
|
+
international: "international";
|
|
349
|
+
china: "china";
|
|
350
|
+
}>;
|
|
351
|
+
format: z.ZodEnum<{
|
|
352
|
+
text: "text";
|
|
353
|
+
markdown: "markdown";
|
|
354
|
+
html: "html";
|
|
355
|
+
}>;
|
|
356
|
+
credentialSource: z.ZodEnum<{
|
|
357
|
+
config: "config";
|
|
358
|
+
env: "env";
|
|
359
|
+
}>;
|
|
360
|
+
}, z.core.$strip>]>;
|
|
361
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
362
|
+
type: z.ZodLiteral<"file">;
|
|
363
|
+
mime: z.ZodString;
|
|
364
|
+
url: z.ZodString;
|
|
365
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
366
|
+
}, z.core.$strip>>;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
/** Closed fetch result envelope union for producer/test checks. */
|
|
369
|
+
export declare const webFetchResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
370
|
+
title: z.ZodString;
|
|
371
|
+
output: z.ZodString;
|
|
372
|
+
metadata: z.ZodUnion<readonly [z.ZodObject<{
|
|
373
|
+
provider: z.ZodLiteral<"native">;
|
|
374
|
+
format: z.ZodEnum<{
|
|
375
|
+
text: "text";
|
|
376
|
+
markdown: "markdown";
|
|
377
|
+
html: "html";
|
|
378
|
+
}>;
|
|
379
|
+
status: z.ZodNumber;
|
|
380
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
381
|
+
provider: z.ZodLiteral<"spider">;
|
|
382
|
+
format: z.ZodEnum<{
|
|
383
|
+
text: "text";
|
|
384
|
+
markdown: "markdown";
|
|
385
|
+
html: "html";
|
|
386
|
+
}>;
|
|
387
|
+
credentialSource: z.ZodEnum<{
|
|
388
|
+
config: "config";
|
|
389
|
+
env: "env";
|
|
390
|
+
}>;
|
|
391
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
394
|
+
provider: z.ZodLiteral<"zai">;
|
|
395
|
+
region: z.ZodEnum<{
|
|
396
|
+
international: "international";
|
|
397
|
+
china: "china";
|
|
398
|
+
}>;
|
|
399
|
+
format: z.ZodEnum<{
|
|
400
|
+
text: "text";
|
|
401
|
+
markdown: "markdown";
|
|
402
|
+
html: "html";
|
|
403
|
+
}>;
|
|
404
|
+
credentialSource: z.ZodEnum<{
|
|
405
|
+
config: "config";
|
|
406
|
+
env: "env";
|
|
407
|
+
}>;
|
|
408
|
+
status: z.ZodNumber;
|
|
409
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
410
|
+
model: z.ZodOptional<z.ZodString>;
|
|
411
|
+
created: z.ZodOptional<z.ZodNumber>;
|
|
412
|
+
title: z.ZodOptional<z.ZodString>;
|
|
413
|
+
}, z.core.$strip>]>;
|
|
414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
415
|
+
title: z.ZodString;
|
|
416
|
+
output: z.ZodString;
|
|
417
|
+
metadata: z.ZodUnion<readonly [z.ZodObject<{
|
|
418
|
+
provider: z.ZodLiteral<"native">;
|
|
419
|
+
format: z.ZodEnum<{
|
|
420
|
+
text: "text";
|
|
421
|
+
markdown: "markdown";
|
|
422
|
+
html: "html";
|
|
423
|
+
}>;
|
|
424
|
+
status: z.ZodNumber;
|
|
425
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
426
|
+
provider: z.ZodLiteral<"spider">;
|
|
427
|
+
format: z.ZodEnum<{
|
|
428
|
+
text: "text";
|
|
429
|
+
markdown: "markdown";
|
|
430
|
+
html: "html";
|
|
431
|
+
}>;
|
|
432
|
+
credentialSource: z.ZodEnum<{
|
|
433
|
+
config: "config";
|
|
434
|
+
env: "env";
|
|
435
|
+
}>;
|
|
436
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
437
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
438
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
439
|
+
provider: z.ZodLiteral<"zai">;
|
|
440
|
+
region: z.ZodEnum<{
|
|
441
|
+
international: "international";
|
|
442
|
+
china: "china";
|
|
443
|
+
}>;
|
|
444
|
+
format: z.ZodEnum<{
|
|
445
|
+
text: "text";
|
|
446
|
+
markdown: "markdown";
|
|
447
|
+
html: "html";
|
|
448
|
+
}>;
|
|
449
|
+
credentialSource: z.ZodEnum<{
|
|
450
|
+
config: "config";
|
|
451
|
+
env: "env";
|
|
452
|
+
}>;
|
|
453
|
+
}, z.core.$strip>]>;
|
|
454
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
455
|
+
type: z.ZodLiteral<"file">;
|
|
456
|
+
mime: z.ZodString;
|
|
457
|
+
url: z.ZodString;
|
|
458
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
459
|
+
}, z.core.$strip>>;
|
|
460
|
+
}, z.core.$strip>]>;
|
|
461
|
+
/** Schema-derived search result envelope. */
|
|
462
|
+
export type WebSearchResultEnvelope = z.infer<typeof webSearchResultSchema>;
|
|
463
|
+
/** Schema-derived fetch result envelope. */
|
|
464
|
+
export type WebFetchResultEnvelope = z.infer<typeof webFetchResultSchema>;
|
|
465
|
+
/** Schema-derived search metadata union. */
|
|
466
|
+
export type WebSearchMetadata = z.infer<typeof webSearchMetadataSchema>;
|
|
467
|
+
/** Schema-derived fetch metadata union. */
|
|
468
|
+
export type WebFetchMetadata = z.infer<typeof webFetchMetadataSchema>;
|
|
469
|
+
export {};
|