@todoforai/cli 0.1.39 → 0.1.41

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.
@@ -43396,9 +43396,9 @@ var mimetypes_default = {
43396
43396
  image: { icon: "mdi:file-image", color: "yellow", prefixRule: "image/", needsObjectUrl: true },
43397
43397
  audio: { icon: "mdi:file-music", color: "grey", prefixRule: "audio/", needsObjectUrl: true },
43398
43398
  video: { icon: "mdi:file-video", color: "yellow", prefixRule: "video/", needsObjectUrl: true },
43399
- pdf: { icon: "mdi:pdf-box", color: "red", needsObjectUrl: true },
43400
- document: { icon: "mdi:file-word", color: "lightblue" },
43401
- spreadsheet: { icon: "mdi:file-excel", color: "green" },
43399
+ pdf: { icon: "vscode-icons:file-type-pdf2", color: "red", needsObjectUrl: true },
43400
+ document: { icon: "vscode-icons:file-type-word", color: "lightblue" },
43401
+ spreadsheet: { icon: "vscode-icons:file-type-excel", color: "green" },
43402
43402
  text: { icon: "mdi:file", color: "white", prefixRule: "text/" },
43403
43403
  archive: { icon: "mdi:folder-zip", color: "purple" },
43404
43404
  unknown: { icon: "mdi:file", color: "grey" },
@@ -43598,6 +43598,9 @@ var SERVER_TO_FRONTENDS = {
43598
43598
  device: {
43599
43599
  status: (userId) => `${"device:status" /* DEVICE_STATUS */}:${userId}`
43600
43600
  },
43601
+ notification: {
43602
+ changed: (userId) => `${"notification:changed" /* NOTIFICATION_CHANGED */}:${userId}`
43603
+ },
43601
43604
  agent: {
43602
43605
  status: (userId) => `${"agent:status" /* AGENT_STATUS */}:${userId}`,
43603
43606
  mcpList: () => `${"agent:mcp_list" /* AGENT_MCP_LIST */}:ALL`
@@ -44169,7 +44172,7 @@ var model_promos_default = {
44169
44172
  ],
44170
44173
  boost_remaining_price_factor: 0.5,
44171
44174
  promos: [
44172
- { family: "claude-fable-5", rate: 0.3, starts: "2026-06-29", ends: "2026-09-15", boostable: false },
44175
+ { family: "claude-fable-5", rate: 0.5, starts: "2026-06-29", ends: "2026-09-15", boostable: false },
44173
44176
  { family: "claude-opus-5", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
44174
44177
  { family: "claude-opus-4-[78]", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
44175
44178
  { family: "claude-sonnet-5", rate: 0.85, starts: "2026-06-29", ends: "2026-09-15" },
@@ -44232,6 +44235,10 @@ var TOPICS = {
44232
44235
  channel: (p) => SERVER_TO_FRONTENDS.device.status(p.userId),
44233
44236
  audience: "frontend"
44234
44237
  },
44238
+ ["notification:changed" /* NOTIFICATION_CHANGED */]: {
44239
+ channel: (p) => SERVER_TO_FRONTENDS.notification.changed(p.userId),
44240
+ audience: "frontend"
44241
+ },
44235
44242
  ["NOTIFY" /* NOTIFY */]: {
44236
44243
  channel: (p) => p.userId ? SERVER_TO_FRONTENDS.notify.user(p.userId) : SERVER_TO_FRONTENDS.todo.notify(p.todoId),
44237
44244
  audience: "frontend"
@@ -44326,7 +44333,7 @@ import { parseArgs } from "util";
44326
44333
  // package.json
44327
44334
  var package_default = {
44328
44335
  name: "@todoforai/cli",
44329
- version: "0.1.39",
44336
+ version: "0.1.41",
44330
44337
  type: "module",
44331
44338
  bin: {
44332
44339
  "todoforai-cli": "bin/todoforai-cli.js",
@@ -44386,7 +44393,7 @@ Usage:
44386
44393
  tfa-cli show <file|-> [todo-id] # Show a file in the chat (rendered by mimetype; - reads stdin)
44387
44394
  # [--title T] [--alias A] [--mime M] [--card <name>] [--link] [--json]
44388
44395
  # --link = compact chip (name+size+download) instead of inline render
44389
- # The file gets a stable public url: sites.todofor.ai/<site-id>
44396
+ # The file gets a stable public url: show.todofor.ai/<site-id>
44390
44397
  # (latest; /<site-id>/<attachment-id> = frozen version). --site <id>
44391
44398
  # pushes a new version to an existing url (from any todo).
44392
44399
  tfa-cli show rm <site-id> # Take a shown file down (all versions)
@@ -47429,6 +47436,13 @@ async function interactiveLoop(ws, api, todoId, projectId, agent, json, autoAppr
47429
47436
  }
47430
47437
  }
47431
47438
  }
47439
+ async function linkToSpawningBlock(api, todoId) {
47440
+ const { TODOFORAI_TODO_ID: pTodo, TODOFORAI_MESSAGE_ID: pMsg, TODOFORAI_BLOCK_ID: pBlock } = process.env;
47441
+ if (!pTodo || !pMsg || !pBlock || pTodo === todoId)
47442
+ return;
47443
+ await api.linkBlockSubTodo(pTodo, pMsg, pBlock, todoId).catch((e) => process.stderr.write(`${DIM}subtodo link failed: ${e?.message ?? e}${RESET}
47444
+ `));
47445
+ }
47432
47446
  async function main() {
47433
47447
  process.on("SIGINT", () => {
47434
47448
  process.stderr.write(`
@@ -47634,6 +47648,7 @@ Cancelled by user (Ctrl+C)
47634
47648
  const todo2 = await api.getTodo(todoId);
47635
47649
  const agent2 = todo2.agentSettings || await api.getAgentSettings(todo2.agentSettingsId);
47636
47650
  const msg = await api.addMessage(todo2.projectId, content2, agent2, todoId);
47651
+ await linkToSpawningBlock(api, todoId);
47637
47652
  if (args.json)
47638
47653
  console.log(JSON.stringify(msg, null, 2));
47639
47654
  else
@@ -48014,6 +48029,7 @@ Resumed: ${CYAN}${getFrontendUrl(apiUrl, todoId)}${RESET}
48014
48029
  if (followUp) {
48015
48030
  cfg.addToHistory(followUp);
48016
48031
  await api.addMessage(projectId2, followUp, agent2, todoId);
48032
+ await linkToSpawningBlock(api, todoId);
48017
48033
  await watchTodo(ws2, todoId, projectId2, { json: !!args.json, autoApprove, agentSettings: agent2 });
48018
48034
  }
48019
48035
  if (!args["non-interactive"]) {
@@ -48157,11 +48173,7 @@ Resumed: ${CYAN}${getFrontendUrl(apiUrl, todoId)}${RESET}
48157
48173
  }
48158
48174
  const actualTodoId = todo.id || crypto.randomUUID();
48159
48175
  cfgScope.setLastTodoId(actualTodoId);
48160
- const { TODOFORAI_TODO_ID: pTodo, TODOFORAI_MESSAGE_ID: pMsg, TODOFORAI_BLOCK_ID: pBlock } = process.env;
48161
- if (pTodo && pMsg && pBlock && pTodo !== actualTodoId) {
48162
- await api.linkBlockSubTodo(pTodo, pMsg, pBlock, actualTodoId).catch((e) => process.stderr.write(`${DIM}subtodo link failed: ${e?.message ?? e}${RESET}
48163
- `));
48164
- }
48176
+ await linkToSpawningBlock(api, actualTodoId);
48165
48177
  const frontendUrl = getFrontendUrl(apiUrl, actualTodoId);
48166
48178
  if (args.json) {
48167
48179
  console.log(JSON.stringify({ ...todo, frontend_url: frontendUrl }, null, 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todoforai/cli",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "todoforai-cli": "bin/todoforai-cli.js",