Accept

From indigoai-us/hq-core · View interactive version

Accept is an AI agent skill from the GitHub repository indigoai-us/hq-core. Accept HQ membership invites from a magic link or raw token.

How to use this skill

Skill file

/accept — Accept a Membership Invite

Accept a vault-backed membership invite using a magic link or raw token.

Usage:

/accept <token-or-magic-link>

Process

  1. Parse token — extracts raw token from hq://accept/<token> or raw input
  2. Resolve caller — reads the Cognito session from ~/.hq/cognito-tokens.json
  3. Call vault-service — via VaultClient.acceptInvite() from @indigoai-us/hq-cloud
  4. Print result — company details, role, and sync hint

Implementation

import { accept } from "@indigoai-us/hq-cloud";

const result = await accept({
  tokenOrLink: "hq://accept/tok_abc123",
  callerUid: "<caller-person-uid>",
  vaultConfig: { apiUrl, authToken },
});

console.log(`Joined ${result.companySlug} as ${result.membership.role}`);

Output Format

On success:

Invite accepted!

Company: Acme Corp (acme)
UID: cmp_abc123
Role: member

Run `hq sync --company acme` to pull vault contents.

On error:

This invite was already accepted.
Invite not found or expired.
This invite was for a different person.

Notes

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.