@darkrymit/crunes-cli 0.8.5 → 0.9.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/dist/chunks/{add-CBHWFGCA.js → add-IT3IHBPO.js} +2 -2
- package/dist/chunks/{apply-J4YICV6H.js → apply-YY7MIM64.js} +9 -9
- package/dist/chunks/{benchmark-AKKV7G32.js → benchmark-BQNMULOO.js} +17 -14
- package/dist/chunks/{browse-JZFU52ET.js → browse-PHMBDREQ.js} +2 -2
- package/dist/chunks/{chunk-6MRZXASS.js → chunk-2Q3KLBE6.js} +16 -0
- package/dist/chunks/{chunk-KII6KW5Z.js → chunk-34F4ZURL.js} +40 -37
- package/dist/chunks/{chunk-ZJDKCC2Y.js → chunk-4GJMCFR6.js} +6 -3
- package/dist/chunks/chunk-CY6C6ADU.js +2787 -0
- package/dist/chunks/{chunk-J3GZ3DXD.js → chunk-GVMT55GH.js} +3 -2
- package/dist/chunks/{chunk-JOAL437H.js → chunk-I6MHDUCW.js} +16 -1
- package/dist/chunks/{chunk-6XLT25GS.js → chunk-MIKWIFYR.js} +47 -0
- package/dist/chunks/chunk-MRNZFUXZ.js +70 -0
- package/dist/chunks/{chunk-T53L5CJW.js → chunk-PBGUKXT6.js} +2887 -1874
- package/dist/chunks/chunk-QYRF3R35.js +154 -0
- package/dist/chunks/{chunk-BTIPUR5S.js → chunk-SNC7AOT7.js} +78 -12
- package/dist/chunks/{chunk-63H5VXZY.js → chunk-UEUUOAJY.js} +4 -1
- package/dist/chunks/{chunk-GTCPZ22N.js → chunk-VST6HAB6.js} +1 -1
- package/dist/chunks/{chunk-NDEYEYSU.js → chunk-WJII3LZK.js} +4 -3
- package/dist/chunks/chunk-X7PZN73N.js +44 -0
- package/dist/chunks/{chunk-NYLRTAAA.js → chunk-YVN3VDRE.js} +1 -1
- package/dist/chunks/{chunk-WJRZN7BR.js → chunk-YXCHIMLW.js} +843 -3027
- package/dist/chunks/{clear-YBDIPEEH.js → clear-AT7HNUV4.js} +2 -2
- package/dist/chunks/{create-GPDE2YKL.js → create-ET6DT5ZE.js} +22 -18
- package/dist/chunks/{create-VYZRWRGQ.js → create-LM7U3CJS.js} +22 -18
- package/dist/chunks/{create-L6DJN4ME.js → create-TLPM7HJE.js} +3 -3
- package/dist/chunks/{delete-LNOYM5KG.js → delete-5R3WBLVD.js} +5 -5
- package/dist/chunks/{delete-E4TEBRPX.js → delete-GKYA2W5Z.js} +4 -2
- package/dist/chunks/{delete-C4UJ7X5K.js → delete-U4STA2QZ.js} +5 -5
- package/dist/chunks/disable-TNTEIAKO.js +39 -0
- package/dist/chunks/doctor-VXAQYMTR.js +101 -0
- package/dist/chunks/enable-GUQCB4CU.js +31 -0
- package/dist/chunks/{globals-H2WF344Y.js → globals-SNQFCHMP.js} +1 -1
- package/dist/chunks/{init-HU5OMHEH.js → init-PJSCFOC6.js} +14 -8
- package/dist/chunks/{install-FIYRMVLR.js → install-4YP7FALO.js} +18 -16
- package/dist/chunks/{intro-36OLGNYN.js → intro-SA7MWV3Z.js} +50 -8
- package/dist/chunks/{kill-2UG7PHUV.js → kill-TX3PC73P.js} +2 -1
- package/dist/chunks/list-7R6NASFI.js +92 -0
- package/dist/chunks/{list-4X3JFQGS.js → list-EHREZR6M.js} +2 -1
- package/dist/chunks/{list-U7PAYNAH.js → list-LC6HB3H3.js} +2 -2
- package/dist/chunks/{list-AIYNOPNZ.js → list-OMMZAQ23.js} +2 -2
- package/dist/chunks/{list-7VHJIUDX.js → list-U4EMHQZT.js} +2 -2
- package/dist/chunks/{list-PTAWQYWG.js → list-V7VVD5AG.js} +2 -1
- package/dist/chunks/{list-A5WVDBWF.js → list-VA73WPK6.js} +2 -2
- package/dist/chunks/{list-2JYMBMZC.js → list-WKNPZZOV.js} +5 -4
- package/dist/chunks/{output-RJ6JSNY7.js → output-QN5CVJ62.js} +4 -1
- package/dist/chunks/{query-AW7WYILM.js → query-2US3CPYT.js} +2 -2
- package/dist/chunks/{registry-RG34DPD7.js → registry-K5DV5NAK.js} +2 -2
- package/dist/chunks/{remove-QUH2D3S5.js → remove-BCFTF23J.js} +2 -2
- package/dist/chunks/{repl-STBZC4P2.js → repl-2YWTHUWT.js} +4 -0
- package/dist/chunks/{repl-BPEWARN7.js → repl-ZB3DIJ4K.js} +84 -26
- package/dist/chunks/resolver-QIYYFIDX.js +34 -0
- package/dist/chunks/run-22B65ZWZ.js +29 -0
- package/dist/chunks/rune-SYK4N642.js +425 -0
- package/dist/chunks/{search-MSSDGJTF.js → search-B7IM7JRJ.js} +2 -2
- package/dist/chunks/shell-explain-QLITLHW7.js +74 -0
- package/dist/chunks/{uninstall-G56DZRFG.js → uninstall-4WR5IHLC.js} +15 -11
- package/dist/chunks/{unset-YASSMSE5.js → unset-P6IUF7SS.js} +2 -2
- package/dist/chunks/{update-KSC6VRMU.js → update-ACLDK6E6.js} +19 -18
- package/dist/chunks/{update-EWWDROKW.js → update-WXT7CHYA.js} +2 -2
- package/dist/chunks/{utils-3SJFSUSV.js → utils-B2QULX5J.js} +8 -4
- package/dist/chunks/{version-YG2M7HER.js → version-EULYWNXN.js} +2 -2
- package/dist/cli.js +92 -64
- package/package.json +1 -1
- package/dist/chunks/chunk-ASZKAC24.js +0 -103
- package/dist/chunks/chunk-GSA432UC.js +0 -90
- package/dist/chunks/disable-FGJ7VMPO.js +0 -47
- package/dist/chunks/doctor-7NWBJAH7.js +0 -53
- package/dist/chunks/enable-ZL6QOC2I.js +0 -47
- package/dist/chunks/list-NZ5DHXJF.js +0 -111
- package/dist/chunks/resolver-36V72VKR.js +0 -28
- package/dist/chunks/run-IVL23SMW.js +0 -26
- package/dist/chunks/rune-XRREUL56.js +0 -186
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_cli_table3
|
|
3
|
+
} from "./chunk-DMMC4X27.js";
|
|
4
|
+
import {
|
|
5
|
+
enumerateRunes
|
|
6
|
+
} from "./chunk-MRNZFUXZ.js";
|
|
7
|
+
import "./chunk-YXCHIMLW.js";
|
|
8
|
+
import "./chunk-UEUUOAJY.js";
|
|
9
|
+
import "./chunk-4GJMCFR6.js";
|
|
10
|
+
import "./chunk-CY6C6ADU.js";
|
|
11
|
+
import "./chunk-GVMT55GH.js";
|
|
12
|
+
import "./chunk-WJII3LZK.js";
|
|
13
|
+
import "./chunk-G4ZAUHHA.js";
|
|
14
|
+
import {
|
|
15
|
+
LAYER,
|
|
16
|
+
ROOTLESS,
|
|
17
|
+
loadConfig
|
|
18
|
+
} from "./chunk-QYRF3R35.js";
|
|
19
|
+
import {
|
|
20
|
+
output
|
|
21
|
+
} from "./chunk-MIKWIFYR.js";
|
|
22
|
+
import "./chunk-CGZL5SSH.js";
|
|
23
|
+
import "./chunk-WCODTMDN.js";
|
|
24
|
+
import "./chunk-VST6HAB6.js";
|
|
25
|
+
import "./chunk-2Q3KLBE6.js";
|
|
26
|
+
import "./chunk-G3U4V32O.js";
|
|
27
|
+
import {
|
|
28
|
+
__toESM,
|
|
29
|
+
init_require_shim
|
|
30
|
+
} from "./chunk-TPK5AGRA.js";
|
|
31
|
+
|
|
32
|
+
// src/rune/commands/list.js
|
|
33
|
+
init_require_shim();
|
|
34
|
+
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
35
|
+
async function collectListRows({ projectRoot = process.cwd(), configRoot, global = false } = {}) {
|
|
36
|
+
const config = loadConfig(configRoot ?? projectRoot);
|
|
37
|
+
const entries = await enumerateRunes(config);
|
|
38
|
+
const rows = entries.map((entry) => ({
|
|
39
|
+
...entry,
|
|
40
|
+
layer: config.runes?.[entry.key] ? config.runes[entry.key][LAYER] ?? "project" : "plugin"
|
|
41
|
+
}));
|
|
42
|
+
return {
|
|
43
|
+
rows: global ? rows.filter((r) => r.layer === "global") : rows,
|
|
44
|
+
rootless: config[ROOTLESS] === true
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
async function handler({
|
|
48
|
+
format = "md",
|
|
49
|
+
plain = false,
|
|
50
|
+
projectRoot = process.cwd(),
|
|
51
|
+
configRoot = projectRoot,
|
|
52
|
+
global = false
|
|
53
|
+
} = {}) {
|
|
54
|
+
let entries, rootless;
|
|
55
|
+
try {
|
|
56
|
+
({ rows: entries, rootless } = await collectListRows({ projectRoot, configRoot, global }));
|
|
57
|
+
} catch (err) {
|
|
58
|
+
output.error(`Config unreadable: ${err.message}`);
|
|
59
|
+
output.info("Run `crunes init` to create a config file.");
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
if (entries.length === 0) {
|
|
63
|
+
process.stdout.write("No runes configured. Run `crunes create <key>` to add one.\n");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (format === "json") {
|
|
67
|
+
process.stdout.write(JSON.stringify(entries, null, 2) + "\n");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (plain) {
|
|
71
|
+
for (const { key, name, description, source, layer } of entries) {
|
|
72
|
+
process.stdout.write(`${key} ${name ?? ""} ${description ?? ""} ${source} ${layer}
|
|
73
|
+
`);
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (rootless) {
|
|
78
|
+
process.stdout.write("no project config \u2014 global only\n");
|
|
79
|
+
}
|
|
80
|
+
const table = new import_cli_table3.default({
|
|
81
|
+
head: ["Key", "Name", "Description", "Source", "Layer"],
|
|
82
|
+
style: { head: ["cyan"] }
|
|
83
|
+
});
|
|
84
|
+
for (const { key, name, description, source, layer } of entries) {
|
|
85
|
+
table.push([key, name ?? "", description ?? "", source, layer]);
|
|
86
|
+
}
|
|
87
|
+
process.stdout.write(table.toString() + "\n");
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
collectListRows,
|
|
91
|
+
handler
|
|
92
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listLocalSqliteDbs,
|
|
3
3
|
listSqliteDbs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GVMT55GH.js";
|
|
5
5
|
import "./chunk-G4ZAUHHA.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-2Q3KLBE6.js";
|
|
7
7
|
import {
|
|
8
8
|
init_require_shim
|
|
9
9
|
} from "./chunk-TPK5AGRA.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listCacheBuckets,
|
|
3
3
|
listLocalCacheBuckets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WJII3LZK.js";
|
|
5
5
|
import "./chunk-G4ZAUHHA.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-2Q3KLBE6.js";
|
|
7
7
|
import {
|
|
8
8
|
init_require_shim
|
|
9
9
|
} from "./chunk-TPK5AGRA.js";
|
|
@@ -3,15 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-DMMC4X27.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QYRF3R35.js";
|
|
7
7
|
import {
|
|
8
8
|
output
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MIKWIFYR.js";
|
|
10
|
+
import "./chunk-CGZL5SSH.js";
|
|
10
11
|
import "./chunk-WCODTMDN.js";
|
|
11
12
|
import {
|
|
12
13
|
loadRegistry
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-VST6HAB6.js";
|
|
15
|
+
import "./chunk-2Q3KLBE6.js";
|
|
15
16
|
import {
|
|
16
17
|
loadPluginJson
|
|
17
18
|
} from "./chunk-G3U4V32O.js";
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
configure,
|
|
3
|
+
isPlain,
|
|
3
4
|
isVerbose,
|
|
4
5
|
output
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MIKWIFYR.js";
|
|
7
|
+
import "./chunk-CGZL5SSH.js";
|
|
6
8
|
import "./chunk-WCODTMDN.js";
|
|
7
9
|
import "./chunk-TPK5AGRA.js";
|
|
8
10
|
export {
|
|
9
11
|
configure,
|
|
12
|
+
isPlain,
|
|
10
13
|
isVerbose,
|
|
11
14
|
output
|
|
12
15
|
};
|
|
@@ -167,12 +167,16 @@ When \`--format jsonl\` is active and stdin is not a TTY, each stdin line is par
|
|
|
167
167
|
\`\`\`jsonl
|
|
168
168
|
{"type":"line","text":"SELECT 1"}
|
|
169
169
|
{"type":"line","text":"SELECT *\\nFROM books\\nWHERE genre = 'Sci-Fi'"}
|
|
170
|
+
{"type":"command","text":"/schema books"}
|
|
171
|
+
{"type":"command","args":{"$command":"schema","table":"books"}}
|
|
170
172
|
{"type":"interrupt"}
|
|
171
173
|
{"type":"eof"}
|
|
172
174
|
\`\`\`
|
|
173
175
|
|
|
174
176
|
Multi-line text is encoded as \`\\n\` in the JSON string \u2014 no Ctrl+Enter needed. Invalid JSON or unrecognised \`type\` values emit a \`{ type: "error" }\` JSONL output line and are skipped; the session continues.
|
|
175
177
|
|
|
178
|
+
Programmatic callers can use \`session.writeCommand('/schema books')\` or \`session.writeCommand('schema', { table: 'books' })\` to dispatch commands.
|
|
179
|
+
|
|
176
180
|
`);
|
|
177
181
|
}
|
|
178
182
|
export {
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatSection,
|
|
3
|
-
parseSegment
|
|
4
|
-
|
|
3
|
+
parseSegment,
|
|
4
|
+
permissionHint
|
|
5
|
+
} from "./chunk-SNC7AOT7.js";
|
|
5
6
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-GSA432UC.js";
|
|
8
|
-
import {
|
|
9
|
-
isGlobMatch,
|
|
7
|
+
describeConfigLayers,
|
|
10
8
|
parseArgs,
|
|
11
9
|
tailStdin
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import
|
|
10
|
+
} from "./chunk-YXCHIMLW.js";
|
|
11
|
+
import "./chunk-UEUUOAJY.js";
|
|
12
|
+
import "./chunk-4GJMCFR6.js";
|
|
13
|
+
import {
|
|
14
|
+
isGlobMatch
|
|
15
|
+
} from "./chunk-CY6C6ADU.js";
|
|
16
|
+
import "./chunk-GVMT55GH.js";
|
|
17
|
+
import "./chunk-WJII3LZK.js";
|
|
16
18
|
import "./chunk-G4ZAUHHA.js";
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
+
import {
|
|
20
|
+
loadConfig
|
|
21
|
+
} from "./chunk-QYRF3R35.js";
|
|
19
22
|
import {
|
|
20
23
|
isVerbose,
|
|
21
24
|
output
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MIKWIFYR.js";
|
|
26
|
+
import "./chunk-CGZL5SSH.js";
|
|
23
27
|
import "./chunk-WCODTMDN.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-VST6HAB6.js";
|
|
29
|
+
import "./chunk-2Q3KLBE6.js";
|
|
26
30
|
import "./chunk-G3U4V32O.js";
|
|
27
31
|
import {
|
|
28
32
|
init_require_shim
|
|
@@ -57,15 +61,54 @@ function parseJsonlInputLine(text) {
|
|
|
57
61
|
if (!parsed || !VALID_INPUT_TYPES.has(parsed.type)) return null;
|
|
58
62
|
return parsed;
|
|
59
63
|
}
|
|
60
|
-
function parseSlashCommand(line) {
|
|
64
|
+
function parseSlashCommand(line, requireSlash = true) {
|
|
61
65
|
const trimmed = line.trim();
|
|
62
|
-
if (!trimmed.startsWith("/")) return null;
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
+
if (requireSlash && !trimmed.startsWith("/")) return null;
|
|
67
|
+
const raw = trimmed.startsWith("/") ? trimmed.slice(1) : trimmed;
|
|
68
|
+
const spaceIdx = raw.indexOf(" ");
|
|
69
|
+
const name = spaceIdx === -1 ? raw : raw.slice(0, spaceIdx);
|
|
70
|
+
const rest = spaceIdx === -1 ? "" : raw.slice(spaceIdx + 1).trim();
|
|
66
71
|
if (!name) return null;
|
|
67
72
|
return { name, rest };
|
|
68
73
|
}
|
|
74
|
+
function resolveCommandEvent(event, commandsSchema) {
|
|
75
|
+
if (event.type !== "command") return event;
|
|
76
|
+
if (event.args && typeof event.args === "object") {
|
|
77
|
+
const args = { ...event.args };
|
|
78
|
+
if (event.name && !args.$command) args.$command = event.name;
|
|
79
|
+
if (!args.$command) args.$command = "";
|
|
80
|
+
if (!args.$commands) args.$commands = args.$command ? [args.$command] : [];
|
|
81
|
+
return { type: "command", args };
|
|
82
|
+
}
|
|
83
|
+
if (typeof event.text === "string") {
|
|
84
|
+
const slash = parseSlashCommand(event.text, false);
|
|
85
|
+
if (!slash) return { type: "command", args: { $command: "", $commands: [], _: [], $rest: [], $raw: [] } };
|
|
86
|
+
if (slash.name === "exit") return { type: "eof", text: "" };
|
|
87
|
+
if (commandsSchema?.commands?.some((c) => c.name === slash.name)) {
|
|
88
|
+
const cmdSchema = {
|
|
89
|
+
commands: commandsSchema.commands,
|
|
90
|
+
options: [],
|
|
91
|
+
positionals: [],
|
|
92
|
+
examples: []
|
|
93
|
+
};
|
|
94
|
+
const cmdTokens2 = slash.rest ? [slash.name, ...slash.rest.split(/\s+/)] : [slash.name];
|
|
95
|
+
const parsedCmdArgs2 = parseArgs(cmdTokens2, cmdSchema);
|
|
96
|
+
return { type: "command", args: parsedCmdArgs2 };
|
|
97
|
+
}
|
|
98
|
+
const cmdTokens = slash.rest ? [slash.name, ...slash.rest.split(/\s+/)] : [slash.name];
|
|
99
|
+
const parsedCmdArgs = parseArgs(cmdTokens, null);
|
|
100
|
+
parsedCmdArgs.$command = slash.name;
|
|
101
|
+
parsedCmdArgs.$commands = [slash.name];
|
|
102
|
+
return { type: "command", args: parsedCmdArgs };
|
|
103
|
+
}
|
|
104
|
+
if (typeof event.name === "string") {
|
|
105
|
+
return {
|
|
106
|
+
type: "command",
|
|
107
|
+
args: { $command: event.name, $commands: [event.name], _: [], $rest: [], $raw: [event.name] }
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return event;
|
|
111
|
+
}
|
|
69
112
|
function parseReplArgs(argv) {
|
|
70
113
|
let format = "text";
|
|
71
114
|
let i = 0;
|
|
@@ -104,7 +147,7 @@ async function handler({
|
|
|
104
147
|
output.info("Run `crunes init` to create a config file.");
|
|
105
148
|
process.exit(1);
|
|
106
149
|
}
|
|
107
|
-
const { resolveRuneEntry } = await import("./resolver-
|
|
150
|
+
const { resolveRuneEntry } = await import("./resolver-QIYYFIDX.js");
|
|
108
151
|
let runeEntry;
|
|
109
152
|
try {
|
|
110
153
|
runeEntry = await resolveRuneEntry(projectRoot, config, key, configRoot);
|
|
@@ -141,7 +184,12 @@ async function handler({
|
|
|
141
184
|
session = await runeEntry.createReplSession(runeArgs, { onEvent, instanceId });
|
|
142
185
|
} catch (err) {
|
|
143
186
|
const msg = isVerbose ? err.stack || err.message : err.message;
|
|
144
|
-
|
|
187
|
+
const hint = permissionHint(err.message, {
|
|
188
|
+
key,
|
|
189
|
+
lifecycle: "repl",
|
|
190
|
+
configLayers: describeConfigLayers(configRoot)
|
|
191
|
+
});
|
|
192
|
+
output.error(`Failed to start REPL for "${key}": ${msg}${hint ?? ""}`);
|
|
145
193
|
process.exit(1);
|
|
146
194
|
}
|
|
147
195
|
if (format === "jsonl") {
|
|
@@ -182,7 +230,12 @@ async function handler({
|
|
|
182
230
|
if (format === "jsonl") {
|
|
183
231
|
process.stdout.write(JSON.stringify({ type: "error", rune: key, instance: instanceId, message: msg }) + "\n");
|
|
184
232
|
} else {
|
|
185
|
-
|
|
233
|
+
const hint = permissionHint(err.message, {
|
|
234
|
+
key,
|
|
235
|
+
lifecycle: "repl",
|
|
236
|
+
configLayers: describeConfigLayers(configRoot)
|
|
237
|
+
});
|
|
238
|
+
process.stderr.write(`Error: ${msg}${hint ?? ""}
|
|
186
239
|
`);
|
|
187
240
|
}
|
|
188
241
|
prompt();
|
|
@@ -216,7 +269,10 @@ async function handler({
|
|
|
216
269
|
if (sessionEnded) return;
|
|
217
270
|
if (jsonlInput) {
|
|
218
271
|
const event = parseJsonlInputLine(line);
|
|
219
|
-
if (event)
|
|
272
|
+
if (event) {
|
|
273
|
+
const resolved = resolveCommandEvent(event, session.commandsSchema);
|
|
274
|
+
await handleInputEvent(resolved);
|
|
275
|
+
}
|
|
220
276
|
} else {
|
|
221
277
|
await handleInputEvent({ type: "line", text: line });
|
|
222
278
|
}
|
|
@@ -321,7 +377,8 @@ async function handler({
|
|
|
321
377
|
process.stdout.write(JSON.stringify({ type: "error", rune: key, instance: instanceId, message: `Invalid JSONL input: ${text}` }) + "\n");
|
|
322
378
|
return;
|
|
323
379
|
}
|
|
324
|
-
|
|
380
|
+
const resolved = resolveCommandEvent(event, session.commandsSchema);
|
|
381
|
+
await handleInputEvent(resolved);
|
|
325
382
|
return;
|
|
326
383
|
}
|
|
327
384
|
const slash = parseSlashCommand(text);
|
|
@@ -374,5 +431,6 @@ export {
|
|
|
374
431
|
parseJsonlInputLine,
|
|
375
432
|
parseReplArgs,
|
|
376
433
|
parseReplReturn,
|
|
377
|
-
parseSlashCommand
|
|
434
|
+
parseSlashCommand,
|
|
435
|
+
resolveCommandEvent
|
|
378
436
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
describeConfigLayers,
|
|
3
|
+
getRune,
|
|
4
|
+
normaliseRune,
|
|
5
|
+
resolvePluginRune,
|
|
6
|
+
resolveRuneEntry,
|
|
7
|
+
resolveRuneFilePath,
|
|
8
|
+
resolveRuneFromPlugins,
|
|
9
|
+
runRune
|
|
10
|
+
} from "./chunk-YXCHIMLW.js";
|
|
11
|
+
import "./chunk-UEUUOAJY.js";
|
|
12
|
+
import "./chunk-4GJMCFR6.js";
|
|
13
|
+
import "./chunk-CY6C6ADU.js";
|
|
14
|
+
import "./chunk-GVMT55GH.js";
|
|
15
|
+
import "./chunk-WJII3LZK.js";
|
|
16
|
+
import "./chunk-G4ZAUHHA.js";
|
|
17
|
+
import "./chunk-QYRF3R35.js";
|
|
18
|
+
import "./chunk-MIKWIFYR.js";
|
|
19
|
+
import "./chunk-CGZL5SSH.js";
|
|
20
|
+
import "./chunk-WCODTMDN.js";
|
|
21
|
+
import "./chunk-VST6HAB6.js";
|
|
22
|
+
import "./chunk-2Q3KLBE6.js";
|
|
23
|
+
import "./chunk-G3U4V32O.js";
|
|
24
|
+
import "./chunk-TPK5AGRA.js";
|
|
25
|
+
export {
|
|
26
|
+
describeConfigLayers,
|
|
27
|
+
getRune,
|
|
28
|
+
normaliseRune,
|
|
29
|
+
resolvePluginRune,
|
|
30
|
+
resolveRuneEntry,
|
|
31
|
+
resolveRuneFilePath,
|
|
32
|
+
resolveRuneFromPlugins,
|
|
33
|
+
runRune
|
|
34
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
handler,
|
|
3
|
+
joinBracketTokens,
|
|
4
|
+
parseBracketKey,
|
|
5
|
+
parseRunArgs,
|
|
6
|
+
parseSegment
|
|
7
|
+
} from "./chunk-SNC7AOT7.js";
|
|
8
|
+
import "./chunk-YXCHIMLW.js";
|
|
9
|
+
import "./chunk-UEUUOAJY.js";
|
|
10
|
+
import "./chunk-4GJMCFR6.js";
|
|
11
|
+
import "./chunk-CY6C6ADU.js";
|
|
12
|
+
import "./chunk-GVMT55GH.js";
|
|
13
|
+
import "./chunk-WJII3LZK.js";
|
|
14
|
+
import "./chunk-G4ZAUHHA.js";
|
|
15
|
+
import "./chunk-QYRF3R35.js";
|
|
16
|
+
import "./chunk-MIKWIFYR.js";
|
|
17
|
+
import "./chunk-CGZL5SSH.js";
|
|
18
|
+
import "./chunk-WCODTMDN.js";
|
|
19
|
+
import "./chunk-VST6HAB6.js";
|
|
20
|
+
import "./chunk-2Q3KLBE6.js";
|
|
21
|
+
import "./chunk-G3U4V32O.js";
|
|
22
|
+
import "./chunk-TPK5AGRA.js";
|
|
23
|
+
export {
|
|
24
|
+
handler,
|
|
25
|
+
joinBracketTokens,
|
|
26
|
+
parseBracketKey,
|
|
27
|
+
parseRunArgs,
|
|
28
|
+
parseSegment
|
|
29
|
+
};
|