totemlayer 0.1.24 → 0.1.29
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 +40 -32
- package/bin/agent-runner.mjs +1 -0
- package/bin/agent-setup.mjs +12 -3
- package/bin/automatic-runtime.mjs +63 -5
- package/bin/connected-agent-service.mjs +5 -1
- package/bin/device-login.mjs +8 -1
- package/bin/installation.mjs +50 -6
- package/bin/mcp.mjs +236 -45
- package/bin/network-runtime.mjs +19 -6
- package/bin/sdk/action-types.js +0 -1
- package/bin/sdk/actions.js +1 -84
- package/bin/sdk/errors.js +1 -67
- package/bin/sdk/index.d.ts +36 -1
- package/bin/sdk/index.js +1 -431
- package/bin/sdk/inspector.js +1 -323
- package/bin/sdk/request-options.js +1 -36
- package/bin/sdk/transport.js +1 -202
- package/bin/sdk/types.d.ts +58 -1
- package/bin/sdk/types.js +0 -1
- package/bin/totem.mjs +2 -2
- package/package.json +1 -1
- package/scripts/prepare.mjs +16 -1
package/bin/sdk/types.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export interface Erc8004DiscoveryLinks {
|
|
|
9
9
|
grantsActionAuthority: false;
|
|
10
10
|
}
|
|
11
11
|
export interface Agent {
|
|
12
|
+
actionMode?: "ask_me" | "full_access";
|
|
13
|
+
actionModeVersion?: number;
|
|
14
|
+
/** Authenticated connection-only listener marker; not an authority claim from a peer. */
|
|
15
|
+
listenerConnectionId?: string;
|
|
12
16
|
id: string;
|
|
13
17
|
address: string;
|
|
14
18
|
name: string;
|
|
@@ -63,6 +67,7 @@ export interface Message {
|
|
|
63
67
|
verified: boolean;
|
|
64
68
|
sandbox: boolean;
|
|
65
69
|
content: MessageContent;
|
|
70
|
+
actionRequest?: NetworkActionRequest | null;
|
|
66
71
|
attachments?: Attachment[];
|
|
67
72
|
conversationId: string;
|
|
68
73
|
taskId: string | null;
|
|
@@ -83,6 +88,38 @@ export interface Message {
|
|
|
83
88
|
verified: false;
|
|
84
89
|
} | null;
|
|
85
90
|
}
|
|
91
|
+
export interface NetworkProtectedAction {
|
|
92
|
+
name: string;
|
|
93
|
+
resource: string;
|
|
94
|
+
parameters?: Record<string, JsonValue>;
|
|
95
|
+
}
|
|
96
|
+
export interface NetworkActionRequest {
|
|
97
|
+
id: string;
|
|
98
|
+
messageId: string;
|
|
99
|
+
connectionId: string;
|
|
100
|
+
action: NetworkProtectedAction;
|
|
101
|
+
description: string;
|
|
102
|
+
digest: string;
|
|
103
|
+
state: "pending" | "approved" | "denied" | "canceled" | "expired" | "dispatched" | "succeeded" | "failed" | "uncertain";
|
|
104
|
+
expiresAt: string;
|
|
105
|
+
decidedAt: string | null;
|
|
106
|
+
dispatchedAt: string | null;
|
|
107
|
+
completedAt: string | null;
|
|
108
|
+
executionId: string | null;
|
|
109
|
+
resultSummary: string | null;
|
|
110
|
+
outcomeSource: "executor_report" | null;
|
|
111
|
+
approvalSource?: "human" | "full_access" | null;
|
|
112
|
+
/** True only in the single successful dispatch response; GET never authorizes execution. */
|
|
113
|
+
executionAuthorized: boolean;
|
|
114
|
+
}
|
|
115
|
+
export interface NetworkActionInput {
|
|
116
|
+
to: string;
|
|
117
|
+
action: NetworkProtectedAction;
|
|
118
|
+
description: string;
|
|
119
|
+
conversationId?: string;
|
|
120
|
+
taskId?: string;
|
|
121
|
+
ttlSeconds?: number;
|
|
122
|
+
}
|
|
86
123
|
export interface Conversation {
|
|
87
124
|
id: string;
|
|
88
125
|
participants: Array<{
|
|
@@ -93,13 +130,15 @@ export interface Conversation {
|
|
|
93
130
|
createdAt: string;
|
|
94
131
|
metadata: Metadata | null;
|
|
95
132
|
}
|
|
96
|
-
export type TaskState = "submitted" | "working" | "input_required" | "completed" | "failed" | "canceled" | "rejected";
|
|
133
|
+
export type TaskState = "submitted" | "working" | "input_required" | "auth_required" | "completed" | "failed" | "canceled" | "rejected";
|
|
97
134
|
export interface Task {
|
|
98
135
|
id: string;
|
|
99
136
|
conversationId: string;
|
|
100
137
|
requesterId: string;
|
|
101
138
|
assigneeId: string;
|
|
102
139
|
state: TaskState;
|
|
140
|
+
statusMessage?: { type: "text"; text: string } | { type: "json"; data: JsonValue } | null;
|
|
141
|
+
authorizationRequestId?: string | null;
|
|
103
142
|
createdAt: string;
|
|
104
143
|
updatedAt: string;
|
|
105
144
|
version: number;
|
|
@@ -545,6 +584,7 @@ export type SendMessage = {
|
|
|
545
584
|
message?: never;
|
|
546
585
|
} | {
|
|
547
586
|
content: MessageContent;
|
|
587
|
+
actionRequest?: NetworkActionRequest | null;
|
|
548
588
|
text?: never;
|
|
549
589
|
message?: never;
|
|
550
590
|
} | {
|
|
@@ -636,3 +676,20 @@ export interface RuntimeHeartbeat {
|
|
|
636
676
|
connected: boolean;
|
|
637
677
|
lastSeenAt: string;
|
|
638
678
|
}
|
|
679
|
+
|
|
680
|
+
/** Durable owner-authorized activity. A feed entry never grants execution. */
|
|
681
|
+
export interface NetworkActivity {
|
|
682
|
+
id: string;
|
|
683
|
+
sequence: string;
|
|
684
|
+
type: string;
|
|
685
|
+
targetId: string | null;
|
|
686
|
+
metadata: Metadata;
|
|
687
|
+
createdAt: string;
|
|
688
|
+
actionRequest: NetworkActionRequest | null;
|
|
689
|
+
executionAuthorized: false;
|
|
690
|
+
}
|
|
691
|
+
export interface NetworkActivityPage extends Page<NetworkActivity> {
|
|
692
|
+
cursor: string;
|
|
693
|
+
actionMode: "ask_me" | "full_access";
|
|
694
|
+
actionModeVersion: number;
|
|
695
|
+
}
|
package/bin/sdk/types.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/bin/totem.mjs
CHANGED
|
@@ -237,9 +237,9 @@ function compactDigest(value) {
|
|
|
237
237
|
function help() {
|
|
238
238
|
writeBrand();
|
|
239
239
|
writeHelpBody(`Start here
|
|
240
|
-
Install once npm install --global https://totemlayer.com/downloads/totemlayer-0.1.
|
|
240
|
+
Install once npm install --global https://totemlayer.com/downloads/totemlayer-0.1.29.tgz
|
|
241
241
|
Confirm installation totem --version
|
|
242
|
-
Run one-off npx --yes --package https://totemlayer.com/downloads/totemlayer-0.1.
|
|
242
|
+
Run one-off npx --yes --package https://totemlayer.com/downloads/totemlayer-0.1.29.tgz totem --help
|
|
243
243
|
|
|
244
244
|
Connect once and receive messages and approved Mission work
|
|
245
245
|
Select Codex, Claude, a local model, or an owner-configured CLI/HTTP agent.
|
package/package.json
CHANGED
package/scripts/prepare.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { access } from "node:fs/promises";
|
|
1
|
+
import { access, readdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { transform } from "esbuild";
|
|
2
3
|
// This candidate rebases coordination on the immutable published 0.1.21 bundle.
|
|
3
4
|
// Its bundled SDK is the release source; do not rebuild it from an older sibling checkout.
|
|
4
5
|
for (const name of [
|
|
@@ -7,3 +8,17 @@ for (const name of [
|
|
|
7
8
|
"network-retry.mjs", "runtime-diagnostics.mjs", "codex-chat-bridge.mjs",
|
|
8
9
|
"worker-core/adapters.mjs", "worker-core/errors.mjs",
|
|
9
10
|
]) await access(new URL(`../bin/${name}`, import.meta.url));
|
|
11
|
+
|
|
12
|
+
// Compact the release SDK without rebuilding it from an older sibling source.
|
|
13
|
+
// Retain every module, export, name and declaration; no feature code is removed.
|
|
14
|
+
const sdk = new URL("../bin/sdk/", import.meta.url);
|
|
15
|
+
for (const name of await readdir(sdk)) {
|
|
16
|
+
if (!name.endsWith(".js")) continue;
|
|
17
|
+
const path = new URL(name, sdk);
|
|
18
|
+
const result = await transform(await readFile(path, "utf8"), {
|
|
19
|
+
loader: "js", target: "es2022", format: "esm",
|
|
20
|
+
minifyWhitespace: true, minifyIdentifiers: false, minifySyntax: false,
|
|
21
|
+
treeShaking: false, keepNames: false, legalComments: "eof",
|
|
22
|
+
});
|
|
23
|
+
await writeFile(path, result.code);
|
|
24
|
+
}
|