@todoforai/cli 0.1.68 → 0.1.69

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.
Files changed (2) hide show
  1. package/dist/todoforai-cli.js +154 -620
  2. package/package.json +1 -1
@@ -45253,57 +45253,111 @@ var tool_catalog_default = {
45253
45253
  installer: "binary",
45254
45254
  preinstallCloud: true,
45255
45255
  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" }
45256
+ "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" },
45257
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/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.8/rclone-darwin-amd64.tar.gz", archive: "tar.gz", extract: "rclone" },
45259
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/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.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45261
45261
  },
45262
+ internal: true,
45262
45263
  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,
45264
+ summary: "The rclone program behind the Google Drive, OneDrive, Dropbox and S3 connectors.",
45269
45265
  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
45266
  versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45304
45267
  preinstallJarvis: true,
45305
45268
  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
45269
  },
45270
+ gdrive: {
45271
+ category: "cloud",
45272
+ pkg: "rclone",
45273
+ installer: "binary",
45274
+ binName: "rclone",
45275
+ binary: {
45276
+ "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" },
45277
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45278
+ "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" },
45279
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45280
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45281
+ },
45282
+ label: "Google Drive",
45283
+ summary: "Browse, read and write files in your Google Drive.",
45284
+ rcloneType: "drive",
45285
+ 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 .`,
45286
+ loginCmd: "rclone config",
45287
+ oauthBroker: true,
45288
+ 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',
45289
+ credentialPaths: ["~/.config/rclone/rclone.conf"],
45290
+ versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45291
+ 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>')`."
45292
+ },
45293
+ onedrive: {
45294
+ category: "cloud",
45295
+ pkg: "rclone",
45296
+ installer: "binary",
45297
+ binName: "rclone",
45298
+ binary: {
45299
+ "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" },
45300
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45301
+ "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" },
45302
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45303
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45304
+ },
45305
+ label: "OneDrive",
45306
+ summary: "Browse, read and write files in your OneDrive.",
45307
+ rcloneType: "onedrive",
45308
+ 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 .`,
45309
+ loginCmd: "rclone config",
45310
+ oauthBroker: true,
45311
+ 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',
45312
+ credentialPaths: ["~/.config/rclone/rclone.conf"],
45313
+ versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45314
+ 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>')`."
45315
+ },
45316
+ dropbox: {
45317
+ category: "cloud",
45318
+ pkg: "rclone",
45319
+ installer: "binary",
45320
+ binName: "rclone",
45321
+ binary: {
45322
+ "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" },
45323
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45324
+ "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" },
45325
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45326
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45327
+ },
45328
+ label: "Dropbox",
45329
+ summary: "Browse, read and write files in your Dropbox.",
45330
+ rcloneType: "dropbox",
45331
+ 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 .`,
45332
+ loginCmd: "rclone config",
45333
+ oauthBroker: true,
45334
+ 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',
45335
+ credentialPaths: ["~/.config/rclone/rclone.conf"],
45336
+ versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45337
+ 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>')`."
45338
+ },
45339
+ s3: {
45340
+ category: "cloud",
45341
+ pkg: "rclone",
45342
+ installer: "binary",
45343
+ binName: "rclone",
45344
+ binary: {
45345
+ "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" },
45346
+ "linux-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-linux-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45347
+ "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" },
45348
+ "darwin-aarch64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-darwin-arm64.tar.gz", archive: "tar.gz", extract: "rclone" },
45349
+ "windows-x86_64": { url: "https://github.com/todoforai/rclone-backend/releases/download/v0.1.8/rclone-windows-amd64.zip", archive: "zip", extract: "rclone.exe" }
45350
+ },
45351
+ label: "Amazon S3",
45352
+ summary: "Browse, read and write files in your Amazon S3 buckets.",
45353
+ rcloneType: "s3",
45354
+ 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 .`,
45355
+ 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.'`,
45356
+ 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',
45357
+ credentialPaths: ["~/.config/rclone/rclone.conf"],
45358
+ versionCmd: "rclone version 2>/dev/null | sed -n 1p",
45359
+ 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>')`."
45360
+ },
45307
45361
  aws: {
45308
45362
  preinstallCloud: true,
45309
45363
  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",
@@ -50290,7 +50344,7 @@ var package_default = {
50290
50344
  type: "git",
50291
50345
  url: "git+https://github.com/todoforai/cli.git"
50292
50346
  },
50293
- version: "0.1.68",
50347
+ version: "0.1.69",
50294
50348
  type: "module",
50295
50349
  bin: {
50296
50350
  "todoforai-cli": "bin/todoforai-cli.js",
@@ -53297,6 +53351,8 @@ Fields map directly to agent settings; values are parsed as JSON when possible
53297
53351
  temperature number, e.g. 0.7
53298
53352
  thinkingLevel low | medium | high | xhigh | max
53299
53353
  refusalFallbackModel model to switch to if 'model' refuses (empty = off)
53354
+ autoCompaction true | false — automatic context compaction (default true)
53355
+ contextLimit tokens compaction is measured against (0 = auto from model, max 200K)
53300
53356
  name agent display name
53301
53357
 
53302
53358
  Examples:
@@ -55797,17 +55853,7 @@ var AGENT_METHODS = {
55797
55853
  session_fork: "session/fork",
55798
55854
  session_resume: "session/resume",
55799
55855
  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"
55856
+ logout: "logout"
55811
55857
  };
55812
55858
  var CLIENT_METHODS = {
55813
55859
  session_request_permission: "session/request_permission",
@@ -75884,204 +75930,86 @@ var zSessionAdditionalDirectoriesCapabilities = object({
75884
75930
  return;
75885
75931
  })
75886
75932
  });
75887
- var zSessionForkCapabilities = object({
75933
+ var zSessionSystemPromptOverrideCapabilities = object({
75888
75934
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75889
75935
  return;
75890
75936
  })
75891
75937
  });
75892
- var zSessionResumeCapabilities = object({
75893
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75894
- return;
75895
- })
75896
- });
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(), () => {
75938
+ var zSessionSystemPromptModeCapabilities = object({
75939
+ override: defaultOnError(zSessionSystemPromptOverrideCapabilities.nullish(), () => {
75910
75940
  return;
75911
75941
  }),
75912
- fork: defaultOnError(zSessionForkCapabilities.nullish(), () => {
75913
- return;
75914
- }),
75915
- resume: defaultOnError(zSessionResumeCapabilities.nullish(), () => {
75916
- return;
75917
- }),
75918
- close: defaultOnError(zSessionCloseCapabilities.nullish(), () => {
75919
- return;
75920
- }),
75921
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75922
- return;
75923
- })
75924
- });
75925
- var zLogoutCapabilities = object({
75926
75942
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75927
75943
  return;
75928
75944
  })
75929
75945
  });
75930
- var zAgentAuthCapabilities = object({
75931
- logout: defaultOnError(zLogoutCapabilities.nullish(), () => {
75946
+ var zSessionSystemPromptCapabilities = object({
75947
+ mode: defaultOnError(zSessionSystemPromptModeCapabilities.nullish(), () => {
75932
75948
  return;
75933
75949
  }),
75934
75950
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75935
75951
  return;
75936
75952
  })
75937
75953
  });
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({
75954
+ var zSessionForkCapabilities = object({
75959
75955
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75960
75956
  return;
75961
75957
  })
75962
75958
  });
75963
- var zNesDocumentDidSaveCapabilities = object({
75959
+ var zSessionResumeCapabilities = object({
75964
75960
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75965
75961
  return;
75966
75962
  })
75967
75963
  });
75968
- var zNesDocumentDidFocusCapabilities = object({
75964
+ var zSessionCloseCapabilities = object({
75969
75965
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75970
75966
  return;
75971
75967
  })
75972
75968
  });
75973
- var zNesDocumentEventCapabilities = object({
75974
- didOpen: defaultOnError(zNesDocumentDidOpenCapabilities.nullish(), () => {
75975
- return;
75976
- }),
75977
- didChange: defaultOnError(zNesDocumentDidChangeCapabilities.nullish(), () => {
75978
- return;
75979
- }),
75980
- didClose: defaultOnError(zNesDocumentDidCloseCapabilities.nullish(), () => {
75969
+ var zSessionCapabilities = object({
75970
+ list: defaultOnError(zSessionListCapabilities.nullish(), () => {
75981
75971
  return;
75982
75972
  }),
75983
- didSave: defaultOnError(zNesDocumentDidSaveCapabilities.nullish(), () => {
75973
+ delete: defaultOnError(zSessionDeleteCapabilities.nullish(), () => {
75984
75974
  return;
75985
75975
  }),
75986
- didFocus: defaultOnError(zNesDocumentDidFocusCapabilities.nullish(), () => {
75976
+ additionalDirectories: defaultOnError(zSessionAdditionalDirectoriesCapabilities.nullish(), () => {
75987
75977
  return;
75988
75978
  }),
75989
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
75990
- return;
75991
- })
75992
- });
75993
- var zNesEventCapabilities = object({
75994
- document: defaultOnError(zNesDocumentEventCapabilities.nullish(), () => {
75979
+ systemPrompt: defaultOnError(zSessionSystemPromptCapabilities.nullish(), () => {
75995
75980
  return;
75996
75981
  }),
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(), () => {
75982
+ fork: defaultOnError(zSessionForkCapabilities.nullish(), () => {
76005
75983
  return;
76006
75984
  }),
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(), () => {
75985
+ resume: defaultOnError(zSessionResumeCapabilities.nullish(), () => {
76020
75986
  return;
76021
75987
  }),
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(), () => {
75988
+ close: defaultOnError(zSessionCloseCapabilities.nullish(), () => {
76030
75989
  return;
76031
75990
  }),
76032
75991
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76033
75992
  return;
76034
75993
  })
76035
75994
  });
76036
- var zNesOpenFilesCapabilities = object({
76037
- _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76038
- return;
76039
- })
76040
- });
76041
- var zNesDiagnosticsCapabilities = object({
75995
+ var zLogoutCapabilities = object({
76042
75996
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76043
75997
  return;
76044
75998
  })
76045
75999
  });
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(), () => {
76000
+ var zAgentAuthCapabilities = object({
76001
+ logout: defaultOnError(zLogoutCapabilities.nullish(), () => {
76063
76002
  return;
76064
76003
  }),
76065
76004
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76066
76005
  return;
76067
76006
  })
76068
76007
  });
76069
- var zNesCapabilities = object({
76070
- events: defaultOnError(zNesEventCapabilities.nullish(), () => {
76071
- return;
76072
- }),
76073
- context: defaultOnError(zNesContextCapabilities.nullish(), () => {
76074
- return;
76075
- }),
76008
+ var zProvidersCapabilities = object({
76076
76009
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76077
76010
  return;
76078
76011
  })
76079
76012
  });
76080
- var zPositionEncodingKind = union([
76081
- literal("utf-16"),
76082
- literal("utf-32"),
76083
- literal("utf-8")
76084
- ]);
76085
76013
  var zAgentCapabilities = object({
76086
76014
  loadSession: defaultOnError(boolean2().optional().default(false), () => false),
76087
76015
  promptCapabilities: defaultOnError(zPromptCapabilities.optional().default({
@@ -76107,12 +76035,6 @@ var zAgentCapabilities = object({
76107
76035
  providers: defaultOnError(zProvidersCapabilities.nullish(), () => {
76108
76036
  return;
76109
76037
  }),
76110
- nes: defaultOnError(zNesCapabilities.nullish(), () => {
76111
- return;
76112
- }),
76113
- positionEncoding: defaultOnError(zPositionEncodingKind.nullish(), () => {
76114
- return;
76115
- }),
76116
76038
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
76117
76039
  return;
76118
76040
  })
@@ -76446,101 +76368,6 @@ var zPromptResponse = object({
76446
76368
  return;
76447
76369
  })
76448
76370
  });
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
76371
  var zExtResponse = unknown();
76545
76372
  var zErrorCode = union([
76546
76373
  literal(-32700),
@@ -76584,9 +76411,6 @@ var zAgentResponse = union([
76584
76411
  zSetSessionModeResponse,
76585
76412
  zSetSessionConfigOptionResponse,
76586
76413
  zPromptResponse,
76587
- zStartNesResponse,
76588
- zSuggestNesResponse,
76589
- zCloseNesResponse,
76590
76414
  zExtResponse
76591
76415
  ])
76592
76416
  }),
@@ -77105,35 +76929,6 @@ var zElicitationCapabilities = object({
77105
76929
  return;
77106
76930
  })
77107
76931
  });
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
76932
  var zClientCapabilities = object({
77138
76933
  fs: defaultOnError(zFileSystemCapabilities.optional().default({ readTextFile: false, writeTextFile: false }), () => ({ readTextFile: false, writeTextFile: false })),
77139
76934
  terminal: defaultOnError(boolean2().optional().default(false), () => false),
@@ -77150,10 +76945,6 @@ var zClientCapabilities = object({
77150
76945
  elicitation: defaultOnError(zElicitationCapabilities.nullish(), () => {
77151
76946
  return;
77152
76947
  }),
77153
- nes: defaultOnError(zClientNesCapabilities.nullish(), () => {
77154
- return;
77155
- }),
77156
- positionEncodings: defaultOnError(vecSkipError(zPositionEncodingKind).optional(), () => []),
77157
76948
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77158
76949
  return;
77159
76950
  })
@@ -77258,10 +77049,23 @@ var zMcpServer = union([
77258
77049
  })),
77259
77050
  zMcpServerStdio
77260
77051
  ]);
77052
+ var zSystemPromptMode = union([
77053
+ literal("append"),
77054
+ literal("override"),
77055
+ string2()
77056
+ ]);
77057
+ var zSystemPrompt = object({
77058
+ mode: zSystemPromptMode,
77059
+ content: array(zContentBlock),
77060
+ _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77061
+ return;
77062
+ })
77063
+ });
77261
77064
  var zNewSessionRequest = object({
77262
77065
  cwd: string2(),
77263
77066
  additionalDirectories: array(string2()).optional(),
77264
77067
  mcpServers: array(zMcpServer),
77068
+ systemPrompt: zSystemPrompt.nullish(),
77265
77069
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77266
77070
  return;
77267
77071
  })
@@ -77271,6 +77075,7 @@ var zLoadSessionRequest = object({
77271
77075
  cwd: string2(),
77272
77076
  additionalDirectories: array(string2()).optional(),
77273
77077
  sessionId: zSessionId,
77078
+ systemPrompt: zSystemPrompt.nullish(),
77274
77079
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77275
77080
  return;
77276
77081
  })
@@ -77293,6 +77098,7 @@ var zForkSessionRequest = object({
77293
77098
  cwd: string2(),
77294
77099
  additionalDirectories: array(string2()).optional(),
77295
77100
  mcpServers: array(zMcpServer).optional(),
77101
+ systemPrompt: zSystemPrompt.nullish(),
77296
77102
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77297
77103
  return;
77298
77104
  })
@@ -77302,6 +77108,7 @@ var zResumeSessionRequest = object({
77302
77108
  cwd: string2(),
77303
77109
  additionalDirectories: array(string2()).optional(),
77304
77110
  mcpServers: array(zMcpServer).optional(),
77111
+ systemPrompt: zSystemPrompt.nullish(),
77305
77112
  _meta: defaultOnError(record(string2(), unknown()).nullish(), () => {
77306
77113
  return;
77307
77114
  })
@@ -77341,138 +77148,6 @@ var zPromptRequest = object({
77341
77148
  return;
77342
77149
  })
77343
77150
  });
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
77151
  var zClientRequest = object({
77477
77152
  id: zRequestId,
77478
77153
  method: string2(),
@@ -77493,9 +77168,6 @@ var zClientRequest = object({
77493
77168
  zSetSessionModeRequest,
77494
77169
  zSetSessionConfigOptionRequest,
77495
77170
  zPromptRequest,
77496
- zStartNesRequest,
77497
- zSuggestNesRequest,
77498
- zCloseNesRequest,
77499
77171
  zExtRequest
77500
77172
  ]).nullish()
77501
77173
  });
@@ -77661,79 +77333,6 @@ var zCancelNotification = object({
77661
77333
  return;
77662
77334
  })
77663
77335
  });
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
77336
  var zMessageMcpNotification = object({
77738
77337
  serverId: zMcpServerAcpId,
77739
77338
  requestId: zMcpRequestId,
@@ -77745,18 +77344,7 @@ var zMessageMcpNotification = object({
77745
77344
  });
77746
77345
  var zClientNotification = object({
77747
77346
  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()
77347
+ params: union([zCancelNotification, zMessageMcpNotification, zExtNotification]).nullish()
77760
77348
  });
77761
77349
  var zCancelRequestNotification = object({
77762
77350
  requestId: zRequestId,
@@ -78507,6 +78095,12 @@ class RequestError extends Error {
78507
78095
  static resourceNotFound(uri) {
78508
78096
  return new RequestError(-32002, `Resource not found${uri ? `: ${uri}` : ""}`, uri && { uri });
78509
78097
  }
78098
+ static unsupportedProtocolVersion(requested, supported) {
78099
+ return new RequestError(-32022, "Unsupported protocol version", {
78100
+ requested,
78101
+ supported: [...supported]
78102
+ });
78103
+ }
78510
78104
  toResult() {
78511
78105
  return {
78512
78106
  error: {
@@ -78834,20 +78428,6 @@ var methods = {
78834
78428
  setConfigOption: AGENT_METHODS.session_set_config_option,
78835
78429
  prompt: AGENT_METHODS.session_prompt,
78836
78430
  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
78431
  }
78852
78432
  },
78853
78433
  client: {
@@ -79216,7 +78796,11 @@ function parseParams(parser, params) {
79216
78796
  return parser.parse(params);
79217
78797
  }
79218
78798
  function requestSpec(method, params, mapResponse) {
79219
- return { method, params, mapResponse };
78799
+ return {
78800
+ method,
78801
+ params: (value) => parseParams(params, value ?? {}),
78802
+ mapResponse
78803
+ };
79220
78804
  }
79221
78805
  function notificationSpec(method, params) {
79222
78806
  return { method, params };
@@ -79253,20 +78837,10 @@ var agentRequestSpecs = {
79253
78837
  unstable_setProvider: requestSpec(AGENT_METHODS.providers_set, zSetProviderRequest, emptyObjectResponse),
79254
78838
  unstable_disableProvider: requestSpec(AGENT_METHODS.providers_disable, zDisableProviderRequest, emptyObjectResponse),
79255
78839
  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)
78840
+ prompt: requestSpec(AGENT_METHODS.session_prompt, zPromptRequest)
79260
78841
  };
79261
78842
  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)
78843
+ cancel: notificationSpec(AGENT_METHODS.session_cancel, zCancelNotification)
79270
78844
  };
79271
78845
  var clientRequestSpecs = {
79272
78846
  requestPermission: requestSpec(CLIENT_METHODS.session_request_permission, zRequestPermissionRequest),
@@ -79569,20 +79143,10 @@ var legacyAgentRequestMethods = new Set([
79569
79143
  AGENT_METHODS.session_fork,
79570
79144
  AGENT_METHODS.session_resume,
79571
79145
  AGENT_METHODS.session_close,
79572
- AGENT_METHODS.logout,
79573
- AGENT_METHODS.nes_start,
79574
- AGENT_METHODS.nes_suggest,
79575
- AGENT_METHODS.nes_close
79146
+ AGENT_METHODS.logout
79576
79147
  ]);
79577
79148
  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
79149
+ AGENT_METHODS.session_cancel
79586
79150
  ]);
79587
79151
  var legacyClientRequestMethods = new Set([
79588
79152
  CLIENT_METHODS.session_request_permission,
@@ -79637,36 +79201,6 @@ function legacyAgentApp(implementation) {
79637
79201
  if (implementation.logout) {
79638
79202
  app.onRequest(AGENT_METHODS.logout, async (ctx) => await implementation.logout(ctx.params) ?? {});
79639
79203
  }
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
79204
  if (implementation.extMethod) {
79671
79205
  app[appBuilder]().withHandler({
79672
79206
  handleMessage: async (message) => {
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/todoforai/cli.git"
8
8
  },
9
- "version": "0.1.68",
9
+ "version": "0.1.69",
10
10
  "type": "module",
11
11
  "bin": {
12
12
  "todoforai-cli": "bin/todoforai-cli.js",