@granular-software/sdk 0.4.25 → 0.4.27

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.
@@ -9,7 +9,7 @@ import { Doc } from '@automerge/automerge/slim';
9
9
  * Configuration for the Granular client
10
10
  */
11
11
  type AccessTokenProvider = () => Promise<string | null | undefined> | string | null | undefined;
12
- type EndpointMode = 'auto' | 'local' | 'production';
12
+ type EndpointMode = "auto" | "local" | "production";
13
13
  interface GranularOptions {
14
14
  /** Your Granular API key (for service/CLI auth; use with GRANULAR_API_KEY) */
15
15
  apiKey?: string;
@@ -131,7 +131,7 @@ interface ConversationSessionInfo {
131
131
  environmentId: string;
132
132
  versionId?: string | null;
133
133
  docId: string;
134
- status: 'active' | 'closed' | 'expired';
134
+ status: "active" | "closed" | "expired";
135
135
  createdAt: string;
136
136
  lastSeenAt: string;
137
137
  summary?: string | null;
@@ -239,7 +239,7 @@ interface AssignmentListResponse {
239
239
  * pin themselves to one immutable ontology version.
240
240
  */
241
241
  interface BuildPolicy {
242
- mode: 'tag' | 'current' | 'pinned';
242
+ mode: "tag" | "current" | "pinned";
243
243
  buildId?: string;
244
244
  versionId?: string;
245
245
  tagId?: string;
@@ -250,7 +250,7 @@ interface VersionTag {
250
250
  tagId: string;
251
251
  sandboxId: string;
252
252
  name: string;
253
- kind: 'channel' | 'release' | 'system';
253
+ kind: "channel" | "release" | "system";
254
254
  targetBuildId?: string | null;
255
255
  targetVersionId?: string | null;
256
256
  description?: string | null;
@@ -275,7 +275,7 @@ interface EnvironmentData {
275
275
  tag?: VersionTag | null;
276
276
  tracking?: BuildPolicy;
277
277
  buildPolicy: BuildPolicy;
278
- updateState?: 'up_to_date' | 'update_available' | 'upgrading' | 'failed';
278
+ updateState?: "up_to_date" | "update_available" | "upgrading" | "failed";
279
279
  createdAt: number;
280
280
  updatedAt: number;
281
281
  }
@@ -324,7 +324,7 @@ interface Manifest {
324
324
  interface ManifestListResponse {
325
325
  items: Manifest[];
326
326
  }
327
- type BuildStatus = 'queued' | 'building' | 'completed' | 'failed' | 'canceled';
327
+ type BuildStatus = "queued" | "building" | "completed" | "failed" | "canceled";
328
328
  /**
329
329
  * An immutable ontology version derived from a specific manifest revision.
330
330
  *
@@ -359,8 +359,8 @@ interface BuildListResponse {
359
359
  }
360
360
  interface SemanticVersionDiffEntry {
361
361
  operationId: string;
362
- kind: 'create' | 'update' | 'relationship' | 'effect' | 'eventStream' | 'unknown';
363
- changeType: 'added' | 'removed' | 'changed';
362
+ kind: "create" | "update" | "relationship" | "effect" | "eventStream" | "unknown";
363
+ changeType: "added" | "removed" | "changed";
364
364
  label: string;
365
365
  additive: boolean;
366
366
  breaking: boolean;
@@ -422,7 +422,7 @@ interface ResolvedEffectBehaviors {
422
422
  reverse?: ResolvedEffectReverse;
423
423
  approvalRequired?: ResolvedEffectApprovalRequired;
424
424
  }
425
- type EffectInvocationMode = 'execute' | 'dryRun' | 'reverse';
425
+ type EffectInvocationMode = "execute" | "dryRun" | "reverse";
426
426
  interface EffectInvocationMetadata {
427
427
  mode?: EffectInvocationMode;
428
428
  reverseHandler?: string;
@@ -479,9 +479,9 @@ interface ToolSchema {
479
479
  * ```
480
480
  */
481
481
  outputSchema?: Record<string, unknown>;
482
- stability?: 'stable' | 'experimental' | 'deprecated';
482
+ stability?: "stable" | "experimental" | "deprecated";
483
483
  provenance?: {
484
- source: 'mcp' | 'custom';
484
+ source: "mcp" | "custom";
485
485
  };
486
486
  tags?: string[];
487
487
  /**
@@ -588,8 +588,8 @@ interface EffectsChangedEvent extends ToolsChangedEvent {
588
588
  }
589
589
  type EffectHandler = ToolHandler;
590
590
  type InstanceEffectHandler = InstanceToolHandler;
591
- type JobStatus = 'queued' | 'running' | 'awaitingTool' | 'awaitingHuman' | 'succeeded' | 'failed' | 'timeout' | 'canceled';
592
- type JobFeedbackSentiment = 'good' | 'bad';
591
+ type JobStatus = "queued" | "running" | "awaitingTool" | "awaitingHuman" | "succeeded" | "failed" | "timeout" | "canceled";
592
+ type JobFeedbackSentiment = "good" | "bad";
593
593
  interface JobFeedbackToolCall {
594
594
  callId?: string;
595
595
  toolName?: string;
@@ -601,7 +601,7 @@ interface JobFeedbackToolCall {
601
601
  durationMs?: number | null;
602
602
  }
603
603
  interface JobFeedbackMetadata {
604
- source: 'sdk';
604
+ source: "sdk";
605
605
  status: JobStatus;
606
606
  code: string;
607
607
  domainRevision?: string;
@@ -657,7 +657,7 @@ interface Job {
657
657
  }
658
658
  interface Prompt {
659
659
  id: string;
660
- type: 'confirm' | 'choice' | 'input';
660
+ type: "confirm" | "choice" | "input";
661
661
  title: string;
662
662
  message: string;
663
663
  options?: Array<string | {
@@ -670,7 +670,42 @@ interface Prompt {
670
670
  allowEmpty?: boolean;
671
671
  metadata?: Record<string, unknown>;
672
672
  }
673
- type SessionHeapFieldType = 'string' | 'number' | 'boolean' | 'null' | 'unknown';
673
+ interface ConversationMessageShowRefs {
674
+ entryPaths?: string[];
675
+ listNames?: string[];
676
+ variableNames?: string[];
677
+ }
678
+ interface ConversationMessageInput {
679
+ role: "user" | "assistant";
680
+ content?: string;
681
+ show?: ConversationMessageShowRefs;
682
+ jobId?: string;
683
+ promptId?: string;
684
+ timestamp?: number;
685
+ }
686
+ interface ConversationAppendResult {
687
+ ok: boolean;
688
+ messageId: string;
689
+ timestamp: number;
690
+ jobId?: string;
691
+ promptId?: string;
692
+ }
693
+ interface SessionTranscriptEntry {
694
+ id: string;
695
+ role: "user" | "assistant";
696
+ content: string;
697
+ timestamp: number;
698
+ jobId?: string;
699
+ promptId?: string;
700
+ code?: string;
701
+ jobStatus?: string;
702
+ jobResultPreview?: string;
703
+ error?: string;
704
+ show?: ConversationMessageShowRefs;
705
+ historyContent?: string;
706
+ source: "conversation" | "job_code" | "job_result" | "job_prompt" | "job_agent_message";
707
+ }
708
+ type SessionHeapFieldType = "string" | "number" | "boolean" | "null" | "unknown";
674
709
  interface SessionHeapFieldValue {
675
710
  name: string;
676
711
  type: SessionHeapFieldType;
@@ -698,7 +733,7 @@ interface SessionHeapList {
698
733
  }
699
734
  interface SessionHeapVariable {
700
735
  name: string;
701
- kind: 'entry' | 'list' | 'scalar';
736
+ kind: "entry" | "list" | "scalar";
702
737
  entryPath?: string;
703
738
  listName?: string;
704
739
  value?: string | number | boolean | null;
@@ -735,13 +770,13 @@ interface WSClientOptions {
735
770
  onReconnectError?: (info: WSReconnectErrorInfo) => void;
736
771
  }
737
772
  interface RPCRequest {
738
- type: 'rpc';
773
+ type: "rpc";
739
774
  method: string;
740
775
  params: unknown;
741
776
  id: string;
742
777
  }
743
778
  interface RPCResponse {
744
- type: 'rpc_result' | 'rpc_error';
779
+ type: "rpc_result" | "rpc_error";
745
780
  id: string;
746
781
  result?: unknown;
747
782
  error?: {
@@ -751,12 +786,12 @@ interface RPCResponse {
751
786
  };
752
787
  }
753
788
  interface SyncMessage {
754
- type: 'sync';
789
+ type: "sync";
755
790
  message?: string | number[] | Uint8Array;
756
791
  data?: number[];
757
792
  }
758
793
  interface RPCRequestFromServer {
759
- type: 'rpc';
794
+ type: "rpc";
760
795
  method: string;
761
796
  params: unknown;
762
797
  id: string;
@@ -800,7 +835,7 @@ interface RelationshipInfo {
800
835
  /** The foreign model type */
801
836
  foreign_model: ModelRef;
802
837
  /** Computed relationship kind: "one_to_one" | "one_to_many" | "many_to_one" | "many_to_many" */
803
- relationship_kind: 'one_to_one' | 'one_to_many' | 'many_to_one' | 'many_to_many';
838
+ relationship_kind: "one_to_one" | "one_to_many" | "many_to_one" | "many_to_many";
804
839
  }
805
840
  /**
806
841
  * Options for defining a relationship between two model types
@@ -899,8 +934,8 @@ interface RecordObjectsOptions {
899
934
  */
900
935
  onChunkComplete?: (info: RecordObjectsChunkInfo) => void | Promise<void>;
901
936
  }
902
- type RecordImportStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'canceled';
903
- type RecordImportItemStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'canceled';
937
+ type RecordImportStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
938
+ type RecordImportItemStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
904
939
  interface RecordImportStats {
905
940
  totalRecords: number;
906
941
  queuedRecords: number;
@@ -965,10 +1000,14 @@ interface ManifestPropertySpec {
965
1000
  required?: boolean;
966
1001
  note?: string | string[];
967
1002
  enum?: string[] | ManifestEnumRuleSpec;
1003
+ searchable?: boolean | {
1004
+ enabled?: boolean;
1005
+ phonetic?: boolean;
1006
+ };
968
1007
  filterBy?: boolean | string[] | ManifestFilterBySpec;
969
1008
  validate?: ManifestValidationRuleSpec[];
970
1009
  }
971
- type ManifestValidationOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'true' | 'false' | 'regex' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with';
1010
+ type ManifestValidationOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "true" | "false" | "regex" | "contains" | "not_contains" | "starts_with" | "ends_with";
972
1011
  interface ManifestEnumRuleSpec {
973
1012
  values: string[];
974
1013
  message?: string;
@@ -1057,7 +1096,7 @@ interface ManifestEffectDeclaration {
1057
1096
  isStatic?: boolean;
1058
1097
  inputSchema: ManifestEffectSchema;
1059
1098
  outputSchema?: ManifestEffectSchema;
1060
- stability?: 'stable' | 'experimental' | 'deprecated';
1099
+ stability?: "stable" | "experimental" | "deprecated";
1061
1100
  tags?: string[];
1062
1101
  metamodels?: ManifestEffectMetamodelSpec;
1063
1102
  }
@@ -1118,7 +1157,7 @@ interface ManifestImport {
1118
1157
  }
1119
1158
  interface ManifestVolume {
1120
1159
  name: string;
1121
- scope: 'sandbox' | 'build' | 'user';
1160
+ scope: "sandbox" | "build" | "user";
1122
1161
  imports?: ManifestImport[];
1123
1162
  operations: ManifestOperation[];
1124
1163
  }
@@ -1161,7 +1200,7 @@ interface StreamEvent {
1161
1200
  environmentId: string;
1162
1201
  sessionId?: string;
1163
1202
  subjectId?: string;
1164
- source: 'sandbox' | 'api';
1203
+ source: "sandbox" | "api";
1165
1204
  isAcked: boolean;
1166
1205
  createdAt: number;
1167
1206
  }
@@ -1269,6 +1308,7 @@ declare class Session {
1269
1308
  constructor(client: WSClient, clientId?: string);
1270
1309
  private extractDomainRevisionFromDoc;
1271
1310
  private buildLegacyEffectContext;
1311
+ private stringifyConversationValue;
1272
1312
  get document(): Doc<Record<string, unknown>>;
1273
1313
  get sessionId(): string;
1274
1314
  get domainRevision(): string | null;
@@ -1340,6 +1380,7 @@ declare class Session {
1340
1380
  * Respond to a prompt request from the sandbox
1341
1381
  */
1342
1382
  answerPrompt(promptId: string, answer: unknown): Promise<void>;
1383
+ appendConversationMessage(input: ConversationMessageInput): Promise<ConversationAppendResult>;
1343
1384
  /**
1344
1385
  * Get the current list of available effects.
1345
1386
  * Consolidates effect declarations and live availability for the session.
@@ -2054,4 +2095,4 @@ declare class Granular {
2054
2095
  private request;
2055
2096
  }
2056
2097
 
2057
- export { type EffectInvocationMode as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type Manifest as F, Granular as G, type ManifestListResponse as H, type InstanceToolHandler as I, type BuildStatus as J, type Build as K, type Version as L, type ManifestEffectMetamodelSpec as M, type BuildListResponse as N, type SemanticVersionDiffEntry as O, type Prompt as P, type SemanticVersionDiff as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type ResolvedEffectPostCondition as X, type ResolvedEffectDryRun as Y, type ResolvedEffectReverse as Z, type ResolvedEffectApprovalRequired as _, type EffectHandlerContext as a, type ManifestContent as a$, type EffectInvocationMetadata as a0, type EffectSchema as a1, type EffectWithHandler as a2, type PublishEffectsResult as a3, type ToolInfo as a4, type EffectInfo as a5, type ToolsChangedEvent as a6, type EffectsChangedEvent as a7, type EffectHandler as a8, type InstanceEffectHandler as a9, type RecordObjectsOptions as aA, type RecordImportStatus as aB, type RecordImportItemStatus as aC, type RecordImportStats as aD, type RecordImportItem as aE, type RecordImport as aF, type EnvironmentRecordImportSummary as aG, type ManifestPropertySpec as aH, type ManifestValidationOperator as aI, type ManifestEnumRuleSpec as aJ, type ManifestFilterBySpec as aK, type ManifestValidationRuleSpec as aL, type ManifestStateMachineStateSpec as aM, type ManifestStateMachineTransitionSpec as aN, type ManifestStateMachineSpec as aO, type ManifestPostConditionSpec as aP, type ManifestDryRunSpec as aQ, type ManifestReverseSpec as aR, type ManifestApprovalRequiredSpec as aS, type ManifestRelationshipDef as aT, type ManifestEffectSchema as aU, type ManifestEffectDeclaration as aV, type ManifestEventTypeDef as aW, type ManifestEventStreamDef as aX, type ManifestOperation as aY, type ManifestImport as aZ, type ManifestVolume as a_, type JobStatus as aa, type JobFeedbackSentiment as ab, type JobFeedbackToolCall as ac, type JobFeedbackMetadata as ad, type JobFeedbackInput as ae, type JobFeedbackRecord as af, type JobSubmitResult as ag, type Job as ah, type SessionHeapFieldType as ai, type SessionHeapFieldValue as aj, type SessionHeapVariable as ak, type WSDisconnectInfo as al, type WSReconnectErrorInfo as am, type WSClientOptions as an, type RPCRequest as ao, type RPCResponse as ap, type SyncMessage as aq, type RPCRequestFromServer as ar, type ToolInvokeParams as as, type ToolResultParams as at, type ModelRef as au, type RelationshipInfo as av, type DefineRelationshipOptions as aw, type RecordObjectOptions as ax, type RecordObjectResult as ay, type RecordObjectsChunkInfo as az, type SessionHeapList as b, type GraphQLResult as b0, type APIError as b1, type DeleteResponse as b2, type StreamEvent as b3, type StreamSubscription as b4, type StreamStats as b5, type SessionHeapSnapshot as c, Environment as d, Session as e, type ToolSchema as f, type PublishToolsResult as g, type ToolHandler as h, type GranularOptions as i, type GranularAuth as j, type RecordUserOptions as k, type Subject as l, type ConversationSessionInfo as m, type Sandbox as n, type CreateSandboxData as o, type SandboxListResponse as p, type PermissionRules as q, type PermissionProfile as r, type CreatePermissionProfileData as s, type PermissionProfileListResponse as t, type Assignment as u, type AssignmentListResponse as v, type VersionTag as w, type EnvironmentData as x, type CreateEnvironmentData as y, type EnvironmentListResponse as z };
2098
+ export { type ResolvedEffectApprovalRequired as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type EnvironmentListResponse as F, Granular as G, type Manifest as H, type InstanceToolHandler as I, type ManifestListResponse as J, type BuildStatus as K, type Build as L, type ManifestEffectMetamodelSpec as M, type Version as N, type BuildListResponse as O, type Prompt as P, type SemanticVersionDiffEntry as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type SemanticVersionDiff as X, type ResolvedEffectPostCondition as Y, type ResolvedEffectDryRun as Z, type ResolvedEffectReverse as _, type EffectHandlerContext as a, type ManifestEventStreamDef as a$, type EffectInvocationMode as a0, type EffectInvocationMetadata as a1, type EffectSchema as a2, type EffectWithHandler as a3, type PublishEffectsResult as a4, type ToolInfo as a5, type EffectInfo as a6, type ToolsChangedEvent as a7, type EffectsChangedEvent as a8, type EffectHandler as a9, type DefineRelationshipOptions as aA, type RecordObjectOptions as aB, type RecordObjectResult as aC, type RecordObjectsChunkInfo as aD, type RecordObjectsOptions as aE, type RecordImportStatus as aF, type RecordImportItemStatus as aG, type RecordImportStats as aH, type RecordImportItem as aI, type RecordImport as aJ, type EnvironmentRecordImportSummary as aK, type ManifestPropertySpec as aL, type ManifestValidationOperator as aM, type ManifestEnumRuleSpec as aN, type ManifestFilterBySpec as aO, type ManifestValidationRuleSpec as aP, type ManifestStateMachineStateSpec as aQ, type ManifestStateMachineTransitionSpec as aR, type ManifestStateMachineSpec as aS, type ManifestPostConditionSpec as aT, type ManifestDryRunSpec as aU, type ManifestReverseSpec as aV, type ManifestApprovalRequiredSpec as aW, type ManifestRelationshipDef as aX, type ManifestEffectSchema as aY, type ManifestEffectDeclaration as aZ, type ManifestEventTypeDef as a_, type InstanceEffectHandler as aa, type JobStatus as ab, type JobFeedbackSentiment as ac, type JobFeedbackToolCall as ad, type JobFeedbackMetadata as ae, type JobFeedbackInput as af, type JobFeedbackRecord as ag, type JobSubmitResult as ah, type Job as ai, type ConversationMessageShowRefs as aj, type ConversationMessageInput as ak, type ConversationAppendResult as al, type SessionHeapFieldType as am, type SessionHeapFieldValue as an, type SessionHeapVariable as ao, type WSDisconnectInfo as ap, type WSReconnectErrorInfo as aq, type WSClientOptions as ar, type RPCRequest as as, type RPCResponse as at, type SyncMessage as au, type RPCRequestFromServer as av, type ToolInvokeParams as aw, type ToolResultParams as ax, type ModelRef as ay, type RelationshipInfo as az, type SessionHeapList as b, type ManifestOperation as b0, type ManifestImport as b1, type ManifestVolume as b2, type ManifestContent as b3, type GraphQLResult as b4, type APIError as b5, type DeleteResponse as b6, type StreamEvent as b7, type StreamSubscription as b8, type StreamStats as b9, type SessionHeapSnapshot as c, type SessionTranscriptEntry as d, Environment as e, Session as f, type ToolSchema as g, type PublishToolsResult as h, type ToolHandler as i, type GranularOptions as j, type GranularAuth as k, type RecordUserOptions as l, type Subject as m, type ConversationSessionInfo as n, type Sandbox as o, type CreateSandboxData as p, type SandboxListResponse as q, type PermissionRules as r, type PermissionProfile as s, type CreatePermissionProfileData as t, type PermissionProfileListResponse as u, type Assignment as v, type AssignmentListResponse as w, type VersionTag as x, type EnvironmentData as y, type CreateEnvironmentData as z };
@@ -9,7 +9,7 @@ import { Doc } from '@automerge/automerge/slim';
9
9
  * Configuration for the Granular client
10
10
  */
11
11
  type AccessTokenProvider = () => Promise<string | null | undefined> | string | null | undefined;
12
- type EndpointMode = 'auto' | 'local' | 'production';
12
+ type EndpointMode = "auto" | "local" | "production";
13
13
  interface GranularOptions {
14
14
  /** Your Granular API key (for service/CLI auth; use with GRANULAR_API_KEY) */
15
15
  apiKey?: string;
@@ -131,7 +131,7 @@ interface ConversationSessionInfo {
131
131
  environmentId: string;
132
132
  versionId?: string | null;
133
133
  docId: string;
134
- status: 'active' | 'closed' | 'expired';
134
+ status: "active" | "closed" | "expired";
135
135
  createdAt: string;
136
136
  lastSeenAt: string;
137
137
  summary?: string | null;
@@ -239,7 +239,7 @@ interface AssignmentListResponse {
239
239
  * pin themselves to one immutable ontology version.
240
240
  */
241
241
  interface BuildPolicy {
242
- mode: 'tag' | 'current' | 'pinned';
242
+ mode: "tag" | "current" | "pinned";
243
243
  buildId?: string;
244
244
  versionId?: string;
245
245
  tagId?: string;
@@ -250,7 +250,7 @@ interface VersionTag {
250
250
  tagId: string;
251
251
  sandboxId: string;
252
252
  name: string;
253
- kind: 'channel' | 'release' | 'system';
253
+ kind: "channel" | "release" | "system";
254
254
  targetBuildId?: string | null;
255
255
  targetVersionId?: string | null;
256
256
  description?: string | null;
@@ -275,7 +275,7 @@ interface EnvironmentData {
275
275
  tag?: VersionTag | null;
276
276
  tracking?: BuildPolicy;
277
277
  buildPolicy: BuildPolicy;
278
- updateState?: 'up_to_date' | 'update_available' | 'upgrading' | 'failed';
278
+ updateState?: "up_to_date" | "update_available" | "upgrading" | "failed";
279
279
  createdAt: number;
280
280
  updatedAt: number;
281
281
  }
@@ -324,7 +324,7 @@ interface Manifest {
324
324
  interface ManifestListResponse {
325
325
  items: Manifest[];
326
326
  }
327
- type BuildStatus = 'queued' | 'building' | 'completed' | 'failed' | 'canceled';
327
+ type BuildStatus = "queued" | "building" | "completed" | "failed" | "canceled";
328
328
  /**
329
329
  * An immutable ontology version derived from a specific manifest revision.
330
330
  *
@@ -359,8 +359,8 @@ interface BuildListResponse {
359
359
  }
360
360
  interface SemanticVersionDiffEntry {
361
361
  operationId: string;
362
- kind: 'create' | 'update' | 'relationship' | 'effect' | 'eventStream' | 'unknown';
363
- changeType: 'added' | 'removed' | 'changed';
362
+ kind: "create" | "update" | "relationship" | "effect" | "eventStream" | "unknown";
363
+ changeType: "added" | "removed" | "changed";
364
364
  label: string;
365
365
  additive: boolean;
366
366
  breaking: boolean;
@@ -422,7 +422,7 @@ interface ResolvedEffectBehaviors {
422
422
  reverse?: ResolvedEffectReverse;
423
423
  approvalRequired?: ResolvedEffectApprovalRequired;
424
424
  }
425
- type EffectInvocationMode = 'execute' | 'dryRun' | 'reverse';
425
+ type EffectInvocationMode = "execute" | "dryRun" | "reverse";
426
426
  interface EffectInvocationMetadata {
427
427
  mode?: EffectInvocationMode;
428
428
  reverseHandler?: string;
@@ -479,9 +479,9 @@ interface ToolSchema {
479
479
  * ```
480
480
  */
481
481
  outputSchema?: Record<string, unknown>;
482
- stability?: 'stable' | 'experimental' | 'deprecated';
482
+ stability?: "stable" | "experimental" | "deprecated";
483
483
  provenance?: {
484
- source: 'mcp' | 'custom';
484
+ source: "mcp" | "custom";
485
485
  };
486
486
  tags?: string[];
487
487
  /**
@@ -588,8 +588,8 @@ interface EffectsChangedEvent extends ToolsChangedEvent {
588
588
  }
589
589
  type EffectHandler = ToolHandler;
590
590
  type InstanceEffectHandler = InstanceToolHandler;
591
- type JobStatus = 'queued' | 'running' | 'awaitingTool' | 'awaitingHuman' | 'succeeded' | 'failed' | 'timeout' | 'canceled';
592
- type JobFeedbackSentiment = 'good' | 'bad';
591
+ type JobStatus = "queued" | "running" | "awaitingTool" | "awaitingHuman" | "succeeded" | "failed" | "timeout" | "canceled";
592
+ type JobFeedbackSentiment = "good" | "bad";
593
593
  interface JobFeedbackToolCall {
594
594
  callId?: string;
595
595
  toolName?: string;
@@ -601,7 +601,7 @@ interface JobFeedbackToolCall {
601
601
  durationMs?: number | null;
602
602
  }
603
603
  interface JobFeedbackMetadata {
604
- source: 'sdk';
604
+ source: "sdk";
605
605
  status: JobStatus;
606
606
  code: string;
607
607
  domainRevision?: string;
@@ -657,7 +657,7 @@ interface Job {
657
657
  }
658
658
  interface Prompt {
659
659
  id: string;
660
- type: 'confirm' | 'choice' | 'input';
660
+ type: "confirm" | "choice" | "input";
661
661
  title: string;
662
662
  message: string;
663
663
  options?: Array<string | {
@@ -670,7 +670,42 @@ interface Prompt {
670
670
  allowEmpty?: boolean;
671
671
  metadata?: Record<string, unknown>;
672
672
  }
673
- type SessionHeapFieldType = 'string' | 'number' | 'boolean' | 'null' | 'unknown';
673
+ interface ConversationMessageShowRefs {
674
+ entryPaths?: string[];
675
+ listNames?: string[];
676
+ variableNames?: string[];
677
+ }
678
+ interface ConversationMessageInput {
679
+ role: "user" | "assistant";
680
+ content?: string;
681
+ show?: ConversationMessageShowRefs;
682
+ jobId?: string;
683
+ promptId?: string;
684
+ timestamp?: number;
685
+ }
686
+ interface ConversationAppendResult {
687
+ ok: boolean;
688
+ messageId: string;
689
+ timestamp: number;
690
+ jobId?: string;
691
+ promptId?: string;
692
+ }
693
+ interface SessionTranscriptEntry {
694
+ id: string;
695
+ role: "user" | "assistant";
696
+ content: string;
697
+ timestamp: number;
698
+ jobId?: string;
699
+ promptId?: string;
700
+ code?: string;
701
+ jobStatus?: string;
702
+ jobResultPreview?: string;
703
+ error?: string;
704
+ show?: ConversationMessageShowRefs;
705
+ historyContent?: string;
706
+ source: "conversation" | "job_code" | "job_result" | "job_prompt" | "job_agent_message";
707
+ }
708
+ type SessionHeapFieldType = "string" | "number" | "boolean" | "null" | "unknown";
674
709
  interface SessionHeapFieldValue {
675
710
  name: string;
676
711
  type: SessionHeapFieldType;
@@ -698,7 +733,7 @@ interface SessionHeapList {
698
733
  }
699
734
  interface SessionHeapVariable {
700
735
  name: string;
701
- kind: 'entry' | 'list' | 'scalar';
736
+ kind: "entry" | "list" | "scalar";
702
737
  entryPath?: string;
703
738
  listName?: string;
704
739
  value?: string | number | boolean | null;
@@ -735,13 +770,13 @@ interface WSClientOptions {
735
770
  onReconnectError?: (info: WSReconnectErrorInfo) => void;
736
771
  }
737
772
  interface RPCRequest {
738
- type: 'rpc';
773
+ type: "rpc";
739
774
  method: string;
740
775
  params: unknown;
741
776
  id: string;
742
777
  }
743
778
  interface RPCResponse {
744
- type: 'rpc_result' | 'rpc_error';
779
+ type: "rpc_result" | "rpc_error";
745
780
  id: string;
746
781
  result?: unknown;
747
782
  error?: {
@@ -751,12 +786,12 @@ interface RPCResponse {
751
786
  };
752
787
  }
753
788
  interface SyncMessage {
754
- type: 'sync';
789
+ type: "sync";
755
790
  message?: string | number[] | Uint8Array;
756
791
  data?: number[];
757
792
  }
758
793
  interface RPCRequestFromServer {
759
- type: 'rpc';
794
+ type: "rpc";
760
795
  method: string;
761
796
  params: unknown;
762
797
  id: string;
@@ -800,7 +835,7 @@ interface RelationshipInfo {
800
835
  /** The foreign model type */
801
836
  foreign_model: ModelRef;
802
837
  /** Computed relationship kind: "one_to_one" | "one_to_many" | "many_to_one" | "many_to_many" */
803
- relationship_kind: 'one_to_one' | 'one_to_many' | 'many_to_one' | 'many_to_many';
838
+ relationship_kind: "one_to_one" | "one_to_many" | "many_to_one" | "many_to_many";
804
839
  }
805
840
  /**
806
841
  * Options for defining a relationship between two model types
@@ -899,8 +934,8 @@ interface RecordObjectsOptions {
899
934
  */
900
935
  onChunkComplete?: (info: RecordObjectsChunkInfo) => void | Promise<void>;
901
936
  }
902
- type RecordImportStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'canceled';
903
- type RecordImportItemStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'canceled';
937
+ type RecordImportStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
938
+ type RecordImportItemStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
904
939
  interface RecordImportStats {
905
940
  totalRecords: number;
906
941
  queuedRecords: number;
@@ -965,10 +1000,14 @@ interface ManifestPropertySpec {
965
1000
  required?: boolean;
966
1001
  note?: string | string[];
967
1002
  enum?: string[] | ManifestEnumRuleSpec;
1003
+ searchable?: boolean | {
1004
+ enabled?: boolean;
1005
+ phonetic?: boolean;
1006
+ };
968
1007
  filterBy?: boolean | string[] | ManifestFilterBySpec;
969
1008
  validate?: ManifestValidationRuleSpec[];
970
1009
  }
971
- type ManifestValidationOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'true' | 'false' | 'regex' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with';
1010
+ type ManifestValidationOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "true" | "false" | "regex" | "contains" | "not_contains" | "starts_with" | "ends_with";
972
1011
  interface ManifestEnumRuleSpec {
973
1012
  values: string[];
974
1013
  message?: string;
@@ -1057,7 +1096,7 @@ interface ManifestEffectDeclaration {
1057
1096
  isStatic?: boolean;
1058
1097
  inputSchema: ManifestEffectSchema;
1059
1098
  outputSchema?: ManifestEffectSchema;
1060
- stability?: 'stable' | 'experimental' | 'deprecated';
1099
+ stability?: "stable" | "experimental" | "deprecated";
1061
1100
  tags?: string[];
1062
1101
  metamodels?: ManifestEffectMetamodelSpec;
1063
1102
  }
@@ -1118,7 +1157,7 @@ interface ManifestImport {
1118
1157
  }
1119
1158
  interface ManifestVolume {
1120
1159
  name: string;
1121
- scope: 'sandbox' | 'build' | 'user';
1160
+ scope: "sandbox" | "build" | "user";
1122
1161
  imports?: ManifestImport[];
1123
1162
  operations: ManifestOperation[];
1124
1163
  }
@@ -1161,7 +1200,7 @@ interface StreamEvent {
1161
1200
  environmentId: string;
1162
1201
  sessionId?: string;
1163
1202
  subjectId?: string;
1164
- source: 'sandbox' | 'api';
1203
+ source: "sandbox" | "api";
1165
1204
  isAcked: boolean;
1166
1205
  createdAt: number;
1167
1206
  }
@@ -1269,6 +1308,7 @@ declare class Session {
1269
1308
  constructor(client: WSClient, clientId?: string);
1270
1309
  private extractDomainRevisionFromDoc;
1271
1310
  private buildLegacyEffectContext;
1311
+ private stringifyConversationValue;
1272
1312
  get document(): Doc<Record<string, unknown>>;
1273
1313
  get sessionId(): string;
1274
1314
  get domainRevision(): string | null;
@@ -1340,6 +1380,7 @@ declare class Session {
1340
1380
  * Respond to a prompt request from the sandbox
1341
1381
  */
1342
1382
  answerPrompt(promptId: string, answer: unknown): Promise<void>;
1383
+ appendConversationMessage(input: ConversationMessageInput): Promise<ConversationAppendResult>;
1343
1384
  /**
1344
1385
  * Get the current list of available effects.
1345
1386
  * Consolidates effect declarations and live availability for the session.
@@ -2054,4 +2095,4 @@ declare class Granular {
2054
2095
  private request;
2055
2096
  }
2056
2097
 
2057
- export { type EffectInvocationMode as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type Manifest as F, Granular as G, type ManifestListResponse as H, type InstanceToolHandler as I, type BuildStatus as J, type Build as K, type Version as L, type ManifestEffectMetamodelSpec as M, type BuildListResponse as N, type SemanticVersionDiffEntry as O, type Prompt as P, type SemanticVersionDiff as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type ResolvedEffectPostCondition as X, type ResolvedEffectDryRun as Y, type ResolvedEffectReverse as Z, type ResolvedEffectApprovalRequired as _, type EffectHandlerContext as a, type ManifestContent as a$, type EffectInvocationMetadata as a0, type EffectSchema as a1, type EffectWithHandler as a2, type PublishEffectsResult as a3, type ToolInfo as a4, type EffectInfo as a5, type ToolsChangedEvent as a6, type EffectsChangedEvent as a7, type EffectHandler as a8, type InstanceEffectHandler as a9, type RecordObjectsOptions as aA, type RecordImportStatus as aB, type RecordImportItemStatus as aC, type RecordImportStats as aD, type RecordImportItem as aE, type RecordImport as aF, type EnvironmentRecordImportSummary as aG, type ManifestPropertySpec as aH, type ManifestValidationOperator as aI, type ManifestEnumRuleSpec as aJ, type ManifestFilterBySpec as aK, type ManifestValidationRuleSpec as aL, type ManifestStateMachineStateSpec as aM, type ManifestStateMachineTransitionSpec as aN, type ManifestStateMachineSpec as aO, type ManifestPostConditionSpec as aP, type ManifestDryRunSpec as aQ, type ManifestReverseSpec as aR, type ManifestApprovalRequiredSpec as aS, type ManifestRelationshipDef as aT, type ManifestEffectSchema as aU, type ManifestEffectDeclaration as aV, type ManifestEventTypeDef as aW, type ManifestEventStreamDef as aX, type ManifestOperation as aY, type ManifestImport as aZ, type ManifestVolume as a_, type JobStatus as aa, type JobFeedbackSentiment as ab, type JobFeedbackToolCall as ac, type JobFeedbackMetadata as ad, type JobFeedbackInput as ae, type JobFeedbackRecord as af, type JobSubmitResult as ag, type Job as ah, type SessionHeapFieldType as ai, type SessionHeapFieldValue as aj, type SessionHeapVariable as ak, type WSDisconnectInfo as al, type WSReconnectErrorInfo as am, type WSClientOptions as an, type RPCRequest as ao, type RPCResponse as ap, type SyncMessage as aq, type RPCRequestFromServer as ar, type ToolInvokeParams as as, type ToolResultParams as at, type ModelRef as au, type RelationshipInfo as av, type DefineRelationshipOptions as aw, type RecordObjectOptions as ax, type RecordObjectResult as ay, type RecordObjectsChunkInfo as az, type SessionHeapList as b, type GraphQLResult as b0, type APIError as b1, type DeleteResponse as b2, type StreamEvent as b3, type StreamSubscription as b4, type StreamStats as b5, type SessionHeapSnapshot as c, Environment as d, Session as e, type ToolSchema as f, type PublishToolsResult as g, type ToolHandler as h, type GranularOptions as i, type GranularAuth as j, type RecordUserOptions as k, type Subject as l, type ConversationSessionInfo as m, type Sandbox as n, type CreateSandboxData as o, type SandboxListResponse as p, type PermissionRules as q, type PermissionProfile as r, type CreatePermissionProfileData as s, type PermissionProfileListResponse as t, type Assignment as u, type AssignmentListResponse as v, type VersionTag as w, type EnvironmentData as x, type CreateEnvironmentData as y, type EnvironmentListResponse as z };
2098
+ export { type ResolvedEffectApprovalRequired as $, type AccessTokenProvider as A, type BuildPolicy as B, type ConnectOptions as C, type DomainState as D, type EndpointMode as E, type EnvironmentListResponse as F, Granular as G, type Manifest as H, type InstanceToolHandler as I, type ManifestListResponse as J, type BuildStatus as K, type Build as L, type ManifestEffectMetamodelSpec as M, type Version as N, type BuildListResponse as O, type Prompt as P, type SemanticVersionDiffEntry as Q, type ResolvedEffectBehaviors as R, type SessionHeapEntry as S, type ToolWithHandler as T, type User as U, type VersionTracking as V, WSClient as W, type SemanticVersionDiff as X, type ResolvedEffectPostCondition as Y, type ResolvedEffectDryRun as Z, type ResolvedEffectReverse as _, type EffectHandlerContext as a, type ManifestEventStreamDef as a$, type EffectInvocationMode as a0, type EffectInvocationMetadata as a1, type EffectSchema as a2, type EffectWithHandler as a3, type PublishEffectsResult as a4, type ToolInfo as a5, type EffectInfo as a6, type ToolsChangedEvent as a7, type EffectsChangedEvent as a8, type EffectHandler as a9, type DefineRelationshipOptions as aA, type RecordObjectOptions as aB, type RecordObjectResult as aC, type RecordObjectsChunkInfo as aD, type RecordObjectsOptions as aE, type RecordImportStatus as aF, type RecordImportItemStatus as aG, type RecordImportStats as aH, type RecordImportItem as aI, type RecordImport as aJ, type EnvironmentRecordImportSummary as aK, type ManifestPropertySpec as aL, type ManifestValidationOperator as aM, type ManifestEnumRuleSpec as aN, type ManifestFilterBySpec as aO, type ManifestValidationRuleSpec as aP, type ManifestStateMachineStateSpec as aQ, type ManifestStateMachineTransitionSpec as aR, type ManifestStateMachineSpec as aS, type ManifestPostConditionSpec as aT, type ManifestDryRunSpec as aU, type ManifestReverseSpec as aV, type ManifestApprovalRequiredSpec as aW, type ManifestRelationshipDef as aX, type ManifestEffectSchema as aY, type ManifestEffectDeclaration as aZ, type ManifestEventTypeDef as a_, type InstanceEffectHandler as aa, type JobStatus as ab, type JobFeedbackSentiment as ac, type JobFeedbackToolCall as ad, type JobFeedbackMetadata as ae, type JobFeedbackInput as af, type JobFeedbackRecord as ag, type JobSubmitResult as ah, type Job as ai, type ConversationMessageShowRefs as aj, type ConversationMessageInput as ak, type ConversationAppendResult as al, type SessionHeapFieldType as am, type SessionHeapFieldValue as an, type SessionHeapVariable as ao, type WSDisconnectInfo as ap, type WSReconnectErrorInfo as aq, type WSClientOptions as ar, type RPCRequest as as, type RPCResponse as at, type SyncMessage as au, type RPCRequestFromServer as av, type ToolInvokeParams as aw, type ToolResultParams as ax, type ModelRef as ay, type RelationshipInfo as az, type SessionHeapList as b, type ManifestOperation as b0, type ManifestImport as b1, type ManifestVolume as b2, type ManifestContent as b3, type GraphQLResult as b4, type APIError as b5, type DeleteResponse as b6, type StreamEvent as b7, type StreamSubscription as b8, type StreamStats as b9, type SessionHeapSnapshot as c, type SessionTranscriptEntry as d, Environment as e, Session as f, type ToolSchema as g, type PublishToolsResult as h, type ToolHandler as i, type GranularOptions as j, type GranularAuth as k, type RecordUserOptions as l, type Subject as m, type ConversationSessionInfo as n, type Sandbox as o, type CreateSandboxData as p, type SandboxListResponse as q, type PermissionRules as r, type PermissionProfile as s, type CreatePermissionProfileData as t, type PermissionProfileListResponse as u, type Assignment as v, type AssignmentListResponse as w, type VersionTag as x, type EnvironmentData as y, type CreateEnvironmentData as z };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt } from './client-BeKRGMoT.mjs';
2
- export { b1 as APIError, A as AccessTokenProvider, u as Assignment, v as AssignmentListResponse, K as Build, N as BuildListResponse, B as BuildPolicy, J as BuildStatus, C as ConnectOptions, m as ConversationSessionInfo, y as CreateEnvironmentData, s as CreatePermissionProfileData, o as CreateSandboxData, aw as DefineRelationshipOptions, b2 as DeleteResponse, D as DomainState, a8 as EffectHandler, a5 as EffectInfo, a0 as EffectInvocationMetadata, $ as EffectInvocationMode, a1 as EffectSchema, a2 as EffectWithHandler, a7 as EffectsChangedEvent, d as Environment, x as EnvironmentData, z as EnvironmentListResponse, aG as EnvironmentRecordImportSummary, G as Granular, j as GranularAuth, i as GranularOptions, b0 as GraphQLResult, a9 as InstanceEffectHandler, I as InstanceToolHandler, ah as Job, ae as JobFeedbackInput, ad as JobFeedbackMetadata, af as JobFeedbackRecord, ab as JobFeedbackSentiment, ac as JobFeedbackToolCall, aa as JobStatus, ag as JobSubmitResult, F as Manifest, aS as ManifestApprovalRequiredSpec, a$ as ManifestContent, aQ as ManifestDryRunSpec, aV as ManifestEffectDeclaration, aU as ManifestEffectSchema, aJ as ManifestEnumRuleSpec, aX as ManifestEventStreamDef, aW as ManifestEventTypeDef, aK as ManifestFilterBySpec, aZ as ManifestImport, H as ManifestListResponse, aY as ManifestOperation, aP as ManifestPostConditionSpec, aH as ManifestPropertySpec, aT as ManifestRelationshipDef, aR as ManifestReverseSpec, aO as ManifestStateMachineSpec, aM as ManifestStateMachineStateSpec, aN as ManifestStateMachineTransitionSpec, aI as ManifestValidationOperator, aL as ManifestValidationRuleSpec, a_ as ManifestVolume, au as ModelRef, r as PermissionProfile, t as PermissionProfileListResponse, q as PermissionRules, a3 as PublishEffectsResult, g as PublishToolsResult, ao as RPCRequest, ar as RPCRequestFromServer, ap as RPCResponse, aF as RecordImport, aE as RecordImportItem, aC as RecordImportItemStatus, aD as RecordImportStats, aB as RecordImportStatus, ax as RecordObjectOptions, ay as RecordObjectResult, az as RecordObjectsChunkInfo, aA as RecordObjectsOptions, k as RecordUserOptions, av as RelationshipInfo, _ as ResolvedEffectApprovalRequired, Y as ResolvedEffectDryRun, X as ResolvedEffectPostCondition, Z as ResolvedEffectReverse, n as Sandbox, p as SandboxListResponse, Q as SemanticVersionDiff, O as SemanticVersionDiffEntry, e as Session, ai as SessionHeapFieldType, aj as SessionHeapFieldValue, ak as SessionHeapVariable, b3 as StreamEvent, b5 as StreamStats, b4 as StreamSubscription, l as Subject, aq as SyncMessage, h as ToolHandler, a4 as ToolInfo, as as ToolInvokeParams, at as ToolResultParams, f as ToolSchema, a6 as ToolsChangedEvent, U as User, L as Version, w as VersionTag, V as VersionTracking, W as WSClient, an as WSClientOptions, al as WSDisconnectInfo, am as WSReconnectErrorInfo } from './client-BeKRGMoT.mjs';
1
+ import { E as EndpointMode, T as ToolWithHandler, a as EffectHandlerContext, M as ManifestEffectMetamodelSpec, R as ResolvedEffectBehaviors, S as SessionHeapEntry, b as SessionHeapList, c as SessionHeapSnapshot, P as Prompt, d as SessionTranscriptEntry } from './client-CigjaeO8.mjs';
2
+ export { b5 as APIError, A as AccessTokenProvider, v as Assignment, w as AssignmentListResponse, L as Build, O as BuildListResponse, B as BuildPolicy, K as BuildStatus, C as ConnectOptions, al as ConversationAppendResult, ak as ConversationMessageInput, aj as ConversationMessageShowRefs, n as ConversationSessionInfo, z as CreateEnvironmentData, t as CreatePermissionProfileData, p as CreateSandboxData, aA as DefineRelationshipOptions, b6 as DeleteResponse, D as DomainState, a9 as EffectHandler, a6 as EffectInfo, a1 as EffectInvocationMetadata, a0 as EffectInvocationMode, a2 as EffectSchema, a3 as EffectWithHandler, a8 as EffectsChangedEvent, e as Environment, y as EnvironmentData, F as EnvironmentListResponse, aK as EnvironmentRecordImportSummary, G as Granular, k as GranularAuth, j as GranularOptions, b4 as GraphQLResult, aa as InstanceEffectHandler, I as InstanceToolHandler, ai as Job, af as JobFeedbackInput, ae as JobFeedbackMetadata, ag as JobFeedbackRecord, ac as JobFeedbackSentiment, ad as JobFeedbackToolCall, ab as JobStatus, ah as JobSubmitResult, H as Manifest, aW as ManifestApprovalRequiredSpec, b3 as ManifestContent, aU as ManifestDryRunSpec, aZ as ManifestEffectDeclaration, aY as ManifestEffectSchema, aN as ManifestEnumRuleSpec, a$ as ManifestEventStreamDef, a_ as ManifestEventTypeDef, aO as ManifestFilterBySpec, b1 as ManifestImport, J as ManifestListResponse, b0 as ManifestOperation, aT as ManifestPostConditionSpec, aL as ManifestPropertySpec, aX as ManifestRelationshipDef, aV as ManifestReverseSpec, aS as ManifestStateMachineSpec, aQ as ManifestStateMachineStateSpec, aR as ManifestStateMachineTransitionSpec, aM as ManifestValidationOperator, aP as ManifestValidationRuleSpec, b2 as ManifestVolume, ay as ModelRef, s as PermissionProfile, u as PermissionProfileListResponse, r as PermissionRules, a4 as PublishEffectsResult, h as PublishToolsResult, as as RPCRequest, av as RPCRequestFromServer, at as RPCResponse, aJ as RecordImport, aI as RecordImportItem, aG as RecordImportItemStatus, aH as RecordImportStats, aF as RecordImportStatus, aB as RecordObjectOptions, aC as RecordObjectResult, aD as RecordObjectsChunkInfo, aE as RecordObjectsOptions, l as RecordUserOptions, az as RelationshipInfo, $ as ResolvedEffectApprovalRequired, Z as ResolvedEffectDryRun, Y as ResolvedEffectPostCondition, _ as ResolvedEffectReverse, o as Sandbox, q as SandboxListResponse, X as SemanticVersionDiff, Q as SemanticVersionDiffEntry, f as Session, am as SessionHeapFieldType, an as SessionHeapFieldValue, ao as SessionHeapVariable, b7 as StreamEvent, b9 as StreamStats, b8 as StreamSubscription, m as Subject, au as SyncMessage, i as ToolHandler, a5 as ToolInfo, aw as ToolInvokeParams, ax as ToolResultParams, g as ToolSchema, a7 as ToolsChangedEvent, U as User, N as Version, x as VersionTag, V as VersionTracking, W as WSClient, ar as WSClientOptions, ap as WSDisconnectInfo, aq as WSReconnectErrorInfo } from './client-CigjaeO8.mjs';
3
3
  export { BuildGranularAgentSystemPromptInput, GeneratedJobCodeIssue, GranularAgentExecutionCheckpoint, GranularAgentHeapSummaryOptions, GranularAgentSessionContext, GranularAgentToolInfo, GranularAgentWorkflowFocus, HarnessContinuationDecision, HarnessControllerBudgets, HarnessProjectionOptions, HarnessPromptLike, HarnessVerifierSnapshot, HarnessVerifierSnapshotInput, buildContinuationInstruction, buildGranularAgentCheckpointBlock, buildGranularAgentDomainBlock, buildGranularAgentHeapBlock, buildGranularAgentLoopBlock, buildGranularAgentSessionBlock, buildGranularAgentSystemPrompt, buildGranularAgentToolBlock, buildGranularAgentWorkflowBlock, createHarnessVerifierSnapshot, evaluateContinuation, getCurrentClosureId, getExclusivePromptTarget, hasOpenPrompt, projectHeapSummary, projectLoopSummary, projectWorkflowFocus, projectWorkflowSummary, reviewGeneratedJobCode } from './agent-harness.mjs';
4
4
  import '@automerge/automerge';
5
5
  import '@automerge/automerge/slim';
@@ -58,4 +58,9 @@ declare function normalizePromptType(raw: Record<string, unknown> | null | undef
58
58
  declare function normalizePrompt(rawValue: unknown): Prompt | null;
59
59
  declare function resolvePromptAnswer(prompt: Prompt | undefined, answer: unknown): unknown;
60
60
 
61
- export { EffectHandlerContext, EndpointMode, type JobPresentation, ManifestEffectMetamodelSpec, Prompt, ResolvedEffectBehaviors, SessionHeapEntry, SessionHeapList, SessionHeapSnapshot, ToolWithHandler, extractPromptTokens, invokeRegisteredEffect, isLocalApiUrl, normalizeEffectBehaviors, normalizePrompt, normalizePromptText, normalizePromptType, resolveApiUrl, resolveAuthTokenForApiUrl, resolveJobPresentation, resolvePromptAnswer, scorePromptChoiceMatch };
61
+ declare function buildSessionTranscript(input: {
62
+ liveDoc?: Record<string, unknown> | null;
63
+ sessionHeap?: SessionHeapSnapshot;
64
+ }): SessionTranscriptEntry[];
65
+
66
+ export { EffectHandlerContext, EndpointMode, type JobPresentation, ManifestEffectMetamodelSpec, Prompt, ResolvedEffectBehaviors, SessionHeapEntry, SessionHeapList, SessionHeapSnapshot, SessionTranscriptEntry, ToolWithHandler, buildSessionTranscript, extractPromptTokens, invokeRegisteredEffect, isLocalApiUrl, normalizeEffectBehaviors, normalizePrompt, normalizePromptText, normalizePromptType, resolveApiUrl, resolveAuthTokenForApiUrl, resolveJobPresentation, resolvePromptAnswer, scorePromptChoiceMatch };