dsh-model-everything 0.4.0 → 0.5.0
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.en-US.md +63 -19
- package/README.md +373 -345
- package/cordis.patch.yml +9 -0
- package/diagram/package.json +5 -0
- package/lib/client.js +1273 -0
- package/lib/diagram-diff-tool.js +90 -0
- package/lib/diagram-render-tool.js +102 -0
- package/lib/diagram-review-tool.js +99 -0
- package/lib/diagram.js +43 -0
- package/lib/gate.js +14 -12
- package/lib/presentation.js +10 -0
- package/lib/render/budget.js +99 -0
- package/lib/render/collapse.js +163 -0
- package/lib/render/diff.js +138 -0
- package/lib/render/from-mermaid.js +211 -0
- package/lib/render/from-plantuml.js +158 -0
- package/lib/render/index.js +42 -0
- package/lib/render/layout.js +52 -0
- package/lib/render/model.js +17 -0
- package/lib/render/paint.js +194 -0
- package/lib/render/palette.js +127 -0
- package/lib/render/place.js +210 -0
- package/lib/render/svg.js +107 -0
- package/lib/render/viewmodel.js +126 -0
- package/lib/render/write.js +14 -0
- package/lib/scan.js +248 -8
- package/lib/structure-tool.js +2 -2
- package/lib/types/client.d.ts +83 -0
- package/lib/types/diagram-diff-tool.d.ts +8 -0
- package/lib/types/diagram-render-tool.d.ts +8 -0
- package/lib/types/diagram-review-tool.d.ts +8 -0
- package/lib/types/diagram.d.ts +34 -0
- package/lib/types/presentation.d.ts +7 -0
- package/lib/types/render/budget.d.ts +55 -0
- package/lib/types/render/collapse.d.ts +23 -0
- package/lib/types/render/diff.d.ts +44 -0
- package/lib/types/render/from-mermaid.d.ts +27 -0
- package/lib/types/render/from-plantuml.d.ts +27 -0
- package/lib/types/render/index.d.ts +38 -0
- package/lib/types/render/layout.d.ts +22 -0
- package/lib/types/render/model.d.ts +56 -0
- package/lib/types/render/paint.d.ts +94 -0
- package/lib/types/render/palette.d.ts +41 -0
- package/lib/types/render/place.d.ts +39 -0
- package/lib/types/render/svg.d.ts +19 -0
- package/lib/types/render/viewmodel.d.ts +20 -0
- package/lib/types/render/write.d.ts +14 -0
- package/lib/types/scan.d.ts +10 -2
- package/lib/types/structure.d.ts +1 -0
- package/package.json +148 -131
- package/skills/model-everything/SKILL.md +454 -454
- package/skills/model-everything/references/architecture-domains.md +137 -0
- package/skills/model-everything/references/architecture-views.md +119 -0
- package/skills/model-everything-diagram/SKILL.md +82 -0
- package/src/client.ts +307 -0
- package/src/diagram-diff-tool.ts +94 -0
- package/src/diagram-render-tool.ts +108 -0
- package/src/diagram-review-tool.ts +109 -0
- package/src/diagram.ts +61 -0
- package/src/gate.ts +14 -12
- package/src/presentation.ts +12 -0
- package/src/render/budget.ts +135 -0
- package/src/render/collapse.ts +155 -0
- package/src/render/diff.ts +162 -0
- package/src/render/from-mermaid.ts +236 -0
- package/src/render/from-plantuml.ts +178 -0
- package/src/render/index.ts +73 -0
- package/src/render/layout.ts +62 -0
- package/src/render/model.ts +67 -0
- package/src/render/paint.ts +290 -0
- package/src/render/palette.ts +164 -0
- package/src/render/place.ts +234 -0
- package/src/render/svg.ts +127 -0
- package/src/render/viewmodel.ts +136 -0
- package/src/render/write.ts +17 -0
- package/src/scan.ts +807 -564
- package/src/structure-tool.ts +2 -2
- package/src/structure.ts +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a tool card shows, reduced to a drawing.
|
|
3
|
+
*
|
|
4
|
+
* The input is what the host hands a settled tool view: a phase and a block whose shape differs per phase.
|
|
5
|
+
* A settled call carries the paired call's arguments as a **lazy view** (`PartialArguments`) and the result
|
|
6
|
+
* as content blocks, so nothing here reads `block.args.model`: the view is asked, and the report text is
|
|
7
|
+
* parsed for the two facts a drawing needs. Every reader is total - an absent field removes a shape rather
|
|
8
|
+
* than throwing, because the same view renders during streaming.
|
|
9
|
+
*
|
|
10
|
+
* Pure. Everything decided here is a fact a test can assert: which nodes exist, which edges, why they are
|
|
11
|
+
* coloured the way they are.
|
|
12
|
+
*/
|
|
13
|
+
import type { Diagram } from './model.js';
|
|
14
|
+
export interface ViewInput {
|
|
15
|
+
phase?: unknown;
|
|
16
|
+
toolName?: unknown;
|
|
17
|
+
/** The whole block the host hands a view; its shape depends on the phase. */
|
|
18
|
+
block?: unknown;
|
|
19
|
+
}
|
|
20
|
+
export declare function viewModel(input: ViewInput): Diagram;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writing a drawing to disk: the CLI's job, kept out of the renderer.
|
|
3
|
+
*
|
|
4
|
+
* `render/index.ts` is bundled into the page as well as run in Node, so it may not import a filesystem;
|
|
5
|
+
* everything that touches one lives here, where only the host reaches it.
|
|
6
|
+
*/
|
|
7
|
+
import { type RenderInput, type Rendered } from './index.js';
|
|
8
|
+
import type { Palette, PaletteOptions } from './palette.js';
|
|
9
|
+
/** Write the drawing where a document can link to it. Returns the path, the byte count and the render. */
|
|
10
|
+
export declare function writeSvg(input: RenderInput, path: string, overrides?: Partial<Palette>, options?: PaletteOptions): {
|
|
11
|
+
path: string;
|
|
12
|
+
bytes: number;
|
|
13
|
+
rendered: Rendered;
|
|
14
|
+
};
|
package/lib/types/scan.d.ts
CHANGED
|
@@ -8,10 +8,17 @@ export interface ScannedGraph {
|
|
|
8
8
|
edges: ScannedEdge[];
|
|
9
9
|
/** Files read, and files skipped because they are not source. */
|
|
10
10
|
filesRead: number;
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Specifiers that are project-internal but did not resolve: a relative path that leaves the root or names
|
|
13
|
+
* no file, and an alias-shaped specifier (`@/x`, `~/x`, `#x`) that no `tsconfig`/`jsconfig` declares.
|
|
14
|
+
*/
|
|
12
15
|
unresolved: string[];
|
|
13
|
-
/** Bare specifiers seen
|
|
16
|
+
/** Bare specifiers seen, counted once each: external packages and, for a package language, a package
|
|
17
|
+
* path this tree does not contain. */
|
|
14
18
|
packages: string[];
|
|
19
|
+
/** Import calls whose target is computed at run time. No static scan can resolve them, so they are
|
|
20
|
+
* counted rather than guessed. */
|
|
21
|
+
dynamic: number;
|
|
15
22
|
/** Which languages were scanned, and at what granularity. */
|
|
16
23
|
languages: {
|
|
17
24
|
language: string;
|
|
@@ -28,6 +35,7 @@ export interface Language {
|
|
|
28
35
|
extract(text: string): {
|
|
29
36
|
local: string[];
|
|
30
37
|
external: string[];
|
|
38
|
+
dynamic?: number;
|
|
31
39
|
};
|
|
32
40
|
}
|
|
33
41
|
/** Every language this scan understands, by extension. */
|
package/lib/types/structure.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,131 +1,148 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-model-everything",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Modeling abstraction and automated review for designs and code, including a refactoring harness:
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"types": "lib/types/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./lib/types/index.d.ts",
|
|
11
|
-
"default": "./lib/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./gate": {
|
|
14
|
-
"types": "./lib/types/gate.d.ts",
|
|
15
|
-
"default": "./lib/gate.js"
|
|
16
|
-
},
|
|
17
|
-
"./gate/package.json": "./gate/package.json",
|
|
18
|
-
"./gate/locale/*.json": "./gate/locale/*.json",
|
|
19
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
20
|
-
"./package.json": "./package.json",
|
|
21
|
-
"./locale/*.json": "./locale/*.json"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"0.
|
|
52
|
-
"0.
|
|
53
|
-
"0.
|
|
54
|
-
"0.2.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"@deepseek-ai/
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"@deepseek-ai/
|
|
100
|
-
"@
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
}
|
|
131
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-model-everything",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Modeling abstraction, architecture visualisation and automated review for designs and code, including a refactoring harness: draw a Mermaid or PlantUML source and measure its structure, executable verification of machines and protocols with before/after regression, data-model and migration checks, concurrency claim routing, export to external checkers, dependency-graph review, and report diffing. Native plugin for DeepSeek Harness (dsh).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/types/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./gate": {
|
|
14
|
+
"types": "./lib/types/gate.d.ts",
|
|
15
|
+
"default": "./lib/gate.js"
|
|
16
|
+
},
|
|
17
|
+
"./gate/package.json": "./gate/package.json",
|
|
18
|
+
"./gate/locale/*.json": "./gate/locale/*.json",
|
|
19
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
20
|
+
"./package.json": "./package.json",
|
|
21
|
+
"./locale/*.json": "./locale/*.json",
|
|
22
|
+
"./client": "./lib/client.js",
|
|
23
|
+
"./diagram": {
|
|
24
|
+
"types": "./lib/types/diagram.d.ts",
|
|
25
|
+
"default": "./lib/diagram.js"
|
|
26
|
+
},
|
|
27
|
+
"./diagram/package.json": "./diagram/package.json"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"lib",
|
|
31
|
+
"src",
|
|
32
|
+
"skills",
|
|
33
|
+
"cordis.patch.yml",
|
|
34
|
+
"examples",
|
|
35
|
+
"gate",
|
|
36
|
+
"locale",
|
|
37
|
+
"diagram"
|
|
38
|
+
],
|
|
39
|
+
"dsh": {
|
|
40
|
+
"engines": {
|
|
41
|
+
"dsh": "^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-rc.4"
|
|
42
|
+
},
|
|
43
|
+
"category": "tools/dev",
|
|
44
|
+
"displayName": "dsh-model-everything",
|
|
45
|
+
"bundle": {
|
|
46
|
+
"patch": "./cordis.patch.yml"
|
|
47
|
+
},
|
|
48
|
+
"compatibility": {
|
|
49
|
+
"dsh": "^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-rc.4",
|
|
50
|
+
"dshReleases": {
|
|
51
|
+
"0.1.7-alpha.2": "compatible",
|
|
52
|
+
"0.1.7-rc.1": "compatible",
|
|
53
|
+
"0.1.7-rc.2": "compatible",
|
|
54
|
+
"0.2.0-rc.1": "compatible",
|
|
55
|
+
"0.2.0-rc.2": "compatible",
|
|
56
|
+
"0.2.1-alpha.1": "compatible",
|
|
57
|
+
"0.2.1-alpha.2": "compatible",
|
|
58
|
+
"0.2.1-alpha.3": "compatible",
|
|
59
|
+
"0.2.1-alpha.4": "compatible",
|
|
60
|
+
"0.2.1-alpha.5": "compatible",
|
|
61
|
+
"0.2.1-rc.2": "compatible",
|
|
62
|
+
"0.2.1-rc.3": "compatible",
|
|
63
|
+
"0.2.1-rc.4": "compatible"
|
|
64
|
+
},
|
|
65
|
+
"profiles": [
|
|
66
|
+
"headless",
|
|
67
|
+
"web"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"client": {
|
|
71
|
+
"platform": "web",
|
|
72
|
+
"immediately": true,
|
|
73
|
+
"inject": []
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"build": "tsc -p tsconfig.json && node scripts/build-client.mjs",
|
|
78
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
79
|
+
"lint:md": "markdownlint --dot --ignore \"**/node_modules/**\" .",
|
|
80
|
+
"bump": "node scripts/bump-version.mjs",
|
|
81
|
+
"test:cards": "node tests/presentation/run.mjs && node tests/automaton/run.mjs && node tests/routing/run.mjs",
|
|
82
|
+
"coverage": "c8 --reporter=text --exclude-after-remap=false npm run test:engine",
|
|
83
|
+
"test:engine": "npm run build && node tests/engine/run.mjs && node tests/design-engine/run.mjs && node tests/catalog/run.mjs && node tests/data-engine/run.mjs && node tests/concurrency/run.mjs && node tests/uml/run.mjs && node tests/apply-smoke.mjs && node tests/memory/run.mjs && node tests/skills/run.mjs && node tests/gate/run.mjs && node tests/skill-routing/run.mjs && node tests/toolset/run.mjs && node tests/principles/run.mjs && node tests/feature-checklist/run.mjs && node tests/usage/run.mjs && node tests/translation/run.mjs && node tests/documentation/run.mjs && node tests/contributing/run.mjs && node tests/routing-map/run.mjs && node tests/report-reading/run.mjs && node tests/structure/run.mjs && node tests/automaton/run.mjs && node tests/diagram/run.mjs && node tests/client/run.mjs && node tests/render/run.mjs && node tests/presentation/run.mjs && node tests/routing/run.mjs && node tests/tool-routing/run.mjs && node tests/tools/run.mjs && node tests/baseline/run.mjs && node tests/granularity/run.mjs && node tests/exporters/run.mjs && node tests/report-view/run.mjs && node tests/contracts/run.mjs && node tests/tool-boundary/run.mjs && node tests/negatives/run.mjs && node tests/external/run.mjs",
|
|
84
|
+
"test:full": "npm run build && node tests/full-suite.mjs",
|
|
85
|
+
"check": "npm run lint:md && npm run test:engine",
|
|
86
|
+
"build:client": "node scripts/build-client.mjs"
|
|
87
|
+
},
|
|
88
|
+
"peerDependencies": {
|
|
89
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
90
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-rc.4",
|
|
91
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-rc.4",
|
|
92
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-rc.4",
|
|
93
|
+
"@deepseek-ai/dsh-skill-filesystem": "^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-rc.4",
|
|
94
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-rc.4",
|
|
95
|
+
"@deepseek-ai/schemastery": "^3.18.5",
|
|
96
|
+
"dsh": "^0.1.7-alpha.2 || ^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1 || ^0.2.1-rc.4"
|
|
97
|
+
},
|
|
98
|
+
"devDependencies": {
|
|
99
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
100
|
+
"@deepseek-ai/dsh-agent": "^0.2.0-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-cordis-host-runner": "^0.2.0-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-home-paths": "^0.2.0-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-invariants": "^0.2.0-rc.2",
|
|
104
|
+
"@deepseek-ai/dsh-llm": "^0.2.0-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-ptc-runtime": "^0.2.0-rc.2",
|
|
106
|
+
"@deepseek-ai/dsh-sandbox": "^0.2.0-rc.2",
|
|
107
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.2.0-rc.2",
|
|
108
|
+
"@deepseek-ai/dsh-scope": "^0.2.0-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-session": "^0.2.0-rc.2",
|
|
110
|
+
"@deepseek-ai/dsh-skill": "^0.2.0-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-skill-filesystem": "^0.2.0-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-system-prompt": "^0.2.0-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-tools": "^0.2.0-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-user-approval": "^0.2.0-rc.2",
|
|
115
|
+
"@deepseek-ai/schemastery": "^3.18.5",
|
|
116
|
+
"@types/node": "^26.6.5",
|
|
117
|
+
"esbuild": "^0.28.2",
|
|
118
|
+
"markdownlint-cli": "0.49.1",
|
|
119
|
+
"typescript": "^7.0.2"
|
|
120
|
+
},
|
|
121
|
+
"author": {
|
|
122
|
+
"name": "AmethystLuna",
|
|
123
|
+
"url": "https://github.com/AmethystLuna"
|
|
124
|
+
},
|
|
125
|
+
"license": "MIT",
|
|
126
|
+
"repository": "https://github.com/AmethystLuna/dsh-model-everything",
|
|
127
|
+
"funding": {
|
|
128
|
+
"type": "custom",
|
|
129
|
+
"url": "https://afdian.com/a/amethystluna"
|
|
130
|
+
},
|
|
131
|
+
"keywords": [
|
|
132
|
+
"verification",
|
|
133
|
+
"model-checking",
|
|
134
|
+
"uml",
|
|
135
|
+
"diagrams",
|
|
136
|
+
"state-machine",
|
|
137
|
+
"data-model",
|
|
138
|
+
"concurrency",
|
|
139
|
+
"mermaid",
|
|
140
|
+
"plantuml",
|
|
141
|
+
"dsh",
|
|
142
|
+
"dsh-plugin",
|
|
143
|
+
"plugin"
|
|
144
|
+
],
|
|
145
|
+
"engines": {
|
|
146
|
+
"node": ">=20"
|
|
147
|
+
}
|
|
148
|
+
}
|