@oh-my-pi/pi-coding-agent 15.10.12 → 15.11.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/CHANGELOG.md +60 -3
- package/dist/cli.js +841 -803
- package/dist/types/async/index.d.ts +0 -1
- 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 +56 -33
- 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/modes/components/agent-hub.d.ts +30 -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/tool-execution.d.ts +8 -0
- 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/interactive-mode.d.ts +3 -2
- package/dist/types/modes/theme/theme.d.ts +2 -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/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/cli/gallery-cli.ts +1 -1
- 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/settings-schema.ts +56 -40
- package/src/config/settings.ts +7 -0
- 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 +38 -13
- 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 +8 -8
- 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/modes/components/{session-observer-overlay.ts → agent-hub.ts} +586 -367
- package/src/modes/components/compaction-summary-message.ts +68 -32
- package/src/modes/components/custom-editor.ts +10 -0
- package/src/modes/components/tool-execution.ts +31 -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 +65 -0
- package/src/modes/controllers/extension-ui-controller.ts +8 -8
- package/src/modes/controllers/input-controller.ts +18 -2
- package/src/modes/controllers/selector-controller.ts +21 -17
- package/src/modes/interactive-mode.ts +8 -13
- package/src/modes/theme/theme.ts +18 -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 +38 -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 +243 -237
- 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 +718 -794
- package/src/task/output-manager.ts +0 -11
- package/src/task/render.ts +133 -63
- 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/renderers.ts +2 -0
- package/src/tools/resolve.ts +4 -1
- 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
|
@@ -1023,18 +1023,18 @@
|
|
|
1023
1023
|
}
|
|
1024
1024
|
|
|
1025
1025
|
function renderTask(name, args, result, ctx) {
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1028
|
-
|
|
1026
|
+
const badges = [];
|
|
1027
|
+
if (args.resume) badges.push('resume=' + str(args.resume));
|
|
1028
|
+
else badges.push('agent=' + (str(args.agent) || '?'));
|
|
1029
|
+
if (args.id) badges.push('id=' + str(args.id));
|
|
1029
1030
|
if (args.isolated) badges.push('isolated');
|
|
1030
1031
|
let html = toolHead('task', '', badges);
|
|
1031
|
-
|
|
1032
|
+
const description = str(args.description);
|
|
1033
|
+
const assignment = str(args.assignment);
|
|
1034
|
+
if (description || assignment) {
|
|
1032
1035
|
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
|
-
}
|
|
1036
|
+
if (description) html += '<div class="tool-arg"><span class="tool-arg-key">' + escapeHtml(description) + '</span></div>';
|
|
1037
|
+
if (assignment) html += '<div class="tool-arg">' + escapeHtml(assignment) + '</div>';
|
|
1038
1038
|
html += '</div>';
|
|
1039
1039
|
}
|
|
1040
1040
|
if (result) {
|
|
@@ -1479,13 +1479,38 @@
|
|
|
1479
1479
|
}
|
|
1480
1480
|
|
|
1481
1481
|
function renderIrc(name, args, result, ctx) {
|
|
1482
|
-
const
|
|
1482
|
+
const details = result && result.details ? result.details : null;
|
|
1483
|
+
const op = str(args.op) || (details && str(details.op)) || '?';
|
|
1483
1484
|
const badges = [op];
|
|
1484
|
-
if (args.to) badges.push('to=' + args.to);
|
|
1485
|
-
if (
|
|
1485
|
+
if (args.to) badges.push('to=' + str(args.to));
|
|
1486
|
+
if (op === 'wait' && args.from) badges.push('from=' + str(args.from));
|
|
1487
|
+
if (args.await) badges.push('await');
|
|
1488
|
+
if (args.peek) badges.push('peek');
|
|
1486
1489
|
let html = toolHead('irc', '', badges);
|
|
1487
1490
|
if (args.message) html += '<div class="tool-output"><div>' + escapeHtml(String(args.message)) + '</div></div>';
|
|
1488
|
-
|
|
1491
|
+
let renderedDetails = false;
|
|
1492
|
+
if (details && Array.isArray(details.receipts) && details.receipts.length) {
|
|
1493
|
+
html += '<div class="tool-args">';
|
|
1494
|
+
for (const receipt of details.receipts) {
|
|
1495
|
+
const outcome = escapeHtml(String(receipt.outcome)) + (receipt.error ? ' — ' + escapeHtml(String(receipt.error)) : '');
|
|
1496
|
+
html += '<div class="tool-arg"><span class="tool-arg-key">' + escapeHtml(String(receipt.to)) + '</span> ' + outcome + '</div>';
|
|
1497
|
+
}
|
|
1498
|
+
html += '</div>';
|
|
1499
|
+
renderedDetails = true;
|
|
1500
|
+
}
|
|
1501
|
+
if (details && details.waited) {
|
|
1502
|
+
html += '<div class="tool-output"><div>' + escapeHtml(String(details.waited.from)) + ': ' + escapeHtml(String(details.waited.body)) + '</div></div>';
|
|
1503
|
+
renderedDetails = true;
|
|
1504
|
+
}
|
|
1505
|
+
if (details && Array.isArray(details.inbox) && details.inbox.length) {
|
|
1506
|
+
html += '<div class="tool-args">';
|
|
1507
|
+
for (const msg of details.inbox) {
|
|
1508
|
+
html += '<div class="tool-arg"><span class="tool-arg-key">' + escapeHtml(String(msg.from)) + '</span> ' + escapeHtml(String(msg.body)) + '</div>';
|
|
1509
|
+
}
|
|
1510
|
+
html += '</div>';
|
|
1511
|
+
renderedDetails = true;
|
|
1512
|
+
}
|
|
1513
|
+
if (!renderedDetails && result) {
|
|
1489
1514
|
const output = ctx.getResultText();
|
|
1490
1515
|
if (output) html += formatExpandableOutput(output, 8);
|
|
1491
1516
|
}
|
|
@@ -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;
|