@evandu/super-pi 0.1.180 → 0.1.182

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 (42) hide show
  1. package/dist/client/.super-pi-client-sources.json +5 -5
  2. package/dist/client/assets/{CodeMirrorEditor-BdY_vez9.js → CodeMirrorEditor-DUyqaSOB.js} +2 -2
  3. package/dist/client/assets/{dist-BXrWZekq.js → dist-AQ8CYp6b.js} +1 -1
  4. package/dist/client/assets/{dist-CE4F-GnZ.js → dist-Bj218gfa.js} +1 -1
  5. package/dist/client/assets/{dist-tD_cG-sA.js → dist-C7PhA7pe.js} +1 -1
  6. package/dist/client/assets/{dist-Dl22kIFG.js → dist-CB124C6Z.js} +1 -1
  7. package/dist/client/assets/{dist-B_v-qVKZ.js → dist-CNem2r_T.js} +1 -1
  8. package/dist/client/assets/{dist-DjsQFuR8.js → dist-CPmDYAQT.js} +1 -1
  9. package/dist/client/assets/{dist-zNY48I29.js → dist-CU8JEI5K.js} +1 -1
  10. package/dist/client/assets/{dist-C_5fMTu2.js → dist-CeU4Svbh.js} +1 -1
  11. package/dist/client/assets/{dist-DfY4zXbE.js → dist-CkTZUfAR.js} +1 -1
  12. package/dist/client/assets/{dist-CcVJlndc.js → dist-CvLzvDh7.js} +1 -1
  13. package/dist/client/assets/{dist-1AZAH0Vw.js → dist-D3HMZhM-.js} +1 -1
  14. package/dist/client/assets/{dist-BzicsMSL.js → dist-D4lWO1EF.js} +1 -1
  15. package/dist/client/assets/{dist-RxPniecV.js → dist-DLOUy-hB.js} +1 -1
  16. package/dist/client/assets/{dist-BPaSHEMs.js → dist-DTd2PCza.js} +1 -1
  17. package/dist/client/assets/{dist-CxZY8nws.js → dist-Dkm31GRe.js} +1 -1
  18. package/dist/client/assets/{dist-DVYPDnbh.js → dist-Dlg4MpdE.js} +1 -1
  19. package/dist/client/assets/{dist-BXJ0FVm3.js → dist-Dnx8LlEL.js} +1 -1
  20. package/dist/client/assets/{dist-D-AKDchV.js → dist-NLNoAzKl.js} +1 -1
  21. package/dist/client/assets/{dist-Bxp6Lr31.js → dist-TX6Uhfee.js} +1 -1
  22. package/dist/client/assets/{dist-BiQDCO0Z.js → dist-dnyR0Vf6.js} +1 -1
  23. package/dist/client/assets/{dist-XnsZBWBb.js → dist-ka17rnWs.js} +1 -1
  24. package/dist/client/assets/{dist-D7S0Q68i.js → dist-nbHIDjzw.js} +1 -1
  25. package/dist/client/assets/{index-Cy4Cb9zB.js → index-BplDWdZp.js} +15 -15
  26. package/dist/client/assets/{index-DAKtgLA9.css → index-Ui6aXMVV.css} +1 -1
  27. package/dist/client/index.html +2 -2
  28. package/dist/server/application/run-service.d.ts +1 -0
  29. package/dist/server/application/run-service.js +80 -24
  30. package/dist/server/application/session-orchestrator-service.js +4 -2
  31. package/dist/server/command-handler.js +2 -2
  32. package/dist/server/http-server.js +27 -6
  33. package/dist/server/length-continuation.d.ts +33 -0
  34. package/dist/server/length-continuation.js +63 -0
  35. package/dist/server/store.d.ts +2 -0
  36. package/dist/server/store.js +9 -0
  37. package/dist/server/types.d.ts +10 -0
  38. package/dist/server/update.d.ts +33 -0
  39. package/dist/server/update.js +46 -0
  40. package/dist/shared/session-reporting.d.ts +15 -0
  41. package/dist/shared/session-reporting.js +39 -0
  42. package/package.json +5 -1
@@ -0,0 +1,39 @@
1
+ // 会话状态模型:汇报线上的位置 —— 两边共用的推导逻辑与类型。
2
+ //
3
+ // 状态在回答什么问题:
4
+ // - 子会话:有没有向上汇报?没有就是待汇报(pending_report),报过了就消停了(null)。
5
+ // - 父会话:下级是不是都在消停状态?不是就是等待下级(awaiting_subordinates)。
6
+ // - 顶层会话:自己有没有未读?有就是未读(unread)。
7
+ //
8
+ // 规则在 `docs/DESIGN-PRINCIPLES.md` 第二节「汇报线逐级转述:Boss 只有一个联络线」。
9
+ import { isChildSession } from "./child-session-lock.js";
10
+ export function deriveReportingState(params) {
11
+ const { conversation, parent, directChildren, isTopLevelUnread } = params;
12
+ // 1. 如果自己是子会话(按 isChildSession 判据,父会话存在且未归档)
13
+ if (isChildSession(conversation.parentConversationId, parent)) {
14
+ // 还没汇报过 -> 待汇报
15
+ if (!conversation.reportedToParentAt) {
16
+ return "pending_report";
17
+ }
18
+ // 已经汇报过 -> 在汇报轴上完成,不显示任何汇报标记
19
+ return null;
20
+ }
21
+ // 2. 如果自己有未结束或未汇报的直接子会话
22
+ const hasPendingChild = directChildren.some((child) => {
23
+ if (child.archivedAt)
24
+ return false;
25
+ const isRunning = child.status === "running" ||
26
+ child.status === "waiting" ||
27
+ child.status === "awaiting_background";
28
+ const hasNotReported = !child.reportedToParentAt;
29
+ return isRunning || hasNotReported;
30
+ });
31
+ if (hasPendingChild) {
32
+ return "awaiting_subordinates";
33
+ }
34
+ // 3. 顶层会话退回到原有的「未读」逻辑
35
+ if (isTopLevelUnread) {
36
+ return "unread";
37
+ }
38
+ return null;
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evandu/super-pi",
3
- "version": "0.1.180",
3
+ "version": "0.1.182",
4
4
  "description": "Web control plane and companion for Pi",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,6 +46,7 @@
46
46
  "scripts/update-args.test.mjs",
47
47
  "scripts/update-restart.test.mjs",
48
48
  "scripts/update-restart-budget.test.mjs",
49
+ "scripts/update-shell-quoting.test.mjs",
49
50
  "scripts/update-version-pinning.test.mjs",
50
51
  "scripts/test-runner.test.mjs",
51
52
  "scripts/stream-checkpoint.test.mjs",
@@ -126,6 +127,8 @@
126
127
  "scripts/turn-failure-marks-failed.test.mjs",
127
128
  "scripts/model-context-window.test.mjs",
128
129
  "scripts/update-ui-contract.test.mjs",
130
+ "scripts/stopping-marker.test.mjs",
131
+ "scripts/update-button-state.test.mjs",
129
132
  "scripts/temp-sweep.test.mjs",
130
133
  "scripts/workspace-identity.test.mjs",
131
134
  "scripts/followup.test.mjs",
@@ -255,6 +258,7 @@
255
258
  "scripts/primary-employee-guard.test.mjs",
256
259
  "scripts/interrupted-task-recovery.test.mjs",
257
260
  "scripts/child-session-lock.test.mjs",
261
+ "scripts/session-reporting.test.mjs",
258
262
  "scripts/mutation-lock-coverage.test.mjs"
259
263
  ],
260
264
  "check:browser": [