thoth-agents 0.5.1 → 0.7.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 +88 -11
- package/dist/agents/prompt-dialects.d.ts +1 -0
- package/dist/{chunk-MRFCA3U2.js → chunk-3MHJGWS4.js} +2 -1
- package/dist/{chunk-V7HSGRMB.js → chunk-P3GDM5RH.js} +70 -174
- package/dist/{chunk-OW6I7ZUU.js → chunk-QOIZYJ5C.js} +322 -151
- package/dist/{chunk-VUNYH263.js → chunk-W5TSNGEE.js} +263 -44
- package/dist/cli/index.js +4 -4
- package/dist/cli/pi-install.d.ts +35 -67
- package/dist/cli/pi-tool-config.d.ts +19 -0
- package/dist/cli/tui/index.js +3 -3
- 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/core/agent-pack.d.ts +6 -2
- package/dist/harness/core/result-contract.d.ts +366 -0
- package/dist/harness/core/sdd.d.ts +1 -1
- package/dist/harness/writers/pi-agent.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/pi.d.ts +6 -35
- package/dist/pi.js +37 -433
- 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/plugin.json +1 -1
- 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/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
- package/dist/pi/tools-panel.d.ts +0 -51
package/dist/cli/pi-install.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import { type PiExternalPackageEvidence, type PiExternalPackageSpec } from './pi-external-package';
|
|
1
2
|
import { type PiPackageReceipt, type PiPackageReceiptOptions } from './pi-package-receipt';
|
|
2
3
|
import { type PiPathOptions, type PiPaths } from './pi-paths';
|
|
3
4
|
export declare const PI_MINIMUM_VERSION = "0.99.0";
|
|
4
5
|
export declare const PI_NODE_MINIMUM = "22.19.0";
|
|
5
6
|
export declare const PI_COMMAND_TIMEOUT_MS = 120000;
|
|
7
|
+
export interface PiSetupPackageSpec extends PiExternalPackageSpec {
|
|
8
|
+
id: string;
|
|
9
|
+
preserveUserCopy?: boolean;
|
|
10
|
+
}
|
|
6
11
|
export declare const PI_PACKAGE_SPECS: readonly [{
|
|
7
12
|
readonly id: "delegation";
|
|
8
|
-
readonly source: "npm:@thoth-agents/pi-subagents@>=0.
|
|
13
|
+
readonly source: "npm:@thoth-agents/pi-subagents@>=0.3.0";
|
|
9
14
|
readonly packageName: "@thoth-agents/pi-subagents";
|
|
10
|
-
readonly version: "0.
|
|
15
|
+
readonly version: "0.3.0";
|
|
11
16
|
}, {
|
|
12
17
|
readonly id: "context7";
|
|
13
18
|
readonly source: "npm:@upstash/context7-pi@>=0.1.2";
|
|
@@ -25,14 +30,32 @@ export declare const PI_PACKAGE_SPECS: readonly [{
|
|
|
25
30
|
readonly version: "2.32.1";
|
|
26
31
|
}, {
|
|
27
32
|
readonly id: "ask-user-question";
|
|
28
|
-
readonly source: "npm:@thoth-agents/pi-questions-user@>=0.
|
|
33
|
+
readonly source: "npm:@thoth-agents/pi-questions-user@>=0.3.0";
|
|
29
34
|
readonly packageName: "@thoth-agents/pi-questions-user";
|
|
30
|
-
readonly version: "0.
|
|
35
|
+
readonly version: "0.3.0";
|
|
31
36
|
}, {
|
|
32
37
|
readonly id: "todo";
|
|
33
|
-
readonly source: "npm:@thoth-agents/pi-todo@>=0.
|
|
38
|
+
readonly source: "npm:@thoth-agents/pi-todo@>=0.3.0";
|
|
34
39
|
readonly packageName: "@thoth-agents/pi-todo";
|
|
35
|
-
readonly version: "0.
|
|
40
|
+
readonly version: "0.3.0";
|
|
41
|
+
}, {
|
|
42
|
+
readonly id: "theme";
|
|
43
|
+
readonly source: "npm:@thoth-agents/pi-thoth-theme@>=0.3.0";
|
|
44
|
+
readonly packageName: "@thoth-agents/pi-thoth-theme";
|
|
45
|
+
readonly version: "0.3.0";
|
|
46
|
+
readonly preserveUserCopy: true;
|
|
47
|
+
}, {
|
|
48
|
+
readonly id: "background-tasks";
|
|
49
|
+
readonly source: "npm:@thoth-agents/pi-background-tasks@>=0.3.0";
|
|
50
|
+
readonly packageName: "@thoth-agents/pi-background-tasks";
|
|
51
|
+
readonly version: "0.3.0";
|
|
52
|
+
readonly preserveUserCopy: true;
|
|
53
|
+
}, {
|
|
54
|
+
readonly id: "sidebar";
|
|
55
|
+
readonly source: "npm:@thoth-agents/pi-sidebar@>=0.3.0";
|
|
56
|
+
readonly packageName: "@thoth-agents/pi-sidebar";
|
|
57
|
+
readonly version: "0.3.0";
|
|
58
|
+
readonly preserveUserCopy: true;
|
|
36
59
|
}];
|
|
37
60
|
export declare const PI_GREP_MCP_ENTRY: {
|
|
38
61
|
readonly url: "https://mcp.grep.app";
|
|
@@ -114,68 +137,11 @@ export declare function verifyPiFirstPartyPackage(input: {
|
|
|
114
137
|
error: string;
|
|
115
138
|
};
|
|
116
139
|
export declare function isPiIncumbentDelegationSource(source: string): boolean;
|
|
117
|
-
export declare function getPiExternalPackageSpecs(options?: Pick<PiSetupOptions, 'runtimePackageRoot'>): readonly [
|
|
118
|
-
|
|
119
|
-
readonly source: "npm:@thoth-agents/pi-subagents@>=0.1.0";
|
|
120
|
-
readonly packageName: "@thoth-agents/pi-subagents";
|
|
121
|
-
readonly version: "0.1.0";
|
|
122
|
-
}, {
|
|
123
|
-
readonly id: "context7";
|
|
124
|
-
readonly source: "npm:@upstash/context7-pi@>=0.1.2";
|
|
125
|
-
readonly packageName: "@upstash/context7-pi";
|
|
126
|
-
readonly version: "0.1.2";
|
|
127
|
-
}, {
|
|
128
|
-
readonly id: "web-access";
|
|
129
|
-
readonly source: "npm:pi-web-access@>=0.27.0";
|
|
130
|
-
readonly packageName: "pi-web-access";
|
|
131
|
-
readonly version: "0.27.0";
|
|
132
|
-
}, {
|
|
133
|
-
readonly id: "grep-adapter";
|
|
134
|
-
readonly source: "npm:pi-mcp-adapter@>=2.32.1";
|
|
135
|
-
readonly packageName: "pi-mcp-adapter";
|
|
136
|
-
readonly version: "2.32.1";
|
|
137
|
-
}, {
|
|
138
|
-
readonly id: "ask-user-question";
|
|
139
|
-
readonly source: "npm:@thoth-agents/pi-questions-user@>=0.1.0";
|
|
140
|
-
readonly packageName: "@thoth-agents/pi-questions-user";
|
|
141
|
-
readonly version: "0.1.0";
|
|
142
|
-
}, {
|
|
143
|
-
readonly id: "todo";
|
|
144
|
-
readonly source: "npm:@thoth-agents/pi-todo@>=0.1.0";
|
|
145
|
-
readonly packageName: "@thoth-agents/pi-todo";
|
|
146
|
-
readonly version: "0.1.0";
|
|
147
|
-
}] | ({
|
|
148
|
-
readonly id: "context7";
|
|
149
|
-
readonly source: "npm:@upstash/context7-pi@>=0.1.2";
|
|
150
|
-
readonly packageName: "@upstash/context7-pi";
|
|
151
|
-
readonly version: "0.1.2";
|
|
152
|
-
} | {
|
|
153
|
-
readonly id: "web-access";
|
|
154
|
-
readonly source: "npm:pi-web-access@>=0.27.0";
|
|
155
|
-
readonly packageName: "pi-web-access";
|
|
156
|
-
readonly version: "0.27.0";
|
|
157
|
-
} | {
|
|
158
|
-
readonly id: "grep-adapter";
|
|
159
|
-
readonly source: "npm:pi-mcp-adapter@>=2.32.1";
|
|
160
|
-
readonly packageName: "pi-mcp-adapter";
|
|
161
|
-
readonly version: "2.32.1";
|
|
162
|
-
} | {
|
|
163
|
-
readonly id: "ask-user-question";
|
|
164
|
-
readonly source: "npm:@thoth-agents/pi-questions-user@>=0.1.0";
|
|
165
|
-
readonly packageName: "@thoth-agents/pi-questions-user";
|
|
166
|
-
readonly version: "0.1.0";
|
|
167
|
-
} | {
|
|
168
|
-
readonly id: "todo";
|
|
169
|
-
readonly source: "npm:@thoth-agents/pi-todo@>=0.1.0";
|
|
170
|
-
readonly packageName: "@thoth-agents/pi-todo";
|
|
171
|
-
readonly version: "0.1.0";
|
|
172
|
-
} | {
|
|
173
|
-
source: string;
|
|
174
|
-
id: "delegation";
|
|
175
|
-
packageName: "@thoth-agents/pi-subagents";
|
|
176
|
-
version: "0.1.0";
|
|
177
|
-
})[];
|
|
140
|
+
export declare function getPiExternalPackageSpecs(options?: Pick<PiSetupOptions, 'runtimePackageRoot'>): readonly PiSetupPackageSpec[];
|
|
141
|
+
export declare function inspectPiSetupPackage(packages: readonly PiConfiguredPackage[], spec: PiSetupPackageSpec, requireManagedSource?: boolean): PiExternalPackageEvidence;
|
|
178
142
|
export declare function piIncumbentTodoRecovery(source: string, scope: PiConfiguredPackage['scope'], identityLimitation?: string, unmappedSource?: boolean): string;
|
|
143
|
+
export declare function resolvePiPreservationPackages(output: string, options: PiSetupOptions): PiConfiguredPackage[];
|
|
144
|
+
export declare function mergePiCodemodeSettings(current: Record<string, unknown>): Record<string, unknown>;
|
|
179
145
|
export declare function mergePiSubagentsConfig(current: Record<string, unknown>): Record<string, unknown>;
|
|
180
146
|
export declare function mergePiGrepMcpConfig(current: Record<string, unknown>): Record<string, unknown>;
|
|
181
147
|
export declare function mergePiRootBlock(current: string, managedBlock: string): string;
|
|
@@ -190,6 +156,8 @@ export interface PiConfiguredPackage {
|
|
|
190
156
|
packageName?: string;
|
|
191
157
|
packageVersion?: string;
|
|
192
158
|
identityLimitation?: string;
|
|
159
|
+
/** Scoped settings explicitly disable extensions and select only resources. */
|
|
160
|
+
resourceOnly?: boolean;
|
|
193
161
|
/** Directory-only evidence; source is a display path, not a removal source. */
|
|
194
162
|
unmappedSource?: boolean;
|
|
195
163
|
}
|
|
@@ -30,3 +30,22 @@ export declare function validatePiSpecialistTools(tools: readonly string[]): voi
|
|
|
30
30
|
export declare function readPiSpecialistToolOverrides(content: string): PiSpecialistToolOverrides;
|
|
31
31
|
export declare function readPiToolConfig(piRoot: string, roles?: readonly PiSpecialistRole[]): PiToolConfigSnapshot;
|
|
32
32
|
export declare function savePiToolConfig(snapshot: PiToolConfigSnapshot, roles: readonly PiToolRoleInput[]): PiToolSaveResult;
|
|
33
|
+
/** Structural pi-subagents v1 adapter; root has no dependency on its runtime. */
|
|
34
|
+
export declare function createPiToolsPanelAdapter(piRoot: string): {
|
|
35
|
+
version: 1;
|
|
36
|
+
appliesTo(target: {
|
|
37
|
+
role: string;
|
|
38
|
+
filePath: string;
|
|
39
|
+
scope: "global" | "project";
|
|
40
|
+
}, content: string): boolean;
|
|
41
|
+
validate(target: {
|
|
42
|
+
role: string;
|
|
43
|
+
filePath: string;
|
|
44
|
+
scope: "global" | "project";
|
|
45
|
+
}, content: string): void;
|
|
46
|
+
defaultTools(target: {
|
|
47
|
+
role: string;
|
|
48
|
+
filePath: string;
|
|
49
|
+
scope: "global" | "project";
|
|
50
|
+
}, content: string): string[];
|
|
51
|
+
};
|
package/dist/cli/tui/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
defaultTuiOperations,
|
|
3
3
|
effortChoicesForModel,
|
|
4
4
|
listOperationHarnesses
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-W5TSNGEE.js";
|
|
6
6
|
import "../../chunk-62L3ORXN.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-P3GDM5RH.js";
|
|
8
|
+
import "../../chunk-QOIZYJ5C.js";
|
|
9
9
|
|
|
10
10
|
// src/cli/tui/index.tsx
|
|
11
11
|
import { render } from "ink";
|
|
@@ -4,7 +4,8 @@ export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle"
|
|
|
4
4
|
export declare const ORCHESTRATOR_NAME: "orchestrator";
|
|
5
5
|
export declare const ALL_AGENT_NAMES: readonly BuiltinAgentName[];
|
|
6
6
|
export declare const SUBAGENT_DELEGATION_RULES: Record<AgentName, readonly string[]>;
|
|
7
|
-
|
|
7
|
+
/** Previous shipped defaults, retained only for upgrade comparison. */
|
|
8
|
+
export declare const LEGACY_OPENAI_PRESET: {
|
|
8
9
|
readonly explorer: {
|
|
9
10
|
readonly model: "gpt-6-luna";
|
|
10
11
|
readonly effort: "low";
|
|
@@ -25,10 +26,36 @@ export declare const CONFIRMED_OPENAI_SUBAGENT_PRESET: {
|
|
|
25
26
|
readonly model: "gpt-6-luna";
|
|
26
27
|
readonly effort: "max";
|
|
27
28
|
};
|
|
29
|
+
readonly orchestrator: {
|
|
30
|
+
readonly model: "gpt-6-sol";
|
|
31
|
+
readonly effort: "xhigh";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const CONFIRMED_OPENAI_SUBAGENT_PRESET: {
|
|
35
|
+
readonly explorer: {
|
|
36
|
+
readonly model: "gpt-6-luna";
|
|
37
|
+
readonly effort: "max";
|
|
38
|
+
};
|
|
39
|
+
readonly librarian: {
|
|
40
|
+
readonly model: "gpt-6-luna";
|
|
41
|
+
readonly effort: "max";
|
|
42
|
+
};
|
|
43
|
+
readonly oracle: {
|
|
44
|
+
readonly model: "gpt-6.1-sol";
|
|
45
|
+
readonly effort: "xhigh";
|
|
46
|
+
};
|
|
47
|
+
readonly designer: {
|
|
48
|
+
readonly model: "gpt-6-luna";
|
|
49
|
+
readonly effort: "max";
|
|
50
|
+
};
|
|
51
|
+
readonly worker: {
|
|
52
|
+
readonly model: "gpt-6-luna";
|
|
53
|
+
readonly effort: "max";
|
|
54
|
+
};
|
|
28
55
|
};
|
|
29
56
|
export declare const OPENCODE_OPENAI_ORCHESTRATOR_PRESET: {
|
|
30
|
-
readonly model: "gpt-6-sol";
|
|
31
|
-
readonly effort: "
|
|
57
|
+
readonly model: "gpt-6.1-sol";
|
|
58
|
+
readonly effort: "high";
|
|
32
59
|
};
|
|
33
60
|
export declare const DEFAULT_MODELS: Record<AgentName, string | undefined>;
|
|
34
61
|
export declare function getDefaultOpenCodeModel(name: BuiltinAgentName): string;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export declare const AgentOverrideConfigSchema: z.ZodObject<{
|
|
|
54
54
|
id: z.ZodString;
|
|
55
55
|
variant: z.ZodOptional<z.ZodString>;
|
|
56
56
|
}, z.core.$strip>]>>]>>;
|
|
57
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
58
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
58
59
|
steps: z.ZodOptional<z.ZodNumber>;
|
|
59
60
|
variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
@@ -89,6 +90,7 @@ export declare const PresetSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
89
90
|
id: z.ZodString;
|
|
90
91
|
variant: z.ZodOptional<z.ZodString>;
|
|
91
92
|
}, z.core.$strip>]>>]>>;
|
|
93
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
94
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
93
95
|
steps: z.ZodOptional<z.ZodNumber>;
|
|
94
96
|
variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
@@ -180,6 +182,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
180
182
|
id: z.ZodString;
|
|
181
183
|
variant: z.ZodOptional<z.ZodString>;
|
|
182
184
|
}, z.core.$strip>]>>]>>;
|
|
185
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
183
186
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
184
187
|
steps: z.ZodOptional<z.ZodNumber>;
|
|
185
188
|
variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
@@ -189,6 +192,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
189
192
|
id: z.ZodString;
|
|
190
193
|
variant: z.ZodOptional<z.ZodString>;
|
|
191
194
|
}, z.core.$strip>]>>]>>;
|
|
195
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
196
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
193
197
|
steps: z.ZodOptional<z.ZodNumber>;
|
|
194
198
|
variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
@@ -13,7 +13,7 @@ export declare const CLAUDE_CODE_SUBAGENT_DEFAULT_MODELS: {
|
|
|
13
13
|
readonly worker: "sonnet";
|
|
14
14
|
};
|
|
15
15
|
export declare const CLAUDE_CODE_SUBAGENT_DEFAULT_EFFORTS: {
|
|
16
|
-
readonly explorer: "
|
|
16
|
+
readonly explorer: "medium";
|
|
17
17
|
readonly designer: "medium";
|
|
18
18
|
readonly worker: "medium";
|
|
19
19
|
readonly librarian: "high";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { OracleReview, OracleReviewKind, ResultCommon, SpecialistResult, SpecialistRole, } from './result-contract';
|
|
2
|
+
export { getSpecialistResultFields, SPECIALIST_RESULT_CONTRACT, } from './result-contract';
|
|
1
3
|
export type AgentRoleName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | 'worker';
|
|
2
4
|
export type AgentMutationMode = 'adaptive-root' | 'read-only' | 'write-capable';
|
|
3
5
|
export type AgentDispatchMethod = 'root-coordinator' | 'task';
|
|
@@ -151,11 +153,13 @@ export declare const AGENT_RETURN_CONTRACT: {
|
|
|
151
153
|
readonly explorer: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions"];
|
|
152
154
|
readonly librarian: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions"];
|
|
153
155
|
readonly oracle: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
|
|
154
|
-
readonly designer: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
|
|
155
|
-
readonly worker: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction"];
|
|
156
|
+
readonly designer: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction", "changedFiles"];
|
|
157
|
+
readonly worker: readonly ["conclusion", "evidence", "verification", "risks", "openQuestions", "nextAction", "changedFiles"];
|
|
156
158
|
};
|
|
157
159
|
export declare const VERIFICATION_PROTOCOL: readonly ["Completion reports identify changed files and verification evidence.", "Behavior changes receive the smallest sufficient automated check or a declared manual check.", "Visual changes receive designer-owned visual QA when applicable."];
|
|
158
160
|
export declare const AGENT_PACK_CONTRACT: AgentPackContract;
|
|
159
161
|
export declare function getAgentRole(name: AgentRoleName): AgentRoleContract;
|
|
162
|
+
/** Keep non-gate returns independent of the Oracle validator contract. */
|
|
163
|
+
export declare function renderSpecialistResultContract(role: Exclude<AgentRoleName, 'orchestrator'>): string;
|
|
160
164
|
export declare function renderAgentRoutingDescription(role: AgentRoleContract): string;
|
|
161
165
|
export declare function getAgentPackContract(): AgentPackContract;
|
|
@@ -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."];
|