@evandu/super-pi 0.1.93 → 0.1.95
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 +6 -5
- package/agents/super-pi-task/index.ts +2 -1
- package/dist/.super-pi-check-inputs.json +2 -2
- package/dist/client/.super-pi-client-sources.json +4 -4
- package/dist/client/assets/{index-mdc5jJ6R.css → index-8olCbCbk.css} +1 -1
- package/dist/client/assets/{index-CjTv3vNA.js → index-gjLqMWYT.js} +3 -3
- package/dist/client/index.html +2 -2
- package/dist/server/agents.d.ts +18 -0
- package/dist/server/agents.js +39 -0
- package/dist/server/application/run-service.d.ts +47 -3
- package/dist/server/application/run-service.js +158 -88
- package/dist/server/capability.d.ts +28 -12
- package/dist/server/capability.js +54 -20
- package/dist/server/http-server.js +14 -6
- package/dist/server/index.js +10 -1
- package/dist/server/pi-command.d.ts +29 -1
- package/dist/server/pi-command.js +58 -5
- package/dist/server/pi-session-events.d.ts +111 -0
- package/dist/server/pi-session-events.js +291 -0
- package/dist/server/pi-session-pool.d.ts +166 -0
- package/dist/server/pi-session-pool.js +262 -0
- package/dist/server/pi-session.d.ts +204 -0
- package/dist/server/pi-session.js +226 -0
- package/dist/server/runtime.d.ts +243 -29
- package/dist/server/runtime.js +634 -60
- package/dist/server/store.js +4 -4
- package/dist/server/ws-server.js +5 -4
- package/package.json +3 -1
|
@@ -515,12 +515,13 @@ Skip it:
|
|
|
515
515
|
|
|
516
516
|
When in doubt, use it.`;
|
|
517
517
|
|
|
518
|
-
export type TodoToolConfig = { endpoint: string; conversationId: string; token?: string };
|
|
518
|
+
export type TodoToolConfig = { endpoint: string; conversationId: string; token?: string; capability?: string };
|
|
519
519
|
|
|
520
520
|
/** What the extension learns from its own environment before it can write anything. */
|
|
521
|
-
export function readTodoConfig(env: Record<string, string | undefined>): TodoToolConfig {
|
|
522
|
-
const token = env.SUPER_PI_ACCESS_TOKEN;
|
|
523
|
-
|
|
521
|
+
export function readTodoConfig(env: Record<string, string | undefined>): TodoToolConfig {
|
|
522
|
+
const token = env.SUPER_PI_ACCESS_TOKEN;
|
|
523
|
+
const capability = env[TASK_CAPABILITY_ENV];
|
|
524
|
+
return { endpoint: env[TODO_ENDPOINT_ENV] ?? "", conversationId: env[TASK_CONVERSATION_ENV] ?? "", ...(token ? { token } : {}), ...(capability ? { capability } : {}) };
|
|
524
525
|
}
|
|
525
526
|
|
|
526
527
|
/**
|
|
@@ -635,7 +636,7 @@ export async function executeTodo(
|
|
|
635
636
|
// The CONVERSATION is named so the server can attribute the write, never a directory: the same
|
|
636
637
|
// boundary `executeTask` keeps, and for the same reason - a model that could name its own cwd could
|
|
637
638
|
// write outside the workspace this app exists to keep it inside.
|
|
638
|
-
body: JSON.stringify({ conversationId: config.conversationId, todos: params.todos }),
|
|
639
|
+
body: JSON.stringify({ conversationId: config.conversationId, todos: params.todos, capability: config.capability }),
|
|
639
640
|
...(deps.signal ? { signal: deps.signal } : {}),
|
|
640
641
|
});
|
|
641
642
|
} catch (error) {
|
|
@@ -137,7 +137,8 @@ const extension = (pi: ExtensionApi): void => {
|
|
|
137
137
|
const text = (body: string, isError?: boolean): TaskToolResult => ({ content: [{ type: "text", text: body }], details: undefined, ...(isError ? { isError: true } : {}) });
|
|
138
138
|
if (!endpoint || !conversationId) return text("This run cannot ask the user anything: the question endpoint is not available.", true);
|
|
139
139
|
const p = raw as { question: string; options: string[]; multiple?: boolean; extraNote?: boolean };
|
|
140
|
-
const
|
|
140
|
+
const capability = process.env.SUPER_PI_TASK_CAPABILITY;
|
|
141
|
+
const response = await fetch(endpoint, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ conversationId, ...p, capability }) });
|
|
141
142
|
const payload = await response.json() as { error?: string; answers?: { id: string; selected: string[]; note?: string }[]; summary?: string };
|
|
142
143
|
if (!response.ok || payload?.error) return text(payload?.error ?? `The question could not be delivered (HTTP ${response.status}).`, true);
|
|
143
144
|
// READABLE, NOT JUST PRESENT. The bare `{answers:[{id, selected}]}` carries a UUID and an array, and
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "52344c642c85f957dcc3c5c78792355adb89a1d92a6e498ef3a4e2d941d2f4b7",
|
|
3
3
|
"files": {
|
|
4
|
-
"src/client/App.tsx": "
|
|
4
|
+
"src/client/App.tsx": "b396664c50a618369a4d149025b7917932b549eb8178abffb382b891c6bc939f",
|
|
5
5
|
"src/client/FilesPanel.tsx": "17c3e7ef10914a8836c209bc47a51ad06d73025feb755ee8f68bba8f79ce6d16",
|
|
6
6
|
"src/client/GitPanel.tsx": "c44f3c73936af73f436ec6a8cd9ee50f5367dd6887f881fa133ec101fb99bbac",
|
|
7
7
|
"src/client/HelpWindow.tsx": "6bc90fd5dc0783b16a07b75be64cc70df21991c1f16ea1fcd894f815e7b403f1",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"src/client/main.tsx": "d6325cec79ebc225e4972c33ad9b4266fa1eab5f962fec36ed4c539124a8fcab",
|
|
17
17
|
"src/client/markdown.ts": "1499893ea5ce29d49f26c193cc0e6001ffa8a31d039ccee343ba407cd2cdbf1b",
|
|
18
18
|
"src/client/slash-commands.ts": "a202263497e3ca023e40f3462e04f858cfbddb5ed19a40d188bd5363f3762621",
|
|
19
|
-
"src/client/styles.css": "
|
|
19
|
+
"src/client/styles.css": "647b4a2bb0c738efd2786ea3ddf437a84e545aa14c64ef9510ade21b41fc3949",
|
|
20
20
|
"src/client/terminal-emulator.ts": "ffcc4f5fbddaf25cebcc9e03dbe5d7d0ad2c21586f5d169e57c04c82e2308b3b",
|
|
21
21
|
"src/client/theme.tsx": "53b38558c022a621b8856348f8ce3858d50c4c4be72c2ec8af5afb86a8a035a3",
|
|
22
22
|
"src/client/tool-sharing.ts": "679c97f6d40be466964f2f1076aa7ea55f4a585c3deff8214675070220921059",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"src/client/types.ts": "6487df00c164370550b5977f9b23b17e22aff4bfb59dfe1e52200042340e3769",
|
|
25
25
|
"src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5"
|
|
26
26
|
},
|
|
27
|
-
"recordedAt": "2026-10-
|
|
27
|
+
"recordedAt": "2026-10-20T13:28:21.946Z"
|
|
28
28
|
}
|