@evandu/super-pi 0.1.221 → 0.1.223
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/agents/super-pi-task/core.ts +15 -15
- package/agents/super-pi-task/index.ts +5 -2
- package/dist/client/.super-pi-client-sources.json +9 -8
- package/dist/client/assets/{CodeMirrorEditor-Cv1X2hmd.js → CodeMirrorEditor-Due3YL4A.js} +2 -2
- package/dist/client/assets/{dist-ClwDCrdU.js → dist-1hXEE44f.js} +1 -1
- package/dist/client/assets/{dist-C071I6sD.js → dist-2kMlRtqo.js} +1 -1
- package/dist/client/assets/{dist-BqNxkXgs.js → dist-B2XX-bBx.js} +1 -1
- package/dist/client/assets/{dist-CT23BwQB.js → dist-B3qtMidG.js} +1 -1
- package/dist/client/assets/{dist-B3GZVLeH.js → dist-BHlGN5Cp.js} +1 -1
- package/dist/client/assets/{dist-Bxyffyjn.js → dist-BJ5mZEGq.js} +1 -1
- package/dist/client/assets/{dist-IohJ9Qkl.js → dist-BJ_pU8qp.js} +1 -1
- package/dist/client/assets/{dist-CRfLPcZ8.js → dist-BXTbngmK.js} +1 -1
- package/dist/client/assets/{dist-DrNjVA0k.js → dist-BZGq856v.js} +1 -1
- package/dist/client/assets/{dist-CeHhOkTz.js → dist-BaUqm3zx.js} +1 -1
- package/dist/client/assets/{dist-DPYofnO9.js → dist-BvUexO6W.js} +1 -1
- package/dist/client/assets/{dist-xdw6XDXx.js → dist-CA52X7jm.js} +1 -1
- package/dist/client/assets/{dist-CVErcv3I.js → dist-CMws1R9h.js} +1 -1
- package/dist/client/assets/{dist-J-F3f1eU.js → dist-CQIMZ_7M.js} +1 -1
- package/dist/client/assets/{dist-DlBSkHdo.js → dist-CRrYz-2t.js} +1 -1
- package/dist/client/assets/{dist-Gvvox7eW.js → dist-Cw21UX77.js} +1 -1
- package/dist/client/assets/{dist-C-Kbr0WK.js → dist-D2n9-vIx.js} +1 -1
- package/dist/client/assets/{dist-w6rH3SJG.js → dist-DCVXoyno.js} +1 -1
- package/dist/client/assets/{dist-C729XRkf.js → dist-DOJKt6Px.js} +1 -1
- package/dist/client/assets/{dist-BT_Z_-2X.js → dist-DSCSHwdP.js} +1 -1
- package/dist/client/assets/{dist-BA1wBjGJ.js → dist-JSFnHR0P.js} +1 -1
- package/dist/client/assets/{dist-CsqiBKUZ.js → dist-Po3GdueN.js} +1 -1
- package/dist/client/assets/index-DHdzZ1mf.js +103 -0
- package/dist/client/assets/index-OmaD3l6r.css +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/application/conversation-service.d.ts +15 -0
- package/dist/server/application/conversation-service.js +28 -0
- package/dist/server/application/project-service.d.ts +7 -1
- package/dist/server/application/project-service.js +29 -9
- package/dist/server/application/session-reminder-service.d.ts +7 -3
- package/dist/server/application/session-reminder-service.js +40 -19
- package/dist/server/http-server.js +7 -7
- package/dist/server/store.js +7 -0
- package/dist/server/task-tool.d.ts +1 -1
- package/dist/server/task-tool.js +7 -7
- package/dist/server/types.d.ts +17 -0
- package/dist/shared/archive-decisions.d.ts +37 -0
- package/dist/shared/archive-decisions.js +86 -0
- package/dist/shared/project-overview.d.ts +35 -0
- package/dist/shared/project-overview.js +39 -1
- package/package.json +3 -1
- package/dist/client/assets/index-B-h_KnC5.css +0 -1
- package/dist/client/assets/index-CCF1Ymba.js +0 -103
|
@@ -18,6 +18,11 @@ export type OverviewDecision = {
|
|
|
18
18
|
severity?: string;
|
|
19
19
|
requestedByConversationId?: string;
|
|
20
20
|
createdAt?: string;
|
|
21
|
+
/** What the case was answered with - the reader's own words, or the words the archive wrote on
|
|
22
|
+
* their behalf. Either way the record keeps it, because a decision nobody can read is a
|
|
23
|
+
* decision that never happened. */
|
|
24
|
+
decision?: string;
|
|
25
|
+
resolvedAt?: string;
|
|
21
26
|
};
|
|
22
27
|
export type OverviewProject = {
|
|
23
28
|
id: string;
|
|
@@ -37,6 +42,13 @@ export type OverviewProject = {
|
|
|
37
42
|
}[];
|
|
38
43
|
};
|
|
39
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* 一条例外是不是「用户还欠着一个决定」。
|
|
47
|
+
*
|
|
48
|
+
* 一条判据,全篇通用:`status` 是 open(还没结),受众是 boss(或者是没写 audience 的旧记录,
|
|
49
|
+
* 那是当年的默认受众)。supervisor 级的是团队内部的事,用户从来没被问过,所以不算。
|
|
50
|
+
*/
|
|
51
|
+
export declare function isOpenUserDecision(item: OverviewDecision): boolean;
|
|
40
52
|
/** Internal coordination is not a request for the user's attention. */
|
|
41
53
|
export declare function userProjectDecisions(project: OverviewProject): OverviewDecision[];
|
|
42
54
|
/**
|
|
@@ -51,6 +63,29 @@ export declare function projectsNeedingUserDecision(projects: OverviewProject[])
|
|
|
51
63
|
projects: number;
|
|
52
64
|
cases: number;
|
|
53
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* IS THIS PROJECT STILL THE READER'S BUSINESS?
|
|
68
|
+
*
|
|
69
|
+
* Two ways a project stops being the reader's business: it ENDED (cancelled or failed), or its
|
|
70
|
+
* OWNER SESSION WAS ARCHIVED - and a project whose owner sits in the archive has nobody left to
|
|
71
|
+
* run it. The second case is not a status: the record still says 「进行中」, but the session that
|
|
72
|
+
* was supposed to drive it is gone, so the panel cannot even offer 「让负责人继续」. A project
|
|
73
|
+
* like that is history with its records intact, not work in progress.
|
|
74
|
+
*
|
|
75
|
+
* A project that has NO owner yet is NOT over: it simply has not started, and the reader is the
|
|
76
|
+
* one who can start it. Only an owner that EXISTS and is archived makes a project unmanaged.
|
|
77
|
+
*/
|
|
78
|
+
export declare function projectIsOver(project: {
|
|
79
|
+
status?: string;
|
|
80
|
+
}, ownerArchived?: boolean): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* WHICH VIEW A PROJECT BELONGS TO - the server decides, the client re-applies the same rule.
|
|
83
|
+
*
|
|
84
|
+
* The split is not 「ended / not ended」 - it is 「still owed something / nothing left to say」.
|
|
85
|
+
* A project that still owes the reader a decision stays in the current list, because hiding it
|
|
86
|
+
* would leave that decision with nobody. Everything else that is over goes to history.
|
|
87
|
+
*/
|
|
88
|
+
export declare function projectInView(project: OverviewProject, ownerArchived: boolean, view: "current" | "history"): boolean;
|
|
54
89
|
export declare function ownerProjectReports(project: OverviewProject): OverviewReport[];
|
|
55
90
|
export declare function latestProjectDelivery<T extends OverviewReport>(project: {
|
|
56
91
|
ownerConversationId?: string;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 一条例外是不是「用户还欠着一个决定」。
|
|
3
|
+
*
|
|
4
|
+
* 一条判据,全篇通用:`status` 是 open(还没结),受众是 boss(或者是没写 audience 的旧记录,
|
|
5
|
+
* 那是当年的默认受众)。supervisor 级的是团队内部的事,用户从来没被问过,所以不算。
|
|
6
|
+
*/
|
|
7
|
+
export function isOpenUserDecision(item) {
|
|
8
|
+
return item.status === "open" && (item.audience === "boss" || item.audience === undefined);
|
|
9
|
+
}
|
|
1
10
|
/** Internal coordination is not a request for the user's attention. */
|
|
2
11
|
export function userProjectDecisions(project) {
|
|
3
|
-
return (project.escalations ?? []).filter(
|
|
12
|
+
return (project.escalations ?? []).filter(isOpenUserDecision);
|
|
4
13
|
}
|
|
5
14
|
/**
|
|
6
15
|
* HOW MANY PROJECTS NEED THE USER - counted by project, not by case.
|
|
@@ -17,6 +26,35 @@ export function projectsNeedingUserDecision(projects) {
|
|
|
17
26
|
cases: withCases.reduce((sum, project) => sum + userProjectDecisions(project).length, 0),
|
|
18
27
|
};
|
|
19
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* IS THIS PROJECT STILL THE READER'S BUSINESS?
|
|
31
|
+
*
|
|
32
|
+
* Two ways a project stops being the reader's business: it ENDED (cancelled or failed), or its
|
|
33
|
+
* OWNER SESSION WAS ARCHIVED - and a project whose owner sits in the archive has nobody left to
|
|
34
|
+
* run it. The second case is not a status: the record still says 「进行中」, but the session that
|
|
35
|
+
* was supposed to drive it is gone, so the panel cannot even offer 「让负责人继续」. A project
|
|
36
|
+
* like that is history with its records intact, not work in progress.
|
|
37
|
+
*
|
|
38
|
+
* A project that has NO owner yet is NOT over: it simply has not started, and the reader is the
|
|
39
|
+
* one who can start it. Only an owner that EXISTS and is archived makes a project unmanaged.
|
|
40
|
+
*/
|
|
41
|
+
export function projectIsOver(project, ownerArchived = false) {
|
|
42
|
+
if (["cancelled", "failed"].includes(project.status ?? ""))
|
|
43
|
+
return true;
|
|
44
|
+
return ownerArchived;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* WHICH VIEW A PROJECT BELONGS TO - the server decides, the client re-applies the same rule.
|
|
48
|
+
*
|
|
49
|
+
* The split is not 「ended / not ended」 - it is 「still owed something / nothing left to say」.
|
|
50
|
+
* A project that still owes the reader a decision stays in the current list, because hiding it
|
|
51
|
+
* would leave that decision with nobody. Everything else that is over goes to history.
|
|
52
|
+
*/
|
|
53
|
+
export function projectInView(project, ownerArchived, view) {
|
|
54
|
+
const over = projectIsOver(project, ownerArchived);
|
|
55
|
+
const owesTheReader = userProjectDecisions(project).length > 0;
|
|
56
|
+
return view === "history" ? over && !owesTheReader : !over || owesTheReader;
|
|
57
|
+
}
|
|
20
58
|
export function ownerProjectReports(project) {
|
|
21
59
|
return (project.reports ?? []).filter(report => !report.taskId && ["progress", "delivery"].includes(report.kind ?? "")
|
|
22
60
|
&& (report.authorConversationId === project.ownerConversationId && Boolean(project.ownerConversationId)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evandu/super-pi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.223",
|
|
4
4
|
"description": "Web control plane and companion for Pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"scripts/markdown-syntax.test.mjs",
|
|
47
47
|
"scripts/file-mentions.test.mjs",
|
|
48
48
|
"scripts/sidebar-refresh.test.mjs",
|
|
49
|
+
"scripts/sidebar-project-leak.test.mjs",
|
|
50
|
+
"scripts/archive-drops-decisions.test.mjs",
|
|
49
51
|
"scripts/provider-network.test.mjs",
|
|
50
52
|
"scripts/project-overview.test.mjs",
|
|
51
53
|
"scripts/team-handoff-view.test.mjs",
|