@bastani/atomic 0.8.27-alpha.1 → 0.8.28-alpha.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 +24 -0
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +6 -0
- package/dist/builtin/mcp/package.json +2 -2
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/CHANGELOG.md +6 -0
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +20 -0
- package/dist/builtin/workflows/README.md +11 -9
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/authoring.d.ts +5 -2
- package/dist/builtin/workflows/src/extension/background-ui-adapter.ts +3 -1
- package/dist/builtin/workflows/src/extension/hil-answer-notifications.ts +17 -25
- package/dist/builtin/workflows/src/extension/index.ts +133 -18
- package/dist/builtin/workflows/src/extension/render-result.ts +22 -2
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +3 -3
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +210 -16
- package/dist/builtin/workflows/src/sdk-surface.ts +1 -1
- package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +42 -5
- package/dist/builtin/workflows/src/shared/store-types.ts +8 -2
- package/dist/builtin/workflows/src/shared/store.ts +51 -0
- package/dist/builtin/workflows/src/shared/types.ts +14 -4
- package/dist/builtin/workflows/src/tui/graph-view.ts +4 -1
- package/dist/builtin/workflows/src/tui/prompt-card.ts +6 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +11 -1
- package/dist/core/agent-session.d.ts +4 -4
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +147 -31
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts +10 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js +26 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +2 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +7 -7
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +4 -84
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +3 -479
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction.js +39 -82
- package/dist/core/compaction/context-compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +1 -1
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/extensions/types.d.ts +10 -8
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/messages.d.ts +1 -11
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +10 -25
- package/dist/core/messages.js.map +1 -1
- package/dist/core/session-manager.d.ts +5 -8
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +12 -76
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +0 -3
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +0 -4
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.d.ts +1 -5
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js +5 -9
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +0 -3
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +0 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +0 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +4 -27
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +2 -2
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +0 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/compaction.md +210 -181
- package/docs/extensions.md +31 -20
- package/docs/json.md +3 -4
- package/docs/session-format.md +12 -21
- package/docs/sessions.md +3 -1
- package/docs/settings.md +2 -5
- package/docs/workflows.md +11 -9
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/custom-compaction.ts +43 -106
- package/examples/extensions/handoff.ts +6 -44
- package/examples/extensions/trigger-compact.ts +5 -4
- package/package.json +5 -5
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +0 -43
- package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
|
@@ -130,6 +130,8 @@ export function handlePromptCardInput(
|
|
|
130
130
|
return handleInput(data, state, keybindings);
|
|
131
131
|
case "editor":
|
|
132
132
|
return handleEditor(data, state, keybindings);
|
|
133
|
+
case "custom":
|
|
134
|
+
return { kind: "noop" };
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
137
|
|
|
@@ -436,6 +438,8 @@ export function defaultResponseFor(prompt: PendingPrompt): unknown {
|
|
|
436
438
|
return false;
|
|
437
439
|
case "select":
|
|
438
440
|
return prompt.choices?.[0] ?? "";
|
|
441
|
+
case "custom":
|
|
442
|
+
return undefined;
|
|
439
443
|
}
|
|
440
444
|
}
|
|
441
445
|
|
|
@@ -669,6 +673,8 @@ function renderResponseField(
|
|
|
669
673
|
return [renderInputRow(state, theme, usable, cursorOn)];
|
|
670
674
|
case "editor":
|
|
671
675
|
return renderEditorRows(state, theme, usable, cursorOn);
|
|
676
|
+
case "custom":
|
|
677
|
+
return [padToUsable("", usable)];
|
|
672
678
|
}
|
|
673
679
|
}
|
|
674
680
|
|
|
@@ -424,6 +424,14 @@ export class StageChatView implements Component, Focusable {
|
|
|
424
424
|
);
|
|
425
425
|
return;
|
|
426
426
|
}
|
|
427
|
+
if (request.options?.overlay === true) {
|
|
428
|
+
this.mountingRequestId = null;
|
|
429
|
+
this.stageUiBroker.reject(
|
|
430
|
+
request,
|
|
431
|
+
new Error("atomic-workflows: ctx.ui.custom overlay mode is unavailable in the workflow graph viewer"),
|
|
432
|
+
);
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
427
435
|
try {
|
|
428
436
|
const mounted = await mountStageCustomUi(
|
|
429
437
|
request,
|
|
@@ -1595,7 +1603,6 @@ function transcriptDebugText(entry: TranscriptEntry): string {
|
|
|
1595
1603
|
case "custom":
|
|
1596
1604
|
return extractMessageText(entry.message.content);
|
|
1597
1605
|
case "branchSummary":
|
|
1598
|
-
case "compactionSummary":
|
|
1599
1606
|
return entry.message.summary;
|
|
1600
1607
|
}
|
|
1601
1608
|
}
|
|
@@ -1850,6 +1857,9 @@ function renderHintsForPrompt(kind: PendingPrompt["kind"], theme: GraphTheme): s
|
|
|
1850
1857
|
if (kind === "input" || kind === "editor") {
|
|
1851
1858
|
return `${paint("enter", theme.textMuted, { bold: true })} Submit · ${paint("ctrl+c", theme.textMuted, { bold: true })} Skip`;
|
|
1852
1859
|
}
|
|
1860
|
+
if (kind === "custom") {
|
|
1861
|
+
return `${paint("ctrl+d", theme.textMuted, { bold: true })} Graph · ${paint("ctrl+c", theme.textMuted, { bold: true })} Close`;
|
|
1862
|
+
}
|
|
1853
1863
|
return `${paint("enter", theme.textMuted, { bold: true })} Select · ${paint("ctrl+c", theme.textMuted, { bold: true })} Skip`;
|
|
1854
1864
|
}
|
|
1855
1865
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import type { Agent, AgentEvent, AgentMessage, AgentState, AgentTool, ThinkingLevel } from "@earendil-works/pi-agent-core";
|
|
16
16
|
import type { Api, ImageContent, Model, TextContent } from "@earendil-works/pi-ai";
|
|
17
17
|
import { type BashResult } from "./bash-executor.ts";
|
|
18
|
-
import { type
|
|
18
|
+
import { type ContextCompactionResult } from "./compaction/index.ts";
|
|
19
19
|
import { type ContextUsage, type ExtensionCommandContextActions, type ExtensionErrorListener, ExtensionRunner, type ExtensionUIContext, type InputSource, type OrchestrationContext, type ReplacedSessionContext, type SendMessageOptions, type SessionStartEvent, type ShutdownHandler, type ToolDefinition, type ToolInfo } from "./extensions/index.ts";
|
|
20
20
|
import type { CustomMessage } from "./messages.ts";
|
|
21
21
|
import type { ModelRegistry } from "./model-registry.ts";
|
|
@@ -61,7 +61,7 @@ export type AgentSessionEvent = AgentEvent | {
|
|
|
61
61
|
} | {
|
|
62
62
|
type: "compaction_end";
|
|
63
63
|
reason: "manual" | "threshold" | "overflow";
|
|
64
|
-
result:
|
|
64
|
+
result: ContextCompactionResult | undefined;
|
|
65
65
|
aborted: boolean;
|
|
66
66
|
willRetry: boolean;
|
|
67
67
|
errorMessage?: string;
|
|
@@ -486,9 +486,9 @@ export declare class AgentSession {
|
|
|
486
486
|
private _applyContextVerbatimCompaction;
|
|
487
487
|
/**
|
|
488
488
|
* Manually compact the session context using deletion-only verbatim context compaction.
|
|
489
|
-
* Aborts current agent operation first.
|
|
489
|
+
* Aborts current agent operation first.
|
|
490
490
|
*/
|
|
491
|
-
compact(
|
|
491
|
+
compact(): Promise<ContextCompactionResult>;
|
|
492
492
|
/**
|
|
493
493
|
* Manually compact the session context by applying validated logical deletions.
|
|
494
494
|
* Retained transcript entries/content blocks stay verbatim; no user prompt text is accepted.
|