@locusai/sdk 0.13.3 → 0.14.1

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.
@@ -156,6 +156,49 @@ var init_docs = __esm(() => {
156
156
  };
157
157
  });
158
158
 
159
+ // src/modules/instances.ts
160
+ var InstancesModule;
161
+ var init_instances = __esm(() => {
162
+ InstancesModule = class InstancesModule extends BaseModule {
163
+ async list(workspaceId) {
164
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances`);
165
+ return data.instances;
166
+ }
167
+ async get(workspaceId, instanceId) {
168
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}`);
169
+ return data.instance;
170
+ }
171
+ async provision(workspaceId, body) {
172
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances`, body);
173
+ return data.instance;
174
+ }
175
+ async performAction(workspaceId, instanceId, action) {
176
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/actions`, { action });
177
+ return data.instance;
178
+ }
179
+ async sync(workspaceId, instanceId) {
180
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/sync`);
181
+ return data.instance;
182
+ }
183
+ async checkUpdates(workspaceId, instanceId) {
184
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}/updates`);
185
+ return data.update;
186
+ }
187
+ async applyUpdate(workspaceId, instanceId) {
188
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/updates`);
189
+ return data.update;
190
+ }
191
+ async getSecurity(workspaceId, instanceId) {
192
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}/security`);
193
+ return data.rules;
194
+ }
195
+ async updateSecurity(workspaceId, instanceId, body) {
196
+ const { data } = await this.api.put(`/workspaces/${workspaceId}/aws-instances/${instanceId}/security`, body);
197
+ return data.rules;
198
+ }
199
+ };
200
+ });
201
+
159
202
  // src/modules/invitations.ts
160
203
  var InvitationsModule;
161
204
  var init_invitations = __esm(() => {
@@ -388,6 +431,17 @@ var init_workspaces = __esm(() => {
388
431
  async deleteApiKey(workspaceId, keyId) {
389
432
  await this.api.delete(`/workspaces/${workspaceId}/api-keys/${keyId}`);
390
433
  }
434
+ async getAwsCredentials(workspaceId) {
435
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-credentials`);
436
+ return data.credential;
437
+ }
438
+ async saveAwsCredentials(workspaceId, body) {
439
+ const { data } = await this.api.put(`/workspaces/${workspaceId}/aws-credentials`, body);
440
+ return data.credential;
441
+ }
442
+ async deleteAwsCredentials(workspaceId) {
443
+ await this.api.delete(`/workspaces/${workspaceId}/aws-credentials`);
444
+ }
391
445
  };
392
446
  });
393
447
 
@@ -435,6 +489,7 @@ __export(exports_src, {
435
489
  LocusEmitter: () => LocusEmitter,
436
490
  LocusClient: () => LocusClient,
437
491
  InvitationsModule: () => InvitationsModule,
492
+ InstancesModule: () => InstancesModule,
438
493
  DocsModule: () => DocsModule,
439
494
  DiscussionSchema: () => DiscussionSchema,
440
495
  DiscussionMessageSchema: () => DiscussionMessageSchema,
@@ -455,6 +510,7 @@ class LocusClient {
455
510
  invitations;
456
511
  docs;
457
512
  ci;
513
+ instances;
458
514
  constructor(config) {
459
515
  this.emitter = new LocusEmitter;
460
516
  this.api = import_axios.default.create({
@@ -474,6 +530,7 @@ class LocusClient {
474
530
  this.invitations = new InvitationsModule(this.api, this.emitter);
475
531
  this.docs = new DocsModule(this.api, this.emitter);
476
532
  this.ci = new CiModule(this.api, this.emitter);
533
+ this.instances = new InstancesModule(this.api, this.emitter);
477
534
  if (config.retryOptions) {
478
535
  this.setupRetryInterceptor(config.retryOptions);
479
536
  }
@@ -539,6 +596,7 @@ var init_src = __esm(() => {
539
596
  init_auth();
540
597
  init_ci();
541
598
  init_docs();
599
+ init_instances();
542
600
  init_invitations();
543
601
  init_organizations();
544
602
  init_sprints();
@@ -550,6 +608,7 @@ var init_src = __esm(() => {
550
608
  init_auth();
551
609
  init_ci();
552
610
  init_docs();
611
+ init_instances();
553
612
  init_invitations();
554
613
  init_organizations();
555
614
  init_sprints();
@@ -156,6 +156,49 @@ var init_docs = __esm(() => {
156
156
  };
157
157
  });
158
158
 
159
+ // src/modules/instances.ts
160
+ var InstancesModule;
161
+ var init_instances = __esm(() => {
162
+ InstancesModule = class InstancesModule extends BaseModule {
163
+ async list(workspaceId) {
164
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances`);
165
+ return data.instances;
166
+ }
167
+ async get(workspaceId, instanceId) {
168
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}`);
169
+ return data.instance;
170
+ }
171
+ async provision(workspaceId, body) {
172
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances`, body);
173
+ return data.instance;
174
+ }
175
+ async performAction(workspaceId, instanceId, action) {
176
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/actions`, { action });
177
+ return data.instance;
178
+ }
179
+ async sync(workspaceId, instanceId) {
180
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/sync`);
181
+ return data.instance;
182
+ }
183
+ async checkUpdates(workspaceId, instanceId) {
184
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}/updates`);
185
+ return data.update;
186
+ }
187
+ async applyUpdate(workspaceId, instanceId) {
188
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/updates`);
189
+ return data.update;
190
+ }
191
+ async getSecurity(workspaceId, instanceId) {
192
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}/security`);
193
+ return data.rules;
194
+ }
195
+ async updateSecurity(workspaceId, instanceId, body) {
196
+ const { data } = await this.api.put(`/workspaces/${workspaceId}/aws-instances/${instanceId}/security`, body);
197
+ return data.rules;
198
+ }
199
+ };
200
+ });
201
+
159
202
  // src/modules/invitations.ts
160
203
  var InvitationsModule;
161
204
  var init_invitations = __esm(() => {
@@ -388,6 +431,17 @@ var init_workspaces = __esm(() => {
388
431
  async deleteApiKey(workspaceId, keyId) {
389
432
  await this.api.delete(`/workspaces/${workspaceId}/api-keys/${keyId}`);
390
433
  }
434
+ async getAwsCredentials(workspaceId) {
435
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-credentials`);
436
+ return data.credential;
437
+ }
438
+ async saveAwsCredentials(workspaceId, body) {
439
+ const { data } = await this.api.put(`/workspaces/${workspaceId}/aws-credentials`, body);
440
+ return data.credential;
441
+ }
442
+ async deleteAwsCredentials(workspaceId) {
443
+ await this.api.delete(`/workspaces/${workspaceId}/aws-credentials`);
444
+ }
391
445
  };
392
446
  });
393
447
 
@@ -435,6 +489,7 @@ __export(exports_src, {
435
489
  LocusEmitter: () => LocusEmitter,
436
490
  LocusClient: () => LocusClient,
437
491
  InvitationsModule: () => InvitationsModule,
492
+ InstancesModule: () => InstancesModule,
438
493
  DocsModule: () => DocsModule,
439
494
  DiscussionSchema: () => DiscussionSchema,
440
495
  DiscussionMessageSchema: () => DiscussionMessageSchema,
@@ -455,6 +510,7 @@ class LocusClient {
455
510
  invitations;
456
511
  docs;
457
512
  ci;
513
+ instances;
458
514
  constructor(config) {
459
515
  this.emitter = new LocusEmitter;
460
516
  this.api = import_axios.default.create({
@@ -474,6 +530,7 @@ class LocusClient {
474
530
  this.invitations = new InvitationsModule(this.api, this.emitter);
475
531
  this.docs = new DocsModule(this.api, this.emitter);
476
532
  this.ci = new CiModule(this.api, this.emitter);
533
+ this.instances = new InstancesModule(this.api, this.emitter);
477
534
  if (config.retryOptions) {
478
535
  this.setupRetryInterceptor(config.retryOptions);
479
536
  }
@@ -539,6 +596,7 @@ var init_src = __esm(() => {
539
596
  init_auth();
540
597
  init_ci();
541
598
  init_docs();
599
+ init_instances();
542
600
  init_invitations();
543
601
  init_organizations();
544
602
  init_sprints();
@@ -550,6 +608,7 @@ var init_src = __esm(() => {
550
608
  init_auth();
551
609
  init_ci();
552
610
  init_docs();
611
+ init_instances();
553
612
  init_invitations();
554
613
  init_organizations();
555
614
  init_sprints();
@@ -2810,6 +2869,7 @@ __export(exports_index_node, {
2810
2869
  LOCUS_GITIGNORE_PATTERNS: () => LOCUS_GITIGNORE_PATTERNS,
2811
2870
  LOCUS_CONFIG: () => LOCUS_CONFIG,
2812
2871
  InvitationsModule: () => InvitationsModule,
2872
+ InstancesModule: () => InstancesModule,
2813
2873
  HistoryManager: () => HistoryManager,
2814
2874
  GitWorkflow: () => GitWorkflow,
2815
2875
  ExecSession: () => ExecSession,
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { LocusConfig, LocusEmitter } from "./events.js";
2
2
  import { AuthModule } from "./modules/auth.js";
3
3
  import { CiModule } from "./modules/ci.js";
4
4
  import { DocsModule } from "./modules/docs.js";
5
+ import { InstancesModule } from "./modules/instances.js";
5
6
  import { InvitationsModule } from "./modules/invitations.js";
6
7
  import { OrganizationsModule } from "./modules/organizations.js";
7
8
  import { SprintsModule } from "./modules/sprints.js";
@@ -13,6 +14,7 @@ export * from "./events.js";
13
14
  export * from "./modules/auth.js";
14
15
  export * from "./modules/ci.js";
15
16
  export * from "./modules/docs.js";
17
+ export * from "./modules/instances.js";
16
18
  export * from "./modules/invitations.js";
17
19
  export * from "./modules/organizations.js";
18
20
  export * from "./modules/sprints.js";
@@ -29,6 +31,7 @@ export declare class LocusClient {
29
31
  readonly invitations: InvitationsModule;
30
32
  readonly docs: DocsModule;
31
33
  readonly ci: CiModule;
34
+ readonly instances: InstancesModule;
32
35
  constructor(config: LocusConfig);
33
36
  private setupRetryInterceptor;
34
37
  private setupInterceptors;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,Q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C,SAAgB,KAAK,EAAE,WAAW,CAAC;IACnC,SAAgB,OAAO,EAAE,aAAa,CAAC;IACvC,SAAgB,UAAU,EAAE,gBAAgB,CAAC;IAC7C,SAAgB,aAAa,EAAE,mBAAmB,CAAC;IACnD,SAAgB,WAAW,EAAE,iBAAiB,CAAC;IAC/C,SAAgB,IAAI,EAAE,UAAU,CAAC;IACjC,SAAgB,EAAE,EAAE,QAAQ,CAAC;IAC7B,SAAgB,SAAS,EAAE,eAAe,CAAC;gBAE/B,MAAM,EAAE,WAAW;IA8B/B,OAAO,CAAC,qBAAqB;IAmC7B,OAAO,CAAC,iBAAiB;IAmDlB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAOrC"}
package/dist/index.js CHANGED
@@ -156,6 +156,49 @@ var init_docs = __esm(() => {
156
156
  };
157
157
  });
158
158
 
159
+ // src/modules/instances.ts
160
+ var InstancesModule;
161
+ var init_instances = __esm(() => {
162
+ InstancesModule = class InstancesModule extends BaseModule {
163
+ async list(workspaceId) {
164
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances`);
165
+ return data.instances;
166
+ }
167
+ async get(workspaceId, instanceId) {
168
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}`);
169
+ return data.instance;
170
+ }
171
+ async provision(workspaceId, body) {
172
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances`, body);
173
+ return data.instance;
174
+ }
175
+ async performAction(workspaceId, instanceId, action) {
176
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/actions`, { action });
177
+ return data.instance;
178
+ }
179
+ async sync(workspaceId, instanceId) {
180
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/sync`);
181
+ return data.instance;
182
+ }
183
+ async checkUpdates(workspaceId, instanceId) {
184
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}/updates`);
185
+ return data.update;
186
+ }
187
+ async applyUpdate(workspaceId, instanceId) {
188
+ const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/updates`);
189
+ return data.update;
190
+ }
191
+ async getSecurity(workspaceId, instanceId) {
192
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}/security`);
193
+ return data.rules;
194
+ }
195
+ async updateSecurity(workspaceId, instanceId, body) {
196
+ const { data } = await this.api.put(`/workspaces/${workspaceId}/aws-instances/${instanceId}/security`, body);
197
+ return data.rules;
198
+ }
199
+ };
200
+ });
201
+
159
202
  // src/modules/invitations.ts
160
203
  var InvitationsModule;
161
204
  var init_invitations = __esm(() => {
@@ -388,6 +431,17 @@ var init_workspaces = __esm(() => {
388
431
  async deleteApiKey(workspaceId, keyId) {
389
432
  await this.api.delete(`/workspaces/${workspaceId}/api-keys/${keyId}`);
390
433
  }
434
+ async getAwsCredentials(workspaceId) {
435
+ const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-credentials`);
436
+ return data.credential;
437
+ }
438
+ async saveAwsCredentials(workspaceId, body) {
439
+ const { data } = await this.api.put(`/workspaces/${workspaceId}/aws-credentials`, body);
440
+ return data.credential;
441
+ }
442
+ async deleteAwsCredentials(workspaceId) {
443
+ await this.api.delete(`/workspaces/${workspaceId}/aws-credentials`);
444
+ }
391
445
  };
392
446
  });
393
447
 
@@ -435,6 +489,7 @@ __export(exports_src, {
435
489
  LocusEmitter: () => LocusEmitter,
436
490
  LocusClient: () => LocusClient,
437
491
  InvitationsModule: () => InvitationsModule,
492
+ InstancesModule: () => InstancesModule,
438
493
  DocsModule: () => DocsModule,
439
494
  DiscussionSchema: () => DiscussionSchema,
440
495
  DiscussionMessageSchema: () => DiscussionMessageSchema,
@@ -455,6 +510,7 @@ class LocusClient {
455
510
  invitations;
456
511
  docs;
457
512
  ci;
513
+ instances;
458
514
  constructor(config) {
459
515
  this.emitter = new LocusEmitter;
460
516
  this.api = import_axios.default.create({
@@ -474,6 +530,7 @@ class LocusClient {
474
530
  this.invitations = new InvitationsModule(this.api, this.emitter);
475
531
  this.docs = new DocsModule(this.api, this.emitter);
476
532
  this.ci = new CiModule(this.api, this.emitter);
533
+ this.instances = new InstancesModule(this.api, this.emitter);
477
534
  if (config.retryOptions) {
478
535
  this.setupRetryInterceptor(config.retryOptions);
479
536
  }
@@ -539,6 +596,7 @@ var init_src = __esm(() => {
539
596
  init_auth();
540
597
  init_ci();
541
598
  init_docs();
599
+ init_instances();
542
600
  init_invitations();
543
601
  init_organizations();
544
602
  init_sprints();
@@ -550,6 +608,7 @@ var init_src = __esm(() => {
550
608
  init_auth();
551
609
  init_ci();
552
610
  init_docs();
611
+ init_instances();
553
612
  init_invitations();
554
613
  init_organizations();
555
614
  init_sprints();
@@ -0,0 +1,46 @@
1
+ import { type InstanceAction, type ProvisionAwsInstance, type UpdateSecurityRules } from "@locusai/shared";
2
+ import { BaseModule } from "./base.js";
3
+ export interface InstanceInfo {
4
+ id: string;
5
+ workspaceId: string;
6
+ awsCredentialId: string;
7
+ ec2InstanceId: string | null;
8
+ status: string;
9
+ instanceType: string;
10
+ region: string;
11
+ publicIp: string | null;
12
+ repoUrl: string;
13
+ integrations: unknown[];
14
+ securityGroupId: string | null;
15
+ errorMessage: string | null;
16
+ launchedAt: string | null;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ }
20
+ export interface UpdateCheckInfo {
21
+ currentVersion: string;
22
+ latestVersion: string;
23
+ updateAvailable: boolean;
24
+ }
25
+ export interface UpdateApplyInfo {
26
+ success: boolean;
27
+ newVersion: string;
28
+ error?: string;
29
+ }
30
+ export interface SecurityRuleInfo {
31
+ port: number;
32
+ cidr: string;
33
+ description?: string;
34
+ }
35
+ export declare class InstancesModule extends BaseModule {
36
+ list(workspaceId: string): Promise<InstanceInfo[]>;
37
+ get(workspaceId: string, instanceId: string): Promise<InstanceInfo>;
38
+ provision(workspaceId: string, body: ProvisionAwsInstance): Promise<InstanceInfo>;
39
+ performAction(workspaceId: string, instanceId: string, action: InstanceAction): Promise<InstanceInfo>;
40
+ sync(workspaceId: string, instanceId: string): Promise<InstanceInfo>;
41
+ checkUpdates(workspaceId: string, instanceId: string): Promise<UpdateCheckInfo>;
42
+ applyUpdate(workspaceId: string, instanceId: string): Promise<UpdateApplyInfo>;
43
+ getSecurity(workspaceId: string, instanceId: string): Promise<SecurityRuleInfo[]>;
44
+ updateSecurity(workspaceId: string, instanceId: string, body: UpdateSecurityRules): Promise<SecurityRuleInfo[]>;
45
+ }
46
+ //# sourceMappingURL=instances.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../src/modules/instances.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED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Promise<WorkspaceApiKey[]>;
30
30
  createApiKey(workspaceId: string, name: string): Promise<WorkspaceApiKey>;
31
31
  deleteApiKey(workspaceId: string, keyId: string): Promise<void>;
32
+ getAwsCredentials(workspaceId: string): Promise<AwsCredentialInfo>;
33
+ saveAwsCredentials(workspaceId: string, body: SaveAwsCredentialsInput): Promise<AwsCredentialInfo>;
34
+ deleteAwsCredentials(workspaceId: string): Promise<void>;
32
35
  }
33
36
  export interface WorkspaceApiKey {
34
37
  id: string;
@@ -41,4 +44,16 @@ export interface WorkspaceApiKey {
41
44
  createdAt: string;
42
45
  updatedAt: string;
43
46
  }
47
+ export interface AwsCredentialInfo {
48
+ id: string;
49
+ accessKeyId?: string;
50
+ region: string;
51
+ createdAt: string;
52
+ updatedAt?: string;
53
+ }
54
+ export interface SaveAwsCredentialsInput {
55
+ accessKeyId: string;
56
+ secretAccessKey: string;
57
+ region: string;
58
+ }
44
59
  //# sourceMappingURL=workspaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../src/modules/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAErB,eAAe,EACf,KAAK,EACL,IAAI,EAEJ,eAAe,EACf,SAAS,EAET,cAAc,EAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,qBAAa,gBAAiB,SAAQ,UAAU;IACxC,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAK/B,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAO9C,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,SAAS,CAAC;IASrE,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC;IAQ5D,OAAO,CAAC,EAAE,EAAE,MAAM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;AAUD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -5,9 +5,4 @@ export interface RetryOptions {
5
5
  factor?: number;
6
6
  retryCondition?: (error: unknown) => boolean;
7
7
  }
8
- export declare const DEFAULT_RETRY_OPTIONS: Required<RetryOptions>;
9
- /**
10
- * Retries an async function with exponential backoff
11
- */
12
- export declare function withRetry<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
13
8
  //# sourceMappingURL=retry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CAC9C;AAED,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,YAAY,CAaxD,CAAC;AAEF;;GAEG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,CAAC,CAAC,CAwBZ"}
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CAC9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locusai/sdk",
3
- "version": "0.13.3",
3
+ "version": "0.14.1",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -31,7 +31,7 @@
31
31
  "clean": "rm -rf node_modules"
32
32
  },
33
33
  "dependencies": {
34
- "@locusai/shared": "^0.13.3",
34
+ "@locusai/shared": "^0.14.1",
35
35
  "axios": "^1.13.2",
36
36
  "events": "^3.3.0",
37
37
  "globby": "^14.0.2",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=agent-pool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-pool.d.ts","sourceRoot":"","sources":["../../src/orchestrator/agent-pool.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=execution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/orchestrator/execution.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=tier-merge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tier-merge.d.ts","sourceRoot":"","sources":["../../src/orchestrator/tier-merge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC"}