oomi-ai 0.3.7 → 0.4.0

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
@@ -1,12 +1,12 @@
1
1
  # oomi-ai
2
2
 
3
- Managed Oomi channel, bridge, voice, and persona app API tooling for OpenClaw.
3
+ Connect OpenClaw, Hermes, and other local agents to Oomi through an explicit runtime adapter.
4
4
 
5
- `oomi-ai` connects an OpenClaw machine to Oomi. Persona UI creation and rendering happen inside Oomi-managed systems. The OpenClaw machine uses API actions only.
5
+ `oomi-ai` connects the selected local agent to Oomi. Persona UI creation and rendering happen inside Oomi-managed systems. The OpenClaw machine uses API actions only.
6
6
 
7
7
  The current model is:
8
8
 
9
- - OpenClaw talks to Oomi through managed channel and bridge APIs.
9
+ - The selected agent talks to Oomi through managed channel and bridge APIs.
10
10
  - Oomi clients render persona apps from approved templates, components, data bindings, actions, and permissions.
11
11
  - The agent may inspect and update persona app state through approved Oomi API actions.
12
12
  - The user adds persona apps from the Oomi client so platform permissions and data hydration happen in the right place.
@@ -44,75 +44,77 @@ Persona UI is an Oomi-managed client capability, not an OpenClaw-machine respons
44
44
 
45
45
  This package exposes connection, bridge, voice, and persona app state APIs. It does not include a local persona app workspace, local persona runtime manager, queued UI job runner, or app framework bundle.
46
46
 
47
- ## Install And Upgrade
47
+ ## Connect Your Local Agent
48
48
 
49
- Global install:
49
+ Connect the agent the user is speaking to. Identify your runtime and profile first. Never choose OpenClaw merely because it is installed on the same machine as Hermes.
50
50
 
51
- ```bash
52
- pnpm add -g oomi-ai@latest
53
- ```
51
+ ## Standard Connect Flow
54
52
 
55
- Fallback:
53
+ Install or update the local package:
56
54
 
57
55
  ```bash
58
56
  npm install -g oomi-ai@latest
59
57
  ```
60
58
 
61
- Install or update the OpenClaw plugin:
59
+ Run ONE command for your runtime:
62
60
 
63
61
  ```bash
64
- openclaw plugins install oomi-ai@latest
65
- ```
62
+ # OpenClaw (reuses existing default OpenClaw pairing)
63
+ oomi connect --runtime openclaw --app-url https://www.oomi.ai
66
64
 
67
- After upgrading, refresh the running bridge so stale gateway connections do not keep using the previous package:
65
+ # Hermes (separate connection, no OpenClaw required)
66
+ oomi connect --runtime hermes --name hermes --app-url https://www.oomi.ai
68
67
 
69
- ```bash
70
- oomi openclaw refresh --skip-version-check
71
- oomi openclaw bridge ps
68
+ # Another local agent, through its own adapter
69
+ oomi connect --runtime command --name my-agent --command '["/absolute/path/to/adapter"]' --app-url https://www.oomi.ai
72
70
  ```
73
71
 
74
- If the bridge still looks stale, restart it explicitly:
72
+ Use the user's app URL when provided. Hermes supports `--profile <profile>` and `--resume <exact-session-id>`. Without `--resume`, Oomi starts a persistent conversation with the same configured agent. Do not use `latest` or claim that an existing chat session was transferred unless its exact ID was selected. Hermes uses `chat --quiet --query-file -`, reads the final reply from stdout and the exact `session_id` from stderr, and resumes that ID on subsequent turns.
75
73
 
76
- ```bash
77
- oomi openclaw bridge restart --detach
78
- oomi openclaw bridge ps
79
- ```
74
+ The command verifies a real local reply, reuses saved credentials or pairs once, starts the bridge, waits for Oomi's subscription, then creates a single-use Auth Link. Failed verification means setup is incomplete: repair the selected runtime, never substitute a different one.
80
75
 
81
- On macOS supervised installs:
76
+ The installer is an alternative to npm plus connect, and requires an explicit runtime:
82
77
 
83
78
  ```bash
84
- oomi openclaw bridge service restart
85
- oomi openclaw bridge service status
79
+ curl -fsSL https://www.oomi.ai/install.sh | bash -s -- --runtime hermes --name hermes
86
80
  ```
87
81
 
88
- Healthy update expectation:
82
+ ## Required User-Facing Result
89
83
 
90
- - exactly one bridge worker is active
91
- - the worker reports the newly installed package version
92
- - bridge status reaches `connected`
84
+ Return the verified runtime/profile and the printed Auth Link. The human opens the link, signs in, and approves ownership. Only after a message receives a reply in Oomi can you claim end-to-end delivery works. Never expose raw tokens, pairing codes, or gateway credentials.
93
85
 
94
- ## Standard Connect Flow
86
+ ## Repair and Reconnect
95
87
 
96
- Pair the machine:
88
+ Use the SAME connection name from setup. Omit `--name` for default OpenClaw.
97
89
 
98
90
  ```bash
99
- oomi openclaw pair --app-url https://www.oomi.ai --no-start
91
+ oomi status --name hermes --json
92
+ oomi verify --name hermes
93
+ oomi bridge restart --name hermes --detach
94
+ oomi invite --name hermes --app-url https://www.oomi.ai
100
95
  ```
101
96
 
102
- Print the OpenClaw config:
97
+ Do not pair again to refresh an expired Auth Link. Re-running `connect` reuses the saved pairing and verifies the runtime again. A different command, profile, or working directory requires a new connection name, so one agent cannot silently replace another. Named connections store private state and logs under `~/.oomi/connections/<name>`; default OpenClaw keeps `~/.openclaw`. A detached worker requires the computer to remain awake and does not start automatically after reboot. Configure the host's process supervisor when persistence across reboot is needed.
103
98
 
104
- ```bash
105
- oomi openclaw plugin --show-secrets --backend-url https://api.oomi.ai
106
- ```
99
+ `connected` describes the broker transport. Inspect `runtimeReady`, `verifiedAt`, and `lastReplyAt` separately. A process ID, Auth Link, or broker connection alone does not prove the agent is answering.
107
100
 
108
- Apply the printed `channels.oomi.accounts.default` config and restart OpenClaw.
101
+ ## Other Runtime Adapter Contract
109
102
 
110
- Start or repair the bridge:
103
+ `--command` is a JSON argv array, not a shell command. Write an adapter against the selected agent's documented API or noninteractive CLI. The executable reads one JSON object from stdin:
111
104
 
112
- ```bash
113
- oomi openclaw bridge ensure --detach
105
+ ```json
106
+ {"sessionKey":"...","message":"...","idempotencyKey":"...","history":[],"runtimeSessionId":"..."}
114
107
  ```
115
108
 
109
+ It writes `{"text":"final reply","sessionId":"optional-runtime-session"}` to stdout and exits zero on success. Errors must exit nonzero; diagnostics go to stderr. Resume `runtimeSessionId`, or use `history` for stateless runtimes. Never bypass the agent's existing approval rules. The adapter supports text (including voice transcripts); attachments are rejected explicitly. A failed or interrupted action is not silently repeated. Check the agent before sending a new message after a failure.
110
+
111
+ ## OpenClaw Channel Extension
112
+
113
+ Managed web text and voice connect through the local gateway. The optional OpenClaw `oomi-ai` channel plugin handles agent-initiated channel output. If you need that path, install the plugin, enable its entry in OpenClaw, apply `oomi openclaw plugin --show-secrets --backend-url https://api.oomi.ai` locally, and restart OpenClaw. Never share that secret config with the user. Disabling the plugin does not explain a gateway protocol rejection.
114
+
115
+ OpenClaw gateway protocols 3 and 4 are negotiated independently of the broker. For an existing install affected by a protocol mismatch, update `oomi-ai`, then run `oomi connect --runtime openclaw --app-url https://www.oomi.ai`.
116
+
117
+
116
118
  ## Configuration
117
119
 
118
120
  OpenClaw channel config lives under:
@@ -206,6 +208,15 @@ Use context tools when the user asks a data-backed question that should come fro
206
208
  oomi context health --json
207
209
  ```
208
210
 
211
+ Clients built from the health-history revision also support stored date ranges:
212
+
213
+ ```bash
214
+ oomi context health --window year --date 2025-06-01 --group-by month --json
215
+ oomi context health --window all --shape summary --json
216
+ ```
217
+
218
+ For these queries, follow `healthHistory.agentGuidance` and use `healthHistory.summary` or `series`. Stored history remains usable while the phone is offline; missing days are unknown. See the [health-history guide](../../docs/2026-09-28-health-history-and-agent-parity.md) for custom ranges and pagination.
219
+
209
220
  Rules for agents:
210
221
 
211
222
  - Answer from `healthContext.summary` and `healthContext.derived`.
@@ -258,7 +269,7 @@ tail -f ~/.openclaw/logs/gateway.err.log
258
269
  Bridge status meanings:
259
270
 
260
271
  - `starting`: bridge booting or waiting for managed subscription
261
- - `connected`: ready for managed chat and voice traffic
272
+ - `connected`: subscribed to the Oomi broker; inspect `runtimeReady` and verify a real reply separately
262
273
  - `reconnecting`: transport dropped and retry is scheduled
263
274
  - `degraded`: bridge caught a runtime fault but is still alive
264
275
  - `error`: startup or auth failure blocked useful operation
@@ -1,174 +1,72 @@
1
- # Oomi OpenClaw Operator Guide
1
+ # Oomi Local Agent Operator Guide
2
2
 
3
- Use these instructions when you need to connect, repair, or verify an OpenClaw machine that should talk to Oomi.
4
-
5
- This package is for managed Oomi connectivity. Persona UI creation and rendering happen inside Oomi-managed systems. The OpenClaw machine uses API actions only.
6
-
7
- ## Primary Goal
8
-
9
- Get OpenClaw into a state where:
10
-
11
- - Oomi managed text chat works
12
- - Oomi device-backed voice can start cleanly
13
- - the bridge is supervised or restartable
14
- - component-composed persona apps can be inspected and updated through Oomi API tools
15
- - approved user context, such as HealthKit data synced by the Oomi mobile app, can be read through Oomi backend context tools
16
- - the user never has to paste raw pair identifiers or gateway secrets manually when managed connect is available
3
+ Connect the agent the user is speaking to. Identify your runtime and profile first. Never choose OpenClaw merely because it is installed on the same machine as Hermes.
17
4
 
18
5
  ## Standard Connect Flow
19
6
 
20
- If the user asks to connect OpenClaw to Oomi chat or voice:
21
-
22
- 1. For a first-time install or missing local pairing state, run the bootstrap exactly once using the requested app URL:
23
- - `curl -fsSL https://www.oomi.ai/install.sh | bash`
24
- - The bootstrap installs or updates `oomi-ai`, performs the one initial pair, installs the plugin, and starts the saved bridge in detached mode.
25
- - Do not pair again after the bootstrap finishes.
26
- 2. Print the config block and secrets:
27
- - `oomi openclaw plugin --show-secrets --backend-url https://api.oomi.ai`
28
- 3. Apply the printed `channels.oomi.accounts.default` config.
29
- 4. Restart OpenClaw.
30
- 5. Start or repair the bridge from saved pairing state:
31
- - `oomi openclaw bridge ensure --detach`
32
- - if stale: `oomi openclaw bridge restart --detach`
33
- - on macOS, prefer supervision: `oomi openclaw bridge service install`
34
- 6. If the Auth Link printed by bootstrap is missing or expired, create a replacement without re-pairing:
35
- - `oomi openclaw invite --app-url https://www.oomi.ai`
36
-
37
- If the machine is already paired, do not rerun bootstrap. Use `invite` for a fresh Auth Link and `bridge ensure` or `bridge restart` for runtime recovery.
38
-
39
- If the user provides a specific app URL, substitute it in both the bootstrap URL and the `invite --app-url` command.
40
-
41
- ## Required User-Facing Result
42
-
43
- When pairing completes successfully, return this exact format:
44
-
45
- - `Oomi Connect Ready`
46
- - `Auth Link: ...`
47
-
48
- Do not add extra narrative before or after those lines.
49
- Do not ask the user to enter raw pair codes, gateway passwords, or nonce values manually.
50
-
51
- ## Update And Stale Bridge Repair
52
-
53
- After updating `oomi-ai`, always make sure the running bridge is not still using an old package or dead gateway connection.
54
-
55
- Preferred update flow:
7
+ Install or update the local package:
56
8
 
57
9
  ```bash
58
- pnpm add -g oomi-ai@latest
59
- openclaw plugins install oomi-ai@latest
60
- oomi openclaw refresh --skip-version-check
61
- oomi openclaw bridge ps
10
+ npm install -g oomi-ai@latest
62
11
  ```
63
12
 
64
- If the bridge is stale, disconnected, duplicated, or reporting the wrong version:
13
+ Run ONE command for your runtime:
65
14
 
66
15
  ```bash
67
- oomi openclaw bridge restart --detach
68
- oomi openclaw bridge ps
69
- ```
16
+ # OpenClaw (reuses existing default OpenClaw pairing)
17
+ oomi connect --runtime openclaw --app-url https://www.oomi.ai
70
18
 
71
- On macOS supervised installs:
19
+ # Hermes (separate connection, no OpenClaw required)
20
+ oomi connect --runtime hermes --name hermes --app-url https://www.oomi.ai
72
21
 
73
- ```bash
74
- oomi openclaw bridge service restart
75
- oomi openclaw bridge service status
22
+ # Another local agent, through its own adapter
23
+ oomi connect --runtime command --name my-agent --command '["/absolute/path/to/adapter"]' --app-url https://www.oomi.ai
76
24
  ```
77
25
 
78
- Healthy result:
26
+ Use the user's app URL when provided. Hermes supports `--profile <profile>` and `--resume <exact-session-id>`. Without `--resume`, Oomi starts a persistent conversation with the same configured agent. Do not use `latest` or claim that an existing chat session was transferred unless its exact ID was selected. Hermes uses `chat --quiet --query-file -`, reads the final reply from stdout and the exact `session_id` from stderr, and resumes that ID on subsequent turns.
79
27
 
80
- - one bridge worker is active
81
- - bridge status reaches `connected`
82
- - the bridge version matches the newly installed package
28
+ The command verifies a real local reply, reuses saved credentials or pairs once, starts the bridge, waits for Oomi's subscription, then creates a single-use Auth Link. Failed verification means setup is incomplete: repair the selected runtime, never substitute a different one.
83
29
 
84
- ## Runtime Checks
85
-
86
- Use these commands to inspect the installed machine:
30
+ The installer is an alternative to npm plus connect, and requires an explicit runtime:
87
31
 
88
32
  ```bash
89
- oomi openclaw bridge ps
90
- oomi openclaw bridge service status
91
- oomi openclaw status
92
- tail -f ~/.openclaw/logs/oomi-bridge-live.log
93
- tail -f ~/.openclaw/logs/gateway.log
94
- tail -f ~/.openclaw/logs/gateway.err.log
33
+ curl -fsSL https://www.oomi.ai/install.sh | bash -s -- --runtime hermes --name hermes
95
34
  ```
96
35
 
97
- Useful local files:
98
-
99
- - `~/.openclaw/oomi-bridge-status.json`
100
- - `~/.openclaw/logs/oomi-bridge-live.log`
101
- - `~/.openclaw/logs/gateway.log`
102
- - `~/.openclaw/logs/gateway.err.log`
103
- - `~/.openclaw/agents/main/sessions/*.jsonl`
104
-
105
- ## Healthy State
106
-
107
- Treat the machine as healthy when all of the following are true:
108
-
109
- - OpenClaw loads the `oomi-ai` plugin without duplicate-id conflicts
110
- - `channels.oomi.accounts.default` is populated with a valid `backendUrl` and `deviceToken`
111
- - the bridge shows `connected` after managed subscription is confirmed
112
- - text chat reaches the Oomi assistant
113
- - voice STT can produce `asr.final`
114
- - assistant replies can come back without the bridge dropping into `stopped`
115
-
116
- Bridge status meanings:
117
-
118
- - `starting`: bridge booting or waiting for managed subscription
119
- - `connected`: ready for managed chat and voice traffic
120
- - `reconnecting`: transport dropped and retry is scheduled
121
- - `degraded`: bridge caught a runtime fault but is still alive
122
- - `error`: startup or auth failure blocked useful operation
123
- - `stopped`: not running or intentionally stopped
124
-
125
- ## Troubleshooting
126
-
127
- ### Duplicate plugin id warning
128
-
129
- Symptom:
130
-
131
- - OpenClaw reports `duplicate plugin id detected`
132
-
133
- Action:
134
-
135
- - ensure only one active `oomi-ai` plugin install is discoverable
136
- - remove stale extension copies before reinstalling
137
-
138
- ### `invalid handshake: first request must be connect`
139
-
140
- Meaning:
36
+ ## Required User-Facing Result
141
37
 
142
- - a gateway request was sent before `connect` had been accepted
38
+ Return the verified runtime/profile and the printed Auth Link. The human opens the link, signs in, and approves ownership. Only after a message receives a reply in Oomi can you claim end-to-end delivery works. Never expose raw tokens, pairing codes, or gateway credentials.
143
39
 
144
- Action:
40
+ ## Repair and Reconnect
145
41
 
146
- - update `oomi-ai`
147
- - restart the bridge
148
- - confirm only one bridge worker is running
42
+ Use the SAME connection name from setup. Omit `--name` for default OpenClaw.
149
43
 
150
- ### Device is linked but voice start still fails
44
+ ```bash
45
+ oomi status --name hermes --json
46
+ oomi verify --name hermes
47
+ oomi bridge restart --name hermes --detach
48
+ oomi invite --name hermes --app-url https://www.oomi.ai
49
+ ```
151
50
 
152
- Meaning:
51
+ Do not pair again to refresh an expired Auth Link. Re-running `connect` reuses the saved pairing and verifies the runtime again. A different command, profile, or working directory requires a new connection name, so one agent cannot silently replace another. Named connections store private state and logs under `~/.oomi/connections/<name>`; default OpenClaw keeps `~/.openclaw`. A detached worker requires the computer to remain awake and does not start automatically after reboot. Configure the host's process supervisor when persistence across reboot is needed.
153
52
 
154
- - linked ownership is not enough; the device side still needs to be live
53
+ `connected` describes the broker transport. Inspect `runtimeReady`, `verifiedAt`, and `lastReplyAt` separately. A process ID, Auth Link, or broker connection alone does not prove the agent is answering.
155
54
 
156
- Action:
55
+ ## Other Runtime Adapter Contract
157
56
 
158
- - confirm the device websocket is actually online
159
- - confirm the bridge is `connected`
160
- - restart the bridge if it is stuck in `reconnecting` or `degraded`
57
+ `--command` is a JSON argv array, not a shell command. Write an adapter against the selected agent's documented API or noninteractive CLI. The executable reads one JSON object from stdin:
161
58
 
162
- ### STT works but the assistant does not reply
59
+ ```json
60
+ {"sessionKey":"...","message":"...","idempotencyKey":"...","history":[],"runtimeSessionId":"..."}
61
+ ```
163
62
 
164
- Meaning:
63
+ It writes `{"text":"final reply","sessionId":"optional-runtime-session"}` to stdout and exits zero on success. Errors must exit nonzero; diagnostics go to stderr. Resume `runtimeSessionId`, or use `history` for stateless runtimes. Never bypass the agent's existing approval rules. The adapter supports text (including voice transcripts); attachments are rejected explicitly. A failed or interrupted action is not silently repeated. Check the agent before sending a new message after a failure.
165
64
 
166
- - the voice turn likely reached Oomi, but the managed gateway or OpenClaw run failed later
65
+ ## OpenClaw Channel Extension
167
66
 
168
- Action:
67
+ Managed web text and voice connect through the local gateway. The optional OpenClaw `oomi-ai` channel plugin handles agent-initiated channel output. If you need that path, install the plugin, enable its entry in OpenClaw, apply `oomi openclaw plugin --show-secrets --backend-url https://api.oomi.ai` locally, and restart OpenClaw. Never share that secret config with the user. Disabling the plugin does not explain a gateway protocol rejection.
169
68
 
170
- - inspect `gateway.log`, `gateway.err.log`, and the session JSONL
171
- - check for `network_error`, auth failures, repeated bridge restarts, or stale package versions
69
+ OpenClaw gateway protocols 3 and 4 are negotiated independently of the broker. For an existing install affected by a protocol mismatch, update `oomi-ai`, then run `oomi connect --runtime openclaw --app-url https://www.oomi.ai`.
172
70
 
173
71
  ## Voice Notes
174
72
 
@@ -292,6 +190,7 @@ Rules:
292
190
 
293
191
  - Notify only for things worth interrupting the user for: a reminder they asked for, a finished task, or something time-sensitive. Say everything else in chat.
294
192
  - Keep the message short and specific. The title defaults to your agent name.
295
- - Tapping the notification opens the Oomi app to the conversation, so follow up in chat.
193
+ - Tapping the notification opens the Oomi app to the conversation, where the message also appears.
194
+ - Messages you send the user on the Oomi channel already notify their phone. Do not also run `oomi notify` for the same message.
296
195
  - If `notification.status` is `skipped`, tell the user `notification.guidance` instead of retrying.
297
196
  - If the request is rate limited, do not retry until `retryAfterSeconds` has passed.