@timurproko/a1 0.1.8-dev.299 → 0.1.8-dev.332

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.
Files changed (95) hide show
  1. package/README.md +16 -4
  2. package/bin/guardian.js +4 -3
  3. package/bin/ui.js +4 -2
  4. package/bin/update-recovery.js +3 -1
  5. package/dist/cli/dispatch.js +1 -1
  6. package/dist/composition/owned-ui.js +2 -1
  7. package/dist/features/launch/profile-paths.d.ts +2 -0
  8. package/dist/features/launch/profile-paths.js +11 -0
  9. package/dist/features/owned-ui/project-trust-prompt.js +1 -1
  10. package/dist/features/owned-ui/settings-app.js +1 -1
  11. package/dist/features/prompt-history/service.d.ts +31 -1
  12. package/dist/features/prompt-history/service.js +294 -129
  13. package/dist/features/prompt-history/store.d.ts +2 -1
  14. package/dist/features/prompt-history/store.js +17 -4
  15. package/dist/features/prompt-history/worker.js +6 -3
  16. package/dist/foundation/launch-context/index.d.ts +59 -0
  17. package/dist/foundation/launch-context/index.js +136 -0
  18. package/dist/foundation/launch-guardian/main.js +6 -4
  19. package/dist/foundation/release/bootstrap.d.ts +6 -1
  20. package/dist/foundation/release/bootstrap.js +59 -13
  21. package/dist/foundation/release/cohort-state.d.ts +1 -0
  22. package/dist/foundation/release/cohort-state.js +1 -0
  23. package/dist/foundation/release/dependency-certification-retention.d.ts +7 -0
  24. package/dist/foundation/release/dependency-certification-retention.js +88 -0
  25. package/dist/foundation/release/dependency-certification.d.ts +24 -0
  26. package/dist/foundation/release/dependency-certification.js +208 -0
  27. package/dist/foundation/release/dependency-layer.d.ts +3 -4
  28. package/dist/foundation/release/dependency-layer.js +6 -37
  29. package/dist/foundation/release/release-gc.js +74 -46
  30. package/dist/foundation/release/release-store.d.ts +2 -0
  31. package/dist/foundation/release/release-store.js +11 -3
  32. package/dist/foundation/release/release.d.ts +3 -1
  33. package/dist/foundation/release/release.js +7 -3
  34. package/dist/foundation/release/restart-certification.d.ts +1 -0
  35. package/dist/foundation/release/restart-certification.js +17 -1
  36. package/dist/foundation/release/update-recovery.d.ts +2 -0
  37. package/dist/foundation/release/update-recovery.js +4 -0
  38. package/dist/foundation/release/update.js +1 -1
  39. package/dist/foundation/release/warmup.d.ts +1 -1
  40. package/dist/foundation/release/warmup.js +18 -6
  41. package/dist/foundation/startup/startup-runtime.js +13 -11
  42. package/dist/foundation/supervision/main.js +8 -7
  43. package/dist/integrations/pi/components/owned-editor-ux.d.ts +2 -1
  44. package/dist/integrations/pi/components/owned-editor-ux.js +105 -30
  45. package/dist/integrations/pi/components/shell-editor-autocomplete.js +3 -0
  46. package/dist/integrations/pi/components/shell-presenters-info.d.ts +9 -2
  47. package/dist/integrations/pi/components/shell-presenters-info.js +35 -4
  48. package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +3 -2
  49. package/dist/integrations/pi/components/shell-selectors-dialogs.js +8 -5
  50. package/dist/integrations/pi/components/shell-shared-facade.d.ts +9 -2
  51. package/dist/integrations/pi/components/upstream/assets/earendil-image.json +12 -0
  52. package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +25 -2
  53. package/dist/integrations/pi/engine/adapter.d.ts +33 -1
  54. package/dist/integrations/pi/engine/adapter.js +309 -112
  55. package/dist/integrations/pi/engine/changelog.d.ts +2 -0
  56. package/dist/integrations/pi/engine/changelog.js +63 -0
  57. package/dist/integrations/pi/engine/pending-delivery.d.ts +26 -0
  58. package/dist/integrations/pi/engine/pending-delivery.js +149 -0
  59. package/dist/integrations/pi/engine/resources/changelog.json +12 -0
  60. package/dist/integrations/pi/engine/workflow-controllers.d.ts +1 -1
  61. package/dist/integrations/pi/engine/workflows.d.ts +1 -1
  62. package/dist/integrations/pi/session-ui/prompt-chips.d.ts +3 -1
  63. package/dist/integrations/pi/session-ui/prompt-chips.js +74 -37
  64. package/dist/integrations/pi/session-ui/prompt-history-controller.d.ts +0 -2
  65. package/dist/integrations/pi/session-ui/prompt-history-controller.js +3 -8
  66. package/dist/integrations/pi/session-ui/session-shell-root.d.ts +26 -1
  67. package/dist/integrations/pi/session-ui/session-shell-root.js +70 -75
  68. package/dist/integrations/pi/session-ui/session-shell.d.ts +1 -1
  69. package/dist/integrations/pi/session-ui/session-shell.js +67 -13
  70. package/dist/integrations/pi/session-ui/session-viewport-controller.d.ts +7 -2
  71. package/dist/integrations/pi/session-ui/session-viewport-controller.js +25 -20
  72. package/dist/integrations/pi/session-ui/text-paste.d.ts +5 -0
  73. package/dist/integrations/pi/session-ui/text-paste.js +16 -0
  74. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +9 -2
  75. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +87 -43
  76. package/dist/native/darwin-arm64/manifest.json +1 -1
  77. package/dist/native/linux-x64/manifest.json +1 -1
  78. package/dist/native/win32-x64/manifest.json +2 -2
  79. package/dist/native/win32-x64/process-guardian.exe +0 -0
  80. package/dist/product-identity.d.ts +1 -1
  81. package/dist/product-identity.js +2 -35
  82. package/dist/product-identity.json +1 -23
  83. package/dist/ui/components/transcript-viewport.d.ts +8 -0
  84. package/dist/ui/components/transcript-viewport.js +23 -2
  85. package/dist/ui/components/visible-hyperlinks.d.ts +7 -0
  86. package/dist/ui/components/visible-hyperlinks.js +1 -0
  87. package/dist/ui/settings/declarations.js +1 -0
  88. package/dist/ui/settings/sections.js +11 -1
  89. package/docs/architecture/boundaries.md +2 -1
  90. package/docs/architecture/internal-naming.md +91 -0
  91. package/docs/architecture/resource-and-data-policy.md +9 -4
  92. package/docs/architecture/toolchain.md +15 -1
  93. package/docs/features/prompt-history.md +39 -11
  94. package/docs/manual-code-streaming-cleanup.md +88 -0
  95. package/package.json +8 -3
@@ -1,10 +1,28 @@
1
1
  // Mechanically adapted from Pi commit 914cf14
2
2
  // packages/coding-agent/src/modes/interactive/components/earendil-announcement.ts (MIT).
3
- // Local modifications: remap private imports to public package-root/owned theme boundaries and omit optional package-private imagery.
4
- import { Container, Spacer, Text } from "#pi-tui";
3
+ // Local modifications: remap private imports to public package-root/owned theme boundaries; load the verified owned copy of the image lazily.
4
+ import { readFileSync } from "node:fs";
5
+ import { Container, Image, Spacer, Text } from "#pi-tui";
5
6
  import { DynamicBorder } from "@earendil-works/pi-coding-agent";
6
7
  import { piTheme } from "../theme/theme.js";
7
8
  const BLOG_URL = "https://mariozechner.at/posts/2026-04-08-ive-sold-out/";
9
+ const IMAGE_FILENAME = "clankolas.png";
10
+ let cachedImageBase64;
11
+ let attemptedImageLoad = false;
12
+ function loadImageBase64() {
13
+ if (attemptedImageLoad)
14
+ return cachedImageBase64;
15
+ attemptedImageLoad = true;
16
+ try {
17
+ const resource = JSON.parse(readFileSync(new URL("../assets/earendil-image.json", import.meta.url), "utf8"));
18
+ if (resource && typeof resource === "object" && "data" in resource && typeof resource.data === "string")
19
+ cachedImageBase64 = resource.data;
20
+ }
21
+ catch {
22
+ cachedImageBase64 = undefined;
23
+ }
24
+ return cachedImageBase64;
25
+ }
8
26
  export class EarendilAnnouncementComponent extends Container {
9
27
  constructor() {
10
28
  super();
@@ -14,6 +32,11 @@ export class EarendilAnnouncementComponent extends Container {
14
32
  this.addChild(new Text(piTheme().fg("muted", "Read the blog post:"), 1, 0));
15
33
  this.addChild(new Text(piTheme().fg("mdLink", BLOG_URL), 1, 0));
16
34
  this.addChild(new Spacer(1));
35
+ const imageBase64 = loadImageBase64();
36
+ if (imageBase64) {
37
+ this.addChild(new Image(imageBase64, "image/png", { fallbackColor: text => piTheme().fg("muted", text) }, { maxWidthCells: 56, filename: IMAGE_FILENAME }));
38
+ this.addChild(new Spacer(1));
39
+ }
17
40
  this.addChild(new DynamicBorder((text) => piTheme().fg("accent", text)));
18
41
  }
19
42
  }
@@ -1,11 +1,15 @@
1
1
  import type { PiSessionForkPrompt, PiSessionSelection } from "./session-selection.js";
2
- import { type AgentSessionRuntime, type AgentSessionServices, type SessionInfo } from "@earendil-works/pi-coding-agent";
2
+ import { type AgentSession, type AgentSessionRuntime, type AgentSessionServices, type SessionInfo } from "@earendil-works/pi-coding-agent";
3
3
  import { OWNED_UI_EXTENSION_CONTRACT_VERSION, OWNED_UI_EXTENSION_RENDER_CALLBACKS, OWNED_UI_EXTENSION_UI_CALLBACKS, OWNED_UI_EXTENSION_UI_PROPERTIES, type OwnedUiCommand, type OwnedUiCommandOutcome, type OwnedUiImageAttachment, type OwnedUiPromptSuggestionGeneratorPort, type OwnedUiPromptSuggestionRequest, type OwnedUiPromptSuggestionResult, type OwnedUiEvent, type OwnedUiSessionViewModel, type OwnedUiSnapshot } from "../../../contracts/owned-ui/index.js";
4
4
  import { type PiAuthenticationProviderOption, type PiBashWorkflowResult, type PiPinnedSettingsCallback, type PiPinnedSettingsSnapshot, type PiWorkflowAutocompleteCommand, type PiWorkflowHost, type PiWorkflowInteractionHost, type PiWorkflowOption, type PiWorkflowRequest, type PiWorkflowResult } from "./workflows.js";
5
5
  import { PiSettingsIntegration } from "./settings-integration.js";
6
6
  import type { PiSettingOwnerHandlers } from "./settings-effects.js";
7
7
  import type { PiProjectTrustPreflightPrompt } from "./project-trust-preflight.js";
8
8
  import type { AgentSettingOwner } from "../../../contracts/agent-engine/index.js";
9
+ /** Explicit flush failure when required delivery was interrupted rather than completed. */
10
+ export declare class EngineDeliveryError extends Error {
11
+ constructor();
12
+ }
9
13
  export interface PiEngineRuntimeFactoryInput {
10
14
  readonly cwd: string;
11
15
  readonly agentDir: string;
@@ -133,6 +137,8 @@ export declare class PiEngineAdapter implements OwnedUiPromptSuggestionGenerator
133
137
  setWorkflowInteractionHost(interaction: PiWorkflowInteractionHost): void;
134
138
  get sessionId(): string;
135
139
  get sessionGeneration(): number;
140
+ /** Actual session replacements, excluding delivery-only invalidation of callbacks. */
141
+ get sessionBindingGeneration(): number;
136
142
  get cwd(): string;
137
143
  get agentDir(): string;
138
144
  resolveTranscriptImage(assetId: string): OwnedUiImageAttachment | null;
@@ -142,6 +148,20 @@ export declare class PiEngineAdapter implements OwnedUiPromptSuggestionGenerator
142
148
  generate(request: OwnedUiPromptSuggestionRequest): Promise<OwnedUiPromptSuggestionResult>;
143
149
  start(): Promise<OwnedUiSessionViewModel>;
144
150
  onEvent(listener: (event: OwnedUiEvent) => void): () => void;
151
+ /** Developer-only pressure evidence; never mirrored into visible diagnostic/status arrays. */
152
+ deliveryDiagnostics(): {
153
+ overloads: number;
154
+ recovering: boolean;
155
+ pendingCommands: number;
156
+ reservedOutcomes: number;
157
+ invalidatedEvents: number;
158
+ pending: number;
159
+ bytes: number;
160
+ protected: number;
161
+ superseded: number;
162
+ peakNodes: number;
163
+ peakBytes: number;
164
+ };
145
165
  flushEvents(): Promise<void>;
146
166
  nonVisualResources(): readonly OwnedPiResourceSummary[];
147
167
  extensionResources(): readonly OwnedPiExtensionResourceSummary[];
@@ -176,16 +196,28 @@ export declare class PiEngineAdapter implements OwnedUiPromptSuggestionGenerator
176
196
  readonly title: string;
177
197
  readonly options: readonly PiWorkflowOption[];
178
198
  };
199
+ pinnedAmbientAuthentication(selection: string): {
200
+ readonly providerId: string;
201
+ readonly providerName: string;
202
+ readonly title: string;
203
+ readonly message: string;
204
+ } | null;
179
205
  pinnedLogoutOptions(): Promise<readonly PiAuthenticationProviderOption[]>;
180
206
  pinnedForkOptions(): readonly PiWorkflowOption[];
181
207
  pinnedTreeSelectorContext(): PiTreeSelectorContext;
182
208
  pinnedSettingsSnapshot(): PiPinnedSettingsSnapshot;
183
209
  pinnedMessageRenderer(customType: string): unknown;
210
+ pinnedShortcutDescriptions(bindings: Parameters<AgentSession["extensionRunner"]["getShortcuts"]>[0]): readonly {
211
+ readonly key: string;
212
+ readonly description: string;
213
+ }[];
184
214
  pinnedToolDefinition(toolName: string): unknown;
215
+ copyWorkflowText(text: string): Promise<void>;
185
216
  clearQueuedWorkflows(): readonly string[];
186
217
  abortBashWorkflow(): void;
187
218
  executeBashWorkflow(command: string, excludeFromContext: boolean): Promise<PiBashWorkflowResult>;
188
219
  applyPinnedSettingValue(callback: PiPinnedSettingsCallback, value: unknown): Promise<PiWorkflowResult>;
220
+ reloadBlockedResult(): PiWorkflowResult | null;
189
221
  executeWorkflow(request: PiWorkflowRequest): Promise<PiWorkflowResult>;
190
222
  view(): OwnedUiSessionViewModel;
191
223
  snapshot(): OwnedUiSnapshot;