@deepseek-ai/dsh-fs 0.2.0-rc.1 → 0.2.1-alpha.1
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/package.json +9 -16
- package/lib/invariant.js +0 -37
- package/lib/types/invariant.d.ts +0 -13
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-fs",
|
|
3
3
|
"description": "Abstract filesystem capability seam (ctx.fs) for the DeepSeek Harness — vocabulary types, the FileSystem service (text IO + optional version-guarded atomic mutations), and the fs/* policy event vocabulary",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,31 +18,24 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./src/*": "./src/*",
|
|
26
22
|
"./package.json": "./package.json"
|
|
27
23
|
},
|
|
28
24
|
"files": [
|
|
29
25
|
"lib/index.js",
|
|
30
|
-
"lib/invariant.js",
|
|
31
26
|
"lib/types/**/*.d.ts"
|
|
32
27
|
],
|
|
33
28
|
"license": "MIT",
|
|
34
29
|
"peerDependencies": {
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-sandbox": "0.2.
|
|
38
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
39
|
-
"@deepseek-ai/dsh-invariants": "0.2.0-rc.1"
|
|
30
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
|
|
31
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.1",
|
|
32
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-alpha.1",
|
|
33
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1"
|
|
40
34
|
},
|
|
41
35
|
"devDependencies": {
|
|
42
|
-
"@deepseek-ai/dsh-brand": "0.2.
|
|
43
|
-
"@deepseek-ai/dsh-
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@deepseek-ai/
|
|
46
|
-
"@deepseek-ai/cordis": "~4.0.4"
|
|
36
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.1",
|
|
37
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
|
|
38
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-alpha.1",
|
|
39
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1"
|
|
47
40
|
}
|
|
48
41
|
}
|
package/lib/invariant.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
/** Package-owned filesystem event-data invariants. @module @deepseek-ai/dsh-fs/invariant */
|
|
3
|
-
const PACKAGE_NAME = "@deepseek-ai/dsh-fs";
|
|
4
|
-
/** Cordis companion plugin name. */
|
|
5
|
-
const name = "fs-invariant";
|
|
6
|
-
/** Service required before the companion can reserve package ownership. */
|
|
7
|
-
const inject = ["invariants"];
|
|
8
|
-
/** Assert that an event carries a usable opaque target identity. */
|
|
9
|
-
function validateTarget(target, fail) {
|
|
10
|
-
if (target.targetKey.length === 0) fail("filesystem event targetKey must be non-empty");
|
|
11
|
-
if (target.displayPath.length === 0) fail("filesystem event displayPath must be non-empty");
|
|
12
|
-
}
|
|
13
|
-
/** Install checks over the filesystem decision and observation event stream. */
|
|
14
|
-
const install = (ctx, fail) => {
|
|
15
|
-
ctx.on("internal/dispatch", (_mode, eventName, args) => {
|
|
16
|
-
if (eventName !== "fs/write-intent" && eventName !== "fs/edit-intent" && eventName !== "fs/observed") return;
|
|
17
|
-
validateTarget(args[0], fail);
|
|
18
|
-
if (eventName === "fs/observed") {
|
|
19
|
-
const observation = args[1];
|
|
20
|
-
switch (observation.kind) {
|
|
21
|
-
case "present":
|
|
22
|
-
if (observation.version.length === 0) fail("fs/observed present version must be non-empty");
|
|
23
|
-
break;
|
|
24
|
-
case "absent": break;
|
|
25
|
-
default: fail("fs/observed kind must be present or absent");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}, { global: true });
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Register the filesystem invariant companion.
|
|
32
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
33
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
34
|
-
*/
|
|
35
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
36
|
-
//#endregion
|
|
37
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** Package-owned filesystem event-data invariants. @module @deepseek-ai/dsh-fs/invariant */
|
|
2
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
-
/** Cordis companion plugin name. */
|
|
4
|
-
export declare const name = "fs-invariant";
|
|
5
|
-
/** Service required before the companion can reserve package ownership. */
|
|
6
|
-
export declare const inject: string[];
|
|
7
|
-
/**
|
|
8
|
-
* Register the filesystem invariant companion.
|
|
9
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
10
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
11
|
-
*/
|
|
12
|
-
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
13
|
-
//# sourceMappingURL=invariant.d.ts.map
|