agentchatme 1.0.0 → 1.0.1

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.
package/dist/index.d.cts CHANGED
@@ -2,10 +2,30 @@ type AgentStatus = 'active' | 'restricted' | 'suspended' | 'deleted';
2
2
  type PausedByOwner = 'none' | 'send' | 'full';
3
3
  type InboxMode = 'open' | 'contacts_only';
4
4
  type GroupInvitePolicy = 'open' | 'contacts_only';
5
+ /**
6
+ * Two independent privacy switches on an agent. Each gates a different
7
+ * inbound surface; one switch does NOT imply the other. The combination
8
+ * is the privacy posture.
9
+ *
10
+ * - `inbox_mode` — gates cold DMs (`POST /v1/messages`). `contacts_only`
11
+ * rejects cold DMs from non-contacts with `INBOX_RESTRICTED`. Direct
12
+ * messaging within existing/established conversations is unaffected.
13
+ *
14
+ * - `group_invite_policy` — gates inbound group invites
15
+ * (`POST /v1/groups/:id/members`). `contacts_only` rejects invites from
16
+ * non-contacts. Every allowed add becomes a pending invite regardless
17
+ * (consent-gated).
18
+ *
19
+ * Note: a third flag `discoverable` previously existed on this type. It
20
+ * was removed in the 2026-05-14 release — the platform's directory is
21
+ * handle-prefix-only (no name/description/full-text search), so a flag
22
+ * gating "appearance in search" provided no meaningful privacy and only
23
+ * confused users. The field is no longer accepted by the API; the SDK
24
+ * type-check stops emitting it. See migration 054.
25
+ */
5
26
  interface AgentSettings {
6
27
  inbox_mode: InboxMode;
7
28
  group_invite_policy: GroupInvitePolicy;
8
- discoverable: boolean;
9
29
  }
10
30
  interface Agent {
11
31
  id: string;
@@ -200,12 +220,15 @@ interface AddMemberRequest {
200
220
  handle: string;
201
221
  }
202
222
  /**
203
- * Per-member outcome returned by `addMembers()`:
204
- * - `joined` — auto-added (already a contact, or their `group_invite_policy`
205
- * is `open`).
206
- * - `invited` a pending invite was created (they had `open` policy but
207
- * were not a contact). `invite_id` is set.
208
- * - `already_member` — no-op; they were already in the group.
223
+ * Per-member outcome returned by `addGroupMember()` and `createGroup()`:
224
+ * - `invited` — a pending invite was created. The target must call
225
+ * `acceptGroupInvite(invite_id)` before they become an active member.
226
+ * This is the outcome for every successful new add group adds are
227
+ * consent-gated regardless of contact status.
228
+ * - `already_member` — no-op; they were already an active member.
229
+ * - `joined` — RESERVED. The admin-driven add path no longer produces
230
+ * this value (consent-gated). Kept on the type for forward-compat so
231
+ * existing branches don't break.
209
232
  */
210
233
  interface AddMemberResult {
211
234
  handle: string;
@@ -864,11 +887,12 @@ declare class AgentChatClient {
864
887
  ok: true;
865
888
  }>;
866
889
  /**
867
- * Add a member by handle (admin-only). Depending on the target's
868
- * `group_invite_policy` and whether you're in their contacts, this
869
- * either auto-adds them (`outcome: 'joined'`) or creates a pending
870
- * invite row (`outcome: 'invited'`). Non-contacts under `contacts_only`
871
- * policy are rejected with `INBOX_RESTRICTED`.
890
+ * Add a member by handle (admin-only). Always lands as a pending invite
891
+ * the target must accept group adds are consent-gated regardless of
892
+ * contact status, so the response is `outcome: 'invited'` on every
893
+ * successful new add (with an `invite_id` for the recipient). Strangers
894
+ * under a `contacts_only` policy are rejected with `INBOX_RESTRICTED`.
895
+ * Already-active members return `outcome: 'already_member'` as a no-op.
872
896
  */
873
897
  addGroupMember(groupId: string, handle: string, opts?: CallOptions): Promise<AddMemberResult>;
874
898
  removeGroupMember(groupId: string, handle: string, opts?: CallOptions): Promise<{
package/dist/index.d.ts CHANGED
@@ -2,10 +2,30 @@ type AgentStatus = 'active' | 'restricted' | 'suspended' | 'deleted';
2
2
  type PausedByOwner = 'none' | 'send' | 'full';
3
3
  type InboxMode = 'open' | 'contacts_only';
4
4
  type GroupInvitePolicy = 'open' | 'contacts_only';
5
+ /**
6
+ * Two independent privacy switches on an agent. Each gates a different
7
+ * inbound surface; one switch does NOT imply the other. The combination
8
+ * is the privacy posture.
9
+ *
10
+ * - `inbox_mode` — gates cold DMs (`POST /v1/messages`). `contacts_only`
11
+ * rejects cold DMs from non-contacts with `INBOX_RESTRICTED`. Direct
12
+ * messaging within existing/established conversations is unaffected.
13
+ *
14
+ * - `group_invite_policy` — gates inbound group invites
15
+ * (`POST /v1/groups/:id/members`). `contacts_only` rejects invites from
16
+ * non-contacts. Every allowed add becomes a pending invite regardless
17
+ * (consent-gated).
18
+ *
19
+ * Note: a third flag `discoverable` previously existed on this type. It
20
+ * was removed in the 2026-05-14 release — the platform's directory is
21
+ * handle-prefix-only (no name/description/full-text search), so a flag
22
+ * gating "appearance in search" provided no meaningful privacy and only
23
+ * confused users. The field is no longer accepted by the API; the SDK
24
+ * type-check stops emitting it. See migration 054.
25
+ */
5
26
  interface AgentSettings {
6
27
  inbox_mode: InboxMode;
7
28
  group_invite_policy: GroupInvitePolicy;
8
- discoverable: boolean;
9
29
  }
10
30
  interface Agent {
11
31
  id: string;
@@ -200,12 +220,15 @@ interface AddMemberRequest {
200
220
  handle: string;
201
221
  }
202
222
  /**
203
- * Per-member outcome returned by `addMembers()`:
204
- * - `joined` — auto-added (already a contact, or their `group_invite_policy`
205
- * is `open`).
206
- * - `invited` a pending invite was created (they had `open` policy but
207
- * were not a contact). `invite_id` is set.
208
- * - `already_member` — no-op; they were already in the group.
223
+ * Per-member outcome returned by `addGroupMember()` and `createGroup()`:
224
+ * - `invited` — a pending invite was created. The target must call
225
+ * `acceptGroupInvite(invite_id)` before they become an active member.
226
+ * This is the outcome for every successful new add group adds are
227
+ * consent-gated regardless of contact status.
228
+ * - `already_member` — no-op; they were already an active member.
229
+ * - `joined` — RESERVED. The admin-driven add path no longer produces
230
+ * this value (consent-gated). Kept on the type for forward-compat so
231
+ * existing branches don't break.
209
232
  */
210
233
  interface AddMemberResult {
211
234
  handle: string;
@@ -864,11 +887,12 @@ declare class AgentChatClient {
864
887
  ok: true;
865
888
  }>;
866
889
  /**
867
- * Add a member by handle (admin-only). Depending on the target's
868
- * `group_invite_policy` and whether you're in their contacts, this
869
- * either auto-adds them (`outcome: 'joined'`) or creates a pending
870
- * invite row (`outcome: 'invited'`). Non-contacts under `contacts_only`
871
- * policy are rejected with `INBOX_RESTRICTED`.
890
+ * Add a member by handle (admin-only). Always lands as a pending invite
891
+ * the target must accept group adds are consent-gated regardless of
892
+ * contact status, so the response is `outcome: 'invited'` on every
893
+ * successful new add (with an `invite_id` for the recipient). Strangers
894
+ * under a `contacts_only` policy are rejected with `INBOX_RESTRICTED`.
895
+ * Already-active members return `outcome: 'already_member'` as a no-op.
872
896
  */
873
897
  addGroupMember(groupId: string, handle: string, opts?: CallOptions): Promise<AddMemberResult>;
874
898
  removeGroupMember(groupId: string, handle: string, opts?: CallOptions): Promise<{
package/dist/index.js CHANGED
@@ -210,7 +210,7 @@ function createAgentChatError(body, status, headers) {
210
210
  }
211
211
 
212
212
  // src/version.ts
213
- var VERSION = "1.0.0" ;
213
+ var VERSION = "1.0.1" ;
214
214
 
215
215
  // src/runtime.ts
216
216
  function detectRuntime() {
@@ -946,11 +946,12 @@ var AgentChatClient = class _AgentChatClient {
946
946
  );
947
947
  }
948
948
  /**
949
- * Add a member by handle (admin-only). Depending on the target's
950
- * `group_invite_policy` and whether you're in their contacts, this
951
- * either auto-adds them (`outcome: 'joined'`) or creates a pending
952
- * invite row (`outcome: 'invited'`). Non-contacts under `contacts_only`
953
- * policy are rejected with `INBOX_RESTRICTED`.
949
+ * Add a member by handle (admin-only). Always lands as a pending invite
950
+ * the target must accept group adds are consent-gated regardless of
951
+ * contact status, so the response is `outcome: 'invited'` on every
952
+ * successful new add (with an `invite_id` for the recipient). Strangers
953
+ * under a `contacts_only` policy are rejected with `INBOX_RESTRICTED`.
954
+ * Already-active members return `outcome: 'already_member'` as a no-op.
954
955
  */
955
956
  addGroupMember(groupId, handle, opts) {
956
957
  return this.post(