@proteos/sdk 0.58.0 → 0.59.0

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
@@ -4398,6 +4398,11 @@ interface ListConnectionsQuery extends PaginationQuery {
4398
4398
  */
4399
4399
  owner_id?: string;
4400
4400
  status?: string;
4401
+ /**
4402
+ * The caller's intent: `read` (default) lists every connection they reach;
4403
+ * `write` only those they may send through — the compose picker's question.
4404
+ */
4405
+ permission?: 'read' | 'write';
4401
4406
  }
4402
4407
  /**
4403
4408
  * The delete's escape hatch. A connection delete makes the connector release
@@ -4487,7 +4492,13 @@ interface ListAgentListenersQuery extends PaginationQuery {
4487
4492
  * inert where their facts are missing.
4488
4493
  */
4489
4494
  type ConversationFilterType = 'address' | 'domain' | 'title_keyword' | 'role_based' | 'automated' | 'self_originated' | 'internal_participant' | 'internal_conversations' | 'all';
4490
- type ConversationFilterAction = 'block' | 'allow';
4495
+ /**
4496
+ * block drops the message; allow keeps it. restrict and share keep it too
4497
+ * (they rank as allow) and decide who sees the thread the message CREATES:
4498
+ * restrict writes only the rule's principals onto the new thread, share adds
4499
+ * them on top of what the thread inherits. Applied once, at creation.
4500
+ */
4501
+ type ConversationFilterAction = 'block' | 'allow' | 'restrict' | 'share';
4491
4502
  /** Which side of the message address/domain rules test (default: sender). */
4492
4503
  type FilterMatchOn = 'sender' | 'any_participant';
4493
4504
  /** Deterministic machine-mail header signals the automated filter matches. */
@@ -4537,7 +4548,11 @@ interface ConversationFilter {
4537
4548
  action: ConversationFilterAction;
4538
4549
  filter_config?: ConversationFilterConfig;
4539
4550
  is_enabled: boolean;
4540
- /** Read-only rollup: messages this rule dropped in the last 30 days. */
4551
+ /** restrict / share only: who the created thread is opened to. */
4552
+ principals?: PrincipalRef[];
4553
+ /** restrict / share only: read or write (write implies read; the default). */
4554
+ permission?: 'read' | 'write';
4555
+ /** Read-only rollup: messages this rule matched in the last 30 days. */
4541
4556
  recent_event_count?: number;
4542
4557
  created_at: string;
4543
4558
  created_by: UserRef;
@@ -4555,6 +4570,8 @@ interface ConversationFilterEvent {
4555
4570
  sender_kind?: ContactAddressKind;
4556
4571
  sender_value?: string;
4557
4572
  external_message_id?: string;
4573
+ /** The thread a restrict / share match applied to; empty on a drop. */
4574
+ conversation_id?: string;
4558
4575
  occurred_at: string;
4559
4576
  }
4560
4577
  interface CreateConversationFilterRequest {
@@ -4563,6 +4580,9 @@ interface CreateConversationFilterRequest {
4563
4580
  action: ConversationFilterAction;
4564
4581
  filter_config?: Record<string, unknown>;
4565
4582
  is_enabled?: boolean;
4583
+ /** Required for restrict / share, empty otherwise. */
4584
+ principals?: PrincipalRef[];
4585
+ permission?: 'read' | 'write';
4566
4586
  /** Opts past the own-domain guard (self_domain_block). */
4567
4587
  is_self_domain_acknowledged?: boolean;
4568
4588
  }
@@ -4572,6 +4592,8 @@ interface UpdateConversationFilterRequest {
4572
4592
  action?: ConversationFilterAction;
4573
4593
  filter_config?: Record<string, unknown>;
4574
4594
  is_enabled?: boolean;
4595
+ principals?: PrincipalRef[];
4596
+ permission?: 'read' | 'write';
4575
4597
  is_self_domain_acknowledged?: boolean;
4576
4598
  }
4577
4599
  interface ListConversationFiltersQuery extends PaginationQuery {
package/dist/index.d.ts CHANGED
@@ -4398,6 +4398,11 @@ interface ListConnectionsQuery extends PaginationQuery {
4398
4398
  */
4399
4399
  owner_id?: string;
4400
4400
  status?: string;
4401
+ /**
4402
+ * The caller's intent: `read` (default) lists every connection they reach;
4403
+ * `write` only those they may send through — the compose picker's question.
4404
+ */
4405
+ permission?: 'read' | 'write';
4401
4406
  }
4402
4407
  /**
4403
4408
  * The delete's escape hatch. A connection delete makes the connector release
@@ -4487,7 +4492,13 @@ interface ListAgentListenersQuery extends PaginationQuery {
4487
4492
  * inert where their facts are missing.
4488
4493
  */
4489
4494
  type ConversationFilterType = 'address' | 'domain' | 'title_keyword' | 'role_based' | 'automated' | 'self_originated' | 'internal_participant' | 'internal_conversations' | 'all';
4490
- type ConversationFilterAction = 'block' | 'allow';
4495
+ /**
4496
+ * block drops the message; allow keeps it. restrict and share keep it too
4497
+ * (they rank as allow) and decide who sees the thread the message CREATES:
4498
+ * restrict writes only the rule's principals onto the new thread, share adds
4499
+ * them on top of what the thread inherits. Applied once, at creation.
4500
+ */
4501
+ type ConversationFilterAction = 'block' | 'allow' | 'restrict' | 'share';
4491
4502
  /** Which side of the message address/domain rules test (default: sender). */
4492
4503
  type FilterMatchOn = 'sender' | 'any_participant';
4493
4504
  /** Deterministic machine-mail header signals the automated filter matches. */
@@ -4537,7 +4548,11 @@ interface ConversationFilter {
4537
4548
  action: ConversationFilterAction;
4538
4549
  filter_config?: ConversationFilterConfig;
4539
4550
  is_enabled: boolean;
4540
- /** Read-only rollup: messages this rule dropped in the last 30 days. */
4551
+ /** restrict / share only: who the created thread is opened to. */
4552
+ principals?: PrincipalRef[];
4553
+ /** restrict / share only: read or write (write implies read; the default). */
4554
+ permission?: 'read' | 'write';
4555
+ /** Read-only rollup: messages this rule matched in the last 30 days. */
4541
4556
  recent_event_count?: number;
4542
4557
  created_at: string;
4543
4558
  created_by: UserRef;
@@ -4555,6 +4570,8 @@ interface ConversationFilterEvent {
4555
4570
  sender_kind?: ContactAddressKind;
4556
4571
  sender_value?: string;
4557
4572
  external_message_id?: string;
4573
+ /** The thread a restrict / share match applied to; empty on a drop. */
4574
+ conversation_id?: string;
4558
4575
  occurred_at: string;
4559
4576
  }
4560
4577
  interface CreateConversationFilterRequest {
@@ -4563,6 +4580,9 @@ interface CreateConversationFilterRequest {
4563
4580
  action: ConversationFilterAction;
4564
4581
  filter_config?: Record<string, unknown>;
4565
4582
  is_enabled?: boolean;
4583
+ /** Required for restrict / share, empty otherwise. */
4584
+ principals?: PrincipalRef[];
4585
+ permission?: 'read' | 'write';
4566
4586
  /** Opts past the own-domain guard (self_domain_block). */
4567
4587
  is_self_domain_acknowledged?: boolean;
4568
4588
  }
@@ -4572,6 +4592,8 @@ interface UpdateConversationFilterRequest {
4572
4592
  action?: ConversationFilterAction;
4573
4593
  filter_config?: Record<string, unknown>;
4574
4594
  is_enabled?: boolean;
4595
+ principals?: PrincipalRef[];
4596
+ permission?: 'read' | 'write';
4575
4597
  is_self_domain_acknowledged?: boolean;
4576
4598
  }
4577
4599
  interface ListConversationFiltersQuery extends PaginationQuery {
package/dist/index.js CHANGED
@@ -683,6 +683,7 @@ var PLATFORM_ENTITY_SERVICE = {
683
683
  tools: "/agents",
684
684
  toolsets: "/agents",
685
685
  "mcp-servers": "/agents",
686
+ "agent-sessions": "/agents",
686
687
  // Knowledge (knowledge-service)
687
688
  "knowledge-spaces": "/knowledge",
688
689
  "knowledge-nodes": "/knowledge",
@@ -690,7 +691,7 @@ var PLATFORM_ENTITY_SERVICE = {
690
691
  conversations: "/conversations",
691
692
  connections: "/conversations"
692
693
  };
693
- var SERVICES_WITH_SHARING = /* @__PURE__ */ new Set(["/data", "/knowledge"]);
694
+ var SERVICES_WITH_SHARING = /* @__PURE__ */ new Set(["/data", "/knowledge", "/agents", "/conversations"]);
694
695
  var DEFAULT_SERVICE = "/data";
695
696
  function shareRouteFor(entitySlug) {
696
697
  const service = PLATFORM_ENTITY_SERVICE[entitySlug] ?? DEFAULT_SERVICE;
@@ -962,6 +963,8 @@ var PLATFORM_ENTITIES = [
962
963
  { slug: "glossary-terms", name: "Glossary Terms" },
963
964
  // Mistranscribed terms proposed by the post-transcription review pass.
964
965
  { slug: "mistranscribed-terms", name: "Mistranscribed Terms" },
966
+ // Live speech-to-text (the dictation stream) — `read` opens a stream.
967
+ { slug: "voice", name: "Voice" },
965
968
  // The person-level identity layer (contacts + addresses + merges + consent +
966
969
  // erasure) — one grant governs the whole aggregate.
967
970
  { slug: "contacts", name: "Contacts" },
@@ -1005,7 +1008,25 @@ var PLATFORM_ENTITIES = [
1005
1008
  var PLATFORM_ENTITY_SLUGS = PLATFORM_ENTITIES.map(
1006
1009
  (entity) => entity.slug
1007
1010
  );
1008
- var SCOPED_PLATFORM_ENTITY_SLUGS = ["knowledge-nodes"];
1011
+ var SCOPED_PLATFORM_ENTITY_SLUGS = [
1012
+ "knowledge-nodes",
1013
+ // agent-service: sessions are owned by their starter; the six config
1014
+ // resources by their creator. Scoped lists + /agents/v1/shares.
1015
+ "agent-sessions",
1016
+ "agents",
1017
+ "prompts",
1018
+ "skills",
1019
+ "tools",
1020
+ "toolsets",
1021
+ "mcp-servers",
1022
+ // conversation-service: a connection is owned by its owner (user-scoped) or
1023
+ // open to the org through its org share (org-scoped); a conversation's rows
1024
+ // are stamped once at creation from its connection / parent and extended by
1025
+ // shares; messages inherit their conversation. /conversations/v1/shares.
1026
+ "connections",
1027
+ "conversations",
1028
+ "messages"
1029
+ ];
1009
1030
  function isPlatformEntity(slug) {
1010
1031
  return PLATFORM_ENTITY_SLUGS.includes(slug);
1011
1032
  }