@agimon-ai/po-cloudflare 0.0.2-alpha.68 → 0.0.2-alpha.69

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 (61) hide show
  1. package/dist/assets/plugins/compositions.json +1 -1
  2. package/dist/{delegation-D_jWNaxQ.js → delegation-DiLrRjhN.js} +8 -2
  3. package/dist/{index.edge-DUY_I7ge.js → index.edge-DV4fYP5_.js} +1 -1
  4. package/dist/{server-DOmehsa4.js → server-25Vwtqlo.js} +1 -1
  5. package/dist/{server-CYxdtBb_.js → server-B2i9WFAF.js} +1 -1
  6. package/dist/{server-Bw7G8gu9.js → server-BKbb9pBX.js} +1 -1
  7. package/dist/{server-C5hAiE7w.js → server-BitEUKft.js} +1 -1
  8. package/dist/{server-BV-o0ptT.js → server-BqC1J4bp.js} +1 -1
  9. package/dist/{server-Pz-zNNhY.js → server-Bwqpki-g.js} +1 -1
  10. package/dist/{server-BpIXCg-r.js → server-By7gCePL.js} +1 -1
  11. package/dist/{server-DtNVrb8-.js → server-C6Fkn5ta.js} +1 -1
  12. package/dist/{server-BJFEK5_x.js → server-C6buwY8r.js} +1 -1
  13. package/dist/{server-BZKfOoYB.js → server-C7dWR_TM.js} +1 -1
  14. package/dist/{server-BtNqgd0Z.js → server-CHybsfvm.js} +1 -1
  15. package/dist/{server-BgzMjQfL.js → server-Ca8GZjmn.js} +1 -1
  16. package/dist/{server-B82-C1_m.js → server-CkVWKIJF.js} +1 -1
  17. package/dist/{server-DD1g8Tbx.js → server-Cnq9dmtU.js} +1 -1
  18. package/dist/{server-D8dGxbRJ.js → server-D4ZylKnb.js} +1 -1
  19. package/dist/{server-D_MFjnkp.js → server-DI9FvVGK.js} +1 -1
  20. package/dist/{server-Bkikh74t.js → server-DOM3TrYy.js} +1 -1
  21. package/dist/{server-3Eb8Oavi.js → server-DRVGacv8.js} +1 -1
  22. package/dist/{server-DXK7BkCk.js → server-DsTv7OAy.js} +4 -10
  23. package/dist/{server-BlTzxTT4.js → server-Dy08o5HC.js} +1 -1
  24. package/dist/{server-T1azDs_g.js → server-UM-tY7vB.js} +1 -1
  25. package/dist/{server-BlOB0tFU.js → server-w1y5JL4K.js} +3 -3
  26. package/dist/worker.js +106 -100
  27. package/package.json +47 -47
  28. /package/dist/assets/plugins/slots/{approval.09e72f36--LJHsebf.js → approval.72ae703a--LJHsebf.js} +0 -0
  29. /package/dist/assets/plugins/slots/{artifacts.50b639bb-d5GsIocu.js → artifacts.77a5ce89-d5GsIocu.js} +0 -0
  30. /package/dist/assets/plugins/slots/{author.ea449ace-DziO0VS5.js → author.eb67f043-DziO0VS5.js} +0 -0
  31. /package/dist/assets/plugins/slots/{autocompact.6f428144-9YjYd22Y.js → autocompact.f08b6833-9YjYd22Y.js} +0 -0
  32. /package/dist/assets/plugins/slots/{backdrop-bamboo.6e4c928d-Bm0mWAC8.js → backdrop-bamboo.8ee8a555-Bm0mWAC8.js} +0 -0
  33. /package/dist/assets/plugins/slots/{browse.fa1f1a50--bKW5ykm.js → browse.59782354--bKW5ykm.js} +0 -0
  34. /package/dist/assets/plugins/slots/{builtin-tools.75108f21-9fANpRh_.js → builtin-tools.abc3edcc-9fANpRh_.js} +0 -0
  35. /package/dist/assets/plugins/slots/{calendar.d8b70190-CKlE2doP.js → calendar.d83ca386-CKlE2doP.js} +0 -0
  36. /package/dist/assets/plugins/slots/{codemode.c58fb583-cglbq8QS.js → codemode.c68822dc-cglbq8QS.js} +0 -0
  37. /package/dist/assets/plugins/slots/{domain.753f9f92-D9sUiZql.js → domain.d3fc60b5-D9sUiZql.js} +0 -0
  38. /package/dist/assets/plugins/slots/{edit.804fec90-6Mza7Hjt.js → edit.2aa43041-6Mza7Hjt.js} +0 -0
  39. /package/dist/assets/plugins/slots/{files.66ffc636-WHn5Gdic.js → files.c1e584ee-WHn5Gdic.js} +0 -0
  40. /package/dist/assets/plugins/slots/{goal.45dffa01-BvexMPvv.js → goal.0d58b5cd-BvexMPvv.js} +0 -0
  41. /package/dist/assets/plugins/slots/{grep.98262cff-DbGVffiT.js → grep.b067b8cb-DbGVffiT.js} +0 -0
  42. /package/dist/assets/plugins/slots/{help.5fbd20f7-kbU3J4Xi.js → help.e5f29767-kbU3J4Xi.js} +0 -0
  43. /package/dist/assets/plugins/slots/{log.cb964209-DvSE2vgR.js → log.24faf8a0-DvSE2vgR.js} +0 -0
  44. /package/dist/assets/plugins/slots/{mcp.82cc1ff5-CeaKnP1D.js → mcp.a6805ffa-CeaKnP1D.js} +0 -0
  45. /package/dist/assets/plugins/slots/{plan.3852ba52-Bt2rpaqy.js → plan.cf1a06d8-Bt2rpaqy.js} +0 -0
  46. /package/dist/assets/plugins/slots/{profile.ab16dcec-B34pp7Hn.js → profile.1b4aeee4-B34pp7Hn.js} +0 -0
  47. /package/dist/assets/plugins/slots/{prompts.ae48c07a-D6VUETST.js → prompts.a5509377-D6VUETST.js} +0 -0
  48. /package/dist/assets/plugins/slots/{read.4560591a-Llon_0Tq.js → read.a43eeb4a-Llon_0Tq.js} +0 -0
  49. /package/dist/assets/plugins/slots/{runner.6e494d59-DO3sECBF.js → runner.03b699da-DO3sECBF.js} +0 -0
  50. /package/dist/assets/plugins/slots/{scaffold.d87a6ee0-CvSuO2D8.js → scaffold.f3763f9c-CvSuO2D8.js} +0 -0
  51. /package/dist/assets/plugins/slots/{sessions.6f47cb4c-vcLr_ydh.js → sessions.dc7ce5f8-vcLr_ydh.js} +0 -0
  52. /package/dist/assets/plugins/slots/{skill.62a0a1b3-CUhfTJm0.js → skill.2b6ba429-CUhfTJm0.js} +0 -0
  53. /package/dist/assets/plugins/slots/{space.65a27e5a-CK400r-T.js → space.a8901278-CK400r-T.js} +0 -0
  54. /package/dist/assets/plugins/slots/{subagents.8bb9992c-PslcWqTJ.js → subagents.6f67a972-PslcWqTJ.js} +0 -0
  55. /package/dist/assets/plugins/slots/{template-advanced.59f3f98a-BTkmGgBq.js → template-advanced.f01464c1-BTkmGgBq.js} +0 -0
  56. /package/dist/assets/plugins/slots/{template-desktop.0f0b8491-CzHLhLSu.js → template-desktop.ecd4f617-CzHLhLSu.js} +0 -0
  57. /package/dist/assets/plugins/slots/{template-elegant.0e3b0acf-Dt6A4_Jx.js → template-elegant.c457393d-Dt6A4_Jx.js} +0 -0
  58. /package/dist/assets/plugins/slots/{vault.3cbfcdc3-DNycF4o_.js → vault.593b32bd-DNycF4o_.js} +0 -0
  59. /package/dist/assets/plugins/slots/{voice.a952113d-DHMYvbhM.js → voice.fa8f3d31-DHMYvbhM.js} +0 -0
  60. /package/dist/assets/plugins/slots/{web-search.65013836-Ce4pUmwI.js → web-search.3d2cba0f-Ce4pUmwI.js} +0 -0
  61. /package/dist/assets/plugins/slots/{workflows.cbc5c5c0-DTPkw4iQ.js → workflows.41d5eec7-DTPkw4iQ.js} +0 -0
@@ -1,6 +1,12 @@
1
- import { $t as Boolean, Jt as String, Qt as Integer, Yt as Number, Zt as Literal, in as Optional, qt as Union, rn as _Object_ } from "./serverPlugin-D3FrgkrT.js";
1
+ import { $t as Boolean, Jt as String, Qt as Integer, Yt as Number, Zt as Literal, an as _Array_, in as Optional, qt as Union, rn as _Object_ } from "./serverPlugin-D3FrgkrT.js";
2
2
  //#region ../../core/po-core/src/schemas/delegation.ts
3
- const InlineAgentSchema = _Object_({ systemPrompt: String({ minLength: 1 }) }, { additionalProperties: false });
3
+ const InlineAgentSchema = _Object_({
4
+ systemPrompt: String({ minLength: 1 }),
5
+ tools: Optional(_Array_(String({ minLength: 1 }), {
6
+ minItems: 1,
7
+ description: "Tool names to limit this agent to. Omit for the same tools as a named agent."
8
+ }))
9
+ }, { additionalProperties: false });
4
10
  /** Shared Cordis contract for an optional delegated-run provider. */
5
11
  const PO_DELEGATION_SERVICE = "po/delegation";
6
12
  /** Live lifecycle of a session-owned, awaited inline Team run. */
@@ -142,7 +142,7 @@ var _virtual_po_bundle_default = {
142
142
  "/bundle/po-session/src/prompts/codemode-how-to-session/SKILL.md": "---\nname: codemode-how-to-session\ndescription: 'List related sessions and start briefed independent work as a coordinator through the sessions namespace. No stop or delete capability.'\n---\n\n# Use Session\n\nCall `discover({ namespace: 'sessions' })` for the operations this host offers, then use `exec`.\n\n- `sessions.list()` shows only sessions your host admits to your communication scope.\n- Messages to sessions go through the `network` namespace: load `codemode-how-to-network`.\n- `sessions.read({ sessionId })` is available only on hosts offering authorized peer execution state. It is not a general transcript reader. Node session peers support messages, not reads.\n- `sessions.start({ name, brief, workspaceId? })` is for coordinators. Start only independent, long-running work the person will follow on its own. Use a subagent for work you will wait on. Use `network.send` when a session already exists.\n\nA start normally uses the coordinator's own workspace. Only Home may target an admitted workspace without its own live or dormant coordinator. The host enforces the shared limit of five starts an hour. There are no stop or delete operations.\n\nEvery operation is main-agent only. Child, missing and unknown callers are refused, as are another session's run, disposed runs and cancelled work before dispatch. Never retry with a different caller identity or bypass a refusal through another tool.\n\nA successful start returns `sessionId`. If it also returns `promptError`, creation committed but its first prompt failed: keep the ID, report the failure, and do not start another session as a retry. A cancellation after creation does not undo creation or refund the quota.\n\nWhere the result carries `goal`, the brief is the session's goal: it keeps working until the goal is met, not for one turn, so write the brief as an outcome with what done looks like. `goal: false` means the session has no Goal and read the brief as one ordinary prompt. A brief holds at most 4,000 characters and a longer one is refused before anything is created: put long detail in a file and name the file.\n\nYou hear back without asking. A session you started files a stop report when it stays stopped, and that wakes you with its last answer. Do not poll it or ask for status: give it new work with `network.send`, or leave it.\n\n`start_session` remains the fallback on hosts without code mode. While this namespace is bound, its covered direct tool is hidden. `team.startSession` is a compatibility forwarder; prefer `sessions.start`. Team's `intercom` still handles native team coordination.\n",
143
143
  "/bundle/po-skill/src/prompts/help-how-to-author-skill/SKILL.md": "---\nname: help-how-to-author-skill\ndescription: Author and distribute Po agent skills. Use when creating a SKILL.md, adding supporting references or scripts, configuring a discovered skill source, or publishing activation-gated Help prompts from a Po package.\n---\n\n# Author Po skills\n\nCreate one focused skill per directory. Name the directory with lowercase letters, digits, and hyphens, and give it a required `SKILL.md`:\n\n```markdown\n---\nname: repository-review\ndescription: Review repository changes when the user asks for implementation-risk and regression analysis.\n---\n\n# Repository review\n\nPut the essential workflow and non-obvious constraints here.\n```\n\nThe frontmatter `name` must match the directory. Make the description specific enough for automatic routing. Keep the entrypoint concise, and put substantial conditional details in linked `references/`. Add `scripts/`, `assets/`, or `agents/` only when the skill actually uses them.\n\n## Choose the distribution path\n\n- For discovered plugin skills, ship `skills/<name>/SKILL.md` and configure the plugin and optional skill subset in `domains.yaml`. po-skill registers each loaded skill once with an any-of gate for its admitting domains. Shared `.claude/skills` follow domains that keep shared skills; repository `.po/skills` are unconditional. Do not register discovered plugin skills again from the package.\n- For guidance that should appear only while Po Help is active, put it at `src/prompts/<name>/SKILL.md`, publish `src/prompts`, link it from the package's H1-led `llms.txt`, and register a Help descriptor through `PO_HELP_SERVICE`.\n- For repository content selected by domains, place the skill in the plugin or shared skill source configured by `domains.yaml`; do not hard-code that directory into the Skill package.\n\nPi Help descriptors carry only `name` and `description`. The Help service resolves the owning package from the contribution's exact package `source` and `moduleUrl`, then wraps its `llms.txt`. Keep every index link inside the published package.\n\nOn the server host, contribute the same Help skill through a named `resource/*.server.ts` route with `when: PO_HELP_WHEN` from `@agimon-ai/po-core/help`. Include its useful description and an absolute `path` resolved with `packageResourcePath(import.meta.url, ...)`; a reader alone does not make the skill discoverable in the agent prompt. Keep ordinary runtime skills under their existing conditions.\n\nPackage-owned Help tools use ordinary named tool routes, not documentation descriptors. Server tools use the existing Help condition and execution guards. Pi tools also need `createPiHelpToolGate(packageName, toolNames)`: install its services and onStart in the owning root, then authorize each invocation with `gate.assertActive`. Portable `when` metadata alone does not enforce the Pi gate. The Help README and Log package's `diagnose_agent` contribution show the complete pattern. Bound diagnostics to the current session, omit secrets, and use existing approval mechanisms for repairs.\n\n## Verification\n\nValidate the skill frontmatter, ensure every relative reference resolves, and test the packed package rather than relying on checkout-only files. For discovered skills, cover domain swaps, shared-skill opt-outs, and duplicate source admission. Pi globally name-deduplicates, so a plugin can shadow a same-name shared fallback even when its domain is off. Test the actual prompt and tool surface before activation, while active, and after deactivation; stale calls must be rejected without removing ordinary capabilities. Use `/skills` or `SPC e s` in an interactive session to confirm the expected owner and invocation name. Do not add remote MCP exposure merely because a local Help contribution exists.\n",
144
144
  "/bundle/po-skill/src/prompts/help-how-to-skill/SKILL.md": "---\nname: help-how-to-skill\ndescription: Use Po's skill catalog and deferred discovery. Use when browsing available skills, invoking /skill:name, understanding Help and extension-owned skill groups, or diagnosing why a skill is absent or shadowed.\n---\n\n# Use Po skills\n\nOpen the skill browser with `/skills` or `SPC e s`. The catalog groups normal session skills, package Help skills, plugin skills, and extension-contributed directories by owner.\n\nFor agent tool calls, use `load_skill` with the exact name. With at most 20 active skills, its description lists the names and descriptions. Above 20, use `search_skills` to find skills by name or description, then load the chosen name. Search returns metadata only, not skill instructions or paths.\n\nInvoke a skill with `/skill:<name>`. Po expands deferred skills before Pi handles the input, so a skill can be invokable even when its full body was not placed in the initial prompt. Help skills appear only while Help mode is active.\n\nWhen a skill is missing:\n\n1. Confirm its owning package, plugin, domain, or Help mode is active.\n2. Wait for deferred discovery to finish by opening `/skills` or invoking the exact skill.\n3. Check the browser diagnostics for unreadable `SKILL.md` files, invalid frontmatter, duplicate names, or unavailable Help resources.\n4. If two sources use the same name, remember that normal loaded and deferred skills take precedence over Help skills.\n5. After changing domains or package composition, reload or relaunch as requested so the session receives the new skill directories.\n",
145
- "/bundle/po-team/src/prompts/codemode-how-to-team/SKILL.md": "---\nname: codemode-how-to-team\ndescription: 'Use @agimon-ai/po-team: await inline agents with team.run and inspect native team members and tracked runs before steering or stopping them.'\n---\n\n# Use Team\n\nPo Team runs subagents for this session. Use `team.run` in code mode for one awaited inline agent. Use the `subagent` tool for named-agent discovery and persistent background runs, steering and stopping. The `team` namespace also reads their state, so a script can inspect many runs at once and return only what matters.\n\n```ts\nconst runs = team.runs();\nreturn runs\n .filter((run) => run.activityState === 'needs_attention')\n .map(({ runId, agent, attentionReason }) => ({ runId, agent, attentionReason }));\n```\n\n- `team.members()` lists the native members of this session: the main agent and its subagents, each with the `task` it carries. These are not peer sessions.\n- `team.runs()` lists tracked runs with `status`, `activityState`, `currentTool`, `tokens` and `cost`. A finished run drops off 10 minutes after you acknowledge it, so read what you need from it first.\n- Both calls are synchronous and read-only. Start, steer and stop through the `subagent` tool, and hand work to a subagent through the `tasks` namespace when it belongs on the task list.\n- Check `activityState` before acting. `needs_attention` and `waiting_for_reply` mean the run is waiting on you: read its `attentionReason` and `summary`, then steer it. `working`, `tool` and `starting` are normal, so do not interrupt them.\n- Return a short summary, not the whole run list. Nothing is printed unless the script returns it.\n\n## Await inline agents\n\n```ts\nconst phases = [];\nfor (const phase of items[0].phases) {\n const result = await team.run({\n systemPrompt: phase.systemPrompt,\n task: phase.task,\n model: phase.model, // provider/model:high sets thinking effort\n timeoutMs: phase.timeoutMs,\n });\n phases.push({ name: phase.name, ...result });\n if (result.status !== 'completed') break;\n}\nreturn phases;\n```\n\n- `team.run` resolves when the child finishes and cleanup is acknowledged, not when it starts. It always returns `{runId?, status, output, error?}`. `output` is final assistant text. Check `status`: `completed`, `failed`, or `stopped`. Failures are data, not exceptions.\n- Timeout defaults to 30 minutes and accepts positive integer milliseconds up to 2 hours. Timeout, code-mode cancellation and session disposal stop owned children before returning. The awaiting script itself does not survive a restart: retry from saved artifacts.\n- When a resumed `dynamicWorkflow` step calls `team.run` again with the same system prompt, task and model as its interrupted execution did, the call continues that earlier run's conversation instead of starting over. It starts fresh when the asks differ or the host no longer keeps the earlier run (only its newest finished runs stay resumable).\n- Await phases sequentially within each asset. Use Mastra `foreach` with concurrency 3 to bound live assets. Planner start concurrency alone does not bound live children.\n- For long fan-out use `exec_background`, return the aggregate results, end your turn, and wait for its one completion message. There is no completion wake per child and no polling loop.\n- Callbacks must catch unexpected errors and return structured failures. The code-mode membrane absorbs thrown/rejected callbacks, so throws are not a reliable workflow error channel.\n- Inline agents inherit your tools and skills, subject to your restrictions and `mainAgentOnly` filtering. They get no `exec`, `discover`, background code-mode tools, `subagent` or `intercom`, so delegation depth is one level.\n- Children write artifacts and evidence only. The parent owns workflow complete/fix/fail decisions and bookkeeping. `WORKFLOW_DECISION_FILE` is stripped from child environment as a guard, not a filesystem sandbox.\n- Direct `subagent` inline agents remain read-only explorers. This inherited-capability path is only `team.run`.\n\n## What an ordinary subagent can use\n\nA subagent gets your Po tools, including `discover` and `exec`, so it can drive the same namespaces you can. It does not get tools that need the person to answer (`ask_user_question`, `write_plan`, `complete_plan`), and not `subagent` or `intercom`, which are yours. It never gets a tool you are denied: in plan mode neither of you can `edit` or `write`. A namespace is shared with you, not copied, so give a subagent its own browser page rather than the current one, and keep two agents off the same task. An agent file that lists `tools:` is limited to those.\n\n## Session coordination\n\nLoad `codemode-how-to-network` to message sessions through `network.send`, `network.ask` and `network.reply`, and `codemode-how-to-session` for `sessions.list` and coordinator starts through `sessions.start`. While code mode is bound, `intercom` reaches only your team and refuses sessions. Use Team for delegation and native team coordination. `team.startSession` remains a main-agent-only compatibility forwarder; prefer `sessions.start`.\n",
145
+ "/bundle/po-team/src/prompts/codemode-how-to-team/SKILL.md": "---\nname: codemode-how-to-team\ndescription: 'Use @agimon-ai/po-team: await inline agents with team.run and inspect native team members and tracked runs before steering or stopping them.'\n---\n\n# Use Team\n\nPo Team runs subagents for this session. Use `team.run` in code mode for one awaited inline agent. Use the `subagent` tool for named-agent discovery and persistent background runs, steering and stopping. The `team` namespace also reads their state, so a script can inspect many runs at once and return only what matters.\n\n```ts\nconst runs = team.runs();\nreturn runs\n .filter((run) => run.activityState === 'needs_attention')\n .map(({ runId, agent, attentionReason }) => ({ runId, agent, attentionReason }));\n```\n\n- `team.members()` lists the native members of this session: the main agent and its subagents, each with the `task` it carries. These are not peer sessions.\n- `team.runs()` lists tracked runs with `status`, `activityState`, `currentTool`, `tokens` and `cost`. A finished run drops off 10 minutes after you acknowledge it, so read what you need from it first.\n- Both calls are synchronous and read-only. Start, steer and stop through the `subagent` tool, and hand work to a subagent through the `tasks` namespace when it belongs on the task list.\n- Check `activityState` before acting. `needs_attention` and `waiting_for_reply` mean the run is waiting on you: read its `attentionReason` and `summary`, then steer it. `working`, `tool` and `starting` are normal, so do not interrupt them.\n- Return a short summary, not the whole run list. Nothing is printed unless the script returns it.\n\n## Await inline agents\n\n```ts\nconst phases = [];\nfor (const phase of items[0].phases) {\n const result = await team.run({\n systemPrompt: phase.systemPrompt,\n task: phase.task,\n model: phase.model, // provider/model:high sets thinking effort\n timeoutMs: phase.timeoutMs,\n });\n phases.push({ name: phase.name, ...result });\n if (result.status !== 'completed') break;\n}\nreturn phases;\n```\n\n- `team.run` resolves when the child finishes and cleanup is acknowledged, not when it starts. It always returns `{runId?, status, output, error?}`. `output` is final assistant text. Check `status`: `completed`, `failed`, or `stopped`. Failures are data, not exceptions.\n- Timeout defaults to 30 minutes and accepts positive integer milliseconds up to 2 hours. Timeout, code-mode cancellation and session disposal stop owned children before returning. The awaiting script itself does not survive a restart: retry from saved artifacts.\n- When a resumed `dynamicWorkflow` step calls `team.run` again with the same system prompt, task and model as its interrupted execution did, the call continues that earlier run's conversation instead of starting over. It starts fresh when the asks differ or the host no longer keeps the earlier run (only its newest finished runs stay resumable).\n- Await phases sequentially within each asset. Use Mastra `foreach` with concurrency 3 to bound live assets. Planner start concurrency alone does not bound live children.\n- For long fan-out use `exec_background`, return the aggregate results, end your turn, and wait for its one completion message. There is no completion wake per child and no polling loop.\n- Callbacks must catch unexpected errors and return structured failures. The code-mode membrane absorbs thrown/rejected callbacks, so throws are not a reliable workflow error channel.\n- Inline agents inherit your tools and skills, subject to your restrictions and `mainAgentOnly` filtering. They get no `exec`, `discover`, background code-mode tools, `subagent` or `intercom`, so delegation depth is one level.\n- Children write artifacts and evidence only. The parent owns workflow complete/fix/fail decisions and bookkeeping. `WORKFLOW_DECISION_FILE` is stripped from child environment as a guard, not a filesystem sandbox.\n- Direct `subagent` inline agents get the same tools as a named agent without a `tools:` list. Pass `inlineAgent.tools` to limit either kind, for example `['read', 'grep', 'find', 'ls']` for a read-only explorer. Only `team.run` strips code mode and delegation.\n\n## What an ordinary subagent can use\n\nA subagent gets your Po tools, including `discover` and `exec`, so it can drive the same namespaces you can. It does not get tools that need the person to answer (`ask_user_question`, `write_plan`, `complete_plan`), and not `subagent` or `intercom`, which are yours. It never gets a tool you are denied: in plan mode neither of you can `edit` or `write`. A namespace is shared with you, not copied, so give a subagent its own browser page rather than the current one, and keep two agents off the same task. An agent file that lists `tools:` is limited to those.\n\n## Session coordination\n\nLoad `codemode-how-to-network` to message sessions through `network.send`, `network.ask` and `network.reply`, and `codemode-how-to-session` for `sessions.list` and coordinator starts through `sessions.start`. While code mode is bound, `intercom` reaches only your team and refuses sessions. Use Team for delegation and native team coordination. `team.startSession` remains a main-agent-only compatibility forwarder; prefer `sessions.start`.\n",
146
146
  "/bundle/po-team/src/prompts/help-how-to-team/SKILL.md": "---\nname: help-how-to-team\ndescription: 'Set up Team subagents in Help mode: create, edit or remove agent files, and choose models for every subagent or for one named agent, through the teamConfig namespace. Use when the person asks to add a subagent, change which model a subagent uses, or why an agent runs on a model.'\n---\n\n# Set up Team subagents\n\nHelp mode adds the `teamConfig` code-mode namespace. Call `discover({ namespace: 'teamConfig' })` for its types. It reads and writes two things: agent files, and the `subagents` block of `config.yaml`. Starting, steering and stopping runs stays with the `subagent` tool and the `team` namespace (`codemode-how-to-team`). To continue a finished or timed-out run, steer it instead of starting a new one.\n\n## Where things live\n\n| What | Where | Written by |\n| ------------------------- | ------------------------------------------------------------------------ | --------------------------------------------------- |\n| User agent | `~/.agents/<name>.md` (also read: the Pi agent folder) | `saveAgent({ scope: 'user' })` |\n| Workspace agent | `<repo>/.pi/agents/<name>.md` (the nearest agent folder inside the repo) | `saveAgent({ scope: 'workspace' })` |\n| Builtin and plugin agents | shipped with packages and domains | read-only |\n| Host settings | `~/.po/config.yaml`, `subagents:` | `setDefaults`, `setAgentModel` with `scope: 'host'` |\n| Workspace settings | `<repo>/.po/config.yaml`, `subagents:` | the same with `scope: 'workspace'` |\n| Global settings | the person's account on the sign-in server | the person; `scope: 'global'` drafts YAML for them |\n\nA workspace agent shadows a user agent of the same name, which shadows a builtin. To change a builtin, save a user or workspace file with its name, or set its model with `setAgentModel`. Workspace settings win over host, and host over Global, key by key and agent by agent. The Plugins, Team page edits the same defaults.\n\n## Which model a run gets\n\nFirst match wins:\n\n1. `model` passed to the run call (a `subagent` run request, or `team.run`).\n2. The workflow's or Plan mode's subagent model.\n3. `subagents.agents.<name>.model`: chosen for this agent in settings.\n4. `model` in the agent file.\n5. `subagents.model`, then `fallbackModels`: the defaults for every subagent.\n6. The parent's model.\n\nThinking follows the same order: `subagents.agents.<name>.thinking`, then the file's `thinking`, then `subagents.thinking`. `agents()` reports each agent's `model` and `modelFrom`, so answer \"why does it use this model\" from there. Use exact `provider/model` ids.\n\nA mismatch never fails a run. A model this host is not signed in to is skipped for the next one down the list, and a thinking level the chosen model does not offer drops to the default; the run's warning says `[fallback]` and names both. `agents()` marks such a model `available: false`. Leave it in place unless the person asks: settings travel between hosts with different providers, and another host may be signed in to it.\n\n## Work in this order\n\n1. Read: `teamConfig.agents()` and `teamConfig.settings()`. Both are read-only.\n2. Tell the person what you will change and at which scope. Ask when the scope is unclear: user and host follow them everywhere, workspace only here.\n3. Write once. Every write (`saveAgent`, `removeAgent`, `setDefaults`, `setAgentModel`) asks the person and runs only for the main agent; subagents and background scripts are refused. `scope: 'global'` writes nothing and asks nothing: it returns `{ applied: false, yaml, remove, where }`.\n4. Report the result's `path`, and `visible` for agent files.\n\n```ts\nconst [agents, settings] = await Promise.all([teamConfig.agents(), teamConfig.settings()]);\nreturn {\n agents: agents.map(({ name, source, model, modelFrom }) => ({ name, source, model, modelFrom })),\n settings,\n};\n```\n\n```ts\n// One agent's model, for this repository only. null clears a key.\nreturn teamConfig.setAgentModel({\n scope: 'workspace',\n agent: 'reviewer',\n model: 'anthropic/claude-opus-4-1',\n thinking: 'high',\n});\n```\n\n## Agent files\n\n`saveAgent` takes the whole markdown file. To edit, read it with `teamConfig.agent({ name })`, change `content`, and save it back so fields you did not touch survive. The name is lowercase letters, digits and dashes, and must match the frontmatter.\n\n```ts\nconst content = `---\nname: release-notes\ndescription: Drafts release notes from merged pull requests\nmodel: openai/gpt-5\nthinking: medium\ntools: read, grep, find, bash\n---\n\nYou write release notes. Read the merged changes, group them by user impact, and return markdown.\n`;\nreturn teamConfig.saveAgent({ scope: 'workspace', name: 'release-notes', content });\n```\n\n- `description` is one line; the main agent picks agents by it.\n- `tools` is a comma list. `mcp:<server>/<tool>` names a direct MCP tool. Omit `tools` to inherit the parent's tools.\n- `visible: false` after a save means another definition still wins (a workspace file over your user file). Say so instead of saving again.\n- `removeAgent` deletes only user and workspace files. `visible: true` afterwards means a builtin or plugin agent answers to the name again.\n\n## Limits\n\n- Settings apply to sessions started after the save; this session keeps the config it loaded. Agent files apply to the next run in this session too.\n- Global settings are portable across the person's hosts, and only the person's own sign-in can write them. For a Global change, call `setDefaults` or `setAgentModel` with `scope: 'global'`, show the person `yaml` (and `remove`, keys to delete), and tell them `where`. Never write host settings as a substitute unless the person asks for host.\n- Package-qualified agents (`package:` in frontmatter) are hand-authored; `saveAgent` refuses them.\n- On a cloud host the same calls work; the paths are on that host's storage.\n",
147
147
  "/bundle/po-help/src/prompts/codemode-how-to-brain/SKILL.md": "---\nname: codemode-how-to-brain\ndescription: See which services, slots and plugins this scope has and how they connect, in Help mode. Use before building a plugin (to find the service to inject or the slot to fill) and when a plugin does not mount or wire up.\n---\n\n# Brain in code mode\n\nUse `discover({ namespace: 'brain' })` for types, then call it through exec. Every method is read-only, takes no session argument and needs Help mode. Never inspect another session through a borrowed binding.\n\n## Orient with the graph first\n\n`brain.graph({ kind })` returns the same essential map the Brain page draws, so answers match what the person sees:\n\n- `backend`: plugins and the services they consume. Only public services and services a code-mode contributor can call are kept. Fibers are folded into their owning plugin, and scope plumbing (`po/server-scope`, `po/server-host`, `po/headless-host`, `po/host-services`) is hidden.\n- `web` and `native`: plugins and the slots they fill or declare, from each host's own build metadata.\n\n`brain.node({ id })` returns one node and its direct links in every graph that has it. Ids look like `plugin:@agimon-ai/po-git`, `service:po/fs`, `slot:page`. Use it for \"what does this plugin use and where does it render\" or \"who provides and uses this service\". Answer from these results instead of dumping a whole graph to the person.\n\n## Before you build a plugin\n\n1. Find a plugin that already does something similar with `brain.node({ id: 'plugin:...' })` and copy its shape, not its code.\n2. Pick services from `graph({ kind: 'backend' })`. Inject only public services with a description. A code-mode service that is private is reachable by its owner's namespace, not a contract for you.\n3. Pick a slot from `graph({ kind: 'web' })` or `graph({ kind: 'native' })` whose description fits and whose host matches. A slot missing from native has no native fill yet; it is not proof the native app lacks the surface.\n4. Then follow the build guide: `help-how-to-codemode-plugin` for a code-mode namespace, `help-how-to-dashboard-extension` for web UI, `help-how-to-native-extension` for the native app. Build, then reload with `selfImprove` (`codemode-how-to-self-improve`) and check the plugin appears in `brain.node`.\n\n## Debug with the raw snapshots\n\nWhen a plugin does not mount or wire up, drop to the raw data, which keeps what the graph hides:\n\n- `brain.services()`: ownership, public flags, every declared injection with `resolved` or `waiting` status, fibers, and diagnostics. A `waiting` injection names a contract nothing in this scope provides. A declared injection is evidence; absence is not proof that code never reads a service. Public means the core snapshot recognizes a contract, not permission to bypass authorization. A missing description is a documentation gap, not a contract to invent.\n- `brain.slots()`: web slot declarations, explicit parent links and verified fill placements. Do not infer hierarchy from dots or claim a fill is currently rendered. Null metadata means unavailable, not an empty inventory. Older hosts fall back to matching server installations and report the browser-inventory coverage gap.\n- `selfImprove.plugins()` lists packages that failed to install, with reasons. Read it alongside diagnostics.\n\nUnknown origins stay unknown, never classify them as Po or personal. Scope ids are opaque and describe the current session and its ancestry, never siblings or descendants. Do not supply session ids, execute browser plugins, read configuration or scan files to manufacture missing inventory. Diagnose first and ask before proposing repairs.\n",
148
148
  "/bundle/po-help/src/prompts/codemode-how-to-self-improve/SKILL.md": "---\nname: codemode-how-to-self-improve\ndescription: \"Reload Po's own packages, or refresh this session's mode, domain and profile config, after you edit them, without restarting Po or reopening the session. Use in Help mode after changing a plugin, adding or removing a package, or editing presets.yaml, a domain or a profile.\"\n---\n\n# Reload Po packages with `selfImprove`\n\n`selfImprove` exists only in Help mode, only for the main agent, and only on hosts that can reload (not the edge). Run `discover({ namespace: 'selfImprove' })` for signatures.\n\n## Where to work\n\n- Develop and test plugins in **workspace** scope. A workspace reload touches only this workspace's sessions.\n- Leave host plugin files alone unless the person asked. Po already picks up saved changes to them, so an edit there reaches every session at once.\n- A reload loads what is on disk. Build the package first; `selfImprove` never runs `npm install` or a build.\n- A reload after a web plugin changed starts a background sync that rebuilds the web app. Server code is live when the operation applies; open clients swap to the new UI when that sync finishes, usually within a minute, with no page reload.\n- In a `--test` instance (Po running from its own checkout) nothing picks up package edits on its own, host ones included. Build, then reload the scope that selects the package, usually `host` there.\n\n## Reloading\n\n1. `selfImprove.reload({ scope })` returns `{ operationId, state: 'queued' }` at once. A session reload applies after the current tool round ends, so do not wait for it in the same `exec`. End the round; do not tell the person it is merely queued.\n2. When it finishes, Po sends you a follow-up message with the outcome. Pass it on to the person without being asked. `selfImprove.operation(operationId)` returns the same outcome in a later `exec`:\n - `applied`: every package installed. Installed packages no longer declared were removed (`result.removed`).\n - `partial`: some packages failed (`result.failed`) and keep their previous build when they had one.\n - `failed`: nothing changed; `error` says why.\n3. The model sees new tools on its next request. Old tool handles from before the reload are refused.\n\n`scope: 'host'` changes every session. Ask the person first (for example with `ask_user_question`), and pass `confirm: true` only after they agree. Without it the call is refused and nothing is queued.\n\n## Refreshing config\n\nAfter editing `presets.yaml`, a domain, or a profile's env or binding, call `selfImprove.refresh({ axes })` with any of `'preset'`, `'domains'`, `'profile'` (default: all three). It re-applies the session's current names from disk, so no rename or reopen is needed. It is queued like a reload, applies after the current tool round, and reports its outcome the same way. A `profile` refresh reconnects its secret provider.\n\nDomain code-mode scripts load once when the session opens; a new or changed domain script needs the session reopened.\n\n## Checking health\n\n`selfImprove.plugins()` lists packages whose current build failed to load or install, by scope, with the reason and whether the previous build still runs. Read it before and after a reload instead of guessing from missing tools.\n\n## Mistakes to avoid\n\n- Calling it from a subagent: refused. Do the reload in the main agent.\n- Retrying in a loop: one failure means fix the code or build, then reload once.\n- Presenting a restart as a reload: if a change needs a restart (provider overrides, MCP plugins), tell the person and let them reopen the session.\n",
@@ -1,7 +1,7 @@
1
1
  import { $t as Boolean, Dt as defineServerMethod, Et as composeServerProviderOverrides, Gt as Record, It as readPoFs, Jt as String$1, V as Check, Zt as Literal, _t as BACKGROUND_CONTEXT, an as _Array_, cn as readPoServerScope, in as Optional, ln as requirePoServerScope, nn as Unknown, on as PO_SERVER_SCOPE_SERVICE, qt as Union, rn as _Object_, sn as defineServiceContract, t as defineServerPlugin, tt as PO_HEADLESS_HOST_SERVICE } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { A as isSecretValue, B as mcpToolApproval, C as PO_MCP_REMOTE_SERVERS_CONTRACT, D as connectRemoteMcpServers, E as REMOTE_MCP_TIMEOUT_MS, F as isAppVisibleMcpTool, H as StreamableHTTPClientTransport, I as isModelVisibleMcpTool, L as normalizeMcpAppMetadata, M as writeSecrets, N as USER_MCP_SCOPE, O as isUnauthorized, P as modelInputSchema, R as createMcpApprovalState, S as createMcpHostSettings, T as REMOTE_MCP_MAX_BYTES, V as Client, _ as MCP_FLOW_ID_PARAM, a as parseMcpServerAddition, b as SERVER_COMMAND_DESCRIPTION, c as handleSettings, d as json, f as mcpScopeFromWire, g as routes, gi as outboundHostRefusal, hi as guardedFetch, i as mutateMcpServer, j as prepareSecretAddition, k as readPoMcpRemoteServers, l as isRecord, m as userConfigPath, mi as OutboundRefusedError, n as listManagedMcpServers, p as serverNameOf, s as bodyOf, t as addMcpServer, u as isVaultUnavailable, v as mcpScopeToWire, w as PO_MCP_REMOTE_SERVERS_SERVICE, x as VAULT_UNAVAILABLE$1, y as MCP_APP_CLIENT_CAPABILITIES, z as isDestructiveMcpTool } from "./exports-D0Xg95HI.js";
3
3
  import { f as readTextIfExists, h as writeFileAtomic } from "./platform-DT9TD5cP.js";
4
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
5
5
  import { i as definePoPluginMethod } from "./pluginProtocol-CbYOlREP.js";
6
6
  import { c as defineRoot, d as defineServerCommand, f as defineServerTool, l as defineRoute, n as composeRootInjects, s as defineResource, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
7
7
  import "./pluginProtocol-CXXA_dkC.js";
@@ -2,7 +2,7 @@ import { Dt as defineServerMethod, Et as composeServerProviderOverrides, Jt as S
2
2
  import { u as poApiCallerFrom } from "./packageApi-DnJ9-z9S.js";
3
3
  import { $ as provideBackgroundWorkService, A as createSealedPeerChannels, B as createInboxDigest, C as parseRemoteSessionReference, D as readSessionPeerConfigAsync, E as peerSessionReference, F as readPoSessionDelivery, G as parseLogbookQuery, H as createStopReport, I as INBOX_DIGEST_DELAY_MS, J as detach, K as parseMarkReadInput, L as LOGBOOK_WAKE_DELAY_MS, M as sessionPeerConfigPath, N as PO_SESSION_DELIVERY_SERVICE, O as verifyPeerRequest, P as SESSION_DIGEST_KIND, R as STOP_LEVEL, S as ensurePrivateDirectory, T as peerRequestHeaders, U as lastAssistantText, V as createLogbookWake, W as parseLogInput, X as START_SESSION_TOOL_NAME, Y as fields, Z as createStartSessionTool, _ as createSessionGroupBridge, a as createSessionPeers, b as createPeerCommunication, c as INTERCOM_MESSAGE_TYPE, d as intercomDetails, f as rearmAskReminders, g as PO_SESSION_GROUP_BRIDGE_SERVICE, h as PO_SESSION_GROUP_BRIDGE_CONTRACT, i as PO_SESSION_PEERS_SERVICE, j as PEER_REPLAY_DATABASE_FILE, k as authenticatedPeerPost, m as undeliveredNotice, n as createPeerLink, o as requireSessionPeers, q as createSessionsNamespace, r as PO_SESSION_PEERS_CONTRACT, s as createSessionDirectory, t as PO_ROSTER_PEER_SERVICE, u as createNodeSessionOperations, v as namedSessionGroupId, w as parseSessionPeerEnvelope, x as createPeerReplayGuardAsync, y as readSessionGroupBridge, z as STOP_REPORT_DELAY_MS } from "./type-BZZxYIFO.js";
4
4
  import "./platform-DT9TD5cP.js";
5
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
5
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
6
6
  import "./piSettings-CYaEcONR.js";
7
7
  import { i as definePoPluginMethod } from "./pluginProtocol-CbYOlREP.js";
8
8
  import { c as defineRoot, l as defineRoute, n as composeRootInjects, s as defineResource, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
@@ -1,6 +1,6 @@
1
1
  import { Et as composeServerProviderOverrides, It as readPoFs, Jt as String$1, _t as BACKGROUND_CONTEXT, an as _Array_, c as poHomeDirectory, d as nodeHost, h as getOrThrow, rn as _Object_, t as defineServerPlugin, yt as withAbortSignal, zt as requirePoFs } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { h as writeFileAtomic, m as removePath } from "./platform-DT9TD5cP.js";
3
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
4
4
  import "./piSettings-CYaEcONR.js";
5
5
  import { c as defineRoot, l as defineRoute, n as composeRootInjects, s as defineResource, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
6
6
  import { c as isSeq, i as Document, n as parseDocument, o as isMap, s as isScalar } from "./browser-DwY5dXHX.js";
@@ -1,6 +1,6 @@
1
1
  import { Et as composeServerProviderOverrides, Gt as Record, Jt as String$1, Qt as Integer, V as Check, Yt as Number$1, Zt as Literal, an as _Array_, cn as readPoServerScope, in as Optional, qt as Union, rn as _Object_, t as defineServerPlugin, tn as Unsafe } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { n as defineTool } from "./pluginContributions-Be9EnCAW.js";
3
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
4
4
  import { F as string, I as union, O as number, T as literal, V as toJSONSchema, k as object, m as array, u as _enum } from "./schemas-D2dRon18.js";
5
5
  import { n as datetime } from "./iso-BGFmgtky.js";
6
6
  import { p as readPoWorkflowContextService } from "./workflow-QUJqmJYO.js";
@@ -1,5 +1,5 @@
1
1
  import { t as defineServerPlugin } from "./serverPlugin-D3FrgkrT.js";
2
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
2
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
3
3
  import { l as defineRoute, s as defineResource, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
4
4
  import { o as resolveLayers } from "./presetConfig-C9Z7F0WR.js";
5
5
  import { t as PO_HELP_WHEN } from "./help--TdYDlpL.js";
@@ -1,6 +1,6 @@
1
1
  import { Et as composeServerProviderOverrides, Ht as PO_CONFIG_SERVICE, Jt as String$1, Nt as PO_SQLITE_SERVICE, V as Check, Vt as requirePoSqlite, Xt as Null, Zt as Literal, _t as BACKGROUND_CONTEXT, an as _Array_, c as poHomeDirectory, d as nodeHost, h as getOrThrow, in as Optional, it as PoHeadlessPromptAdmissionError, jt as PO_FS_SERVICE, l as createSerialRunner, ln as requirePoServerScope, n as runCleanups, on as PO_SERVER_SCOPE_SERVICE, qt as Union, rn as _Object_, sn as defineServiceContract, st as PoSessionSetupError, t as defineServerPlugin, ut as isPoHeadlessPromptAdmissionError, zt as requirePoFs } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { h as writeFileAtomic, m as removePath, u as pathExists } from "./platform-DT9TD5cP.js";
3
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
4
4
  import "./piSettings-CYaEcONR.js";
5
5
  import { l as jsonApiResponses, u as defineApiContract } from "./apiContracts-v2ulZh0t.js";
6
6
  import { a as PO_WORKFLOW_PROFILE_ADMISSION_SERVICE, p as readPoWorkflowContextService } from "./workflow-QUJqmJYO.js";
@@ -1,7 +1,7 @@
1
1
  import { Et as composeServerProviderOverrides, Gt as Record, H as Compile, Jt as String$1, Qt as Integer, V as Check, Zt as Literal, in as Optional, ln as requirePoServerScope, mt as readPoHeadlessOwner, nn as Unknown, on as PO_SERVER_SCOPE_SERVICE, qt as Union, rn as _Object_, sn as defineServiceContract, t as defineServerPlugin } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { t as Meta } from "./meta-CVgfTHQP.js";
3
3
  import { n as defineTool } from "./pluginContributions-Be9EnCAW.js";
4
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
5
5
  import { h as readPoWorkflowLaunchService } from "./workflow-QUJqmJYO.js";
6
6
  import { E as isCalendarJson, N as MAX_CALENDAR_SUMMARY_LENGTH, T as canonicalCalendarJson, _ as CalendarListInputSchema, a as createCalendarApi, d as resolveScheduleInput, h as CalendarCancelInputSchema, i as createCalendarSessionExecutor, n as CALENDAR_CLOUD_ROOT_SERVICE, o as CalendarRequestError, p as CalendarAgentDraftSchema, r as createCalendarExecutors, t as calendarSetup } from "./calendarSetup-u-CGP-TJ.js";
7
7
  import { c as PROFILE_RESOLUTION_TIMEOUT_MS, h as PROFILE_RUNTIME_SERVICE, l as createDeadline } from "./profileSources-gxxfSlHe.js";
@@ -1,5 +1,5 @@
1
1
  import { B as Errors, Et as composeServerProviderOverrides, Jt as String$1, Qt as Integer, V as Check, Zt as Literal, an as _Array_, in as Optional, qt as Union, rn as _Object_, t as defineServerPlugin } from "./serverPlugin-D3FrgkrT.js";
2
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
2
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
3
3
  import { c as defineRoot, f as defineServerTool, n as composeRootInjects, s as defineResource, t as composeRootHooks } from "./extensionFile-Cmka2_1b.js";
4
4
  import { i as readPoCodemode, n as PO_CODEMODE_SERVICE } from "./codemode-zKjAYHzK.js";
5
5
  //#region ../../../layers/web/po-web-search/src/constants/webRun.ts
@@ -2,7 +2,7 @@ import { t as __commonJSMin } from "./rolldown-runtime-DbVrKiKs.js";
2
2
  import { $t as Boolean$1, B as Errors, Dt as defineServerMethod, Et as composeServerProviderOverrides, Ht as PO_CONFIG_SERVICE, Jt as String$1, Qt as Integer, V as Check, Zt as Literal, in as Optional, n as runCleanups, qt as Union, rn as _Object_, sn as defineServiceContract, t as defineServerPlugin } from "./serverPlugin-D3FrgkrT.js";
3
3
  import "./packageApi-DnJ9-z9S.js";
4
4
  import { C as parseRemoteSessionReference } from "./type-BZZxYIFO.js";
5
- import { n as readPackageResource } from "./index.edge-DUY_I7ge.js";
5
+ import { n as readPackageResource } from "./index.edge-DV4fYP5_.js";
6
6
  import { i as definePoPluginMethod } from "./pluginProtocol-CbYOlREP.js";
7
7
  import { a as defineHook, c as defineRoot, f as defineServerTool, l as defineRoute, n as composeRootInjects, o as defineMethod, r as defineChannel, s as defineResource, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
8
8
  import { m as resolveVoiceConfig } from "./config-BgaIjj3t.js";
@@ -1,6 +1,6 @@
1
1
  import { Et as composeServerProviderOverrides, _t as BACKGROUND_CONTEXT, t as defineServerPlugin, yt as withAbortSignal, zt as requirePoFs } from "./serverPlugin-D3FrgkrT.js";
2
2
  import "./platform-DT9TD5cP.js";
3
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
4
4
  import { c as defineRoot, n as composeRootInjects, s as defineResource, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
5
5
  import { n as providePoConfigContext, t as createNativePoConfigContext, u as createSettingsApi } from "./sessionConfig-Cccdq2Vi.js";
6
6
  import { i as readPoNotificationService } from "./notification-qvVz7SFT.js";
@@ -1,6 +1,6 @@
1
1
  import { _t as BACKGROUND_CONTEXT, d as nodeHost, h as getOrThrow, s as piAgentDirectory, t as defineServerPlugin, zt as requirePoFs } from "./serverPlugin-D3FrgkrT.js";
2
2
  import "./platform-DT9TD5cP.js";
3
- import { n as readPackageResource } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource } from "./index.edge-DV4fYP5_.js";
4
4
  import "./piSettings-CYaEcONR.js";
5
5
  import "./pluginCatalog-BAALyedS.js";
6
6
  import { d as defineServerCommand, l as defineRoute, s as defineResource } from "./extensionFile-Cmka2_1b.js";
@@ -1,7 +1,7 @@
1
1
  import { Et as composeServerProviderOverrides, Ht as PO_CONFIG_SERVICE, It as readPoFs, Jt as String$1, Lt as readPoIsolate, Mt as PO_SHELL_SERVICE, Pt as readPoBrowser, Qt as Integer, Rt as readPoNpm, U as Check$1, V as Check, W as Errors, _t as BACKGROUND_CONTEXT, h as getOrThrow, i as PO_SESSION_FILES_SERVICE, in as Optional, kt as PO_BROWSER_SERVICE, ln as requirePoServerScope, lt as invalidImageReason, on as PO_SERVER_SCOPE_SERVICE, pt as readPoHeadlessHost, rn as _Object_, sn as defineServiceContract, t as defineServerPlugin, yt as withAbortSignal } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { t as Meta } from "./meta-CVgfTHQP.js";
3
3
  import "./platform-DT9TD5cP.js";
4
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
5
5
  import { c as defineRoot, d as defineServerCommand, f as defineServerTool, n as composeRootInjects, r as defineChannel, s as defineResource, t as composeRootHooks } from "./extensionFile-Cmka2_1b.js";
6
6
  import { n as readPresetsConfig, t as readPackageConfigurations } from "./presetConfig-C9Z7F0WR.js";
7
7
  import "./exports-C50cBxSQ.js";
@@ -1,6 +1,6 @@
1
1
  import { Et as composeServerProviderOverrides, _t as BACKGROUND_CONTEXT, h as getOrThrow, jt as PO_FS_SERVICE, n as runCleanups, sn as defineServiceContract, t as defineServerPlugin, u as fileMutationRunner, zt as requirePoFs } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { d as readBoundedFile, h as writeFileAtomic, l as FileTooLargeError } from "./platform-DT9TD5cP.js";
3
- import { n as readPackageResource } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource } from "./index.edge-DV4fYP5_.js";
4
4
  import { c as defineRoot, n as composeRootInjects, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
5
5
  import { a as PO_BACKGROUND_WORK_SERVICE, i as PO_BACKGROUND_WORK_CHANGED_EVENT, l as readPoBackgroundWorkService, o as awaitsCompletion } from "./backgroundWork-D5Kb1Vlp.js";
6
6
  import { t as defineMode } from "./modeDefinition-Di95_IiU.js";
@@ -1,7 +1,7 @@
1
1
  import { Et as composeServerProviderOverrides, Tt as readPoHostServices, c as poHomeDirectory, cn as readPoServerScope, jt as PO_FS_SERVICE, sn as defineServiceContract, t as defineServerPlugin, wt as PO_HOST_SERVICES_SERVICE, zt as requirePoFs } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { d as poSessionStarterFrom, u as poApiCallerFrom } from "./packageApi-DnJ9-z9S.js";
3
3
  import "./platform-DT9TD5cP.js";
4
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
5
5
  import "./piSettings-CYaEcONR.js";
6
6
  import { S as SCAFFOLD_USER_DIRECTORY, _ as SCAFFOLD_SKILL_DESCRIPTION, a as scaffoldAddSchema, b as SCAFFOLD_SOURCE, c as scaffoldSetRefSchema, d as SCAFFOLD_REGISTRY_CONTRACT, f as SCAFFOLD_TENANCY_CONTRACT, g as SCAFFOLD_BUILTIN_SET_ID, h as SCAFFOLD_AUTHOR_SKILL_NAME, i as createScaffoldTemplates, l as scaffoldSetScopeSchema, m as SCAFFOLD_AUTHOR_SKILL_FILE, n as readPoScaffold, o as scaffoldCreateSchema, p as SCAFFOLD_AUTHOR_SKILL_DESCRIPTION, r as createScaffoldLibrary, s as scaffoldSetDraftSchema, t as createScaffoldRegistry, u as scaffoldSetToggleSchema, v as SCAFFOLD_SKILL_FILE, x as SCAFFOLD_TEMPLATE_ROOT, y as SCAFFOLD_SKILL_NAME } from "./scaffoldRegistry-Clx6x5-0.js";
7
7
  import { c as defineRoot, l as defineRoute, n as composeRootInjects, s as defineResource, t as composeRootHooks } from "./extensionFile-Cmka2_1b.js";
@@ -1,7 +1,7 @@
1
1
  import { Et as composeServerProviderOverrides, Jt as String$1, St as Service, V as Check, in as Optional, jt as PO_FS_SERVICE, rn as _Object_, t as defineServerPlugin } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { c as readPoSpace, i as PO_PERSONAL_SPACE, o as PO_SPACE_SERVICE, s as poSpaceCallerOf } from "./platform-DT9TD5cP.js";
3
3
  import { n as defineTool } from "./pluginContributions-Be9EnCAW.js";
4
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
5
5
  import { g as HOST_ARTIFACT_PREFIX, l as ArtifactAccessError, n as listArtifactSessions, p as ARTIFACTS_SERVICE, r as listArtifacts, t as ensureArtifactRoot, u as artifactRoot } from "./index.edge-CQOpfAxj.js";
6
6
  import { r as readPoFileAccess } from "./fileAccess-bFgmsyx0.js";
7
7
  import { a as defineHook, c as defineRoot, l as defineRoute, m as defineToolRestriction, n as composeRootInjects, p as defineTool$1, r as defineChannel, s as defineResource, t as composeRootHooks } from "./extensionFile-Cmka2_1b.js";
@@ -1,6 +1,6 @@
1
1
  import { $t as Boolean$1, Et as composeServerProviderOverrides, Jt as String$1, Ot as HOST_SLOT_METADATA, V as Check, Xt as Null, Zt as Literal, an as _Array_, in as Optional, ln as requirePoServerScope, on as PO_SERVER_SCOPE_SERVICE, qt as Union, rn as _Object_, sn as defineServiceContract, t as defineServerPlugin } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { n as defineTool } from "./pluginContributions-Be9EnCAW.js";
3
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
4
4
  import { l as jsonApiResponses, u as defineApiContract } from "./apiContracts-v2ulZh0t.js";
5
5
  import { c as defineRoot, l as defineRoute, n as composeRootInjects, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
6
6
  import { i as readPoCodemode, n as PO_CODEMODE_SERVICE } from "./codemode-zKjAYHzK.js";
@@ -1,6 +1,6 @@
1
1
  import { Et as composeServerProviderOverrides, Jt as String$1, _t as BACKGROUND_CONTEXT, d as nodeHost, h as getOrThrow, in as Optional, rn as _Object_, t as defineServerPlugin, yt as withAbortSignal, zt as requirePoFs } from "./serverPlugin-D3FrgkrT.js";
2
2
  import "./platform-DT9TD5cP.js";
3
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
4
4
  import { c as defineRoot, n as composeRootInjects, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
5
5
  import { a as resolveSharedSkillsAsync, i as resolvePluginEntriesAsync, n as listDomainNamesAsync, t as readHarnessState } from "./harnessState-ZX1OK-ub.js";
6
6
  import { t as PO_HELP_WHEN } from "./help--TdYDlpL.js";
@@ -1,6 +1,6 @@
1
1
  import { Et as composeServerProviderOverrides, Ht as PO_CONFIG_SERVICE, It as readPoFs, Jt as String$1, _t as BACKGROUND_CONTEXT, h as getOrThrow, in as Optional, rn as _Object_, t as defineServerPlugin, u as fileMutationRunner } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { d as readBoundedFile, h as writeFileAtomic, l as FileTooLargeError, m as removePath, u as pathExists } from "./platform-DT9TD5cP.js";
3
- import { n as readPackageResource } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource } from "./index.edge-DV4fYP5_.js";
4
4
  import { c as defineRoot, l as defineRoute, m as defineToolRestriction, n as composeRootInjects, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-Cmka2_1b.js";
5
5
  import "./sessionConfig-Cccdq2Vi.js";
6
6
  import { u as resolvePlanningPlansDirectory } from "./config-BgaIjj3t.js";
@@ -1,7 +1,7 @@
1
1
  import { $t as Boolean$1, Et as composeServerProviderOverrides, Ht as PO_CONFIG_SERVICE, Jt as String$1, Qt as Integer, V as Check, Zt as Literal, _t as BACKGROUND_CONTEXT, an as _Array_, d as nodeHost, gt as toPoHeadlessToolResult, h as getOrThrow, in as Optional, l as createSerialRunner, n as runCleanups, qt as Union, rn as _Object_, s as piAgentDirectory, t as defineServerPlugin, zt as requirePoFs } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { $ as provideBackgroundWorkService, F as readPoSessionDelivery, Q as startCoordinatedSession, g as PO_SESSION_GROUP_BRIDGE_SERVICE, p as sendSessionMessage, y as readSessionGroupBridge } from "./type-BZZxYIFO.js";
3
3
  import { f as readTextIfExists, h as writeFileAtomic, m as removePath } from "./platform-DT9TD5cP.js";
4
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
5
5
  import "./piSettings-CYaEcONR.js";
6
6
  import { a as defineHook, c as defineRoot, f as defineServerTool, l as defineRoute, n as composeRootInjects, r as defineChannel, s as defineResource, t as composeRootHooks } from "./extensionFile-Cmka2_1b.js";
7
7
  import { r as stringify } from "./browser-DwY5dXHX.js";
@@ -20,7 +20,7 @@ import { t as PO_HELP_WHEN } from "./help--TdYDlpL.js";
20
20
  import "./exports-1YDi3HnK.js";
21
21
  import "./worker.js";
22
22
  import { i as resolveRootSessionId } from "./childProcess-CrMJDjMx.js";
23
- import { a as PO_DELEGATION_CANCELLED_EVENT, c as PO_DELEGATION_SERVICE, d as PO_TEAM_INLINE_RESUME_EVENT, f as PO_TEAM_INLINE_RUN_EVENT, i as PO_DELEGATION_ACCEPTED_EVENT, l as PO_DELEGATION_STARTED_EVENT, n as DelegationRequestSchema, o as PO_DELEGATION_FINISHED_EVENT, r as InlineAgentSchema, s as PO_DELEGATION_REQUESTED_EVENT, t as DelegationCancelSchema, u as PO_DELEGATION_UPDATED_EVENT } from "./delegation-D_jWNaxQ.js";
23
+ import { a as PO_DELEGATION_CANCELLED_EVENT, c as PO_DELEGATION_SERVICE, d as PO_TEAM_INLINE_RESUME_EVENT, f as PO_TEAM_INLINE_RUN_EVENT, i as PO_DELEGATION_ACCEPTED_EVENT, l as PO_DELEGATION_STARTED_EVENT, n as DelegationRequestSchema, o as PO_DELEGATION_FINISHED_EVENT, r as InlineAgentSchema, s as PO_DELEGATION_REQUESTED_EVENT, t as DelegationCancelSchema, u as PO_DELEGATION_UPDATED_EVENT } from "./delegation-DiLrRjhN.js";
24
24
  import { t as createPoTelemetry } from "./index.edge-D2RirEwK.js";
25
25
  import { createHash, randomBytes, randomUUID } from "node:crypto";
26
26
  import * as path$1 from "node:path";
@@ -3030,12 +3030,6 @@ const DEFAULT_PARALLEL_MAX_TASKS = 30;
3030
3030
  * cores or memory: a number measured on one machine is not a default.
3031
3031
  */
3032
3032
  const DEFAULT_MAX_LIVE_RUNS = DEFAULT_PARALLEL_MAX_TASKS;
3033
- const INLINE_AGENT_TOOLS = [
3034
- "read",
3035
- "grep",
3036
- "find",
3037
- "ls"
3038
- ];
3039
3033
  function appendPromptSection(prompt, section) {
3040
3034
  if (!section) return prompt;
3041
3035
  return prompt ? `${prompt}\n\n${section}` : section;
@@ -3189,7 +3183,7 @@ var SpawnPlanner = class {
3189
3183
  inheritProjectContext: true,
3190
3184
  inheritSkills: inheritParent,
3191
3185
  systemPrompt: taskInput.inlineAgent.systemPrompt.trim(),
3192
- ...inheritParent ? {} : { tools: [...INLINE_AGENT_TOOLS] },
3186
+ ...taskInput.inlineAgent.tools ? { tools: [...taskInput.inlineAgent.tools] } : {},
3193
3187
  defaultContext: CONTEXT_FRESH,
3194
3188
  runtime: "pi"
3195
3189
  };
@@ -3442,7 +3436,7 @@ var SpawnPlanner = class {
3442
3436
  if (tasks.length > maxTasks) throw new PoTeamExpectedError(ERROR_CODE_INVALID_REQUEST, `Run requested ${tasks.length} tasks, but at most ${maxTasks} may be declared in one call. Concurrency throttles how fast they start, not how many run.`, false, "Send at most that many requests in this call and wait for them, or raise parallel.maxTasks in the subagent config. Splitting the same width across extra calls does not raise the live-child ceiling.");
3443
3437
  for (const taskInput of tasks) {
3444
3438
  if (!taskInput.task?.trim()) throw new PoTeamExpectedError(ERROR_CODE_INVALID_REQUEST, `Run request for '${taskInput.agent}' requires a nonblank task.`, false, "Provide a self-contained nonblank task.");
3445
- if (taskInput.inlineAgent && !taskInput.inlineAgent.systemPrompt.trim()) throw new PoTeamExpectedError(ERROR_CODE_INVALID_REQUEST, `Inline agent '${taskInput.agent}' requires a nonblank system prompt.`, false, "Provide a focused read-only exploration role.");
3439
+ if (taskInput.inlineAgent && !taskInput.inlineAgent.systemPrompt.trim()) throw new PoTeamExpectedError(ERROR_CODE_INVALID_REQUEST, `Inline agent '${taskInput.agent}' requires a nonblank system prompt.`, false, "Provide a focused role for the inline agent.");
3446
3440
  }
3447
3441
  const resolvedAgentCache = /* @__PURE__ */ new Map();
3448
3442
  const resolvedAgents = [];
@@ -1,6 +1,6 @@
1
1
  import { $t as Boolean$1, Et as composeServerProviderOverrides, It as readPoFs, Jt as String$1, Mt as PO_SHELL_SERVICE, Yt as Number$1, _t as BACKGROUND_CONTEXT, an as _Array_, in as Optional, rn as _Object_, s as piAgentDirectory, t as defineServerPlugin, yt as withAbortSignal } from "./serverPlugin-D3FrgkrT.js";
2
2
  import "./platform-DT9TD5cP.js";
3
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
3
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
4
4
  import "./piSettings-CYaEcONR.js";
5
5
  import { a as defineHook, c as defineRoot, d as defineServerCommand, f as defineServerTool, l as defineRoute, n as composeRootInjects, r as defineChannel, s as defineResource, t as composeRootHooks } from "./extensionFile-Cmka2_1b.js";
6
6
  import { t as PO_HELP_WHEN } from "./help--TdYDlpL.js";
@@ -1,7 +1,7 @@
1
1
  import { Dt as defineServerMethod, Et as composeServerProviderOverrides, Gt as Record, It as readPoFs, Jt as String$1, Yt as Number$1, Zt as Literal, _t as BACKGROUND_CONTEXT, an as _Array_, h as getOrThrow, in as Optional, ln as requirePoServerScope, nn as Unknown, on as PO_SERVER_SCOPE_SERVICE, qt as Union, rn as _Object_, sn as defineServiceContract, t as defineServerPlugin } from "./serverPlugin-D3FrgkrT.js";
2
2
  import { d as readBoundedFile, l as FileTooLargeError, n as RootBoundReplaceError, r as replaceRootBoundFile } from "./platform-DT9TD5cP.js";
3
3
  import { n as defineTool, t as defineCommand } from "./pluginContributions-Be9EnCAW.js";
4
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DUY_I7ge.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DV4fYP5_.js";
5
5
  import { f as validateArtifactRead, l as ArtifactAccessError, u as artifactRoot } from "./index.edge-CQOpfAxj.js";
6
6
  import "./artifactFiles-B3yVnmyw.js";
7
7
  import { i as definePoPluginMethod } from "./pluginProtocol-CbYOlREP.js";