thoth-agents 0.2.0 → 0.2.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.
|
@@ -2462,12 +2462,6 @@ var CLAUDE_CODE_SUBAGENT_DEFAULT_MODELS = {
|
|
|
2462
2462
|
quick: "haiku",
|
|
2463
2463
|
deep: "sonnet"
|
|
2464
2464
|
};
|
|
2465
|
-
var READ_ONLY_ROLE_TOOLS = {
|
|
2466
|
-
explorer: "Read, Grep, Glob",
|
|
2467
|
-
librarian: "Read, Grep, Glob, WebSearch, WebFetch",
|
|
2468
|
-
oracle: "Read, Grep, Glob"
|
|
2469
|
-
};
|
|
2470
|
-
var WRITE_CAPABLE_ROLE_TOOLS = "Read, Edit, Write, Bash, Grep, Glob";
|
|
2471
2465
|
function isClaudeCodeSubagentName(name) {
|
|
2472
2466
|
return name in CLAUDE_CODE_SUBAGENT_DEFAULT_MODELS;
|
|
2473
2467
|
}
|
|
@@ -2477,10 +2471,6 @@ function getClaudeCodeAgentModel(role, config) {
|
|
|
2477
2471
|
if (override && isClaudeCodeModel(override)) return override;
|
|
2478
2472
|
return CLAUDE_CODE_SUBAGENT_DEFAULT_MODELS[role.name];
|
|
2479
2473
|
}
|
|
2480
|
-
function toolsForRole(role) {
|
|
2481
|
-
if (role.canMutateWorkspace) return WRITE_CAPABLE_ROLE_TOOLS;
|
|
2482
|
-
return READ_ONLY_ROLE_TOOLS[role.name] ?? "Read, Grep, Glob";
|
|
2483
|
-
}
|
|
2484
2474
|
function claudeCodePromptSections(roleName) {
|
|
2485
2475
|
switch (roleName) {
|
|
2486
2476
|
case "orchestrator":
|
|
@@ -2532,7 +2522,7 @@ function claudeCodeRoleInstructions(role) {
|
|
|
2532
2522
|
`- Responsibility: ${role.responsibility}`,
|
|
2533
2523
|
"- Use AskUserQuestion for local blocking decisions.",
|
|
2534
2524
|
`- ${role.name} runs as an auto-discovered Claude Code plugin subagent invoked via Task(subagent_type: ${claudeCodeSubagentType(role.name)}); plugin subagents are namespaced with the plugin name. The orchestrator is the main Claude Code session.`,
|
|
2535
|
-
"-
|
|
2525
|
+
"- This subagent inherits ALL of the main thread's tools, including MCP servers (thoth-mem, context7, exa, grep_app); read-only roles (explorer, librarian, oracle) MUST NOT mutate the workspace per this operational contract (instruction-level, not tooling-enforced).",
|
|
2536
2526
|
...role.toolGovernance.map((rule) => `- ${rule}`),
|
|
2537
2527
|
...role.verification.map((rule) => `- ${rule}`),
|
|
2538
2528
|
"</role-operational-contract>"
|
|
@@ -2566,7 +2556,7 @@ function renderClaudeCodeRootInstructions(config) {
|
|
|
2566
2556
|
'- Before delegating after meaningful context changes, refresh the handoff body with root-owned mem_session(action="summary") or mem_save(kind="session_summary") when available.',
|
|
2567
2557
|
"- Use AskUserQuestion for blocking user decisions; do not ask those questions in plain prose.",
|
|
2568
2558
|
"- Track progress with TodoWrite; subagents do not own progress checkboxes or root-only memory.",
|
|
2569
|
-
"-
|
|
2559
|
+
"- Subagents inherit all of your tools (including MCP servers); role permissions are instruction-level, so read-only roles (explorer, librarian, oracle) must not mutate the workspace per their operational contract.",
|
|
2570
2560
|
"</claude-code-runtime>"
|
|
2571
2561
|
].join("\n");
|
|
2572
2562
|
}
|
|
@@ -2622,7 +2612,6 @@ function renderSubagentArtifacts(config) {
|
|
|
2622
2612
|
const content = renderClaudeCodeSubagent({
|
|
2623
2613
|
name: role.name,
|
|
2624
2614
|
description: role.responsibility,
|
|
2625
|
-
tools: toolsForRole(role),
|
|
2626
2615
|
model: getClaudeCodeAgentModel(role, config),
|
|
2627
2616
|
instructions: roleInstructions2(role, config)
|
|
2628
2617
|
});
|
|
@@ -2835,7 +2824,7 @@ function buildClaudeCodeSetupPlan(config) {
|
|
|
2835
2824
|
],
|
|
2836
2825
|
disclaimers: [
|
|
2837
2826
|
"The orchestrator agent is the Claude Code main thread (plugin settings.json `agent` key); while enabled it replaces the default system prompt for every session in scope.",
|
|
2838
|
-
"
|
|
2827
|
+
"Every subagent inherits all main-thread tools, including MCP servers; read-only roles must not mutate the workspace per their operational contract (instruction-level, not tooling-enforced).",
|
|
2839
2828
|
"Subagent models accept only sonnet, opus, haiku, or inherit.",
|
|
2840
2829
|
"User-scope skills-directory plugins load hooks and MCP servers without extra approval; project-scope requires accepting the workspace trust dialog."
|
|
2841
2830
|
]
|
|
@@ -3025,7 +3014,7 @@ function claudeCodeConfig(context = { cwd: process.cwd() }, dryRun) {
|
|
|
3025
3014
|
function claudeCodeDisclaimers() {
|
|
3026
3015
|
return [
|
|
3027
3016
|
{
|
|
3028
|
-
message: "
|
|
3017
|
+
message: "Subagents inherit all main-thread tools (including MCP servers); read-only roles must not mutate the workspace per their operational contract (instruction-level, not tooling-enforced). The orchestrator is the main session.",
|
|
3029
3018
|
code: "claude-code-first-class"
|
|
3030
3019
|
},
|
|
3031
3020
|
{
|
package/dist/cli/index.js
CHANGED
package/dist/cli/tui/index.js
CHANGED
package/package.json
CHANGED