diff --git a/assistant/src/cli/commands/contacts.ts b/assistant/src/cli/commands/contacts.ts index 9daf8d9d1f6..ab884db0d9f 100644 --- a/assistant/src/cli/commands/contacts.ts +++ b/assistant/src/cli/commands/contacts.ts @@ -170,15 +170,9 @@ can be linked to external identifiers — phone numbers, Telegram IDs, email addresses — via channel memberships. The contact graph is the source of truth for identity resolution across all channels. -Contact writes are guardian-only and happen through the assistant web UI -(Contacts tab) or the invite flow — there is no CLI command for creating -or updating contacts. This CLI exposes read, merge, and invite/channel -management only. - Examples: $ assistant contacts list $ assistant contacts get abc-123 - $ assistant contacts merge keep-id merge-id $ assistant contacts invites list`, ); @@ -321,62 +315,6 @@ Examples: } }); - // ----------------------------------------------------------------------- - // merge - // ----------------------------------------------------------------------- - - contacts - .command("merge ") - .description("Merge two contacts") - .addHelpText( - "after", - ` -Arguments: - keepId UUID of the surviving contact that will absorb the other. - Run 'assistant contacts list' to find IDs. - mergeId UUID of the contact to be merged and deleted - -All channel memberships, conversation history, and metadata from mergeId -are transferred to keepId. After the merge, mergeId is permanently deleted. -This operation is irreversible. - -Examples: - $ assistant contacts merge 7a3b1c2d-4e5f-6789-abcd-ef0123456789 9f8e7d6c-5b4a-3210-fedc-ba9876543210 - $ assistant contacts merge keep-id merge-id --json`, - ) - .action( - async ( - keepId: string, - mergeId: string, - _opts: unknown, - cmd: Command, - ) => { - const r = await cliIpcCall<{ - ok: boolean; - contact: ContactWithChannels; - }>("merge_contacts", { - body: { keepId, mergeId }, - }); - - if (!r.ok) - return exitFromIpcResult( - r as { ok: false; error?: string; statusCode?: number }, - cmd, - ); - - const { contact } = r.result!; - if (shouldOutputJson(cmd)) { - writeOutput(cmd, { ok: true, contact }); - } else { - process.stdout.write( - `Merged ${mergeId} into ${keepId}\n` + - formatContactDetail(contact) + - "\n", - ); - } - }, - ); - // ----------------------------------------------------------------------- // prompt // ----------------------------------------------------------------------- diff --git a/gateway/src/risk/command-registry/commands/assistant.ts b/gateway/src/risk/command-registry/commands/assistant.ts index 94d6e5a2bf1..59559bb683e 100644 --- a/gateway/src/risk/command-registry/commands/assistant.ts +++ b/gateway/src/risk/command-registry/commands/assistant.ts @@ -81,7 +81,6 @@ const ASSISTANT_SUPPORTED_COMMAND_PATHS = [ "config validate-allowlist", "contacts", "contacts list", - "contacts merge", "contacts get", "contacts prompt", "contacts channels", @@ -377,7 +376,6 @@ const riskOverrides: AssistantRiskOverride[] = [ { path: "channel-verification-sessions cancel", risk: "low" }, { path: "channel-verification-sessions revoke", risk: "low" }, { path: "config set", risk: "low" }, - { path: "contacts merge", risk: "medium" }, { path: "contacts prompt", risk: "medium" }, { path: "contacts channels update-status", risk: "medium" }, { path: "contacts invites create", risk: "high" },