lark-agent-bridge 0.1.39

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 (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +265 -0
  3. package/README.zh.md +265 -0
  4. package/bin/lark-agent-bridge.mjs +2 -0
  5. package/dist/agent/cursor/cursor-sdk-worker.js +702 -0
  6. package/dist/cli.js +7588 -0
  7. package/dist/index.d.ts +113 -0
  8. package/dist/index.js +721 -0
  9. package/package.json +72 -0
  10. package/vendor/cursor-sdk/LICENSE.md +3 -0
  11. package/vendor/cursor-sdk/README.md +23 -0
  12. package/vendor/cursor-sdk/dist/cjs/642.index.js +1 -0
  13. package/vendor/cursor-sdk/dist/cjs/agent.d.ts +170 -0
  14. package/vendor/cursor-sdk/dist/cjs/agent.d.ts.map +1 -0
  15. package/vendor/cursor-sdk/dist/cjs/analytics.d.ts +98 -0
  16. package/vendor/cursor-sdk/dist/cjs/analytics.d.ts.map +1 -0
  17. package/vendor/cursor-sdk/dist/cjs/artifacts.d.ts +6 -0
  18. package/vendor/cursor-sdk/dist/cjs/artifacts.d.ts.map +1 -0
  19. package/vendor/cursor-sdk/dist/cjs/cloud-agent.d.ts +47 -0
  20. package/vendor/cursor-sdk/dist/cjs/cloud-agent.d.ts.map +1 -0
  21. package/vendor/cursor-sdk/dist/cjs/cloud-api-client.d.ts +197 -0
  22. package/vendor/cursor-sdk/dist/cjs/cloud-api-client.d.ts.map +1 -0
  23. package/vendor/cursor-sdk/dist/cjs/cloud-executor.d.ts +14 -0
  24. package/vendor/cursor-sdk/dist/cjs/cloud-executor.d.ts.map +1 -0
  25. package/vendor/cursor-sdk/dist/cjs/cloud-mcp-utils.d.ts +4 -0
  26. package/vendor/cursor-sdk/dist/cjs/cloud-mcp-utils.d.ts.map +1 -0
  27. package/vendor/cursor-sdk/dist/cjs/core-adapter.d.ts +2 -0
  28. package/vendor/cursor-sdk/dist/cjs/core-adapter.d.ts.map +1 -0
  29. package/vendor/cursor-sdk/dist/cjs/errors.d.ts +135 -0
  30. package/vendor/cursor-sdk/dist/cjs/errors.d.ts.map +1 -0
  31. package/vendor/cursor-sdk/dist/cjs/executor-common.d.ts +16 -0
  32. package/vendor/cursor-sdk/dist/cjs/executor-common.d.ts.map +1 -0
  33. package/vendor/cursor-sdk/dist/cjs/executor-types.d.ts +65 -0
  34. package/vendor/cursor-sdk/dist/cjs/executor-types.d.ts.map +1 -0
  35. package/vendor/cursor-sdk/dist/cjs/index.d.ts +18 -0
  36. package/vendor/cursor-sdk/dist/cjs/index.d.ts.map +1 -0
  37. package/vendor/cursor-sdk/dist/cjs/index.js +8 -0
  38. package/vendor/cursor-sdk/dist/cjs/index.js.LICENSE.txt +285 -0
  39. package/vendor/cursor-sdk/dist/cjs/local-executor.d.ts +18 -0
  40. package/vendor/cursor-sdk/dist/cjs/local-executor.d.ts.map +1 -0
  41. package/vendor/cursor-sdk/dist/cjs/local-model-validation.d.ts +6 -0
  42. package/vendor/cursor-sdk/dist/cjs/local-model-validation.d.ts.map +1 -0
  43. package/vendor/cursor-sdk/dist/cjs/messages.d.ts +110 -0
  44. package/vendor/cursor-sdk/dist/cjs/messages.d.ts.map +1 -0
  45. package/vendor/cursor-sdk/dist/cjs/options.d.ts +145 -0
  46. package/vendor/cursor-sdk/dist/cjs/options.d.ts.map +1 -0
  47. package/vendor/cursor-sdk/dist/cjs/package.json +3 -0
  48. package/vendor/cursor-sdk/dist/cjs/platform.d.ts +71 -0
  49. package/vendor/cursor-sdk/dist/cjs/platform.d.ts.map +1 -0
  50. package/vendor/cursor-sdk/dist/cjs/prefetched-blobs.d.ts +13 -0
  51. package/vendor/cursor-sdk/dist/cjs/prefetched-blobs.d.ts.map +1 -0
  52. package/vendor/cursor-sdk/dist/cjs/public-api.d.ts +12 -0
  53. package/vendor/cursor-sdk/dist/cjs/public-api.d.ts.map +1 -0
  54. package/vendor/cursor-sdk/dist/cjs/run-event-tailer.d.ts +33 -0
  55. package/vendor/cursor-sdk/dist/cjs/run-event-tailer.d.ts.map +1 -0
  56. package/vendor/cursor-sdk/dist/cjs/run-interaction-accumulator.d.ts +33 -0
  57. package/vendor/cursor-sdk/dist/cjs/run-interaction-accumulator.d.ts.map +1 -0
  58. package/vendor/cursor-sdk/dist/cjs/run.d.ts +44 -0
  59. package/vendor/cursor-sdk/dist/cjs/run.d.ts.map +1 -0
  60. package/vendor/cursor-sdk/dist/cjs/sdk-statsig.d.ts +10 -0
  61. package/vendor/cursor-sdk/dist/cjs/sdk-statsig.d.ts.map +1 -0
  62. package/vendor/cursor-sdk/dist/cjs/stubs.d.ts +98 -0
  63. package/vendor/cursor-sdk/dist/cjs/stubs.d.ts.map +1 -0
  64. package/vendor/cursor-sdk/dist/cjs/subagent-conversion.d.ts +22 -0
  65. package/vendor/cursor-sdk/dist/cjs/subagent-conversion.d.ts.map +1 -0
  66. package/vendor/cursor-sdk/dist/cjs/tool-call-utils.d.ts +7 -0
  67. package/vendor/cursor-sdk/dist/cjs/tool-call-utils.d.ts.map +1 -0
  68. package/vendor/cursor-sdk/dist/cjs/types/conversation-types.d.ts +12062 -0
  69. package/vendor/cursor-sdk/dist/cjs/types/conversation-types.d.ts.map +1 -0
  70. package/vendor/cursor-sdk/dist/cjs/types/delta-types.d.ts +2 -0
  71. package/vendor/cursor-sdk/dist/cjs/types/delta-types.d.ts.map +1 -0
  72. package/vendor/cursor-sdk/dist/cjs/types/tool-call-types.d.ts +2 -0
  73. package/vendor/cursor-sdk/dist/cjs/types/tool-call-types.d.ts.map +1 -0
  74. package/vendor/cursor-sdk/dist/cjs/utils/conversation-utils.d.ts +3 -0
  75. package/vendor/cursor-sdk/dist/cjs/utils/conversation-utils.d.ts.map +1 -0
  76. package/vendor/cursor-sdk/dist/cjs/utils/logger.d.ts +12 -0
  77. package/vendor/cursor-sdk/dist/cjs/utils/logger.d.ts.map +1 -0
  78. package/vendor/cursor-sdk/dist/cjs/utils/message-schemas.d.ts +2 -0
  79. package/vendor/cursor-sdk/dist/cjs/utils/message-schemas.d.ts.map +1 -0
  80. package/vendor/cursor-sdk/dist/esm/642.index.js +1 -0
  81. package/vendor/cursor-sdk/dist/esm/agent.d.ts +170 -0
  82. package/vendor/cursor-sdk/dist/esm/agent.d.ts.map +1 -0
  83. package/vendor/cursor-sdk/dist/esm/analytics.d.ts +98 -0
  84. package/vendor/cursor-sdk/dist/esm/analytics.d.ts.map +1 -0
  85. package/vendor/cursor-sdk/dist/esm/artifacts.d.ts +6 -0
  86. package/vendor/cursor-sdk/dist/esm/artifacts.d.ts.map +1 -0
  87. package/vendor/cursor-sdk/dist/esm/cloud-agent.d.ts +47 -0
  88. package/vendor/cursor-sdk/dist/esm/cloud-agent.d.ts.map +1 -0
  89. package/vendor/cursor-sdk/dist/esm/cloud-api-client.d.ts +197 -0
  90. package/vendor/cursor-sdk/dist/esm/cloud-api-client.d.ts.map +1 -0
  91. package/vendor/cursor-sdk/dist/esm/cloud-executor.d.ts +14 -0
  92. package/vendor/cursor-sdk/dist/esm/cloud-executor.d.ts.map +1 -0
  93. package/vendor/cursor-sdk/dist/esm/cloud-mcp-utils.d.ts +4 -0
  94. package/vendor/cursor-sdk/dist/esm/cloud-mcp-utils.d.ts.map +1 -0
  95. package/vendor/cursor-sdk/dist/esm/core-adapter.d.ts +2 -0
  96. package/vendor/cursor-sdk/dist/esm/core-adapter.d.ts.map +1 -0
  97. package/vendor/cursor-sdk/dist/esm/errors.d.ts +135 -0
  98. package/vendor/cursor-sdk/dist/esm/errors.d.ts.map +1 -0
  99. package/vendor/cursor-sdk/dist/esm/executor-common.d.ts +16 -0
  100. package/vendor/cursor-sdk/dist/esm/executor-common.d.ts.map +1 -0
  101. package/vendor/cursor-sdk/dist/esm/executor-types.d.ts +65 -0
  102. package/vendor/cursor-sdk/dist/esm/executor-types.d.ts.map +1 -0
  103. package/vendor/cursor-sdk/dist/esm/index.d.ts +18 -0
  104. package/vendor/cursor-sdk/dist/esm/index.d.ts.map +1 -0
  105. package/vendor/cursor-sdk/dist/esm/index.js +8 -0
  106. package/vendor/cursor-sdk/dist/esm/index.js.LICENSE.txt +285 -0
  107. package/vendor/cursor-sdk/dist/esm/local-executor.d.ts +18 -0
  108. package/vendor/cursor-sdk/dist/esm/local-executor.d.ts.map +1 -0
  109. package/vendor/cursor-sdk/dist/esm/local-model-validation.d.ts +6 -0
  110. package/vendor/cursor-sdk/dist/esm/local-model-validation.d.ts.map +1 -0
  111. package/vendor/cursor-sdk/dist/esm/messages.d.ts +110 -0
  112. package/vendor/cursor-sdk/dist/esm/messages.d.ts.map +1 -0
  113. package/vendor/cursor-sdk/dist/esm/options.d.ts +145 -0
  114. package/vendor/cursor-sdk/dist/esm/options.d.ts.map +1 -0
  115. package/vendor/cursor-sdk/dist/esm/platform.d.ts +71 -0
  116. package/vendor/cursor-sdk/dist/esm/platform.d.ts.map +1 -0
  117. package/vendor/cursor-sdk/dist/esm/prefetched-blobs.d.ts +13 -0
  118. package/vendor/cursor-sdk/dist/esm/prefetched-blobs.d.ts.map +1 -0
  119. package/vendor/cursor-sdk/dist/esm/public-api.d.ts +12 -0
  120. package/vendor/cursor-sdk/dist/esm/public-api.d.ts.map +1 -0
  121. package/vendor/cursor-sdk/dist/esm/run-event-tailer.d.ts +33 -0
  122. package/vendor/cursor-sdk/dist/esm/run-event-tailer.d.ts.map +1 -0
  123. package/vendor/cursor-sdk/dist/esm/run-interaction-accumulator.d.ts +33 -0
  124. package/vendor/cursor-sdk/dist/esm/run-interaction-accumulator.d.ts.map +1 -0
  125. package/vendor/cursor-sdk/dist/esm/run.d.ts +44 -0
  126. package/vendor/cursor-sdk/dist/esm/run.d.ts.map +1 -0
  127. package/vendor/cursor-sdk/dist/esm/sdk-statsig.d.ts +10 -0
  128. package/vendor/cursor-sdk/dist/esm/sdk-statsig.d.ts.map +1 -0
  129. package/vendor/cursor-sdk/dist/esm/stubs.d.ts +98 -0
  130. package/vendor/cursor-sdk/dist/esm/stubs.d.ts.map +1 -0
  131. package/vendor/cursor-sdk/dist/esm/subagent-conversion.d.ts +22 -0
  132. package/vendor/cursor-sdk/dist/esm/subagent-conversion.d.ts.map +1 -0
  133. package/vendor/cursor-sdk/dist/esm/tool-call-utils.d.ts +7 -0
  134. package/vendor/cursor-sdk/dist/esm/tool-call-utils.d.ts.map +1 -0
  135. package/vendor/cursor-sdk/dist/esm/types/conversation-types.d.ts +12062 -0
  136. package/vendor/cursor-sdk/dist/esm/types/conversation-types.d.ts.map +1 -0
  137. package/vendor/cursor-sdk/dist/esm/types/delta-types.d.ts +2 -0
  138. package/vendor/cursor-sdk/dist/esm/types/delta-types.d.ts.map +1 -0
  139. package/vendor/cursor-sdk/dist/esm/types/tool-call-types.d.ts +2 -0
  140. package/vendor/cursor-sdk/dist/esm/types/tool-call-types.d.ts.map +1 -0
  141. package/vendor/cursor-sdk/dist/esm/utils/conversation-utils.d.ts +3 -0
  142. package/vendor/cursor-sdk/dist/esm/utils/conversation-utils.d.ts.map +1 -0
  143. package/vendor/cursor-sdk/dist/esm/utils/logger.d.ts +12 -0
  144. package/vendor/cursor-sdk/dist/esm/utils/logger.d.ts.map +1 -0
  145. package/vendor/cursor-sdk/dist/esm/utils/message-schemas.d.ts +2 -0
  146. package/vendor/cursor-sdk/dist/esm/utils/message-schemas.d.ts.map +1 -0
  147. package/vendor/cursor-sdk/package.json +77 -0
  148. package/vendor/cursor-sdk-linux-x64/README.md +5 -0
  149. package/vendor/cursor-sdk-linux-x64/bin/cursorsandbox +0 -0
  150. package/vendor/cursor-sdk-linux-x64/bin/rg +0 -0
  151. package/vendor/cursor-sdk-linux-x64/package.json +8 -0
  152. package/vendor/package/README.md +5 -0
  153. package/vendor/package/bin/cursorsandbox +0 -0
  154. package/vendor/package/bin/rg +0 -0
  155. package/vendor/package/package.json +25 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-types.d.ts","sourceRoot":"","sources":["../../../src/agent/types/conversation-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASjC,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "@anysphere/cursor-sdk-shared/delta-types";
2
+ //# sourceMappingURL=delta-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-types.d.ts","sourceRoot":"","sources":["../../../src/agent/types/delta-types.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "@anysphere/cursor-sdk-shared/tool-call-types";
2
+ //# sourceMappingURL=tool-call-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call-types.d.ts","sourceRoot":"","sources":["../../../src/agent/types/tool-call-types.ts"],"names":[],"mappings":"AAAA,cAAc,8CAA8C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ConversationTurn } from "../types/conversation-types.js";
2
+ export declare function getTurnType(turn: ConversationTurn): ConversationTurn["type"];
3
+ //# sourceMappingURL=conversation-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-utils.d.ts","sourceRoot":"","sources":["../../../src/agent/utils/conversation-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,wBAAgB,WAAW,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAE5E"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Internal logging utility for the cursor-sdk agent package.
3
+ * Logs are only output in local development builds when DEBUG=1 is set.
4
+ */
5
+ export declare const logger: {
6
+ log: (...args: any[]) => void;
7
+ error: (...args: any[]) => void;
8
+ warn: (...args: any[]) => void;
9
+ info: (...args: any[]) => void;
10
+ debug: (...args: any[]) => void;
11
+ };
12
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/agent/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,eAAO,MAAM,MAAM;mBACF,GAAG,EAAE,KAAG,IAAI;qBAKV,GAAG,EAAE,KAAG,IAAI;oBAKb,GAAG,EAAE,KAAG,IAAI;oBAKZ,GAAG,EAAE,KAAG,IAAI;qBAKX,GAAG,EAAE,KAAG,IAAI;CAK9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "@anysphere/cursor-sdk-shared/message-schemas";
2
+ //# sourceMappingURL=message-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-schemas.d.ts","sourceRoot":"","sources":["../../../src/agent/utils/message-schemas.ts"],"names":[],"mappings":"AAAA,cAAc,8CAA8C,CAAC"}
@@ -0,0 +1 @@
1
+ export const __webpack_esm_id__=642;export const __webpack_esm_ids__=[642];export const __webpack_esm_modules__={"./src/agent/cloud-agent.ts"(t,e,i){i.d(e,{archiveCloudAgent:()=>K,cancelCloudRun:()=>x,createCloudAgent:()=>A,deleteCloudAgent:()=>U,getCloudAgent:()=>E,getCloudMe:()=>T,getCloudRun:()=>N,listCloudAgents:()=>k,listCloudModels:()=>$,listCloudRepositories:()=>L,listCloudRuns:()=>M,resumeCloudAgent:()=>j,unarchiveCloudAgent:()=>P,validateCloudModelAvailability:()=>O}),i.r(e);var n=i("../cursor-sdk-local-runtime/dist/run-store/index.js"),s=i("./src/agent/analytics.ts"),o=i("./src/agent/cloud-api-client.ts"),r=i("./src/agent/errors.ts");function a(t){if(void 0===t)return;const e=[];for(const[i,n]of Object.entries(t))if("command"in n){if(void 0!==n.cwd)throw new r.j1(`Cloud MCP server "${i}" cannot include cwd.`);e.push(Object.assign({name:i},n))}else e.push(Object.assign({name:i},n));return e.length>0?e:void 0}var d=i("./src/agent/run-interaction-accumulator.ts"),u=i("./src/agent/subagent-conversion.ts"),l=i("./src/agent/tool-call-utils.ts"),c=i("./src/agent/types/delta-types.ts"),h=function(t,e,i,n){return new(i||(i=Promise))((function(s,o){function r(t){try{d(n.next(t))}catch(t){o(t)}}function a(t){try{d(n.throw(t))}catch(t){o(t)}}function d(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,a)}d((n=n.apply(t,e||[])).next())}))},v=function(t){return this instanceof v?(this.v=t,this):new v(t)};function f(t){if(""===t)throw new r.j1("API key is required for cloud operations. Caller passed an empty apiKey explicitly; refusing to fall back to CURSOR_API_KEY.",{isRetryable:!1,code:"unauthenticated"});const e=null!=t?t:process.env.CURSOR_API_KEY;if(!e)throw new r.j1("API key is required for cloud operations. Set CURSOR_API_KEY or pass apiKey.",{isRetryable:!1,code:"unauthenticated"});return e}const m=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function g(t){if(!t.startsWith("bc-")||!m.test(t.slice(3)))throw new r.j1("Agent ID must be in the format 'bc-<uuid>'",{isRetryable:!1})}function p(t){if(!t.startsWith("run-")||!m.test(t.slice(4)))throw new r.j1("Run ID must be in the format 'run-<uuid>'",{isRetryable:!1})}function y(t){switch(t){case"CREATING":case"RUNNING":return"running";case"FINISHED":return"finished";case"CANCELLED":return"cancelled";default:return"error"}}function w(t){return"running"===t||"completed"===t||"error"===t}const b=new Set(["assistant","thinking","tool_call"]);class _{constructor(){this.queue=[],this.waiters=[],this.closed=!1}push(t){if(this.closed)return;const e=this.waiters.shift();if(!e)return this.queue.length>=8192?(this.overflow=new r.LF("Cloud agent message buffer overflow; consumer is too slow",{code:"stream_buffer_overflow",errorName:"CursorSdkError"}),void(this.closed=!0)):void this.queue.push(t);e({value:t,done:!1})}close(){var t;if(!this.closed)for(this.closed=!0;this.waiters.length>0;)null===(t=this.waiters.shift())||void 0===t||t({value:void 0,done:!0})}stream(){return function(t,e,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,s=i.apply(t,e||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),r("next"),r("throw"),r("return",(function(t){return function(e){return Promise.resolve(e).then(t,u)}})),n[Symbol.asyncIterator]=function(){return this},n;function r(t,e){s[t]&&(n[t]=function(e){return new Promise((function(i,n){o.push([t,e,i,n])>1||a(t,e)}))},e&&(n[t]=e(n[t])))}function a(t,e){try{(i=s[t](e)).value instanceof v?Promise.resolve(i.value.v).then(d,u):l(o[0][2],i)}catch(t){l(o[0][3],t)}var i}function d(t){a("next",t)}function u(t){a("throw",t)}function l(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}(this,arguments,(function*(){for(;;){const t=this.queue.shift();if(t){yield yield v(t);continue}if(this.overflow)throw this.overflow;if(this.closed)return yield v(void 0);const e=yield v(new Promise((t=>{this.waiters.push(t)})));if(e.done)return yield v(void 0);yield yield v(e.value)}}))}}const I=new Set(["unauthorized","forbidden","not_found"]);function S(t,e){return h(this,void 0,void 0,(function*(){t<=0||(null==e?void 0:e.aborted)||(yield new Promise((i=>{const n=setTimeout((()=>{null==e||e.removeEventListener("abort",s),i()}),t),s=()=>{clearTimeout(n),i()};null==e||e.addEventListener("abort",s,{once:!0})})))}))}class R{constructor(t,e,i,n){this.client=t,this.buffer=new _,this.listeners=new Set,this.streamStarted=!1,this.emittedLegacyFrameIds=new Set,this.id=e.id,this.agentId=e.agentId,this._status=y(e.status),this.createdAt=Date.parse(e.createdAt);const s=(0,o.O)(e);this._result=s.result,this._durationMs=s.durationMs,this._git=s.git,this._model=n,this.sendOptions=i}get status(){return this._status}get result(){return this._result}get durationMs(){return this._durationMs}get git(){return this._git}get model(){return this._model}supports(t){return"stream"===t||"wait"===t||"cancel"===t||"conversation"===t}unsupportedReason(t){if(!this.supports(t))return`Unknown run operation "${t}"`}stream(){try{return this.ensureStreamStarted(),this.buffer.stream()}catch(t){throw(0,r.Nt)(t,{operation:"run.stream"})}}conversation(){return h(this,void 0,void 0,(function*(){var t,e;try{this.ensureStreamStarted();try{yield this.streamPromise}catch(t){}return null!==(e=null===(t=this.accumulator)||void 0===t?void 0:t.conversation())&&void 0!==e?e:[]}catch(t){throw(0,r.Nt)(t,{operation:"run.conversation"})}}))}wait(){return h(this,void 0,void 0,(function*(){try{if("running"!==this._status)return this.buildResult();this.ensureStreamStarted();try{yield this.streamPromise}catch(t){"running"===this._status&&this.setStatus("error")}return this.buildResult()}catch(t){throw(0,r.Nt)(t,{operation:"run.wait"})}}))}cancel(){return h(this,void 0,void 0,(function*(){var t;try{if("cancelled"===this._status)return;yield this.client.cancelRun({agentId:this.agentId,runId:this.id}),null===(t=this.abortController)||void 0===t||t.abort(),this.setStatus("cancelled")}catch(t){throw(0,r.Nt)(t,{operation:"run.cancel"})}}))}onDidChangeStatus(t){return this.listeners.add(t),()=>this.listeners.delete(t)}abortClientStream(){var t;null===(t=this.abortController)||void 0===t||t.abort()}disposeClientStream(){return h(this,void 0,void 0,(function*(){this.abortClientStream(),void 0!==this.streamPromise&&(yield function(t){return h(this,void 0,void 0,(function*(){let e;try{yield Promise.race([t.catch((()=>{})),new Promise((t=>{var i;e=setTimeout(t,2e3),null===(i=e.unref)||void 0===i||i.call(e)}))])}finally{void 0!==e&&clearTimeout(e)}}))}(this.streamPromise))}))}ensureStreamStarted(){var t,e;if(this.streamStarted)return;this.streamStarted=!0,this.abortController=new AbortController;const i=new d.e4({onDelta:null===(t=this.sendOptions)||void 0===t?void 0:t.onDelta,onStep:null===(e=this.sendOptions)||void 0===e?void 0:e.onStep});this.accumulator=i,this.streamPromise=this.runStreamLoop(i,this.abortController.signal),this.streamPromise.catch((()=>{}))}runStreamLoop(t,e){return h(this,void 0,void 0,(function*(){let i=0;const n=Date.now()+72e5;try{do{const o=yield this.runOneStreamAttempt(t,e);if(e.aborted)break;if("received-result"===o)break;if(yield this.refetchAndSync(),e.aborted||"running"!==this._status)break;if(Date.now()>=n)break;if(i>=6){yield this.pollRunUntilTerminal(e,n);break}const r=Math.min((s=i,Math.min(3e4,1e3*Math.pow(2,s))),Math.max(0,n-Date.now()));i++,yield S(r,e)}while("running"===this._status&&!e.aborted);"running"===this._status&&Date.now()>=n&&this.setStatus("error"),"finished"===this._status&&(yield t.flushPendingStep())}finally{this.buffer.close()}var s}))}runOneStreamAttempt(t,e){return h(this,void 0,void 0,(function*(){const i=this.lastEventId;let n=!1;try{const i=yield this.client.streamRun(Object.assign({agentId:this.agentId,runId:this.id,signal:e},void 0!==this.lastEventId?{lastEventId:this.lastEventId}:{}));yield function(t,e,i,n,s){return h(this,void 0,void 0,(function*(){var a,d,u,h,v,f,m,g;const p=t.body.getReader(),_=new TextDecoder;let S="";try{for(;;){if(null==s?void 0:s.aborted)return;const{value:t,done:R}=yield p.read();if(R)break;S+=_.decode(t,{stream:!0});let C=S.indexOf("\n\n");for(;-1!==C;){const t=S.slice(0,C);S=S.slice(C+2),C=S.indexOf("\n\n");const s=t.split("\n");let _,R;const A=[];for(const t of s)t.startsWith("id: ")?R=t.slice(4).trim():t.startsWith("event: ")?_=t.slice(7).trim():t.startsWith("data: ")&&A.push(t.slice(6));if(void 0!==R&&R.length>0&&(void 0===_||!b.has(_))&&(null===(a=n.onEventId)||void 0===a||a.call(n,R)),"done"===_)return void(yield p.cancel());if(0===A.length)continue;const O=A.join("\n");let j;try{j=JSON.parse(O)}catch(t){throw new r.Dr(`Malformed SSE event: ${O}`,{isRetryable:!0})}if(_&&(!b.has(_)||void 0===R||!1!==(null===(d=n.shouldEmitLegacyFrame)||void 0===d?void 0:d.call(n,R))))switch(_){case"assistant":{const t=(0,l.u)(j)?j:{};n.onMessage({type:"assistant",agent_id:e,run_id:i,message:{role:"assistant",content:[{type:"text",text:null!==(u=t.text)&&void 0!==u?u:""}]}});break}case"thinking":{const t=(0,l.u)(j)?j:{};n.onMessage({type:"thinking",agent_id:e,run_id:i,text:null!==(h=t.text)&&void 0!==h?h:""});break}case"tool_call":{const t=(0,l.u)(j)?j:{},s=(0,l.u)(t.data)?t.data:t,o=w(s.status)?s.status:"running",r="string"==typeof s.callId?s.callId:"",a="string"==typeof s.name?s.name:"unknown";n.onMessage(Object.assign(Object.assign(Object.assign({type:"tool_call",agent_id:e,run_id:i,call_id:r,name:a,status:o},"args"in s?{args:s.args}:{}),"result"in s?{result:s.result}:{}),(0,l.D)(s.truncated)?{truncated:s.truncated}:{}));break}case"interaction_update":{if(void 0===n.onInteractionUpdate)break;const t=c.Zs.safeParse(j);if(!t.success)break;yield n.onInteractionUpdate(t.data);break}case"status":{const t=((0,l.u)(j)?j:{}).status;t&&(null===(v=n.onStatusChange)||void 0===v||v.call(n,y(t)),n.onMessage({type:"status",agent_id:e,run_id:i,status:t}));break}case"result":if((0,l.u)(j)){const t=j,e=Object.assign(Object.assign({},t),"string"==typeof t.text&&void 0===t.result?{result:t.text}:{});null===(f=n.onResult)||void 0===f||f.call(n,(0,o.O)(e))}return void(yield p.cancel());case"heartbeat":break;case"error":{const t=(0,l.u)(j)?j:{},e=null!==(m=t.code)&&void 0!==m?m:"UNKNOWN",i=null!==(g=t.message)&&void 0!==g?g:"Unknown error";if(I.has(e))throw new r.j1(`[${e}] ${i}`,{code:e,isRetryable:!1});throw new r.c$(`[${e}] ${i}`,{code:e,isRetryable:!1})}}}}}catch(t){if((null==s?void 0:s.aborted)||"object"==typeof t&&null!==t&&"name"in t&&"AbortError"===t.name)return;throw t}finally{try{yield p.cancel()}catch(t){}}}))}(i,this.agentId,this.id,{onMessage:t=>this.buffer.push(t),onResult:t=>{var e;this._result=t.result,this._durationMs=t.durationMs,this._git=t.git,this.setStatus(y(null!==(e=t.status)&&void 0!==e?e:"FINISHED")),n=!0},onStatusChange:t=>{"running"===t&&this.setStatus(t)},onInteractionUpdate:e=>t.apply(e),onEventId:t=>{this.lastEventId=t,this.emittedLegacyFrameIds.clear()},shouldEmitLegacyFrame:t=>!this.emittedLegacyFrameIds.has(t)&&(this.emittedLegacyFrameIds.add(t),!0)},e)}catch(t){if(function(t){return t instanceof Error&&t.message.startsWith("[invalid_last_event_id]")}(t))this.lastEventId===i&&(this.lastEventId=void 0);else if(function(t){if(t instanceof r.v3||t instanceof r.j1)return!0;if(t instanceof Error){const e=/^\[([a-z_]+)\]/.exec(t.message);if(null!==e&&I.has(e[1]))return!0}return!1}(t))throw"running"===this._status&&this.setStatus("error"),t}return n?"received-result":"stream-dropped"}))}pollRunUntilTerminal(t,e){return h(this,void 0,void 0,(function*(){for(;"running"===this._status&&!t.aborted;){const i=e-Date.now();if(i<=0)return void this.setStatus("error");if(yield S(Math.min(15e3,i),t),t.aborted)return;yield this.refetchAndSync()}}))}setStatus(t){if(this._status!==t){this._status=t;for(const e of this.listeners)e(t)}}refetchAndSync(){return h(this,void 0,void 0,(function*(){let t;try{t=yield this.client.getRun({agentId:this.agentId,runId:this.id})}catch(t){if(t instanceof r.v3||t instanceof r.j1)throw"running"===this._status&&this.setStatus("error"),t;return}const e=(0,o.O)(t);void 0!==e.result&&(this._result=e.result),void 0!==e.durationMs&&(this._durationMs=e.durationMs),void 0!==e.git&&(this._git=e.git),"running"===this._status&&this.setStatus(y(t.status))}))}buildResult(){const t="running"===this._status?"error":this._status;return Object.assign(Object.assign(Object.assign(Object.assign({id:this.id,status:t},void 0!==this._result?{result:this._result}:{}),void 0!==this._model?{model:this._model}:{}),void 0!==this._durationMs?{durationMs:this._durationMs}:{}),void 0!==this._git?{git:this._git}:{})}}class C{constructor(t,e,i,n){this.client=e,this.options=i,this.activeRuns=new Set,this.agentId=t,this.serverCreated=n,this._model=i.model}get model(){return this._model}send(t,e){return h(this,void 0,void 0,(function*(){var i,n,o,d,l,c,h,v,f,m,g,p,y,w,b,_,I,S,C;try{const A=function(t){var e;return"string"==typeof t?{text:t}:{text:t.text,images:null===(e=t.images)||void 0===e?void 0:e.map((t=>"url"in t?{url:t.url,dimension:t.dimension}:{data:t.data,mimeType:t.mimeType,dimension:t.dimension}))}}(t),O=!this.serverCreated,j=null!==(i=null==e?void 0:e.mcpServers)&&void 0!==i?i:this.options.mcpServers,k=null!==(n=null==e?void 0:e.model)&&void 0!==n?n:this._model,M=void 0!==(null==e?void 0:e.onStep)||void 0!==(null==e?void 0:e.onDelta)?Object.assign(Object.assign({},void 0!==e.onStep?{onStep:e.onStep}:{}),void 0!==e.onDelta?{onDelta:e.onDelta}:{}):void 0;let N;if(O){const t=(0,u.SB)(this.options.agents),i=void 0!==(null===(o=this.options.cloud)||void 0===o?void 0:o.envVars),n=yield this.client.createAgent(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i?{}:{agentId:this.agentId}),{prompt:A}),void 0!==k?{model:k}:{}),void 0!==this.options.name?{name:this.options.name}:{}),{mcpServers:a(j)}),void 0!==t?{customSubagents:t}:{}),{env:null===(d=this.options.cloud)||void 0===d?void 0:d.env,envVars:null===(l=this.options.cloud)||void 0===l?void 0:l.envVars,repos:null===(c=this.options.cloud)||void 0===c?void 0:c.repos,workOnCurrentBranch:null===(h=this.options.cloud)||void 0===h?void 0:h.workOnCurrentBranch,autoCreatePR:null===(v=this.options.cloud)||void 0===v?void 0:v.autoCreatePR,skipReviewerRequest:null===(f=this.options.cloud)||void 0===f?void 0:f.skipReviewerRequest}),{idempotencyKey:null!==(m=null==e?void 0:e.idempotencyKey)&&void 0!==m?m:this.options.idempotencyKey});if(i)this.agentId=n.agent.id;else if(n.agent.id!==this.agentId)throw new r.c$(`Server returned mismatched agent id "${n.agent.id}"; expected "${this.agentId}". This indicates a backend bug.`,{isRetryable:!1});this.serverCreated=!0,N=new R(this.client,n.run,M,k)}else{const t=yield this.client.createRun(this.agentId,Object.assign({prompt:A,mcpServers:a(j)},void 0!==(null==e?void 0:e.model)?{model:e.model}:{}),{idempotencyKey:null==e?void 0:e.idempotencyKey});N=new R(this.client,t.run,M,k)}void 0!==(null==e?void 0:e.model)&&(this._model=e.model);const x=null!==(y=null===(p=null===(g=this.options.cloud)||void 0===g?void 0:g.env)||void 0===p?void 0:p.type)&&void 0!==y?y:"cloud",D=null==k?void 0:k.params;(0,s.Zn)(this.options.apiKey,Object.assign(Object.assign({agent_id:this.agentId,run_id:N.id,runtime:x,model:null!==(w=null==k?void 0:k.id)&&void 0!==w?w:"default"},D&&D.length>0?{model_params:JSON.stringify(D)}:{}),{prompt_length:A.text.length,has_images:(null!==(_=null===(b=A.images)||void 0===b?void 0:b.length)&&void 0!==_?_:0)>0,is_resume:!O,mcp_server_count:Object.keys(null!=j?j:{}).length,cloud_repo_count:null===(S=null===(I=this.options.cloud)||void 0===I?void 0:I.repos)||void 0===S?void 0:S.length,cloud_auto_create_pr:null===(C=this.options.cloud)||void 0===C?void 0:C.autoCreatePR})),this.activeRuns.add(N);const E=this.options.apiKey,K=this.agentId,P=N.id;return N.wait().then((t=>{(0,s.G5)(E,{agent_id:K,run_id:P,runtime:x,end_reason:"finished"===t.status?"success":"cancelled"===t.status?"abort":"error"})})).finally((()=>{this.activeRuns.delete(N)})),N.ensureStreamStarted(),N}catch(t){throw(0,r.Nt)(t,{operation:"agent.send"})}}))}close(){for(const t of this.activeRuns)t.abortClientStream();(0,s.rd)()}reload(){return h(this,void 0,void 0,(function*(){}))}[Symbol.asyncDispose](){return h(this,void 0,void 0,(function*(){yield Promise.allSettled(Array.from(this.activeRuns,(t=>t.disposeClientStream()))),yield(0,s.rd)()}))}listArtifacts(){return h(this,void 0,void 0,(function*(){try{return this.serverCreated?(yield this.client.listArtifacts(this.agentId)).items.map((t=>({path:t.path,sizeBytes:t.sizeBytes,updatedAt:t.updatedAt}))):[]}catch(t){throw(0,r.Nt)(t,{operation:"agent.listArtifacts"})}}))}downloadArtifact(t){return h(this,void 0,void 0,(function*(){try{if(!this.serverCreated)throw new r.j1("Agent has not been created yet; call send() first.",{isRetryable:!1});const{url:e}=yield this.client.getArtifactDownloadUrl({agentId:this.agentId,path:t});let i;try{i=yield fetch(e)}catch(t){throw new r.Dr("Failed to download artifact",{cause:t,isRetryable:!0})}if(!i.ok)throw new r.Dr(`Failed to download artifact: ${i.status}`,{status:i.status,isRetryable:i.status>=500});return Buffer.from(yield i.arrayBuffer())}catch(t){throw(0,r.Nt)(t,{operation:"agent.downloadArtifact"})}}))}}function A(t){var e,i;const s=f(t.apiKey);if(void 0!==t.agentId&&void 0!==(null===(e=t.cloud)||void 0===e?void 0:e.envVars))throw new r.j1("cloud.envVars cannot be combined with agentId; omit agentId so the server can mint an agent id.",{isRetryable:!1});const a=new o.N(s),d=null!==(i=t.agentId)&&void 0!==i?i:(0,n.M2)();return new C(d,a,t,!1)}function O(t){return h(this,arguments,void 0,(function*({apiKey:t,model:e}){const i="string"==typeof e?e.trim():e.id.trim();if(0===i.length)throw new r.j1("Model id is required. Pass a non-empty `model.id` or `model: '<model-id>'`.",{isRetryable:!1,code:"invalid_model"});let n,s;try{n=f(t)}catch(t){if(t instanceof r.j1)return;throw t}try{s=(yield new o.N(n).listModels()).items}catch(t){if(t instanceof r.Dr||t instanceof r.v3||t instanceof r.OE)return;throw t}const a=s.some((t=>{var e;return t.id===i||!0===(null===(e=t.aliases)||void 0===e?void 0:e.includes(i))}));if(!a)throw new r.j1(`Model '${i}' is not available or invalid. Call Cursor.models.list() to see valid model ids.`,{isRetryable:!1,code:"invalid_model"})}))}function j(t,e){const i=f(e.apiKey),n=new o.N(i);return new C(t,n,Object.assign({},e),!0)}function k(t){return h(this,void 0,void 0,(function*(){const e=f(t.apiKey),i=new o.N(e),n=yield i.listAgents({limit:t.limit,cursor:t.cursor,prUrl:t.prUrl,includeArchived:t.includeArchived});return{items:n.items.map(D),nextCursor:n.nextCursor}}))}function M(t,e){return h(this,void 0,void 0,(function*(){const i=f(e.apiKey),n=new o.N(i),s=yield n.listRuns(t,{limit:e.limit,cursor:e.cursor});return{items:s.items.map((t=>new R(n,t))),nextCursor:s.nextCursor}}))}function N(t,e){return h(this,void 0,void 0,(function*(){p(t),g(e.agentId);const i=f(e.apiKey),n=new o.N(i),s=yield n.getRun({agentId:e.agentId,runId:t});return new R(n,s)}))}function x(t,e){return h(this,void 0,void 0,(function*(){p(t),g(e.agentId);const i=f(e.apiKey),n=new o.N(i);yield n.cancelRun({agentId:e.agentId,runId:t})}))}function D(t){var e,i,n;return{agentId:t.id,name:null!==(e=t.name)&&void 0!==e?e:"",summary:null!==(i=t.name)&&void 0!==i?i:"",lastModified:new Date(t.updatedAt).getTime(),createdAt:new Date(t.createdAt).getTime(),archived:"ARCHIVED"===t.status,runtime:"cloud",env:t.env,repos:null===(n=t.repos)||void 0===n?void 0:n.map((t=>t.url))}}function E(t,e){return h(this,void 0,void 0,(function*(){const i=f(e.apiKey),n=new o.N(i);return D(yield n.getAgent(t))}))}function K(t,e){return h(this,void 0,void 0,(function*(){const i=f(e.apiKey),n=new o.N(i);yield n.archiveAgent(t)}))}function P(t,e){return h(this,void 0,void 0,(function*(){const i=f(e.apiKey),n=new o.N(i);yield n.unarchiveAgent(t)}))}function U(t,e){return h(this,void 0,void 0,(function*(){const i=f(e.apiKey),n=new o.N(i);yield n.deleteAgent(t)}))}function T(t){return h(this,void 0,void 0,(function*(){const e=f(t.apiKey);return new o.N(e).getMe()}))}function $(t){return h(this,void 0,void 0,(function*(){const e=f(t.apiKey),i=new o.N(e);return(yield i.listModels()).items}))}function L(t){return h(this,void 0,void 0,(function*(){const e=f(t.apiKey),i=new o.N(e);return(yield i.listRepositories()).items}))}}};
@@ -0,0 +1,170 @@
1
+ import type { McpServerConfig, ModelListItem, ModelSelection, SDKUserMessage } from "./options.js";
2
+ import type { Run } from "./run.js";
3
+ import type { ConversationStep } from "./types/conversation-types.js";
4
+ import type { InteractionUpdate } from "./types/delta-types.js";
5
+ export interface SDKAgent {
6
+ readonly agentId: string;
7
+ /**
8
+ * The agent's current model selection. Updated after each successful
9
+ * `send({ model })`; `undefined` until something sets it.
10
+ */
11
+ readonly model: ModelSelection | undefined;
12
+ send(message: string | SDKUserMessage, options?: SendOptions): Promise<Run>;
13
+ close(): void;
14
+ reload(): Promise<void>;
15
+ [Symbol.asyncDispose](): Promise<void>;
16
+ listArtifacts(): Promise<import("./artifacts.js").SDKArtifact[]>;
17
+ downloadArtifact(path: string): Promise<Buffer>;
18
+ }
19
+ export interface SendOptions {
20
+ model?: ModelSelection;
21
+ mcpServers?: Record<string, McpServerConfig>;
22
+ onStep?: (args: {
23
+ step: ConversationStep;
24
+ }) => void | Promise<void>;
25
+ onDelta?: (args: {
26
+ update: InteractionUpdate;
27
+ }) => void | Promise<void>;
28
+ /**
29
+ * Per-send options that only apply to local agents. Nested to make the
30
+ * local-only scope explicit at the type level — cloud callers cannot
31
+ * pass these fields.
32
+ */
33
+ local?: {
34
+ /**
35
+ * Expire the currently active persisted run, if any, before starting
36
+ * this message as a new follow-up run. Recovery path for local agents
37
+ * left wedged after a crashed CLI process. Cloud enforces a busy-run
38
+ * check server-side (`409 agent_busy`), so no equivalent is needed.
39
+ */
40
+ force?: boolean;
41
+ };
42
+ idempotencyKey?: string;
43
+ }
44
+ export type ListAgentsOptions = {
45
+ limit?: number;
46
+ cursor?: string;
47
+ } & ({
48
+ runtime?: undefined;
49
+ } | {
50
+ runtime: "local";
51
+ cwd?: string;
52
+ } | {
53
+ runtime: "cloud";
54
+ prUrl?: string;
55
+ includeArchived?: boolean;
56
+ apiKey?: string;
57
+ });
58
+ export interface ListResult<T> {
59
+ items: T[];
60
+ nextCursor?: string;
61
+ }
62
+ export type SDKAgentInfo = {
63
+ agentId: string;
64
+ name: string;
65
+ summary: string;
66
+ lastModified: number;
67
+ status?: "running" | "finished" | "error";
68
+ createdAt?: number;
69
+ /**
70
+ * True when the agent has been archived via `Agent.archive(...)`. Distinct
71
+ * from `status` (which reflects the most recent run's execution state).
72
+ * Backwards-compatible optional field; undefined on older shapes.
73
+ */
74
+ archived?: boolean;
75
+ } & ({
76
+ runtime?: undefined;
77
+ } | {
78
+ runtime: "local";
79
+ cwd?: string;
80
+ } | {
81
+ runtime: "cloud";
82
+ env?: {
83
+ type: "cloud" | "pool" | "machine";
84
+ name?: string;
85
+ };
86
+ repos?: string[];
87
+ });
88
+ export type ListRunsOptions = {
89
+ limit?: number;
90
+ cursor?: string;
91
+ } & ({
92
+ runtime?: "local";
93
+ cwd?: string;
94
+ } | {
95
+ runtime: "cloud";
96
+ apiKey?: string;
97
+ });
98
+ export interface GetAgentMessagesOptions {
99
+ limit?: number;
100
+ offset?: number;
101
+ runtime?: "local";
102
+ cwd?: string;
103
+ }
104
+ export type GetRunOptions = {
105
+ runtime?: "local";
106
+ cwd?: string;
107
+ } | {
108
+ runtime: "cloud";
109
+ agentId: string;
110
+ apiKey?: string;
111
+ };
112
+ export interface AgentMessage {
113
+ type: "user" | "assistant";
114
+ uuid: string;
115
+ agent_id: string;
116
+ message: unknown;
117
+ }
118
+ /**
119
+ * Options for `Agent.get` / `Agent.archive` / `Agent.unarchive` /
120
+ * `Agent.delete`.
121
+ *
122
+ * Runtime is auto-detected from the agent ID: IDs that start with `"bc-"`
123
+ * route to the Cursor cloud API, everything else routes to the local store.
124
+ *
125
+ * - `cwd` is used when routing to the local store (defaults to `process.cwd()`).
126
+ * - `apiKey` is used when routing to the cloud API (falls back to
127
+ * `process.env.CURSOR_API_KEY`).
128
+ */
129
+ export interface GetAgentOptions {
130
+ cwd?: string;
131
+ apiKey?: string;
132
+ }
133
+ export interface AgentOperationOptions {
134
+ cwd?: string;
135
+ apiKey?: string;
136
+ }
137
+ /**
138
+ * Options for cloud-only account/catalog operations (Cursor.me, Cursor.models.list,
139
+ * Cursor.repositories.list). If `apiKey` is omitted, falls back to
140
+ * `process.env.CURSOR_API_KEY`.
141
+ */
142
+ export interface CursorRequestOptions {
143
+ apiKey?: string;
144
+ }
145
+ export interface SDKUser {
146
+ /** Display name of the API key used to authenticate the request. */
147
+ apiKeyName: string;
148
+ /**
149
+ * Numeric Cursor user id of the API key's owner. `undefined` for team /
150
+ * service-account API keys, which aren't tied to a specific user.
151
+ */
152
+ userId?: number;
153
+ /** Email of the user that owns the API key, when available. */
154
+ userEmail?: string;
155
+ /** First name of the user that owns the API key, when available. */
156
+ userFirstName?: string;
157
+ /** Last name of the user that owns the API key, when available. */
158
+ userLastName?: string;
159
+ /** ISO 8601 timestamp of when the API key was created. */
160
+ createdAt: string;
161
+ }
162
+ export interface SDKRepository {
163
+ url: string;
164
+ }
165
+ /**
166
+ * An entry returned by `Cursor.models.list()`. The `model` field is a
167
+ * canonical `{ id, params }` that can be passed straight to `createAgent`.
168
+ */
169
+ export type SDKModel = ModelListItem;
170
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACd,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE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EAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { type TokenProvider } from "@anysphere/analytics-client";
2
+ /**
3
+ * Drains buffered SDK analytics events for every apiKey that has emitted
4
+ * anything in this process. Called from `agent[Symbol.asyncDispose]()`.
5
+ *
6
+ * `timeoutMs` bounds the wait; if the RPC hangs, flush aborts via the
7
+ * internal AbortController and returns. Never throws.
8
+ */
9
+ export declare function flushSdkAnalytics(timeoutMs?: number): Promise<void>;
10
+ export declare function __resetAnalyticsForTests(): void;
11
+ /**
12
+ * Four dispatch targets, flattened into one field so a single
13
+ * `WHERE runtime = 'X'` or `WHERE runtime != 'local'` query covers both
14
+ * "which execution environment?" and "is this local?" questions without
15
+ * awkwardly repeating "cloud" at two nesting levels.
16
+ */
17
+ export type SdkRuntime = "local" | "cloud" | "pool" | "machine";
18
+ /**
19
+ * Base props auto-merged into every SDK event by the analytics wrapper.
20
+ * Callers never pass these. Kept as an interface (not derived) so the DBT
21
+ * generator at `scripts/generate-dbt-from-analytics-types.ts` can resolve
22
+ * them — its AST walker only looks at interface declarations in the same
23
+ * source file.
24
+ */
25
+ export interface SdkAnalyticsBaseProps {
26
+ /** Runtime surface emitting telemetry. Always "sdk" for this package. */
27
+ surface: "sdk";
28
+ /** Version of @cursor/sdk that emitted the event. */
29
+ sdk_version: string;
30
+ /** Node process.platform (e.g., "darwin", "linux", "win32"). */
31
+ os_platform: string;
32
+ /** Node process.arch (e.g., "x64", "arm64"). */
33
+ os_arch: string;
34
+ }
35
+ export interface SdkRunCreatedProps {
36
+ agent_id: string;
37
+ run_id: string;
38
+ runtime: SdkRuntime;
39
+ model: string;
40
+ /**
41
+ * JSON-encoded `ModelSelection.params` (`[{ id, value }, ...]`) when the
42
+ * caller supplied any. Omitted when no params were set.
43
+ */
44
+ model_params?: string;
45
+ prompt_length: number;
46
+ has_images: boolean;
47
+ is_resume: boolean;
48
+ mcp_server_count: number;
49
+ cloud_repo_count?: number;
50
+ cloud_auto_create_pr?: boolean;
51
+ }
52
+ export interface SdkRunCompletedProps {
53
+ agent_id: string;
54
+ run_id: string;
55
+ runtime: SdkRuntime;
56
+ end_reason: "success" | "error" | "abort";
57
+ }
58
+ export interface SdkRunSendLatencyProps {
59
+ agent_id: string;
60
+ run_id: string;
61
+ runtime: SdkRuntime;
62
+ is_resume: boolean;
63
+ is_first_send_after_resume: boolean;
64
+ cold_executor: boolean;
65
+ executor_acquire_ms: number;
66
+ load_latest_ms: number;
67
+ get_blob_store_ms: number;
68
+ pre_send_ms: number;
69
+ time_to_first_message_ms?: number;
70
+ terminated_reason: "success" | "error" | "abort" | "hang_timeout";
71
+ turn_count: number;
72
+ }
73
+ export interface SdkExecutorStartupProps {
74
+ runtime: SdkRuntime;
75
+ ensure_ghost_mode_ms: number;
76
+ bootstrap_statsig_ms: number;
77
+ create_workspace_runtime_ms: number;
78
+ load_sandbox_policy_ms: number;
79
+ total_ms: number;
80
+ }
81
+ /**
82
+ * Schema consumed by the DBT generator. The runtime emit path in this file
83
+ * auto-merges SdkAnalyticsBaseProps into every event, so this intersection
84
+ * mirrors the actual wire shape and generates the right SQL columns.
85
+ *
86
+ * Do not reference this from runtime code — it exists purely for dbt.
87
+ */
88
+ export type SdkAnalyticsEventSchema = {
89
+ "sdk.run.created": SdkAnalyticsBaseProps & SdkRunCreatedProps;
90
+ "sdk.run.completed": SdkAnalyticsBaseProps & SdkRunCompletedProps;
91
+ "sdk.run.send_latency": SdkAnalyticsBaseProps & SdkRunSendLatencyProps;
92
+ "sdk.executor.startup": SdkAnalyticsBaseProps & SdkExecutorStartupProps;
93
+ };
94
+ export declare function trackSdkRunCreated(apiKey: string | undefined, props: SdkRunCreatedProps): void;
95
+ export declare function trackSdkRunCompleted(apiKey: string | undefined, props: SdkRunCompletedProps): void;
96
+ export declare function trackSdkRunSendLatency(apiKey: string | undefined, props: SdkRunSendLatencyProps): void;
97
+ export type { TokenProvider };
98
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/agent/analytics.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAgGrC;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,GAAE,MAAa,GACvB,OAAO,CAAC,IAAI,CAAC,CAGf;AAGD,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,OAAO,EAAE,KAAK,CAAC;IACf,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAA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MAAM,GAAG,SAAS,EAC1B,KAAK,EAAE,oBAAoB,GAC1B,IAAI,CAEN;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,KAAK,EAAE,sBAAsB,GAC5B,IAAI,CAEN;AAID,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface SDKArtifact {
2
+ path: string;
3
+ sizeBytes: number;
4
+ updatedAt: string;
5
+ }
6
+ //# sourceMappingURL=artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/agent/artifacts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,47 @@
1
+ import type { AgentOperationOptions, CursorRequestOptions, GetAgentOptions, GetRunOptions, ListAgentsOptions, ListResult, ListRunsOptions, SDKAgent, SDKAgentInfo, SDKModel, SDKRepository, SDKUser } from "./agent.js";
2
+ import type { AgentOptions, ModelSelection } from "./options.js";
3
+ import type { Run } from "./run.js";
4
+ export declare function createCloudAgent(options: AgentOptions): SDKAgent;
5
+ /**
6
+ * Pre-flight check that `model` is in the catalog returned by
7
+ * `Cursor.models.list()`. Surfaces bogus-model failures at create time
8
+ * instead of mid-stream during the first `send()`.
9
+ *
10
+ * If the catalog call fails with a `NetworkError`, `AuthenticationError`,
11
+ * or `RateLimitError` the check is best-effort-skipped — the user has
12
+ * bigger problems than a bad model id, and backend `validateModelSelection`
13
+ * becomes the source of truth in that case. Other error classes (programmer
14
+ * errors, ApiError 5xx, unexpected throws) propagate so they aren't
15
+ * silently lost.
16
+ *
17
+ * NOTE: today `createDefaultAgent` is the only caller; `createCloudAgent`
18
+ * does not invoke this helper itself, so direct cloud-agent callers bypass
19
+ * the pre-flight. P3.4 of the structural review tracks moving the call into
20
+ * `createCloudAgent` itself, but that turns it into an async constructor and
21
+ * touches every `createCloudAgent` call site. Deferred to its own PR.
22
+ */
23
+ export declare function validateCloudModelAvailability({ apiKey, model, }: {
24
+ apiKey: string | undefined;
25
+ model: ModelSelection | string;
26
+ }): Promise<void>;
27
+ export declare function resumeCloudAgent(agentId: string, options: Partial<AgentOptions>): SDKAgent;
28
+ export declare function listCloudAgents(options: Extract<ListAgentsOptions, {
29
+ runtime: "cloud";
30
+ }>): Promise<ListResult<SDKAgentInfo>>;
31
+ export declare function listCloudRuns(agentId: string, options: Extract<ListRunsOptions, {
32
+ runtime: "cloud";
33
+ }>): Promise<ListResult<Run>>;
34
+ export declare function getCloudRun(runId: string, options: Extract<GetRunOptions, {
35
+ runtime: "cloud";
36
+ }>): Promise<Run>;
37
+ export declare function cancelCloudRun(runId: string, options: Extract<GetRunOptions, {
38
+ runtime: "cloud";
39
+ }>): Promise<void>;
40
+ export declare function getCloudAgent(agentId: string, options: GetAgentOptions): Promise<SDKAgentInfo>;
41
+ export declare function archiveCloudAgent(agentId: string, options: AgentOperationOptions): Promise<void>;
42
+ export declare function unarchiveCloudAgent(agentId: string, options: AgentOperationOptions): Promise<void>;
43
+ export declare function deleteCloudAgent(agentId: string, options: AgentOperationOptions): Promise<void>;
44
+ export declare function getCloudMe(options: CursorRequestOptions): Promise<SDKUser>;
45
+ export declare function listCloudModels(options: CursorRequestOptions): Promise<SDKModel[]>;
46
+ export declare function listCloudRepositories(options: CursorRequestOptions): Promise<SDKRepository[]>;
47
+ //# sourceMappingURL=cloud-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-agent.d.ts","sourceRoot":"","sources":["../../src/agent/cloud-agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,aAAa,EACb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