@voiden/runner 2.2.0 → 2.3.0-beta.10
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/CHANGELOG.md +68 -0
- package/bundled-runners/versions.json +8 -6
- package/bundled-runners/voiden-advanced-auth-runner.js +1 -1
- package/bundled-runners/voiden-graphql-runner.js +1 -1
- package/bundled-runners/voiden-mcp-client-runner.js +1 -0
- package/bundled-runners/voiden-mcp-tool-runner.js +143 -0
- package/bundled-runners/voiden-rest-api-runner.js +1 -1
- package/bundled-runners/voiden-sockets-grpcs-runner.js +1 -1
- package/dist/cliPrint.d.ts +7 -0
- package/dist/cliPrint.d.ts.map +1 -0
- package/dist/cliPrint.js +166 -0
- package/dist/cliPrint.js.map +1 -0
- package/dist/envFile.d.ts +13 -0
- package/dist/envFile.d.ts.map +1 -0
- package/dist/envFile.js +117 -0
- package/dist/envFile.js.map +1 -0
- package/dist/headlessContext.d.ts.map +1 -1
- package/dist/headlessContext.js +43 -0
- package/dist/headlessContext.js.map +1 -1
- package/dist/index.js +271 -33
- package/dist/index.js.map +1 -1
- package/dist/lib.d.ts +12 -8
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +16 -9
- package/dist/lib.js.map +1 -1
- package/dist/mcpServing.d.ts +39 -0
- package/dist/mcpServing.d.ts.map +1 -0
- package/dist/mcpServing.js +154 -0
- package/dist/mcpServing.js.map +1 -0
- package/dist/mcpToolCapability.d.ts +158 -0
- package/dist/mcpToolCapability.d.ts.map +1 -0
- package/dist/mcpToolCapability.js +87 -0
- package/dist/mcpToolCapability.js.map +1 -0
- package/dist/plugins/loader.d.ts.map +1 -1
- package/dist/plugins/loader.js +6 -0
- package/dist/plugins/loader.js.map +1 -1
- package/dist/requestContainerRegistry.d.ts +36 -0
- package/dist/requestContainerRegistry.d.ts.map +1 -0
- package/dist/requestContainerRegistry.js +42 -0
- package/dist/requestContainerRegistry.js.map +1 -0
- package/dist/resultBlock.d.ts +7 -1
- package/dist/resultBlock.d.ts.map +1 -1
- package/dist/resultBlock.js +28 -6
- package/dist/resultBlock.js.map +1 -1
- package/dist/runner.d.ts +9 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +32 -11
- package/dist/runner.js.map +1 -1
- package/dist/runtimeVars.d.ts.map +1 -1
- package/dist/runtimeVars.js +18 -0
- package/dist/runtimeVars.js.map +1 -1
- package/dist/toolRegistry.d.ts +102 -0
- package/dist/toolRegistry.d.ts.map +1 -0
- package/dist/toolRegistry.js +38 -0
- package/dist/toolRegistry.js.map +1 -0
- package/dist/types.d.ts +1 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -5
- package/dist/mcpInstall.d.ts +0 -48
- package/dist/mcpInstall.d.ts.map +0 -1
- package/dist/mcpInstall.js +0 -194
- package/dist/mcpInstall.js.map +0 -1
- package/dist/parser.d.ts +0 -24
- package/dist/parser.d.ts.map +0 -1
- package/dist/parser.js +0 -87
- package/dist/parser.js.map +0 -1
- package/dist/skillContent.d.ts +0 -8
- package/dist/skillContent.d.ts.map +0 -1
- package/dist/skillContent.js +0 -42
- package/dist/skillContent.js.map +0 -1
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
|
package/dist/parser.d.ts.map
DELETED
|
@@ -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
|
package/dist/parser.js.map
DELETED
|
@@ -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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AAC;AAQD;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;IAExC,MAAM,QAAQ,GAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAA;IAEhD,KAAK,MAAM,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"}
|
package/dist/skillContent.d.ts
DELETED
|
@@ -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"}
|
package/dist/skillContent.js
DELETED
|
@@ -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
|
package/dist/skillContent.js.map
DELETED
|
@@ -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"}
|