thoth-agents 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/agents/prompt-dialects.d.ts +3 -1
- package/dist/{chunk-OW6I7ZUU.js → chunk-4DZSWTUM.js} +337 -155
- package/dist/{chunk-7YCSKK2X.js → chunk-5LW4CNA5.js} +4053 -2989
- package/dist/{chunk-U7FNFTM5.js → chunk-P7R4GDSO.js} +39 -38
- package/dist/{chunk-MRFCA3U2.js → chunk-ZLEMG37R.js} +2 -1
- package/dist/cli/codex-config-io.d.ts +34 -2
- package/dist/cli/codex-hook-consent.d.ts +5 -0
- package/dist/cli/codex-hook-trust.d.ts +23 -0
- package/dist/cli/codex-install.d.ts +21 -6
- package/dist/cli/codex-lifecycle.d.ts +13 -0
- package/dist/cli/codex-plugin-install.d.ts +21 -0
- package/dist/cli/index.js +538 -43
- package/dist/cli/managed-state-io.d.ts +19 -0
- package/dist/cli/operations/codex.d.ts +2 -0
- package/dist/cli/operations/types.d.ts +1 -1
- package/dist/cli/pi-install.d.ts +1 -0
- package/dist/cli/safe-atomic-write.d.ts +2 -0
- package/dist/cli/tui/index.js +56 -5
- package/dist/cli/tui/operations.d.ts +3 -1
- package/dist/cli/types.d.ts +4 -1
- package/dist/config/constants.d.ts +30 -3
- package/dist/config/schema.d.ts +4 -0
- package/dist/harness/adapters/claude-code.d.ts +1 -1
- package/dist/harness/adapters/codex-legacy-agents.d.ts +31 -0
- package/dist/harness/adapters/codex-surfaces.d.ts +1 -1
- package/dist/harness/adapters/codex.d.ts +3 -1
- package/dist/harness/codex-hook-script.d.ts +2 -0
- package/dist/harness/core/agent-pack.d.ts +8 -2
- package/dist/harness/core/result-contract.d.ts +366 -0
- package/dist/harness/core/sdd.d.ts +1 -1
- package/dist/harness/writers/codex-plugin-package.d.ts +7 -0
- package/dist/harness/writers/pi-agent.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/pi.js +2 -2
- package/package.json +5 -3
- package/pi/.thoth-agents-assets.json +5 -5
- package/pi/agents/thoth-designer.md +15 -20
- package/pi/agents/thoth-explorer.md +15 -19
- package/pi/agents/thoth-librarian.md +15 -19
- package/pi/agents/thoth-oracle.md +30 -22
- package/pi/agents/thoth-worker.md +13 -18
- package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/.thoth-agents-plugin-assets.json +48 -0
- package/plugin/.codex-plugin/plugin.json +3 -2
- package/plugin/agents/designer.md +9 -14
- package/plugin/agents/explorer.md +10 -14
- package/plugin/agents/librarian.md +9 -13
- package/plugin/agents/oracle.md +24 -18
- package/plugin/agents/orchestrator.md +38 -61
- package/plugin/agents/worker.md +9 -14
- package/plugin/codex-hooks/context.cjs +22 -0
- package/plugin/codex-hooks/hooks.json +32 -0
- package/plugin/codex-hooks/payloads/designer.md +72 -0
- package/plugin/codex-hooks/payloads/explorer.md +76 -0
- package/plugin/codex-hooks/payloads/librarian.md +76 -0
- package/plugin/codex-hooks/payloads/oracle.md +83 -0
- package/plugin/codex-hooks/payloads/root.md +105 -0
- package/plugin/codex-hooks/payloads/worker.md +72 -0
- package/plugin/skills/plan-reviewer/SKILL.md +16 -8
- package/plugin/skills/thoth-archive/SKILL.md +2 -1
- package/plugin/skills/thoth-constitution/SKILL.md +1 -1
- package/plugin/skills/thoth-constitution/templates/constitution.md +1 -1
- package/plugin/skills/thoth-init/SKILL.md +1 -1
- package/plugin/skills/thoth-sdd/SKILL.md +67 -2
- package/plugin/skills/thoth-sdd/references/phases/verify.md +11 -1
- package/plugin/skills/thoth-sdd/scripts/result-contract.json +210 -0
- package/plugin/skills/thoth-sdd/scripts/validate-result.d.mts +47 -0
- package/plugin/skills/thoth-sdd/scripts/validate-result.mjs +390 -0
- package/plugin/skills/thoth-sdd/scripts/validate.mjs +213 -8
- package/plugin/skills/thoth-sdd/templates/change.md +8 -0
- package/skills/plan-reviewer/SKILL.md +16 -8
- package/skills/thoth-archive/SKILL.md +2 -1
- package/skills/thoth-constitution/SKILL.md +1 -1
- package/skills/thoth-constitution/templates/constitution.md +1 -1
- package/skills/thoth-init/SKILL.md +1 -1
- package/skills/thoth-sdd/SKILL.md +67 -2
- package/skills/thoth-sdd/references/phases/verify.md +11 -1
- package/skills/thoth-sdd/scripts/result-contract.json +210 -0
- package/skills/thoth-sdd/scripts/validate-result.d.mts +47 -0
- package/skills/thoth-sdd/scripts/validate-result.mjs +390 -0
- package/skills/thoth-sdd/scripts/validate.mjs +213 -8
- package/skills/thoth-sdd/templates/change.md +8 -0
- package/thoth-agents.schema.json +14 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
declare const common: {
|
|
2
|
+
readonly type: "object";
|
|
3
|
+
readonly properties: {
|
|
4
|
+
readonly schemaVersion: {
|
|
5
|
+
readonly type: "number";
|
|
6
|
+
readonly const: 1;
|
|
7
|
+
};
|
|
8
|
+
readonly role: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly enum: readonly ["oracle"];
|
|
11
|
+
};
|
|
12
|
+
readonly status: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly enum: readonly ["complete", "partial", "blocked", "failed"];
|
|
15
|
+
};
|
|
16
|
+
readonly conclusion: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
};
|
|
19
|
+
readonly evidence: {
|
|
20
|
+
readonly type: "array";
|
|
21
|
+
readonly items: {
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
readonly properties: {
|
|
24
|
+
readonly id: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
readonly minLength: 1;
|
|
27
|
+
};
|
|
28
|
+
readonly kind: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
};
|
|
31
|
+
readonly locator: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
};
|
|
34
|
+
readonly claim: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
};
|
|
37
|
+
readonly basis: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
readonly enum: readonly ["observed", "inferred"];
|
|
40
|
+
};
|
|
41
|
+
readonly uncertainty: {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
readonly required: string[];
|
|
46
|
+
readonly additionalProperties: false;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
readonly verification: {
|
|
50
|
+
readonly type: "array";
|
|
51
|
+
readonly items: {
|
|
52
|
+
readonly type: "object";
|
|
53
|
+
readonly properties: {
|
|
54
|
+
readonly check: {
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
};
|
|
57
|
+
readonly method: {
|
|
58
|
+
readonly type: "string";
|
|
59
|
+
};
|
|
60
|
+
readonly outcome: {
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
readonly enum: readonly ["pass", "fail", "not-run"];
|
|
63
|
+
};
|
|
64
|
+
readonly evidenceIds: {
|
|
65
|
+
readonly type: "array";
|
|
66
|
+
readonly items: {
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly reason: {
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly required: string[];
|
|
75
|
+
readonly additionalProperties: false;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly risks: {
|
|
79
|
+
readonly type: "array";
|
|
80
|
+
readonly items: {
|
|
81
|
+
readonly type: "object";
|
|
82
|
+
readonly properties: {
|
|
83
|
+
readonly description: {
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
};
|
|
86
|
+
readonly severity: {
|
|
87
|
+
readonly type: "string";
|
|
88
|
+
readonly enum: readonly ["low", "medium", "high", "critical"];
|
|
89
|
+
};
|
|
90
|
+
readonly blocking: {
|
|
91
|
+
readonly type: "boolean";
|
|
92
|
+
};
|
|
93
|
+
readonly evidenceIds: {
|
|
94
|
+
readonly type: "array";
|
|
95
|
+
readonly items: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
readonly required: string[];
|
|
101
|
+
readonly additionalProperties: false;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly openQuestions: {
|
|
105
|
+
readonly type: "array";
|
|
106
|
+
readonly items: {
|
|
107
|
+
readonly type: "object";
|
|
108
|
+
readonly properties: {
|
|
109
|
+
readonly question: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
};
|
|
112
|
+
readonly owner: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
};
|
|
115
|
+
readonly options: {
|
|
116
|
+
readonly type: "array";
|
|
117
|
+
readonly items: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
readonly facts: {
|
|
122
|
+
readonly type: "array";
|
|
123
|
+
readonly items: {
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly required: string[];
|
|
129
|
+
readonly additionalProperties: false;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
readonly required: string[];
|
|
134
|
+
readonly additionalProperties: false;
|
|
135
|
+
};
|
|
136
|
+
export declare const SPECIALIST_RESULT_CONTRACT: {
|
|
137
|
+
readonly schemaVersion: 1;
|
|
138
|
+
readonly fence: "thoth-result";
|
|
139
|
+
readonly common: {
|
|
140
|
+
readonly type: "object";
|
|
141
|
+
readonly properties: {
|
|
142
|
+
readonly schemaVersion: {
|
|
143
|
+
readonly type: "number";
|
|
144
|
+
readonly const: 1;
|
|
145
|
+
};
|
|
146
|
+
readonly role: {
|
|
147
|
+
readonly type: "string";
|
|
148
|
+
readonly enum: readonly ["oracle"];
|
|
149
|
+
};
|
|
150
|
+
readonly status: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
readonly enum: readonly ["complete", "partial", "blocked", "failed"];
|
|
153
|
+
};
|
|
154
|
+
readonly conclusion: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
};
|
|
157
|
+
readonly evidence: {
|
|
158
|
+
readonly type: "array";
|
|
159
|
+
readonly items: {
|
|
160
|
+
readonly type: "object";
|
|
161
|
+
readonly properties: {
|
|
162
|
+
readonly id: {
|
|
163
|
+
readonly type: "string";
|
|
164
|
+
readonly minLength: 1;
|
|
165
|
+
};
|
|
166
|
+
readonly kind: {
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
};
|
|
169
|
+
readonly locator: {
|
|
170
|
+
readonly type: "string";
|
|
171
|
+
};
|
|
172
|
+
readonly claim: {
|
|
173
|
+
readonly type: "string";
|
|
174
|
+
};
|
|
175
|
+
readonly basis: {
|
|
176
|
+
readonly type: "string";
|
|
177
|
+
readonly enum: readonly ["observed", "inferred"];
|
|
178
|
+
};
|
|
179
|
+
readonly uncertainty: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly required: string[];
|
|
184
|
+
readonly additionalProperties: false;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
readonly verification: {
|
|
188
|
+
readonly type: "array";
|
|
189
|
+
readonly items: {
|
|
190
|
+
readonly type: "object";
|
|
191
|
+
readonly properties: {
|
|
192
|
+
readonly check: {
|
|
193
|
+
readonly type: "string";
|
|
194
|
+
};
|
|
195
|
+
readonly method: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
};
|
|
198
|
+
readonly outcome: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
readonly enum: readonly ["pass", "fail", "not-run"];
|
|
201
|
+
};
|
|
202
|
+
readonly evidenceIds: {
|
|
203
|
+
readonly type: "array";
|
|
204
|
+
readonly items: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
readonly reason: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
readonly required: string[];
|
|
213
|
+
readonly additionalProperties: false;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
readonly risks: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly items: {
|
|
219
|
+
readonly type: "object";
|
|
220
|
+
readonly properties: {
|
|
221
|
+
readonly description: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
};
|
|
224
|
+
readonly severity: {
|
|
225
|
+
readonly type: "string";
|
|
226
|
+
readonly enum: readonly ["low", "medium", "high", "critical"];
|
|
227
|
+
};
|
|
228
|
+
readonly blocking: {
|
|
229
|
+
readonly type: "boolean";
|
|
230
|
+
};
|
|
231
|
+
readonly evidenceIds: {
|
|
232
|
+
readonly type: "array";
|
|
233
|
+
readonly items: {
|
|
234
|
+
readonly type: "string";
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
readonly required: string[];
|
|
239
|
+
readonly additionalProperties: false;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
readonly openQuestions: {
|
|
243
|
+
readonly type: "array";
|
|
244
|
+
readonly items: {
|
|
245
|
+
readonly type: "object";
|
|
246
|
+
readonly properties: {
|
|
247
|
+
readonly question: {
|
|
248
|
+
readonly type: "string";
|
|
249
|
+
};
|
|
250
|
+
readonly owner: {
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
};
|
|
253
|
+
readonly options: {
|
|
254
|
+
readonly type: "array";
|
|
255
|
+
readonly items: {
|
|
256
|
+
readonly type: "string";
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
readonly facts: {
|
|
260
|
+
readonly type: "array";
|
|
261
|
+
readonly items: {
|
|
262
|
+
readonly type: "string";
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
readonly required: string[];
|
|
267
|
+
readonly additionalProperties: false;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
readonly required: string[];
|
|
272
|
+
readonly additionalProperties: false;
|
|
273
|
+
};
|
|
274
|
+
readonly roles: {
|
|
275
|
+
readonly oracle: {
|
|
276
|
+
readonly type: "object";
|
|
277
|
+
readonly properties: {
|
|
278
|
+
readonly nextAction: {
|
|
279
|
+
readonly type: readonly ["string", "null"];
|
|
280
|
+
};
|
|
281
|
+
readonly review: {
|
|
282
|
+
readonly required: readonly ["kind", "verdict"];
|
|
283
|
+
readonly type: "object";
|
|
284
|
+
readonly properties: {
|
|
285
|
+
readonly kind: {
|
|
286
|
+
readonly type: "string";
|
|
287
|
+
readonly enum: readonly ["plan-review", "final-verification"];
|
|
288
|
+
};
|
|
289
|
+
readonly verdict: {
|
|
290
|
+
readonly type: "string";
|
|
291
|
+
};
|
|
292
|
+
readonly reviewedRecord: {
|
|
293
|
+
readonly type: "string";
|
|
294
|
+
readonly minLength: 1;
|
|
295
|
+
};
|
|
296
|
+
readonly reviewedRecordSha256: {
|
|
297
|
+
readonly type: "string";
|
|
298
|
+
readonly pattern: "^[a-f0-9]{64}$";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly additionalProperties: false;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
readonly required: string[];
|
|
305
|
+
readonly additionalProperties: false;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
readonly reviewKinds: {
|
|
309
|
+
readonly 'plan-review': {
|
|
310
|
+
readonly verdicts: readonly ["OKAY", "REJECT"];
|
|
311
|
+
};
|
|
312
|
+
readonly 'final-verification': {
|
|
313
|
+
readonly verdicts: readonly ["PASS", "FAIL", "BLOCKED"];
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
readonly rules: {
|
|
317
|
+
readonly positiveVerdicts: readonly ["OKAY", "PASS"];
|
|
318
|
+
readonly positiveStatus: "complete";
|
|
319
|
+
readonly positiveAllowsBlockingRisks: false;
|
|
320
|
+
readonly evidenceIdUnique: true;
|
|
321
|
+
readonly evidenceReferences: readonly ["verification", "risks"];
|
|
322
|
+
readonly recordBindingReviewKind: "final-verification";
|
|
323
|
+
readonly recordBindingRequiredFields: readonly ["reviewedRecord", "reviewedRecordSha256"];
|
|
324
|
+
readonly recordBindingForbiddenUnderNoRecord: readonly ["reviewedRecord", "reviewedRecordSha256"];
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
export type SpecialistRole = keyof typeof SPECIALIST_RESULT_CONTRACT.roles;
|
|
328
|
+
export type OracleReviewKind = keyof typeof SPECIALIST_RESULT_CONTRACT.reviewKinds;
|
|
329
|
+
type SchemaValue<S> = S extends {
|
|
330
|
+
const: infer C;
|
|
331
|
+
} ? C : S extends {
|
|
332
|
+
enum: readonly (infer E)[];
|
|
333
|
+
} ? E : S extends {
|
|
334
|
+
type: 'object';
|
|
335
|
+
properties: infer P;
|
|
336
|
+
required: readonly string[];
|
|
337
|
+
} ? {
|
|
338
|
+
[K in keyof P]: SchemaValue<P[K]>;
|
|
339
|
+
} : S extends {
|
|
340
|
+
type: 'array';
|
|
341
|
+
items: infer I;
|
|
342
|
+
} ? SchemaValue<I>[] : S extends {
|
|
343
|
+
type: 'string';
|
|
344
|
+
} ? string : S extends {
|
|
345
|
+
type: 'number';
|
|
346
|
+
} ? number : S extends {
|
|
347
|
+
type: 'boolean';
|
|
348
|
+
} ? boolean : S extends {
|
|
349
|
+
type: readonly ['string', 'null'];
|
|
350
|
+
} ? string | null : never;
|
|
351
|
+
export type ResultCommon = SchemaValue<typeof common>;
|
|
352
|
+
export type OracleReview = {
|
|
353
|
+
[K in OracleReviewKind]: {
|
|
354
|
+
kind: K;
|
|
355
|
+
verdict: (typeof SPECIALIST_RESULT_CONTRACT.reviewKinds)[K]['verdicts'][number];
|
|
356
|
+
reviewedRecord?: string;
|
|
357
|
+
reviewedRecordSha256?: string;
|
|
358
|
+
};
|
|
359
|
+
}[OracleReviewKind];
|
|
360
|
+
export type SpecialistResult = ResultCommon & {
|
|
361
|
+
nextAction: string | null;
|
|
362
|
+
review: OracleReview;
|
|
363
|
+
};
|
|
364
|
+
/** Required field names for compact role-specific prompt rendering. */
|
|
365
|
+
export declare function getSpecialistResultFields(role: SpecialistRole): readonly string[];
|
|
366
|
+
export {};
|
|
@@ -227,7 +227,7 @@ export declare const SDD_PHASE_PROTOCOLS: readonly [{
|
|
|
227
227
|
readonly id: "plan-review";
|
|
228
228
|
readonly objective: "Offer optional independent blocker review after the ready plan.";
|
|
229
229
|
readonly requiredInputs: ["Ready substantial record", "Selected review disposition"];
|
|
230
|
-
readonly instructions: ["At ready, first show the user a concise plan summary (goal, acceptance, units, risks), then always offer “Review plan with Oracle (Recommended)” or “
|
|
230
|
+
readonly instructions: ["At ready, first show the user a concise plan summary (goal, acceptance, units, risks), then always offer “Review plan with Oracle (Recommended)” or “Proceed without review”; record the plan-review choice as EXPLICIT_REVIEW for an explicit review answer, EXPLICIT_SKIP for an explicit direct answer, or DEFAULT_REVIEW_AFTER_3 only when the third confirmed empty return selects review. Keep selection provenance separate from implementation authorization; silence never means EXPLICIT_SKIP.", "For every orchestrator choice with a meaningful safe recommendation, after its first and second confirmed empty native returns repeat the same question and do no dependent work; after the third confirmed empty native return choose the recommendation. Explicit answers and Stop win. Pending, unavailable, failed, interrupted or host-prohibited questions do not count. If higher-priority host or tool rules prevent asking or repeating, obey them and report the limitation rather than claiming three returns or an explicit selection.", "Never fabricate facts or secrets; recommend safe deferral when needed information or material intent is unresolved, and keep dependent work blocked.", "Review scope, approach, risks, and acceptance coverage without redesigning settled intent.", "Return actionable blockers and cautions; a pass is not implementation authorization or final verification.", "After [OKAY], preserve the separate Implement (Recommended) / Stop authorization decision; honor applicable prior explicit authorization, and let explicit Stop supersede it.", "A plan review does not substitute for fresh final verification."];
|
|
231
231
|
readonly outputSchema: ["status", "blockers", "cautions"];
|
|
232
232
|
readonly doneWhen: ["The selected review has a current, evidence-backed disposition."];
|
|
233
233
|
readonly blockingConditions: ["A blocking finding remains unresolved."];
|
|
@@ -14,11 +14,18 @@ export interface CodexPluginHookDefinition extends CodexHookValidationInput {
|
|
|
14
14
|
matcher?: string;
|
|
15
15
|
handler: CodexHookValidationInput['handler'] & {
|
|
16
16
|
command?: unknown;
|
|
17
|
+
commandWindows?: unknown;
|
|
18
|
+
timeout?: unknown;
|
|
19
|
+
additionalContextLimit?: unknown;
|
|
17
20
|
};
|
|
18
21
|
}
|
|
19
22
|
export interface CodexPluginPackageInput {
|
|
20
23
|
manifest: Record<string, unknown>;
|
|
21
24
|
assets?: CodexPluginPackageAsset[];
|
|
25
|
+
hookFiles?: {
|
|
26
|
+
path: string;
|
|
27
|
+
content: string;
|
|
28
|
+
}[];
|
|
22
29
|
}
|
|
23
30
|
export interface CodexPluginPackageResult {
|
|
24
31
|
artifacts: HarnessArtifact[];
|
|
@@ -11,6 +11,7 @@ export interface PiAgentDefinitionInput {
|
|
|
11
11
|
instructions: string;
|
|
12
12
|
model?: string;
|
|
13
13
|
effort?: string;
|
|
14
|
+
skills?: readonly string[];
|
|
14
15
|
subagentMode: 'task' | 'background';
|
|
15
16
|
}
|
|
16
17
|
export declare function getPiSpecialistDefaultTools(role: PiSpecialistRole): string[];
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
renderOpenCodeAgentConfigs,
|
|
4
4
|
spawn,
|
|
5
5
|
spawnSync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZLEMG37R.js";
|
|
7
7
|
import {
|
|
8
8
|
context7,
|
|
9
9
|
exa,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getOpenCodeConfigPaths,
|
|
15
15
|
loadPluginConfig,
|
|
16
16
|
stripJsonComments
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4DZSWTUM.js";
|
|
18
18
|
|
|
19
19
|
// src/index.ts
|
|
20
20
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
package/dist/pi.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
createPiToolsPanelAdapter,
|
|
5
5
|
renderPiRootInstructions,
|
|
6
6
|
syncPiSpecialists
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-P7R4GDSO.js";
|
|
8
8
|
import {
|
|
9
9
|
findPackageRoot
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4DZSWTUM.js";
|
|
11
11
|
|
|
12
12
|
// src/pi.ts
|
|
13
13
|
import { homedir } from "os";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thoth-agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Adaptive multi-harness orchestration with six roles, runtime-autonomous AI-first execution routes, and external provider boundaries.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
|
-
"build": "pnpm run integration:sync && tsup && tsc --emitDeclarationOnly && pnpm run generate-schema && pnpm run build:pi-extensions",
|
|
54
|
+
"build": "pnpm run generate:result-contract && pnpm run integration:sync && tsup && tsc --emitDeclarationOnly && pnpm run generate-schema && pnpm run build:pi-extensions",
|
|
55
|
+
"generate:result-contract": "tsx scripts/generate-result-contract.ts",
|
|
55
56
|
"generate-schema": "tsx scripts/generate-schema.ts",
|
|
56
57
|
"integration:sync": "tsx src/harness/generate-integration-packages.ts",
|
|
57
58
|
"integration:verify": "vitest run src/harness/generate-integration-packages.test.ts src/harness/integration-lifecycle.test.ts",
|
|
@@ -59,8 +60,9 @@
|
|
|
59
60
|
"setup:codex:local": "pnpm run build && tsx scripts/setup-codex-local.ts",
|
|
60
61
|
"setup:pi:local": "pnpm run build && node scripts/setup-pi-local.mjs",
|
|
61
62
|
"release:notes": "tsx scripts/generate-release-notes.ts",
|
|
62
|
-
"typecheck": "tsc --noEmit",
|
|
63
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.evals.json",
|
|
63
64
|
"test": "vitest run",
|
|
65
|
+
"eval:pi": "vitest run --config vitest.evals.live.config.ts --reporter=verbose --silent=false",
|
|
64
66
|
"test:pi-extensions": "node --test --test-timeout=110000 scripts/pi-extension-bundles.test.mjs",
|
|
65
67
|
"lint": "biome lint .",
|
|
66
68
|
"format": "biome format . --write",
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"owner": "thoth-agents",
|
|
4
4
|
"files": {
|
|
5
|
-
"agents/thoth-explorer.md": "
|
|
6
|
-
"agents/thoth-librarian.md": "
|
|
7
|
-
"agents/thoth-oracle.md": "
|
|
8
|
-
"agents/thoth-designer.md": "
|
|
9
|
-
"agents/thoth-worker.md": "
|
|
5
|
+
"agents/thoth-explorer.md": "ab198cc0daaa3d975d1b018098415fff3547462e842c07f279a4951f4013c068",
|
|
6
|
+
"agents/thoth-librarian.md": "c353faf5d84808a21b33ef57986acd9a2e2e37540538048afc97a22002cd48e4",
|
|
7
|
+
"agents/thoth-oracle.md": "0e682b7168aca7fa2f880ce79c39ff2f68cf5bc0ed5cd2b55d0861958fe14518",
|
|
8
|
+
"agents/thoth-designer.md": "d83b3fbcdbca611b208b7fd153a13535819388dce053b8c666d44f2dc22bfcae",
|
|
9
|
+
"agents/thoth-worker.md": "d60e4f9bdb9fe514bd7ef1ce05d7ab16653d56ec08a900497857fe561b48ef14"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: thoth-designer
|
|
3
|
-
description: "Own user-facing implementation choices and visual quality for UI work. Use when: User-facing UI/UX, interaction, accessibility, or visual quality is material. Do not use when: Not for backend-only, non-visual, or correctness-heavy cross-cutting work. Escalate when: Escalate coupled contracts, migrations, or high risk to worker. Mutation: only the assigned UI/UX decisions, implementation, and visual verification surface. Verification: includes visual verification when applicable Return: conclusion, evidence, verification, risks, openQuestions, nextAction."
|
|
3
|
+
description: "Own user-facing implementation choices and visual quality for UI work. Use when: User-facing UI/UX, interaction, accessibility, or visual quality is material. Do not use when: Not for backend-only, non-visual, or correctness-heavy cross-cutting work. Escalate when: Escalate coupled contracts, migrations, or high risk to worker. Mutation: only the assigned UI/UX decisions, implementation, and visual verification surface. Verification: includes visual verification when applicable Return: compact markdown fields: conclusion, evidence, verification, risks, openQuestions, nextAction, changedFiles."
|
|
4
4
|
tools: "read, bash, edit, write, grep, find, ls"
|
|
5
|
-
model: "openai-codex/gpt-6-
|
|
6
|
-
effort: "
|
|
5
|
+
model: "openai-codex/gpt-6-luna"
|
|
6
|
+
effort: "max"
|
|
7
7
|
subagent_mode: "background"
|
|
8
8
|
managed-by: thoth-agents
|
|
9
9
|
---
|
|
@@ -43,33 +43,28 @@ Own user-facing implementation choices and visual quality for UI work.
|
|
|
43
43
|
- Check relevant responsive and interaction states when feasible.
|
|
44
44
|
</rules>
|
|
45
45
|
|
|
46
|
-
- Do not delegate further
|
|
46
|
+
- Do not delegate further or call `todo`; root owns progress.
|
|
47
47
|
- Use terminating checks; avoid watch processes and indefinite waits.
|
|
48
|
-
- Preserve operator-selected model
|
|
48
|
+
- Preserve operator-selected model/effort. Stop after the assigned outcome and checks; never expand scope to fill a timeout.
|
|
49
49
|
- After two consecutive attempts without new evidence or progress, return partial evidence and the smallest blocker; do not repeat searches or unchanged failing commands.
|
|
50
|
-
- Use exact supplied skill paths
|
|
50
|
+
- Use the native skill catalog or exact supplied skill paths. If a skill named by the assignment or required by the current phase contract cannot be loaded, return a blocker instead of improvising; do not search the user home or install replacements.
|
|
51
51
|
- During edits use focused checks. Freeze relevant inputs before final validation; rerun only checks invalidated by later edits. Reuse fresh evidence for unchanged inputs, not full suites per child.
|
|
52
52
|
- Use native command completion; no status/log polling merely to wait. Batch independent short reads/checks when supported; no extra process wrappers.
|
|
53
53
|
- Reconcile owned background commands before returning. A late notification must preserve the substantive handoff, not replace it with a bare acknowledgment.
|
|
54
54
|
- Never discard or overwrite unrelated working-tree changes.
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
55
|
+
- `none`: no provider work; `recall`: bounded reads; `observe`: + bounded durable observation in scope.
|
|
56
|
+
- `recall`/`observe`: installed `thoth-mem` skill; do not invent provider mechanics/claim unconfirmed effects.
|
|
57
|
+
- Only dispatch identity, verbatim; never derive. If missing, report memory unavailable.
|
|
58
|
+
- MEMORY: no workspace mutation or root lifecycle/real-user-intent authority.
|
|
59
|
+
- `.thoth/`: work/specs/constitution/history—not provider memory; no artifact mirrors.
|
|
60
|
+
- Report unavailable/degraded/stale/contradictory/insufficient memory; continue unrelated safe work.
|
|
60
61
|
|
|
61
62
|
<questions>
|
|
62
63
|
Do not open a user dialog. Continue safe non-blocked work, then escalate the unresolved question to the root through openQuestions with the material choices and a recommended default.
|
|
63
64
|
</questions>
|
|
64
65
|
|
|
65
66
|
<return-contract>
|
|
66
|
-
Return
|
|
67
|
-
- conclusion
|
|
68
|
-
- evidence
|
|
69
|
-
- verification
|
|
70
|
-
- risks
|
|
71
|
-
- openQuestions
|
|
72
|
-
- nextAction
|
|
67
|
+
Return compact markdown fields (no JSON): conclusion, evidence, verification, risks, openQuestions, nextAction, changedFiles.
|
|
73
68
|
</return-contract>
|
|
74
69
|
|
|
75
70
|
Be concise. Return distilled evidence and outcomes, not raw logs or full-file dumps.
|
|
@@ -87,10 +82,10 @@ Be concise. Return distilled evidence and outcomes, not raw logs or full-file du
|
|
|
87
82
|
|
|
88
83
|
- Child tools are filtered by `tools`, configuration, `disallowed_tools`, and native `subagent_*` exclusions with runtime-verified registry filtering; behavioral role limits are instruction-level, not an OS or credential sandbox.
|
|
89
84
|
|
|
90
|
-
- When available, use `ask_orchestrator({
|
|
85
|
+
- When available, use `ask_orchestrator({ message: "…" })` only for material alignment or clarification ambiguity that blocks this assignment. Never use it as a substitute for your own discovery, to delegate, or to request other agents. Keep questions concise.
|
|
91
86
|
|
|
92
87
|
- A question waits for the root reply in this same session. If the tool is unavailable, use the return contract's `openQuestions`; continue safe non-blocked work without opening a user dialog.
|
|
93
88
|
|
|
94
|
-
- Optional brief `
|
|
89
|
+
- Optional brief `notify_orchestrator({ message: "…" })` progress/checkpoint updates return immediately, are recorded on this task, and do not trigger a root turn; root still owns progress tracking.
|
|
95
90
|
|
|
96
91
|
</role-operational-contract>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: thoth-explorer
|
|
3
|
-
description: "Resolve broad or uncertain repository questions and return distilled evidence. Use when: Local source, effective flow, responsibility, repository ownership, or behavior is unknown or uncertain. Do not use when: Not for implementation, edits, or known narrow questions. Escalate when: Send external evidence to librarian and mutation scope to root. Mutation: read-only; never mutate the workspace. Verification: reports inspected paths, confidence, and remaining gaps Return: conclusion, evidence, verification, risks, openQuestions."
|
|
4
|
-
tools: "read, bash, grep, find, ls"
|
|
3
|
+
description: "Resolve broad or uncertain repository questions and return distilled evidence. Use when: Local source, effective flow, responsibility, repository ownership, or behavior is unknown or uncertain. Do not use when: Not for implementation, edits, or known narrow questions. Escalate when: Send external evidence to librarian and mutation scope to root. Mutation: read-only; never mutate the workspace. Verification: reports inspected paths, confidence, and remaining gaps Return: compact markdown fields: conclusion, evidence, verification, risks, openQuestions."
|
|
4
|
+
tools: "read, bash, grep, find, ls, codemode"
|
|
5
5
|
model: "openai-codex/gpt-6-luna"
|
|
6
|
-
effort: "
|
|
6
|
+
effort: "max"
|
|
7
7
|
subagent_mode: "background"
|
|
8
8
|
managed-by: thoth-agents
|
|
9
9
|
---
|
|
@@ -47,32 +47,28 @@ Resolve broad or uncertain repository questions and return distilled evidence.
|
|
|
47
47
|
- Return any open question you cannot settle through openQuestions as the question, the possible options and the facts for each option, without recommending one. Root decides or asks Oracle.
|
|
48
48
|
</evidence-only>
|
|
49
49
|
|
|
50
|
-
- Do not delegate further
|
|
50
|
+
- Do not delegate further or call `todo`; root owns progress.
|
|
51
51
|
- Use terminating checks; avoid watch processes and indefinite waits.
|
|
52
|
-
- Preserve operator-selected model
|
|
52
|
+
- Preserve operator-selected model/effort. Stop after the assigned outcome and checks; never expand scope to fill a timeout.
|
|
53
53
|
- After two consecutive attempts without new evidence or progress, return partial evidence and the smallest blocker; do not repeat searches or unchanged failing commands.
|
|
54
|
-
- Use exact supplied skill paths
|
|
54
|
+
- Use the native skill catalog or exact supplied skill paths. If a skill named by the assignment or required by the current phase contract cannot be loaded, return a blocker instead of improvising; do not search the user home or install replacements.
|
|
55
55
|
- During edits use focused checks. Freeze relevant inputs before final validation; rerun only checks invalidated by later edits. Reuse fresh evidence for unchanged inputs, not full suites per child.
|
|
56
56
|
- Use native command completion; no status/log polling merely to wait. Batch independent short reads/checks when supported; no extra process wrappers.
|
|
57
57
|
- Reconcile owned background commands before returning. A late notification must preserve the substantive handoff, not replace it with a bare acknowledgment.
|
|
58
58
|
- Never discard or overwrite unrelated working-tree changes.
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
59
|
+
- `none`: no provider work; `recall`: bounded reads; `observe`: + bounded durable observation in scope.
|
|
60
|
+
- `recall`/`observe`: installed `thoth-mem` skill; do not invent provider mechanics/claim unconfirmed effects.
|
|
61
|
+
- Only dispatch identity, verbatim; never derive. If missing, report memory unavailable.
|
|
62
|
+
- MEMORY: no workspace mutation or root lifecycle/real-user-intent authority.
|
|
63
|
+
- `.thoth/`: work/specs/constitution/history—not provider memory; no artifact mirrors.
|
|
64
|
+
- Report unavailable/degraded/stale/contradictory/insufficient memory; continue unrelated safe work.
|
|
64
65
|
|
|
65
66
|
<questions>
|
|
66
67
|
Do not open a user dialog. Continue safe non-blocked work, then escalate the unresolved question to the root through openQuestions as the question, the possible options and the facts for each option, without recommending one.
|
|
67
68
|
</questions>
|
|
68
69
|
|
|
69
70
|
<return-contract>
|
|
70
|
-
Return
|
|
71
|
-
- conclusion
|
|
72
|
-
- evidence
|
|
73
|
-
- verification
|
|
74
|
-
- risks
|
|
75
|
-
- openQuestions
|
|
71
|
+
Return compact markdown fields (no JSON): conclusion, evidence, verification, risks, openQuestions.
|
|
76
72
|
</return-contract>
|
|
77
73
|
|
|
78
74
|
Be concise. Return distilled evidence and outcomes, not raw logs or full-file dumps.
|
|
@@ -90,11 +86,11 @@ Be concise. Return distilled evidence and outcomes, not raw logs or full-file du
|
|
|
90
86
|
|
|
91
87
|
- Child tools are filtered by `tools`, configuration, `disallowed_tools`, and native `subagent_*` exclusions with runtime-verified registry filtering; behavioral role limits are instruction-level, not an OS or credential sandbox.
|
|
92
88
|
|
|
93
|
-
- When available, use `ask_orchestrator({
|
|
89
|
+
- When available, use `ask_orchestrator({ message: "…" })` only for material alignment or clarification ambiguity that blocks this assignment. Never use it as a substitute for your own discovery, to delegate, or to request other agents. Keep questions concise.
|
|
94
90
|
|
|
95
91
|
- A question waits for the root reply in this same session. If the tool is unavailable, use the return contract's `openQuestions`; continue safe non-blocked work without opening a user dialog.
|
|
96
92
|
|
|
97
|
-
- Optional brief `
|
|
93
|
+
- Optional brief `notify_orchestrator({ message: "…" })` progress/checkpoint updates return immediately, are recorded on this task, and do not trigger a root turn; root still owns progress tracking.
|
|
98
94
|
|
|
99
95
|
- Questions and progress report facts only: include options and evidence without recommending fixes, designs, defaults, or next actions.
|
|
100
96
|
|