@demicodes/host-local 0.17.3 → 0.17.4
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 +14 -1
- package/dist/index.mjs +2 -2
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -50,6 +50,8 @@ interface LocalHostOptions {
|
|
|
50
50
|
storeRoot?: string;
|
|
51
51
|
/** Where command artifacts land as plain files; defaults next to the store. */
|
|
52
52
|
commandArtifactsDir?: string;
|
|
53
|
+
/** Bring-your-own persistence, e.g. to wrap or gate writes; defaults to a LocalHostStore rooted at storeRoot. */
|
|
54
|
+
store?: HostStore;
|
|
53
55
|
}
|
|
54
56
|
declare class LocalHost implements Host {
|
|
55
57
|
readonly defaultCwd: string;
|
|
@@ -60,6 +62,17 @@ declare class LocalHost implements Host {
|
|
|
60
62
|
constructor(defaultCwd: string, options?: LocalHostOptions);
|
|
61
63
|
}
|
|
62
64
|
//#endregion
|
|
65
|
+
//#region src/local-store.d.ts
|
|
66
|
+
declare class LocalHostStore implements HostStore {
|
|
67
|
+
readonly root: string;
|
|
68
|
+
constructor(root: string);
|
|
69
|
+
readJson<T>(key: string): Promise<T | null>;
|
|
70
|
+
writeJson<T>(key: string, value: T): Promise<void>;
|
|
71
|
+
delete(key: string): Promise<void>;
|
|
72
|
+
list(prefix: string): Promise<string[]>;
|
|
73
|
+
private pathForKey;
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
63
76
|
//#region src/local-agent-server.d.ts
|
|
64
77
|
interface CreateLocalAgentServerOptions {
|
|
65
78
|
/** Same LocalHost instance the harness was built with. */
|
|
@@ -106,4 +119,4 @@ interface LocalAgentServerHandle {
|
|
|
106
119
|
*/
|
|
107
120
|
declare function createLocalAgentServer(options: CreateLocalAgentServerOptions): LocalAgentServerHandle;
|
|
108
121
|
//#endregion
|
|
109
|
-
export { COMMAND_BRIDGE_SHIM_SOURCE, CommandBridgeHandle, CommandBridgeOptions, CreateLocalAgentServerOptions, LocalAgentServerHandle, LocalHost, LocalHostOptions, MaterializeCommandBridgeShimsOptions, bridgeBinDirFor, createLocalAgentServer, defaultBridgeSocketPath, materializeCommandBridgeShims, resolveDemiHome, startCommandBridge };
|
|
122
|
+
export { COMMAND_BRIDGE_SHIM_SOURCE, CommandBridgeHandle, CommandBridgeOptions, CreateLocalAgentServerOptions, LocalAgentServerHandle, LocalHost, LocalHostOptions, LocalHostStore, MaterializeCommandBridgeShimsOptions, bridgeBinDirFor, createLocalAgentServer, defaultBridgeSocketPath, materializeCommandBridgeShims, resolveDemiHome, startCommandBridge };
|
package/dist/index.mjs
CHANGED
|
@@ -350,7 +350,7 @@ var LocalHost = class {
|
|
|
350
350
|
this.commandArtifactsDir = resolve(options.commandArtifactsDir ?? join(storeRoot, "command-artifacts"));
|
|
351
351
|
this.fs = new LocalHostFileSystem(this.defaultCwd);
|
|
352
352
|
this.process = new LocalHostProcess(this.defaultCwd);
|
|
353
|
-
this.store = new LocalHostStore(storeRoot);
|
|
353
|
+
this.store = options.store ?? new LocalHostStore(storeRoot);
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
356
|
var LocalHostProcess = class {
|
|
@@ -657,4 +657,4 @@ function createLocalAgentServer(options) {
|
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
659
|
//#endregion
|
|
660
|
-
export { COMMAND_BRIDGE_SHIM_SOURCE, LocalHost, bridgeBinDirFor, createLocalAgentServer, defaultBridgeSocketPath, materializeCommandBridgeShims, resolveDemiHome, startCommandBridge };
|
|
660
|
+
export { COMMAND_BRIDGE_SHIM_SOURCE, LocalHost, LocalHostStore, bridgeBinDirFor, createLocalAgentServer, defaultBridgeSocketPath, materializeCommandBridgeShims, resolveDemiHome, startCommandBridge };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@demicodes/host-local",
|
|
3
3
|
"description": "Node LocalHost and open-box local AgentServer assembly (command bridge on by default).",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.4",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@demicodes/agent": "^0.17.
|
|
15
|
-
"@demicodes/provider": "^0.17.
|
|
16
|
-
"@demicodes/shell": "^0.17.
|
|
17
|
-
"@demicodes/utils": "^0.17.
|
|
14
|
+
"@demicodes/agent": "^0.17.4",
|
|
15
|
+
"@demicodes/provider": "^0.17.4",
|
|
16
|
+
"@demicodes/shell": "^0.17.4",
|
|
17
|
+
"@demicodes/utils": "^0.17.4"
|
|
18
18
|
},
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"main": "./dist/index.mjs",
|