@evandu/super-pi 0.1.94 → 0.1.96

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.
@@ -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
- return { endpoint: env[TODO_ENDPOINT_ENV] ?? "", conversationId: env[TASK_CONVERSATION_ENV] ?? "", ...(token ? { token } : {}) };
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 response = await fetch(endpoint, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ conversationId, ...p }) });
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,4 +1,4 @@
1
1
  {
2
- "hash": "f5f0e5bd4b30c672953d130a9ea5baf57cddf21c25f22e979dd2fa6605098e72",
3
- "recordedAt": "2026-10-19T17:04:27.320Z"
2
+ "hash": "d5bf0aacedbcaaaa642bef9826a9fc9b450c20a3d6a1ed439a923e402bcfdcc6",
3
+ "recordedAt": "2026-10-19T18:56:44.286Z"
4
4
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "hash": "b0ae3242c027b3ebd26fbdfe2f9ebd3f606687a15faf5df4eaad006d3308c4f1",
2
+ "hash": "52344c642c85f957dcc3c5c78792355adb89a1d92a6e498ef3a4e2d941d2f4b7",
3
3
  "files": {
4
- "src/client/App.tsx": "0b7447b281075d7805e80ad60ef786f2baa57207544d7bdede4fe015b5be76b2",
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",
@@ -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-19T18:21:56.203Z"
27
+ "recordedAt": "2026-10-20T16:26:12.415Z"
28
28
  }