@granular-software/sdk 0.3.2 → 0.3.4
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/adapters/anthropic.d.mts +1 -1
- package/dist/adapters/anthropic.d.ts +1 -1
- package/dist/adapters/langchain.d.mts +1 -1
- package/dist/adapters/langchain.d.ts +1 -1
- package/dist/adapters/mastra.d.mts +1 -1
- package/dist/adapters/mastra.d.ts +1 -1
- package/dist/adapters/openai.d.mts +1 -1
- package/dist/adapters/openai.d.ts +1 -1
- package/dist/cli/index.js +443 -22
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +110 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +110 -16
- package/dist/index.mjs.map +1 -1
- package/dist/{types-CnX4jXYQ.d.mts → types-D5B8WlF4.d.mts} +27 -1
- package/dist/{types-CnX4jXYQ.d.ts → types-D5B8WlF4.d.ts} +27 -1
- package/package.json +1 -1
|
@@ -14,6 +14,16 @@ interface GranularOptions {
|
|
|
14
14
|
apiUrl?: string;
|
|
15
15
|
/** Optional WebSocket constructor (for Node.js environments) */
|
|
16
16
|
WebSocketCtor?: any;
|
|
17
|
+
/**
|
|
18
|
+
* Optional callback invoked when a connected WebSocket closes unexpectedly.
|
|
19
|
+
* Useful for forwarding close diagnostics to monitoring (e.g., Sentry).
|
|
20
|
+
*/
|
|
21
|
+
onUnexpectedClose?: (info: WSDisconnectInfo) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Optional callback invoked when automatic reconnect fails.
|
|
24
|
+
* Useful to capture auth or gateway rejection causes.
|
|
25
|
+
*/
|
|
26
|
+
onReconnectError?: (info: WSReconnectErrorInfo) => void;
|
|
17
27
|
}
|
|
18
28
|
/** Resolved auth credential: either apiKey or token must be provided */
|
|
19
29
|
type GranularAuth = string;
|
|
@@ -401,11 +411,27 @@ interface Prompt {
|
|
|
401
411
|
options?: string[];
|
|
402
412
|
defaultValue?: unknown;
|
|
403
413
|
}
|
|
414
|
+
interface WSDisconnectInfo {
|
|
415
|
+
code?: number;
|
|
416
|
+
reason?: string;
|
|
417
|
+
wasClean?: boolean;
|
|
418
|
+
unexpected: boolean;
|
|
419
|
+
timestamp: number;
|
|
420
|
+
reconnectScheduled: boolean;
|
|
421
|
+
reconnectDelayMs?: number;
|
|
422
|
+
}
|
|
423
|
+
interface WSReconnectErrorInfo {
|
|
424
|
+
sessionId: string;
|
|
425
|
+
error: string;
|
|
426
|
+
timestamp: number;
|
|
427
|
+
}
|
|
404
428
|
interface WSClientOptions {
|
|
405
429
|
url: string;
|
|
406
430
|
sessionId: string;
|
|
407
431
|
token: string;
|
|
408
432
|
WebSocketCtor?: any;
|
|
433
|
+
onUnexpectedClose?: (info: WSDisconnectInfo) => void;
|
|
434
|
+
onReconnectError?: (info: WSReconnectErrorInfo) => void;
|
|
409
435
|
}
|
|
410
436
|
interface RPCRequest {
|
|
411
437
|
type: 'rpc';
|
|
@@ -636,4 +662,4 @@ interface DeleteResponse {
|
|
|
636
662
|
deleted: boolean;
|
|
637
663
|
}
|
|
638
664
|
|
|
639
|
-
export type {
|
|
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 };
|
|
@@ -14,6 +14,16 @@ interface GranularOptions {
|
|
|
14
14
|
apiUrl?: string;
|
|
15
15
|
/** Optional WebSocket constructor (for Node.js environments) */
|
|
16
16
|
WebSocketCtor?: any;
|
|
17
|
+
/**
|
|
18
|
+
* Optional callback invoked when a connected WebSocket closes unexpectedly.
|
|
19
|
+
* Useful for forwarding close diagnostics to monitoring (e.g., Sentry).
|
|
20
|
+
*/
|
|
21
|
+
onUnexpectedClose?: (info: WSDisconnectInfo) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Optional callback invoked when automatic reconnect fails.
|
|
24
|
+
* Useful to capture auth or gateway rejection causes.
|
|
25
|
+
*/
|
|
26
|
+
onReconnectError?: (info: WSReconnectErrorInfo) => void;
|
|
17
27
|
}
|
|
18
28
|
/** Resolved auth credential: either apiKey or token must be provided */
|
|
19
29
|
type GranularAuth = string;
|
|
@@ -401,11 +411,27 @@ interface Prompt {
|
|
|
401
411
|
options?: string[];
|
|
402
412
|
defaultValue?: unknown;
|
|
403
413
|
}
|
|
414
|
+
interface WSDisconnectInfo {
|
|
415
|
+
code?: number;
|
|
416
|
+
reason?: string;
|
|
417
|
+
wasClean?: boolean;
|
|
418
|
+
unexpected: boolean;
|
|
419
|
+
timestamp: number;
|
|
420
|
+
reconnectScheduled: boolean;
|
|
421
|
+
reconnectDelayMs?: number;
|
|
422
|
+
}
|
|
423
|
+
interface WSReconnectErrorInfo {
|
|
424
|
+
sessionId: string;
|
|
425
|
+
error: string;
|
|
426
|
+
timestamp: number;
|
|
427
|
+
}
|
|
404
428
|
interface WSClientOptions {
|
|
405
429
|
url: string;
|
|
406
430
|
sessionId: string;
|
|
407
431
|
token: string;
|
|
408
432
|
WebSocketCtor?: any;
|
|
433
|
+
onUnexpectedClose?: (info: WSDisconnectInfo) => void;
|
|
434
|
+
onReconnectError?: (info: WSReconnectErrorInfo) => void;
|
|
409
435
|
}
|
|
410
436
|
interface RPCRequest {
|
|
411
437
|
type: 'rpc';
|
|
@@ -636,4 +662,4 @@ interface DeleteResponse {
|
|
|
636
662
|
deleted: boolean;
|
|
637
663
|
}
|
|
638
664
|
|
|
639
|
-
export type {
|
|
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 };
|