@acryldev/harness-runtime 0.2.11 → 0.2.13
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 +15 -0
- package/lib/index.mjs +1 -36
- package/lib/index.mjs.map +1 -1
- package/lib/types/acryl-home.d.ts +0 -30
- package/lib/types/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/acryl-home.ts +1 -40
- package/src/index.ts +0 -3
- package/tests/bulkhead.spec.ts +10 -7
- package/tests/dump-system-prompt.spec.ts +1 -1
|
@@ -49,33 +49,3 @@ export declare function resolveAcrylHome(env?: Record<string, string | undefined
|
|
|
49
49
|
* clean-room test written that way passes while never being isolated.
|
|
50
50
|
*/
|
|
51
51
|
export declare function resolveAcrylDshHome(env?: Record<string, string | undefined>): string;
|
|
52
|
-
/**
|
|
53
|
-
* The isolated local-dev DSH home (`~/.acryl-dev/.dsh`) — a third root,
|
|
54
|
-
* deliberately sibling to (not nested inside) both `resolveAcrylDshHome`'s
|
|
55
|
-
* packaged-install default (`~/.acryl/.dsh`) and the stock DSH Desktop's
|
|
56
|
-
* plain `~/.dsh`, so a dev run never collides with either.
|
|
57
|
-
*
|
|
58
|
-
* `scripts/dev-local.mjs` at the repo root is this value's one canonical,
|
|
59
|
-
* hand-written definition (it runs before any workspace package builds, so
|
|
60
|
-
* it cannot import this module) and is what actually sets `$DSH_HOME` for
|
|
61
|
-
* `pnpm run dev`. Every *other* desktop dev-mode entry point - `apps/
|
|
62
|
-
* acryl-desktop/scripts/launch-dev.mjs`, `verify-loader-boot.mjs`,
|
|
63
|
-
* `verify-profile-boot.mjs` - runs strictly after that package already
|
|
64
|
-
* built, so they import this exported copy instead of re-deriving it, and
|
|
65
|
-
* default `$DSH_HOME` to it when unset. That is what makes running the
|
|
66
|
-
* desktop package's own script directly (`pnpm --filter acryl-desktop run
|
|
67
|
-
* dev`, bypassing the root orchestrator) resolve the identical isolated
|
|
68
|
-
* home rather than silently falling back to `resolveAcrylDshHome`'s
|
|
69
|
-
* packaged-install default - a real, reproduced footgun (2026-09-14) that
|
|
70
|
-
* this function exists to close for good.
|
|
71
|
-
*/
|
|
72
|
-
export declare const ACRYL_DEV_HOME_DIR_NAME = ".acryl-dev";
|
|
73
|
-
/** The isolated local-dev DSH home - see {@link ACRYL_DEV_HOME_DIR_NAME}'s doc comment. */
|
|
74
|
-
export declare function resolveAcrylDevDshHome(): string;
|
|
75
|
-
/**
|
|
76
|
-
* Default `$DSH_HOME` (in-place, on the given env) to the isolated
|
|
77
|
-
* local-dev home when neither `$ACRYL_HOME` nor `$DSH_HOME` is already set.
|
|
78
|
-
* Call this once, at the very top of a desktop dev-mode script, before
|
|
79
|
-
* anything else reads the environment.
|
|
80
|
-
*/
|
|
81
|
-
export declare function applyIsolatedDevHomeDefault(env?: Record<string, string | undefined>): void;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type { CodingCapabilities } from './engine-dsh.ts';
|
|
|
3
3
|
export type { DurableSessionMessage, DurableSessionMessagePort, DurableSessionMessageReceipt, } from './durable-message.ts';
|
|
4
4
|
export { createAcrylSessionBridge, type AcrylSessionBridge, type AcrylSessionBridgeOptions, } from './session-bridge.ts';
|
|
5
5
|
export { installSessionLogExporter, type InstallSessionLogExporterOptions, } from './session-log-exporter.ts';
|
|
6
|
-
export {
|
|
6
|
+
export { ACRYL_DSH_ENGINE_DIR_NAME, ACRYL_HOME_DIR_NAME, resolveAcrylDshHome, resolveAcrylHome, } from './acryl-home.ts';
|
|
7
7
|
export { createAcrylEngineHost, type AcrylEngineDefinition, type AcrylEngineHost, } from './engine-host.ts';
|
|
8
8
|
export { createDshEngineDefinition, createDshEngineDefinitionFromComposition, createProfileContext, createProfileRuntimeResolution, createWebEngineDefinition, pluginRequiredFrameworkPackages, profileRequiredFrameworkModules, materializeProfilePackage, UPSTREAM_PRODUCT_ANALYTICS_OFF, type AcrylFrameworkPackages, type DshEngineComposition, } from './engine-dsh.ts';
|
|
9
9
|
export { PackageOverlayNotFoundError, findOverlayPackage, packageNameFromSpecifier, resolveOverlayPackage, type PackageOverlayCandidate, type PackageOverlayOptions, type PackageOverlaySelection, type PackageOverlaySource, } from './package-overlay.ts';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acryldev/harness-runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "ACRYL's runtime around the DeepSeek Harness engine: resolves and composes each surface's profile (the harness plus every ACRYL plugin it runs - the composition root), the app instance and its homes, plugin lifecycle and doctor, the pinned pnpm, and the session bridge",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -162,11 +162,11 @@
|
|
|
162
162
|
"@deepseek-ai/dsh-workflow": "0.2.0-rc.2",
|
|
163
163
|
"@deepseek-ai/dsh-workflow-ptc": "0.2.0-rc.2",
|
|
164
164
|
"@deepseek-ai/schemastery": "~3.18.4",
|
|
165
|
-
"@acryldev/blends-core": "0.6.
|
|
166
|
-
"@acryldev/plugin-hub-core": "0.2.
|
|
167
|
-
"@acryldev/control": "0.3.
|
|
168
|
-
"@acryldev/web": "0.3.
|
|
169
|
-
"@acryldev/blends": "^1.7.
|
|
165
|
+
"@acryldev/blends-core": "0.6.2",
|
|
166
|
+
"@acryldev/plugin-hub-core": "0.2.4",
|
|
167
|
+
"@acryldev/control": "0.3.1",
|
|
168
|
+
"@acryldev/web": "0.3.1",
|
|
169
|
+
"@acryldev/blends": "^1.7.28",
|
|
170
170
|
"adm-zip": "^0.6.1",
|
|
171
171
|
"koffi": "3.1.5",
|
|
172
172
|
"pnpm": "11.11.0",
|
|
@@ -183,11 +183,11 @@
|
|
|
183
183
|
"tsdown": "0.22.2",
|
|
184
184
|
"typescript": "6.0.3",
|
|
185
185
|
"vitest": "4.1.11",
|
|
186
|
-
"@acryldev/coding-capabilities": "0.1.
|
|
187
|
-
"@acryldev/sign-in": "0.2.
|
|
188
|
-
"@acryldev/plugin-admin": "0.2.
|
|
189
|
-
"@acryldev/workspace": "0.2.
|
|
190
|
-
"@acryldev/plugin-context": "0.1.
|
|
186
|
+
"@acryldev/coding-capabilities": "0.1.1",
|
|
187
|
+
"@acryldev/sign-in": "0.2.3",
|
|
188
|
+
"@acryldev/plugin-admin": "0.2.2",
|
|
189
|
+
"@acryldev/workspace": "0.2.4",
|
|
190
|
+
"@acryldev/plugin-context": "0.1.2"
|
|
191
191
|
},
|
|
192
192
|
"peerDependencies": {
|
|
193
193
|
"@deepseek-ai/cordis": "4.0.4"
|
package/src/acryl-home.ts
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* @module @acryldev/harness-runtime/acryl-home
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
import {
|
|
29
|
+
import { selectInstance } from './instance/index.ts'
|
|
30
30
|
|
|
31
31
|
/** ACRYL's own root directory name under the OS home. */
|
|
32
32
|
export const ACRYL_HOME_DIR_NAME = '.acryl'
|
|
@@ -62,42 +62,3 @@ export function resolveAcrylHome(env: Record<string, string | undefined> = proce
|
|
|
62
62
|
export function resolveAcrylDshHome(env: Record<string, string | undefined> = process.env): string {
|
|
63
63
|
return selectInstance({ env }).dshHome
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* The isolated local-dev DSH home (`~/.acryl-dev/.dsh`) — a third root,
|
|
68
|
-
* deliberately sibling to (not nested inside) both `resolveAcrylDshHome`'s
|
|
69
|
-
* packaged-install default (`~/.acryl/.dsh`) and the stock DSH Desktop's
|
|
70
|
-
* plain `~/.dsh`, so a dev run never collides with either.
|
|
71
|
-
*
|
|
72
|
-
* `scripts/dev-local.mjs` at the repo root is this value's one canonical,
|
|
73
|
-
* hand-written definition (it runs before any workspace package builds, so
|
|
74
|
-
* it cannot import this module) and is what actually sets `$DSH_HOME` for
|
|
75
|
-
* `pnpm run dev`. Every *other* desktop dev-mode entry point - `apps/
|
|
76
|
-
* acryl-desktop/scripts/launch-dev.mjs`, `verify-loader-boot.mjs`,
|
|
77
|
-
* `verify-profile-boot.mjs` - runs strictly after that package already
|
|
78
|
-
* built, so they import this exported copy instead of re-deriving it, and
|
|
79
|
-
* default `$DSH_HOME` to it when unset. That is what makes running the
|
|
80
|
-
* desktop package's own script directly (`pnpm --filter acryl-desktop run
|
|
81
|
-
* dev`, bypassing the root orchestrator) resolve the identical isolated
|
|
82
|
-
* home rather than silently falling back to `resolveAcrylDshHome`'s
|
|
83
|
-
* packaged-install default - a real, reproduced footgun (2026-09-14) that
|
|
84
|
-
* this function exists to close for good.
|
|
85
|
-
*/
|
|
86
|
-
export const ACRYL_DEV_HOME_DIR_NAME = '.acryl-dev'
|
|
87
|
-
|
|
88
|
-
/** The isolated local-dev DSH home - see {@link ACRYL_DEV_HOME_DIR_NAME}'s doc comment. */
|
|
89
|
-
export function resolveAcrylDevDshHome(): string {
|
|
90
|
-
return developmentInstance(osHomeDirectory()).dshHome
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Default `$DSH_HOME` (in-place, on the given env) to the isolated
|
|
95
|
-
* local-dev home when neither `$ACRYL_HOME` nor `$DSH_HOME` is already set.
|
|
96
|
-
* Call this once, at the very top of a desktop dev-mode script, before
|
|
97
|
-
* anything else reads the environment.
|
|
98
|
-
*/
|
|
99
|
-
export function applyIsolatedDevHomeDefault(env: Record<string, string | undefined> = process.env): void {
|
|
100
|
-
// Nothing chosen yet (the default instance): become the isolated development app, the same family `scripts/dev-local.mjs` launches.
|
|
101
|
-
if (selectInstance({ env }).kind !== 'default') return
|
|
102
|
-
Object.assign(env, instanceEnvironment(developmentInstance(osHomeDirectory())))
|
|
103
|
-
}
|
package/src/index.ts
CHANGED
|
@@ -21,11 +21,8 @@ export {
|
|
|
21
21
|
type InstallSessionLogExporterOptions,
|
|
22
22
|
} from './session-log-exporter.ts'
|
|
23
23
|
export {
|
|
24
|
-
ACRYL_DEV_HOME_DIR_NAME,
|
|
25
24
|
ACRYL_DSH_ENGINE_DIR_NAME,
|
|
26
25
|
ACRYL_HOME_DIR_NAME,
|
|
27
|
-
applyIsolatedDevHomeDefault,
|
|
28
|
-
resolveAcrylDevDshHome,
|
|
29
26
|
resolveAcrylDshHome,
|
|
30
27
|
resolveAcrylHome,
|
|
31
28
|
} from './acryl-home.ts'
|
package/tests/bulkhead.spec.ts
CHANGED
|
@@ -15,7 +15,6 @@ import { createWebEngineDefinition } from '../src/engine-dsh.ts'
|
|
|
15
15
|
import { createAcrylEngineHost } from '../src/engine-host.ts'
|
|
16
16
|
import type { AppInstance } from '../src/instance/index.ts'
|
|
17
17
|
import { fileURLToPath } from 'node:url'
|
|
18
|
-
import { inBlendApp } from '../../../scripts/lib/blend-apps.mjs'
|
|
19
18
|
import { codingCapabilities } from '@acryldev/coding-capabilities'
|
|
20
19
|
|
|
21
20
|
const repo = realpathSync(fileURLToPath(new URL('../../..', import.meta.url)))
|
|
@@ -33,6 +32,7 @@ const ALLOWED: Readonly<Record<string, string>> = {
|
|
|
33
32
|
// library plugin stays under this scan.
|
|
34
33
|
'plugins/instance/home.ts': 'the framework\'s instance home selector for Blend apps, the counterpart of src/instance/select.ts outside ACRYL\'s runtime',
|
|
35
34
|
'plugins/workspace/src/pty/service.ts': 'a terminal starts in the user\'s own home folder when the cwd is gone; not ACRYL state',
|
|
35
|
+
'runtime/app-persistence/src/github-login.ts': 'the one GitHub connection every ACRYL app and Control Center share lives in the person\'s ~/.acryl (ACRYL_LAUNCHER_HOME moves it), the launcher\'s own rule; it is a credential of the person, not app state',
|
|
36
36
|
'plugins/launcher-desktop/blend/host/index.ts': 'the launcher Blend runs outside ACRYL\'s runtime (no appInstance); its home is ~/.acryl, the one home of every ACRYL app',
|
|
37
37
|
'scripts/graft-deepscan.mjs': 'a repository indexing tool; not part of any app',
|
|
38
38
|
'scripts/real-home-guard.mjs': 'the gate\'s auditor: it must know the OS user\'s real homes to prove no test changed one; it only reads them, and it is not part of any app',
|
|
@@ -55,8 +55,8 @@ function sources(dir: string): string[] {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
* Every home read outside ALLOWED under `root`'s ROOTS.
|
|
59
|
-
*
|
|
58
|
+
* Every home read outside ALLOWED under `root`'s ROOTS. framework/ is not scanned: it runs on the framework's own instance plugin outside ACRYL's
|
|
59
|
+
* runtime (spec 051 T013, D5). The Blend apps that once lived in apps/ are in their own repositories now.
|
|
60
60
|
*/
|
|
61
61
|
function offencesIn(root: string): string[] {
|
|
62
62
|
const offences: string[] = []
|
|
@@ -69,7 +69,7 @@ function offencesIn(root: string): string[] {
|
|
|
69
69
|
}
|
|
70
70
|
for (const file of files) {
|
|
71
71
|
const path = relative(root, file).split(sep).join('/')
|
|
72
|
-
if (path in ALLOWED
|
|
72
|
+
if (path in ALLOWED) continue
|
|
73
73
|
const text = readFileSync(file, 'utf8').split('\n')
|
|
74
74
|
text.forEach((line, index) => {
|
|
75
75
|
if (/^\s*(\*|\/\/)/u.test(line)) return // comments may name the variables
|
|
@@ -85,15 +85,18 @@ describe('bulkhead architecture', () => {
|
|
|
85
85
|
expect(offencesIn(repo)).toEqual([])
|
|
86
86
|
})
|
|
87
87
|
|
|
88
|
-
it('a folder that grows a blend.yaml is still scanned
|
|
88
|
+
it('a folder that grows a blend.yaml is still scanned', async () => {
|
|
89
89
|
const root = await mkdtemp(join(tmpdir(), 'bulkhead-'))
|
|
90
90
|
try {
|
|
91
|
-
for (const folder of ['plugins/x', 'apps/
|
|
91
|
+
for (const folder of ['plugins/x', 'apps/y']) {
|
|
92
92
|
mkdirSync(join(root, folder, 'src'), { recursive: true })
|
|
93
93
|
writeFileSync(join(root, folder, 'blend.yaml'), 'id: x\n')
|
|
94
94
|
writeFileSync(join(root, folder, 'src', 'home.ts'), "import { homedir } from 'node:os'\nexport const home = homedir()\n")
|
|
95
95
|
}
|
|
96
|
-
expect(offencesIn(root)).toEqual([
|
|
96
|
+
expect(offencesIn(root)).toEqual([
|
|
97
|
+
'apps/y/src/home.ts:2 homedir(): export const home = homedir()',
|
|
98
|
+
'plugins/x/src/home.ts:2 homedir(): export const home = homedir()',
|
|
99
|
+
])
|
|
97
100
|
} finally {
|
|
98
101
|
await rm(root, { recursive: true, force: true })
|
|
99
102
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OPT-IN generator for `docs/system-prompt/current/{web,cli}.md`. Skipped unless `ACRYL_DUMP_SYSTEM_PROMPT` names an output directory
|
|
3
|
-
* (relative to the repository root).
|
|
3
|
+
* (relative to the repository root).
|
|
4
4
|
*
|
|
5
5
|
* ACRYL_DUMP_SYSTEM_PROMPT=docs/system-prompt/current corepack pnpm --filter @acryldev/harness-runtime exec vitest run tests/dump-system-prompt.spec.ts
|
|
6
6
|
*/
|