@lace-cloud/host 0.0.1-bootstrap.0 → 0.6.4-next.25705814731
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/LICENSE +19 -0
- package/README.md +56 -8
- package/dist/index.cjs +13899 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +863 -0
- package/dist/index.d.ts +863 -0
- package/dist/index.mjs +13865 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +34 -8
- package/index.js +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Proprietary — Lace Cloud Inc.
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lace Cloud Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This source code and its compiled artifacts are proprietary to Lace
|
|
6
|
+
Cloud Inc. Use is permitted only as part of authorized Lace Cloud
|
|
7
|
+
products and services, under separate terms.
|
|
8
|
+
|
|
9
|
+
The following are NOT permitted without prior written permission
|
|
10
|
+
from Lace Cloud Inc.:
|
|
11
|
+
|
|
12
|
+
- Redistribution of source code or binaries
|
|
13
|
+
- Modification or derivative works
|
|
14
|
+
- Reverse-engineering beyond the legal minimum
|
|
15
|
+
- Hosting, embedding, or resale as a service
|
|
16
|
+
|
|
17
|
+
No warranties are made; use is at your own risk.
|
|
18
|
+
|
|
19
|
+
Subject to legal review.
|
package/README.md
CHANGED
|
@@ -1,11 +1,59 @@
|
|
|
1
|
-
# @lace-cloud/host
|
|
1
|
+
# @lace-cloud/host
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Vscode-free host library for talking to a `lace engine` process from
|
|
4
|
+
Node.js. Provides the gRPC-JS transport, server lifecycle, handshake
|
|
5
|
+
parser, RPC error classifier, and the Subscribe stream handler.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
Consumed by the VS Code extension shell, `@lace-cloud/chat-core` (for
|
|
8
|
+
the proactivity watcher's Subscribe subscription), and any future
|
|
9
|
+
host adapter (portal BFF, JetBrains plugin host).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @lace-cloud/host
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {
|
|
21
|
+
ServerManager,
|
|
22
|
+
LaceTransport,
|
|
23
|
+
SubscribeHandler,
|
|
24
|
+
classifyRpcError,
|
|
25
|
+
RpcError,
|
|
26
|
+
requireClient,
|
|
27
|
+
} from '@lace-cloud/host';
|
|
28
|
+
|
|
29
|
+
// Spawn lace engine + manage its lifecycle.
|
|
30
|
+
const server = new ServerManager({
|
|
31
|
+
log: (msg) => console.log(msg),
|
|
32
|
+
getBinaryPath: () => '/usr/local/bin/lace',
|
|
33
|
+
getAutoRestart: () => true,
|
|
34
|
+
});
|
|
35
|
+
server.on('state', (state) => console.log(`engine: ${state}`));
|
|
36
|
+
await server.start();
|
|
37
|
+
|
|
38
|
+
// LaceTransport is constructed by ServerManager once the handshake
|
|
39
|
+
// completes. Read it via server.transport.
|
|
40
|
+
const transport = requireClient(server.transport, 'sessionOpen');
|
|
41
|
+
const view = await transport.sessionOpen({ path: '/some/.lace' });
|
|
42
|
+
|
|
43
|
+
// Subscribe stream handler — bridges gRPC stream events to a
|
|
44
|
+
// callback shape (StateUpdated / GenerateProgress / Success / Error).
|
|
45
|
+
const sub = new SubscribeHandler(transport, {
|
|
46
|
+
onStateUpdated: (state) => { /* … */ },
|
|
47
|
+
});
|
|
48
|
+
sub.start();
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Vscode-free contract
|
|
52
|
+
|
|
53
|
+
This package never imports `vscode`. The VS Code-coupled host
|
|
54
|
+
primitives (panel classes, webview-html builder, RPC-error toast) live
|
|
55
|
+
in [`vs-code-extension/src/vscode/`](https://github.com/lace-cloud/vs-code-extension/tree/main/src/vscode).
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
Proprietary — see [LICENSE](https://github.com/lace-cloud/lace/blob/main/LICENSE).
|