@melite/harness-provisioner 0.1.5-pre-alpha → 0.2.0-alpha
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/LICENSE +561 -457
- package/bin/infer-provision.mjs +45 -3
- package/package.json +12 -15
package/bin/infer-provision.mjs
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
import { execSync } from 'node:child_process'
|
|
40
40
|
import { createHash } from 'node:crypto'
|
|
41
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from 'node:fs'
|
|
41
|
+
import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from 'node:fs'
|
|
42
42
|
import { dirname, join, resolve } from 'node:path'
|
|
43
43
|
import { fileURLToPath } from 'node:url'
|
|
44
44
|
import process from 'node:process'
|
|
@@ -59,6 +59,13 @@ const ESTATE_AGENT_ROUTE = flag('--estate-agent-route', '')
|
|
|
59
59
|
const ESTATE_STATE_ROOT = flag('--estate-state-root', '')
|
|
60
60
|
const PROFILE_ROWS = flag('--profile-rows', '')
|
|
61
61
|
|
|
62
|
+
|
|
63
|
+
// files IT rendered. A package.json with no provenance stamp naming
|
|
64
|
+
// this renderer (a hand-composed profile, another tool's output)
|
|
65
|
+
|
|
66
|
+
// original gone. See the guard at the package.json write.
|
|
67
|
+
const FORCE_RENDER = argv.includes('--force-render')
|
|
68
|
+
|
|
62
69
|
const log = (...a) => console.log(...a)
|
|
63
70
|
const die = (msg) => { console.error('infer-provision: ' + msg); process.exit(1) }
|
|
64
71
|
|
|
@@ -200,7 +207,7 @@ const PROFILE_BASES = {
|
|
|
200
207
|
'melite-test': ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app', '@melite/harness-provisioner',
|
|
201
208
|
'@melite/harness-tools', '@melite-plugin/dsh-estate', '@melite/card-base', '@melite/three-client',
|
|
202
209
|
'@melite-plugin/dsh-card-view', '@melite-plugin/dsh-card-deck', '@melite-plugin/dsh-gallery',
|
|
203
|
-
'@melite/video-h3-timeline', '@melite/motion-motion'],
|
|
210
|
+
'@melite/video-h3-timeline', '@melite/motion-motion', '@melite/image-input-prep'],
|
|
204
211
|
// headless = the agent server: one-shot task runner + the tools
|
|
205
212
|
// plane (harness-tools self-registers its melite-tools row; the
|
|
206
213
|
// renderer disables the web-plane doors row in this mount).
|
|
@@ -327,6 +334,24 @@ function renderProfile(name) { // In-box bundles (@deepseek-ai/*) resolve from
|
|
|
327
334
|
const pkgPath = join(dst, 'package.json')
|
|
328
335
|
let pkg = { name: 'dsh-profile-' + name, private: true, dependencies: {} }
|
|
329
336
|
if (existsSync(pkgPath)) {
|
|
337
|
+
// F1 refuse-or-backup: without a stamp naming THIS renderer the
|
|
338
|
+
// render dies loud; --force-render backs the file up and proceeds.
|
|
339
|
+
// A file with our own stamp re-renders freely — the no-drift law
|
|
340
|
+
// (the renderer owns its output wholesale) is unchanged.
|
|
341
|
+
if (!FORCE_RENDER) {
|
|
342
|
+
let mine = false
|
|
343
|
+
try {
|
|
344
|
+
const prov = JSON.parse(readFileSync(join(dst, 'render-provenance.json'), 'utf8'))
|
|
345
|
+
mine = prov !== null && typeof prov === 'object' && prov.renderer === 'infer-provision'
|
|
346
|
+
} catch { /* no stamp, or unparseable: not provably ours */ }
|
|
347
|
+
if (!mine) {
|
|
348
|
+
die('refusing to overwrite ' + pkgPath + ' — no render-provenance.json names this renderer '
|
|
349
|
+
+ '(a hand-composed or foreign file). Move it aside, or pass --force-render to back it up '
|
|
350
|
+
+ 'as package.json.prerender.bak and re-render')
|
|
351
|
+
}
|
|
352
|
+
} else {
|
|
353
|
+
copyFileSync(pkgPath, pkgPath + '.prerender.bak')
|
|
354
|
+
}
|
|
330
355
|
try { pkg = JSON.parse(readFileSync(pkgPath, 'utf8')) } catch { /* re-render */ }
|
|
331
356
|
}
|
|
332
357
|
pkg.name = pkg.name || 'dsh-profile-' + name
|
|
@@ -376,16 +401,33 @@ function renderProfile(name) { // In-box bundles (@deepseek-ai/*) resolve from
|
|
|
376
401
|
// render's own repo root), so the runs/drafts seats never boot
|
|
377
402
|
// unpinned (they refuse loud by design). agentRoute names the agent
|
|
378
403
|
// brain (provider/model); absent, the estate logs the engine unseated
|
|
379
|
-
// — the honest state, never a silent default.
|
|
404
|
+
// — the honest state, never a silent default. acquireStallTimeoutMs
|
|
405
|
+
|
|
406
|
+
// the lane rides a pinned 10s, never the library default by accident.
|
|
407
|
+
|
|
408
|
+
// downloads-stream audit): the lane is the long-lived process that
|
|
409
|
+
// owns fetch lifetimes — its durable claim ticker claims requested
|
|
410
|
+
// rows and stamps the claimer heartbeat, so a headless press's
|
|
411
|
+
// wanted download survives its own session dying. A non-web mount
|
|
412
|
+
// (headless task, estate job server) is short-lived: a claimer in
|
|
413
|
+
// it would orphan every fetch it died mid-flight, so its presses
|
|
414
|
+
// take their own wire, exactly as before.
|
|
380
415
|
const estateRow = bundles.includes('@melite-plugin/dsh-estate')
|
|
381
416
|
? '# ESTATE SEAT PIN — the estate row config owns every seat:\n'
|
|
382
417
|
+ '# repoRoot pins the runs/drafts seats (unpinned boots refuse loud);\n'
|
|
383
418
|
+ '# stateRoot overrides it (J12: walls render hermetic roots by\n'
|
|
384
419
|
+ '# config — stateRoot wins over repoRoot in the queue seat).\n'
|
|
385
420
|
+ '# agentRoute names the agent brain (absent = unseated, logged loud).\n'
|
|
421
|
+
+ '# acquireStallTimeoutMs: the deliberate stall budget (audit F7).\n'
|
|
422
|
+
+ (webMount
|
|
423
|
+
? '# durableDownloads: the lane claims requested rows (the lifetime\n'
|
|
424
|
+
+ '# finding) — long-lived web mounts only, never a task process.\n'
|
|
425
|
+
: '')
|
|
386
426
|
+ '- id: melite-estate\n'
|
|
387
427
|
+ ' config:\n'
|
|
388
428
|
+ ' repoRoot: ' + JSON.stringify(resolve(PROVISIONER, '../../..')) + '\n'
|
|
429
|
+
+ ' acquireStallTimeoutMs: 10000\n'
|
|
430
|
+
+ (webMount ? ' durableDownloads: true\n' : '')
|
|
389
431
|
+ (ESTATE_STATE_ROOT
|
|
390
432
|
? ' stateRoot: ' + JSON.stringify(ESTATE_STATE_ROOT) + '\n'
|
|
391
433
|
: '')
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@melite/harness-provisioner",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "0.2.0-alpha",
|
|
4
|
+
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"description": "Vanilla-DSH provisioner for the inference.cpp media stack: one bundle mounts the estate row (in-process seats, no second process), the tool surface, the card view/deck, media previews, and the runs gallery — and the infer-provision bin renders ready-to-boot profiles (inference / headless / estate / melite-test) into any DSH_HOME.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -26,26 +26,23 @@
|
|
|
26
26
|
"typescript": "^5.9.3"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@deepseek-ai/dsh-llm-pi-ai": "0.2.
|
|
30
|
-
"@melite-plugin/dsh-
|
|
31
|
-
"@melite-plugin/dsh-card-
|
|
32
|
-
"@melite
|
|
33
|
-
"@melite-plugin/dsh-
|
|
34
|
-
"@melite/
|
|
35
|
-
"@melite/
|
|
36
|
-
"@melite/
|
|
37
|
-
"@melite/video-h3-timeline": "0.
|
|
29
|
+
"@deepseek-ai/dsh-llm-pi-ai": "0.2.1-rc.2",
|
|
30
|
+
"@melite-plugin/dsh-gallery": "0.2.0-alpha",
|
|
31
|
+
"@melite-plugin/dsh-card-deck": "0.2.0-alpha",
|
|
32
|
+
"@melite/harness-tools": "0.2.0-alpha",
|
|
33
|
+
"@melite-plugin/dsh-estate": "0.2.0-alpha",
|
|
34
|
+
"@melite/3d-img-to-mesh": "0.2.0-alpha",
|
|
35
|
+
"@melite-plugin/dsh-card-view": "0.2.0-alpha",
|
|
36
|
+
"@melite/motion-motion": "0.2.0-alpha",
|
|
37
|
+
"@melite/video-h3-timeline": "0.2.0-alpha"
|
|
38
38
|
},
|
|
39
39
|
"dsh": {
|
|
40
40
|
"bundle": {
|
|
41
41
|
"patch": "./cordis.patch.yml"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
"engines": {
|
|
45
|
-
"dsh": ">=0.1.1-rc.1"
|
|
46
|
-
},
|
|
47
44
|
"peerDependencies": {
|
|
48
|
-
"@deepseek-ai/dsh": ">=0.2.
|
|
45
|
+
"@deepseek-ai/dsh": ">=0.2.1-rc.2 <0.3.0"
|
|
49
46
|
},
|
|
50
47
|
"scripts": {
|
|
51
48
|
"build": "tsc -p tsconfig.build.json",
|