thoth-agents 0.7.0 → 0.9.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.
Files changed (42) hide show
  1. package/dist/agents/prompt-dialects.d.ts +2 -1
  2. package/dist/{chunk-QOIZYJ5C.js → chunk-ARUBELNT.js} +18 -7
  3. package/dist/{chunk-W5TSNGEE.js → chunk-FBLIVTKM.js} +4036 -3028
  4. package/dist/{chunk-P3GDM5RH.js → chunk-IJBKUC5J.js} +1 -1
  5. package/dist/{chunk-3MHJGWS4.js → chunk-V5GDCWFR.js} +1 -1
  6. package/dist/cli/codex-config-io.d.ts +34 -2
  7. package/dist/cli/codex-hook-consent.d.ts +5 -0
  8. package/dist/cli/codex-hook-trust.d.ts +23 -0
  9. package/dist/cli/codex-install.d.ts +21 -6
  10. package/dist/cli/codex-lifecycle.d.ts +13 -0
  11. package/dist/cli/codex-plugin-install.d.ts +21 -0
  12. package/dist/cli/index.js +539 -44
  13. package/dist/cli/managed-state-io.d.ts +19 -0
  14. package/dist/cli/operations/codex.d.ts +2 -0
  15. package/dist/cli/operations/types.d.ts +1 -1
  16. package/dist/cli/safe-atomic-write.d.ts +2 -0
  17. package/dist/cli/tui/index.js +56 -5
  18. package/dist/cli/tui/operations.d.ts +3 -1
  19. package/dist/cli/types.d.ts +4 -1
  20. package/dist/harness/adapters/codex-legacy-agents.d.ts +31 -0
  21. package/dist/harness/adapters/codex-surfaces.d.ts +1 -1
  22. package/dist/harness/adapters/codex.d.ts +3 -1
  23. package/dist/harness/codex-hook-script.d.ts +2 -0
  24. package/dist/harness/core/agent-pack.d.ts +2 -0
  25. package/dist/harness/writers/codex-plugin-package.d.ts +7 -0
  26. package/dist/index.js +2 -2
  27. package/dist/pi.js +2 -2
  28. package/package.json +1 -1
  29. package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +1 -1
  30. package/plugin/.claude-plugin/plugin.json +1 -1
  31. package/plugin/.codex-plugin/.thoth-agents-plugin-assets.json +48 -0
  32. package/plugin/.codex-plugin/plugin.json +3 -2
  33. package/plugin/agents/orchestrator.md +1 -1
  34. package/plugin/codex-hooks/context.cjs +22 -0
  35. package/plugin/codex-hooks/hooks.json +32 -0
  36. package/plugin/codex-hooks/payloads/designer.md +72 -0
  37. package/plugin/codex-hooks/payloads/explorer.md +76 -0
  38. package/plugin/codex-hooks/payloads/librarian.md +76 -0
  39. package/plugin/codex-hooks/payloads/oracle.md +83 -0
  40. package/plugin/codex-hooks/payloads/root.md +105 -0
  41. package/plugin/codex-hooks/payloads/worker.md +72 -0
  42. package/skills/README.md +1 -1
@@ -1,7 +1,8 @@
1
- import type { AgentDispatchMethod, AgentRoleName } from '../harness/core/agent-pack';
1
+ import { type AgentDispatchMethod, type AgentRoleName } from '../harness/core/agent-pack';
2
2
  import type { HarnessCapabilities, HarnessId } from '../harness/types';
3
3
  export type AgentPromptRole = AgentRoleName;
4
4
  export interface LifecycleNomenclature {
5
+ rootInstructions?: string;
5
6
  freshDelegation: string;
6
7
  sameAssignmentContinuation: string;
7
8
  independentContext: string;
@@ -1132,6 +1132,16 @@ var ORCHESTRATION_POLICY = {
1132
1132
  "Child agents return distilled evidence instead of raw logs or file dumps."
1133
1133
  ]
1134
1134
  };
1135
+ var DEFAULT_DELEGATION_LIFECYCLE = `- New objectives, phases, work units, mutable surfaces or independent judgments require fresh specialist sessions via {{lifecycleFreshDelegation}}; {{lifecycleIndependentContext}}. These are fresh-session boundaries, not permission for root execution; completed agents are not a reusable role pool.
1136
+ - Use {{lifecycleSameAssignmentContinuation}} only to steer, complete or clarify the same bounded assignment.
1137
+ - {{lifecycleSameSessionProbe}} only collects the active nonterminal assignment.
1138
+ - Every Oracle plan review, verification round, and PASS judgment uses a fresh Oracle instance. Existing ones only clarify their findings.`;
1139
+ var CODEX_DELEGATION_LIFECYCLE = [
1140
+ "- New objectives, SDD phases, mutable surfaces or independent judgments require fresh specialists via {{lifecycleFreshDelegation}}; {{lifecycleIndependentContext}}. These are fresh-session boundaries, not permission for root execution. Fresh work units default to new children, subject only to the continuation exception below.",
1141
+ "- Use {{lifecycleSameAssignmentContinuation}} to steer, complete or clarify the same bounded assignment; a later unit may reuse a completed child of the same role ONLY when objective and SDD phase are unchanged, mutable surface is unchanged (or the work is read-only), and no independent judgment is required. Never cross objectives or phases.",
1142
+ "- Every Oracle plan review, verification round, and PASS judgment uses a fresh Oracle instance. Existing ones only clarify their findings.",
1143
+ "- `wait_agent`/`list_agents` collect status, not reuse permission. Never `send_message` to a completed child: it blocks slot eviction."
1144
+ ].join("\n");
1135
1145
  var EVIDENCE_RETURN_FIELDS = [
1136
1146
  "conclusion",
1137
1147
  "evidence",
@@ -1412,9 +1422,10 @@ var CODEX_PROMPT_DIALECT = {
1412
1422
  progressTool: "functions.update_plan",
1413
1423
  hostStatusSurface: "collaboration.list_agents",
1414
1424
  lifecycle: {
1415
- freshDelegation: '`collaboration.spawn_agent` with `fork_turns="none"`',
1425
+ rootInstructions: CODEX_DELEGATION_LIFECYCLE,
1426
+ freshDelegation: '`collaboration.spawn_agent` with `fork_turns: "none"`',
1416
1427
  sameAssignmentContinuation: "`collaboration.followup_task` for the existing agent",
1417
- independentContext: '`fork_turns="none"` prevents parent-history inheritance',
1428
+ independentContext: "children get role instructions from the plugin hook, not inherited history",
1418
1429
  statusAction: "wait and inspect status",
1419
1430
  terminalState: "terminal mailbox completion or failure update",
1420
1431
  nonterminalState: "collaboration.wait_agent timeout or silence",
@@ -1783,10 +1794,7 @@ ${policy.implementationOwnership.rootIdentity}
1783
1794
  </operating-model>
1784
1795
 
1785
1796
  <delegation-lifecycle>
1786
- - New objectives, phases, work units, mutable surfaces or independent judgments require fresh specialist sessions via {{lifecycleFreshDelegation}}; {{lifecycleIndependentContext}}. These are fresh-session boundaries, not permission for root execution; completed agents are not a reusable role pool.
1787
- - Use {{lifecycleSameAssignmentContinuation}} only to steer, complete or clarify the same bounded assignment.
1788
- - {{lifecycleSameSessionProbe}} only collects the active nonterminal assignment.
1789
- - Every Oracle plan review, verification round, and PASS judgment uses a fresh Oracle instance. Existing ones only clarify their findings.
1797
+ {{delegationLifecycle}}
1790
1798
  </delegation-lifecycle>
1791
1799
 
1792
1800
  <routing>
@@ -1816,7 +1824,7 @@ ${renderTaskShapingPolicy(policy.taskShaping)}
1816
1824
  - Behavior changes need installed \`tdd\`; after implementation: behavior-preserving \`simplify\`.
1817
1825
  - SDD execution: never use the thoth-agents CLI, \`npx skills add\` or network for missing contracts; report installation drift.
1818
1826
  - Use progressive-context-router only for repository instruction or context-router work.
1819
- - Use architectural-grilling only on explicit request or unresolved material human decisions; ask one question at a time.
1827
+ - Use grill-me when material human-owned decisions remain unresolved.
1820
1828
  </external-skills>
1821
1829
 
1822
1830
  <memory>
@@ -2030,6 +2038,9 @@ function renderModelFamily(section) {
2030
2038
  }
2031
2039
  function renderRoleText(section, dialect) {
2032
2040
  return section.template.replaceAll(
2041
+ "{{delegationLifecycle}}",
2042
+ dialect.tools.lifecycle.rootInstructions ?? DEFAULT_DELEGATION_LIFECYCLE
2043
+ ).replaceAll(
2033
2044
  "{{assignmentSkillGuidance}}",
2034
2045
  dialect.harness === "pi" ? "include exact known entrypoints; skill paths are optional complements, specialists have their own native skill catalog" : "include exact known entrypoints and skill paths"
2035
2046
  ).replaceAll(