@rune-kit/rune 2.3.3 → 2.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/README.md +86 -17
- package/compiler/__tests__/pack-split.test.js +141 -1
- package/compiler/__tests__/parser.test.js +147 -55
- package/compiler/__tests__/scripts-bundling.test.js +283 -0
- package/compiler/__tests__/skill-index.test.js +218 -0
- package/compiler/__tests__/tier-override.test.js +41 -0
- package/compiler/adapters/antigravity.js +71 -53
- package/compiler/adapters/codex.js +4 -0
- package/compiler/adapters/cursor.js +4 -0
- package/compiler/adapters/generic.js +4 -0
- package/compiler/adapters/openclaw.js +4 -0
- package/compiler/adapters/opencode.js +4 -0
- package/compiler/adapters/windsurf.js +4 -0
- package/compiler/bin/rune.js +355 -355
- package/compiler/doctor.js +11 -1
- package/compiler/emitter.js +678 -386
- package/compiler/parser.js +267 -247
- package/compiler/transforms/scripts-path.js +18 -0
- package/extensions/zalo/PACK.md +20 -1
- package/extensions/zalo/references/conversation-management.md +214 -0
- package/extensions/zalo/references/eval-scenarios.md +157 -0
- package/extensions/zalo/references/listen-mode.md +237 -0
- package/extensions/zalo/references/mcp-production.md +274 -0
- package/extensions/zalo/references/multi-account-proxy.md +224 -0
- package/extensions/zalo/references/vietqr-banking.md +160 -0
- package/hooks/hooks.json +12 -0
- package/hooks/intent-router/index.cjs +108 -0
- package/hooks/pre-tool-guard/index.cjs +177 -68
- package/package.json +63 -64
- package/skills/brainstorm/SKILL.md +2 -0
- package/skills/cook/SKILL.md +661 -648
- package/skills/debug/SKILL.md +394 -392
- package/skills/deploy/SKILL.md +2 -0
- package/skills/fix/SKILL.md +283 -281
- package/skills/marketing/SKILL.md +3 -0
- package/skills/onboard/SKILL.md +7 -0
- package/skills/plan/SKILL.md +344 -342
- package/skills/preflight/SKILL.md +362 -360
- package/skills/review/SKILL.md +491 -489
- package/skills/scout/SKILL.md +1 -0
- package/skills/sentinel/SKILL.md +319 -296
- package/skills/sentinel/references/auth-crypto-reference.md +192 -0
- package/skills/sentinel/references/desktop-security.md +201 -0
- package/skills/sentinel/references/supply-chain.md +160 -0
- package/skills/session-bridge/SKILL.md +1 -0
- package/skills/slides/SKILL.md +142 -0
- package/skills/slides/scripts/build-deck.js +158 -0
- package/skills/team/SKILL.md +1 -0
- package/skills/test/SKILL.md +587 -585
- package/skills/verification/SKILL.md +1 -0
- package/skills/watchdog/SKILL.md +2 -0
- package/docs/ANTIGRAVITY-GAP-ANALYSIS.md +0 -369
- package/docs/ARCHITECTURE.md +0 -332
- package/docs/COMMUNITY-PACKS.md +0 -109
- package/docs/CONTRIBUTING-L4.md +0 -215
- package/docs/CROSS-IDE-ANALYSIS.md +0 -164
- package/docs/EXTENSION-TEMPLATE.md +0 -126
- package/docs/MESH-RULES.md +0 -34
- package/docs/MULTI-PLATFORM.md +0 -804
- package/docs/SKILL-DEPTH-AUDIT.md +0 -191
- package/docs/SKILL-TEMPLATE.md +0 -118
- package/docs/TRADE-MATRIX.md +0 -327
- package/docs/VERSIONING.md +0 -91
- package/docs/VISION.md +0 -263
- package/docs/assets/demo-subtitles.srt +0 -215
- package/docs/assets/end-card.html +0 -276
- package/docs/assets/mesh-diagram.html +0 -654
- package/docs/assets/thumbnail.html +0 -295
- package/docs/guides/cli.md +0 -403
- package/docs/guides/index.html +0 -1450
- package/docs/index.html +0 -1005
- package/docs/references/claudekit-analysis.md +0 -414
- package/docs/references/voltagent-analysis.md +0 -189
- package/docs/script.js +0 -495
- package/docs/skills/index.html +0 -832
- package/docs/style.css +0 -958
- package/docs/video-demo-plan.md +0 -172
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* build-deck.js — Converts JSON slide schema to Marp-compatible markdown.
|
|
5
|
+
*
|
|
6
|
+
* Usage: node build-deck.js --input slides.json --output deck.md [--theme default]
|
|
7
|
+
*
|
|
8
|
+
* JSON schema:
|
|
9
|
+
* {
|
|
10
|
+
* "title": "string",
|
|
11
|
+
* "author": "string (optional)",
|
|
12
|
+
* "theme": "default|gaia|uncover (optional)",
|
|
13
|
+
* "slides": [
|
|
14
|
+
* {
|
|
15
|
+
* "type": "title|content|code|diagram|image|quote|section",
|
|
16
|
+
* "heading": "string",
|
|
17
|
+
* "body": "string (markdown)",
|
|
18
|
+
* "notes": "string (speaker notes, optional)",
|
|
19
|
+
* "code": "{ lang, source } (if type=code)",
|
|
20
|
+
* "diagram": "string (mermaid, if type=diagram)"
|
|
21
|
+
* }
|
|
22
|
+
* ]
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
27
|
+
import { parseArgs } from 'node:util';
|
|
28
|
+
|
|
29
|
+
function parseCliArgs() {
|
|
30
|
+
const { values } = parseArgs({
|
|
31
|
+
options: {
|
|
32
|
+
input: { type: 'string', short: 'i' },
|
|
33
|
+
output: { type: 'string', short: 'o' },
|
|
34
|
+
theme: { type: 'string', short: 't', default: 'default' },
|
|
35
|
+
},
|
|
36
|
+
strict: true,
|
|
37
|
+
});
|
|
38
|
+
return values;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function renderSlide(slide) {
|
|
42
|
+
const type = slide.type || 'content';
|
|
43
|
+
const lines = [];
|
|
44
|
+
|
|
45
|
+
switch (type) {
|
|
46
|
+
case 'title':
|
|
47
|
+
lines.push(`# ${slide.heading || ''}`);
|
|
48
|
+
if (slide.body) lines.push('', slide.body);
|
|
49
|
+
break;
|
|
50
|
+
|
|
51
|
+
case 'section':
|
|
52
|
+
lines.push(`# ${slide.heading || ''}`);
|
|
53
|
+
if (slide.body) lines.push('', slide.body);
|
|
54
|
+
break;
|
|
55
|
+
|
|
56
|
+
case 'code':
|
|
57
|
+
if (slide.heading) lines.push(`## ${slide.heading}`, '');
|
|
58
|
+
if (slide.body) lines.push(slide.body, '');
|
|
59
|
+
if (slide.code) {
|
|
60
|
+
lines.push(`\`\`\`${slide.code.lang || ''}`, slide.code.source || '', '```');
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
|
|
64
|
+
case 'diagram':
|
|
65
|
+
if (slide.heading) lines.push(`## ${slide.heading}`, '');
|
|
66
|
+
if (slide.body) lines.push(slide.body, '');
|
|
67
|
+
if (slide.diagram) {
|
|
68
|
+
lines.push('```mermaid', slide.diagram, '```');
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
|
|
72
|
+
case 'image':
|
|
73
|
+
if (slide.heading) lines.push(`## ${slide.heading}`, '');
|
|
74
|
+
if (slide.body) lines.push(slide.body);
|
|
75
|
+
break;
|
|
76
|
+
|
|
77
|
+
case 'quote':
|
|
78
|
+
if (slide.heading) lines.push(`## ${slide.heading}`, '');
|
|
79
|
+
if (slide.body) lines.push(`> ${slide.body.replace(/\n/g, '\n> ')}`);
|
|
80
|
+
break;
|
|
81
|
+
|
|
82
|
+
default:
|
|
83
|
+
// 'content' and any unknown type
|
|
84
|
+
if (slide.heading) lines.push(`## ${slide.heading}`);
|
|
85
|
+
if (slide.body) lines.push('', slide.body);
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (slide.notes) {
|
|
90
|
+
lines.push('', `<!-- notes: ${slide.notes} -->`);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return lines.join('\n');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function buildDeck(data, theme) {
|
|
97
|
+
const resolvedTheme = data.theme || theme || 'default';
|
|
98
|
+
|
|
99
|
+
// Frontmatter
|
|
100
|
+
const parts = ['---', `marp: true`, `theme: ${resolvedTheme}`, '---', ''];
|
|
101
|
+
|
|
102
|
+
// Title slide
|
|
103
|
+
parts.push(`# ${data.title || 'Untitled'}`);
|
|
104
|
+
if (data.author) parts.push('', data.author);
|
|
105
|
+
parts.push('');
|
|
106
|
+
|
|
107
|
+
// Content slides
|
|
108
|
+
if (Array.isArray(data.slides) && data.slides.length > 0) {
|
|
109
|
+
for (const slide of data.slides) {
|
|
110
|
+
parts.push('---', '');
|
|
111
|
+
parts.push(renderSlide(slide));
|
|
112
|
+
parts.push('');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return parts.join('\n');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async function main() {
|
|
120
|
+
const args = parseCliArgs();
|
|
121
|
+
|
|
122
|
+
if (!args.input) {
|
|
123
|
+
console.error('Usage: node build-deck.js --input slides.json --output deck.md [--theme default]');
|
|
124
|
+
process.exit(1);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
let raw;
|
|
128
|
+
try {
|
|
129
|
+
raw = await readFile(args.input, 'utf-8');
|
|
130
|
+
} catch (err) {
|
|
131
|
+
console.error(`Error reading input file: ${err.message}`);
|
|
132
|
+
process.exit(1);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let data;
|
|
136
|
+
try {
|
|
137
|
+
data = JSON.parse(raw);
|
|
138
|
+
} catch (err) {
|
|
139
|
+
console.error(`Invalid JSON: ${err.message}`);
|
|
140
|
+
process.exit(1);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (!data.title) {
|
|
144
|
+
console.error('Error: JSON must have a "title" field');
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const markdown = buildDeck(data, args.theme);
|
|
149
|
+
|
|
150
|
+
if (args.output) {
|
|
151
|
+
await writeFile(args.output, markdown, 'utf-8');
|
|
152
|
+
console.log(`Deck written to ${args.output} (${data.slides?.length || 0} slides)`);
|
|
153
|
+
} else {
|
|
154
|
+
process.stdout.write(markdown);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
main();
|