agentschat-mcp 0.36.12 → 0.36.14

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.
@@ -167,7 +167,7 @@ export function expectedAgentIdFromEnv(env: Record<string, string | undefined>):
167
167
  }
168
168
 
169
169
  /** Tools that must stay callable while the expected-id pin is violated. */
170
- export const EXPECT_PIN_EXEMPT_TOOLS = new Set(["whoami", "switch_profile"]);
170
+ export const EXPECT_PIN_EXEMPT_TOOLS = new Set(["whoami", "switch_profile", "connect_profile", "disconnect_profile"]);
171
171
 
172
172
  /**
173
173
  * Error text when the live identity violates the expected pin, else null.
package/src/identity.ts CHANGED
@@ -26,7 +26,7 @@
26
26
  */
27
27
 
28
28
  /** Which resolution tier produced the profile path (see resolveProfile in server.ts). */
29
- export type ProfileSource = "env" | "legacy-env" | "flag-profile" | "flag-name" | "grok-bind" | "project-config" | "project-profile" | "default";
29
+ export type ProfileSource = "env" | "legacy-env" | "flag-profile" | "flag-name" | "grok-bind" | "session-bind" | "project-config" | "project-profile" | "default";
30
30
 
31
31
  export type IdentityDecision =
32
32
  /** Profile file exists — load it. */
@@ -1,6 +1,6 @@
1
1
  export interface OnboardingStatus {
2
2
  agent_id: string; claimed: boolean | null; authentication: "ok" | "failed" | "unknown";
3
- chat_url: string; claim_url: string; next_step: "claim_agent" | "verify_reply" | "check_identity";
3
+ chat_url: string; claim_url: string; next_step: "join_public_chat" | "verify_reply" | "check_identity";
4
4
  }
5
5
  export async function getOnboardingStatus(base: string, agentId: string, token: string, request: (url: string, options: RequestInit) => Promise<Response> = fetch): Promise<OnboardingStatus> {
6
6
  const chat = `${base.replace(/\/$/, "")}/chat/${encodeURIComponent(agentId)}`;
@@ -15,12 +15,12 @@ export async function getOnboardingStatus(base: string, agentId: string, token:
15
15
  const data = await r.json() as any;
16
16
  if (data.agent_id !== agentId || typeof data.claimed !== "boolean") return result;
17
17
  result.authentication = "ok"; result.claimed = data.claimed;
18
- result.next_step = data.claimed ? "verify_reply" : "claim_agent";
18
+ result.next_step = data.claimed ? "verify_reply" : "join_public_chat";
19
19
  } catch { /* Network/unsupported endpoint is unknown, never unclaimed. */ }
20
20
  return result;
21
21
  }
22
22
  export function claimSummary(status: OnboardingStatus): string {
23
- if (status.claimed === true) return "Claimed: yes — verify an actual DM/reply before marking setup complete.";
24
- if (status.claimed === false) return `Claimed: NO — open ${status.claim_url} and enter the token from your private profile. Claiming unlocks DMs and private channels.`;
23
+ if (status.claimed === true) return "Claimed: yes — verify an actual message/reply in the authorized conversation before marking setup complete.";
24
+ if (status.claimed === false) return `Claimed: NO — public group chat can proceed within the authorized scope and service limits. Claiming unlocks DMs, private channels and owner features: open ${status.claim_url} and enter the token from your private profile.`;
25
25
  return `Claimed: unknown — ownership could not be verified. Check the service and account; do not register a replacement. Claim entry: ${status.claim_url}`;
26
26
  }