thoth-agents 0.13.1 → 0.13.2

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 CHANGED
@@ -52,8 +52,8 @@ verification you can follow—without manually coordinating every agent.
52
52
  successful; see [provider outcomes](docs/installation.md#thoth-mem-companion-setup).
53
53
 
54
54
  > [!NOTE]
55
- > OpenCode is the CLI's default harness. Pi is our recommendation for the best
56
- > Thoth-Agents experience. All four harnesses share the workflow and role design,
55
+ > OpenCode is the CLI's default harness, fully supported on OpenCode v2 (`>=2.2.6`).
56
+ > All four harnesses share the workflow and role design,
57
57
  > but their permissions, delegation, and runtime capabilities are not identical.
58
58
  > Your harness's trust and approval rules still apply.
59
59
 
@@ -68,7 +68,7 @@ The commands below install at **global/user scope**.
68
68
  | <a href="https://github.com/anomalyco/opencode"><picture><source media="(prefers-color-scheme: dark)" srcset="https://svgl.app/library/opencode-dark.svg"><img src="https://svgl.app/library/opencode.svg" alt="OpenCode logo" width="48" height="48"></picture></a><br>**OpenCode** | OpenCode >=2.2.6 native v2 plugin, package skills, agent team, and memory setup. | `npx thoth-agents@latest install --agent=opencode` |
69
69
  | <a href="https://github.com/openai/codex"><img src="https://github.com/openai.png?size=120" alt="OpenAI logo — Codex" width="48" height="48"></a><br>**Codex** | Native plugin plus the required global agent and instruction setup. **Close Codex first.** | `npx thoth-agents@latest install --agent=codex` |
70
70
  | <a href="https://claude.com/product/claude-code"><img src="https://github.com/anthropics.png?size=120" alt="Anthropic logo — Claude Code" width="48" height="48"></a><br>**Claude Code** | Marketplace agents and skills, completed by the CLI's external skills and memory setup. | `npx thoth-agents@latest install --agent=claude` |
71
- | <a href="https://github.com/earendil-works/pi"><img src="https://raw.githubusercontent.com/EremesNG/thoth-mem/master/img/pi.svg" alt="Pi logo" width="48" height="48"></a><br>**Pi** | Native package, five specialists, delegation, research, theme, sidebar and background-task extensions, workflow skills, and memory setup. **Recommended for the best experience.** | `npx thoth-agents@latest install --agent=pi` |
71
+ | <a href="https://github.com/earendil-works/pi"><img src="https://raw.githubusercontent.com/EremesNG/thoth-mem/master/img/pi.svg" alt="Pi logo" width="48" height="48"></a><br>**Pi** | Native package, five specialists, delegation, research, theme, sidebar and background-task extensions, workflow skills, and memory setup. | `npx thoth-agents@latest install --agent=pi` |
72
72
 
73
73
  Codex hooks require your trust; installation does not silently grant it. Consent
74
74
  during setup, or review and trust them in Codex via `/hooks` or the startup
@@ -109,7 +109,8 @@ direct calls, independently controlled by `enable_ask_orchestrator` and
109
109
  `enable_notify_orchestrator` (default true, global/project cascade) and denials. See
110
110
  [tool selection controls](docs/installation.md#configure-specialist-tools-inside-pi).
111
111
 
112
- Pi setup currently supports the default `~/.pi/agent` root. See the
112
+ Pi setup requires **Pi `>=1.5.0`** and currently supports the default
113
+ `~/.pi/agent` root. See the
113
114
  [Pi installation guide](docs/installation.md#pi) for runtime requirements,
114
115
  existing-package conflicts, and recovery. Thoth manages its separate Pi
115
116
  delegation runtime as package `@thoth-agents/pi-subagents` through
@@ -122,6 +123,19 @@ points Pi at the fork under `pi-packages/pi-subagents`; publishing the fork is
122
123
  not required for that path. Pi extensions run with your user's system
123
124
  permissions; agent tool allowlists are not an OS sandbox.
124
125
 
126
+ ### Optional OpenCode multi-account plugin (manual install)
127
+
128
+ [`@thoth-agents/opencode-multi-codex`](opencode-packages/opencode-multi-codex/README.md)
129
+ lets you use ChatGPT accounts concurrently: account 1 uses `openai`,
130
+ with additional accounts exposed as numbered providers such as `openai-codex-2`.
131
+ Pin agents to different accounts, inspect quota, and rotate around usage-limit
132
+ 429s. Manage accounts with `/codex-add`, `/codex-remove`, `/codex-switch`, and
133
+ `/codex-status`.
134
+
135
+ Install it separately using the package guide; the thoth-agents CLI does **not**
136
+ install or manage it. It requires OpenCode's legacy ChatGPT/Codex OAuth login;
137
+ API keys and the newer ChatGPT token-sharing flow are not supported.
138
+
125
139
  ### Optional Pi extensions (manual install)
126
140
 
127
141
  The installer does **not** install or manage the Claude/Antigravity bridges,
@@ -150,7 +164,7 @@ for both `claude-bridge` and `antigravity`. See
150
164
 
151
165
  ### Pi package inventory
152
166
 
153
- The eleven first-party `@thoth-agents/pi-*` packages are:
167
+ The twelve first-party `@thoth-agents/pi-*` packages are:
154
168
 
155
169
  | Package | Setup |
156
170
  | --- | --- |
@@ -158,6 +172,7 @@ The eleven first-party `@thoth-agents/pi-*` packages are:
158
172
  | [`@thoth-agents/pi-askcodex`](pi-packages/pi-askcodex/README.md) | Optional/manual |
159
173
  | [`@thoth-agents/pi-background-tasks`](pi-packages/pi-background-tasks/README.md) | Installer-managed |
160
174
  | [`@thoth-agents/pi-claude-bridge`](pi-packages/pi-claude-bridge/README.md) | Optional/manual |
175
+ | [`@thoth-agents/pi-contained-shell`](pi-packages/pi-contained-shell/README.md) | Installer-managed |
161
176
  | [`@thoth-agents/pi-core`](pi-packages/pi-core/README.md) | Shared library; not installer-managed |
162
177
  | [`@thoth-agents/pi-openai-fast`](pi-packages/pi-openai-fast/README.md) | Optional/manual |
163
178
  | [`@thoth-agents/pi-questions-user`](pi-packages/pi-questions-user/README.md) | Installer-managed |
@@ -290,6 +305,14 @@ Use the interactive CLI to inspect setup and configure role models:
290
305
  npx thoth-agents@latest
291
306
  ```
292
307
 
308
+ Other CLI commands (run with `npx thoth-agents@latest <command>`):
309
+
310
+ - `list`: list managed surfaces and actions.
311
+ - `sync`: preview managed configuration sync.
312
+ - `model`: preview role model/provider settings.
313
+
314
+ Add `--apply` to apply a reviewed `sync` or `model` plan.
315
+
293
316
  Choose models your harness and provider account can access. OpenCode ships the
294
317
  **`openai` model profile**. Run `/subagents-model` inside OpenCode to edit named
295
318
  model/variant profiles for all six roles, including orchestrator. Selection is
@@ -329,11 +352,13 @@ diagnostics. To remove attributable Codex surfaces, preview with
329
352
  to apply.
330
353
 
331
354
  For Pi, the first-party `thoth-agents` package remains exact and receipt-verified.
332
- The nine selected extensions use stable minimum-only `>=` ranges, so
355
+ The nine selected external packages use stable minimum-only `>=` ranges, so
333
356
  Pi's native package manager can update them independently without waiting for a
334
357
  Thoth release. Install and applied Update now include
335
358
  `@thoth-agents/pi-thoth-theme`, `@thoth-agents/pi-background-tasks` and
336
- `@thoth-agents/pi-sidebar` at `>=0.3.0`.
359
+ `@thoth-agents/pi-sidebar` at `>=0.3.0`, plus
360
+ `@thoth-agents/pi-contained-shell` at `>=0.1.0` for Windows shell containment
361
+ (a no-op on other platforms).
337
362
  Existing copies of these three packages from any source are preserved and verified
338
363
  without reinstalling when compatible; older copies are left untouched and block
339
364
  completion with manual upgrade guidance. Ambiguous sources fail closed. Status
@@ -350,17 +375,27 @@ The status line uses `thoth:subagents:usage`, not the removed raw
350
375
  `>=0.3.0` together and `/reload` to retain subagent cost display; the usage
351
376
  checkpoint discriminator is unchanged.
352
377
 
378
+ In Pi, `/thoth-theme` opens settings for icons, animation intensity, tool density,
379
+ and module toggles. Visual settings apply live; module toggles require `/reload`.
380
+ Opt-in `tools.collapsed` settings (`frame` | `compact` | `line`) let you keep framed
381
+ cards or use compact tool rows, including subagent and todo cards. Expanded output
382
+ is unchanged. See the [theme guide](pi-packages/pi-thoth-theme/README.md).
383
+
353
384
  The shared Pi Work panel uses pi-core's v2 data-only provider contract and
354
385
  [discovery/action API](pi-packages/pi-core/README.md#discovery-and-actions).
355
386
  Upgrade pi-subagents, pi-background-tasks and pi-todo together to `>=0.3.0`, then
356
387
  `/reload`; first-owner arbitration hides incompatible sections in mixed v1/v2
357
388
  installs. Subagent state is v2; background state, usage, requests and Render KIT remain v1.
389
+ Todos support grouping, ordering, and archiving in compact views; completed-row
390
+ limits preserve pending work. A compact Work summary remains visible when another
391
+ component replaces the editor.
358
392
 
359
393
  The [Pi sidebar](pi-packages/pi-sidebar/README.md) adds read-only Session,
360
394
  Workspace, Cost and discovered Todos/Subagents/Background panels in fullscreen and
361
395
  regular mode. `/sidebar` toggles, `/sidebar panels` lists ids for show/hide/order
362
- commands, and `/sidebar resize` resizes. `/sidebar settings` edits panel order,
363
- visibility, startup and default width; `/sidebar cost` opens task-cost curves
396
+ commands. Todo rows share compact counts with Work, group by status, and respect
397
+ archive and completed-row limits. `/sidebar resize` resizes. `/sidebar settings`
398
+ edits panel order, visibility, startup and default width; `/sidebar cost` opens task-cost curves
364
399
  against elapsed time per task, labeled by display name or a short task-summary name.
365
400
  Themed Agents/Background headers show static status-icon counts, omitting zero
366
401
  counts (Todos keeps completed/total), and detail commands; Workspace shows a
@@ -374,8 +409,12 @@ state v2 adds up to 100 cost-ranked persisted session summaries in `history`. Pr
374
409
  have guarded fallback; regular mode covers the live viewport, not historical
375
410
  scrollback. Update related extensions together to avoid mixed old UI owners.
376
411
 
377
- Pi's question UI replaces the editor without covering chat. `Ctrl+]` collapses it
378
- to a one-line dock and returns input to the editor; during an active run, `Enter`
412
+ Pi's question UI replaces the editor without covering chat. Panels size to content,
413
+ capped at 45% of terminal height. Narrow previews start collapsed; `p` toggles them
414
+ outside editors, and Alt+arrow keys scroll context. Tool `context` is limited to
415
+ 500 characters; longer proposals belong in the response before the question.
416
+ `Ctrl+]` collapses the question UI to a one-line dock and returns input to the
417
+ editor; during an active run, `Enter`
379
418
  queues a steering message without answering the question. `Ctrl+]` re-expands
380
419
  with answers and drafts preserved, and the open tool-call card shows collapsed
381
420
  state. While open, `Ctrl+]` shadows editor `jumpForward`; collapsed `Esc` belongs
@@ -1279,37 +1279,37 @@ var AGENT_ROLES = [
1279
1279
  mode: "write-capable",
1280
1280
  dispatch: "task",
1281
1281
  canMutateWorkspace: true,
1282
- scope: "UI/UX decisions, implementation, and visual verification",
1283
- responsibility: "Own user-facing implementation choices and visual quality for UI work.",
1282
+ scope: "UI/UX and creative/artistic decisions, implementation, and verification",
1283
+ responsibility: "Own UI/UX, creative/artistic output, and aesthetic quality.",
1284
1284
  useWhen: [
1285
- "User-facing UI/UX, interaction, accessibility, or visual quality is material."
1285
+ "Material UI/UX, interaction, accessibility, visual quality, or creative/artistic work: visual style, motion/animation, layouts/levels/maps, characters, visual/audio assets, branding, creative copy, narrative."
1286
1286
  ],
1287
1287
  doNotUseWhen: [
1288
- "Not for backend-only, non-visual, or correctness-heavy cross-cutting work."
1288
+ "Not for engineering-only or correctness-heavy cross-cutting work."
1289
1289
  ],
1290
1290
  escalateWhen: [
1291
1291
  "Escalate coupled contracts, migrations, or high risk to worker."
1292
1292
  ],
1293
1293
  toolGovernance: [
1294
- "may edit focused UI/UX files",
1295
- "owns screenshots and visual QA",
1294
+ "may edit focused UI/UX and creative/artistic files",
1295
+ "owns visual and creative QA, including screenshots",
1296
1296
  "does not delegate further"
1297
1297
  ],
1298
- verification: ["includes visual verification when applicable"]
1298
+ verification: ["includes visual and creative verification when applicable"]
1299
1299
  },
1300
1300
  {
1301
1301
  name: "worker",
1302
1302
  mode: "write-capable",
1303
1303
  dispatch: "task",
1304
1304
  canMutateWorkspace: true,
1305
- scope: "bounded nonvisual implementation and verification",
1306
- responsibility: "Handle bounded nonvisual implementation with full local context, including exact low-risk edits and correctness-critical, multi-file, edge-case-heavy, or high-risk work.",
1305
+ scope: "bounded engineering implementation and verification",
1306
+ responsibility: "Handle bounded engineering implementation (business logic, backend, systems, mechanic scripts, calculations, AI) with full local context, including exact low-risk edits and correctness-critical, multi-file, edge-case-heavy, or high-risk work.",
1307
1307
  useWhen: [
1308
- "Known bounded nonvisual implementation is ready, regardless of complexity; root direct work is limited to the bounded implementation-ownership exceptions.",
1308
+ "Known bounded engineering implementation, regardless of complexity; root direct work only under bounded implementation-ownership exceptions.",
1309
1309
  "Correctness-critical work may be multi-file, edge-case-heavy, migration, concurrency, shared-contract, or high-risk."
1310
1310
  ],
1311
1311
  doNotUseWhen: [
1312
- "Not for visual-only work, reviewed commits, or work explicitly retained by the user in root."
1312
+ "Not for visual-only or artistic/creative work, reviewed commits, or work explicitly retained by the user in root."
1313
1313
  ],
1314
1314
  escalateWhen: ["Return product or architecture choices to root."],
1315
1315
  toolGovernance: [
@@ -1341,7 +1341,8 @@ var IMPLEMENTATION_OWNERSHIP_POLICY = {
1341
1341
  "Direct-work exceptions: known low-risk mechanical work (reviewed commits included), no rediscovery; minimal authorized low-risk edits with known scope/verification, no discovery/independent judgment."
1342
1342
  ],
1343
1343
  writerRouting: [
1344
- "Known bounded implementation: directly to designer/worker, no mandatory Explorer; librarian: external evidence; Oracle: independent judgment; no fixed all-role pipeline."
1344
+ "Known bounded implementation: directly to designer/worker, no mandatory Explorer; librarian: external evidence; Oracle: independent judgment; no fixed all-role pipeline.",
1345
+ "Split mixed creative/engineering units between designer and worker with an agreed interface. User/root spec owns system/game rules and balance; worker implements."
1345
1346
  ],
1346
1347
  evidenceHandling: [
1347
1348
  "Conclusions/localized evidence/uncertainty, not files/source/log dumps; next action only from Oracle/Worker/Designer. Never repeat delegated discovery; fill gaps via targeted requests or bounded identified-evidence inspection. Independent verification stays mandatory."
@@ -1462,7 +1463,7 @@ function cloneReturnContract(contract) {
1462
1463
  var VERIFICATION_PROTOCOL = [
1463
1464
  "Completion reports identify changed files and verification evidence.",
1464
1465
  "Behavior changes receive the smallest sufficient automated check or a declared manual check.",
1465
- "Visual changes receive designer-owned visual QA when applicable."
1466
+ "Visual and creative output receives designer-owned visual and creative QA when applicable."
1466
1467
  ];
1467
1468
  var AGENT_PACK_CONTRACT = {
1468
1469
  roles: [...AGENT_ROLES],
@@ -2418,8 +2419,9 @@ var ROLE_SPECIFIC_RULES = {
2418
2419
  "Reject self-review: implementing root/writer cannot substitute for independent oracle judgment."
2419
2420
  ],
2420
2421
  designer: [
2421
- "Own user-facing choices, implementation, and visual verification.",
2422
- "Check relevant responsive and interaction states when feasible."
2422
+ "Own UI/UX and creative/artistic choices, implementation, and verification.",
2423
+ "Check relevant responsive and interaction states when feasible. Self-check creative assets for intent/style consistency.",
2424
+ "Use the creative tools the harness or project provides; report a capability gap otherwise."
2423
2425
  ],
2424
2426
  worker: [
2425
2427
  "Start at supplied entrypoints; read further only to resolve a concrete missing fact. Use tests first for behavior changes.",
@@ -2577,7 +2579,7 @@ function getRoleModelProfile(role) {
2577
2579
  case "oracle":
2578
2580
  return "Challenge assumptions and return evidence-backed judgment.";
2579
2581
  case "designer":
2580
- return "Make concrete UX choices and verify the visible result.";
2582
+ return "Make concrete UX and creative choices; verify intent/style consistency.";
2581
2583
  case "worker":
2582
2584
  return "Trace shared behavior, test assumptions, and verify edge cases.";
2583
2585
  }
@@ -19,15 +19,14 @@ import {
19
19
  renderAgentRoutingDescription,
20
20
  renderPromptSection,
21
21
  renderRolePrompt
22
- } from "./chunk-HFBCW4MD.js";
22
+ } from "./chunk-5ANFI4LW.js";
23
23
 
24
24
  // src/harness/writers/pi-agent.ts
25
25
  var PI_MANAGED_OWNER = "thoth-agents";
26
26
  var PI_ROOT_START = "<!-- thoth-agents:pi-root:start -->";
27
27
  var PI_ROOT_END = "<!-- thoth-agents:pi-root:end -->";
28
28
  var LIBRARIAN_RESEARCH_TOOLS = [
29
- "resolve-library-id",
30
- "query-docs",
29
+ "mcp__context7",
31
30
  "mcp",
32
31
  "web_search",
33
32
  "fetch_content",
@@ -855,7 +854,7 @@ function diagnostics() {
855
854
  code: "pi.mcp.adapter-backed",
856
855
  harness: "pi",
857
856
  surface: "grep.app",
858
- message: "Pi has no generic native MCP client in this contract; only grep.app is exposed through pi-mcp-adapter, while Context7 and pi-web-access remain native extensions.",
857
+ message: "Pi has no generic native MCP client in this contract; grep.app and Context7 are exposed through pi-mcp-adapter, while pi-web-access remains a native extension.",
859
858
  fallback: "diagnostic-only"
860
859
  }
861
860
  ];