dsh-model-everything 0.5.2 → 0.6.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/lib/annotation.js +323 -0
- package/lib/client.js +1614 -44
- package/lib/diagram-render-tool.js +13 -1
- package/lib/diagram-review-tool.js +1 -1
- package/lib/diagram.js +33 -0
- package/lib/gate.js +8 -6
- package/lib/render/paint.js +3 -0
- package/lib/render/svg.js +8 -2
- package/lib/routing.js +12 -0
- package/lib/transcript.js +327 -0
- package/lib/types/annotation.d.ts +128 -0
- package/lib/types/client.d.ts +89 -6
- package/lib/types/diagram.d.ts +7 -0
- package/lib/types/gate.d.ts +8 -6
- package/lib/types/render/paint.d.ts +2 -0
- package/lib/types/transcript.d.ts +82 -0
- package/package.json +149 -148
- package/skills/model-everything/SKILL.md +2 -1
- package/skills/model-everything-diagram/SKILL.md +21 -1
- package/src/annotation.ts +333 -0
- package/src/client.ts +1841 -307
- package/src/diagram-render-tool.ts +13 -1
- package/src/diagram-review-tool.ts +1 -1
- package/src/diagram.ts +31 -0
- package/src/gate.ts +8 -6
- package/src/render/paint.ts +5 -0
- package/src/render/svg.ts +8 -2
- package/src/routing.ts +12 -0
- package/src/transcript.ts +349 -0
package/lib/types/client.d.ts
CHANGED
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
* compiled output in `window.__ModuleLoader__.load(...)`, which is the loader contract itself.
|
|
13
13
|
*/
|
|
14
14
|
import { type Palette, type PaletteMode } from './render/palette.js';
|
|
15
|
+
import { type DocumentLike } from './annotation.js';
|
|
15
16
|
export interface ReactLike {
|
|
16
17
|
createElement: (type: unknown, props?: Record<string, unknown> | null, ...children: unknown[]) => unknown;
|
|
17
|
-
useState?: <T>(initial: T) => [T, (next: T) => void];
|
|
18
|
+
useState?: <T>(initial: T) => [T, (next: T | ((previous: T) => T)) => void];
|
|
19
|
+
useEffect?: (effect: () => void | (() => void), deps?: ReadonlyArray<unknown>) => void;
|
|
18
20
|
}
|
|
19
21
|
export interface SlotContext {
|
|
20
22
|
slots: {
|
|
@@ -29,7 +31,6 @@ export interface PluginShape {
|
|
|
29
31
|
/** The whiteboard mount, with its scheduler injectable. `apply` calls this with the default. */
|
|
30
32
|
mount: (ctx: SlotContext, options?: MountOptions) => unknown;
|
|
31
33
|
}
|
|
32
|
-
/** A settled tool call, as the host hands it to a view. */
|
|
33
34
|
export interface ToolCallProps {
|
|
34
35
|
phase?: string;
|
|
35
36
|
toolName?: string;
|
|
@@ -53,12 +54,93 @@ export declare const WHITEBOARD_ID = "model-everything-diagram";
|
|
|
53
54
|
/** What the whiteboard opens with: a diagram the reader can edit rather than an empty box. */
|
|
54
55
|
export declare const WHITEBOARD_SAMPLE: string;
|
|
55
56
|
/**
|
|
56
|
-
* The
|
|
57
|
+
* The card for a drawing: the source the call carried, drawn by the renderer that wrote the file.
|
|
57
58
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
59
|
+
* Drawing it here rather than replaying the SVG means the card and the file are one picture from one
|
|
60
|
+
* engine, and it costs the result nothing. Lines the renderer refused are listed under the drawing: a
|
|
61
|
+
* card that hid them would show a picture that is missing something, which is the failure the tool
|
|
62
|
+
* exists to prevent.
|
|
61
63
|
*/
|
|
64
|
+
/** A create-element function with this package's calling convention, so a shared builder fits both seats. */
|
|
65
|
+
type H = (type: unknown, props?: Record<string, unknown> | null, ...children: unknown[]) => unknown;
|
|
66
|
+
/** What an annotation editor shows, shared by the two surfaces that offer one. */
|
|
67
|
+
export interface AnnotationState {
|
|
68
|
+
picked: {
|
|
69
|
+
id: string;
|
|
70
|
+
} | null;
|
|
71
|
+
note: string;
|
|
72
|
+
pending: Array<{
|
|
73
|
+
nodeId: string;
|
|
74
|
+
note: string;
|
|
75
|
+
}>;
|
|
76
|
+
status: string;
|
|
77
|
+
/** Whether the pending list is expanded under the count. */
|
|
78
|
+
open?: boolean;
|
|
79
|
+
/** Where the editor sits, in the drawing's own coordinates: beside the node the reader picked. */
|
|
80
|
+
anchor?: {
|
|
81
|
+
left: number;
|
|
82
|
+
top: number;
|
|
83
|
+
};
|
|
84
|
+
/** The correction the dock applied after measuring where the chip actually landed. */
|
|
85
|
+
dockFix?: {
|
|
86
|
+
dx: number;
|
|
87
|
+
dy: number;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export interface AnnotationActions {
|
|
91
|
+
onNote: (value: string) => void;
|
|
92
|
+
onAdd: () => void;
|
|
93
|
+
onAddAndSend: () => void;
|
|
94
|
+
onSend: () => void;
|
|
95
|
+
onClear: () => void;
|
|
96
|
+
onCancel: () => void;
|
|
97
|
+
onToggle: () => void;
|
|
98
|
+
onRemove: (index: number) => void;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The annotation surface: a floating editor over the drawing, and a count of what is waiting.
|
|
102
|
+
*
|
|
103
|
+
* Floating rather than inline, because the reader is looking at a picture and the editor must not move it.
|
|
104
|
+
* The notes stay in a list until one message is composed from them: the reader's input box is theirs, and N raw
|
|
105
|
+
* fragments in it would be exactly the mess this feature is meant to avoid. Colours come from the host's tokens,
|
|
106
|
+
* so light and dark themes need no separate code.
|
|
107
|
+
*/
|
|
108
|
+
export declare function annotationPanel(h: H, state: AnnotationState, actions: AnnotationActions, options?: {
|
|
109
|
+
floating?: boolean;
|
|
110
|
+
document?: DocumentLike;
|
|
111
|
+
dockFix?: {
|
|
112
|
+
dx: number;
|
|
113
|
+
dy: number;
|
|
114
|
+
};
|
|
115
|
+
dockChip?: boolean;
|
|
116
|
+
}): unknown;
|
|
117
|
+
/** Remember what would leave with the next message, and start watching for that message. */
|
|
118
|
+
export declare function setPendingBlock(text: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* The dock, as a layer on `document.body`.
|
|
121
|
+
*
|
|
122
|
+
* A `position: fixed` node still positions against the nearest transformed ancestor, and the composer sits
|
|
123
|
+
* inside one - which is why every coordinate this plugin computed landed inside the box. The shipped
|
|
124
|
+
* annotation plugin sidesteps it the same way: its chip is a body-level layer, so fixed means the viewport.
|
|
125
|
+
* Size and place come from the composer card's own rectangle, measured after every layout change.
|
|
126
|
+
*/
|
|
127
|
+
interface DockHandlers {
|
|
128
|
+
onToggle: () => void;
|
|
129
|
+
onSend: () => void;
|
|
130
|
+
onRemove: (index: number) => void;
|
|
131
|
+
}
|
|
132
|
+
/** Keep the docked count in step with the pending list. Called from a render path, so it cannot throw. */
|
|
133
|
+
export declare function updateDockLayer(items: Array<{
|
|
134
|
+
nodeId: string;
|
|
135
|
+
note: string;
|
|
136
|
+
}>, open: boolean, handlers: DockHandlers): void;
|
|
137
|
+
/**
|
|
138
|
+
* Tell this module when a message leaves, by watching the one signal the host gives: the draft empties.
|
|
139
|
+
*
|
|
140
|
+
* A note that was committed is in the draft, so after the send there is nothing left to keep - and a chip still
|
|
141
|
+
* counting a note that has already gone out is the plugin lying about its own state.
|
|
142
|
+
*/
|
|
143
|
+
export declare function onMessageSent(listener: () => void): () => void;
|
|
62
144
|
export declare function viewFor(React: ReactLike, overrides?: Partial<Palette>): (props: ToolCallProps) => unknown;
|
|
63
145
|
/**
|
|
64
146
|
* The whiteboard: paste a diagram, get a drawing, zoom it.
|
|
@@ -81,3 +163,4 @@ export interface MountOptions {
|
|
|
81
163
|
*/
|
|
82
164
|
export declare function mountWhiteboard(React: ReactLike, ctx: SlotContext, options?: MountOptions): unknown;
|
|
83
165
|
export default function factory(require: (name: string) => unknown): PluginShape;
|
|
166
|
+
export {};
|
package/lib/types/diagram.d.ts
CHANGED
|
@@ -31,4 +31,11 @@ export interface ComponentContext {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
export declare function apply(ctx: ComponentContext, config: Config): void;
|
|
34
|
+
/**
|
|
35
|
+
* Offer an annotation as a session command, so a page can send one without a composer.
|
|
36
|
+
*
|
|
37
|
+
* Optional on purpose, and failure-tolerant on purpose: a host without the commands service keeps the
|
|
38
|
+
* composer path, and a registration that throws must not take the drawing tools down with it.
|
|
39
|
+
*/
|
|
40
|
+
export declare function registerAnnotateCommand(ctx: unknown): void;
|
|
34
41
|
export declare const inject: string[];
|
package/lib/types/gate.d.ts
CHANGED
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Why it is a separate row. The plugin's doctrine is that a capability is discoverable
|
|
12
12
|
* through its own tool description or skill text. Injection departs from that, so it is
|
|
13
|
-
*
|
|
14
|
-
* without touching the tools or the skills. `enabled` is a live switch, so the Web
|
|
15
|
-
* page flips it inside a running host.
|
|
13
|
+
* mounted as its own component: the bundle's patch enables it, and the row can be turned off
|
|
14
|
+
* or removed without touching the tools or the skills. `enabled` is a live switch, so the Web
|
|
15
|
+
* Plugins page flips it inside a running host.
|
|
16
16
|
*
|
|
17
|
-
* Why
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* Why the bundle turns it on. Measured: a session that never decides to load a skill is never
|
|
18
|
+
* routed, and the catalog line is cut at 500 characters, so a domain the request names can be
|
|
19
|
+
* invisible at the moment of choosing. The cost is a fixed message in every session, which is
|
|
20
|
+
* why the switch is live and documented: turn it off where the bundle's default is wrong. The
|
|
21
|
+
* component's own `enabled` script default is off, so a bare `app.add(gate)` injects nothing.
|
|
20
22
|
*
|
|
21
23
|
* What it does not do. It routes; it checks nothing. It cannot make a skill load, and it
|
|
22
24
|
* does not restate the doctrine - the skill bodies carry that, and duplicating them here
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an annotation message looks like after it has been sent.
|
|
3
|
+
*
|
|
4
|
+
* The message is one block of plain lines: a fixed opening, numbered items, a question line, then the reader's
|
|
5
|
+
* own words. That is the right thing for the model and the wrong thing to read as a human - the reader wrote one
|
|
6
|
+
* note about one node, and what landed is a page of protocol.
|
|
7
|
+
*
|
|
8
|
+
* The host renders a user message as text inside elements it owns and re-renders. So this never assigns an
|
|
9
|
+
* element's text: that deletes its children, React reconciles from a tree that no longer matches, and whole
|
|
10
|
+
* turns come back mangled. It edits the text NODES instead - trim the run before the cut, remove the runs that
|
|
11
|
+
* held the block - and puts the chip in as a sibling, exactly the way the shipped annotation plugin does it.
|
|
12
|
+
*
|
|
13
|
+
* Everything here is defensive: a page without the elements, an element without text nodes, an element already
|
|
14
|
+
* handled. A decorator that throws would take a render pass with it.
|
|
15
|
+
*/
|
|
16
|
+
/** The first words of every annotation block, used to recognise one in the transcript. */
|
|
17
|
+
export declare const TRANSCRIPT_MARKER = "Diagram annotations -";
|
|
18
|
+
export interface TranscriptNode {
|
|
19
|
+
nodeType?: number;
|
|
20
|
+
nodeValue?: string | null;
|
|
21
|
+
textContent?: string | null;
|
|
22
|
+
style?: Record<string, string | undefined>;
|
|
23
|
+
setAttribute?: (name: string, value: string) => void;
|
|
24
|
+
getAttribute?: (name: string) => string | null;
|
|
25
|
+
addEventListener?: (type: string, handler: () => void) => void;
|
|
26
|
+
querySelectorAll?: (selector: string) => ArrayLike<TranscriptNode>;
|
|
27
|
+
getBoundingClientRect?: () => {
|
|
28
|
+
left: number;
|
|
29
|
+
top: number;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
};
|
|
33
|
+
closest?: (selector: string) => TranscriptNode | null;
|
|
34
|
+
childNodes?: ArrayLike<TranscriptNode>;
|
|
35
|
+
nextSibling?: TranscriptNode | null;
|
|
36
|
+
appendChild?: (node: TranscriptNode) => unknown;
|
|
37
|
+
removeChild?: (node: TranscriptNode) => unknown;
|
|
38
|
+
parentNode?: {
|
|
39
|
+
insertBefore?: (node: TranscriptNode, before: TranscriptNode | null) => unknown;
|
|
40
|
+
removeChild?: (node: TranscriptNode) => unknown;
|
|
41
|
+
} | null;
|
|
42
|
+
}
|
|
43
|
+
export interface TranscriptDocument {
|
|
44
|
+
querySelectorAll?: (selector: string) => ArrayLike<TranscriptNode>;
|
|
45
|
+
createElement?: (tag: string) => TranscriptNode;
|
|
46
|
+
}
|
|
47
|
+
/** One note as the block states it. */
|
|
48
|
+
export interface AnnotationItem {
|
|
49
|
+
index: number;
|
|
50
|
+
node: string;
|
|
51
|
+
note: string;
|
|
52
|
+
}
|
|
53
|
+
/** The count in the opening line, for the chip; null when the line says something unexpected. */
|
|
54
|
+
export declare function annotationCountOf(text: string): number | null;
|
|
55
|
+
/** The reader's own words: what follows the question line, or nothing when the note was the whole message. */
|
|
56
|
+
export declare function questionOf(text: string): string;
|
|
57
|
+
/** The notes the block carries, read back out of its lines, so a reader sees what the model saw. */
|
|
58
|
+
export declare function itemsOf(text: string): AnnotationItem[];
|
|
59
|
+
/**
|
|
60
|
+
* Drop everything before the cut from the text nodes, and leave the reader's own words.
|
|
61
|
+
*
|
|
62
|
+
* The nodes are the only thing written: an element's `textContent` would take its child elements with it.
|
|
63
|
+
*/
|
|
64
|
+
export declare function cutTextNodes(nodes: TranscriptNode[], cut: number): boolean;
|
|
65
|
+
/** Kept for the tests that assert the selector exists; the ancestor walk is deliberately not used. */
|
|
66
|
+
export declare const FOREIGN_SELECTOR = "[data-annotation-for-dsh], [data-annotation-overlay], [data-annotation-chip], [data-annotation-tip-layer]";
|
|
67
|
+
/**
|
|
68
|
+
* Fold every annotation message in the transcript behind its count, and answer how many were folded.
|
|
69
|
+
*
|
|
70
|
+
* Idempotent: an element that already carries the marker is skipped, so the observer can call this on every
|
|
71
|
+
* change without stacking chips. Only the element whose text is the message is touched, and only its text nodes.
|
|
72
|
+
*/
|
|
73
|
+
export declare function decorateTranscript(doc: TranscriptDocument | undefined, label?: string, title?: string): number;
|
|
74
|
+
/**
|
|
75
|
+
* One pass, and nothing that keeps running.
|
|
76
|
+
*
|
|
77
|
+
* There is deliberately no observer and no timer here. Both were tried: an observer over the document plus a
|
|
78
|
+
* one-second interval turns every DOM change into a full selector scan, and a streaming conversation changes the
|
|
79
|
+
* DOM many times a second - the container stopped responding. A caller that wants the fold has to decide when
|
|
80
|
+
* to run it, on a container it chose.
|
|
81
|
+
*/
|
|
82
|
+
export declare function startTranscriptDecoration(doc: TranscriptDocument | undefined, label?: string, title?: string): () => void;
|
package/package.json
CHANGED
|
@@ -1,148 +1,149 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-model-everything",
|
|
3
|
-
"version": "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
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"test:
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"@deepseek-ai/
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"@deepseek-ai/
|
|
101
|
-
"@deepseek-ai/dsh-
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/dsh-
|
|
104
|
-
"@deepseek-ai/dsh-
|
|
105
|
-
"@deepseek-ai/dsh-
|
|
106
|
-
"@deepseek-ai/dsh-
|
|
107
|
-
"@deepseek-ai/dsh-sandbox
|
|
108
|
-
"@deepseek-ai/dsh-
|
|
109
|
-
"@deepseek-ai/dsh-
|
|
110
|
-
"@deepseek-ai/dsh-
|
|
111
|
-
"@deepseek-ai/dsh-skill
|
|
112
|
-
"@deepseek-ai/dsh-
|
|
113
|
-
"@deepseek-ai/dsh-
|
|
114
|
-
"@deepseek-ai/dsh-
|
|
115
|
-
"@deepseek-ai/
|
|
116
|
-
"@
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"dsh
|
|
143
|
-
"plugin"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-model-everything",
|
|
3
|
+
"version": "0.6.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 || ^0.2.2-rc.1"
|
|
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 || ^0.2.2-rc.1",
|
|
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
|
+
"0.2.2-rc.1": "compatible"
|
|
65
|
+
},
|
|
66
|
+
"profiles": [
|
|
67
|
+
"headless",
|
|
68
|
+
"web"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"client": {
|
|
72
|
+
"platform": "web",
|
|
73
|
+
"immediately": true,
|
|
74
|
+
"inject": []
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"build": "tsc -p tsconfig.json && node scripts/build-client.mjs",
|
|
79
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
80
|
+
"lint:md": "markdownlint --dot --ignore \"**/node_modules/**\" .",
|
|
81
|
+
"bump": "node scripts/bump-version.mjs",
|
|
82
|
+
"test:cards": "node tests/presentation/run.mjs && node tests/automaton/run.mjs && node tests/routing/run.mjs",
|
|
83
|
+
"coverage": "c8 --reporter=text --exclude-after-remap=false npm run test:engine",
|
|
84
|
+
"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/cycle-break/run.mjs && node tests/layering/run.mjs && node tests/ordering/run.mjs && node tests/coords/run.mjs && node tests/channels/run.mjs && node tests/components/run.mjs && node tests/placement/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",
|
|
85
|
+
"test:full": "npm run build && node tests/full-suite.mjs",
|
|
86
|
+
"check": "npm run lint:md && npm run test:engine",
|
|
87
|
+
"build:client": "node scripts/build-client.mjs"
|
|
88
|
+
},
|
|
89
|
+
"peerDependencies": {
|
|
90
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
91
|
+
"@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 || ^0.2.2-rc.1",
|
|
92
|
+
"@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 || ^0.2.2-rc.1",
|
|
93
|
+
"@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 || ^0.2.2-rc.1",
|
|
94
|
+
"@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 || ^0.2.2-rc.1",
|
|
95
|
+
"@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 || ^0.2.2-rc.1",
|
|
96
|
+
"@deepseek-ai/schemastery": "^3.18.5",
|
|
97
|
+
"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 || ^0.2.2-rc.1"
|
|
98
|
+
},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
101
|
+
"@deepseek-ai/dsh-agent": "^0.2.0-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-cordis-host-runner": "^0.2.0-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-home-paths": "^0.2.0-rc.2",
|
|
104
|
+
"@deepseek-ai/dsh-invariants": "^0.2.0-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-llm": "^0.2.0-rc.2",
|
|
106
|
+
"@deepseek-ai/dsh-ptc-runtime": "^0.2.0-rc.2",
|
|
107
|
+
"@deepseek-ai/dsh-sandbox": "^0.2.0-rc.2",
|
|
108
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.2.0-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-scope": "^0.2.0-rc.2",
|
|
110
|
+
"@deepseek-ai/dsh-session": "^0.2.0-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-skill": "^0.2.0-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-skill-filesystem": "^0.2.0-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-system-prompt": "^0.2.0-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-tools": "^0.2.0-rc.2",
|
|
115
|
+
"@deepseek-ai/dsh-user-approval": "^0.2.0-rc.2",
|
|
116
|
+
"@deepseek-ai/schemastery": "^3.18.5",
|
|
117
|
+
"@types/node": "^26.6.5",
|
|
118
|
+
"esbuild": "^0.28.2",
|
|
119
|
+
"markdownlint-cli": "0.49.1",
|
|
120
|
+
"typescript": "^7.0.2"
|
|
121
|
+
},
|
|
122
|
+
"author": {
|
|
123
|
+
"name": "AmethystLuna",
|
|
124
|
+
"url": "https://github.com/AmethystLuna"
|
|
125
|
+
},
|
|
126
|
+
"license": "MIT",
|
|
127
|
+
"repository": "https://github.com/AmethystLuna/dsh-model-everything",
|
|
128
|
+
"funding": {
|
|
129
|
+
"type": "custom",
|
|
130
|
+
"url": "https://afdian.com/a/amethystluna"
|
|
131
|
+
},
|
|
132
|
+
"keywords": [
|
|
133
|
+
"verification",
|
|
134
|
+
"model-checking",
|
|
135
|
+
"uml",
|
|
136
|
+
"diagrams",
|
|
137
|
+
"state-machine",
|
|
138
|
+
"data-model",
|
|
139
|
+
"concurrency",
|
|
140
|
+
"mermaid",
|
|
141
|
+
"plantuml",
|
|
142
|
+
"dsh",
|
|
143
|
+
"dsh-plugin",
|
|
144
|
+
"plugin"
|
|
145
|
+
],
|
|
146
|
+
"engines": {
|
|
147
|
+
"node": ">=20"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -413,7 +413,7 @@ Skip logic-primitive verification when:
|
|
|
413
413
|
|
|
414
414
|
### Routing to the Sibling Skills
|
|
415
415
|
|
|
416
|
-
This skill owns behavioural claims.
|
|
416
|
+
This skill owns behavioural claims. The neighbouring domains have their own skill, and loading the wrong one wastes the verification:
|
|
417
417
|
|
|
418
418
|
| Domain | Skill |
|
|
419
419
|
|---|---|
|
|
@@ -421,6 +421,7 @@ This skill owns behavioural claims. Three neighbouring domains have their own sk
|
|
|
421
421
|
| Reviewing architecture, module structure or a dependency diagram (isolated nodes, dangling endpoints, cycles, allowed-dependency and layer violations, missing required edges) | `model-everything-structure` |
|
|
422
422
|
| Concurrency, synchrony and async claims — "thread-safe", "lock-free", "no data race", "ISR-safe", "non-blocking", `async`/`await` — mined and routed to TSan/Helgrind/CBMC/TLA+/UPPAAL, never proven here; a shared-location update is decided here by `model_compose_verify` (C5) | `model-everything-interleaving` |
|
|
423
423
|
| Entities, fields, relationships, data invariants, schema migrations (DS1-DS4, DA1-DA12, DD1-DD4) | `model-everything-datamodel` |
|
|
424
|
+
| Showing a result as a picture — drawing Mermaid or PlantUML, putting the drawing in front of a reader, or checking that it fits the page (structure budgets, containment diffs, every refused line named) | `model-everything-diagram` |
|
|
424
425
|
|
|
425
426
|
---
|
|
426
427
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: model-everything-diagram
|
|
3
|
-
description: "Use when drawing a diagram from its source text or checking its structure: Mermaid and PlantUML subsets, structure budgets, and containment diffs. Every line it cannot draw is refused by number. The drawing proves layout, not design. Doctrine: the model-everything skill.""
|
|
3
|
+
description: "Use when drawing a diagram from its source text, showing one to a reader, or checking its structure: Mermaid and PlantUML subsets, structure budgets, and containment diffs. Reach for it when an explanation is clearer shown than told - a layout, a flow, a change - and put the picture beside the explanation. Every line it cannot draw is refused by number. The drawing proves layout, not design. Doctrine: the model-everything skill.""
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Model Everything — Drawing
|
|
@@ -13,6 +13,26 @@ The doctrine it inherits — say what a result does and does not prove, read `ve
|
|
|
13
13
|
`model-everything` skill. Load that one when the question is whether a design is *correct*; load this one when the
|
|
14
14
|
question is what the picture shows.
|
|
15
15
|
|
|
16
|
+
## Draw to explain, not to decorate
|
|
17
|
+
|
|
18
|
+
A reader takes a layout, a flow, a boundary and a change between two of them from a picture. So the trigger
|
|
19
|
+
is not the phrase "draw" — it is an answer that has that shape: reach for `diagram_render` when the
|
|
20
|
+
explanation would otherwise spell out positions and connections in prose, and put the drawing beside the
|
|
21
|
+
explanation rather than in place of it.
|
|
22
|
+
|
|
23
|
+
| Where the reader sees it | What it shows | How it starts |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| the file you wrote | the SVG at full size, kept next to the document it belongs to | `diagram_render` with `out`, then hand the file over with `present` |
|
|
26
|
+
| the card in the conversation | the drawing, redrawn from the call's own source, with the refused lines under it | nothing to do: the card is keyed to `diagram_render` and appears where the call was |
|
|
27
|
+
| the whiteboard tab | any source, editable and zoomable, with the colour schemes | the reader opens the tab and pastes; it holds none of the session's data |
|
|
28
|
+
|
|
29
|
+
The reader can point at a node and send a note from the whiteboard or from the call's card. It arrives as an
|
|
30
|
+
ordinary message that starts `Diagram annotation · node "…"`, and that is what it is: the reader marking one
|
|
31
|
+
node of that drawing and saying something about it. Answer the node, not the whole picture.
|
|
32
|
+
|
|
33
|
+
Before a drawing goes in front of a reader, run `diagram_review`: a picture that needs scrolling is no
|
|
34
|
+
longer a summary. When you present one, say what it shows — the layout, not whether the design is right.
|
|
35
|
+
|
|
16
36
|
## When This Skill Applies
|
|
17
37
|
|
|
18
38
|
| The task involves… | What it does |
|