@stacklink/sdk 0.6.3 → 0.6.5

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 (35) hide show
  1. package/README.md +16 -0
  2. package/compatibility.json +1 -1
  3. package/dist/src/domain/billing-plans.d.ts +139 -10
  4. package/dist/src/domain/billing-plans.d.ts.map +1 -1
  5. package/dist/src/domain/billing-plans.js +64 -10
  6. package/dist/src/domain/billing-plans.js.map +1 -1
  7. package/dist/src/domain/bot-contract.d.ts +1330 -761
  8. package/dist/src/domain/bot-contract.d.ts.map +1 -1
  9. package/dist/src/domain/bot-contract.js +41 -2
  10. package/dist/src/domain/bot-contract.js.map +1 -1
  11. package/dist/src/domain/bot-library.d.ts +192 -0
  12. package/dist/src/domain/bot-library.d.ts.map +1 -0
  13. package/dist/src/domain/bot-library.js +180 -0
  14. package/dist/src/domain/bot-library.js.map +1 -0
  15. package/dist/src/domain/memory-contract.d.ts +1121 -624
  16. package/dist/src/domain/memory-contract.d.ts.map +1 -1
  17. package/dist/src/domain/memory-contract.js +128 -24
  18. package/dist/src/domain/memory-contract.js.map +1 -1
  19. package/dist/src/domain/platform-approval-contract.d.ts +24 -24
  20. package/dist/src/domain/stacklink-meta-tools.d.ts +1 -1
  21. package/dist/src/domain/stacklink-meta-tools.js +2 -2
  22. package/dist/src/domain/stacklink-meta-tools.js.map +1 -1
  23. package/dist/src/domain/workflow-contract.d.ts +14371 -7817
  24. package/dist/src/domain/workflow-contract.d.ts.map +1 -1
  25. package/dist/src/domain/workflow-contract.js +23 -2
  26. package/dist/src/domain/workflow-contract.js.map +1 -1
  27. package/dist/src/sdk/index.d.ts +59 -11
  28. package/dist/src/sdk/index.d.ts.map +1 -1
  29. package/dist/src/sdk/index.js +15 -3
  30. package/dist/src/sdk/index.js.map +1 -1
  31. package/dist/src/sdk/memory-lifecycle.d.ts +1 -4
  32. package/dist/src/sdk/memory-lifecycle.d.ts.map +1 -1
  33. package/dist/src/sdk/memory-lifecycle.js +2 -7
  34. package/dist/src/sdk/memory-lifecycle.js.map +1 -1
  35. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { botApiSignaturePayload } from '../domain/bot-contract.js';
2
2
  import { materializeStacklinkWorkbenchExecutionResponse, } from '../domain/stacklink-meta-tools.js';
3
3
  export { StacklinkMemoryLifecycle, StacklinkMemoryLifecycleError, createStacklinkMemoryLifecycle, serializeCompletedConversationTurn, } from './memory-lifecycle.js';
4
- export const stacklinkTypeScriptSdkVersion = '0.6.3';
4
+ export const stacklinkTypeScriptSdkVersion = '0.6.5';
5
5
  const workbenchReusableRunComparisonWaitMs = 120_000;
6
6
  const workbenchReusableRunComparisonPollMs = 1_000;
7
7
  export class StacklinkApiError extends Error {
@@ -2476,8 +2476,8 @@ export class StacklinkSessionMemoryClient {
2476
2476
  history(memoryId) {
2477
2477
  return this.memoryClient.history(memoryId, { sessionId: this.sessionId });
2478
2478
  }
2479
- update(memoryId, patch) {
2480
- return this.memoryClient.update(memoryId, { sessionId: this.sessionId, patch });
2479
+ update(memoryId, patch, options = {}) {
2480
+ return this.memoryClient.update(memoryId, { ...options, sessionId: this.sessionId, patch });
2481
2481
  }
2482
2482
  forget(memoryId, reason) {
2483
2483
  return this.memoryClient.forget(memoryId, {
@@ -3272,8 +3272,18 @@ function validateSdkMcpResponse(value, requestId) {
3272
3272
  export class StacklinkBotsClient {
3273
3273
  client;
3274
3274
  files;
3275
+ reviews;
3275
3276
  constructor(client) {
3276
3277
  this.client = client;
3278
+ const reviewPath = (botId) => `/v1/bots/${encodeURIComponent(botId)}`;
3279
+ this.reviews = {
3280
+ setup: (botId) => client.request(`${reviewPath(botId)}/code-reviewer`),
3281
+ repositories: (botId, query) => client.request(`${reviewPath(botId)}/code-reviewer/repositories`, { query }),
3282
+ pullRequests: (botId) => client.request(`${reviewPath(botId)}/code-reviewer/pull-requests`),
3283
+ preview: (botId, input) => client.request(`${reviewPath(botId)}/code-reviewer/preview`, { method: 'POST', body: input }),
3284
+ request: (botId, input) => client.request(`${reviewPath(botId)}/reviews`, { method: 'POST', body: input }),
3285
+ get: (botId, reviewId) => client.request(`${reviewPath(botId)}/reviews/${encodeURIComponent(reviewId)}`),
3286
+ };
3277
3287
  const path = (botId, fileId) => `/v1/bots/${encodeURIComponent(botId)}/files${fileId ? `/${encodeURIComponent(fileId)}` : ''}`;
3278
3288
  this.files = {
3279
3289
  createUpload: (botId, input) => client.request(path(botId), { method: 'POST', body: input }),
@@ -3282,6 +3292,8 @@ export class StacklinkBotsClient {
3282
3292
  link: (botId, fileId, input) => client.request(`${path(botId, fileId)}/link`, { method: 'POST', body: input }),
3283
3293
  };
3284
3294
  }
3295
+ jobs() { return this.client.request('/v1/bots/jobs'); }
3296
+ install(key, requestId) { return this.client.request(`/v1/bots/library/${key}/install`, { method: 'POST', body: { requestId } }); }
3285
3297
  apis() { return this.client.request('/v1/bots/apis'); }
3286
3298
  updateApi(apiId, revision, api) { return this.client.request(`/v1/bots/apis/${encodeURIComponent(apiId)}`, { method: 'PATCH', body: { revision, api } }); }
3287
3299
  deleteApi(apiId) { return this.client.request(`/v1/bots/apis/${encodeURIComponent(apiId)}`, { method: 'DELETE' }); }