totemlayer 0.1.44 → 0.1.59
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/README.md +48 -11
- package/bin/agent-memory.mjs +244 -0
- package/bin/agent-profile.mjs +26 -4
- package/bin/agent-runner.mjs +43 -9
- package/bin/agent-setup.mjs +136 -50
- package/bin/automatic-runtime.mjs +26 -7
- package/bin/chat-prompt-limit.mjs +67 -0
- package/bin/codex-chat-bridge.mjs +36 -8
- package/bin/codex-chat-readiness.mjs +7 -0
- package/bin/codex-human-chat-bridge.mjs +209 -0
- package/bin/collaboration-listener.mjs +2 -1
- package/bin/connected-agent-service.mjs +4 -1
- package/bin/inbox-queue.mjs +2 -1
- package/bin/installation.mjs +92 -60
- package/bin/local-mcp.mjs +43 -4
- package/bin/mcp-config.d.mts +11 -0
- package/bin/mcp-config.mjs +56 -0
- package/bin/mcp-install.mjs +143 -12
- package/bin/mcp-listener.d.mts +22 -0
- package/bin/mcp-listener.mjs +4 -0
- package/bin/mcp-runtime.mjs +3 -1
- package/bin/mcp.mjs +331 -94
- package/bin/mission-agent-service.mjs +2 -1
- package/bin/mission-worker.mjs +13 -2
- package/bin/model-adapter.mjs +1 -4
- package/bin/network-contract.mjs +254 -0
- package/bin/network-runtime.mjs +160 -25
- package/bin/network.mjs +30 -5
- package/bin/platform-client.mjs +25 -3
- package/bin/provider-detection.mjs +1 -4
- package/bin/runtime-diagnostics.mjs +1 -0
- package/bin/sdk/index.d.ts +50 -6
- package/bin/sdk/index.js +1 -1
- package/bin/sdk/listener.d.ts +57 -0
- package/bin/sdk/listener.js +1 -0
- package/bin/sdk/types.d.ts +62 -0
- package/bin/startup-diagnostics.mjs +168 -0
- package/bin/totem.mjs +17 -3
- package/bin/worker-core/adapters.mjs +4 -4
- package/package.json +1 -1
- package/scripts/prepare.mjs +28 -8
|
@@ -127,8 +127,8 @@ export function createCommandAdapter(config) {
|
|
|
127
127
|
windowsHide: true,
|
|
128
128
|
stdio: ["pipe", "pipe", "pipe"],
|
|
129
129
|
});
|
|
130
|
-
} catch {
|
|
131
|
-
reject(new WorkerError("AGENT_START_FAILED"));
|
|
130
|
+
} catch (error) {
|
|
131
|
+
reject(Object.assign(new WorkerError("AGENT_START_FAILED"), { cause: error }));
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
const timeout = setTimeout(() => stop("RUN_TIMEOUT"), timeoutMs);
|
|
@@ -149,8 +149,8 @@ export function createCommandAdapter(config) {
|
|
|
149
149
|
child.stdin.on("error", () => {
|
|
150
150
|
/* A failed child can close stdin early. */
|
|
151
151
|
});
|
|
152
|
-
child.on("error", () => {
|
|
153
|
-
failure ??= new WorkerError("AGENT_START_FAILED");
|
|
152
|
+
child.on("error", (error) => {
|
|
153
|
+
failure ??= Object.assign(new WorkerError("AGENT_START_FAILED"), { cause: error });
|
|
154
154
|
});
|
|
155
155
|
child.on("close", (code) => {
|
|
156
156
|
clearTimeout(timeout);
|
package/package.json
CHANGED
package/scripts/prepare.mjs
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { access, readdir, readFile, writeFile } from "node:fs/promises";
|
|
2
2
|
import { transform } from "esbuild";
|
|
3
|
+
import { generateNetworkContract } from "../../../scripts/generate-network-contract.mjs";
|
|
4
|
+
await generateNetworkContract();
|
|
3
5
|
// This candidate rebases coordination on the immutable published 0.1.21 bundle.
|
|
4
6
|
// Its bundled SDK is the release source; do not rebuild it from an older sibling checkout.
|
|
5
7
|
for (const name of [
|
|
6
|
-
"totem.mjs",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
8
|
+
"totem.mjs",
|
|
9
|
+
"mission-worker.mjs",
|
|
10
|
+
"mission-coordination.mjs",
|
|
11
|
+
"sdk/index.js",
|
|
12
|
+
"sdk/index.d.ts",
|
|
13
|
+
"sdk/listener.js",
|
|
14
|
+
"sdk/listener.d.ts",
|
|
15
|
+
"sdk/types.d.ts",
|
|
16
|
+
"network-retry.mjs",
|
|
17
|
+
"runtime-diagnostics.mjs",
|
|
18
|
+
"codex-chat-bridge.mjs",
|
|
19
|
+
"codex-human-chat-bridge.mjs",
|
|
20
|
+
"chat-prompt-limit.mjs",
|
|
21
|
+
"worker-core/adapters.mjs",
|
|
22
|
+
"worker-core/errors.mjs",
|
|
23
|
+
])
|
|
24
|
+
await access(new URL(`../bin/${name}`, import.meta.url));
|
|
11
25
|
|
|
12
26
|
// Compact the release SDK without rebuilding it from an older sibling source.
|
|
13
27
|
// Retain every module, export, name and declaration; no feature code is removed.
|
|
@@ -16,9 +30,15 @@ for (const name of await readdir(sdk)) {
|
|
|
16
30
|
if (!name.endsWith(".js")) continue;
|
|
17
31
|
const path = new URL(name, sdk);
|
|
18
32
|
const result = await transform(await readFile(path, "utf8"), {
|
|
19
|
-
loader: "js",
|
|
20
|
-
|
|
21
|
-
|
|
33
|
+
loader: "js",
|
|
34
|
+
target: "es2022",
|
|
35
|
+
format: "esm",
|
|
36
|
+
minifyWhitespace: true,
|
|
37
|
+
minifyIdentifiers: false,
|
|
38
|
+
minifySyntax: false,
|
|
39
|
+
treeShaking: false,
|
|
40
|
+
keepNames: false,
|
|
41
|
+
legalComments: "eof",
|
|
22
42
|
});
|
|
23
43
|
await writeFile(path, result.code);
|
|
24
44
|
}
|