mycomesh-consumer 0.1.10 → 0.1.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 +4 -4
- package/consumer.compose.yml +1 -1
- package/package.json +1 -1
- package/scripts/start-consumer.sh +4 -4
- package/src/cli.mjs +2 -2
- package/src/consumer.mjs +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Local-first launcher and request CLI for the MycoMesh OpenAI-compatible
|
|
4
4
|
Consumer edge. With no arguments it starts the pinned Docker runtime, opens the
|
|
5
|
-
wallet and funding page, waits for a
|
|
5
|
+
wallet and funding page, waits for a V6 Session, and opens Codex through the
|
|
6
6
|
loopback proxy.
|
|
7
7
|
|
|
8
8
|
The package is published as `mycomesh-consumer`. `mycomesh-consumer` and the
|
|
@@ -31,7 +31,7 @@ mycomesh-consumer
|
|
|
31
31
|
No checkout, separate Codex install, host Python, GNU Make, public Gateway URL, or command arguments are
|
|
32
32
|
required. The command always prints the local onboarding URL and opens it when
|
|
33
33
|
possible. Connect the wallet, mint/deposit test tUSDC, and approve the one-time
|
|
34
|
-
|
|
34
|
+
V6 `openSession`; Codex opens after `/ready` confirms the Session on-chain.
|
|
35
35
|
Wallet keys stay in the browser wallet. Consumer credentials, transport
|
|
36
36
|
identity, and Session state stay in a protected Docker volume.
|
|
37
37
|
|
|
@@ -59,7 +59,7 @@ mycomesh-consumer --reset-local
|
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
This removes the local API key, identity, wallet metadata and SQLite Session
|
|
62
|
-
records. It does not close or refund an already-open on-chain V5 Session; let
|
|
62
|
+
records. It does not close or refund an already-open on-chain V5/V6 Session; let
|
|
63
63
|
that Session expire or submit the contract's close transaction separately
|
|
64
64
|
before treating its escrow as available. The command asks you to type `RESET`
|
|
65
65
|
and removes only the fixed Consumer Compose project and its protected volume.
|
|
@@ -97,7 +97,7 @@ or provide explicit values:
|
|
|
97
97
|
```sh
|
|
98
98
|
export MYCOMESH_BASE_URL=http://127.0.0.1:8110/v1
|
|
99
99
|
export MYCOMESH_API_KEY='replace-with-local-consumer-key'
|
|
100
|
-
export MYCOMESH_SESSION_ID='0x...replace-with-active-
|
|
100
|
+
export MYCOMESH_SESSION_ID='0x...replace-with-active-v6-session-id'
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
The Session ID is not a replacement for the API key. Both values must belong to
|
package/consumer.compose.yml
CHANGED
|
@@ -37,7 +37,7 @@ services:
|
|
|
37
37
|
working_dir: /data
|
|
38
38
|
environment:
|
|
39
39
|
MYCOMESH_CONSUMER_DATA_DIR: /data
|
|
40
|
-
MYCOMESH_CONSUMER_NETWORK_CONFIG: /app/deployments/sepolia-provider-network.json
|
|
40
|
+
MYCOMESH_CONSUMER_NETWORK_CONFIG: /app/deployments/sepolia-provider-network-v6.json
|
|
41
41
|
MYCOMESH_CONSUMER_PUBLIC_BASE_URL: http://127.0.0.1:8110/v1
|
|
42
42
|
MYCOMESH_CONSUMER_WEB_DIR: /app/web
|
|
43
43
|
MYCOMESH_CONSUMER_DISCOVERY_URLS: ${MYCOMESH_CONSUMER_DISCOVERY_URLS:-}
|
package/package.json
CHANGED
|
@@ -113,7 +113,7 @@ open_browser() {
|
|
|
113
113
|
if command -v cmd.exe >/dev/null 2>&1; then cmd.exe /c start "" "$url" >/dev/null 2>&1 & return; fi ;;
|
|
114
114
|
esac
|
|
115
115
|
if [[ -n "$opener" ]]; then "$opener" "$url" >/dev/null 2>&1 &
|
|
116
|
-
else printf '%s\n' "Open this URL in a browser to connect a wallet, fund it, and activate a
|
|
116
|
+
else printf '%s\n' "Open this URL in a browser to connect a wallet, fund it, and activate a V6 Session."; fi
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
while (($#)); do
|
|
@@ -163,7 +163,7 @@ if ((RESET_LOCAL)); then
|
|
|
163
163
|
read -r confirmation
|
|
164
164
|
[[ "$confirmation" == RESET ]] || die "local Consumer reset cancelled"
|
|
165
165
|
compose down --volumes --remove-orphans
|
|
166
|
-
printf '%s\n' "Local Consumer state removed. Any on-chain V5 Session remains on-chain."
|
|
166
|
+
printf '%s\n' "Local Consumer state removed. Any on-chain V5/V6 Session remains on-chain."
|
|
167
167
|
exit 0
|
|
168
168
|
fi
|
|
169
169
|
|
|
@@ -182,12 +182,12 @@ if ((DRY_RUN || NO_CODEX)); then
|
|
|
182
182
|
exit 0
|
|
183
183
|
fi
|
|
184
184
|
|
|
185
|
-
printf '%s\n' "Waiting for the browser to activate the local
|
|
185
|
+
printf '%s\n' "Waiting for the browser to activate the local V6 Session..."
|
|
186
186
|
command -v curl >/dev/null 2>&1 || die "curl is required while waiting for wallet onboarding"
|
|
187
187
|
started_at="$(date +%s)"
|
|
188
188
|
while ! curl --noproxy '*' --fail --silent --max-time 3 http://127.0.0.1:8110/ready >/dev/null 2>&1; do
|
|
189
189
|
if (( $(date +%s) - started_at >= READY_TIMEOUT )); then
|
|
190
|
-
die "timed out waiting for the local Consumer
|
|
190
|
+
die "timed out waiting for the local Consumer V6 Session; reopen $url"
|
|
191
191
|
fi
|
|
192
192
|
sleep 2
|
|
193
193
|
done
|
package/src/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { once } from "node:events";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
|
|
4
|
-
const CLI_VERSION = "0.1.
|
|
4
|
+
const CLI_VERSION = "0.1.12";
|
|
5
5
|
// The npm client is local-first. A public Gateway is an explicit override;
|
|
6
6
|
// the default remains the loopback Consumer edge so a blocked domain cannot
|
|
7
7
|
// strand the Codex client.
|
|
@@ -30,7 +30,7 @@ Connection options:
|
|
|
30
30
|
--allow-insecure-http Allow cleartext HTTP to a non-loopback test gateway
|
|
31
31
|
|
|
32
32
|
Session options:
|
|
33
|
-
--session-id <bytes32> Use an already-opened
|
|
33
|
+
--session-id <bytes32> Use an already-opened V6 Session
|
|
34
34
|
(env: MYCOMESH_SESSION_ID)
|
|
35
35
|
|
|
36
36
|
Request body options:
|
package/src/consumer.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import { spawn as defaultSpawn } from "node:child_process";
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
|
|
5
|
-
const CONSUMER_RELEASE_VERSION = "0.1.
|
|
5
|
+
const CONSUMER_RELEASE_VERSION = "0.1.12";
|
|
6
6
|
const DEFAULT_NODE_IMAGE =
|
|
7
|
-
"ghcr.io/charleslzp/mycomesh-node@sha256:
|
|
7
|
+
"ghcr.io/charleslzp/mycomesh-node@sha256:d670d3a948bb1a001c7548d34b7872c1b5b9d72a7edc789ca12452a5e52c3218";
|
|
8
8
|
const API_COMMANDS = new Set(["health", "models", "responses", "chat"]);
|
|
9
9
|
const API_VALUE_OPTIONS = new Set([
|
|
10
10
|
"--base-url",
|
|
@@ -26,7 +26,7 @@ const HELP = `Usage: mycomesh-consumer [options] [-- codex-options]
|
|
|
26
26
|
Start the local MycoMesh Consumer. No options are needed.
|
|
27
27
|
|
|
28
28
|
The default command starts the pinned Docker runtime, opens the local wallet
|
|
29
|
-
and funding page, waits for an activated
|
|
29
|
+
and funding page, waits for an activated V6 Session, then opens Codex through
|
|
30
30
|
the loopback Consumer at http://127.0.0.1:8110/v1.
|
|
31
31
|
|
|
32
32
|
Options:
|