snapreq 0.0.10 → 0.0.11

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.
Files changed (2) hide show
  1. package/README.md +51 -0
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -167,6 +167,57 @@ connection.sendMessage({text: "hi"})
167
167
 
168
168
  Optional adapters: `networkMonitor` (gate reconnects on online state), `sessionStore` (persist the session id across reloads) and `deserialize` (a `(value) => value` transform applied inside `response.json()` so an app can re-hydrate its own wire format).
169
169
 
170
+ ## Hermes Compose development
171
+
172
+ The repository includes a task-isolated Node 24 development environment for
173
+ Hermes/Threadwire work. It mounts one exact worktree into `/workspace`; the
174
+ dependency, npm-cache, and Codex state volumes are scoped by the required
175
+ Compose project name. There are no support services, host ports, or fixed
176
+ container names.
177
+
178
+ From the outer Hermes Docker host, allocate a self-contained Git checkout
179
+ (with its own `.git` directory) directly below
180
+ `/opt/hermes-dind-shared/worktrees/snapreq` and keep its task name identical to
181
+ the Compose suffix:
182
+
183
+ ```sh
184
+ export SNAPREQ_SOURCE_PATH=/opt/hermes-dind-shared/worktrees/snapreq/10575
185
+ export SNAPREQ_COMPOSE_PROJECT=snapreq-10575
186
+
187
+ scripts/hermes-compose.js validate
188
+ scripts/hermes-compose.js config
189
+ scripts/hermes-compose.js build --pull
190
+ scripts/hermes-compose.js up
191
+ scripts/hermes-compose.js exec npm ci
192
+ scripts/hermes-compose.js proof
193
+ scripts/hermes-compose.js down
194
+ ```
195
+
196
+ Codex authentication is initialized into the task-owned volume from one
197
+ explicit, existing Docker volume in the private DinD daemon. That source
198
+ volume must contain `/auth.json`; it is mounted read-only only for the one-off
199
+ initializer and never attached to the long-running service:
200
+
201
+ ```sh
202
+ export SNAPREQ_CODEX_AUTH_VOLUME=<existing-auth-volume>
203
+ scripts/hermes-compose.js init-codex
204
+ ```
205
+
206
+ Threadwire remains on the outer host. The lifecycle wrapper launches it with
207
+ the checked-in provider adapter, which runs Codex in the `dev` service at
208
+ `/workspace`:
209
+
210
+ ```sh
211
+ export THREADWIRE_TARGET=telegram:-1001234567890:42
212
+ scripts/hermes-compose.js threadwire --prompt 'Inspect the project.'
213
+ ```
214
+
215
+ Use `scripts/hermes-compose.js down` for ordinary teardown; it preserves task
216
+ state. Volume/image deletion requires the separate, exact confirmation
217
+ `SNAPREQ_PURGE_PROJECT="$SNAPREQ_COMPOSE_PROJECT" scripts/hermes-compose.js purge`.
218
+ See [AGENTS.md](AGENTS.md) for the authoritative boundary, parallel-allocation,
219
+ verification, smoke-test, and non-Hermes workflow rules.
220
+
170
221
  ## License
171
222
 
172
223
  ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snapreq",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Cross-platform HTTP and WebSocket client with one API across Node, web, Expo and React Native",
5
5
  "type": "module",
6
6
  "main": "./build/snap-req.js",
@@ -21,13 +21,14 @@
21
21
  "scripts": {
22
22
  "all-checks": "npm run typecheck && npm run lint && npm run test",
23
23
  "build": "rm -rf build && tsc",
24
+ "hermes:check": "node --test spec/hermes-compose-spec.js",
24
25
  "lint": "npm run eslint && npm run typecheck",
25
26
  "prepare": "npm run build",
26
27
  "prepublishOnly": "npm run build",
27
28
  "release:patch": "release-patch",
28
29
  "test": "npm run build && node --test \"spec/**/*-spec.js\"",
29
30
  "typecheck": "tsc --noEmit",
30
- "eslint": "eslint src spec"
31
+ "eslint": "eslint src spec scripts"
31
32
  },
32
33
  "keywords": [
33
34
  "http",