thoth-agents 0.6.0 → 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 +7 -1
- package/dist/agents/prompt-dialects.d.ts +1 -0
- package/dist/{chunk-MRFCA3U2.js → chunk-3MHJGWS4.js} +2 -1
- package/dist/{chunk-U7FNFTM5.js → chunk-P3GDM5RH.js} +39 -38
- package/dist/{chunk-OW6I7ZUU.js → chunk-QOIZYJ5C.js} +322 -151
- package/dist/{chunk-7YCSKK2X.js → chunk-W5TSNGEE.js} +61 -5
- package/dist/cli/index.js +4 -4
- package/dist/cli/pi-install.d.ts +1 -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.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/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
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
savePiModelConfig,
|
|
17
17
|
syncPiSpecialists,
|
|
18
18
|
writePiManagedText
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-P3GDM5RH.js";
|
|
20
20
|
import {
|
|
21
21
|
ALL_AGENT_NAMES,
|
|
22
22
|
CLAUDE_CODE_PROMPT_DIALECT,
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
CODEX_PROMPT_DIALECT,
|
|
25
25
|
CONFIRMED_OPENAI_SUBAGENT_PRESET,
|
|
26
26
|
DEFAULT_MODELS,
|
|
27
|
+
LEGACY_OPENAI_PRESET,
|
|
27
28
|
PI_SPECIALIST_ROLES,
|
|
28
29
|
SUBAGENT_NAMES,
|
|
29
30
|
claudeCodeSubagentType,
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
updateOpenCodeMainConfig,
|
|
48
49
|
writeConfig,
|
|
49
50
|
writeLiteConfig
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QOIZYJ5C.js";
|
|
51
52
|
|
|
52
53
|
// src/cli/codex-paths.ts
|
|
53
54
|
import { homedir } from "os";
|
|
@@ -1759,6 +1760,22 @@ function resolveRoleTomlContent(options) {
|
|
|
1759
1760
|
const installedContent = readFileSync4(options.targetPath, "utf8");
|
|
1760
1761
|
const currentModel = parseRoleTomlModel(installedContent);
|
|
1761
1762
|
const currentEffort = parseRoleTomlEffort(installedContent);
|
|
1763
|
+
const legacy = LEGACY_OPENAI_PRESET[options.role];
|
|
1764
|
+
if (currentModel === legacy.model && currentEffort === legacy.effort) {
|
|
1765
|
+
options.nextState.models[key] = renderedModel;
|
|
1766
|
+
if (configuredModel !== void 0) {
|
|
1767
|
+
options.nextState.configuredModels ??= {};
|
|
1768
|
+
options.nextState.configuredModels[key] = renderedModel;
|
|
1769
|
+
}
|
|
1770
|
+
if (configuredEffort !== void 0) {
|
|
1771
|
+
options.nextState.configuredEfforts ??= {};
|
|
1772
|
+
const renderedEffort = parseRoleTomlEffort(options.renderedContent);
|
|
1773
|
+
if (renderedEffort !== void 0)
|
|
1774
|
+
options.nextState.configuredEfforts[key] = renderedEffort;
|
|
1775
|
+
else delete options.nextState.configuredEfforts[key];
|
|
1776
|
+
}
|
|
1777
|
+
return options.renderedContent;
|
|
1778
|
+
}
|
|
1762
1779
|
if (configuredModel !== void 0) {
|
|
1763
1780
|
options.nextState.models[key] = renderedModel;
|
|
1764
1781
|
options.nextState.configuredModels ??= {};
|
|
@@ -1782,7 +1799,10 @@ function resolveRoleTomlContent(options) {
|
|
|
1782
1799
|
);
|
|
1783
1800
|
}
|
|
1784
1801
|
options.nextState.models[key] = renderedModel;
|
|
1785
|
-
return replaceRoleTomlEffort(
|
|
1802
|
+
return replaceRoleTomlEffort(
|
|
1803
|
+
currentModel === void 0 ? options.renderedContent : replaceRoleTomlModel(options.renderedContent, currentModel),
|
|
1804
|
+
currentEffort
|
|
1805
|
+
);
|
|
1786
1806
|
}
|
|
1787
1807
|
function roleArtifactContent(role, artifacts) {
|
|
1788
1808
|
const path = `.codex/agents/thoth-agents-${role}.toml`;
|
|
@@ -1827,6 +1847,7 @@ function buildCodexSetupPlan(config) {
|
|
|
1827
1847
|
roleArtifactContent(target.role, render.artifacts)
|
|
1828
1848
|
),
|
|
1829
1849
|
content: resolveRoleTomlContent({
|
|
1850
|
+
role: target.role,
|
|
1830
1851
|
renderedContent: roleArtifactContent(target.role, render.artifacts),
|
|
1831
1852
|
targetPath: target.path,
|
|
1832
1853
|
state: managedModelState2,
|
|
@@ -2150,7 +2171,7 @@ var CLAUDE_CODE_SUBAGENT_DEFAULT_MODELS = {
|
|
|
2150
2171
|
worker: "sonnet"
|
|
2151
2172
|
};
|
|
2152
2173
|
var CLAUDE_CODE_SUBAGENT_DEFAULT_EFFORTS = {
|
|
2153
|
-
explorer: "
|
|
2174
|
+
explorer: "medium",
|
|
2154
2175
|
designer: "medium",
|
|
2155
2176
|
worker: "medium",
|
|
2156
2177
|
librarian: "high",
|
|
@@ -8424,6 +8445,29 @@ function scanPiProjectInstalledIncumbents(options, configuredPackages) {
|
|
|
8424
8445
|
}
|
|
8425
8446
|
return incumbents;
|
|
8426
8447
|
}
|
|
8448
|
+
function mergePiCodemodeSettings(current) {
|
|
8449
|
+
const tools = current.defaultTools;
|
|
8450
|
+
if (tools !== void 0 && (!Array.isArray(tools) || tools.some((tool) => typeof tool !== "string")))
|
|
8451
|
+
throw new Error("Global Pi defaultTools must be an array of strings.");
|
|
8452
|
+
if (current.codemode !== void 0 && !isRecord6(current.codemode))
|
|
8453
|
+
throw new Error("Global Pi codemode must be a JSON object.");
|
|
8454
|
+
const codemode = isRecord6(current.codemode) ? current.codemode : {};
|
|
8455
|
+
let defaultTools = tools ?? ["+codemode"];
|
|
8456
|
+
if (!defaultTools.some(
|
|
8457
|
+
(tool) => ["codemode", "+codemode", "-codemode"].includes(tool)
|
|
8458
|
+
)) {
|
|
8459
|
+
const additive = defaultTools.length > 0 && defaultTools.every((tool) => /^[+-]/.test(tool));
|
|
8460
|
+
defaultTools = [...defaultTools, additive ? "+codemode" : "codemode"];
|
|
8461
|
+
}
|
|
8462
|
+
return {
|
|
8463
|
+
...current,
|
|
8464
|
+
defaultTools,
|
|
8465
|
+
codemode: {
|
|
8466
|
+
...codemode,
|
|
8467
|
+
...codemode.mode === void 0 ? { mode: "on" } : {}
|
|
8468
|
+
}
|
|
8469
|
+
};
|
|
8470
|
+
}
|
|
8427
8471
|
function mergePiSubagentsConfig(current) {
|
|
8428
8472
|
return {
|
|
8429
8473
|
...current,
|
|
@@ -8520,10 +8564,13 @@ function buildPiSetupPlan(options = {}) {
|
|
|
8520
8564
|
}
|
|
8521
8565
|
let userPackages = [];
|
|
8522
8566
|
let plannedQuestionRemovals = [];
|
|
8567
|
+
let codemodeSettingsContent;
|
|
8523
8568
|
let subagentsConfigContent;
|
|
8524
8569
|
let mcpContent;
|
|
8525
8570
|
try {
|
|
8526
8571
|
const userSettings = readJsonObject(paths.settingsPath);
|
|
8572
|
+
codemodeSettingsContent = `${JSON.stringify(mergePiCodemodeSettings(userSettings), null, 2)}
|
|
8573
|
+
`;
|
|
8527
8574
|
const incumbentSource = configuredPackageSource(
|
|
8528
8575
|
userSettings,
|
|
8529
8576
|
isPiIncumbentDelegationSource
|
|
@@ -8649,6 +8696,14 @@ function buildPiSetupPlan(options = {}) {
|
|
|
8649
8696
|
target: pkg.source,
|
|
8650
8697
|
command: { command: "pi", args: ["install", pkg.source, "--no-approve"] }
|
|
8651
8698
|
})),
|
|
8699
|
+
...codemodeSettingsContent === void 0 ? [] : [
|
|
8700
|
+
{
|
|
8701
|
+
kind: "settings",
|
|
8702
|
+
description: "Fill absent global codemode defaults",
|
|
8703
|
+
target: paths.settingsPath,
|
|
8704
|
+
content: codemodeSettingsContent
|
|
8705
|
+
}
|
|
8706
|
+
],
|
|
8652
8707
|
...subagentsConfigContent === void 0 ? [] : [
|
|
8653
8708
|
{
|
|
8654
8709
|
kind: "settings",
|
|
@@ -9320,7 +9375,8 @@ function applyPiSetup(plan) {
|
|
|
9320
9375
|
for (const item of plan.items.filter(
|
|
9321
9376
|
(candidate) => candidate.content !== void 0 && (candidate.kind === "settings" || candidate.kind === "mcp")
|
|
9322
9377
|
)) {
|
|
9323
|
-
const content = item.target === plan.paths.
|
|
9378
|
+
const content = item.target === plan.paths.settingsPath ? `${JSON.stringify(mergePiCodemodeSettings(readJsonObject(item.target)), null, 2)}
|
|
9379
|
+
` : item.target === plan.paths.subagentsConfigPath ? `${JSON.stringify(mergePiSubagentsConfig(readJsonObject(item.target)), null, 2)}
|
|
9324
9380
|
` : item.target === plan.paths.mcpConfigPath ? `${JSON.stringify(mergePiGrepMcpConfig(readJsonObject(item.target)), null, 2)}
|
|
9325
9381
|
` : item.content ?? "";
|
|
9326
9382
|
if (writePiManagedText(item.target, content)) changed.push(item.target);
|
package/dist/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getOpenCodeVersion,
|
|
5
5
|
isOpenCodeInstalled,
|
|
6
6
|
opencodeAdapter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-3MHJGWS4.js";
|
|
8
8
|
import {
|
|
9
9
|
CODEX_ROLE_NAMES,
|
|
10
10
|
REQUIRED_SKILLS,
|
|
@@ -59,11 +59,11 @@ import {
|
|
|
59
59
|
normalizeEffortSelection,
|
|
60
60
|
recordHarnessInstallCompletion,
|
|
61
61
|
syncOpenCodeOwnedSkills
|
|
62
|
-
} from "../chunk-
|
|
62
|
+
} from "../chunk-W5TSNGEE.js";
|
|
63
63
|
import "../chunk-62L3ORXN.js";
|
|
64
64
|
import {
|
|
65
65
|
piAdapter
|
|
66
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-P3GDM5RH.js";
|
|
67
67
|
import {
|
|
68
68
|
ALL_AGENT_NAMES,
|
|
69
69
|
detectCurrentConfig,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
resolveExecutingPackageVersion,
|
|
75
75
|
updateOpenCodeMainConfig,
|
|
76
76
|
writeLiteConfig
|
|
77
|
-
} from "../chunk-
|
|
77
|
+
} from "../chunk-QOIZYJ5C.js";
|
|
78
78
|
|
|
79
79
|
// src/cli/index.ts
|
|
80
80
|
import { pathToFileURL } from "url";
|
package/dist/cli/pi-install.d.ts
CHANGED
|
@@ -141,6 +141,7 @@ export declare function getPiExternalPackageSpecs(options?: Pick<PiSetupOptions,
|
|
|
141
141
|
export declare function inspectPiSetupPackage(packages: readonly PiConfiguredPackage[], spec: PiSetupPackageSpec, requireManagedSource?: boolean): PiExternalPackageEvidence;
|
|
142
142
|
export declare function piIncumbentTodoRecovery(source: string, scope: PiConfiguredPackage['scope'], identityLimitation?: string, unmappedSource?: boolean): string;
|
|
143
143
|
export declare function resolvePiPreservationPackages(output: string, options: PiSetupOptions): PiConfiguredPackage[];
|
|
144
|
+
export declare function mergePiCodemodeSettings(current: Record<string, unknown>): Record<string, unknown>;
|
|
144
145
|
export declare function mergePiSubagentsConfig(current: Record<string, unknown>): Record<string, unknown>;
|
|
145
146
|
export declare function mergePiGrepMcpConfig(current: Record<string, unknown>): Record<string, unknown>;
|
|
146
147
|
export declare function mergePiRootBlock(current: string, managedBlock: string): string;
|
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 {};
|