scenri 0.4.3 → 0.4.5
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/CHANGELOG.md +28 -0
- package/README.md +1 -1
- package/dist/{chunk-WIIQZN3K.js → chunk-FYQ5BAFA.js} +23 -6
- package/dist/{cli-PBDPZQ4G.js → cli-KSKENGIR.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/serve.js +348 -67
- package/package.json +1 -1
- package/studio-dist/assets/{index-8OmIjrcU.js → index-CXHDyFny.js} +24 -24
- package/studio-dist/index.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.5](https://github.com/tonygorb/Scenri/compare/v0.4.4...v0.4.5) (2026-08-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* check npm every six hours for real, and catch up after sleep ([9efb633](https://github.com/tonygorb/Scenri/commit/9efb6338b8a3ffbcb0c0a0f167492510f33d8bca))
|
|
9
|
+
* keep the update float off a source checkout ([35d5269](https://github.com/tonygorb/Scenri/commit/35d5269f46d20044921878c2068fdc7495e6c27d))
|
|
10
|
+
* keep the update float off a source checkout ([d2c129e](https://github.com/tonygorb/Scenri/commit/d2c129e4a567ea4220f503118872087f9e2516cc))
|
|
11
|
+
* let an idle tab hear about a ready update within the half hour ([ea0088d](https://github.com/tonygorb/Scenri/commit/ea0088d363d8d709ddb01549717c4fed1aa06aab))
|
|
12
|
+
* say every six hours everywhere the update check is disclosed ([78204c8](https://github.com/tonygorb/Scenri/commit/78204c8cfc26c3a9d856d399808f25396fe6084c))
|
|
13
|
+
|
|
14
|
+
## [0.4.4](https://github.com/tonygorb/Scenri/compare/v0.4.3...v0.4.4) (2026-08-23)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* cache the codex probe behind one shared runner and kill the whole tree on windows ([7c21235](https://github.com/tonygorb/Scenri/commit/7c212351231e4badcd49b8636f765dcb2ae0d73e))
|
|
20
|
+
* classify codex auth and verification failures where the user can act on them ([83c6512](https://github.com/tonygorb/Scenri/commit/83c651224095664cf439bf9ee0ea483d307bbd0d))
|
|
21
|
+
* harden the codex probe with timeouts, exe resolution and a version floor ([7c57808](https://github.com/tonygorb/Scenri/commit/7c578083b9dc665ea983cded464c0506db44ad3b))
|
|
22
|
+
* honest codex states and platform-aware setup copy in studio ([672195e](https://github.com/tonygorb/Scenri/commit/672195e373ea07940a8d661ed397ecd7d7e540e3))
|
|
23
|
+
* kill the whole install and login tree when a setup step times out on windows ([fa755a2](https://github.com/tonygorb/Scenri/commit/fa755a207b0cb81d53714d948867fce049a99171))
|
|
24
|
+
* leave the codex program token unquoted so npm cmd shims keep their own path ([72cd69d](https://github.com/tonygorb/Scenri/commit/72cd69dc3bbba1d8312d13c3be0379ecbde25d94))
|
|
25
|
+
* let taskkill own the windows kill so the process tree really dies ([340821a](https://github.com/tonygorb/Scenri/commit/340821a35d6db397ae5728047bbc5abf91a93e35))
|
|
26
|
+
* make Codex on Windows honest about readiness and unable to hang ([d698d5f](https://github.com/tonygorb/Scenri/commit/d698d5f526d9365e64e170819a61803ff0162f3e))
|
|
27
|
+
* recover codex images the windows sandbox could not move into the workdir ([4ce1d51](https://github.com/tonygorb/Scenri/commit/4ce1d51352d13f3afb83f190a9cb78bbc7427a0a))
|
|
28
|
+
* send codex prompts over stdin and watchdog silent or runaway generations ([35a7c1b](https://github.com/tonygorb/Scenri/commit/35a7c1bad5c9eea65df338f719ecd2f66065289f))
|
|
29
|
+
* set the codex version floor at the newest release verified working ([531a255](https://github.com/tonygorb/Scenri/commit/531a255b2a2e93a97b8620efa88a727cba06e43b))
|
|
30
|
+
|
|
3
31
|
## [0.4.3](https://github.com/tonygorb/Scenri/compare/v0.4.2...v0.4.3) (2026-08-23)
|
|
4
32
|
|
|
5
33
|
|
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ pnpm dev # starts the server on 127.0.0.1:4747
|
|
|
95
95
|
- **Iteration is the product.** A version tree, not a prompt box. Branch, compare, keep the winners.
|
|
96
96
|
- **Your brands are files, not hostages.** `.brand` is an open, documented format under a permissive license. Email one to a client. Any tool can adopt it.
|
|
97
97
|
- **Your AI, your cost.** Bring your own Codex CLI session or an API key. Experiments cost raw API price, or nothing at all on a local session. No credits that burn on a miss.
|
|
98
|
-
- **Local first, and it means it.** No account, no telemetry, no upload. The server binds to your machine only. Scenri makes exactly two requests on its own behalf: a
|
|
98
|
+
- **Local first, and it means it.** No account, no telemetry, no upload. The server binds to your machine only. Scenri makes exactly two requests on its own behalf: a version-number check against npm every six hours so updates can announce themselves (and, when one is found, the download of that release from npm, staged locally until you choose to restart), and a one-time download of the library imagery archive, cached locally forever after. Nothing about you or your work is ever sent, and both turn off: in Settings or `SCENRI_NO_UPDATE_CHECK=1` for the first, `SCENRI_NO_CONTENT_FETCH=1` for the second ([how updates work](https://github.com/tonygorb/scenri/blob/main/docs/updates.md)).
|
|
99
99
|
|
|
100
100
|
## Engines
|
|
101
101
|
|
|
@@ -4,9 +4,13 @@ import { existsSync, rmSync, mkdirSync, readFileSync, renameSync } from 'fs';
|
|
|
4
4
|
import { join, dirname } from 'path';
|
|
5
5
|
|
|
6
6
|
// src/update/check.ts
|
|
7
|
-
var
|
|
7
|
+
var CHECK_INTERVAL_MS = 6 * 60 * 60 * 1e3;
|
|
8
|
+
var TICK_MS = 15 * 60 * 1e3;
|
|
9
|
+
var JITTER_RATIO = 0.2;
|
|
8
10
|
var FORCE_COOLDOWN_MS = 60 * 1e3;
|
|
9
11
|
var TIMEOUT_MS = 5e3;
|
|
12
|
+
var MIN_INTERVAL_MS = 60 * 60 * 1e3;
|
|
13
|
+
var MIN_TICK_MS = 60 * 1e3;
|
|
10
14
|
function resolveRegistry(env = process.env, override) {
|
|
11
15
|
return (override ?? env.SCENRI_REGISTRY ?? "https://registry.npmjs.org").replace(/\/+$/, "");
|
|
12
16
|
}
|
|
@@ -32,6 +36,7 @@ async function fetchDistTagLatest(name, opts = {}) {
|
|
|
32
36
|
return { latest: null, error: String(err?.message ?? err) };
|
|
33
37
|
}
|
|
34
38
|
}
|
|
39
|
+
var isReleaseTriplet = (v) => /^\d+\.\d+\.\d+$/.test(v);
|
|
35
40
|
function triplet(v) {
|
|
36
41
|
const m = v.match(/^(\d+)\.(\d+)\.(\d+)$/);
|
|
37
42
|
return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;
|
|
@@ -50,7 +55,18 @@ function createUpdateChecker(deps) {
|
|
|
50
55
|
const env = deps.env ?? process.env;
|
|
51
56
|
const now = deps.now ?? Date.now;
|
|
52
57
|
const log = deps.log ?? console.log;
|
|
58
|
+
const random = deps.random ?? Math.random;
|
|
53
59
|
const registry = resolveRegistry(env, deps.registry);
|
|
60
|
+
const onNpm = registry.startsWith("https://registry.npmjs.org");
|
|
61
|
+
const envMs = (key) => {
|
|
62
|
+
const n = Number(env[key]);
|
|
63
|
+
return Number.isFinite(n) && n > 0 ? Math.floor(n) : null;
|
|
64
|
+
};
|
|
65
|
+
const rawInterval = envMs("SCENRI_UPDATE_INTERVAL_MS") ?? CHECK_INTERVAL_MS;
|
|
66
|
+
const intervalMs = onNpm ? Math.max(rawInterval, MIN_INTERVAL_MS) : rawInterval;
|
|
67
|
+
const rawTick = envMs("SCENRI_UPDATE_TICK_MS") ?? TICK_MS;
|
|
68
|
+
const tickMs = onNpm ? Math.max(rawTick, MIN_TICK_MS) : rawTick;
|
|
69
|
+
let jitterMs = random() * JITTER_RATIO * intervalMs;
|
|
54
70
|
const cached = () => {
|
|
55
71
|
const at = deps.store.getSetting("update.checkedAt");
|
|
56
72
|
return {
|
|
@@ -72,6 +88,7 @@ function createUpdateChecker(deps) {
|
|
|
72
88
|
if (res.error) return { ...cached(), error: res.error };
|
|
73
89
|
deps.store.setSetting("update.latest", res.latest ?? "");
|
|
74
90
|
deps.store.setSetting("update.checkedAt", String(now()));
|
|
91
|
+
jitterMs = random() * JITTER_RATIO * intervalMs;
|
|
75
92
|
const result = cached();
|
|
76
93
|
onResultFn?.(result);
|
|
77
94
|
return result;
|
|
@@ -80,7 +97,7 @@ function createUpdateChecker(deps) {
|
|
|
80
97
|
if (!enabled() && !force) return cached();
|
|
81
98
|
if (inflight) return inflight;
|
|
82
99
|
const prior = cached();
|
|
83
|
-
const fresh = prior.checkedAt !== null && now() - prior.checkedAt <
|
|
100
|
+
const fresh = prior.checkedAt !== null && now() - prior.checkedAt < intervalMs + jitterMs;
|
|
84
101
|
if (force) {
|
|
85
102
|
if (now() - lastForceAt < FORCE_COOLDOWN_MS) return prior;
|
|
86
103
|
lastForceAt = now();
|
|
@@ -94,7 +111,7 @@ function createUpdateChecker(deps) {
|
|
|
94
111
|
}
|
|
95
112
|
function schedule() {
|
|
96
113
|
setTimeout(() => void check(), 1e4).unref();
|
|
97
|
-
setInterval(() => void check(),
|
|
114
|
+
setInterval(() => void check(), tickMs).unref();
|
|
98
115
|
}
|
|
99
116
|
return {
|
|
100
117
|
enabled,
|
|
@@ -229,6 +246,6 @@ async function stageVersion(deps) {
|
|
|
229
246
|
return { ok: true, version, entry: entryOf(deps.home, deps.pkg, version) };
|
|
230
247
|
}
|
|
231
248
|
|
|
232
|
-
export { classify, createUpdateChecker, fetchDistTagLatest, findNpm, stageVersion };
|
|
233
|
-
//# sourceMappingURL=chunk-
|
|
234
|
-
//# sourceMappingURL=chunk-
|
|
249
|
+
export { classify, createUpdateChecker, fetchDistTagLatest, findNpm, isReleaseTriplet, stageVersion };
|
|
250
|
+
//# sourceMappingURL=chunk-FYQ5BAFA.js.map
|
|
251
|
+
//# sourceMappingURL=chunk-FYQ5BAFA.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { stageVersion, fetchDistTagLatest, findNpm } from './chunk-
|
|
1
|
+
import { stageVersion, fetchDistTagLatest, findNpm } from './chunk-FYQ5BAFA.js';
|
|
2
2
|
import { readMeta } from './chunk-Y3ZPBPLP.js';
|
|
3
3
|
import { defaultHome, newestStaged, compareSemver } from './chunk-4MAFHYAD.js';
|
|
4
4
|
|
|
@@ -63,5 +63,5 @@ async function runUpdateCommand(opts) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export { runUpdateCommand };
|
|
66
|
-
//# sourceMappingURL=cli-
|
|
67
|
-
//# sourceMappingURL=cli-
|
|
66
|
+
//# sourceMappingURL=cli-KSKENGIR.js.map
|
|
67
|
+
//# sourceMappingURL=cli-KSKENGIR.js.map
|
package/dist/index.js
CHANGED
|
@@ -70,7 +70,7 @@ try {
|
|
|
70
70
|
await (await import('./serve.js')).serve();
|
|
71
71
|
break;
|
|
72
72
|
case "update": {
|
|
73
|
-
const { runUpdateCommand } = await import('./cli-
|
|
73
|
+
const { runUpdateCommand } = await import('./cli-KSKENGIR.js');
|
|
74
74
|
process.exit(await runUpdateCommand(command));
|
|
75
75
|
break;
|
|
76
76
|
}
|