@aionis/manifest 0.1.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +178 -0
  3. package/README.md +170 -0
  4. package/dist/ast/types.d.ts +34 -0
  5. package/dist/ast/types.js +1 -0
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.js +122 -0
  8. package/dist/compile.d.ts +14 -0
  9. package/dist/compile.js +219 -0
  10. package/dist/contracts.d.ts +12610 -0
  11. package/dist/contracts.js +401 -0
  12. package/dist/diagnostics/types.d.ts +17 -0
  13. package/dist/diagnostics/types.js +1 -0
  14. package/dist/execute/localRuntime.d.ts +5 -0
  15. package/dist/execute/localRuntime.js +165 -0
  16. package/dist/execute/moduleRuntime.d.ts +25 -0
  17. package/dist/execute/moduleRuntime.js +352 -0
  18. package/dist/execute/types.d.ts +113 -0
  19. package/dist/execute/types.js +1 -0
  20. package/dist/execute-cli.d.ts +2 -0
  21. package/dist/execute-cli.js +112 -0
  22. package/dist/execute.d.ts +6 -0
  23. package/dist/execute.js +46 -0
  24. package/dist/graph/buildExecutionGraph.d.ts +8 -0
  25. package/dist/graph/buildExecutionGraph.js +69 -0
  26. package/dist/graph/types.d.ts +24 -0
  27. package/dist/graph/types.js +1 -0
  28. package/dist/handoff-store-cli.d.ts +2 -0
  29. package/dist/handoff-store-cli.js +139 -0
  30. package/dist/handoff-store.d.ts +103 -0
  31. package/dist/handoff-store.js +78 -0
  32. package/dist/index.d.ts +22 -0
  33. package/dist/index.js +21 -0
  34. package/dist/ir/types.d.ts +92 -0
  35. package/dist/ir/types.js +1 -0
  36. package/dist/parser/parseAst.d.ts +3 -0
  37. package/dist/parser/parseAst.js +207 -0
  38. package/dist/parser/payload.d.ts +6 -0
  39. package/dist/parser/payload.js +211 -0
  40. package/dist/plan/buildExecutionPlan.d.ts +9 -0
  41. package/dist/plan/buildExecutionPlan.js +98 -0
  42. package/dist/plan/types.d.ts +44 -0
  43. package/dist/plan/types.js +1 -0
  44. package/dist/publish-cli.d.ts +2 -0
  45. package/dist/publish-cli.js +249 -0
  46. package/dist/publish.d.ts +148 -0
  47. package/dist/publish.js +190 -0
  48. package/dist/recover-cli.d.ts +2 -0
  49. package/dist/recover-cli.js +258 -0
  50. package/dist/recover.d.ts +489 -0
  51. package/dist/recover.js +290 -0
  52. package/dist/refs/resolveRefs.d.ts +13 -0
  53. package/dist/refs/resolveRefs.js +104 -0
  54. package/dist/registry/loadModuleRegistry.d.ts +28 -0
  55. package/dist/registry/loadModuleRegistry.js +97 -0
  56. package/dist/registry/types.d.ts +20 -0
  57. package/dist/registry/types.js +2 -0
  58. package/dist/resume-cli.d.ts +2 -0
  59. package/dist/resume-cli.js +379 -0
  60. package/dist/resume.d.ts +2076 -0
  61. package/dist/resume.js +452 -0
  62. package/dist/run-cli.d.ts +2 -0
  63. package/dist/run-cli.js +119 -0
  64. package/dist/run.d.ts +9 -0
  65. package/dist/run.js +43 -0
  66. package/dist/runtime-handoff-cli.d.ts +2 -0
  67. package/dist/runtime-handoff-cli.js +179 -0
  68. package/dist/runtime-handoff.d.ts +914 -0
  69. package/dist/runtime-handoff.js +383 -0
  70. package/dist/scanner/scanSource.d.ts +9 -0
  71. package/dist/scanner/scanSource.js +43 -0
  72. package/dist/schema/validateIrSchemas.d.ts +3 -0
  73. package/dist/schema/validateIrSchemas.js +64 -0
  74. package/dist/validate-module-cli.d.ts +2 -0
  75. package/dist/validate-module-cli.js +93 -0
  76. package/dist/validate-registry-cli.d.ts +2 -0
  77. package/dist/validate-registry-cli.js +82 -0
  78. package/dist/validate.d.ts +52 -0
  79. package/dist/validate.js +91 -0
  80. package/fixtures/duplicate-doc.aionis.md +19 -0
  81. package/fixtures/fenced-example.aionis.md +27 -0
  82. package/fixtures/malformed-payload.aionis.md +9 -0
  83. package/fixtures/npm-installed-module-registry.json +17 -0
  84. package/fixtures/standalone-module-registry.json +13 -0
  85. package/fixtures/standalone-runner-plan.json +51 -0
  86. package/fixtures/standalone-runner.aionis.md +29 -0
  87. package/fixtures/unresolved-ref.aionis.md +14 -0
  88. package/fixtures/valid-minimal.aionis.md +24 -0
  89. package/fixtures/valid-workflow.aionis.md +29 -0
  90. package/official-modules/copy-summary/CHANGELOG.md +6 -0
  91. package/official-modules/copy-summary/README.md +43 -0
  92. package/official-modules/copy-summary/index.mjs +41 -0
  93. package/official-modules/copy-summary/package.json +31 -0
  94. package/official-modules/json-transform/CHANGELOG.md +6 -0
  95. package/official-modules/json-transform/README.md +51 -0
  96. package/official-modules/json-transform/index.mjs +53 -0
  97. package/official-modules/json-transform/package.json +31 -0
  98. package/official-modules/research-claims/CHANGELOG.md +6 -0
  99. package/official-modules/research-claims/README.md +47 -0
  100. package/official-modules/research-claims/index.mjs +44 -0
  101. package/official-modules/research-claims/package.json +31 -0
  102. package/package.json +74 -0
@@ -0,0 +1,2076 @@
1
+ import { z } from "zod";
2
+ import { type AionisManifestRecoverResult } from "./recover.js";
3
+ export declare const AIONIS_MANIFEST_RESUME_RESULT_VERSION: "aionis_manifest_resume_result_v2";
4
+ export declare const AIONIS_MANIFEST_RESUME_PRODUCT_PATHS: {
5
+ readonly guide: "/v1/guide";
6
+ readonly feedback: "/v1/feedback";
7
+ };
8
+ export declare const ResumeInputKindSchema: z.ZodEnum<["source", "runtime-handoff", "handoff-store-request", "publish-result", "recover-result"]>;
9
+ export type ResumeInputKind = z.infer<typeof ResumeInputKindSchema>;
10
+ export declare const ProductToolSelectionReceiptSchema: z.ZodObject<{
11
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
12
+ decision_id: z.ZodString;
13
+ decision_uri: z.ZodString;
14
+ run_id: z.ZodString;
15
+ selected_tool: z.ZodNullable<z.ZodString>;
16
+ candidates: z.ZodArray<z.ZodString, "many">;
17
+ policy_sha256: z.ZodString;
18
+ context_sha256: z.ZodOptional<z.ZodString>;
19
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
20
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
21
+ created_at: z.ZodString;
22
+ }, "strict", z.ZodTypeAny, {
23
+ run_id: string;
24
+ contract_version: "aionis_tool_selection_receipt_v1";
25
+ decision_id: string;
26
+ decision_uri: string;
27
+ selected_tool: string | null;
28
+ candidates: string[];
29
+ policy_sha256: string;
30
+ source_rule_ids: string[];
31
+ created_at: string;
32
+ context_sha256?: string | undefined;
33
+ rule_evaluation_sha256?: string | undefined;
34
+ }, {
35
+ run_id: string;
36
+ contract_version: "aionis_tool_selection_receipt_v1";
37
+ decision_id: string;
38
+ decision_uri: string;
39
+ selected_tool: string | null;
40
+ candidates: string[];
41
+ policy_sha256: string;
42
+ source_rule_ids: string[];
43
+ created_at: string;
44
+ context_sha256?: string | undefined;
45
+ rule_evaluation_sha256?: string | undefined;
46
+ }>;
47
+ export type ProductToolSelectionReceipt = z.infer<typeof ProductToolSelectionReceiptSchema>;
48
+ export declare const ProductGuideResumeRequestSchema: z.ZodObject<{
49
+ tenant_id: z.ZodOptional<z.ZodString>;
50
+ scope: z.ZodOptional<z.ZodString>;
51
+ query_text: z.ZodString;
52
+ mode: z.ZodDefault<z.ZodLiteral<"full_power">>;
53
+ run_id: z.ZodString;
54
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
55
+ execution_state_v1: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
56
+ execution_packet_v1: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
57
+ tool_candidates: z.ZodArray<z.ZodString, "many">;
58
+ tool_strict: z.ZodDefault<z.ZodBoolean>;
59
+ include_shadow: z.ZodDefault<z.ZodBoolean>;
60
+ rules_limit: z.ZodDefault<z.ZodNumber>;
61
+ include_packets: z.ZodDefault<z.ZodLiteral<true>>;
62
+ }, "strict", z.ZodTypeAny, {
63
+ mode: "full_power";
64
+ context: Record<string, unknown>;
65
+ run_id: string;
66
+ query_text: string;
67
+ tool_candidates: string[];
68
+ tool_strict: boolean;
69
+ include_shadow: boolean;
70
+ rules_limit: number;
71
+ include_packets: true;
72
+ scope?: string | undefined;
73
+ execution_state_v1?: Record<string, unknown> | undefined;
74
+ execution_packet_v1?: Record<string, unknown> | undefined;
75
+ tenant_id?: string | undefined;
76
+ }, {
77
+ context: Record<string, unknown>;
78
+ run_id: string;
79
+ query_text: string;
80
+ tool_candidates: string[];
81
+ mode?: "full_power" | undefined;
82
+ scope?: string | undefined;
83
+ execution_state_v1?: Record<string, unknown> | undefined;
84
+ execution_packet_v1?: Record<string, unknown> | undefined;
85
+ tenant_id?: string | undefined;
86
+ tool_strict?: boolean | undefined;
87
+ include_shadow?: boolean | undefined;
88
+ rules_limit?: number | undefined;
89
+ include_packets?: true | undefined;
90
+ }>;
91
+ export type ProductGuideResumeRequest = z.infer<typeof ProductGuideResumeRequestSchema>;
92
+ export declare const ProductGuideResumePayloadSchema: z.ZodObject<{
93
+ contract_version: z.ZodLiteral<"aionis_guide_result_v1">;
94
+ tenant_id: z.ZodString;
95
+ scope: z.ZodString;
96
+ consumer_agent_id: z.ZodOptional<z.ZodString>;
97
+ guide_trace_id: z.ZodString;
98
+ agent_context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
99
+ tool_selection: z.ZodOptional<z.ZodObject<{
100
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
101
+ decision_id: z.ZodString;
102
+ decision_uri: z.ZodString;
103
+ run_id: z.ZodString;
104
+ selected_tool: z.ZodNullable<z.ZodString>;
105
+ candidates: z.ZodArray<z.ZodString, "many">;
106
+ policy_sha256: z.ZodString;
107
+ context_sha256: z.ZodOptional<z.ZodString>;
108
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
109
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
110
+ created_at: z.ZodString;
111
+ }, "strict", z.ZodTypeAny, {
112
+ run_id: string;
113
+ contract_version: "aionis_tool_selection_receipt_v1";
114
+ decision_id: string;
115
+ decision_uri: string;
116
+ selected_tool: string | null;
117
+ candidates: string[];
118
+ policy_sha256: string;
119
+ source_rule_ids: string[];
120
+ created_at: string;
121
+ context_sha256?: string | undefined;
122
+ rule_evaluation_sha256?: string | undefined;
123
+ }, {
124
+ run_id: string;
125
+ contract_version: "aionis_tool_selection_receipt_v1";
126
+ decision_id: string;
127
+ decision_uri: string;
128
+ selected_tool: string | null;
129
+ candidates: string[];
130
+ policy_sha256: string;
131
+ source_rule_ids: string[];
132
+ created_at: string;
133
+ context_sha256?: string | undefined;
134
+ rule_evaluation_sha256?: string | undefined;
135
+ }>>;
136
+ memory_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
137
+ guide_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
138
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
139
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
140
+ contract_version: z.ZodLiteral<"aionis_guide_result_v1">;
141
+ tenant_id: z.ZodString;
142
+ scope: z.ZodString;
143
+ consumer_agent_id: z.ZodOptional<z.ZodString>;
144
+ guide_trace_id: z.ZodString;
145
+ agent_context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
146
+ tool_selection: z.ZodOptional<z.ZodObject<{
147
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
148
+ decision_id: z.ZodString;
149
+ decision_uri: z.ZodString;
150
+ run_id: z.ZodString;
151
+ selected_tool: z.ZodNullable<z.ZodString>;
152
+ candidates: z.ZodArray<z.ZodString, "many">;
153
+ policy_sha256: z.ZodString;
154
+ context_sha256: z.ZodOptional<z.ZodString>;
155
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
156
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
157
+ created_at: z.ZodString;
158
+ }, "strict", z.ZodTypeAny, {
159
+ run_id: string;
160
+ contract_version: "aionis_tool_selection_receipt_v1";
161
+ decision_id: string;
162
+ decision_uri: string;
163
+ selected_tool: string | null;
164
+ candidates: string[];
165
+ policy_sha256: string;
166
+ source_rule_ids: string[];
167
+ created_at: string;
168
+ context_sha256?: string | undefined;
169
+ rule_evaluation_sha256?: string | undefined;
170
+ }, {
171
+ run_id: string;
172
+ contract_version: "aionis_tool_selection_receipt_v1";
173
+ decision_id: string;
174
+ decision_uri: string;
175
+ selected_tool: string | null;
176
+ candidates: string[];
177
+ policy_sha256: string;
178
+ source_rule_ids: string[];
179
+ created_at: string;
180
+ context_sha256?: string | undefined;
181
+ rule_evaluation_sha256?: string | undefined;
182
+ }>>;
183
+ memory_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
184
+ guide_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
185
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
186
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
187
+ contract_version: z.ZodLiteral<"aionis_guide_result_v1">;
188
+ tenant_id: z.ZodString;
189
+ scope: z.ZodString;
190
+ consumer_agent_id: z.ZodOptional<z.ZodString>;
191
+ guide_trace_id: z.ZodString;
192
+ agent_context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
193
+ tool_selection: z.ZodOptional<z.ZodObject<{
194
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
195
+ decision_id: z.ZodString;
196
+ decision_uri: z.ZodString;
197
+ run_id: z.ZodString;
198
+ selected_tool: z.ZodNullable<z.ZodString>;
199
+ candidates: z.ZodArray<z.ZodString, "many">;
200
+ policy_sha256: z.ZodString;
201
+ context_sha256: z.ZodOptional<z.ZodString>;
202
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
203
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
204
+ created_at: z.ZodString;
205
+ }, "strict", z.ZodTypeAny, {
206
+ run_id: string;
207
+ contract_version: "aionis_tool_selection_receipt_v1";
208
+ decision_id: string;
209
+ decision_uri: string;
210
+ selected_tool: string | null;
211
+ candidates: string[];
212
+ policy_sha256: string;
213
+ source_rule_ids: string[];
214
+ created_at: string;
215
+ context_sha256?: string | undefined;
216
+ rule_evaluation_sha256?: string | undefined;
217
+ }, {
218
+ run_id: string;
219
+ contract_version: "aionis_tool_selection_receipt_v1";
220
+ decision_id: string;
221
+ decision_uri: string;
222
+ selected_tool: string | null;
223
+ candidates: string[];
224
+ policy_sha256: string;
225
+ source_rule_ids: string[];
226
+ created_at: string;
227
+ context_sha256?: string | undefined;
228
+ rule_evaluation_sha256?: string | undefined;
229
+ }>>;
230
+ memory_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
231
+ guide_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
232
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
233
+ }, z.ZodTypeAny, "passthrough">>;
234
+ export type ProductGuideResumePayload = z.infer<typeof ProductGuideResumePayloadSchema>;
235
+ export declare const ProductToolFeedbackResumeRequestSchema: z.ZodObject<{
236
+ feedback_kind: z.ZodLiteral<"tool_selection">;
237
+ tenant_id: z.ZodString;
238
+ scope: z.ZodString;
239
+ actor: z.ZodOptional<z.ZodString>;
240
+ guide_trace_id: z.ZodString;
241
+ decision_id: z.ZodString;
242
+ run_id: z.ZodString;
243
+ selected_tool: z.ZodString;
244
+ candidates: z.ZodArray<z.ZodString, "many">;
245
+ outcome: z.ZodEnum<["positive", "negative", "neutral"]>;
246
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
247
+ include_shadow: z.ZodDefault<z.ZodBoolean>;
248
+ rules_limit: z.ZodDefault<z.ZodNumber>;
249
+ target: z.ZodDefault<z.ZodEnum<["tool", "all"]>>;
250
+ note: z.ZodOptional<z.ZodString>;
251
+ input_text: z.ZodString;
252
+ }, "strict", z.ZodTypeAny, {
253
+ context: Record<string, unknown>;
254
+ run_id: string;
255
+ scope: string;
256
+ tenant_id: string;
257
+ decision_id: string;
258
+ selected_tool: string;
259
+ candidates: string[];
260
+ include_shadow: boolean;
261
+ rules_limit: number;
262
+ guide_trace_id: string;
263
+ feedback_kind: "tool_selection";
264
+ outcome: "positive" | "negative" | "neutral";
265
+ target: "tool" | "all";
266
+ input_text: string;
267
+ actor?: string | undefined;
268
+ note?: string | undefined;
269
+ }, {
270
+ context: Record<string, unknown>;
271
+ run_id: string;
272
+ scope: string;
273
+ tenant_id: string;
274
+ decision_id: string;
275
+ selected_tool: string;
276
+ candidates: string[];
277
+ guide_trace_id: string;
278
+ feedback_kind: "tool_selection";
279
+ outcome: "positive" | "negative" | "neutral";
280
+ input_text: string;
281
+ actor?: string | undefined;
282
+ include_shadow?: boolean | undefined;
283
+ rules_limit?: number | undefined;
284
+ target?: "tool" | "all" | undefined;
285
+ note?: string | undefined;
286
+ }>;
287
+ export type ProductToolFeedbackResumeRequest = z.infer<typeof ProductToolFeedbackResumeRequestSchema>;
288
+ export declare const ProductToolFeedbackResumePayloadSchema: z.ZodObject<{
289
+ contract_version: z.ZodLiteral<"aionis_feedback_result_v1">;
290
+ tenant_id: z.ZodString;
291
+ scope: z.ZodString;
292
+ product_action: z.ZodLiteral<"feedback">;
293
+ feedback_kind: z.ZodLiteral<"tool_selection">;
294
+ tool_selection: z.ZodObject<{
295
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
296
+ decision_id: z.ZodString;
297
+ decision_uri: z.ZodString;
298
+ run_id: z.ZodString;
299
+ selected_tool: z.ZodNullable<z.ZodString>;
300
+ candidates: z.ZodArray<z.ZodString, "many">;
301
+ policy_sha256: z.ZodString;
302
+ context_sha256: z.ZodOptional<z.ZodString>;
303
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
304
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
305
+ created_at: z.ZodString;
306
+ }, "strict", z.ZodTypeAny, {
307
+ run_id: string;
308
+ contract_version: "aionis_tool_selection_receipt_v1";
309
+ decision_id: string;
310
+ decision_uri: string;
311
+ selected_tool: string | null;
312
+ candidates: string[];
313
+ policy_sha256: string;
314
+ source_rule_ids: string[];
315
+ created_at: string;
316
+ context_sha256?: string | undefined;
317
+ rule_evaluation_sha256?: string | undefined;
318
+ }, {
319
+ run_id: string;
320
+ contract_version: "aionis_tool_selection_receipt_v1";
321
+ decision_id: string;
322
+ decision_uri: string;
323
+ selected_tool: string | null;
324
+ candidates: string[];
325
+ policy_sha256: string;
326
+ source_rule_ids: string[];
327
+ created_at: string;
328
+ context_sha256?: string | undefined;
329
+ rule_evaluation_sha256?: string | undefined;
330
+ }>;
331
+ feedback_result: z.ZodObject<{
332
+ updated_rules: z.ZodNumber;
333
+ decision_id: z.ZodString;
334
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
335
+ updated_rules: z.ZodNumber;
336
+ decision_id: z.ZodString;
337
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
338
+ updated_rules: z.ZodNumber;
339
+ decision_id: z.ZodString;
340
+ }, z.ZodTypeAny, "passthrough">>;
341
+ run_lifecycle: z.ZodObject<{
342
+ run_id: z.ZodString;
343
+ lifecycle: z.ZodObject<{
344
+ status: z.ZodString;
345
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
346
+ status: z.ZodString;
347
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
348
+ status: z.ZodString;
349
+ }, z.ZodTypeAny, "passthrough">>;
350
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
351
+ run_id: z.ZodString;
352
+ lifecycle: z.ZodObject<{
353
+ status: z.ZodString;
354
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
355
+ status: z.ZodString;
356
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
357
+ status: z.ZodString;
358
+ }, z.ZodTypeAny, "passthrough">>;
359
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
360
+ run_id: z.ZodString;
361
+ lifecycle: z.ZodObject<{
362
+ status: z.ZodString;
363
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
364
+ status: z.ZodString;
365
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
366
+ status: z.ZodString;
367
+ }, z.ZodTypeAny, "passthrough">>;
368
+ }, z.ZodTypeAny, "passthrough">>;
369
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
370
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
371
+ contract_version: z.ZodLiteral<"aionis_feedback_result_v1">;
372
+ tenant_id: z.ZodString;
373
+ scope: z.ZodString;
374
+ product_action: z.ZodLiteral<"feedback">;
375
+ feedback_kind: z.ZodLiteral<"tool_selection">;
376
+ tool_selection: z.ZodObject<{
377
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
378
+ decision_id: z.ZodString;
379
+ decision_uri: z.ZodString;
380
+ run_id: z.ZodString;
381
+ selected_tool: z.ZodNullable<z.ZodString>;
382
+ candidates: z.ZodArray<z.ZodString, "many">;
383
+ policy_sha256: z.ZodString;
384
+ context_sha256: z.ZodOptional<z.ZodString>;
385
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
386
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
387
+ created_at: z.ZodString;
388
+ }, "strict", z.ZodTypeAny, {
389
+ run_id: string;
390
+ contract_version: "aionis_tool_selection_receipt_v1";
391
+ decision_id: string;
392
+ decision_uri: string;
393
+ selected_tool: string | null;
394
+ candidates: string[];
395
+ policy_sha256: string;
396
+ source_rule_ids: string[];
397
+ created_at: string;
398
+ context_sha256?: string | undefined;
399
+ rule_evaluation_sha256?: string | undefined;
400
+ }, {
401
+ run_id: string;
402
+ contract_version: "aionis_tool_selection_receipt_v1";
403
+ decision_id: string;
404
+ decision_uri: string;
405
+ selected_tool: string | null;
406
+ candidates: string[];
407
+ policy_sha256: string;
408
+ source_rule_ids: string[];
409
+ created_at: string;
410
+ context_sha256?: string | undefined;
411
+ rule_evaluation_sha256?: string | undefined;
412
+ }>;
413
+ feedback_result: z.ZodObject<{
414
+ updated_rules: z.ZodNumber;
415
+ decision_id: z.ZodString;
416
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
417
+ updated_rules: z.ZodNumber;
418
+ decision_id: z.ZodString;
419
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
420
+ updated_rules: z.ZodNumber;
421
+ decision_id: z.ZodString;
422
+ }, z.ZodTypeAny, "passthrough">>;
423
+ run_lifecycle: z.ZodObject<{
424
+ run_id: z.ZodString;
425
+ lifecycle: z.ZodObject<{
426
+ status: z.ZodString;
427
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
428
+ status: z.ZodString;
429
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
430
+ status: z.ZodString;
431
+ }, z.ZodTypeAny, "passthrough">>;
432
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
433
+ run_id: z.ZodString;
434
+ lifecycle: z.ZodObject<{
435
+ status: z.ZodString;
436
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
437
+ status: z.ZodString;
438
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
439
+ status: z.ZodString;
440
+ }, z.ZodTypeAny, "passthrough">>;
441
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
442
+ run_id: z.ZodString;
443
+ lifecycle: z.ZodObject<{
444
+ status: z.ZodString;
445
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
446
+ status: z.ZodString;
447
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
448
+ status: z.ZodString;
449
+ }, z.ZodTypeAny, "passthrough">>;
450
+ }, z.ZodTypeAny, "passthrough">>;
451
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
452
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
453
+ contract_version: z.ZodLiteral<"aionis_feedback_result_v1">;
454
+ tenant_id: z.ZodString;
455
+ scope: z.ZodString;
456
+ product_action: z.ZodLiteral<"feedback">;
457
+ feedback_kind: z.ZodLiteral<"tool_selection">;
458
+ tool_selection: z.ZodObject<{
459
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
460
+ decision_id: z.ZodString;
461
+ decision_uri: z.ZodString;
462
+ run_id: z.ZodString;
463
+ selected_tool: z.ZodNullable<z.ZodString>;
464
+ candidates: z.ZodArray<z.ZodString, "many">;
465
+ policy_sha256: z.ZodString;
466
+ context_sha256: z.ZodOptional<z.ZodString>;
467
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
468
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
469
+ created_at: z.ZodString;
470
+ }, "strict", z.ZodTypeAny, {
471
+ run_id: string;
472
+ contract_version: "aionis_tool_selection_receipt_v1";
473
+ decision_id: string;
474
+ decision_uri: string;
475
+ selected_tool: string | null;
476
+ candidates: string[];
477
+ policy_sha256: string;
478
+ source_rule_ids: string[];
479
+ created_at: string;
480
+ context_sha256?: string | undefined;
481
+ rule_evaluation_sha256?: string | undefined;
482
+ }, {
483
+ run_id: string;
484
+ contract_version: "aionis_tool_selection_receipt_v1";
485
+ decision_id: string;
486
+ decision_uri: string;
487
+ selected_tool: string | null;
488
+ candidates: string[];
489
+ policy_sha256: string;
490
+ source_rule_ids: string[];
491
+ created_at: string;
492
+ context_sha256?: string | undefined;
493
+ rule_evaluation_sha256?: string | undefined;
494
+ }>;
495
+ feedback_result: z.ZodObject<{
496
+ updated_rules: z.ZodNumber;
497
+ decision_id: z.ZodString;
498
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
499
+ updated_rules: z.ZodNumber;
500
+ decision_id: z.ZodString;
501
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
502
+ updated_rules: z.ZodNumber;
503
+ decision_id: z.ZodString;
504
+ }, z.ZodTypeAny, "passthrough">>;
505
+ run_lifecycle: z.ZodObject<{
506
+ run_id: z.ZodString;
507
+ lifecycle: z.ZodObject<{
508
+ status: z.ZodString;
509
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
510
+ status: z.ZodString;
511
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
512
+ status: z.ZodString;
513
+ }, z.ZodTypeAny, "passthrough">>;
514
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
515
+ run_id: z.ZodString;
516
+ lifecycle: z.ZodObject<{
517
+ status: z.ZodString;
518
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
519
+ status: z.ZodString;
520
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
521
+ status: z.ZodString;
522
+ }, z.ZodTypeAny, "passthrough">>;
523
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
524
+ run_id: z.ZodString;
525
+ lifecycle: z.ZodObject<{
526
+ status: z.ZodString;
527
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
528
+ status: z.ZodString;
529
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
530
+ status: z.ZodString;
531
+ }, z.ZodTypeAny, "passthrough">>;
532
+ }, z.ZodTypeAny, "passthrough">>;
533
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
534
+ }, z.ZodTypeAny, "passthrough">>;
535
+ export type ProductToolFeedbackResumePayload = z.infer<typeof ProductToolFeedbackResumePayloadSchema>;
536
+ export declare const ResumeSummarySchema: z.ZodObject<{
537
+ selected_tool: z.ZodNullable<z.ZodString>;
538
+ decision_id: z.ZodNullable<z.ZodString>;
539
+ run_id: z.ZodString;
540
+ resume_state: z.ZodEnum<["inspection_only", "feedback_applied", "lifecycle_advanced"]>;
541
+ feedback_written: z.ZodBoolean;
542
+ feedback_outcome: z.ZodNullable<z.ZodEnum<["positive", "negative", "neutral"]>>;
543
+ pre_feedback_run_status: z.ZodNullable<z.ZodString>;
544
+ post_feedback_run_status: z.ZodNullable<z.ZodString>;
545
+ lifecycle_transition: z.ZodNullable<z.ZodString>;
546
+ lifecycle_advanced: z.ZodBoolean;
547
+ feedback_updated_rules: z.ZodNullable<z.ZodNumber>;
548
+ }, "strip", z.ZodTypeAny, {
549
+ run_id: string;
550
+ decision_id: string | null;
551
+ selected_tool: string | null;
552
+ resume_state: "inspection_only" | "feedback_applied" | "lifecycle_advanced";
553
+ lifecycle_advanced: boolean;
554
+ feedback_written: boolean;
555
+ feedback_outcome: "positive" | "negative" | "neutral" | null;
556
+ pre_feedback_run_status: string | null;
557
+ post_feedback_run_status: string | null;
558
+ lifecycle_transition: string | null;
559
+ feedback_updated_rules: number | null;
560
+ }, {
561
+ run_id: string;
562
+ decision_id: string | null;
563
+ selected_tool: string | null;
564
+ resume_state: "inspection_only" | "feedback_applied" | "lifecycle_advanced";
565
+ lifecycle_advanced: boolean;
566
+ feedback_written: boolean;
567
+ feedback_outcome: "positive" | "negative" | "neutral" | null;
568
+ pre_feedback_run_status: string | null;
569
+ post_feedback_run_status: string | null;
570
+ lifecycle_transition: string | null;
571
+ feedback_updated_rules: number | null;
572
+ }>;
573
+ export type ResumeSummary = z.infer<typeof ResumeSummarySchema>;
574
+ export declare const ResumeResultSchema: z.ZodObject<{
575
+ resume_result_version: z.ZodLiteral<"aionis_manifest_resume_result_v2">;
576
+ resumed_at: z.ZodString;
577
+ base_url: z.ZodString;
578
+ input_kind: z.ZodEnum<["source", "runtime-handoff", "handoff-store-request", "publish-result", "recover-result"]>;
579
+ source_doc_id: z.ZodNullable<z.ZodString>;
580
+ source_doc_version: z.ZodNullable<z.ZodString>;
581
+ run_id: z.ZodString;
582
+ resume_summary: z.ZodObject<{
583
+ selected_tool: z.ZodNullable<z.ZodString>;
584
+ decision_id: z.ZodNullable<z.ZodString>;
585
+ run_id: z.ZodString;
586
+ resume_state: z.ZodEnum<["inspection_only", "feedback_applied", "lifecycle_advanced"]>;
587
+ feedback_written: z.ZodBoolean;
588
+ feedback_outcome: z.ZodNullable<z.ZodEnum<["positive", "negative", "neutral"]>>;
589
+ pre_feedback_run_status: z.ZodNullable<z.ZodString>;
590
+ post_feedback_run_status: z.ZodNullable<z.ZodString>;
591
+ lifecycle_transition: z.ZodNullable<z.ZodString>;
592
+ lifecycle_advanced: z.ZodBoolean;
593
+ feedback_updated_rules: z.ZodNullable<z.ZodNumber>;
594
+ }, "strip", z.ZodTypeAny, {
595
+ run_id: string;
596
+ decision_id: string | null;
597
+ selected_tool: string | null;
598
+ resume_state: "inspection_only" | "feedback_applied" | "lifecycle_advanced";
599
+ lifecycle_advanced: boolean;
600
+ feedback_written: boolean;
601
+ feedback_outcome: "positive" | "negative" | "neutral" | null;
602
+ pre_feedback_run_status: string | null;
603
+ post_feedback_run_status: string | null;
604
+ lifecycle_transition: string | null;
605
+ feedback_updated_rules: number | null;
606
+ }, {
607
+ run_id: string;
608
+ decision_id: string | null;
609
+ selected_tool: string | null;
610
+ resume_state: "inspection_only" | "feedback_applied" | "lifecycle_advanced";
611
+ lifecycle_advanced: boolean;
612
+ feedback_written: boolean;
613
+ feedback_outcome: "positive" | "negative" | "neutral" | null;
614
+ pre_feedback_run_status: string | null;
615
+ post_feedback_run_status: string | null;
616
+ lifecycle_transition: string | null;
617
+ feedback_updated_rules: number | null;
618
+ }>;
619
+ recover_result: z.ZodNullable<z.ZodObject<{
620
+ recover_result_version: z.ZodLiteral<"aionis_manifest_recover_result_v1">;
621
+ recovered_at: z.ZodString;
622
+ base_url: z.ZodString;
623
+ input_kind: z.ZodEnum<["source", "runtime-handoff", "handoff-store-request", "publish-result"]>;
624
+ source_doc_id: z.ZodNullable<z.ZodString>;
625
+ source_doc_version: z.ZodNullable<z.ZodString>;
626
+ publish_result: z.ZodNullable<z.ZodObject<{
627
+ publish_result_version: z.ZodLiteral<"aionis_manifest_publish_result_v1">;
628
+ published_at: z.ZodString;
629
+ base_url: z.ZodString;
630
+ input_kind: z.ZodEnum<["source", "runtime-handoff", "handoff-store-request"]>;
631
+ source_doc_id: z.ZodNullable<z.ZodString>;
632
+ source_doc_version: z.ZodNullable<z.ZodString>;
633
+ request: z.ZodObject<{
634
+ anchor: z.ZodString;
635
+ handoff_kind: z.ZodString;
636
+ scope: z.ZodOptional<z.ZodString>;
637
+ memory_lane: z.ZodOptional<z.ZodEnum<["private", "shared"]>>;
638
+ }, "strip", z.ZodTypeAny, {
639
+ anchor: string;
640
+ handoff_kind: string;
641
+ scope?: string | undefined;
642
+ memory_lane?: "private" | "shared" | undefined;
643
+ }, {
644
+ anchor: string;
645
+ handoff_kind: string;
646
+ scope?: string | undefined;
647
+ memory_lane?: "private" | "shared" | undefined;
648
+ }>;
649
+ response: z.ZodObject<{
650
+ status: z.ZodNumber;
651
+ request_id: z.ZodNullable<z.ZodString>;
652
+ tenant_id: z.ZodOptional<z.ZodString>;
653
+ scope: z.ZodOptional<z.ZodString>;
654
+ commit_id: z.ZodString;
655
+ commit_uri: z.ZodOptional<z.ZodString>;
656
+ handoff_anchor: z.ZodNullable<z.ZodString>;
657
+ handoff_kind: z.ZodNullable<z.ZodString>;
658
+ }, "strip", z.ZodTypeAny, {
659
+ status: number;
660
+ handoff_kind: string | null;
661
+ request_id: string | null;
662
+ commit_id: string;
663
+ handoff_anchor: string | null;
664
+ scope?: string | undefined;
665
+ tenant_id?: string | undefined;
666
+ commit_uri?: string | undefined;
667
+ }, {
668
+ status: number;
669
+ handoff_kind: string | null;
670
+ request_id: string | null;
671
+ commit_id: string;
672
+ handoff_anchor: string | null;
673
+ scope?: string | undefined;
674
+ tenant_id?: string | undefined;
675
+ commit_uri?: string | undefined;
676
+ }>;
677
+ handoff_store_request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
678
+ }, "strip", z.ZodTypeAny, {
679
+ source_doc_id: string | null;
680
+ source_doc_version: string | null;
681
+ publish_result_version: "aionis_manifest_publish_result_v1";
682
+ published_at: string;
683
+ base_url: string;
684
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request";
685
+ request: {
686
+ anchor: string;
687
+ handoff_kind: string;
688
+ scope?: string | undefined;
689
+ memory_lane?: "private" | "shared" | undefined;
690
+ };
691
+ response: {
692
+ status: number;
693
+ handoff_kind: string | null;
694
+ request_id: string | null;
695
+ commit_id: string;
696
+ handoff_anchor: string | null;
697
+ scope?: string | undefined;
698
+ tenant_id?: string | undefined;
699
+ commit_uri?: string | undefined;
700
+ };
701
+ handoff_store_request: Record<string, unknown>;
702
+ }, {
703
+ source_doc_id: string | null;
704
+ source_doc_version: string | null;
705
+ publish_result_version: "aionis_manifest_publish_result_v1";
706
+ published_at: string;
707
+ base_url: string;
708
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request";
709
+ request: {
710
+ anchor: string;
711
+ handoff_kind: string;
712
+ scope?: string | undefined;
713
+ memory_lane?: "private" | "shared" | undefined;
714
+ };
715
+ response: {
716
+ status: number;
717
+ handoff_kind: string | null;
718
+ request_id: string | null;
719
+ commit_id: string;
720
+ handoff_anchor: string | null;
721
+ scope?: string | undefined;
722
+ tenant_id?: string | undefined;
723
+ commit_uri?: string | undefined;
724
+ };
725
+ handoff_store_request: Record<string, unknown>;
726
+ }>>;
727
+ recover_request: z.ZodObject<{
728
+ tenant_id: z.ZodOptional<z.ZodString>;
729
+ scope: z.ZodOptional<z.ZodString>;
730
+ anchor: z.ZodString;
731
+ repo_root: z.ZodOptional<z.ZodString>;
732
+ file_path: z.ZodOptional<z.ZodString>;
733
+ symbol: z.ZodOptional<z.ZodString>;
734
+ handoff_kind: z.ZodOptional<z.ZodEnum<["patch_handoff", "review_handoff", "task_handoff"]>>;
735
+ memory_lane: z.ZodOptional<z.ZodEnum<["private", "shared"]>>;
736
+ limit: z.ZodOptional<z.ZodNumber>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ anchor: string;
739
+ symbol?: string | undefined;
740
+ file_path?: string | undefined;
741
+ repo_root?: string | undefined;
742
+ scope?: string | undefined;
743
+ handoff_kind?: "task_handoff" | "patch_handoff" | "review_handoff" | undefined;
744
+ tenant_id?: string | undefined;
745
+ memory_lane?: "private" | "shared" | undefined;
746
+ limit?: number | undefined;
747
+ }, {
748
+ anchor: string;
749
+ symbol?: string | undefined;
750
+ file_path?: string | undefined;
751
+ repo_root?: string | undefined;
752
+ scope?: string | undefined;
753
+ handoff_kind?: "task_handoff" | "patch_handoff" | "review_handoff" | undefined;
754
+ tenant_id?: string | undefined;
755
+ memory_lane?: "private" | "shared" | undefined;
756
+ limit?: number | undefined;
757
+ }>;
758
+ recover_response: z.ZodObject<{
759
+ status: z.ZodNumber;
760
+ request_id: z.ZodNullable<z.ZodString>;
761
+ data: z.ZodObject<{
762
+ tenant_id: z.ZodString;
763
+ scope: z.ZodString;
764
+ handoff_kind: z.ZodString;
765
+ anchor: z.ZodString;
766
+ matched_nodes: z.ZodNumber;
767
+ handoff: z.ZodRecord<z.ZodString, z.ZodUnknown>;
768
+ prompt_safe_handoff: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
769
+ execution_ready_handoff: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
770
+ execution_result_summary: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
771
+ execution_artifacts: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
772
+ execution_evidence: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
773
+ execution_state_v1: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
774
+ execution_packet_v1: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
775
+ control_profile_v1: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
776
+ execution_transitions_v1: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
777
+ }, "strip", z.ZodTypeAny, {
778
+ anchor: string;
779
+ scope: string;
780
+ handoff_kind: string;
781
+ tenant_id: string;
782
+ handoff: Record<string, unknown>;
783
+ matched_nodes: number;
784
+ execution_result_summary?: Record<string, unknown> | null | undefined;
785
+ execution_artifacts?: Record<string, unknown>[] | undefined;
786
+ execution_evidence?: Record<string, unknown>[] | undefined;
787
+ execution_state_v1?: Record<string, unknown> | undefined;
788
+ execution_packet_v1?: Record<string, unknown> | undefined;
789
+ execution_ready_handoff?: Record<string, unknown> | undefined;
790
+ control_profile_v1?: Record<string, unknown> | undefined;
791
+ execution_transitions_v1?: Record<string, unknown>[] | undefined;
792
+ prompt_safe_handoff?: Record<string, unknown> | undefined;
793
+ }, {
794
+ anchor: string;
795
+ scope: string;
796
+ handoff_kind: string;
797
+ tenant_id: string;
798
+ handoff: Record<string, unknown>;
799
+ matched_nodes: number;
800
+ execution_result_summary?: Record<string, unknown> | null | undefined;
801
+ execution_artifacts?: Record<string, unknown>[] | undefined;
802
+ execution_evidence?: Record<string, unknown>[] | undefined;
803
+ execution_state_v1?: Record<string, unknown> | undefined;
804
+ execution_packet_v1?: Record<string, unknown> | undefined;
805
+ execution_ready_handoff?: Record<string, unknown> | undefined;
806
+ control_profile_v1?: Record<string, unknown> | undefined;
807
+ execution_transitions_v1?: Record<string, unknown>[] | undefined;
808
+ prompt_safe_handoff?: Record<string, unknown> | undefined;
809
+ }>;
810
+ }, "strip", z.ZodTypeAny, {
811
+ data: {
812
+ anchor: string;
813
+ scope: string;
814
+ handoff_kind: string;
815
+ tenant_id: string;
816
+ handoff: Record<string, unknown>;
817
+ matched_nodes: number;
818
+ execution_result_summary?: Record<string, unknown> | null | undefined;
819
+ execution_artifacts?: Record<string, unknown>[] | undefined;
820
+ execution_evidence?: Record<string, unknown>[] | undefined;
821
+ execution_state_v1?: Record<string, unknown> | undefined;
822
+ execution_packet_v1?: Record<string, unknown> | undefined;
823
+ execution_ready_handoff?: Record<string, unknown> | undefined;
824
+ control_profile_v1?: Record<string, unknown> | undefined;
825
+ execution_transitions_v1?: Record<string, unknown>[] | undefined;
826
+ prompt_safe_handoff?: Record<string, unknown> | undefined;
827
+ };
828
+ status: number;
829
+ request_id: string | null;
830
+ }, {
831
+ data: {
832
+ anchor: string;
833
+ scope: string;
834
+ handoff_kind: string;
835
+ tenant_id: string;
836
+ handoff: Record<string, unknown>;
837
+ matched_nodes: number;
838
+ execution_result_summary?: Record<string, unknown> | null | undefined;
839
+ execution_artifacts?: Record<string, unknown>[] | undefined;
840
+ execution_evidence?: Record<string, unknown>[] | undefined;
841
+ execution_state_v1?: Record<string, unknown> | undefined;
842
+ execution_packet_v1?: Record<string, unknown> | undefined;
843
+ execution_ready_handoff?: Record<string, unknown> | undefined;
844
+ control_profile_v1?: Record<string, unknown> | undefined;
845
+ execution_transitions_v1?: Record<string, unknown>[] | undefined;
846
+ prompt_safe_handoff?: Record<string, unknown> | undefined;
847
+ };
848
+ status: number;
849
+ request_id: string | null;
850
+ }>;
851
+ }, "strip", z.ZodTypeAny, {
852
+ source_doc_id: string | null;
853
+ source_doc_version: string | null;
854
+ base_url: string;
855
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request" | "publish-result";
856
+ recover_result_version: "aionis_manifest_recover_result_v1";
857
+ recovered_at: string;
858
+ publish_result: {
859
+ source_doc_id: string | null;
860
+ source_doc_version: string | null;
861
+ publish_result_version: "aionis_manifest_publish_result_v1";
862
+ published_at: string;
863
+ base_url: string;
864
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request";
865
+ request: {
866
+ anchor: string;
867
+ handoff_kind: string;
868
+ scope?: string | undefined;
869
+ memory_lane?: "private" | "shared" | undefined;
870
+ };
871
+ response: {
872
+ status: number;
873
+ handoff_kind: string | null;
874
+ request_id: string | null;
875
+ commit_id: string;
876
+ handoff_anchor: string | null;
877
+ scope?: string | undefined;
878
+ tenant_id?: string | undefined;
879
+ commit_uri?: string | undefined;
880
+ };
881
+ handoff_store_request: Record<string, unknown>;
882
+ } | null;
883
+ recover_request: {
884
+ anchor: string;
885
+ symbol?: string | undefined;
886
+ file_path?: string | undefined;
887
+ repo_root?: string | undefined;
888
+ scope?: string | undefined;
889
+ handoff_kind?: "task_handoff" | "patch_handoff" | "review_handoff" | undefined;
890
+ tenant_id?: string | undefined;
891
+ memory_lane?: "private" | "shared" | undefined;
892
+ limit?: number | undefined;
893
+ };
894
+ recover_response: {
895
+ data: {
896
+ anchor: string;
897
+ scope: string;
898
+ handoff_kind: string;
899
+ tenant_id: string;
900
+ handoff: Record<string, unknown>;
901
+ matched_nodes: number;
902
+ execution_result_summary?: Record<string, unknown> | null | undefined;
903
+ execution_artifacts?: Record<string, unknown>[] | undefined;
904
+ execution_evidence?: Record<string, unknown>[] | undefined;
905
+ execution_state_v1?: Record<string, unknown> | undefined;
906
+ execution_packet_v1?: Record<string, unknown> | undefined;
907
+ execution_ready_handoff?: Record<string, unknown> | undefined;
908
+ control_profile_v1?: Record<string, unknown> | undefined;
909
+ execution_transitions_v1?: Record<string, unknown>[] | undefined;
910
+ prompt_safe_handoff?: Record<string, unknown> | undefined;
911
+ };
912
+ status: number;
913
+ request_id: string | null;
914
+ };
915
+ }, {
916
+ source_doc_id: string | null;
917
+ source_doc_version: string | null;
918
+ base_url: string;
919
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request" | "publish-result";
920
+ recover_result_version: "aionis_manifest_recover_result_v1";
921
+ recovered_at: string;
922
+ publish_result: {
923
+ source_doc_id: string | null;
924
+ source_doc_version: string | null;
925
+ publish_result_version: "aionis_manifest_publish_result_v1";
926
+ published_at: string;
927
+ base_url: string;
928
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request";
929
+ request: {
930
+ anchor: string;
931
+ handoff_kind: string;
932
+ scope?: string | undefined;
933
+ memory_lane?: "private" | "shared" | undefined;
934
+ };
935
+ response: {
936
+ status: number;
937
+ handoff_kind: string | null;
938
+ request_id: string | null;
939
+ commit_id: string;
940
+ handoff_anchor: string | null;
941
+ scope?: string | undefined;
942
+ tenant_id?: string | undefined;
943
+ commit_uri?: string | undefined;
944
+ };
945
+ handoff_store_request: Record<string, unknown>;
946
+ } | null;
947
+ recover_request: {
948
+ anchor: string;
949
+ symbol?: string | undefined;
950
+ file_path?: string | undefined;
951
+ repo_root?: string | undefined;
952
+ scope?: string | undefined;
953
+ handoff_kind?: "task_handoff" | "patch_handoff" | "review_handoff" | undefined;
954
+ tenant_id?: string | undefined;
955
+ memory_lane?: "private" | "shared" | undefined;
956
+ limit?: number | undefined;
957
+ };
958
+ recover_response: {
959
+ data: {
960
+ anchor: string;
961
+ scope: string;
962
+ handoff_kind: string;
963
+ tenant_id: string;
964
+ handoff: Record<string, unknown>;
965
+ matched_nodes: number;
966
+ execution_result_summary?: Record<string, unknown> | null | undefined;
967
+ execution_artifacts?: Record<string, unknown>[] | undefined;
968
+ execution_evidence?: Record<string, unknown>[] | undefined;
969
+ execution_state_v1?: Record<string, unknown> | undefined;
970
+ execution_packet_v1?: Record<string, unknown> | undefined;
971
+ execution_ready_handoff?: Record<string, unknown> | undefined;
972
+ control_profile_v1?: Record<string, unknown> | undefined;
973
+ execution_transitions_v1?: Record<string, unknown>[] | undefined;
974
+ prompt_safe_handoff?: Record<string, unknown> | undefined;
975
+ };
976
+ status: number;
977
+ request_id: string | null;
978
+ };
979
+ }>>;
980
+ guide_request: z.ZodObject<{
981
+ tenant_id: z.ZodOptional<z.ZodString>;
982
+ scope: z.ZodOptional<z.ZodString>;
983
+ query_text: z.ZodString;
984
+ mode: z.ZodDefault<z.ZodLiteral<"full_power">>;
985
+ run_id: z.ZodString;
986
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
987
+ execution_state_v1: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
988
+ execution_packet_v1: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
989
+ tool_candidates: z.ZodArray<z.ZodString, "many">;
990
+ tool_strict: z.ZodDefault<z.ZodBoolean>;
991
+ include_shadow: z.ZodDefault<z.ZodBoolean>;
992
+ rules_limit: z.ZodDefault<z.ZodNumber>;
993
+ include_packets: z.ZodDefault<z.ZodLiteral<true>>;
994
+ }, "strict", z.ZodTypeAny, {
995
+ mode: "full_power";
996
+ context: Record<string, unknown>;
997
+ run_id: string;
998
+ query_text: string;
999
+ tool_candidates: string[];
1000
+ tool_strict: boolean;
1001
+ include_shadow: boolean;
1002
+ rules_limit: number;
1003
+ include_packets: true;
1004
+ scope?: string | undefined;
1005
+ execution_state_v1?: Record<string, unknown> | undefined;
1006
+ execution_packet_v1?: Record<string, unknown> | undefined;
1007
+ tenant_id?: string | undefined;
1008
+ }, {
1009
+ context: Record<string, unknown>;
1010
+ run_id: string;
1011
+ query_text: string;
1012
+ tool_candidates: string[];
1013
+ mode?: "full_power" | undefined;
1014
+ scope?: string | undefined;
1015
+ execution_state_v1?: Record<string, unknown> | undefined;
1016
+ execution_packet_v1?: Record<string, unknown> | undefined;
1017
+ tenant_id?: string | undefined;
1018
+ tool_strict?: boolean | undefined;
1019
+ include_shadow?: boolean | undefined;
1020
+ rules_limit?: number | undefined;
1021
+ include_packets?: true | undefined;
1022
+ }>;
1023
+ guide_response: z.ZodObject<{
1024
+ status: z.ZodNumber;
1025
+ request_id: z.ZodNullable<z.ZodString>;
1026
+ data: z.ZodObject<{
1027
+ contract_version: z.ZodLiteral<"aionis_guide_result_v1">;
1028
+ tenant_id: z.ZodString;
1029
+ scope: z.ZodString;
1030
+ consumer_agent_id: z.ZodOptional<z.ZodString>;
1031
+ guide_trace_id: z.ZodString;
1032
+ agent_context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1033
+ tool_selection: z.ZodOptional<z.ZodObject<{
1034
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
1035
+ decision_id: z.ZodString;
1036
+ decision_uri: z.ZodString;
1037
+ run_id: z.ZodString;
1038
+ selected_tool: z.ZodNullable<z.ZodString>;
1039
+ candidates: z.ZodArray<z.ZodString, "many">;
1040
+ policy_sha256: z.ZodString;
1041
+ context_sha256: z.ZodOptional<z.ZodString>;
1042
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
1043
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
1044
+ created_at: z.ZodString;
1045
+ }, "strict", z.ZodTypeAny, {
1046
+ run_id: string;
1047
+ contract_version: "aionis_tool_selection_receipt_v1";
1048
+ decision_id: string;
1049
+ decision_uri: string;
1050
+ selected_tool: string | null;
1051
+ candidates: string[];
1052
+ policy_sha256: string;
1053
+ source_rule_ids: string[];
1054
+ created_at: string;
1055
+ context_sha256?: string | undefined;
1056
+ rule_evaluation_sha256?: string | undefined;
1057
+ }, {
1058
+ run_id: string;
1059
+ contract_version: "aionis_tool_selection_receipt_v1";
1060
+ decision_id: string;
1061
+ decision_uri: string;
1062
+ selected_tool: string | null;
1063
+ candidates: string[];
1064
+ policy_sha256: string;
1065
+ source_rule_ids: string[];
1066
+ created_at: string;
1067
+ context_sha256?: string | undefined;
1068
+ rule_evaluation_sha256?: string | undefined;
1069
+ }>>;
1070
+ memory_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1071
+ guide_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1072
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1073
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1074
+ contract_version: z.ZodLiteral<"aionis_guide_result_v1">;
1075
+ tenant_id: z.ZodString;
1076
+ scope: z.ZodString;
1077
+ consumer_agent_id: z.ZodOptional<z.ZodString>;
1078
+ guide_trace_id: z.ZodString;
1079
+ agent_context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1080
+ tool_selection: z.ZodOptional<z.ZodObject<{
1081
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
1082
+ decision_id: z.ZodString;
1083
+ decision_uri: z.ZodString;
1084
+ run_id: z.ZodString;
1085
+ selected_tool: z.ZodNullable<z.ZodString>;
1086
+ candidates: z.ZodArray<z.ZodString, "many">;
1087
+ policy_sha256: z.ZodString;
1088
+ context_sha256: z.ZodOptional<z.ZodString>;
1089
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
1090
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
1091
+ created_at: z.ZodString;
1092
+ }, "strict", z.ZodTypeAny, {
1093
+ run_id: string;
1094
+ contract_version: "aionis_tool_selection_receipt_v1";
1095
+ decision_id: string;
1096
+ decision_uri: string;
1097
+ selected_tool: string | null;
1098
+ candidates: string[];
1099
+ policy_sha256: string;
1100
+ source_rule_ids: string[];
1101
+ created_at: string;
1102
+ context_sha256?: string | undefined;
1103
+ rule_evaluation_sha256?: string | undefined;
1104
+ }, {
1105
+ run_id: string;
1106
+ contract_version: "aionis_tool_selection_receipt_v1";
1107
+ decision_id: string;
1108
+ decision_uri: string;
1109
+ selected_tool: string | null;
1110
+ candidates: string[];
1111
+ policy_sha256: string;
1112
+ source_rule_ids: string[];
1113
+ created_at: string;
1114
+ context_sha256?: string | undefined;
1115
+ rule_evaluation_sha256?: string | undefined;
1116
+ }>>;
1117
+ memory_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1118
+ guide_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1119
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1120
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1121
+ contract_version: z.ZodLiteral<"aionis_guide_result_v1">;
1122
+ tenant_id: z.ZodString;
1123
+ scope: z.ZodString;
1124
+ consumer_agent_id: z.ZodOptional<z.ZodString>;
1125
+ guide_trace_id: z.ZodString;
1126
+ agent_context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1127
+ tool_selection: z.ZodOptional<z.ZodObject<{
1128
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
1129
+ decision_id: z.ZodString;
1130
+ decision_uri: z.ZodString;
1131
+ run_id: z.ZodString;
1132
+ selected_tool: z.ZodNullable<z.ZodString>;
1133
+ candidates: z.ZodArray<z.ZodString, "many">;
1134
+ policy_sha256: z.ZodString;
1135
+ context_sha256: z.ZodOptional<z.ZodString>;
1136
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
1137
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
1138
+ created_at: z.ZodString;
1139
+ }, "strict", z.ZodTypeAny, {
1140
+ run_id: string;
1141
+ contract_version: "aionis_tool_selection_receipt_v1";
1142
+ decision_id: string;
1143
+ decision_uri: string;
1144
+ selected_tool: string | null;
1145
+ candidates: string[];
1146
+ policy_sha256: string;
1147
+ source_rule_ids: string[];
1148
+ created_at: string;
1149
+ context_sha256?: string | undefined;
1150
+ rule_evaluation_sha256?: string | undefined;
1151
+ }, {
1152
+ run_id: string;
1153
+ contract_version: "aionis_tool_selection_receipt_v1";
1154
+ decision_id: string;
1155
+ decision_uri: string;
1156
+ selected_tool: string | null;
1157
+ candidates: string[];
1158
+ policy_sha256: string;
1159
+ source_rule_ids: string[];
1160
+ created_at: string;
1161
+ context_sha256?: string | undefined;
1162
+ rule_evaluation_sha256?: string | undefined;
1163
+ }>>;
1164
+ memory_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1165
+ guide_packet: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1166
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1167
+ }, z.ZodTypeAny, "passthrough">>;
1168
+ }, "strip", z.ZodTypeAny, {
1169
+ data: {
1170
+ scope: string;
1171
+ tenant_id: string;
1172
+ contract_version: "aionis_guide_result_v1";
1173
+ guide_trace_id: string;
1174
+ agent_context: Record<string, unknown>;
1175
+ source_map: Record<string, unknown>;
1176
+ consumer_agent_id?: string | undefined;
1177
+ tool_selection?: {
1178
+ run_id: string;
1179
+ contract_version: "aionis_tool_selection_receipt_v1";
1180
+ decision_id: string;
1181
+ decision_uri: string;
1182
+ selected_tool: string | null;
1183
+ candidates: string[];
1184
+ policy_sha256: string;
1185
+ source_rule_ids: string[];
1186
+ created_at: string;
1187
+ context_sha256?: string | undefined;
1188
+ rule_evaluation_sha256?: string | undefined;
1189
+ } | undefined;
1190
+ memory_packet?: Record<string, unknown> | null | undefined;
1191
+ guide_packet?: Record<string, unknown> | null | undefined;
1192
+ } & {
1193
+ [k: string]: unknown;
1194
+ };
1195
+ status: number;
1196
+ request_id: string | null;
1197
+ }, {
1198
+ data: {
1199
+ scope: string;
1200
+ tenant_id: string;
1201
+ contract_version: "aionis_guide_result_v1";
1202
+ guide_trace_id: string;
1203
+ agent_context: Record<string, unknown>;
1204
+ source_map: Record<string, unknown>;
1205
+ consumer_agent_id?: string | undefined;
1206
+ tool_selection?: {
1207
+ run_id: string;
1208
+ contract_version: "aionis_tool_selection_receipt_v1";
1209
+ decision_id: string;
1210
+ decision_uri: string;
1211
+ selected_tool: string | null;
1212
+ candidates: string[];
1213
+ policy_sha256: string;
1214
+ source_rule_ids: string[];
1215
+ created_at: string;
1216
+ context_sha256?: string | undefined;
1217
+ rule_evaluation_sha256?: string | undefined;
1218
+ } | undefined;
1219
+ memory_packet?: Record<string, unknown> | null | undefined;
1220
+ guide_packet?: Record<string, unknown> | null | undefined;
1221
+ } & {
1222
+ [k: string]: unknown;
1223
+ };
1224
+ status: number;
1225
+ request_id: string | null;
1226
+ }>;
1227
+ tool_feedback_request: z.ZodNullable<z.ZodObject<{
1228
+ feedback_kind: z.ZodLiteral<"tool_selection">;
1229
+ tenant_id: z.ZodString;
1230
+ scope: z.ZodString;
1231
+ actor: z.ZodOptional<z.ZodString>;
1232
+ guide_trace_id: z.ZodString;
1233
+ decision_id: z.ZodString;
1234
+ run_id: z.ZodString;
1235
+ selected_tool: z.ZodString;
1236
+ candidates: z.ZodArray<z.ZodString, "many">;
1237
+ outcome: z.ZodEnum<["positive", "negative", "neutral"]>;
1238
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1239
+ include_shadow: z.ZodDefault<z.ZodBoolean>;
1240
+ rules_limit: z.ZodDefault<z.ZodNumber>;
1241
+ target: z.ZodDefault<z.ZodEnum<["tool", "all"]>>;
1242
+ note: z.ZodOptional<z.ZodString>;
1243
+ input_text: z.ZodString;
1244
+ }, "strict", z.ZodTypeAny, {
1245
+ context: Record<string, unknown>;
1246
+ run_id: string;
1247
+ scope: string;
1248
+ tenant_id: string;
1249
+ decision_id: string;
1250
+ selected_tool: string;
1251
+ candidates: string[];
1252
+ include_shadow: boolean;
1253
+ rules_limit: number;
1254
+ guide_trace_id: string;
1255
+ feedback_kind: "tool_selection";
1256
+ outcome: "positive" | "negative" | "neutral";
1257
+ target: "tool" | "all";
1258
+ input_text: string;
1259
+ actor?: string | undefined;
1260
+ note?: string | undefined;
1261
+ }, {
1262
+ context: Record<string, unknown>;
1263
+ run_id: string;
1264
+ scope: string;
1265
+ tenant_id: string;
1266
+ decision_id: string;
1267
+ selected_tool: string;
1268
+ candidates: string[];
1269
+ guide_trace_id: string;
1270
+ feedback_kind: "tool_selection";
1271
+ outcome: "positive" | "negative" | "neutral";
1272
+ input_text: string;
1273
+ actor?: string | undefined;
1274
+ include_shadow?: boolean | undefined;
1275
+ rules_limit?: number | undefined;
1276
+ target?: "tool" | "all" | undefined;
1277
+ note?: string | undefined;
1278
+ }>>;
1279
+ tool_feedback_response: z.ZodNullable<z.ZodObject<{
1280
+ status: z.ZodNumber;
1281
+ request_id: z.ZodNullable<z.ZodString>;
1282
+ data: z.ZodObject<{
1283
+ contract_version: z.ZodLiteral<"aionis_feedback_result_v1">;
1284
+ tenant_id: z.ZodString;
1285
+ scope: z.ZodString;
1286
+ product_action: z.ZodLiteral<"feedback">;
1287
+ feedback_kind: z.ZodLiteral<"tool_selection">;
1288
+ tool_selection: z.ZodObject<{
1289
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
1290
+ decision_id: z.ZodString;
1291
+ decision_uri: z.ZodString;
1292
+ run_id: z.ZodString;
1293
+ selected_tool: z.ZodNullable<z.ZodString>;
1294
+ candidates: z.ZodArray<z.ZodString, "many">;
1295
+ policy_sha256: z.ZodString;
1296
+ context_sha256: z.ZodOptional<z.ZodString>;
1297
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
1298
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
1299
+ created_at: z.ZodString;
1300
+ }, "strict", z.ZodTypeAny, {
1301
+ run_id: string;
1302
+ contract_version: "aionis_tool_selection_receipt_v1";
1303
+ decision_id: string;
1304
+ decision_uri: string;
1305
+ selected_tool: string | null;
1306
+ candidates: string[];
1307
+ policy_sha256: string;
1308
+ source_rule_ids: string[];
1309
+ created_at: string;
1310
+ context_sha256?: string | undefined;
1311
+ rule_evaluation_sha256?: string | undefined;
1312
+ }, {
1313
+ run_id: string;
1314
+ contract_version: "aionis_tool_selection_receipt_v1";
1315
+ decision_id: string;
1316
+ decision_uri: string;
1317
+ selected_tool: string | null;
1318
+ candidates: string[];
1319
+ policy_sha256: string;
1320
+ source_rule_ids: string[];
1321
+ created_at: string;
1322
+ context_sha256?: string | undefined;
1323
+ rule_evaluation_sha256?: string | undefined;
1324
+ }>;
1325
+ feedback_result: z.ZodObject<{
1326
+ updated_rules: z.ZodNumber;
1327
+ decision_id: z.ZodString;
1328
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1329
+ updated_rules: z.ZodNumber;
1330
+ decision_id: z.ZodString;
1331
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1332
+ updated_rules: z.ZodNumber;
1333
+ decision_id: z.ZodString;
1334
+ }, z.ZodTypeAny, "passthrough">>;
1335
+ run_lifecycle: z.ZodObject<{
1336
+ run_id: z.ZodString;
1337
+ lifecycle: z.ZodObject<{
1338
+ status: z.ZodString;
1339
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1340
+ status: z.ZodString;
1341
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1342
+ status: z.ZodString;
1343
+ }, z.ZodTypeAny, "passthrough">>;
1344
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1345
+ run_id: z.ZodString;
1346
+ lifecycle: z.ZodObject<{
1347
+ status: z.ZodString;
1348
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1349
+ status: z.ZodString;
1350
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1351
+ status: z.ZodString;
1352
+ }, z.ZodTypeAny, "passthrough">>;
1353
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1354
+ run_id: z.ZodString;
1355
+ lifecycle: z.ZodObject<{
1356
+ status: z.ZodString;
1357
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1358
+ status: z.ZodString;
1359
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1360
+ status: z.ZodString;
1361
+ }, z.ZodTypeAny, "passthrough">>;
1362
+ }, z.ZodTypeAny, "passthrough">>;
1363
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1364
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1365
+ contract_version: z.ZodLiteral<"aionis_feedback_result_v1">;
1366
+ tenant_id: z.ZodString;
1367
+ scope: z.ZodString;
1368
+ product_action: z.ZodLiteral<"feedback">;
1369
+ feedback_kind: z.ZodLiteral<"tool_selection">;
1370
+ tool_selection: z.ZodObject<{
1371
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
1372
+ decision_id: z.ZodString;
1373
+ decision_uri: z.ZodString;
1374
+ run_id: z.ZodString;
1375
+ selected_tool: z.ZodNullable<z.ZodString>;
1376
+ candidates: z.ZodArray<z.ZodString, "many">;
1377
+ policy_sha256: z.ZodString;
1378
+ context_sha256: z.ZodOptional<z.ZodString>;
1379
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
1380
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
1381
+ created_at: z.ZodString;
1382
+ }, "strict", z.ZodTypeAny, {
1383
+ run_id: string;
1384
+ contract_version: "aionis_tool_selection_receipt_v1";
1385
+ decision_id: string;
1386
+ decision_uri: string;
1387
+ selected_tool: string | null;
1388
+ candidates: string[];
1389
+ policy_sha256: string;
1390
+ source_rule_ids: string[];
1391
+ created_at: string;
1392
+ context_sha256?: string | undefined;
1393
+ rule_evaluation_sha256?: string | undefined;
1394
+ }, {
1395
+ run_id: string;
1396
+ contract_version: "aionis_tool_selection_receipt_v1";
1397
+ decision_id: string;
1398
+ decision_uri: string;
1399
+ selected_tool: string | null;
1400
+ candidates: string[];
1401
+ policy_sha256: string;
1402
+ source_rule_ids: string[];
1403
+ created_at: string;
1404
+ context_sha256?: string | undefined;
1405
+ rule_evaluation_sha256?: string | undefined;
1406
+ }>;
1407
+ feedback_result: z.ZodObject<{
1408
+ updated_rules: z.ZodNumber;
1409
+ decision_id: z.ZodString;
1410
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1411
+ updated_rules: z.ZodNumber;
1412
+ decision_id: z.ZodString;
1413
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1414
+ updated_rules: z.ZodNumber;
1415
+ decision_id: z.ZodString;
1416
+ }, z.ZodTypeAny, "passthrough">>;
1417
+ run_lifecycle: z.ZodObject<{
1418
+ run_id: z.ZodString;
1419
+ lifecycle: z.ZodObject<{
1420
+ status: z.ZodString;
1421
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1422
+ status: z.ZodString;
1423
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1424
+ status: z.ZodString;
1425
+ }, z.ZodTypeAny, "passthrough">>;
1426
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1427
+ run_id: z.ZodString;
1428
+ lifecycle: z.ZodObject<{
1429
+ status: z.ZodString;
1430
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1431
+ status: z.ZodString;
1432
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1433
+ status: z.ZodString;
1434
+ }, z.ZodTypeAny, "passthrough">>;
1435
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1436
+ run_id: z.ZodString;
1437
+ lifecycle: z.ZodObject<{
1438
+ status: z.ZodString;
1439
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1440
+ status: z.ZodString;
1441
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1442
+ status: z.ZodString;
1443
+ }, z.ZodTypeAny, "passthrough">>;
1444
+ }, z.ZodTypeAny, "passthrough">>;
1445
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1446
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1447
+ contract_version: z.ZodLiteral<"aionis_feedback_result_v1">;
1448
+ tenant_id: z.ZodString;
1449
+ scope: z.ZodString;
1450
+ product_action: z.ZodLiteral<"feedback">;
1451
+ feedback_kind: z.ZodLiteral<"tool_selection">;
1452
+ tool_selection: z.ZodObject<{
1453
+ contract_version: z.ZodLiteral<"aionis_tool_selection_receipt_v1">;
1454
+ decision_id: z.ZodString;
1455
+ decision_uri: z.ZodString;
1456
+ run_id: z.ZodString;
1457
+ selected_tool: z.ZodNullable<z.ZodString>;
1458
+ candidates: z.ZodArray<z.ZodString, "many">;
1459
+ policy_sha256: z.ZodString;
1460
+ context_sha256: z.ZodOptional<z.ZodString>;
1461
+ rule_evaluation_sha256: z.ZodOptional<z.ZodString>;
1462
+ source_rule_ids: z.ZodArray<z.ZodString, "many">;
1463
+ created_at: z.ZodString;
1464
+ }, "strict", z.ZodTypeAny, {
1465
+ run_id: string;
1466
+ contract_version: "aionis_tool_selection_receipt_v1";
1467
+ decision_id: string;
1468
+ decision_uri: string;
1469
+ selected_tool: string | null;
1470
+ candidates: string[];
1471
+ policy_sha256: string;
1472
+ source_rule_ids: string[];
1473
+ created_at: string;
1474
+ context_sha256?: string | undefined;
1475
+ rule_evaluation_sha256?: string | undefined;
1476
+ }, {
1477
+ run_id: string;
1478
+ contract_version: "aionis_tool_selection_receipt_v1";
1479
+ decision_id: string;
1480
+ decision_uri: string;
1481
+ selected_tool: string | null;
1482
+ candidates: string[];
1483
+ policy_sha256: string;
1484
+ source_rule_ids: string[];
1485
+ created_at: string;
1486
+ context_sha256?: string | undefined;
1487
+ rule_evaluation_sha256?: string | undefined;
1488
+ }>;
1489
+ feedback_result: z.ZodObject<{
1490
+ updated_rules: z.ZodNumber;
1491
+ decision_id: z.ZodString;
1492
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1493
+ updated_rules: z.ZodNumber;
1494
+ decision_id: z.ZodString;
1495
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1496
+ updated_rules: z.ZodNumber;
1497
+ decision_id: z.ZodString;
1498
+ }, z.ZodTypeAny, "passthrough">>;
1499
+ run_lifecycle: z.ZodObject<{
1500
+ run_id: z.ZodString;
1501
+ lifecycle: z.ZodObject<{
1502
+ status: z.ZodString;
1503
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1504
+ status: z.ZodString;
1505
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1506
+ status: z.ZodString;
1507
+ }, z.ZodTypeAny, "passthrough">>;
1508
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1509
+ run_id: z.ZodString;
1510
+ lifecycle: z.ZodObject<{
1511
+ status: z.ZodString;
1512
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1513
+ status: z.ZodString;
1514
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1515
+ status: z.ZodString;
1516
+ }, z.ZodTypeAny, "passthrough">>;
1517
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1518
+ run_id: z.ZodString;
1519
+ lifecycle: z.ZodObject<{
1520
+ status: z.ZodString;
1521
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1522
+ status: z.ZodString;
1523
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1524
+ status: z.ZodString;
1525
+ }, z.ZodTypeAny, "passthrough">>;
1526
+ }, z.ZodTypeAny, "passthrough">>;
1527
+ source_map: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1528
+ }, z.ZodTypeAny, "passthrough">>;
1529
+ }, "strip", z.ZodTypeAny, {
1530
+ data: {
1531
+ scope: string;
1532
+ tenant_id: string;
1533
+ contract_version: "aionis_feedback_result_v1";
1534
+ tool_selection: {
1535
+ run_id: string;
1536
+ contract_version: "aionis_tool_selection_receipt_v1";
1537
+ decision_id: string;
1538
+ decision_uri: string;
1539
+ selected_tool: string | null;
1540
+ candidates: string[];
1541
+ policy_sha256: string;
1542
+ source_rule_ids: string[];
1543
+ created_at: string;
1544
+ context_sha256?: string | undefined;
1545
+ rule_evaluation_sha256?: string | undefined;
1546
+ };
1547
+ source_map: Record<string, unknown>;
1548
+ feedback_kind: "tool_selection";
1549
+ product_action: "feedback";
1550
+ feedback_result: {
1551
+ decision_id: string;
1552
+ updated_rules: number;
1553
+ } & {
1554
+ [k: string]: unknown;
1555
+ };
1556
+ run_lifecycle: {
1557
+ run_id: string;
1558
+ lifecycle: {
1559
+ status: string;
1560
+ } & {
1561
+ [k: string]: unknown;
1562
+ };
1563
+ } & {
1564
+ [k: string]: unknown;
1565
+ };
1566
+ } & {
1567
+ [k: string]: unknown;
1568
+ };
1569
+ status: number;
1570
+ request_id: string | null;
1571
+ }, {
1572
+ data: {
1573
+ scope: string;
1574
+ tenant_id: string;
1575
+ contract_version: "aionis_feedback_result_v1";
1576
+ tool_selection: {
1577
+ run_id: string;
1578
+ contract_version: "aionis_tool_selection_receipt_v1";
1579
+ decision_id: string;
1580
+ decision_uri: string;
1581
+ selected_tool: string | null;
1582
+ candidates: string[];
1583
+ policy_sha256: string;
1584
+ source_rule_ids: string[];
1585
+ created_at: string;
1586
+ context_sha256?: string | undefined;
1587
+ rule_evaluation_sha256?: string | undefined;
1588
+ };
1589
+ source_map: Record<string, unknown>;
1590
+ feedback_kind: "tool_selection";
1591
+ product_action: "feedback";
1592
+ feedback_result: {
1593
+ decision_id: string;
1594
+ updated_rules: number;
1595
+ } & {
1596
+ [k: string]: unknown;
1597
+ };
1598
+ run_lifecycle: {
1599
+ run_id: string;
1600
+ lifecycle: {
1601
+ status: string;
1602
+ } & {
1603
+ [k: string]: unknown;
1604
+ };
1605
+ } & {
1606
+ [k: string]: unknown;
1607
+ };
1608
+ } & {
1609
+ [k: string]: unknown;
1610
+ };
1611
+ status: number;
1612
+ request_id: string | null;
1613
+ }>>;
1614
+ }, "strip", z.ZodTypeAny, {
1615
+ run_id: string;
1616
+ source_doc_id: string | null;
1617
+ source_doc_version: string | null;
1618
+ base_url: string;
1619
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request" | "publish-result" | "recover-result";
1620
+ resume_result_version: "aionis_manifest_resume_result_v2";
1621
+ resumed_at: string;
1622
+ resume_summary: {
1623
+ run_id: string;
1624
+ decision_id: string | null;
1625
+ selected_tool: string | null;
1626
+ resume_state: "inspection_only" | "feedback_applied" | "lifecycle_advanced";
1627
+ lifecycle_advanced: boolean;
1628
+ feedback_written: boolean;
1629
+ feedback_outcome: "positive" | "negative" | "neutral" | null;
1630
+ pre_feedback_run_status: string | null;
1631
+ post_feedback_run_status: string | null;
1632
+ lifecycle_transition: string | null;
1633
+ feedback_updated_rules: number | null;
1634
+ };
1635
+ recover_result: {
1636
+ source_doc_id: string | null;
1637
+ source_doc_version: string | null;
1638
+ base_url: string;
1639
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request" | "publish-result";
1640
+ recover_result_version: "aionis_manifest_recover_result_v1";
1641
+ recovered_at: string;
1642
+ publish_result: {
1643
+ source_doc_id: string | null;
1644
+ source_doc_version: string | null;
1645
+ publish_result_version: "aionis_manifest_publish_result_v1";
1646
+ published_at: string;
1647
+ base_url: string;
1648
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request";
1649
+ request: {
1650
+ anchor: string;
1651
+ handoff_kind: string;
1652
+ scope?: string | undefined;
1653
+ memory_lane?: "private" | "shared" | undefined;
1654
+ };
1655
+ response: {
1656
+ status: number;
1657
+ handoff_kind: string | null;
1658
+ request_id: string | null;
1659
+ commit_id: string;
1660
+ handoff_anchor: string | null;
1661
+ scope?: string | undefined;
1662
+ tenant_id?: string | undefined;
1663
+ commit_uri?: string | undefined;
1664
+ };
1665
+ handoff_store_request: Record<string, unknown>;
1666
+ } | null;
1667
+ recover_request: {
1668
+ anchor: string;
1669
+ symbol?: string | undefined;
1670
+ file_path?: string | undefined;
1671
+ repo_root?: string | undefined;
1672
+ scope?: string | undefined;
1673
+ handoff_kind?: "task_handoff" | "patch_handoff" | "review_handoff" | undefined;
1674
+ tenant_id?: string | undefined;
1675
+ memory_lane?: "private" | "shared" | undefined;
1676
+ limit?: number | undefined;
1677
+ };
1678
+ recover_response: {
1679
+ data: {
1680
+ anchor: string;
1681
+ scope: string;
1682
+ handoff_kind: string;
1683
+ tenant_id: string;
1684
+ handoff: Record<string, unknown>;
1685
+ matched_nodes: number;
1686
+ execution_result_summary?: Record<string, unknown> | null | undefined;
1687
+ execution_artifacts?: Record<string, unknown>[] | undefined;
1688
+ execution_evidence?: Record<string, unknown>[] | undefined;
1689
+ execution_state_v1?: Record<string, unknown> | undefined;
1690
+ execution_packet_v1?: Record<string, unknown> | undefined;
1691
+ execution_ready_handoff?: Record<string, unknown> | undefined;
1692
+ control_profile_v1?: Record<string, unknown> | undefined;
1693
+ execution_transitions_v1?: Record<string, unknown>[] | undefined;
1694
+ prompt_safe_handoff?: Record<string, unknown> | undefined;
1695
+ };
1696
+ status: number;
1697
+ request_id: string | null;
1698
+ };
1699
+ } | null;
1700
+ guide_request: {
1701
+ mode: "full_power";
1702
+ context: Record<string, unknown>;
1703
+ run_id: string;
1704
+ query_text: string;
1705
+ tool_candidates: string[];
1706
+ tool_strict: boolean;
1707
+ include_shadow: boolean;
1708
+ rules_limit: number;
1709
+ include_packets: true;
1710
+ scope?: string | undefined;
1711
+ execution_state_v1?: Record<string, unknown> | undefined;
1712
+ execution_packet_v1?: Record<string, unknown> | undefined;
1713
+ tenant_id?: string | undefined;
1714
+ };
1715
+ guide_response: {
1716
+ data: {
1717
+ scope: string;
1718
+ tenant_id: string;
1719
+ contract_version: "aionis_guide_result_v1";
1720
+ guide_trace_id: string;
1721
+ agent_context: Record<string, unknown>;
1722
+ source_map: Record<string, unknown>;
1723
+ consumer_agent_id?: string | undefined;
1724
+ tool_selection?: {
1725
+ run_id: string;
1726
+ contract_version: "aionis_tool_selection_receipt_v1";
1727
+ decision_id: string;
1728
+ decision_uri: string;
1729
+ selected_tool: string | null;
1730
+ candidates: string[];
1731
+ policy_sha256: string;
1732
+ source_rule_ids: string[];
1733
+ created_at: string;
1734
+ context_sha256?: string | undefined;
1735
+ rule_evaluation_sha256?: string | undefined;
1736
+ } | undefined;
1737
+ memory_packet?: Record<string, unknown> | null | undefined;
1738
+ guide_packet?: Record<string, unknown> | null | undefined;
1739
+ } & {
1740
+ [k: string]: unknown;
1741
+ };
1742
+ status: number;
1743
+ request_id: string | null;
1744
+ };
1745
+ tool_feedback_request: {
1746
+ context: Record<string, unknown>;
1747
+ run_id: string;
1748
+ scope: string;
1749
+ tenant_id: string;
1750
+ decision_id: string;
1751
+ selected_tool: string;
1752
+ candidates: string[];
1753
+ include_shadow: boolean;
1754
+ rules_limit: number;
1755
+ guide_trace_id: string;
1756
+ feedback_kind: "tool_selection";
1757
+ outcome: "positive" | "negative" | "neutral";
1758
+ target: "tool" | "all";
1759
+ input_text: string;
1760
+ actor?: string | undefined;
1761
+ note?: string | undefined;
1762
+ } | null;
1763
+ tool_feedback_response: {
1764
+ data: {
1765
+ scope: string;
1766
+ tenant_id: string;
1767
+ contract_version: "aionis_feedback_result_v1";
1768
+ tool_selection: {
1769
+ run_id: string;
1770
+ contract_version: "aionis_tool_selection_receipt_v1";
1771
+ decision_id: string;
1772
+ decision_uri: string;
1773
+ selected_tool: string | null;
1774
+ candidates: string[];
1775
+ policy_sha256: string;
1776
+ source_rule_ids: string[];
1777
+ created_at: string;
1778
+ context_sha256?: string | undefined;
1779
+ rule_evaluation_sha256?: string | undefined;
1780
+ };
1781
+ source_map: Record<string, unknown>;
1782
+ feedback_kind: "tool_selection";
1783
+ product_action: "feedback";
1784
+ feedback_result: {
1785
+ decision_id: string;
1786
+ updated_rules: number;
1787
+ } & {
1788
+ [k: string]: unknown;
1789
+ };
1790
+ run_lifecycle: {
1791
+ run_id: string;
1792
+ lifecycle: {
1793
+ status: string;
1794
+ } & {
1795
+ [k: string]: unknown;
1796
+ };
1797
+ } & {
1798
+ [k: string]: unknown;
1799
+ };
1800
+ } & {
1801
+ [k: string]: unknown;
1802
+ };
1803
+ status: number;
1804
+ request_id: string | null;
1805
+ } | null;
1806
+ }, {
1807
+ run_id: string;
1808
+ source_doc_id: string | null;
1809
+ source_doc_version: string | null;
1810
+ base_url: string;
1811
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request" | "publish-result" | "recover-result";
1812
+ resume_result_version: "aionis_manifest_resume_result_v2";
1813
+ resumed_at: string;
1814
+ resume_summary: {
1815
+ run_id: string;
1816
+ decision_id: string | null;
1817
+ selected_tool: string | null;
1818
+ resume_state: "inspection_only" | "feedback_applied" | "lifecycle_advanced";
1819
+ lifecycle_advanced: boolean;
1820
+ feedback_written: boolean;
1821
+ feedback_outcome: "positive" | "negative" | "neutral" | null;
1822
+ pre_feedback_run_status: string | null;
1823
+ post_feedback_run_status: string | null;
1824
+ lifecycle_transition: string | null;
1825
+ feedback_updated_rules: number | null;
1826
+ };
1827
+ recover_result: {
1828
+ source_doc_id: string | null;
1829
+ source_doc_version: string | null;
1830
+ base_url: string;
1831
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request" | "publish-result";
1832
+ recover_result_version: "aionis_manifest_recover_result_v1";
1833
+ recovered_at: string;
1834
+ publish_result: {
1835
+ source_doc_id: string | null;
1836
+ source_doc_version: string | null;
1837
+ publish_result_version: "aionis_manifest_publish_result_v1";
1838
+ published_at: string;
1839
+ base_url: string;
1840
+ input_kind: "source" | "runtime-handoff" | "handoff-store-request";
1841
+ request: {
1842
+ anchor: string;
1843
+ handoff_kind: string;
1844
+ scope?: string | undefined;
1845
+ memory_lane?: "private" | "shared" | undefined;
1846
+ };
1847
+ response: {
1848
+ status: number;
1849
+ handoff_kind: string | null;
1850
+ request_id: string | null;
1851
+ commit_id: string;
1852
+ handoff_anchor: string | null;
1853
+ scope?: string | undefined;
1854
+ tenant_id?: string | undefined;
1855
+ commit_uri?: string | undefined;
1856
+ };
1857
+ handoff_store_request: Record<string, unknown>;
1858
+ } | null;
1859
+ recover_request: {
1860
+ anchor: string;
1861
+ symbol?: string | undefined;
1862
+ file_path?: string | undefined;
1863
+ repo_root?: string | undefined;
1864
+ scope?: string | undefined;
1865
+ handoff_kind?: "task_handoff" | "patch_handoff" | "review_handoff" | undefined;
1866
+ tenant_id?: string | undefined;
1867
+ memory_lane?: "private" | "shared" | undefined;
1868
+ limit?: number | undefined;
1869
+ };
1870
+ recover_response: {
1871
+ data: {
1872
+ anchor: string;
1873
+ scope: string;
1874
+ handoff_kind: string;
1875
+ tenant_id: string;
1876
+ handoff: Record<string, unknown>;
1877
+ matched_nodes: number;
1878
+ execution_result_summary?: Record<string, unknown> | null | undefined;
1879
+ execution_artifacts?: Record<string, unknown>[] | undefined;
1880
+ execution_evidence?: Record<string, unknown>[] | undefined;
1881
+ execution_state_v1?: Record<string, unknown> | undefined;
1882
+ execution_packet_v1?: Record<string, unknown> | undefined;
1883
+ execution_ready_handoff?: Record<string, unknown> | undefined;
1884
+ control_profile_v1?: Record<string, unknown> | undefined;
1885
+ execution_transitions_v1?: Record<string, unknown>[] | undefined;
1886
+ prompt_safe_handoff?: Record<string, unknown> | undefined;
1887
+ };
1888
+ status: number;
1889
+ request_id: string | null;
1890
+ };
1891
+ } | null;
1892
+ guide_request: {
1893
+ context: Record<string, unknown>;
1894
+ run_id: string;
1895
+ query_text: string;
1896
+ tool_candidates: string[];
1897
+ mode?: "full_power" | undefined;
1898
+ scope?: string | undefined;
1899
+ execution_state_v1?: Record<string, unknown> | undefined;
1900
+ execution_packet_v1?: Record<string, unknown> | undefined;
1901
+ tenant_id?: string | undefined;
1902
+ tool_strict?: boolean | undefined;
1903
+ include_shadow?: boolean | undefined;
1904
+ rules_limit?: number | undefined;
1905
+ include_packets?: true | undefined;
1906
+ };
1907
+ guide_response: {
1908
+ data: {
1909
+ scope: string;
1910
+ tenant_id: string;
1911
+ contract_version: "aionis_guide_result_v1";
1912
+ guide_trace_id: string;
1913
+ agent_context: Record<string, unknown>;
1914
+ source_map: Record<string, unknown>;
1915
+ consumer_agent_id?: string | undefined;
1916
+ tool_selection?: {
1917
+ run_id: string;
1918
+ contract_version: "aionis_tool_selection_receipt_v1";
1919
+ decision_id: string;
1920
+ decision_uri: string;
1921
+ selected_tool: string | null;
1922
+ candidates: string[];
1923
+ policy_sha256: string;
1924
+ source_rule_ids: string[];
1925
+ created_at: string;
1926
+ context_sha256?: string | undefined;
1927
+ rule_evaluation_sha256?: string | undefined;
1928
+ } | undefined;
1929
+ memory_packet?: Record<string, unknown> | null | undefined;
1930
+ guide_packet?: Record<string, unknown> | null | undefined;
1931
+ } & {
1932
+ [k: string]: unknown;
1933
+ };
1934
+ status: number;
1935
+ request_id: string | null;
1936
+ };
1937
+ tool_feedback_request: {
1938
+ context: Record<string, unknown>;
1939
+ run_id: string;
1940
+ scope: string;
1941
+ tenant_id: string;
1942
+ decision_id: string;
1943
+ selected_tool: string;
1944
+ candidates: string[];
1945
+ guide_trace_id: string;
1946
+ feedback_kind: "tool_selection";
1947
+ outcome: "positive" | "negative" | "neutral";
1948
+ input_text: string;
1949
+ actor?: string | undefined;
1950
+ include_shadow?: boolean | undefined;
1951
+ rules_limit?: number | undefined;
1952
+ target?: "tool" | "all" | undefined;
1953
+ note?: string | undefined;
1954
+ } | null;
1955
+ tool_feedback_response: {
1956
+ data: {
1957
+ scope: string;
1958
+ tenant_id: string;
1959
+ contract_version: "aionis_feedback_result_v1";
1960
+ tool_selection: {
1961
+ run_id: string;
1962
+ contract_version: "aionis_tool_selection_receipt_v1";
1963
+ decision_id: string;
1964
+ decision_uri: string;
1965
+ selected_tool: string | null;
1966
+ candidates: string[];
1967
+ policy_sha256: string;
1968
+ source_rule_ids: string[];
1969
+ created_at: string;
1970
+ context_sha256?: string | undefined;
1971
+ rule_evaluation_sha256?: string | undefined;
1972
+ };
1973
+ source_map: Record<string, unknown>;
1974
+ feedback_kind: "tool_selection";
1975
+ product_action: "feedback";
1976
+ feedback_result: {
1977
+ decision_id: string;
1978
+ updated_rules: number;
1979
+ } & {
1980
+ [k: string]: unknown;
1981
+ };
1982
+ run_lifecycle: {
1983
+ run_id: string;
1984
+ lifecycle: {
1985
+ status: string;
1986
+ } & {
1987
+ [k: string]: unknown;
1988
+ };
1989
+ } & {
1990
+ [k: string]: unknown;
1991
+ };
1992
+ } & {
1993
+ [k: string]: unknown;
1994
+ };
1995
+ status: number;
1996
+ request_id: string | null;
1997
+ } | null;
1998
+ }>;
1999
+ export type AionisManifestResumeResult = z.infer<typeof ResumeResultSchema>;
2000
+ type SharedNetworkOptions = {
2001
+ baseUrl: string;
2002
+ timeoutMs?: number;
2003
+ apiKey?: string;
2004
+ authBearer?: string;
2005
+ adminToken?: string;
2006
+ requestId?: string;
2007
+ resumedAt?: string;
2008
+ };
2009
+ type ResumeOptions = SharedNetworkOptions & {
2010
+ queryText?: string;
2011
+ runId?: string;
2012
+ tenantId?: string;
2013
+ scope?: string;
2014
+ candidates: string[];
2015
+ strict?: boolean;
2016
+ includeShadow?: boolean;
2017
+ rulesLimit?: number;
2018
+ feedbackOutcome?: "positive" | "negative" | "neutral";
2019
+ feedbackTarget?: "tool" | "all";
2020
+ feedbackNote?: string;
2021
+ feedbackInputText?: string;
2022
+ feedbackSelectedTool?: string;
2023
+ feedbackActor?: string;
2024
+ };
2025
+ type ResumeFromSourceOptions = ResumeOptions & {
2026
+ source: string;
2027
+ inputPath: string;
2028
+ actor?: string;
2029
+ memoryLane?: "private" | "shared";
2030
+ title?: string;
2031
+ tags?: string[];
2032
+ repoRoot?: string | null;
2033
+ filePath?: string | null;
2034
+ symbol?: string | null;
2035
+ currentStage?: "triage" | "patch" | "review" | "resume";
2036
+ activeRole?: "orchestrator" | "triage" | "patch" | "review" | "resume";
2037
+ handoffKind?: "patch_handoff" | "review_handoff" | "task_handoff";
2038
+ limit?: number;
2039
+ allowCompileErrors?: boolean;
2040
+ };
2041
+ export declare function buildProductGuideResumeRequest(args: {
2042
+ recoverResult: AionisManifestRecoverResult;
2043
+ queryText?: string;
2044
+ runId?: string;
2045
+ tenantId?: string;
2046
+ scope?: string;
2047
+ candidates: string[];
2048
+ strict?: boolean;
2049
+ includeShadow?: boolean;
2050
+ rulesLimit?: number;
2051
+ }): ProductGuideResumeRequest;
2052
+ export declare function buildProductToolFeedbackResumeRequest(args: {
2053
+ guideRequest: ProductGuideResumeRequest;
2054
+ guideResponse: ProductGuideResumePayload;
2055
+ outcome: "positive" | "negative" | "neutral";
2056
+ actor?: string;
2057
+ note?: string;
2058
+ inputText?: string;
2059
+ target?: "tool" | "all";
2060
+ selectedTool?: string;
2061
+ }): ProductToolFeedbackResumeRequest;
2062
+ export declare function resumeRecoveredAionisManifest(args: ResumeOptions & {
2063
+ recoverResult: unknown;
2064
+ inputKind?: ResumeInputKind;
2065
+ }): Promise<AionisManifestResumeResult>;
2066
+ export declare function resumePublishedAionisManifest(args: ResumeOptions & {
2067
+ publishResult: unknown;
2068
+ }): Promise<AionisManifestResumeResult>;
2069
+ export declare function resumeRuntimeHandoff(args: ResumeOptions & {
2070
+ runtimeHandoff: unknown;
2071
+ } & Pick<ResumeFromSourceOptions, "actor" | "memoryLane" | "title" | "tags" | "repoRoot" | "filePath" | "symbol" | "handoffKind" | "limit" | "allowCompileErrors">): Promise<AionisManifestResumeResult>;
2072
+ export declare function resumeHandoffStoreRequest(args: ResumeOptions & {
2073
+ handoffStoreRequest: unknown;
2074
+ } & Pick<ResumeFromSourceOptions, "repoRoot" | "filePath" | "symbol" | "handoffKind" | "limit">): Promise<AionisManifestResumeResult>;
2075
+ export declare function resumeAionisManifestSource(args: ResumeFromSourceOptions): Promise<AionisManifestResumeResult>;
2076
+ export {};