@lace-cloud/host 0.20.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 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +35 -67
- package/dist/index.d.ts +35 -67
- package/dist/index.mjs +39 -114
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3955,74 +3955,6 @@ var ShutdownResponse = {
|
|
|
3955
3955
|
return message;
|
|
3956
3956
|
}
|
|
3957
3957
|
};
|
|
3958
|
-
function createBaseReadCredentialResponse() {
|
|
3959
|
-
return { api_key: void 0, api_base_url: "" };
|
|
3960
|
-
}
|
|
3961
|
-
var ReadCredentialResponse = {
|
|
3962
|
-
encode(message, writer = new BinaryWriter4()) {
|
|
3963
|
-
if (message.api_key !== void 0) {
|
|
3964
|
-
writer.uint32(10).string(message.api_key);
|
|
3965
|
-
}
|
|
3966
|
-
if (message.api_base_url !== "") {
|
|
3967
|
-
writer.uint32(18).string(message.api_base_url);
|
|
3968
|
-
}
|
|
3969
|
-
return writer;
|
|
3970
|
-
},
|
|
3971
|
-
decode(input, length) {
|
|
3972
|
-
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
3973
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3974
|
-
const message = createBaseReadCredentialResponse();
|
|
3975
|
-
while (reader.pos < end) {
|
|
3976
|
-
const tag = reader.uint32();
|
|
3977
|
-
switch (tag >>> 3) {
|
|
3978
|
-
case 1: {
|
|
3979
|
-
if (tag !== 10) {
|
|
3980
|
-
break;
|
|
3981
|
-
}
|
|
3982
|
-
message.api_key = reader.string();
|
|
3983
|
-
continue;
|
|
3984
|
-
}
|
|
3985
|
-
case 2: {
|
|
3986
|
-
if (tag !== 18) {
|
|
3987
|
-
break;
|
|
3988
|
-
}
|
|
3989
|
-
message.api_base_url = reader.string();
|
|
3990
|
-
continue;
|
|
3991
|
-
}
|
|
3992
|
-
}
|
|
3993
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3994
|
-
break;
|
|
3995
|
-
}
|
|
3996
|
-
reader.skip(tag & 7);
|
|
3997
|
-
}
|
|
3998
|
-
return message;
|
|
3999
|
-
},
|
|
4000
|
-
fromJSON(object) {
|
|
4001
|
-
return {
|
|
4002
|
-
api_key: isSet3(object.apiKey) ? globalThis.String(object.apiKey) : isSet3(object.api_key) ? globalThis.String(object.api_key) : void 0,
|
|
4003
|
-
api_base_url: isSet3(object.apiBaseUrl) ? globalThis.String(object.apiBaseUrl) : isSet3(object.api_base_url) ? globalThis.String(object.api_base_url) : ""
|
|
4004
|
-
};
|
|
4005
|
-
},
|
|
4006
|
-
toJSON(message) {
|
|
4007
|
-
const obj = {};
|
|
4008
|
-
if (message.api_key !== void 0) {
|
|
4009
|
-
obj.apiKey = message.api_key;
|
|
4010
|
-
}
|
|
4011
|
-
if (message.api_base_url !== "") {
|
|
4012
|
-
obj.apiBaseUrl = message.api_base_url;
|
|
4013
|
-
}
|
|
4014
|
-
return obj;
|
|
4015
|
-
},
|
|
4016
|
-
create(base) {
|
|
4017
|
-
return ReadCredentialResponse.fromPartial(base ?? {});
|
|
4018
|
-
},
|
|
4019
|
-
fromPartial(object) {
|
|
4020
|
-
const message = createBaseReadCredentialResponse();
|
|
4021
|
-
message.api_key = object.api_key ?? void 0;
|
|
4022
|
-
message.api_base_url = object.api_base_url ?? "";
|
|
4023
|
-
return message;
|
|
4024
|
-
}
|
|
4025
|
-
};
|
|
4026
3958
|
function createBaseSessionOpenRequest() {
|
|
4027
3959
|
return { ephemeral: void 0, root: void 0, workspace_name: "" };
|
|
4028
3960
|
}
|
|
@@ -7456,7 +7388,7 @@ var WiringCandidate = {
|
|
|
7456
7388
|
}
|
|
7457
7389
|
};
|
|
7458
7390
|
function createBaseReadWiringCandidatesRequest() {
|
|
7459
|
-
return { session_id: "", scope: "", source_instance: void 0, target_instance: void 0 };
|
|
7391
|
+
return { session_id: "", scope: "", source_instance: void 0, target_instance: void 0, source_scope: "" };
|
|
7460
7392
|
}
|
|
7461
7393
|
var ReadWiringCandidatesRequest = {
|
|
7462
7394
|
encode(message, writer = new BinaryWriter4()) {
|
|
@@ -7472,6 +7404,9 @@ var ReadWiringCandidatesRequest = {
|
|
|
7472
7404
|
if (message.target_instance !== void 0) {
|
|
7473
7405
|
writer.uint32(34).string(message.target_instance);
|
|
7474
7406
|
}
|
|
7407
|
+
if (message.source_scope !== "") {
|
|
7408
|
+
writer.uint32(42).string(message.source_scope);
|
|
7409
|
+
}
|
|
7475
7410
|
return writer;
|
|
7476
7411
|
},
|
|
7477
7412
|
decode(input, length) {
|
|
@@ -7509,6 +7444,13 @@ var ReadWiringCandidatesRequest = {
|
|
|
7509
7444
|
message.target_instance = reader.string();
|
|
7510
7445
|
continue;
|
|
7511
7446
|
}
|
|
7447
|
+
case 5: {
|
|
7448
|
+
if (tag !== 42) {
|
|
7449
|
+
break;
|
|
7450
|
+
}
|
|
7451
|
+
message.source_scope = reader.string();
|
|
7452
|
+
continue;
|
|
7453
|
+
}
|
|
7512
7454
|
}
|
|
7513
7455
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7514
7456
|
break;
|
|
@@ -7522,7 +7464,8 @@ var ReadWiringCandidatesRequest = {
|
|
|
7522
7464
|
session_id: isSet3(object.sessionId) ? globalThis.String(object.sessionId) : isSet3(object.session_id) ? globalThis.String(object.session_id) : "",
|
|
7523
7465
|
scope: isSet3(object.scope) ? globalThis.String(object.scope) : "",
|
|
7524
7466
|
source_instance: isSet3(object.sourceInstance) ? globalThis.String(object.sourceInstance) : isSet3(object.source_instance) ? globalThis.String(object.source_instance) : void 0,
|
|
7525
|
-
target_instance: isSet3(object.targetInstance) ? globalThis.String(object.targetInstance) : isSet3(object.target_instance) ? globalThis.String(object.target_instance) : void 0
|
|
7467
|
+
target_instance: isSet3(object.targetInstance) ? globalThis.String(object.targetInstance) : isSet3(object.target_instance) ? globalThis.String(object.target_instance) : void 0,
|
|
7468
|
+
source_scope: isSet3(object.sourceScope) ? globalThis.String(object.sourceScope) : isSet3(object.source_scope) ? globalThis.String(object.source_scope) : ""
|
|
7526
7469
|
};
|
|
7527
7470
|
},
|
|
7528
7471
|
toJSON(message) {
|
|
@@ -7539,6 +7482,9 @@ var ReadWiringCandidatesRequest = {
|
|
|
7539
7482
|
if (message.target_instance !== void 0) {
|
|
7540
7483
|
obj.targetInstance = message.target_instance;
|
|
7541
7484
|
}
|
|
7485
|
+
if (message.source_scope !== "") {
|
|
7486
|
+
obj.sourceScope = message.source_scope;
|
|
7487
|
+
}
|
|
7542
7488
|
return obj;
|
|
7543
7489
|
},
|
|
7544
7490
|
create(base) {
|
|
@@ -7550,6 +7496,7 @@ var ReadWiringCandidatesRequest = {
|
|
|
7550
7496
|
message.scope = object.scope ?? "";
|
|
7551
7497
|
message.source_instance = object.source_instance ?? void 0;
|
|
7552
7498
|
message.target_instance = object.target_instance ?? void 0;
|
|
7499
|
+
message.source_scope = object.source_scope ?? "";
|
|
7553
7500
|
return message;
|
|
7554
7501
|
}
|
|
7555
7502
|
};
|
|
@@ -8572,7 +8519,8 @@ function createBaseBundleState() {
|
|
|
8572
8519
|
ungenerated: false,
|
|
8573
8520
|
source_refused: false,
|
|
8574
8521
|
tree_hash: "",
|
|
8575
|
-
revision: 0
|
|
8522
|
+
revision: 0,
|
|
8523
|
+
generating: false
|
|
8576
8524
|
};
|
|
8577
8525
|
}
|
|
8578
8526
|
var BundleState = {
|
|
@@ -8607,6 +8555,9 @@ var BundleState = {
|
|
|
8607
8555
|
if (message.revision !== 0) {
|
|
8608
8556
|
writer.uint32(88).uint64(message.revision);
|
|
8609
8557
|
}
|
|
8558
|
+
if (message.generating !== false) {
|
|
8559
|
+
writer.uint32(96).bool(message.generating);
|
|
8560
|
+
}
|
|
8610
8561
|
return writer;
|
|
8611
8562
|
},
|
|
8612
8563
|
decode(input, length) {
|
|
@@ -8686,6 +8637,13 @@ var BundleState = {
|
|
|
8686
8637
|
message.revision = longToNumber(reader.uint64());
|
|
8687
8638
|
continue;
|
|
8688
8639
|
}
|
|
8640
|
+
case 12: {
|
|
8641
|
+
if (tag !== 96) {
|
|
8642
|
+
break;
|
|
8643
|
+
}
|
|
8644
|
+
message.generating = reader.bool();
|
|
8645
|
+
continue;
|
|
8646
|
+
}
|
|
8689
8647
|
}
|
|
8690
8648
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8691
8649
|
break;
|
|
@@ -8705,7 +8663,8 @@ var BundleState = {
|
|
|
8705
8663
|
ungenerated: isSet3(object.ungenerated) ? globalThis.Boolean(object.ungenerated) : false,
|
|
8706
8664
|
source_refused: isSet3(object.sourceRefused) ? globalThis.Boolean(object.sourceRefused) : isSet3(object.source_refused) ? globalThis.Boolean(object.source_refused) : false,
|
|
8707
8665
|
tree_hash: isSet3(object.treeHash) ? globalThis.String(object.treeHash) : isSet3(object.tree_hash) ? globalThis.String(object.tree_hash) : "",
|
|
8708
|
-
revision: isSet3(object.revision) ? globalThis.Number(object.revision) : 0
|
|
8666
|
+
revision: isSet3(object.revision) ? globalThis.Number(object.revision) : 0,
|
|
8667
|
+
generating: isSet3(object.generating) ? globalThis.Boolean(object.generating) : false
|
|
8709
8668
|
};
|
|
8710
8669
|
},
|
|
8711
8670
|
toJSON(message) {
|
|
@@ -8740,6 +8699,9 @@ var BundleState = {
|
|
|
8740
8699
|
if (message.revision !== 0) {
|
|
8741
8700
|
obj.revision = Math.round(message.revision);
|
|
8742
8701
|
}
|
|
8702
|
+
if (message.generating !== false) {
|
|
8703
|
+
obj.generating = message.generating;
|
|
8704
|
+
}
|
|
8743
8705
|
return obj;
|
|
8744
8706
|
},
|
|
8745
8707
|
create(base) {
|
|
@@ -8757,6 +8719,7 @@ var BundleState = {
|
|
|
8757
8719
|
message.source_refused = object.source_refused ?? false;
|
|
8758
8720
|
message.tree_hash = object.tree_hash ?? "";
|
|
8759
8721
|
message.revision = object.revision ?? 0;
|
|
8722
|
+
message.generating = object.generating ?? false;
|
|
8760
8723
|
return message;
|
|
8761
8724
|
}
|
|
8762
8725
|
};
|
|
@@ -9916,28 +9879,6 @@ var LaceEngineService = {
|
|
|
9916
9879
|
responseSerialize: (value) => Buffer.from(ShutdownResponse.encode(value).finish()),
|
|
9917
9880
|
responseDeserialize: (value) => ShutdownResponse.decode(value)
|
|
9918
9881
|
},
|
|
9919
|
-
/**
|
|
9920
|
-
* Answers the credential this engine holds: the API key `lace login`
|
|
9921
|
-
* saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
|
|
9922
|
-
* login` or `lace logout` takes effect at once (absent when signed out),
|
|
9923
|
-
* beside the base URL of the API that key is for, the one the engine's
|
|
9924
|
-
* own commands call (the CLI's `config.ResolveBaseURL`). The host
|
|
9925
|
-
* that spawned the engine builds its own authenticated transport to
|
|
9926
|
-
* Lace's API from the two, for the chat package, and never restates
|
|
9927
|
-
* which API; the engine knows nothing of what the host does with them. Served, like every RPC,
|
|
9928
|
-
* only to the bearer of the handshake's session token, and never
|
|
9929
|
-
* forwarded across the webview bridge (`BRIDGE_METHODS`,
|
|
9930
|
-
* @lace-cloud/proto's engine-bridge.ts).
|
|
9931
|
-
*/
|
|
9932
|
-
readCredential: {
|
|
9933
|
-
path: "/lace.engine.LaceEngine/ReadCredential",
|
|
9934
|
-
requestStream: false,
|
|
9935
|
-
responseStream: false,
|
|
9936
|
-
requestSerialize: (value) => Buffer.from(Empty.encode(value).finish()),
|
|
9937
|
-
requestDeserialize: (value) => Empty.decode(value),
|
|
9938
|
-
responseSerialize: (value) => Buffer.from(ReadCredentialResponse.encode(value).finish()),
|
|
9939
|
-
responseDeserialize: (value) => ReadCredentialResponse.decode(value)
|
|
9940
|
-
},
|
|
9941
9882
|
/**
|
|
9942
9883
|
* Session lifecycle. Never fails on a refused source tf — a refused tf
|
|
9943
9884
|
* opens the session source-refused (`BundleState.source_refused`) with
|
|
@@ -10041,8 +9982,9 @@ var LaceEngineService = {
|
|
|
10041
9982
|
* Reads the output → input pairs the engine's matcher scores between the
|
|
10042
9983
|
* instances of one module of a session's working IR: the pairs an
|
|
10043
9984
|
* `auto_connect` chooses among, with the scores it chooses by. The
|
|
10044
|
-
* matching rules have this one home; a client
|
|
10045
|
-
*
|
|
9985
|
+
* matching rules have this one home; a client lists these pairs, best
|
|
9986
|
+
* first, for a connect whose pins it does not settle, and sends the pair
|
|
9987
|
+
* it is given as a `connect`.
|
|
10046
9988
|
*/
|
|
10047
9989
|
readWiringCandidates: {
|
|
10048
9990
|
path: "/lace.engine.LaceEngine/ReadWiringCandidates",
|
|
@@ -10086,7 +10028,7 @@ var LaceEngineService = {
|
|
|
10086
10028
|
*
|
|
10087
10029
|
* Consumers (portal + extension canvas engines) project locally via
|
|
10088
10030
|
* `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
|
|
10089
|
-
* `arrangement` (node positions, group collapse
|
|
10031
|
+
* `arrangement` (node positions, group collapse) is consumer-owned
|
|
10090
10032
|
* view state — it never travels over this RPC.
|
|
10091
10033
|
*/
|
|
10092
10034
|
subscribe: {
|
|
@@ -10647,23 +10589,6 @@ var LaceTransport = class {
|
|
|
10647
10589
|
{}
|
|
10648
10590
|
);
|
|
10649
10591
|
}
|
|
10650
|
-
// ── The host's own one-off calls ──
|
|
10651
|
-
// The credential the engine holds: the API key `lace login` saved or
|
|
10652
|
-
// `LACE_TOKEN` supplies, which the engine loads fresh on every call — so a
|
|
10653
|
-
// host that reads it per request sees a `lace login` or `lace logout` at
|
|
10654
|
-
// once — absent when the developer is signed out, and passed on as the
|
|
10655
|
-
// answer states it, beside the base URL of the API the key is for, the
|
|
10656
|
-
// one the engine's own commands call: a host builds its transport from
|
|
10657
|
-
// the two and never restates which API. Every failure is the call's
|
|
10658
|
-
// own: an engine that cannot serve the call speaks
|
|
10659
|
-
// an older protocol, and `ServerManager` refused it at the handshake
|
|
10660
|
-
// (`checkEngineProtocol`) before any RPC was sent. A host call, never a
|
|
10661
|
-
// bridge row: `ReadCredential` is outside `BRIDGE_METHODS`
|
|
10662
|
-
// (@lace-cloud/proto), so a webview can never ask for it.
|
|
10663
|
-
async readCredential() {
|
|
10664
|
-
const res = await this.unary(this.inner.readCredential.bind(this.inner), {});
|
|
10665
|
-
return { apiKey: res.api_key, apiBaseUrl: res.api_base_url };
|
|
10666
|
-
}
|
|
10667
10592
|
// ── Subscribe stream ──
|
|
10668
10593
|
subscribeStream(sessionId) {
|
|
10669
10594
|
return this.inner.subscribe({ session_id: sessionId }, this.metadata());
|