@granular-software/sdk 0.3.4 → 0.4.2

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.
@@ -5,13 +5,19 @@
5
5
  /**
6
6
  * Configuration for the Granular client
7
7
  */
8
+ type AccessTokenProvider = () => Promise<string | null | undefined> | string | null | undefined;
9
+ type EndpointMode = 'auto' | 'local' | 'production';
8
10
  interface GranularOptions {
9
11
  /** Your Granular API key (for service/CLI auth; use with GRANULAR_API_KEY) */
10
12
  apiKey?: string;
11
13
  /** Application/session JWT (for user-context auth; use from simulator or getAccessToken) */
12
14
  token?: string;
15
+ /** Optional provider used to refresh JWT before WebSocket (re)connect attempts */
16
+ tokenProvider?: AccessTokenProvider;
13
17
  /** Optional API URL (for on-prem or testing) */
14
18
  apiUrl?: string;
19
+ /** Optional endpoint mode when apiUrl is not explicitly provided */
20
+ endpointMode?: EndpointMode;
15
21
  /** Optional WebSocket constructor (for Node.js environments) */
16
22
  WebSocketCtor?: any;
17
23
  /**
@@ -105,14 +111,21 @@ interface SandboxListResponse {
105
111
  items: Sandbox[];
106
112
  }
107
113
  /**
108
- * Rules defining what tools and resources are allowed/denied
114
+ * Rules defining what effects and resources are allowed or denied.
109
115
  */
110
116
  interface PermissionRules {
111
- /** Tool access rules */
117
+ /** Effect access rules */
118
+ effects?: {
119
+ /** Patterns for allowed effects (e.g. ["*"] for all, ["read_*"] for prefix match) */
120
+ allow?: string[];
121
+ /** Patterns for denied effects */
122
+ deny?: string[];
123
+ };
124
+ /** Legacy alias accepted by the backend while migrating to `effects`. */
112
125
  tools?: {
113
- /** Patterns for allowed tools (e.g. ["*"] for all, ["read_*"] for prefix match) */
126
+ /** Patterns for allowed effects (e.g. ["*"] for all, ["read_*"] for prefix match) */
114
127
  allow?: string[];
115
- /** Patterns for denied tools */
128
+ /** Patterns for denied effects */
116
129
  deny?: string[];
117
130
  };
118
131
  /** Resource access rules */
@@ -242,17 +255,31 @@ interface BuildListResponse {
242
255
  items: Build[];
243
256
  }
244
257
  /**
245
- * Tool handler for static/global tools: receives (params)
258
+ * Effect handler for static/global effects: receives (input, context)
246
259
  */
247
- type ToolHandler = (input: any) => Promise<unknown>;
260
+ interface EffectHandlerContext {
261
+ effectClientId: string;
262
+ sandboxId: string;
263
+ environmentId: string;
264
+ sessionId: string;
265
+ tenantId?: string;
266
+ principalId?: string;
267
+ permissionProfileId?: string;
268
+ user: {
269
+ subjectId: string;
270
+ identityId?: string;
271
+ principalId?: string;
272
+ };
273
+ }
274
+ type ToolHandler = (input: any, context: EffectHandlerContext) => Promise<unknown>;
248
275
  /**
249
- * Tool handler for instance methods: receives (objectId, params)
276
+ * Effect handler for instance methods: receives (objectId, input, context)
250
277
  */
251
- type InstanceToolHandler = (id: string, input: any) => Promise<unknown>;
278
+ type InstanceToolHandler = (id: string, input: any, context: EffectHandlerContext) => Promise<unknown>;
252
279
  /**
253
- * Tool schema for publishing to the server.
280
+ * Effect schema for declaring or registering an effect.
254
281
  *
255
- * Tools come in three flavours:
282
+ * Effects come in three flavours:
256
283
  *
257
284
  * 1. **Instance methods** — set `className`, omit `static`.
258
285
  * In the sandbox: `tolkien.get_bio({ detailed: true })`
@@ -262,7 +289,7 @@ type InstanceToolHandler = (id: string, input: any) => Promise<unknown>;
262
289
  * In the sandbox: `Author.search({ query: 'tolkien' })`
263
290
  * Handler signature: `(params: any) => any`
264
291
  *
265
- * 3. **Global tools** — omit `className`.
292
+ * 3. **Global effects** — omit `className`.
266
293
  * In the sandbox: `global_search({ query: 'rings' })`
267
294
  * Handler signature: `(params: any) => any`
268
295
  *
@@ -271,9 +298,10 @@ type InstanceToolHandler = (id: string, input: any) => Promise<unknown>;
271
298
  * TypeScript declarations that sandbox code imports from `./sandbox-tools`.
272
299
  */
273
300
  interface ToolSchema {
301
+ effectKey?: string;
274
302
  name: string;
275
303
  description: string;
276
- /** JSON Schema for the tool's input parameters */
304
+ /** JSON Schema for the effect input parameters */
277
305
  inputSchema: Record<string, unknown>;
278
306
  /**
279
307
  * JSON Schema for the tool's return value.
@@ -299,9 +327,9 @@ interface ToolSchema {
299
327
  };
300
328
  tags?: string[];
301
329
  /**
302
- * The class this tool belongs to (e.g., `'author'`, `'book'`).
303
- * When set, the tool becomes a method on the auto-generated class.
304
- * Omit for global tools (standalone exported functions).
330
+ * The class this effect belongs to (e.g., `'author'`, `'book'`).
331
+ * When set, the effect becomes a method on the auto-generated class.
332
+ * Omit for global effects (standalone exported functions).
305
333
  */
306
334
  className?: string;
307
335
  /**
@@ -312,8 +340,9 @@ interface ToolSchema {
312
340
  */
313
341
  static?: boolean;
314
342
  }
343
+ type EffectSchema = ToolSchema;
315
344
  /**
316
- * Tool with handler — what users provide to `publishTools()`.
345
+ * Effect with handler — what users provide to `registerEffect()`.
317
346
  *
318
347
  * - **Instance methods** (`className` set, `static` omitted):
319
348
  * handler receives `(objectId: string, params: any)`
@@ -325,8 +354,9 @@ interface ToolSchema {
325
354
  interface ToolWithHandler extends ToolSchema {
326
355
  handler: ToolHandler | InstanceToolHandler;
327
356
  }
357
+ type EffectWithHandler = ToolWithHandler;
328
358
  /**
329
- * Result from publishing tools
359
+ * Result from publishing or synchronizing effects
330
360
  */
331
361
  interface PublishToolsResult {
332
362
  accepted: boolean;
@@ -336,6 +366,7 @@ interface PublishToolsResult {
336
366
  reason: string;
337
367
  }>;
338
368
  }
369
+ type PublishEffectsResult = PublishToolsResult;
339
370
  /**
340
371
  * Domain state response
341
372
  */
@@ -350,39 +381,48 @@ interface DomainState {
350
381
  [key: string]: unknown;
351
382
  }
352
383
  /**
353
- * Information about a published tool
384
+ * Information about a live or declared effect
354
385
  */
355
386
  interface ToolInfo {
356
- /** Unique name of the tool */
387
+ effectKey?: string;
388
+ /** Unique name of the effect */
357
389
  name: string;
358
- /** Description of what the tool does */
390
+ /** Description of what the effect does */
359
391
  description?: string;
360
- /** JSON Schema for tool input */
392
+ /** JSON Schema for effect input */
361
393
  inputSchema?: Record<string, unknown>;
362
- /** JSON Schema for tool output */
394
+ /** JSON Schema for effect output */
363
395
  outputSchema?: Record<string, unknown>;
364
- /** Client ID that published this tool (absent for domain-only entries) */
396
+ /** Client ID that published this effect (absent for domain-only entries) */
365
397
  clientId?: string;
366
- /** Whether the tool is ready for use (has a registered handler) */
398
+ /** Whether the effect is ready for use (has a registered handler) */
367
399
  ready: boolean;
368
- /** Timestamp when the tool was published */
400
+ /** Timestamp when the effect was published */
369
401
  publishedAt?: number;
370
- /** Class this tool belongs to (instance/static method) */
402
+ /** Class this effect belongs to (instance/static method) */
371
403
  className?: string;
372
404
  /** Whether this is a static method */
373
405
  static?: boolean;
374
406
  }
407
+ interface EffectInfo extends ToolInfo {
408
+ }
375
409
  /**
376
- * Event data when the list of available tools changes
410
+ * Event data when the list of available effects changes
377
411
  */
378
412
  interface ToolsChangedEvent {
379
- /** The current list of all available tools */
413
+ /** The current list of all available effects */
380
414
  tools: ToolInfo[];
381
- /** Names of tools that were added or updated */
415
+ /** Names of effects that were added or updated */
382
416
  added: string[];
383
- /** Names of tools that were removed */
417
+ /** Names of effects that were removed */
384
418
  removed: string[];
385
419
  }
420
+ interface EffectsChangedEvent extends ToolsChangedEvent {
421
+ /** The current list of all available effects */
422
+ effects: EffectInfo[];
423
+ }
424
+ type EffectHandler = ToolHandler;
425
+ type InstanceEffectHandler = InstanceToolHandler;
386
426
  type JobStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'timeout' | 'canceled';
387
427
  /**
388
428
  * Result from submitting a job
@@ -429,6 +469,7 @@ interface WSClientOptions {
429
469
  url: string;
430
470
  sessionId: string;
431
471
  token: string;
472
+ tokenProvider?: AccessTokenProvider;
432
473
  WebSocketCtor?: any;
433
474
  onUnexpectedClose?: (info: WSDisconnectInfo) => void;
434
475
  onReconnectError?: (info: WSReconnectErrorInfo) => void;
@@ -593,6 +634,24 @@ interface ManifestRelationshipDef {
593
634
  /** Whether the right side is a collection */
594
635
  rightIsMany: boolean;
595
636
  }
637
+ interface ManifestEffectSchema {
638
+ type: string;
639
+ properties?: Record<string, unknown>;
640
+ required?: string[];
641
+ items?: unknown;
642
+ description?: string;
643
+ [key: string]: unknown;
644
+ }
645
+ interface ManifestEffectDeclaration {
646
+ name: string;
647
+ description?: string;
648
+ attachedClass?: string;
649
+ isStatic?: boolean;
650
+ inputSchema: ManifestEffectSchema;
651
+ outputSchema?: ManifestEffectSchema;
652
+ stability?: 'stable' | 'experimental' | 'deprecated';
653
+ tags?: string[];
654
+ }
596
655
  /**
597
656
  * A single operation in a manifest volume
598
657
  */
@@ -609,6 +668,8 @@ interface ManifestOperation {
609
668
  has?: Record<string, ManifestPropertySpec>;
610
669
  /** Define a relationship between two classes */
611
670
  defineRelationship?: ManifestRelationshipDef;
671
+ /** Declare a build-owned effect */
672
+ withEffect?: ManifestEffectDeclaration;
612
673
  }
613
674
  /**
614
675
  * A volume in a manifest
@@ -662,4 +723,4 @@ interface DeleteResponse {
662
723
  deleted: boolean;
663
724
  }
664
725
 
665
- export type { ManifestPropertySpec as $, AssignmentListResponse as A, BuildPolicy as B, ConnectOptions as C, DomainState as D, EnvironmentData as E, BuildListResponse as F, GranularOptions as G, JobStatus as H, InstanceToolHandler as I, Job as J, JobSubmitResult as K, Prompt as L, ModelRef as M, WSDisconnectInfo as N, WSReconnectErrorInfo as O, PublishToolsResult as P, RPCRequest as Q, RecordUserOptions as R, SandboxListResponse as S, ToolWithHandler as T, User as U, RPCResponse as V, WSClientOptions as W, SyncMessage as X, RPCRequestFromServer as Y, ToolInvokeParams as Z, ToolResultParams as _, ToolHandler as a, ManifestRelationshipDef as a0, ManifestOperation as a1, ManifestImport as a2, ManifestVolume as a3, APIError as a4, ToolInfo as b, ToolsChangedEvent as c, GraphQLResult as d, DefineRelationshipOptions as e, RelationshipInfo as f, ManifestContent as g, RecordObjectOptions as h, RecordObjectResult as i, Sandbox as j, CreateSandboxData as k, DeleteResponse as l, PermissionProfile as m, CreatePermissionProfileData as n, CreateEnvironmentData as o, Subject as p, ToolSchema as q, GranularAuth as r, PermissionRules as s, PermissionProfileListResponse as t, Assignment as u, EnvironmentListResponse as v, Manifest as w, ManifestListResponse as x, BuildStatus as y, Build as z };
726
+ export type { JobSubmitResult as $, AssignmentListResponse as A, BuildPolicy as B, ConnectOptions as C, DomainState as D, EffectInfo as E, Manifest as F, GranularOptions as G, ManifestListResponse as H, InstanceToolHandler as I, Job as J, BuildStatus as K, Build as L, ModelRef as M, BuildListResponse as N, EffectHandlerContext as O, PublishToolsResult as P, EffectSchema as Q, RecordUserOptions as R, SandboxListResponse as S, ToolWithHandler as T, User as U, EffectWithHandler as V, WSClientOptions as W, PublishEffectsResult as X, EffectHandler as Y, InstanceEffectHandler as Z, JobStatus as _, ToolHandler as a, Prompt as a0, WSDisconnectInfo as a1, WSReconnectErrorInfo as a2, RPCRequest as a3, RPCResponse as a4, SyncMessage as a5, RPCRequestFromServer as a6, ToolInvokeParams as a7, ToolResultParams as a8, ManifestPropertySpec as a9, ManifestRelationshipDef as aa, ManifestEffectSchema as ab, ManifestEffectDeclaration as ac, ManifestOperation as ad, ManifestImport as ae, ManifestVolume as af, APIError as ag, ToolInfo as b, EffectsChangedEvent as c, ToolsChangedEvent as d, EnvironmentData as e, GraphQLResult as f, DefineRelationshipOptions as g, RelationshipInfo as h, ManifestContent as i, RecordObjectOptions as j, RecordObjectResult as k, Sandbox as l, CreateSandboxData as m, DeleteResponse as n, PermissionProfile as o, CreatePermissionProfileData as p, CreateEnvironmentData as q, Subject as r, ToolSchema as s, AccessTokenProvider as t, EndpointMode as u, GranularAuth as v, PermissionRules as w, PermissionProfileListResponse as x, Assignment as y, EnvironmentListResponse as z };
@@ -5,13 +5,19 @@
5
5
  /**
6
6
  * Configuration for the Granular client
7
7
  */
8
+ type AccessTokenProvider = () => Promise<string | null | undefined> | string | null | undefined;
9
+ type EndpointMode = 'auto' | 'local' | 'production';
8
10
  interface GranularOptions {
9
11
  /** Your Granular API key (for service/CLI auth; use with GRANULAR_API_KEY) */
10
12
  apiKey?: string;
11
13
  /** Application/session JWT (for user-context auth; use from simulator or getAccessToken) */
12
14
  token?: string;
15
+ /** Optional provider used to refresh JWT before WebSocket (re)connect attempts */
16
+ tokenProvider?: AccessTokenProvider;
13
17
  /** Optional API URL (for on-prem or testing) */
14
18
  apiUrl?: string;
19
+ /** Optional endpoint mode when apiUrl is not explicitly provided */
20
+ endpointMode?: EndpointMode;
15
21
  /** Optional WebSocket constructor (for Node.js environments) */
16
22
  WebSocketCtor?: any;
17
23
  /**
@@ -105,14 +111,21 @@ interface SandboxListResponse {
105
111
  items: Sandbox[];
106
112
  }
107
113
  /**
108
- * Rules defining what tools and resources are allowed/denied
114
+ * Rules defining what effects and resources are allowed or denied.
109
115
  */
110
116
  interface PermissionRules {
111
- /** Tool access rules */
117
+ /** Effect access rules */
118
+ effects?: {
119
+ /** Patterns for allowed effects (e.g. ["*"] for all, ["read_*"] for prefix match) */
120
+ allow?: string[];
121
+ /** Patterns for denied effects */
122
+ deny?: string[];
123
+ };
124
+ /** Legacy alias accepted by the backend while migrating to `effects`. */
112
125
  tools?: {
113
- /** Patterns for allowed tools (e.g. ["*"] for all, ["read_*"] for prefix match) */
126
+ /** Patterns for allowed effects (e.g. ["*"] for all, ["read_*"] for prefix match) */
114
127
  allow?: string[];
115
- /** Patterns for denied tools */
128
+ /** Patterns for denied effects */
116
129
  deny?: string[];
117
130
  };
118
131
  /** Resource access rules */
@@ -242,17 +255,31 @@ interface BuildListResponse {
242
255
  items: Build[];
243
256
  }
244
257
  /**
245
- * Tool handler for static/global tools: receives (params)
258
+ * Effect handler for static/global effects: receives (input, context)
246
259
  */
247
- type ToolHandler = (input: any) => Promise<unknown>;
260
+ interface EffectHandlerContext {
261
+ effectClientId: string;
262
+ sandboxId: string;
263
+ environmentId: string;
264
+ sessionId: string;
265
+ tenantId?: string;
266
+ principalId?: string;
267
+ permissionProfileId?: string;
268
+ user: {
269
+ subjectId: string;
270
+ identityId?: string;
271
+ principalId?: string;
272
+ };
273
+ }
274
+ type ToolHandler = (input: any, context: EffectHandlerContext) => Promise<unknown>;
248
275
  /**
249
- * Tool handler for instance methods: receives (objectId, params)
276
+ * Effect handler for instance methods: receives (objectId, input, context)
250
277
  */
251
- type InstanceToolHandler = (id: string, input: any) => Promise<unknown>;
278
+ type InstanceToolHandler = (id: string, input: any, context: EffectHandlerContext) => Promise<unknown>;
252
279
  /**
253
- * Tool schema for publishing to the server.
280
+ * Effect schema for declaring or registering an effect.
254
281
  *
255
- * Tools come in three flavours:
282
+ * Effects come in three flavours:
256
283
  *
257
284
  * 1. **Instance methods** — set `className`, omit `static`.
258
285
  * In the sandbox: `tolkien.get_bio({ detailed: true })`
@@ -262,7 +289,7 @@ type InstanceToolHandler = (id: string, input: any) => Promise<unknown>;
262
289
  * In the sandbox: `Author.search({ query: 'tolkien' })`
263
290
  * Handler signature: `(params: any) => any`
264
291
  *
265
- * 3. **Global tools** — omit `className`.
292
+ * 3. **Global effects** — omit `className`.
266
293
  * In the sandbox: `global_search({ query: 'rings' })`
267
294
  * Handler signature: `(params: any) => any`
268
295
  *
@@ -271,9 +298,10 @@ type InstanceToolHandler = (id: string, input: any) => Promise<unknown>;
271
298
  * TypeScript declarations that sandbox code imports from `./sandbox-tools`.
272
299
  */
273
300
  interface ToolSchema {
301
+ effectKey?: string;
274
302
  name: string;
275
303
  description: string;
276
- /** JSON Schema for the tool's input parameters */
304
+ /** JSON Schema for the effect input parameters */
277
305
  inputSchema: Record<string, unknown>;
278
306
  /**
279
307
  * JSON Schema for the tool's return value.
@@ -299,9 +327,9 @@ interface ToolSchema {
299
327
  };
300
328
  tags?: string[];
301
329
  /**
302
- * The class this tool belongs to (e.g., `'author'`, `'book'`).
303
- * When set, the tool becomes a method on the auto-generated class.
304
- * Omit for global tools (standalone exported functions).
330
+ * The class this effect belongs to (e.g., `'author'`, `'book'`).
331
+ * When set, the effect becomes a method on the auto-generated class.
332
+ * Omit for global effects (standalone exported functions).
305
333
  */
306
334
  className?: string;
307
335
  /**
@@ -312,8 +340,9 @@ interface ToolSchema {
312
340
  */
313
341
  static?: boolean;
314
342
  }
343
+ type EffectSchema = ToolSchema;
315
344
  /**
316
- * Tool with handler — what users provide to `publishTools()`.
345
+ * Effect with handler — what users provide to `registerEffect()`.
317
346
  *
318
347
  * - **Instance methods** (`className` set, `static` omitted):
319
348
  * handler receives `(objectId: string, params: any)`
@@ -325,8 +354,9 @@ interface ToolSchema {
325
354
  interface ToolWithHandler extends ToolSchema {
326
355
  handler: ToolHandler | InstanceToolHandler;
327
356
  }
357
+ type EffectWithHandler = ToolWithHandler;
328
358
  /**
329
- * Result from publishing tools
359
+ * Result from publishing or synchronizing effects
330
360
  */
331
361
  interface PublishToolsResult {
332
362
  accepted: boolean;
@@ -336,6 +366,7 @@ interface PublishToolsResult {
336
366
  reason: string;
337
367
  }>;
338
368
  }
369
+ type PublishEffectsResult = PublishToolsResult;
339
370
  /**
340
371
  * Domain state response
341
372
  */
@@ -350,39 +381,48 @@ interface DomainState {
350
381
  [key: string]: unknown;
351
382
  }
352
383
  /**
353
- * Information about a published tool
384
+ * Information about a live or declared effect
354
385
  */
355
386
  interface ToolInfo {
356
- /** Unique name of the tool */
387
+ effectKey?: string;
388
+ /** Unique name of the effect */
357
389
  name: string;
358
- /** Description of what the tool does */
390
+ /** Description of what the effect does */
359
391
  description?: string;
360
- /** JSON Schema for tool input */
392
+ /** JSON Schema for effect input */
361
393
  inputSchema?: Record<string, unknown>;
362
- /** JSON Schema for tool output */
394
+ /** JSON Schema for effect output */
363
395
  outputSchema?: Record<string, unknown>;
364
- /** Client ID that published this tool (absent for domain-only entries) */
396
+ /** Client ID that published this effect (absent for domain-only entries) */
365
397
  clientId?: string;
366
- /** Whether the tool is ready for use (has a registered handler) */
398
+ /** Whether the effect is ready for use (has a registered handler) */
367
399
  ready: boolean;
368
- /** Timestamp when the tool was published */
400
+ /** Timestamp when the effect was published */
369
401
  publishedAt?: number;
370
- /** Class this tool belongs to (instance/static method) */
402
+ /** Class this effect belongs to (instance/static method) */
371
403
  className?: string;
372
404
  /** Whether this is a static method */
373
405
  static?: boolean;
374
406
  }
407
+ interface EffectInfo extends ToolInfo {
408
+ }
375
409
  /**
376
- * Event data when the list of available tools changes
410
+ * Event data when the list of available effects changes
377
411
  */
378
412
  interface ToolsChangedEvent {
379
- /** The current list of all available tools */
413
+ /** The current list of all available effects */
380
414
  tools: ToolInfo[];
381
- /** Names of tools that were added or updated */
415
+ /** Names of effects that were added or updated */
382
416
  added: string[];
383
- /** Names of tools that were removed */
417
+ /** Names of effects that were removed */
384
418
  removed: string[];
385
419
  }
420
+ interface EffectsChangedEvent extends ToolsChangedEvent {
421
+ /** The current list of all available effects */
422
+ effects: EffectInfo[];
423
+ }
424
+ type EffectHandler = ToolHandler;
425
+ type InstanceEffectHandler = InstanceToolHandler;
386
426
  type JobStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'timeout' | 'canceled';
387
427
  /**
388
428
  * Result from submitting a job
@@ -429,6 +469,7 @@ interface WSClientOptions {
429
469
  url: string;
430
470
  sessionId: string;
431
471
  token: string;
472
+ tokenProvider?: AccessTokenProvider;
432
473
  WebSocketCtor?: any;
433
474
  onUnexpectedClose?: (info: WSDisconnectInfo) => void;
434
475
  onReconnectError?: (info: WSReconnectErrorInfo) => void;
@@ -593,6 +634,24 @@ interface ManifestRelationshipDef {
593
634
  /** Whether the right side is a collection */
594
635
  rightIsMany: boolean;
595
636
  }
637
+ interface ManifestEffectSchema {
638
+ type: string;
639
+ properties?: Record<string, unknown>;
640
+ required?: string[];
641
+ items?: unknown;
642
+ description?: string;
643
+ [key: string]: unknown;
644
+ }
645
+ interface ManifestEffectDeclaration {
646
+ name: string;
647
+ description?: string;
648
+ attachedClass?: string;
649
+ isStatic?: boolean;
650
+ inputSchema: ManifestEffectSchema;
651
+ outputSchema?: ManifestEffectSchema;
652
+ stability?: 'stable' | 'experimental' | 'deprecated';
653
+ tags?: string[];
654
+ }
596
655
  /**
597
656
  * A single operation in a manifest volume
598
657
  */
@@ -609,6 +668,8 @@ interface ManifestOperation {
609
668
  has?: Record<string, ManifestPropertySpec>;
610
669
  /** Define a relationship between two classes */
611
670
  defineRelationship?: ManifestRelationshipDef;
671
+ /** Declare a build-owned effect */
672
+ withEffect?: ManifestEffectDeclaration;
612
673
  }
613
674
  /**
614
675
  * A volume in a manifest
@@ -662,4 +723,4 @@ interface DeleteResponse {
662
723
  deleted: boolean;
663
724
  }
664
725
 
665
- export type { ManifestPropertySpec as $, AssignmentListResponse as A, BuildPolicy as B, ConnectOptions as C, DomainState as D, EnvironmentData as E, BuildListResponse as F, GranularOptions as G, JobStatus as H, InstanceToolHandler as I, Job as J, JobSubmitResult as K, Prompt as L, ModelRef as M, WSDisconnectInfo as N, WSReconnectErrorInfo as O, PublishToolsResult as P, RPCRequest as Q, RecordUserOptions as R, SandboxListResponse as S, ToolWithHandler as T, User as U, RPCResponse as V, WSClientOptions as W, SyncMessage as X, RPCRequestFromServer as Y, ToolInvokeParams as Z, ToolResultParams as _, ToolHandler as a, ManifestRelationshipDef as a0, ManifestOperation as a1, ManifestImport as a2, ManifestVolume as a3, APIError as a4, ToolInfo as b, ToolsChangedEvent as c, GraphQLResult as d, DefineRelationshipOptions as e, RelationshipInfo as f, ManifestContent as g, RecordObjectOptions as h, RecordObjectResult as i, Sandbox as j, CreateSandboxData as k, DeleteResponse as l, PermissionProfile as m, CreatePermissionProfileData as n, CreateEnvironmentData as o, Subject as p, ToolSchema as q, GranularAuth as r, PermissionRules as s, PermissionProfileListResponse as t, Assignment as u, EnvironmentListResponse as v, Manifest as w, ManifestListResponse as x, BuildStatus as y, Build as z };
726
+ export type { JobSubmitResult as $, AssignmentListResponse as A, BuildPolicy as B, ConnectOptions as C, DomainState as D, EffectInfo as E, Manifest as F, GranularOptions as G, ManifestListResponse as H, InstanceToolHandler as I, Job as J, BuildStatus as K, Build as L, ModelRef as M, BuildListResponse as N, EffectHandlerContext as O, PublishToolsResult as P, EffectSchema as Q, RecordUserOptions as R, SandboxListResponse as S, ToolWithHandler as T, User as U, EffectWithHandler as V, WSClientOptions as W, PublishEffectsResult as X, EffectHandler as Y, InstanceEffectHandler as Z, JobStatus as _, ToolHandler as a, Prompt as a0, WSDisconnectInfo as a1, WSReconnectErrorInfo as a2, RPCRequest as a3, RPCResponse as a4, SyncMessage as a5, RPCRequestFromServer as a6, ToolInvokeParams as a7, ToolResultParams as a8, ManifestPropertySpec as a9, ManifestRelationshipDef as aa, ManifestEffectSchema as ab, ManifestEffectDeclaration as ac, ManifestOperation as ad, ManifestImport as ae, ManifestVolume as af, APIError as ag, ToolInfo as b, EffectsChangedEvent as c, ToolsChangedEvent as d, EnvironmentData as e, GraphQLResult as f, DefineRelationshipOptions as g, RelationshipInfo as h, ManifestContent as i, RecordObjectOptions as j, RecordObjectResult as k, Sandbox as l, CreateSandboxData as m, DeleteResponse as n, PermissionProfile as o, CreatePermissionProfileData as p, CreateEnvironmentData as q, Subject as r, ToolSchema as s, AccessTokenProvider as t, EndpointMode as u, GranularAuth as v, PermissionRules as w, PermissionProfileListResponse as x, Assignment as y, EnvironmentListResponse as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granular-software/sdk",
3
- "version": "0.3.4",
3
+ "version": "0.4.2",
4
4
  "description": "TypeScript SDK and CLI for Granular - define, build, and deploy AI sandboxes",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",