@evandu/super-pi 0.1.170 → 0.1.171

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.
@@ -1138,7 +1138,7 @@ export async function executeScheduledTask(
1138
1138
  export const PROJECT_TOOL_NAME = "project";
1139
1139
  export const PROJECT_ENDPOINT_ENV = "SUPER_PI_PROJECT_ENDPOINT";
1140
1140
 
1141
- export const PROJECT_DESCRIPTION = `Manage a user-triggered project through accountable delegation, evidence and independent review. When the user describes a project in natural language, decompose it yourself into title, objective, deliverables, acceptanceCriteria and budget, then call create with those fields and the top-level tasks you derived. Create also accepts optional constraints, risk, budget with maxTokens/maxConcurrent, and default profiles defaultLeaderProfile/defaultExecutorProfile/defaultReviewerProfile. Create also accepts an optional mode: standard (the default) or lightweight. For a small self-contained project, create it with mode="lightweight": the project leader session does the work itself, the project has no separate worker or reviewer sessions, and a task is accepted on the worker's own evidence. Use the standard mode when the work needs an independent review. In a lightweight project the leader registers only executor tasks, never splits into child tasks and never asks for a review - a submitted task is a completed task. The conversation that created a project may cancel it with action="cancel" and a reason: the project is marked cancelled, its running sessions are stopped, and its record, tasks, events and evidence are kept. Only that initiating conversation may cancel it - a worker or reviewer cannot cancel the project it belongs to. The tasks array carries that decomposition: each entry needs a title and an objective, and its dependencies name the titles of sibling tasks in the same array. The project starts on action="start" - call it only after you have registered the top-level tasks, because the leader session begins decomposing the work the moment it starts. You are the initiator: you may create the project, register top-level tasks and start it; you may not register child tasks, change the budget or cancel the scope. Only a root conversation may create a project. Top-level tasks can also be registered later with add_task. When the user asks "我的项目现在怎么样", "我还有哪些项目在跑", "列出所有项目", or wants an overview of running projects, call action="list" first to retrieve up to 20 most recently updated projects with lightweight summaries (headline, task counts, active workers, tokens) without needing a projectId; the response returns projects, total, and returned counts, where total > returned indicates more historical projects exist in the workspace. Never guess a projectId to call get blindly; only call get when the user targets a specific project and you need deep task or event details. Read the latest state with get. The project leader uses add_task (title, objective, deliverables, acceptanceCriteria, dependencies, role=leader/executor, optional executorProfile/reviewerProfile with agentId, cwd, model, thinkingLevel, watchdogTimeoutSeconds), dispatch and request_review. A branch leader creates children with parentTaskId set to its own task ID and manages only its direct tasks. Dependencies must be siblings. Leader aggregate submission requires independently accepted children. Keep at most 3 leader levels and 8 branch leaders; small projects need only one executor. Workers submit output plus evidenceRefs. Only the assigned independent reviewer can review with verdict accepted or changes_requested, summary and evidenceRefs. update_task marks blocked/failed with blockedReason, updates executorProfile/reviewerProfile before child sessions spawn, or the leader resets ready for retry. report records kind=progress/blocked, progress, summary, variance, nextStep, risks, decisionNeeded and evidenceRefs; blocked reports notify your direct supervisor rather than directly alerting Boss. escalate records an optional title, a reason and severity=low/medium/high. The title is ONE SENTENCE naming what the reader has to decide - the question - and the reason is the case for it: why it matters, what the evidence shows, what happens if nobody decides. Give a title whenever the question can be said in one line, because the reader decides on the title and reads the reason only when the question is not obvious; without a title the escalation falls back to its reason. member escalations route to your direct supervisor, and only project leader escalations reach Boss. resolve_escalation closes an escalation that was addressed to you: pass escalationId, decision and status (resolved, dismissed or returned, default resolved). status="returned" means the material was not enough to decide on: the case goes back to whoever raised it, and that person is woken up to supply what is missing instead of the case hanging unanswered. It only accepts a supervisor escalation whose target session is your own; an escalation addressed to Boss is the Boss's to decide and is refused for you. Resolving it cascades: the member who raised the escalation is woken up with your decision. complete requires all tasks accepted - independently reviewed in the standard mode, self-accepted in the lightweight mode - and a final summary with evidenceRefs. action="export" returns the project as a Markdown report: the objective, every task with its delivery, evidence and review, the exceptions and how they were decided, and the full timeline. Use it when the user asks for a summary, a handover, or a status write-up of the project. Project and task IDs come from create/get/add_task. Reads never invoke models. Dispatch is asynchronous and consumes budget; stop polling when capacity is full and wait for child completion reports. Do not use session_spawn, session_dispatch, task or workflow to bypass the project dispatch guard. Never claim success on an error.`;
1141
+ export const PROJECT_DESCRIPTION = `Manage a user-triggered project through accountable delegation, evidence and independent review. When the user describes a project in natural language, decompose it yourself into title, objective, deliverables, acceptanceCriteria and budget, then call create with those fields and the top-level tasks you derived. Create also accepts optional constraints, risk, budget with maxTokens/maxConcurrent, and default profiles defaultLeaderProfile/defaultExecutorProfile/defaultReviewerProfile. Create also accepts an optional mode: standard (the default) or lightweight. For a small self-contained project, create it with mode="lightweight": the project leader session does the work itself, the project has no separate worker or reviewer sessions, and a task is accepted on the worker's own evidence. Use the standard mode when the work needs an independent review. In a lightweight project the leader registers only executor tasks, never splits into child tasks and never asks for a review - a submitted task is a completed task. The conversation that created a project may cancel it with action="cancel" and a reason: the project is marked cancelled, its running sessions are stopped, and its record, tasks, events and evidence are kept. Only that initiating conversation may cancel it - a worker or reviewer cannot cancel the project it belongs to. The tasks array carries that decomposition: each entry needs a title and an objective, and its dependencies name the titles of sibling tasks in the same array. The project starts on action="start" - call it only after you have registered the top-level tasks, because the leader session begins decomposing the work the moment it starts. You are the initiator: you may create the project, register top-level tasks and start it; you may not register child tasks, change the budget or cancel the scope. Only a root conversation may create a project. Top-level tasks can also be registered later with add_task. When the user asks "我的项目现在怎么样", "我还有哪些项目在跑", "列出所有项目", or wants an overview of running projects, call action="list" first to retrieve up to 20 most recently updated projects with lightweight summaries (headline, task counts, active workers, tokens) without needing a projectId; the response returns projects, total, and returned counts, where total > returned indicates more historical projects exist in the workspace. Never guess a projectId to call get blindly; only call get when the user targets a specific project and you need deep task or event details. Read the latest state with get. The project leader uses add_task (title, objective, deliverables, acceptanceCriteria, dependencies, role=leader/executor, optional executorProfile/reviewerProfile with agentId, cwd, model, thinkingLevel, watchdogTimeoutSeconds), dispatch and request_review. A branch leader creates children with parentTaskId set to its own task ID and manages only its direct tasks. Dependencies must be siblings. Leader aggregate submission requires independently accepted children. Keep at most 3 leader levels and 8 branch leaders; small projects need only one executor. Workers submit output plus evidenceRefs. Only the assigned independent reviewer can review with verdict accepted or changes_requested, summary and evidenceRefs. update_task marks blocked/failed with blockedReason, updates executorProfile/reviewerProfile before child sessions spawn, or the leader resets ready for retry. report records kind=progress/blocked, progress, summary, variance, nextStep, risks, decisionNeeded and evidenceRefs; blocked reports notify your direct supervisor rather than directly alerting Boss. escalate records an optional title, a reason and severity=low/medium/high. The title is ONE SENTENCE naming what the reader has to decide - the question - and the reason is the case for it: why it matters, what the evidence shows, what happens if nobody decides. Give a title whenever the question can be said in one line, because the reader decides on the title and reads the reason only when the question is not obvious; without a title the escalation falls back to its reason. member escalations route to your direct supervisor, and only project leader escalations reach Boss. resolve_escalation closes an escalation that was addressed to you: pass escalationId, decision and status (resolved, dismissed or returned, default resolved). Take escalationId from the escalations array that project(action=get) returns - it is the id of the one escalation you are answering, and the same array tells you whether it is still open. decision is your handling note: what you decided and why. status is optional and defaults to resolved; use dismissed when the question no longer stands. status="returned" means the material was not enough to decide on: the case goes back to whoever raised it, and that person is woken up to supply what is missing instead of the case hanging unanswered. It only accepts a supervisor escalation whose target session is your own - only the session an escalation names may answer it - and an escalation addressed to Boss is the Boss's to decide and is refused for you. Resolving it cascades: the member who raised the escalation is woken up with your decision. complete requires all tasks accepted - independently reviewed in the standard mode, self-accepted in the lightweight mode - and a final summary with evidenceRefs. action="export" returns the project as a Markdown report: the objective, every task with its delivery, evidence and review, the exceptions and how they were decided, and the full timeline. Use it when the user asks for a summary, a handover, or a status write-up of the project. Project and task IDs come from create/get/add_task. Reads never invoke models. Dispatch is asynchronous and consumes budget; stop polling when capacity is full and wait for child completion reports. Do not use session_spawn, session_dispatch, task or workflow to bypass the project dispatch guard. Never claim success on an error.`;
1142
1142
 
1143
1143
  export function readProjectConfig(env: Record<string, string | undefined>) {
1144
1144
  return { endpoint: env[PROJECT_ENDPOINT_ENV] ?? "", conversationId: env[TASK_CONVERSATION_ENV] ?? "", workspaceId: env.SUPER_PI_ORCHESTRATOR_WORKSPACE ?? "", capability: env[TASK_CAPABILITY_ENV] };
@@ -305,7 +305,7 @@ const extension = (pi: ExtensionApi): void => {
305
305
  pi.registerTool({
306
306
  name: PROJECT_TOOL_NAME, label: "Project", description: PROJECT_DESCRIPTION,
307
307
  parameters: Type.Object({
308
- action: Type.Union(["create", "start", "get", "list", "add_task", "dispatch", "submit", "request_review", "review", "update_task", "report", "escalate", "complete", "cancel", "export"].map((value) => Type.Literal(value))),
308
+ action: Type.Union(["create", "start", "get", "list", "add_task", "dispatch", "submit", "request_review", "review", "update_task", "report", "escalate", "resolve_escalation", "complete", "cancel", "export"].map((value) => Type.Literal(value))),
309
309
  projectId: Type.Optional(Type.String()), taskId: Type.Optional(Type.String()),
310
310
  parentTaskId: Type.Optional(Type.String()), role: Type.Optional(Type.Union([Type.Literal("leader"), Type.Literal("executor")])),
311
311
  title: Type.Optional(Type.String()), objective: Type.Optional(Type.String()),
@@ -322,6 +322,8 @@ const extension = (pi: ExtensionApi): void => {
322
322
  output: Type.Optional(Type.String()), evidenceRefs: Type.Optional(Type.Array(Type.String())), verdict: Type.Optional(Type.String()), summary: Type.Optional(Type.String()),
323
323
  kind: Type.Optional(Type.String()), progress: Type.Optional(Type.String()), variance: Type.Optional(Type.String()), nextStep: Type.Optional(Type.String()),
324
324
  risks: Type.Optional(Type.Array(Type.String())), decisionNeeded: Type.Optional(Type.String()), reason: Type.Optional(Type.String()), severity: Type.Optional(Type.String()),
325
+ escalationId: Type.Optional(Type.String({ description: "The id of the escalation to answer - take it from the escalations array that project(action=get) returns. Required for resolve_escalation" })),
326
+ decision: Type.Optional(Type.String({ description: "Your handling note on that escalation: what you decided and why. Required for resolve_escalation" })),
325
327
  defaultLeaderProfile: Type.Optional(Type.Object({
326
328
  agentId: Type.Optional(Type.String()), cwd: Type.Optional(Type.String()),
327
329
  model: Type.Optional(Type.Object({ provider: Type.String(), modelId: Type.String() })),
@@ -40,5 +40,5 @@
40
40
  "src/client/types.ts": "7eb172070e507c7eb4c6462a325282cb32e292a3eb10adc77e7971140fd54476",
41
41
  "src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5"
42
42
  },
43
- "recordedAt": "2026-11-07T23:11:08.342Z"
43
+ "recordedAt": "2026-11-08T00:33:28.498Z"
44
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evandu/super-pi",
3
- "version": "0.1.170",
3
+ "version": "0.1.171",
4
4
  "description": "Web control plane and companion for Pi",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -90,6 +90,7 @@
90
90
  "scripts/project-report-exception-title.test.mjs",
91
91
  "scripts/project-api-scope.test.mjs",
92
92
  "scripts/project-report-chain.test.mjs",
93
+ "scripts/project-tool-surface-parity.test.mjs",
93
94
  "scripts/session-tree-collapse.test.mjs",
94
95
  "scripts/archive-cascade.test.mjs",
95
96
  "scripts/workspace-cwd.test.mjs",