@evandu/super-pi 0.1.32 → 0.1.34
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/README.md +4 -0
- package/agents/super-pi-task/index.ts +4 -0
- package/dist/client/assets/index-BhsIL1Qa.js +50 -0
- package/dist/client/assets/index-Da9PkxxS.css +1 -0
- package/dist/client/index.html +2 -2
- package/dist/extension.js +7 -2
- package/dist/server/active-memory.d.ts +15 -0
- package/dist/server/active-memory.js +36 -1
- package/dist/server/application/conversation-service.d.ts +39 -0
- package/dist/server/application/conversation-service.js +65 -4
- package/dist/server/application/extension-ui-service.js +16 -0
- package/dist/server/application/run-service.d.ts +21 -0
- package/dist/server/application/run-service.js +130 -19
- package/dist/server/command-handler.d.ts +14 -0
- package/dist/server/command-handler.js +22 -0
- package/dist/server/git.d.ts +37 -0
- package/dist/server/git.js +30 -0
- package/dist/server/http-server.js +126 -8
- package/dist/server/index.js +7 -2
- package/dist/server/memory.d.ts +27 -0
- package/dist/server/memory.js +56 -0
- package/dist/server/persistence/json-state-repository.d.ts +2 -0
- package/dist/server/persistence/json-state-repository.js +24 -5
- package/dist/server/runtime.d.ts +4 -1
- package/dist/server/runtime.js +51 -14
- package/dist/server/store.d.ts +6 -0
- package/dist/server/store.js +46 -3
- package/dist/server/terminal.js +20 -7
- package/dist/server/types.d.ts +36 -2
- package/dist/server/upload.js +8 -19
- package/dist/server/ws-server.js +89 -28
- package/package.json +5 -3
- package/dist/client/assets/index-BBfRhf7h.js +0 -50
- package/dist/client/assets/index-sZQBUBuS.css +0 -1
package/README.md
CHANGED
|
@@ -74,6 +74,10 @@ Super Pi includes Hermes-style active memory. It saves only durable information,
|
|
|
74
74
|
|
|
75
75
|
Open **Settings → 主动记忆** to inspect, edit, delete, or approve pending changes; the same panel controls the automatic review interval. Primary Agents can use `memory`, `skill_manage`, and `session_search`. Sub Agents can read relevant material but cannot write it.
|
|
76
76
|
|
|
77
|
+
### Composer references
|
|
78
|
+
|
|
79
|
+
Messages may include `@worktree:<name>` to attach the matching Git worktree path from the current workspace, or `@session:<id-or-title>` to attach the recent transcript of another session in the same workspace. These references are expanded into explicit context before the turn is sent to Pi, so an agent repairing a harness can inspect the session where it behaved poorly without switching away from the current session.
|
|
80
|
+
|
|
77
81
|
After the configured number of completed user turns (10 by default), Super Pi starts a separate, restricted review run. It can only use the three memory tools: it cannot read or modify project files, execute shell commands, or dispatch agents. New facts may be saved automatically; changing or deleting existing facts is staged for approval. A new message or stop cancels that conversation's review.
|
|
78
82
|
|
|
79
83
|
The feature is on by default. Set `SUPER_PI_MEMORY_ENABLED=0` to disable it, or set `SUPER_PI_MEMORY_REVIEW_INTERVAL=0` to keep manual memory while disabling automatic review. See [the design](docs/ACTIVE_MEMORY_DESIGN.md) for storage limits, lifecycle, and security boundaries.
|
|
@@ -45,6 +45,7 @@ const Parameters = Type.Object({
|
|
|
45
45
|
task_id: Type.Optional(Type.String({ description: "Resume a previous task when supported" })),
|
|
46
46
|
background: Type.Optional(Type.Boolean({ description: "Run asynchronously and deliver the result as a follow-up message" })),
|
|
47
47
|
});
|
|
48
|
+
const QuestionParameters = Type.Object({ question: Type.String(), options: Type.Array(Type.String(), { minItems: 1 }), multiple: Type.Optional(Type.Boolean()), extraNote: Type.Optional(Type.Boolean()) });
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* The `todowrite` parameter schema, OpenCode's `tool/todo.ts:6-8` in the TypeBox dialect this adapter
|
|
@@ -109,6 +110,7 @@ const WorkflowParameters = Type.Object({
|
|
|
109
110
|
type ExtensionApi = { registerTool(tool: ExtensionToolDefinition): void };
|
|
110
111
|
|
|
111
112
|
const extension = (pi: ExtensionApi): void => {
|
|
113
|
+
pi.registerTool({ name: "question", label: "Question", description: "Ask the user a blocking single or multiple choice question with an optional extra note.", parameters: QuestionParameters, execute: async (_id, raw) => { const endpoint = process.env.SUPER_PI_QUESTION_ENDPOINT; const conversationId = process.env.SUPER_PI_TASK_CONVERSATION; if (!endpoint || !conversationId) return { error: "Interactive question is unavailable" }; const p = raw as { question: string; options: string[]; multiple?: boolean; extraNote?: boolean }; const response = await fetch(endpoint, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ conversationId, ...p }) }); return await response.json(); } });
|
|
112
114
|
// Read ONCE at load, not per call: the environment cannot change under a running Pi, and `prepareLoadout`
|
|
113
115
|
// is synchronous - it cannot await a fetch for a roster - so the roster has to already be here.
|
|
114
116
|
const config = readTaskConfig(process.env);
|
|
@@ -147,6 +149,8 @@ const extension = (pi: ExtensionApi): void => {
|
|
|
147
149
|
await executeTask(params as TaskParams, context, config, { signal: signal ?? undefined }),
|
|
148
150
|
});
|
|
149
151
|
|
|
152
|
+
|
|
153
|
+
|
|
150
154
|
/**
|
|
151
155
|
* `todowrite`, registered SECOND and for one reason: order in the tool list is the order a model reads
|
|
152
156
|
* them in, and a plan is worth more in front of the eye than a dispatcher is. Nothing depends on the
|