@or3/cloud 0.1.32 → 0.1.35

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
@@ -63,11 +63,16 @@ themes is disabled in the immutable image because it cannot rebuild trusted
63
63
  source; bundled extensions remain available.
64
64
 
65
65
  Remote OR3 Connect is withheld from the managed Cloud release until its
66
- Cloudflare/domain staging flow is proved. The intended local Intern command is
67
- `npx @or3/connect intern`, but it is usable only after the matching package and
68
- verified release assets are published; see the [Connect release status](https://github.com/Saluana/or3-intern/blob/main/docs/connect-release-status.md).
69
- Do not substitute the older package or paste a generic remote URL/token as a
70
- workaround. The [Start Here guide](https://github.com/Saluana/or3-chat/blob/main/docs/start-here.md)
66
+ Cloudflare/domain staging flow is proved. Local Intern is independently
67
+ supported through the coordinated published release:
68
+
69
+ ```sh
70
+ npx @or3/connect@0.1.3 intern
71
+ ```
72
+
73
+ See the [Connect release status](https://github.com/Saluana/or3-intern/blob/main/docs/connect-release-status.md).
74
+ Do not substitute a bare package command or paste a generic remote URL/token as
75
+ a workaround. The [Start Here guide](https://github.com/Saluana/or3-chat/blob/main/docs/start-here.md)
71
76
  routes each supported setup path.
72
77
 
73
78
  ## More help
package/assets/Caddyfile CHANGED
@@ -11,8 +11,8 @@
11
11
  }
12
12
 
13
13
  encode zstd gzip
14
- reverse_proxy or3:3000 {
15
- # Preserve incremental SSE/chat output instead of buffering it at the proxy.
16
- flush_interval -1
17
- }
14
+ # Caddy recognizes text/event-stream and flushes it immediately. Keeping the
15
+ # default stream behavior also lets client disconnects cancel foreground
16
+ # provider requests instead of leaving a paid generation running.
17
+ reverse_proxy or3:3000
18
18
  }
@@ -18,6 +18,9 @@ services:
18
18
  volumes:
19
19
  - or3-data:/data
20
20
  restart: unless-stopped
21
+ # Leave enough time for Nuxt to close SSE responses and upstream provider
22
+ # connections before Docker sends SIGKILL.
23
+ stop_grace_period: 25s
21
24
  # Container hardening: the runtime image already runs as a non-root user and
22
25
  # listens on port 3000 (no privileged ports), so all capabilities are
23
26
  # dropped and the root filesystem is read-only. Persistent state lives on
@@ -48,10 +51,13 @@ services:
48
51
  # exits only. Operators should run `or3 doctor`/`or3 restart` for a
49
52
  # persistent degraded state.
50
53
  test:
51
- - CMD
52
- - /nodejs/bin/node
53
- - -e
54
- - "fetch('http://127.0.0.1:3000/api/health?deep=true').then(async r=>{const b=await r.json().catch(()=>({}));if(!r.ok||b.status!=='ok')process.exit(1)}).catch(()=>process.exit(1))"
54
+ - CMD-SHELL
55
+ - >-
56
+ if [ -x /nodejs/bin/node ]; then
57
+ exec /nodejs/bin/node -e "fetch('http://127.0.0.1:3000/api/health?deep=true').then(async r=>{const b=await r.json().catch(()=>({}));if(!r.ok||b.status!=='ok')process.exit(1)}).catch(()=>process.exit(1))";
58
+ elif [ -x /usr/local/bin/node ]; then
59
+ exec /usr/local/bin/node -e "fetch('http://127.0.0.1:3000/api/health?deep=true').then(async r=>{const b=await r.json().catch(()=>({}));if(!r.ok||b.status!=='ok')process.exit(1)}).catch(()=>process.exit(1))";
60
+ else exit 127; fi
55
61
  interval: 10s
56
62
  timeout: 5s
57
63
  retries: 12
package/dist/cli.mjs CHANGED
@@ -27,7 +27,7 @@ import { dirname, basename, isAbsolute, join, resolve, sep } from "node:path";
27
27
  import { fileURLToPath } from "node:url";
28
28
  import { createGunzip } from "node:zlib";
29
29
  var execFile = promisify(execFileCallback);
30
- var PACKAGE_VERSION = "0.1.32";
30
+ var PACKAGE_VERSION = "0.1.35";
31
31
  var IMAGE_REPOSITORY = "ghcr.io/saluana/or3-chat";
32
32
  var ASSET_ROOT = resolve(fileURLToPath(new URL("../assets/", import.meta.url)));
33
33
  var STATE_SCHEMA_VERSION = 1;
@@ -492,11 +492,23 @@ async function assertSafeComposeBinding(directory, mode, env) {
492
492
  var HEALTH_SCRIPT = "fetch('http://127.0.0.1:3000/api/health?deep=true').then(async response=>{const body=await response.json().catch(()=>({}));if(!response.ok||body.status!=='ok')process.exit(1)}).catch(()=>process.exit(1))";
493
493
  var MAINTENANCE_SCRIPT = "fetch('http://127.0.0.1:3000/api/health?deep=true').then(async response=>{const body=await response.json().catch(()=>({}));const m=body?.providers?.sync?.details?.maintenance;if(m)console.log(JSON.stringify(m))}).catch(()=>{})";
494
494
  var CONTAINER_NODE = "/nodejs/bin/node";
495
+ var LEGACY_CONTAINER_NODE = "/usr/local/bin/node";
496
+ var CONTAINER_HEALTH_SHELL = `if [ -x ${CONTAINER_NODE} ]; then exec ${CONTAINER_NODE} -e "$1"; elif [ -x ${LEGACY_CONTAINER_NODE} ]; then exec ${LEGACY_CONTAINER_NODE} -e "$1"; else exit 127; fi`;
495
497
  async function waitForDeepHealthWithArgs(composeCommand, directory, secrets = []) {
496
498
  const deadline = Date.now() + DEEP_HEALTH_TIMEOUT_MS;
497
499
  let lastError = "health check did not complete";
498
500
  while (Date.now() < deadline) {
499
- const result = await run("docker", [...composeCommand, "exec", "-T", "or3", CONTAINER_NODE, "-e", HEALTH_SCRIPT], directory);
501
+ const result = await run("docker", [
502
+ ...composeCommand,
503
+ "exec",
504
+ "-T",
505
+ "or3",
506
+ "sh",
507
+ "-c",
508
+ CONTAINER_HEALTH_SHELL,
509
+ "or3-health",
510
+ HEALTH_SCRIPT
511
+ ], directory);
500
512
  if (result.ok)
501
513
  return;
502
514
  lastError = redact(result.stderr, secrets);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or3/cloud",
3
- "version": "0.1.32",
3
+ "version": "0.1.35",
4
4
  "description": "Install and operate the OR3 Cloud container distribution",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0",