thoth-agents 0.2.11 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +21 -0
  3. package/README.md +301 -311
  4. package/dist/agents/configured-role-prompt.d.ts +9 -0
  5. package/dist/agents/prompt-sections.d.ts +8 -4
  6. package/dist/agents/prompt-utils.d.ts +0 -4
  7. package/dist/{chunk-ASKXWU6E.js → chunk-2MZ5C2RN.js} +1078 -1725
  8. package/dist/chunk-XO74DXBZ.js +1781 -0
  9. package/dist/{chunk-6BNAV534.js → chunk-YUCGIJPP.js} +12 -30
  10. package/dist/cli/claude-code-install.d.ts +24 -26
  11. package/dist/cli/claude-code-paths.d.ts +0 -28
  12. package/dist/cli/codex-install.d.ts +2 -2
  13. package/dist/cli/codex-paths.d.ts +0 -2
  14. package/dist/cli/index.js +279 -119
  15. package/dist/cli/install.d.ts +5 -1
  16. package/dist/cli/model-catalog/cache.d.ts +1 -1
  17. package/dist/cli/operations/claude-code.d.ts +6 -3
  18. package/dist/cli/operations/codex.d.ts +2 -1
  19. package/dist/cli/operations/opencode.d.ts +2 -1
  20. package/dist/cli/operations/types.d.ts +9 -1
  21. package/dist/cli/package-root.d.ts +1 -0
  22. package/dist/cli/providers.d.ts +6 -116
  23. package/dist/cli/skills.d.ts +19 -32
  24. package/dist/cli/thoth-mem-install.d.ts +45 -0
  25. package/dist/cli/tui/components/StatusView.d.ts +12 -1
  26. package/dist/cli/tui/index.js +256 -142
  27. package/dist/cli/tui/operations.d.ts +4 -3
  28. package/dist/cli/types.d.ts +0 -10
  29. package/dist/config/constants.d.ts +20 -16
  30. package/dist/config/index.d.ts +0 -1
  31. package/dist/config/loader.d.ts +1 -1
  32. package/dist/config/schema.d.ts +2 -38
  33. package/dist/config/utils.d.ts +1 -2
  34. package/dist/harness/adapters/codex-surfaces.d.ts +3 -3
  35. package/dist/harness/core/agent-pack.d.ts +37 -29
  36. package/dist/harness/core/memory-governance.d.ts +24 -48
  37. package/dist/harness/core/sdd.d.ts +364 -131
  38. package/dist/harness/generate-integration-packages.d.ts +20 -0
  39. package/dist/harness/opencode-init-command.d.ts +11 -0
  40. package/dist/harness/types.d.ts +14 -1
  41. package/dist/harness/writers/claude-code-subagent.d.ts +3 -1
  42. package/dist/hooks/index.d.ts +0 -5
  43. package/dist/index.js +562 -1314
  44. package/dist/mcp/index.d.ts +1 -2
  45. package/package.json +17 -12
  46. package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +50 -0
  47. package/plugin/.claude-plugin/plugin.json +8 -0
  48. package/plugin/.codex-plugin/.thoth-agents-plugin-assets.json +16 -0
  49. package/plugin/.codex-plugin/plugin.json +7 -0
  50. package/plugin/.mcp.json +19 -0
  51. package/plugin/agents/deep.md +89 -0
  52. package/plugin/agents/designer.md +89 -0
  53. package/plugin/agents/explorer.md +90 -0
  54. package/plugin/agents/librarian.md +90 -0
  55. package/plugin/agents/oracle.md +92 -0
  56. package/plugin/agents/orchestrator.md +128 -0
  57. package/plugin/agents/quick.md +89 -0
  58. package/plugin/codex.mcp.json +17 -0
  59. package/plugin/settings.json +3 -0
  60. package/plugin/skills/thoth-archive/SKILL.md +40 -0
  61. package/plugin/skills/thoth-archive/scripts/archive.mjs +748 -0
  62. package/plugin/skills/thoth-constitution/SKILL.md +45 -0
  63. package/plugin/skills/thoth-constitution/scripts/validate.mjs +167 -0
  64. package/plugin/skills/thoth-constitution/templates/constitution.md +54 -0
  65. package/plugin/skills/thoth-init/SKILL.md +30 -0
  66. package/plugin/skills/thoth-init/scripts/init.mjs +141 -0
  67. package/plugin/skills/thoth-sdd/SKILL.md +83 -0
  68. package/plugin/skills/thoth-sdd/references/phases/analyze.md +21 -0
  69. package/plugin/skills/thoth-sdd/references/phases/checklist.md +20 -0
  70. package/plugin/skills/thoth-sdd/references/phases/clarify.md +15 -0
  71. package/plugin/skills/thoth-sdd/references/phases/converge.md +14 -0
  72. package/plugin/skills/thoth-sdd/references/phases/explore.md +10 -0
  73. package/plugin/skills/thoth-sdd/references/phases/implement.md +19 -0
  74. package/plugin/skills/thoth-sdd/references/phases/plan.md +15 -0
  75. package/plugin/skills/thoth-sdd/references/phases/specify.md +21 -0
  76. package/plugin/skills/thoth-sdd/references/phases/tasks.md +20 -0
  77. package/plugin/skills/thoth-sdd/references/phases/verify.md +22 -0
  78. package/plugin/skills/thoth-sdd/scripts/validate.mjs +1117 -0
  79. package/plugin/skills/thoth-sdd/templates/archive-report.md +25 -0
  80. package/plugin/skills/thoth-sdd/templates/checklist.md +27 -0
  81. package/plugin/skills/thoth-sdd/templates/plan.md +38 -0
  82. package/plugin/skills/thoth-sdd/templates/spec.md +54 -0
  83. package/plugin/skills/thoth-sdd/templates/tasks.md +29 -0
  84. package/plugin/skills/thoth-sdd/templates/verify-report.md +28 -0
  85. package/skills/README.md +12 -0
  86. package/skills/thoth-archive/SKILL.md +40 -0
  87. package/skills/thoth-archive/scripts/archive.mjs +748 -0
  88. package/skills/thoth-constitution/SKILL.md +45 -0
  89. package/skills/thoth-constitution/scripts/validate.mjs +167 -0
  90. package/skills/thoth-constitution/templates/constitution.md +54 -0
  91. package/skills/thoth-init/SKILL.md +30 -0
  92. package/skills/thoth-init/scripts/init.mjs +141 -0
  93. package/skills/thoth-sdd/SKILL.md +83 -0
  94. package/skills/thoth-sdd/references/phases/analyze.md +21 -0
  95. package/skills/thoth-sdd/references/phases/checklist.md +20 -0
  96. package/skills/thoth-sdd/references/phases/clarify.md +15 -0
  97. package/skills/thoth-sdd/references/phases/converge.md +14 -0
  98. package/skills/thoth-sdd/references/phases/explore.md +10 -0
  99. package/skills/thoth-sdd/references/phases/implement.md +19 -0
  100. package/skills/thoth-sdd/references/phases/plan.md +15 -0
  101. package/skills/thoth-sdd/references/phases/specify.md +21 -0
  102. package/skills/thoth-sdd/references/phases/tasks.md +20 -0
  103. package/skills/thoth-sdd/references/phases/verify.md +22 -0
  104. package/skills/thoth-sdd/scripts/validate.mjs +1117 -0
  105. package/skills/thoth-sdd/templates/archive-report.md +25 -0
  106. package/skills/thoth-sdd/templates/checklist.md +27 -0
  107. package/skills/thoth-sdd/templates/plan.md +38 -0
  108. package/skills/thoth-sdd/templates/spec.md +54 -0
  109. package/skills/thoth-sdd/templates/tasks.md +29 -0
  110. package/skills/thoth-sdd/templates/verify-report.md +28 -0
  111. package/thoth-agents.schema.json +0 -39
  112. package/dist/chunk-OZE7JVGS.js +0 -2344
  113. package/dist/cli/custom-skills.d.ts +0 -49
  114. package/dist/cli/skill-manifest.d.ts +0 -32
  115. package/dist/harness/core/skills.d.ts +0 -211
  116. package/dist/harness/generate-codex-plugin.d.ts +0 -9
  117. package/dist/harness/writers/claude-code-skill-layout.d.ts +0 -16
  118. package/dist/harness/writers/fs-skill-collect.d.ts +0 -7
  119. package/dist/harness/writers/skill-layout.d.ts +0 -16
  120. package/dist/hooks/chat-headers.d.ts +0 -16
  121. package/dist/hooks/phase-reminder/index.d.ts +0 -28
  122. package/dist/hooks/post-read-nudge/index.d.ts +0 -18
  123. package/dist/hooks/skill-sync.d.ts +0 -10
  124. package/dist/hooks/thoth-mem/index.d.ts +0 -46
  125. package/dist/hooks/thoth-mem/protocol.d.ts +0 -7
  126. package/dist/mcp/thoth.d.ts +0 -3
  127. package/dist/sdd/artifact-governance/artifact-loader.d.ts +0 -130
  128. package/dist/sdd/artifact-governance/index.d.ts +0 -6
  129. package/dist/sdd/artifact-governance/tasks-validator.d.ts +0 -17
  130. package/dist/sdd/artifact-governance/types.d.ts +0 -52
  131. package/dist/thoth/client.d.ts +0 -14
  132. package/dist/thoth/index.d.ts +0 -2
  133. package/src/skills/_shared/openspec-convention.md +0 -350
  134. package/src/skills/_shared/persistence-contract.md +0 -163
  135. package/src/skills/_shared/thoth-mem-convention.md +0 -123
  136. package/src/skills/executing-plans/SKILL.md +0 -288
  137. package/src/skills/plan-reviewer/SKILL.md +0 -219
  138. package/src/skills/requirements-interview/SKILL.md +0 -233
  139. package/src/skills/sdd-apply/SKILL.md +0 -89
  140. package/src/skills/sdd-archive/SKILL.md +0 -92
  141. package/src/skills/sdd-clarify/SKILL.md +0 -105
  142. package/src/skills/sdd-constitution/SKILL.md +0 -107
  143. package/src/skills/sdd-design/SKILL.md +0 -155
  144. package/src/skills/sdd-init/SKILL.md +0 -233
  145. package/src/skills/sdd-propose/SKILL.md +0 -101
  146. package/src/skills/sdd-spec/SKILL.md +0 -136
  147. package/src/skills/sdd-tasks/SKILL.md +0 -232
  148. package/src/skills/sdd-verify/SKILL.md +0 -131
  149. package/src/skills/thoth-mem-agents/SKILL.md +0 -210
@@ -2,15 +2,15 @@ import {
2
2
  defaultTuiOperations,
3
3
  effortChoicesForModel,
4
4
  listOperationHarnesses
5
- } from "../../chunk-ASKXWU6E.js";
6
- import "../../chunk-OZE7JVGS.js";
5
+ } from "../../chunk-2MZ5C2RN.js";
6
+ import "../../chunk-XO74DXBZ.js";
7
7
 
8
8
  // src/cli/tui/index.tsx
9
9
  import { render } from "ink";
10
10
 
11
11
  // src/cli/tui/App.tsx
12
12
  import { Box as Box8, Text as Text8, useApp, useInput } from "ink";
13
- import { useMemo, useRef, useState } from "react";
13
+ import { useEffect, useMemo, useRef, useState } from "react";
14
14
 
15
15
  // src/cli/tui/components/Header.tsx
16
16
  import { Box, Text } from "ink";
@@ -233,7 +233,7 @@ function ModelScreen({
233
233
  }
234
234
 
235
235
  // src/cli/tui/components/PlanPreview.tsx
236
- import { Box as Box6, Text as Text6 } from "ink";
236
+ import { Box as Box7, Text as Text7 } from "ink";
237
237
 
238
238
  // src/cli/tui/components/PathLine.tsx
239
239
  import { Box as Box5, Text as Text5 } from "ink";
@@ -253,128 +253,51 @@ function PathLine({ label, value, width }) {
253
253
  return /* @__PURE__ */ jsx5(Box5, { flexDirection: "column", children: lines.map((line, index) => /* @__PURE__ */ jsx5(Text5, { color: theme.dim, children: index === 0 ? `${label ? `${label}: ` : ""}${line}` : ` ${line}` }, line)) });
254
254
  }
255
255
 
256
- // src/cli/tui/components/PlanPreview.tsx
257
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
258
- function targetText(target) {
259
- const label = target.label ?? target.path ?? target.kind;
260
- const state = target.state ? `: [${target.state}]` : "";
261
- const observed = target.observed ? ` - ${target.observed}` : "";
262
- return `${label}${state}${observed}`;
263
- }
264
- function warningText(warning) {
265
- return `[${warning.severity}]${warning.code ? ` [${warning.code}]` : ""} ${warning.message}`;
266
- }
267
- function PlanPreview({
268
- plan,
269
- selectedAction,
270
- result
256
+ // src/cli/tui/components/StatusView.tsx
257
+ import { Box as Box6, Text as Text6 } from "ink";
258
+ import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
259
+ var unsupportedEvidence = {
260
+ state: "unsupported",
261
+ source: "none",
262
+ basis: []
263
+ };
264
+ function ProviderCapabilityView({
265
+ evidence,
266
+ loading = false,
267
+ error,
268
+ showHeading = true
271
269
  }) {
272
- const blockerTargets = plan.blockerTargets ?? [];
270
+ const capability = evidence ?? unsupportedEvidence;
273
271
  return /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
274
- /* @__PURE__ */ jsx6(Text6, { bold: true, children: plan.title }),
275
- /* @__PURE__ */ jsx6(Text6, { children: plan.summary }),
276
- /* @__PURE__ */ jsxs5(Text6, { children: [
277
- "Target harness: ",
278
- /* @__PURE__ */ jsx6(Text6, { color: theme.accent, children: plan.harness })
279
- ] }),
280
- /* @__PURE__ */ jsxs5(Text6, { children: [
281
- "Action: ",
282
- plan.action
283
- ] }),
284
- /* @__PURE__ */ jsxs5(Text6, { children: [
285
- "Can apply: ",
286
- plan.canApply ? "yes" : "no"
287
- ] }),
288
- !plan.canApply && blockerTargets.length > 0 ? /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
289
- /* @__PURE__ */ jsx6(Text6, { color: theme.warning, children: "Blocker targets" }),
290
- blockerTargets.map((target, index) => /* @__PURE__ */ jsxs5(
291
- Text6,
292
- {
293
- children: [
294
- "- ",
295
- targetText(target)
296
- ]
297
- },
298
- `${target.label ?? target.path ?? target.kind}-${index}`
299
- ))
300
- ] }) : null,
301
- plan.surfaces.length > 0 ? /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "Managed surfaces" }) : null,
302
- plan.surfaces.map((surface) => /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
272
+ showHeading ? /* @__PURE__ */ jsx6(Text6, { color: theme.accent, children: "Provider capability" }) : null,
273
+ loading ? /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "Loading provider capability evidence\u2026" }) : error ? /* @__PURE__ */ jsxs5(Fragment, { children: [
274
+ /* @__PURE__ */ jsxs5(Text6, { color: theme.warning, children: [
275
+ "Provider evidence unavailable: ",
276
+ error
277
+ ] }),
278
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "Press r to retry provider evidence." })
279
+ ] }) : /* @__PURE__ */ jsxs5(Fragment, { children: [
303
280
  /* @__PURE__ */ jsxs5(Text6, { children: [
304
- "- ",
305
- surface.label
281
+ "Provider capability:",
282
+ " ",
283
+ /* @__PURE__ */ jsx6(Text6, { color: stateColor(capability.state), children: capability.state })
306
284
  ] }),
307
- surface.path ? /* @__PURE__ */ jsx6(PathLine, { value: surface.path }) : null
308
- ] }, surface.id)),
309
- /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
310
- "Backup: ",
311
- plan.backup.required ? "required" : "not required",
312
- " (",
313
- plan.backup.strategy,
314
- ")"
315
- ] }),
316
- plan.backup.destinations?.map((path) => /* @__PURE__ */ jsx6(PathLine, { label: path.label, value: path.path }, path.path)),
317
- plan.items.length > 0 ? /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "Preview" }) : null,
318
- plan.items.slice(0, 5).map((item) => /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
319
285
  /* @__PURE__ */ jsxs5(Text6, { children: [
320
- "- ",
321
- item.title
286
+ "Evidence source:",
287
+ " ",
288
+ /* @__PURE__ */ jsx6(Text6, { color: theme.accent, children: capability.source })
322
289
  ] }),
323
- item.target.path ? /* @__PURE__ */ jsx6(PathLine, { value: item.target.path }) : null,
324
- item.preview ? /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: item.preview.length > 120 ? `${item.preview.slice(0, 120)}...` : item.preview }) : null
325
- ] }, item.title)),
326
- plan.items.length > 5 ? /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
327
- "...",
328
- plan.items.length - 5,
329
- " more items"
330
- ] }) : null,
331
- plan.warnings.map((warning) => /* @__PURE__ */ jsxs5(Text6, { color: theme.warning, children: [
332
- "- ",
333
- warningText(warning)
334
- ] }, warning.code ?? warning.message)),
335
- plan.disclaimers.map((disclaimer) => /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
336
- "- ",
337
- disclaimer.message
338
- ] }, disclaimer.code ?? disclaimer.message)),
339
- /* @__PURE__ */ jsxs5(Box6, { marginTop: 1, children: [
340
- /* @__PURE__ */ jsx6(Text6, { color: selectedAction === "apply" ? theme.accent : void 0, children: "[Apply]" }),
341
- /* @__PURE__ */ jsx6(Text6, { children: " " }),
342
- /* @__PURE__ */ jsx6(Text6, { color: selectedAction === "cancel" ? theme.accent : void 0, children: "[Cancel]" })
343
- ] }),
344
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "Enter selects. a applies. c cancels." }),
345
- result ? /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
346
- /* @__PURE__ */ jsx6(Text6, { color: result.applied ? theme.ok : theme.warning, children: result.summary }),
347
- !result.applied && ((result.diagnosticTargets?.length ?? 0) > 0 || result.warnings.length > 0) ? /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
348
- /* @__PURE__ */ jsx6(Text6, { color: theme.warning, children: "Apply diagnostics" }),
349
- result.diagnosticTargets?.map((target, index) => /* @__PURE__ */ jsxs5(
350
- Text6,
351
- {
352
- children: [
353
- "- ",
354
- targetText(target)
355
- ]
356
- },
357
- `${target.label ?? target.path ?? target.kind}-${index}`
358
- )),
359
- result.warnings.map((warning) => /* @__PURE__ */ jsxs5(
360
- Text6,
361
- {
362
- color: theme.warning,
363
- children: [
364
- "- ",
365
- warningText(warning)
366
- ]
367
- },
368
- warning.code ?? warning.message
369
- ))
370
- ] }) : null
371
- ] }) : null
290
+ capability.basis.length > 0 ? /* @__PURE__ */ jsxs5(Fragment, { children: [
291
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "Evidence basis" }),
292
+ capability.basis.map((basis) => /* @__PURE__ */ jsxs5(Text6, { children: [
293
+ "- ",
294
+ basis
295
+ ] }, basis))
296
+ ] }) : /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "No provider or harness evidence was supplied." }),
297
+ capability.state !== "supported" ? /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "Refer to the installed provider guidance for authoritative capability details." }) : null
298
+ ] })
372
299
  ] });
373
300
  }
374
-
375
- // src/cli/tui/components/StatusView.tsx
376
- import { Box as Box7, Text as Text7 } from "ink";
377
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
378
301
  function countByState(report) {
379
302
  return report.targets.reduce(
380
303
  (counts, target) => {
@@ -504,7 +427,12 @@ function uniqueTargets(targets) {
504
427
  return true;
505
428
  });
506
429
  }
507
- function StatusView({ report }) {
430
+ function StatusView({
431
+ report,
432
+ providerEvidence = report.providerCapability,
433
+ providerEvidenceLoading = false,
434
+ providerEvidenceError
435
+ }) {
508
436
  const counts = countByState(report);
509
437
  const countText = Object.entries(counts).map(([state, count]) => `${state}: ${count}`).join(" ");
510
438
  const grouped = groupedTargets(report);
@@ -512,50 +440,72 @@ function StatusView({ report }) {
512
440
  const hiddenWarnings = report.diagnostics.length - warnings.length;
513
441
  const notes = (report.disclaimers ?? []).slice(0, 2);
514
442
  const hiddenNotes = (report.disclaimers?.length ?? 0) - notes.length;
515
- return /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
516
- /* @__PURE__ */ jsxs6(Text7, { children: [
517
- "State: ",
518
- /* @__PURE__ */ jsx7(Text7, { color: stateColor(report.state), children: report.state })
443
+ return /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
444
+ /* @__PURE__ */ jsxs5(Text6, { children: [
445
+ "Consumer-managed state:",
446
+ " ",
447
+ /* @__PURE__ */ jsx6(Text6, { color: stateColor(report.state), children: report.state })
519
448
  ] }),
520
- /* @__PURE__ */ jsx7(Text7, { children: report.summary }),
521
- /* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: countText || "No managed targets." }),
522
- /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
449
+ /* @__PURE__ */ jsx6(Text6, { children: report.summary }),
450
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: countText || "No managed targets." }),
451
+ /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
523
452
  "Warnings: ",
524
453
  report.diagnostics.length,
525
454
  " Notes:",
526
455
  " ",
527
456
  report.disclaimers?.length ?? 0
528
457
  ] }),
458
+ /* @__PURE__ */ jsx6(
459
+ ProviderCapabilityView,
460
+ {
461
+ evidence: providerEvidence,
462
+ loading: providerEvidenceLoading,
463
+ error: providerEvidenceError
464
+ }
465
+ ),
466
+ report.actions.some((action) => action.supported === false) ? /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
467
+ /* @__PURE__ */ jsx6(Text6, { color: theme.warning, children: "Unavailable provider-dependent actions" }),
468
+ report.actions.filter((action) => action.supported === false).map((action) => /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
469
+ /* @__PURE__ */ jsxs5(Text6, { children: [
470
+ action.label,
471
+ ": unavailable"
472
+ ] }),
473
+ action.disabledReason ? /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
474
+ "- ",
475
+ action.disabledReason
476
+ ] }) : null
477
+ ] }, action.id))
478
+ ] }) : null,
529
479
  categoryOrder.map((category) => {
530
480
  const targets = uniqueTargets(grouped.get(category) ?? []);
531
481
  if (targets.length === 0) return null;
532
482
  const visible = targets.slice(0, 6);
533
483
  const hidden = targets.length - visible.length;
534
- return /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
535
- /* @__PURE__ */ jsx7(Text7, { color: theme.accent, children: category }),
536
- visible.map((target) => /* @__PURE__ */ jsxs6(Text7, { children: [
484
+ return /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
485
+ /* @__PURE__ */ jsx6(Text6, { color: theme.accent, children: category }),
486
+ visible.map((target) => /* @__PURE__ */ jsxs5(Text6, { children: [
537
487
  "- ",
538
488
  target.label,
539
- target.state ? /* @__PURE__ */ jsxs6(Text7, { color: stateColor(target.state), children: [
489
+ target.state ? /* @__PURE__ */ jsxs5(Text6, { color: stateColor(target.state), children: [
540
490
  ": [",
541
491
  target.state,
542
492
  "]"
543
493
  ] }) : null,
544
- target.detail ? /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
494
+ target.detail ? /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
545
495
  " - ",
546
496
  target.detail
547
497
  ] }) : null
548
498
  ] }, `${category}-${target.label}-${target.state}`)),
549
- hidden > 0 ? /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
499
+ hidden > 0 ? /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
550
500
  " +",
551
501
  hidden,
552
502
  " more"
553
503
  ] }) : null
554
504
  ] }, category);
555
505
  }),
556
- report.diagnostics.length > 0 ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
557
- /* @__PURE__ */ jsx7(Text7, { color: theme.warning, children: "Warnings" }),
558
- warnings.map((warning) => /* @__PURE__ */ jsxs6(Text7, { color: theme.warning, children: [
506
+ report.diagnostics.length > 0 ? /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
507
+ /* @__PURE__ */ jsx6(Text6, { color: theme.warning, children: "Warnings" }),
508
+ warnings.map((warning) => /* @__PURE__ */ jsxs5(Text6, { color: theme.warning, children: [
559
509
  "- [",
560
510
  warning.severity,
561
511
  "]",
@@ -563,19 +513,19 @@ function StatusView({ report }) {
563
513
  " ",
564
514
  warning.message
565
515
  ] }, warning.code ?? warning.message)),
566
- hiddenWarnings > 0 ? /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
516
+ hiddenWarnings > 0 ? /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
567
517
  " +",
568
518
  hiddenWarnings,
569
519
  " more warnings"
570
520
  ] }) : null
571
521
  ] }) : null,
572
- notes.length > 0 ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
573
- /* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: "Notes" }),
574
- notes.map((note) => /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
522
+ notes.length > 0 ? /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", children: [
523
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "Notes" }),
524
+ notes.map((note) => /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
575
525
  "- ",
576
526
  note.message
577
527
  ] }, note.code ?? note.message)),
578
- hiddenNotes > 0 ? /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
528
+ hiddenNotes > 0 ? /* @__PURE__ */ jsxs5(Text6, { color: theme.dim, children: [
579
529
  " +",
580
530
  hiddenNotes,
581
531
  " more notes"
@@ -584,6 +534,134 @@ function StatusView({ report }) {
584
534
  ] });
585
535
  }
586
536
 
537
+ // src/cli/tui/components/PlanPreview.tsx
538
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
539
+ function targetText(target) {
540
+ const label = target.label ?? target.path ?? target.kind;
541
+ const state = target.state ? `: [${target.state}]` : "";
542
+ const observed = target.observed ? ` - ${target.observed}` : "";
543
+ return `${label}${state}${observed}`;
544
+ }
545
+ function warningText(warning) {
546
+ return `[${warning.severity}]${warning.code ? ` [${warning.code}]` : ""} ${warning.message}`;
547
+ }
548
+ function providerEvidenceFor(value) {
549
+ return value.providerCapability;
550
+ }
551
+ function PlanPreview({
552
+ plan,
553
+ selectedAction,
554
+ result
555
+ }) {
556
+ const blockerTargets = plan.blockerTargets ?? [];
557
+ const providerEvidence = providerEvidenceFor(result ?? plan);
558
+ return /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
559
+ /* @__PURE__ */ jsx7(Text7, { bold: true, children: plan.title }),
560
+ /* @__PURE__ */ jsx7(Text7, { children: plan.summary }),
561
+ /* @__PURE__ */ jsx7(Text7, { color: theme.accent, children: "Consumer operation" }),
562
+ /* @__PURE__ */ jsxs6(Text7, { children: [
563
+ "Target harness: ",
564
+ /* @__PURE__ */ jsx7(Text7, { color: theme.accent, children: plan.harness })
565
+ ] }),
566
+ /* @__PURE__ */ jsxs6(Text7, { children: [
567
+ "Managed action: ",
568
+ plan.action
569
+ ] }),
570
+ /* @__PURE__ */ jsxs6(Text7, { children: [
571
+ "Can apply: ",
572
+ plan.canApply ? "yes" : "no"
573
+ ] }),
574
+ providerEvidence ? /* @__PURE__ */ jsx7(ProviderCapabilityView, { evidence: providerEvidence }) : null,
575
+ !plan.canApply && blockerTargets.length > 0 ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
576
+ /* @__PURE__ */ jsx7(Text7, { color: theme.warning, children: "Blocker targets" }),
577
+ blockerTargets.map((target, index) => /* @__PURE__ */ jsxs6(
578
+ Text7,
579
+ {
580
+ children: [
581
+ "- ",
582
+ targetText(target)
583
+ ]
584
+ },
585
+ `${target.label ?? target.path ?? target.kind}-${index}`
586
+ ))
587
+ ] }) : null,
588
+ plan.surfaces.length > 0 ? /* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: "Managed surfaces" }) : null,
589
+ plan.surfaces.map((surface) => /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
590
+ /* @__PURE__ */ jsxs6(Text7, { children: [
591
+ "- ",
592
+ surface.label
593
+ ] }),
594
+ surface.path ? /* @__PURE__ */ jsx7(PathLine, { value: surface.path }) : null
595
+ ] }, surface.id)),
596
+ /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
597
+ "Backup: ",
598
+ plan.backup.required ? "required" : "not required",
599
+ " (",
600
+ plan.backup.strategy,
601
+ ")"
602
+ ] }),
603
+ plan.backup.destinations?.map((path) => /* @__PURE__ */ jsx7(PathLine, { label: path.label, value: path.path }, path.path)),
604
+ plan.items.length > 0 ? /* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: "Preview" }) : null,
605
+ plan.items.slice(0, 5).map((item) => /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
606
+ /* @__PURE__ */ jsxs6(Text7, { children: [
607
+ "- ",
608
+ item.title
609
+ ] }),
610
+ item.target.path ? /* @__PURE__ */ jsx7(PathLine, { value: item.target.path }) : null,
611
+ item.preview ? /* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: item.preview.length > 120 ? `${item.preview.slice(0, 120)}...` : item.preview }) : null
612
+ ] }, item.title)),
613
+ plan.items.length > 5 ? /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
614
+ "...",
615
+ plan.items.length - 5,
616
+ " more items"
617
+ ] }) : null,
618
+ plan.warnings.map((warning) => /* @__PURE__ */ jsxs6(Text7, { color: theme.warning, children: [
619
+ "- ",
620
+ warningText(warning)
621
+ ] }, warning.code ?? warning.message)),
622
+ plan.disclaimers.map((disclaimer) => /* @__PURE__ */ jsxs6(Text7, { color: theme.dim, children: [
623
+ "- ",
624
+ disclaimer.message
625
+ ] }, disclaimer.code ?? disclaimer.message)),
626
+ /* @__PURE__ */ jsxs6(Box7, { marginTop: 1, children: [
627
+ /* @__PURE__ */ jsx7(Text7, { color: selectedAction === "apply" ? theme.accent : void 0, children: "[Apply]" }),
628
+ /* @__PURE__ */ jsx7(Text7, { children: " " }),
629
+ /* @__PURE__ */ jsx7(Text7, { color: selectedAction === "cancel" ? theme.accent : void 0, children: "[Cancel]" })
630
+ ] }),
631
+ /* @__PURE__ */ jsx7(Text7, { color: theme.dim, children: "Enter selects. a applies. c cancels." }),
632
+ result ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
633
+ /* @__PURE__ */ jsxs6(Text7, { color: result.applied ? theme.ok : theme.warning, children: [
634
+ "Consumer result: ",
635
+ result.summary
636
+ ] }),
637
+ !result.applied && ((result.diagnosticTargets?.length ?? 0) > 0 || result.warnings.length > 0) ? /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
638
+ /* @__PURE__ */ jsx7(Text7, { color: theme.warning, children: "Apply diagnostics" }),
639
+ result.diagnosticTargets?.map((target, index) => /* @__PURE__ */ jsxs6(
640
+ Text7,
641
+ {
642
+ children: [
643
+ "- ",
644
+ targetText(target)
645
+ ]
646
+ },
647
+ `${target.label ?? target.path ?? target.kind}-${index}`
648
+ )),
649
+ result.warnings.map((warning) => /* @__PURE__ */ jsxs6(
650
+ Text7,
651
+ {
652
+ color: theme.warning,
653
+ children: [
654
+ "- ",
655
+ warningText(warning)
656
+ ]
657
+ },
658
+ warning.code ?? warning.message
659
+ ))
660
+ ] }) : null
661
+ ] }) : null
662
+ ] });
663
+ }
664
+
587
665
  // src/cli/tui/App.tsx
588
666
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
589
667
  var rootItems = [
@@ -744,6 +822,10 @@ function App({
744
822
  const [activeHarness, setActiveHarness] = useState("opencode");
745
823
  const [activeAction, setActiveAction] = useState("update");
746
824
  const [reportVersion, setReportVersion] = useState(0);
825
+ const [providerEvidence, setProviderEvidence] = useState();
826
+ const [providerEvidenceLoading, setProviderEvidenceLoading] = useState(false);
827
+ const [providerEvidenceError, setProviderEvidenceError] = useState();
828
+ const providerEvidenceRequest = useRef(0);
747
829
  const [plan, setPlan] = useState();
748
830
  const [result, setResult] = useState();
749
831
  const [previewAction, setPreviewAction] = useState(
@@ -766,6 +848,30 @@ function App({
766
848
  const [editDraft, setEditDraft] = useState("");
767
849
  const [modelResult, setModelResult] = useState();
768
850
  const report = view === "status" || view === "manageHarness" ? operations.status(activeHarness) : void 0;
851
+ useEffect(() => {
852
+ if (view !== "status" || !operations.providerCapability) return;
853
+ const request = providerEvidenceRequest.current + 1;
854
+ providerEvidenceRequest.current = request;
855
+ setProviderEvidence(void 0);
856
+ setProviderEvidenceLoading(true);
857
+ setProviderEvidenceError(void 0);
858
+ void operations.providerCapability(activeHarness).then((evidence) => {
859
+ if (providerEvidenceRequest.current !== request) return;
860
+ setProviderEvidence(evidence);
861
+ setProviderEvidenceLoading(false);
862
+ }).catch((error) => {
863
+ if (providerEvidenceRequest.current !== request) return;
864
+ setProviderEvidenceError(
865
+ error instanceof Error ? error.message : String(error)
866
+ );
867
+ setProviderEvidenceLoading(false);
868
+ });
869
+ return () => {
870
+ if (providerEvidenceRequest.current === request) {
871
+ providerEvidenceRequest.current += 1;
872
+ }
873
+ };
874
+ }, [activeHarness, operations, reportVersion, view]);
769
875
  const currentManageItems = report?.state === "missing" ? installManageItems : manageItems;
770
876
  const modelRows = modelRoles.map((role) => {
771
877
  const model = editedModels[role.role] ?? role.model;
@@ -1331,10 +1437,18 @@ function App({
1331
1437
  Header,
1332
1438
  {
1333
1439
  title: `${report.displayName ?? activeHarness} Status`,
1334
- subtitle: "Categorized summary. Escape returns. r refreshes."
1440
+ subtitle: "Consumer-managed state and external provider evidence. Escape returns. r refreshes."
1335
1441
  }
1336
1442
  ),
1337
- /* @__PURE__ */ jsx8(StatusView, { report })
1443
+ /* @__PURE__ */ jsx8(
1444
+ StatusView,
1445
+ {
1446
+ report,
1447
+ providerEvidence: operations.providerCapability ? providerEvidence : report.providerCapability,
1448
+ providerEvidenceLoading,
1449
+ providerEvidenceError
1450
+ }
1451
+ )
1338
1452
  ] }, reportVersion);
1339
1453
  }
1340
1454
 
@@ -1,11 +1,12 @@
1
- import type { HarnessId } from '../../harness/types';
1
+ import type { HarnessId, ProviderCapabilityEvidence, ProviderEvidenceInput } from '../../harness/types';
2
2
  import { type ClaudeCodeOperationContext } from '../operations/claude-code';
3
3
  import { type CodexOperationContext } from '../operations/codex';
4
4
  import type { HarnessStatusReport, ModelRoleInput, OperationApplyResult, OperationPlan } from '../operations/types';
5
5
  import { type ModelOption } from './model-catalog';
6
6
  export type TuiAction = 'status' | 'list' | 'install' | 'update' | 'sync' | 'model';
7
7
  export interface TuiOperations {
8
- status(harness: HarnessId): HarnessStatusReport;
8
+ status(harness: HarnessId, evidence?: ProviderEvidenceInput): HarnessStatusReport;
9
+ providerCapability?(harness: HarnessId): Promise<ProviderCapabilityEvidence>;
9
10
  modelRoles(harness: HarnessId): ModelRoleInput[];
10
11
  modelOptions(harness: HarnessId): Promise<ModelOption[]>;
11
12
  plan(harness: HarnessId, action: Exclude<TuiAction, 'status' | 'list'>): OperationPlan;
@@ -15,6 +16,6 @@ export interface TuiOperations {
15
16
  export declare const opencodeModelRoles: ModelRoleInput[];
16
17
  export declare const codexModelRoles: ModelRoleInput[];
17
18
  export declare function getCodexModelRoles(source?: CodexOperationContext): ModelRoleInput[];
18
- export declare function getClaudeCodeModelRoles(source?: ClaudeCodeOperationContext): ModelRoleInput[];
19
+ export declare function getClaudeCodeModelRoles(_source?: ClaudeCodeOperationContext): ModelRoleInput[];
19
20
  export declare function getOpenCodeModelRoles(): ModelRoleInput[];
20
21
  export declare const defaultTuiOperations: TuiOperations;
@@ -4,7 +4,6 @@ export interface InstallArgs {
4
4
  tui: boolean;
5
5
  agent?: InstallAgent;
6
6
  tmux?: BooleanArg;
7
- skills?: BooleanArg;
8
7
  dryRun?: boolean;
9
8
  reset?: boolean;
10
9
  }
@@ -54,8 +53,6 @@ export interface OpenCodeConfig {
54
53
  export interface InstallConfig {
55
54
  agent: InstallAgent;
56
55
  hasTmux: boolean;
57
- installSkills: boolean;
58
- installCustomSkills: boolean;
59
56
  dryRun?: boolean;
60
57
  reset: boolean;
61
58
  }
@@ -66,14 +63,7 @@ export interface ConfigMergeResult {
66
63
  }
67
64
  export interface DetectedConfig {
68
65
  isInstalled: boolean;
69
- hasKimi: boolean;
70
66
  hasOpenAI: boolean;
71
- hasAnthropic?: boolean;
72
- hasCopilot?: boolean;
73
- hasZaiPlan?: boolean;
74
- hasAntigravity: boolean;
75
- hasChutes?: boolean;
76
- hasOpencodeZen: boolean;
77
67
  hasTmux: boolean;
78
68
  }
79
69
  import type { EffortSelection } from './model-effort';
@@ -1,43 +1,47 @@
1
- export declare const AGENT_ALIASES: Record<string, string>;
2
1
  type BuiltinAgentName = 'orchestrator' | 'explorer' | 'librarian' | 'oracle' | 'designer' | 'quick' | 'deep';
3
2
  export type AgentName = BuiltinAgentName | (string & {});
4
- export declare const SUBAGENT_NAMES: readonly string[];
3
+ export declare const SUBAGENT_NAMES: readonly ["explorer", "librarian", "oracle", "designer", "quick", "deep"];
5
4
  export declare const ORCHESTRATOR_NAME: "orchestrator";
6
5
  export declare const ALL_AGENT_NAMES: readonly BuiltinAgentName[];
7
6
  export declare const SUBAGENT_DELEGATION_RULES: Record<AgentName, readonly string[]>;
8
- export declare const DEFAULT_MODELS: Record<AgentName, string | undefined>;
9
7
  export declare const CONFIRMED_OPENAI_SUBAGENT_PRESET: {
10
- readonly oracle: {
11
- readonly model: "gpt-5.6-sol";
12
- readonly effort: "high";
13
- };
14
- readonly librarian: {
8
+ readonly explorer: {
15
9
  readonly model: "gpt-5.6-luna";
16
10
  readonly effort: "low";
17
11
  };
18
- readonly explorer: {
12
+ readonly librarian: {
19
13
  readonly model: "gpt-5.6-luna";
20
- readonly effort: "low";
14
+ readonly effort: "xhigh";
15
+ };
16
+ readonly oracle: {
17
+ readonly model: "gpt-5.6-sol";
18
+ readonly effort: "xhigh";
21
19
  };
22
20
  readonly designer: {
23
- readonly model: "gpt-5.6-terra";
24
- readonly effort: "high";
21
+ readonly model: "gpt-5.6-sol";
22
+ readonly effort: "medium";
25
23
  };
26
24
  readonly quick: {
27
25
  readonly model: "gpt-5.6-luna";
28
- readonly effort: "medium";
26
+ readonly effort: "xhigh";
29
27
  };
30
28
  readonly deep: {
31
- readonly model: "gpt-5.6-terra";
32
- readonly effort: "xhigh";
29
+ readonly model: "gpt-5.6-sol";
30
+ readonly effort: "medium";
33
31
  };
34
32
  };
33
+ export declare const OPENCODE_OPENAI_ORCHESTRATOR_PRESET: {
34
+ readonly model: "gpt-5.6-sol";
35
+ readonly effort: "xhigh";
36
+ };
37
+ export declare const DEFAULT_MODELS: Record<AgentName, string | undefined>;
38
+ export declare function getDefaultOpenCodeModel(name: BuiltinAgentName): string;
39
+ export declare function getDefaultOpenCodeVariant(name: BuiltinAgentName): string;
35
40
  export declare const POLL_INTERVAL_MS = 500;
36
41
  export declare const POLL_INTERVAL_SLOW_MS = 1000;
37
42
  export declare const POLL_INTERVAL_BACKGROUND_MS = 2000;
38
43
  export declare const DEFAULT_TIMEOUT_MS: number;
39
44
  export declare const MAX_POLL_TIME_MS: number;
40
45
  export declare const FALLBACK_FAILOVER_TIMEOUT_MS = 15000;
41
- export declare const DEFAULT_THOTH_COMMAND: string[];
42
46
  export declare const STABLE_POLLS_THRESHOLD = 3;
43
47
  export {};
@@ -1,5 +1,4 @@
1
1
  export * from './constants';
2
2
  export { loadAgentPrompt, loadPluginConfig } from './loader';
3
- export type { ThothConfig } from './schema';
4
3
  export * from './schema';
5
4
  export { getAgentOverride, getPrimaryModelId } from './utils';
@@ -9,7 +9,7 @@ import { type PluginConfig } from './schema';
9
9
  *
10
10
  * JSONC format is preferred over JSON (allows comments and trailing commas).
11
11
  * Project config takes precedence over user config. Nested objects (agents,
12
- * tmux, fallback, thoth, artifactStore, codex) are
12
+ * tmux, fallback, and harness generation options) are
13
13
  * deep-merged, while top-level arrays are replaced entirely
14
14
  * by project config.
15
15
  *