@evandu/super-pi 0.1.220 → 0.1.222

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 (47) hide show
  1. package/agents/project-leader.md +3 -2
  2. package/agents/super-pi-task/core.ts +16 -16
  3. package/agents/super-pi-task/index.ts +5 -2
  4. package/dist/client/.super-pi-client-sources.json +8 -8
  5. package/dist/client/assets/{CodeMirrorEditor-DLESYIdU.js → CodeMirrorEditor-IWcAz6oz.js} +2 -2
  6. package/dist/client/assets/{dist-h8QFV1py.js → dist-0tDquiIc.js} +1 -1
  7. package/dist/client/assets/{dist-CbixgvA8.js → dist-B2WzMUqb.js} +1 -1
  8. package/dist/client/assets/{dist-DhCNXN4F.js → dist-B41_P-GB.js} +1 -1
  9. package/dist/client/assets/{dist-Bz37bm03.js → dist-B4YZqIKX.js} +1 -1
  10. package/dist/client/assets/{dist-BG1xVEUu.js → dist-BPhtg6ss.js} +1 -1
  11. package/dist/client/assets/{dist-YSB8UKj7.js → dist-Brmqe6G6.js} +1 -1
  12. package/dist/client/assets/{dist-D0Mff5_O.js → dist-Bx-zvsek.js} +1 -1
  13. package/dist/client/assets/{dist-CYEoLBJJ.js → dist-ByhQMTZz.js} +1 -1
  14. package/dist/client/assets/{dist-hyn4QSU9.js → dist-C-CsTWFq.js} +1 -1
  15. package/dist/client/assets/{dist-B6UYFWUo.js → dist-CLfjxR6r.js} +1 -1
  16. package/dist/client/assets/{dist-DvJTvgiN.js → dist-CRfBzL2s.js} +1 -1
  17. package/dist/client/assets/{dist-DKRxalqK.js → dist-Cd2jBngi.js} +1 -1
  18. package/dist/client/assets/{dist-CQAWuaHA.js → dist-ChJliyoT.js} +1 -1
  19. package/dist/client/assets/{dist-BTUuXAFG.js → dist-D73UQVEK.js} +1 -1
  20. package/dist/client/assets/{dist-DPvgTEV_.js → dist-DR-NR2sl.js} +1 -1
  21. package/dist/client/assets/{dist-aDKso4tk.js → dist-DZFnjuKR.js} +1 -1
  22. package/dist/client/assets/{dist-B-ydE4PJ.js → dist-DftBUe3J.js} +1 -1
  23. package/dist/client/assets/{dist-2Gv721yB.js → dist-DgRXONWV.js} +1 -1
  24. package/dist/client/assets/{dist-CoC8iHD1.js → dist-DglikBo1.js} +1 -1
  25. package/dist/client/assets/{dist-DmraLEb2.js → dist-JFHBsRN8.js} +1 -1
  26. package/dist/client/assets/{dist-B-63MNT9.js → dist-KddcFuL2.js} +1 -1
  27. package/dist/client/assets/{dist-CrtcsyOg.js → dist-fzY9qpWd.js} +1 -1
  28. package/dist/client/assets/index-DbtNmSyS.js +103 -0
  29. package/dist/client/assets/index-OmaD3l6r.css +1 -0
  30. package/dist/client/index.html +2 -2
  31. package/dist/server/application/extension-ui-service.d.ts +2 -1
  32. package/dist/server/application/extension-ui-service.js +25 -17
  33. package/dist/server/application/project-service.d.ts +3 -2
  34. package/dist/server/application/project-service.js +34 -38
  35. package/dist/server/application/session-reminder-service.d.ts +7 -3
  36. package/dist/server/application/session-reminder-service.js +40 -19
  37. package/dist/server/http-server.js +6 -6
  38. package/dist/server/index.js +5 -1
  39. package/dist/server/store.d.ts +1 -1
  40. package/dist/server/store.js +42 -1
  41. package/dist/server/task-tool.d.ts +1 -1
  42. package/dist/server/task-tool.js +7 -7
  43. package/dist/shared/session-reporting.d.ts +2 -20
  44. package/dist/shared/session-reporting.js +9 -27
  45. package/package.json +1 -1
  46. package/dist/client/assets/index-B-h_KnC5.css +0 -1
  47. package/dist/client/assets/index-BMuvJCSx.js +0 -103
@@ -264,7 +264,7 @@ export declare const SESSION_STOP_SUBTREE_TOOL_NAME = "session_stop_subtree";
264
264
  export declare const SESSION_REMOVE_TOOL_NAME = "session_remove";
265
265
  export declare const SESSION_REMINDER_TOOL_NAME = "session_reminder";
266
266
  /** Model-facing description for session_reminder. */
267
- export declare const SESSION_REMINDER_DESCRIPTION = "Set an in-session timer that delivers a reminder note back to THIS conversation after a given number of seconds. Multiple reminders can run in parallel, and pending reminders can be cancelled or listed.\n\nWHEN TO USE THIS:\n- Self-reminders and time-based checkpoints (e.g. \"Check child session progress in 60 seconds\", \"Review test run in 120 seconds\").\n- Unlike scheduled_task which runs in a separate independent conversation, session_reminder sends the note back to THIS EXACT conversation as a new turn so you can follow up directly.\n\nActions:\n- \"create\" (default): Schedule a reminder. Requires delaySeconds (or seconds) and note. Returns reminderId.\n- \"cancel\": Cancel a pending reminder. Requires reminderId.\n- \"list\": List all active pending reminders for this conversation.";
267
+ export declare const SESSION_REMINDER_DESCRIPTION = "Set a timer that wakes THIS conversation. A timer without a note reports only the elapsed time. It does not introduce a new agenda or tell you how to act.\n\nFor a periodic project check-in, set delaySeconds and repeat: true once. On each wake-up, decide what to do based on the project\u2019s current state. Cancel the timer when it is no longer needed.\n\nActions:\n- \"create\" (default): Requires a positive delaySeconds (or seconds). Set repeat: true for recurring wake-ups that only report elapsed time. A one-off reminder can optionally include a short note. Returns reminderId.\n- \"cancel\": Cancel future wake-ups. Requires reminderId.\n- \"list\": List this conversation\u2019s active timers.\n\nUse scheduled_task for work that should run in a separate conversation.";
268
268
  /** Model-facing description for session_spawn. */
269
269
  export declare const SESSION_SPAWN_DESCRIPTION = "Create a child conversation in the current workspace and immediately dispatch its initial task. You can specify a primary agent as the child's role.\n\nDIFFERENCE FROM THE 'task' TOOL:\n- The 'task' tool delegates to a transient, one-shot subagent process (scout, critic, patcher) that runs once, returns its final text, and terminates. It has no conversation history and does not appear in the workspace sidebar.\n- 'session_spawn' creates a real, persistent child CONVERSATION in Super Pi. It appears in the sidebar, retains multi-turn message history, can receive follow-up messages via session_dispatch, can be inspected via session_status, and can be stopped via session_stop. The user can also switch to it in the Web UI.\n\nWHEN TO USE THIS:\n- Long-running, multi-phase tracks of work that require ongoing context, multiple turns of dialogue, or independent user visibility.\n- Multi-phase or complex work where the user needs each step to be visible and available for inspection or intervention: create a child session with session_spawn.\n- Parallel work streams (e.g., Track A: backend refactor, Track B: frontend component update) where both need full conversational capabilities.\n- When the user asks you to act as an orchestrator/manager who delegates to multiple sessions.\n\nWHEN NOT TO USE THIS:\n- For one-off, focused delegation with a single answer: use 'task' (with scout/critic/patcher). It is faster, cheaper, and returns directly to your transcript.\n- For running shell commands or build watchers: use 'run_async'.\n- For a single one-off delegation with a single answer: use 'task'.\n\nUsage notes:\n1. Spawning is ASYNCHRONOUS by default: it creates the conversation, enqueues the initial task, and returns the new conversationId immediately. The sibling session runs in the background.\n2. The initial task should provide clear context and goals since the new session starts with a fresh conversation history.\n3. Use session_status with the returned conversationId to check progress, or session_dispatch to send further messages.\n4. The new session reports completion to its DIRECT parent automatically, and that parent is always the calling session. 'parentConversationId' may only repeat the calling session's own id - the server refuses (403) any other session as the parent and creates nothing.\n5. The new session always belongs to the calling session's workspace. Pass 'cwd' as a workspace-relative subdirectory (for example, 'packages/a') when it should work below the workspace root; absolute paths and traversal are rejected.\n6. Optionally pass 'model' to choose which model the NEW session runs on: {\"provider\":\"...\",\"modelId\":\"...\"} - the same \"provider/modelId\" pair the model picker shows, and BOTH halves are required. Leave 'model' out and the new session starts on the workspace default model.\n7. Optionally pass 'watchdogTimeoutSeconds' to declare how long YOU are willing to wait for a report before you want to be reminded: a positive number of seconds. If the new session stays silent that long, you receive a '[Watchdog \u63D0\u9192]' message naming it. A report from the child (session_report) restarts the clock; the watchdog never stops the child. Leave it out to run without a watchdog.";
270
270
  /** Model-facing description for session_status. */
@@ -369,16 +369,16 @@ export const SESSION_STOP_SUBTREE_TOOL_NAME = "session_stop_subtree";
369
369
  export const SESSION_REMOVE_TOOL_NAME = "session_remove";
370
370
  export const SESSION_REMINDER_TOOL_NAME = "session_reminder";
371
371
  /** Model-facing description for session_reminder. */
372
- export const SESSION_REMINDER_DESCRIPTION = `Set an in-session timer that delivers a reminder note back to THIS conversation after a given number of seconds. Multiple reminders can run in parallel, and pending reminders can be cancelled or listed.
372
+ export const SESSION_REMINDER_DESCRIPTION = `Set a timer that wakes THIS conversation. A timer without a note reports only the elapsed time. It does not introduce a new agenda or tell you how to act.
373
373
 
374
- WHEN TO USE THIS:
375
- - Self-reminders and time-based checkpoints (e.g. "Check child session progress in 60 seconds", "Review test run in 120 seconds").
376
- - Unlike scheduled_task which runs in a separate independent conversation, session_reminder sends the note back to THIS EXACT conversation as a new turn so you can follow up directly.
374
+ For a periodic project check-in, set delaySeconds and repeat: true once. On each wake-up, decide what to do based on the project’s current state. Cancel the timer when it is no longer needed.
377
375
 
378
376
  Actions:
379
- - "create" (default): Schedule a reminder. Requires delaySeconds (or seconds) and note. Returns reminderId.
380
- - "cancel": Cancel a pending reminder. Requires reminderId.
381
- - "list": List all active pending reminders for this conversation.`;
377
+ - "create" (default): Requires a positive delaySeconds (or seconds). Set repeat: true for recurring wake-ups that only report elapsed time. A one-off reminder can optionally include a short note. Returns reminderId.
378
+ - "cancel": Cancel future wake-ups. Requires reminderId.
379
+ - "list": List this conversation’s active timers.
380
+
381
+ Use scheduled_task for work that should run in a separate conversation.`;
382
382
  /** Model-facing description for session_spawn. */
383
383
  export const SESSION_SPAWN_DESCRIPTION = `Create a child conversation in the current workspace and immediately dispatch its initial task. You can specify a primary agent as the child's role.
384
384
 
@@ -9,19 +9,12 @@ export type SessionReportingSnapshot = {
9
9
  hasPendingResult?: boolean;
10
10
  /**
11
11
  * 谁来拍板这条未决例外:`supervisor` = 团队内部(直属上级),`boss` = 到了顶层。
12
- * 缺席 = 老记录,按 `boss` 读(保守读法:可能需要用户的事,先给用户看)。
12
+ * User-facing decisions require an explicit Boss audience on a top-level session.
13
13
  */
14
14
  escalationAudience?: EscalationAudience;
15
15
  };
16
16
  /** 这条未决例外该谁拍板。 */
17
17
  export type EscalationAudience = "supervisor" | "boss";
18
- /**
19
- * 从会话载荷上读出例外的 audience。
20
- *
21
- * 客户端的会话类型是自己的一份镜像(`src/client/types.ts`),不在本次改动的文件清单里,
22
- * 所以这个字段不通过类型系统读,而是只从这里这一个门口读一次。
23
- */
24
- export declare function escalationAudienceOf(conversation: unknown): EscalationAudience | undefined;
25
18
  export type ReportingAxisState = "pending_report" | "awaiting_subordinates" | "awaiting_decision" | "unread";
26
19
  export declare function deriveReportingState(params: {
27
20
  conversation: SessionReportingSnapshot;
@@ -29,18 +22,7 @@ export declare function deriveReportingState(params: {
29
22
  directChildren: SessionReportingSnapshot[];
30
23
  isTopLevelUnread?: boolean;
31
24
  }): ReportingAxisState | null;
32
- /**
33
- * 给用户看的那一套推导:内部升级不算「等上面拍板」。
34
- *
35
- * `deriveReportingState` 说的是这个会话在汇报线上的位置,那条内部规则(自己有待拍板的例外)
36
- * 对团队内部是对的 —— 但它被原样搬到用户面前时读作「用户被叫来开会了」,而用户根本不在那场
37
- * 会里。所以用户这一侧单独走这一个出口:`audience` 是 `supervisor` 的未决例外不参与
38
- * `awaiting_decision` 的判定,于是这个会话显示它真正在做的事(运行中就显示运行中),
39
- * 而不是被一条内部升级盖住。
40
- *
41
- * 判据本体在 `deriveReportingState` 里没有动:服务端的推导(项目面板的会话行)走的是那一条,
42
- * 客户端走的是这一条,两边各有一套派生,谁也不用为了另一边的语义让步。
43
- */
25
+ /** Internal issues do not create user-visible decision or activity badges. */
44
26
  export declare function deriveUserReportingState(params: {
45
27
  conversation: SessionReportingSnapshot;
46
28
  parent?: ChildSessionRow;
@@ -8,16 +8,6 @@
8
8
  //
9
9
  // 规则在 `docs/DESIGN-PRINCIPLES.md` 第二节「汇报线逐级转述:Boss 只有一个联络线」。
10
10
  import { isChildSession } from "./child-session-lock.js";
11
- /**
12
- * 从会话载荷上读出例外的 audience。
13
- *
14
- * 客户端的会话类型是自己的一份镜像(`src/client/types.ts`),不在本次改动的文件清单里,
15
- * 所以这个字段不通过类型系统读,而是只从这里这一个门口读一次。
16
- */
17
- export function escalationAudienceOf(conversation) {
18
- const value = conversation?.escalationAudience;
19
- return value === "supervisor" || value === "boss" ? value : undefined;
20
- }
21
11
  export function deriveReportingState(params) {
22
12
  const { conversation, parent, directChildren, isTopLevelUnread = false } = params;
23
13
  // 1. 如果自己有未决的升级例外:等上面拍板
@@ -51,24 +41,16 @@ export function deriveReportingState(params) {
51
41
  }
52
42
  return null;
53
43
  }
54
- /**
55
- * 给用户看的那一套推导:内部升级不算「等上面拍板」。
56
- *
57
- * `deriveReportingState` 说的是这个会话在汇报线上的位置,那条内部规则(自己有待拍板的例外)
58
- * 对团队内部是对的 —— 但它被原样搬到用户面前时读作「用户被叫来开会了」,而用户根本不在那场
59
- * 会里。所以用户这一侧单独走这一个出口:`audience` 是 `supervisor` 的未决例外不参与
60
- * `awaiting_decision` 的判定,于是这个会话显示它真正在做的事(运行中就显示运行中),
61
- * 而不是被一条内部升级盖住。
62
- *
63
- * 判据本体在 `deriveReportingState` 里没有动:服务端的推导(项目面板的会话行)走的是那一条,
64
- * 客户端走的是这一条,两边各有一套派生,谁也不用为了另一边的语义让步。
65
- */
44
+ /** Internal issues do not create user-visible decision or activity badges. */
66
45
  export function deriveUserReportingState(params) {
67
- const { conversation, ...rest } = params;
68
- if (escalationAudienceOf(conversation) !== "supervisor") {
69
- return deriveReportingState({ conversation, ...rest });
70
- }
71
- return deriveReportingState({ ...rest, conversation: { ...conversation, hasOpenEscalation: false } });
46
+ const { conversation, directChildren } = params;
47
+ const hasOpenEscalation = conversation.hasOpenEscalation && !conversation.parentConversationId
48
+ && conversation.escalationAudience === "boss";
49
+ return deriveReportingState({
50
+ ...params,
51
+ conversation: { ...conversation, hasOpenEscalation },
52
+ directChildren: directChildren.map(child => child.hasOpenEscalation ? { ...child, hasOpenEscalation: false } : child),
53
+ });
72
54
  }
73
55
  export const SESSION_STATE_WORD = {
74
56
  waiting: "等待 LLM",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evandu/super-pi",
3
- "version": "0.1.220",
3
+ "version": "0.1.222",
4
4
  "description": "Web control plane and companion for Pi",
5
5
  "license": "MIT",
6
6
  "type": "module",