@1agh/maude 0.20.0 → 0.22.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.md +7 -0
- package/cli/bin/maude.mjs +5 -1
- package/cli/commands/design-link.test.mjs +207 -0
- package/cli/commands/design.mjs +42 -12
- package/cli/commands/doctor.mjs +361 -0
- package/cli/commands/doctor.test.mjs +185 -0
- package/cli/commands/help.mjs +24 -0
- package/cli/commands/hub.mjs +245 -0
- package/cli/commands/hub.test.mjs +87 -0
- package/cli/lib/config-lint.mjs +141 -0
- package/cli/lib/config-lint.test.mjs +117 -0
- package/cli/lib/design-link.mjs +216 -0
- package/cli/lib/hubs-config.mjs +123 -0
- package/cli/lib/hubs-config.test.mjs +100 -0
- package/cli/lib/preflight.mjs +232 -0
- package/cli/lib/stack-detect.mjs +344 -0
- package/cli/lib/stack-detect.test.mjs +121 -0
- package/package.json +16 -8
- package/plugins/design/dependencies.json +147 -0
- package/plugins/design/dependencies.schema.json +107 -0
- package/plugins/design/dev-server/ai-banner.tsx +188 -0
- package/plugins/design/dev-server/annotations-context-toolbar.tsx +5 -5
- package/plugins/design/dev-server/annotations-layer.tsx +52 -12
- package/plugins/design/dev-server/api.ts +17 -1
- package/plugins/design/dev-server/artboard-marquee.tsx +2 -2
- package/plugins/design/dev-server/bin/preflight.sh +32 -0
- package/plugins/design/dev-server/bin/runtime-health.sh +169 -0
- package/plugins/design/dev-server/canvas-lib.tsx +33 -7
- package/plugins/design/dev-server/canvas-shell.tsx +127 -9
- package/plugins/design/dev-server/client/app.jsx +72 -0
- package/plugins/design/dev-server/collab/ai-activity.ts +127 -0
- package/plugins/design/dev-server/collab/git-lifecycle.ts +124 -0
- package/plugins/design/dev-server/collab/index.ts +47 -0
- package/plugins/design/dev-server/collab/persistence.ts +123 -0
- package/plugins/design/dev-server/collab/protocol.ts +108 -0
- package/plugins/design/dev-server/collab/registry.ts +110 -0
- package/plugins/design/dev-server/collab/room.ts +215 -0
- package/plugins/design/dev-server/comments-overlay.tsx +29 -0
- package/plugins/design/dev-server/contextual-toolbar.tsx +1 -1
- package/plugins/design/dev-server/cursors-overlay.tsx +296 -0
- package/plugins/design/dev-server/dist/client.bundle.js +75 -3
- package/plugins/design/dev-server/dist/runtime/lib0_decoding.js +624 -0
- package/plugins/design/dev-server/dist/runtime/lib0_encoding.js +608 -0
- package/plugins/design/dev-server/dist/runtime/y-protocols_awareness.js +380 -0
- package/plugins/design/dev-server/dist/runtime/y-protocols_sync.js +104 -0
- package/plugins/design/dev-server/dist/runtime/yjs.js +6691 -0
- package/plugins/design/dev-server/export-dialog.tsx +1 -1
- package/plugins/design/dev-server/hmr-broadcast.ts +15 -2
- package/plugins/design/dev-server/http.ts +64 -1
- package/plugins/design/dev-server/marquee-overlay.tsx +2 -2
- package/plugins/design/dev-server/participants-chrome.tsx +261 -0
- package/plugins/design/dev-server/runtime-bundle.ts +19 -0
- package/plugins/design/dev-server/server.ts +78 -11
- package/plugins/design/dev-server/test/ai-activity.test.ts +113 -0
- package/plugins/design/dev-server/test/collab-annotations-bridge.test.ts +55 -0
- package/plugins/design/dev-server/test/collab-bridge.test.ts +81 -0
- package/plugins/design/dev-server/test/collab-loopback.test.ts +63 -0
- package/plugins/design/dev-server/test/collab-protocol.test.ts +146 -0
- package/plugins/design/dev-server/test/collab-room.test.ts +182 -0
- package/plugins/design/dev-server/test/collab-stress.test.ts +121 -0
- package/plugins/design/dev-server/test/git-lifecycle.test.ts +101 -0
- package/plugins/design/dev-server/test/participants-chrome.test.ts +30 -0
- package/plugins/design/dev-server/test/use-collab.test.ts +71 -0
- package/plugins/design/dev-server/tool-palette.tsx +7 -7
- package/plugins/design/dev-server/use-annotation-resize.tsx +1 -1
- package/plugins/design/dev-server/use-collab.tsx +478 -0
- package/plugins/design/dev-server/ws.ts +123 -7
- package/plugins/design/templates/_shell.html +37 -1
- package/plugins/flow/.claude-plugin/config.schema.json +12 -0
- package/plugins/flow/dependencies.json +143 -0
- package/plugins/flow/dependencies.schema.json +107 -0
|
@@ -85,7 +85,12 @@
|
|
|
85
85
|
"react/jsx-dev-runtime": "/_canvas-runtime/react_jsx-dev-runtime.js",
|
|
86
86
|
"pixi.js": "/_canvas-runtime/pixi-js.js",
|
|
87
87
|
"motion": "/_canvas-runtime/motion.js",
|
|
88
|
-
"motion/react": "/_canvas-runtime/motion_react.js"
|
|
88
|
+
"motion/react": "/_canvas-runtime/motion_react.js",
|
|
89
|
+
"yjs": "/_canvas-runtime/yjs.js",
|
|
90
|
+
"y-protocols/sync": "/_canvas-runtime/y-protocols_sync.js",
|
|
91
|
+
"y-protocols/awareness": "/_canvas-runtime/y-protocols_awareness.js",
|
|
92
|
+
"lib0/decoding": "/_canvas-runtime/lib0_decoding.js",
|
|
93
|
+
"lib0/encoding": "/_canvas-runtime/lib0_encoding.js"
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
96
|
</script>
|
|
@@ -153,6 +158,32 @@
|
|
|
153
158
|
if (msg.mode === 'hard' || !msg.file || (canvasRel && msg.file === canvasRel)) {
|
|
154
159
|
location.reload();
|
|
155
160
|
}
|
|
161
|
+
} else if (msg.mode === 'meta') {
|
|
162
|
+
// Phase 8 — canvas-meta sidecar changed. Filter to our own canvas:
|
|
163
|
+
// `<canvasRel>.meta.json` strip → must equal canvasRel without ext.
|
|
164
|
+
if (!canvasRel || !msg.file) return;
|
|
165
|
+
const metaBase = msg.file.replace(/\.meta\.json$/i, '');
|
|
166
|
+
const myBase = canvasRel.replace(/\.(tsx|html)$/i, '');
|
|
167
|
+
if (metaBase !== myBase) return;
|
|
168
|
+
// Echo guard — when WE just PATCHed the meta, skip the round-trip.
|
|
169
|
+
const lastSelf = (window).__maude_last_meta_self_write_at || 0;
|
|
170
|
+
if (Date.now() - lastSelf < 2000) return;
|
|
171
|
+
// Re-fetch + broadcast to the canvas via window event. canvas-lib
|
|
172
|
+
// listens for `maude:meta-refreshed` and re-applies layout +
|
|
173
|
+
// viewport in-place (no full reload — preserves tool / undo state).
|
|
174
|
+
const metaFileParam = encodeURIComponent(designRel + '/' + canvasRel);
|
|
175
|
+
fetch('/_api/canvas-meta?file=' + metaFileParam, {
|
|
176
|
+
headers: { 'Cache-Control': 'no-store' },
|
|
177
|
+
})
|
|
178
|
+
.then((r) => (r.ok ? r.json() : null))
|
|
179
|
+
.then((j) => {
|
|
180
|
+
if (!j || typeof j !== 'object') return;
|
|
181
|
+
window.__canvas_meta__ = j;
|
|
182
|
+
document.dispatchEvent(new CustomEvent('maude:meta-refreshed', { detail: j }));
|
|
183
|
+
})
|
|
184
|
+
.catch(() => {
|
|
185
|
+
/* network blip — next interaction will retry */
|
|
186
|
+
});
|
|
156
187
|
}
|
|
157
188
|
} catch (e) {
|
|
158
189
|
console.warn('[canvas-shell] HMR message parse error', e);
|
|
@@ -185,6 +216,11 @@
|
|
|
185
216
|
// The fetch runs in parallel with imports; failure is non-fatal (the
|
|
186
217
|
// canvas falls through to default grid + fit-to-screen).
|
|
187
218
|
const metaFileParam = encodeURIComponent(designRel + '/' + canvasRel);
|
|
219
|
+
// Phase 8 — expose designRel + canvasRel-without-prefix on window so
|
|
220
|
+
// collab-slug derivation can strip the prefix consistently with
|
|
221
|
+
// server-side api.fileSlug (which trims paths.designRel).
|
|
222
|
+
window.__canvas_design_rel__ = designRel;
|
|
223
|
+
window.__canvas_rel__ = canvasRel;
|
|
188
224
|
const metaFetch = fetch('/_api/canvas-meta?file=' + metaFileParam, {
|
|
189
225
|
headers: { 'Cache-Control': 'no-store' },
|
|
190
226
|
})
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["name"],
|
|
8
8
|
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Pointer to this schema (editor support). Stripped at consumption time."
|
|
12
|
+
},
|
|
9
13
|
"name": {
|
|
10
14
|
"type": "string",
|
|
11
15
|
"description": "Short project / product name. Resolves the `<project>` placeholder in commands and file paths (e.g. `.ai/<project>-prd.md` → `.ai/<name>-prd.md`)."
|
|
@@ -304,6 +308,14 @@
|
|
|
304
308
|
}
|
|
305
309
|
}
|
|
306
310
|
},
|
|
311
|
+
"quality": {
|
|
312
|
+
"type": "object",
|
|
313
|
+
"description": "Map of gate name → shell command string. Gate names are free-form (conventional names: `lint`, `format`, `typecheck`, `tests`, `build`). Each command is executed as-is via `eval` by the slash command that consumes the gate. Missing gate → slash command emits a one-line warning and skips (never fabricates a command). v1 deliberately keeps this a flat string map — no per-gate object shape, no `order`, no `scope`. Populate via `maude doctor --fix`, which detects from `package.json` scripts + tool presence. Existing user values are never overwritten — additions only.",
|
|
314
|
+
"additionalProperties": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"minLength": 1
|
|
317
|
+
}
|
|
318
|
+
},
|
|
307
319
|
"integrations": {
|
|
308
320
|
"type": "object",
|
|
309
321
|
"additionalProperties": false,
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./dependencies.schema.json",
|
|
3
|
+
"version": "1",
|
|
4
|
+
"plugin": "flow",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
{
|
|
7
|
+
"id": "node",
|
|
8
|
+
"type": "cli",
|
|
9
|
+
"hardness": "hard",
|
|
10
|
+
"check": {
|
|
11
|
+
"command": "node --version",
|
|
12
|
+
"expectExit": 0,
|
|
13
|
+
"minVersion": "20.0.0"
|
|
14
|
+
},
|
|
15
|
+
"install": {
|
|
16
|
+
"preferred": "https://nodejs.org/en/download",
|
|
17
|
+
"darwin": "brew install node@22"
|
|
18
|
+
},
|
|
19
|
+
"autoInstall": false,
|
|
20
|
+
"usedBy": ["commands/init.md"],
|
|
21
|
+
"docsUrl": "https://nodejs.org"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "git",
|
|
25
|
+
"type": "cli",
|
|
26
|
+
"hardness": "hard",
|
|
27
|
+
"check": {
|
|
28
|
+
"command": "git --version",
|
|
29
|
+
"expectExit": 0
|
|
30
|
+
},
|
|
31
|
+
"install": {
|
|
32
|
+
"darwin": "brew install git",
|
|
33
|
+
"linux": "apt-get install -y git || dnf install -y git"
|
|
34
|
+
},
|
|
35
|
+
"autoInstall": false,
|
|
36
|
+
"usedBy": ["commands/init.md", "commands/done.md", "commands/quick.md"],
|
|
37
|
+
"docsUrl": "https://git-scm.com"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "maude",
|
|
41
|
+
"type": "cli",
|
|
42
|
+
"hardness": "soft",
|
|
43
|
+
"check": {
|
|
44
|
+
"command": "maude --version",
|
|
45
|
+
"expectExit": 0
|
|
46
|
+
},
|
|
47
|
+
"install": {
|
|
48
|
+
"preferred": "npm i -g @1agh/maude"
|
|
49
|
+
},
|
|
50
|
+
"autoInstall": false,
|
|
51
|
+
"fallbackBehavior": "/flow:init and /flow:done work without maude CLI but cannot read/write workflows.config.json via `maude config`.",
|
|
52
|
+
"usedBy": ["commands/init.md"],
|
|
53
|
+
"docsUrl": "https://github.com/1aGh/maude"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "agent-browser",
|
|
57
|
+
"type": "cli",
|
|
58
|
+
"hardness": "soft",
|
|
59
|
+
"check": {
|
|
60
|
+
"command": "agent-browser --version",
|
|
61
|
+
"expectExit": 0
|
|
62
|
+
},
|
|
63
|
+
"install": {
|
|
64
|
+
"preferred": "npm i -g @anthropic-ai/agent-browser"
|
|
65
|
+
},
|
|
66
|
+
"autoInstall": true,
|
|
67
|
+
"fallbackBehavior": "/flow:scenario and a11y-auditor degrade to screenshot-less reports. Web scenarios cannot run.",
|
|
68
|
+
"usedBy": [
|
|
69
|
+
"commands/scenario.md",
|
|
70
|
+
"commands/validate.md",
|
|
71
|
+
"commands/utils-verify.md",
|
|
72
|
+
"agents/scenario-runner.md",
|
|
73
|
+
"agents/a11y-auditor.md",
|
|
74
|
+
"skills/agent-browser/SKILL.md"
|
|
75
|
+
],
|
|
76
|
+
"docsUrl": "https://github.com/anthropics/agent-browser"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "agent-device",
|
|
80
|
+
"type": "cli",
|
|
81
|
+
"hardness": "soft",
|
|
82
|
+
"check": {
|
|
83
|
+
"command": "agent-device --version",
|
|
84
|
+
"expectExit": 0
|
|
85
|
+
},
|
|
86
|
+
"install": {
|
|
87
|
+
"preferred": "Requires Xcode + Android SDK. See agent-device docs."
|
|
88
|
+
},
|
|
89
|
+
"autoInstall": false,
|
|
90
|
+
"fallbackBehavior": "/flow:scenario skips native (iOS/Android) variants. Web variants still run via agent-browser.",
|
|
91
|
+
"usedBy": [
|
|
92
|
+
"commands/scenario.md",
|
|
93
|
+
"agents/scenario-runner.md",
|
|
94
|
+
"skills/agent-device/SKILL.md"
|
|
95
|
+
],
|
|
96
|
+
"docsUrl": "https://github.com/anthropics/agent-device"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "jq",
|
|
100
|
+
"type": "system-tool",
|
|
101
|
+
"hardness": "soft",
|
|
102
|
+
"check": {
|
|
103
|
+
"command": "jq --version",
|
|
104
|
+
"expectExit": 0
|
|
105
|
+
},
|
|
106
|
+
"install": {
|
|
107
|
+
"darwin": "brew install jq",
|
|
108
|
+
"linux": "apt-get install -y jq || dnf install -y jq",
|
|
109
|
+
"win32": "winget install jqlang.jq"
|
|
110
|
+
},
|
|
111
|
+
"autoInstall": false,
|
|
112
|
+
"fallbackBehavior": "Slash commands' bash blocks that read .ai/workflows.config.json via jq cannot run. /flow:validate and /flow:utils-verify quality gates need this.",
|
|
113
|
+
"usedBy": [
|
|
114
|
+
"commands/validate.md",
|
|
115
|
+
"commands/utils-verify.md",
|
|
116
|
+
"commands/quick.md",
|
|
117
|
+
"commands/done.md"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "askuserquestion-mcp",
|
|
122
|
+
"type": "mcp",
|
|
123
|
+
"hardness": "soft",
|
|
124
|
+
"check": {
|
|
125
|
+
"mcp": "AskUserQuestion",
|
|
126
|
+
"tool": "ask"
|
|
127
|
+
},
|
|
128
|
+
"fallbackBehavior": "Question prompts fall back to numbered-prose chat. No multi-select UI.",
|
|
129
|
+
"usedBy": ["skills/question-protocol/SKILL.md"]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "terminal-skills-mcp",
|
|
133
|
+
"type": "mcp",
|
|
134
|
+
"hardness": "soft",
|
|
135
|
+
"check": {
|
|
136
|
+
"mcp": "terminal-skills",
|
|
137
|
+
"tool": "search_skills"
|
|
138
|
+
},
|
|
139
|
+
"fallbackBehavior": "skill-loader falls back to built-in plugin skills → matching agents → WebFetch on library docs.",
|
|
140
|
+
"usedBy": ["skills/skill-loader/SKILL.md"]
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "maude plugin — runtime dependency manifest",
|
|
4
|
+
"description": "Declares CLI binaries, MCP servers, and runtime packages the plugin's commands / agents / skills shell out to. Consumed by maude doctor (cli/commands/doctor.mjs) and preflight.sh / preflight.mjs. Schema is shared between plugins — each plugin ships its own dependencies.json + (symlink to) this schema.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["version", "plugin", "dependencies"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "1",
|
|
12
|
+
"description": "Manifest schema version. Bumped when the dependency entry shape changes incompatibly."
|
|
13
|
+
},
|
|
14
|
+
"plugin": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"description": "Plugin name (matches plugins/<plugin>/.claude-plugin/plugin.json `name`)."
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"minItems": 0,
|
|
22
|
+
"items": { "$ref": "#/$defs/Dependency" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"$defs": {
|
|
26
|
+
"Dependency": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["id", "type", "hardness", "check"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"id": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*$",
|
|
34
|
+
"description": "Unique identifier within the manifest. Lowercase, hyphenated."
|
|
35
|
+
},
|
|
36
|
+
"type": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": ["cli", "mcp", "node-package", "bun-package", "system-tool"],
|
|
39
|
+
"description": "What kind of dependency. `cli` = on PATH; `mcp` = MCP server / tool; `node-package` / `bun-package` = installed via npm/bun; `system-tool` = OS-provided (curl, jq)."
|
|
40
|
+
},
|
|
41
|
+
"hardness": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["hard", "soft"],
|
|
44
|
+
"description": "`hard` = missing blocks plugin use; `soft` = graceful degradation possible (fallback path, warning only)."
|
|
45
|
+
},
|
|
46
|
+
"check": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"description": "How to detect presence. For CLI/system-tool/package: shell command + expected exit. For MCP: tool name to probe.",
|
|
50
|
+
"properties": {
|
|
51
|
+
"command": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Shell command executed via `bash -c`. Pipes allowed. Defaults to `<id> --version`."
|
|
54
|
+
},
|
|
55
|
+
"expectExit": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"default": 0,
|
|
58
|
+
"description": "Expected exit code. Anything else = missing/broken."
|
|
59
|
+
},
|
|
60
|
+
"minVersion": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Minimum semver. Comparator extracts `vX.Y.Z` from check.command stdout."
|
|
63
|
+
},
|
|
64
|
+
"mcp": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "MCP server name. For type=mcp only."
|
|
67
|
+
},
|
|
68
|
+
"tool": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "Specific tool name on the MCP server. For type=mcp only."
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"install": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"description": "Install commands per platform. `preferred` is OS-agnostic / fallback; per-platform keys override.",
|
|
78
|
+
"properties": {
|
|
79
|
+
"preferred": { "type": "string" },
|
|
80
|
+
"darwin": { "type": "string" },
|
|
81
|
+
"linux": { "type": "string" },
|
|
82
|
+
"win32": { "type": "string" }
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"autoInstall": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"default": false,
|
|
88
|
+
"description": "If true, `maude doctor --fix` may run install.preferred after per-dep confirmation prompt."
|
|
89
|
+
},
|
|
90
|
+
"fallbackBehavior": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "What the plugin does when this soft dep is missing. Human-readable; surfaces in maude doctor's report."
|
|
93
|
+
},
|
|
94
|
+
"usedBy": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": { "type": "string" },
|
|
97
|
+
"description": "Repo-relative paths (or path globs) of plugin files that reference this dependency. Aids debugging — doctor surfaces this when explaining a miss."
|
|
98
|
+
},
|
|
99
|
+
"docsUrl": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"format": "uri",
|
|
102
|
+
"description": "Where to read more."
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|