@primitivedotdev/cli 3.0.0-preview.20 → 3.0.0-preview.22

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.
@@ -1,4 +1,4 @@
1
- import { r as jsonOutputRequested } from "../json-output-xgN0ZLWP.js";
1
+ import { i as jsonOutputRequested } from "../json-output-BMZrLH47.js";
2
2
  import { spawnSync } from "node:child_process";
3
3
  // src/oclif/proxy-auto-detect.ts
4
4
  const PROXY_ENV_VARS = [
@@ -1,7 +1,7 @@
1
1
  import { N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, j as AGENT_PROFILE_ENV } from "../cli-config-Ms_0vNjq.js";
2
2
  import { a as backgroundListenStatus, i as backgroundListenRestartable, s as claimBackgroundListenRestart, t as BACKGROUND_LISTEN_RELAUNCH_ENV } from "../listen-background-DyBYca28.js";
3
- import { d as SESSION_UUID, t as notificationScope } from "../notify-session-C8USviF_.js";
4
- import { zt as detectAgentRuntime } from "../api-command-DXiAX_N2.js";
3
+ import { d as SESSION_UUID, t as notificationScope } from "../notify-session-DHQbjXOq.js";
4
+ import { It as detectAgentRuntime } from "../api-command-Dm1BKxOr.js";
5
5
  import { d as readMailJson } from "../shared-mail-files-BAQSGxxz.js";
6
6
  import { join } from "node:path";
7
7
  import { spawn } from "node:child_process";
@@ -6,7 +6,7 @@ export type ContactPage = {
6
6
  };
7
7
  /**
8
8
  * The `checkDefaultNetworkContactAdmission` result for one email
9
- * (`primitive agent-networks check-default-network-contact-admission`).
9
+ * (`primitive agent-networks check-contact-admission`).
10
10
  */
11
11
  export type NetworkAdmission = {
12
12
  readonly allowed: boolean;
@@ -3619,7 +3619,7 @@ const getWebhookDeliveryStats = (options) => (options?.client ?? client).get({
3619
3619
  /**
3620
3620
  * List what you created, or what you were asked
3621
3621
  *
3622
- * The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule started covering one of their mailboxes, saved a new version while covering it, or stopped covering it, named as the rule was then, naming its author in created_through, under their current membership; only on the dashboard or the Primitive CLI. A key, an app or an agent has none, and gets email_rule_coverage in withheld. A notice never reads as ended. Notices are written by a periodic job and can lag, a held new version by up to about 15 minutes; GET /v1/email-rules/covering-me is the live view. For what covers you now, read GET /email-rules/covering-me.
3622
+ * The objects the caller created, newest first, each with where it stands now, including ones since disabled, deleted or revoked where the object keeps a row: Functions, endpoints, Function triggers, pull subscriptions, recipient routes, filters, wake schedules, repeating sends and scheduled sends. An API key, an app or an agent sees what it created itself; a webhook given to an API key lists under that key. A person (a dashboard session, or their own Primitive CLI or app login) sees what they created through any credential of theirs, each item naming it, and also their API keys, personal agents, email rules, rule requests and objections to rules over their mail (objections only on the dashboard or the Primitive CLI). Each kind is listed only if the caller could list it through that kind's own route; a kind it could not is named in withheld, with no count. Ids, names and states only: never a webhook URL or mail content. Needs activity:read_self. With relation=asked it lists instead what other members asked of the person, open or answered: the rule requests made to them, and the objections to rules they wrote, under their current membership, each naming the member who asked or objected in created_through. A key, an app or an agent has none, and gets both kinds in withheld. With relation=concerning it lists instead what other members did that concerns the person's own mail: each time a rule in observe or active started covering one of their mailboxes, turned active after they were told of it in observe, saved a new version while covering it, or stopped covering it, named as the rule was then, naming its author in created_through, under their current membership; only on the dashboard or the Primitive CLI. A key, an app or an agent has none, and gets email_rule_coverage in withheld. A notice never reads as ended. Notices are written by a periodic job and can lag, a held new version by up to about 15 minutes; GET /v1/email-rules/covering-me is the live view. For what covers you now, read GET /email-rules/covering-me.
3623
3623
  */
3624
3624
  const listActivityObjects = (options) => (options?.client ?? client).get({
3625
3625
  security: [{
@@ -3743,7 +3743,7 @@ const createEmailRule = (options) => (options.client ?? client).post({
3743
3743
  /**
3744
3744
  * Delete a rule
3745
3745
  *
3746
- * Deletes a rule with its versions, its decisions and the access it granted. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares), and lists the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
3746
+ * Deletes a rule: it is kept only as deleted, a rule nothing reads or changes again that grants no access and is listed only in its author's activity, and its decisions go with it. A share of it ends (end_reason rule_deleted), and the member who shared can still list what it handed over. The answer lists the shares it ended (ended_shares), and lists the unrevoked keys that still list it, which now read nothing through it (keys, other_keys; left out when they could not be read). The author or a reader of all the organization's mail may delete it; while it is shared, only the author or someone who manages members from the dashboard. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
3747
3747
  */
3748
3748
  const deleteEmailRule = (options) => (options.client ?? client).delete({
3749
3749
  security: [{
@@ -3896,9 +3896,9 @@ const checkEmailRuleRequestTarget = (options) => (options.client ?? client).post
3896
3896
  }
3897
3897
  });
3898
3898
  /**
3899
- * Delete a withdrawn rule request
3899
+ * Delete a withdrawn or declined rule request
3900
3900
  *
3901
- * Deletes a request you withdrew, for everyone who could see it. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
3901
+ * Deletes a request you made that you withdrew or that was declined, for everyone who could see it. An accepted request stays: it is the record of who agreed to share. Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
3902
3902
  */
3903
3903
  const deleteEmailRuleRequest = (options) => (options.client ?? client).delete({
3904
3904
  security: [{
@@ -4036,7 +4036,7 @@ const listEmailRuleShareEmails = (options) => (options.client ?? client).get({
4036
4036
  /**
4037
4037
  * List the rules over your mail
4038
4038
  *
4039
- * Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address), and covers.via says how: author_reach, it runs over everything its author can read, which includes your mail (an author who reads the organization's mail or holds an access entry for your mailbox); selected, it names your mailbox or its domain; own_mailboxes, it is your own rule over your own mail. Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. Each listed rule carries its current version's english and Primitive's reading of it (explanation); its tree is on GET /v1/email-rules/covering-me/{id}. A page can hold fewer rules than limit, or none, and still carry a cursor (one request reads a bounded number of rules): keep reading until meta.cursor is null. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-email-rule-results --email-id <email-id>). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
4039
+ * Every email rule that covers one of your own mailboxes now, yours included, newest first, in any state. A rule covers you when the scope it runs with now reaches one of your own mailboxes (your member mailbox, or a personal agent's address), and covers.via says how: author_reach, it runs over everything its author can read, which includes your mail (an author who reads the organization's mail or holds an access entry for your mailbox); selected, it names your mailbox or its domain; own_mailboxes, it is your own rule over your own mail. Another member's own_mailboxes rule never covers you. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. Each listed rule carries its current version's english and Primitive's reading of it (explanation); its tree is on GET /v1/email-rules/covering-me/{id}. A page can hold fewer rules than limit, or none, and still carry a cursor (one request reads a bounded number of rules): keep reading until meta.cursor is null. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-results --email-id <email-id>). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
4040
4040
  */
4041
4041
  const listEmailRulesCoveringMe = (options) => (options?.client ?? client).get({
4042
4042
  security: [{
@@ -4049,7 +4049,7 @@ const listEmailRulesCoveringMe = (options) => (options?.client ?? client).get({
4049
4049
  /**
4050
4050
  * Get a rule over your mail
4051
4051
  *
4052
- * One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-email-rule-results --email-id <email-id>). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
4052
+ * One rule that covers one of your own mailboxes, read-only, with its current version; or one that no longer does but decided on mail at your own mailbox (covers_now false), shown as the version that last decided on your mail, without its current name. You see its name, wording, current tree, state, kind and author, and which of your own mailboxes it reaches. Its wording and tree are shown as written, so they can name other addresses (a condition on who an email is from or to). While it covers you, you also see who receives what it matches (receivers): how many API keys, webhooks and shares, the member each belongs to (or the organization), and the sites the webhooks deliver to. You do not see which keys, webhooks or shares they are (no ids, names, prefixes, or URLs beyond the site), the other inboxes and domains its scope names, or its saved expectations. For what happened to one email of yours, every rule's decision on it and, for another member's rule covering you, who receives what it shares: GET /v1/emails/{id}/rule-results (primitive email-rules list-results --email-id <email-id>). Needs mail:read, the email rules feature, and a member's own full-access credential (no API key, agent key or narrowed token).
4053
4053
  */
4054
4054
  const getEmailRuleCoveringMe = (options) => (options.client ?? client).get({
4055
4055
  security: [{
@@ -7967,7 +7967,7 @@ function parseFromHeader(header) {
7967
7967
  value: { address: address.toLowerCase() }
7968
7968
  };
7969
7969
  }
7970
- // ../sdk-node/dist/understanding-BKr4J0fq.js
7970
+ // ../sdk-node/dist/understanding-DPQq-3nO.js
7971
7971
  /**
7972
7972
  * AUTO-GENERATED - DO NOT EDIT
7973
7973
  * Run `pnpm generate:validator` to regenerate.
@@ -13790,6 +13790,42 @@ const schema48 = {
13790
13790
  },
13791
13791
  "required": ["value"]
13792
13792
  };
13793
+ const schema49 = {
13794
+ "type": "object",
13795
+ "description": "A rule that matched the email and granted this delivery.",
13796
+ "properties": {
13797
+ "id": {
13798
+ "type": "string",
13799
+ "description": "Rule id, as the email rules API returns it."
13800
+ },
13801
+ "version": {
13802
+ "type": "integer",
13803
+ "description": "Rule version that matched."
13804
+ },
13805
+ "name": {
13806
+ "type": "string",
13807
+ "description": "Rule name."
13808
+ },
13809
+ "description": {
13810
+ "type": "string",
13811
+ "description": "The plain-English description the rule was written from."
13812
+ },
13813
+ "explanation": {
13814
+ "type": "string",
13815
+ "description": "What the rule matches, in plain English."
13816
+ },
13817
+ "questions": {
13818
+ "type": "array",
13819
+ "items": { "$ref": "#/definitions/UnderstandingRuleQuestion" },
13820
+ "description": "The rule's questions and their answers."
13821
+ },
13822
+ "through_share": {
13823
+ "type": ["string", "null"],
13824
+ "description": "The id of the share a colleague made with you that this rule reached you through; null when the receiving key lists the rule itself."
13825
+ }
13826
+ },
13827
+ "required": ["id"]
13828
+ };
13793
13829
  function validate39(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
13794
13830
  let vErrors = null;
13795
13831
  let errors = 0;
@@ -13964,16 +14000,31 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
13964
14000
  errors++;
13965
14001
  }
13966
14002
  }
14003
+ if (data.through_share !== void 0) {
14004
+ let data10 = data.through_share;
14005
+ if (typeof data10 !== "string" && data10 !== null) {
14006
+ const err12 = {
14007
+ instancePath: instancePath + "/through_share",
14008
+ schemaPath: "#/properties/through_share/type",
14009
+ keyword: "type",
14010
+ params: { type: schema49.properties.through_share.type },
14011
+ message: "must be string,null"
14012
+ };
14013
+ if (vErrors === null) vErrors = [err12];
14014
+ else vErrors.push(err12);
14015
+ errors++;
14016
+ }
14017
+ }
13967
14018
  } else {
13968
- const err12 = {
14019
+ const err13 = {
13969
14020
  instancePath,
13970
14021
  schemaPath: "#/type",
13971
14022
  keyword: "type",
13972
14023
  params: { type: "object" },
13973
14024
  message: "must be object"
13974
14025
  };
13975
- if (vErrors === null) vErrors = [err12];
13976
- else vErrors.push(err12);
14026
+ if (vErrors === null) vErrors = [err13];
14027
+ else vErrors.push(err13);
13977
14028
  errors++;
13978
14029
  }
13979
14030
  validate39.errors = vErrors;
@@ -1,4 +1,4 @@
1
- import { T as retryTransient, _ as isTrustedSender, c as classifySignalContent } from "./repeats-Dj_o6c-X-CliyH3ge.js";
1
+ import { T as retryTransient, _ as isTrustedSender, c as classifySignalContent } from "./repeats-Dj_o6c-X-x61TNLz-.js";
2
2
  // src/oclif/presence-provenance.ts
3
3
  function readPresenceProjection(detail) {
4
4
  if (!detail || typeof detail !== "object") return null;
@@ -57,6 +57,17 @@ function tryOwnSharedMail(store) {
57
57
  lastMailCheckAt: null
58
58
  };
59
59
  let closed = false;
60
+ const status = () => {
61
+ if (closed) return null;
62
+ const raw = readMailJson(path);
63
+ if (raw === null) throw invalidSharedMail();
64
+ const saved = ownerRecord(raw);
65
+ if (saved.generation !== current.generation || saved.pid !== current.pid || saved.identity !== current.identity || saved.ready !== current.ready || saved.gapCount !== current.gapCount || saved.lastGapReason !== current.lastGapReason || saved.lastMailCheckAt !== current.lastMailCheckAt) throw invalidSharedMail();
66
+ return {
67
+ ...current,
68
+ alive: true
69
+ };
70
+ };
60
71
  try {
61
72
  writeMailJson(path, current);
62
73
  } catch (error) {
@@ -77,6 +88,7 @@ function tryOwnSharedMail(store) {
77
88
  };
78
89
  return {
79
90
  generation: current.generation,
91
+ status,
80
92
  markReady(status = {}) {
81
93
  markStatus({
82
94
  ...status,
@@ -1,15 +1,15 @@
1
- import { Gn as sendEmail, S as describeApiFailure, h as sendPreparedSignal, ht as createEndpoint, p as prepareSignalEmail, wn as listSentEmails, zt as getEmail } from "./repeats-Dj_o6c-X-CliyH3ge.js";
2
- import { M as bareAddress, ft as classifySendError, kt as successfulSendOutcome, s as extractErrorPayload } from "./api-command-DXiAX_N2.js";
1
+ import { Gn as sendEmail, S as describeApiFailure, h as sendPreparedSignal, ht as createEndpoint, p as prepareSignalEmail, wn as listSentEmails, zt as getEmail } from "./repeats-Dj_o6c-X-x61TNLz-.js";
2
+ import { Et as successfulSendOutcome, k as bareAddress, lt as classifySendError, s as extractErrorPayload } from "./api-command-Dm1BKxOr.js";
3
3
  import { recordSentSignal } from "./oclif/auto-signals.js";
4
4
  import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, n as invalidSharedMail, o as mailObject, p as syncMailDirectory, r as mailAddress, s as mailString, t as SharedMailStateError, v as compareListenProcessIdentity, x as listenProcessIdentity, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
5
- import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-CUy0Ta_y.js";
6
- import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-BAPMsFNv.js";
5
+ import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-Bss3OjFI.js";
6
+ import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-DdtgJOrV.js";
7
7
  import { Errors } from "@oclif/core";
8
8
  import { opendirSync } from "node:fs";
9
9
  import { createHash, randomUUID, scryptSync } from "node:crypto";
10
10
  import { dirname, join } from "node:path";
11
11
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
12
- // ../sdk-node/dist/api-DgSs0mmn.js
12
+ // ../sdk-node/dist/api-DNVymWBY.js
13
13
  const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
14
14
  function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
15
15
  let lastEventId;
@@ -1999,13 +1999,16 @@ async function openSharedMailReceiver(options) {
1999
1999
  let failure;
2000
2000
  let cleanupFailure;
2001
2001
  let active;
2002
+ let owned = null;
2002
2003
  function ensureOwner() {
2003
2004
  signal.throwIfAborted();
2004
2005
  if (failure !== void 0) throw failure;
2006
+ if (owned) return owned.status();
2005
2007
  const current = readSharedMailOwner(store);
2006
2008
  if (current?.alive || active) return current;
2007
2009
  const owner = tryOwnSharedMail(store);
2008
2010
  if (!owner) return readSharedMailOwner(store);
2011
+ owned = owner;
2009
2012
  active = runSharedMailTransport({
2010
2013
  apiClient: options.apiClient,
2011
2014
  subscription: store.subscriptionName,
@@ -2032,10 +2035,11 @@ async function openSharedMailReceiver(options) {
2032
2035
  cleanupFailure = error;
2033
2036
  failure ??= error;
2034
2037
  } finally {
2038
+ owned = null;
2035
2039
  active = void 0;
2036
2040
  }
2037
2041
  });
2038
- return readSharedMailOwner(store);
2042
+ return owner.status();
2039
2043
  }
2040
2044
  function watch(deadline) {
2041
2045
  const stop = new AbortController();
@@ -2052,7 +2056,7 @@ async function openSharedMailReceiver(options) {
2052
2056
  return {
2053
2057
  store,
2054
2058
  signal,
2055
- status: () => readSharedMailOwner(store),
2059
+ status: () => owned ? owned.status() : readSharedMailOwner(store),
2056
2060
  async ready(deadline) {
2057
2061
  while (deadline == null || Date.now() < deadline) {
2058
2062
  const watching = watch(deadline);
@@ -145,10 +145,10 @@ email interactions; no separate interaction endpoint is required.
145
145
  The organization owner can manage broader rules through their normal CLI login:
146
146
 
147
147
  ```sh
148
- primitive contacts get-contact-policy
149
- primitive contacts put-contact-policy --body-file <policy-file>
150
- primitive contacts get-agent-contact-policy --agent-address agent@example.com
151
- primitive contacts put-agent-contact-policy --agent-address agent@example.com --body-file <policy-file>
148
+ primitive contacts get-policy
149
+ primitive contacts set-policy --body-file <policy-file>
150
+ primitive contacts get-agent-policy --agent-address agent@example.com
151
+ primitive contacts set-agent-policy --agent-address agent@example.com --body-file <policy-file>
152
152
  ```
153
153
 
154
154
  Writes replace the document's `rules` and `allow_contact_requests`, with exactly
@@ -31,7 +31,7 @@ CLI equivalents:
31
31
 
32
32
  ```sh
33
33
  primitive agent contacts list
34
- primitive agent contacts add person@example.com --purpose "Project coordination" --notify
34
+ primitive agent contacts create person@example.com --purpose "Project coordination" --notify
35
35
  primitive agent contacts update person@example.com --no-notify
36
36
  ```
37
37
 
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "primitive-connect",
3
- "version": "078bd8f84619ab6c",
3
+ "version": "a2e1e9de1cb60b4c",
4
4
  "source": {
5
5
  "repository": "https://github.com/primitivedotdev/skills",
6
6
  "path": "skills/primitive-connect",
7
- "commit": "46bd9ca38d9edea664d78d08a4cae0a8536438b3"
7
+ "commit": "a178a469ed1310b58bf4f5ce2a15c17c30799edc"
8
8
  },
9
9
  "files": {
10
10
  "SKILL.md": "37d40b66010319c6a176bc8eb66affd93cab0968c609ad523dac087d3077d29d",
@@ -13,8 +13,8 @@
13
13
  "references/collaboration.md": "b9c599bf66ae58ea8c779cdceddb11882cc9f0da2fba0e4ca363ad8d01d64d5b",
14
14
  "references/communication.md": "d9599e3c563a4cd1c7dd658f730306b669f7ad6522b3632dc55fd5feee60cd30",
15
15
  "references/connect.md": "46d3e62e6b021100a0ddf84269bcb59a1725a3da4e360c797f378ce13cf5c4ec",
16
- "references/contact-requests.md": "a6afb51ec2cd0bf807095e034942c6e81c82c8b8489a3e2464cd8ce9f4c28d43",
17
- "references/contacts.md": "f85c7feea0e426f4f33b45df25016130b5766265fe10cdbe79d6cd8c45361763",
16
+ "references/contact-requests.md": "f4931e611dfe95b988010fd4547b2b66e845f1f76c202719602ff6be9e6d7508",
17
+ "references/contacts.md": "353dff4497e703325d496bf7e48b8cd37ee64c3ef305f895f3d669ebd76ad2a2",
18
18
  "references/conversations.md": "c8a1125db76e40e8bf2e550223e4d4e1a86536ca43ccdd835024f6d6502098a7",
19
19
  "references/external-services.md": "211e03cec546d2f83c78bd38985cc64203272df47eb52cf1bdce885bceee3089",
20
20
  "references/manual-setup.md": "433f111c425cb976d153e22c851064e2e730f45229d8747ec91827f3a76b5d0e",
package/man/primitive.1 CHANGED
@@ -120,9 +120,9 @@ Remove a destination using
120
120
  .SH LOCAL WEBHOOK API
121
121
  .PP
122
122
  The generated commands
123
- .B endpoints pull-webhook-event
123
+ .B endpoints pull-event
124
124
  and
125
- .B endpoints complete-webhook-event
125
+ .B endpoints complete-event
126
126
  expose local webhook delivery on API hosts where it is enabled. Each command
127
127
  makes one API request. Use their --help-full output for the input fields. Consumers
128
128
  deduplicate event IDs and report the outcome with the returned attempt and lease.
@@ -195,7 +195,7 @@ Run
195
195
  to remove local credentials, pending email-code auth state, and stale credential locks without contacting Primitive.
196
196
  .PP
197
197
  Where the server supports it, browser login logs you in as yourself. Run
198
- .B primitive orgs
198
+ .B primitive org list
199
199
  to list your organizations and whether the CLI may be used in each, and
200
200
  .B primitive org use ORG
201
201
  to switch by name or id. Pass
@@ -266,7 +266,7 @@ server decides which header names are allowed.
266
266
  Schedule the send for TIME (ISO 8601 with Z or a UTC offset). Cancel it before
267
267
  then with primitive sent cancel --id ID or --idempotency-key KEY.
268
268
  .TP
269
- .B primitive domains add DOMAIN
269
+ .B primitive domains create DOMAIN
270
270
  Start a custom-domain claim.
271
271
  .TP
272
272
  .B primitive domains verify --id DOMAIN_ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primitivedotdev/cli",
3
- "version": "3.0.0-preview.20",
3
+ "version": "3.0.0-preview.22",
4
4
  "publishConfig": {
5
5
  "tag": "preview"
6
6
  },
@@ -43,6 +43,7 @@
43
43
  },
44
44
  "dirname": "primitive",
45
45
  "hooks": {
46
+ "prerun": "./dist/oclif/command-stdin.js",
46
47
  "command_not_found": "./dist/oclif/command-not-found.js"
47
48
  },
48
49
  "plugins": [
@@ -98,7 +99,7 @@
98
99
  "description": "Check inbound email setup and readiness, and work through mail awaiting your reply. Prefer `primitive inbox setup` for a guided setup path, `primitive inbox status` for the readiness table, and `primitive inbox next` for the oldest email awaiting your reply."
99
100
  },
100
101
  "emails": {
101
- "description": "List, inspect, and wait for received emails, and see what the classifier read from one. Prefer task aliases like `primitive emails list`, `primitive emails get`, `primitive emails latest`, `primitive emails facts`, `primitive emails wait`, and `primitive emails watch`; generated API names remain available for compatibility. For a one-line-per-email table, `primitive emails latest --limit 100`."
102
+ "description": "List, inspect, and wait for received emails, and see what the classifier read from one. Prefer task aliases like `primitive emails list`, `primitive emails get`, `primitive emails latest`, `primitive emails facts`, `primitive emails wait`, and `primitive emails watch`. For a one-line-per-email table, `primitive emails latest --limit 200`; continue with `--cursor <cursor>`."
102
103
  },
103
104
  "search": {
104
105
  "description": "Cross-corpus semantic search. Prefer `primitive search <query>` for lexical inbound search and `primitive semantic-search <query>` for meaning-aware ranking across inbound and outbound.",
@@ -120,7 +121,7 @@
120
121
  "description": "Short aliases for outbound sent-email history: `primitive sent list`, `primitive sent get`, and `primitive sent delete --id <id>`. Deleting sender history does not recall delivery."
121
122
  },
122
123
  "threads": {
123
- "description": "Inspect conversation threads spanning received and sent emails. Prefer `primitive threads get --id <thread-id>`; generated API name `primitive threads get-thread --id <thread-id>` remains available."
124
+ "description": "Inspect conversation threads spanning received and sent emails. Prefer `primitive threads get --id <thread-id>`."
124
125
  },
125
126
  "endpoints": {
126
127
  "description": "Manage webhook endpoints that receive email events"
@@ -135,25 +136,25 @@
135
136
  "description": "Short aliases for webhook delivery attempts: `primitive deliveries list` and `primitive deliveries replay`."
136
137
  },
137
138
  "functions": {
138
- "description": "Deploy JavaScript handlers that run on inbound mail. Prefer `primitive functions templates`, `primitive functions init`, `primitive functions deploy`, `primitive functions redeploy`, `primitive functions list`, `primitive functions get`, `primitive functions logs`, and `primitive functions set-secret`; generated API names remain available for compatibility."
139
+ "description": "Deploy JavaScript handlers that run on inbound mail. Prefer `primitive functions templates`, `primitive functions init`, `primitive functions deploy`, `primitive functions redeploy`, `primitive functions list`, `primitive functions get`, `primitive functions logs`, and `primitive functions set-secret`."
139
140
  },
140
141
  "memories": {
141
142
  "description": "Store durable JSON memories by key. Use `primitive memories set|get|delete|search`; pass `--function <function-id>` for function-scoped memories."
142
143
  },
143
144
  "templates": {
144
- "description": "Browse and install Function templates. Use `primitive templates list-templates`, `primitive templates get-template`, `primitive templates install-template`, and `primitive templates get-template-install`."
145
+ "description": "Browse and install Function templates. Use `primitive templates list`, `primitive templates get`, `primitive templates install`, and `primitive templates get-install`."
145
146
  },
146
147
  "org": {
147
- "description": "Switch the CLI between your organizations (`primitive org use <org>`, list them with `primitive orgs`), manage org-level (global) resources shared across functions, or leave the organization"
148
+ "description": "Switch the CLI between your organizations (`primitive org use <org>`, list them with `primitive org list`), manage org-level (global) resources shared across functions, or leave the organization"
148
149
  },
149
150
  "org:secrets": {
150
- "description": "Global secrets shared across every function. Use `primitive org secrets list|set|remove`. Changes land in a function on its next redeploy; a function secret of the same name overrides the global."
151
+ "description": "Global secrets shared across every function. Use `primitive org secrets list|set|delete`. Changes land in a function on its next redeploy; a function secret of the same name overrides the global."
151
152
  },
152
153
  "keys": {
153
154
  "description": "Organization API keys: list and show them (metadata only, never secrets), create, rotate and change them (with browser approval where your organization requires it), and revoke them."
154
155
  },
155
156
  "roles": {
156
- "description": "Read roles, members, groups, mailbox access and the access mode. Use `primitive roles list|members|groups|mailbox-access|access-mode`; generated API names remain available."
157
+ "description": "Read roles, members, groups, mailbox access and the access mode. Use `primitive roles list|groups|mailbox-access|access-mode` and `primitive members list`."
157
158
  },
158
159
  "projects": {
159
160
  "description": "Organization people, shared projects and project invitations"
@@ -171,7 +172,7 @@
171
172
  "description": "Your connected apps and CLI logins, the organization's connected apps, name, logo, search settings and billing"
172
173
  },
173
174
  "members": {
174
- "description": "List the organization's members and their roles. Use `primitive members list` (the same as `primitive roles members`)."
175
+ "description": "List the organization's members and their roles. Use `primitive members list`."
175
176
  },
176
177
  "roles-and-members": {
177
178
  "description": "Roles, member roles and removal, the mailbox access mode, break-glass, transfers and suspensions, and leaving the organization"
@@ -189,7 +190,7 @@
189
190
  "description": "Received and sent mail per hour, and how webhook deliveries ended"
190
191
  },
191
192
  "activity": {
192
- "description": "Where you learn what others asked of you and did to your mail: `primitive activity asked` (rule requests for your mail and objections to your rules), `primitive activity concerning` (other members' rules that started covering your mail or changed), and `primitive activity created` (what you created, including your requests and how they were decided). `primitive doctor` sums up what is waiting for you."
193
+ "description": "Where you learn what others asked of you and did to your mail: `primitive activity asked` (rule requests for your mail and objections to your rules), `primitive activity concerning` (other members' rules that started covering your mail or changed), and `primitive activity created` (what you created, including your requests and how they were decided)."
193
194
  },
194
195
  "email-rules": {
195
196
  "description": "Rules written in plain English that pick out received mail"
@@ -198,7 +199,7 @@
198
199
  "description": "The email rules that reach your own mailboxes, whoever wrote them, read-only, and objections asking a rule's author to turn it off"
199
200
  },
200
201
  "routes": {
201
- "description": "Manage recipient routes. Bind an address pattern to an endpoint or function: `primitive routes add alice@d --function <id>`, `primitive routes list`, `primitive routes test <recipient>`, `primitive routes remove <id>`."
202
+ "description": "Manage recipient routes. Bind an address pattern to an endpoint or function: `primitive routes create alice@d --function <id>`, `primitive routes list`, `primitive routes test <recipient>`, `primitive routes delete <id>`."
202
203
  },
203
204
  "repeat": {
204
205
  "description": "Act on a message that repeats to you. Use `primitive repeat stop --id <email-id>` when it is no longer needed."
@@ -219,7 +220,7 @@
219
220
  "description": "Receive events locally as JSONL with JSON status responses by default; --json is accepted explicitly. Use --exec or --forward-to, or deliver external mail events as tool output, never user messages, to an exact loaded native session using --notify-session with --contacts or approved --sender addresses. Add --email-id to --status to explain one received email. Add --contact-requests for owner-enabled structured first-contact intake. Use --background for independent receiving, --status --notify-session for current receiver health and durable receipts, or --stop --notify-session to stop only that receiver. Verified presence controls use no model turns and do not consume --once or --number."
220
221
  },
221
222
  "contacts": {
222
- "description": "Shared organization contacts plus structured request, accept, and wait commands for connected agents. Directory list, get, add, update, and remove use conditional versions. Commands return JSON by default and accept explicit --json."
223
+ "description": "Shared organization contacts plus structured request, accept, and wait commands for connected agents. Directory list, get, create, update, and delete use conditional versions. Commands return JSON by default and accept explicit --json."
223
224
  },
224
225
  "agent:contacts": {
225
226
  "description": "Contacts and notification preferences for one agent address. Connected profiles default to their own address. Commands return JSON by default and accept explicit --json."