Skip to content

feat: keep managed and self-managed Pi providers - #897

Draft
Dante-dan wants to merge 1 commit into
LodyAI:mainfrom
Dante-dan:feat/832-add-managed-pi
Draft

Dante-dan wants to merge 1 commit into
LodyAI:mainfrom
Dante-dan:feat/832-add-managed-pi

Conversation

@Dante-dan

@Dante-dan Dante-dan commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Related issue

Closes #832

Problem / pressure

The existing Pi migration rewrites each eligible registry/pi-acp provider in place. That changes the launch implementation behind the provider's stable identity, so customized commands, environments, and existing session bindings no longer mean what the user configured.

Summary

  • Replace the in-place migration with an explicit, selected-machine “Add managed Pi” action.
  • Create one deterministic builtin/pi provider per machine through an atomic insert-if-absent write, preserving an existing managed row on retries or concurrent clicks.
  • Leave the legacy provider, its environment, and all session metadata untouched.
  • Explain the self-managed ACP entry point and PI_CODING_AGENT_DIR profile boundary, and update the owning draft Specs and bilingual decision notes.

Visual explanation

flowchart LR
  L[Self-managed registry/pi-acp] -->|remains unchanged| S[Existing sessions]
  A[Explicit Add managed Pi] --> C{builtin/pi exists?}
  C -->|No| N[Atomic insert with stable machine ID]
  C -->|Yes| K[Keep existing managed row]
  N --> P[Managed Pi selectable for new sessions]
  K --> P
Loading

Before / after

Before After
Upgrade rewrites the legacy provider in place Add creates a separate managed provider on the selected machine
Retry updates the same legacy identity Retry converges on one deterministic managed identity without overwriting it
UI implies preserved settings preserve behavior UI documents ACP adapter and profile isolation boundaries

Test plan

Passed:

  • @lody/shared: vitest run tests/pi-provider-migration.test.ts — 3 passed.
  • @lody/components: vitest run tests/agent-config-create.test.ts — 2 passed.
  • @lody/shared: tsgo --noEmit — passed.
  • Changed source files: oxfmt --check — passed.
  • pnpm run lint:i18n — passed.
  • git diff --check — passed.

Known local failures:

  • @lody/components: tsgo --noEmit failed in this partial checkout while resolving unavailable Electron and workspace dependencies, including electron, electron-ipc-decorator, and @lody/shared/* entry points. It did not provide a usable full components typecheck result.
  • pnpm run docs check failed because ACP submodules are not initialized in this worktree, leaving existing links into packages/acp-extension-codex and packages/acp-extension-grok unresolved.

Context handoff

Original user prompt

Show original prompt
请跟进对应的 issue: xxx , 并注意 xxxx 内容

Authorized scope completion: follow #832 and implement the issue's add-not-replace boundary while preserving legacy provider identity, configuration, environment, and existing session bindings; keep registration idempotent and scope the explicit action to the selected capable machine.

Shared conversation

Status: unavailable
Reason: This authoring environment does not provide a public HTTP(S) conversation URL. No private conversation content is included in this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Keep managed and self-managed Pi providers side by side without replacing existing setups

1 participant