@lace-cloud/host 0.20.0 → 0.21.1
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.cjs +39 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +37 -69
- package/dist/index.d.ts +37 -69
- package/dist/index.mjs +39 -114
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -45,10 +45,6 @@ type EngineInitialize = {
|
|
|
45
45
|
protocolVersion: string;
|
|
46
46
|
commandPaths: readonly string[];
|
|
47
47
|
};
|
|
48
|
-
type EngineCredential = {
|
|
49
|
-
apiKey: string | undefined;
|
|
50
|
-
apiBaseUrl: string;
|
|
51
|
-
};
|
|
52
48
|
type ServerState = 'stopped' | 'starting' | 'running' | 'error';
|
|
53
49
|
|
|
54
50
|
/**
|
|
@@ -615,6 +611,8 @@ declare enum Reason {
|
|
|
615
611
|
* REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
|
|
616
612
|
* modules crosses a group's boundary, which no single-scope edit makes.
|
|
617
613
|
* It is a refusal of the batch's content, carried on its GraphError.
|
|
614
|
+
* ReadWiringCandidates: a read whose two scopes differ, refused
|
|
615
|
+
* (FailedPrecondition) as such a wire is.
|
|
618
616
|
*/
|
|
619
617
|
REASON_CROSS_SCOPE = 15,
|
|
620
618
|
/**
|
|
@@ -669,17 +667,6 @@ interface ShutdownResponse {
|
|
|
669
667
|
status: string;
|
|
670
668
|
}
|
|
671
669
|
declare const ShutdownResponse: MessageFns<ShutdownResponse>;
|
|
672
|
-
interface ReadCredentialResponse {
|
|
673
|
-
/**
|
|
674
|
-
* Present exactly when the developer is signed in. A present key is never
|
|
675
|
-
* empty, so the bytes are those of a plain string field: field 1 is
|
|
676
|
-
* omitted while signed out and carries the key otherwise.
|
|
677
|
-
*/
|
|
678
|
-
api_key?: string | undefined;
|
|
679
|
-
/** the API the engine's own commands call */
|
|
680
|
-
api_base_url: string;
|
|
681
|
-
}
|
|
682
|
-
declare const ReadCredentialResponse: MessageFns<ReadCredentialResponse>;
|
|
683
670
|
interface SessionOpenRequest {
|
|
684
671
|
ephemeral?: EphemeralSession | undefined;
|
|
685
672
|
root?: RootSession | undefined;
|
|
@@ -739,7 +726,7 @@ interface SessionGenerateRequest {
|
|
|
739
726
|
declare const SessionGenerateRequest: MessageFns<SessionGenerateRequest>;
|
|
740
727
|
interface SessionGenerateResponse {
|
|
741
728
|
files_written: string[];
|
|
742
|
-
/** the `module validate -o json` document for the
|
|
729
|
+
/** the `module validate -o json` document for the Terraform on disk */
|
|
743
730
|
validate_json: string;
|
|
744
731
|
/**
|
|
745
732
|
* The revision of the state the Generate left: the
|
|
@@ -860,10 +847,11 @@ interface CopyInstancesAction {
|
|
|
860
847
|
}
|
|
861
848
|
declare const CopyInstancesAction: MessageFns<CopyInstancesAction>;
|
|
862
849
|
/**
|
|
863
|
-
* CreateGroupAction creates a new
|
|
864
|
-
*
|
|
865
|
-
*
|
|
866
|
-
*
|
|
850
|
+
* CreateGroupAction creates a new group from selected nodes. The wire
|
|
851
|
+
* payload carries only membership: the engine names the group (the
|
|
852
|
+
* scope's next free group_<n>, its one name) and reports it in
|
|
853
|
+
* `BundleApplyResult.created`, and where the group is drawn and whether
|
|
854
|
+
* it is collapsed are consumer-owned arrangement state.
|
|
867
855
|
*/
|
|
868
856
|
interface CreateGroupAction {
|
|
869
857
|
node_ids: string[];
|
|
@@ -1007,6 +995,12 @@ interface WiringCandidate {
|
|
|
1007
995
|
score: number;
|
|
1008
996
|
}
|
|
1009
997
|
declare const WiringCandidate: MessageFns<WiringCandidate>;
|
|
998
|
+
/**
|
|
999
|
+
* A read names its two ends as a connect does: `scope` owns the targets and
|
|
1000
|
+
* `source_scope` the sources, both required. A read whose two scopes
|
|
1001
|
+
* differ is refused (FailedPrecondition, `REASON_CROSS_SCOPE`) as a wire
|
|
1002
|
+
* across them is: the matcher pairs the instances of one module only.
|
|
1003
|
+
*/
|
|
1010
1004
|
interface ReadWiringCandidatesRequest {
|
|
1011
1005
|
session_id: string;
|
|
1012
1006
|
/** The key of the module whose instances are matched (an action's `scope`). */
|
|
@@ -1021,6 +1015,8 @@ interface ReadWiringCandidatesRequest {
|
|
|
1021
1015
|
* every instance of the scope is a target.
|
|
1022
1016
|
*/
|
|
1023
1017
|
target_instance?: string | undefined;
|
|
1018
|
+
/** The key of the module that owns the sources (a wire's `source_scope`). */
|
|
1019
|
+
source_scope: string;
|
|
1024
1020
|
}
|
|
1025
1021
|
declare const ReadWiringCandidatesRequest: MessageFns<ReadWiringCandidatesRequest>;
|
|
1026
1022
|
interface ReadWiringCandidatesResponse {
|
|
@@ -1091,7 +1087,7 @@ interface GenerateProgress {
|
|
|
1091
1087
|
declare const GenerateProgress: MessageFns<GenerateProgress>;
|
|
1092
1088
|
interface GenerateSuccess {
|
|
1093
1089
|
files_written: string[];
|
|
1094
|
-
/** the `module validate -o json` document for the
|
|
1090
|
+
/** the `module validate -o json` document for the Terraform on disk */
|
|
1095
1091
|
validate_json: string;
|
|
1096
1092
|
/** the Generate this event belongs to */
|
|
1097
1093
|
generate_id: string;
|
|
@@ -1163,7 +1159,7 @@ declare const BundleStateEvent: MessageFns<BundleStateEvent>;
|
|
|
1163
1159
|
* tree. Consumers (VS Code extension, portal, tests) project this
|
|
1164
1160
|
* locally via the proto package's `projectCanvasView(bundle,
|
|
1165
1161
|
* arrangement?, meta)` to produce a renderable CanvasView —
|
|
1166
|
-
* `arrangement` (node positions, group collapse
|
|
1162
|
+
* `arrangement` (node positions, group collapse) is
|
|
1167
1163
|
* consumer-owned view state and never travels here.
|
|
1168
1164
|
*
|
|
1169
1165
|
* Not to be confused with the `bundle_snapshot` API entity, which is
|
|
@@ -1217,6 +1213,15 @@ interface BundleState {
|
|
|
1217
1213
|
* holds already shows a batch it applied.
|
|
1218
1214
|
*/
|
|
1219
1215
|
revision: number;
|
|
1216
|
+
/**
|
|
1217
|
+
* True while a Generate holds the session's one Generate: from the moment
|
|
1218
|
+
* SessionGenerate takes it until the call answers — the tree's write and
|
|
1219
|
+
* the module validate that certifies it. The session publishes a frame
|
|
1220
|
+
* when it is taken and when it is released, so a subscriber that joins
|
|
1221
|
+
* mid-Generate starts with it set, and a second SessionGenerate in that
|
|
1222
|
+
* window is refused (FailedPrecondition).
|
|
1223
|
+
*/
|
|
1224
|
+
generating: boolean;
|
|
1220
1225
|
}
|
|
1221
1226
|
declare const BundleState: MessageFns<BundleState>;
|
|
1222
1227
|
/**
|
|
@@ -1255,7 +1260,7 @@ declare const BundleApplyResult: MessageFns<BundleApplyResult>;
|
|
|
1255
1260
|
/**
|
|
1256
1261
|
* CreatedRef names one child created by an action (PlaceModule,
|
|
1257
1262
|
* CreateGroup, CopyInstances, ...). Clients key pending arrangement
|
|
1258
|
-
* writes (position, group
|
|
1263
|
+
* writes (position, group collapse) off these IDs instead of
|
|
1259
1264
|
* diffing BundleState frames.
|
|
1260
1265
|
*/
|
|
1261
1266
|
interface CreatedRef {
|
|
@@ -1378,28 +1383,6 @@ declare const LaceEngineService: {
|
|
|
1378
1383
|
readonly responseSerialize: (value: ShutdownResponse) => Buffer;
|
|
1379
1384
|
readonly responseDeserialize: (value: Buffer) => ShutdownResponse;
|
|
1380
1385
|
};
|
|
1381
|
-
/**
|
|
1382
|
-
* Answers the credential this engine holds: the API key `lace login`
|
|
1383
|
-
* saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
|
|
1384
|
-
* login` or `lace logout` takes effect at once (absent when signed out),
|
|
1385
|
-
* beside the base URL of the API that key is for, the one the engine's
|
|
1386
|
-
* own commands call (the CLI's `config.ResolveBaseURL`). The host
|
|
1387
|
-
* that spawned the engine builds its own authenticated transport to
|
|
1388
|
-
* Lace's API from the two, for the chat package, and never restates
|
|
1389
|
-
* which API; the engine knows nothing of what the host does with them. Served, like every RPC,
|
|
1390
|
-
* only to the bearer of the handshake's session token, and never
|
|
1391
|
-
* forwarded across the webview bridge (`BRIDGE_METHODS`,
|
|
1392
|
-
* @lace-cloud/proto's engine-bridge.ts).
|
|
1393
|
-
*/
|
|
1394
|
-
readonly readCredential: {
|
|
1395
|
-
readonly path: "/lace.engine.LaceEngine/ReadCredential";
|
|
1396
|
-
readonly requestStream: false;
|
|
1397
|
-
readonly responseStream: false;
|
|
1398
|
-
readonly requestSerialize: (value: Empty) => Buffer;
|
|
1399
|
-
readonly requestDeserialize: (value: Buffer) => Empty;
|
|
1400
|
-
readonly responseSerialize: (value: ReadCredentialResponse) => Buffer;
|
|
1401
|
-
readonly responseDeserialize: (value: Buffer) => ReadCredentialResponse;
|
|
1402
|
-
};
|
|
1403
1386
|
/**
|
|
1404
1387
|
* Session lifecycle. Never fails on a refused source tf — a refused tf
|
|
1405
1388
|
* opens the session source-refused (`BundleState.source_refused`) with
|
|
@@ -1503,8 +1486,9 @@ declare const LaceEngineService: {
|
|
|
1503
1486
|
* Reads the output → input pairs the engine's matcher scores between the
|
|
1504
1487
|
* instances of one module of a session's working IR: the pairs an
|
|
1505
1488
|
* `auto_connect` chooses among, with the scores it chooses by. The
|
|
1506
|
-
* matching rules have this one home; a client
|
|
1507
|
-
*
|
|
1489
|
+
* matching rules have this one home; a client lists these pairs, best
|
|
1490
|
+
* first, for a connect whose pins it does not settle, and sends the pair
|
|
1491
|
+
* it is given as a `connect`.
|
|
1508
1492
|
*/
|
|
1509
1493
|
readonly readWiringCandidates: {
|
|
1510
1494
|
readonly path: "/lace.engine.LaceEngine/ReadWiringCandidates";
|
|
@@ -1548,7 +1532,7 @@ declare const LaceEngineService: {
|
|
|
1548
1532
|
*
|
|
1549
1533
|
* Consumers (portal + extension canvas engines) project locally via
|
|
1550
1534
|
* `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
|
|
1551
|
-
* `arrangement` (node positions, group collapse
|
|
1535
|
+
* `arrangement` (node positions, group collapse) is consumer-owned
|
|
1552
1536
|
* view state — it never travels over this RPC.
|
|
1553
1537
|
*/
|
|
1554
1538
|
readonly subscribe: {
|
|
@@ -1569,22 +1553,6 @@ interface LaceEngineClient extends Client {
|
|
|
1569
1553
|
shutdown(request: Empty, callback: (error: ServiceError | null, response: ShutdownResponse) => void): ClientUnaryCall;
|
|
1570
1554
|
shutdown(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: ShutdownResponse) => void): ClientUnaryCall;
|
|
1571
1555
|
shutdown(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ShutdownResponse) => void): ClientUnaryCall;
|
|
1572
|
-
/**
|
|
1573
|
-
* Answers the credential this engine holds: the API key `lace login`
|
|
1574
|
-
* saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
|
|
1575
|
-
* login` or `lace logout` takes effect at once (absent when signed out),
|
|
1576
|
-
* beside the base URL of the API that key is for, the one the engine's
|
|
1577
|
-
* own commands call (the CLI's `config.ResolveBaseURL`). The host
|
|
1578
|
-
* that spawned the engine builds its own authenticated transport to
|
|
1579
|
-
* Lace's API from the two, for the chat package, and never restates
|
|
1580
|
-
* which API; the engine knows nothing of what the host does with them. Served, like every RPC,
|
|
1581
|
-
* only to the bearer of the handshake's session token, and never
|
|
1582
|
-
* forwarded across the webview bridge (`BRIDGE_METHODS`,
|
|
1583
|
-
* @lace-cloud/proto's engine-bridge.ts).
|
|
1584
|
-
*/
|
|
1585
|
-
readCredential(request: Empty, callback: (error: ServiceError | null, response: ReadCredentialResponse) => void): ClientUnaryCall;
|
|
1586
|
-
readCredential(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: ReadCredentialResponse) => void): ClientUnaryCall;
|
|
1587
|
-
readCredential(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ReadCredentialResponse) => void): ClientUnaryCall;
|
|
1588
1556
|
/**
|
|
1589
1557
|
* Session lifecycle. Never fails on a refused source tf — a refused tf
|
|
1590
1558
|
* opens the session source-refused (`BundleState.source_refused`) with
|
|
@@ -1646,8 +1614,9 @@ interface LaceEngineClient extends Client {
|
|
|
1646
1614
|
* Reads the output → input pairs the engine's matcher scores between the
|
|
1647
1615
|
* instances of one module of a session's working IR: the pairs an
|
|
1648
1616
|
* `auto_connect` chooses among, with the scores it chooses by. The
|
|
1649
|
-
* matching rules have this one home; a client
|
|
1650
|
-
*
|
|
1617
|
+
* matching rules have this one home; a client lists these pairs, best
|
|
1618
|
+
* first, for a connect whose pins it does not settle, and sends the pair
|
|
1619
|
+
* it is given as a `connect`.
|
|
1651
1620
|
*/
|
|
1652
1621
|
readWiringCandidates(request: ReadWiringCandidatesRequest, callback: (error: ServiceError | null, response: ReadWiringCandidatesResponse) => void): ClientUnaryCall;
|
|
1653
1622
|
readWiringCandidates(request: ReadWiringCandidatesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ReadWiringCandidatesResponse) => void): ClientUnaryCall;
|
|
@@ -1672,7 +1641,7 @@ interface LaceEngineClient extends Client {
|
|
|
1672
1641
|
*
|
|
1673
1642
|
* Consumers (portal + extension canvas engines) project locally via
|
|
1674
1643
|
* `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
|
|
1675
|
-
* `arrangement` (node positions, group collapse
|
|
1644
|
+
* `arrangement` (node positions, group collapse) is consumer-owned
|
|
1676
1645
|
* view state — it never travels over this RPC.
|
|
1677
1646
|
*/
|
|
1678
1647
|
subscribe(request: SubscribeRequest, options?: Partial<CallOptions>): ClientReadableStream<BundleStateEvent>;
|
|
@@ -1739,7 +1708,6 @@ declare class LaceTransport {
|
|
|
1739
1708
|
private unary;
|
|
1740
1709
|
initialize(clientVersion: string): Promise<EngineInitialize>;
|
|
1741
1710
|
shutdown(): Promise<void>;
|
|
1742
|
-
readCredential(): Promise<EngineCredential>;
|
|
1743
1711
|
subscribeStream(sessionId: string): grpc.ClientReadableStream<BundleStateEvent>;
|
|
1744
1712
|
dispose(): void;
|
|
1745
1713
|
}
|
|
@@ -1787,4 +1755,4 @@ declare class ServerManager extends EventEmitter {
|
|
|
1787
1755
|
private maybeRestart;
|
|
1788
1756
|
}
|
|
1789
1757
|
|
|
1790
|
-
export { Action, ApplyActionRequest, BundleApplyResult, BundleState, BundleStateEvent, type
|
|
1758
|
+
export { Action, ApplyActionRequest, BundleApplyResult, BundleState, BundleStateEvent, type EngineHandshake, type EngineInitialize, type EngineTransport, InitializeResponse, InvokeRequest, LaceTransport, ReadWiringCandidatesRequest, ReadWiringCandidatesResponse, ReasonDetail, RpcError, type RpcErrorCategory, ServerManager, type ServerState, SessionCloseResponse, SessionOpenResponse, Status, classifyRpcError, endEngine, requireClient, serveEngineBridge, spawnEngine };
|
package/dist/index.d.ts
CHANGED
|
@@ -45,10 +45,6 @@ type EngineInitialize = {
|
|
|
45
45
|
protocolVersion: string;
|
|
46
46
|
commandPaths: readonly string[];
|
|
47
47
|
};
|
|
48
|
-
type EngineCredential = {
|
|
49
|
-
apiKey: string | undefined;
|
|
50
|
-
apiBaseUrl: string;
|
|
51
|
-
};
|
|
52
48
|
type ServerState = 'stopped' | 'starting' | 'running' | 'error';
|
|
53
49
|
|
|
54
50
|
/**
|
|
@@ -615,6 +611,8 @@ declare enum Reason {
|
|
|
615
611
|
* REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
|
|
616
612
|
* modules crosses a group's boundary, which no single-scope edit makes.
|
|
617
613
|
* It is a refusal of the batch's content, carried on its GraphError.
|
|
614
|
+
* ReadWiringCandidates: a read whose two scopes differ, refused
|
|
615
|
+
* (FailedPrecondition) as such a wire is.
|
|
618
616
|
*/
|
|
619
617
|
REASON_CROSS_SCOPE = 15,
|
|
620
618
|
/**
|
|
@@ -669,17 +667,6 @@ interface ShutdownResponse {
|
|
|
669
667
|
status: string;
|
|
670
668
|
}
|
|
671
669
|
declare const ShutdownResponse: MessageFns<ShutdownResponse>;
|
|
672
|
-
interface ReadCredentialResponse {
|
|
673
|
-
/**
|
|
674
|
-
* Present exactly when the developer is signed in. A present key is never
|
|
675
|
-
* empty, so the bytes are those of a plain string field: field 1 is
|
|
676
|
-
* omitted while signed out and carries the key otherwise.
|
|
677
|
-
*/
|
|
678
|
-
api_key?: string | undefined;
|
|
679
|
-
/** the API the engine's own commands call */
|
|
680
|
-
api_base_url: string;
|
|
681
|
-
}
|
|
682
|
-
declare const ReadCredentialResponse: MessageFns<ReadCredentialResponse>;
|
|
683
670
|
interface SessionOpenRequest {
|
|
684
671
|
ephemeral?: EphemeralSession | undefined;
|
|
685
672
|
root?: RootSession | undefined;
|
|
@@ -739,7 +726,7 @@ interface SessionGenerateRequest {
|
|
|
739
726
|
declare const SessionGenerateRequest: MessageFns<SessionGenerateRequest>;
|
|
740
727
|
interface SessionGenerateResponse {
|
|
741
728
|
files_written: string[];
|
|
742
|
-
/** the `module validate -o json` document for the
|
|
729
|
+
/** the `module validate -o json` document for the Terraform on disk */
|
|
743
730
|
validate_json: string;
|
|
744
731
|
/**
|
|
745
732
|
* The revision of the state the Generate left: the
|
|
@@ -860,10 +847,11 @@ interface CopyInstancesAction {
|
|
|
860
847
|
}
|
|
861
848
|
declare const CopyInstancesAction: MessageFns<CopyInstancesAction>;
|
|
862
849
|
/**
|
|
863
|
-
* CreateGroupAction creates a new
|
|
864
|
-
*
|
|
865
|
-
*
|
|
866
|
-
*
|
|
850
|
+
* CreateGroupAction creates a new group from selected nodes. The wire
|
|
851
|
+
* payload carries only membership: the engine names the group (the
|
|
852
|
+
* scope's next free group_<n>, its one name) and reports it in
|
|
853
|
+
* `BundleApplyResult.created`, and where the group is drawn and whether
|
|
854
|
+
* it is collapsed are consumer-owned arrangement state.
|
|
867
855
|
*/
|
|
868
856
|
interface CreateGroupAction {
|
|
869
857
|
node_ids: string[];
|
|
@@ -1007,6 +995,12 @@ interface WiringCandidate {
|
|
|
1007
995
|
score: number;
|
|
1008
996
|
}
|
|
1009
997
|
declare const WiringCandidate: MessageFns<WiringCandidate>;
|
|
998
|
+
/**
|
|
999
|
+
* A read names its two ends as a connect does: `scope` owns the targets and
|
|
1000
|
+
* `source_scope` the sources, both required. A read whose two scopes
|
|
1001
|
+
* differ is refused (FailedPrecondition, `REASON_CROSS_SCOPE`) as a wire
|
|
1002
|
+
* across them is: the matcher pairs the instances of one module only.
|
|
1003
|
+
*/
|
|
1010
1004
|
interface ReadWiringCandidatesRequest {
|
|
1011
1005
|
session_id: string;
|
|
1012
1006
|
/** The key of the module whose instances are matched (an action's `scope`). */
|
|
@@ -1021,6 +1015,8 @@ interface ReadWiringCandidatesRequest {
|
|
|
1021
1015
|
* every instance of the scope is a target.
|
|
1022
1016
|
*/
|
|
1023
1017
|
target_instance?: string | undefined;
|
|
1018
|
+
/** The key of the module that owns the sources (a wire's `source_scope`). */
|
|
1019
|
+
source_scope: string;
|
|
1024
1020
|
}
|
|
1025
1021
|
declare const ReadWiringCandidatesRequest: MessageFns<ReadWiringCandidatesRequest>;
|
|
1026
1022
|
interface ReadWiringCandidatesResponse {
|
|
@@ -1091,7 +1087,7 @@ interface GenerateProgress {
|
|
|
1091
1087
|
declare const GenerateProgress: MessageFns<GenerateProgress>;
|
|
1092
1088
|
interface GenerateSuccess {
|
|
1093
1089
|
files_written: string[];
|
|
1094
|
-
/** the `module validate -o json` document for the
|
|
1090
|
+
/** the `module validate -o json` document for the Terraform on disk */
|
|
1095
1091
|
validate_json: string;
|
|
1096
1092
|
/** the Generate this event belongs to */
|
|
1097
1093
|
generate_id: string;
|
|
@@ -1163,7 +1159,7 @@ declare const BundleStateEvent: MessageFns<BundleStateEvent>;
|
|
|
1163
1159
|
* tree. Consumers (VS Code extension, portal, tests) project this
|
|
1164
1160
|
* locally via the proto package's `projectCanvasView(bundle,
|
|
1165
1161
|
* arrangement?, meta)` to produce a renderable CanvasView —
|
|
1166
|
-
* `arrangement` (node positions, group collapse
|
|
1162
|
+
* `arrangement` (node positions, group collapse) is
|
|
1167
1163
|
* consumer-owned view state and never travels here.
|
|
1168
1164
|
*
|
|
1169
1165
|
* Not to be confused with the `bundle_snapshot` API entity, which is
|
|
@@ -1217,6 +1213,15 @@ interface BundleState {
|
|
|
1217
1213
|
* holds already shows a batch it applied.
|
|
1218
1214
|
*/
|
|
1219
1215
|
revision: number;
|
|
1216
|
+
/**
|
|
1217
|
+
* True while a Generate holds the session's one Generate: from the moment
|
|
1218
|
+
* SessionGenerate takes it until the call answers — the tree's write and
|
|
1219
|
+
* the module validate that certifies it. The session publishes a frame
|
|
1220
|
+
* when it is taken and when it is released, so a subscriber that joins
|
|
1221
|
+
* mid-Generate starts with it set, and a second SessionGenerate in that
|
|
1222
|
+
* window is refused (FailedPrecondition).
|
|
1223
|
+
*/
|
|
1224
|
+
generating: boolean;
|
|
1220
1225
|
}
|
|
1221
1226
|
declare const BundleState: MessageFns<BundleState>;
|
|
1222
1227
|
/**
|
|
@@ -1255,7 +1260,7 @@ declare const BundleApplyResult: MessageFns<BundleApplyResult>;
|
|
|
1255
1260
|
/**
|
|
1256
1261
|
* CreatedRef names one child created by an action (PlaceModule,
|
|
1257
1262
|
* CreateGroup, CopyInstances, ...). Clients key pending arrangement
|
|
1258
|
-
* writes (position, group
|
|
1263
|
+
* writes (position, group collapse) off these IDs instead of
|
|
1259
1264
|
* diffing BundleState frames.
|
|
1260
1265
|
*/
|
|
1261
1266
|
interface CreatedRef {
|
|
@@ -1378,28 +1383,6 @@ declare const LaceEngineService: {
|
|
|
1378
1383
|
readonly responseSerialize: (value: ShutdownResponse) => Buffer;
|
|
1379
1384
|
readonly responseDeserialize: (value: Buffer) => ShutdownResponse;
|
|
1380
1385
|
};
|
|
1381
|
-
/**
|
|
1382
|
-
* Answers the credential this engine holds: the API key `lace login`
|
|
1383
|
-
* saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
|
|
1384
|
-
* login` or `lace logout` takes effect at once (absent when signed out),
|
|
1385
|
-
* beside the base URL of the API that key is for, the one the engine's
|
|
1386
|
-
* own commands call (the CLI's `config.ResolveBaseURL`). The host
|
|
1387
|
-
* that spawned the engine builds its own authenticated transport to
|
|
1388
|
-
* Lace's API from the two, for the chat package, and never restates
|
|
1389
|
-
* which API; the engine knows nothing of what the host does with them. Served, like every RPC,
|
|
1390
|
-
* only to the bearer of the handshake's session token, and never
|
|
1391
|
-
* forwarded across the webview bridge (`BRIDGE_METHODS`,
|
|
1392
|
-
* @lace-cloud/proto's engine-bridge.ts).
|
|
1393
|
-
*/
|
|
1394
|
-
readonly readCredential: {
|
|
1395
|
-
readonly path: "/lace.engine.LaceEngine/ReadCredential";
|
|
1396
|
-
readonly requestStream: false;
|
|
1397
|
-
readonly responseStream: false;
|
|
1398
|
-
readonly requestSerialize: (value: Empty) => Buffer;
|
|
1399
|
-
readonly requestDeserialize: (value: Buffer) => Empty;
|
|
1400
|
-
readonly responseSerialize: (value: ReadCredentialResponse) => Buffer;
|
|
1401
|
-
readonly responseDeserialize: (value: Buffer) => ReadCredentialResponse;
|
|
1402
|
-
};
|
|
1403
1386
|
/**
|
|
1404
1387
|
* Session lifecycle. Never fails on a refused source tf — a refused tf
|
|
1405
1388
|
* opens the session source-refused (`BundleState.source_refused`) with
|
|
@@ -1503,8 +1486,9 @@ declare const LaceEngineService: {
|
|
|
1503
1486
|
* Reads the output → input pairs the engine's matcher scores between the
|
|
1504
1487
|
* instances of one module of a session's working IR: the pairs an
|
|
1505
1488
|
* `auto_connect` chooses among, with the scores it chooses by. The
|
|
1506
|
-
* matching rules have this one home; a client
|
|
1507
|
-
*
|
|
1489
|
+
* matching rules have this one home; a client lists these pairs, best
|
|
1490
|
+
* first, for a connect whose pins it does not settle, and sends the pair
|
|
1491
|
+
* it is given as a `connect`.
|
|
1508
1492
|
*/
|
|
1509
1493
|
readonly readWiringCandidates: {
|
|
1510
1494
|
readonly path: "/lace.engine.LaceEngine/ReadWiringCandidates";
|
|
@@ -1548,7 +1532,7 @@ declare const LaceEngineService: {
|
|
|
1548
1532
|
*
|
|
1549
1533
|
* Consumers (portal + extension canvas engines) project locally via
|
|
1550
1534
|
* `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
|
|
1551
|
-
* `arrangement` (node positions, group collapse
|
|
1535
|
+
* `arrangement` (node positions, group collapse) is consumer-owned
|
|
1552
1536
|
* view state — it never travels over this RPC.
|
|
1553
1537
|
*/
|
|
1554
1538
|
readonly subscribe: {
|
|
@@ -1569,22 +1553,6 @@ interface LaceEngineClient extends Client {
|
|
|
1569
1553
|
shutdown(request: Empty, callback: (error: ServiceError | null, response: ShutdownResponse) => void): ClientUnaryCall;
|
|
1570
1554
|
shutdown(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: ShutdownResponse) => void): ClientUnaryCall;
|
|
1571
1555
|
shutdown(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ShutdownResponse) => void): ClientUnaryCall;
|
|
1572
|
-
/**
|
|
1573
|
-
* Answers the credential this engine holds: the API key `lace login`
|
|
1574
|
-
* saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
|
|
1575
|
-
* login` or `lace logout` takes effect at once (absent when signed out),
|
|
1576
|
-
* beside the base URL of the API that key is for, the one the engine's
|
|
1577
|
-
* own commands call (the CLI's `config.ResolveBaseURL`). The host
|
|
1578
|
-
* that spawned the engine builds its own authenticated transport to
|
|
1579
|
-
* Lace's API from the two, for the chat package, and never restates
|
|
1580
|
-
* which API; the engine knows nothing of what the host does with them. Served, like every RPC,
|
|
1581
|
-
* only to the bearer of the handshake's session token, and never
|
|
1582
|
-
* forwarded across the webview bridge (`BRIDGE_METHODS`,
|
|
1583
|
-
* @lace-cloud/proto's engine-bridge.ts).
|
|
1584
|
-
*/
|
|
1585
|
-
readCredential(request: Empty, callback: (error: ServiceError | null, response: ReadCredentialResponse) => void): ClientUnaryCall;
|
|
1586
|
-
readCredential(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: ReadCredentialResponse) => void): ClientUnaryCall;
|
|
1587
|
-
readCredential(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ReadCredentialResponse) => void): ClientUnaryCall;
|
|
1588
1556
|
/**
|
|
1589
1557
|
* Session lifecycle. Never fails on a refused source tf — a refused tf
|
|
1590
1558
|
* opens the session source-refused (`BundleState.source_refused`) with
|
|
@@ -1646,8 +1614,9 @@ interface LaceEngineClient extends Client {
|
|
|
1646
1614
|
* Reads the output → input pairs the engine's matcher scores between the
|
|
1647
1615
|
* instances of one module of a session's working IR: the pairs an
|
|
1648
1616
|
* `auto_connect` chooses among, with the scores it chooses by. The
|
|
1649
|
-
* matching rules have this one home; a client
|
|
1650
|
-
*
|
|
1617
|
+
* matching rules have this one home; a client lists these pairs, best
|
|
1618
|
+
* first, for a connect whose pins it does not settle, and sends the pair
|
|
1619
|
+
* it is given as a `connect`.
|
|
1651
1620
|
*/
|
|
1652
1621
|
readWiringCandidates(request: ReadWiringCandidatesRequest, callback: (error: ServiceError | null, response: ReadWiringCandidatesResponse) => void): ClientUnaryCall;
|
|
1653
1622
|
readWiringCandidates(request: ReadWiringCandidatesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ReadWiringCandidatesResponse) => void): ClientUnaryCall;
|
|
@@ -1672,7 +1641,7 @@ interface LaceEngineClient extends Client {
|
|
|
1672
1641
|
*
|
|
1673
1642
|
* Consumers (portal + extension canvas engines) project locally via
|
|
1674
1643
|
* `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
|
|
1675
|
-
* `arrangement` (node positions, group collapse
|
|
1644
|
+
* `arrangement` (node positions, group collapse) is consumer-owned
|
|
1676
1645
|
* view state — it never travels over this RPC.
|
|
1677
1646
|
*/
|
|
1678
1647
|
subscribe(request: SubscribeRequest, options?: Partial<CallOptions>): ClientReadableStream<BundleStateEvent>;
|
|
@@ -1739,7 +1708,6 @@ declare class LaceTransport {
|
|
|
1739
1708
|
private unary;
|
|
1740
1709
|
initialize(clientVersion: string): Promise<EngineInitialize>;
|
|
1741
1710
|
shutdown(): Promise<void>;
|
|
1742
|
-
readCredential(): Promise<EngineCredential>;
|
|
1743
1711
|
subscribeStream(sessionId: string): grpc.ClientReadableStream<BundleStateEvent>;
|
|
1744
1712
|
dispose(): void;
|
|
1745
1713
|
}
|
|
@@ -1787,4 +1755,4 @@ declare class ServerManager extends EventEmitter {
|
|
|
1787
1755
|
private maybeRestart;
|
|
1788
1756
|
}
|
|
1789
1757
|
|
|
1790
|
-
export { Action, ApplyActionRequest, BundleApplyResult, BundleState, BundleStateEvent, type
|
|
1758
|
+
export { Action, ApplyActionRequest, BundleApplyResult, BundleState, BundleStateEvent, type EngineHandshake, type EngineInitialize, type EngineTransport, InitializeResponse, InvokeRequest, LaceTransport, ReadWiringCandidatesRequest, ReadWiringCandidatesResponse, ReasonDetail, RpcError, type RpcErrorCategory, ServerManager, type ServerState, SessionCloseResponse, SessionOpenResponse, Status, classifyRpcError, endEngine, requireClient, serveEngineBridge, spawnEngine };
|