@lace-cloud/host 0.19.0 → 0.21.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.cjs +39 -113
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +35 -63
- package/dist/index.d.ts +35 -63
- package/dist/index.mjs +39 -113
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4001,74 +4001,6 @@ var ShutdownResponse = {
|
|
|
4001
4001
|
return message;
|
|
4002
4002
|
}
|
|
4003
4003
|
};
|
|
4004
|
-
function createBaseReadCredentialResponse() {
|
|
4005
|
-
return { api_key: "", api_base_url: "" };
|
|
4006
|
-
}
|
|
4007
|
-
var ReadCredentialResponse = {
|
|
4008
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
4009
|
-
if (message.api_key !== "") {
|
|
4010
|
-
writer.uint32(10).string(message.api_key);
|
|
4011
|
-
}
|
|
4012
|
-
if (message.api_base_url !== "") {
|
|
4013
|
-
writer.uint32(18).string(message.api_base_url);
|
|
4014
|
-
}
|
|
4015
|
-
return writer;
|
|
4016
|
-
},
|
|
4017
|
-
decode(input, length) {
|
|
4018
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
4019
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
4020
|
-
const message = createBaseReadCredentialResponse();
|
|
4021
|
-
while (reader.pos < end) {
|
|
4022
|
-
const tag = reader.uint32();
|
|
4023
|
-
switch (tag >>> 3) {
|
|
4024
|
-
case 1: {
|
|
4025
|
-
if (tag !== 10) {
|
|
4026
|
-
break;
|
|
4027
|
-
}
|
|
4028
|
-
message.api_key = reader.string();
|
|
4029
|
-
continue;
|
|
4030
|
-
}
|
|
4031
|
-
case 2: {
|
|
4032
|
-
if (tag !== 18) {
|
|
4033
|
-
break;
|
|
4034
|
-
}
|
|
4035
|
-
message.api_base_url = reader.string();
|
|
4036
|
-
continue;
|
|
4037
|
-
}
|
|
4038
|
-
}
|
|
4039
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
4040
|
-
break;
|
|
4041
|
-
}
|
|
4042
|
-
reader.skip(tag & 7);
|
|
4043
|
-
}
|
|
4044
|
-
return message;
|
|
4045
|
-
},
|
|
4046
|
-
fromJSON(object) {
|
|
4047
|
-
return {
|
|
4048
|
-
api_key: isSet3(object.apiKey) ? globalThis.String(object.apiKey) : isSet3(object.api_key) ? globalThis.String(object.api_key) : "",
|
|
4049
|
-
api_base_url: isSet3(object.apiBaseUrl) ? globalThis.String(object.apiBaseUrl) : isSet3(object.api_base_url) ? globalThis.String(object.api_base_url) : ""
|
|
4050
|
-
};
|
|
4051
|
-
},
|
|
4052
|
-
toJSON(message) {
|
|
4053
|
-
const obj = {};
|
|
4054
|
-
if (message.api_key !== "") {
|
|
4055
|
-
obj.apiKey = message.api_key;
|
|
4056
|
-
}
|
|
4057
|
-
if (message.api_base_url !== "") {
|
|
4058
|
-
obj.apiBaseUrl = message.api_base_url;
|
|
4059
|
-
}
|
|
4060
|
-
return obj;
|
|
4061
|
-
},
|
|
4062
|
-
create(base) {
|
|
4063
|
-
return ReadCredentialResponse.fromPartial(base ?? {});
|
|
4064
|
-
},
|
|
4065
|
-
fromPartial(object) {
|
|
4066
|
-
const message = createBaseReadCredentialResponse();
|
|
4067
|
-
message.api_key = object.api_key ?? "";
|
|
4068
|
-
message.api_base_url = object.api_base_url ?? "";
|
|
4069
|
-
return message;
|
|
4070
|
-
}
|
|
4071
|
-
};
|
|
4072
4004
|
function createBaseSessionOpenRequest() {
|
|
4073
4005
|
return { ephemeral: void 0, root: void 0, workspace_name: "" };
|
|
4074
4006
|
}
|
|
@@ -7502,7 +7434,7 @@ var WiringCandidate = {
|
|
|
7502
7434
|
}
|
|
7503
7435
|
};
|
|
7504
7436
|
function createBaseReadWiringCandidatesRequest() {
|
|
7505
|
-
return { session_id: "", scope: "", source_instance: void 0, target_instance: void 0 };
|
|
7437
|
+
return { session_id: "", scope: "", source_instance: void 0, target_instance: void 0, source_scope: "" };
|
|
7506
7438
|
}
|
|
7507
7439
|
var ReadWiringCandidatesRequest = {
|
|
7508
7440
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -7518,6 +7450,9 @@ var ReadWiringCandidatesRequest = {
|
|
|
7518
7450
|
if (message.target_instance !== void 0) {
|
|
7519
7451
|
writer.uint32(34).string(message.target_instance);
|
|
7520
7452
|
}
|
|
7453
|
+
if (message.source_scope !== "") {
|
|
7454
|
+
writer.uint32(42).string(message.source_scope);
|
|
7455
|
+
}
|
|
7521
7456
|
return writer;
|
|
7522
7457
|
},
|
|
7523
7458
|
decode(input, length) {
|
|
@@ -7555,6 +7490,13 @@ var ReadWiringCandidatesRequest = {
|
|
|
7555
7490
|
message.target_instance = reader.string();
|
|
7556
7491
|
continue;
|
|
7557
7492
|
}
|
|
7493
|
+
case 5: {
|
|
7494
|
+
if (tag !== 42) {
|
|
7495
|
+
break;
|
|
7496
|
+
}
|
|
7497
|
+
message.source_scope = reader.string();
|
|
7498
|
+
continue;
|
|
7499
|
+
}
|
|
7558
7500
|
}
|
|
7559
7501
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7560
7502
|
break;
|
|
@@ -7568,7 +7510,8 @@ var ReadWiringCandidatesRequest = {
|
|
|
7568
7510
|
session_id: isSet3(object.sessionId) ? globalThis.String(object.sessionId) : isSet3(object.session_id) ? globalThis.String(object.session_id) : "",
|
|
7569
7511
|
scope: isSet3(object.scope) ? globalThis.String(object.scope) : "",
|
|
7570
7512
|
source_instance: isSet3(object.sourceInstance) ? globalThis.String(object.sourceInstance) : isSet3(object.source_instance) ? globalThis.String(object.source_instance) : void 0,
|
|
7571
|
-
target_instance: isSet3(object.targetInstance) ? globalThis.String(object.targetInstance) : isSet3(object.target_instance) ? globalThis.String(object.target_instance) : void 0
|
|
7513
|
+
target_instance: isSet3(object.targetInstance) ? globalThis.String(object.targetInstance) : isSet3(object.target_instance) ? globalThis.String(object.target_instance) : void 0,
|
|
7514
|
+
source_scope: isSet3(object.sourceScope) ? globalThis.String(object.sourceScope) : isSet3(object.source_scope) ? globalThis.String(object.source_scope) : ""
|
|
7572
7515
|
};
|
|
7573
7516
|
},
|
|
7574
7517
|
toJSON(message) {
|
|
@@ -7585,6 +7528,9 @@ var ReadWiringCandidatesRequest = {
|
|
|
7585
7528
|
if (message.target_instance !== void 0) {
|
|
7586
7529
|
obj.targetInstance = message.target_instance;
|
|
7587
7530
|
}
|
|
7531
|
+
if (message.source_scope !== "") {
|
|
7532
|
+
obj.sourceScope = message.source_scope;
|
|
7533
|
+
}
|
|
7588
7534
|
return obj;
|
|
7589
7535
|
},
|
|
7590
7536
|
create(base) {
|
|
@@ -7596,6 +7542,7 @@ var ReadWiringCandidatesRequest = {
|
|
|
7596
7542
|
message.scope = object.scope ?? "";
|
|
7597
7543
|
message.source_instance = object.source_instance ?? void 0;
|
|
7598
7544
|
message.target_instance = object.target_instance ?? void 0;
|
|
7545
|
+
message.source_scope = object.source_scope ?? "";
|
|
7599
7546
|
return message;
|
|
7600
7547
|
}
|
|
7601
7548
|
};
|
|
@@ -8618,7 +8565,8 @@ function createBaseBundleState() {
|
|
|
8618
8565
|
ungenerated: false,
|
|
8619
8566
|
source_refused: false,
|
|
8620
8567
|
tree_hash: "",
|
|
8621
|
-
revision: 0
|
|
8568
|
+
revision: 0,
|
|
8569
|
+
generating: false
|
|
8622
8570
|
};
|
|
8623
8571
|
}
|
|
8624
8572
|
var BundleState = {
|
|
@@ -8653,6 +8601,9 @@ var BundleState = {
|
|
|
8653
8601
|
if (message.revision !== 0) {
|
|
8654
8602
|
writer.uint32(88).uint64(message.revision);
|
|
8655
8603
|
}
|
|
8604
|
+
if (message.generating !== false) {
|
|
8605
|
+
writer.uint32(96).bool(message.generating);
|
|
8606
|
+
}
|
|
8656
8607
|
return writer;
|
|
8657
8608
|
},
|
|
8658
8609
|
decode(input, length) {
|
|
@@ -8732,6 +8683,13 @@ var BundleState = {
|
|
|
8732
8683
|
message.revision = longToNumber(reader.uint64());
|
|
8733
8684
|
continue;
|
|
8734
8685
|
}
|
|
8686
|
+
case 12: {
|
|
8687
|
+
if (tag !== 96) {
|
|
8688
|
+
break;
|
|
8689
|
+
}
|
|
8690
|
+
message.generating = reader.bool();
|
|
8691
|
+
continue;
|
|
8692
|
+
}
|
|
8735
8693
|
}
|
|
8736
8694
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8737
8695
|
break;
|
|
@@ -8751,7 +8709,8 @@ var BundleState = {
|
|
|
8751
8709
|
ungenerated: isSet3(object.ungenerated) ? globalThis.Boolean(object.ungenerated) : false,
|
|
8752
8710
|
source_refused: isSet3(object.sourceRefused) ? globalThis.Boolean(object.sourceRefused) : isSet3(object.source_refused) ? globalThis.Boolean(object.source_refused) : false,
|
|
8753
8711
|
tree_hash: isSet3(object.treeHash) ? globalThis.String(object.treeHash) : isSet3(object.tree_hash) ? globalThis.String(object.tree_hash) : "",
|
|
8754
|
-
revision: isSet3(object.revision) ? globalThis.Number(object.revision) : 0
|
|
8712
|
+
revision: isSet3(object.revision) ? globalThis.Number(object.revision) : 0,
|
|
8713
|
+
generating: isSet3(object.generating) ? globalThis.Boolean(object.generating) : false
|
|
8755
8714
|
};
|
|
8756
8715
|
},
|
|
8757
8716
|
toJSON(message) {
|
|
@@ -8786,6 +8745,9 @@ var BundleState = {
|
|
|
8786
8745
|
if (message.revision !== 0) {
|
|
8787
8746
|
obj.revision = Math.round(message.revision);
|
|
8788
8747
|
}
|
|
8748
|
+
if (message.generating !== false) {
|
|
8749
|
+
obj.generating = message.generating;
|
|
8750
|
+
}
|
|
8789
8751
|
return obj;
|
|
8790
8752
|
},
|
|
8791
8753
|
create(base) {
|
|
@@ -8803,6 +8765,7 @@ var BundleState = {
|
|
|
8803
8765
|
message.source_refused = object.source_refused ?? false;
|
|
8804
8766
|
message.tree_hash = object.tree_hash ?? "";
|
|
8805
8767
|
message.revision = object.revision ?? 0;
|
|
8768
|
+
message.generating = object.generating ?? false;
|
|
8806
8769
|
return message;
|
|
8807
8770
|
}
|
|
8808
8771
|
};
|
|
@@ -9962,28 +9925,6 @@ var LaceEngineService = {
|
|
|
9962
9925
|
responseSerialize: (value) => Buffer.from(ShutdownResponse.encode(value).finish()),
|
|
9963
9926
|
responseDeserialize: (value) => ShutdownResponse.decode(value)
|
|
9964
9927
|
},
|
|
9965
|
-
/**
|
|
9966
|
-
* Answers the credential this engine holds: the API key `lace login`
|
|
9967
|
-
* saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
|
|
9968
|
-
* login` or `lace logout` takes effect at once (empty when signed out),
|
|
9969
|
-
* beside the base URL of the API that key is for, the one the engine's
|
|
9970
|
-
* own commands call (the CLI's `config.ResolveBaseURL`). The host
|
|
9971
|
-
* that spawned the engine builds its own authenticated transport to
|
|
9972
|
-
* Lace's API from the two, for the chat package, and never restates
|
|
9973
|
-
* which API; the engine knows nothing of what the host does with them. Served, like every RPC,
|
|
9974
|
-
* only to the bearer of the handshake's session token, and never
|
|
9975
|
-
* forwarded across the webview bridge (`BRIDGE_METHODS`,
|
|
9976
|
-
* @lace-cloud/proto's engine-bridge.ts).
|
|
9977
|
-
*/
|
|
9978
|
-
readCredential: {
|
|
9979
|
-
path: "/lace.engine.LaceEngine/ReadCredential",
|
|
9980
|
-
requestStream: false,
|
|
9981
|
-
responseStream: false,
|
|
9982
|
-
requestSerialize: (value) => Buffer.from(Empty.encode(value).finish()),
|
|
9983
|
-
requestDeserialize: (value) => Empty.decode(value),
|
|
9984
|
-
responseSerialize: (value) => Buffer.from(ReadCredentialResponse.encode(value).finish()),
|
|
9985
|
-
responseDeserialize: (value) => ReadCredentialResponse.decode(value)
|
|
9986
|
-
},
|
|
9987
9928
|
/**
|
|
9988
9929
|
* Session lifecycle. Never fails on a refused source tf — a refused tf
|
|
9989
9930
|
* opens the session source-refused (`BundleState.source_refused`) with
|
|
@@ -10087,8 +10028,9 @@ var LaceEngineService = {
|
|
|
10087
10028
|
* Reads the output → input pairs the engine's matcher scores between the
|
|
10088
10029
|
* instances of one module of a session's working IR: the pairs an
|
|
10089
10030
|
* `auto_connect` chooses among, with the scores it chooses by. The
|
|
10090
|
-
* matching rules have this one home; a client
|
|
10091
|
-
*
|
|
10031
|
+
* matching rules have this one home; a client lists these pairs, best
|
|
10032
|
+
* first, for a connect whose pins it does not settle, and sends the pair
|
|
10033
|
+
* it is given as a `connect`.
|
|
10092
10034
|
*/
|
|
10093
10035
|
readWiringCandidates: {
|
|
10094
10036
|
path: "/lace.engine.LaceEngine/ReadWiringCandidates",
|
|
@@ -10132,7 +10074,7 @@ var LaceEngineService = {
|
|
|
10132
10074
|
*
|
|
10133
10075
|
* Consumers (portal + extension canvas engines) project locally via
|
|
10134
10076
|
* `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
|
|
10135
|
-
* `arrangement` (node positions, group collapse
|
|
10077
|
+
* `arrangement` (node positions, group collapse) is consumer-owned
|
|
10136
10078
|
* view state — it never travels over this RPC.
|
|
10137
10079
|
*/
|
|
10138
10080
|
subscribe: {
|
|
@@ -10693,22 +10635,6 @@ var LaceTransport = class {
|
|
|
10693
10635
|
{}
|
|
10694
10636
|
);
|
|
10695
10637
|
}
|
|
10696
|
-
// ── The host's own one-off calls ──
|
|
10697
|
-
// The credential the engine holds: the API key `lace login` saved or
|
|
10698
|
-
// `LACE_TOKEN` supplies, which the engine loads fresh on every call — so a
|
|
10699
|
-
// host that reads it per request sees a `lace login` or `lace logout` at
|
|
10700
|
-
// once — empty when the developer is signed out, beside the base URL of
|
|
10701
|
-
// the API the key is for, the one the engine's own commands call: a host
|
|
10702
|
-
// builds its transport from the two and never restates which API. Every
|
|
10703
|
-
// failure is the call's own: an engine that cannot serve the call speaks
|
|
10704
|
-
// an older protocol, and `ServerManager` refused it at the handshake
|
|
10705
|
-
// (`checkEngineProtocol`) before any RPC was sent. A host call, never a
|
|
10706
|
-
// bridge row: `ReadCredential` is outside `BRIDGE_METHODS`
|
|
10707
|
-
// (@lace-cloud/proto), so a webview can never ask for it.
|
|
10708
|
-
async readCredential() {
|
|
10709
|
-
const res = await this.unary(this.inner.readCredential.bind(this.inner), {});
|
|
10710
|
-
return { apiKey: res.api_key, apiBaseUrl: res.api_base_url };
|
|
10711
|
-
}
|
|
10712
10638
|
// ── Subscribe stream ──
|
|
10713
10639
|
subscribeStream(sessionId) {
|
|
10714
10640
|
return this.inner.subscribe({ session_id: sessionId }, this.metadata());
|