@timurproko/a1 0.1.8-dev.521 → 0.1.8-dev.527

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 (75) hide show
  1. package/README.md +8 -118
  2. package/dist/app/session-shell/session-shell-root.js +1 -1
  3. package/dist/app/session-shell/session-shell.d.ts +2 -2
  4. package/dist/app/session-shell/session-shell.js +9 -9
  5. package/dist/foundation/startup/startup-descriptor.js +2 -2
  6. package/dist/integrations/pi/components/shell-editor-autocomplete.js +2 -1
  7. package/dist/integrations/pi/components/shell-presenters-info.d.ts +19 -0
  8. package/dist/integrations/pi/components/shell-presenters-info.js +56 -2
  9. package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +6 -4
  10. package/dist/integrations/pi/components/shell-selectors-dialogs.js +5 -4
  11. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +2 -2
  12. package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +2 -2
  13. package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
  14. package/dist/integrations/pi/components/upstream/components/countdown-timer.d.ts +1 -1
  15. package/dist/integrations/pi/components/upstream/components/daxnuts.d.ts +1 -1
  16. package/dist/integrations/pi/components/upstream/components/daxnuts.js +1 -1
  17. package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +1 -1
  18. package/dist/integrations/pi/components/upstream/components/extension-editor.d.ts +2 -1
  19. package/dist/integrations/pi/components/upstream/components/extension-editor.js +7 -2
  20. package/dist/integrations/pi/components/upstream/components/mermaid.js +1 -1
  21. package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +1 -1
  22. package/dist/integrations/pi/components/upstream/components/owned-editor.js +1 -1
  23. package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +1 -1
  24. package/dist/integrations/pi/components/upstream/components/session-footer.js +1 -1
  25. package/dist/integrations/pi/components/upstream/components/session-selector-search.js +1 -1
  26. package/dist/integrations/pi/components/upstream/components/session-selector.d.ts +8 -6
  27. package/dist/integrations/pi/components/upstream/components/session-selector.js +75 -49
  28. package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +1 -1
  29. package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +18 -10
  30. package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +3 -3
  31. package/dist/integrations/pi/components/upstream/components/status-indicator.js +8 -8
  32. package/dist/integrations/pi/components/upstream/components/tool-execution.js +1 -1
  33. package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +1 -1
  34. package/dist/integrations/pi/components/upstream/components/tree-selector.js +3 -1
  35. package/dist/integrations/pi/components/upstream/components/trust-selector.js +1 -1
  36. package/dist/integrations/pi/components/upstream/external-editor.js +1 -1
  37. package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +1 -1
  38. package/dist/integrations/pi/components/upstream/history/editor-core.js +8 -7
  39. package/dist/integrations/pi/components/upstream/history/kill-ring.d.ts +1 -1
  40. package/dist/integrations/pi/components/upstream/history/kill-ring.js +1 -1
  41. package/dist/integrations/pi/components/upstream/history/printable-key.js +1 -1
  42. package/dist/integrations/pi/components/upstream/history/text-helpers.d.ts +3 -0
  43. package/dist/integrations/pi/components/upstream/history/text-helpers.js +4 -1
  44. package/dist/integrations/pi/components/upstream/history/undo-stack.d.ts +1 -1
  45. package/dist/integrations/pi/components/upstream/history/undo-stack.js +1 -1
  46. package/dist/integrations/pi/components/upstream/history/word-navigation.js +1 -1
  47. package/dist/integrations/pi/components/upstream/model-search.d.ts +1 -1
  48. package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +1 -1
  49. package/dist/integrations/pi/components/upstream/theme/theme.js +1 -1
  50. package/dist/integrations/pi/engine/index.d.ts +1 -1
  51. package/dist/integrations/pi/engine/index.js +1 -1
  52. package/dist/integrations/pi/engine/pi-settings-metadata.json +12 -0
  53. package/dist/integrations/pi/engine/resources/changelog.json +4 -4
  54. package/dist/integrations/pi/engine/settings-bridge.d.ts +1 -1
  55. package/dist/integrations/pi/engine/settings-bridge.js +2 -0
  56. package/dist/integrations/pi/engine/settings-port.js +11 -1
  57. package/dist/integrations/pi/engine/usage-view.js +1 -1
  58. package/dist/integrations/pi/engine/workflow-runner.js +4 -1
  59. package/dist/integrations/pi/engine/workflow-support.d.ts +6 -1
  60. package/dist/integrations/pi/engine/workflow-support.js +36 -2
  61. package/dist/integrations/pi/engine/workflows.d.ts +36 -3
  62. package/dist/integrations/pi/engine/workflows.js +8 -0
  63. package/dist/integrations/pi/startup-public.js +1001 -976
  64. package/dist/integrations/pi/startup-public.manifest.json +1846 -1672
  65. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +1 -1
  66. package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +7 -1
  67. package/dist/native/darwin-arm64/manifest.json +1 -1
  68. package/dist/native/linux-x64/manifest.json +1 -1
  69. package/dist/native/win32-x64/manifest.json +2 -2
  70. package/dist/native/win32-x64/process-guardian.exe +0 -0
  71. package/dist/runtime-payload-inventory.json +41121 -34266
  72. package/docs/architecture/toolchain.md +2 -0
  73. package/docs/ci-release-runbook.md +1 -1
  74. package/docs/openspec-archive-automation.md +2 -2
  75. package/package.json +5 -4
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/scoped-models-selector.ts.
4
4
  * Modifications: Source-synchronized scoped-model selector port: preserve session-only toggles,
5
5
  * search, bulk/provider/reorder actions, dirty state, Ctrl+S persistence, refresh status,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/footer.ts.
4
4
  * Modifications: Consumes neutral owned-UI view data instead of a fabricated concrete AgentSession; an
5
5
  * explicit bare-A1 profile colors the thinking-level name while preserving the remaining footer layout
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/session-selector-search.ts.
4
4
  * Modifications: Source-synchronized session search port with only the public SessionInfo type import
5
5
  * remapped.
@@ -1,7 +1,9 @@
1
1
  import { type Component, Container, type Focusable } from "@earendil-works/pi-tui";
2
2
  import { KeybindingsManager } from "../adjacent/core/keybindings.js";
3
3
  import { type SessionInfo } from "@earendil-works/pi-coding-agent";
4
- type SessionListProgress = (loaded: number, total: number) => void;
4
+ type SessionListProgress = (loaded: number, total: number,
5
+ /** Sessions loaded so far, sorted by activity. Present on periodic updates. */
6
+ partialSessions?: readonly SessionInfo[]) => void;
5
7
  import { type NameFilter, type SortMode } from "./session-selector-search.js";
6
8
  /**
7
9
  * Custom session list component with multi-line items and search
@@ -11,6 +13,7 @@ declare class SessionList implements Component, Focusable {
11
13
  private allSessions;
12
14
  private filteredSessions;
13
15
  private selectedIndex;
16
+ private selectionTouched;
14
17
  private searchInput;
15
18
  private showCwd;
16
19
  private sortMode;
@@ -47,7 +50,7 @@ declare class SessionList implements Component, Focusable {
47
50
  private buildTreePrefix;
48
51
  handleInput(keyData: string): void;
49
52
  }
50
- type SessionsLoader = (onProgress?: SessionListProgress) => Promise<SessionInfo[]>;
53
+ type SessionsLoader = (onProgress?: SessionListProgress, signal?: AbortSignal) => Promise<SessionInfo[]>;
51
54
  /**
52
55
  * Component that renders a session selector
53
56
  */
@@ -66,9 +69,8 @@ export declare class SessionSelectorComponent extends Container implements Focus
66
69
  private allSessionsLoader;
67
70
  private requestRender;
68
71
  private renameSession;
69
- private currentLoading;
70
- private allLoading;
71
- private allLoadSeq;
72
+ private currentLoad;
73
+ private allLoad;
72
74
  private mode;
73
75
  private renameInput;
74
76
  private renameTargetPath;
@@ -81,7 +83,7 @@ export declare class SessionSelectorComponent extends Container implements Focus
81
83
  showRenameHint?: boolean;
82
84
  keybindings?: KeybindingsManager;
83
85
  }, currentSessionFilePath?: string);
84
- private loadCurrentSessions;
86
+ private cancelLoads;
85
87
  private enterRenameMode;
86
88
  private exitRenameMode;
87
89
  private confirmRename;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/session-selector.ts.
4
4
  * Modifications: Source-synchronized session selector port: preserve threaded/current/all scope,
5
5
  * search, sort, named/path filters, rename, delete confirmation, active-session protection, loading
@@ -260,6 +260,7 @@ class SessionList {
260
260
  allSessions = [];
261
261
  filteredSessions = [];
262
262
  selectedIndex = 0;
263
+ selectionTouched = false;
263
264
  searchInput;
264
265
  showCwd = false;
265
266
  sortMode = "threaded";
@@ -318,9 +319,18 @@ class SessionList {
318
319
  this.filterSessions(this.searchInput.getValue());
319
320
  }
320
321
  setSessions(sessions, showCwd) {
322
+ const selectedPath = this.selectionTouched ? this.getSelectedSessionPath() : undefined;
321
323
  this.allSessions = sessions;
322
324
  this.showCwd = showCwd;
323
325
  this.filterSessions(this.searchInput.getValue());
326
+ if (!this.selectionTouched) {
327
+ this.selectedIndex = 0;
328
+ }
329
+ else if (selectedPath) {
330
+ const selectedIndex = this.filteredSessions.findIndex((node) => node.session.path === selectedPath);
331
+ if (selectedIndex >= 0)
332
+ this.selectedIndex = selectedIndex;
333
+ }
324
334
  }
325
335
  filterSessions(query) {
326
336
  const trimmed = query.trim();
@@ -526,6 +536,7 @@ class SessionList {
526
536
  this.startDeleteConfirmationForSelectedSession();
527
537
  return;
528
538
  }
539
+ this.selectionTouched = true;
529
540
  // Up arrow
530
541
  if (kb.matches(keyData, "tui.select.up")) {
531
542
  this.selectedIndex = Math.max(0, this.selectedIndex - 1);
@@ -627,9 +638,8 @@ export class SessionSelectorComponent extends Container {
627
638
  allSessionsLoader;
628
639
  requestRender;
629
640
  renameSession;
630
- currentLoading = false;
631
- allLoading = false;
632
- allLoadSeq = 0;
641
+ currentLoad = null;
642
+ allLoad = null;
633
643
  mode = "list";
634
644
  renameInput = new Input();
635
645
  renameTargetPath = null;
@@ -680,14 +690,17 @@ export class SessionSelectorComponent extends Container {
680
690
  const clearStatusMessage = () => this.header.setStatusMessage(null);
681
691
  this.sessionList.onSelect = (sessionPath) => {
682
692
  clearStatusMessage();
693
+ this.cancelLoads();
683
694
  onSelect(sessionPath);
684
695
  };
685
696
  this.sessionList.onCancel = () => {
686
697
  clearStatusMessage();
698
+ this.cancelLoads();
687
699
  onCancel();
688
700
  };
689
701
  this.sessionList.onExit = () => {
690
702
  clearStatusMessage();
703
+ this.cancelLoads();
691
704
  onExit();
692
705
  };
693
706
  this.sessionList.onToggleScope = () => this.toggleScope();
@@ -696,9 +709,7 @@ export class SessionSelectorComponent extends Container {
696
709
  this.sessionList.onRenameSession = (sessionPath) => {
697
710
  if (!renameSession)
698
711
  return;
699
- if (this.scope === "current" && this.currentLoading)
700
- return;
701
- if (this.scope === "all" && this.allLoading)
712
+ if (this.scope === "current" ? this.currentLoad : this.allLoad)
702
713
  return;
703
714
  const sessions = this.scope === "all" ? (this.allSessions ?? []) : (this.currentSessions ?? []);
704
715
  const session = sessions.find((s) => s.path === sessionPath);
@@ -741,10 +752,19 @@ export class SessionSelectorComponent extends Container {
741
752
  this.requestRender();
742
753
  };
743
754
  // Start loading current sessions immediately
744
- this.loadCurrentSessions();
755
+ void this.loadScope("current");
745
756
  }
746
- loadCurrentSessions() {
747
- void this.loadScope("current", "initial");
757
+ cancelLoads() {
758
+ if (this.currentLoad) {
759
+ this.currentLoad.abort();
760
+ this.currentLoad = null;
761
+ this.currentSessions = null;
762
+ }
763
+ if (this.allLoad) {
764
+ this.allLoad.abort();
765
+ this.allLoad = null;
766
+ this.allSessions = null;
767
+ }
748
768
  }
749
769
  enterRenameMode(sessionPath, currentName) {
750
770
  this.mode = "rename";
@@ -789,64 +809,77 @@ export class SessionSelectorComponent extends Container {
789
809
  this.exitRenameMode();
790
810
  }
791
811
  }
792
- async loadScope(scope, reason) {
812
+ async loadScope(scope) {
813
+ if (scope === "current" ? this.currentLoad : this.allLoad)
814
+ return;
793
815
  const showCwd = scope === "all";
794
- // Mark loading
816
+ const controller = new AbortController();
795
817
  if (scope === "current") {
796
- this.currentLoading = true;
818
+ this.currentLoad = controller;
797
819
  }
798
820
  else {
799
- this.allLoading = true;
821
+ this.allLoad = controller;
800
822
  }
801
- const seq = scope === "all" ? ++this.allLoadSeq : undefined;
802
823
  this.header.setScope(scope);
803
824
  this.header.setLoading(true);
804
825
  this.requestRender();
805
- const onProgress = (loaded, total) => {
806
- if (scope !== this.scope)
826
+ const isActive = () => (scope === "current" ? this.currentLoad : this.allLoad) === controller;
827
+ const onProgress = (loaded, total, partialSessions) => {
828
+ if (!isActive())
807
829
  return;
808
- if (seq !== undefined && seq !== this.allLoadSeq)
830
+ if (partialSessions) {
831
+ const sessions = [...partialSessions];
832
+ if (scope === "current") {
833
+ this.currentSessions = sessions;
834
+ }
835
+ else {
836
+ this.allSessions = sessions;
837
+ }
838
+ if (scope === this.scope)
839
+ this.sessionList.setSessions(sessions, showCwd);
840
+ }
841
+ if (scope !== this.scope)
809
842
  return;
810
843
  this.header.setProgress(loaded, total);
811
844
  this.requestRender();
812
845
  };
813
846
  try {
814
847
  const sessions = await (scope === "current"
815
- ? this.currentSessionsLoader(onProgress)
816
- : this.allSessionsLoader(onProgress));
848
+ ? this.currentSessionsLoader(onProgress, controller.signal)
849
+ : this.allSessionsLoader(onProgress, controller.signal));
850
+ if (!isActive())
851
+ return;
817
852
  if (scope === "current") {
818
853
  this.currentSessions = sessions;
819
- this.currentLoading = false;
854
+ this.currentLoad = null;
820
855
  }
821
856
  else {
822
857
  this.allSessions = sessions;
823
- this.allLoading = false;
858
+ this.allLoad = null;
824
859
  }
825
860
  if (scope !== this.scope)
826
861
  return;
827
- if (seq !== undefined && seq !== this.allLoadSeq)
828
- return;
829
862
  this.header.setLoading(false);
830
863
  this.sessionList.setSessions(sessions, showCwd);
831
864
  this.requestRender();
832
865
  }
833
866
  catch (err) {
867
+ if (!isActive())
868
+ return;
834
869
  if (scope === "current") {
835
- this.currentLoading = false;
870
+ this.currentLoad = null;
871
+ this.currentSessions = null;
836
872
  }
837
873
  else {
838
- this.allLoading = false;
874
+ this.allLoad = null;
875
+ this.allSessions = null;
839
876
  }
840
877
  if (scope !== this.scope)
841
878
  return;
842
- if (seq !== undefined && seq !== this.allLoadSeq)
843
- return;
844
879
  const message = err instanceof Error ? err.message : String(err);
845
880
  this.header.setLoading(false);
846
881
  this.header.setStatusMessage({ type: "error", message: `Failed to load sessions: ${message}` }, 4000);
847
- if (reason === "initial") {
848
- this.sessionList.setSessions([], showCwd);
849
- }
882
+ this.sessionList.setSessions([], showCwd);
850
883
  this.requestRender();
851
884
  }
852
885
  }
@@ -864,28 +897,21 @@ export class SessionSelectorComponent extends Container {
864
897
  this.requestRender();
865
898
  }
866
899
  async refreshSessionsAfterMutation() {
867
- await this.loadScope(this.scope, "refresh");
900
+ this.cancelLoads();
901
+ this.currentSessions = null;
902
+ this.allSessions = null;
903
+ await this.loadScope(this.scope);
868
904
  }
869
905
  toggleScope() {
870
- if (this.scope === "current") {
871
- this.scope = "all";
872
- this.header.setScope(this.scope);
873
- if (this.allSessions !== null) {
874
- this.header.setLoading(false);
875
- this.sessionList.setSessions(this.allSessions, true);
876
- this.requestRender();
877
- return;
878
- }
879
- if (!this.allLoading) {
880
- void this.loadScope("all", "toggle");
881
- }
882
- return;
883
- }
884
- this.scope = "current";
906
+ this.scope = this.scope === "current" ? "all" : "current";
907
+ const sessions = this.scope === "current" ? this.currentSessions : this.allSessions;
908
+ const loading = (this.scope === "current" ? this.currentLoad : this.allLoad) !== null;
885
909
  this.header.setScope(this.scope);
886
- this.header.setLoading(this.currentLoading);
887
- this.sessionList.setSessions(this.currentSessions ?? [], false);
910
+ this.header.setLoading(loading);
911
+ this.sessionList.setSessions(sessions ?? [], this.scope === "all");
888
912
  this.requestRender();
913
+ if (sessions === null && !loading)
914
+ void this.loadScope(this.scope);
889
915
  }
890
916
  getSessionList() {
891
917
  return this.sessionList;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts.
4
4
  * Modifications: Mechanical port uses A1's public pi-tui instance, owned theme boundary, and
5
5
  * root-instance keybinding registry because the public coding-agent component closes over a second
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/skill-invocation-message.ts.
4
4
  * Modifications: Mechanical port uses A1's public pi-tui instance, owned theme boundary, and
5
5
  * root-instance keybinding registry because the public coding-agent component closes over a second
6
6
  * nested pi-tui singleton and cannot observe A1's keybindings.
7
7
  * Deviations: none.
8
8
  */
9
- import { Box, getKeybindings, Markdown, Text } from "@earendil-works/pi-tui";
9
+ import { Box, Container, getKeybindings, Markdown, MouseRegion, Text } from "@earendil-works/pi-tui";
10
10
  import { piTheme } from "../theme/theme.js";
11
11
  export class SkillInvocationMessageComponent extends Box {
12
12
  #expanded = false;
@@ -28,19 +28,27 @@ export class SkillInvocationMessageComponent extends Box {
28
28
  }
29
29
  #updateDisplay() {
30
30
  this.clear();
31
+ const content = new Container();
31
32
  if (this.#expanded) {
32
33
  const label = piTheme().fg("customMessageLabel", "\x1b[1m[skill]\x1b[22m");
33
- this.addChild(new Text(label, 0, 0));
34
+ content.addChild(new Text(label, 0, 0));
34
35
  const header = `**${this.skillBlock.name}**\n\n`;
35
- this.addChild(new Markdown(header + this.skillBlock.content, 0, 0, this.markdownTheme, {
36
+ content.addChild(new Markdown(header + this.skillBlock.content, 0, 0, this.markdownTheme, {
36
37
  color: text => piTheme().fg("customMessageText", text),
37
38
  }));
38
- return;
39
39
  }
40
- const expandKey = getKeybindings().getKeys("app.tools.expand")[0] ?? "";
41
- const line = piTheme().fg("customMessageLabel", "\x1b[1m[skill]\x1b[22m ")
42
- + piTheme().fg("customMessageText", this.skillBlock.name)
43
- + piTheme().fg("dim", ` (${expandKey} to expand)`);
44
- this.addChild(new Text(line, 0, 0));
40
+ else {
41
+ const expandKey = getKeybindings().getKeys("app.tools.expand")[0] ?? "";
42
+ const line = piTheme().fg("customMessageLabel", "\x1b[1m[skill]\x1b[22m ")
43
+ + piTheme().fg("customMessageText", this.skillBlock.name)
44
+ + piTheme().fg("dim", ` (${expandKey} to expand)`);
45
+ content.addChild(new Text(line, 0, 0));
46
+ }
47
+ this.addChild(new MouseRegion(content, event => {
48
+ if (event.type !== "click" || event.button !== "left")
49
+ return undefined;
50
+ this.setExpanded(!this.#expanded);
51
+ return { handled: true };
52
+ }));
45
53
  }
46
54
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/status-indicator.ts.
4
4
  * Modifications: Mechanical source port with public package-root keybinding, Loader, and owned
5
5
  * theme/countdown imports plus ECMAScript private fields.
@@ -10,12 +10,12 @@ export type StatusIndicatorKind = "working" | "retry" | "compaction" | "branchSu
10
10
  export declare class StatusIndicator extends Loader {
11
11
  readonly kind: StatusIndicatorKind;
12
12
  constructor(kind: StatusIndicatorKind, ui: TUI, spinnerColorFn: (str: string) => string, messageColorFn: (str: string) => string, message: string, indicator?: LoaderIndicatorOptions);
13
+ renderInBorder(width: number): string;
14
+ renderSpinnerInBorder(width: number): string;
13
15
  dispose(): void;
14
16
  }
15
17
  export declare class WorkingStatusIndicator extends StatusIndicator {
16
18
  constructor(ui: TUI, message: string, indicator?: LoaderIndicatorOptions, colorFn?: (text: string) => string);
17
- renderInBorder(width: number): string;
18
- renderSpinnerInBorder(width: number): string;
19
19
  }
20
20
  export declare class RetryStatusIndicator extends StatusIndicator {
21
21
  #private;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/status-indicator.ts.
4
4
  * Modifications: Mechanical source port with public package-root keybinding, Loader, and owned
5
5
  * theme/countdown imports plus ECMAScript private fields.
@@ -15,6 +15,13 @@ export class StatusIndicator extends Loader {
15
15
  super(ui, spinnerColorFn, messageColorFn, message, indicator);
16
16
  this.kind = kind;
17
17
  }
18
+ renderInBorder(width) {
19
+ const line = super.render(width + 2)[1] ?? "";
20
+ return truncateToWidth(line.startsWith(" ") ? line.slice(1).trimEnd() : line.trimEnd(), width, "");
21
+ }
22
+ renderSpinnerInBorder(width) {
23
+ return truncateToWidth(this.getRenderedIndicator(), width, "");
24
+ }
18
25
  dispose() {
19
26
  this.stop();
20
27
  }
@@ -23,13 +30,6 @@ export class WorkingStatusIndicator extends StatusIndicator {
23
30
  constructor(ui, message, indicator, colorFn) {
24
31
  super("working", ui, colorFn ?? (spinner => piTheme().fg("accent", spinner)), colorFn ?? (text => piTheme().fg("muted", text)), message, indicator);
25
32
  }
26
- renderInBorder(width) {
27
- const line = super.render(width + 2)[1] ?? "";
28
- return truncateToWidth(line.startsWith(" ") ? line.slice(1).trimEnd() : line.trimEnd(), width, "");
29
- }
30
- renderSpinnerInBorder(width) {
31
- return truncateToWidth(this.getRenderedIndicator(), width, "");
32
- }
33
33
  }
34
34
  export class RetryStatusIndicator extends StatusIndicator {
35
35
  #countdown;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/tool-execution.ts.
4
4
  * Modifications: Retain pinned shell and actual public tool-definition renderers. Replace private
5
5
  * index-keyed image conversion with current-source ownership, serial conversion, visible fallback, and
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/tree-selector.ts.
4
4
  * Modifications: Source-synchronized tree selector port: preserve filtering, folding, labels, copying,
5
5
  * tree navigation, key hints, focus, and viewport behavior while remapping public types/components
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/tree-selector.ts.
4
4
  * Modifications: Source-synchronized tree selector port: preserve filtering, folding, labels, copying,
5
5
  * tree navigation, key hints, focus, and viewport behavior while remapping public types/components
@@ -264,6 +264,8 @@ class TreeList {
264
264
  const searchTokens = this.searchQuery.toLowerCase().split(/\s+/).filter(Boolean);
265
265
  this.filteredNodes = this.flatNodes.filter((flatNode) => {
266
266
  const entry = flatNode.node.entry;
267
+ if (entry.type === "usage")
268
+ return false;
267
269
  const isCurrentLeaf = entry.id === this.currentLeafId;
268
270
  // Skip assistant messages with only tool calls (no text) unless error/aborted
269
271
  // Always show current leaf so active position is visible
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/components/trust-selector.ts.
4
4
  * Modifications: Mechanical source-synchronized trust selector port with injected public
5
5
  * ProjectTrustStore-derived options and remapped owned theme imports.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/external-editor.ts.
4
4
  * Modifications: Mechanical port: retain temporary prompt file, asynchronous inherited-stdio editor
5
5
  * process, completion readback, and best-effort cleanup behind the owned extension-editor component.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/components/editor.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state with the user-approved numeric-only
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/components/editor.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state with the user-approved numeric-only
@@ -11,7 +11,7 @@ import { getKeybindings, matchesKey, CURSOR_MARKER, sliceByColumn, truncateToWid
11
11
  import { decodePrintableKey } from "./printable-key.js";
12
12
  import { KillRing } from "./kill-ring.js";
13
13
  import { UndoStack } from "./undo-stack.js";
14
- import { cjkBreakRegex, getGraphemeSegmenter, getWordSegmenter, isWhitespaceChar } from "./text-helpers.js";
14
+ import { autocompleteBoundaryRegex, autocompleteSeparatorRegex, cjkBreakRegex, getGraphemeSegmenter, getWordSegmenter, isWhitespaceChar } from "./text-helpers.js";
15
15
  import { findWordBackward, findWordForward } from "./word-navigation.js";
16
16
  const graphemeSegmenter = getGraphemeSegmenter();
17
17
  const wordSegmenter = getWordSegmenter();
@@ -175,15 +175,17 @@ const SLASH_COMMAND_SELECT_LIST_LAYOUT = {
175
175
  };
176
176
  const ATTACHMENT_AUTOCOMPLETE_DEBOUNCE_MS = 20;
177
177
  const DEFAULT_AUTOCOMPLETE_TRIGGER_CHARACTERS = ["@", "#"];
178
+ // Unquoted completions end at whitespace or CJK punctuation; quoted paths may contain either.
179
+ const unquotedAutocompleteSuffixRegex = new RegExp(`(?:(?!${autocompleteSeparatorRegex.source}).)*`, "u");
178
180
  function escapeCharacterClass(value) {
179
181
  return value.replace(/[\\^$.*+?()[\]{}|-]/g, "\\$&");
180
182
  }
181
183
  function buildTriggerPattern(triggerCharacters) {
182
- return new RegExp(`(?:^|[\\s])[${triggerCharacters.map(escapeCharacterClass).join("")}][^\\s]*$`);
184
+ return new RegExp(`${autocompleteBoundaryRegex.source}(?:@"[^"]*|[${triggerCharacters.map(escapeCharacterClass).join("")}]${unquotedAutocompleteSuffixRegex.source})$`, "u");
183
185
  }
184
186
  function buildDebouncePattern(triggerCharacters) {
185
187
  const escapedWithoutAt = triggerCharacters.filter((character) => character !== "@").map(escapeCharacterClass);
186
- return new RegExp(`(?:^|[ \\t])(?:@(?:"[^"]*|[^\\s]*)|[${escapedWithoutAt.join("")}][^\\s]*)$`);
188
+ return new RegExp(`${autocompleteBoundaryRegex.source}(?:@(?:"[^"]*|${unquotedAutocompleteSuffixRegex.source})|[${escapedWithoutAt.join("")}]${unquotedAutocompleteSuffixRegex.source})$`, "u");
187
189
  }
188
190
  function createScrollBorder(direction, hiddenLineCount, width) {
189
191
  const availableWidth = Math.max(0, width);
@@ -1125,13 +1127,12 @@ export class HistoryEditorCore {
1125
1127
  else if (this.autocompleteTriggerCharacters.includes(char)) {
1126
1128
  const currentLine = this.state.lines[this.state.cursorLine] || "";
1127
1129
  const textBeforeCursor = currentLine.slice(0, this.state.cursorCol);
1128
- const charBeforeSymbol = textBeforeCursor[textBeforeCursor.length - 2];
1129
- if (textBeforeCursor.length === 1 || charBeforeSymbol === " " || charBeforeSymbol === "\t") {
1130
+ if (this.autocompleteTriggerPattern.test(textBeforeCursor)) {
1130
1131
  this.tryTriggerAutocomplete();
1131
1132
  }
1132
1133
  }
1133
1134
  // Also auto-trigger when typing letters in a slash command or symbol completion context
1134
- else if (/[a-zA-Z0-9.\-_]/.test(char)) {
1135
+ else if (/[a-zA-Z0-9.\-_]/.test(char) || cjkBreakRegex.test(char)) {
1135
1136
  const currentLine = this.state.lines[this.state.cursorLine] || "";
1136
1137
  const textBeforeCursor = currentLine.slice(0, this.state.cursorCol);
1137
1138
  // Check if we're in a slash command (with or without space for arguments)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/kill-ring.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/kill-ring.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/keys.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
@@ -7,6 +7,9 @@ export declare function getGraphemeSegmenter(): Intl.Segmenter;
7
7
  */
8
8
  export declare function getWordSegmenter(): Intl.Segmenter;
9
9
  export declare const cjkBreakRegex: RegExp;
10
+ export declare const cjkPunctuationRegex: RegExp;
11
+ export declare const autocompleteSeparatorRegex: RegExp;
12
+ export declare const autocompleteBoundaryRegex: RegExp;
10
13
  export declare const PUNCTUATION_REGEX: RegExp;
11
14
  /**
12
15
  * Check if a character is whitespace.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/utils.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
@@ -22,6 +22,9 @@ export function getWordSegmenter() {
22
22
  return wordSegmenter;
23
23
  }
24
24
  export const cjkBreakRegex = /[\p{Script_Extensions=Han}\p{Script_Extensions=Hiragana}\p{Script_Extensions=Katakana}\p{Script_Extensions=Hangul}\p{Script_Extensions=Bopomofo}]/u;
25
+ export const cjkPunctuationRegex = new RegExp(`(?:(?=\\p{Punctuation})${cjkBreakRegex.source}|[,.:;!?()[]{}“”‘’…—])`, "u");
26
+ export const autocompleteSeparatorRegex = new RegExp(`(?:\\s|${cjkPunctuationRegex.source})`, "u");
27
+ export const autocompleteBoundaryRegex = new RegExp(`(?:^|${autocompleteSeparatorRegex.source})`, "u");
25
28
  export const PUNCTUATION_REGEX = /[(){}[\]<>.,;:'"!?+\-=*/\\|&%^$#@~`]/;
26
29
  /**
27
30
  * Check if a character is whitespace.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/undo-stack.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/undo-stack.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-tui 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-tui 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/tui/src/word-navigation.ts.
4
4
  * Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
5
5
  * types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provenance: @earendil-works/pi-coding-agent 0.85.1 (MIT), commit d981de1229ef899957bbe968bc8dcda02a21f477,
2
+ * Provenance: @earendil-works/pi-coding-agent 0.86.1 (MIT), commit 13cbf77df2396303013a41646bcfa77b4271ae56,
3
3
  * packages/coding-agent/src/modes/interactive/model-search.ts.
4
4
  * Modifications: Mechanical source-synchronized port preserving pinned model search terms for stateful
5
5
  * scoped-model filtering.