@voiden/runner 2.2.0 → 2.3.0-beta.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.
Files changed (49) hide show
  1. package/bundled-runners/versions.json +6 -6
  2. package/bundled-runners/voiden-advanced-auth-runner.js +1 -1
  3. package/bundled-runners/voiden-faker-runner.js +13 -6
  4. package/bundled-runners/voiden-graphql-runner.js +1 -1
  5. package/bundled-runners/voiden-rest-api-runner.js +1 -1
  6. package/bundled-runners/voiden-sockets-grpcs-runner.js +1 -1
  7. package/dist/envFile.d.ts +2 -0
  8. package/dist/envFile.d.ts.map +1 -0
  9. package/dist/envFile.js +59 -0
  10. package/dist/envFile.js.map +1 -0
  11. package/dist/headlessContext.d.ts.map +1 -1
  12. package/dist/headlessContext.js +9 -0
  13. package/dist/headlessContext.js.map +1 -1
  14. package/dist/index.js +3 -24
  15. package/dist/index.js.map +1 -1
  16. package/dist/lib.d.ts +4 -7
  17. package/dist/lib.d.ts.map +1 -1
  18. package/dist/lib.js +7 -8
  19. package/dist/lib.js.map +1 -1
  20. package/dist/plugins/loader.d.ts.map +1 -1
  21. package/dist/plugins/loader.js +2 -0
  22. package/dist/plugins/loader.js.map +1 -1
  23. package/dist/requestContainerRegistry.d.ts +36 -0
  24. package/dist/requestContainerRegistry.d.ts.map +1 -0
  25. package/dist/requestContainerRegistry.js +42 -0
  26. package/dist/requestContainerRegistry.js.map +1 -0
  27. package/dist/resultBlock.d.ts +7 -1
  28. package/dist/resultBlock.d.ts.map +1 -1
  29. package/dist/resultBlock.js +28 -6
  30. package/dist/resultBlock.js.map +1 -1
  31. package/dist/runner.d.ts +9 -0
  32. package/dist/runner.d.ts.map +1 -1
  33. package/dist/runner.js +25 -9
  34. package/dist/runner.js.map +1 -1
  35. package/dist/types.d.ts +1 -5
  36. package/dist/types.d.ts.map +1 -1
  37. package/package.json +2 -2
  38. package/dist/mcpInstall.d.ts +0 -48
  39. package/dist/mcpInstall.d.ts.map +0 -1
  40. package/dist/mcpInstall.js +0 -194
  41. package/dist/mcpInstall.js.map +0 -1
  42. package/dist/parser.d.ts +0 -24
  43. package/dist/parser.d.ts.map +0 -1
  44. package/dist/parser.js +0 -87
  45. package/dist/parser.js.map +0 -1
  46. package/dist/skillContent.d.ts +0 -8
  47. package/dist/skillContent.d.ts.map +0 -1
  48. package/dist/skillContent.js +0 -42
  49. package/dist/skillContent.js.map +0 -1
@@ -1,194 +0,0 @@
1
- /**
2
- * Shared "enable AI-agent integration" logic — registers @voiden/mcp-server
3
- * with Claude Code / Codex, and (for CLI-only users who don't have the
4
- * Voiden app's richer composed skill available) installs a standalone skill
5
- * describing the run/verify/write-back loop.
6
- *
7
- * Used by two callers:
8
- * - packages/voiden-runner's own CLI (`voiden-runner mcp install|uninstall|status`)
9
- * - apps/electron's Settings "Claude/Codex integration" toggle, which already
10
- * installs its own richer composed skill (skillsInstaller.ts) and only
11
- * needs the MCP *registration* half from here — it does not call
12
- * installRunnerSkill/uninstallRunnerSkill, to avoid writing a second,
13
- * more minimal skill file alongside its own.
14
- */
15
- import * as fs from 'fs';
16
- import * as path from 'path';
17
- import * as os from 'os';
18
- const SERVER_NAME = 'voiden-runner';
19
- // Standalone skill slug — deliberately different from the Voiden app's own
20
- // "voiden" skill directory, so a machine with both installed doesn't have
21
- // one silently overwrite the other's (differently-scoped) content.
22
- const SKILL_SLUG = 'voiden-runner';
23
- /**
24
- * Default launch command — requires @voiden/mcp-server to be published to
25
- * npm; until then, pass an explicit `serverCommand` override (e.g. `{command:
26
- * 'node', args: ['/abs/path/to/voiden-mcp-server/dist/index.js', projectPath]}`)
27
- * to test against a local build.
28
- */
29
- function defaultServerCommand(projectPath) {
30
- return {
31
- command: 'npx',
32
- args: ['-y', '@voiden/mcp-server', projectPath],
33
- };
34
- }
35
- // ─── Claude Code ────────────────────────────────────────────────────────────
36
- // Project-scoped .mcp.json — the documented, public schema Claude Code reads
37
- // from a project directory. (Claude Code's user-scope config is an opaque,
38
- // larger state file we deliberately don't hand-edit — see README.)
39
- function claudeMcpConfigPath(projectPath) {
40
- return path.join(projectPath, '.mcp.json');
41
- }
42
- export function registerClaudeMcpServer(projectPath, serverCommand) {
43
- const configPath = claudeMcpConfigPath(projectPath);
44
- let config = {};
45
- if (fs.existsSync(configPath)) {
46
- try {
47
- config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
48
- }
49
- catch {
50
- config = {};
51
- }
52
- }
53
- config.mcpServers = config.mcpServers ?? {};
54
- config.mcpServers[SERVER_NAME] = serverCommand ?? defaultServerCommand(projectPath);
55
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n', 'utf-8');
56
- }
57
- export function unregisterClaudeMcpServer(projectPath) {
58
- const configPath = claudeMcpConfigPath(projectPath);
59
- if (!fs.existsSync(configPath))
60
- return;
61
- try {
62
- const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
63
- if (config.mcpServers && SERVER_NAME in config.mcpServers) {
64
- delete config.mcpServers[SERVER_NAME];
65
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n', 'utf-8');
66
- }
67
- }
68
- catch { /* leave an unreadable file alone rather than clobber it */ }
69
- }
70
- export function isClaudeMcpRegistered(projectPath) {
71
- const configPath = claudeMcpConfigPath(projectPath);
72
- if (!fs.existsSync(configPath))
73
- return false;
74
- try {
75
- const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
76
- return Boolean(config?.mcpServers?.[SERVER_NAME]);
77
- }
78
- catch {
79
- return false;
80
- }
81
- }
82
- function claudeSkillDir() {
83
- return path.join(os.homedir(), '.claude', 'skills', SKILL_SLUG);
84
- }
85
- export function installClaudeSkill(markdown) {
86
- const dir = claudeSkillDir();
87
- fs.mkdirSync(dir, { recursive: true });
88
- fs.writeFileSync(path.join(dir, 'SKILL.md'), markdown, 'utf-8');
89
- }
90
- export function uninstallClaudeSkill() {
91
- const dir = claudeSkillDir();
92
- if (fs.existsSync(dir))
93
- fs.rmSync(dir, { recursive: true, force: true });
94
- }
95
- export function isClaudeSkillInstalled() {
96
- return fs.existsSync(path.join(claudeSkillDir(), 'SKILL.md'));
97
- }
98
- // ─── Codex CLI ──────────────────────────────────────────────────────────────
99
- // Codex reads MCP servers from ~/.codex/config.toml's [mcp_servers.<name>]
100
- // tables. There's no TOML dependency here — the section shape we write is
101
- // simple enough for a targeted regex replace/append, done as plain text.
102
- function codexConfigPath() {
103
- return path.join(os.homedir(), '.codex', 'config.toml');
104
- }
105
- function codexSectionRegex() {
106
- return new RegExp(`\\n?\\[mcp_servers\\.${SERVER_NAME}\\][^\\[]*`, 'm');
107
- }
108
- function toTomlStringArray(values) {
109
- return '[' + values.map(v => `"${v.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`).join(', ') + ']';
110
- }
111
- export function upsertCodexMcpSection(projectPath, serverCommand) {
112
- const configPath = codexConfigPath();
113
- fs.mkdirSync(path.dirname(configPath), { recursive: true });
114
- let content = fs.existsSync(configPath) ? fs.readFileSync(configPath, 'utf-8') : '';
115
- const { command, args } = serverCommand ?? defaultServerCommand(projectPath);
116
- const section = `[mcp_servers.${SERVER_NAME}]\n` +
117
- `command = "${command}"\n` +
118
- `args = ${toTomlStringArray(args)}\n`;
119
- if (codexSectionRegex().test(content)) {
120
- content = content.replace(codexSectionRegex(), '\n' + section);
121
- }
122
- else {
123
- content = content.trimEnd() + (content.trim() ? '\n\n' : '') + section;
124
- }
125
- fs.writeFileSync(configPath, content, 'utf-8');
126
- }
127
- export function removeCodexMcpSection() {
128
- const configPath = codexConfigPath();
129
- if (!fs.existsSync(configPath))
130
- return;
131
- const content = fs.readFileSync(configPath, 'utf-8').replace(codexSectionRegex(), '');
132
- fs.writeFileSync(configPath, content, 'utf-8');
133
- }
134
- export function isCodexMcpRegistered() {
135
- const configPath = codexConfigPath();
136
- if (!fs.existsSync(configPath))
137
- return false;
138
- const content = fs.readFileSync(configPath, 'utf-8');
139
- return content.includes(`[mcp_servers.${SERVER_NAME}]`);
140
- }
141
- function codexSkillDir() {
142
- return path.join(os.homedir(), '.codex', 'skills', SKILL_SLUG);
143
- }
144
- export function installCodexSkill(markdown) {
145
- const dir = codexSkillDir();
146
- fs.mkdirSync(dir, { recursive: true });
147
- fs.writeFileSync(path.join(dir, 'SKILL.md'), markdown, 'utf-8');
148
- }
149
- export function uninstallCodexSkill() {
150
- const dir = codexSkillDir();
151
- if (fs.existsSync(dir))
152
- fs.rmSync(dir, { recursive: true, force: true });
153
- }
154
- export function isCodexSkillInstalled() {
155
- return fs.existsSync(path.join(codexSkillDir(), 'SKILL.md'));
156
- }
157
- export function installMcpIntegration(projectPath, targets, skillMarkdown, serverCommand) {
158
- const resolved = path.resolve(projectPath);
159
- const installed = [];
160
- if (targets.claude) {
161
- registerClaudeMcpServer(resolved, serverCommand);
162
- installClaudeSkill(skillMarkdown);
163
- installed.push('claude');
164
- }
165
- if (targets.codex) {
166
- upsertCodexMcpSection(resolved, serverCommand);
167
- installCodexSkill(skillMarkdown);
168
- installed.push('codex');
169
- }
170
- return installed;
171
- }
172
- export function uninstallMcpIntegration(projectPath, targets) {
173
- const resolved = path.resolve(projectPath);
174
- const removed = [];
175
- if (targets.claude) {
176
- unregisterClaudeMcpServer(resolved);
177
- uninstallClaudeSkill();
178
- removed.push('claude');
179
- }
180
- if (targets.codex) {
181
- removeCodexMcpSection();
182
- uninstallCodexSkill();
183
- removed.push('codex');
184
- }
185
- return removed;
186
- }
187
- export function getMcpStatus(projectPath) {
188
- const resolved = path.resolve(projectPath);
189
- return {
190
- claude: { skillInstalled: isClaudeSkillInstalled(), serverRegistered: isClaudeMcpRegistered(resolved) },
191
- codex: { skillInstalled: isCodexSkillInstalled(), serverRegistered: isCodexMcpRegistered() },
192
- };
193
- }
194
- //# sourceMappingURL=mcpInstall.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcpInstall.js","sourceRoot":"","sources":["../src/mcpInstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE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AC,WAAmB;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAC1C,OAAO;QACL,MAAM,EAAE,EAAE,cAAc,EAAE,sBAAsB,EAAE,EAAE,gBAAgB,EAAE,qBAAqB,CAAC,QAAQ,CAAC,EAAE;QACvG,KAAK,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,EAAE;KAC7F,CAAA;AACH,CAAC"}
package/dist/parser.d.ts DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * Parser: .void file content (markdown string) → Block[]
3
- *
4
- * Adapted from apps/ui/src/core/editors/voiden/markdownConverter.ts
5
- * - No TipTap/ProseMirror dependency
6
- * - No schema validation — trusts the YAML type field as-is
7
- */
8
- import type { Block } from './types.js';
9
- /**
10
- * Parse .void file content into an array of blocks.
11
- * Extracts all ```void ... ``` fenced code blocks from the markdown.
12
- */
13
- export declare function parseVoidFile(content: string): Block[];
14
- export interface VoidSection {
15
- /** Label from the request-separator block, if present */
16
- label?: string;
17
- blocks: Block[];
18
- }
19
- /**
20
- * Parse .void file content into sections split at request-separator blocks.
21
- * A file with no separators returns a single section.
22
- */
23
- export declare function parseVoidFileSections(content: string): VoidSection[];
24
- //# sourceMappingURL=parser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AA6CvC;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,CActD;AAED,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,EAAE,CAiBpE"}
package/dist/parser.js DELETED
@@ -1,87 +0,0 @@
1
- /**
2
- * Parser: .void file content (markdown string) → Block[]
3
- *
4
- * Adapted from apps/ui/src/core/editors/voiden/markdownConverter.ts
5
- * - No TipTap/ProseMirror dependency
6
- * - No schema validation — trusts the YAML type field as-is
7
- */
8
- import YAML from 'yaml';
9
- /**
10
- * Restore %%EMPTY_LINE%% placeholders back to empty strings.
11
- * These appear in script/code node bodies when saved.
12
- */
13
- function restoreEmptyLineMarkers(value) {
14
- if (typeof value === 'string') {
15
- return value.replace(/%%EMPTY_LINE%%/g, '');
16
- }
17
- if (Array.isArray(value)) {
18
- return value.map(restoreEmptyLineMarkers);
19
- }
20
- if (value && typeof value === 'object') {
21
- const result = {};
22
- for (const [k, v] of Object.entries(value)) {
23
- result[k] = restoreEmptyLineMarkers(v);
24
- }
25
- return result;
26
- }
27
- return value;
28
- }
29
- /**
30
- * Parse a single void code block text (the YAML inside the fenced block).
31
- * Returns null if the block is malformed.
32
- */
33
- function parseVoidBlockText(text) {
34
- const lines = text.trim().split('\n');
35
- if (lines[0]?.trim() !== '---')
36
- return null;
37
- const headerEnd = lines.indexOf('---', 1);
38
- if (headerEnd === -1)
39
- return null;
40
- const yamlText = lines.slice(1, headerEnd).join('\n');
41
- try {
42
- let node = YAML.parse(yamlText);
43
- node = restoreEmptyLineMarkers(node);
44
- return node;
45
- }
46
- catch {
47
- return null;
48
- }
49
- }
50
- /**
51
- * Parse .void file content into an array of blocks.
52
- * Extracts all ```void ... ``` fenced code blocks from the markdown.
53
- */
54
- export function parseVoidFile(content) {
55
- const blocks = [];
56
- // Match ```void\n...\n``` fenced code blocks
57
- const regex = /^```void\n([\s\S]*?)^```/gm;
58
- let match;
59
- while ((match = regex.exec(content)) !== null) {
60
- const block = parseVoidBlockText(match[1]);
61
- if (block) {
62
- blocks.push(block);
63
- }
64
- }
65
- return blocks;
66
- }
67
- /**
68
- * Parse .void file content into sections split at request-separator blocks.
69
- * A file with no separators returns a single section.
70
- */
71
- export function parseVoidFileSections(content) {
72
- const allBlocks = parseVoidFile(content);
73
- const sections = [{ blocks: [] }];
74
- for (const block of allBlocks) {
75
- if (block.type === 'request-separator') {
76
- sections.push({
77
- label: block.attrs?.label,
78
- blocks: [],
79
- });
80
- }
81
- else {
82
- sections[sections.length - 1].blocks.push(block);
83
- }
84
- }
85
- return sections.filter(s => s.blocks.length > 0);
86
- }
87
- //# sourceMappingURL=parser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAA;AAGvB;;;GAGG;AACH,SAAS,uBAAuB,CAAC,KAAc;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAA;IAC7C,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;IAC3C,CAAC;IACD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,MAAM,GAA4B,EAAE,CAAA;QAC1C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;YACtE,MAAM,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC,CAAC,CAAA;QACxC,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAED;;;GAGG;AACH,SAAS,kBAAkB,CAAC,IAAY;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACrC,IAAI,KA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AM,KAAK,IAAI,SAAS,EAAE,CAAC;QAC9B,IAAI,KAAK,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YACvC,QAAQ,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAA2B;gBAC/C,MAAM,EAAE,EAAE;aACX,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAClD,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAClD,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Standalone skill installed by `voiden-runner mcp install` for CLI-only
3
- * users (no Voiden app, so none of its richer composed .void-authoring
4
- * skill is available). Focused on the MCP tools this package ships —
5
- * list/run/verify/write-back — not on full block-authoring syntax.
6
- */
7
- export declare const RUNNER_SKILL_MARKDOWN = "---\nname: voiden-runner\ndescription: Run and verify .void API requests via the voiden-mcp-server MCP tools \u2014 list requests, execute them for real, read structured results, and record them back into the file.\n---\n\n# Voiden Runner \u2014 Running & Verifying .void Requests\n\n.void files describe HTTP/GraphQL/WebSocket/gRPC requests (see https://docs.voiden.md for the full authoring format, or the Voiden app's own \"voiden\" skill if it's installed). This skill covers a different, complementary job: **actually executing** those requests and checking the result, instead of only ever generating text that looks correct.\n\nA request block that merely looks well-formed can still be wrong (bad URL, wrong auth, malformed body). Don't stop at \"this looks right\" when you can check that it *is* right.\n\n## Tools\n\n| Tool | Use it to |\n|------|-----------|\n| `list_void_files` | See which `.void` files exist in the project |\n| `list_requests` | See what requests a file contains (label, request uid, method, URL) without running anything |\n| `run_request` | Actually execute a request (or a whole file) \u2014 makes a real network call and returns a structured result: `success`, `status`, `statusText`, `durationMs`, `body`, `error`, headers |\n| `write_result` | Record a `run_request` result back into the `.void` file, as a `response` block placed right after the request it belongs to |\n\n## Workflow\n\n1. Call `list_void_files` / `list_requests` to see what's actually in the project before assuming.\n2. Call `run_request` (with `sectionLabel` if you only want one request) to execute it for real.\n3. Read the result, don't just assume success:\n - `success: false` or a non-2xx `status` \u2014 read `error`/`body` for why, fix the request block, and re-run. A request that \"looks right\" but 404s or 401s is not done.\n - `success: true` \u2014 sanity-check the response `body` actually matches what the request was supposed to do.\n4. Optionally call `write_result` with the `requestUid` and the specific `results[i].result` object (not the whole `run_request` response) to persist what actually happened into the file.\n\n## Caveats\n\n- `run_request` makes a real call against whatever `BASE_URL`/auth/tokens are in scope for the target environment \u2014 treat it like running the request for real, not like generating text. Check which env/profile is active before running against anything that matters (e.g. don't hit `prod` by accident).\n- `write_result` has no file locking. Don't call it on a file that's open with unsaved edits elsewhere (e.g. in the Voiden app right now) \u2014 the next save there can overwrite it, or it can overwrite in-progress edits.\n- For CI/CD validation, prefer the plain `voiden-runner run --json` CLI command over this agent loop \u2014 it's deterministic and doesn't need an LLM in the loop. These tools are for interactive authoring/iteration, not as a CI gate.\n";
8
- //# sourceMappingURL=skillContent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skillContent.d.ts","sourceRoot":"","sources":["../src/skillContent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,g4FAkCjC,CAAA"}
@@ -1,42 +0,0 @@
1
- /**
2
- * Standalone skill installed by `voiden-runner mcp install` for CLI-only
3
- * users (no Voiden app, so none of its richer composed .void-authoring
4
- * skill is available). Focused on the MCP tools this package ships —
5
- * list/run/verify/write-back — not on full block-authoring syntax.
6
- */
7
- export const RUNNER_SKILL_MARKDOWN = `---
8
- name: voiden-runner
9
- description: Run and verify .void API requests via the voiden-mcp-server MCP tools — list requests, execute them for real, read structured results, and record them back into the file.
10
- ---
11
-
12
- # Voiden Runner — Running & Verifying .void Requests
13
-
14
- .void files describe HTTP/GraphQL/WebSocket/gRPC requests (see https://docs.voiden.md for the full authoring format, or the Voiden app's own "voiden" skill if it's installed). This skill covers a different, complementary job: **actually executing** those requests and checking the result, instead of only ever generating text that looks correct.
15
-
16
- A request block that merely looks well-formed can still be wrong (bad URL, wrong auth, malformed body). Don't stop at "this looks right" when you can check that it *is* right.
17
-
18
- ## Tools
19
-
20
- | Tool | Use it to |
21
- |------|-----------|
22
- | \`list_void_files\` | See which \`.void\` files exist in the project |
23
- | \`list_requests\` | See what requests a file contains (label, request uid, method, URL) without running anything |
24
- | \`run_request\` | Actually execute a request (or a whole file) — makes a real network call and returns a structured result: \`success\`, \`status\`, \`statusText\`, \`durationMs\`, \`body\`, \`error\`, headers |
25
- | \`write_result\` | Record a \`run_request\` result back into the \`.void\` file, as a \`response\` block placed right after the request it belongs to |
26
-
27
- ## Workflow
28
-
29
- 1. Call \`list_void_files\` / \`list_requests\` to see what's actually in the project before assuming.
30
- 2. Call \`run_request\` (with \`sectionLabel\` if you only want one request) to execute it for real.
31
- 3. Read the result, don't just assume success:
32
- - \`success: false\` or a non-2xx \`status\` — read \`error\`/\`body\` for why, fix the request block, and re-run. A request that "looks right" but 404s or 401s is not done.
33
- - \`success: true\` — sanity-check the response \`body\` actually matches what the request was supposed to do.
34
- 4. Optionally call \`write_result\` with the \`requestUid\` and the specific \`results[i].result\` object (not the whole \`run_request\` response) to persist what actually happened into the file.
35
-
36
- ## Caveats
37
-
38
- - \`run_request\` makes a real call against whatever \`BASE_URL\`/auth/tokens are in scope for the target environment — treat it like running the request for real, not like generating text. Check which env/profile is active before running against anything that matters (e.g. don't hit \`prod\` by accident).
39
- - \`write_result\` has no file locking. Don't call it on a file that's open with unsaved edits elsewhere (e.g. in the Voiden app right now) — the next save there can overwrite it, or it can overwrite in-progress edits.
40
- - For CI/CD validation, prefer the plain \`voiden-runner run --json\` CLI command over this agent loop — it's deterministic and doesn't need an LLM in the loop. These tools are for interactive authoring/iteration, not as a CI gate.
41
- `;
42
- //# sourceMappingURL=skillContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skillContent.js","sourceRoot":"","sources":["../src/skillContent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCpC,CAAA"}