@oh-my-pi/pi-coding-agent 15.10.12 → 15.11.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.
- package/CHANGELOG.md +90 -4
- package/dist/cli.js +869 -825
- package/dist/types/async/index.d.ts +0 -1
- package/dist/types/capability/mcp.d.ts +1 -0
- package/dist/types/cli/gallery-fixtures/types.d.ts +5 -0
- package/dist/types/config/keybindings.d.ts +6 -1
- package/dist/types/config/settings-schema.d.ts +66 -34
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/extensibility/custom-tools/types.d.ts +2 -2
- package/dist/types/extensibility/shared-events.d.ts +2 -2
- package/dist/types/internal-urls/history-protocol.d.ts +14 -0
- package/dist/types/internal-urls/index.d.ts +1 -0
- package/dist/types/internal-urls/types.d.ts +1 -1
- package/dist/types/irc/bus.d.ts +66 -0
- package/dist/types/mcp/oauth-discovery.d.ts +2 -0
- package/dist/types/mcp/oauth-flow.d.ts +6 -1
- package/dist/types/mcp/transports/stdio.d.ts +1 -0
- package/dist/types/mcp/types.d.ts +2 -0
- package/dist/types/modes/components/agent-hub.d.ts +30 -0
- package/dist/types/modes/components/assistant-message.d.ts +1 -0
- package/dist/types/modes/components/compaction-summary-message.d.ts +10 -4
- package/dist/types/modes/components/custom-editor.d.ts +2 -0
- package/dist/types/modes/components/mcp-add-wizard.d.ts +2 -1
- package/dist/types/modes/components/settings-selector.d.ts +1 -0
- package/dist/types/modes/components/status-line/types.d.ts +3 -0
- package/dist/types/modes/components/tool-execution.d.ts +8 -0
- package/dist/types/modes/components/transcript-container.d.ts +3 -2
- package/dist/types/modes/components/ttsr-notification.d.ts +5 -1
- package/dist/types/modes/components/welcome.d.ts +3 -9
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -1
- package/dist/types/modes/controllers/tool-args-reveal.d.ts +43 -0
- package/dist/types/modes/interactive-mode.d.ts +3 -2
- package/dist/types/modes/theme/theme.d.ts +3 -1
- package/dist/types/modes/types.d.ts +3 -2
- package/dist/types/modes/utils/ui-helpers.d.ts +1 -1
- package/dist/types/registry/agent-lifecycle.d.ts +51 -0
- package/dist/types/registry/agent-registry.d.ts +16 -5
- package/dist/types/session/agent-session.d.ts +35 -30
- package/dist/types/session/messages.d.ts +2 -4
- package/dist/types/session/session-history-format.d.ts +12 -0
- package/dist/types/session/session-manager.d.ts +21 -3
- package/dist/types/session/streaming-output.d.ts +23 -0
- package/dist/types/task/executor.d.ts +11 -2
- package/dist/types/task/index.d.ts +11 -4
- package/dist/types/task/output-manager.d.ts +0 -7
- package/dist/types/task/repair-args.d.ts +8 -7
- package/dist/types/task/types.d.ts +55 -51
- package/dist/types/tools/browser/tab-worker.d.ts +3 -1
- package/dist/types/tools/find.d.ts +0 -11
- package/dist/types/tools/grouped-file-output.d.ts +0 -49
- package/dist/types/tools/index.d.ts +1 -3
- package/dist/types/tools/irc.d.ts +76 -38
- package/dist/types/tools/job.d.ts +7 -1
- package/dist/types/tools/render-utils.d.ts +22 -0
- package/examples/extensions/with-deps/package.json +1 -0
- package/package.json +11 -10
- package/scripts/bundle-dist.ts +28 -19
- package/src/async/index.ts +0 -1
- package/src/capability/mcp.ts +1 -0
- package/src/cli/gallery-cli.ts +6 -5
- package/src/cli/gallery-fixtures/agentic.ts +230 -115
- package/src/cli/gallery-fixtures/types.ts +5 -0
- package/src/cli.ts +20 -6
- package/src/commit/agentic/tools/analyze-file.ts +38 -19
- package/src/config/keybindings.ts +6 -1
- package/src/config/mcp-schema.json +4 -0
- package/src/config/settings-schema.ts +68 -41
- package/src/config/settings.ts +7 -0
- package/src/edit/renderer.ts +96 -46
- package/src/eval/__tests__/agent-bridge.test.ts +5 -3
- package/src/eval/agent-bridge.ts +3 -16
- package/src/eval/js/shared/prelude.txt +1 -1
- package/src/eval/py/prelude.py +5 -6
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.js +44 -14
- package/src/extensibility/custom-tools/types.ts +2 -2
- package/src/extensibility/shared-events.ts +2 -2
- package/src/internal-urls/docs-index.generated.ts +9 -9
- package/src/internal-urls/history-protocol.ts +113 -0
- package/src/internal-urls/index.ts +1 -0
- package/src/internal-urls/router.ts +3 -1
- package/src/internal-urls/types.ts +1 -1
- package/src/irc/bus.ts +292 -0
- package/src/main.ts +8 -60
- package/src/mcp/manager.ts +3 -0
- package/src/mcp/oauth-discovery.ts +27 -2
- package/src/mcp/oauth-flow.ts +47 -1
- package/src/mcp/transports/stdio.ts +3 -0
- package/src/mcp/types.ts +2 -0
- package/src/modes/components/{session-observer-overlay.ts → agent-hub.ts} +586 -367
- package/src/modes/components/assistant-message.ts +15 -0
- package/src/modes/components/btw-panel.ts +5 -1
- package/src/modes/components/compaction-summary-message.ts +68 -32
- package/src/modes/components/custom-editor.ts +10 -0
- package/src/modes/components/mcp-add-wizard.ts +13 -0
- package/src/modes/components/settings-selector.ts +2 -0
- package/src/modes/components/status-line/component.ts +22 -12
- package/src/modes/components/status-line/types.ts +3 -0
- package/src/modes/components/tool-execution.ts +31 -1
- package/src/modes/components/transcript-container.ts +99 -18
- package/src/modes/components/tree-selector.ts +6 -1
- package/src/modes/components/ttsr-notification.ts +72 -30
- package/src/modes/components/welcome.ts +9 -33
- package/src/modes/controllers/event-controller.ts +93 -4
- package/src/modes/controllers/extension-ui-controller.ts +8 -8
- package/src/modes/controllers/input-controller.ts +18 -2
- package/src/modes/controllers/mcp-command-controller.ts +34 -2
- package/src/modes/controllers/selector-controller.ts +25 -17
- package/src/modes/controllers/tool-args-reveal.ts +174 -0
- package/src/modes/interactive-mode.ts +17 -15
- package/src/modes/theme/theme.ts +24 -5
- package/src/modes/types.ts +3 -5
- package/src/modes/utils/hotkeys-markdown.ts +1 -0
- package/src/modes/utils/ui-helpers.ts +51 -49
- package/src/prompts/system/irc-incoming.md +3 -4
- package/src/prompts/system/orchestrate-notice.md +2 -2
- package/src/prompts/system/subagent-system-prompt.md +0 -5
- package/src/prompts/system/system-prompt.md +1 -0
- package/src/prompts/system/workflow-notice.md +2 -2
- package/src/prompts/tools/eval.md +3 -3
- package/src/prompts/tools/irc.md +29 -19
- package/src/prompts/tools/read.md +2 -2
- package/src/prompts/tools/task-summary.md +5 -16
- package/src/prompts/tools/task.md +43 -29
- package/src/registry/agent-lifecycle.ts +218 -0
- package/src/registry/agent-registry.ts +16 -5
- package/src/sdk.ts +29 -9
- package/src/session/agent-session.ts +268 -241
- package/src/session/messages.ts +11 -78
- package/src/session/session-history-format.ts +246 -0
- package/src/session/session-manager.ts +59 -5
- package/src/session/streaming-output.ts +60 -0
- package/src/task/executor.ts +855 -466
- package/src/task/index.ts +723 -794
- package/src/task/output-manager.ts +0 -11
- package/src/task/render.ts +142 -66
- package/src/task/repair-args.ts +21 -9
- package/src/task/types.ts +73 -66
- package/src/tools/ask.ts +4 -2
- package/src/tools/bash.ts +15 -5
- package/src/tools/browser/tab-worker.ts +26 -7
- package/src/tools/browser.ts +28 -1
- package/src/tools/find.ts +2 -27
- package/src/tools/grouped-file-output.ts +1 -118
- package/src/tools/index.ts +4 -12
- package/src/tools/irc.ts +596 -171
- package/src/tools/job.ts +41 -7
- package/src/tools/read.ts +57 -1
- package/src/tools/render-utils.ts +56 -0
- package/src/tools/renderers.ts +2 -0
- package/src/tools/resolve.ts +4 -1
- package/src/tools/write.ts +65 -47
- package/src/web/search/providers/anthropic.ts +29 -4
- package/dist/types/async/support.d.ts +0 -2
- package/dist/types/modes/components/session-observer-overlay.d.ts +0 -11
- package/dist/types/task/simple-mode.d.ts +0 -8
- package/src/async/support.ts +0 -5
- package/src/task/simple-mode.ts +0 -27
|
@@ -229,6 +229,7 @@
|
|
|
229
229
|
const displayIndent = multipleRoots ? Math.max(0, indent - 1) : indent;
|
|
230
230
|
const connector = showConnector && !isVirtualRootChild ? (isLast ? '└─ ' : '├─ ') : '';
|
|
231
231
|
const connectorPosition = connector ? displayIndent - 1 : -1;
|
|
232
|
+
const chainGutter = !connector ? gutters[gutters.length - 1] : undefined;
|
|
232
233
|
|
|
233
234
|
const totalChars = displayIndent * 3;
|
|
234
235
|
const prefixChars = [];
|
|
@@ -238,7 +239,11 @@
|
|
|
238
239
|
|
|
239
240
|
const gutter = gutters.find(g => g.position === level);
|
|
240
241
|
if (gutter) {
|
|
241
|
-
|
|
242
|
+
// Chain rows (no connector of their own) extend only their
|
|
243
|
+
// nearest connector gutter so the flattened conversation flow
|
|
244
|
+
// stays anchored without reviving unrelated `└─` ancestors (#2298).
|
|
245
|
+
const showVertical = gutter.show || gutter === chainGutter;
|
|
246
|
+
prefixChars.push(posInLevel === 0 ? (showVertical ? '│' : ' ') : ' ');
|
|
242
247
|
} else if (connector && level === connectorPosition) {
|
|
243
248
|
if (posInLevel === 0) {
|
|
244
249
|
prefixChars.push(isLast ? '└' : '├');
|
|
@@ -1023,18 +1028,18 @@
|
|
|
1023
1028
|
}
|
|
1024
1029
|
|
|
1025
1030
|
function renderTask(name, args, result, ctx) {
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1028
|
-
|
|
1031
|
+
const badges = [];
|
|
1032
|
+
if (args.resume) badges.push('resume=' + str(args.resume));
|
|
1033
|
+
else badges.push('agent=' + (str(args.agent) || '?'));
|
|
1034
|
+
if (args.id) badges.push('id=' + str(args.id));
|
|
1029
1035
|
if (args.isolated) badges.push('isolated');
|
|
1030
1036
|
let html = toolHead('task', '', badges);
|
|
1031
|
-
|
|
1037
|
+
const description = str(args.description);
|
|
1038
|
+
const assignment = str(args.assignment);
|
|
1039
|
+
if (description || assignment) {
|
|
1032
1040
|
html += '<div class="tool-args">';
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
const desc = t?.description ? escapeHtml(String(t.description)) : '';
|
|
1036
|
-
html += '<div class="tool-arg"><span class="tool-arg-key">' + id + '</span> ' + desc + '</div>';
|
|
1037
|
-
}
|
|
1041
|
+
if (description) html += '<div class="tool-arg"><span class="tool-arg-key">' + escapeHtml(description) + '</span></div>';
|
|
1042
|
+
if (assignment) html += '<div class="tool-arg">' + escapeHtml(assignment) + '</div>';
|
|
1038
1043
|
html += '</div>';
|
|
1039
1044
|
}
|
|
1040
1045
|
if (result) {
|
|
@@ -1479,13 +1484,38 @@
|
|
|
1479
1484
|
}
|
|
1480
1485
|
|
|
1481
1486
|
function renderIrc(name, args, result, ctx) {
|
|
1482
|
-
const
|
|
1487
|
+
const details = result && result.details ? result.details : null;
|
|
1488
|
+
const op = str(args.op) || (details && str(details.op)) || '?';
|
|
1483
1489
|
const badges = [op];
|
|
1484
|
-
if (args.to) badges.push('to=' + args.to);
|
|
1485
|
-
if (
|
|
1490
|
+
if (args.to) badges.push('to=' + str(args.to));
|
|
1491
|
+
if (op === 'wait' && args.from) badges.push('from=' + str(args.from));
|
|
1492
|
+
if (args.await) badges.push('await');
|
|
1493
|
+
if (args.peek) badges.push('peek');
|
|
1486
1494
|
let html = toolHead('irc', '', badges);
|
|
1487
1495
|
if (args.message) html += '<div class="tool-output"><div>' + escapeHtml(String(args.message)) + '</div></div>';
|
|
1488
|
-
|
|
1496
|
+
let renderedDetails = false;
|
|
1497
|
+
if (details && Array.isArray(details.receipts) && details.receipts.length) {
|
|
1498
|
+
html += '<div class="tool-args">';
|
|
1499
|
+
for (const receipt of details.receipts) {
|
|
1500
|
+
const outcome = escapeHtml(String(receipt.outcome)) + (receipt.error ? ' — ' + escapeHtml(String(receipt.error)) : '');
|
|
1501
|
+
html += '<div class="tool-arg"><span class="tool-arg-key">' + escapeHtml(String(receipt.to)) + '</span> ' + outcome + '</div>';
|
|
1502
|
+
}
|
|
1503
|
+
html += '</div>';
|
|
1504
|
+
renderedDetails = true;
|
|
1505
|
+
}
|
|
1506
|
+
if (details && details.waited) {
|
|
1507
|
+
html += '<div class="tool-output"><div>' + escapeHtml(String(details.waited.from)) + ': ' + escapeHtml(String(details.waited.body)) + '</div></div>';
|
|
1508
|
+
renderedDetails = true;
|
|
1509
|
+
}
|
|
1510
|
+
if (details && Array.isArray(details.inbox) && details.inbox.length) {
|
|
1511
|
+
html += '<div class="tool-args">';
|
|
1512
|
+
for (const msg of details.inbox) {
|
|
1513
|
+
html += '<div class="tool-arg"><span class="tool-arg-key">' + escapeHtml(String(msg.from)) + '</span> ' + escapeHtml(String(msg.body)) + '</div>';
|
|
1514
|
+
}
|
|
1515
|
+
html += '</div>';
|
|
1516
|
+
renderedDetails = true;
|
|
1517
|
+
}
|
|
1518
|
+
if (!renderedDetails && result) {
|
|
1489
1519
|
const output = ctx.getResultText();
|
|
1490
1520
|
if (output) html += formatExpandableOutput(output, 8);
|
|
1491
1521
|
}
|
|
@@ -103,11 +103,11 @@ export type CustomToolSessionEvent =
|
|
|
103
103
|
| {
|
|
104
104
|
reason: "auto_compaction_start";
|
|
105
105
|
trigger: "threshold" | "overflow" | "idle" | "incomplete";
|
|
106
|
-
action: "context-full" | "handoff" | "shake";
|
|
106
|
+
action: "context-full" | "handoff" | "shake" | "snapcompact";
|
|
107
107
|
}
|
|
108
108
|
| {
|
|
109
109
|
reason: "auto_compaction_end";
|
|
110
|
-
action: "context-full" | "handoff" | "shake";
|
|
110
|
+
action: "context-full" | "handoff" | "shake" | "snapcompact";
|
|
111
111
|
result: CompactionResult | undefined;
|
|
112
112
|
aborted: boolean;
|
|
113
113
|
willRetry: boolean;
|
|
@@ -204,13 +204,13 @@ export interface TurnEndEvent {
|
|
|
204
204
|
export interface AutoCompactionStartEvent {
|
|
205
205
|
type: "auto_compaction_start";
|
|
206
206
|
reason: "threshold" | "overflow" | "idle" | "incomplete";
|
|
207
|
-
action: "context-full" | "handoff" | "shake";
|
|
207
|
+
action: "context-full" | "handoff" | "shake" | "snapcompact";
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
/** Fired when auto-compaction ends */
|
|
211
211
|
export interface AutoCompactionEndEvent {
|
|
212
212
|
type: "auto_compaction_end";
|
|
213
|
-
action: "context-full" | "handoff" | "shake";
|
|
213
|
+
action: "context-full" | "handoff" | "shake" | "snapcompact";
|
|
214
214
|
result: CompactionResult | undefined;
|
|
215
215
|
aborted: boolean;
|
|
216
216
|
willRetry: boolean;
|