refactor(v2): remove trigger_credential_collection MCP tool
Drops the in-chat credential-collection flow introduced in e92b245. Agents
can no longer collect API keys via a secure modal — users must add secrets
through OneCLI directly. Keeps the OneCLI manual-approval handler and
threaded-routing work from the same commit intact.
Removed:
* container/agent-runner/src/mcp-tools/credentials.ts (MCP tool)
* src/credentials.ts (host-side modal/OneCLI pipeline)
* src/db/credentials.ts + migration 005 (pending_credentials table)
* src/onecli-secrets.ts (createSecret CLI facade, only caller was credentials.ts)
* findCredentialResponse from agent-runner DB layer
* PendingCredential types
* Four credential hooks from ChannelSetup (getCredentialForModal,
onCredentialReject, onCredentialSubmit, onCredentialChannelUnsupported)
* Credential card/modal handling in chat-sdk-bridge (nccr/nccm prefixes,
Modal/TextInput imports)
* credential_request text fallback in WhatsApp adapter
* request_credential system-action case in delivery.ts
Added:
* Migration 009 drops pending_credentials on existing installs.
Vercel skill now tells the agent to ask the user to register the token via
OneCLI instead of invoking the removed tool.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -176,14 +176,13 @@ flowchart TB
|
||||
subgraph OneCLI["OneCLI Gateway (0.3.1)"]
|
||||
Vault["Agent Vault<br/>secrets + OAuth"]
|
||||
Approvals["configureManualApproval"]
|
||||
SecretsFacade["onecli-secrets.ts<br/>credential collection"]
|
||||
end
|
||||
|
||||
subgraph Session["Per-Session Container"]
|
||||
direction TB
|
||||
PollLoop["Poll Loop<br/>container/agent-runner"]
|
||||
Provider["Claude Agent SDK<br/>(codex / opencode planned)"]
|
||||
MCP["MCP Tools<br/>send_message · send_file · edit_message<br/>send_card · ask_user_question · schedule_task<br/>create_agent · install_packages · add_mcp_server<br/>request_rebuild · trigger_credential_collection"]
|
||||
MCP["MCP Tools<br/>send_message · send_file · edit_message<br/>send_card · ask_user_question · schedule_task<br/>create_agent · install_packages · add_mcp_server<br/>request_rebuild"]
|
||||
InDB[("inbound.db<br/>host writes · even seq")]
|
||||
OutDB[("outbound.db<br/>container writes · odd seq")]
|
||||
end
|
||||
@@ -212,8 +211,6 @@ flowchart TB
|
||||
Runner -.mounts.-> Folder
|
||||
MCP -.approval.-> Approvals
|
||||
Approvals --> Central
|
||||
MCP -.credential req.-> SecretsFacade
|
||||
SecretsFacade --> Vault
|
||||
Provider -.API calls.-> Vault
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
@@ -26,14 +26,13 @@ flowchart TB
|
||||
subgraph OneCLI["OneCLI Gateway (0.3.1)"]
|
||||
Vault["Agent Vault<br/>secrets + OAuth"]
|
||||
Approvals["configureManualApproval<br/>-> pending_approvals"]
|
||||
SecretsFacade["src/onecli-secrets.ts<br/>credential collection"]
|
||||
end
|
||||
|
||||
subgraph Session["Per-Session Container (Docker / Apple Container)"]
|
||||
direction TB
|
||||
PollLoop["Poll Loop<br/>(container/agent-runner)"]
|
||||
Provider["Claude Agent SDK<br/>(providers: claude, mock, todo: codex/opencode)"]
|
||||
MCP["MCP Tools<br/>send_message, send_file, edit_message,<br/>add_reaction, send_card, ask_user_question,<br/>schedule_task, create_agent,<br/>install_packages, add_mcp_server, request_rebuild,<br/>trigger_credential_collection"]
|
||||
MCP["MCP Tools<br/>send_message, send_file, edit_message,<br/>add_reaction, send_card, ask_user_question,<br/>schedule_task, create_agent,<br/>install_packages, add_mcp_server, request_rebuild"]
|
||||
Skills["Container Skills<br/>(container/skills/)"]
|
||||
InDB[("inbound.db<br/>host writes<br/>even seq<br/>messages_in<br/>destinations<br/>processing_ack")]
|
||||
OutDB[("outbound.db<br/>container writes<br/>odd seq<br/>messages_out<br/>heartbeat file")]
|
||||
@@ -66,8 +65,6 @@ flowchart TB
|
||||
Runner -.mounts.-> Folder
|
||||
MCP -.approval.-> Approvals
|
||||
Approvals --> Central
|
||||
MCP -.credential req.-> SecretsFacade
|
||||
SecretsFacade --> Vault
|
||||
Provider -.API calls.-> Vault
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user