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

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 (160) hide show
  1. package/CHANGELOG.md +75 -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 +88 -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/memory-backend/index.d.ts +1 -1
  27. package/dist/types/memory-backend/resolve.d.ts +1 -1
  28. package/dist/types/memory-backend/types.d.ts +3 -3
  29. package/dist/types/mnemopi/backend.d.ts +4 -0
  30. package/dist/types/mnemopi/config.d.ts +29 -0
  31. package/dist/types/mnemopi/state.d.ts +72 -0
  32. package/dist/types/modes/components/custom-editor.d.ts +2 -2
  33. package/dist/types/modes/components/omfg-panel.d.ts +19 -0
  34. package/dist/types/modes/controllers/command-controller.d.ts +7 -0
  35. package/dist/types/modes/controllers/input-controller.d.ts +1 -3
  36. package/dist/types/modes/controllers/omfg-controller.d.ts +10 -0
  37. package/dist/types/modes/controllers/omfg-rule.d.ts +26 -0
  38. package/dist/types/modes/gradient-highlight.d.ts +5 -1
  39. package/dist/types/modes/interactive-mode.d.ts +7 -3
  40. package/dist/types/modes/magic-keywords.d.ts +14 -0
  41. package/dist/types/modes/markdown-prose.d.ts +27 -0
  42. package/dist/types/modes/orchestrate.d.ts +7 -2
  43. package/dist/types/modes/shared.d.ts +1 -1
  44. package/dist/types/modes/turn-budget.d.ts +18 -0
  45. package/dist/types/modes/types.d.ts +7 -3
  46. package/dist/types/modes/ultrathink.d.ts +7 -2
  47. package/dist/types/modes/workflow.d.ts +15 -0
  48. package/dist/types/sdk.d.ts +13 -3
  49. package/dist/types/session/agent-session.d.ts +40 -17
  50. package/dist/types/session/session-manager.d.ts +18 -0
  51. package/dist/types/session/session-storage.d.ts +6 -0
  52. package/dist/types/session/shake-types.d.ts +24 -0
  53. package/dist/types/task/executor.d.ts +2 -2
  54. package/dist/types/tiny/models.d.ts +15 -1
  55. package/dist/types/tiny/title-protocol.d.ts +4 -0
  56. package/dist/types/tools/index.d.ts +19 -3
  57. package/dist/types/tools/memory-edit.d.ts +1 -1
  58. package/examples/sdk/09-api-keys-and-oauth.ts +2 -2
  59. package/package.json +10 -10
  60. package/src/autoresearch/tools/run-experiment.ts +45 -113
  61. package/src/cli/args.ts +39 -16
  62. package/src/cli/extension-flags.ts +48 -0
  63. package/src/cli/plugin-cli.ts +11 -2
  64. package/src/config/config-file.ts +98 -13
  65. package/src/config/file-lock.ts +60 -17
  66. package/src/config/keybindings.ts +78 -27
  67. package/src/config/model-registry.ts +7 -1
  68. package/src/config/settings-schema.ts +94 -67
  69. package/src/config/settings.ts +12 -0
  70. package/src/edit/hashline/diff.ts +81 -24
  71. package/src/edit/renderer.ts +16 -12
  72. package/src/eval/__tests__/agent-bridge.test.ts +433 -0
  73. package/src/eval/__tests__/budget-bridge.test.ts +69 -0
  74. package/src/eval/__tests__/idle-timeout.test.ts +66 -0
  75. package/src/eval/__tests__/shared-executors.test.ts +21 -0
  76. package/src/eval/agent-bridge.ts +295 -0
  77. package/src/eval/backend.ts +17 -2
  78. package/src/eval/budget-bridge.ts +48 -0
  79. package/src/eval/idle-timeout.ts +80 -0
  80. package/src/eval/js/executor.ts +35 -7
  81. package/src/eval/js/index.ts +2 -1
  82. package/src/eval/js/shared/prelude.txt +85 -1
  83. package/src/eval/js/tool-bridge.ts +9 -0
  84. package/src/eval/py/executor.ts +41 -14
  85. package/src/eval/py/index.ts +2 -1
  86. package/src/eval/py/prelude.py +132 -1
  87. package/src/exec/bash-executor.ts +2 -3
  88. package/src/extensibility/custom-tools/types.ts +2 -2
  89. package/src/extensibility/extensions/runner.ts +12 -2
  90. package/src/extensibility/plugins/git-url.ts +90 -4
  91. package/src/extensibility/plugins/manager.ts +103 -7
  92. package/src/extensibility/shared-events.ts +2 -2
  93. package/src/internal-urls/docs-index.generated.ts +88 -88
  94. package/src/main.ts +44 -55
  95. package/src/memory-backend/index.ts +1 -1
  96. package/src/memory-backend/resolve.ts +3 -3
  97. package/src/memory-backend/types.ts +3 -3
  98. package/src/{mnemosyne → mnemopi}/backend.ts +70 -70
  99. package/src/{mnemosyne → mnemopi}/config.ts +36 -36
  100. package/src/{mnemosyne → mnemopi}/state.ts +67 -67
  101. package/src/modes/components/agent-dashboard.ts +6 -6
  102. package/src/modes/components/custom-editor.ts +4 -11
  103. package/src/modes/components/extensions/state-manager.ts +3 -4
  104. package/src/modes/components/footer.ts +8 -9
  105. package/src/modes/components/hook-selector.ts +86 -20
  106. package/src/modes/components/oauth-selector.ts +93 -21
  107. package/src/modes/components/omfg-panel.ts +141 -0
  108. package/src/modes/components/settings-defs.ts +2 -2
  109. package/src/modes/components/tips.txt +2 -1
  110. package/src/modes/components/tool-execution.ts +38 -19
  111. package/src/modes/components/tree-selector.ts +4 -3
  112. package/src/modes/components/user-message-selector.ts +94 -19
  113. package/src/modes/components/user-message.ts +8 -1
  114. package/src/modes/controllers/command-controller.ts +57 -0
  115. package/src/modes/controllers/event-controller.ts +60 -2
  116. package/src/modes/controllers/input-controller.ts +14 -11
  117. package/src/modes/controllers/omfg-controller.ts +283 -0
  118. package/src/modes/controllers/omfg-rule.ts +647 -0
  119. package/src/modes/controllers/selector-controller.ts +1 -0
  120. package/src/modes/gradient-highlight.ts +23 -6
  121. package/src/modes/interactive-mode.ts +41 -7
  122. package/src/modes/magic-keywords.ts +20 -0
  123. package/src/modes/markdown-prose.ts +247 -0
  124. package/src/modes/orchestrate.ts +17 -11
  125. package/src/modes/shared.ts +3 -11
  126. package/src/modes/turn-budget.ts +31 -0
  127. package/src/modes/types.ts +7 -1
  128. package/src/modes/ultrathink.ts +16 -10
  129. package/src/modes/utils/hotkeys-markdown.ts +1 -1
  130. package/src/modes/workflow.ts +42 -0
  131. package/src/prompts/system/omfg-user.md +51 -0
  132. package/src/prompts/system/system-prompt.md +1 -0
  133. package/src/prompts/system/workflow-notice.md +70 -0
  134. package/src/prompts/tools/eval.md +13 -1
  135. package/src/prompts/tools/memory-edit.md +1 -1
  136. package/src/sdk.ts +63 -33
  137. package/src/session/agent-session.ts +373 -56
  138. package/src/session/session-manager.ts +32 -0
  139. package/src/session/session-storage.ts +68 -8
  140. package/src/session/shake-types.ts +44 -0
  141. package/src/slash-commands/builtin-registry.ts +41 -16
  142. package/src/task/executor.ts +3 -3
  143. package/src/task/index.ts +6 -6
  144. package/src/tiny/models.ts +30 -2
  145. package/src/tiny/title-protocol.ts +11 -1
  146. package/src/tiny/worker.ts +19 -7
  147. package/src/tools/eval.ts +202 -26
  148. package/src/tools/grouped-file-output.ts +9 -2
  149. package/src/tools/index.ts +17 -5
  150. package/src/tools/memory-edit.ts +4 -4
  151. package/src/tools/memory-recall.ts +5 -5
  152. package/src/tools/memory-reflect.ts +5 -5
  153. package/src/tools/memory-retain.ts +4 -4
  154. package/src/tools/render-utils.ts +2 -1
  155. package/src/tools/search.ts +480 -76
  156. package/dist/types/mnemosyne/backend.d.ts +0 -4
  157. package/dist/types/mnemosyne/config.d.ts +0 -29
  158. package/dist/types/mnemosyne/state.d.ts +0 -72
  159. /package/dist/types/{mnemosyne → mnemopi}/index.d.ts +0 -0
  160. /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", "shake-summary", "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), shake with local-model summaries, 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,14 @@ 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";
1319
+ }, {
1320
+ readonly value: "shake-summary";
1321
+ readonly label: "Shake (summary)";
1322
+ readonly description: "Shake, but compress heavy regions with a local on-device model instead of dropping";
1315
1323
  }, {
1316
1324
  readonly value: "off";
1317
1325
  readonly label: "Off";
@@ -1610,12 +1618,12 @@ export declare const SETTINGS_SCHEMA: {
1610
1618
  };
1611
1619
  readonly "memory.backend": {
1612
1620
  readonly type: "enum";
1613
- readonly values: readonly ["off", "local", "hindsight", "mnemosyne"];
1621
+ readonly values: readonly ["off", "local", "hindsight", "mnemopi"];
1614
1622
  readonly default: "off";
1615
1623
  readonly ui: {
1616
1624
  readonly tab: "memory";
1617
1625
  readonly label: "Memory Backend";
1618
- readonly description: "Off, local summary pipeline, Mnemosyne SQLite, or Hindsight remote memory";
1626
+ readonly description: "Off, local summary pipeline, Mnemopi SQLite, or Hindsight remote memory";
1619
1627
  readonly options: readonly [{
1620
1628
  readonly value: "off";
1621
1629
  readonly label: "Off";
@@ -1629,129 +1637,129 @@ export declare const SETTINGS_SCHEMA: {
1629
1637
  readonly label: "Hindsight";
1630
1638
  readonly description: "Vectorize Hindsight remote memory service";
1631
1639
  }, {
1632
- readonly value: "mnemosyne";
1633
- readonly label: "Mnemosyne";
1640
+ readonly value: "mnemopi";
1641
+ readonly label: "Mnemopi";
1634
1642
  readonly description: "Local SQLite recall/retain backend with optional embeddings";
1635
1643
  }];
1636
1644
  };
1637
1645
  };
1638
- readonly "mnemosyne.dbPath": {
1646
+ readonly "mnemopi.dbPath": {
1639
1647
  readonly type: "string";
1640
1648
  readonly default: undefined;
1641
1649
  readonly ui: {
1642
1650
  readonly tab: "memory";
1643
- readonly label: "Mnemosyne DB Path";
1651
+ readonly label: "Mnemopi DB Path";
1644
1652
  readonly description: "Optional SQLite DB path. Defaults to the agent memories directory.";
1645
- readonly condition: "mnemosyneActive";
1653
+ readonly condition: "mnemopiActive";
1646
1654
  };
1647
1655
  };
1648
- readonly "mnemosyne.bank": {
1656
+ readonly "mnemopi.bank": {
1649
1657
  readonly type: "string";
1650
1658
  readonly default: undefined;
1651
1659
  readonly ui: {
1652
1660
  readonly tab: "memory";
1653
- readonly label: "Mnemosyne Bank";
1661
+ readonly label: "Mnemopi Bank";
1654
1662
  readonly description: "Optional shared bank base name. Per-project modes derive project-local banks from it.";
1655
- readonly condition: "mnemosyneActive";
1663
+ readonly condition: "mnemopiActive";
1656
1664
  };
1657
1665
  };
1658
- readonly "mnemosyne.scoping": {
1666
+ readonly "mnemopi.scoping": {
1659
1667
  readonly type: "enum";
1660
1668
  readonly values: readonly ["global", "per-project", "per-project-tagged"];
1661
1669
  readonly default: "per-project";
1662
1670
  readonly ui: {
1663
1671
  readonly tab: "memory";
1664
- readonly label: "Mnemosyne Scoping";
1672
+ readonly label: "Mnemopi Scoping";
1665
1673
  readonly description: "global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = project-local writes plus global recall visibility";
1666
1674
  readonly options: readonly [{
1667
1675
  readonly value: "global";
1668
1676
  readonly label: "Global";
1669
- readonly description: "One shared Mnemosyne bank for every project";
1677
+ readonly description: "One shared Mnemopi bank for every project";
1670
1678
  }, {
1671
1679
  readonly value: "per-project";
1672
1680
  readonly label: "Per project";
1673
- readonly description: "Project-local Mnemosyne bank per cwd basename";
1681
+ readonly description: "Project-local Mnemopi bank per cwd basename";
1674
1682
  }, {
1675
1683
  readonly value: "per-project-tagged";
1676
1684
  readonly label: "Per project (tagged)";
1677
1685
  readonly description: "Write to a project-local bank but merge project + shared recall results";
1678
1686
  }];
1679
- readonly condition: "mnemosyneActive";
1687
+ readonly condition: "mnemopiActive";
1680
1688
  };
1681
1689
  };
1682
- readonly "mnemosyne.autoRecall": {
1690
+ readonly "mnemopi.autoRecall": {
1683
1691
  readonly type: "boolean";
1684
1692
  readonly default: true;
1685
1693
  readonly ui: {
1686
1694
  readonly tab: "memory";
1687
- readonly label: "Mnemosyne Auto Recall";
1695
+ readonly label: "Mnemopi Auto Recall";
1688
1696
  readonly description: "Recall local memories into the first turn of each session";
1689
- readonly condition: "mnemosyneActive";
1697
+ readonly condition: "mnemopiActive";
1690
1698
  };
1691
1699
  };
1692
- readonly "mnemosyne.autoRetain": {
1700
+ readonly "mnemopi.autoRetain": {
1693
1701
  readonly type: "boolean";
1694
1702
  readonly default: true;
1695
1703
  readonly ui: {
1696
1704
  readonly tab: "memory";
1697
- readonly label: "Mnemosyne Auto Retain";
1698
- readonly description: "Retain completed conversation turns into local Mnemosyne memory";
1699
- readonly condition: "mnemosyneActive";
1705
+ readonly label: "Mnemopi Auto Retain";
1706
+ readonly description: "Retain completed conversation turns into local Mnemopi memory";
1707
+ readonly condition: "mnemopiActive";
1700
1708
  };
1701
1709
  };
1702
- readonly "mnemosyne.noEmbeddings": {
1710
+ readonly "mnemopi.noEmbeddings": {
1703
1711
  readonly type: "boolean";
1704
1712
  readonly default: false;
1705
1713
  readonly ui: {
1706
1714
  readonly tab: "memory";
1707
- readonly label: "Mnemosyne Disable Embeddings";
1715
+ readonly label: "Mnemopi Disable Embeddings";
1708
1716
  readonly description: "Force deterministic FTS-only recall instead of vector embeddings";
1709
- readonly condition: "mnemosyneActive";
1717
+ readonly condition: "mnemopiActive";
1710
1718
  };
1711
1719
  };
1712
- readonly "mnemosyne.embeddingModel": {
1720
+ readonly "mnemopi.embeddingModel": {
1713
1721
  readonly type: "string";
1714
1722
  readonly default: undefined;
1715
1723
  readonly ui: {
1716
1724
  readonly tab: "memory";
1717
- readonly label: "Mnemosyne Embedding Model";
1718
- readonly description: "Optional embedding model override passed to Mnemosyne";
1719
- readonly condition: "mnemosyneActive";
1725
+ readonly label: "Mnemopi Embedding Model";
1726
+ readonly description: "Optional embedding model override passed to Mnemopi";
1727
+ readonly condition: "mnemopiActive";
1720
1728
  };
1721
1729
  };
1722
- readonly "mnemosyne.embeddingApiUrl": {
1730
+ readonly "mnemopi.embeddingApiUrl": {
1723
1731
  readonly type: "string";
1724
1732
  readonly default: undefined;
1725
1733
  readonly ui: {
1726
1734
  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";
1735
+ readonly label: "Mnemopi Embedding API URL";
1736
+ readonly description: "Optional OpenAI-compatible embedding endpoint passed to Mnemopi";
1737
+ readonly condition: "mnemopiActive";
1730
1738
  };
1731
1739
  };
1732
- readonly "mnemosyne.embeddingApiKey": {
1740
+ readonly "mnemopi.embeddingApiKey": {
1733
1741
  readonly type: "string";
1734
1742
  readonly default: undefined;
1735
1743
  readonly ui: {
1736
1744
  readonly tab: "memory";
1737
- readonly label: "Mnemosyne Embedding API Key";
1738
- readonly description: "Optional embedding API key passed to Mnemosyne";
1739
- readonly condition: "mnemosyneActive";
1745
+ readonly label: "Mnemopi Embedding API Key";
1746
+ readonly description: "Optional embedding API key passed to Mnemopi";
1747
+ readonly condition: "mnemopiActive";
1740
1748
  };
1741
1749
  };
1742
- readonly "mnemosyne.llmMode": {
1750
+ readonly "mnemopi.llmMode": {
1743
1751
  readonly type: "enum";
1744
1752
  readonly values: readonly ["none", "smol", "remote"];
1745
1753
  readonly default: "smol";
1746
1754
  readonly ui: {
1747
1755
  readonly tab: "memory";
1748
- readonly label: "Mnemosyne LLM Mode";
1756
+ readonly label: "Mnemopi LLM Mode";
1749
1757
  readonly description: "Use no LLM, the configured smol model, or a remote OpenAI-compatible endpoint";
1750
- readonly condition: "mnemosyneActive";
1758
+ readonly condition: "mnemopiActive";
1751
1759
  readonly options: readonly [{
1752
1760
  readonly value: "none";
1753
1761
  readonly label: "None";
1754
- readonly description: "Disable Mnemosyne LLM-backed extraction";
1762
+ readonly description: "Disable Mnemopi LLM-backed extraction";
1755
1763
  }, {
1756
1764
  readonly value: "smol";
1757
1765
  readonly label: "Smol";
@@ -1759,61 +1767,61 @@ export declare const SETTINGS_SCHEMA: {
1759
1767
  }, {
1760
1768
  readonly value: "remote";
1761
1769
  readonly label: "Remote";
1762
- readonly description: "Use the Mnemosyne remote LLM settings below";
1770
+ readonly description: "Use the Mnemopi remote LLM settings below";
1763
1771
  }];
1764
1772
  };
1765
1773
  };
1766
- readonly "mnemosyne.llmBaseUrl": {
1774
+ readonly "mnemopi.llmBaseUrl": {
1767
1775
  readonly type: "string";
1768
1776
  readonly default: undefined;
1769
1777
  readonly ui: {
1770
1778
  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";
1779
+ readonly label: "Mnemopi LLM Base URL";
1780
+ readonly description: "Optional OpenAI-compatible LLM endpoint for Mnemopi remote mode";
1781
+ readonly condition: "mnemopiActive";
1774
1782
  };
1775
1783
  };
1776
- readonly "mnemosyne.llmApiKey": {
1784
+ readonly "mnemopi.llmApiKey": {
1777
1785
  readonly type: "string";
1778
1786
  readonly default: undefined;
1779
1787
  readonly ui: {
1780
1788
  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";
1789
+ readonly label: "Mnemopi LLM API Key";
1790
+ readonly description: "Optional LLM API key for Mnemopi remote mode";
1791
+ readonly condition: "mnemopiActive";
1784
1792
  };
1785
1793
  };
1786
- readonly "mnemosyne.llmModel": {
1794
+ readonly "mnemopi.llmModel": {
1787
1795
  readonly type: "string";
1788
1796
  readonly default: undefined;
1789
1797
  readonly ui: {
1790
1798
  readonly tab: "memory";
1791
- readonly label: "Mnemosyne LLM Model";
1792
- readonly description: "Optional LLM model name for Mnemosyne remote mode";
1793
- readonly condition: "mnemosyneActive";
1799
+ readonly label: "Mnemopi LLM Model";
1800
+ readonly description: "Optional LLM model name for Mnemopi remote mode";
1801
+ readonly condition: "mnemopiActive";
1794
1802
  };
1795
1803
  };
1796
- readonly "mnemosyne.retainEveryNTurns": {
1804
+ readonly "mnemopi.retainEveryNTurns": {
1797
1805
  readonly type: "number";
1798
1806
  readonly default: 4;
1799
1807
  };
1800
- readonly "mnemosyne.recallLimit": {
1808
+ readonly "mnemopi.recallLimit": {
1801
1809
  readonly type: "number";
1802
1810
  readonly default: 8;
1803
1811
  };
1804
- readonly "mnemosyne.recallContextTurns": {
1812
+ readonly "mnemopi.recallContextTurns": {
1805
1813
  readonly type: "number";
1806
1814
  readonly default: 3;
1807
1815
  };
1808
- readonly "mnemosyne.recallMaxQueryChars": {
1816
+ readonly "mnemopi.recallMaxQueryChars": {
1809
1817
  readonly type: "number";
1810
1818
  readonly default: 4000;
1811
1819
  };
1812
- readonly "mnemosyne.injectionTokenLimit": {
1820
+ readonly "mnemopi.injectionTokenLimit": {
1813
1821
  readonly type: "number";
1814
1822
  readonly default: 5000;
1815
1823
  };
1816
- readonly "mnemosyne.debug": {
1824
+ readonly "mnemopi.debug": {
1817
1825
  readonly type: "boolean";
1818
1826
  readonly default: false;
1819
1827
  };
@@ -3519,8 +3527,8 @@ export declare const SETTINGS_SCHEMA: {
3519
3527
  readonly ui: {
3520
3528
  readonly tab: "memory";
3521
3529
  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";
3530
+ readonly description: "Mnemopi LLM for fact extraction + consolidation: online (smol/remote) by default, or a local on-device model";
3531
+ readonly condition: "mnemopiActive";
3524
3532
  readonly options: ({
3525
3533
  value: "online";
3526
3534
  label: string;
@@ -3552,6 +3560,21 @@ export declare const SETTINGS_SCHEMA: {
3552
3560
  })[];
3553
3561
  };
3554
3562
  };
3563
+ readonly "providers.shakeSummaryModel": {
3564
+ readonly type: "enum";
3565
+ readonly values: readonly ["qwen3-1.7b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
3566
+ readonly default: "gemma-3-1b" | "lfm2-1.2b" | "qwen2.5-1.5b" | "qwen3-1.7b";
3567
+ readonly ui: {
3568
+ readonly tab: "context";
3569
+ readonly label: "Shake Summary Model";
3570
+ readonly description: "Local on-device model used by /shake summary and the shake-summary compaction strategy to compress heavy regions. Runs entirely on-device; downloads on first use. Falls back to plain elide when unavailable.";
3571
+ readonly options: {
3572
+ value: "gemma-3-1b" | "lfm2-1.2b" | "qwen2.5-1.5b" | "qwen3-1.7b";
3573
+ label: "Gemma 3 1B" | "LFM2 1.2B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
3574
+ description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Fastest load; solid all-rounder, slightly noisier extraction labels." | "Recommended; most disciplined extraction (ignores chit-chat), good consolidation, about 1.1 GB cached.";
3575
+ }[];
3576
+ };
3577
+ };
3555
3578
  readonly "providers.kimiApiFormat": {
3556
3579
  readonly type: "enum";
3557
3580
  readonly values: readonly ["openai", "anthropic"];
@@ -3845,7 +3868,7 @@ export type StatusLineSeparatorStyle = SettingValue<"statusLine.separator">;
3845
3868
  export type TreeFilterMode = SettingValue<"treeFilterMode">;
3846
3869
  export interface CompactionSettings {
3847
3870
  enabled: boolean;
3848
- strategy: "context-full" | "handoff" | "off";
3871
+ strategy: "context-full" | "handoff" | "shake" | "shake-summary" | "off";
3849
3872
  thresholdPercent: number;
3850
3873
  thresholdTokens: number;
3851
3874
  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" | "shake-summary";
90
90
  } | {
91
91
  reason: "auto_compaction_end";
92
- action: "context-full" | "handoff";
92
+ action: "context-full" | "handoff" | "shake" | "shake-summary";
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" | "shake-summary";
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" | "shake-summary";
169
169
  result: CompactionResult | undefined;
170
170
  aborted: boolean;
171
171
  willRetry: boolean;