neoctl 0.2.47 → 0.2.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -59
- package/dist/agents/agent-activity.js +1 -1
- package/dist/agents/agent-activity.js.map +1 -1
- package/dist/context/prompts.js +3 -4
- package/dist/context/prompts.js.map +1 -1
- package/dist/context/system.md +16 -16
- package/dist/core/message-pipeline.js +2 -2
- package/dist/core/message-pipeline.js.map +1 -1
- package/dist/core/query-engine.d.ts +6 -0
- package/dist/core/query-engine.js +60 -3
- package/dist/core/query-engine.js.map +1 -1
- package/dist/execution/filesystem.js +22 -22
- package/dist/execution/process.js +44 -44
- package/dist/model/model-metadata.json +137 -137
- package/dist/repl/index.js +30 -30
- package/dist/repl/index.js.map +1 -1
- package/dist/session/tool-result-memory.js +2 -2
- package/dist/session/tool-result-memory.js.map +1 -1
- package/dist/tools/builtins/image-capabilities.d.ts +2 -2
- package/dist/tools/builtins/image-capabilities.js +3 -3
- package/dist/tools/builtins/image-capabilities.js.map +1 -1
- package/dist/tools/builtins/image-generation-tool.js +1 -1
- package/dist/tools/builtins/image-generation-tool.js.map +1 -1
- package/dist/tools/builtins/image-loader-tool.js +2 -1
- package/dist/tools/builtins/image-loader-tool.js.map +1 -1
- package/dist/web/demo-tools.js +1 -1
- package/dist/web/demo-tools.js.map +1 -1
- package/dist/web/html.js +5 -5
- package/dist/web/index.d.ts +1 -0
- package/dist/web/index.js +15 -5
- package/dist/web/index.js.map +1 -1
- package/dist/web/terminal-presentation.js +1 -1
- package/dist/web/terminal-presentation.js.map +1 -1
- package/docs/prompt-config.md +86 -86
- package/package.json +1 -1
- package/scripts/copy-prompt-resources.mjs +5 -5
package/dist/repl/index.js
CHANGED
|
@@ -1986,11 +1986,11 @@ function SubagentLivePanel({ activities, width: terminalWidth, animationTick })
|
|
|
1986
1986
|
const activeCount = activities.filter((activity) => activity.status === "running" || activity.status === "pending").length;
|
|
1987
1987
|
const recentCount = Math.max(0, activities.length - activeCount);
|
|
1988
1988
|
const countText = activeCount > 1
|
|
1989
|
-
? `${activeCount} active${recentCount ? `
|
|
1989
|
+
? `${activeCount} active${recentCount ? ` ${recentCount} recent` : ""}`
|
|
1990
1990
|
: recentCount && activeCount === 0
|
|
1991
1991
|
? `${recentCount} recent`
|
|
1992
1992
|
: "";
|
|
1993
|
-
const text = `↳ subagent ${subagentStatusText(selected.status, animationTick)}${countText ? `
|
|
1993
|
+
const text = `↳ subagent ${subagentStatusText(selected.status, animationTick)}${countText ? ` ${countText}` : ""} ${compactAgentSummary(selected, width)}`;
|
|
1994
1994
|
return e(Text, { color: statusColor(selected.status) }, fitToWidth(text, width));
|
|
1995
1995
|
}
|
|
1996
1996
|
function sortAgentActivitiesForPanel(activities) {
|
|
@@ -2010,7 +2010,7 @@ function compactAgentSummary(activity, maxLength) {
|
|
|
2010
2010
|
? `${activity.currentTool.name}${activity.currentTool.inputPreview ? ` ${activity.currentTool.inputPreview}` : ""}`
|
|
2011
2011
|
: firstSafeSubagentPreview(activity.resultPreview, activity.error, activity.lastText, activity.prompt);
|
|
2012
2012
|
const elapsed = formatElapsed(Date.now() - new Date(activity.startedAt).getTime());
|
|
2013
|
-
return truncateMiddle(`${activity.description || activity.agentId}
|
|
2013
|
+
return truncateMiddle(`${activity.description || activity.agentId} ${elapsed} tools:${activity.totalToolUseCount} ${current.replace(/\s+/g, " ")}`, Math.max(8, maxLength));
|
|
2014
2014
|
}
|
|
2015
2015
|
function firstSafeSubagentPreview(...values) {
|
|
2016
2016
|
return values.find((value) => value && !isInternalContinuationPreview(value)) ?? "working";
|
|
@@ -2051,7 +2051,7 @@ function BackgroundTaskStatusLine({ tasks, width: terminalWidth }) {
|
|
|
2051
2051
|
const width = statusBarWidth(terminalWidth);
|
|
2052
2052
|
const summary = `◆ background tools: ${tasks.length} task${tasks.length === 1 ? "" : "s"}`;
|
|
2053
2053
|
const detailTasks = tasks.slice(0, 2);
|
|
2054
|
-
return e(Box, { flexDirection: "column", width, overflow: "hidden" }, e(Text, { color: "yellow" }, fitToWidth(summary, width)), ...detailTasks.map((task, index) => e(Text, { key: `bg-task-${task.taskId}-${index}`, color: "yellow" }, fitToWidth(` ${task.type}:${truncateMiddle(task.description || task.agentId || task.taskId, Math.max(12, width - 30))}
|
|
2054
|
+
return e(Box, { flexDirection: "column", width, overflow: "hidden" }, e(Text, { color: "yellow" }, fitToWidth(summary, width)), ...detailTasks.map((task, index) => e(Text, { key: `bg-task-${task.taskId}-${index}`, color: "yellow" }, fitToWidth(` ${task.type}:${truncateMiddle(task.description || task.agentId || task.taskId, Math.max(12, width - 30))} ${task.status} ${formatElapsed(Date.now() - new Date(task.createdAt).getTime())}`, width))));
|
|
2055
2055
|
}
|
|
2056
2056
|
function formatElapsed(ms) {
|
|
2057
2057
|
const seconds = Math.max(0, Math.floor(ms / 1000));
|
|
@@ -2206,8 +2206,8 @@ function skillNameCompletions(skills, current, action) {
|
|
|
2206
2206
|
}));
|
|
2207
2207
|
}
|
|
2208
2208
|
function formatSkillCompletionDescription(skill) {
|
|
2209
|
-
const tags = skill.tags?.length ? `
|
|
2210
|
-
return `${skill.description}${skill.execution ? `
|
|
2209
|
+
const tags = skill.tags?.length ? ` ${skill.tags.join(",")}` : "";
|
|
2210
|
+
return `${skill.description}${skill.execution ? ` ${skill.execution}` : ""}${tags}`;
|
|
2211
2211
|
}
|
|
2212
2212
|
function secretCommandCompletions(prefix, secrets) {
|
|
2213
2213
|
const hasTrailingSpace = /\s$/.test(prefix);
|
|
@@ -2288,7 +2288,7 @@ function secretKeyCompletions(secrets, current, action) {
|
|
|
2288
2288
|
.map((secret) => ({
|
|
2289
2289
|
value: secret.key,
|
|
2290
2290
|
insertText: `/secret ${action} ${secret.key}${action === "rename" ? " " : ""}`,
|
|
2291
|
-
description: `${secret.status}
|
|
2291
|
+
description: `${secret.status} length=${secret.length}${secret.requestReason ? ` ${secret.requestReason}` : ""}`,
|
|
2292
2292
|
arguments: "optional",
|
|
2293
2293
|
kind: "secret-key",
|
|
2294
2294
|
}));
|
|
@@ -2327,7 +2327,7 @@ function modelCompletion(modelId) {
|
|
|
2327
2327
|
metadata?.reasoning ? (efforts?.length ? `reasoning: ${efforts.join("/")}` : "reasoning") : undefined,
|
|
2328
2328
|
metadata?.imageInput ? "vision" : undefined,
|
|
2329
2329
|
window.tokens ? `${formatCompactNumber(window.tokens)} ctx` : undefined,
|
|
2330
|
-
].filter(Boolean).join("
|
|
2330
|
+
].filter(Boolean).join(" ");
|
|
2331
2331
|
return {
|
|
2332
2332
|
value: modelId,
|
|
2333
2333
|
insertText: `/model ${modelId}`,
|
|
@@ -2437,7 +2437,7 @@ function SlashCompletionLines({ completions, width, prompt, selectedIndex }) {
|
|
|
2437
2437
|
const nameWidth = Math.min(32, Math.max(...visibleCompletions.map((completion) => completion.value.length)));
|
|
2438
2438
|
const pageCount = slashCompletionPageCount(completions);
|
|
2439
2439
|
const pageIndex = Math.floor(pageStart / SLASH_COMPLETION_PAGE_SIZE) + 1;
|
|
2440
|
-
const footer = pageCount > 1 ? "↑/↓ select
|
|
2440
|
+
const footer = pageCount > 1 ? "↑/↓ select ←/→ page Tab complete" : "↑/↓ select Tab complete";
|
|
2441
2441
|
const rows = visibleCompletions.map((completion, index) => {
|
|
2442
2442
|
const selected = index === safeSelectedIndex;
|
|
2443
2443
|
const numberPrefix = `${pageStart + index + 1}.`.padStart(String(completions.length).length + 1);
|
|
@@ -3139,11 +3139,11 @@ function SessionsBrowser({ state, width }) {
|
|
|
3139
3139
|
const showPagination = pageCount > 1;
|
|
3140
3140
|
const contentWidth = Math.max(20, width);
|
|
3141
3141
|
const header = showPagination
|
|
3142
|
-
? `Saved sessions (${state.sessions.length})
|
|
3142
|
+
? `Saved sessions (${state.sessions.length}) page ${state.pageIndex + 1}/${pageCount}`
|
|
3143
3143
|
: `Saved sessions (${state.sessions.length})`;
|
|
3144
3144
|
const footer = showPagination
|
|
3145
|
-
? "↑/↓ select
|
|
3146
|
-
: "↑/↓ select
|
|
3145
|
+
? "↑/↓ select ←/→ page Enter resume d/Delete remove Esc close"
|
|
3146
|
+
: "↑/↓ select Enter resume d/Delete remove Esc close";
|
|
3147
3147
|
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(header, contentWidth)), ...pageItems.map((session, index) => {
|
|
3148
3148
|
const selected = index === state.selectedIndex;
|
|
3149
3149
|
const absoluteIndex = state.pageIndex * state.pageSize + index;
|
|
@@ -3160,11 +3160,11 @@ function SkillsBrowser({ state, width }) {
|
|
|
3160
3160
|
const showPagination = pageCount > 1;
|
|
3161
3161
|
const contentWidth = Math.max(20, width);
|
|
3162
3162
|
const header = showPagination
|
|
3163
|
-
? `Skills (${state.skills.length})
|
|
3163
|
+
? `Skills (${state.skills.length}) page ${state.pageIndex + 1}/${pageCount}`
|
|
3164
3164
|
: `Skills (${state.skills.length})`;
|
|
3165
3165
|
const footer = showPagination
|
|
3166
|
-
? "↑/↓ select
|
|
3167
|
-
: "↑/↓ select
|
|
3166
|
+
? "↑/↓ select ←/→ page Enter details i invoke a import d/Delete remove Esc close"
|
|
3167
|
+
: "↑/↓ select Enter details i invoke a import d/Delete remove Esc close";
|
|
3168
3168
|
const nameWidth = Math.min(28, Math.max(...pageItems.map((skill) => skill.name.length)));
|
|
3169
3169
|
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(header, contentWidth)), ...pageItems.map((skill, index) => {
|
|
3170
3170
|
const selected = index === state.selectedIndex;
|
|
@@ -3183,11 +3183,11 @@ function SecretsBrowser({ state, width }) {
|
|
|
3183
3183
|
const showPagination = pageCount > 1;
|
|
3184
3184
|
const contentWidth = Math.max(20, width);
|
|
3185
3185
|
const header = showPagination
|
|
3186
|
-
? `Secrets (${state.secrets.length})
|
|
3186
|
+
? `Secrets (${state.secrets.length}) page ${state.pageIndex + 1}/${pageCount}`
|
|
3187
3187
|
: `Secrets (${state.secrets.length})`;
|
|
3188
3188
|
const footer = showPagination
|
|
3189
|
-
? "↑/↓ select
|
|
3190
|
-
: "↑/↓ select
|
|
3189
|
+
? "↑/↓ select ←/→ page Enter info s set r rename a add e empty d/Delete remove Esc close"
|
|
3190
|
+
: "↑/↓ select Enter info s set r rename a add e empty d/Delete remove Esc close";
|
|
3191
3191
|
const keyWidth = Math.min(32, Math.max(...pageItems.map((secret) => secret.key.length)));
|
|
3192
3192
|
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(header, contentWidth)), ...pageItems.map((secret, index) => {
|
|
3193
3193
|
const selected = index === state.selectedIndex;
|
|
@@ -3195,7 +3195,7 @@ function SecretsBrowser({ state, width }) {
|
|
|
3195
3195
|
const prefix = `${absoluteIndex + 1}.`.padStart(String(state.secrets.length).length + 1);
|
|
3196
3196
|
const reason = secret.requestReason ? ` reason=${JSON.stringify(secret.requestReason)}` : "";
|
|
3197
3197
|
const restWidth = Math.max(0, contentWidth - prefix.length - keyWidth - 4);
|
|
3198
|
-
const rest = fitToWidth(`${secret.status}
|
|
3198
|
+
const rest = fitToWidth(`${secret.status} length=${secret.length}${reason}`, restWidth);
|
|
3199
3199
|
return e(Text, { key: secret.key, color: "white" }, e(Text, { color: selected ? "black" : "white", backgroundColor: selected ? "cyan" : undefined }, prefix), e(Text, { color: "gray" }, " "), e(Text, { color: secret.status === "set" ? "green" : "yellow" }, fitToWidth(secret.key, keyWidth).padEnd(keyWidth)), e(Text, { color: "gray" }, " "), e(Text, { color: selected ? "white" : "gray" }, rest));
|
|
3200
3200
|
}), e(Text, { color: "gray" }, fitToWidth(footer, contentWidth)));
|
|
3201
3201
|
}
|
|
@@ -3397,17 +3397,17 @@ function loginFormViewHeight(state) {
|
|
|
3397
3397
|
function LoginFormView({ state, width }) {
|
|
3398
3398
|
const contentWidth = Math.max(30, width);
|
|
3399
3399
|
if (state.step === "provider") {
|
|
3400
|
-
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(`Login: choose provider
|
|
3400
|
+
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(`Login: choose provider saving to ${state.envPath}`, contentWidth)), ...state.providers.map((provider, index) => e(Text, { key: `provider-${provider}-${index}`, color: "white" }, e(Text, { color: index === state.selectedProviderIndex ? "black" : "white", backgroundColor: index === state.selectedProviderIndex ? "cyan" : undefined }, `${index + 1}.`.padStart(3)), e(Text, { color: "gray" }, " "), e(Text, { color: "cyan" }, provider))), e(Text, { color: "gray" }, fitToWidth("↑/↓ select Enter edit config Esc close", contentWidth)));
|
|
3401
3401
|
}
|
|
3402
3402
|
const fields = LOGIN_FIELD_DEFINITIONS[state.provider];
|
|
3403
3403
|
const maxLabel = Math.max(...fields.map((field) => field.label.length));
|
|
3404
|
-
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(`Login: ${state.provider}
|
|
3404
|
+
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(`Login: ${state.provider} ${state.envPath}`, contentWidth)), ...fields.map((field, index) => {
|
|
3405
3405
|
const selected = index === state.selectedFieldIndex;
|
|
3406
3406
|
const rawValue = state.values[field.key] ?? "";
|
|
3407
3407
|
const visibleValue = formatLoginFieldValue(field, rawValue, selected ? state.cursor : undefined);
|
|
3408
3408
|
const placeholder = rawValue ? "" : (field.placeholder ? ` (${field.placeholder})` : "");
|
|
3409
3409
|
return e(Text, { key: field.key, color: "white" }, e(Text, { color: selected ? "black" : "white", backgroundColor: selected ? "cyan" : undefined }, `${index + 1}.`.padStart(3)), e(Text, { color: field.required ? "yellow" : "gray" }, ` ${field.label.padEnd(maxLabel)} `), e(Text, { color: field.scope === "shared" ? "blue" : "gray" }, field.scope === "shared" ? "shared " : "provider "), e(Text, { color: rawValue ? "white" : "gray" }, fitToWidth(`${visibleValue}${placeholder}`, Math.max(8, contentWidth - maxLabel - 14))));
|
|
3410
|
-
}), e(Text, { color: "gray" }, fitToWidth("↑/↓ field
|
|
3410
|
+
}), e(Text, { color: "gray" }, fitToWidth("↑/↓ field ←/→ cursor type edit Tab cycle choices Enter save Esc back/cancel", contentWidth)), e(Text, { color: "gray" }, fitToWidth("Provider fields save as OPENAI_*; shared runtime fields save as MODEL_*.", contentWidth)));
|
|
3411
3411
|
}
|
|
3412
3412
|
function formatLoginFieldValue(field, value, cursor) {
|
|
3413
3413
|
const display = field.secret && value ? "•".repeat(Math.min(value.length, 24)) : value;
|
|
@@ -3515,14 +3515,14 @@ function stripEnvQuotes(value) {
|
|
|
3515
3515
|
function formatSessionBrowserRow(session, absoluteIndex, width, running = false) {
|
|
3516
3516
|
const numberPrefix = `${absoluteIndex + 1}.`.padStart(4);
|
|
3517
3517
|
const title = session.title?.trim() || "(untitled)";
|
|
3518
|
-
const runningTag = running ? "
|
|
3519
|
-
const updated = session.updatedAt ? `
|
|
3520
|
-
const messages = `
|
|
3518
|
+
const runningTag = running ? " running" : "";
|
|
3519
|
+
const updated = session.updatedAt ? ` ${formatSessionTimestamp(session.updatedAt)}` : "";
|
|
3520
|
+
const messages = ` ${session.messages} messages`;
|
|
3521
3521
|
const fixedParts = `${numberPrefix} ${runningTag}${updated}${messages}`;
|
|
3522
3522
|
const idBudget = Math.max(12, Math.min(32, Math.floor(width * 0.28)));
|
|
3523
3523
|
const id = truncateMiddle(session.sessionId, idBudget);
|
|
3524
3524
|
const titleBudget = Math.max(8, width - fixedParts.length - id.length - 5);
|
|
3525
|
-
const row = fitToWidth(`${numberPrefix} ${truncateMiddle(title, titleBudget)}
|
|
3525
|
+
const row = fitToWidth(`${numberPrefix} ${truncateMiddle(title, titleBudget)} ${id}${runningTag}${updated}${messages}`, width);
|
|
3526
3526
|
return { numberPrefix, rest: row.slice(numberPrefix.length) };
|
|
3527
3527
|
}
|
|
3528
3528
|
function formatSessionTimestamp(value) {
|
|
@@ -4109,13 +4109,13 @@ function formatImageGenerationToolResult(output, ok) {
|
|
|
4109
4109
|
const lines = [`${mode === "edit" ? "edited" : "generated"} ${returnedImages ?? 0} image${returnedImages === 1 ? "" : "s"}`];
|
|
4110
4110
|
const details = [provider, model, size, quality && quality !== "auto" ? quality : undefined, format].filter((value) => Boolean(value));
|
|
4111
4111
|
if (details.length > 0)
|
|
4112
|
-
lines.push(`${output.requested ? "requested: " : ""}${details.join("
|
|
4112
|
+
lines.push(`${output.requested ? "requested: " : ""}${details.join(" ")}`);
|
|
4113
4113
|
if (isRecord(output.actual)) {
|
|
4114
4114
|
lines.push(`upstream-reported quality: ${String(output.actual.quality ?? "unreported")}`);
|
|
4115
4115
|
if (Array.isArray(output.images))
|
|
4116
4116
|
for (const image of output.images.filter(isRecord)) {
|
|
4117
4117
|
if (typeof image.width === "number" && typeof image.height === "number")
|
|
4118
|
-
lines.push(`actual image: ${image.width}x${image.height}
|
|
4118
|
+
lines.push(`actual image: ${image.width}x${image.height} ${String(image.mimeType ?? "")}`);
|
|
4119
4119
|
}
|
|
4120
4120
|
}
|
|
4121
4121
|
if (Array.isArray(output.warnings))
|
|
@@ -4254,7 +4254,7 @@ function formatWebSearchToolResult(output, ok) {
|
|
|
4254
4254
|
return;
|
|
4255
4255
|
const title = typeof item.title === "string" && item.title.trim() ? item.title.trim() : "Untitled";
|
|
4256
4256
|
const url = typeof item.url === "string" ? item.url : "";
|
|
4257
|
-
const published = typeof item.published === "string" ? `
|
|
4257
|
+
const published = typeof item.published === "string" ? ` ${item.published}` : "";
|
|
4258
4258
|
lines.push(`[${index + 1}] ${title}${published}`);
|
|
4259
4259
|
if (url)
|
|
4260
4260
|
lines.push(url);
|
|
@@ -4632,7 +4632,7 @@ const STATUS_PHASE_MIN_DISPLAY_MS = 2000;
|
|
|
4632
4632
|
const STATUS_SHIMMER_GAP_TICKS = 3;
|
|
4633
4633
|
const STATUS_SHIMMER_RADIUS = 1;
|
|
4634
4634
|
const STATUS_SHIMMER_COLOR = "whiteBright";
|
|
4635
|
-
const STATUS_SEPARATOR = "
|
|
4635
|
+
const STATUS_SEPARATOR = " ";
|
|
4636
4636
|
const STATUS_BAR_RENDER_ROWS = 1;
|
|
4637
4637
|
const BACKGROUND_TASK_STATUS_RENDER_ROWS = 1;
|
|
4638
4638
|
const QUEUED_INPUT_RENDER_ROWS = 1;
|