@todoforai/cli 0.1.68 → 0.1.70

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.
@@ -43132,6 +43132,18 @@ class ApiClient {
43132
43132
  throw new Error(`API POST /resources/open failed: ${res.status} ${await res.text()}`);
43133
43133
  return res.json();
43134
43134
  }
43135
+ async showConnect(todoId, keys, opts = {}) {
43136
+ const endpoint = `${this.apiUrl}${restBasePath(this.apiKey)}/resources/connect`;
43137
+ const res = await fetch(endpoint, {
43138
+ method: "POST",
43139
+ headers: { "x-api-key": this.apiKey, "Content-Type": "application/json" },
43140
+ body: JSON.stringify({ todoId, keys, ...opts }),
43141
+ signal: AbortSignal.timeout(30000)
43142
+ });
43143
+ if (!res.ok)
43144
+ throw new Error(`API POST /resources/connect failed: ${res.status} ${await res.text()}`);
43145
+ return res.json();
43146
+ }
43135
43147
  async listShows(opts = {}) {
43136
43148
  const qs = new URLSearchParams;
43137
43149
  if (opts.todoId)
@@ -43976,8 +43988,7 @@ var ToolType;
43976
43988
  ToolType2["Question"] = "question";
43977
43989
  ToolType2["Login"] = "login_prompt";
43978
43990
  ToolType2["BusinessOnboarding"] = "business_onboarding";
43979
- ToolType2["RequestMcpAccess"] = "request_mcp_access";
43980
- ToolType2["EdgeNotRunning"] = "edge_not_running";
43991
+ ToolType2["ConnectDevice"] = "connect_device";
43981
43992
  ToolType2["WebFetch"] = "webfetch";
43982
43993
  ToolType2["GoogleSearch"] = "google_search";
43983
43994
  ToolType2["WebSearch"] = "web_search";
@@ -43998,7 +44009,8 @@ var USER_INPUT_BLOCK_TYPES = new Set([
43998
44009
  "question" /* Question */,
43999
44010
  "login_prompt" /* Login */,
44000
44011
  "business_onboarding" /* BusinessOnboarding */,
44001
- "open_browser" /* OpenBrowser */
44012
+ "open_browser" /* OpenBrowser */,
44013
+ "connect_device" /* ConnectDevice */
44002
44014
  ]);
44003
44015
  var EDGE_TOOL_TYPES = new Set([
44004
44016
  "read" /* Read */,
@@ -44711,6 +44723,7 @@ var tool_catalog_default = {
44711
44723
  voiceChannel: "Gmail",
44712
44724
  summary: "Read and send Gmail from your own account.",
44713
44725
  statusCmd: "zele whoami 2>/dev/null | grep -o 'email: *[^ ]*' | tr -d ' ' | paste -sd ' ' - | grep -m1 .",
44726
+ logoutCmd: "zele logout {{ACCOUNT}}",
44714
44727
  loginNeedsPty: true,
44715
44728
  loginCmd: "zele login --method google",
44716
44729
  oauthUrlPattern: "(https://accounts\\.google\\.com\\S+)",
@@ -44722,6 +44735,7 @@ var tool_catalog_default = {
44722
44735
  description: "Gmail (multi-account, OAuth login): inbox, search, send, reply, contacts. Google Calendar via `zele cal`: list/create/update/delete events (Meet links, recurrence), respond to invites, free/busy."
44723
44736
  },
44724
44737
  "zele-calendar": {
44738
+ subcommands: ["cal"],
44725
44739
  preinstallCloud: true,
44726
44740
  category: "productivity",
44727
44741
  pkg: "zele",
@@ -44730,6 +44744,7 @@ var tool_catalog_default = {
44730
44744
  label: "Google Calendar",
44731
44745
  summary: "See your Google Calendar and book, move or cancel events.",
44732
44746
  statusCmd: "zele whoami 2>/dev/null | grep -o 'email: *[^ ]*' | tr -d ' ' | paste -sd ' ' - | grep -m1 .",
44747
+ logoutCmd: "zele logout {{ACCOUNT}}",
44733
44748
  loginNeedsPty: true,
44734
44749
  loginCmd: "zele login --method google",
44735
44750
  oauthUrlPattern: "(https://accounts\\.google\\.com\\S+)",
@@ -44940,6 +44955,24 @@ var tool_catalog_default = {
44940
44955
  versionCmd: "ntn --version 2>/dev/null | sed -n 1p",
44941
44956
  description: "Official Notion CLI: raw API calls (`ntn api <path>`), page/data-source management, file uploads, Workers deploy."
44942
44957
  },
44958
+ treg: {
44959
+ preinstallCloud: true,
44960
+ packages: ["tools-registry==0.27.0"],
44961
+ category: "research",
44962
+ pkg: "tools-registry",
44963
+ pipModules: ["treg"],
44964
+ installer: "pip",
44965
+ label: "treg",
44966
+ summary: "Call 4000+ paid data/SEO/enrichment APIs through one prepaid key, no vendor accounts.",
44967
+ statusCmd: `python3 -c "import json,os;d=json.load(open(os.path.expanduser('~/.treg/config.json')));print(d.get('email') or '' if d.get('token') else '')" 2>/dev/null | grep -m1 .`,
44968
+ loginCmd: "treg login",
44969
+ oauthUrlPattern: "(https://treg\\.to/login\\?\\S+)",
44970
+ sessionIdPattern: "#code=([A-Z0-9]{4,8})",
44971
+ logoutCmd: "treg logout",
44972
+ credentialPaths: ["~/.treg/config.json"],
44973
+ versionCmd: "treg --version 2>/dev/null | sed -n 1p",
44974
+ description: 'treg.to ("OpenRouter for agent tools"): one prepaid balance, 100+ providers (SE Ranking, DataForSEO, Perplexity, CompanyEnrich, ScrapeCreators, TikHub, cloro AI-search scrapes…) metered per call, credentials injected server-side. Find by intent: `treg catalog search "backlinks for a domain" --json` (each result shows price + a `call_template`); run: `treg call <endpoint.id> --query k=v --json` or `treg call <endpoint.id> --method POST --data \'<json>\' --json` (prints one `{result,_treg}` line); money: `treg balance`, `treg topup`; `treg review` rates a call. Own keys/CLIs: `treg secret|tool|skill`, `treg cli run <vendor> …` and `treg <cmd>` inject the team\'s stored credentials. Team: `treg org ls|use|invite|members`, `treg audit`. `--org <slug>` targets another team. Every catalog call spends real money — check the `cost` field and prefer a connected first-party connector when one exists. Docs: https://treg.to/llms.txt'
44975
+ },
44943
44976
  "perplexity-api": {
44944
44977
  preinstallCloud: true,
44945
44978
  category: "research",
@@ -45201,7 +45234,7 @@ var tool_catalog_default = {
45201
45234
  installer: "npm",
45202
45235
  label: "TODOforAI",
45203
45236
  summary: "Create and follow up on your TODOs, and show results in the chat.",
45204
- description: 'Manage the user\'s OWN TODOforAI tasks (not code `// TODO` comments). Delegate/spin off work: `tfa-cli "prompt"` creates a real TODO with its own agent and chat (`-n` wait for completion, `--no-watch` fire-and-forget, `--project/--agent/--model`, `--resume <id>`, `addmessage <id> "text"`). Inspect: `list [--status open]`, `--inspect <id>`. Edit any todo without opening it: `status <id> DONE|READY|ARCHIVED|POSTPONED|CANCELLED|DELETED` (close, reopen, shelve, trash — `todo restore <id>` undoes a delete) and `todo set <id|-> title=… group=… star=true schedule=<unix-ms> agent=… brand=…` (own todo fields). Both take ONE id, so a loop over `list --json | jq -r \'.items[].id\'` is how you close, retitle, refile or archive MANY todos at once; `project set|settings|groups …` (name, settings, todo groups), `agent create|update <agent> model=… sysmsg=…` (permissions/MCP/device wiring and delete are refused from an agent shell). Surface results into chat: `show <file|-> [todo-id]` (renders by mimetype, private to the todo\'s readers; `--card <name>` via project renderer; `--alias <name>` updates in place, `--alias <todoId>:<name>` updates another todo\'s artifact; `show share <ref>` makes it public and prints the link, `show unshare <ref>` makes it private again), `open <url>` embeds a live preview. Show viewer chrome: `--title` appears in the header; a kebab menu holds file actions, versions and sharing when available. Desktop floating previews add minimize (park in a tab), maximize/restore and close (X); inline blocks have no window controls. For authored HTML, do not duplicate the header/controls or add a rounded, bordered root card: the floating viewer owns the rounded frame. Keep content edge-to-edge; internal layout padding is fine. Pick by where the output lives: read once → plain reply; interactive, this chat only → `html_snippet`; kept/revised later → `show --alias`, then `show share` only if someone outside needs a link; format the user asked for (pptx, docx…) → `show` the file. Notifications: `inbox [needs-you|messages|activity] [--unread]` reads the user\'s bell feed (what finished/failed/needs them while away), `inbox seen [tab]` marks it read; `notify "Title" "message" [--href /t/<id>]` leaves a note in the user\'s Messages tab + phone push (shown as from you); `--to <email>` reaches a member of the current project instead (`project members` lists them, 20/day) — nobody else; same text is delivered once, max 10/day to the user, use for things they must see later (not chat replies). This is the ONLY way to display a local file (image, pdf, html) in the chat: markdown `![](path.png)` with a local/relative path does NOT resolve to workspace files or attachments and 404s in the browser. `--template` for registry workflows. Project files: `memory sync|path [--project <id>]` requires a project and checks out only projects/<id>/{memory,context} and projects/<id>/me/{memory,context}; legacy global files are read-only recovery. Voice commands use `--scope mine|project` (default mine, private within this project; project is shared).',
45237
+ description: 'Manage the user\'s OWN TODOforAI tasks (not code `// TODO` comments). Delegate/spin off work: `tfa-cli "prompt"` creates a real TODO with its own agent and chat (`-n` wait for completion, `--no-watch` fire-and-forget, `--project/--agent/--model`, `--resume <id>`, `addmessage <id> "text"`). Inspect: `list [--status open]`, `--inspect <id>`. Edit any todo without opening it: `status <id> DONE|READY|ARCHIVED|POSTPONED|CANCELLED|DELETED` (close, reopen, shelve, trash — `todo restore <id>` undoes a delete) and `todo set <id|-> title=… group=… star=true schedule=<unix-ms> agent=… brand=…` (own todo fields). Both take ONE id, so a loop over `list --json | jq -r \'.items[].id\'` is how you close, retitle, refile or archive MANY todos at once; `project set|settings|groups …` (name, settings, todo groups), `agent create|update <agent> model=… sysmsg=…` (permissions/MCP/device wiring and delete are refused from an agent shell). Surface results into chat: `show <file|-> [todo-id]` (renders by mimetype, private to the todo\'s readers; `--card <name>` via project renderer; `--alias <name>` updates in place, `--alias <todoId>:<name>` updates another todo\'s artifact; `show share <ref>` makes it public and prints the link, `show unshare <ref>` makes it private again), `open <url>` embeds a live preview. Show viewer chrome: `--title` appears in the header; a kebab menu holds file actions, versions and sharing when available. Desktop floating previews add minimize (park in a tab), maximize/restore and close (X); inline blocks have no window controls. For authored HTML, do not duplicate the header/controls or add a rounded, bordered root card: the floating viewer owns the rounded frame. Keep content edge-to-edge; internal layout padding is fine. Pick by where the output lives: read once → plain reply; interactive, this chat only → `html_snippet`; kept/revised later → `show --alias`, then `show share` only if someone outside needs a link; format the user asked for (pptx, docx…) → `show` the file. Notifications: `inbox [needs-you|messages|activity] [--unread]` reads the user\'s bell feed (what finished/failed/needs them while away), `inbox seen [tab]` marks it read; `notify "Title" "message" [--href /t/<id>] [--url <link>: tap opens it on the phone, e.g. a Google Maps navigation link]` leaves a note in the user\'s Messages tab + phone push (shown as from you); `--to <email>` reaches a member of the current project instead (`project members` lists them, 20/day) — nobody else; same text is delivered once, max 10/day to the user, use for things they must see later (not chat replies). This is the ONLY way to display a local file (image, pdf, html) in the chat: markdown `![](path.png)` with a local/relative path does NOT resolve to workspace files or attachments and 404s in the browser. `--template` for registry workflows. Project files: `memory sync|path [--project <id>]` requires a project and checks out only projects/<id>/{memory,context} and projects/<id>/me/{memory,context}; legacy global files are read-only recovery. Voice commands use `--scope mine|project` (default mine, private within this project; project is shared).',
45205
45238
  installCmd: "npm install -g @todoforai/cli",
45206
45239
  versionCmd: "tfa-cli --version 2>/dev/null | sed -n 1p",
45207
45240
  preinstallCloud: true,
@@ -45253,57 +45286,111 @@ var tool_catalog_default = {
45253
45286
  installer: "binary",
45254
45287
  preinstallCloud: true,
45255
45288
  binary: {
45256
- "linux-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.7/rclone-linux-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45257
- "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.7/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45258
- "darwin-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.7/rclone-darwin-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45259
- "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.7/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45260
- "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.7/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45289
+ "linux-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45290
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45291
+ "darwin-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45292
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45293
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45261
45294
  },
45295
+ internal: true,
45262
45296
  label: "Cloud Storage",
45263
- summary: "Move files between Google Drive, Dropbox, OneDrive, S3 and more.",
45264
- statusCmd: "rclone listremotes --long 2>/dev/null | tr -s ' ' | grep -v ' todoforai *$' | grep -m20 .",
45265
- loginCmd: "rclone config",
45266
- loginTerminalHint: "Connect a storage from its own tile (Google Drive, OneDrive, Dropbox…). For other backends run `rclone config` in a terminal on this host.",
45267
- oauthUrlPattern: "(https?://127\\.0\\.0\\.1:\\d+/auth\\?\\S+)",
45268
- oauthCallbackPort: 53682,
45297
+ summary: "The rclone program behind the Google Drive, OneDrive, Dropbox and S3 connectors.",
45269
45298
  credentialPaths: ["~/.config/rclone/rclone.conf"],
45270
- subProviders: {
45271
- gdrive: {
45272
- label: "Google Drive",
45273
- authType: "oauth",
45274
- connectCmd: "rclone config create {{REMOTE}} drive",
45275
- remoteName: "gdrive",
45276
- rcloneType: "drive",
45277
- userInfoCmd: `TOKEN=$(rclone config dump 2>/dev/null | python3 -c "import json,sys; print(json.loads(json.load(sys.stdin)['{{REMOTE}}']['token'])['access_token'])") && curl -sf 'https://www.googleapis.com/drive/v3/about?fields=user' -H "Authorization: Bearer $TOKEN" | python3 -c "import json,sys; print(json.load(sys.stdin)['user']['emailAddress'])" 2>/dev/null`
45278
- },
45279
- onedrive: {
45280
- label: "OneDrive",
45281
- authType: "oauth",
45282
- connectCmd: "rclone config create {{REMOTE}} onedrive",
45283
- remoteName: "onedrive",
45284
- rcloneType: "onedrive",
45285
- userInfoCmd: `TOKEN=$(rclone config dump 2>/dev/null | python3 -c "import json,sys; print(json.loads(json.load(sys.stdin)['{{REMOTE}}']['token'])['access_token'])") && curl -sf 'https://graph.microsoft.com/v1.0/me' -H "Authorization: Bearer $TOKEN" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('mail') or d.get('userPrincipalName',''))" 2>/dev/null`
45286
- },
45287
- dropbox: {
45288
- label: "Dropbox",
45289
- authType: "oauth",
45290
- connectCmd: "rclone config create {{REMOTE}} dropbox",
45291
- remoteName: "dropbox",
45292
- rcloneType: "dropbox",
45293
- userInfoCmd: `TOKEN=$(rclone config dump 2>/dev/null | python3 -c "import json,sys; print(json.loads(json.load(sys.stdin)['{{REMOTE}}']['token'])['access_token'])") && curl -sf -X POST 'https://api.dropboxapi.com/2/users/get_current_account' -H "Authorization: Bearer $TOKEN" | python3 -c "import json,sys; print(json.load(sys.stdin)['email'])" 2>/dev/null`
45294
- },
45295
- s3: {
45296
- label: "Amazon S3",
45297
- authType: "credentials",
45298
- connectCmd: "rclone config create {{REMOTE}} s3",
45299
- remoteName: "s3",
45300
- rcloneType: "s3"
45301
- }
45302
- },
45303
45299
  versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45304
45300
  preinstallJarvis: true,
45305
45301
  description: "Access Google Drive, OneDrive, Dropbox, S3, and 40+ cloud providers. List, copy, sync, move, and mount files; use `rclone config create <name> <provider>` to connect."
45306
45302
  },
45303
+ gdrive: {
45304
+ category: "cloud",
45305
+ pkg: "rclone",
45306
+ installer: "binary",
45307
+ binName: "rclone",
45308
+ binary: {
45309
+ "linux-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45310
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45311
+ "darwin-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45312
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45313
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45314
+ },
45315
+ label: "Google Drive",
45316
+ summary: "Browse, read and write files in your Google Drive.",
45317
+ rcloneType: "drive",
45318
+ statusCmd: `rclone listremotes --long 2>/dev/null | while read -r n t d; do [ "$t" = drive ] && { case "$d" in ""|*[[:space:]]*) a=\${n%:};; *) a=$d;; esac; echo "$a"; }; done | paste -sd ' ' - | grep -m1 .`,
45319
+ loginCmd: "rclone config",
45320
+ oauthBroker: true,
45321
+ logoutCmd: 'x={{ACCOUNT}}; rclone listremotes --long 2>/dev/null | while read -r n t d; do [ "$t" = drive ] || continue; case "$d" in ""|*[[:space:]]*) a=${n%:};; *) a=$d;; esac; [ -z "$x" ] || [ "$a" = "$x" ] && rclone config delete "${n%:}"; done; true',
45322
+ credentialPaths: ["~/.config/rclone/rclone.conf"],
45323
+ versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45324
+ description: "Google Drive connector. Uses the rclone CLI: `rclone listremotes --long` lists every connected storage as `name: type account`; `rclone lsf <remote>:<path>`, `rclone copy|sync|move <src> <dst>`, `rclone cat`, `rclone mkdir`, `rclone deletefile` work on any of them (Google Drive = type drive, OneDrive = onedrive, Dropbox = dropbox, S3 = s3). Never run `rclone config` interactively; connect new accounts with `todo.connect('<key>')`."
45325
+ },
45326
+ onedrive: {
45327
+ category: "cloud",
45328
+ pkg: "rclone",
45329
+ installer: "binary",
45330
+ binName: "rclone",
45331
+ binary: {
45332
+ "linux-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45333
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45334
+ "darwin-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45335
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45336
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45337
+ },
45338
+ label: "OneDrive",
45339
+ summary: "Browse, read and write files in your OneDrive.",
45340
+ rcloneType: "onedrive",
45341
+ statusCmd: `rclone listremotes --long 2>/dev/null | while read -r n t d; do [ "$t" = onedrive ] && { case "$d" in ""|*[[:space:]]*) a=\${n%:};; *) a=$d;; esac; echo "$a"; }; done | paste -sd ' ' - | grep -m1 .`,
45342
+ loginCmd: "rclone config",
45343
+ oauthBroker: true,
45344
+ logoutCmd: 'x={{ACCOUNT}}; rclone listremotes --long 2>/dev/null | while read -r n t d; do [ "$t" = onedrive ] || continue; case "$d" in ""|*[[:space:]]*) a=${n%:};; *) a=$d;; esac; [ -z "$x" ] || [ "$a" = "$x" ] && rclone config delete "${n%:}"; done; true',
45345
+ credentialPaths: ["~/.config/rclone/rclone.conf"],
45346
+ versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45347
+ description: "OneDrive connector. Uses the rclone CLI: `rclone listremotes --long` lists every connected storage as `name: type account`; `rclone lsf <remote>:<path>`, `rclone copy|sync|move <src> <dst>`, `rclone cat`, `rclone mkdir`, `rclone deletefile` work on any of them (Google Drive = type drive, OneDrive = onedrive, Dropbox = dropbox, S3 = s3). Never run `rclone config` interactively; connect new accounts with `todo.connect('<key>')`."
45348
+ },
45349
+ dropbox: {
45350
+ category: "cloud",
45351
+ pkg: "rclone",
45352
+ installer: "binary",
45353
+ binName: "rclone",
45354
+ binary: {
45355
+ "linux-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45356
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45357
+ "darwin-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45358
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45359
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45360
+ },
45361
+ label: "Dropbox",
45362
+ summary: "Browse, read and write files in your Dropbox.",
45363
+ rcloneType: "dropbox",
45364
+ statusCmd: `rclone listremotes --long 2>/dev/null | while read -r n t d; do [ "$t" = dropbox ] && { case "$d" in ""|*[[:space:]]*) a=\${n%:};; *) a=$d;; esac; echo "$a"; }; done | paste -sd ' ' - | grep -m1 .`,
45365
+ loginCmd: "rclone config",
45366
+ oauthBroker: true,
45367
+ logoutCmd: 'x={{ACCOUNT}}; rclone listremotes --long 2>/dev/null | while read -r n t d; do [ "$t" = dropbox ] || continue; case "$d" in ""|*[[:space:]]*) a=${n%:};; *) a=$d;; esac; [ -z "$x" ] || [ "$a" = "$x" ] && rclone config delete "${n%:}"; done; true',
45368
+ credentialPaths: ["~/.config/rclone/rclone.conf"],
45369
+ versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45370
+ description: "Dropbox connector. Uses the rclone CLI: `rclone listremotes --long` lists every connected storage as `name: type account`; `rclone lsf <remote>:<path>`, `rclone copy|sync|move <src> <dst>`, `rclone cat`, `rclone mkdir`, `rclone deletefile` work on any of them (Google Drive = type drive, OneDrive = onedrive, Dropbox = dropbox, S3 = s3). Never run `rclone config` interactively; connect new accounts with `todo.connect('<key>')`."
45371
+ },
45372
+ s3: {
45373
+ category: "cloud",
45374
+ pkg: "rclone",
45375
+ installer: "binary",
45376
+ binName: "rclone",
45377
+ binary: {
45378
+ "linux-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45379
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45380
+ "darwin-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45381
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45382
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45383
+ },
45384
+ label: "Amazon S3",
45385
+ summary: "Browse, read and write files in your Amazon S3 buckets.",
45386
+ rcloneType: "s3",
45387
+ statusCmd: `rclone listremotes --long 2>/dev/null | while read -r n t d; do [ "$t" = s3 ] && { case "$d" in ""|*[[:space:]]*) a=\${n%:};; *) a=$d;; esac; echo "$a"; }; done | paste -sd ' ' - | grep -m1 .`,
45388
+ loginCmd: `k=<access_key_id> s=<secret_access_key> r=<region>; RCLONE_S3_PROVIDER=AWS RCLONE_S3_ENV_AUTH=false RCLONE_S3_ACCESS_KEY_ID="$k" RCLONE_S3_SECRET_ACCESS_KEY="$s" RCLONE_S3_REGION="$r" rclone lsd :s3: --config /dev/null --ask-password=false --contimeout 10s --timeout 15s --retries 1 --low-level-retries 1 >/dev/null 2>&1 || { echo 'S3 access check failed: check the keys, the region and the s3:ListAllMyBuckets permission.'; exit 2; }; rclone config create --non-interactive --ask-password=false "s3_$(date +%s)" s3 provider AWS env_auth false access_key_id "$k" secret_access_key "$s" region "$r" >/dev/null && echo 'S3 connected.'`,
45389
+ logoutCmd: 'x={{ACCOUNT}}; rclone listremotes --long 2>/dev/null | while read -r n t d; do [ "$t" = s3 ] || continue; case "$d" in ""|*[[:space:]]*) a=${n%:};; *) a=$d;; esac; [ -z "$x" ] || [ "$a" = "$x" ] && rclone config delete "${n%:}"; done; true',
45390
+ credentialPaths: ["~/.config/rclone/rclone.conf"],
45391
+ versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45392
+ description: "Amazon S3 connector. Uses the rclone CLI: `rclone listremotes --long` lists every connected storage as `name: type account`; `rclone lsf <remote>:<path>`, `rclone copy|sync|move <src> <dst>`, `rclone cat`, `rclone mkdir`, `rclone deletefile` work on any of them (Google Drive = type drive, OneDrive = onedrive, Dropbox = dropbox, S3 = s3). Never run `rclone config` interactively; connect new accounts with `todo.connect('<key>')`."
45393
+ },
45307
45394
  aws: {
45308
45395
  preinstallCloud: true,
45309
45396
  cloudInstallCmd: "curl -fsSL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o /tmp/awscli.zip && unzip -qo /tmp/awscli.zip -d /tmp && /tmp/aws/install --update && rm -rf /tmp/aws /tmp/awscli.zip",
@@ -45330,6 +45417,7 @@ var tool_catalog_default = {
45330
45417
  needsPython: true,
45331
45418
  installCmd: `case "$(uname -s)-$(uname -m)" in Darwin-arm64) p=darwin-arm;; Darwin-*) p=darwin-x86_64;; Linux-aarch64|Linux-arm64) p=linux-arm;; *) p=linux-x86_64;; esac && tmp="$HOME/.gcloud-new.$$" && rm -rf "$tmp" && mkdir -p "$tmp" && curl -fsSL "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-$p.tar.gz" | tar -xzC "$tmp" && rm -rf "$HOME/google-cloud-sdk" && mv "$tmp/google-cloud-sdk" "$HOME/google-cloud-sdk" && rm -rf "$tmp" && mkdir -p "$HOME/.todoforai/tools/bin" && rm -f "$HOME/.todoforai/tools/bin/gcloud" && printf '#!/bin/sh\\nCLOUDSDK_PYTHON="\${CLOUDSDK_PYTHON:-%s}" exec "$HOME/google-cloud-sdk/bin/gcloud" "$@"\\n' "$py" > "$HOME/.todoforai/tools/bin/gcloud" && chmod +x "$HOME/.todoforai/tools/bin/gcloud"`,
45332
45419
  statusCmd: `gcloud auth list --filter=status:ACTIVE --format="value(account)" 2>/dev/null | tr -d '\\r' | grep -m1 .`,
45420
+ logoutCmd: "gcloud auth revoke --all --quiet",
45333
45421
  loginCmd: "gcloud auth login --no-launch-browser",
45334
45422
  loginNeedsPty: true,
45335
45423
  stdinPaste: true,
@@ -45435,7 +45523,7 @@ var tool_catalog_default = {
45435
45523
  preinstallCloud: true,
45436
45524
  label: "Browser",
45437
45525
  summary: "Browse websites automatically: click, type, read and screenshot.",
45438
- description: "Browser automation over CDP (`open`/`snapshot`/`click`/`type`/`fill`/`read`/`screenshot`/`eval`). `connect '<url>'` to a listed live browser (prefer the user's real Chrome), verify with `snapshot`; if empty, `close` (own session only) and reconnect once. NEVER `close --all`. Shared browser: `tab new` for your own tab, `tab <id>` before each command. No URL listed: cloud → browser-manager-cli; PC with display → Chrome `--remote-debugging-port=9222`, attach `--cdp 9222`. Never `sleep`: `open` returns after load, but `click`/`fill` fail at once if the element isn't there yet — `wait '<sel>'`, `wait --text 'Done'`, `wait --url '**/dash'`, `wait --load networkidle` or `wait '#spinner' --state hidden` first. Extension browsers (WEB_EXTENSION) only: try sign-in with credentials from `tfa-vault`; request human help only for a step you cannot complete yourself (MFA/CAPTCHA/consent). Use Node/Bun WebSocket on the listed CDP URL; `Target.getTargets` or `device_list` gives `tab-N`, whose N is the numeric tabId. On the SAME socket send `{id: 1, method: 'TodoforAI.requestHumanHelp', params: {tabId: N, message: 'what to do'}}` (message 1–500 chars). This focuses and pauses the tab, sets its yellow `?` badge, and shows needs-you in the extension popup. Tell the user to click Resume control and reply here, then end your turn; Resume does not wake the agent. Afterwards reconnect and snapshot fresh. `TodoforAI.humanHelpStatus` with `{tabId}` remains available while paused. If bootstrap fails on a restricted target, direct CDP `Target.createTarget` with an ordinary URL opens your tab on the SAME socket; pass numeric N from returned `tab-N` as `tabId`.",
45526
+ description: "Browser automation over CDP (`open`/`snapshot`/`click`/`type`/`fill`/`read`/`screenshot`/`eval`). `connect '<url>'` to a listed live browser (prefer the user's real Chrome); connect prints `whoami` (browser=extension|embedded|local, headless, ua) — run `agent-browser whoami` again after any error or odd output, and stop on `ERROR`/`DISCONNECTED`/`headless=yes` where the user's browser was expected: re-run the connect command, never continue in another browser. If a page is empty, `close` (own session only) and reconnect once. NEVER `close --all`. Shared browser: `tab new` for your own tab, `tab <id>` before each command. No URL listed: cloud → browser-manager-cli; PC with display → Chrome `--remote-debugging-port=9222`, attach `--cdp 9222`. Never `sleep`: `open` returns after load, but `click`/`fill` fail at once if the element isn't there yet — `wait '<sel>'`, `wait --text 'Done'`, `wait --url '**/dash'`, `wait --load networkidle` or `wait '#spinner' --state hidden` first. Extension browsers (WEB_EXTENSION) only: try sign-in with credentials from `tfa-vault`; request human help only for a step you cannot complete yourself (MFA/CAPTCHA/consent). Use Node/Bun WebSocket on the listed CDP URL; `Target.getTargets` or `device_list` gives `tab-N`, whose N is the numeric tabId. On the SAME socket send `{id: 1, method: 'TodoforAI.requestHumanHelp', params: {tabId: N, message: 'what to do'}}` (message 1–500 chars). This only marks the tab (yellow count badge on the extension icon, needs-you row with Show in the popup); it never pauses you or takes the tab away. Tell the user what to do and to reply here, then end your turn. When resumed, snapshot to verify, then clear the marker with `TodoforAI.clearHumanHelp` `{tabId: N}`. If bootstrap fails on a restricted target, direct CDP `Target.createTarget` with an ordinary URL opens your tab on the SAME socket; pass numeric N from returned `tab-N` as `tabId`.",
45439
45527
  versionCmd: "agent-browser --version 2>/dev/null | sed -n 1p",
45440
45528
  preinstallJarvis: true
45441
45529
  },
@@ -46036,7 +46124,7 @@ var tool_catalog_default = {
46036
46124
  summary: "Read and write your Outlook mail.",
46037
46125
  statusCmd: `outlook-api whoami 2>/dev/null | sed -n 's/.*"userPrincipalName"[[:space:]]*:[[:space:]]*"\\([^"]*\\)".*/\\1/p' | grep -m10 .`,
46038
46126
  logoutCmd: "outlook-api logout",
46039
- loginCmd: "outlook-api auth",
46127
+ loginCmd: "outlook-api auth --tenant common",
46040
46128
  credentialPaths: ["~/.config/outlook-api/config.json"],
46041
46129
  description: "Outlook/Hotmail/M365 mail over Microsoft Graph (on-prem Exchange → ews-api). `auth` = device-code flow; `--tenant consumers` (default, personal) | `organizations`. list/search/read/attachments are read-only; `draft`/`reply` stay in Drafts unless --send; `send <draftId>`. `get <path>` = raw Graph GET. JSON out.",
46042
46130
  versionCmd: "outlook-api --version 2>/dev/null | sed -n 1p",
@@ -46083,6 +46171,7 @@ var tool_catalog_default = {
46083
46171
  label: "Google Workspace",
46084
46172
  summary: "Work with Google Sheets, Docs, Slides, Drive, Forms, Tasks, Contacts and Chat.",
46085
46173
  statusCmd: `gws auth status 2>/dev/null | sed -n 's/.*"user"[[:space:]]*:[[:space:]]*"\\([^"]*\\)".*/\\1/p' | grep -m1 .`,
46174
+ logoutCmd: "gws auth logout",
46086
46175
  loginCmd: "gws auth login --scopes https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/presentations,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/forms.body,https://www.googleapis.com/auth/forms.responses.readonly,https://www.googleapis.com/auth/tasks,https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.delete",
46087
46176
  loginTerminalHint: "gws needs your own Google OAuth client first: in console.cloud.google.com create a Desktop-app OAuth client (consent screen External/testing, add yourself as test user), enable the APIs you need (Sheets/Docs/Slides/Drive/Forms/Tasks/People/Chat), save the JSON as ~/.config/gws/client_secret.json (or run `gws auth setup` if gcloud is logged in), then `gws auth login -s sheets,drive`.",
46088
46177
  oauthUrlPattern: "(https://accounts\\.google\\.com/o/oauth2/auth\\S+)",
@@ -46177,6 +46266,7 @@ var tool_catalog_default = {
46177
46266
  summary: "Read your Granola meeting notes and transcripts.",
46178
46267
  statusCmd: `granola auth status -o json 2>/dev/null | sed -n 's/.*"authenticated": *true.*/authenticated/p' | grep -m1 .`,
46179
46268
  loginCmd: "granola auth login",
46269
+ logoutCmd: "granola auth logout",
46180
46270
  loginTerminalHint: "Imports the Granola desktop app's session: install Granola on this host, sign in there, then run `granola auth login`.",
46181
46271
  credentialPaths: ["~/.config/keyring", "~/.config/granola"],
46182
46272
  versionCmd: "granola --version 2>/dev/null | sed -n 1p",
@@ -48744,6 +48834,7 @@ var tool_catalog_default = {
48744
48834
  label: "Heroku",
48745
48835
  summary: "Deploy and manage apps, add-ons and databases on Heroku.",
48746
48836
  statusCmd: "heroku auth:whoami 2>/dev/null | tr -d '\\r' | grep -m1 .",
48837
+ logoutCmd: "heroku logout",
48747
48838
  loginCmd: `k=<api_key>; f="$HOME/.netrc"; (umask 077; touch "$f"; chmod 600 "$f") && K="$k" python3 -c 'import os,re,sys; f=sys.argv[1]; k=os.environ["K"]; s=re.sub(r"machine\\s+(api|git)\\.heroku\\.com\\s+login\\s+\\S+\\s+password\\s+\\S+\\s*", "", open(f).read()); open(f, "w").write(s + "".join("machine %s.heroku.com\\n login token\\n password %s\\n" % (h, k) for h in ("api", "git")))' "$f" && heroku auth:whoami`,
48748
48839
  credentialPaths: ["~/.netrc"],
48749
48840
  versionCmd: "heroku --version 2>/dev/null | sed -n 1p",
@@ -49216,6 +49307,7 @@ var tool_catalog_default = {
49216
49307
  description: "Official Pinecone CLI (`pc`). Connect with a project API key (app.pinecone.io → API keys). `pc index list`, `pc index create --name <n> --dimension 1536 --metric cosine --cloud aws --region us-east-1`, `pc index describe --name <n>`.",
49217
49308
  loginCmd: "pc auth configure --api-key <api_key>",
49218
49309
  statusCmd: "pc index list --json >/dev/null 2>&1 && echo authenticated",
49310
+ logoutCmd: "pc auth logout",
49219
49311
  versionCmd: "pc version 2>/dev/null | sed -n 1p",
49220
49312
  credentialPaths: [
49221
49313
  "~/.config/pinecone/secrets.yaml",
@@ -49593,6 +49685,7 @@ var tool_catalog_default = {
49593
49685
  cloudinary: {
49594
49686
  category: "creative",
49595
49687
  pkg: "cloudinary-cli",
49688
+ pipSdist: ["cloudinary-cli"],
49596
49689
  installer: "pip",
49597
49690
  label: "Cloudinary",
49598
49691
  binName: "cld",
@@ -50045,6 +50138,24 @@ var tool_catalog_default = {
50045
50138
 
50046
50139
  // ../packages/shared-fbe/src/toolCatalog.ts
50047
50140
  var TOOL_CATALOG = tool_catalog_default;
50141
+ // ../packages/shared-fbe/src/emailDomains.ts
50142
+ var PUBLIC_EMAIL_DOMAINS = new Set([
50143
+ "gmail.com",
50144
+ "googlemail.com",
50145
+ "outlook.com",
50146
+ "hotmail.com",
50147
+ "live.com",
50148
+ "icloud.com",
50149
+ "me.com",
50150
+ "yahoo.com",
50151
+ "proton.me",
50152
+ "protonmail.com",
50153
+ "fastmail.com",
50154
+ "gmx.com",
50155
+ "gmx.net",
50156
+ "mail.com",
50157
+ "zoho.com"
50158
+ ]);
50048
50159
  // ../packages/shared-fbe/src/toolInstallCommand.ts
50049
50160
  var NPM_HOME = '"${TFA_NPM_HOME:-$HOME}"';
50050
50161
  var NPM_TOOLS = NPM_HOME.replace('}"', '}/.todoforai/tools"');
@@ -50284,13 +50395,14 @@ import { parseArgs } from "util";
50284
50395
  // package.json
50285
50396
  var package_default = {
50286
50397
  name: "@todoforai/cli",
50398
+ license: "MIT",
50287
50399
  description: "TODOforAI CLI — create and manage tasks with tfa-cli.",
50288
50400
  homepage: "https://todofor.ai",
50289
50401
  repository: {
50290
50402
  type: "git",
50291
50403
  url: "git+https://github.com/todoforai/cli.git"
50292
50404
  },
50293
- version: "0.1.68",
50405
+ version: "0.1.70",
50294
50406
  type: "module",
50295
50407
  bin: {
50296
50408
  "todoforai-cli": "bin/todoforai-cli.js",
@@ -50358,10 +50470,11 @@ Examples:
50358
50470
  tfa-cli show <file|-> [todo-id] # Render a local file (image/pdf/html…) in the chat; - = stdin
50359
50471
  tfa-cli show list|rm … # List / take down shown files
50360
50472
  tfa-cli open <url> [todo-id] # Live url preview in the chat
50473
+ tfa-cli connect <key>… [--reason "why"] # Sign-in card for connectors on this machine (several keys = one choice)
50361
50474
  tfa-cli recommend --template <id> # Add a template as a recommendation card
50362
50475
  tfa-cli inbox [needs-you|messages|activity] [--unread] # Read the notification feed (the bell)
50363
50476
  tfa-cli inbox seen [tab] # Mark notifications read
50364
- tfa-cli notify [--to <email>] "Title" "message" [--href /t/<id>] # Note to your own user, or --to a project member (Messages tab + phone push)
50477
+ tfa-cli notify [--to <email>] "Title" "message" [--href /t/<id>] [--url <link>] # Note to your own user, or --to a project member (Messages tab + phone push)
50365
50478
  tfa-cli claim mint --seed <projectId> [--emails a@x,b@y] [--ttl <sec>] # Mint /claim/<token> links for a project you own
50366
50479
  tfa-cli next [--direction "<text>"] # Analyzer growth recommendation cards
50367
50480
  tfa-cli import [claude|codex|<file>...] [--dry-run] # Import Claude Code / Codex sessions as todos
@@ -50492,6 +50605,7 @@ function parseCliArgs() {
50492
50605
  link: { type: "boolean", default: false },
50493
50606
  force: { type: "boolean", default: false },
50494
50607
  direction: { type: "string" },
50608
+ reason: { type: "string" },
50495
50609
  url: { type: "string" },
50496
50610
  account: { type: "string" },
50497
50611
  "from-company": { type: "boolean", default: false },
@@ -53297,6 +53411,8 @@ Fields map directly to agent settings; values are parsed as JSON when possible
53297
53411
  temperature number, e.g. 0.7
53298
53412
  thinkingLevel low | medium | high | xhigh | max
53299
53413
  refusalFallbackModel model to switch to if 'model' refuses (empty = off)
53414
+ autoCompaction true | false — automatic context compaction (default true)
53415
+ contextLimit tokens compaction is measured against (0 = auto from model, max 200K)
53300
53416
  name agent display name
53301
53417
 
53302
53418
  Examples:
@@ -53305,7 +53421,9 @@ Examples:
53305
53421
  tfa-cli agent update <agent> sysmsg="You are a terse video editor."
53306
53422
  tfa-cli agent create name=Reviewer model=claude sysmsg="Review diffs only."
53307
53423
 
53308
- From an agent shell (dst_ token) permissions, edgesMcpConfigs, devicesConfig and delete are refused by the backend.
53424
+ tfa-cli agent update <agent> judgeSysmsg="Ask before destructive actions. Everything else can run." (auto-approve policy)
53425
+
53426
+ From an agent shell (dst_ token) permissions, judgeSysmsg, edgesMcpConfigs, devicesConfig and delete are refused by the backend.
53309
53427
  `);
53310
53428
  }
53311
53429
  var FIELD_ALIASES = {
@@ -54897,15 +55015,17 @@ function printNotifyHelp() {
54897
55015
  tfa-cli notify — leave a note in someone's Messages inbox (+ phone push)
54898
55016
 
54899
55017
  Usage:
54900
- tfa-cli notify "Title" "message" [--href /t/<todo-id>] [--subject <key>] [--json]
55018
+ tfa-cli notify "Title" "message" [--href /t/<todo-id>] [--url <link>] [--subject <key>] [--json]
54901
55019
  tfa-cli notify --to <email> "Title" "message" [--project <id>]
54902
55020
  echo "message" | tfa-cli notify "Title"
54903
55021
 
54904
55022
  Recipient: your own user by default. --to <email> reaches a TEAMMATE: someone who is a member
54905
55023
  of the current project (--project, $TODOFORAI_PROJECT_ID or your default), shown as from you.
54906
55024
  Anyone else is refused. List them with: tfa-cli project members
54907
- --subject dedupes: the same subject is delivered once (default: hash of title+message,
55025
+ --subject dedupes: the same subject is delivered once (default: hash of title+message+url,
54908
55026
  so a retry never double-notifies). --href must be an in-app path.
55027
+ --url is what tapping the phone notification opens (https/tel/sms/mailto), e.g. navigation:
55028
+ --url "https://www.google.com/maps/dir/?api=1&destination=Deák+tér&dir_action=navigate"
54909
55029
  Limits: 10 notes/day to yourself, 20/day to teammates.
54910
55030
  `);
54911
55031
  }
@@ -54984,8 +55104,9 @@ async function notifyCommand(api, positionals, args, projectId) {
54984
55104
  process.exit(2);
54985
55105
  }
54986
55106
  const subject = args.subject || createHash("sha256").update(`${title}
54987
- ${message}`).digest("hex").slice(0, 16);
54988
- const msg = { subject, title, message, ...args.href ? { href: String(args.href) } : {} };
55107
+ ${message}${args.url ? `
55108
+ ${args.url}` : ""}`).digest("hex").slice(0, 16);
55109
+ const msg = { subject, title, message, ...args.href ? { href: String(args.href) } : {}, ...args.url ? { url: String(args.url) } : {} };
54989
55110
  const row = await (to ? api.sendMemberMessage({ ...msg, projectId, to }) : api.sendFeedMessage(msg));
54990
55111
  if (args.json) {
54991
55112
  console.log(JSON.stringify(row));
@@ -55797,17 +55918,7 @@ var AGENT_METHODS = {
55797
55918
  session_fork: "session/fork",
55798
55919
  session_resume: "session/resume",
55799
55920
  session_close: "session/close",
55800
- logout: "logout",
55801
- nes_start: "nes/start",
55802
- nes_suggest: "nes/suggest",
55803
- nes_accept: "nes/accept",
55804
- nes_reject: "nes/reject",
55805
- nes_close: "nes/close",
55806
- document_did_open: "document/didOpen",
55807
- document_did_change: "document/didChange",
55808
- document_did_close: "document/didClose",
55809
- document_did_save: "document/didSave",
55810
- document_did_focus: "document/didFocus"
55921
+ logout: "logout"
55811
55922
  };
55812
55923
  var CLIENT_METHODS = {
55813
55924
  session_request_permission: "session/request_permission",
@@ -75884,204 +75995,86 @@ var zSessionAdditionalDirectoriesCapabilities = object({
75884
75995
  return;
75885
75996
  })
75886
75997
  });
75887
- var zSessionForkCapabilities = object({
75888
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75889
- return;
75890
- })
75891
- });
75892
- var zSessionResumeCapabilities = object({
75998
+ var zSessionSystemPromptOverrideCapabilities = object({
75893
75999
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75894
76000
  return;
75895
76001
  })
75896
76002
  });
75897
- var zSessionCloseCapabilities = object({
75898
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75899
- return;
75900
- })
75901
- });
75902
- var zSessionCapabilities = object({
75903
- list: defaultOnError(zSessionListCapabilities.nullish(), () => {
75904
- return;
75905
- }),
75906
- delete: defaultOnError(zSessionDeleteCapabilities.nullish(), () => {
75907
- return;
75908
- }),
75909
- additionalDirectories: defaultOnError(zSessionAdditionalDirectoriesCapabilities.nullish(), () => {
75910
- return;
75911
- }),
75912
- fork: defaultOnError(zSessionForkCapabilities.nullish(), () => {
75913
- return;
75914
- }),
75915
- resume: defaultOnError(zSessionResumeCapabilities.nullish(), () => {
75916
- return;
75917
- }),
75918
- close: defaultOnError(zSessionCloseCapabilities.nullish(), () => {
76003
+ var zSessionSystemPromptModeCapabilities = object({
76004
+ override: defaultOnError(zSessionSystemPromptOverrideCapabilities.nullish(), () => {
75919
76005
  return;
75920
76006
  }),
75921
76007
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75922
76008
  return;
75923
76009
  })
75924
76010
  });
75925
- var zLogoutCapabilities = object({
75926
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75927
- return;
75928
- })
75929
- });
75930
- var zAgentAuthCapabilities = object({
75931
- logout: defaultOnError(zLogoutCapabilities.nullish(), () => {
76011
+ var zSessionSystemPromptCapabilities = object({
76012
+ mode: defaultOnError(zSessionSystemPromptModeCapabilities.nullish(), () => {
75932
76013
  return;
75933
76014
  }),
75934
76015
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75935
76016
  return;
75936
76017
  })
75937
76018
  });
75938
- var zProvidersCapabilities = object({
75939
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75940
- return;
75941
- })
75942
- });
75943
- var zNesDocumentDidOpenCapabilities = object({
75944
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75945
- return;
75946
- })
75947
- });
75948
- var zTextDocumentSyncKind = union([
75949
- literal("full"),
75950
- literal("incremental")
75951
- ]);
75952
- var zNesDocumentDidChangeCapabilities = object({
75953
- syncKind: zTextDocumentSyncKind,
75954
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75955
- return;
75956
- })
75957
- });
75958
- var zNesDocumentDidCloseCapabilities = object({
76019
+ var zSessionForkCapabilities = object({
75959
76020
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75960
76021
  return;
75961
76022
  })
75962
76023
  });
75963
- var zNesDocumentDidSaveCapabilities = object({
76024
+ var zSessionResumeCapabilities = object({
75964
76025
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75965
76026
  return;
75966
76027
  })
75967
76028
  });
75968
- var zNesDocumentDidFocusCapabilities = object({
76029
+ var zSessionCloseCapabilities = object({
75969
76030
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75970
76031
  return;
75971
76032
  })
75972
76033
  });
75973
- var zNesDocumentEventCapabilities = object({
75974
- didOpen: defaultOnError(zNesDocumentDidOpenCapabilities.nullish(), () => {
75975
- return;
75976
- }),
75977
- didChange: defaultOnError(zNesDocumentDidChangeCapabilities.nullish(), () => {
76034
+ var zSessionCapabilities = object({
76035
+ list: defaultOnError(zSessionListCapabilities.nullish(), () => {
75978
76036
  return;
75979
76037
  }),
75980
- didClose: defaultOnError(zNesDocumentDidCloseCapabilities.nullish(), () => {
76038
+ delete: defaultOnError(zSessionDeleteCapabilities.nullish(), () => {
75981
76039
  return;
75982
76040
  }),
75983
- didSave: defaultOnError(zNesDocumentDidSaveCapabilities.nullish(), () => {
76041
+ additionalDirectories: defaultOnError(zSessionAdditionalDirectoriesCapabilities.nullish(), () => {
75984
76042
  return;
75985
76043
  }),
75986
- didFocus: defaultOnError(zNesDocumentDidFocusCapabilities.nullish(), () => {
76044
+ systemPrompt: defaultOnError(zSessionSystemPromptCapabilities.nullish(), () => {
75987
76045
  return;
75988
76046
  }),
75989
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75990
- return;
75991
- })
75992
- });
75993
- var zNesEventCapabilities = object({
75994
- document: defaultOnError(zNesDocumentEventCapabilities.nullish(), () => {
75995
- return;
75996
- }),
75997
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75998
- return;
75999
- })
76000
- });
76001
- var zNesRecentFilesCapabilities = object({
76002
- maxCount: defaultOnError(int().gte(0).max(4294967295, {
76003
- error: "Invalid value: Expected uint32 to be <= 4294967295"
76004
- }).nullish(), () => {
76047
+ fork: defaultOnError(zSessionForkCapabilities.nullish(), () => {
76005
76048
  return;
76006
76049
  }),
76007
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76008
- return;
76009
- })
76010
- });
76011
- var zNesRelatedSnippetsCapabilities = object({
76012
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76013
- return;
76014
- })
76015
- });
76016
- var zNesEditHistoryCapabilities = object({
76017
- maxCount: defaultOnError(int().gte(0).max(4294967295, {
76018
- error: "Invalid value: Expected uint32 to be <= 4294967295"
76019
- }).nullish(), () => {
76050
+ resume: defaultOnError(zSessionResumeCapabilities.nullish(), () => {
76020
76051
  return;
76021
76052
  }),
76022
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76023
- return;
76024
- })
76025
- });
76026
- var zNesUserActionsCapabilities = object({
76027
- maxCount: defaultOnError(int().gte(0).max(4294967295, {
76028
- error: "Invalid value: Expected uint32 to be <= 4294967295"
76029
- }).nullish(), () => {
76053
+ close: defaultOnError(zSessionCloseCapabilities.nullish(), () => {
76030
76054
  return;
76031
76055
  }),
76032
76056
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76033
76057
  return;
76034
76058
  })
76035
76059
  });
76036
- var zNesOpenFilesCapabilities = object({
76037
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76038
- return;
76039
- })
76040
- });
76041
- var zNesDiagnosticsCapabilities = object({
76060
+ var zLogoutCapabilities = object({
76042
76061
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76043
76062
  return;
76044
76063
  })
76045
76064
  });
76046
- var zNesContextCapabilities = object({
76047
- recentFiles: defaultOnError(zNesRecentFilesCapabilities.nullish(), () => {
76048
- return;
76049
- }),
76050
- relatedSnippets: defaultOnError(zNesRelatedSnippetsCapabilities.nullish(), () => {
76051
- return;
76052
- }),
76053
- editHistory: defaultOnError(zNesEditHistoryCapabilities.nullish(), () => {
76054
- return;
76055
- }),
76056
- userActions: defaultOnError(zNesUserActionsCapabilities.nullish(), () => {
76057
- return;
76058
- }),
76059
- openFiles: defaultOnError(zNesOpenFilesCapabilities.nullish(), () => {
76060
- return;
76061
- }),
76062
- diagnostics: defaultOnError(zNesDiagnosticsCapabilities.nullish(), () => {
76065
+ var zAgentAuthCapabilities = object({
76066
+ logout: defaultOnError(zLogoutCapabilities.nullish(), () => {
76063
76067
  return;
76064
76068
  }),
76065
76069
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76066
76070
  return;
76067
76071
  })
76068
76072
  });
76069
- var zNesCapabilities = object({
76070
- events: defaultOnError(zNesEventCapabilities.nullish(), () => {
76071
- return;
76072
- }),
76073
- context: defaultOnError(zNesContextCapabilities.nullish(), () => {
76074
- return;
76075
- }),
76073
+ var zProvidersCapabilities = object({
76076
76074
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76077
76075
  return;
76078
76076
  })
76079
76077
  });
76080
- var zPositionEncodingKind = union([
76081
- literal("utf-16"),
76082
- literal("utf-32"),
76083
- literal("utf-8")
76084
- ]);
76085
76078
  var zAgentCapabilities = object({
76086
76079
  loadSession: defaultOnError(boolean2().optional().default(false), () => false),
76087
76080
  promptCapabilities: defaultOnError(zPromptCapabilities.optional().default({
@@ -76107,12 +76100,6 @@ var zAgentCapabilities = object({
76107
76100
  providers: defaultOnError(zProvidersCapabilities.nullish(), () => {
76108
76101
  return;
76109
76102
  }),
76110
- nes: defaultOnError(zNesCapabilities.nullish(), () => {
76111
- return;
76112
- }),
76113
- positionEncoding: defaultOnError(zPositionEncodingKind.nullish(), () => {
76114
- return;
76115
- }),
76116
76103
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76117
76104
  return;
76118
76105
  })
@@ -76446,101 +76433,6 @@ var zPromptResponse = object({
76446
76433
  return;
76447
76434
  })
76448
76435
  });
76449
- var zStartNesResponse = object({
76450
- sessionId: zSessionId,
76451
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76452
- return;
76453
- })
76454
- });
76455
- var zNesSuggestionId = string2();
76456
- var zPosition = object({
76457
- line: int().gte(0).max(4294967295, {
76458
- error: "Invalid value: Expected uint32 to be <= 4294967295"
76459
- }),
76460
- character: int().gte(0).max(4294967295, {
76461
- error: "Invalid value: Expected uint32 to be <= 4294967295"
76462
- }),
76463
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76464
- return;
76465
- })
76466
- });
76467
- var zRange = object({
76468
- start: zPosition,
76469
- end: zPosition,
76470
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76471
- return;
76472
- })
76473
- });
76474
- var zNesTextEdit = object({
76475
- range: zRange,
76476
- newText: string2(),
76477
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76478
- return;
76479
- })
76480
- });
76481
- var zNesEditSuggestion = object({
76482
- id: zNesSuggestionId,
76483
- uri: string2(),
76484
- edits: array(zNesTextEdit),
76485
- cursorPosition: defaultOnError(zPosition.nullish(), () => {
76486
- return;
76487
- }),
76488
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76489
- return;
76490
- })
76491
- });
76492
- var zNesJumpSuggestion = object({
76493
- id: zNesSuggestionId,
76494
- uri: string2(),
76495
- position: zPosition,
76496
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76497
- return;
76498
- })
76499
- });
76500
- var zNesRenameSuggestion = object({
76501
- id: zNesSuggestionId,
76502
- uri: string2(),
76503
- position: zPosition,
76504
- newName: string2(),
76505
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76506
- return;
76507
- })
76508
- });
76509
- var zNesSearchAndReplaceSuggestion = object({
76510
- id: zNesSuggestionId,
76511
- uri: string2(),
76512
- search: string2(),
76513
- replace: string2(),
76514
- isRegex: boolean2().nullish(),
76515
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76516
- return;
76517
- })
76518
- });
76519
- var zNesSuggestion = union([
76520
- zNesEditSuggestion.and(object({
76521
- kind: literal("edit")
76522
- })),
76523
- zNesJumpSuggestion.and(object({
76524
- kind: literal("jump")
76525
- })),
76526
- zNesRenameSuggestion.and(object({
76527
- kind: literal("rename")
76528
- })),
76529
- zNesSearchAndReplaceSuggestion.and(object({
76530
- kind: literal("searchAndReplace")
76531
- }))
76532
- ]);
76533
- var zSuggestNesResponse = object({
76534
- suggestions: array(zNesSuggestion),
76535
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76536
- return;
76537
- })
76538
- });
76539
- var zCloseNesResponse = object({
76540
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76541
- return;
76542
- })
76543
- });
76544
76436
  var zExtResponse = unknown();
76545
76437
  var zErrorCode = union([
76546
76438
  literal(-32700),
@@ -76584,9 +76476,6 @@ var zAgentResponse = union([
76584
76476
  zSetSessionModeResponse,
76585
76477
  zSetSessionConfigOptionResponse,
76586
76478
  zPromptResponse,
76587
- zStartNesResponse,
76588
- zSuggestNesResponse,
76589
- zCloseNesResponse,
76590
76479
  zExtResponse
76591
76480
  ])
76592
76481
  }),
@@ -77105,35 +76994,6 @@ var zElicitationCapabilities = object({
77105
76994
  return;
77106
76995
  })
77107
76996
  });
77108
- var zNesJumpCapabilities = object({
77109
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77110
- return;
77111
- })
77112
- });
77113
- var zNesRenameCapabilities = object({
77114
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77115
- return;
77116
- })
77117
- });
77118
- var zNesSearchAndReplaceCapabilities = object({
77119
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77120
- return;
77121
- })
77122
- });
77123
- var zClientNesCapabilities = object({
77124
- jump: defaultOnError(zNesJumpCapabilities.nullish(), () => {
77125
- return;
77126
- }),
77127
- rename: defaultOnError(zNesRenameCapabilities.nullish(), () => {
77128
- return;
77129
- }),
77130
- searchAndReplace: defaultOnError(zNesSearchAndReplaceCapabilities.nullish(), () => {
77131
- return;
77132
- }),
77133
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77134
- return;
77135
- })
77136
- });
77137
76997
  var zClientCapabilities = object({
77138
76998
  fs: defaultOnError(zFileSystemCapabilities.optional().default({ readTextFile: false, writeTextFile: false }), () => ({ readTextFile: false, writeTextFile: false })),
77139
76999
  terminal: defaultOnError(boolean2().optional().default(false), () => false),
@@ -77150,10 +77010,6 @@ var zClientCapabilities = object({
77150
77010
  elicitation: defaultOnError(zElicitationCapabilities.nullish(), () => {
77151
77011
  return;
77152
77012
  }),
77153
- nes: defaultOnError(zClientNesCapabilities.nullish(), () => {
77154
- return;
77155
- }),
77156
- positionEncodings: defaultOnError(vecSkipError(zPositionEncodingKind).optional(), () => []),
77157
77013
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77158
77014
  return;
77159
77015
  })
@@ -77258,10 +77114,23 @@ var zMcpServer = union([
77258
77114
  })),
77259
77115
  zMcpServerStdio
77260
77116
  ]);
77117
+ var zSystemPromptMode = union([
77118
+ literal("append"),
77119
+ literal("override"),
77120
+ string2()
77121
+ ]);
77122
+ var zSystemPrompt = object({
77123
+ mode: zSystemPromptMode,
77124
+ content: array(zContentBlock),
77125
+ _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77126
+ return;
77127
+ })
77128
+ });
77261
77129
  var zNewSessionRequest = object({
77262
77130
  cwd: string2(),
77263
77131
  additionalDirectories: array(string2()).optional(),
77264
77132
  mcpServers: array(zMcpServer),
77133
+ systemPrompt: zSystemPrompt.nullish(),
77265
77134
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77266
77135
  return;
77267
77136
  })
@@ -77271,6 +77140,7 @@ var zLoadSessionRequest = object({
77271
77140
  cwd: string2(),
77272
77141
  additionalDirectories: array(string2()).optional(),
77273
77142
  sessionId: zSessionId,
77143
+ systemPrompt: zSystemPrompt.nullish(),
77274
77144
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77275
77145
  return;
77276
77146
  })
@@ -77293,6 +77163,7 @@ var zForkSessionRequest = object({
77293
77163
  cwd: string2(),
77294
77164
  additionalDirectories: array(string2()).optional(),
77295
77165
  mcpServers: array(zMcpServer).optional(),
77166
+ systemPrompt: zSystemPrompt.nullish(),
77296
77167
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77297
77168
  return;
77298
77169
  })
@@ -77302,6 +77173,7 @@ var zResumeSessionRequest = object({
77302
77173
  cwd: string2(),
77303
77174
  additionalDirectories: array(string2()).optional(),
77304
77175
  mcpServers: array(zMcpServer).optional(),
77176
+ systemPrompt: zSystemPrompt.nullish(),
77305
77177
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77306
77178
  return;
77307
77179
  })
@@ -77341,138 +77213,6 @@ var zPromptRequest = object({
77341
77213
  return;
77342
77214
  })
77343
77215
  });
77344
- var zWorkspaceFolder = object({
77345
- uri: string2(),
77346
- name: string2(),
77347
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77348
- return;
77349
- })
77350
- });
77351
- var zNesRepository = object({
77352
- name: string2(),
77353
- owner: string2(),
77354
- remoteUrl: string2(),
77355
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77356
- return;
77357
- })
77358
- });
77359
- var zStartNesRequest = object({
77360
- workspaceUri: defaultOnError(string2().nullish(), () => {
77361
- return;
77362
- }),
77363
- workspaceFolders: array(zWorkspaceFolder).nullish(),
77364
- repository: defaultOnError(zNesRepository.nullish(), () => {
77365
- return;
77366
- }),
77367
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77368
- return;
77369
- })
77370
- });
77371
- var zNesTriggerKind = union([
77372
- literal("automatic"),
77373
- literal("diagnostic"),
77374
- literal("manual")
77375
- ]);
77376
- var zNesRecentFile = object({
77377
- uri: string2(),
77378
- languageId: string2(),
77379
- text: string2(),
77380
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77381
- return;
77382
- })
77383
- });
77384
- var zNesExcerpt = object({
77385
- startLine: int().gte(0).max(4294967295, {
77386
- error: "Invalid value: Expected uint32 to be <= 4294967295"
77387
- }),
77388
- endLine: int().gte(0).max(4294967295, {
77389
- error: "Invalid value: Expected uint32 to be <= 4294967295"
77390
- }),
77391
- text: string2(),
77392
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77393
- return;
77394
- })
77395
- });
77396
- var zNesRelatedSnippet = object({
77397
- uri: string2(),
77398
- excerpts: array(zNesExcerpt),
77399
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77400
- return;
77401
- })
77402
- });
77403
- var zNesEditHistoryEntry = object({
77404
- uri: string2(),
77405
- diff: string2(),
77406
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77407
- return;
77408
- })
77409
- });
77410
- var zNesUserAction = object({
77411
- action: string2(),
77412
- uri: string2(),
77413
- position: zPosition,
77414
- timestampMs: number2(),
77415
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77416
- return;
77417
- })
77418
- });
77419
- var zNesOpenFile = object({
77420
- uri: string2(),
77421
- languageId: string2(),
77422
- visibleRange: defaultOnError(zRange.nullish(), () => {
77423
- return;
77424
- }),
77425
- lastFocusedMs: defaultOnError(number2().nullish(), () => {
77426
- return;
77427
- }),
77428
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77429
- return;
77430
- })
77431
- });
77432
- var zNesDiagnosticSeverity = union([
77433
- literal("error"),
77434
- literal("warning"),
77435
- literal("information"),
77436
- literal("hint")
77437
- ]);
77438
- var zNesDiagnostic = object({
77439
- uri: string2(),
77440
- range: zRange,
77441
- severity: zNesDiagnosticSeverity,
77442
- message: string2(),
77443
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77444
- return;
77445
- })
77446
- });
77447
- var zNesSuggestContext = object({
77448
- recentFiles: array(zNesRecentFile).nullish(),
77449
- relatedSnippets: array(zNesRelatedSnippet).nullish(),
77450
- editHistory: array(zNesEditHistoryEntry).nullish(),
77451
- userActions: array(zNesUserAction).nullish(),
77452
- openFiles: array(zNesOpenFile).nullish(),
77453
- diagnostics: array(zNesDiagnostic).nullish(),
77454
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77455
- return;
77456
- })
77457
- });
77458
- var zSuggestNesRequest = object({
77459
- sessionId: zSessionId,
77460
- uri: string2(),
77461
- version: number2(),
77462
- position: zPosition,
77463
- selection: zRange.nullish(),
77464
- triggerKind: zNesTriggerKind,
77465
- context: zNesSuggestContext.nullish(),
77466
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77467
- return;
77468
- })
77469
- });
77470
- var zCloseNesRequest = object({
77471
- sessionId: zSessionId,
77472
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77473
- return;
77474
- })
77475
- });
77476
77216
  var zClientRequest = object({
77477
77217
  id: zRequestId,
77478
77218
  method: string2(),
@@ -77493,9 +77233,6 @@ var zClientRequest = object({
77493
77233
  zSetSessionModeRequest,
77494
77234
  zSetSessionConfigOptionRequest,
77495
77235
  zPromptRequest,
77496
- zStartNesRequest,
77497
- zSuggestNesRequest,
77498
- zCloseNesRequest,
77499
77236
  zExtRequest
77500
77237
  ]).nullish()
77501
77238
  });
@@ -77661,79 +77398,6 @@ var zCancelNotification = object({
77661
77398
  return;
77662
77399
  })
77663
77400
  });
77664
- var zDidOpenDocumentNotification = object({
77665
- sessionId: zSessionId,
77666
- uri: string2(),
77667
- languageId: string2(),
77668
- version: number2(),
77669
- text: string2(),
77670
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77671
- return;
77672
- })
77673
- });
77674
- var zTextDocumentContentChangeEvent = object({
77675
- range: zRange.nullish(),
77676
- text: string2(),
77677
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77678
- return;
77679
- })
77680
- });
77681
- var zDidChangeDocumentNotification = object({
77682
- sessionId: zSessionId,
77683
- uri: string2(),
77684
- version: number2(),
77685
- contentChanges: array(zTextDocumentContentChangeEvent),
77686
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77687
- return;
77688
- })
77689
- });
77690
- var zDidCloseDocumentNotification = object({
77691
- sessionId: zSessionId,
77692
- uri: string2(),
77693
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77694
- return;
77695
- })
77696
- });
77697
- var zDidSaveDocumentNotification = object({
77698
- sessionId: zSessionId,
77699
- uri: string2(),
77700
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77701
- return;
77702
- })
77703
- });
77704
- var zDidFocusDocumentNotification = object({
77705
- sessionId: zSessionId,
77706
- uri: string2(),
77707
- version: number2(),
77708
- position: zPosition,
77709
- visibleRange: zRange,
77710
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77711
- return;
77712
- })
77713
- });
77714
- var zAcceptNesNotification = object({
77715
- sessionId: zSessionId,
77716
- id: zNesSuggestionId,
77717
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77718
- return;
77719
- })
77720
- });
77721
- var zNesRejectReason = union([
77722
- literal("rejected"),
77723
- literal("ignored"),
77724
- literal("replaced"),
77725
- literal("cancelled")
77726
- ]);
77727
- var zRejectNesNotification = object({
77728
- sessionId: zSessionId,
77729
- id: zNesSuggestionId,
77730
- reason: defaultOnError(zNesRejectReason.nullish(), () => {
77731
- return;
77732
- }),
77733
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77734
- return;
77735
- })
77736
- });
77737
77401
  var zMessageMcpNotification = object({
77738
77402
  serverId: zMcpServerAcpId,
77739
77403
  requestId: zMcpRequestId,
@@ -77745,18 +77409,7 @@ var zMessageMcpNotification = object({
77745
77409
  });
77746
77410
  var zClientNotification = object({
77747
77411
  method: string2(),
77748
- params: union([
77749
- zCancelNotification,
77750
- zDidOpenDocumentNotification,
77751
- zDidChangeDocumentNotification,
77752
- zDidCloseDocumentNotification,
77753
- zDidSaveDocumentNotification,
77754
- zDidFocusDocumentNotification,
77755
- zAcceptNesNotification,
77756
- zRejectNesNotification,
77757
- zMessageMcpNotification,
77758
- zExtNotification
77759
- ]).nullish()
77412
+ params: union([zCancelNotification, zMessageMcpNotification, zExtNotification]).nullish()
77760
77413
  });
77761
77414
  var zCancelRequestNotification = object({
77762
77415
  requestId: zRequestId,
@@ -78507,6 +78160,12 @@ class RequestError extends Error {
78507
78160
  static resourceNotFound(uri) {
78508
78161
  return new RequestError(-32002, `Resource not found${uri ? `: ${uri}` : ""}`, uri && { uri });
78509
78162
  }
78163
+ static unsupportedProtocolVersion(requested, supported) {
78164
+ return new RequestError(-32022, "Unsupported protocol version", {
78165
+ requested,
78166
+ supported: [...supported]
78167
+ });
78168
+ }
78510
78169
  toResult() {
78511
78170
  return {
78512
78171
  error: {
@@ -78834,20 +78493,6 @@ var methods = {
78834
78493
  setConfigOption: AGENT_METHODS.session_set_config_option,
78835
78494
  prompt: AGENT_METHODS.session_prompt,
78836
78495
  cancel: AGENT_METHODS.session_cancel
78837
- },
78838
- nes: {
78839
- start: AGENT_METHODS.nes_start,
78840
- suggest: AGENT_METHODS.nes_suggest,
78841
- accept: AGENT_METHODS.nes_accept,
78842
- reject: AGENT_METHODS.nes_reject,
78843
- close: AGENT_METHODS.nes_close
78844
- },
78845
- document: {
78846
- didOpen: AGENT_METHODS.document_did_open,
78847
- didChange: AGENT_METHODS.document_did_change,
78848
- didClose: AGENT_METHODS.document_did_close,
78849
- didSave: AGENT_METHODS.document_did_save,
78850
- didFocus: AGENT_METHODS.document_did_focus
78851
78496
  }
78852
78497
  },
78853
78498
  client: {
@@ -79216,7 +78861,11 @@ function parseParams(parser, params) {
79216
78861
  return parser.parse(params);
79217
78862
  }
79218
78863
  function requestSpec(method, params, mapResponse) {
79219
- return { method, params, mapResponse };
78864
+ return {
78865
+ method,
78866
+ params: (value) => parseParams(params, value ?? {}),
78867
+ mapResponse
78868
+ };
79220
78869
  }
79221
78870
  function notificationSpec(method, params) {
79222
78871
  return { method, params };
@@ -79253,20 +78902,10 @@ var agentRequestSpecs = {
79253
78902
  unstable_setProvider: requestSpec(AGENT_METHODS.providers_set, zSetProviderRequest, emptyObjectResponse),
79254
78903
  unstable_disableProvider: requestSpec(AGENT_METHODS.providers_disable, zDisableProviderRequest, emptyObjectResponse),
79255
78904
  logout: requestSpec(AGENT_METHODS.logout, zLogoutRequest, emptyObjectResponse),
79256
- prompt: requestSpec(AGENT_METHODS.session_prompt, zPromptRequest),
79257
- unstable_startNes: requestSpec(AGENT_METHODS.nes_start, zStartNesRequest),
79258
- unstable_suggestNes: requestSpec(AGENT_METHODS.nes_suggest, zSuggestNesRequest),
79259
- unstable_closeNes: requestSpec(AGENT_METHODS.nes_close, zCloseNesRequest, emptyObjectResponse)
78905
+ prompt: requestSpec(AGENT_METHODS.session_prompt, zPromptRequest)
79260
78906
  };
79261
78907
  var agentNotificationSpecs = {
79262
- cancel: notificationSpec(AGENT_METHODS.session_cancel, zCancelNotification),
79263
- unstable_didOpenDocument: notificationSpec(AGENT_METHODS.document_did_open, zDidOpenDocumentNotification),
79264
- unstable_didChangeDocument: notificationSpec(AGENT_METHODS.document_did_change, zDidChangeDocumentNotification),
79265
- unstable_didCloseDocument: notificationSpec(AGENT_METHODS.document_did_close, zDidCloseDocumentNotification),
79266
- unstable_didSaveDocument: notificationSpec(AGENT_METHODS.document_did_save, zDidSaveDocumentNotification),
79267
- unstable_didFocusDocument: notificationSpec(AGENT_METHODS.document_did_focus, zDidFocusDocumentNotification),
79268
- unstable_acceptNes: notificationSpec(AGENT_METHODS.nes_accept, zAcceptNesNotification),
79269
- unstable_rejectNes: notificationSpec(AGENT_METHODS.nes_reject, zRejectNesNotification)
78908
+ cancel: notificationSpec(AGENT_METHODS.session_cancel, zCancelNotification)
79270
78909
  };
79271
78910
  var clientRequestSpecs = {
79272
78911
  requestPermission: requestSpec(CLIENT_METHODS.session_request_permission, zRequestPermissionRequest),
@@ -79569,20 +79208,10 @@ var legacyAgentRequestMethods = new Set([
79569
79208
  AGENT_METHODS.session_fork,
79570
79209
  AGENT_METHODS.session_resume,
79571
79210
  AGENT_METHODS.session_close,
79572
- AGENT_METHODS.logout,
79573
- AGENT_METHODS.nes_start,
79574
- AGENT_METHODS.nes_suggest,
79575
- AGENT_METHODS.nes_close
79211
+ AGENT_METHODS.logout
79576
79212
  ]);
79577
79213
  var legacyAgentNotificationMethods = new Set([
79578
- AGENT_METHODS.session_cancel,
79579
- AGENT_METHODS.nes_accept,
79580
- AGENT_METHODS.nes_reject,
79581
- AGENT_METHODS.document_did_open,
79582
- AGENT_METHODS.document_did_change,
79583
- AGENT_METHODS.document_did_close,
79584
- AGENT_METHODS.document_did_save,
79585
- AGENT_METHODS.document_did_focus
79214
+ AGENT_METHODS.session_cancel
79586
79215
  ]);
79587
79216
  var legacyClientRequestMethods = new Set([
79588
79217
  CLIENT_METHODS.session_request_permission,
@@ -79637,36 +79266,6 @@ function legacyAgentApp(implementation) {
79637
79266
  if (implementation.logout) {
79638
79267
  app.onRequest(AGENT_METHODS.logout, async (ctx) => await implementation.logout(ctx.params) ?? {});
79639
79268
  }
79640
- if (implementation.unstable_startNes) {
79641
- app.onRequest(AGENT_METHODS.nes_start, (ctx) => implementation.unstable_startNes(ctx.params));
79642
- }
79643
- if (implementation.unstable_suggestNes) {
79644
- app.onRequest(AGENT_METHODS.nes_suggest, (ctx) => implementation.unstable_suggestNes(ctx.params));
79645
- }
79646
- if (implementation.unstable_closeNes) {
79647
- app.onRequest(AGENT_METHODS.nes_close, async (ctx) => await implementation.unstable_closeNes(ctx.params) ?? {});
79648
- }
79649
- if (implementation.unstable_didOpenDocument) {
79650
- app.onNotification(AGENT_METHODS.document_did_open, (ctx) => implementation.unstable_didOpenDocument(ctx.params));
79651
- }
79652
- if (implementation.unstable_didChangeDocument) {
79653
- app.onNotification(AGENT_METHODS.document_did_change, (ctx) => implementation.unstable_didChangeDocument(ctx.params));
79654
- }
79655
- if (implementation.unstable_didCloseDocument) {
79656
- app.onNotification(AGENT_METHODS.document_did_close, (ctx) => implementation.unstable_didCloseDocument(ctx.params));
79657
- }
79658
- if (implementation.unstable_didSaveDocument) {
79659
- app.onNotification(AGENT_METHODS.document_did_save, (ctx) => implementation.unstable_didSaveDocument(ctx.params));
79660
- }
79661
- if (implementation.unstable_didFocusDocument) {
79662
- app.onNotification(AGENT_METHODS.document_did_focus, (ctx) => implementation.unstable_didFocusDocument(ctx.params));
79663
- }
79664
- if (implementation.unstable_acceptNes) {
79665
- app.onNotification(AGENT_METHODS.nes_accept, (ctx) => implementation.unstable_acceptNes(ctx.params));
79666
- }
79667
- if (implementation.unstable_rejectNes) {
79668
- app.onNotification(AGENT_METHODS.nes_reject, (ctx) => implementation.unstable_rejectNes(ctx.params));
79669
- }
79670
79269
  if (implementation.extMethod) {
79671
79270
  app[appBuilder]().withHandler({
79672
79271
  handleMessage: async (message) => {
@@ -80718,6 +80317,21 @@ async function main() {
80718
80317
  console.log(res.ref);
80719
80318
  return;
80720
80319
  }
80320
+ if (positionals[0] === "connect") {
80321
+ const keys = positionals.slice(1);
80322
+ const todoId = aliasTodoId(args.alias) || getEnv("TODO_ID") || cfgScope.data.last_todo_id;
80323
+ if (!keys.length || !todoId) {
80324
+ process.stderr.write(`${RED3}Usage: tfa-cli connect <key> [<key>\u2026] [--reason "why"]${RESET2}
80325
+ `);
80326
+ process.exit(2);
80327
+ }
80328
+ const res = await api2.showConnect(todoId, keys, { reason: args.reason, alias: args.alias });
80329
+ if (args.json)
80330
+ console.log(JSON.stringify(res, null, 2));
80331
+ else
80332
+ console.log(res.ref);
80333
+ return;
80334
+ }
80721
80335
  if (positionals[0] === "recommend") {
80722
80336
  const templateId = args.template || positionals[1];
80723
80337
  if (!templateId) {