snapreq 0.0.10 → 0.0.12
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 +60 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -167,6 +167,66 @@ 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. The development-only `@kaspernj/hermes-compose` package owns
|
|
177
|
+
the lifecycle, provider, process and signal handling, bootstrap, proof, smoke
|
|
178
|
+
acceptance, and exact cleanup. SnapReq owns only `hermes.config.js` and its
|
|
179
|
+
checked-in Compose/Dockerfile wiring.
|
|
180
|
+
|
|
181
|
+
From the outer Hermes Docker host, allocate a self-contained Git checkout
|
|
182
|
+
(with its own `.git` directory) directly below
|
|
183
|
+
`/opt/hermes-dind-shared/worktrees/snapreq` and keep its task name identical to
|
|
184
|
+
the Compose suffix:
|
|
185
|
+
|
|
186
|
+
```sh
|
|
187
|
+
export HERMES_SOURCE_PATH=/opt/hermes-dind-shared/worktrees/snapreq/10575
|
|
188
|
+
export HERMES_COMPOSE_PROJECT=snapreq-10575
|
|
189
|
+
|
|
190
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose validate
|
|
191
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose config
|
|
192
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose build --pull
|
|
193
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose up
|
|
194
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose exec npm ci
|
|
195
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose proof
|
|
196
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose down
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Codex authentication is initialized into the task-owned volume from one
|
|
200
|
+
explicit, existing Docker volume in the private DinD daemon. That source
|
|
201
|
+
volume must contain `/auth.json`; it is mounted read-only only for the one-off
|
|
202
|
+
initializer and never attached to the long-running service:
|
|
203
|
+
|
|
204
|
+
```sh
|
|
205
|
+
export HERMES_CODEX_AUTH_VOLUME=<existing-auth-volume>
|
|
206
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose init-codex
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Threadwire remains on the outer host. The package launches it through its
|
|
210
|
+
provider, which runs Codex in the `dev` service at `/workspace`:
|
|
211
|
+
|
|
212
|
+
```sh
|
|
213
|
+
export THREADWIRE_TARGET=telegram:-1001234567890:42
|
|
214
|
+
npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose threadwire --prompt 'Inspect the project.'
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Use the pinned `npm exec` `down` command above for ordinary teardown; it
|
|
218
|
+
preserves task state. Volume/image deletion requires the separate, exact
|
|
219
|
+
confirmation:
|
|
220
|
+
|
|
221
|
+
```sh
|
|
222
|
+
HERMES_PURGE_PROJECT="$HERMES_COMPOSE_PROJECT" npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose purge
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The two-stack acceptance entry point is
|
|
226
|
+
`npm exec --yes --package=@kaspernj/hermes-compose@0.0.0 -- hermes-compose smoke`.
|
|
227
|
+
See [AGENTS.md](AGENTS.md) for the authoritative boundary, parallel-allocation,
|
|
228
|
+
verification, smoke-test, and non-Hermes workflow rules.
|
|
229
|
+
|
|
170
230
|
## License
|
|
171
231
|
|
|
172
232
|
ISC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snapreq",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
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,6 +21,7 @@
|
|
|
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",
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@eslint/js": "^10.0.1",
|
|
49
|
+
"@kaspernj/hermes-compose": "0.0.0",
|
|
48
50
|
"@types/node": "^26.0.1",
|
|
49
51
|
"@types/ws": "^8.18.1",
|
|
50
52
|
"eslint": "^10.3.0",
|