pi-team-mode 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,12 +28,20 @@ On the stock route (`@tintinweb/pi-subagents` 0.26.3 tested), Team creates real
28
28
 
29
29
  **Extension-registered models:** Stock 0.26.3 inherits the foreground Pi model runtime. Except for Cursor (below), SDK workers replay only the selected provider's Pi registration (including its stream/auth callbacks) in their own runtime; they use Pi's normal auth configuration and do not reload extensions or copy session-only credentials. This supports providers whose registrations work without child extension lifecycle hooks. Team reports an unregistered provider, an unlisted model, or an unavailable model without choosing a substitute.
30
30
 
31
- Explicit tool allowlists, SDK continuations, and unavailable native definitions use Pi SDK child sessions without a stock Agents row. Except for Cursor, model and thinking settings do not by themselves change routes on a compatible build. SDK workers use core Pi tools, not foreground extensions. The adapter uses a compact handoff when upstream cannot resume a finished job; SDK sessions can continue a handful of recent tasks. `/team doctor` reports the preference and compatible RPC readiness, not exact definition resolution. Fallback to SDK happens only before an RPC spawn attempt; a rejection, timeout or mismatched type is not retried on SDK. Stock RPC cannot verify definition ownership or disable fallback per call. Team checks for existing claims before dispatch and reports a mismatched run type, but stock cannot guarantee safety against a concurrent file change.
31
+ Explicit tool allowlists, SDK continuations, and unavailable native definitions use Pi SDK child sessions without a stock Agents row. Except for Cursor, model and thinking settings do not by themselves change routes on a compatible build. SDK workers use core Pi tools, not foreground extensions. `/team doctor` reports the preference and compatible RPC readiness, not exact definition resolution. Fallback to SDK happens only before an RPC spawn attempt; a rejection, timeout or mismatched type is not retried on SDK. Stock RPC cannot verify definition ownership or disable fallback per call. Team checks for existing claims before dispatch and reports a mismatched run type, but stock cannot guarantee safety against a concurrent file change.
32
32
 
33
33
  The separate **● Team Agents** tree above the editor shows only jobs routed to the SDK. A magenta heading tops aligned rows with a status indicator, a bold padded role badge, the exact confirmed model (`pending` during startup, `not started` if it settles before start), and a task preview. The status column is one cell wide: a spinner for running jobs, a green `✓` for successful jobs, and a distinct glyph for other states. Labels such as `failed`, `cancelled`, and `queued` follow the task preview when there’s room. Tasks still waiting for a backend are shown only in **Status**.
34
34
 
35
35
  The Braille spinner indicates an in-progress job, not model thinking. When there’s room, a child line shows `thinking…` only during an observed thinking stream, `responding…` during a text stream, or a tool action such as `running command…` during execution. It shows `working…` when Pi reports no specific activity. The line never displays streamed content, tool arguments, or tool results. It clears when the job settles or is cancelled; a cancelled job keeps its slot and says `stopping` until it unwinds. One visual-only timer redraws while SDK jobs are running; it does not poll workers or run inference. The tree keeps up to five recent outcomes, fits a bounded viewport, and clears on reset, profile change, config reload, disable, or runtime replacement. **Status** remains the combined view.
36
36
 
37
+ ### Worker follow-ups
38
+
39
+ Lead dispatches fresh by default. If the follow-up needs context a short brief can’t carry, Lead sets `resume` to the completed same-role task ID. For example, to have Coder use the investigation from `trace-startup` to diagnose a retry failure, Lead dispatches a new `check-retry` Coder task with `resume: "trace-startup"`. Lead decides when to request it; Team Mode checks compatibility, routes the job, and handles fallback.
40
+
41
+ A retained SDK session can be reused in **Auto** or **SDK** with the same role, exact model, and tool list. The SDK keeps up to six sessions in memory and evicts the earliest-retained one on overflow, regardless of dispatch order. Reuse consumes the old resume reference. If `check-retry` completes and retains the session, use `check-retry`, not `trace-startup`, for the next continuation. Tasks and retained sessions do not survive `/reload` or reopening Pi.
42
+
43
+ If the prior task is still known but its SDK session is evicted, otherwise unavailable, or incompatible, or the prior task ran on stock RPC, the follow-up starts fresh with a compact `Earlier result` summary instead of transcript history. Status and `team_results` do not label the continuation outcome. Keeping history for a follow-up does not guarantee token savings.
44
+
37
45
  ### Cursor workers
38
46
 
39
47
  To use a Cursor model for an unrestricted role, select its exact `cursor/<model-id>` in `/team model` or in that role’s model pool. Team requires `npm:pi-cursor-sdk` to be enabled, installed, and configured in Pi’s user settings or in a project Pi has trusted. Team does not install it, accept a task-supplied extension path, or reload unrelated extensions. The selected model must be in the worker’s own Cursor catalog and usable with Pi’s configured Cursor authentication. Team does not fall back to another model.
@@ -56,7 +64,7 @@ The last explicitly selected profile is remembered in the current Pi session and
56
64
 
57
65
  The footer shows the active profile and live counts: queued, starting, confirmed running, stopping, and outcomes. Outcome counts stay until you reset, change profiles, reload, or turn Team Mode off. Only SDK-reported Pi tools contribute to the optional `using tools` count. Stock RPC reports its lifecycle without guessing at tool use or thinking; neither backend infers thinking from model settings.
58
66
 
59
- Team Mode ships a read-only catalog: `engineer_template`, `research_template`, `audit_template`. These IDs are for copying, not switching. On interactive activation (including `/reload`), Team saves only missing personal `engineer`, `research`, and `audit` profiles as JSON in `<Pi agent directory>/team-mode-profiles/`. Saved profiles are full copies; inline personal entries (including sparse ones) count as existing profiles and are never rewritten by seeding. The effective order is built-in fallback → full personal files by ID → inline `team-mode.json` → trusted `.pi/team-mode.json`. Personal files do not inherit later template changes. If a starter file is removed and no inline entry exists, the next interactive activation backfills it again.
67
+ Team Mode ships a read-only catalog: `engineer_template`, `research_template`, `audit_template`. These IDs are for copying, not switching. On interactive activation (including `/reload`), Team saves only missing personal `engineer`, `research`, and `audit` profiles as JSON in `<Pi agent directory>/team-mode-profiles/`. Saved profiles are full copies; inline personal entries (including sparse ones) count as existing profiles and are never rewritten by seeding. The effective order is built-in fallback → full personal files by ID → inline `team-mode.json` → trusted `.pi/team-mode.json`. Personal files do not inherit later template changes. If a starter file is removed and no inline entry exists, the next interactive activation backfills it again. Built-in defaults and new copies ask Lead to own recovery and replanning, without changing existing saved scopes or explicit overrides.
60
68
 
61
69
  Seed and create require valid personal settings on their own and as merged in the current workspace. Create refuses existing runnable IDs, including trusted project IDs, and never copies merged project settings. IDs for new files are 1–64 lowercase letters, digits, underscores or hyphens, starting with a letter or digit. Writes use a complete temporary file and atomic no-replace publication; if the filesystem cannot publish it, Team reports the problem and does not replace existing files. Read-only loading and validation do not seed. To customize a saved profile, edit its full `<id>.json` or overlay its fields inline, then use `/team config validate` and `/team config reload`.
62
70
 
package/dist/extension.js CHANGED
@@ -79,6 +79,7 @@ export function leadPrompt(profile) {
79
79
  .map(([id, role]) => `${id}: ${role.workScope}`).join('\n');
80
80
  return `You are ${lead.name} in the ${profile.name} team (${lead.personality}). ${lead.workScope}\n` +
81
81
  'Only coordinate and summarize; do not do worker tasks. Answer greetings directly. For real work dispatch a compact brief and return progress if work is pending; you will receive results. ' +
82
+ 'Dispatch fresh unless a specific follow-up needs context a short brief cannot carry; then pass the completed same-role task ID in resume. ' +
82
83
  'Use dependencies for preplanned work; mark all editing jobs writes=true. Do not redispatch merely to check progress. ' +
83
84
  'Ask the user only for a material blocker or external action. Do not direct workers to bypass remote-write checkpoints. Report checks and caveats.\n' + workers;
84
85
  }
@@ -1,7 +1,7 @@
1
1
  // Not a source of runnable IDs. Only detached copies leave this module.
2
2
  const worker = (name, workScope, personality) => ({ name, workScope, personality, peers: ['lead'], enable: true, access: null, modelPool: [] });
3
3
  const profile = (name, leadScope, roles) => ({
4
- name, roles: { lead: { ...worker('Team Lead', leadScope, 'decisive'), peers: Object.keys(roles) }, ...roles },
4
+ name, roles: { lead: { ...worker('Team Lead', `${leadScope} Own the outcome: recover and replan on failures or conflicts; involve the user only at critical checkpoints or blockers you can’t resolve.`, 'decisive'), peers: Object.keys(roles) }, ...roles },
5
5
  });
6
6
  function catalog() {
7
7
  const engineer = profile('Engineer', 'Coordinate workers individually. Receive their results and handle follow-ups yourself, without convening meetings. Prefer one worker for a bounded fix; add specialists only when useful.', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-team-mode",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Efficiency-first teams for Pi with background workers and a foreground Team Lead",
5
5
  "license": "MIT",
6
6
  "repository": {