poe-code 3.0.217 → 3.0.219
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/index.js +5308 -3372
- package/dist/index.js.map +4 -4
- package/dist/providers/claude-code.js +20 -11
- package/dist/providers/claude-code.js.map +4 -4
- package/dist/providers/codex.js +20 -11
- package/dist/providers/codex.js.map +4 -4
- package/dist/providers/goose.js +20 -11
- package/dist/providers/goose.js.map +4 -4
- package/dist/providers/kimi.js +20 -11
- package/dist/providers/kimi.js.map +4 -4
- package/dist/providers/opencode.js +20 -11
- package/dist/providers/opencode.js.map +4 -4
- package/dist/providers/poe-agent.js +388 -54
- package/dist/providers/poe-agent.js.map +4 -4
- package/package.json +2 -1
- package/packages/design-system/dist/components/help-formatter-plain.d.ts +1 -0
- package/packages/design-system/dist/components/help-formatter-plain.js +1 -1
- package/packages/design-system/dist/components/text.d.ts +1 -0
- package/packages/design-system/dist/components/text.js +8 -0
- package/packages/design-system/dist/dashboard/buffer.js +8 -1
- package/packages/design-system/dist/dashboard/keymap.d.ts +5 -0
- package/packages/design-system/dist/dashboard/keymap.js +146 -12
- package/packages/design-system/dist/dashboard/terminal.js +31 -0
- package/packages/design-system/dist/dashboard/types.d.ts +1 -0
- package/packages/design-system/dist/explorer/actions.d.ts +16 -0
- package/packages/design-system/dist/explorer/actions.js +39 -0
- package/packages/design-system/dist/explorer/demo.d.ts +13 -0
- package/packages/design-system/dist/explorer/demo.js +297 -0
- package/packages/design-system/dist/explorer/events.d.ts +61 -0
- package/packages/design-system/dist/explorer/events.js +1 -0
- package/packages/design-system/dist/explorer/filter.d.ts +10 -0
- package/packages/design-system/dist/explorer/filter.js +95 -0
- package/packages/design-system/dist/explorer/index.d.ts +8 -0
- package/packages/design-system/dist/explorer/index.js +8 -0
- package/packages/design-system/dist/explorer/jobs.d.ts +7 -0
- package/packages/design-system/dist/explorer/jobs.js +59 -0
- package/packages/design-system/dist/explorer/keymap.d.ts +21 -0
- package/packages/design-system/dist/explorer/keymap.js +363 -0
- package/packages/design-system/dist/explorer/layout.d.ts +20 -0
- package/packages/design-system/dist/explorer/layout.js +73 -0
- package/packages/design-system/dist/explorer/reducer.d.ts +9 -0
- package/packages/design-system/dist/explorer/reducer.js +704 -0
- package/packages/design-system/dist/explorer/render/detail.d.ts +4 -0
- package/packages/design-system/dist/explorer/render/detail.js +96 -0
- package/packages/design-system/dist/explorer/render/footer.d.ts +4 -0
- package/packages/design-system/dist/explorer/render/footer.js +49 -0
- package/packages/design-system/dist/explorer/render/header.d.ts +4 -0
- package/packages/design-system/dist/explorer/render/header.js +56 -0
- package/packages/design-system/dist/explorer/render/index.d.ts +8 -0
- package/packages/design-system/dist/explorer/render/index.js +61 -0
- package/packages/design-system/dist/explorer/render/list.d.ts +4 -0
- package/packages/design-system/dist/explorer/render/list.js +106 -0
- package/packages/design-system/dist/explorer/render/modal.d.ts +3 -0
- package/packages/design-system/dist/explorer/render/modal.js +91 -0
- package/packages/design-system/dist/explorer/render/test-fixtures.d.ts +8 -0
- package/packages/design-system/dist/explorer/render/test-fixtures.js +156 -0
- package/packages/design-system/dist/explorer/runtime.d.ts +2 -0
- package/packages/design-system/dist/explorer/runtime.js +282 -0
- package/packages/design-system/dist/explorer/runtime.test-helpers.d.ts +50 -0
- package/packages/design-system/dist/explorer/runtime.test-helpers.js +101 -0
- package/packages/design-system/dist/explorer/state.d.ts +130 -0
- package/packages/design-system/dist/explorer/state.js +87 -0
- package/packages/design-system/dist/explorer/theme.d.ts +27 -0
- package/packages/design-system/dist/explorer/theme.js +97 -0
- package/packages/design-system/dist/index.d.ts +3 -0
- package/packages/design-system/dist/index.js +3 -0
- package/packages/memory/dist/index.js +9 -0
- package/packages/memory/dist/index.js.map +3 -3
|
@@ -6035,9 +6035,9 @@ function getOptionalGrepOutputMode(args, key2) {
|
|
|
6035
6035
|
function formatDisplayPath(cwd, filePath) {
|
|
6036
6036
|
return path11.relative(cwd, filePath) || path11.basename(filePath);
|
|
6037
6037
|
}
|
|
6038
|
-
async function sortPathsByModifiedTime(
|
|
6038
|
+
async function sortPathsByModifiedTime(matches, fs4) {
|
|
6039
6039
|
const entries = await Promise.all(
|
|
6040
|
-
|
|
6040
|
+
matches.map(async (match) => ({
|
|
6041
6041
|
path: match,
|
|
6042
6042
|
mtimeMs: (await fs4.stat(match)).mtimeMs
|
|
6043
6043
|
}))
|
|
@@ -6422,12 +6422,12 @@ var init_poe_agent_plugin_files = __esm({
|
|
|
6422
6422
|
allowedPaths,
|
|
6423
6423
|
getOptionalString(args, "path") ?? "."
|
|
6424
6424
|
);
|
|
6425
|
-
const
|
|
6425
|
+
const matches = await globFiles({
|
|
6426
6426
|
pattern: getRequiredString(args, "pattern"),
|
|
6427
6427
|
cwd: searchPath
|
|
6428
6428
|
});
|
|
6429
6429
|
const sortedMatches = await sortPathsByModifiedTime(
|
|
6430
|
-
|
|
6430
|
+
matches.map((match) => resolveAllowedPath(cwd, allowedPaths, match)),
|
|
6431
6431
|
fs4
|
|
6432
6432
|
);
|
|
6433
6433
|
if (sortedMatches.length === 0) {
|
|
@@ -18768,6 +18768,12 @@ var init_text = __esm({
|
|
|
18768
18768
|
if (format === "markdown") return `*${content}*`;
|
|
18769
18769
|
return getTheme().muted(content);
|
|
18770
18770
|
},
|
|
18771
|
+
error(content) {
|
|
18772
|
+
const format = resolveOutputFormat();
|
|
18773
|
+
if (format === "json") return content;
|
|
18774
|
+
if (format === "markdown") return `**${content}**`;
|
|
18775
|
+
return getTheme().error(content);
|
|
18776
|
+
},
|
|
18771
18777
|
badge(content) {
|
|
18772
18778
|
const format = resolveOutputFormat();
|
|
18773
18779
|
if (format === "json") return content;
|
|
@@ -23110,6 +23116,9 @@ function cellToAnsi(cell) {
|
|
|
23110
23116
|
if (style.dim) {
|
|
23111
23117
|
painter = painter.dim;
|
|
23112
23118
|
}
|
|
23119
|
+
if (style.underline) {
|
|
23120
|
+
painter = painter.underline;
|
|
23121
|
+
}
|
|
23113
23122
|
if (style.fg) {
|
|
23114
23123
|
painter = applyForegroundColor(painter, style.fg);
|
|
23115
23124
|
}
|
|
@@ -23142,13 +23151,16 @@ function normalizeStyle(style) {
|
|
|
23142
23151
|
if (style?.dim !== void 0) {
|
|
23143
23152
|
next.dim = style.dim;
|
|
23144
23153
|
}
|
|
23154
|
+
if (style?.underline !== void 0) {
|
|
23155
|
+
next.underline = style.underline;
|
|
23156
|
+
}
|
|
23145
23157
|
return next;
|
|
23146
23158
|
}
|
|
23147
23159
|
function normalizeSize(value) {
|
|
23148
23160
|
return Math.max(0, Math.floor(value));
|
|
23149
23161
|
}
|
|
23150
23162
|
function cellsEqual(left, right) {
|
|
23151
|
-
return left.ch === right.ch && left.style.fg === right.style.fg && left.style.bg === right.style.bg && left.style.bold === right.style.bold && left.style.dim === right.style.dim;
|
|
23163
|
+
return left.ch === right.ch && left.style.fg === right.style.fg && left.style.bg === right.style.bg && left.style.bold === right.style.bold && left.style.dim === right.style.dim && left.style.underline === right.style.underline;
|
|
23152
23164
|
}
|
|
23153
23165
|
function applyForegroundColor(instance, color) {
|
|
23154
23166
|
if (color.startsWith("#")) {
|
|
@@ -24158,24 +24170,60 @@ var init_stats_pane = __esm({
|
|
|
24158
24170
|
});
|
|
24159
24171
|
|
|
24160
24172
|
// packages/design-system/src/dashboard/keymap.ts
|
|
24161
|
-
function createKeymap(overrides) {
|
|
24173
|
+
function createKeymap(overrides, options) {
|
|
24174
|
+
const resolvedCommands = options?.commands ?? commands;
|
|
24175
|
+
const resolvedDefaults = options?.defaultBindings ?? defaultBindings;
|
|
24162
24176
|
const bindings = /* @__PURE__ */ new Map();
|
|
24163
|
-
|
|
24164
|
-
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
|
|
24168
|
-
)
|
|
24177
|
+
const sequences = /* @__PURE__ */ new Set();
|
|
24178
|
+
let pendingSequence = "";
|
|
24179
|
+
for (const command of resolvedCommands) {
|
|
24180
|
+
const keys = overrides?.[command] ?? resolvedDefaults[command];
|
|
24181
|
+
const commandBindings = keys.map(parseBinding).filter((binding) => binding !== void 0);
|
|
24182
|
+
for (const binding of commandBindings) {
|
|
24183
|
+
if (binding.sequence !== void 0) {
|
|
24184
|
+
sequences.add(binding.sequence);
|
|
24185
|
+
}
|
|
24186
|
+
}
|
|
24187
|
+
bindings.set(command, commandBindings);
|
|
24169
24188
|
}
|
|
24170
24189
|
return (event) => {
|
|
24171
|
-
for (const command of
|
|
24190
|
+
for (const command of resolvedCommands) {
|
|
24172
24191
|
const commandBindings = bindings.get(command);
|
|
24173
|
-
if (commandBindings?.some((binding) =>
|
|
24192
|
+
if (commandBindings?.some((binding) => matchesSingleKey(binding, event))) {
|
|
24193
|
+
pendingSequence = "";
|
|
24174
24194
|
return command;
|
|
24175
24195
|
}
|
|
24176
24196
|
}
|
|
24197
|
+
const sequenceCommand = resolveSequence(event);
|
|
24198
|
+
if (sequenceCommand !== void 0) {
|
|
24199
|
+
return sequenceCommand;
|
|
24200
|
+
}
|
|
24177
24201
|
return void 0;
|
|
24178
24202
|
};
|
|
24203
|
+
function resolveSequence(event) {
|
|
24204
|
+
const token = eventToSequenceToken(event);
|
|
24205
|
+
if (token === void 0) {
|
|
24206
|
+
pendingSequence = "";
|
|
24207
|
+
return void 0;
|
|
24208
|
+
}
|
|
24209
|
+
pendingSequence = `${pendingSequence}${token}`;
|
|
24210
|
+
for (const command of resolvedCommands) {
|
|
24211
|
+
const commandBindings = bindings.get(command);
|
|
24212
|
+
if (commandBindings?.some((binding) => binding.sequence === pendingSequence)) {
|
|
24213
|
+
pendingSequence = "";
|
|
24214
|
+
return command;
|
|
24215
|
+
}
|
|
24216
|
+
}
|
|
24217
|
+
if (hasSequencePrefix(sequences, pendingSequence)) {
|
|
24218
|
+
return void 0;
|
|
24219
|
+
}
|
|
24220
|
+
pendingSequence = token;
|
|
24221
|
+
if (hasSequencePrefix(sequences, pendingSequence)) {
|
|
24222
|
+
return void 0;
|
|
24223
|
+
}
|
|
24224
|
+
pendingSequence = "";
|
|
24225
|
+
return void 0;
|
|
24226
|
+
}
|
|
24179
24227
|
}
|
|
24180
24228
|
function parseBinding(binding) {
|
|
24181
24229
|
const value = binding.trim();
|
|
@@ -24208,25 +24256,37 @@ function parseBinding(binding) {
|
|
|
24208
24256
|
continue;
|
|
24209
24257
|
}
|
|
24210
24258
|
}
|
|
24211
|
-
|
|
24259
|
+
const normalizedKey = normalizeKeyName(key2);
|
|
24260
|
+
if (parts.length === 1 && isShiftedCharacter(normalizedKey)) {
|
|
24212
24261
|
shift = true;
|
|
24213
24262
|
}
|
|
24214
|
-
if (
|
|
24263
|
+
if (normalizedKey.length === 1) {
|
|
24215
24264
|
return {
|
|
24216
|
-
ch: normalizeBindingCharacter(
|
|
24265
|
+
ch: normalizeBindingCharacter(normalizedKey, shift),
|
|
24266
|
+
ctrl,
|
|
24267
|
+
meta,
|
|
24268
|
+
shift
|
|
24269
|
+
};
|
|
24270
|
+
}
|
|
24271
|
+
if (!ctrl && !meta && !shift && !isNamedKey(normalizedKey) && isPrintableSequence(normalizedKey)) {
|
|
24272
|
+
return {
|
|
24273
|
+
sequence: normalizedKey,
|
|
24217
24274
|
ctrl,
|
|
24218
24275
|
meta,
|
|
24219
24276
|
shift
|
|
24220
24277
|
};
|
|
24221
24278
|
}
|
|
24222
24279
|
return {
|
|
24223
|
-
name:
|
|
24280
|
+
name: normalizedKey.toLowerCase(),
|
|
24224
24281
|
ctrl,
|
|
24225
24282
|
meta,
|
|
24226
24283
|
shift
|
|
24227
24284
|
};
|
|
24228
24285
|
}
|
|
24229
|
-
function
|
|
24286
|
+
function matchesSingleKey(binding, event) {
|
|
24287
|
+
if (binding.sequence !== void 0) {
|
|
24288
|
+
return false;
|
|
24289
|
+
}
|
|
24230
24290
|
if (binding.ctrl !== event.ctrl || binding.meta !== event.meta || binding.shift !== event.shift) {
|
|
24231
24291
|
return false;
|
|
24232
24292
|
}
|
|
@@ -24238,6 +24298,20 @@ function matches(binding, event) {
|
|
|
24238
24298
|
}
|
|
24239
24299
|
return false;
|
|
24240
24300
|
}
|
|
24301
|
+
function eventToSequenceToken(event) {
|
|
24302
|
+
if (event.ctrl || event.meta || event.ch === void 0) {
|
|
24303
|
+
return void 0;
|
|
24304
|
+
}
|
|
24305
|
+
return event.ch;
|
|
24306
|
+
}
|
|
24307
|
+
function hasSequencePrefix(sequences, prefix) {
|
|
24308
|
+
for (const sequence of sequences) {
|
|
24309
|
+
if (sequence.startsWith(prefix)) {
|
|
24310
|
+
return true;
|
|
24311
|
+
}
|
|
24312
|
+
}
|
|
24313
|
+
return false;
|
|
24314
|
+
}
|
|
24241
24315
|
function isShiftedCharacter(value) {
|
|
24242
24316
|
return value.length === 1 && value.toLowerCase() !== value && value.toUpperCase() === value;
|
|
24243
24317
|
}
|
|
@@ -24247,7 +24321,40 @@ function normalizeBindingCharacter(value, shift) {
|
|
|
24247
24321
|
}
|
|
24248
24322
|
return value.toUpperCase();
|
|
24249
24323
|
}
|
|
24250
|
-
|
|
24324
|
+
function normalizeKeyName(value) {
|
|
24325
|
+
if (value.toLowerCase() === "space") {
|
|
24326
|
+
return " ";
|
|
24327
|
+
}
|
|
24328
|
+
if (value === "\u2191") {
|
|
24329
|
+
return "up";
|
|
24330
|
+
}
|
|
24331
|
+
if (value === "\u2193") {
|
|
24332
|
+
return "down";
|
|
24333
|
+
}
|
|
24334
|
+
if (value === "\u2190") {
|
|
24335
|
+
return "left";
|
|
24336
|
+
}
|
|
24337
|
+
if (value === "\u2192") {
|
|
24338
|
+
return "right";
|
|
24339
|
+
}
|
|
24340
|
+
return value;
|
|
24341
|
+
}
|
|
24342
|
+
function isNamedKey(value) {
|
|
24343
|
+
return namedKeys.has(value.toLowerCase());
|
|
24344
|
+
}
|
|
24345
|
+
function isPrintableSequence(value) {
|
|
24346
|
+
if (Array.from(value).length <= 1) {
|
|
24347
|
+
return false;
|
|
24348
|
+
}
|
|
24349
|
+
for (const char of value) {
|
|
24350
|
+
const codePoint = char.codePointAt(0);
|
|
24351
|
+
if (codePoint === void 0 || codePoint < 32 || codePoint === 127) {
|
|
24352
|
+
return false;
|
|
24353
|
+
}
|
|
24354
|
+
}
|
|
24355
|
+
return true;
|
|
24356
|
+
}
|
|
24357
|
+
var commands, defaultBindings, namedKeys;
|
|
24251
24358
|
var init_keymap = __esm({
|
|
24252
24359
|
"packages/design-system/src/dashboard/keymap.ts"() {
|
|
24253
24360
|
"use strict";
|
|
@@ -24260,6 +24367,22 @@ var init_keymap = __esm({
|
|
|
24260
24367
|
retry: ["r"],
|
|
24261
24368
|
"view-log": ["l"]
|
|
24262
24369
|
};
|
|
24370
|
+
namedKeys = /* @__PURE__ */ new Set([
|
|
24371
|
+
"backspace",
|
|
24372
|
+
"delete",
|
|
24373
|
+
"down",
|
|
24374
|
+
"end",
|
|
24375
|
+
"enter",
|
|
24376
|
+
"escape",
|
|
24377
|
+
"home",
|
|
24378
|
+
"left",
|
|
24379
|
+
"pagedown",
|
|
24380
|
+
"pageup",
|
|
24381
|
+
"return",
|
|
24382
|
+
"right",
|
|
24383
|
+
"tab",
|
|
24384
|
+
"up"
|
|
24385
|
+
]);
|
|
24263
24386
|
}
|
|
24264
24387
|
});
|
|
24265
24388
|
|
|
@@ -24581,6 +24704,10 @@ function createTerminalDriver(opts) {
|
|
|
24581
24704
|
};
|
|
24582
24705
|
}
|
|
24583
24706
|
function toKeypressEvent(str, key2) {
|
|
24707
|
+
const controlCharacter = controlCharacterToKeypress(key2?.sequence);
|
|
24708
|
+
if (controlCharacter !== void 0) {
|
|
24709
|
+
return controlCharacter;
|
|
24710
|
+
}
|
|
24584
24711
|
const ctrl = key2?.ctrl ?? false;
|
|
24585
24712
|
const meta = key2?.meta ?? false;
|
|
24586
24713
|
const shift = key2?.shift ?? false;
|
|
@@ -24602,12 +24729,22 @@ function extractPrintableCharacter(str, sequence) {
|
|
|
24602
24729
|
if (isPrintableCharacter(str)) {
|
|
24603
24730
|
return str;
|
|
24604
24731
|
}
|
|
24732
|
+
if (isSinglePrintableSequence(sequence)) {
|
|
24733
|
+
return sequence;
|
|
24734
|
+
}
|
|
24605
24735
|
if (sequence === void 0 || sequence.length <= 1 || sequence[0] !== "\x1B") {
|
|
24606
24736
|
return void 0;
|
|
24607
24737
|
}
|
|
24608
24738
|
const candidate = sequence.slice(1);
|
|
24609
24739
|
return isPrintableCharacter(candidate) ? candidate : void 0;
|
|
24610
24740
|
}
|
|
24741
|
+
function isSinglePrintableSequence(value) {
|
|
24742
|
+
if (value === void 0 || Array.from(value).length !== 1) {
|
|
24743
|
+
return false;
|
|
24744
|
+
}
|
|
24745
|
+
const codePoint = value.codePointAt(0);
|
|
24746
|
+
return codePoint !== void 0 && codePoint >= 32 && codePoint !== 127;
|
|
24747
|
+
}
|
|
24611
24748
|
function isPrintableCharacter(value) {
|
|
24612
24749
|
if (value === void 0 || Array.from(value).length !== 1) {
|
|
24613
24750
|
return false;
|
|
@@ -24615,6 +24752,23 @@ function isPrintableCharacter(value) {
|
|
|
24615
24752
|
const codePoint = value.codePointAt(0);
|
|
24616
24753
|
return codePoint !== void 0 && codePoint >= 32 && codePoint !== 127;
|
|
24617
24754
|
}
|
|
24755
|
+
function controlCharacterToKeypress(sequence) {
|
|
24756
|
+
if (sequence === "") {
|
|
24757
|
+
return { ch: "/", ctrl: true, meta: false, shift: false };
|
|
24758
|
+
}
|
|
24759
|
+
if (sequence !== void 0 && sequence.length === 1) {
|
|
24760
|
+
const code = sequence.charCodeAt(0);
|
|
24761
|
+
if (code >= 1 && code <= 26 && code !== 9 && code !== 10 && code !== 13) {
|
|
24762
|
+
return {
|
|
24763
|
+
name: String.fromCharCode(code + 96),
|
|
24764
|
+
ctrl: true,
|
|
24765
|
+
meta: false,
|
|
24766
|
+
shift: false
|
|
24767
|
+
};
|
|
24768
|
+
}
|
|
24769
|
+
}
|
|
24770
|
+
return void 0;
|
|
24771
|
+
}
|
|
24618
24772
|
function cursorPositionAnsi(x, y) {
|
|
24619
24773
|
return `\x1B[${normalizeCoordinate(y) + 1};${normalizeCoordinate(x) + 1}H`;
|
|
24620
24774
|
}
|
|
@@ -24845,6 +24999,158 @@ var init_dashboard2 = __esm({
|
|
|
24845
24999
|
}
|
|
24846
25000
|
});
|
|
24847
25001
|
|
|
25002
|
+
// packages/design-system/src/explorer/jobs.ts
|
|
25003
|
+
var init_jobs2 = __esm({
|
|
25004
|
+
"packages/design-system/src/explorer/jobs.ts"() {
|
|
25005
|
+
"use strict";
|
|
25006
|
+
}
|
|
25007
|
+
});
|
|
25008
|
+
|
|
25009
|
+
// packages/design-system/src/explorer/layout.ts
|
|
25010
|
+
var init_layout2 = __esm({
|
|
25011
|
+
"packages/design-system/src/explorer/layout.ts"() {
|
|
25012
|
+
"use strict";
|
|
25013
|
+
}
|
|
25014
|
+
});
|
|
25015
|
+
|
|
25016
|
+
// packages/design-system/src/explorer/keymap.ts
|
|
25017
|
+
var init_keymap2 = __esm({
|
|
25018
|
+
"packages/design-system/src/explorer/keymap.ts"() {
|
|
25019
|
+
"use strict";
|
|
25020
|
+
}
|
|
25021
|
+
});
|
|
25022
|
+
|
|
25023
|
+
// packages/design-system/src/explorer/state.ts
|
|
25024
|
+
var REGION_HEADER, REGION_LIST, REGION_DETAIL, REGION_FOOTER, REGION_MODAL, REGION_TOAST, REGION_ALL;
|
|
25025
|
+
var init_state3 = __esm({
|
|
25026
|
+
"packages/design-system/src/explorer/state.ts"() {
|
|
25027
|
+
"use strict";
|
|
25028
|
+
init_keymap2();
|
|
25029
|
+
REGION_HEADER = 1 << 0;
|
|
25030
|
+
REGION_LIST = 1 << 1;
|
|
25031
|
+
REGION_DETAIL = 1 << 2;
|
|
25032
|
+
REGION_FOOTER = 1 << 3;
|
|
25033
|
+
REGION_MODAL = 1 << 4;
|
|
25034
|
+
REGION_TOAST = 1 << 5;
|
|
25035
|
+
REGION_ALL = REGION_HEADER | REGION_LIST | REGION_DETAIL | REGION_FOOTER | REGION_MODAL | REGION_TOAST;
|
|
25036
|
+
}
|
|
25037
|
+
});
|
|
25038
|
+
|
|
25039
|
+
// packages/design-system/src/explorer/theme.ts
|
|
25040
|
+
var init_theme = __esm({
|
|
25041
|
+
"packages/design-system/src/explorer/theme.ts"() {
|
|
25042
|
+
"use strict";
|
|
25043
|
+
}
|
|
25044
|
+
});
|
|
25045
|
+
|
|
25046
|
+
// packages/design-system/src/explorer/render/detail.ts
|
|
25047
|
+
var init_detail = __esm({
|
|
25048
|
+
"packages/design-system/src/explorer/render/detail.ts"() {
|
|
25049
|
+
"use strict";
|
|
25050
|
+
init_theme();
|
|
25051
|
+
}
|
|
25052
|
+
});
|
|
25053
|
+
|
|
25054
|
+
// packages/design-system/src/explorer/render/footer.ts
|
|
25055
|
+
var init_footer2 = __esm({
|
|
25056
|
+
"packages/design-system/src/explorer/render/footer.ts"() {
|
|
25057
|
+
"use strict";
|
|
25058
|
+
init_theme();
|
|
25059
|
+
}
|
|
25060
|
+
});
|
|
25061
|
+
|
|
25062
|
+
// packages/design-system/src/explorer/render/header.ts
|
|
25063
|
+
var init_header = __esm({
|
|
25064
|
+
"packages/design-system/src/explorer/render/header.ts"() {
|
|
25065
|
+
"use strict";
|
|
25066
|
+
init_theme();
|
|
25067
|
+
}
|
|
25068
|
+
});
|
|
25069
|
+
|
|
25070
|
+
// packages/design-system/src/explorer/render/list.ts
|
|
25071
|
+
var init_list = __esm({
|
|
25072
|
+
"packages/design-system/src/explorer/render/list.ts"() {
|
|
25073
|
+
"use strict";
|
|
25074
|
+
init_theme();
|
|
25075
|
+
}
|
|
25076
|
+
});
|
|
25077
|
+
|
|
25078
|
+
// packages/design-system/src/explorer/render/modal.ts
|
|
25079
|
+
var init_modal = __esm({
|
|
25080
|
+
"packages/design-system/src/explorer/render/modal.ts"() {
|
|
25081
|
+
"use strict";
|
|
25082
|
+
init_theme();
|
|
25083
|
+
}
|
|
25084
|
+
});
|
|
25085
|
+
|
|
25086
|
+
// packages/design-system/src/explorer/render/index.ts
|
|
25087
|
+
var init_render2 = __esm({
|
|
25088
|
+
"packages/design-system/src/explorer/render/index.ts"() {
|
|
25089
|
+
"use strict";
|
|
25090
|
+
init_layout2();
|
|
25091
|
+
init_state3();
|
|
25092
|
+
init_theme();
|
|
25093
|
+
init_detail();
|
|
25094
|
+
init_footer2();
|
|
25095
|
+
init_header();
|
|
25096
|
+
init_list();
|
|
25097
|
+
init_modal();
|
|
25098
|
+
init_detail();
|
|
25099
|
+
init_footer2();
|
|
25100
|
+
init_header();
|
|
25101
|
+
init_list();
|
|
25102
|
+
init_modal();
|
|
25103
|
+
}
|
|
25104
|
+
});
|
|
25105
|
+
|
|
25106
|
+
// packages/design-system/src/explorer/actions.ts
|
|
25107
|
+
var init_actions = __esm({
|
|
25108
|
+
"packages/design-system/src/explorer/actions.ts"() {
|
|
25109
|
+
"use strict";
|
|
25110
|
+
}
|
|
25111
|
+
});
|
|
25112
|
+
|
|
25113
|
+
// packages/design-system/src/explorer/filter.ts
|
|
25114
|
+
var init_filter = __esm({
|
|
25115
|
+
"packages/design-system/src/explorer/filter.ts"() {
|
|
25116
|
+
"use strict";
|
|
25117
|
+
}
|
|
25118
|
+
});
|
|
25119
|
+
|
|
25120
|
+
// packages/design-system/src/explorer/reducer.ts
|
|
25121
|
+
var init_reducer = __esm({
|
|
25122
|
+
"packages/design-system/src/explorer/reducer.ts"() {
|
|
25123
|
+
"use strict";
|
|
25124
|
+
init_actions();
|
|
25125
|
+
init_filter();
|
|
25126
|
+
init_state3();
|
|
25127
|
+
}
|
|
25128
|
+
});
|
|
25129
|
+
|
|
25130
|
+
// packages/design-system/src/explorer/runtime.ts
|
|
25131
|
+
var init_runtime3 = __esm({
|
|
25132
|
+
"packages/design-system/src/explorer/runtime.ts"() {
|
|
25133
|
+
"use strict";
|
|
25134
|
+
init_buffer();
|
|
25135
|
+
init_terminal();
|
|
25136
|
+
init_jobs2();
|
|
25137
|
+
init_layout2();
|
|
25138
|
+
init_render2();
|
|
25139
|
+
init_reducer();
|
|
25140
|
+
init_state3();
|
|
25141
|
+
}
|
|
25142
|
+
});
|
|
25143
|
+
|
|
25144
|
+
// packages/design-system/src/explorer/index.ts
|
|
25145
|
+
var init_explorer = __esm({
|
|
25146
|
+
"packages/design-system/src/explorer/index.ts"() {
|
|
25147
|
+
"use strict";
|
|
25148
|
+
init_runtime3();
|
|
25149
|
+
init_state3();
|
|
25150
|
+
init_keymap2();
|
|
25151
|
+
}
|
|
25152
|
+
});
|
|
25153
|
+
|
|
24848
25154
|
// packages/design-system/src/prompts/primitives/cancel.ts
|
|
24849
25155
|
import chalk9 from "chalk";
|
|
24850
25156
|
import { isCancel } from "@clack/prompts";
|
|
@@ -24936,7 +25242,7 @@ var init_prompts2 = __esm({
|
|
|
24936
25242
|
});
|
|
24937
25243
|
|
|
24938
25244
|
// packages/design-system/src/prompts/theme.ts
|
|
24939
|
-
var
|
|
25245
|
+
var init_theme2 = __esm({
|
|
24940
25246
|
"packages/design-system/src/prompts/theme.ts"() {
|
|
24941
25247
|
"use strict";
|
|
24942
25248
|
init_colors();
|
|
@@ -24983,9 +25289,11 @@ var init_src13 = __esm({
|
|
|
24983
25289
|
init_acp();
|
|
24984
25290
|
init_dashboard2();
|
|
24985
25291
|
init_dashboard2();
|
|
25292
|
+
init_explorer();
|
|
25293
|
+
init_explorer();
|
|
24986
25294
|
init_prompts2();
|
|
24987
25295
|
init_prompts2();
|
|
24988
|
-
|
|
25296
|
+
init_theme2();
|
|
24989
25297
|
init_static();
|
|
24990
25298
|
init_static();
|
|
24991
25299
|
init_terminal_markdown();
|
|
@@ -26680,8 +26988,8 @@ async function runServiceInstall(definition, context) {
|
|
|
26680
26988
|
return true;
|
|
26681
26989
|
}
|
|
26682
26990
|
const platformSteps = filterStepsByPlatform(definition.steps, context.platform);
|
|
26683
|
-
for (const
|
|
26684
|
-
await runInstallStep(
|
|
26991
|
+
for (const step2 of platformSteps) {
|
|
26992
|
+
await runInstallStep(step2, context);
|
|
26685
26993
|
}
|
|
26686
26994
|
await definition.check.run(checkContext);
|
|
26687
26995
|
if (definition.postChecks) {
|
|
@@ -26694,8 +27002,8 @@ async function runServiceInstall(definition, context) {
|
|
|
26694
27002
|
);
|
|
26695
27003
|
return true;
|
|
26696
27004
|
}
|
|
26697
|
-
function describeInstallCommand(
|
|
26698
|
-
return `[${
|
|
27005
|
+
function describeInstallCommand(step2) {
|
|
27006
|
+
return `[${step2.id}] ${formatCommand(step2.command, step2.args)}`;
|
|
26699
27007
|
}
|
|
26700
27008
|
function formatCommand(command, args) {
|
|
26701
27009
|
return [command, ...args.map(quoteIfNeeded)].join(" ");
|
|
@@ -26711,24 +27019,24 @@ function quoteIfNeeded(value) {
|
|
|
26711
27019
|
}
|
|
26712
27020
|
function filterStepsByPlatform(steps, platform) {
|
|
26713
27021
|
return steps.filter(
|
|
26714
|
-
(
|
|
27022
|
+
(step2) => !step2.platforms || step2.platforms.includes(platform)
|
|
26715
27023
|
);
|
|
26716
27024
|
}
|
|
26717
27025
|
function logInstallDryRun(definition, context) {
|
|
26718
27026
|
context.logger(`Dry run: would install ${definition.summary}.`);
|
|
26719
27027
|
const platformSteps = filterStepsByPlatform(definition.steps, context.platform);
|
|
26720
|
-
for (const
|
|
26721
|
-
context.logger(`Dry run: ${describeInstallCommand(
|
|
27028
|
+
for (const step2 of platformSteps) {
|
|
27029
|
+
context.logger(`Dry run: ${describeInstallCommand(step2)}`);
|
|
26722
27030
|
}
|
|
26723
27031
|
}
|
|
26724
|
-
async function runInstallStep(
|
|
26725
|
-
context.logger(`Running ${describeInstallCommand(
|
|
26726
|
-
const result = await context.runCommand(
|
|
27032
|
+
async function runInstallStep(step2, context) {
|
|
27033
|
+
context.logger(`Running ${describeInstallCommand(step2)}`);
|
|
27034
|
+
const result = await context.runCommand(step2.command, step2.args);
|
|
26727
27035
|
if (result.exitCode !== 0) {
|
|
26728
27036
|
const stderr = result.stderr.trim();
|
|
26729
27037
|
const suffix = stderr.length > 0 ? `: ${stderr}` : "";
|
|
26730
27038
|
throw new Error(
|
|
26731
|
-
`${describeInstallCommand(
|
|
27039
|
+
`${describeInstallCommand(step2)} failed with exit code ${result.exitCode}${suffix}`
|
|
26732
27040
|
);
|
|
26733
27041
|
}
|
|
26734
27042
|
}
|
|
@@ -28562,9 +28870,15 @@ import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
|
28562
28870
|
|
|
28563
28871
|
// packages/toolcraft/src/user-error.ts
|
|
28564
28872
|
var UserError = class extends Error {
|
|
28873
|
+
constructor(message2, options) {
|
|
28874
|
+
super(message2, options);
|
|
28875
|
+
this.name = "UserError";
|
|
28876
|
+
}
|
|
28877
|
+
};
|
|
28878
|
+
var ToolcraftBugError = class extends Error {
|
|
28565
28879
|
constructor(message2) {
|
|
28566
28880
|
super(message2);
|
|
28567
|
-
this.name = "
|
|
28881
|
+
this.name = "ToolcraftBugError";
|
|
28568
28882
|
}
|
|
28569
28883
|
};
|
|
28570
28884
|
|
|
@@ -28625,22 +28939,33 @@ function Record(value) {
|
|
|
28625
28939
|
function isOptionalSchema(schema) {
|
|
28626
28940
|
return schema.kind === "optional";
|
|
28627
28941
|
}
|
|
28942
|
+
function getRequiredKeys(schema) {
|
|
28943
|
+
return Object.keys(schema.shape).filter((key2) => !isOptionalSchema(schema.shape[key2])).sort();
|
|
28944
|
+
}
|
|
28628
28945
|
function getRequiredKeyFingerprint(schema) {
|
|
28629
|
-
|
|
28630
|
-
|
|
28946
|
+
return getRequiredKeys(schema).join("+");
|
|
28947
|
+
}
|
|
28948
|
+
function assertUniqueRequiredKeyFingerprints(branches) {
|
|
28949
|
+
const fingerprints = /* @__PURE__ */ new Map();
|
|
28950
|
+
branches.forEach((branch, index) => {
|
|
28951
|
+
const fingerprint = getRequiredKeyFingerprint(branch);
|
|
28952
|
+
const indices = fingerprints.get(fingerprint) ?? [];
|
|
28953
|
+
indices.push(index);
|
|
28954
|
+
fingerprints.set(fingerprint, indices);
|
|
28955
|
+
});
|
|
28956
|
+
for (const [fingerprint, indices] of fingerprints) {
|
|
28957
|
+
if (indices.length > 1) {
|
|
28958
|
+
throw new Error(
|
|
28959
|
+
`Union branches [${indices.join(", ")}] share required-key fingerprint "${fingerprint}". Each branch must require a distinct set of keys.`
|
|
28960
|
+
);
|
|
28961
|
+
}
|
|
28962
|
+
}
|
|
28631
28963
|
}
|
|
28632
28964
|
function assertValidBranches2(branches) {
|
|
28633
28965
|
if (branches.length === 0) {
|
|
28634
28966
|
throw new Error("Union schema requires at least one branch");
|
|
28635
28967
|
}
|
|
28636
|
-
|
|
28637
|
-
for (const branch of branches) {
|
|
28638
|
-
const fingerprint = getRequiredKeyFingerprint(branch);
|
|
28639
|
-
if (fingerprints.has(fingerprint)) {
|
|
28640
|
-
throw new Error("Union schema branches must have unique required-key fingerprints");
|
|
28641
|
-
}
|
|
28642
|
-
fingerprints.add(fingerprint);
|
|
28643
|
-
}
|
|
28968
|
+
assertUniqueRequiredKeyFingerprints(branches);
|
|
28644
28969
|
}
|
|
28645
28970
|
function Union(branches) {
|
|
28646
28971
|
assertValidBranches2(branches);
|
|
@@ -28784,7 +29109,9 @@ function validateRenameMap(rename3) {
|
|
|
28784
29109
|
const seenTargets = /* @__PURE__ */ new Map();
|
|
28785
29110
|
for (const [upstreamName, targetPath] of Object.entries(rename3)) {
|
|
28786
29111
|
if (targetPath.length === 0) {
|
|
28787
|
-
throw new UserError(
|
|
29112
|
+
throw new UserError(
|
|
29113
|
+
`Invalid rename target for upstream tool "${upstreamName}": path cannot be empty.`
|
|
29114
|
+
);
|
|
28788
29115
|
}
|
|
28789
29116
|
if (targetPath.split(".").some((segment) => segment.length === 0)) {
|
|
28790
29117
|
throw new UserError(
|
|
@@ -28994,16 +29321,20 @@ function mergeInheritedMetadata(group, inherited) {
|
|
|
28994
29321
|
function materializeGroup(group, inherited) {
|
|
28995
29322
|
const internal = getInternalGroupConfig(group);
|
|
28996
29323
|
const mergedInherited = mergeInheritedMetadata(internal, inherited);
|
|
28997
|
-
const materializedChildren = internal.children.map(
|
|
29324
|
+
const materializedChildren = internal.children.map(
|
|
29325
|
+
(child) => materializeNode(child, mergedInherited)
|
|
29326
|
+
);
|
|
28998
29327
|
let defaultChild;
|
|
28999
29328
|
if (internal.default !== void 0) {
|
|
29000
29329
|
const defaultIndex = internal.children.indexOf(internal.default);
|
|
29001
29330
|
if (defaultIndex === -1) {
|
|
29002
|
-
throw new
|
|
29331
|
+
throw new ToolcraftBugError(
|
|
29332
|
+
`Default command "${internal.default.name}" must be listed in children.`
|
|
29333
|
+
);
|
|
29003
29334
|
}
|
|
29004
29335
|
const resolvedDefault = materializedChildren[defaultIndex];
|
|
29005
29336
|
if (resolvedDefault?.kind !== "command") {
|
|
29006
|
-
throw new
|
|
29337
|
+
throw new ToolcraftBugError(`Default child "${internal.default.name}" must be a command.`);
|
|
29007
29338
|
}
|
|
29008
29339
|
defaultChild = resolvedDefault;
|
|
29009
29340
|
}
|
|
@@ -29042,12 +29373,15 @@ function materializeNode(node, inherited) {
|
|
|
29042
29373
|
}
|
|
29043
29374
|
function defineCommand(config) {
|
|
29044
29375
|
validateHumanInLoopOnDefine(config);
|
|
29045
|
-
return materializeCommand(
|
|
29046
|
-
|
|
29047
|
-
|
|
29048
|
-
|
|
29049
|
-
|
|
29050
|
-
|
|
29376
|
+
return materializeCommand(
|
|
29377
|
+
createBaseCommand(config),
|
|
29378
|
+
{
|
|
29379
|
+
scope: void 0,
|
|
29380
|
+
humanInLoop: void 0,
|
|
29381
|
+
secrets: {},
|
|
29382
|
+
requires: void 0
|
|
29383
|
+
}
|
|
29384
|
+
);
|
|
29051
29385
|
}
|
|
29052
29386
|
function defineGroup(config) {
|
|
29053
29387
|
validateRenameMap(config.rename);
|