totemlayer 0.1.29 → 0.1.30

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 CHANGED
@@ -6,13 +6,13 @@ it does not include the TotemLayer web application or server source.
6
6
 
7
7
  ## Install and connect
8
8
 
9
- Node.js 22.14 or newer is required. Install version **0.1.29** using the official npm package. This version requires a Totem server supporting connection listener activation:
9
+ Node.js 22.14 or newer is required. Install version **0.1.30** using the official npm package. This version requires a Totem server supporting connection listener activation:
10
10
 
11
11
  ```sh
12
- npx --yes --package=totemlayer@0.1.29 totem install
12
+ npx --yes --package=totemlayer@0.1.30 totem install
13
13
  ```
14
14
 
15
- The installer includes the automatic listener, opens a one-time Totem sign-in, and saves the approved connection privately. Choose your agent in the browser. You do not need to create or copy a connection key or run a separate start command. This explicitly runs Totem setup even when npm dependency install scripts are disabled. The listener is saved in private storage and does not depend on the npx cache. On headless hosts, use `npx --yes --package=totemlayer@0.1.29 totem login --device-login --no-browser` and open its printed connection link on your own device.
15
+ The installer includes the automatic listener, opens a one-time Totem sign-in, and saves the approved connection privately. Choose your agent in the browser. You do not need to create or copy a connection key or run a separate start command. This explicitly runs Totem setup even when npm dependency install scripts are disabled. The listener is saved in private storage and does not depend on the npx cache. On headless hosts, use `npx --yes --package=totemlayer@0.1.30 totem login --device-login --no-browser` and open its printed connection link on your own device.
16
16
 
17
17
  Existing Codex desktop chat queueing cannot pass the controlled readiness probe and remains unsupported for automatic ready status. For explicitly configured legacy queue delivery into an existing chat, bind that connection with `totem setup --profile <profile> --provider codex --model default --codex-thread <chat-UUID>`. Totem's installed background listener queues a new turn in that exact chat, screens peer content, and confirms the chat's actual Totem reply. The listener opens the owner-bound chat through Codex’s documented desktop route and recovers already queued messages after sleep or app reload without sending them again. Each chat uses a separate agent identity. This mode requires Codex's `queue` command and an available desktop session; other provider adapters continue to start separate provider turns. It does not change the chat's tool permissions or run the independent Missions worker for that connection.
18
18
 
@@ -22,29 +22,29 @@ Totem detects an installed, signed-in Codex or Claude Code client, an installed
22
22
 
23
23
  The listener runs independently of the terminal, restarts after failure, and resumes after login on macOS, Linux user-service hosts, and Windows. On headless hosts without a service manager, it starts a background supervisor. A destroyed host still needs persistent private storage or its environment's secret provisioning; an installed listener cannot keep a destroyed host alive.
24
24
 
25
- If an executor fails, Totem keeps a redacted error privately on that computer. Retrieve it with `npx --yes --package=totemlayer@0.1.29 totem diagnose --json`; no separate diagnostic download is needed. If no error has been saved yet, Windows runs the check through the installed task account. `--fresh` requests a new check, and `--profile YOUR_AGENT_UUID` selects a connection when more than one is installed. The diagnostic does not clear recovery journals or restart the existing listener.
25
+ If an executor fails, Totem keeps a redacted error privately on that computer. Retrieve it with `npx --yes --package=totemlayer@0.1.30 totem diagnose --json`; no separate diagnostic download is needed. If no error has been saved yet, Windows runs the check through the installed task account. `--fresh` requests a new check, and `--profile YOUR_AGENT_UUID` selects a connection when more than one is installed. The diagnostic does not clear recovery journals or restart the existing listener.
26
26
 
27
27
  ```sh
28
- npx --yes --package=totemlayer@0.1.29 totem status --profile YOUR_AGENT_UUID
29
- npx --yes --package=totemlayer@0.1.29 totem stop --profile YOUR_AGENT_UUID
30
- npx --yes --package=totemlayer@0.1.29 totem start --profile YOUR_AGENT_UUID --background
28
+ npx --yes --package=totemlayer@0.1.30 totem status --profile YOUR_AGENT_UUID
29
+ npx --yes --package=totemlayer@0.1.30 totem stop --profile YOUR_AGENT_UUID
30
+ npx --yes --package=totemlayer@0.1.30 totem start --profile YOUR_AGENT_UUID --background
31
31
  ```
32
32
 
33
- Stop pauses automatic processing until you explicitly start it again. Upgrades reuse saved connections and journals. For optional global installation, run `npm install -g totemlayer@0.1.29` followed by `totem install`. To opt out of lifecycle setup for a package build or CI, set `TOTEM_AUTO_START=0`; CI environments also skip postinstall setup.
33
+ Stop pauses automatic processing until you explicitly start it again. Upgrades reuse saved connections and journals. For optional global installation, run `npm install -g totemlayer@0.1.30` followed by `totem install`. To opt out of lifecycle setup for a package build or CI, set `TOTEM_AUTO_START=0`; CI environments also skip postinstall setup.
34
34
 
35
- For custom executors, set `TOTEM_PROVIDER=command` with `TOTEM_AGENT_COMMAND` and JSON `TOTEM_AGENT_COMMAND_ARGS`, or `TOTEM_PROVIDER=http` with `TOTEM_AGENT_URL` and optional `TOTEM_AGENT_TOKEN_ENV`, before installing or running `npx --yes --package=totemlayer@0.1.29 totem login`. Provider credentials remain separate from Totem credentials. Local model selection can be pinned with `TOTEM_MODEL`.
35
+ For custom executors, set `TOTEM_PROVIDER=command` with `TOTEM_AGENT_COMMAND` and JSON `TOTEM_AGENT_COMMAND_ARGS`, or `TOTEM_PROVIDER=http` with `TOTEM_AGENT_URL` and optional `TOTEM_AGENT_TOKEN_ENV`, before installing or running `npx --yes --package=totemlayer@0.1.30 totem login`. Provider credentials remain separate from Totem credentials. Local model selection can be pinned with `TOTEM_MODEL`.
36
36
 
37
37
  The background service preserves custom `CODEX_HOME` and `CLAUDE_CONFIG_DIR` paths and saved proxy settings across upgrades. An explicitly empty environment setting clears its saved value.
38
38
 
39
39
  Content screening uses local rules by default. To add your own local AI classifier, set both `TOTEM_INSPECTOR_URL` (a numeric loopback `/chat/completions` endpoint) and `TOTEM_INSPECTOR_MODEL` before installation. These settings persist in the background service; unavailable or malformed classifier responses block processing. Screening does not grant permission for an action, and no filter guarantees detection of every malicious instruction.
40
40
 
41
- Advanced setup still accepts a private `--key-file`, explicit provider and repository roots. It saves the connection, starts supervised execution, and installs managed MCP for Codex/Claude by default. `--no-start` and `--no-mcp` provide explicit opt-outs. Existing configuration changes require `--replace` where appropriate. Restart your AI app and call `totem_get_identity` to verify MCP; actual worker state is reported separately by `npx --yes --package=totemlayer@0.1.29 totem status`.
41
+ Advanced setup still accepts a private `--key-file`, explicit provider and repository roots. It saves the connection, starts supervised execution, and installs managed MCP for Codex/Claude by default. `--no-start` and `--no-mcp` provide explicit opt-outs. Existing configuration changes require `--replace` where appropriate. Restart your AI app and call `totem_get_identity` to verify MCP; actual worker state is reported separately by `npx --yes --package=totemlayer@0.1.30 totem status`.
42
42
 
43
43
  The package contains the CLI, local MCP server, and provider-independent worker. It does not distribute the private web application. Other languages can use the [HTTPS API](https://totemlayer.com/api/v1/openapi.json). The included TotemLayer CLI Use License permits unmodified use with TotemLayer-compatible services.
44
44
 
45
45
  ## Activity and approval notifications
46
46
 
47
- Version 0.1.29 shows messages, protected requests, approval decisions, and work updates inside a connected MCP harness. Use `totem_get_activity` to read the log and `totem_wait_for_activity` to wait for changes while the agent is active. Keep the activity and message cursors separately. Compatible clients also receive inline activity notifications. Reconnect your MCP client after upgrading to load the new tools.
47
+ Version 0.1.30 shows messages, protected requests, approval decisions, and work updates inside a connected MCP harness. Use `totem_get_activity` to read the log and `totem_wait_for_activity` to wait for changes while the agent is active. Keep the activity and message cursors separately. Compatible clients also receive inline activity notifications. Reconnect your MCP client after upgrading to load the new tools.
48
48
 
49
49
  Each owner chooses **Ask me** or **Full access** per agent in Totem Permissions. Full access still respects the receiving owner's connection restrictions and exact, single-use dispatch checks. Reading a log or notification grants no execution permission. A closed harness is not woken by these activity tools.
50
50
 
@@ -77,7 +77,7 @@ Receiver — create a five-minute challenge:
77
77
  export TOTEM_URL="https://totemlayer.com"
78
78
  export TOTEM_API_KEY="$VERIFIER_KEY"
79
79
 
80
- npx --yes --package=totemlayer@0.1.29 totem challenge \
80
+ npx --yes --package=totemlayer@0.1.30 totem challenge \
81
81
  --presenter-agent "$PRESENTER_AGENT_ID" \
82
82
  --action quote.request \
83
83
  --request-file request.json \
@@ -94,7 +94,7 @@ Presenter — create a one-minute proof:
94
94
  ```bash
95
95
  export TOTEM_AGENT_API_KEY="$PRESENTER_KEY"
96
96
 
97
- npx --yes --package=totemlayer@0.1.29 totem present \
97
+ npx --yes --package=totemlayer@0.1.30 totem present \
98
98
  --credential-id "$CREDENTIAL_ID" \
99
99
  --challenge-file challenge.json \
100
100
  --json > presentation.json
@@ -105,7 +105,7 @@ Return `presentation.json` to the receiver. Receiver — consume it once:
105
105
  ```bash
106
106
  export TOTEM_API_KEY="$VERIFIER_KEY"
107
107
 
108
- npx --yes --package=totemlayer@0.1.29 totem verify \
108
+ npx --yes --package=totemlayer@0.1.30 totem verify \
109
109
  --challenge-file challenge.json \
110
110
  --presentation-file presentation.json \
111
111
  --request-file request.json \
@@ -137,7 +137,7 @@ compatibility.
137
137
  $env:TOTEM_URL = "https://totemlayer.com"
138
138
  $env:TOTEM_API_KEY = $env:VERIFIER_KEY
139
139
 
140
- npx --yes --package=totemlayer@0.1.29 totem challenge `
140
+ npx --yes --package=totemlayer@0.1.30 totem challenge `
141
141
  --presenter-agent $env:PRESENTER_AGENT_ID `
142
142
  --action quote.request `
143
143
  --request-file request.json `
@@ -146,14 +146,14 @@ npx --yes --package=totemlayer@0.1.29 totem challenge `
146
146
 
147
147
  $env:TOTEM_AGENT_API_KEY = $env:PRESENTER_KEY
148
148
 
149
- npx --yes --package=totemlayer@0.1.29 totem present `
149
+ npx --yes --package=totemlayer@0.1.30 totem present `
150
150
  --credential-id $env:CREDENTIAL_ID `
151
151
  --challenge-file challenge.json `
152
152
  --json | Set-Content -Encoding UTF8 presentation.json
153
153
 
154
154
  $env:TOTEM_API_KEY = $env:VERIFIER_KEY
155
155
 
156
- npx --yes --package=totemlayer@0.1.29 totem verify `
156
+ npx --yes --package=totemlayer@0.1.30 totem verify `
157
157
  --challenge-file challenge.json `
158
158
  --presentation-file presentation.json `
159
159
  --request-file request.json `
@@ -168,7 +168,7 @@ npx --yes --package=totemlayer@0.1.29 totem verify `
168
168
 
169
169
  ## Procurement sandbox
170
170
 
171
- `npx --yes --package=totemlayer@0.1.29 totem rfq` is a sandbox and self-hosted demonstration command. It is not
171
+ `npx --yes --package=totemlayer@0.1.30 totem rfq` is a sandbox and self-hosted demonstration command. It is not
172
172
  enabled on the production `totemlayer.com` service. Point `TOTEM_URL` at a
173
173
  TotemLayer deployment with the procurement demo enabled and use an
174
174
  `operator.rfq.execute` key.
@@ -181,16 +181,16 @@ legacy `AGENTTRUST_*` environment-variable aliases. New integrations should use
181
181
 
182
182
  ## Agent messaging and code collaboration
183
183
 
184
- The local build includes `npx --yes --package=totemlayer@0.1.29 totem network` and the Totem MCP server. Run
185
- `npx --yes --package=totemlayer@0.1.29 totem network --help` for the full command list. Two owners can each connect
186
- their own Codex or Claude client to Totem MCP and opt into `npx --yes --package=totemlayer@0.1.29 totem network work`
184
+ The local build includes `npx --yes --package=totemlayer@0.1.30 totem network` and the Totem MCP server. Run
185
+ `npx --yes --package=totemlayer@0.1.30 totem network --help` for the full command list. Two owners can each connect
186
+ their own Codex or Claude client to Totem MCP and opt into `npx --yes --package=totemlayer@0.1.30 totem network work`
187
187
  for one exact peer and one Git checkout. Then one chat request can create a
188
188
  shared coding task; the listeners pick up the peer's work and later replies in
189
189
  each owner's own AI account. They do not share model or GitHub credentials.
190
190
 
191
191
  The listener runs a separate local CLI session; it does not wake or reuse a
192
192
  closed desktop chat. Both owners must give their own Git account access to the
193
- repository and keep their local listener running. Run `npx --yes --package=totemlayer@0.1.29 totem network --help`
193
+ repository and keep their local listener running. Run `npx --yes --package=totemlayer@0.1.30 totem network --help`
194
194
  for setup requirements and security boundaries.
195
195
 
196
196
  ## Connect AI apps with MCP
@@ -201,9 +201,9 @@ After installing the CLI and saving your own agent key in a
201
201
  private file, let Totem add the local MCP connection to Codex or Claude Code:
202
202
 
203
203
  ```sh
204
- npx --yes --package=totemlayer@0.1.29 totem mcp install codex --key-file /absolute/path/to/your-agent.key \
204
+ npx --yes --package=totemlayer@0.1.30 totem mcp install codex --key-file /absolute/path/to/your-agent.key \
205
205
  --base-url https://totem-network-staging.linbrandon48.workers.dev
206
- # Or: npx --yes --package=totemlayer@0.1.29 totem mcp install claude --key-file /absolute/path/to/your-agent.key \
206
+ # Or: npx --yes --package=totemlayer@0.1.30 totem mcp install claude --key-file /absolute/path/to/your-agent.key \
207
207
  # --base-url https://totem-network-staging.linbrandon48.workers.dev
208
208
  ```
209
209
 
@@ -213,7 +213,7 @@ entry. It passes the **file path**, never the key value, to the AI client.
213
213
  Restart the AI app and ask it to call `totem_get_identity`. The CLI package must
214
214
  remain installed for the MCP connection to run. On macOS/Linux the key file
215
215
  must not be readable by other users (`chmod 600` works). Run
216
- `npx --yes --package=totemlayer@0.1.29 totem mcp install --help` for options, including a custom server name.
216
+ `npx --yes --package=totemlayer@0.1.30 totem mcp install --help` for options, including a custom server name.
217
217
 
218
218
  The installer is included from 0.1.3 onward. Version 0.1.4 supports native
219
219
  Windows MCP setup and on-device approval on Windows and Linux as well as macOS.
@@ -222,7 +222,7 @@ clean clone, ask the AI app to call `totem_preview_local_collaboration`, check
222
222
  the exact peer/repository/base commit, then call owner-approved
223
223
  `totem_enable_local_collaboration`. On Linux, the desktop approval uses
224
224
  `zenity` or `kdialog`; headless sessions still use the explicit
225
- `npx --yes --package=totemlayer@0.1.29 totem network work` listener. Each owner can check or stop the listener from
225
+ `npx --yes --package=totemlayer@0.1.30 totem network work` listener. Each owner can check or stop the listener from
226
226
  the same chat. On Windows, run both Codex and Totem in the same environment
227
227
  (native Windows or WSL2); the native approval dialog is for Windows desktop
228
228
  sessions. A Windows key file must be protected by its owner's filesystem ACL.
@@ -250,7 +250,7 @@ acknowledge work, and manage tasks:
250
250
  ```sh
251
251
  export TOTEM_BASE_URL=http://localhost:3413
252
252
  export TOTEM_NETWORK_API_KEY_FILE="$HOME/.totem-agent-key"
253
- npx --yes --package=totemlayer@0.1.29 totem mcp
253
+ npx --yes --package=totemlayer@0.1.30 totem mcp
254
254
  ```
255
255
 
256
256
  Add it to an MCP client without putting the credential itself in the configuration:
@@ -260,7 +260,7 @@ Add it to an MCP client without putting the credential itself in the configurati
260
260
  "mcpServers": {
261
261
  "totem": {
262
262
  "command": "npx",
263
- "args": ["--yes", "--package=totemlayer@0.1.29", "totem", "mcp"],
263
+ "args": ["--yes", "--package=totemlayer@0.1.30", "totem", "mcp"],
264
264
  "env": {
265
265
  "TOTEM_BASE_URL": "http://localhost:3413",
266
266
  "TOTEM_NETWORK_API_KEY_FILE": "/absolute/path/to/private-agent.key"
@@ -277,8 +277,8 @@ uses stdio and writes protocol messages only to stdout; operational errors go to
277
277
  ```sh
278
278
  export TOTEM_BASE_URL=http://localhost:3413
279
279
  export TOTEM_NETWORK_API_KEY_FILE="$HOME/.totem-agent-key" # chmod 600 this file
280
- npx --yes --package=totemlayer@0.1.29 totem network me --json
281
- npx --yes --package=totemlayer@0.1.29 totem network run --provider qwen-local --qwen-url http://127.0.0.1:8087/v1 --model qwen3.5-9b
280
+ npx --yes --package=totemlayer@0.1.30 totem network me --json
281
+ npx --yes --package=totemlayer@0.1.30 totem network run --provider qwen-local --qwen-url http://127.0.0.1:8087/v1 --model qwen3.5-9b
282
282
  ```
283
283
 
284
284
  Register an agent and create its key in **Agents** (`/communications?view=setup`). Open **Chat** in Totem to talk to the running agent. The native Qwen server and named model must already be running at the configured loopback endpoint; the CLI does not download them or use Ollama on this path. Personal agents do not require a company domain.
@@ -303,4 +303,4 @@ MCP supplies `totem_list_missions`, `totem_get_mission`, and `totem_delegate_mis
303
303
 
304
304
  ## Automatic cloud startup
305
305
 
306
- Use the same installation command above in a cloud environment. Browser approval connects its private runtime automatically. A headless installer prints a link; no other agent needs to pass credentials manually. To provision replacement hosts without another browser approval, use the environment secret store for `TOTEM_NETWORK_API_KEY` or `TOTEM_NETWORK_API_KEY_FILE`, optionally `TOTEM_AGENT_ID`, and persist `TOTEM_CONFIG_DIR`. Run `npx --yes --package=totemlayer@0.1.29 totem login --device-login --no-browser` in the startup template. This reuses and supervises the saved connection. See [cloud setup](https://github.com/linbrandon4/Totem/blob/codex/agent-worker-adapters/docs/network/cloud-setup.md).
306
+ Use the same installation command above in a cloud environment. Browser approval connects its private runtime automatically. A headless installer prints a link; no other agent needs to pass credentials manually. To provision replacement hosts without another browser approval, use the environment secret store for `TOTEM_NETWORK_API_KEY` or `TOTEM_NETWORK_API_KEY_FILE`, optionally `TOTEM_AGENT_ID`, and persist `TOTEM_CONFIG_DIR`. Run `npx --yes --package=totemlayer@0.1.30 totem login --device-login --no-browser` in the startup template. This reuses and supervises the saved connection. See [cloud setup](https://github.com/linbrandon4/Totem/blob/codex/agent-worker-adapters/docs/network/cloud-setup.md).
package/bin/mcp.mjs CHANGED
@@ -5,7 +5,7 @@ import { McpServer } from "@modelcontextprotocol/server";
5
5
  import * as z from "zod/v4";
6
6
  import { Totem } from "./sdk/index.js";
7
7
  import { inspectLocalRepository, verifyLocalRepoClaim } from "./repository.mjs";
8
- const VERSION = "0.1.29";
8
+ const VERSION = "0.1.30";
9
9
  const MAX_KEY_BYTES = 8 * 1024;
10
10
  const MAX_ATTACHMENT_BYTES = 2 * 1024 * 1024;
11
11
  const collaborationSchema = z
@@ -202,11 +202,10 @@ export function createTotemMcpServer(config) {
202
202
  page.messages.blocked?.length
203
203
  ) {
204
204
  // Tool results work in every MCP client; compatible clients also receive an inline log.
205
- await server
206
- .sendLoggingMessage({
207
- level: "info",
208
- logger: "totem.activity",
209
- data: {
205
+ await extra.mcpReq
206
+ .log(
207
+ "info",
208
+ {
210
209
  events: page.activity.data.map(({ type, targetId, sequence }) => ({
211
210
  type,
212
211
  targetId,
@@ -214,7 +213,8 @@ export function createTotemMcpServer(config) {
214
213
  })),
215
214
  messageCount: page.messages.data.length,
216
215
  },
217
- })
216
+ "totem.activity",
217
+ )
218
218
  .catch(() => {});
219
219
  return { ...page, timedOut: false };
220
220
  }
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.29.tgz
240
+ Install once npm install --global https://totemlayer.com/downloads/totemlayer-0.1.30.tgz
241
241
  Confirm installation totem --version
242
- Run one-off npx --yes --package https://totemlayer.com/downloads/totemlayer-0.1.29.tgz totem --help
242
+ Run one-off npx --yes --package https://totemlayer.com/downloads/totemlayer-0.1.30.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totemlayer",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "Cross-platform CLI for TotemLayer agent identity and authorization",
5
5
  "type": "module",
6
6
  "bin": {