@lace-cloud/proto 0.35.0 → 0.37.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.mts CHANGED
@@ -149,6 +149,8 @@ type RenderEdge$1 = {
149
149
  target: string;
150
150
  source_output: string;
151
151
  target_input: string;
152
+ source_pin?: boolean;
153
+ target_pin?: boolean;
152
154
  };
153
155
  type RenderInput = {
154
156
  name: string;
@@ -415,6 +417,8 @@ declare enum Reason {
415
417
  * `.terraform.lock.hcl`; `lace module lock` writes it.
416
418
  */
417
419
  REASON_NO_LOCKFILE = 22,
420
+ /** REASON_NO_COMMIT - stack create --source: the directory's repository has no commit yet. */
421
+ REASON_NO_COMMIT = 23,
418
422
  UNRECOGNIZED = -1
419
423
  }
420
424
 
@@ -849,6 +853,50 @@ type MessageBridge = {
849
853
  onMessage(f: (m: unknown) => void): () => void;
850
854
  };
851
855
 
856
+ declare const ENGINE_PROTOCOL_VERSION: string;
857
+ declare const ENGINE_CONTRACT: string;
858
+ /** What an engine names of itself, on its handshake or in its `Initialize` answer. */
859
+ type EngineIdentity = {
860
+ version: string;
861
+ protocol: string;
862
+ /** The contract's digest; '' for an engine that names none. */
863
+ contract: string;
864
+ };
865
+ /** What these libraries require of an engine. */
866
+ type RequiredEngine = {
867
+ protocol: string;
868
+ contract: string;
869
+ };
870
+ /**
871
+ * The engine names another protocol version or another contract than these
872
+ * libraries were built from. It carries the engine's own version, both
873
+ * protocol versions and both contracts. `behind` says which side is older
874
+ * when the protocol numbers differ, and is undefined when they are equal and
875
+ * only the contracts differ: two builds of one protocol from different
876
+ * trees, which the number does not order. What a host shows for it, and
877
+ * what it offers, is the host's.
878
+ */
879
+ declare class EngineIdentityMismatchError extends Error {
880
+ readonly engineVersion: string;
881
+ readonly engineProtocol: string;
882
+ readonly engineContract: string;
883
+ readonly requiredProtocol: string;
884
+ readonly requiredContract: string;
885
+ readonly behind: 'engine' | 'host' | undefined;
886
+ constructor(engine: EngineIdentity, required: RequiredEngine);
887
+ }
888
+ /**
889
+ * The one check of what an engine names of itself (on its handshake line,
890
+ * or in its `Initialize` answer) against `ENGINE_PROTOCOL_VERSION` and
891
+ * `ENGINE_CONTRACT`: another protocol version or another contract, or none,
892
+ * throws `EngineIdentityMismatchError`. The host's `ServerManager` checks
893
+ * the handshake before any RPC and the canvas's engine mapping checks
894
+ * `Initialize`'s answer before any other call, so an engine that serves
895
+ * other commands or other documents is refused once, clearly, instead of
896
+ * a command going missing or a document failing to parse later.
897
+ */
898
+ declare function checkEngineIdentity(engine: EngineIdentity): void;
899
+
852
900
  declare function deriveNodeConfig(bundle: Bundle, instanceId: string): NodeConfig | null;
853
901
  declare function deriveSettingsConfig(bundle: Bundle, moduleKey: string): SettingsConfig | null;
854
902
 
@@ -989,6 +1037,7 @@ declare function splitPath(canvasPath: string): {
989
1037
  localId: string;
990
1038
  };
991
1039
  declare function callText(sourcePath: string): string;
1040
+ declare function groupPinText(group: string, end: 'source' | 'target', pin: string): string;
992
1041
 
993
1042
  type ParsedModuleKey = {
994
1043
  id: string;
@@ -1018,34 +1067,5 @@ declare function resolveScopePath(bundle: Bundle, path: string): string | null;
1018
1067
 
1019
1068
  declare const CanvasViewProto: MessageFns<CanvasView>;
1020
1069
 
1021
- declare const ENGINE_PROTOCOL_VERSION: string;
1022
- /**
1023
- * The engine names another protocol version than these libraries speak. It
1024
- * carries the engine's own version and both protocol versions;
1025
- * `engineTooOld` says which side is behind. What a host shows for it, and
1026
- * what it offers, is the host's.
1027
- */
1028
- declare class EngineProtocolMismatchError extends Error {
1029
- readonly engineVersion: string;
1030
- readonly engineProtocol: string;
1031
- readonly requiredProtocol: string;
1032
- constructor(engineVersion: string, engineProtocol: string, requiredProtocol: string);
1033
- /**
1034
- * The engine is the side that is behind: a newer Lace CLI speaks this
1035
- * host's protocol. False when the engine is ahead of the host.
1036
- */
1037
- get engineTooOld(): boolean;
1038
- }
1039
- /**
1040
- * The one check of the protocol version an engine names — on its handshake
1041
- * line, or in its `Initialize` answer — against `ENGINE_PROTOCOL_VERSION`:
1042
- * another version, or none, throws `EngineProtocolMismatchError`. The
1043
- * host's `ServerManager` checks the handshake before any RPC and the
1044
- * canvas's engine mapping checks `Initialize`'s answer before any other
1045
- * call, so an engine speaking another protocol is refused once, clearly,
1046
- * instead of misreading every later message.
1047
- */
1048
- declare function checkEngineProtocol(engineVersion: string, engineProtocol: string): void;
1049
-
1050
- export { BRIDGE_METHODS, Bundle, COLLAPSED_GROUP_WIDTH, CONNECT_CODE_NAMES, CanvasViewProto, EMPTY_BUNDLE, ENGINE_METHODS, ENGINE_PROTOCOL_VERSION, ENGINE_STREAM_METHODS, EngineProtocolMismatchError, GROUP_HEADER_HEIGHT, GROUP_PADDING, HOST_ONLY_METHODS, META_ARGUMENTS, NODE_HEADER_HEIGHT, NODE_ROW_HEIGHT, NODE_WIDTH, 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 };
1051
- export type { BlockConfig, BridgeMethod, BridgeRequest, BridgeResponse, CanvasArrangement, CanvasView$1 as CanvasView, Conflict, DeepPartial$1 as DeepPartial, Diagnostic, EngineMethod, EngineStreamMethod, HostOnlyMethod, InstanceAddress, InstanceChild, KeepKey, LayoutEdge, LayoutItem, MessageBridge, MetaArgument, NodeConfig, NodePin$1 as NodePin, ParsedModuleKey, ProjectionMeta, ProtoDiagnosticLike, Rect, RenderEdge$1 as RenderEdge, RenderGroup$1 as RenderGroup, RenderInput, RenderNode$1 as RenderNode, RenderOutput, ResourceConfig, ScopedInstance, SettingsConfig, Size, ViewportIntent, XY };
1070
+ export { BRIDGE_METHODS, Bundle, COLLAPSED_GROUP_WIDTH, CONNECT_CODE_NAMES, CanvasViewProto, EMPTY_BUNDLE, ENGINE_CONTRACT, ENGINE_METHODS, ENGINE_PROTOCOL_VERSION, ENGINE_STREAM_METHODS, EngineIdentityMismatchError, GROUP_HEADER_HEIGHT, GROUP_PADDING, HOST_ONLY_METHODS, META_ARGUMENTS, NODE_HEADER_HEIGHT, NODE_ROW_HEIGHT, NODE_WIDTH, apiFields, boxAt, callText, checkEngineIdentity, collapsedGroupSize, convertDiagnostic, deriveNodeConfig, deriveSettingsConfig, drawnAt, drawnRect, extentOf, frameOf, freeSlot, groupBoxSize, groupFootprint, groupInputPinY, groupPinText, groupPinY, groupPins, groupReach, inputPinY, instanceAddress, joinPath, keepOrder, layoutByDepth, localIn, nodeIdForAddress, nodeIdForDiagnostic, nodeRows, nodeSize, originAt, parseModuleKey, projectCanvasView, reachRect, resolveInstance, resolveScopePath, resolveScopePositionsByDepth, splitPath, stepDown, visibleInputs };
1071
+ export type { BlockConfig, BridgeMethod, BridgeRequest, BridgeResponse, CanvasArrangement, CanvasView$1 as CanvasView, Conflict, DeepPartial$1 as DeepPartial, Diagnostic, EngineIdentity, EngineMethod, EngineStreamMethod, HostOnlyMethod, InstanceAddress, InstanceChild, KeepKey, LayoutEdge, LayoutItem, MessageBridge, MetaArgument, NodeConfig, NodePin$1 as NodePin, ParsedModuleKey, ProjectionMeta, ProtoDiagnosticLike, Rect, RenderEdge$1 as RenderEdge, RenderGroup$1 as RenderGroup, RenderInput, RenderNode$1 as RenderNode, RenderOutput, ResourceConfig, ScopedInstance, SettingsConfig, Size, ViewportIntent, XY };
package/dist/index.d.ts CHANGED
@@ -149,6 +149,8 @@ type RenderEdge$1 = {
149
149
  target: string;
150
150
  source_output: string;
151
151
  target_input: string;
152
+ source_pin?: boolean;
153
+ target_pin?: boolean;
152
154
  };
153
155
  type RenderInput = {
154
156
  name: string;
@@ -415,6 +417,8 @@ declare enum Reason {
415
417
  * `.terraform.lock.hcl`; `lace module lock` writes it.
416
418
  */
417
419
  REASON_NO_LOCKFILE = 22,
420
+ /** REASON_NO_COMMIT - stack create --source: the directory's repository has no commit yet. */
421
+ REASON_NO_COMMIT = 23,
418
422
  UNRECOGNIZED = -1
419
423
  }
420
424
 
@@ -849,6 +853,50 @@ type MessageBridge = {
849
853
  onMessage(f: (m: unknown) => void): () => void;
850
854
  };
851
855
 
856
+ declare const ENGINE_PROTOCOL_VERSION: string;
857
+ declare const ENGINE_CONTRACT: string;
858
+ /** What an engine names of itself, on its handshake or in its `Initialize` answer. */
859
+ type EngineIdentity = {
860
+ version: string;
861
+ protocol: string;
862
+ /** The contract's digest; '' for an engine that names none. */
863
+ contract: string;
864
+ };
865
+ /** What these libraries require of an engine. */
866
+ type RequiredEngine = {
867
+ protocol: string;
868
+ contract: string;
869
+ };
870
+ /**
871
+ * The engine names another protocol version or another contract than these
872
+ * libraries were built from. It carries the engine's own version, both
873
+ * protocol versions and both contracts. `behind` says which side is older
874
+ * when the protocol numbers differ, and is undefined when they are equal and
875
+ * only the contracts differ: two builds of one protocol from different
876
+ * trees, which the number does not order. What a host shows for it, and
877
+ * what it offers, is the host's.
878
+ */
879
+ declare class EngineIdentityMismatchError extends Error {
880
+ readonly engineVersion: string;
881
+ readonly engineProtocol: string;
882
+ readonly engineContract: string;
883
+ readonly requiredProtocol: string;
884
+ readonly requiredContract: string;
885
+ readonly behind: 'engine' | 'host' | undefined;
886
+ constructor(engine: EngineIdentity, required: RequiredEngine);
887
+ }
888
+ /**
889
+ * The one check of what an engine names of itself (on its handshake line,
890
+ * or in its `Initialize` answer) against `ENGINE_PROTOCOL_VERSION` and
891
+ * `ENGINE_CONTRACT`: another protocol version or another contract, or none,
892
+ * throws `EngineIdentityMismatchError`. The host's `ServerManager` checks
893
+ * the handshake before any RPC and the canvas's engine mapping checks
894
+ * `Initialize`'s answer before any other call, so an engine that serves
895
+ * other commands or other documents is refused once, clearly, instead of
896
+ * a command going missing or a document failing to parse later.
897
+ */
898
+ declare function checkEngineIdentity(engine: EngineIdentity): void;
899
+
852
900
  declare function deriveNodeConfig(bundle: Bundle, instanceId: string): NodeConfig | null;
853
901
  declare function deriveSettingsConfig(bundle: Bundle, moduleKey: string): SettingsConfig | null;
854
902
 
@@ -989,6 +1037,7 @@ declare function splitPath(canvasPath: string): {
989
1037
  localId: string;
990
1038
  };
991
1039
  declare function callText(sourcePath: string): string;
1040
+ declare function groupPinText(group: string, end: 'source' | 'target', pin: string): string;
992
1041
 
993
1042
  type ParsedModuleKey = {
994
1043
  id: string;
@@ -1018,34 +1067,5 @@ declare function resolveScopePath(bundle: Bundle, path: string): string | null;
1018
1067
 
1019
1068
  declare const CanvasViewProto: MessageFns<CanvasView>;
1020
1069
 
1021
- declare const ENGINE_PROTOCOL_VERSION: string;
1022
- /**
1023
- * The engine names another protocol version than these libraries speak. It
1024
- * carries the engine's own version and both protocol versions;
1025
- * `engineTooOld` says which side is behind. What a host shows for it, and
1026
- * what it offers, is the host's.
1027
- */
1028
- declare class EngineProtocolMismatchError extends Error {
1029
- readonly engineVersion: string;
1030
- readonly engineProtocol: string;
1031
- readonly requiredProtocol: string;
1032
- constructor(engineVersion: string, engineProtocol: string, requiredProtocol: string);
1033
- /**
1034
- * The engine is the side that is behind: a newer Lace CLI speaks this
1035
- * host's protocol. False when the engine is ahead of the host.
1036
- */
1037
- get engineTooOld(): boolean;
1038
- }
1039
- /**
1040
- * The one check of the protocol version an engine names — on its handshake
1041
- * line, or in its `Initialize` answer — against `ENGINE_PROTOCOL_VERSION`:
1042
- * another version, or none, throws `EngineProtocolMismatchError`. The
1043
- * host's `ServerManager` checks the handshake before any RPC and the
1044
- * canvas's engine mapping checks `Initialize`'s answer before any other
1045
- * call, so an engine speaking another protocol is refused once, clearly,
1046
- * instead of misreading every later message.
1047
- */
1048
- declare function checkEngineProtocol(engineVersion: string, engineProtocol: string): void;
1049
-
1050
- export { BRIDGE_METHODS, Bundle, COLLAPSED_GROUP_WIDTH, CONNECT_CODE_NAMES, CanvasViewProto, EMPTY_BUNDLE, ENGINE_METHODS, ENGINE_PROTOCOL_VERSION, ENGINE_STREAM_METHODS, EngineProtocolMismatchError, GROUP_HEADER_HEIGHT, GROUP_PADDING, HOST_ONLY_METHODS, META_ARGUMENTS, NODE_HEADER_HEIGHT, NODE_ROW_HEIGHT, NODE_WIDTH, 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 };
1051
- export type { BlockConfig, BridgeMethod, BridgeRequest, BridgeResponse, CanvasArrangement, CanvasView$1 as CanvasView, Conflict, DeepPartial$1 as DeepPartial, Diagnostic, EngineMethod, EngineStreamMethod, HostOnlyMethod, InstanceAddress, InstanceChild, KeepKey, LayoutEdge, LayoutItem, MessageBridge, MetaArgument, NodeConfig, NodePin$1 as NodePin, ParsedModuleKey, ProjectionMeta, ProtoDiagnosticLike, Rect, RenderEdge$1 as RenderEdge, RenderGroup$1 as RenderGroup, RenderInput, RenderNode$1 as RenderNode, RenderOutput, ResourceConfig, ScopedInstance, SettingsConfig, Size, ViewportIntent, XY };
1070
+ export { BRIDGE_METHODS, Bundle, COLLAPSED_GROUP_WIDTH, CONNECT_CODE_NAMES, CanvasViewProto, EMPTY_BUNDLE, ENGINE_CONTRACT, ENGINE_METHODS, ENGINE_PROTOCOL_VERSION, ENGINE_STREAM_METHODS, EngineIdentityMismatchError, GROUP_HEADER_HEIGHT, GROUP_PADDING, HOST_ONLY_METHODS, META_ARGUMENTS, NODE_HEADER_HEIGHT, NODE_ROW_HEIGHT, NODE_WIDTH, apiFields, boxAt, callText, checkEngineIdentity, collapsedGroupSize, convertDiagnostic, deriveNodeConfig, deriveSettingsConfig, drawnAt, drawnRect, extentOf, frameOf, freeSlot, groupBoxSize, groupFootprint, groupInputPinY, groupPinText, groupPinY, groupPins, groupReach, inputPinY, instanceAddress, joinPath, keepOrder, layoutByDepth, localIn, nodeIdForAddress, nodeIdForDiagnostic, nodeRows, nodeSize, originAt, parseModuleKey, projectCanvasView, reachRect, resolveInstance, resolveScopePath, resolveScopePositionsByDepth, splitPath, stepDown, visibleInputs };
1071
+ export type { BlockConfig, BridgeMethod, BridgeRequest, BridgeResponse, CanvasArrangement, CanvasView$1 as CanvasView, Conflict, DeepPartial$1 as DeepPartial, Diagnostic, EngineIdentity, EngineMethod, EngineStreamMethod, HostOnlyMethod, InstanceAddress, InstanceChild, KeepKey, LayoutEdge, LayoutItem, MessageBridge, MetaArgument, NodeConfig, NodePin$1 as NodePin, ParsedModuleKey, ProjectionMeta, ProtoDiagnosticLike, Rect, RenderEdge$1 as RenderEdge, RenderGroup$1 as RenderGroup, RenderInput, RenderNode$1 as RenderNode, RenderOutput, ResourceConfig, ScopedInstance, SettingsConfig, Size, ViewportIntent, XY };