@native-knowledge/knowledge-sdk 0.0.0-stage → 0.1.0-rc.1
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/LICENSE +21 -0
- package/README.md +46 -2
- package/dist/index.js +6577 -0
- package/dist/types/contracts/artifact.d.ts +120 -0
- package/dist/types/contracts/collection-control.d.ts +160 -0
- package/dist/types/contracts/collection.d.ts +263 -0
- package/dist/types/contracts/common.d.ts +17 -0
- package/dist/types/contracts/currentness.d.ts +477 -0
- package/dist/types/contracts/event.d.ts +60 -0
- package/dist/types/contracts/evidence.d.ts +202 -0
- package/dist/types/contracts/index.d.ts +55 -0
- package/dist/types/contracts/material-capability.d.ts +88 -0
- package/dist/types/contracts/material-carrier.d.ts +104 -0
- package/dist/types/contracts/material-context.d.ts +28 -0
- package/dist/types/contracts/material-read.d.ts +152 -0
- package/dist/types/contracts/observation.d.ts +75 -0
- package/dist/types/contracts/persistence.d.ts +370 -0
- package/dist/types/contracts/project-intent.d.ts +218 -0
- package/dist/types/contracts/projection.d.ts +380 -0
- package/dist/types/contracts/public-reference.d.ts +237 -0
- package/dist/types/contracts/reference-record.d.ts +124 -0
- package/dist/types/contracts/remote-file.d.ts +128 -0
- package/dist/types/contracts/resource-scope.d.ts +40 -0
- package/dist/types/contracts/resource-transfer.d.ts +24 -0
- package/dist/types/contracts/review-packet.d.ts +274 -0
- package/dist/types/contracts/review-plane.d.ts +90 -0
- package/dist/types/contracts/rich-document.d.ts +641 -0
- package/dist/types/contracts/runtime-compatibility.d.ts +22 -0
- package/dist/types/contracts/runtime.d.ts +59 -0
- package/dist/types/contracts/scheduler.d.ts +348 -0
- package/dist/types/contracts/signal.d.ts +113 -0
- package/dist/types/contracts/source-governance.d.ts +375 -0
- package/dist/types/contracts/source.d.ts +62 -0
- package/dist/types/contracts/tenant-budget.d.ts +59 -0
- package/dist/types/contracts/tenant-collection-request.d.ts +209 -0
- package/dist/types/contracts/tenant-collection.d.ts +199 -0
- package/dist/types/contracts/tenant-currentness.d.ts +117 -0
- package/dist/types/contracts/tenant-management.d.ts +286 -0
- package/dist/types/contracts/tenant-material-api.d.ts +584 -0
- package/dist/types/contracts/tenant-pdf-text.d.ts +27 -0
- package/dist/types/contracts/tenant-project-control.d.ts +94 -0
- package/dist/types/contracts/tenant-public-reference.d.ts +179 -0
- package/dist/types/contracts/tenant-resource-api.d.ts +738 -0
- package/dist/types/contracts/tenant-resource.d.ts +298 -0
- package/dist/types/contracts/tenant-rich-document.d.ts +317 -0
- package/dist/types/contracts/tenant-source-binding.d.ts +44 -0
- package/dist/types/contracts/tenant-source-bridge.d.ts +70 -0
- package/dist/types/contracts/tenant-source-cutover.d.ts +226 -0
- package/dist/types/contracts/tenant-source-document.d.ts +163 -0
- package/dist/types/contracts/tenant-source-lease.d.ts +1 -0
- package/dist/types/contracts/tenant-source.d.ts +223 -0
- package/dist/types/contracts/tenant-web-collection.d.ts +287 -0
- package/dist/types/contracts/tenant-web-content-plan.d.ts +86 -0
- package/dist/types/contracts/tenant-web-content-result.d.ts +63 -0
- package/dist/types/contracts/tenant-web-content.d.ts +383 -0
- package/dist/types/contracts/tenant-web-crawl.d.ts +310 -0
- package/dist/types/contracts/tenant-web-dynamic.d.ts +698 -0
- package/dist/types/contracts/tenant-web-results.d.ts +66 -0
- package/dist/types/contracts/tenant-web-workflow.d.ts +494 -0
- package/dist/types/sdk/agent-entry.d.ts +291 -0
- package/dist/types/sdk/agent-guidance-error.d.ts +15 -0
- package/dist/types/sdk/index.d.ts +289 -0
- package/dist/types/sdk/material-stream.d.ts +18 -0
- package/dist/types/sdk/oauth.d.ts +268 -0
- package/dist/types/sdk/resource-integrity.d.ts +21 -0
- package/dist/types/sdk/resource.d.ts +88 -0
- package/dist/types/sdk/tenant-management.d.ts +240 -0
- package/dist/types/sdk/tenant-project.d.ts +57 -0
- package/dist/types/sdk/tenant-runtime.d.ts +174 -0
- package/dist/types/sdk/tenant-web-content.d.ts +44 -0
- package/dist/types/sdk/tenant-web-crawl.d.ts +42 -0
- package/dist/types/sdk/tenant-web-dynamic.d.ts +42 -0
- package/dist/types/sdk/tenant-web-workflow.d.ts +43 -0
- package/dist/types/sdk/tenant-web.d.ts +42 -0
- package/dist/types/sdk/tenant-workspace.d.ts +36 -0
- package/dist/types/sdk/transport.d.ts +16 -0
- package/dist/types/serving-contracts/agent-catalog.d.ts +70 -0
- package/dist/types/serving-contracts/agent-entry.d.ts +13148 -0
- package/dist/types/serving-contracts/agent-guidance-shapes.d.ts +263 -0
- package/dist/types/serving-contracts/agent-input-hints.d.ts +24 -0
- package/dist/types/serving-contracts/body-search.d.ts +231 -0
- package/dist/types/serving-contracts/consumer.d.ts +989 -0
- package/dist/types/serving-contracts/core.d.ts +333 -0
- package/dist/types/serving-contracts/http.d.ts +2874 -0
- package/dist/types/serving-contracts/index.d.ts +23 -0
- package/dist/types/serving-contracts/management.d.ts +424 -0
- package/dist/types/serving-contracts/material-capabilities.d.ts +508 -0
- package/dist/types/serving-contracts/material-index-status.d.ts +55 -0
- package/dist/types/serving-contracts/mcp.d.ts +2218 -0
- package/dist/types/serving-contracts/tenant-governance.d.ts +236 -0
- package/dist/types/serving-contracts/tenant-management.d.ts +6276 -0
- package/dist/types/serving-contracts/tenant-project.d.ts +7550 -0
- package/dist/types/serving-contracts/tenant-runtime.d.ts +9674 -0
- package/dist/types/serving-contracts/tenant-web-content.d.ts +4606 -0
- package/dist/types/serving-contracts/tenant-web-crawl.d.ts +2958 -0
- package/dist/types/serving-contracts/tenant-web-dynamic.d.ts +3902 -0
- package/dist/types/serving-contracts/tenant-web-workflow.d.ts +5750 -0
- package/dist/types/serving-contracts/tenant-web.d.ts +6418 -0
- package/dist/types/serving-contracts/tenant-workspace.d.ts +6451 -0
- package/dist/types/serving-contracts/workflow.d.ts +439 -0
- package/package.json +34 -4
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/** Optional presentation extension. No new execution authority or automatic actions. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const agentGuidanceHeader = "x-knowledge-agent-guidance", agentGuidanceFeature = "task-guidance-v1", agentResupplyGuidanceFeature = "task-guidance-v2";
|
|
4
|
+
export declare const agentGuidanceActionSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
tool: z.ZodEnum<{
|
|
8
|
+
knowledge_discover: "knowledge_discover";
|
|
9
|
+
knowledge_execute: "knowledge_execute";
|
|
10
|
+
}>;
|
|
11
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
12
|
+
canExecute: z.ZodBoolean;
|
|
13
|
+
automatic: z.ZodLiteral<false>;
|
|
14
|
+
missingFields: z.ZodArray<z.ZodString>;
|
|
15
|
+
reasonCode: z.ZodString;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export declare const agentInputHintSchema: z.ZodObject<{
|
|
18
|
+
path: z.ZodString;
|
|
19
|
+
kind: z.ZodEnum<{
|
|
20
|
+
MISSING: "MISSING";
|
|
21
|
+
INVALID: "INVALID";
|
|
22
|
+
UNSUPPORTED: "UNSUPPORTED";
|
|
23
|
+
CONFLICT: "CONFLICT";
|
|
24
|
+
}>;
|
|
25
|
+
expected: z.ZodString;
|
|
26
|
+
prompt: z.ZodString;
|
|
27
|
+
source: z.ZodEnum<{
|
|
28
|
+
USER_INPUT: "USER_INPUT";
|
|
29
|
+
CURRENT_STATE: "CURRENT_STATE";
|
|
30
|
+
PRIOR_RESULT: "PRIOR_RESULT";
|
|
31
|
+
INDEPENDENT_REVIEW: "INDEPENDENT_REVIEW";
|
|
32
|
+
}>;
|
|
33
|
+
choices: z.ZodArray<z.ZodJSONSchema>;
|
|
34
|
+
constraints: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
export declare const agentTaskContextSchema: z.ZodObject<{
|
|
37
|
+
query: z.ZodOptional<z.ZodString>;
|
|
38
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
39
|
+
jobRef: z.ZodOptional<z.ZodString>;
|
|
40
|
+
projectRef: z.ZodOptional<z.ZodString>;
|
|
41
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
42
|
+
sourceId: z.ZodOptional<z.ZodString>;
|
|
43
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
44
|
+
recipientTenantId: z.ZodOptional<z.ZodString>;
|
|
45
|
+
sourceRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
+
spec: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
47
|
+
extraction: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
48
|
+
citation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
export declare const agentTaskInputSchema: z.ZodObject<{
|
|
51
|
+
goal: z.ZodString;
|
|
52
|
+
context: z.ZodDefault<z.ZodObject<{
|
|
53
|
+
query: z.ZodOptional<z.ZodString>;
|
|
54
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
55
|
+
jobRef: z.ZodOptional<z.ZodString>;
|
|
56
|
+
projectRef: z.ZodOptional<z.ZodString>;
|
|
57
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
58
|
+
sourceId: z.ZodOptional<z.ZodString>;
|
|
59
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
60
|
+
recipientTenantId: z.ZodOptional<z.ZodString>;
|
|
61
|
+
sourceRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
|
+
spec: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
63
|
+
extraction: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
64
|
+
citation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
65
|
+
}, z.core.$strict>>;
|
|
66
|
+
inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
export type AgentTaskInput = z.input<typeof agentTaskInputSchema>;
|
|
69
|
+
export declare const agentTaskPlanSchema: z.ZodObject<{
|
|
70
|
+
template: z.ZodEnum<{
|
|
71
|
+
RESEARCH_EXISTING: "RESEARCH_EXISTING";
|
|
72
|
+
COLLECT_WEBSITE: "COLLECT_WEBSITE";
|
|
73
|
+
INSPECT_COLLECTION: "INSPECT_COLLECTION";
|
|
74
|
+
VERIFY_CITATION: "VERIFY_CITATION";
|
|
75
|
+
PROJECT_RESEARCH: "PROJECT_RESEARCH";
|
|
76
|
+
SHARE_MATERIAL: "SHARE_MATERIAL";
|
|
77
|
+
GOVERNANCE: "GOVERNANCE";
|
|
78
|
+
UNRECOGNIZED: "UNRECOGNIZED";
|
|
79
|
+
}>;
|
|
80
|
+
status: z.ZodLiteral<"SUGGESTED_NOT_EXECUTED">;
|
|
81
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
title: z.ZodString;
|
|
84
|
+
dependsOn: z.ZodArray<z.ZodString>;
|
|
85
|
+
capability: z.ZodNullable<z.ZodString>;
|
|
86
|
+
state: z.ZodEnum<{
|
|
87
|
+
READY: "READY";
|
|
88
|
+
NOT_AUTHORIZED: "NOT_AUTHORIZED";
|
|
89
|
+
NEEDS_INPUT: "NEEDS_INPUT";
|
|
90
|
+
NEEDS_PRIOR_RESULT: "NEEDS_PRIOR_RESULT";
|
|
91
|
+
}>;
|
|
92
|
+
action: z.ZodNullable<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
title: z.ZodString;
|
|
95
|
+
tool: z.ZodEnum<{
|
|
96
|
+
knowledge_discover: "knowledge_discover";
|
|
97
|
+
knowledge_execute: "knowledge_execute";
|
|
98
|
+
}>;
|
|
99
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
100
|
+
canExecute: z.ZodBoolean;
|
|
101
|
+
automatic: z.ZodLiteral<false>;
|
|
102
|
+
missingFields: z.ZodArray<z.ZodString>;
|
|
103
|
+
reasonCode: z.ZodString;
|
|
104
|
+
}, z.core.$strict>>;
|
|
105
|
+
inputHints: z.ZodArray<z.ZodObject<{
|
|
106
|
+
path: z.ZodString;
|
|
107
|
+
kind: z.ZodEnum<{
|
|
108
|
+
MISSING: "MISSING";
|
|
109
|
+
INVALID: "INVALID";
|
|
110
|
+
UNSUPPORTED: "UNSUPPORTED";
|
|
111
|
+
CONFLICT: "CONFLICT";
|
|
112
|
+
}>;
|
|
113
|
+
expected: z.ZodString;
|
|
114
|
+
prompt: z.ZodString;
|
|
115
|
+
source: z.ZodEnum<{
|
|
116
|
+
USER_INPUT: "USER_INPUT";
|
|
117
|
+
CURRENT_STATE: "CURRENT_STATE";
|
|
118
|
+
PRIOR_RESULT: "PRIOR_RESULT";
|
|
119
|
+
INDEPENDENT_REVIEW: "INDEPENDENT_REVIEW";
|
|
120
|
+
}>;
|
|
121
|
+
choices: z.ZodArray<z.ZodJSONSchema>;
|
|
122
|
+
constraints: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
123
|
+
}, z.core.$strict>>;
|
|
124
|
+
}, z.core.$strict>>;
|
|
125
|
+
guidance: z.ZodString;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
export declare const agentRecoverySchema: z.ZodObject<{
|
|
128
|
+
reasonCode: z.ZodEnum<{
|
|
129
|
+
INPUT_REQUIRED: "INPUT_REQUIRED";
|
|
130
|
+
CURSOR_RESTART_REQUIRED: "CURSOR_RESTART_REQUIRED";
|
|
131
|
+
STATE_CHANGED: "STATE_CHANGED";
|
|
132
|
+
INSPECT_PERSISTED_RESULT: "INSPECT_PERSISTED_RESULT";
|
|
133
|
+
SEMANTIC_PLAN_REQUIRED: "SEMANTIC_PLAN_REQUIRED";
|
|
134
|
+
AUTHORITY_REQUIRED: "AUTHORITY_REQUIRED";
|
|
135
|
+
ACCESS_BLOCKED: "ACCESS_BLOCKED";
|
|
136
|
+
OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
|
|
137
|
+
INSPECT_INPUT: "INSPECT_INPUT";
|
|
138
|
+
}>;
|
|
139
|
+
summary: z.ZodString;
|
|
140
|
+
inputHints: z.ZodArray<z.ZodObject<{
|
|
141
|
+
path: z.ZodString;
|
|
142
|
+
kind: z.ZodEnum<{
|
|
143
|
+
MISSING: "MISSING";
|
|
144
|
+
INVALID: "INVALID";
|
|
145
|
+
UNSUPPORTED: "UNSUPPORTED";
|
|
146
|
+
CONFLICT: "CONFLICT";
|
|
147
|
+
}>;
|
|
148
|
+
expected: z.ZodString;
|
|
149
|
+
prompt: z.ZodString;
|
|
150
|
+
source: z.ZodEnum<{
|
|
151
|
+
USER_INPUT: "USER_INPUT";
|
|
152
|
+
CURRENT_STATE: "CURRENT_STATE";
|
|
153
|
+
PRIOR_RESULT: "PRIOR_RESULT";
|
|
154
|
+
INDEPENDENT_REVIEW: "INDEPENDENT_REVIEW";
|
|
155
|
+
}>;
|
|
156
|
+
choices: z.ZodArray<z.ZodJSONSchema>;
|
|
157
|
+
constraints: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
158
|
+
}, z.core.$strict>>;
|
|
159
|
+
nextActions: z.ZodArray<z.ZodObject<{
|
|
160
|
+
id: z.ZodString;
|
|
161
|
+
title: z.ZodString;
|
|
162
|
+
tool: z.ZodEnum<{
|
|
163
|
+
knowledge_discover: "knowledge_discover";
|
|
164
|
+
knowledge_execute: "knowledge_execute";
|
|
165
|
+
}>;
|
|
166
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
167
|
+
canExecute: z.ZodBoolean;
|
|
168
|
+
automatic: z.ZodLiteral<false>;
|
|
169
|
+
missingFields: z.ZodArray<z.ZodString>;
|
|
170
|
+
reasonCode: z.ZodString;
|
|
171
|
+
}, z.core.$strict>>;
|
|
172
|
+
}, z.core.$strict>;
|
|
173
|
+
export type AgentRecovery = z.infer<typeof agentRecoverySchema>;
|
|
174
|
+
export declare const agentGuidedFailureSchema: z.ZodObject<{
|
|
175
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
176
|
+
completedPhase: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
REGISTERED: "REGISTERED";
|
|
178
|
+
ROUTE_COMMITTED: "ROUTE_COMMITTED";
|
|
179
|
+
CURRENTNESS_NOTIFIED: "CURRENTNESS_NOTIFIED";
|
|
180
|
+
SOURCE_REGISTERED: "SOURCE_REGISTERED";
|
|
181
|
+
BATCH_PERSISTED: "BATCH_PERSISTED";
|
|
182
|
+
VALIDATED: "VALIDATED";
|
|
183
|
+
PERSISTED: "PERSISTED";
|
|
184
|
+
CATALOG_PROJECTED: "CATALOG_PROJECTED";
|
|
185
|
+
DECLARATION_PERSISTED: "DECLARATION_PERSISTED";
|
|
186
|
+
CURRENTNESS_RECORDED: "CURRENTNESS_RECORDED";
|
|
187
|
+
SOURCE_PERSISTED: "SOURCE_PERSISTED";
|
|
188
|
+
REQUEST_PERSISTED: "REQUEST_PERSISTED";
|
|
189
|
+
PROJECT_CONTROL_COMMITTED: "PROJECT_CONTROL_COMMITTED";
|
|
190
|
+
WEB_INTENT_PERSISTED: "WEB_INTENT_PERSISTED";
|
|
191
|
+
WEB_CONTROL_COMMITTED: "WEB_CONTROL_COMMITTED";
|
|
192
|
+
}>>;
|
|
193
|
+
errorCode: z.ZodEnum<{
|
|
194
|
+
TENANT_MANAGEMENT_INVALID_INPUT: "TENANT_MANAGEMENT_INVALID_INPUT";
|
|
195
|
+
TENANT_MANAGEMENT_FORBIDDEN: "TENANT_MANAGEMENT_FORBIDDEN";
|
|
196
|
+
TENANT_MANAGEMENT_AUTHORITY_CHANGED: "TENANT_MANAGEMENT_AUTHORITY_CHANGED";
|
|
197
|
+
TENANT_MANAGEMENT_RUNTIME_OWNER_REQUIRED: "TENANT_MANAGEMENT_RUNTIME_OWNER_REQUIRED";
|
|
198
|
+
TENANT_MANAGEMENT_IDEMPOTENCY_CONFLICT: "TENANT_MANAGEMENT_IDEMPOTENCY_CONFLICT";
|
|
199
|
+
TENANT_MANAGEMENT_VERSION_CONFLICT: "TENANT_MANAGEMENT_VERSION_CONFLICT";
|
|
200
|
+
TENANT_MANAGEMENT_SOURCE_FORBIDDEN: "TENANT_MANAGEMENT_SOURCE_FORBIDDEN";
|
|
201
|
+
TENANT_MANAGEMENT_REVIEW_REQUIRED: "TENANT_MANAGEMENT_REVIEW_REQUIRED";
|
|
202
|
+
TENANT_MANAGEMENT_POLICY_BLOCKED: "TENANT_MANAGEMENT_POLICY_BLOCKED";
|
|
203
|
+
TENANT_MANAGEMENT_UNAVAILABLE: "TENANT_MANAGEMENT_UNAVAILABLE";
|
|
204
|
+
TENANT_MANAGEMENT_INCOMPLETE: "TENANT_MANAGEMENT_INCOMPLETE";
|
|
205
|
+
TENANT_MANAGEMENT_INPUT_BUDGET: "TENANT_MANAGEMENT_INPUT_BUDGET";
|
|
206
|
+
TENANT_MANAGEMENT_NOT_FOUND: "TENANT_MANAGEMENT_NOT_FOUND";
|
|
207
|
+
TENANT_WEB_SEMANTIC_COMPILER_UNAVAILABLE: "TENANT_WEB_SEMANTIC_COMPILER_UNAVAILABLE";
|
|
208
|
+
TENANT_WEB_CONTENT_FIELD_PLAN_REQUIRED: "TENANT_WEB_CONTENT_FIELD_PLAN_REQUIRED";
|
|
209
|
+
TENANT_WEB_RETAINED_SCOPE_FORBIDDEN: "TENANT_WEB_RETAINED_SCOPE_FORBIDDEN";
|
|
210
|
+
TENANT_WEB_RESULT_NOT_FOUND: "TENANT_WEB_RESULT_NOT_FOUND";
|
|
211
|
+
TENANT_WEB_CONTROL_CONFLICT: "TENANT_WEB_CONTROL_CONFLICT";
|
|
212
|
+
TENANT_WEB_CANCELLED: "TENANT_WEB_CANCELLED";
|
|
213
|
+
TENANT_WEB_PAUSED: "TENANT_WEB_PAUSED";
|
|
214
|
+
TENANT_WEB_CYCLE_PENDING: "TENANT_WEB_CYCLE_PENDING";
|
|
215
|
+
TENANT_WEB_RUNTIME_OR_DELEGATION_UNAVAILABLE: "TENANT_WEB_RUNTIME_OR_DELEGATION_UNAVAILABLE";
|
|
216
|
+
}>;
|
|
217
|
+
guidance: z.ZodObject<{
|
|
218
|
+
reasonCode: z.ZodEnum<{
|
|
219
|
+
INPUT_REQUIRED: "INPUT_REQUIRED";
|
|
220
|
+
CURSOR_RESTART_REQUIRED: "CURSOR_RESTART_REQUIRED";
|
|
221
|
+
STATE_CHANGED: "STATE_CHANGED";
|
|
222
|
+
INSPECT_PERSISTED_RESULT: "INSPECT_PERSISTED_RESULT";
|
|
223
|
+
SEMANTIC_PLAN_REQUIRED: "SEMANTIC_PLAN_REQUIRED";
|
|
224
|
+
AUTHORITY_REQUIRED: "AUTHORITY_REQUIRED";
|
|
225
|
+
ACCESS_BLOCKED: "ACCESS_BLOCKED";
|
|
226
|
+
OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
|
|
227
|
+
INSPECT_INPUT: "INSPECT_INPUT";
|
|
228
|
+
}>;
|
|
229
|
+
summary: z.ZodString;
|
|
230
|
+
inputHints: z.ZodArray<z.ZodObject<{
|
|
231
|
+
path: z.ZodString;
|
|
232
|
+
kind: z.ZodEnum<{
|
|
233
|
+
MISSING: "MISSING";
|
|
234
|
+
INVALID: "INVALID";
|
|
235
|
+
UNSUPPORTED: "UNSUPPORTED";
|
|
236
|
+
CONFLICT: "CONFLICT";
|
|
237
|
+
}>;
|
|
238
|
+
expected: z.ZodString;
|
|
239
|
+
prompt: z.ZodString;
|
|
240
|
+
source: z.ZodEnum<{
|
|
241
|
+
USER_INPUT: "USER_INPUT";
|
|
242
|
+
CURRENT_STATE: "CURRENT_STATE";
|
|
243
|
+
PRIOR_RESULT: "PRIOR_RESULT";
|
|
244
|
+
INDEPENDENT_REVIEW: "INDEPENDENT_REVIEW";
|
|
245
|
+
}>;
|
|
246
|
+
choices: z.ZodArray<z.ZodJSONSchema>;
|
|
247
|
+
constraints: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
248
|
+
}, z.core.$strict>>;
|
|
249
|
+
nextActions: z.ZodArray<z.ZodObject<{
|
|
250
|
+
id: z.ZodString;
|
|
251
|
+
title: z.ZodString;
|
|
252
|
+
tool: z.ZodEnum<{
|
|
253
|
+
knowledge_discover: "knowledge_discover";
|
|
254
|
+
knowledge_execute: "knowledge_execute";
|
|
255
|
+
}>;
|
|
256
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
257
|
+
canExecute: z.ZodBoolean;
|
|
258
|
+
automatic: z.ZodLiteral<false>;
|
|
259
|
+
missingFields: z.ZodArray<z.ZodString>;
|
|
260
|
+
reasonCode: z.ZodString;
|
|
261
|
+
}, z.core.$strict>>;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Derive bounded hints from the actual capability schema, never from raw validator messages. */
|
|
2
|
+
import { type AgentCapabilityName } from './agent-entry.js';
|
|
3
|
+
export declare function agentInputHints(name: AgentCapabilityName, raw: unknown): {
|
|
4
|
+
path: string;
|
|
5
|
+
kind: "MISSING" | "INVALID" | "UNSUPPORTED" | "CONFLICT";
|
|
6
|
+
expected: string;
|
|
7
|
+
prompt: string;
|
|
8
|
+
source: "USER_INPUT" | "CURRENT_STATE" | "PRIOR_RESULT" | "INDEPENDENT_REVIEW";
|
|
9
|
+
choices: import("zod").JSONType[];
|
|
10
|
+
constraints: Record<string, import("zod").JSONType>;
|
|
11
|
+
}[];
|
|
12
|
+
export declare function agentResumeArguments(name: AgentCapabilityName, raw: unknown): Record<string, unknown>;
|
|
13
|
+
/** Explain invalid supplied fields and any payload fields intentionally omitted from suggestions. */
|
|
14
|
+
export declare function agentCompletionHints(name: AgentCapabilityName, raw: unknown, resupplyFields?: readonly string[]): {
|
|
15
|
+
path: string;
|
|
16
|
+
kind: "MISSING" | "INVALID" | "UNSUPPORTED" | "CONFLICT";
|
|
17
|
+
expected: string;
|
|
18
|
+
prompt: string;
|
|
19
|
+
source: "USER_INPUT" | "CURRENT_STATE" | "PRIOR_RESULT" | "INDEPENDENT_REVIEW";
|
|
20
|
+
choices: import("zod").JSONType[];
|
|
21
|
+
constraints: Record<string, import("zod").JSONType>;
|
|
22
|
+
}[];
|
|
23
|
+
/** Carry only declared field names, never omitted values, across inspection hops. */
|
|
24
|
+
export declare function agentResupplyFields(name: AgentCapabilityName, raw: unknown): string[];
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/** Explicit raw-material body search; existing descriptive search contracts stay frozen. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const agentBodySearchHeader = "x-knowledge-agent-capabilities";
|
|
4
|
+
export declare const agentBodySearchFeature = "body-search-v1";
|
|
5
|
+
export declare const bodyCitationSchema: z.ZodObject<{
|
|
6
|
+
ref: z.ZodString;
|
|
7
|
+
contentHash: z.ZodString;
|
|
8
|
+
jsonPointer: z.ZodNullable<z.ZodString>;
|
|
9
|
+
startUtf16: z.ZodNumber;
|
|
10
|
+
endUtf16: z.ZodNumber;
|
|
11
|
+
quote: z.ZodString;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export declare const bodySearchToolSchemas: {
|
|
14
|
+
readonly knowledge_resource_search_body: z.ZodObject<{
|
|
15
|
+
query: z.ZodString;
|
|
16
|
+
after: z.ZodOptional<z.ZodString>;
|
|
17
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
resourceType: z.ZodOptional<z.ZodString>;
|
|
19
|
+
projectRef: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
readonly knowledge_resource_read_passage: z.ZodObject<{
|
|
22
|
+
citation: z.ZodObject<{
|
|
23
|
+
ref: z.ZodString;
|
|
24
|
+
contentHash: z.ZodString;
|
|
25
|
+
jsonPointer: z.ZodNullable<z.ZodString>;
|
|
26
|
+
startUtf16: z.ZodNumber;
|
|
27
|
+
endUtf16: z.ZodNumber;
|
|
28
|
+
quote: z.ZodString;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
projectRef: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
};
|
|
33
|
+
export declare const bodySearchDataSchemas: {
|
|
34
|
+
readonly knowledge_resource_search_body: z.ZodObject<{
|
|
35
|
+
items: z.ZodArray<z.ZodObject<{
|
|
36
|
+
item: z.ZodObject<{
|
|
37
|
+
ref: z.ZodString;
|
|
38
|
+
ownerTenantId: z.ZodString;
|
|
39
|
+
resourceType: z.ZodString;
|
|
40
|
+
origin: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"TENANT_AUTHOR">;
|
|
42
|
+
actor: z.ZodObject<{
|
|
43
|
+
tenantId: z.ZodString;
|
|
44
|
+
userId: z.ZodString;
|
|
45
|
+
agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
submittedAt: z.ZodISODateTime;
|
|
48
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
49
|
+
type: z.ZodLiteral<"TENANT_SOURCE">;
|
|
50
|
+
sourceId: z.ZodString;
|
|
51
|
+
sourceRef: z.ZodString;
|
|
52
|
+
sourceRevisionRef: z.ZodString;
|
|
53
|
+
collector: z.ZodObject<{
|
|
54
|
+
collectorId: z.ZodString;
|
|
55
|
+
version: z.ZodString;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
runtimeNodeId: z.ZodString;
|
|
58
|
+
observedAt: z.ZodISODateTime;
|
|
59
|
+
}, z.core.$strict>], "type">, z.ZodObject<{
|
|
60
|
+
type: z.ZodLiteral<"LEGACY_PROJECT">;
|
|
61
|
+
projectKey: z.ZodString;
|
|
62
|
+
projectRef: z.ZodString;
|
|
63
|
+
}, z.core.$strict>]>;
|
|
64
|
+
identityHash: z.ZodString;
|
|
65
|
+
identityKind: z.ZodEnum<{
|
|
66
|
+
CAS_BYTES: "CAS_BYTES";
|
|
67
|
+
REFERENCE_RECORD_DIGEST: "REFERENCE_RECORD_DIGEST";
|
|
68
|
+
}>;
|
|
69
|
+
kind: z.ZodString;
|
|
70
|
+
classification: z.ZodEnum<{
|
|
71
|
+
PUBLIC: "PUBLIC";
|
|
72
|
+
PUBLIC_METADATA: "PUBLIC_METADATA";
|
|
73
|
+
TENANT: "TENANT";
|
|
74
|
+
INTERNAL: "INTERNAL";
|
|
75
|
+
FDE_INTERNAL: "FDE_INTERNAL";
|
|
76
|
+
ACCESS_CONTROLLED: "ACCESS_CONTROLLED";
|
|
77
|
+
UNKNOWN: "UNKNOWN";
|
|
78
|
+
}>;
|
|
79
|
+
mediaType: z.ZodString;
|
|
80
|
+
title: z.ZodString;
|
|
81
|
+
summary: z.ZodString;
|
|
82
|
+
decision: z.ZodObject<{
|
|
83
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
84
|
+
action: z.ZodEnum<{
|
|
85
|
+
ALLOW: "ALLOW";
|
|
86
|
+
DENY: "DENY";
|
|
87
|
+
}>;
|
|
88
|
+
reasonCodes: z.ZodArray<z.ZodEnum<{
|
|
89
|
+
UNAVAILABLE: "UNAVAILABLE";
|
|
90
|
+
NOT_FOUND: "NOT_FOUND";
|
|
91
|
+
CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
|
|
92
|
+
INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
|
|
93
|
+
UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
|
|
94
|
+
}>>;
|
|
95
|
+
assessedAt: z.ZodISODateTime;
|
|
96
|
+
}, z.core.$strict>;
|
|
97
|
+
}, z.core.$strict>;
|
|
98
|
+
citation: z.ZodObject<{
|
|
99
|
+
ref: z.ZodString;
|
|
100
|
+
contentHash: z.ZodString;
|
|
101
|
+
jsonPointer: z.ZodNullable<z.ZodString>;
|
|
102
|
+
startUtf16: z.ZodNumber;
|
|
103
|
+
endUtf16: z.ZodNumber;
|
|
104
|
+
quote: z.ZodString;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
nextAfter: z.ZodNullable<z.ZodString>;
|
|
108
|
+
coverage: z.ZodLiteral<"INDEXED_NATIVE_TEXT_PASSAGES_ONLY">;
|
|
109
|
+
completeness: z.ZodLiteral<"NOT_ASSESSED">;
|
|
110
|
+
semantics: z.ZodLiteral<"RAW_MATERIAL_NOT_GOVERNANCE_APPROVAL">;
|
|
111
|
+
}, z.core.$strict>;
|
|
112
|
+
readonly knowledge_resource_read_passage: z.ZodObject<{
|
|
113
|
+
citation: z.ZodObject<{
|
|
114
|
+
ref: z.ZodString;
|
|
115
|
+
contentHash: z.ZodString;
|
|
116
|
+
jsonPointer: z.ZodNullable<z.ZodString>;
|
|
117
|
+
startUtf16: z.ZodNumber;
|
|
118
|
+
endUtf16: z.ZodNumber;
|
|
119
|
+
quote: z.ZodString;
|
|
120
|
+
}, z.core.$strict>;
|
|
121
|
+
verified: z.ZodLiteral<true>;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
};
|
|
124
|
+
export type BodySearchToolName = keyof typeof bodySearchToolSchemas;
|
|
125
|
+
export type BodyCitation = z.infer<typeof bodyCitationSchema>;
|
|
126
|
+
export declare function bodySearchEnvelopeSchema(name: BodySearchToolName): z.ZodObject<{
|
|
127
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
128
|
+
context: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
129
|
+
type: z.ZodLiteral<"TENANT">;
|
|
130
|
+
tenantId: z.ZodString;
|
|
131
|
+
tenantRef: z.ZodString;
|
|
132
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"PROJECT">;
|
|
134
|
+
tenantId: z.ZodString;
|
|
135
|
+
projectKey: z.ZodString;
|
|
136
|
+
projectRef: z.ZodString;
|
|
137
|
+
}, z.core.$strict>], "type">;
|
|
138
|
+
policy: z.ZodEnum<{
|
|
139
|
+
LEGACY_PROJECT: "LEGACY_PROJECT";
|
|
140
|
+
TENANT_NATIVE: "TENANT_NATIVE";
|
|
141
|
+
TENANT_PROJECT_SCOPE: "TENANT_PROJECT_SCOPE";
|
|
142
|
+
}>;
|
|
143
|
+
data: z.ZodObject<{
|
|
144
|
+
items: z.ZodArray<z.ZodObject<{
|
|
145
|
+
item: z.ZodObject<{
|
|
146
|
+
ref: z.ZodString;
|
|
147
|
+
ownerTenantId: z.ZodString;
|
|
148
|
+
resourceType: z.ZodString;
|
|
149
|
+
origin: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
150
|
+
type: z.ZodLiteral<"TENANT_AUTHOR">;
|
|
151
|
+
actor: z.ZodObject<{
|
|
152
|
+
tenantId: z.ZodString;
|
|
153
|
+
userId: z.ZodString;
|
|
154
|
+
agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
submittedAt: z.ZodISODateTime;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
type: z.ZodLiteral<"TENANT_SOURCE">;
|
|
159
|
+
sourceId: z.ZodString;
|
|
160
|
+
sourceRef: z.ZodString;
|
|
161
|
+
sourceRevisionRef: z.ZodString;
|
|
162
|
+
collector: z.ZodObject<{
|
|
163
|
+
collectorId: z.ZodString;
|
|
164
|
+
version: z.ZodString;
|
|
165
|
+
}, z.core.$strict>;
|
|
166
|
+
runtimeNodeId: z.ZodString;
|
|
167
|
+
observedAt: z.ZodISODateTime;
|
|
168
|
+
}, z.core.$strict>], "type">, z.ZodObject<{
|
|
169
|
+
type: z.ZodLiteral<"LEGACY_PROJECT">;
|
|
170
|
+
projectKey: z.ZodString;
|
|
171
|
+
projectRef: z.ZodString;
|
|
172
|
+
}, z.core.$strict>]>;
|
|
173
|
+
identityHash: z.ZodString;
|
|
174
|
+
identityKind: z.ZodEnum<{
|
|
175
|
+
CAS_BYTES: "CAS_BYTES";
|
|
176
|
+
REFERENCE_RECORD_DIGEST: "REFERENCE_RECORD_DIGEST";
|
|
177
|
+
}>;
|
|
178
|
+
kind: z.ZodString;
|
|
179
|
+
classification: z.ZodEnum<{
|
|
180
|
+
PUBLIC: "PUBLIC";
|
|
181
|
+
PUBLIC_METADATA: "PUBLIC_METADATA";
|
|
182
|
+
TENANT: "TENANT";
|
|
183
|
+
INTERNAL: "INTERNAL";
|
|
184
|
+
FDE_INTERNAL: "FDE_INTERNAL";
|
|
185
|
+
ACCESS_CONTROLLED: "ACCESS_CONTROLLED";
|
|
186
|
+
UNKNOWN: "UNKNOWN";
|
|
187
|
+
}>;
|
|
188
|
+
mediaType: z.ZodString;
|
|
189
|
+
title: z.ZodString;
|
|
190
|
+
summary: z.ZodString;
|
|
191
|
+
decision: z.ZodObject<{
|
|
192
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
193
|
+
action: z.ZodEnum<{
|
|
194
|
+
ALLOW: "ALLOW";
|
|
195
|
+
DENY: "DENY";
|
|
196
|
+
}>;
|
|
197
|
+
reasonCodes: z.ZodArray<z.ZodEnum<{
|
|
198
|
+
UNAVAILABLE: "UNAVAILABLE";
|
|
199
|
+
NOT_FOUND: "NOT_FOUND";
|
|
200
|
+
CONTENT_ACCESS_DENIED: "CONTENT_ACCESS_DENIED";
|
|
201
|
+
INTEGRITY_MISMATCH: "INTEGRITY_MISMATCH";
|
|
202
|
+
UNSUPPORTED_RESOURCE: "UNSUPPORTED_RESOURCE";
|
|
203
|
+
}>>;
|
|
204
|
+
assessedAt: z.ZodISODateTime;
|
|
205
|
+
}, z.core.$strict>;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
citation: z.ZodObject<{
|
|
208
|
+
ref: z.ZodString;
|
|
209
|
+
contentHash: z.ZodString;
|
|
210
|
+
jsonPointer: z.ZodNullable<z.ZodString>;
|
|
211
|
+
startUtf16: z.ZodNumber;
|
|
212
|
+
endUtf16: z.ZodNumber;
|
|
213
|
+
quote: z.ZodString;
|
|
214
|
+
}, z.core.$strict>;
|
|
215
|
+
}, z.core.$strict>>;
|
|
216
|
+
nextAfter: z.ZodNullable<z.ZodString>;
|
|
217
|
+
coverage: z.ZodLiteral<"INDEXED_NATIVE_TEXT_PASSAGES_ONLY">;
|
|
218
|
+
completeness: z.ZodLiteral<"NOT_ASSESSED">;
|
|
219
|
+
semantics: z.ZodLiteral<"RAW_MATERIAL_NOT_GOVERNANCE_APPROVAL">;
|
|
220
|
+
}, z.core.$strict> | z.ZodObject<{
|
|
221
|
+
citation: z.ZodObject<{
|
|
222
|
+
ref: z.ZodString;
|
|
223
|
+
contentHash: z.ZodString;
|
|
224
|
+
jsonPointer: z.ZodNullable<z.ZodString>;
|
|
225
|
+
startUtf16: z.ZodNumber;
|
|
226
|
+
endUtf16: z.ZodNumber;
|
|
227
|
+
quote: z.ZodString;
|
|
228
|
+
}, z.core.$strict>;
|
|
229
|
+
verified: z.ZodLiteral<true>;
|
|
230
|
+
}, z.core.$strict>;
|
|
231
|
+
}, z.core.$strict>;
|