@lace-cloud/proto 0.24.0 → 0.26.0

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/index.d.ts CHANGED
@@ -285,53 +285,6 @@ type ViewportIntent = {
285
285
 
286
286
  declare function convertDiagnostic(d: ProtoDiagnosticLike): Diagnostic;
287
287
 
288
- declare const ENGINE_METHODS: readonly ["Initialize", "SessionOpen", "TestSessionOpen", "SessionSave", "SessionClose", "SessionGenerate", "SessionResolveConflict", "ApplyAction", "ReadWiringCandidates", "CancelInvoke"];
289
- declare const ENGINE_STREAM_METHODS: readonly ["Subscribe", "Invoke"];
290
- type EngineMethod = (typeof ENGINE_METHODS)[number];
291
- type EngineStreamMethod = (typeof ENGINE_STREAM_METHODS)[number];
292
- declare const HOST_ONLY_METHODS: readonly ["TestSessionOpen"];
293
- type HostOnlyMethod = (typeof HOST_ONLY_METHODS)[number];
294
- type BridgeMethod = Exclude<EngineMethod, HostOnlyMethod>;
295
- declare const BRIDGE_METHODS: BridgeMethod[];
296
- type BridgeRequest = {
297
- kind: 'unary';
298
- id: string;
299
- method: BridgeMethod;
300
- request: unknown;
301
- } | {
302
- kind: 'stream';
303
- id: string;
304
- method: EngineStreamMethod;
305
- request: unknown;
306
- } | {
307
- kind: 'abort';
308
- id: string;
309
- };
310
- type BridgeResponse = {
311
- kind: 'result';
312
- id: string;
313
- response: unknown;
314
- } | {
315
- kind: 'event';
316
- id: string;
317
- event: unknown;
318
- } | {
319
- kind: 'end';
320
- id: string;
321
- } | {
322
- kind: 'error';
323
- id: string;
324
- code: string;
325
- message: string;
326
- reason: string;
327
- apiCode?: string;
328
- };
329
- declare const CONNECT_CODE_NAMES: readonly ["ok", "canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"];
330
- type MessageBridge = {
331
- post(m: BridgeRequest | BridgeResponse): void;
332
- onMessage(f: (m: unknown) => void): () => void;
333
- };
334
-
335
288
  interface Bundle {
336
289
  /**
337
290
  * The format of this encoding: "2.0", at which every Expression carries
@@ -571,6 +524,312 @@ interface MessageFns$1<T> {
571
524
  fromPartial<I extends Exact$1<DeepPartial$1<T>, I>>(object: I): T;
572
525
  }
573
526
 
527
+ declare enum NodeKind {
528
+ NODE_KIND_UNSPECIFIED = 0,
529
+ NODE_KIND_MODULE = 1,
530
+ NODE_KIND_RESOURCE = 2,
531
+ NODE_KIND_DATA = 3,
532
+ UNRECOGNIZED = -1
533
+ }
534
+ /**
535
+ * Reason is the one vocabulary of what a failure asks of the developer.
536
+ * The engine attaches it to a refused RPC as a `ReasonDetail` in the
537
+ * status' error details, and a command's failure document names it; a
538
+ * client branches on it, never on the message's text. A failure the API
539
+ * decided carries the API's own code (`ReasonDetail.api_code`), and a
540
+ * reason only where that code has one: every code that asks the developer
541
+ * to sign in again is `REASON_UNAUTHENTICATED`.
542
+ */
543
+ declare enum Reason {
544
+ REASON_UNSPECIFIED = 0,
545
+ /**
546
+ * REASON_NOT_LACE_FORM - Placement: the resolved tree's own certification verdict is not Lace-form.
547
+ * module convert and stack import: lacification cannot take the tree to
548
+ * lace shape; the report names each managed resource and the IR gap holding it.
549
+ */
550
+ REASON_NOT_LACE_FORM = 1,
551
+ /** REASON_HASH_MISMATCH - Placement: the downloaded tree does not hash to what the registry vouched for. */
552
+ REASON_HASH_MISMATCH = 2,
553
+ /** REASON_REGISTRY_UNAVAILABLE - Placement: the registry could not be reached or answered with no verdict. */
554
+ REASON_REGISTRY_UNAVAILABLE = 3,
555
+ /** REASON_ROOT_LOCKED - SessionOpen: the root's canvas is open in another window. */
556
+ REASON_ROOT_LOCKED = 4,
557
+ /** REASON_UNSAVED - Generate: the session has unsaved edits; save first. */
558
+ REASON_UNSAVED = 5,
559
+ /** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
560
+ REASON_CONFLICT = 6,
561
+ /**
562
+ * REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
563
+ * (`BundleState.source_refused`).
564
+ * module convert and stack import: the tree's tf does not parse, has a
565
+ * non-empty residual report, or its Bundle fails its own validation.
566
+ * stack apply / stack destroy / registry register: a source in the stack
567
+ * does not read, checked before the certification.
568
+ */
569
+ REASON_SOURCE_REFUSED = 7,
570
+ /**
571
+ * REASON_NOT_GIT_REPOSITORY - Generate, module convert, stack import and module fmt: the authoring
572
+ * root is not inside a git working tree.
573
+ * stack create --source: the directory is not inside a git working tree,
574
+ * so it has no place in a repository to bind the stack to.
575
+ */
576
+ REASON_NOT_GIT_REPOSITORY = 8,
577
+ /** REASON_GENERATE_IN_PROGRESS - Generate: a Generate is already running on the session. */
578
+ REASON_GENERATE_IN_PROGRESS = 9,
579
+ /** REASON_NO_ORGANIZATION - A scoped command: no organization is selected. */
580
+ REASON_NO_ORGANIZATION = 10,
581
+ /** REASON_NO_TEAM - A team-scoped command: no team is selected in the organization. */
582
+ REASON_NO_TEAM = 11,
583
+ /**
584
+ * REASON_NO_CERTIFICATION - stack apply / stack destroy / registry register: the root has no
585
+ * certification.
586
+ */
587
+ REASON_NO_CERTIFICATION = 12,
588
+ /**
589
+ * REASON_STALE_CERTIFICATION - stack apply / stack destroy / registry register: the certification
590
+ * does not certify the tree on disk — the tree changed since validate,
591
+ * another lace version wrote it, or its files are torn or mixed from two
592
+ * validates. Running validate again replaces it.
593
+ */
594
+ REASON_STALE_CERTIFICATION = 13,
595
+ /**
596
+ * REASON_TOOL_MISSING - module scan / module docs / module fmt / module validate / module
597
+ * convert / stack import / stack preview: the tool the command runs
598
+ * (tfsec, terraform-docs, the pinned terraform) is not available. convert
599
+ * and stack import run the pinned terraform through the validate each
600
+ * closes on.
601
+ */
602
+ REASON_TOOL_MISSING = 14,
603
+ /**
604
+ * REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
605
+ * modules crosses a group's boundary, which no single-scope edit makes.
606
+ * It is a refusal of the batch's content, carried on its GraphError.
607
+ * ReadWiringCandidates: a read whose two scopes differ, refused
608
+ * (FailedPrecondition) as such a wire is.
609
+ */
610
+ REASON_CROSS_SCOPE = 15,
611
+ /**
612
+ * REASON_UNAUTHENTICATED - The developer must sign in: a command or a placement that needs
613
+ * credentials finds none (no `lace login`, no LACE_TOKEN), decided
614
+ * before any request; or the API refuses the ones sent with its code
615
+ * `unauthenticated`, which `ReasonDetail.api_code` then names.
616
+ */
617
+ REASON_UNAUTHENTICATED = 16,
618
+ /**
619
+ * REASON_IMPORT_RESIDUAL - stack import: a resource in the statefile has no import id the CLI
620
+ * derives. The failure names each in `importResiduals`; --allow-partial
621
+ * writes the import without them. Nothing was written.
622
+ */
623
+ REASON_IMPORT_RESIDUAL = 17,
624
+ /**
625
+ * REASON_STACK_HAS_STATE - stack import: the stack's state already holds resources, and import
626
+ * adopts into an empty stack. Nothing was read or written.
627
+ */
628
+ REASON_STACK_HAS_STATE = 18,
629
+ /**
630
+ * REASON_NO_ORIGIN_REMOTE - stack create --source: the directory's repository has no `origin`
631
+ * remote, whose URL is the repository a stack's source binding names.
632
+ */
633
+ REASON_NO_ORIGIN_REMOTE = 19,
634
+ /**
635
+ * REASON_IMPORT_UNDECLARED - stack import: the statefile holds resources the converted tree does not
636
+ * declare, named in the failure's `addresses`; an import block adopts
637
+ * only a resource the tree declares. Nothing was written.
638
+ */
639
+ REASON_IMPORT_UNDECLARED = 20,
640
+ /**
641
+ * REASON_ALREADY_IMPORTED - stack import: the tree already imports resources the statefile holds,
642
+ * named in the failure's `addresses`; terraform refuses two imports of
643
+ * one address. Nothing was written.
644
+ */
645
+ REASON_ALREADY_IMPORTED = 21,
646
+ UNRECOGNIZED = -1
647
+ }
648
+ /**
649
+ * ReasonDetail rides a refused RPC's status as its one error detail:
650
+ * `grpc-status-details-bin` over gRPC, `details[]` over Connect. A
651
+ * failure Lace decided sets `reason`; one the API decided sets `api_code`
652
+ * to the API's own closed code, passed through unchanged, with the status
653
+ * code that HTTP status maps to, and `reason` where that code has one
654
+ * (`REASON_UNAUTHENTICATED` for the API's `unauthenticated`), and
655
+ * `request_id` to the id the API answered the refused request with, when
656
+ * it named one: the id a person quotes to Lace's support. The status
657
+ * message is the sentence the API wrote; neither field is spelled into it.
658
+ */
659
+ interface ReasonDetail {
660
+ reason: Reason;
661
+ api_code: string;
662
+ request_id: string;
663
+ }
664
+ declare const ReasonDetail: MessageFns<ReasonDetail>;
665
+ interface CanvasView {
666
+ module_name: string;
667
+ nodes: RenderNode[];
668
+ edges: RenderEdge[];
669
+ can_undo: boolean;
670
+ can_redo: boolean;
671
+ unsaved: boolean;
672
+ groups: RenderGroup[];
673
+ }
674
+ declare const CanvasView: MessageFns<CanvasView>;
675
+ /**
676
+ * RenderGroup represents an expand/collapse container on the canvas.
677
+ * One `group` on the canvas corresponds to either a child Use whose
678
+ * target module has its own sub-modules, or a user-created group
679
+ * produced via CreateGroupAction.
680
+ *
681
+ * A group's behaviour:
682
+ * - Registry drops whose target has sub-modules: module_key names
683
+ * that target; inputs/outputs mirror its declared Interface.
684
+ * - User-created groups (via "Group" canvas action): module_key is
685
+ * empty; inputs/outputs are derived from crossing edges by the
686
+ * webview.
687
+ *
688
+ * Groups arrive collapsed (collapsed=true) across all creation paths
689
+ * for consistency. Expand/collapse is a pure view toggle that never
690
+ * changes the IR or generated .tf — ungroup is the destructive
691
+ * dissolve action.
692
+ */
693
+ interface RenderGroup {
694
+ id: string;
695
+ label: string;
696
+ node_ids: string[];
697
+ collapsed: boolean;
698
+ /**
699
+ * Bundle source identifier (e.g. "aws/examples/iam_stack@v1.0.0")
700
+ * for groups backed by a registry drop; empty for user-created
701
+ * local groups.
702
+ */
703
+ module_key: string;
704
+ /**
705
+ * Boundary input pins — what the group's target accepts from its
706
+ * parent scope. Rendered on the left rail when collapsed; derived
707
+ * from the target's Interface.Inputs (module-backed groups) or the
708
+ * crossing edges (user-created groups).
709
+ */
710
+ inputs: NodePin[];
711
+ /**
712
+ * Boundary output pins — what the group's target exposes to its
713
+ * parent scope. Rendered on the right rail when collapsed; derived
714
+ * from the target's Exports (module-backed groups) or outgoing
715
+ * crossing edges (user-created groups).
716
+ */
717
+ outputs: NodePin[];
718
+ }
719
+ declare const RenderGroup: MessageFns<RenderGroup>;
720
+ interface RenderNode {
721
+ id: string;
722
+ label: string;
723
+ kind: NodeKind;
724
+ module_key: string;
725
+ icon_url: string;
726
+ position: Position | undefined;
727
+ inputs: NodePin[];
728
+ outputs: NodePin[];
729
+ }
730
+ declare const RenderNode: MessageFns<RenderNode>;
731
+ /**
732
+ * NodePin is a compact handle descriptor rendered on the canvas. One pin is
733
+ * emitted per input variable (left rail) and per output (right rail) so the
734
+ * webview can draw Blender-style per-variable connection handles.
735
+ */
736
+ interface NodePin {
737
+ name: string;
738
+ /** HCL type string, e.g. "string", "list(object)" */
739
+ type: string;
740
+ /** inputs only; always false for outputs */
741
+ required: boolean;
742
+ /** input has an Out binding, or output feeds >=1 edge */
743
+ wired: boolean;
744
+ description: string;
745
+ /** outputs only */
746
+ sensitive: boolean;
747
+ }
748
+ declare const NodePin: MessageFns<NodePin>;
749
+ interface RenderEdge {
750
+ id: string;
751
+ source: string;
752
+ target: string;
753
+ source_output: string;
754
+ target_input: string;
755
+ }
756
+ declare const RenderEdge: MessageFns<RenderEdge>;
757
+ interface Position {
758
+ x: number;
759
+ y: number;
760
+ }
761
+ declare const Position: MessageFns<Position>;
762
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
763
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
764
+ [K in keyof T]?: DeepPartial<T[K]>;
765
+ } : Partial<T>;
766
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
767
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
768
+ [K in keyof P]: Exact<P[K], I[K]>;
769
+ } & {
770
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
771
+ };
772
+ interface MessageFns<T> {
773
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
774
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
775
+ fromJSON(object: any): T;
776
+ toJSON(message: T): unknown;
777
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
778
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
779
+ }
780
+
781
+ declare const ENGINE_METHODS: readonly ["Initialize", "SessionOpen", "TestSessionOpen", "SessionSave", "SessionClose", "SessionGenerate", "SessionResolveConflict", "ApplyAction", "ReadWiringCandidates", "CancelInvoke"];
782
+ declare const ENGINE_STREAM_METHODS: readonly ["Subscribe", "Invoke"];
783
+ type EngineMethod = (typeof ENGINE_METHODS)[number];
784
+ type EngineStreamMethod = (typeof ENGINE_STREAM_METHODS)[number];
785
+ declare const HOST_ONLY_METHODS: readonly ["TestSessionOpen"];
786
+ type HostOnlyMethod = (typeof HOST_ONLY_METHODS)[number];
787
+ type BridgeMethod = Exclude<EngineMethod, HostOnlyMethod>;
788
+ declare const BRIDGE_METHODS: BridgeMethod[];
789
+ type BridgeRequest = {
790
+ kind: 'unary';
791
+ id: string;
792
+ method: BridgeMethod;
793
+ request: unknown;
794
+ } | {
795
+ kind: 'stream';
796
+ id: string;
797
+ method: EngineStreamMethod;
798
+ request: unknown;
799
+ } | {
800
+ kind: 'abort';
801
+ id: string;
802
+ };
803
+ type BridgeResponse = {
804
+ kind: 'result';
805
+ id: string;
806
+ response: unknown;
807
+ } | {
808
+ kind: 'event';
809
+ id: string;
810
+ event: unknown;
811
+ } | {
812
+ kind: 'end';
813
+ id: string;
814
+ } | {
815
+ kind: 'error';
816
+ id: string;
817
+ code: string;
818
+ message: string;
819
+ reason: string;
820
+ apiCode?: string;
821
+ requestId?: string;
822
+ };
823
+ declare function apiFields(detail: Pick<ReasonDetail, 'api_code' | 'request_id'>): {
824
+ apiCode: string | undefined;
825
+ requestId: string | undefined;
826
+ };
827
+ declare const CONNECT_CODE_NAMES: readonly ["ok", "canceled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal", "unavailable", "data_loss", "unauthenticated"];
828
+ type MessageBridge = {
829
+ post(m: BridgeRequest | BridgeResponse): void;
830
+ onMessage(f: (m: unknown) => void): () => void;
831
+ };
832
+
574
833
  declare function deriveNodeConfig(bundle: Bundle, instanceId: string): NodeConfig | null;
575
834
  declare function deriveSettingsConfig(bundle: Bundle, moduleKey: string): SettingsConfig | null;
576
835
 
@@ -738,129 +997,6 @@ type InstanceAddress = {
738
997
  declare function instanceAddress(bundle: Bundle, id: string): InstanceAddress;
739
998
  declare function resolveScopePath(bundle: Bundle, path: string): string | null;
740
999
 
741
- declare enum NodeKind {
742
- NODE_KIND_UNSPECIFIED = 0,
743
- NODE_KIND_MODULE = 1,
744
- NODE_KIND_RESOURCE = 2,
745
- NODE_KIND_DATA = 3,
746
- UNRECOGNIZED = -1
747
- }
748
- interface CanvasView {
749
- module_name: string;
750
- nodes: RenderNode[];
751
- edges: RenderEdge[];
752
- can_undo: boolean;
753
- can_redo: boolean;
754
- unsaved: boolean;
755
- groups: RenderGroup[];
756
- }
757
- declare const CanvasView: MessageFns<CanvasView>;
758
- /**
759
- * RenderGroup represents an expand/collapse container on the canvas.
760
- * One `group` on the canvas corresponds to either a child Use whose
761
- * target module has its own sub-modules, or a user-created group
762
- * produced via CreateGroupAction.
763
- *
764
- * A group's behaviour:
765
- * - Registry drops whose target has sub-modules: module_key names
766
- * that target; inputs/outputs mirror its declared Interface.
767
- * - User-created groups (via "Group" canvas action): module_key is
768
- * empty; inputs/outputs are derived from crossing edges by the
769
- * webview.
770
- *
771
- * Groups arrive collapsed (collapsed=true) across all creation paths
772
- * for consistency. Expand/collapse is a pure view toggle that never
773
- * changes the IR or generated .tf — ungroup is the destructive
774
- * dissolve action.
775
- */
776
- interface RenderGroup {
777
- id: string;
778
- label: string;
779
- node_ids: string[];
780
- collapsed: boolean;
781
- /**
782
- * Bundle source identifier (e.g. "aws/examples/iam_stack@v1.0.0")
783
- * for groups backed by a registry drop; empty for user-created
784
- * local groups.
785
- */
786
- module_key: string;
787
- /**
788
- * Boundary input pins — what the group's target accepts from its
789
- * parent scope. Rendered on the left rail when collapsed; derived
790
- * from the target's Interface.Inputs (module-backed groups) or the
791
- * crossing edges (user-created groups).
792
- */
793
- inputs: NodePin[];
794
- /**
795
- * Boundary output pins — what the group's target exposes to its
796
- * parent scope. Rendered on the right rail when collapsed; derived
797
- * from the target's Exports (module-backed groups) or outgoing
798
- * crossing edges (user-created groups).
799
- */
800
- outputs: NodePin[];
801
- }
802
- declare const RenderGroup: MessageFns<RenderGroup>;
803
- interface RenderNode {
804
- id: string;
805
- label: string;
806
- kind: NodeKind;
807
- module_key: string;
808
- icon_url: string;
809
- position: Position | undefined;
810
- inputs: NodePin[];
811
- outputs: NodePin[];
812
- }
813
- declare const RenderNode: MessageFns<RenderNode>;
814
- /**
815
- * NodePin is a compact handle descriptor rendered on the canvas. One pin is
816
- * emitted per input variable (left rail) and per output (right rail) so the
817
- * webview can draw Blender-style per-variable connection handles.
818
- */
819
- interface NodePin {
820
- name: string;
821
- /** HCL type string, e.g. "string", "list(object)" */
822
- type: string;
823
- /** inputs only; always false for outputs */
824
- required: boolean;
825
- /** input has an Out binding, or output feeds >=1 edge */
826
- wired: boolean;
827
- description: string;
828
- /** outputs only */
829
- sensitive: boolean;
830
- }
831
- declare const NodePin: MessageFns<NodePin>;
832
- interface RenderEdge {
833
- id: string;
834
- source: string;
835
- target: string;
836
- source_output: string;
837
- target_input: string;
838
- }
839
- declare const RenderEdge: MessageFns<RenderEdge>;
840
- interface Position {
841
- x: number;
842
- y: number;
843
- }
844
- declare const Position: MessageFns<Position>;
845
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
846
- type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
847
- [K in keyof T]?: DeepPartial<T[K]>;
848
- } : Partial<T>;
849
- type KeysOfUnion<T> = T extends T ? keyof T : never;
850
- type Exact<P, I extends P> = P extends Builtin ? P : P & {
851
- [K in keyof P]: Exact<P[K], I[K]>;
852
- } & {
853
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
854
- };
855
- interface MessageFns<T> {
856
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
857
- decode(input: BinaryReader | Uint8Array, length?: number): T;
858
- fromJSON(object: any): T;
859
- toJSON(message: T): unknown;
860
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
861
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
862
- }
863
-
864
1000
  declare const CanvasViewProto: MessageFns<CanvasView>;
865
1001
 
866
1002
  declare const ENGINE_PROTOCOL_VERSION: string;
@@ -892,4 +1028,4 @@ declare class EngineProtocolMismatchError extends Error {
892
1028
  */
893
1029
  declare function checkEngineProtocol(engineVersion: string, engineProtocol: string): void;
894
1030
 
895
- export { BRIDGE_METHODS, type BlockConfig, type BridgeMethod, type BridgeRequest, type BridgeResponse, Bundle, COLLAPSED_GROUP_WIDTH, CONNECT_CODE_NAMES, type CanvasArrangement, type CanvasView$1 as CanvasView, CanvasViewProto, type Conflict, type DeepPartial$1 as DeepPartial, type Diagnostic, EMPTY_BUNDLE, ENGINE_METHODS, ENGINE_PROTOCOL_VERSION, ENGINE_STREAM_METHODS, type EngineMethod, EngineProtocolMismatchError, type EngineStreamMethod, GROUP_HEADER_HEIGHT, GROUP_PADDING, type GeneratePhase, HOST_ONLY_METHODS, type HostOnlyMethod, type InstanceAddress, type InstanceChild, type KeepKey, type LayoutEdge, type LayoutItem, type MessageBridge, NODE_HEADER_HEIGHT, NODE_ROW_HEIGHT, NODE_WIDTH, type NodeConfig, type NodePin$1 as NodePin, type ParsedModuleKey, type ProjectionMeta, type ProtoDiagnosticLike, type Rect, type RenderEdge$1 as RenderEdge, type RenderGroup$1 as RenderGroup, type RenderInput, type RenderNode$1 as RenderNode, type RenderOutput, type ResourceConfig, type ScopedInstance, type SettingsConfig, type Size, type ViewportIntent, type XY, boxAt, callText, checkEngineProtocol, collapsedGroupSize, convertDiagnostic, deriveNodeConfig, deriveSettingsConfig, drawnAt, drawnRect, extentOf, frameOf, freeSlot, groupBoxSize, groupFootprint, groupInputPinY, groupPinY, groupPins, groupReach, inputPinY, instanceAddress, joinPath, keepOrder, layoutByDepth, localIn, nodeIdForAddress, nodeIdForDiagnostic, nodeRows, nodeSize, originAt, parseModuleKey, projectCanvasView, reachRect, resolveInstance, resolveScopePath, resolveScopePositionsByDepth, splitPath, stepDown, visibleInputs };
1031
+ export { BRIDGE_METHODS, type BlockConfig, type BridgeMethod, type BridgeRequest, type BridgeResponse, Bundle, COLLAPSED_GROUP_WIDTH, CONNECT_CODE_NAMES, type CanvasArrangement, type CanvasView$1 as CanvasView, CanvasViewProto, type Conflict, type DeepPartial$1 as DeepPartial, type Diagnostic, EMPTY_BUNDLE, ENGINE_METHODS, ENGINE_PROTOCOL_VERSION, ENGINE_STREAM_METHODS, type EngineMethod, EngineProtocolMismatchError, type EngineStreamMethod, GROUP_HEADER_HEIGHT, GROUP_PADDING, type GeneratePhase, HOST_ONLY_METHODS, type HostOnlyMethod, type InstanceAddress, type InstanceChild, type KeepKey, type LayoutEdge, type LayoutItem, type MessageBridge, NODE_HEADER_HEIGHT, NODE_ROW_HEIGHT, NODE_WIDTH, type NodeConfig, type NodePin$1 as NodePin, type ParsedModuleKey, type ProjectionMeta, type ProtoDiagnosticLike, type Rect, type RenderEdge$1 as RenderEdge, type RenderGroup$1 as RenderGroup, type RenderInput, type RenderNode$1 as RenderNode, type RenderOutput, type ResourceConfig, type ScopedInstance, type SettingsConfig, type Size, type ViewportIntent, type XY, apiFields, boxAt, callText, checkEngineProtocol, collapsedGroupSize, convertDiagnostic, deriveNodeConfig, deriveSettingsConfig, drawnAt, drawnRect, extentOf, frameOf, freeSlot, groupBoxSize, groupFootprint, groupInputPinY, groupPinY, groupPins, groupReach, inputPinY, instanceAddress, joinPath, keepOrder, layoutByDepth, localIn, nodeIdForAddress, nodeIdForDiagnostic, nodeRows, nodeSize, originAt, parseModuleKey, projectCanvasView, reachRect, resolveInstance, resolveScopePath, resolveScopePositionsByDepth, splitPath, stepDown, visibleInputs };
package/dist/index.mjs CHANGED
@@ -45,6 +45,12 @@ var HOST_ONLY_METHOD_NAMES = HOST_ONLY_METHODS;
45
45
  var BRIDGE_METHODS = ENGINE_METHODS.filter(
46
46
  (m) => !HOST_ONLY_METHOD_NAMES.includes(m)
47
47
  );
48
+ function apiFields(detail) {
49
+ return {
50
+ apiCode: detail.api_code === "" ? void 0 : detail.api_code,
51
+ requestId: detail.request_id === "" ? void 0 : detail.request_id
52
+ };
53
+ }
48
54
  var CONNECT_CODE_NAMES = [
49
55
  "ok",
50
56
  "canceled",
@@ -4993,7 +4999,7 @@ function isSet3(value) {
4993
4999
  var CanvasViewProto = CanvasView;
4994
5000
 
4995
5001
  // src/protocol-version.ts
4996
- var ENGINE_PROTOCOL_VERSION = String(5 /* PROTOCOL_VERSION_CURRENT */);
5002
+ var ENGINE_PROTOCOL_VERSION = String(6 /* PROTOCOL_VERSION_CURRENT */);
4997
5003
  var EngineProtocolMismatchError = class extends Error {
4998
5004
  constructor(engineVersion, engineProtocol, requiredProtocol) {
4999
5005
  super(
@@ -5034,6 +5040,7 @@ export {
5034
5040
  NODE_HEADER_HEIGHT,
5035
5041
  NODE_ROW_HEIGHT,
5036
5042
  NODE_WIDTH,
5043
+ apiFields,
5037
5044
  boxAt,
5038
5045
  callText,
5039
5046
  checkEngineProtocol,