@evandu/super-pi 0.1.206 → 0.1.208

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/agents/project-leader.md +5 -3
  2. package/agents/super-pi-task/core.ts +1 -1
  3. package/dist/client/.super-pi-client-sources.json +7 -7
  4. package/dist/client/assets/{CodeMirrorEditor-KQDBvdAI.js → CodeMirrorEditor-DwrcXEYY.js} +2 -2
  5. package/dist/client/assets/{dist-Bz8mBVYg.js → dist-4ak44NZQ.js} +1 -1
  6. package/dist/client/assets/{dist-DpFdyk4c.js → dist-B6zrM0u4.js} +1 -1
  7. package/dist/client/assets/{dist-B2DwIkxS.js → dist-BJxViUrs.js} +1 -1
  8. package/dist/client/assets/{dist-DNFTA8eK.js → dist-BOEgsxxx.js} +1 -1
  9. package/dist/client/assets/{dist-EZxvaEWE.js → dist-BZWoEHZB.js} +1 -1
  10. package/dist/client/assets/{dist-B-wznWiJ.js → dist-BiBhoaIj.js} +1 -1
  11. package/dist/client/assets/{dist-DWD02ase.js → dist-BjPiwDOH.js} +1 -1
  12. package/dist/client/assets/{dist-xcgc6bsN.js → dist-BtkTzJx-.js} +1 -1
  13. package/dist/client/assets/{dist-Bim285Uv.js → dist-BvQXb6Gm.js} +1 -1
  14. package/dist/client/assets/{dist-DYys59TX.js → dist-CJTPl8e8.js} +1 -1
  15. package/dist/client/assets/{dist-B015qWBZ.js → dist-CPbgZWr6.js} +1 -1
  16. package/dist/client/assets/{dist-DNjtMha0.js → dist-CkiHQydv.js} +1 -1
  17. package/dist/client/assets/{dist-KL5ywpxl.js → dist-CmyNC3S-.js} +1 -1
  18. package/dist/client/assets/{dist-Ce0_mKRX.js → dist-D8SigXvW.js} +1 -1
  19. package/dist/client/assets/{dist-J3S-elPb.js → dist-DcrHAVus.js} +1 -1
  20. package/dist/client/assets/{dist-CWwcn5gh.js → dist-DgCku0zO.js} +1 -1
  21. package/dist/client/assets/{dist-50OrOetK.js → dist-DkQ7IzzE.js} +1 -1
  22. package/dist/client/assets/{dist-CA6dRqYD.js → dist-DrCHg03L.js} +1 -1
  23. package/dist/client/assets/{dist-1vBvKRAO.js → dist-DzeUf4I1.js} +1 -1
  24. package/dist/client/assets/{dist-BN2UnOQ2.js → dist-ZOHc7msq.js} +1 -1
  25. package/dist/client/assets/{dist-3nL837Fs.js → dist-k2Zy_gh4.js} +1 -1
  26. package/dist/client/assets/{dist-3UazBQPy.js → dist-xtg_Vigb.js} +1 -1
  27. package/dist/client/assets/{index-DcuTYCZ-.css → index-1gs_N5Ez.css} +1 -1
  28. package/dist/client/assets/{index-Bmx2_cFl.js → index-BWUV4T-z.js} +29 -29
  29. package/dist/client/index.html +2 -2
  30. package/dist/server/application/project-service.d.ts +5 -3
  31. package/dist/server/application/project-service.js +72 -40
  32. package/dist/server/team-context.d.ts +2 -2
  33. package/dist/server/team-context.js +2 -1
  34. package/dist/server/types.d.ts +4 -0
  35. package/dist/shared/project-overview.d.ts +50 -0
  36. package/dist/shared/project-overview.js +24 -0
  37. package/dist/shared/project-presentation.d.ts +52 -0
  38. package/dist/shared/project-presentation.js +103 -0
  39. package/dist/shared/team-context-view.d.ts +33 -0
  40. package/dist/shared/team-context-view.js +49 -0
  41. package/dist/shared/team-context.d.ts +7 -0
  42. package/package.json +5 -1
@@ -0,0 +1,49 @@
1
+ /** Preserve the original message and treat recognized packets as display data only. */
2
+ export function splitHandoffMessage(source) {
3
+ const pattern = /^<team-context-data>[\t ]*\r?\n([\s\S]*?)\r?\n<\/team-context-data>[\t ]*(?=\r?\n|$)/gm;
4
+ const parts = [];
5
+ let end = 0;
6
+ for (const match of source.matchAll(pattern)) {
7
+ let fence;
8
+ for (const line of source.slice(0, match.index).split(/\r?\n/)) {
9
+ const marker = /^ {0,3}(`{3,}|~{3,})(.*)$/.exec(line);
10
+ if (!marker)
11
+ continue;
12
+ if (!fence)
13
+ fence = { mark: marker[1][0], length: marker[1].length };
14
+ else if (marker[1][0] === fence.mark && marker[1].length >= fence.length && !marker[2].trim())
15
+ fence = undefined;
16
+ }
17
+ if (fence || new TextEncoder().encode(match[0]).length > 16000)
18
+ continue;
19
+ let value;
20
+ try {
21
+ value = JSON.parse(match[1]);
22
+ }
23
+ catch {
24
+ continue;
25
+ }
26
+ if (!value || typeof value !== "object" || Array.isArray(value))
27
+ continue;
28
+ const packet = value;
29
+ if (typeof packet.projectId !== "string" || !packet.projectId || !Number.isInteger(packet.revision) || packet.revision < 0 || !Array.isArray(packet.entries) || packet.entries.length > 32)
30
+ continue;
31
+ if (packet.entries.some(entry => !entry || typeof entry.id !== "string" || typeof entry.title !== "string" || typeof entry.content !== "string" || !Number.isInteger(entry.revision) || entry.revision < 1 || entry.evidenceRefs !== undefined && (!Array.isArray(entry.evidenceRefs) || entry.evidenceRefs.some(ref => typeof ref !== "string"))))
32
+ continue;
33
+ if (packet.project !== undefined && (!packet.project || typeof packet.project !== "object" || packet.project.title !== undefined && typeof packet.project.title !== "string"))
34
+ continue;
35
+ if (packet.task !== undefined && (!packet.task || typeof packet.task !== "object" || packet.task.title !== undefined && typeof packet.task.title !== "string"))
36
+ continue;
37
+ if (packet.handoff !== undefined && typeof packet.handoff !== "string")
38
+ continue;
39
+ if (packet.ownedPaths !== undefined && (!Array.isArray(packet.ownedPaths) || packet.ownedPaths.some(path => typeof path !== "string")))
40
+ continue;
41
+ if (end < match.index)
42
+ parts.push({ kind: "markdown", source: source.slice(end, match.index) });
43
+ parts.push({ kind: "handoff", raw: match[0], packet });
44
+ end = match.index + match[0].length;
45
+ }
46
+ if (end < source.length || !parts.length)
47
+ parts.push({ kind: "markdown", source: source.slice(end) });
48
+ return parts;
49
+ }
@@ -1,4 +1,11 @@
1
1
  export type TeamContextKind = "finding" | "decision" | "pitfall" | "hypothesis";
2
+ export type CoordinationHint = {
3
+ action: "dispatch" | "message" | "request_review" | "resolve_escalation" | "complete";
4
+ taskId?: string;
5
+ escalationId?: string;
6
+ targetConversationId?: string;
7
+ reason: string;
8
+ };
2
9
  export type TeamContextInput = {
3
10
  id?: string;
4
11
  expectedRevision?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evandu/super-pi",
3
- "version": "0.1.206",
3
+ "version": "0.1.208",
4
4
  "description": "Web control plane and companion for Pi",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -43,6 +43,9 @@
43
43
  "test": "node scripts/test.mjs"
44
44
  },
45
45
  "check:logic": [
46
+ "scripts/project-overview.test.mjs",
47
+ "scripts/team-handoff-view.test.mjs",
48
+ "scripts/project-presentation.test.mjs",
46
49
  "scripts/team-context.test.mjs",
47
50
  "scripts/message-media.test.mjs",
48
51
  "scripts/update-args.test.mjs",
@@ -278,6 +281,7 @@
278
281
  "scripts/session-reminder-pmo-rights.test.mjs"
279
282
  ],
280
283
  "check:browser": [
284
+ "scripts/project-presentation-browser.test.mjs",
281
285
  "scripts/team-context-browser.test.mjs",
282
286
  "scripts/message-media-browser.test.mjs",
283
287
  "scripts/update-button-browser.test.mjs",