@evandu/super-pi 0.1.159 → 0.1.161
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 +1 -1
- package/agents/super-pi-task/index.ts +2 -1
- package/dist/client/.super-pi-client-sources.json +5 -5
- package/dist/client/assets/{CodeMirrorEditor-BB0GyCns.js → CodeMirrorEditor-CDaL0eZg.js} +2 -2
- package/dist/client/assets/{dist-DSE_w05B.js → dist-BA58NP6M.js} +1 -1
- package/dist/client/assets/{dist-W281b4I1.js → dist-BDNs_xhA.js} +1 -1
- package/dist/client/assets/{dist-DdCTaTc1.js → dist-BHWAql8E.js} +1 -1
- package/dist/client/assets/{dist-BZNEPjC8.js → dist-BJG0l-sn.js} +1 -1
- package/dist/client/assets/{dist-BDxBEqt3.js → dist-BZgXABCU.js} +1 -1
- package/dist/client/assets/{dist-BT4A5Gts.js → dist-CSdmsB0d.js} +1 -1
- package/dist/client/assets/{dist-DuhZOzpj.js → dist-CTelFWCj.js} +1 -1
- package/dist/client/assets/{dist-D4twfstd.js → dist-CWgIVqDh.js} +1 -1
- package/dist/client/assets/{dist-DxoyfcUP.js → dist-CZlI9li3.js} +1 -1
- package/dist/client/assets/{dist-BQjIO_bJ.js → dist-CiyMaqx4.js} +1 -1
- package/dist/client/assets/{dist-BCZnYgeb.js → dist-Cm3rvfSQ.js} +1 -1
- package/dist/client/assets/{dist-DndOTsBF.js → dist-D1cVuzfF.js} +1 -1
- package/dist/client/assets/{dist-D8Zpt_js.js → dist-DL66Z_jn.js} +1 -1
- package/dist/client/assets/{dist-BQK5OciP.js → dist-DO3oDtGc.js} +1 -1
- package/dist/client/assets/{dist-BJPYIQat.js → dist-DOdfw0L-.js} +1 -1
- package/dist/client/assets/{dist-DIgk0yLa.js → dist-DPwOtaMP.js} +1 -1
- package/dist/client/assets/{dist-BBvvLw1T.js → dist-DVCVhi5y.js} +1 -1
- package/dist/client/assets/{dist-R_rLoe1G.js → dist-DhPkHpbv.js} +1 -1
- package/dist/client/assets/{dist-CH0-OHWZ.js → dist-DnaLB6eU.js} +1 -1
- package/dist/client/assets/{dist-rXWbM1pb.js → dist-S5Gkqadu.js} +1 -1
- package/dist/client/assets/{dist-BZlYaGxq.js → dist-gCJkYldU.js} +1 -1
- package/dist/client/assets/{dist-BeCgVWwJ.js → dist-jwSzBAO8.js} +1 -1
- package/dist/client/assets/index-B9tN8KD3.js +102 -0
- package/dist/client/assets/{index-OdImWK16.css → index-BK3ZIqJj.css} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/application/conversation-service.d.ts +6 -0
- package/dist/server/application/conversation-service.js +6 -1
- package/dist/server/application/project-service.d.ts +72 -1
- package/dist/server/application/project-service.js +256 -19
- package/dist/server/application/session-orchestrator-service.d.ts +9 -0
- package/dist/server/application/session-orchestrator-service.js +1 -0
- package/dist/server/http-server.js +11 -3
- package/dist/server/store.d.ts +1 -0
- package/dist/server/store.js +8 -1
- package/dist/server/types.d.ts +36 -0
- package/package.json +1 -1
- package/dist/client/assets/index-C2caXFC3.js +0 -102
|
@@ -1559,9 +1559,9 @@ export function createHttpServer(options) {
|
|
|
1559
1559
|
return;
|
|
1560
1560
|
}
|
|
1561
1561
|
if (!projectId && request.method === "POST") {
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
json(
|
|
1562
|
+
// 项目由 agent 在对话里创建:只有那次会话能作为发起人,项目的全部会话才挂在它下面。
|
|
1563
|
+
// 人手动建的项目没有发起人,它的 Leader 只能当树根,顶层就会长出一片会话。
|
|
1564
|
+
json(403, { error: "项目由 AI 在对话中创建:请直接告诉它你要做什么" });
|
|
1565
1565
|
return;
|
|
1566
1566
|
}
|
|
1567
1567
|
if (!projectId) {
|
|
@@ -1585,6 +1585,14 @@ export function createHttpServer(options) {
|
|
|
1585
1585
|
json(200, { project });
|
|
1586
1586
|
return;
|
|
1587
1587
|
}
|
|
1588
|
+
// ONE CLICK: RAISE THE BUDGET AND CONTINUE. The server computes the new cap, closes the
|
|
1589
|
+
// budget exception and wakes the leader - the client sends no number of its own.
|
|
1590
|
+
if (request.method === "POST" && subresource === "budget" && parts[2] === "continue") {
|
|
1591
|
+
const result = await service.raiseBudgetAndContinue(projectId, workspaceId, callerConversationId);
|
|
1592
|
+
broadcaster.broadcastState();
|
|
1593
|
+
json(200, result);
|
|
1594
|
+
return;
|
|
1595
|
+
}
|
|
1588
1596
|
if (request.method === "POST" && subresource === "tasks" && parts[2] && parts[3] === "dispatch") {
|
|
1589
1597
|
const task = await service.dispatchTask(projectId, parts[2], workspaceId);
|
|
1590
1598
|
broadcaster.broadcastState();
|
package/dist/server/store.d.ts
CHANGED
|
@@ -281,6 +281,7 @@ export declare class Store {
|
|
|
281
281
|
cwd?: string;
|
|
282
282
|
parentConversationId?: string;
|
|
283
283
|
origin?: "user" | "orchestrator";
|
|
284
|
+
separateMemoryTree?: boolean;
|
|
284
285
|
}): Promise<Conversation>;
|
|
285
286
|
/**
|
|
286
287
|
* Records (or clears) one conversation as collapsed in the sidebar's session tree. The list is a
|
package/dist/server/store.js
CHANGED
|
@@ -1143,7 +1143,14 @@ export class Store {
|
|
|
1143
1143
|
conversation.origin = configuration.origin;
|
|
1144
1144
|
}
|
|
1145
1145
|
try {
|
|
1146
|
-
|
|
1146
|
+
// A PROJECT OPENS ITS OWN MEMORY TREE. Inheriting the parent's tree would put the project's
|
|
1147
|
+
// workers in the user's chat tree, where the tree-scoped memories of that conversation are
|
|
1148
|
+
// visible to them - a project is its own working context. The tree edge in the sidebar is a
|
|
1149
|
+
// different thing and stays exactly as it is.
|
|
1150
|
+
if (configuration?.separateMemoryTree)
|
|
1151
|
+
conversation.treeId = conversation.id;
|
|
1152
|
+
else
|
|
1153
|
+
conversation.treeId = memoryTreeId(conversation, this.state.conversations);
|
|
1147
1154
|
}
|
|
1148
1155
|
catch { /* Keep malformed legacy edges inspectable; memory authorization fails closed. */ }
|
|
1149
1156
|
this.state.conversations.unshift(conversation);
|
package/dist/server/types.d.ts
CHANGED
|
@@ -903,6 +903,16 @@ export type TerminalShell = {
|
|
|
903
903
|
export type ProjectStatus = "planning" | "active" | "blocked" | "awaiting_approval" | "awaiting_review" | "completed" | "failed" | "cancelled";
|
|
904
904
|
export type ProjectTaskStatus = "pending" | "ready" | "in_progress" | "blocked" | "awaiting_review" | "completed" | "failed" | "cancelled";
|
|
905
905
|
export type ProjectRisk = "low" | "medium" | "high";
|
|
906
|
+
/**
|
|
907
|
+
* HOW A PROJECT RUNS.
|
|
908
|
+
*
|
|
909
|
+
* "standard" is the shape the project flow has always had: the leader dispatches worker sessions
|
|
910
|
+
* and every delivery is checked by an independent reviewer session. "lightweight" is the small
|
|
911
|
+
* project's shape: the leader session does the work itself, and a delivery is accepted on the
|
|
912
|
+
* executor's own evidence. Every guardrail is the same in both - what a lightweight project gives
|
|
913
|
+
* up is the number of sessions, never the guardrails.
|
|
914
|
+
*/
|
|
915
|
+
export type ProjectMode = "standard" | "lightweight";
|
|
906
916
|
export type SessionProfile = {
|
|
907
917
|
/** Employee agent file id under agents directory (primary agent name). */
|
|
908
918
|
agentId?: string;
|
|
@@ -941,12 +951,15 @@ export type ProjectTask = {
|
|
|
941
951
|
blockedReason?: string;
|
|
942
952
|
output?: string;
|
|
943
953
|
evidenceRefs?: string[];
|
|
954
|
+
/** The acceptance of this task. `lightweight: true` means the executor accepted its own
|
|
955
|
+
* delivery: there was no independent reviewer session behind it. */
|
|
944
956
|
review?: {
|
|
945
957
|
verdict: "accepted" | "changes_requested";
|
|
946
958
|
summary: string;
|
|
947
959
|
evidenceRefs: string[];
|
|
948
960
|
reviewerConversationId?: string;
|
|
949
961
|
createdAt: string;
|
|
962
|
+
lightweight?: boolean;
|
|
950
963
|
};
|
|
951
964
|
createdAt: string;
|
|
952
965
|
updatedAt: string;
|
|
@@ -990,6 +1003,11 @@ export type Project = {
|
|
|
990
1003
|
workspaceId: string;
|
|
991
1004
|
title: string;
|
|
992
1005
|
objective: string;
|
|
1006
|
+
/** HOW THE PROJECT RUNS. Absent means "standard": the leader dispatches worker sessions and
|
|
1007
|
+
* every delivery is checked by an independent reviewer session. "lightweight" is the small
|
|
1008
|
+
* project's shape: the leader session does the work itself, and a delivery is accepted on the
|
|
1009
|
+
* executor's own evidence. Every guardrail is the same in both modes. */
|
|
1010
|
+
mode?: ProjectMode;
|
|
993
1011
|
deliverables: string[];
|
|
994
1012
|
acceptanceCriteria: string[];
|
|
995
1013
|
constraints: string[];
|
|
@@ -1007,6 +1025,14 @@ export type Project = {
|
|
|
1007
1025
|
defaultExecutorProfile?: SessionProfile;
|
|
1008
1026
|
defaultReviewerProfile?: SessionProfile;
|
|
1009
1027
|
events?: ProjectEvent[];
|
|
1028
|
+
/**
|
|
1029
|
+
* The project's live sessions, with the tree skeleton attached.
|
|
1030
|
+
*
|
|
1031
|
+
* `parentConversationId` is what lets the client draw a TREE rather than a flat list: a
|
|
1032
|
+
* session whose parent is not in this collection is a ROOT of the tree (the project leader,
|
|
1033
|
+
* and any orphan left behind by an older layout). Without it the panel can only show a row
|
|
1034
|
+
* per session, and the hierarchy - who reported to whom - stays invisible.
|
|
1035
|
+
*/
|
|
1010
1036
|
resources?: {
|
|
1011
1037
|
tokens: number;
|
|
1012
1038
|
usageKnown: boolean;
|
|
@@ -1018,8 +1044,18 @@ export type Project = {
|
|
|
1018
1044
|
status: RunStatus;
|
|
1019
1045
|
tokens: number;
|
|
1020
1046
|
contextPercent?: number | null;
|
|
1047
|
+
parentConversationId?: string;
|
|
1021
1048
|
}[];
|
|
1022
1049
|
};
|
|
1050
|
+
/**
|
|
1051
|
+
* THE CAP THE ONE-CLICK PATH OFFERS, COMPUTED BY THE SERVER.
|
|
1052
|
+
*
|
|
1053
|
+
* It is `max(current cap + 1, spent tokens * 2)`, and it is a READ-ONLY projection: it is
|
|
1054
|
+
* never stored, so it can never disagree with the budget the project actually runs on. The
|
|
1055
|
+
* panel shows this number on the button instead of computing one of its own - a suggestion the
|
|
1056
|
+
* client invents is a suggestion the Boss cannot check.
|
|
1057
|
+
*/
|
|
1058
|
+
suggestedMaxTokens?: number;
|
|
1023
1059
|
tasks: ProjectTask[];
|
|
1024
1060
|
reports: ProjectReport[];
|
|
1025
1061
|
escalations: ProjectEscalation[];
|