one-code-extension 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +1 -1
  2. package/docs/guide/differences-from-claude-code.md +9 -6
  3. package/docs/guide/installation.md +3 -4
  4. package/docs/guide/troubleshooting.md +1 -1
  5. package/extensions/auto-mode/denials.ts +3 -2
  6. package/extensions/background/cron.ts +127 -0
  7. package/extensions/background/index.ts +135 -47
  8. package/extensions/background/loop-fire.ts +39 -2
  9. package/extensions/background/switch-guard.ts +10 -6
  10. package/extensions/background/wakeup.ts +21 -2
  11. package/extensions/bash/index.ts +8 -30
  12. package/extensions/btw/index.ts +32 -18
  13. package/extensions/cache-marks/index.ts +42 -0
  14. package/extensions/claude-context/index.ts +157 -172
  15. package/extensions/compaction/index.ts +11 -8
  16. package/extensions/context-budget/budget.ts +16 -2
  17. package/extensions/context-budget/index.ts +15 -14
  18. package/extensions/context-management/index.ts +11 -28
  19. package/extensions/effort/index.ts +70 -7
  20. package/extensions/file-tracker/index.ts +111 -44
  21. package/extensions/file-tracker/replay.ts +76 -49
  22. package/extensions/file-tracker/restore.ts +12 -9
  23. package/extensions/file-tracker/tracker.ts +14 -1
  24. package/extensions/hooks/index.ts +60 -76
  25. package/extensions/hooks/prompt-context.ts +59 -0
  26. package/extensions/hooks/trust.ts +13 -7
  27. package/extensions/ledger/index.ts +46 -0
  28. package/extensions/ledger/wire.ts +154 -0
  29. package/extensions/lib/agent-cron.ts +17 -1
  30. package/extensions/lib/agent-loader.ts +3 -2
  31. package/extensions/lib/anthropic-auth.ts +98 -0
  32. package/extensions/lib/child-extensions.ts +14 -4
  33. package/extensions/lib/context-facts.ts +75 -56
  34. package/extensions/lib/covered-messages.ts +23 -0
  35. package/extensions/lib/deferred.ts +152 -12
  36. package/extensions/lib/ledger/fold-memo.ts +49 -0
  37. package/extensions/lib/ledger/fold.ts +265 -0
  38. package/extensions/lib/ledger/layout.ts +72 -0
  39. package/extensions/lib/ledger/plan.ts +102 -0
  40. package/extensions/lib/ledger/records.ts +276 -0
  41. package/extensions/lib/ledger/state.ts +47 -0
  42. package/extensions/lib/ledger/validate.ts +141 -0
  43. package/extensions/lib/ledger/wire.ts +632 -0
  44. package/extensions/lib/local-command.ts +24 -6
  45. package/extensions/lib/model-catalog/huggingface.json +5 -1
  46. package/extensions/lib/model-catalog/models-dev.json +10535 -10299
  47. package/extensions/lib/model-catalog/openrouter.json +191 -393
  48. package/extensions/lib/notifications.ts +57 -17
  49. package/extensions/lib/pi-version.ts +25 -8
  50. package/extensions/lib/plan-mode-channels.ts +29 -7
  51. package/extensions/lib/previous-mark.ts +101 -0
  52. package/extensions/lib/process-state.ts +48 -0
  53. package/extensions/lib/process-tree.ts +3 -2
  54. package/extensions/lib/reminders.ts +327 -621
  55. package/extensions/lib/request-replay.ts +186 -78
  56. package/extensions/lib/side-call.ts +11 -0
  57. package/extensions/lib/subagent-handback.ts +0 -1
  58. package/extensions/lib/tool-additions.ts +2 -22
  59. package/extensions/lib/turn-budget-layout.ts +18 -2
  60. package/extensions/lsp/index.ts +6 -8
  61. package/extensions/mcp/announce.ts +63 -98
  62. package/extensions/mcp/index.ts +51 -90
  63. package/extensions/mcp/trust.ts +13 -6
  64. package/extensions/model-default/index.ts +86 -19
  65. package/extensions/permissions/index.ts +157 -48
  66. package/extensions/permissions/modes.ts +5 -0
  67. package/extensions/plan-mode/index.ts +142 -45
  68. package/extensions/plan-mode/run-state.ts +26 -0
  69. package/extensions/plugins/index.ts +4 -1
  70. package/extensions/powershell/index.ts +2 -0
  71. package/extensions/recap/index.ts +11 -14
  72. package/extensions/search-tools/index.ts +2 -0
  73. package/extensions/skill/announce.ts +30 -0
  74. package/extensions/skill/index.ts +65 -48
  75. package/extensions/skill/invoke.ts +0 -67
  76. package/extensions/subagents/agents.ts +30 -8
  77. package/extensions/subagents/fork-cache.ts +9 -3
  78. package/extensions/subagents/index.ts +180 -107
  79. package/extensions/subagents/outcome.ts +3 -0
  80. package/extensions/subagents/parent-mode.ts +50 -0
  81. package/extensions/subagents/pending-claim.ts +18 -1
  82. package/extensions/subagents/runner.ts +29 -2
  83. package/extensions/subagents/runs.ts +5 -0
  84. package/extensions/system-prompt/index.ts +40 -6
  85. package/extensions/system-prompt/template.ts +10 -1
  86. package/extensions/system-reminder/index.ts +174 -202
  87. package/extensions/tool-search/index.ts +241 -167
  88. package/extensions/workflow/agent-session.ts +4 -1
  89. package/extensions/workflow/index.ts +16 -4
  90. package/extensions/workflow/run-manager.ts +4 -0
  91. package/extensions/worktree/index.ts +50 -14
  92. package/package.json +5 -2
  93. package/extensions/lib/context-stack.ts +0 -81
  94. package/extensions/subagents/announce.ts +0 -69
  95. package/extensions/tool-search/announce.ts +0 -58
@@ -28,8 +28,10 @@
28
28
  * returned text as the stdout, as CC's `onDone(result)` does), and `/model` is
29
29
  * announced from the `model_select` event by the extension that persists the
30
30
  * choice. pi built-ins we cannot see
31
- * (`/compact`, `/settings`, …) stay silent. The blocks are pinned in process
32
- * memory, not written to the session file as CC does — a `--resume` drops them.
31
+ * (`/compact`, `/settings`, …) stay silent. The blocks are persisted when
32
+ * announced, as pending entries the next prompt's request carries and records
33
+ * (lib/reminders.ts `user-prepend`), so a `/reload` or a resume before that
34
+ * prompt keeps them, as CC's transcript does.
33
35
  */
34
36
 
35
37
  import { announceArgumentHint, type HintEmitter, withoutExactMatch } from "./argument-hints.ts";
@@ -63,6 +65,12 @@ export interface LocalCommand {
63
65
  args?: string;
64
66
  /** The command's printed result; "" (the default) is what `/clear` shows. */
65
67
  stdout?: string;
68
+ /**
69
+ * Keys the breadcrumb's pending entries (`<key>:caveat`, `<key>:command`,
70
+ * `<key>:stdout`), so a later announcement under the same key replaces an
71
+ * undelivered one instead of joining it.
72
+ */
73
+ key?: string;
66
74
  }
67
75
 
68
76
  /** CC's `formatCommandInputTags` — the command breadcrumb, indentation included. */
@@ -75,21 +83,31 @@ export function commandStdoutBlock(stdout = ""): string {
75
83
  return `<local-command-stdout>${escapeXml(stdout)}</local-command-stdout>\n`;
76
84
  }
77
85
 
86
+ /** The pending-entry key suffix of each block, in `localCommandBlocks` order. */
87
+ const BLOCK_KEYS = ["caveat", "command", "stdout"] as const;
88
+
78
89
  /** The three bare text blocks a local command leaves for the model, in CC's order. */
79
90
  export function localCommandBlocks(command: LocalCommand): string[] {
80
91
  return [LOCAL_COMMAND_CAVEAT, commandInputBlock(command.name, (command.args ?? "").trim()), commandStdoutBlock(command.stdout ?? "")];
81
92
  }
82
93
 
83
94
  /**
84
- * Tell the model a local command ran. Call it from the command's handler
85
- * (before a `/clear` resets the session — the queue survives `newSession()`,
86
- * so the breadcrumb opens the new conversation exactly as in CC).
95
+ * Tell the model a local command ran. Call it from the command's handler; a
96
+ * command that replaces the session (`/clear`) announces from the new
97
+ * session's `session_start` instead, so the breadcrumb opens the new
98
+ * conversation exactly as in CC.
87
99
  */
88
100
  export function announceLocalCommand(pi: ReminderEmitter, command: LocalCommand): void {
89
101
  localCommandBlocks(command).forEach((text, index) => {
90
102
  // The caveat heads a RUN of commands: a second command before the next
91
103
  // prompt joins the first caveat instead of repeating it.
92
- const payload: ReminderPayload = { text, placement: "user-prepend", raw: true, ...(index === 0 ? { once: true } : {}) };
104
+ const payload: ReminderPayload = {
105
+ text,
106
+ placement: "user-prepend",
107
+ raw: true,
108
+ ...(index === 0 ? { once: true } : {}),
109
+ ...(command.key ? { key: `${command.key}:${BLOCK_KEYS[index]}` } : {}),
110
+ };
93
111
  pi.events.emit(REMINDER_CHANNEL, payload);
94
112
  });
95
113
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "fetchedAt": "2026-10-18T06:11:57.814Z",
2
+ "fetchedAt": "2026-11-01T12:46:45.941Z",
3
3
  "source": "https://huggingface.co/api/models/",
4
4
  "payload": {
5
5
  "ByteDance-Seed/UI-TARS-1.5-7B": 8292166656,
@@ -12,6 +12,7 @@
12
12
  "MiniMaxAI/MiniMax-M2.1": 228689764864,
13
13
  "MiniMaxAI/MiniMax-M2.5": 228703644928,
14
14
  "MiniMaxAI/MiniMax-M2.7": 228689764864,
15
+ "MiniMaxAI/MiniMax-M3.1-Flash": 220490854016,
15
16
  "MiniMaxAI/MiniMax-Text-01": 456089655296,
16
17
  "MiniMaxAI/Minimax-M3": 427040140160,
17
18
  "NousResearch/Hermes-3-Llama-3.1-405B": 405853388800,
@@ -52,6 +53,7 @@
52
53
  "Qwen/Qwen3.8-2.4T-A95B": 2446182725504,
53
54
  "Qwen/Qwen3.8-27B": 27781427952,
54
55
  "Qwen/Qwen3.8-Flash-Next": 179999981459,
56
+ "RecursiveSI/flint": 39785287456,
55
57
  "RekaAI/reka-edge-2603": 7128509568,
56
58
  "RekaAI/reka-flash-3": 20905482240,
57
59
  "Sao10K/L3-8B-Lunaris-v1": 8030261248,
@@ -113,6 +115,7 @@
113
115
  "mistralai/Ministral-3-14B-Instruct-2512": 13945032240,
114
116
  "mistralai/Ministral-3-3B-Instruct-2512": 3849090048,
115
117
  "mistralai/Ministral-3-8B-Instruct-2512": 8918026716,
118
+ "mistralai/Mistral-Large-4-1T-A52B": null,
116
119
  "mistralai/Mistral-Nemo-Instruct-2407": 12247782400,
117
120
  "mistralai/Mistral-Small-24B-Instruct-2501": 23572403200,
118
121
  "mistralai/Mistral-Small-3.1-24B-Instruct-2503": 24011361280,
@@ -144,6 +147,7 @@
144
147
  "poolside/Laguna-S-2.1": 117561977600,
145
148
  "poolside/Laguna-XS-2.1": 33442617088,
146
149
  "prism-ml/Ternary-Bonsai-2-27B-gguf": null,
150
+ "prism-ml/Ternary-Bonsai-2-9B-gguf": null,
147
151
  "reflection/Beam-1.0-501B-A23B": 501267612352,
148
152
  "stepfun-ai/Step-3.5-Flash": 199384301376,
149
153
  "stepfun-ai/Step-3.7-Flash": 201365316160,