@oh-my-pi/pi-coding-agent 15.7.2 → 15.7.5

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 (188) hide show
  1. package/CHANGELOG.md +114 -6
  2. package/dist/types/cli/args.d.ts +1 -1
  3. package/dist/types/cli/extension-flags.d.ts +36 -0
  4. package/dist/types/config/config-file.d.ts +4 -0
  5. package/dist/types/config/file-lock.d.ts +23 -0
  6. package/dist/types/config/keybindings.d.ts +2 -1
  7. package/dist/types/config/model-registry.d.ts +6 -0
  8. package/dist/types/config/settings-schema.d.ts +69 -65
  9. package/dist/types/edit/hashline/diff.d.ts +3 -3
  10. package/dist/types/eval/__tests__/agent-bridge.test.d.ts +1 -0
  11. package/dist/types/eval/__tests__/budget-bridge.test.d.ts +1 -0
  12. package/dist/types/eval/__tests__/idle-timeout.test.d.ts +1 -0
  13. package/dist/types/eval/agent-bridge.d.ts +25 -0
  14. package/dist/types/eval/backend.d.ts +17 -2
  15. package/dist/types/eval/budget-bridge.d.ts +29 -0
  16. package/dist/types/eval/idle-timeout.d.ts +28 -0
  17. package/dist/types/eval/js/executor.d.ts +8 -0
  18. package/dist/types/eval/js/tool-bridge.d.ts +2 -1
  19. package/dist/types/eval/py/executor.d.ts +13 -0
  20. package/dist/types/exec/bash-executor.d.ts +1 -0
  21. package/dist/types/extensibility/custom-tools/types.d.ts +2 -2
  22. package/dist/types/extensibility/extensions/runner.d.ts +7 -0
  23. package/dist/types/extensibility/plugins/git-url.d.ts +11 -1
  24. package/dist/types/extensibility/plugins/manager.d.ts +12 -1
  25. package/dist/types/extensibility/shared-events.d.ts +2 -2
  26. package/dist/types/internal-urls/local-protocol.d.ts +19 -9
  27. package/dist/types/internal-urls/types.d.ts +14 -0
  28. package/dist/types/lsp/client.d.ts +3 -0
  29. package/dist/types/mcp/manager.d.ts +14 -5
  30. package/dist/types/memory-backend/index.d.ts +1 -1
  31. package/dist/types/memory-backend/resolve.d.ts +1 -1
  32. package/dist/types/memory-backend/types.d.ts +3 -3
  33. package/dist/types/mnemopi/backend.d.ts +4 -0
  34. package/dist/types/mnemopi/config.d.ts +29 -0
  35. package/dist/types/mnemopi/state.d.ts +72 -0
  36. package/dist/types/modes/components/custom-editor.d.ts +2 -2
  37. package/dist/types/modes/components/omfg-panel.d.ts +19 -0
  38. package/dist/types/modes/controllers/command-controller.d.ts +6 -0
  39. package/dist/types/modes/controllers/input-controller.d.ts +1 -3
  40. package/dist/types/modes/controllers/omfg-controller.d.ts +10 -0
  41. package/dist/types/modes/controllers/omfg-rule.d.ts +26 -0
  42. package/dist/types/modes/gradient-highlight.d.ts +5 -1
  43. package/dist/types/modes/interactive-mode.d.ts +7 -3
  44. package/dist/types/modes/magic-keywords.d.ts +14 -0
  45. package/dist/types/modes/markdown-prose.d.ts +27 -0
  46. package/dist/types/modes/orchestrate.d.ts +7 -2
  47. package/dist/types/modes/shared.d.ts +1 -1
  48. package/dist/types/modes/turn-budget.d.ts +18 -0
  49. package/dist/types/modes/types.d.ts +7 -3
  50. package/dist/types/modes/ultrathink.d.ts +7 -2
  51. package/dist/types/modes/workflow.d.ts +15 -0
  52. package/dist/types/sdk.d.ts +13 -3
  53. package/dist/types/session/agent-session.d.ts +36 -17
  54. package/dist/types/session/session-manager.d.ts +18 -0
  55. package/dist/types/session/session-storage.d.ts +6 -0
  56. package/dist/types/session/shake-types.d.ts +24 -0
  57. package/dist/types/task/executor.d.ts +2 -2
  58. package/dist/types/task/repair-args.d.ts +52 -0
  59. package/dist/types/tiny/models.d.ts +1 -1
  60. package/dist/types/tiny/title-client.d.ts +28 -2
  61. package/dist/types/tiny/title-protocol.d.ts +8 -5
  62. package/dist/types/tools/find.d.ts +1 -1
  63. package/dist/types/tools/index.d.ts +19 -3
  64. package/dist/types/tools/memory-edit.d.ts +1 -1
  65. package/dist/types/tools/path-utils.d.ts +7 -0
  66. package/dist/types/tui/output-block.d.ts +7 -7
  67. package/examples/sdk/09-api-keys-and-oauth.ts +2 -2
  68. package/package.json +10 -10
  69. package/scripts/build-binary.ts +0 -1
  70. package/src/autoresearch/tools/run-experiment.ts +45 -113
  71. package/src/cli/args.ts +39 -16
  72. package/src/cli/extension-flags.ts +48 -0
  73. package/src/cli/plugin-cli.ts +11 -2
  74. package/src/cli.ts +59 -0
  75. package/src/config/config-file.ts +98 -13
  76. package/src/config/file-lock.ts +60 -17
  77. package/src/config/keybindings.ts +78 -27
  78. package/src/config/model-registry.ts +7 -1
  79. package/src/config/settings-schema.ts +73 -67
  80. package/src/config/settings.ts +22 -0
  81. package/src/edit/hashline/diff.ts +81 -24
  82. package/src/edit/renderer.ts +16 -12
  83. package/src/eval/__tests__/agent-bridge.test.ts +433 -0
  84. package/src/eval/__tests__/budget-bridge.test.ts +69 -0
  85. package/src/eval/__tests__/idle-timeout.test.ts +66 -0
  86. package/src/eval/__tests__/shared-executors.test.ts +21 -0
  87. package/src/eval/agent-bridge.ts +295 -0
  88. package/src/eval/backend.ts +17 -2
  89. package/src/eval/budget-bridge.ts +48 -0
  90. package/src/eval/idle-timeout.ts +80 -0
  91. package/src/eval/js/executor.ts +35 -7
  92. package/src/eval/js/index.ts +2 -1
  93. package/src/eval/js/shared/prelude.txt +85 -1
  94. package/src/eval/js/tool-bridge.ts +9 -0
  95. package/src/eval/py/executor.ts +41 -14
  96. package/src/eval/py/index.ts +2 -1
  97. package/src/eval/py/prelude.py +132 -1
  98. package/src/exec/bash-executor.ts +2 -3
  99. package/src/extensibility/custom-tools/types.ts +2 -2
  100. package/src/extensibility/extensions/runner.ts +12 -2
  101. package/src/extensibility/plugins/git-url.ts +90 -4
  102. package/src/extensibility/plugins/manager.ts +103 -7
  103. package/src/extensibility/shared-events.ts +2 -2
  104. package/src/internal-urls/docs-index.generated.ts +88 -88
  105. package/src/internal-urls/local-protocol.ts +23 -11
  106. package/src/internal-urls/types.ts +15 -0
  107. package/src/lsp/client.ts +28 -5
  108. package/src/main.ts +44 -55
  109. package/src/mcp/manager.ts +87 -4
  110. package/src/memory-backend/index.ts +1 -1
  111. package/src/memory-backend/resolve.ts +3 -3
  112. package/src/memory-backend/types.ts +3 -3
  113. package/src/{mnemosyne → mnemopi}/backend.ts +70 -70
  114. package/src/{mnemosyne → mnemopi}/config.ts +36 -36
  115. package/src/{mnemosyne → mnemopi}/state.ts +67 -67
  116. package/src/modes/components/agent-dashboard.ts +6 -6
  117. package/src/modes/components/custom-editor.ts +4 -11
  118. package/src/modes/components/extensions/state-manager.ts +3 -4
  119. package/src/modes/components/footer.ts +8 -9
  120. package/src/modes/components/hook-selector.ts +86 -20
  121. package/src/modes/components/oauth-selector.ts +93 -21
  122. package/src/modes/components/omfg-panel.ts +141 -0
  123. package/src/modes/components/settings-defs.ts +2 -2
  124. package/src/modes/components/tips.txt +2 -1
  125. package/src/modes/components/tool-execution.ts +38 -19
  126. package/src/modes/components/tree-selector.ts +4 -3
  127. package/src/modes/components/user-message-selector.ts +94 -19
  128. package/src/modes/components/user-message.ts +8 -1
  129. package/src/modes/controllers/command-controller.ts +25 -0
  130. package/src/modes/controllers/event-controller.ts +68 -3
  131. package/src/modes/controllers/input-controller.ts +14 -11
  132. package/src/modes/controllers/mcp-command-controller.ts +1 -1
  133. package/src/modes/controllers/omfg-controller.ts +283 -0
  134. package/src/modes/controllers/omfg-rule.ts +647 -0
  135. package/src/modes/controllers/selector-controller.ts +1 -0
  136. package/src/modes/gradient-highlight.ts +23 -6
  137. package/src/modes/interactive-mode.ts +41 -7
  138. package/src/modes/magic-keywords.ts +20 -0
  139. package/src/modes/markdown-prose.ts +247 -0
  140. package/src/modes/orchestrate.ts +17 -11
  141. package/src/modes/shared.ts +3 -11
  142. package/src/modes/turn-budget.ts +31 -0
  143. package/src/modes/types.ts +7 -1
  144. package/src/modes/ultrathink.ts +16 -10
  145. package/src/modes/utils/hotkeys-markdown.ts +1 -1
  146. package/src/modes/workflow.ts +42 -0
  147. package/src/prompts/system/omfg-user.md +51 -0
  148. package/src/prompts/system/project-prompt.md +3 -2
  149. package/src/prompts/system/subagent-system-prompt.md +12 -8
  150. package/src/prompts/system/system-prompt.md +9 -6
  151. package/src/prompts/system/workflow-notice.md +70 -0
  152. package/src/prompts/tools/eval.md +13 -1
  153. package/src/prompts/tools/memory-edit.md +1 -1
  154. package/src/sdk.ts +63 -33
  155. package/src/session/agent-session.ts +290 -55
  156. package/src/session/session-manager.ts +32 -0
  157. package/src/session/session-storage.ts +68 -8
  158. package/src/session/shake-types.ts +43 -0
  159. package/src/slash-commands/builtin-registry.ts +39 -16
  160. package/src/task/executor.ts +17 -7
  161. package/src/task/index.ts +9 -8
  162. package/src/task/repair-args.ts +117 -0
  163. package/src/tiny/models.ts +2 -2
  164. package/src/tiny/title-client.ts +133 -43
  165. package/src/tiny/title-protocol.ts +10 -5
  166. package/src/tiny/worker.ts +3 -46
  167. package/src/tools/ast-edit.ts +3 -0
  168. package/src/tools/ast-grep.ts +3 -0
  169. package/src/tools/eval.ts +202 -26
  170. package/src/tools/find.ts +20 -6
  171. package/src/tools/gh.ts +1 -0
  172. package/src/tools/grouped-file-output.ts +9 -2
  173. package/src/tools/index.ts +17 -5
  174. package/src/tools/memory-edit.ts +4 -4
  175. package/src/tools/memory-recall.ts +5 -5
  176. package/src/tools/memory-reflect.ts +5 -5
  177. package/src/tools/memory-retain.ts +4 -4
  178. package/src/tools/path-utils.ts +13 -2
  179. package/src/tools/read.ts +1 -0
  180. package/src/tools/render-utils.ts +2 -1
  181. package/src/tools/search.ts +491 -76
  182. package/src/tui/output-block.ts +37 -75
  183. package/src/utils/git.ts +9 -3
  184. package/dist/types/mnemosyne/backend.d.ts +0 -4
  185. package/dist/types/mnemosyne/config.d.ts +0 -29
  186. package/dist/types/mnemosyne/state.d.ts +0 -72
  187. /package/dist/types/{mnemosyne → mnemopi}/index.d.ts +0 -0
  188. /package/src/{mnemosyne → mnemopi}/index.ts +0 -0
@@ -1298,12 +1298,12 @@ export declare const SETTINGS_SCHEMA: {
1298
1298
  };
1299
1299
  readonly "compaction.strategy": {
1300
1300
  readonly type: "enum";
1301
- readonly values: readonly ["context-full", "handoff", "off"];
1301
+ readonly values: readonly ["context-full", "handoff", "shake", "off"];
1302
1302
  readonly default: "context-full";
1303
1303
  readonly ui: {
1304
1304
  readonly tab: "context";
1305
1305
  readonly label: "Compaction Strategy";
1306
- readonly description: "Choose in-place context-full maintenance, auto-handoff, or disable auto maintenance (off)";
1306
+ readonly description: "Choose in-place context-full maintenance, auto-handoff, surgical shake (drop heavy content), or disable auto maintenance (off)";
1307
1307
  readonly options: readonly [{
1308
1308
  readonly value: "context-full";
1309
1309
  readonly label: "Context-full";
@@ -1312,6 +1312,10 @@ export declare const SETTINGS_SCHEMA: {
1312
1312
  readonly value: "handoff";
1313
1313
  readonly label: "Handoff";
1314
1314
  readonly description: "Generate handoff and continue in a new session";
1315
+ }, {
1316
+ readonly value: "shake";
1317
+ readonly label: "Shake";
1318
+ readonly description: "Drop heavy content (tool results + large blocks) in place; recover via artifact";
1315
1319
  }, {
1316
1320
  readonly value: "off";
1317
1321
  readonly label: "Off";
@@ -1610,12 +1614,12 @@ export declare const SETTINGS_SCHEMA: {
1610
1614
  };
1611
1615
  readonly "memory.backend": {
1612
1616
  readonly type: "enum";
1613
- readonly values: readonly ["off", "local", "hindsight", "mnemosyne"];
1617
+ readonly values: readonly ["off", "local", "hindsight", "mnemopi"];
1614
1618
  readonly default: "off";
1615
1619
  readonly ui: {
1616
1620
  readonly tab: "memory";
1617
1621
  readonly label: "Memory Backend";
1618
- readonly description: "Off, local summary pipeline, Mnemosyne SQLite, or Hindsight remote memory";
1622
+ readonly description: "Off, local summary pipeline, Mnemopi SQLite, or Hindsight remote memory";
1619
1623
  readonly options: readonly [{
1620
1624
  readonly value: "off";
1621
1625
  readonly label: "Off";
@@ -1629,129 +1633,129 @@ export declare const SETTINGS_SCHEMA: {
1629
1633
  readonly label: "Hindsight";
1630
1634
  readonly description: "Vectorize Hindsight remote memory service";
1631
1635
  }, {
1632
- readonly value: "mnemosyne";
1633
- readonly label: "Mnemosyne";
1636
+ readonly value: "mnemopi";
1637
+ readonly label: "Mnemopi";
1634
1638
  readonly description: "Local SQLite recall/retain backend with optional embeddings";
1635
1639
  }];
1636
1640
  };
1637
1641
  };
1638
- readonly "mnemosyne.dbPath": {
1642
+ readonly "mnemopi.dbPath": {
1639
1643
  readonly type: "string";
1640
1644
  readonly default: undefined;
1641
1645
  readonly ui: {
1642
1646
  readonly tab: "memory";
1643
- readonly label: "Mnemosyne DB Path";
1647
+ readonly label: "Mnemopi DB Path";
1644
1648
  readonly description: "Optional SQLite DB path. Defaults to the agent memories directory.";
1645
- readonly condition: "mnemosyneActive";
1649
+ readonly condition: "mnemopiActive";
1646
1650
  };
1647
1651
  };
1648
- readonly "mnemosyne.bank": {
1652
+ readonly "mnemopi.bank": {
1649
1653
  readonly type: "string";
1650
1654
  readonly default: undefined;
1651
1655
  readonly ui: {
1652
1656
  readonly tab: "memory";
1653
- readonly label: "Mnemosyne Bank";
1657
+ readonly label: "Mnemopi Bank";
1654
1658
  readonly description: "Optional shared bank base name. Per-project modes derive project-local banks from it.";
1655
- readonly condition: "mnemosyneActive";
1659
+ readonly condition: "mnemopiActive";
1656
1660
  };
1657
1661
  };
1658
- readonly "mnemosyne.scoping": {
1662
+ readonly "mnemopi.scoping": {
1659
1663
  readonly type: "enum";
1660
1664
  readonly values: readonly ["global", "per-project", "per-project-tagged"];
1661
1665
  readonly default: "per-project";
1662
1666
  readonly ui: {
1663
1667
  readonly tab: "memory";
1664
- readonly label: "Mnemosyne Scoping";
1668
+ readonly label: "Mnemopi Scoping";
1665
1669
  readonly description: "global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = project-local writes plus global recall visibility";
1666
1670
  readonly options: readonly [{
1667
1671
  readonly value: "global";
1668
1672
  readonly label: "Global";
1669
- readonly description: "One shared Mnemosyne bank for every project";
1673
+ readonly description: "One shared Mnemopi bank for every project";
1670
1674
  }, {
1671
1675
  readonly value: "per-project";
1672
1676
  readonly label: "Per project";
1673
- readonly description: "Project-local Mnemosyne bank per cwd basename";
1677
+ readonly description: "Project-local Mnemopi bank per cwd basename";
1674
1678
  }, {
1675
1679
  readonly value: "per-project-tagged";
1676
1680
  readonly label: "Per project (tagged)";
1677
1681
  readonly description: "Write to a project-local bank but merge project + shared recall results";
1678
1682
  }];
1679
- readonly condition: "mnemosyneActive";
1683
+ readonly condition: "mnemopiActive";
1680
1684
  };
1681
1685
  };
1682
- readonly "mnemosyne.autoRecall": {
1686
+ readonly "mnemopi.autoRecall": {
1683
1687
  readonly type: "boolean";
1684
1688
  readonly default: true;
1685
1689
  readonly ui: {
1686
1690
  readonly tab: "memory";
1687
- readonly label: "Mnemosyne Auto Recall";
1691
+ readonly label: "Mnemopi Auto Recall";
1688
1692
  readonly description: "Recall local memories into the first turn of each session";
1689
- readonly condition: "mnemosyneActive";
1693
+ readonly condition: "mnemopiActive";
1690
1694
  };
1691
1695
  };
1692
- readonly "mnemosyne.autoRetain": {
1696
+ readonly "mnemopi.autoRetain": {
1693
1697
  readonly type: "boolean";
1694
1698
  readonly default: true;
1695
1699
  readonly ui: {
1696
1700
  readonly tab: "memory";
1697
- readonly label: "Mnemosyne Auto Retain";
1698
- readonly description: "Retain completed conversation turns into local Mnemosyne memory";
1699
- readonly condition: "mnemosyneActive";
1701
+ readonly label: "Mnemopi Auto Retain";
1702
+ readonly description: "Retain completed conversation turns into local Mnemopi memory";
1703
+ readonly condition: "mnemopiActive";
1700
1704
  };
1701
1705
  };
1702
- readonly "mnemosyne.noEmbeddings": {
1706
+ readonly "mnemopi.noEmbeddings": {
1703
1707
  readonly type: "boolean";
1704
1708
  readonly default: false;
1705
1709
  readonly ui: {
1706
1710
  readonly tab: "memory";
1707
- readonly label: "Mnemosyne Disable Embeddings";
1711
+ readonly label: "Mnemopi Disable Embeddings";
1708
1712
  readonly description: "Force deterministic FTS-only recall instead of vector embeddings";
1709
- readonly condition: "mnemosyneActive";
1713
+ readonly condition: "mnemopiActive";
1710
1714
  };
1711
1715
  };
1712
- readonly "mnemosyne.embeddingModel": {
1716
+ readonly "mnemopi.embeddingModel": {
1713
1717
  readonly type: "string";
1714
1718
  readonly default: undefined;
1715
1719
  readonly ui: {
1716
1720
  readonly tab: "memory";
1717
- readonly label: "Mnemosyne Embedding Model";
1718
- readonly description: "Optional embedding model override passed to Mnemosyne";
1719
- readonly condition: "mnemosyneActive";
1721
+ readonly label: "Mnemopi Embedding Model";
1722
+ readonly description: "Optional embedding model override passed to Mnemopi";
1723
+ readonly condition: "mnemopiActive";
1720
1724
  };
1721
1725
  };
1722
- readonly "mnemosyne.embeddingApiUrl": {
1726
+ readonly "mnemopi.embeddingApiUrl": {
1723
1727
  readonly type: "string";
1724
1728
  readonly default: undefined;
1725
1729
  readonly ui: {
1726
1730
  readonly tab: "memory";
1727
- readonly label: "Mnemosyne Embedding API URL";
1728
- readonly description: "Optional OpenAI-compatible embedding endpoint passed to Mnemosyne";
1729
- readonly condition: "mnemosyneActive";
1731
+ readonly label: "Mnemopi Embedding API URL";
1732
+ readonly description: "Optional OpenAI-compatible embedding endpoint passed to Mnemopi";
1733
+ readonly condition: "mnemopiActive";
1730
1734
  };
1731
1735
  };
1732
- readonly "mnemosyne.embeddingApiKey": {
1736
+ readonly "mnemopi.embeddingApiKey": {
1733
1737
  readonly type: "string";
1734
1738
  readonly default: undefined;
1735
1739
  readonly ui: {
1736
1740
  readonly tab: "memory";
1737
- readonly label: "Mnemosyne Embedding API Key";
1738
- readonly description: "Optional embedding API key passed to Mnemosyne";
1739
- readonly condition: "mnemosyneActive";
1741
+ readonly label: "Mnemopi Embedding API Key";
1742
+ readonly description: "Optional embedding API key passed to Mnemopi";
1743
+ readonly condition: "mnemopiActive";
1740
1744
  };
1741
1745
  };
1742
- readonly "mnemosyne.llmMode": {
1746
+ readonly "mnemopi.llmMode": {
1743
1747
  readonly type: "enum";
1744
1748
  readonly values: readonly ["none", "smol", "remote"];
1745
1749
  readonly default: "smol";
1746
1750
  readonly ui: {
1747
1751
  readonly tab: "memory";
1748
- readonly label: "Mnemosyne LLM Mode";
1752
+ readonly label: "Mnemopi LLM Mode";
1749
1753
  readonly description: "Use no LLM, the configured smol model, or a remote OpenAI-compatible endpoint";
1750
- readonly condition: "mnemosyneActive";
1754
+ readonly condition: "mnemopiActive";
1751
1755
  readonly options: readonly [{
1752
1756
  readonly value: "none";
1753
1757
  readonly label: "None";
1754
- readonly description: "Disable Mnemosyne LLM-backed extraction";
1758
+ readonly description: "Disable Mnemopi LLM-backed extraction";
1755
1759
  }, {
1756
1760
  readonly value: "smol";
1757
1761
  readonly label: "Smol";
@@ -1759,61 +1763,61 @@ export declare const SETTINGS_SCHEMA: {
1759
1763
  }, {
1760
1764
  readonly value: "remote";
1761
1765
  readonly label: "Remote";
1762
- readonly description: "Use the Mnemosyne remote LLM settings below";
1766
+ readonly description: "Use the Mnemopi remote LLM settings below";
1763
1767
  }];
1764
1768
  };
1765
1769
  };
1766
- readonly "mnemosyne.llmBaseUrl": {
1770
+ readonly "mnemopi.llmBaseUrl": {
1767
1771
  readonly type: "string";
1768
1772
  readonly default: undefined;
1769
1773
  readonly ui: {
1770
1774
  readonly tab: "memory";
1771
- readonly label: "Mnemosyne LLM Base URL";
1772
- readonly description: "Optional OpenAI-compatible LLM endpoint for Mnemosyne remote mode";
1773
- readonly condition: "mnemosyneActive";
1775
+ readonly label: "Mnemopi LLM Base URL";
1776
+ readonly description: "Optional OpenAI-compatible LLM endpoint for Mnemopi remote mode";
1777
+ readonly condition: "mnemopiActive";
1774
1778
  };
1775
1779
  };
1776
- readonly "mnemosyne.llmApiKey": {
1780
+ readonly "mnemopi.llmApiKey": {
1777
1781
  readonly type: "string";
1778
1782
  readonly default: undefined;
1779
1783
  readonly ui: {
1780
1784
  readonly tab: "memory";
1781
- readonly label: "Mnemosyne LLM API Key";
1782
- readonly description: "Optional LLM API key for Mnemosyne remote mode";
1783
- readonly condition: "mnemosyneActive";
1785
+ readonly label: "Mnemopi LLM API Key";
1786
+ readonly description: "Optional LLM API key for Mnemopi remote mode";
1787
+ readonly condition: "mnemopiActive";
1784
1788
  };
1785
1789
  };
1786
- readonly "mnemosyne.llmModel": {
1790
+ readonly "mnemopi.llmModel": {
1787
1791
  readonly type: "string";
1788
1792
  readonly default: undefined;
1789
1793
  readonly ui: {
1790
1794
  readonly tab: "memory";
1791
- readonly label: "Mnemosyne LLM Model";
1792
- readonly description: "Optional LLM model name for Mnemosyne remote mode";
1793
- readonly condition: "mnemosyneActive";
1795
+ readonly label: "Mnemopi LLM Model";
1796
+ readonly description: "Optional LLM model name for Mnemopi remote mode";
1797
+ readonly condition: "mnemopiActive";
1794
1798
  };
1795
1799
  };
1796
- readonly "mnemosyne.retainEveryNTurns": {
1800
+ readonly "mnemopi.retainEveryNTurns": {
1797
1801
  readonly type: "number";
1798
1802
  readonly default: 4;
1799
1803
  };
1800
- readonly "mnemosyne.recallLimit": {
1804
+ readonly "mnemopi.recallLimit": {
1801
1805
  readonly type: "number";
1802
1806
  readonly default: 8;
1803
1807
  };
1804
- readonly "mnemosyne.recallContextTurns": {
1808
+ readonly "mnemopi.recallContextTurns": {
1805
1809
  readonly type: "number";
1806
1810
  readonly default: 3;
1807
1811
  };
1808
- readonly "mnemosyne.recallMaxQueryChars": {
1812
+ readonly "mnemopi.recallMaxQueryChars": {
1809
1813
  readonly type: "number";
1810
1814
  readonly default: 4000;
1811
1815
  };
1812
- readonly "mnemosyne.injectionTokenLimit": {
1816
+ readonly "mnemopi.injectionTokenLimit": {
1813
1817
  readonly type: "number";
1814
1818
  readonly default: 5000;
1815
1819
  };
1816
- readonly "mnemosyne.debug": {
1820
+ readonly "mnemopi.debug": {
1817
1821
  readonly type: "boolean";
1818
1822
  readonly default: false;
1819
1823
  };
@@ -3519,8 +3523,8 @@ export declare const SETTINGS_SCHEMA: {
3519
3523
  readonly ui: {
3520
3524
  readonly tab: "memory";
3521
3525
  readonly label: "Memory Model";
3522
- readonly description: "Mnemosyne LLM for fact extraction + consolidation: online (smol/remote) by default, or a local on-device model";
3523
- readonly condition: "mnemosyneActive";
3526
+ readonly description: "Mnemopi LLM for fact extraction + consolidation: online (smol/remote) by default, or a local on-device model";
3527
+ readonly condition: "mnemopiActive";
3524
3528
  readonly options: ({
3525
3529
  value: "online";
3526
3530
  label: string;
@@ -3845,7 +3849,7 @@ export type StatusLineSeparatorStyle = SettingValue<"statusLine.separator">;
3845
3849
  export type TreeFilterMode = SettingValue<"treeFilterMode">;
3846
3850
  export interface CompactionSettings {
3847
3851
  enabled: boolean;
3848
- strategy: "context-full" | "handoff" | "off";
3852
+ strategy: "context-full" | "handoff" | "shake" | "off";
3849
3853
  thresholdPercent: number;
3850
3854
  thresholdTokens: number;
3851
3855
  reserveTokens: number;
@@ -5,9 +5,9 @@
5
5
  * pair to {@link generateDiffString} so the renderer can show the diff
6
6
  * while the tool call is still streaming.
7
7
  *
8
- * Validation is intentionally light: only the section snapshot tag is checked
9
- * (so the preview goes red when anchors are stale), no plan-mode guards
10
- * and no auto-generated-file refusal those belong on the write path.
8
+ * Uses the same snapshot-tag semantics as the apply path: a live content-hash
9
+ * match is accepted even when the tag was minted by a source that did not keep
10
+ * history, and stale tags recover through the session snapshot store when possible.
11
11
  */
12
12
  import { type PatchSection, type SnapshotStore } from "@oh-my-pi/hashline";
13
13
  export interface HashlineDiffOptions {
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { ToolSession } from "../tools";
2
+ import type { JsStatusEvent } from "./js/shared/types";
3
+ import "../tools/review";
4
+ /** Synthetic bridge name reserved for the `agent()` helper across both runtimes. */
5
+ export declare const EVAL_AGENT_BRIDGE_NAME = "__agent__";
6
+ /** Hard recursion limit for eval-driven subagents. */
7
+ export declare const EVAL_AGENT_MAX_DEPTH = 3;
8
+ export interface EvalAgentBridgeOptions {
9
+ session: ToolSession;
10
+ signal?: AbortSignal;
11
+ emitStatus?: (event: JsStatusEvent) => void;
12
+ }
13
+ export interface EvalAgentResult {
14
+ text: string;
15
+ details: {
16
+ agent: string;
17
+ id: string;
18
+ model?: string | string[];
19
+ structured: boolean;
20
+ };
21
+ }
22
+ /**
23
+ * Run a single subagent on behalf of an eval cell's `agent()` call.
24
+ */
25
+ export declare function runEvalAgent(args: unknown, options: EvalAgentBridgeOptions): Promise<EvalAgentResult>;
@@ -1,5 +1,5 @@
1
1
  import type { ToolSession } from "../tools";
2
- import type { EvalDisplayOutput, EvalLanguage } from "./types";
2
+ import type { EvalDisplayOutput, EvalLanguage, EvalStatusEvent } from "./types";
3
3
  /** Per-cell execute() options. */
4
4
  export interface ExecutorBackendExecOptions {
5
5
  cwd: string;
@@ -8,11 +8,26 @@ export interface ExecutorBackendExecOptions {
8
8
  kernelOwnerId: string | undefined;
9
9
  signal?: AbortSignal;
10
10
  session: ToolSession;
11
- deadlineMs: number;
11
+ /**
12
+ * Inactivity budget in milliseconds (the cell's `timeout`). Cancellation is
13
+ * driven entirely by `signal`, which the eval tool arms as an idle watchdog
14
+ * that fires a `TimeoutError` reason after this much time with no progress
15
+ * (status) events. Backends use this value only for timeout-annotation text
16
+ * and as cold-start headroom; they MUST NOT derive a competing wall-clock
17
+ * timer from it.
18
+ */
19
+ idleTimeoutMs: number;
12
20
  reset: boolean;
13
21
  artifactPath: string | undefined;
14
22
  artifactId: string | undefined;
15
23
  onChunk: (chunk: string) => void;
24
+ /**
25
+ * Live status events (read/write/agent/…) delivered as they are emitted,
26
+ * before the cell finishes. The same events are also returned in
27
+ * `displayOutputs`; this channel exists so callers can stream long-running
28
+ * progress (e.g. `agent()` subagents) into the UI mid-execution.
29
+ */
30
+ onStatus?: (event: EvalStatusEvent) => void;
16
31
  }
17
32
  /** Result returned by a backend's execute(). */
18
33
  export interface ExecutorBackendResult {
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Host-side handler for the eval `budget` helper.
3
+ *
4
+ * Reports the active token ceiling and amount spent so kernel helpers can
5
+ * compute remaining budget. Precedence: a `+Nk`/`+Nk!` per-turn directive (the
6
+ * user's immediate intent) wins; otherwise an active Goal Mode budget; otherwise
7
+ * no ceiling, with `spent` still reflecting this turn's output where available.
8
+ */
9
+ import type { ToolSession } from "../tools";
10
+ import type { JsStatusEvent } from "./js/shared/types";
11
+ /** Synthetic bridge name reserved for the `budget` helper across both runtimes. */
12
+ export declare const EVAL_BUDGET_BRIDGE_NAME = "__budget__";
13
+ export interface EvalBudgetBridgeOptions {
14
+ session: ToolSession;
15
+ signal?: AbortSignal;
16
+ emitStatus?: (event: JsStatusEvent) => void;
17
+ }
18
+ export interface EvalBudgetResult {
19
+ total: number | null;
20
+ spent: number;
21
+ /** Whether the ceiling is enforced (eval `agent()` throws past it) vs advisory. */
22
+ hard: boolean;
23
+ }
24
+ /**
25
+ * Resolve the current token budget snapshot for an eval cell's `budget` helper.
26
+ * The returned object is JSON-passed verbatim by the bridge transport; kernel
27
+ * helpers read `.total`/`.spent`/`.hard` directly.
28
+ */
29
+ export declare function runEvalBudget(_args: unknown, options: EvalBudgetBridgeOptions): Promise<EvalBudgetResult>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Inactivity watchdog for eval cells.
3
+ *
4
+ * A cell's `timeout` is treated as an *idle* budget rather than a hard
5
+ * wall-clock deadline: the watchdog aborts {@link signal} (with a
6
+ * `TimeoutError` reason, matching `AbortSignal.timeout`) only once `idleMs`
7
+ * elapses with no {@link bump}. Every progress signal re-arms it, so a
8
+ * long-running fanout that keeps reporting progress (e.g. `agent()` status
9
+ * updates, `log()`/`phase()`) never trips the timeout, while a genuinely
10
+ * stalled cell still gets interrupted.
11
+ *
12
+ * The timer self-reschedules instead of being torn down and recreated on every
13
+ * bump, so a high-frequency stream of bumps (sub-second agent progress) costs
14
+ * one timestamp write per event rather than churning a timer each time.
15
+ */
16
+ export declare class IdleTimeout {
17
+ #private;
18
+ constructor(idleMs: number);
19
+ /** Aborts with a `TimeoutError` reason once the inactivity budget is exhausted. */
20
+ get signal(): AbortSignal;
21
+ /** Configured inactivity budget in milliseconds. */
22
+ get idleMs(): number;
23
+ /** Record activity, pushing the inactivity deadline forward by `idleMs`. */
24
+ bump(): void;
25
+ /** Stop the watchdog. Safe to call multiple times. */
26
+ dispose(): void;
27
+ [Symbol.dispose](): void;
28
+ }
@@ -1,10 +1,18 @@
1
1
  import type { ToolSession } from "../../tools";
2
2
  import { type JsDisplayOutput } from "./context-manager";
3
+ import type { JsStatusEvent } from "./shared/types";
3
4
  export interface JsExecutorOptions {
4
5
  cwd?: string;
5
6
  timeoutMs?: number;
6
7
  deadlineMs?: number;
8
+ /**
9
+ * Inactivity budget (ms). Used for worker cold-start headroom and
10
+ * timeout-annotation text when the caller drives cancellation via an
11
+ * idle-aware `signal` instead of `deadlineMs`/`timeoutMs`. Never arms a timer.
12
+ */
13
+ idleTimeoutMs?: number;
7
14
  onChunk?: (chunk: string) => Promise<void> | void;
15
+ onStatus?: (event: JsStatusEvent) => void;
8
16
  signal?: AbortSignal;
9
17
  sessionId: string;
10
18
  reset?: boolean;
@@ -1,4 +1,5 @@
1
1
  import type { ToolSession } from "../../tools";
2
+ import { type EvalBudgetResult } from "../budget-bridge";
2
3
  import type { JsStatusEvent } from "./shared/types";
3
4
  export type { JsStatusEvent } from "./shared/types";
4
5
  interface ToolBridgeOptions {
@@ -6,7 +7,7 @@ interface ToolBridgeOptions {
6
7
  signal?: AbortSignal;
7
8
  emitStatus?: (event: JsStatusEvent) => void;
8
9
  }
9
- type ToolValue = string | {
10
+ type ToolValue = string | EvalBudgetResult | {
10
11
  text: string;
11
12
  details?: unknown;
12
13
  images?: Array<{
@@ -9,6 +9,12 @@ export interface PythonExecutorOptions {
9
9
  timeoutMs?: number;
10
10
  /** Absolute wall-clock deadline in milliseconds since epoch */
11
11
  deadlineMs?: number;
12
+ /**
13
+ * Inactivity budget (ms). Used only for timeout-annotation text when the
14
+ * caller drives cancellation via an idle-aware `signal` instead of a
15
+ * wall-clock `deadlineMs`/`timeoutMs`. Does not arm a timer.
16
+ */
17
+ idleTimeoutMs?: number;
12
18
  /** Callback for streaming output chunks (already sanitized) */
13
19
  onChunk?: (chunk: string) => Promise<void> | void;
14
20
  /** AbortSignal for cancellation */
@@ -41,6 +47,13 @@ export interface PythonExecutorOptions {
41
47
  toolSession?: ToolSession;
42
48
  /** Callback for status events emitted by tool bridge invocations. */
43
49
  emitStatus?: (event: JsStatusEvent) => void;
50
+ /**
51
+ * Live status events streamed as they are emitted (both host-side bridge
52
+ * helpers like `agent()` and kernel-side `display`/`log`/`phase`). Mirrors
53
+ * what lands in `displayOutputs` so callers can render progress before the
54
+ * cell finishes.
55
+ */
56
+ onStatus?: (event: JsStatusEvent) => void;
44
57
  /** @internal Bridge session id, set by `executePython` before delegating. */
45
58
  bridgeSessionId?: string;
46
59
  /** @internal Bridge endpoint info, set by `executePython` before delegating. */
@@ -4,6 +4,7 @@ export interface BashExecutorOptions {
4
4
  cwd?: string;
5
5
  timeout?: number;
6
6
  onChunk?: (chunk: string) => void;
7
+ chunkThrottleMs?: number;
7
8
  signal?: AbortSignal;
8
9
  /** Session key suffix to isolate shell sessions per agent */
9
10
  sessionKey?: string;
@@ -86,10 +86,10 @@ export type CustomToolSessionEvent = {
86
86
  } | {
87
87
  reason: "auto_compaction_start";
88
88
  trigger: "threshold" | "overflow" | "idle" | "incomplete";
89
- action: "context-full" | "handoff";
89
+ action: "context-full" | "handoff" | "shake";
90
90
  } | {
91
91
  reason: "auto_compaction_end";
92
- action: "context-full" | "handoff";
92
+ action: "context-full" | "handoff" | "shake";
93
93
  result: CompactionResult | undefined;
94
94
  aborted: boolean;
95
95
  willRetry: boolean;
@@ -83,6 +83,13 @@ export declare class ExtensionRunner {
83
83
  getExtensionPaths(): string[];
84
84
  /** Get all registered tools from all extensions. */
85
85
  getAllRegisteredTools(): RegisteredTool[];
86
+ /**
87
+ * Aggregate the registered CLI flags across a set of extensions (last write
88
+ * wins on name collision). Static so callers that need the flag set before a
89
+ * runner exists — e.g. the CLI resolving `@file`/flag args before session
90
+ * creation — share this exact logic instead of duplicating it.
91
+ */
92
+ static aggregateFlags(extensions: readonly Extension[]): Map<string, ExtensionFlag>;
86
93
  getFlags(): Map<string, ExtensionFlag>;
87
94
  getFlagValues(): Map<string, boolean | string>;
88
95
  setFlagValue(name: string, value: boolean | string): void;
@@ -19,10 +19,14 @@ export type GitSource = {
19
19
  * Parse git source into a GitSource.
20
20
  *
21
21
  * Rules:
22
- * - With `git:` prefix, accept shorthand forms.
22
+ * - Namespaced shorthand (`github:user/repo`, `gitlab:`, `bitbucket:`,
23
+ * `codeberg:`, `sourcehut:`/`srht:`) is accepted directly; installers should
24
+ * normalize entries that bun does not understand natively.
25
+ * - With `git:` prefix, accept generic shorthand forms.
23
26
  * - Without `git:` prefix, only accept explicit protocol URLs.
24
27
  *
25
28
  * Handles:
29
+ * - `github:user/repo[#ref]`-style namespaced shorthand
26
30
  * - `git:` prefixed URLs (`git:github.com/user/repo`)
27
31
  * - SSH SCP-like URLs (`git:git@github.com:user/repo`)
28
32
  * - HTTPS/HTTP/SSH/git protocol URLs
@@ -32,3 +36,9 @@ export type GitSource = {
32
36
  * Falls back to generic URL parsing for other hosts.
33
37
  */
34
38
  export declare function parseGitUrl(source: string): GitSource | null;
39
+ /**
40
+ * Returns true if the spec is parseable as a git source (protocol URL,
41
+ * scp-like SSH wrapped in `git:`, plain `git:` shorthand, or namespaced
42
+ * shorthand like `github:user/repo`). The inverse of "this is an npm spec".
43
+ */
44
+ export declare function isGitSpec(spec: string): boolean;
@@ -3,7 +3,18 @@ export declare class PluginManager {
3
3
  #private;
4
4
  constructor(cwd?: string);
5
5
  /**
6
- * Install a plugin from npm with optional feature selection.
6
+ * Install a plugin with optional feature selection.
7
+ *
8
+ * Accepts:
9
+ * - npm specs: `pkg`, `pkg@1.2.3`, `@scope/pkg`, `pkg[features]`
10
+ * - namespaced git shorthand: `github:user/repo[#ref]`, `gitlab:`, `bitbucket:`,
11
+ * `codeberg:`, `sourcehut:`/`srht:`
12
+ * - full git URLs: `https://github.com/user/repo`, `git@github.com:user/repo`,
13
+ * `ssh://…`, `git+https://…`
14
+ *
15
+ * For git specs the package name is not knowable from the spec, so the
16
+ * installer diffs `plugins/package.json` `dependencies` before and after
17
+ * to find the newly added key.
7
18
  *
8
19
  * @param specString - Package specifier with optional features: "pkg", "pkg[feat]", "pkg[*]", "pkg[]"
9
20
  * @param options - Install options
@@ -160,12 +160,12 @@ export interface TurnEndEvent {
160
160
  export interface AutoCompactionStartEvent {
161
161
  type: "auto_compaction_start";
162
162
  reason: "threshold" | "overflow" | "idle" | "incomplete";
163
- action: "context-full" | "handoff";
163
+ action: "context-full" | "handoff" | "shake";
164
164
  }
165
165
  /** Fired when auto-compaction ends */
166
166
  export interface AutoCompactionEndEvent {
167
167
  type: "auto_compaction_end";
168
- action: "context-full" | "handoff";
168
+ action: "context-full" | "handoff" | "shake";
169
169
  result: CompactionResult | undefined;
170
170
  aborted: boolean;
171
171
  willRetry: boolean;