iosm-cli 0.2.4 → 0.2.6

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 (66) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +447 -285
  3. package/dist/core/agent-profiles.d.ts +1 -0
  4. package/dist/core/agent-profiles.d.ts.map +1 -1
  5. package/dist/core/agent-profiles.js +10 -6
  6. package/dist/core/agent-profiles.js.map +1 -1
  7. package/dist/core/agent-session.d.ts +1 -1
  8. package/dist/core/agent-session.d.ts.map +1 -1
  9. package/dist/core/agent-session.js +6 -2
  10. package/dist/core/agent-session.js.map +1 -1
  11. package/dist/core/agent-teams.d.ts.map +1 -1
  12. package/dist/core/agent-teams.js +90 -19
  13. package/dist/core/agent-teams.js.map +1 -1
  14. package/dist/core/footer-data-provider.d.ts +6 -1
  15. package/dist/core/footer-data-provider.d.ts.map +1 -1
  16. package/dist/core/footer-data-provider.js +9 -0
  17. package/dist/core/footer-data-provider.js.map +1 -1
  18. package/dist/core/parallel-task-agent.d.ts +23 -1
  19. package/dist/core/parallel-task-agent.d.ts.map +1 -1
  20. package/dist/core/parallel-task-agent.js +110 -20
  21. package/dist/core/parallel-task-agent.js.map +1 -1
  22. package/dist/core/shared-memory.d.ts +16 -2
  23. package/dist/core/shared-memory.d.ts.map +1 -1
  24. package/dist/core/shared-memory.js +283 -91
  25. package/dist/core/shared-memory.js.map +1 -1
  26. package/dist/core/singular.d.ts.map +1 -1
  27. package/dist/core/singular.js +3 -1
  28. package/dist/core/singular.js.map +1 -1
  29. package/dist/core/subagents.d.ts +1 -1
  30. package/dist/core/subagents.d.ts.map +1 -1
  31. package/dist/core/subagents.js +11 -3
  32. package/dist/core/subagents.js.map +1 -1
  33. package/dist/core/swarm/planner.d.ts.map +1 -1
  34. package/dist/core/swarm/planner.js +200 -12
  35. package/dist/core/swarm/planner.js.map +1 -1
  36. package/dist/core/swarm/scheduler.d.ts +2 -0
  37. package/dist/core/swarm/scheduler.d.ts.map +1 -1
  38. package/dist/core/swarm/scheduler.js +87 -6
  39. package/dist/core/swarm/scheduler.js.map +1 -1
  40. package/dist/core/system-prompt.d.ts.map +1 -1
  41. package/dist/core/system-prompt.js +1 -0
  42. package/dist/core/system-prompt.js.map +1 -1
  43. package/dist/core/tools/ast-grep.d.ts.map +1 -1
  44. package/dist/core/tools/ast-grep.js +2 -0
  45. package/dist/core/tools/ast-grep.js.map +1 -1
  46. package/dist/core/tools/shared-memory.d.ts.map +1 -1
  47. package/dist/core/tools/shared-memory.js +79 -11
  48. package/dist/core/tools/shared-memory.js.map +1 -1
  49. package/dist/core/tools/task.d.ts +12 -1
  50. package/dist/core/tools/task.d.ts.map +1 -1
  51. package/dist/core/tools/task.js +1023 -76
  52. package/dist/core/tools/task.js.map +1 -1
  53. package/dist/core/tools/yq.d.ts.map +1 -1
  54. package/dist/core/tools/yq.js +2 -0
  55. package/dist/core/tools/yq.js.map +1 -1
  56. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  57. package/dist/modes/interactive/components/footer.js +2 -1
  58. package/dist/modes/interactive/components/footer.js.map +1 -1
  59. package/dist/modes/interactive/interactive-mode.d.ts +13 -0
  60. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  61. package/dist/modes/interactive/interactive-mode.js +881 -74
  62. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  63. package/docs/cli-reference.md +4 -0
  64. package/docs/interactive-mode.md +2 -0
  65. package/docs/orchestration-and-subagents.md +5 -0
  66. package/package.json +1 -1
@@ -26,4 +26,5 @@ export declare function isValidProfileName(name: string): name is AgentProfileNa
26
26
  export declare function getProfileNames(): AgentProfileName[];
27
27
  /** Profiles visible in main operator UX (Shift+Tab / mode switching). */
28
28
  export declare function getMainProfileNames(): AgentProfileName[];
29
+ export declare function isReadOnlyProfileName(name: string | undefined): boolean;
29
30
  //# sourceMappingURL=agent-profiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-profiles.d.ts","sourceRoot":"","sources":["../../src/core/agent-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,MAAM,gBAAgB,GACzB,SAAS,GACT,MAAM,GACN,MAAM,GACN,cAAc,GACd,eAAe,GACf,eAAe,GACf,MAAM,GACN,MAAM,CAAC;AAEV,MAAM,WAAW,YAAY;IAC5B,kBAAkB;IAClB,IAAI,EAAE,gBAAgB,CAAC;IACvB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,sCAAsC;IACtC,aAAa,EAAE,aAAa,CAAC;IAC7B,8CAA8C;IAC9C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAoBD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAkFjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,gBAAyB,CAAC;AAE7D,gDAAgD;AAChD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAKtE;AAED,uCAAuC;AACvC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,gBAAgB,CAEzE;AAED,6CAA6C;AAC7C,wBAAgB,eAAe,IAAI,gBAAgB,EAAE,CAEpD;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,IAAI,gBAAgB,EAAE,CAExD"}
1
+ {"version":3,"file":"agent-profiles.d.ts","sourceRoot":"","sources":["../../src/core/agent-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,MAAM,gBAAgB,GACzB,SAAS,GACT,MAAM,GACN,MAAM,GACN,cAAc,GACd,eAAe,GACf,eAAe,GACf,MAAM,GACN,MAAM,CAAC;AAEV,MAAM,WAAW,YAAY;IAC5B,kBAAkB;IAClB,IAAI,EAAE,gBAAgB,CAAC;IACvB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,sCAAsC;IACtC,aAAa,EAAE,aAAa,CAAC;IAC7B,8CAA8C;IAC9C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAqBD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAkFjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,gBAAyB,CAAC;AAE7D,gDAAgD;AAChD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAKtE;AAED,uCAAuC;AACvC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,gBAAgB,CAEzE;AAED,6CAA6C;AAC7C,wBAAgB,eAAe,IAAI,gBAAgB,EAAE,CAEpD;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,IAAI,gBAAgB,EAAE,CAExD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEvE"}
@@ -14,6 +14,7 @@ const READ_EXPLORATION_TOOLS = [
14
14
  "semantic_search",
15
15
  ];
16
16
  const WRITE_ENGINEERING_TOOLS = ["read", "bash", "edit", "write", ...READ_EXPLORATION_TOOLS.slice(1)];
17
+ const READ_ONLY_PROFILE_SET = new Set(["explore", "plan", "iosm_analyst"]);
17
18
  export const AGENT_PROFILES = {
18
19
  explore: {
19
20
  name: "explore",
@@ -28,9 +29,9 @@ export const AGENT_PROFILES = {
28
29
  name: "plan",
29
30
  label: "Plan",
30
31
  description: "Technical architect. Explores codebase and produces implementation plan without executing.",
31
- tools: ["read", "bash", ...READ_EXPLORATION_TOOLS.slice(1)],
32
+ tools: [...READ_EXPLORATION_TOOLS],
32
33
  thinkingLevel: "medium",
33
- systemPromptAppend: "You are in PLAN mode. Explore the codebase thoroughly, then produce a detailed implementation plan. Do NOT write or edit any files. Output a structured plan with steps, risks, and trade-offs. Pause and ask the user to confirm before implementing.",
34
+ systemPromptAppend: "You are in PLAN mode. Explore the codebase thoroughly, then produce a detailed implementation plan. Do NOT write or edit any files. Do not execute shell commands. Output a structured plan with steps, risks, and trade-offs. Pause and ask the user to confirm before implementing.",
34
35
  mainMode: true,
35
36
  },
36
37
  iosm: {
@@ -45,10 +46,10 @@ export const AGENT_PROFILES = {
45
46
  iosm_analyst: {
46
47
  name: "iosm_analyst",
47
48
  label: "IOSM Analyst",
48
- description: "Analyzes IOSM artifacts and metrics. Read + bash only.",
49
- tools: ["read", "bash", ...READ_EXPLORATION_TOOLS.slice(1)],
49
+ description: "Analyzes IOSM artifacts and metrics. Read-only analysis tools.",
50
+ tools: [...READ_EXPLORATION_TOOLS],
50
51
  thinkingLevel: "low",
51
- systemPromptAppend: "You are an IOSM Analyst. Your job is to analyze .iosm/ artifacts, cycle reports, metrics history, and codebase evidence. Be precise and evidence-based. Report metric values, confidence levels, and risks with concrete evidence from the repository. Do not modify product source code.",
52
+ systemPromptAppend: "You are an IOSM Analyst. Your job is to analyze .iosm/ artifacts, cycle reports, metrics history, and codebase evidence. Be precise and evidence-based. Report metric values, confidence levels, and risks with concrete evidence from the repository. Do not modify product source code. Do not execute shell commands.",
52
53
  mainMode: false,
53
54
  },
54
55
  iosm_verifier: {
@@ -75,7 +76,7 @@ export const AGENT_PROFILES = {
75
76
  description: "Orchestration-first mode. Full tools with adaptive agent/delegate execution.",
76
77
  tools: [...WRITE_ENGINEERING_TOOLS],
77
78
  thinkingLevel: "medium",
78
- systemPromptAppend: "You are in META mode. Keep full-mode capabilities and operator UX, but change execution behavior: your primary optimization target is safe parallel execution through top-level agents and nested delegates. First classify the request. For conversational or non-repository requests (quick Q&A, opinion, explanation, rewrite, translation, casual chat), do not orchestrate, do not call task, do not run repository reconnaissance, and answer directly in the user's language. Do not output internal reasoning or planning preambles; return only the final user-facing answer. The main agent is the orchestrator for the entire task and should not be the default implementer for non-trivial work. For actionable work on a codebase, do only bounded read-only recon, just enough to identify the relevant files, constraints, and independent workstreams. Then derive a detailed execution graph of tasks, agents, delegate subtasks, dependencies, writable areas, and verification steps before implementation. For any non-trivial task, orchestration is the default and single-agent execution is the exception: launch multiple top-level task calls as soon as the workstreams are known, prefer emitting them in the same assistant turn when branches are independent, and require child agents to further delegate whenever their assigned work still contains multiple independent slices. Do not keep implementing in the main agent after recon, do not make direct write/edit changes in the main agent before launching the first task call unless the work is clearly trivial and single-file, and do not collapse the whole job into one root implementation subagent when independent workstreams exist. Specialist agents should own focused workstreams rather than becoming the sole executor for the entire task. If the user requested a specific number of parallel agents or delegates, treat that fan-out as a hard target when feasible and explain the blocker precisely when it is not feasible. When the user did not specify counts, bias toward multiple smaller focused workstreams rather than one broad worker, and favor additional delegate fan-out inside each workstream when that shortens the critical path safely. Treat code changes as incomplete until relevant tests are added or updated and targeted verification passes. Do not finalize until every launched agent and delegate has finished and their results have been synthesized. If any non-trivial part of the work remained single-agent or undelegated, explain why orchestration was not beneficial and include DELEGATION_IMPOSSIBLE with a precise reason. If no code changed and tests were skipped, explicitly justify safety.",
79
+ systemPromptAppend: "You are in META mode. Keep full-mode capabilities and operator UX, but change execution behavior: your primary optimization target is safe parallel execution through top-level agents and nested delegates. First classify the request. For conversational or non-repository requests (quick Q&A, opinion, explanation, rewrite, translation, casual chat), do not orchestrate, do not call task, do not run repository reconnaissance, and answer directly in the user's language. Do not output internal reasoning or planning preambles; return only the final user-facing answer. The main agent is the orchestrator for the entire task and should not be the default implementer for non-trivial work. For actionable work on a codebase, do only bounded read-only recon, just enough to identify the relevant files, constraints, and independent workstreams. Then derive a detailed execution graph of tasks, agents, delegate subtasks, dependencies, writable areas, and verification steps before implementation. For any non-trivial task, orchestration is the default and single-agent execution is the exception: launch multiple top-level task calls as soon as the workstreams are known, prefer emitting them in the same assistant turn when branches are independent, and require child agents to further delegate whenever their assigned work still contains multiple independent slices. Do not keep implementing in the main agent after recon, do not make direct write/edit changes in the main agent before launching the first task call unless the work is clearly trivial and single-file, and do not collapse the whole job into one root implementation subagent when independent workstreams exist. Specialist agents should own focused workstreams rather than becoming the sole executor for the entire task. If the user requested a specific number of parallel agents or delegates, treat that fan-out as a hard target when feasible and explain the blocker precisely when it is not feasible. When the user did not specify counts, bias toward multiple smaller focused workstreams rather than one broad worker, and favor additional delegate fan-out inside each workstream when that shortens the critical path safely. Use shared memory as the default inter-agent channel: prefer scope=run keys for cross-stream state, scope=task keys for local state, and stable key namespaces such as findings/<stream>, plan/<stream>, risks/<stream>. Read before overwrite, use CAS (if_version) for contested keys, and reserve append mode for log/timeline keys only. Keep memory writes compact and deduplicated; avoid writing on every loop iteration when state has not changed. Treat code changes as incomplete until relevant tests are added or updated and targeted verification passes. Do not finalize until every launched agent and delegate has finished and their results have been synthesized. If any non-trivial part of the work remained single-agent or undelegated, explain why orchestration was not beneficial and include DELEGATION_IMPOSSIBLE with a precise reason. If no code changed and tests were skipped, explicitly justify safety. When reporting performance, speedup, scores, compliance, or conflict counts, use only observed runtime evidence (task details, shared-memory keys, test outputs, or files verified on disk); otherwise mark the metric as unknown. Never claim a report/file/path exists unless you created it in this run or confirmed it exists in the workspace.",
79
80
  mainMode: true,
80
81
  },
81
82
  full: {
@@ -108,4 +109,7 @@ export function getProfileNames() {
108
109
  export function getMainProfileNames() {
109
110
  return getProfileNames().filter((name) => AGENT_PROFILES[name].mainMode === true);
110
111
  }
112
+ export function isReadOnlyProfileName(name) {
113
+ return !!name && READ_ONLY_PROFILE_SET.has(name);
114
+ }
111
115
  //# sourceMappingURL=agent-profiles.js.map
@@ -1 +1 @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,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,EAAE,CAAC;QACxC,OAAO,cAAc,CAAC,oBAAoB,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,cAAc,CAAC,IAAwB,CAAC,CAAC;AACjD,CAAC;AAED,uCAAuC;AACvC,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC9C,OAAO,IAAI,IAAI,cAAc,CAAC;AAC/B,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,eAAe;IAC9B,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAuB,CAAC;AAC1D,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,mBAAmB;IAClC,OAAO,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import type { ThinkingLevel } from \"@mariozechner/pi-agent-core\";\n\nexport type AgentProfileName =\n\t| \"explore\"\n\t| \"plan\"\n\t| \"iosm\"\n\t| \"iosm_analyst\"\n\t| \"iosm_verifier\"\n\t| \"cycle_planner\"\n\t| \"meta\"\n\t| \"full\";\n\nexport interface AgentProfile {\n\t/** Profile key */\n\tname: AgentProfileName;\n\t/** Human-readable label for TUI display */\n\tlabel: string;\n\t/** Short description shown in help */\n\tdescription: string;\n\t/** Tool names to enable */\n\ttools: string[];\n\t/** Thinking level for this profile */\n\tthinkingLevel: ThinkingLevel;\n\t/** Text appended to the base system prompt */\n\tsystemPromptAppend: string;\n\t/** Whether this profile should appear in main profile switching UX (Shift+Tab). */\n\tmainMode?: boolean;\n}\n\nconst READ_EXPLORATION_TOOLS = [\n\t\"read\",\n\t\"grep\",\n\t\"find\",\n\t\"ls\",\n\t\"rg\",\n\t\"fd\",\n\t\"ast_grep\",\n\t\"comby\",\n\t\"jq\",\n\t\"yq\",\n\t\"semgrep\",\n\t\"sed\",\n\t\"semantic_search\",\n] as const;\n\nconst WRITE_ENGINEERING_TOOLS = [\"read\", \"bash\", \"edit\", \"write\", ...READ_EXPLORATION_TOOLS.slice(1)] as const;\n\nexport const AGENT_PROFILES: Record<AgentProfileName, AgentProfile> = {\n\texplore: {\n\t\tname: \"explore\",\n\t\tlabel: \"Explore\",\n\t\tdescription: \"Fast read-only codebase exploration. No file modifications.\",\n\t\ttools: [...READ_EXPLORATION_TOOLS],\n\t\tthinkingLevel: \"off\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are in EXPLORE mode. You may ONLY read files — never write, edit, or run commands that modify state. Answer concisely. Prefer grep/find/ls over bash. Explore fast and report findings.\",\n\t\tmainMode: false,\n\t},\n\tplan: {\n\t\tname: \"plan\",\n\t\tlabel: \"Plan\",\n\t\tdescription:\n\t\t\t\"Technical architect. Explores codebase and produces implementation plan without executing.\",\n\t\ttools: [\"read\", \"bash\", ...READ_EXPLORATION_TOOLS.slice(1)],\n\t\tthinkingLevel: \"medium\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are in PLAN mode. Explore the codebase thoroughly, then produce a detailed implementation plan. Do NOT write or edit any files. Output a structured plan with steps, risks, and trade-offs. Pause and ask the user to confirm before implementing.\",\n\t\tmainMode: true,\n\t},\n\tiosm: {\n\t\tname: \"iosm\",\n\t\tlabel: \"IOSM\",\n\t\tdescription: \"IOSM methodology mode: runtime context, /iosm loop, and IOSM artifact lifecycle.\",\n\t\ttools: [...WRITE_ENGINEERING_TOOLS],\n\t\tthinkingLevel: \"medium\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are in IOSM mode. Use IOSM runtime context and methodology for actionable engineering requests. Keep IOSM artifacts synchronized when implementation changes.\",\n\t\tmainMode: true,\n\t},\n\tiosm_analyst: {\n\t\tname: \"iosm_analyst\",\n\t\tlabel: \"IOSM Analyst\",\n\t\tdescription: \"Analyzes IOSM artifacts and metrics. Read + bash only.\",\n\t\ttools: [\"read\", \"bash\", ...READ_EXPLORATION_TOOLS.slice(1)],\n\t\tthinkingLevel: \"low\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are an IOSM Analyst. Your job is to analyze .iosm/ artifacts, cycle reports, metrics history, and codebase evidence. Be precise and evidence-based. Report metric values, confidence levels, and risks with concrete evidence from the repository. Do not modify product source code.\",\n\t\tmainMode: false,\n\t},\n\tiosm_verifier: {\n\t\tname: \"iosm_verifier\",\n\t\tlabel: \"IOSM Verifier\",\n\t\tdescription:\n\t\t\t\"Post-change IOSM verification. Validates metrics and artifacts after code changes.\",\n\t\ttools: [\"read\", \"bash\", \"write\"],\n\t\tthinkingLevel: \"low\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are an IOSM Verifier. Run deterministic checks on the repository to verify IOSM metrics are correct and up-to-date after code changes. Update only .iosm/ artifact files. Validate JSON after edits. Keep checks bounded and focused.\",\n\t\tmainMode: false,\n\t},\n\tcycle_planner: {\n\t\tname: \"cycle_planner\",\n\t\tlabel: \"Cycle Planner\",\n\t\tdescription: \"Plans IOSM improvement cycles with hypotheses and goals.\",\n\t\ttools: [\"read\", \"bash\", \"write\"],\n\t\tthinkingLevel: \"medium\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are an IOSM Cycle Planner. Analyze the current codebase state, review the IOSM cycle report, and produce actionable improvement hypotheses. Write results to .iosm/ files. Be specific about expected metric improvements.\",\n\t\tmainMode: false,\n\t},\n\t\tmeta: {\n\t\t\tname: \"meta\",\n\t\t\tlabel: \"Meta\",\n\t\t\tdescription: \"Orchestration-first mode. Full tools with adaptive agent/delegate execution.\",\n\t\t\ttools: [...WRITE_ENGINEERING_TOOLS],\n\t\t\tthinkingLevel: \"medium\",\n\t\t\tsystemPromptAppend:\n\t\t\t\t\"You are in META mode. Keep full-mode capabilities and operator UX, but change execution behavior: your primary optimization target is safe parallel execution through top-level agents and nested delegates. First classify the request. For conversational or non-repository requests (quick Q&A, opinion, explanation, rewrite, translation, casual chat), do not orchestrate, do not call task, do not run repository reconnaissance, and answer directly in the user's language. Do not output internal reasoning or planning preambles; return only the final user-facing answer. The main agent is the orchestrator for the entire task and should not be the default implementer for non-trivial work. For actionable work on a codebase, do only bounded read-only recon, just enough to identify the relevant files, constraints, and independent workstreams. Then derive a detailed execution graph of tasks, agents, delegate subtasks, dependencies, writable areas, and verification steps before implementation. For any non-trivial task, orchestration is the default and single-agent execution is the exception: launch multiple top-level task calls as soon as the workstreams are known, prefer emitting them in the same assistant turn when branches are independent, and require child agents to further delegate whenever their assigned work still contains multiple independent slices. Do not keep implementing in the main agent after recon, do not make direct write/edit changes in the main agent before launching the first task call unless the work is clearly trivial and single-file, and do not collapse the whole job into one root implementation subagent when independent workstreams exist. Specialist agents should own focused workstreams rather than becoming the sole executor for the entire task. If the user requested a specific number of parallel agents or delegates, treat that fan-out as a hard target when feasible and explain the blocker precisely when it is not feasible. When the user did not specify counts, bias toward multiple smaller focused workstreams rather than one broad worker, and favor additional delegate fan-out inside each workstream when that shortens the critical path safely. Treat code changes as incomplete until relevant tests are added or updated and targeted verification passes. Do not finalize until every launched agent and delegate has finished and their results have been synthesized. If any non-trivial part of the work remained single-agent or undelegated, explain why orchestration was not beneficial and include DELEGATION_IMPOSSIBLE with a precise reason. If no code changed and tests were skipped, explicitly justify safety.\",\n\t\t\tmainMode: true,\n\t\t},\n\tfull: {\n\t\tname: \"full\",\n\t\tlabel: \"Full\",\n\t\tdescription: \"Full access. All tools enabled. Default engineering agent.\",\n\t\ttools: [...WRITE_ENGINEERING_TOOLS],\n\t\tthinkingLevel: \"medium\",\n\t\tsystemPromptAppend: \"\",\n\t\tmainMode: true,\n\t},\n};\n\nexport const DEFAULT_PROFILE_NAME: AgentProfileName = \"full\";\n\n/** Get profile by name, falling back to full */\nexport function getAgentProfile(name: string | undefined): AgentProfile {\n\tif (!name || !(name in AGENT_PROFILES)) {\n\t\treturn AGENT_PROFILES[DEFAULT_PROFILE_NAME];\n\t}\n\treturn AGENT_PROFILES[name as AgentProfileName];\n}\n\n/** Check if a profile name is valid */\nexport function isValidProfileName(name: string): name is AgentProfileName {\n\treturn name in AGENT_PROFILES;\n}\n\n/** Get all profile names for help display */\nexport function getProfileNames(): AgentProfileName[] {\n\treturn Object.keys(AGENT_PROFILES) as AgentProfileName[];\n}\n\n/** Profiles visible in main operator UX (Shift+Tab / mode switching). */\nexport function getMainProfileNames(): AgentProfileName[] {\n\treturn getProfileNames().filter((name) => AGENT_PROFILES[name].mainMode === true);\n}\n"]}
1
+ {"version":3,"file":"agent-profiles.js","sourceRoot":"","sources":["../../src/core/agent-profiles.ts"],"names":[],"mappings":"AA6BA,MAAM,sBAAsB,GAAG;IAC9B,MAAM;IACN,MAAM;IACN,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,SAAS;IACT,KAAK;IACL,iBAAiB;CACR,CAAC;AAEX,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAU,CAAC;AAC/G,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAE7F,MAAM,CAAC,MAAM,cAAc,GAA2C;IACrE,OAAO,EAAE;QACR,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,6DAA6D;QAC1E,KAAK,EAAE,CAAC,GAAG,sBAAsB,CAAC;QAClC,aAAa,EAAE,KAAK;QACpB,kBAAkB,EACjB,6LAA6L;QAC9L,QAAQ,EAAE,KAAK;KACf;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM;QACb,WAAW,EACV,4FAA4F;QAC7F,KAAK,EAAE,CAAC,GAAG,sBAAsB,CAAC;QAClC,aAAa,EAAE,QAAQ;QACvB,kBAAkB,EACjB,uRAAuR;QACxR,QAAQ,EAAE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E,KAAK,EAAE,CAAC,GAAG,uBAAuB,CAAC;QACnC,aAAa,EAAE,QAAQ;QACvB,kBAAkB,EAAE,EAAE;QACtB,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAqB,MAAM,CAAC;AAE7D,gDAAgD;AAChD,MAAM,UAAU,eAAe,CAAC,IAAwB;IACvD,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,EAAE,CAAC;QACxC,OAAO,cAAc,CAAC,oBAAoB,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,cAAc,CAAC,IAAwB,CAAC,CAAC;AACjD,CAAC;AAED,uCAAuC;AACvC,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC9C,OAAO,IAAI,IAAI,cAAc,CAAC;AAC/B,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,eAAe;IAC9B,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAuB,CAAC;AAC1D,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,mBAAmB;IAClC,OAAO,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;AACnF,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAwB;IAC7D,OAAO,CAAC,CAAC,IAAI,IAAI,qBAAqB,CAAC,GAAG,CAAC,IAAwB,CAAC,CAAC;AACtE,CAAC","sourcesContent":["import type { ThinkingLevel } from \"@mariozechner/pi-agent-core\";\n\nexport type AgentProfileName =\n\t| \"explore\"\n\t| \"plan\"\n\t| \"iosm\"\n\t| \"iosm_analyst\"\n\t| \"iosm_verifier\"\n\t| \"cycle_planner\"\n\t| \"meta\"\n\t| \"full\";\n\nexport interface AgentProfile {\n\t/** Profile key */\n\tname: AgentProfileName;\n\t/** Human-readable label for TUI display */\n\tlabel: string;\n\t/** Short description shown in help */\n\tdescription: string;\n\t/** Tool names to enable */\n\ttools: string[];\n\t/** Thinking level for this profile */\n\tthinkingLevel: ThinkingLevel;\n\t/** Text appended to the base system prompt */\n\tsystemPromptAppend: string;\n\t/** Whether this profile should appear in main profile switching UX (Shift+Tab). */\n\tmainMode?: boolean;\n}\n\nconst READ_EXPLORATION_TOOLS = [\n\t\"read\",\n\t\"grep\",\n\t\"find\",\n\t\"ls\",\n\t\"rg\",\n\t\"fd\",\n\t\"ast_grep\",\n\t\"comby\",\n\t\"jq\",\n\t\"yq\",\n\t\"semgrep\",\n\t\"sed\",\n\t\"semantic_search\",\n] as const;\n\nconst WRITE_ENGINEERING_TOOLS = [\"read\", \"bash\", \"edit\", \"write\", ...READ_EXPLORATION_TOOLS.slice(1)] as const;\nconst READ_ONLY_PROFILE_SET = new Set<AgentProfileName>([\"explore\", \"plan\", \"iosm_analyst\"]);\n\nexport const AGENT_PROFILES: Record<AgentProfileName, AgentProfile> = {\n\texplore: {\n\t\tname: \"explore\",\n\t\tlabel: \"Explore\",\n\t\tdescription: \"Fast read-only codebase exploration. No file modifications.\",\n\t\ttools: [...READ_EXPLORATION_TOOLS],\n\t\tthinkingLevel: \"off\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are in EXPLORE mode. You may ONLY read files — never write, edit, or run commands that modify state. Answer concisely. Prefer grep/find/ls over bash. Explore fast and report findings.\",\n\t\tmainMode: false,\n\t},\n\tplan: {\n\t\tname: \"plan\",\n\t\tlabel: \"Plan\",\n\t\tdescription:\n\t\t\t\"Technical architect. Explores codebase and produces implementation plan without executing.\",\n\t\ttools: [...READ_EXPLORATION_TOOLS],\n\t\tthinkingLevel: \"medium\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are in PLAN mode. Explore the codebase thoroughly, then produce a detailed implementation plan. Do NOT write or edit any files. Do not execute shell commands. Output a structured plan with steps, risks, and trade-offs. Pause and ask the user to confirm before implementing.\",\n\t\tmainMode: true,\n\t},\n\tiosm: {\n\t\tname: \"iosm\",\n\t\tlabel: \"IOSM\",\n\t\tdescription: \"IOSM methodology mode: runtime context, /iosm loop, and IOSM artifact lifecycle.\",\n\t\ttools: [...WRITE_ENGINEERING_TOOLS],\n\t\tthinkingLevel: \"medium\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are in IOSM mode. Use IOSM runtime context and methodology for actionable engineering requests. Keep IOSM artifacts synchronized when implementation changes.\",\n\t\tmainMode: true,\n\t},\n\tiosm_analyst: {\n\t\tname: \"iosm_analyst\",\n\t\tlabel: \"IOSM Analyst\",\n\t\tdescription: \"Analyzes IOSM artifacts and metrics. Read-only analysis tools.\",\n\t\ttools: [...READ_EXPLORATION_TOOLS],\n\t\tthinkingLevel: \"low\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are an IOSM Analyst. Your job is to analyze .iosm/ artifacts, cycle reports, metrics history, and codebase evidence. Be precise and evidence-based. Report metric values, confidence levels, and risks with concrete evidence from the repository. Do not modify product source code. Do not execute shell commands.\",\n\t\tmainMode: false,\n\t},\n\tiosm_verifier: {\n\t\tname: \"iosm_verifier\",\n\t\tlabel: \"IOSM Verifier\",\n\t\tdescription:\n\t\t\t\"Post-change IOSM verification. Validates metrics and artifacts after code changes.\",\n\t\ttools: [\"read\", \"bash\", \"write\"],\n\t\tthinkingLevel: \"low\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are an IOSM Verifier. Run deterministic checks on the repository to verify IOSM metrics are correct and up-to-date after code changes. Update only .iosm/ artifact files. Validate JSON after edits. Keep checks bounded and focused.\",\n\t\tmainMode: false,\n\t},\n\tcycle_planner: {\n\t\tname: \"cycle_planner\",\n\t\tlabel: \"Cycle Planner\",\n\t\tdescription: \"Plans IOSM improvement cycles with hypotheses and goals.\",\n\t\ttools: [\"read\", \"bash\", \"write\"],\n\t\tthinkingLevel: \"medium\",\n\t\tsystemPromptAppend:\n\t\t\t\"You are an IOSM Cycle Planner. Analyze the current codebase state, review the IOSM cycle report, and produce actionable improvement hypotheses. Write results to .iosm/ files. Be specific about expected metric improvements.\",\n\t\tmainMode: false,\n\t},\n\t\tmeta: {\n\t\t\tname: \"meta\",\n\t\t\tlabel: \"Meta\",\n\t\t\tdescription: \"Orchestration-first mode. Full tools with adaptive agent/delegate execution.\",\n\t\t\ttools: [...WRITE_ENGINEERING_TOOLS],\n\t\t\tthinkingLevel: \"medium\",\n\t\t\tsystemPromptAppend:\n\t\t\t\t\"You are in META mode. Keep full-mode capabilities and operator UX, but change execution behavior: your primary optimization target is safe parallel execution through top-level agents and nested delegates. First classify the request. For conversational or non-repository requests (quick Q&A, opinion, explanation, rewrite, translation, casual chat), do not orchestrate, do not call task, do not run repository reconnaissance, and answer directly in the user's language. Do not output internal reasoning or planning preambles; return only the final user-facing answer. The main agent is the orchestrator for the entire task and should not be the default implementer for non-trivial work. For actionable work on a codebase, do only bounded read-only recon, just enough to identify the relevant files, constraints, and independent workstreams. Then derive a detailed execution graph of tasks, agents, delegate subtasks, dependencies, writable areas, and verification steps before implementation. For any non-trivial task, orchestration is the default and single-agent execution is the exception: launch multiple top-level task calls as soon as the workstreams are known, prefer emitting them in the same assistant turn when branches are independent, and require child agents to further delegate whenever their assigned work still contains multiple independent slices. Do not keep implementing in the main agent after recon, do not make direct write/edit changes in the main agent before launching the first task call unless the work is clearly trivial and single-file, and do not collapse the whole job into one root implementation subagent when independent workstreams exist. Specialist agents should own focused workstreams rather than becoming the sole executor for the entire task. If the user requested a specific number of parallel agents or delegates, treat that fan-out as a hard target when feasible and explain the blocker precisely when it is not feasible. When the user did not specify counts, bias toward multiple smaller focused workstreams rather than one broad worker, and favor additional delegate fan-out inside each workstream when that shortens the critical path safely. Use shared memory as the default inter-agent channel: prefer scope=run keys for cross-stream state, scope=task keys for local state, and stable key namespaces such as findings/<stream>, plan/<stream>, risks/<stream>. Read before overwrite, use CAS (if_version) for contested keys, and reserve append mode for log/timeline keys only. Keep memory writes compact and deduplicated; avoid writing on every loop iteration when state has not changed. Treat code changes as incomplete until relevant tests are added or updated and targeted verification passes. Do not finalize until every launched agent and delegate has finished and their results have been synthesized. If any non-trivial part of the work remained single-agent or undelegated, explain why orchestration was not beneficial and include DELEGATION_IMPOSSIBLE with a precise reason. If no code changed and tests were skipped, explicitly justify safety. When reporting performance, speedup, scores, compliance, or conflict counts, use only observed runtime evidence (task details, shared-memory keys, test outputs, or files verified on disk); otherwise mark the metric as unknown. Never claim a report/file/path exists unless you created it in this run or confirmed it exists in the workspace.\",\n\t\t\tmainMode: true,\n\t\t},\n\tfull: {\n\t\tname: \"full\",\n\t\tlabel: \"Full\",\n\t\tdescription: \"Full access. All tools enabled. Default engineering agent.\",\n\t\ttools: [...WRITE_ENGINEERING_TOOLS],\n\t\tthinkingLevel: \"medium\",\n\t\tsystemPromptAppend: \"\",\n\t\tmainMode: true,\n\t},\n};\n\nexport const DEFAULT_PROFILE_NAME: AgentProfileName = \"full\";\n\n/** Get profile by name, falling back to full */\nexport function getAgentProfile(name: string | undefined): AgentProfile {\n\tif (!name || !(name in AGENT_PROFILES)) {\n\t\treturn AGENT_PROFILES[DEFAULT_PROFILE_NAME];\n\t}\n\treturn AGENT_PROFILES[name as AgentProfileName];\n}\n\n/** Check if a profile name is valid */\nexport function isValidProfileName(name: string): name is AgentProfileName {\n\treturn name in AGENT_PROFILES;\n}\n\n/** Get all profile names for help display */\nexport function getProfileNames(): AgentProfileName[] {\n\treturn Object.keys(AGENT_PROFILES) as AgentProfileName[];\n}\n\n/** Profiles visible in main operator UX (Shift+Tab / mode switching). */\nexport function getMainProfileNames(): AgentProfileName[] {\n\treturn getProfileNames().filter((name) => AGENT_PROFILES[name].mainMode === true);\n}\n\nexport function isReadOnlyProfileName(name: string | undefined): boolean {\n\treturn !!name && READ_ONLY_PROFILE_SET.has(name as AgentProfileName);\n}\n"]}
@@ -23,7 +23,7 @@ import { type PromptTemplate } from "./prompt-templates.js";
23
23
  import type { ResourceLoader } from "./resource-loader.js";
24
24
  import type { BranchSummaryEntry, SessionManager } from "./session-manager.js";
25
25
  import type { SettingsManager } from "./settings-manager.js";
26
- import type { AgentProfileName } from "./agent-profiles.js";
26
+ import { type AgentProfileName } from "./agent-profiles.js";
27
27
  import type { BashOperations } from "./tools/bash.js";
28
28
  import type { ToolPermissionRequest } from "./tools/index.js";
29
29
  /** Parsed skill block from a user message */
@@ -1 +1 @@
1
- {"version":3,"file":"agent-session.d.ts","sourceRoot":"","sources":["../../src/core/agent-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EACX,KAAK,EACL,UAAU,EACV,YAAY,EACZ,UAAU,EACV,SAAS,EACT,aAAa,EACb,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAoB,YAAY,EAAW,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOvG,OAAO,EAAE,KAAK,UAAU,EAAgE,MAAM,oBAAoB,CAAC;AACnH,OAAO,EACN,KAAK,gBAAgB,EAQrB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAQhB,KAAK,eAAe,EACpB,KAAK,cAAc,EASnB,KAAK,QAAQ,EAMb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAA2D,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EAA0B,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAmB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEhG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAA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OAAO,CAAC,MAAM,CAAC;IAuBxD;;;;OAIG;IACH,oBAAoB,IAAI,MAAM,GAAG,SAAS;IA4B1C;;OAEG;IACH,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIhD;;OAEG;IACH,IAAI,eAAe,IAAI,eAAe,GAAG,SAAS,CAEjD;CACD"}
@@ -31,6 +31,7 @@ import { expandPromptTemplate } from "./prompt-templates.js";
31
31
  import { getLatestCompactionEntry } from "./session-manager.js";
32
32
  import { BUILTIN_SLASH_COMMANDS } from "./slash-commands.js";
33
33
  import { buildSystemPrompt } from "./system-prompt.js";
34
+ import { isReadOnlyProfileName } from "./agent-profiles.js";
34
35
  import { applyPostToolUseHooks, applyPreToolUseHooks, applyStopHooks, applyUserPromptSubmitHooks, emptyHooksConfig, } from "./hooks.js";
35
36
  import { extractTaskPlanFromAssistantMessage, formatTaskPlanMessageContent, taskPlanSignature, TASK_PLAN_CUSTOM_TYPE, } from "./task-plan.js";
36
37
  import { createAllTools } from "./tools/index.js";
@@ -59,8 +60,8 @@ function parseOrchestrateBlock(text) {
59
60
  const attrs = match[1] ?? "";
60
61
  const body = (match[2] ?? "").trim();
61
62
  const readAttr = (name) => {
62
- const attrMatch = attrs.match(new RegExp(`${name}="([^"]+)"`, "i"));
63
- return attrMatch?.[1]?.trim();
63
+ const attrMatch = attrs.match(new RegExp(`${name}\\s*=\\s*(?:"([^"]+)"|'([^']+)')`, "i"));
64
+ return (attrMatch?.[1] ?? attrMatch?.[2])?.trim();
64
65
  };
65
66
  const mode = readAttr("mode");
66
67
  const agentsRaw = readAttr("agents");
@@ -2562,6 +2563,9 @@ export class AgentSession {
2562
2563
  * @param options.operations Custom BashOperations for remote execution
2563
2564
  */
2564
2565
  async executeBash(command, onChunk, options) {
2566
+ if (isReadOnlyProfileName(this._profileName)) {
2567
+ throw new Error(`Bash execution is disabled in ${this._profileName} profile. Switch to full/meta/iosm for command execution.`);
2568
+ }
2565
2569
  this._appendSessionTrace({
2566
2570
  type: "bash_start",
2567
2571
  command,