@evandu/super-pi 0.1.158 → 0.1.160
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/dist/client/.super-pi-client-sources.json +4 -4
- package/dist/client/assets/{CodeMirrorEditor-BB0GyCns.js → CodeMirrorEditor-DeH4azrn.js} +2 -2
- package/dist/client/assets/{dist-BT4A5Gts.js → dist-7jfYXjWH.js} +1 -1
- package/dist/client/assets/{dist-DIgk0yLa.js → dist-BeLF-5JB.js} +1 -1
- package/dist/client/assets/{dist-BZlYaGxq.js → dist-Bl20l56d.js} +1 -1
- package/dist/client/assets/{dist-DxoyfcUP.js → dist-BotfOUXo.js} +1 -1
- package/dist/client/assets/{dist-BJPYIQat.js → dist-Br9aGZZB.js} +1 -1
- package/dist/client/assets/{dist-BBvvLw1T.js → dist-C1FnggSV.js} +1 -1
- package/dist/client/assets/{dist-BDxBEqt3.js → dist-C1iGzBNB.js} +1 -1
- package/dist/client/assets/{dist-DuhZOzpj.js → dist-CA4ywFCU.js} +1 -1
- package/dist/client/assets/{dist-D8Zpt_js.js → dist-CBAhomD3.js} +1 -1
- package/dist/client/assets/{dist-BQjIO_bJ.js → dist-CNdHgilU.js} +1 -1
- package/dist/client/assets/{dist-BCZnYgeb.js → dist-CdG0dOlF.js} +1 -1
- package/dist/client/assets/{dist-BeCgVWwJ.js → dist-CgShg9H1.js} +1 -1
- package/dist/client/assets/{dist-D4twfstd.js → dist-ClXbSHKM.js} +1 -1
- package/dist/client/assets/{dist-rXWbM1pb.js → dist-CrIX2hon.js} +1 -1
- package/dist/client/assets/{dist-DndOTsBF.js → dist-CrwnaHWk.js} +1 -1
- package/dist/client/assets/{dist-DdCTaTc1.js → dist-CsDwtK1F.js} +1 -1
- package/dist/client/assets/{dist-BQK5OciP.js → dist-DWHnCS4H.js} +1 -1
- package/dist/client/assets/{dist-W281b4I1.js → dist-DefZp4Fa.js} +1 -1
- package/dist/client/assets/{dist-R_rLoe1G.js → dist-DjepRcJQ.js} +1 -1
- package/dist/client/assets/{dist-CH0-OHWZ.js → dist-Fa50HH8A.js} +1 -1
- package/dist/client/assets/{dist-DSE_w05B.js → dist-QI-T3k9i.js} +1 -1
- package/dist/client/assets/{dist-BZNEPjC8.js → dist-u0a7h80y.js} +1 -1
- package/dist/client/assets/{index-OdImWK16.css → index-CYvr3uNw.css} +1 -1
- package/dist/client/assets/index-D3XEFVty.js +102 -0
- package/dist/client/index.html +2 -2
- package/dist/server/application/project-service.js +15 -5
- package/dist/server/http-server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/index-C2caXFC3.js +0 -102
package/dist/client/index.html
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<link rel="alternate icon" href="/favicon.ico" />
|
|
9
9
|
<link rel="apple-touch-icon" href="/favicon.svg" />
|
|
10
10
|
<title>Super Pi</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-D3XEFVty.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CYvr3uNw.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
|
@@ -332,6 +332,12 @@ export class ProjectService {
|
|
|
332
332
|
const effective = p.defaultLeaderProfile;
|
|
333
333
|
p.ownerConversationId = (await this.orchestrator.spawn({
|
|
334
334
|
workspaceId,
|
|
335
|
+
// A PROJECT'S SESSIONS HANG UNDER THE CONVERSATION THAT CREATED IT. The leader session is
|
|
336
|
+
// spawned without a parent today, so it lands at the TOP of the session tree and drags the
|
|
337
|
+
// whole project subtree up with it. The initiator is the conversation that created the
|
|
338
|
+
// project, so it is where the project belongs in the tree. A project the Boss started from
|
|
339
|
+
// the panel has no initiator, and stays a root session exactly as before.
|
|
340
|
+
...(p.initiatorConversationId ? { parentConversationId: p.initiatorConversationId } : {}),
|
|
335
341
|
title: `项目负责人 · ${p.title}`,
|
|
336
342
|
task: p.objective,
|
|
337
343
|
initialPrompt: "",
|
|
@@ -825,13 +831,17 @@ export class ProjectService {
|
|
|
825
831
|
const conversation = this.store.conversation(actor);
|
|
826
832
|
if (!conversation)
|
|
827
833
|
throw new Error("找不到这个会话。");
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
//
|
|
831
|
-
//
|
|
832
|
-
//
|
|
834
|
+
// AND A SESSION THAT IS ALREADY IN A PROJECT MAY NOT OPEN ANOTHER ONE. This gate is checked
|
|
835
|
+
// FIRST, before the root-conversation gate, because it is the more precise of the two: the
|
|
836
|
+
// leader, its reviewers and its workers all live INSIDE a project, and "you are already in a
|
|
837
|
+
// project" is the reason that stops them. The leader is now spawned UNDER its initiator, so
|
|
838
|
+
// the root gate would catch it too - but it would blame the tree shape instead of the project
|
|
839
|
+
// membership, and the membership is the real reason. The set of sessions that may open a
|
|
840
|
+
// project is the same either way: a session is refused if it is in a project OR has a parent.
|
|
833
841
|
if (this.projectForSession(actor))
|
|
834
842
|
throw new Error("已经在项目里的会话不能另起项目:再开一个会绕开当前项目的预算与并发护栏。");
|
|
843
|
+
if (conversation.parentConversationId)
|
|
844
|
+
throw new Error("只有主对话可以创建项目:派发出来的会话不能另起项目,否则会绕过项目的预算与并发护栏。");
|
|
835
845
|
const running = this.store.projects().filter((p) => p.initiatorConversationId === actor && !closed(p));
|
|
836
846
|
if (running.length >= 3)
|
|
837
847
|
throw new Error("你同时进行的项目超过上限(3 个),先完成或停止一个再新建。");
|
|
@@ -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) {
|