@oh-my-pi/pi-coding-agent 16.2.1 → 16.2.2

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 (59) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cli.js +2648 -2662
  3. package/dist/types/advisor/runtime.d.ts +15 -1
  4. package/dist/types/config/model-roles.d.ts +1 -1
  5. package/dist/types/config/settings-schema.d.ts +32 -12
  6. package/dist/types/discovery/omp-extension-roots.d.ts +3 -3
  7. package/dist/types/edit/index.d.ts +18 -0
  8. package/dist/types/edit/streaming.d.ts +30 -0
  9. package/dist/types/extensibility/custom-tools/types.d.ts +1 -0
  10. package/dist/types/extensibility/shared-events.d.ts +1 -0
  11. package/dist/types/mcp/oauth-discovery.d.ts +0 -11
  12. package/dist/types/modes/components/status-line/component.d.ts +0 -2
  13. package/dist/types/sdk.d.ts +1 -1
  14. package/dist/types/session/agent-session.d.ts +26 -2
  15. package/dist/types/session/messages.d.ts +6 -7
  16. package/dist/types/session/settings-stream-fn.d.ts +21 -0
  17. package/dist/types/session/turn-persistence.d.ts +88 -0
  18. package/package.json +12 -12
  19. package/src/advisor/__tests__/advisor.test.ts +196 -0
  20. package/src/advisor/runtime.ts +65 -2
  21. package/src/auto-thinking/classifier.ts +2 -2
  22. package/src/config/model-resolver.ts +5 -1
  23. package/src/config/model-roles.ts +3 -3
  24. package/src/config/settings-schema.ts +30 -8
  25. package/src/discovery/omp-extension-roots.ts +38 -13
  26. package/src/edit/index.ts +21 -0
  27. package/src/edit/streaming.ts +170 -0
  28. package/src/extensibility/custom-tools/types.ts +1 -0
  29. package/src/extensibility/plugins/legacy-pi-bundled-keys.ts +18 -1
  30. package/src/extensibility/plugins/legacy-pi-bundled-registry.ts +59 -2
  31. package/src/extensibility/plugins/manager.ts +74 -4
  32. package/src/extensibility/shared-events.ts +1 -0
  33. package/src/internal-urls/docs-index.generated.txt +1 -1
  34. package/src/mcp/oauth-discovery.ts +5 -29
  35. package/src/mcp/transports/http.ts +3 -1
  36. package/src/mnemopi/backend.ts +2 -2
  37. package/src/modes/acp/acp-agent.ts +1 -1
  38. package/src/modes/components/assistant-message.ts +5 -5
  39. package/src/modes/components/status-line/component.ts +1 -9
  40. package/src/modes/components/status-line/segments.ts +1 -1
  41. package/src/modes/controllers/event-controller.ts +8 -11
  42. package/src/modes/interactive-mode.ts +0 -5
  43. package/src/modes/print-mode.ts +1 -1
  44. package/src/modes/utils/transcript-render-helpers.ts +2 -2
  45. package/src/modes/utils/ui-helpers.ts +5 -4
  46. package/src/sdk.ts +12 -26
  47. package/src/session/agent-session.ts +319 -219
  48. package/src/session/messages.ts +20 -12
  49. package/src/session/session-persistence.ts +1 -2
  50. package/src/session/settings-stream-fn.ts +49 -0
  51. package/src/session/turn-persistence.ts +142 -0
  52. package/src/session/unexpected-stop-classifier.ts +2 -2
  53. package/src/slash-commands/helpers/mcp.ts +2 -1
  54. package/src/tiny/models.ts +8 -6
  55. package/src/tiny/text.ts +14 -7
  56. package/src/tools/image-gen.ts +2 -1
  57. package/src/tools/tts.ts +2 -1
  58. package/src/utils/title-generator.ts +1 -1
  59. package/src/web/search/providers/tavily.ts +36 -19
@@ -43,6 +43,7 @@ import * as bundledPiAiAuthGatewayHttp from "@oh-my-pi/pi-ai/auth-gateway/http";
43
43
  import * as bundledPiAiAuthGatewayServer from "@oh-my-pi/pi-ai/auth-gateway/server";
44
44
  import * as bundledPiAiAuthGatewayTypes from "@oh-my-pi/pi-ai/auth-gateway/types";
45
45
  import * as bundledPiAiDialect from "@oh-my-pi/pi-ai/dialect";
46
+ import * as bundledPiAiError from "@oh-my-pi/pi-ai/error";
46
47
  import * as bundledPiAiOauth from "@oh-my-pi/pi-ai/oauth";
47
48
  import * as bundledPiAiOauthAnthropic from "@oh-my-pi/pi-ai/oauth/anthropic";
48
49
  import * as bundledPiAiOauthCallbackServer from "@oh-my-pi/pi-ai/oauth/callback-server";
@@ -50,6 +51,7 @@ import * as bundledPiAiOauthCursor from "@oh-my-pi/pi-ai/oauth/cursor";
50
51
  import * as bundledPiAiOauthDevin from "@oh-my-pi/pi-ai/oauth/devin";
51
52
  import * as bundledPiAiOauthGithubCopilot from "@oh-my-pi/pi-ai/oauth/github-copilot";
52
53
  import * as bundledPiAiOauthGitlabDuo from "@oh-my-pi/pi-ai/oauth/gitlab-duo";
54
+ import * as bundledPiAiOauthGitlabDuoWorkflow from "@oh-my-pi/pi-ai/oauth/gitlab-duo-workflow";
53
55
  import * as bundledPiAiOauthGoogleAntigravity from "@oh-my-pi/pi-ai/oauth/google-antigravity";
54
56
  import * as bundledPiAiOauthGoogleGeminiCli from "@oh-my-pi/pi-ai/oauth/google-gemini-cli";
55
57
  import * as bundledPiAiOauthGoogleOauthShared from "@oh-my-pi/pi-ai/oauth/google-oauth-shared";
@@ -78,6 +80,7 @@ import * as bundledPiAiProvidersDevin from "@oh-my-pi/pi-ai/providers/devin";
78
80
  import * as bundledPiAiProvidersErrorMessage from "@oh-my-pi/pi-ai/providers/error-message";
79
81
  import * as bundledPiAiProvidersGithubCopilotHeaders from "@oh-my-pi/pi-ai/providers/github-copilot-headers";
80
82
  import * as bundledPiAiProvidersGitlabDuo from "@oh-my-pi/pi-ai/providers/gitlab-duo";
83
+ import * as bundledPiAiProvidersGitlabDuoWorkflow from "@oh-my-pi/pi-ai/providers/gitlab-duo-workflow";
81
84
  import * as bundledPiAiProvidersGoogle from "@oh-my-pi/pi-ai/providers/google";
82
85
  import * as bundledPiAiProvidersGoogleAuth from "@oh-my-pi/pi-ai/providers/google-auth";
83
86
  import * as bundledPiAiProvidersGoogleGeminiCli from "@oh-my-pi/pi-ai/providers/google-gemini-cli";
@@ -118,12 +121,14 @@ import * as bundledPiAiUsageKimi from "@oh-my-pi/pi-ai/usage/kimi";
118
121
  import * as bundledPiAiUsageMinimaxCode from "@oh-my-pi/pi-ai/usage/minimax-code";
119
122
  import * as bundledPiAiUsageOllama from "@oh-my-pi/pi-ai/usage/ollama";
120
123
  import * as bundledPiAiUsageOpenaiCodex from "@oh-my-pi/pi-ai/usage/openai-codex";
124
+ import * as bundledPiAiUsageOpenaiCodexBaseUrl from "@oh-my-pi/pi-ai/usage/openai-codex-base-url";
121
125
  import * as bundledPiAiUsageOpenaiCodexReset from "@oh-my-pi/pi-ai/usage/openai-codex-reset";
122
126
  import * as bundledPiAiUsageOpencodeGo from "@oh-my-pi/pi-ai/usage/opencode-go";
123
127
  import * as bundledPiAiUsageShared from "@oh-my-pi/pi-ai/usage/shared";
124
128
  import * as bundledPiAiUsageZai from "@oh-my-pi/pi-ai/usage/zai";
125
129
  import * as bundledPiAiUtilsAbort from "@oh-my-pi/pi-ai/utils/abort";
126
130
  import * as bundledPiAiUtilsAnthropicAuth from "@oh-my-pi/pi-ai/utils/anthropic-auth";
131
+ import * as bundledPiAiUtilsBlockSymbols from "@oh-my-pi/pi-ai/utils/block-symbols";
127
132
  import * as bundledPiAiUtilsDeterministicId from "@oh-my-pi/pi-ai/utils/deterministic-id";
128
133
  import * as bundledPiAiUtilsEmptyCompletionRetry from "@oh-my-pi/pi-ai/utils/empty-completion-retry";
129
134
  import * as bundledPiAiUtilsEventStream from "@oh-my-pi/pi-ai/utils/event-stream";
@@ -134,7 +139,6 @@ import * as bundledPiAiUtilsHttpInspector from "@oh-my-pi/pi-ai/utils/http-inspe
134
139
  import * as bundledPiAiUtilsIdleIterator from "@oh-my-pi/pi-ai/utils/idle-iterator";
135
140
  import * as bundledPiAiUtilsOpenaiHttp from "@oh-my-pi/pi-ai/utils/openai-http";
136
141
  import * as bundledPiAiUtilsOpenrouterHeaders from "@oh-my-pi/pi-ai/utils/openrouter-headers";
137
- import * as bundledPiAiUtilsOverflow from "@oh-my-pi/pi-ai/utils/overflow";
138
142
  import * as bundledPiAiUtilsParseBind from "@oh-my-pi/pi-ai/utils/parse-bind";
139
143
  import * as bundledPiAiUtilsProviderResponse from "@oh-my-pi/pi-ai/utils/provider-response";
140
144
  import * as bundledPiAiUtilsProxy from "@oh-my-pi/pi-ai/utils/proxy";
@@ -486,6 +490,7 @@ import * as bundledPiCodingAgentInternalUrlsRegistryHelpers from "@oh-my-pi/pi-c
486
490
  import * as bundledPiCodingAgentInternalUrlsRouter from "@oh-my-pi/pi-coding-agent/internal-urls/router";
487
491
  import * as bundledPiCodingAgentInternalUrlsRuleProtocol from "@oh-my-pi/pi-coding-agent/internal-urls/rule-protocol";
488
492
  import * as bundledPiCodingAgentInternalUrlsSkillProtocol from "@oh-my-pi/pi-coding-agent/internal-urls/skill-protocol";
493
+ import * as bundledPiCodingAgentInternalUrlsSshProtocol from "@oh-my-pi/pi-coding-agent/internal-urls/ssh-protocol";
489
494
  import * as bundledPiCodingAgentInternalUrlsTypes from "@oh-my-pi/pi-coding-agent/internal-urls/types";
490
495
  import * as bundledPiCodingAgentInternalUrlsVaultProtocol from "@oh-my-pi/pi-coding-agent/internal-urls/vault-protocol";
491
496
  import * as bundledPiCodingAgentLsp from "@oh-my-pi/pi-coding-agent/lsp";
@@ -503,6 +508,9 @@ import * as bundledPiCodingAgentLspRender from "@oh-my-pi/pi-coding-agent/lsp/re
503
508
  import * as bundledPiCodingAgentLspStartupEvents from "@oh-my-pi/pi-coding-agent/lsp/startup-events";
504
509
  import * as bundledPiCodingAgentLspTypes from "@oh-my-pi/pi-coding-agent/lsp/types";
505
510
  import * as bundledPiCodingAgentLspUtils from "@oh-my-pi/pi-coding-agent/lsp/utils";
511
+ import * as bundledPiCodingAgentMarkit from "@oh-my-pi/pi-coding-agent/markit";
512
+ import * as bundledPiCodingAgentMarkitRegistry from "@oh-my-pi/pi-coding-agent/markit/registry";
513
+ import * as bundledPiCodingAgentMarkitTypes from "@oh-my-pi/pi-coding-agent/markit/types";
506
514
  import * as bundledPiCodingAgentMcp from "@oh-my-pi/pi-coding-agent/mcp";
507
515
  import * as bundledPiCodingAgentMcpClient from "@oh-my-pi/pi-coding-agent/mcp/client";
508
516
  import * as bundledPiCodingAgentMcpConfig from "@oh-my-pi/pi-coding-agent/mcp/config";
@@ -583,6 +591,7 @@ import * as bundledPiCodingAgentModesComponentsLogoutAccountSelector from "@oh-m
583
591
  import * as bundledPiCodingAgentModesComponentsMcpAddWizard from "@oh-my-pi/pi-coding-agent/modes/components/mcp-add-wizard";
584
592
  import * as bundledPiCodingAgentModesComponentsMessageFrame from "@oh-my-pi/pi-coding-agent/modes/components/message-frame";
585
593
  import * as bundledPiCodingAgentModesComponentsModelSelector from "@oh-my-pi/pi-coding-agent/modes/components/model-selector";
594
+ import * as bundledPiCodingAgentModesComponentsMoveOverlay from "@oh-my-pi/pi-coding-agent/modes/components/move-overlay";
586
595
  import * as bundledPiCodingAgentModesComponentsOauthSelector from "@oh-my-pi/pi-coding-agent/modes/components/oauth-selector";
587
596
  import * as bundledPiCodingAgentModesComponentsOmfgPanel from "@oh-my-pi/pi-coding-agent/modes/components/omfg-panel";
588
597
  import * as bundledPiCodingAgentModesComponentsOverlayBox from "@oh-my-pi/pi-coding-agent/modes/components/overlay-box";
@@ -594,6 +603,7 @@ import * as bundledPiCodingAgentModesComponentsQueueModeSelector from "@oh-my-pi
594
603
  import * as bundledPiCodingAgentModesComponentsReadToolGroup from "@oh-my-pi/pi-coding-agent/modes/components/read-tool-group";
595
604
  import * as bundledPiCodingAgentModesComponentsResetUsageSelector from "@oh-my-pi/pi-coding-agent/modes/components/reset-usage-selector";
596
605
  import * as bundledPiCodingAgentModesComponentsSegmentTrack from "@oh-my-pi/pi-coding-agent/modes/components/segment-track";
606
+ import * as bundledPiCodingAgentModesComponentsSelectListMouseRouting from "@oh-my-pi/pi-coding-agent/modes/components/select-list-mouse-routing";
597
607
  import * as bundledPiCodingAgentModesComponentsSelectorHelpers from "@oh-my-pi/pi-coding-agent/modes/components/selector-helpers";
598
608
  import * as bundledPiCodingAgentModesComponentsSessionSelector from "@oh-my-pi/pi-coding-agent/modes/components/session-selector";
599
609
  import * as bundledPiCodingAgentModesComponentsSettingsDefs from "@oh-my-pi/pi-coding-agent/modes/components/settings-defs";
@@ -657,6 +667,7 @@ import * as bundledPiCodingAgentModesRpcRpcClient from "@oh-my-pi/pi-coding-agen
657
667
  import * as bundledPiCodingAgentModesRpcRpcMode from "@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode";
658
668
  import * as bundledPiCodingAgentModesRpcRpcSubagents from "@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents";
659
669
  import * as bundledPiCodingAgentModesRpcRpcTypes from "@oh-my-pi/pi-coding-agent/modes/rpc/rpc-types";
670
+ import * as bundledPiCodingAgentModesRunningSubagentBadge from "@oh-my-pi/pi-coding-agent/modes/running-subagent-badge";
660
671
  import * as bundledPiCodingAgentModesRuntimeInit from "@oh-my-pi/pi-coding-agent/modes/runtime-init";
661
672
  import * as bundledPiCodingAgentModesSessionObserverRegistry from "@oh-my-pi/pi-coding-agent/modes/session-observer-registry";
662
673
  import * as bundledPiCodingAgentModesSetupVersion from "@oh-my-pi/pi-coding-agent/modes/setup-version";
@@ -713,12 +724,14 @@ import * as bundledPiCodingAgentSessionSessionMigrations from "@oh-my-pi/pi-codi
713
724
  import * as bundledPiCodingAgentSessionSessionPaths from "@oh-my-pi/pi-coding-agent/session/session-paths";
714
725
  import * as bundledPiCodingAgentSessionSessionPersistence from "@oh-my-pi/pi-coding-agent/session/session-persistence";
715
726
  import * as bundledPiCodingAgentSessionSessionStorage from "@oh-my-pi/pi-coding-agent/session/session-storage";
727
+ import * as bundledPiCodingAgentSessionSettingsStreamFn from "@oh-my-pi/pi-coding-agent/session/settings-stream-fn";
716
728
  import * as bundledPiCodingAgentSessionShakeTypes from "@oh-my-pi/pi-coding-agent/session/shake-types";
717
729
  import * as bundledPiCodingAgentSessionSnapcompactInline from "@oh-my-pi/pi-coding-agent/session/snapcompact-inline";
718
730
  import * as bundledPiCodingAgentSessionSnapcompactSavingsJournal from "@oh-my-pi/pi-coding-agent/session/snapcompact-savings-journal";
719
731
  import * as bundledPiCodingAgentSessionSqlSessionStorage from "@oh-my-pi/pi-coding-agent/session/sql-session-storage";
720
732
  import * as bundledPiCodingAgentSessionStreamingOutput from "@oh-my-pi/pi-coding-agent/session/streaming-output";
721
733
  import * as bundledPiCodingAgentSessionToolChoiceQueue from "@oh-my-pi/pi-coding-agent/session/tool-choice-queue";
734
+ import * as bundledPiCodingAgentSessionTurnPersistence from "@oh-my-pi/pi-coding-agent/session/turn-persistence";
722
735
  import * as bundledPiCodingAgentSessionUnexpectedStopClassifier from "@oh-my-pi/pi-coding-agent/session/unexpected-stop-classifier";
723
736
  import * as bundledPiCodingAgentSessionYieldQueue from "@oh-my-pi/pi-coding-agent/session/yield-queue";
724
737
  import * as bundledPiCodingAgentSlashCommandsAcpBuiltins from "@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins";
@@ -728,6 +741,7 @@ import * as bundledPiCodingAgentSlashCommandsMarketplaceInstallParser from "@oh-
728
741
  import * as bundledPiCodingAgentSlashCommandsTypes from "@oh-my-pi/pi-coding-agent/slash-commands/types";
729
742
  import * as bundledPiCodingAgentSshConfigWriter from "@oh-my-pi/pi-coding-agent/ssh/config-writer";
730
743
  import * as bundledPiCodingAgentSshConnectionManager from "@oh-my-pi/pi-coding-agent/ssh/connection-manager";
744
+ import * as bundledPiCodingAgentSshFileTransfer from "@oh-my-pi/pi-coding-agent/ssh/file-transfer";
731
745
  import * as bundledPiCodingAgentSshSshExecutor from "@oh-my-pi/pi-coding-agent/ssh/ssh-executor";
732
746
  import * as bundledPiCodingAgentSshSshfsMount from "@oh-my-pi/pi-coding-agent/ssh/sshfs-mount";
733
747
  import * as bundledPiCodingAgentSshUtils from "@oh-my-pi/pi-coding-agent/ssh/utils";
@@ -841,6 +855,7 @@ import * as bundledPiCodingAgentTuiTreeList from "@oh-my-pi/pi-coding-agent/tui/
841
855
  import * as bundledPiCodingAgentTuiTypes from "@oh-my-pi/pi-coding-agent/tui/types";
842
856
  import * as bundledPiCodingAgentTuiUtils from "@oh-my-pi/pi-coding-agent/tui/utils";
843
857
  import * as bundledPiCodingAgentTuiWidthAwareText from "@oh-my-pi/pi-coding-agent/tui/width-aware-text";
858
+ import * as bundledPiCodingAgentUtilsActiveRepoContext from "@oh-my-pi/pi-coding-agent/utils/active-repo-context";
844
859
  import * as bundledPiCodingAgentUtilsBlockContext from "@oh-my-pi/pi-coding-agent/utils/block-context";
845
860
  import * as bundledPiCodingAgentUtilsChangelog from "@oh-my-pi/pi-coding-agent/utils/changelog";
846
861
  import * as bundledPiCodingAgentUtilsClipboard from "@oh-my-pi/pi-coding-agent/utils/clipboard";
@@ -860,8 +875,10 @@ import * as bundledPiCodingAgentUtilsIpc from "@oh-my-pi/pi-coding-agent/utils/i
860
875
  import * as bundledPiCodingAgentUtilsJj from "@oh-my-pi/pi-coding-agent/utils/jj";
861
876
  import * as bundledPiCodingAgentUtilsLangFromPath from "@oh-my-pi/pi-coding-agent/utils/lang-from-path";
862
877
  import * as bundledPiCodingAgentUtilsMarkit from "@oh-my-pi/pi-coding-agent/utils/markit";
878
+ import * as bundledPiCodingAgentUtilsMarkitCache from "@oh-my-pi/pi-coding-agent/utils/markit-cache";
863
879
  import * as bundledPiCodingAgentUtilsMupdfWasmEmbed from "@oh-my-pi/pi-coding-agent/utils/mupdf-wasm-embed";
864
880
  import * as bundledPiCodingAgentUtilsOpen from "@oh-my-pi/pi-coding-agent/utils/open";
881
+ import * as bundledPiCodingAgentUtilsPromptPath from "@oh-my-pi/pi-coding-agent/utils/prompt-path";
865
882
  import * as bundledPiCodingAgentUtilsQrcode from "@oh-my-pi/pi-coding-agent/utils/qrcode";
866
883
  import * as bundledPiCodingAgentUtilsSessionColor from "@oh-my-pi/pi-coding-agent/utils/session-color";
867
884
  import * as bundledPiCodingAgentUtilsShellSnapshot from "@oh-my-pi/pi-coding-agent/utils/shell-snapshot";
@@ -1040,6 +1057,7 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
1040
1057
  Record<string, unknown>
1041
1058
  >,
1042
1059
  "@oh-my-pi/pi-ai": bundledPiAi as unknown as Readonly<Record<string, unknown>>,
1060
+ "@oh-my-pi/pi-ai/error": bundledPiAiError as unknown as Readonly<Record<string, unknown>>,
1043
1061
  "@oh-my-pi/pi-ai/auth-broker": bundledPiAiAuthBroker as unknown as Readonly<Record<string, unknown>>,
1044
1062
  "@oh-my-pi/pi-ai/auth-gateway": bundledPiAiAuthGateway as unknown as Readonly<Record<string, unknown>>,
1045
1063
  "@oh-my-pi/pi-ai/utils/harmony-leak": bundledPiAiUtilsHarmonyLeak as unknown as Readonly<Record<string, unknown>>,
@@ -1101,6 +1119,9 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
1101
1119
  "@oh-my-pi/pi-ai/providers/github-copilot-headers": bundledPiAiProvidersGithubCopilotHeaders as unknown as Readonly<
1102
1120
  Record<string, unknown>
1103
1121
  >,
1122
+ "@oh-my-pi/pi-ai/providers/gitlab-duo-workflow": bundledPiAiProvidersGitlabDuoWorkflow as unknown as Readonly<
1123
+ Record<string, unknown>
1124
+ >,
1104
1125
  "@oh-my-pi/pi-ai/providers/gitlab-duo": bundledPiAiProvidersGitlabDuo as unknown as Readonly<
1105
1126
  Record<string, unknown>
1106
1127
  >,
@@ -1187,6 +1208,9 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
1187
1208
  "@oh-my-pi/pi-ai/usage/kimi": bundledPiAiUsageKimi as unknown as Readonly<Record<string, unknown>>,
1188
1209
  "@oh-my-pi/pi-ai/usage/minimax-code": bundledPiAiUsageMinimaxCode as unknown as Readonly<Record<string, unknown>>,
1189
1210
  "@oh-my-pi/pi-ai/usage/ollama": bundledPiAiUsageOllama as unknown as Readonly<Record<string, unknown>>,
1211
+ "@oh-my-pi/pi-ai/usage/openai-codex-base-url": bundledPiAiUsageOpenaiCodexBaseUrl as unknown as Readonly<
1212
+ Record<string, unknown>
1213
+ >,
1190
1214
  "@oh-my-pi/pi-ai/usage/openai-codex-reset": bundledPiAiUsageOpenaiCodexReset as unknown as Readonly<
1191
1215
  Record<string, unknown>
1192
1216
  >,
@@ -1198,6 +1222,7 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
1198
1222
  "@oh-my-pi/pi-ai/utils/anthropic-auth": bundledPiAiUtilsAnthropicAuth as unknown as Readonly<
1199
1223
  Record<string, unknown>
1200
1224
  >,
1225
+ "@oh-my-pi/pi-ai/utils/block-symbols": bundledPiAiUtilsBlockSymbols as unknown as Readonly<Record<string, unknown>>,
1201
1226
  "@oh-my-pi/pi-ai/utils/deterministic-id": bundledPiAiUtilsDeterministicId as unknown as Readonly<
1202
1227
  Record<string, unknown>
1203
1228
  >,
@@ -1217,7 +1242,6 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
1217
1242
  "@oh-my-pi/pi-ai/utils/openrouter-headers": bundledPiAiUtilsOpenrouterHeaders as unknown as Readonly<
1218
1243
  Record<string, unknown>
1219
1244
  >,
1220
- "@oh-my-pi/pi-ai/utils/overflow": bundledPiAiUtilsOverflow as unknown as Readonly<Record<string, unknown>>,
1221
1245
  "@oh-my-pi/pi-ai/utils/parse-bind": bundledPiAiUtilsParseBind as unknown as Readonly<Record<string, unknown>>,
1222
1246
  "@oh-my-pi/pi-ai/utils/provider-response": bundledPiAiUtilsProviderResponse as unknown as Readonly<
1223
1247
  Record<string, unknown>
@@ -1245,6 +1269,9 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
1245
1269
  "@oh-my-pi/pi-ai/oauth/github-copilot": bundledPiAiOauthGithubCopilot as unknown as Readonly<
1246
1270
  Record<string, unknown>
1247
1271
  >,
1272
+ "@oh-my-pi/pi-ai/oauth/gitlab-duo-workflow": bundledPiAiOauthGitlabDuoWorkflow as unknown as Readonly<
1273
+ Record<string, unknown>
1274
+ >,
1248
1275
  "@oh-my-pi/pi-ai/oauth/gitlab-duo": bundledPiAiOauthGitlabDuo as unknown as Readonly<Record<string, unknown>>,
1249
1276
  "@oh-my-pi/pi-ai/oauth/google-antigravity": bundledPiAiOauthGoogleAntigravity as unknown as Readonly<
1250
1277
  Record<string, unknown>
@@ -1358,6 +1385,7 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
1358
1385
  "@oh-my-pi/pi-coding-agent/lsp/clients": bundledPiCodingAgentLspClients as unknown as Readonly<
1359
1386
  Record<string, unknown>
1360
1387
  >,
1388
+ "@oh-my-pi/pi-coding-agent/markit": bundledPiCodingAgentMarkit as unknown as Readonly<Record<string, unknown>>,
1361
1389
  "@oh-my-pi/pi-coding-agent/mcp": bundledPiCodingAgentMcp as unknown as Readonly<Record<string, unknown>>,
1362
1390
  "@oh-my-pi/pi-coding-agent/mcp/transports": bundledPiCodingAgentMcpTransports as unknown as Readonly<
1363
1391
  Record<string, unknown>
@@ -2099,6 +2127,8 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2099
2127
  bundledPiCodingAgentInternalUrlsRuleProtocol as unknown as Readonly<Record<string, unknown>>,
2100
2128
  "@oh-my-pi/pi-coding-agent/internal-urls/skill-protocol":
2101
2129
  bundledPiCodingAgentInternalUrlsSkillProtocol as unknown as Readonly<Record<string, unknown>>,
2130
+ "@oh-my-pi/pi-coding-agent/internal-urls/ssh-protocol":
2131
+ bundledPiCodingAgentInternalUrlsSshProtocol as unknown as Readonly<Record<string, unknown>>,
2102
2132
  "@oh-my-pi/pi-coding-agent/internal-urls/types": bundledPiCodingAgentInternalUrlsTypes as unknown as Readonly<
2103
2133
  Record<string, unknown>
2104
2134
  >,
@@ -2170,6 +2200,12 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2170
2200
  bundledPiCodingAgentLspClientsLspLinterClient as unknown as Readonly<Record<string, unknown>>,
2171
2201
  "@oh-my-pi/pi-coding-agent/lsp/clients/swiftlint-client":
2172
2202
  bundledPiCodingAgentLspClientsSwiftlintClient as unknown as Readonly<Record<string, unknown>>,
2203
+ "@oh-my-pi/pi-coding-agent/markit/registry": bundledPiCodingAgentMarkitRegistry as unknown as Readonly<
2204
+ Record<string, unknown>
2205
+ >,
2206
+ "@oh-my-pi/pi-coding-agent/markit/types": bundledPiCodingAgentMarkitTypes as unknown as Readonly<
2207
+ Record<string, unknown>
2208
+ >,
2173
2209
  "@oh-my-pi/pi-coding-agent/mcp/client": bundledPiCodingAgentMcpClient as unknown as Readonly<
2174
2210
  Record<string, unknown>
2175
2211
  >,
@@ -2298,6 +2334,8 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2298
2334
  >,
2299
2335
  "@oh-my-pi/pi-coding-agent/modes/prompt-action-autocomplete":
2300
2336
  bundledPiCodingAgentModesPromptActionAutocomplete as unknown as Readonly<Record<string, unknown>>,
2337
+ "@oh-my-pi/pi-coding-agent/modes/running-subagent-badge":
2338
+ bundledPiCodingAgentModesRunningSubagentBadge as unknown as Readonly<Record<string, unknown>>,
2301
2339
  "@oh-my-pi/pi-coding-agent/modes/runtime-init": bundledPiCodingAgentModesRuntimeInit as unknown as Readonly<
2302
2340
  Record<string, unknown>
2303
2341
  >,
@@ -2407,6 +2445,8 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2407
2445
  bundledPiCodingAgentModesComponentsMessageFrame as unknown as Readonly<Record<string, unknown>>,
2408
2446
  "@oh-my-pi/pi-coding-agent/modes/components/model-selector":
2409
2447
  bundledPiCodingAgentModesComponentsModelSelector as unknown as Readonly<Record<string, unknown>>,
2448
+ "@oh-my-pi/pi-coding-agent/modes/components/move-overlay":
2449
+ bundledPiCodingAgentModesComponentsMoveOverlay as unknown as Readonly<Record<string, unknown>>,
2410
2450
  "@oh-my-pi/pi-coding-agent/modes/components/oauth-selector":
2411
2451
  bundledPiCodingAgentModesComponentsOauthSelector as unknown as Readonly<Record<string, unknown>>,
2412
2452
  "@oh-my-pi/pi-coding-agent/modes/components/omfg-panel":
@@ -2429,6 +2469,8 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2429
2469
  bundledPiCodingAgentModesComponentsResetUsageSelector as unknown as Readonly<Record<string, unknown>>,
2430
2470
  "@oh-my-pi/pi-coding-agent/modes/components/segment-track":
2431
2471
  bundledPiCodingAgentModesComponentsSegmentTrack as unknown as Readonly<Record<string, unknown>>,
2472
+ "@oh-my-pi/pi-coding-agent/modes/components/select-list-mouse-routing":
2473
+ bundledPiCodingAgentModesComponentsSelectListMouseRouting as unknown as Readonly<Record<string, unknown>>,
2432
2474
  "@oh-my-pi/pi-coding-agent/modes/components/selector-helpers":
2433
2475
  bundledPiCodingAgentModesComponentsSelectorHelpers as unknown as Readonly<Record<string, unknown>>,
2434
2476
  "@oh-my-pi/pi-coding-agent/modes/components/session-selector":
@@ -2654,6 +2696,8 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2654
2696
  bundledPiCodingAgentSessionSessionPersistence as unknown as Readonly<Record<string, unknown>>,
2655
2697
  "@oh-my-pi/pi-coding-agent/session/session-storage":
2656
2698
  bundledPiCodingAgentSessionSessionStorage as unknown as Readonly<Record<string, unknown>>,
2699
+ "@oh-my-pi/pi-coding-agent/session/settings-stream-fn":
2700
+ bundledPiCodingAgentSessionSettingsStreamFn as unknown as Readonly<Record<string, unknown>>,
2657
2701
  "@oh-my-pi/pi-coding-agent/session/shake-types": bundledPiCodingAgentSessionShakeTypes as unknown as Readonly<
2658
2702
  Record<string, unknown>
2659
2703
  >,
@@ -2667,6 +2711,8 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2667
2711
  bundledPiCodingAgentSessionStreamingOutput as unknown as Readonly<Record<string, unknown>>,
2668
2712
  "@oh-my-pi/pi-coding-agent/session/tool-choice-queue":
2669
2713
  bundledPiCodingAgentSessionToolChoiceQueue as unknown as Readonly<Record<string, unknown>>,
2714
+ "@oh-my-pi/pi-coding-agent/session/turn-persistence":
2715
+ bundledPiCodingAgentSessionTurnPersistence as unknown as Readonly<Record<string, unknown>>,
2670
2716
  "@oh-my-pi/pi-coding-agent/session/unexpected-stop-classifier":
2671
2717
  bundledPiCodingAgentSessionUnexpectedStopClassifier as unknown as Readonly<Record<string, unknown>>,
2672
2718
  "@oh-my-pi/pi-coding-agent/session/yield-queue": bundledPiCodingAgentSessionYieldQueue as unknown as Readonly<
@@ -2689,6 +2735,9 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2689
2735
  "@oh-my-pi/pi-coding-agent/ssh/connection-manager": bundledPiCodingAgentSshConnectionManager as unknown as Readonly<
2690
2736
  Record<string, unknown>
2691
2737
  >,
2738
+ "@oh-my-pi/pi-coding-agent/ssh/file-transfer": bundledPiCodingAgentSshFileTransfer as unknown as Readonly<
2739
+ Record<string, unknown>
2740
+ >,
2692
2741
  "@oh-my-pi/pi-coding-agent/ssh/ssh-executor": bundledPiCodingAgentSshSshExecutor as unknown as Readonly<
2693
2742
  Record<string, unknown>
2694
2743
  >,
@@ -2985,6 +3034,8 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
2985
3034
  "@oh-my-pi/pi-coding-agent/tui/width-aware-text": bundledPiCodingAgentTuiWidthAwareText as unknown as Readonly<
2986
3035
  Record<string, unknown>
2987
3036
  >,
3037
+ "@oh-my-pi/pi-coding-agent/utils/active-repo-context":
3038
+ bundledPiCodingAgentUtilsActiveRepoContext as unknown as Readonly<Record<string, unknown>>,
2988
3039
  "@oh-my-pi/pi-coding-agent/utils/block-context": bundledPiCodingAgentUtilsBlockContext as unknown as Readonly<
2989
3040
  Record<string, unknown>
2990
3041
  >,
@@ -3031,6 +3082,9 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
3031
3082
  "@oh-my-pi/pi-coding-agent/utils/lang-from-path": bundledPiCodingAgentUtilsLangFromPath as unknown as Readonly<
3032
3083
  Record<string, unknown>
3033
3084
  >,
3085
+ "@oh-my-pi/pi-coding-agent/utils/markit-cache": bundledPiCodingAgentUtilsMarkitCache as unknown as Readonly<
3086
+ Record<string, unknown>
3087
+ >,
3034
3088
  "@oh-my-pi/pi-coding-agent/utils/markit": bundledPiCodingAgentUtilsMarkit as unknown as Readonly<
3035
3089
  Record<string, unknown>
3036
3090
  >,
@@ -3040,6 +3094,9 @@ export const BUNDLED_PI_REGISTRY: Readonly<Record<string, Readonly<Record<string
3040
3094
  "@oh-my-pi/pi-coding-agent/utils/open": bundledPiCodingAgentUtilsOpen as unknown as Readonly<
3041
3095
  Record<string, unknown>
3042
3096
  >,
3097
+ "@oh-my-pi/pi-coding-agent/utils/prompt-path": bundledPiCodingAgentUtilsPromptPath as unknown as Readonly<
3098
+ Record<string, unknown>
3099
+ >,
3043
3100
  "@oh-my-pi/pi-coding-agent/utils/qrcode": bundledPiCodingAgentUtilsQrcode as unknown as Readonly<
3044
3101
  Record<string, unknown>
3045
3102
  >,
@@ -14,6 +14,8 @@ import {
14
14
  import { type GitSource, parseGitUrl } from "./git-url";
15
15
  import { installLegacyPiSpecifierShim, loadLegacyPiModule } from "./legacy-pi-compat";
16
16
  import { resolvePluginManifestEntries } from "./loader";
17
+ import { getInstalledPluginsRegistryPath, readInstalledPluginsRegistry } from "./marketplace/registry";
18
+ import { parsePluginId } from "./marketplace/types";
17
19
  import { extractPackageName, parsePluginSpec } from "./parser";
18
20
  import { normalizePluginRuntimeConfig } from "./runtime-config";
19
21
  import type {
@@ -106,6 +108,9 @@ interface PluginPackageSnapshot {
106
108
  readonly backupPath: string;
107
109
  }
108
110
 
111
+ interface RuntimePackageJson {
112
+ name?: unknown;
113
+ }
109
114
  // =============================================================================
110
115
  // Plugin Manager
111
116
  // =============================================================================
@@ -215,6 +220,64 @@ export class PluginManager {
215
220
  }
216
221
  return installedNames;
217
222
  }
223
+ async #collectMarketplaceRuntimePackageRealpaths(): Promise<Map<string, Set<string>>> {
224
+ const registry = await readInstalledPluginsRegistry(getInstalledPluginsRegistryPath());
225
+ const packageRealpaths = new Map<string, Set<string>>();
226
+ await Promise.all(
227
+ Object.entries(registry.plugins).flatMap(([pluginId, entries]) =>
228
+ entries.map(async entry => {
229
+ // Legacy registries written before `scope` was added omit the field;
230
+ // `listClaudePluginRoots` treats those as user-scoped, so do the same.
231
+ if ((entry.scope ?? "user") !== "user") return;
232
+ const packageJsonPath = path.join(entry.installPath, "package.json");
233
+ const parsedId = parsePluginId(pluginId);
234
+ let packageName = parsedId?.name ?? pluginId;
235
+ try {
236
+ const pkg: RuntimePackageJson = await Bun.file(packageJsonPath).json();
237
+ if (typeof pkg.name === "string" && pkg.name.length > 0) {
238
+ packageName = pkg.name;
239
+ }
240
+ } catch (err) {
241
+ if (!isEnoent(err)) {
242
+ logger.debug("Failed to inspect marketplace plugin package path", {
243
+ path: entry.installPath,
244
+ error: String(err),
245
+ });
246
+ return;
247
+ }
248
+ }
249
+
250
+ try {
251
+ const installRealpath = await fs.promises.realpath(entry.installPath);
252
+ const realpaths = packageRealpaths.get(packageName) ?? new Set<string>();
253
+ realpaths.add(installRealpath);
254
+ packageRealpaths.set(packageName, realpaths);
255
+ } catch (err) {
256
+ if (isEnoent(err)) return;
257
+ throw err;
258
+ }
259
+ }),
260
+ ),
261
+ );
262
+ return packageRealpaths;
263
+ }
264
+
265
+ async #isMarketplaceRuntimeLink(
266
+ name: string,
267
+ deps: Record<string, string>,
268
+ marketplaceRuntimeRealpaths: Map<string, Set<string>>,
269
+ pluginPath: string,
270
+ ): Promise<boolean> {
271
+ if (name in deps) return false;
272
+ const realpaths = marketplaceRuntimeRealpaths.get(name);
273
+ if (!realpaths) return false;
274
+ try {
275
+ return realpaths.has(await fs.promises.realpath(pluginPath));
276
+ } catch (err) {
277
+ if (isEnoent(err)) return false;
278
+ throw err;
279
+ }
280
+ }
218
281
 
219
282
  async #snapshotInstalledPackage(actualName: string | undefined): Promise<PluginPackageSnapshot | null> {
220
283
  if (!actualName) {
@@ -569,13 +632,16 @@ export class PluginManager {
569
632
  if (!isEnoent(err)) throw err;
570
633
  }
571
634
 
572
- const projectOverrides = await this.#loadProjectOverrides();
573
- const config = await this.#ensureConfigLoaded();
635
+ const [projectOverrides, config, marketplaceRuntimeRealpaths] = await Promise.all([
636
+ this.#loadProjectOverrides(),
637
+ this.#ensureConfigLoaded(),
638
+ this.#collectMarketplaceRuntimePackageRealpaths(),
639
+ ]);
574
640
  const plugins: InstalledPlugin[] = [];
575
641
  const installedNames = this.#collectInstalledNames(deps, config);
576
-
577
642
  for (const name of installedNames) {
578
643
  const pluginPath = path.join(getPluginsNodeModules(), name);
644
+ if (await this.#isMarketplaceRuntimeLink(name, deps, marketplaceRuntimeRealpaths, pluginPath)) continue;
579
645
  const pluginPkgPath = path.join(pluginPath, "package.json");
580
646
  let pluginPkg: { version: string; omp?: PluginManifest; pi?: PluginManifest };
581
647
  try {
@@ -816,11 +882,15 @@ export class PluginManager {
816
882
  });
817
883
 
818
884
  const deps = pkg.dependencies || {};
819
- const config = await this.#ensureConfigLoaded();
885
+ const [config, marketplaceRuntimeRealpaths] = await Promise.all([
886
+ this.#ensureConfigLoaded(),
887
+ this.#collectMarketplaceRuntimePackageRealpaths(),
888
+ ]);
820
889
  const installedNames = this.#collectInstalledNames(deps, config);
821
890
 
822
891
  for (const name of installedNames) {
823
892
  const pluginPath = path.join(nodeModulesPath, name);
893
+ if (await this.#isMarketplaceRuntimeLink(name, deps, marketplaceRuntimeRealpaths, pluginPath)) continue;
824
894
  const pluginPkgPath = path.join(pluginPath, "package.json");
825
895
  const fromDependencies = name in deps;
826
896
 
@@ -238,6 +238,7 @@ export interface AutoRetryStartEvent {
238
238
  maxAttempts: number;
239
239
  delayMs: number;
240
240
  errorMessage: string;
241
+ errorId?: number;
241
242
  }
242
243
 
243
244
  /** Fired when auto-retry ends */