@tangle-network/sandbox 0.0.0-develop.20260608232024.2e97e1d → 0.0.0-develop.20260609030357.afb7f82
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.
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{client-DMkVWoYk.d.ts → client-BPfzXG-0.d.ts} +1 -356
- package/dist/client-D5O2rjSL.js +1 -0
- package/dist/collaboration/index.js +1 -1
- package/dist/collaboration-BxlfZ2Uh.js +1 -0
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/errors-DZsfJUuc.js +1 -0
- package/dist/index.d.ts +24 -24
- package/dist/index.js +1 -1
- package/dist/intelligence/index.js +1 -1
- package/dist/openai/index.js +1 -1
- package/dist/sandbox-DH4Tq6fA.js +1 -0
- package/dist/session-gateway/index.js +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/tangle-_cxg7krW.js +1 -0
- package/package.json +1 -1
- package/dist/client-BYIDON4d.js +0 -1
- package/dist/collaboration-CRyb5e8F.js +0 -1
- package/dist/errors-CljiGR__.js +0 -1
- package/dist/sandbox-B4HyvZga.js +0 -1
- package/dist/tangle-DvKC4_jP.js +0 -1
|
@@ -185,327 +185,6 @@ declare class SandboxFleetClient {
|
|
|
185
185
|
private listBySandboxMetadata;
|
|
186
186
|
}
|
|
187
187
|
//#endregion
|
|
188
|
-
//#region src/integrations.d.ts
|
|
189
|
-
type IntegrationPrincipalType = "customer" | "team";
|
|
190
|
-
type IntegrationProvider = "generic" | "github" | "generic_oauth2";
|
|
191
|
-
type IntegrationVerificationKind = "none" | "hmac_shared_secret" | "provider:github";
|
|
192
|
-
type IntegrationActionKind = "sandbox.create" | "sandbox.dispatch" | "sandbox.event" | "sandbox.respond_inline";
|
|
193
|
-
type IntegrationDeliveryStatus = "pending" | "delivered" | "failed" | "disabled";
|
|
194
|
-
/**
|
|
195
|
-
* Opaque JSON value flowing through an integration. Tied to whichever
|
|
196
|
-
* trigger/endpoint shape is on the wire — the SDK doesn't introspect
|
|
197
|
-
* it. Aliased instead of using bare `unknown` so call sites read as
|
|
198
|
-
* "this came from JSON" rather than "this is genuinely any type".
|
|
199
|
-
*/
|
|
200
|
-
type IntegrationJsonValue = unknown;
|
|
201
|
-
interface IntegrationAction {
|
|
202
|
-
kind: IntegrationActionKind;
|
|
203
|
-
config: IntegrationJsonValue;
|
|
204
|
-
mappings?: Record<string, string>;
|
|
205
|
-
}
|
|
206
|
-
interface IntegrationScope {
|
|
207
|
-
sandboxIds?: string[];
|
|
208
|
-
sessionIds?: string[];
|
|
209
|
-
teamId?: string;
|
|
210
|
-
}
|
|
211
|
-
interface ConnectionInfo {
|
|
212
|
-
id: string;
|
|
213
|
-
ownerType: IntegrationPrincipalType;
|
|
214
|
-
ownerId: string;
|
|
215
|
-
provider: IntegrationProvider;
|
|
216
|
-
externalId: string;
|
|
217
|
-
displayName: string | null;
|
|
218
|
-
authKind: "oauth2" | "api_key" | "signing_only";
|
|
219
|
-
metadata: Record<string, unknown> | null;
|
|
220
|
-
status: "active" | "revoked" | "error";
|
|
221
|
-
installedAt: string;
|
|
222
|
-
}
|
|
223
|
-
interface AutomationInfo {
|
|
224
|
-
id: string;
|
|
225
|
-
ownerType: IntegrationPrincipalType;
|
|
226
|
-
ownerId: string;
|
|
227
|
-
connectionId: string | null;
|
|
228
|
-
name: string;
|
|
229
|
-
description: string | null;
|
|
230
|
-
recipeId: string | null;
|
|
231
|
-
enabled: boolean;
|
|
232
|
-
createdAt: string;
|
|
233
|
-
updatedAt: string;
|
|
234
|
-
}
|
|
235
|
-
interface EndpointInfo {
|
|
236
|
-
id: string;
|
|
237
|
-
automationId: string | null;
|
|
238
|
-
ownerType: IntegrationPrincipalType;
|
|
239
|
-
ownerId: string;
|
|
240
|
-
connectionId: string | null;
|
|
241
|
-
url: string | null;
|
|
242
|
-
events: string[];
|
|
243
|
-
scope: IntegrationScope | null;
|
|
244
|
-
description: string | null;
|
|
245
|
-
enabled: boolean;
|
|
246
|
-
ephemeralForSandboxId: string | null;
|
|
247
|
-
consecutiveFailures: number;
|
|
248
|
-
disabledReason: string | null;
|
|
249
|
-
disabledAt: string | null;
|
|
250
|
-
createdAt: string;
|
|
251
|
-
updatedAt: string;
|
|
252
|
-
}
|
|
253
|
-
interface EndpointWithSecret extends EndpointInfo {
|
|
254
|
-
/** Returned only at create / rotate. Save it on your end. */
|
|
255
|
-
secret: string;
|
|
256
|
-
}
|
|
257
|
-
interface TriggerInfo {
|
|
258
|
-
id: string;
|
|
259
|
-
automationId: string | null;
|
|
260
|
-
ownerType: IntegrationPrincipalType;
|
|
261
|
-
ownerId: string;
|
|
262
|
-
connectionId: string | null;
|
|
263
|
-
urlToken: string;
|
|
264
|
-
/** Public URL the third party POSTs to. */
|
|
265
|
-
publicUrl: string;
|
|
266
|
-
verificationKind: IntegrationVerificationKind;
|
|
267
|
-
eventFilter: Record<string, unknown> | null;
|
|
268
|
-
action: IntegrationAction;
|
|
269
|
-
rateLimitRpm: number;
|
|
270
|
-
allowIps: string[] | null;
|
|
271
|
-
description: string | null;
|
|
272
|
-
enabled: boolean;
|
|
273
|
-
ephemeralForSandboxId: string | null;
|
|
274
|
-
createdAt: string;
|
|
275
|
-
updatedAt: string;
|
|
276
|
-
}
|
|
277
|
-
interface TriggerWithSecret extends TriggerInfo {
|
|
278
|
-
/** Returned only at create. Null when verificationKind === "none". */
|
|
279
|
-
secret: string | null;
|
|
280
|
-
}
|
|
281
|
-
interface DeliveryAttempt {
|
|
282
|
-
id: string;
|
|
283
|
-
endpointId: string;
|
|
284
|
-
automationId: string | null;
|
|
285
|
-
type: string;
|
|
286
|
-
payload: IntegrationJsonValue;
|
|
287
|
-
status: IntegrationDeliveryStatus;
|
|
288
|
-
attempts: number;
|
|
289
|
-
lastAttemptAt: string | null;
|
|
290
|
-
nextAttemptAt: string | null;
|
|
291
|
-
lastResponseStatus: number | null;
|
|
292
|
-
lastResponseBodyExcerpt: string | null;
|
|
293
|
-
createdAt: string;
|
|
294
|
-
deliveredAt: string | null;
|
|
295
|
-
}
|
|
296
|
-
interface TriggerRun {
|
|
297
|
-
id: string;
|
|
298
|
-
triggerId: string;
|
|
299
|
-
automationId: string | null;
|
|
300
|
-
requestId: string;
|
|
301
|
-
requestHeaders: Record<string, string>;
|
|
302
|
-
requestBody: string;
|
|
303
|
-
requestIp: string | null;
|
|
304
|
-
verificationStatus: "ok" | "bad_signature" | "expired" | "filtered_out" | "rate_limited";
|
|
305
|
-
actionStatus: "queued" | "running" | "succeeded" | "failed" | "rate_limited" | "skipped";
|
|
306
|
-
actionResult: Record<string, unknown> | null;
|
|
307
|
-
errorMessage: string | null;
|
|
308
|
-
createdAt: string;
|
|
309
|
-
completedAt: string | null;
|
|
310
|
-
}
|
|
311
|
-
interface RecipeManifest {
|
|
312
|
-
id: string;
|
|
313
|
-
title: string;
|
|
314
|
-
description: string;
|
|
315
|
-
icon?: string;
|
|
316
|
-
requiresConnection?: IntegrationProvider;
|
|
317
|
-
userInputs?: Array<{
|
|
318
|
-
key: string;
|
|
319
|
-
label: string;
|
|
320
|
-
type?: "text" | "select";
|
|
321
|
-
default?: string;
|
|
322
|
-
options?: string[];
|
|
323
|
-
required?: boolean;
|
|
324
|
-
}>;
|
|
325
|
-
automation: {
|
|
326
|
-
name: string;
|
|
327
|
-
description?: string;
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
interface CreateAutomationInput {
|
|
331
|
-
teamId?: string;
|
|
332
|
-
name: string;
|
|
333
|
-
description?: string;
|
|
334
|
-
connectionId?: string;
|
|
335
|
-
recipeId?: string;
|
|
336
|
-
enabled?: boolean;
|
|
337
|
-
triggers?: Array<{
|
|
338
|
-
verificationKind: IntegrationVerificationKind;
|
|
339
|
-
connectionId?: string;
|
|
340
|
-
eventFilter?: Record<string, unknown>;
|
|
341
|
-
action: IntegrationAction;
|
|
342
|
-
rateLimitRpm?: number;
|
|
343
|
-
allowIps?: string[];
|
|
344
|
-
description?: string;
|
|
345
|
-
}>;
|
|
346
|
-
endpoints?: Array<{
|
|
347
|
-
url?: string;
|
|
348
|
-
connectionId?: string;
|
|
349
|
-
events: string[];
|
|
350
|
-
scope?: IntegrationScope;
|
|
351
|
-
description?: string;
|
|
352
|
-
}>;
|
|
353
|
-
}
|
|
354
|
-
interface CreateEndpointInput {
|
|
355
|
-
teamId?: string;
|
|
356
|
-
automationId?: string;
|
|
357
|
-
connectionId?: string;
|
|
358
|
-
url?: string;
|
|
359
|
-
events: string[];
|
|
360
|
-
scope?: IntegrationScope;
|
|
361
|
-
description?: string;
|
|
362
|
-
}
|
|
363
|
-
interface CreateTriggerInput {
|
|
364
|
-
teamId?: string;
|
|
365
|
-
automationId?: string;
|
|
366
|
-
connectionId?: string;
|
|
367
|
-
verificationKind: IntegrationVerificationKind;
|
|
368
|
-
eventFilter?: Record<string, unknown>;
|
|
369
|
-
action: IntegrationAction;
|
|
370
|
-
rateLimitRpm?: number;
|
|
371
|
-
allowIps?: string[];
|
|
372
|
-
description?: string;
|
|
373
|
-
}
|
|
374
|
-
interface InstallRecipeInput {
|
|
375
|
-
teamId?: string;
|
|
376
|
-
connectionId?: string;
|
|
377
|
-
inputs?: Record<string, string>;
|
|
378
|
-
}
|
|
379
|
-
declare class IntegrationsManager {
|
|
380
|
-
private readonly client;
|
|
381
|
-
constructor(client: HttpClient);
|
|
382
|
-
readonly automations: {
|
|
383
|
-
list: (opts?: {
|
|
384
|
-
teamId?: string;
|
|
385
|
-
}) => Promise<AutomationInfo[]>;
|
|
386
|
-
get: (id: string, opts?: {
|
|
387
|
-
teamId?: string;
|
|
388
|
-
}) => Promise<{
|
|
389
|
-
automation: AutomationInfo;
|
|
390
|
-
triggers: TriggerInfo[];
|
|
391
|
-
endpoints: EndpointInfo[];
|
|
392
|
-
}>;
|
|
393
|
-
create: (input: CreateAutomationInput) => Promise<{
|
|
394
|
-
automation: AutomationInfo;
|
|
395
|
-
triggers: TriggerInfo[];
|
|
396
|
-
endpoints: EndpointInfo[];
|
|
397
|
-
}>;
|
|
398
|
-
update: (id: string, patch: {
|
|
399
|
-
teamId?: string;
|
|
400
|
-
name?: string;
|
|
401
|
-
description?: string;
|
|
402
|
-
enabled?: boolean;
|
|
403
|
-
connectionId?: string | null;
|
|
404
|
-
}) => Promise<AutomationInfo>;
|
|
405
|
-
delete: (id: string, opts?: {
|
|
406
|
-
teamId?: string;
|
|
407
|
-
}) => Promise<void>;
|
|
408
|
-
/**
|
|
409
|
-
* Unified inbound + outbound timeline for an automation.
|
|
410
|
-
* Returns the most recent N rows (default 100). Pagination is
|
|
411
|
-
* by `since` ISO8601 timestamp.
|
|
412
|
-
*/
|
|
413
|
-
logs: (id: string, opts?: {
|
|
414
|
-
teamId?: string;
|
|
415
|
-
since?: string;
|
|
416
|
-
limit?: number;
|
|
417
|
-
}) => Promise<{
|
|
418
|
-
deliveries: DeliveryAttempt[];
|
|
419
|
-
runs: TriggerRun[];
|
|
420
|
-
}>;
|
|
421
|
-
/**
|
|
422
|
-
* Install an automation from a recipe manifest. The recipe defines
|
|
423
|
-
* what gets created (one Automation, plus underlying triggers /
|
|
424
|
-
* endpoints) and which inputs the user must supply.
|
|
425
|
-
*/
|
|
426
|
-
installFromRecipe: (recipeId: string, input?: InstallRecipeInput) => Promise<{
|
|
427
|
-
automation: AutomationInfo;
|
|
428
|
-
triggers: TriggerInfo[];
|
|
429
|
-
endpoints: EndpointInfo[];
|
|
430
|
-
}>;
|
|
431
|
-
};
|
|
432
|
-
/**
|
|
433
|
-
* Iterate all log entries for an automation, paging through
|
|
434
|
-
* deliveries+runs in 200-row batches. Use this to power export
|
|
435
|
-
* scripts or dashboards. Defined on the manager (not under
|
|
436
|
-
* .automations) because async generators can't reference an
|
|
437
|
-
* enclosing object literal's other methods through `this` cleanly.
|
|
438
|
-
*/
|
|
439
|
-
iterateAutomationLogs(id: string, opts?: {
|
|
440
|
-
teamId?: string;
|
|
441
|
-
since?: string;
|
|
442
|
-
}): AsyncGenerator<{
|
|
443
|
-
deliveries: DeliveryAttempt[];
|
|
444
|
-
runs: TriggerRun[];
|
|
445
|
-
}>;
|
|
446
|
-
readonly recipes: {
|
|
447
|
-
list: () => Promise<RecipeManifest[]>;
|
|
448
|
-
get: (id: string) => Promise<RecipeManifest>;
|
|
449
|
-
};
|
|
450
|
-
readonly connections: {
|
|
451
|
-
list: (opts?: {
|
|
452
|
-
teamId?: string;
|
|
453
|
-
}) => Promise<ConnectionInfo[]>;
|
|
454
|
-
delete: (id: string, opts?: {
|
|
455
|
-
teamId?: string;
|
|
456
|
-
}) => Promise<void>;
|
|
457
|
-
};
|
|
458
|
-
readonly endpoints: {
|
|
459
|
-
list: (opts?: {
|
|
460
|
-
teamId?: string;
|
|
461
|
-
}) => Promise<EndpointInfo[]>;
|
|
462
|
-
create: (input: CreateEndpointInput) => Promise<EndpointWithSecret>;
|
|
463
|
-
update: (id: string, patch: {
|
|
464
|
-
teamId?: string;
|
|
465
|
-
url?: string;
|
|
466
|
-
events?: string[];
|
|
467
|
-
scope?: IntegrationScope;
|
|
468
|
-
description?: string;
|
|
469
|
-
enabled?: boolean;
|
|
470
|
-
}) => Promise<EndpointInfo>;
|
|
471
|
-
delete: (id: string, opts?: {
|
|
472
|
-
teamId?: string;
|
|
473
|
-
}) => Promise<void>;
|
|
474
|
-
rotateSecret: (id: string, opts?: {
|
|
475
|
-
teamId?: string;
|
|
476
|
-
}) => Promise<EndpointWithSecret>;
|
|
477
|
-
listDeliveries: (id: string, opts?: {
|
|
478
|
-
teamId?: string;
|
|
479
|
-
since?: string;
|
|
480
|
-
status?: IntegrationDeliveryStatus;
|
|
481
|
-
limit?: number;
|
|
482
|
-
}) => Promise<DeliveryAttempt[]>;
|
|
483
|
-
};
|
|
484
|
-
readonly triggers: {
|
|
485
|
-
list: (opts?: {
|
|
486
|
-
teamId?: string;
|
|
487
|
-
}) => Promise<TriggerInfo[]>;
|
|
488
|
-
create: (input: CreateTriggerInput) => Promise<TriggerWithSecret>;
|
|
489
|
-
update: (id: string, patch: {
|
|
490
|
-
teamId?: string;
|
|
491
|
-
eventFilter?: Record<string, unknown> | null;
|
|
492
|
-
action?: IntegrationAction;
|
|
493
|
-
rateLimitRpm?: number;
|
|
494
|
-
allowIps?: string[] | null;
|
|
495
|
-
description?: string;
|
|
496
|
-
enabled?: boolean;
|
|
497
|
-
}) => Promise<TriggerInfo>;
|
|
498
|
-
delete: (id: string, opts?: {
|
|
499
|
-
teamId?: string;
|
|
500
|
-
}) => Promise<void>;
|
|
501
|
-
listRuns: (id: string, opts?: {
|
|
502
|
-
teamId?: string;
|
|
503
|
-
since?: string;
|
|
504
|
-
limit?: number;
|
|
505
|
-
}) => Promise<TriggerRun[]>;
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
//#endregion
|
|
509
188
|
//#region src/client.d.ts
|
|
510
189
|
/**
|
|
511
190
|
* Client for the Tangle Sandbox platform.
|
|
@@ -539,7 +218,6 @@ declare class SandboxClient implements HttpClient {
|
|
|
539
218
|
private readonly trustLocalCliAuth;
|
|
540
219
|
private _secrets;
|
|
541
220
|
private _sshKeys;
|
|
542
|
-
private _integrations;
|
|
543
221
|
private _fleets;
|
|
544
222
|
private _intelligence;
|
|
545
223
|
constructor(config: SandboxClientConfig);
|
|
@@ -576,39 +254,6 @@ declare class SandboxClient implements HttpClient {
|
|
|
576
254
|
*/
|
|
577
255
|
get secrets(): SecretsManager;
|
|
578
256
|
get sshKeys(): SshKeysManager;
|
|
579
|
-
/**
|
|
580
|
-
* Access the integrations manager — webhooks (inbound + outbound),
|
|
581
|
-
* automations, connections to managed connectors, and recipes.
|
|
582
|
-
*
|
|
583
|
-
* Spec: specs/sandbox-integrations.md.
|
|
584
|
-
*
|
|
585
|
-
* @example
|
|
586
|
-
* ```typescript
|
|
587
|
-
* // Outbound: get pinged when a sandbox fails
|
|
588
|
-
* const ep = await client.integrations.endpoints.create({
|
|
589
|
-
* url: "https://example.com/hook",
|
|
590
|
-
* events: ["sandbox.failed", "sandbox.permanently_dead"],
|
|
591
|
-
* });
|
|
592
|
-
* console.log(ep.secret); // shown once — store it
|
|
593
|
-
*
|
|
594
|
-
* // Inbound: a public URL that, when POSTed to, runs an action
|
|
595
|
-
* const trg = await client.integrations.triggers.create({
|
|
596
|
-
* verificationKind: "hmac_shared_secret",
|
|
597
|
-
* action: {
|
|
598
|
-
* kind: "sandbox.create",
|
|
599
|
-
* config: { template: "node-22", prompt: "Run: ${body.prompt}" },
|
|
600
|
-
* },
|
|
601
|
-
* });
|
|
602
|
-
* console.log(trg.publicUrl);
|
|
603
|
-
*
|
|
604
|
-
* // One-click recipe install
|
|
605
|
-
* const auto = await client.integrations.automations.installFromRecipe(
|
|
606
|
-
* "github.pr-review",
|
|
607
|
-
* { connectionId: "ic_…", inputs: { template: "node-22" } },
|
|
608
|
-
* );
|
|
609
|
-
* ```
|
|
610
|
-
*/
|
|
611
|
-
get integrations(): IntegrationsManager;
|
|
612
257
|
private _environments;
|
|
613
258
|
/**
|
|
614
259
|
* Access available development environments.
|
|
@@ -1058,4 +703,4 @@ declare class TeamsClient {
|
|
|
1058
703
|
* Alias for SandboxClient for cleaner imports.
|
|
1059
704
|
*/
|
|
1060
705
|
//#endregion
|
|
1061
|
-
export {
|
|
706
|
+
export { Team as a, SandboxFleet as c, ParsedSSEEvent as d, parseSSEStream as f, SandboxClient as i, SandboxFleetClient as l, IntelligenceClient as n, TeamInvitation as o, InviteTeamMemberOptions as r, TeamMember as s, CreateTeamOptions as t, ParseSSEStreamOptions as u };
|