primcli 1.62.0 → 1.63.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/README.md CHANGED
@@ -1134,15 +1134,22 @@ and `body_text`, fenced and labelled untrusted. With `--json` it prints one
1134
1134
  object with `envelope`, `subject` and `body_text`.
1135
1135
 
1136
1136
  `primitive emails get --id <id> --compact` is the smallest read, for keeping
1137
- an email cheap in a model's context. It prints one JSON object with `id`,
1138
- `thread_id`, `received_at`, `from`, `to`, `subject`, `body_text` and
1139
- `attachments` (filename, content type, size and part index). Quoted history
1140
- below a reply is removed and counted in `quoted_chars_removed`, and an email
1141
- with no text part has its HTML reduced to text (`body_source` is then `html`).
1142
- The HTML body, authentication results, routing and webhook delivery state are
1143
- left out. It makes one request and sends no signal. Use `--context` instead when
1144
- a connected agent needs to know who the sender is to it and how to answer; the
1145
- two flags cannot be combined.
1137
+ an email cheap in a model's context. It prints the server's readable read as
1138
+ one JSON object: `id`, `thread_id`, `received_at`, `from`, `to`, `subject`,
1139
+ `preheader`, `body_text`, `attachments` (filename, content type, size and part
1140
+ index) and the counts below. Hidden content, layout and quoted reply history
1141
+ are removed by the server (`quoted_chars_removed` counts the history), and
1142
+ every link in `body_text` is a `[n]` marker. `link_count` says how many links
1143
+ there are; `--links all` or `--links 1,2,3` adds their targets as `links`
1144
+ (`[{ "n": 1, "url": "..." }]`). A long body arrives in pages of `--max-chars`
1145
+ characters (500 to 100000, default 16000): when `body_next_offset` is not null,
1146
+ run the same command with `--offset <body_next_offset>` for the next page.
1147
+ `body_incomplete` is true when the stored body was itself cut short, so the
1148
+ text ends before the message did. The three flags need `--compact`. It makes
1149
+ one request and sends no signal. Against a server that does not offer the
1150
+ readable read yet, the CLI prints its own local compact view instead and says
1151
+ so on stderr. Use `--context` instead when a connected agent needs to know who
1152
+ the sender is to it and how to answer; the two flags cannot be combined.
1146
1153
 
1147
1154
  The envelope also carries `interaction` (the server's `interaction_hint`,
1148
1155
  `interaction_kind` and `fyi`, plus a `category` and whether a plain reply
@@ -1,4 +1,4 @@
1
- import { b as __exportAll } from "./repeats-x4QM2yoG-De3MV3st.js";
1
+ import { b as __exportAll } from "./repeats-x4QM2yoG-DTpqXyRo.js";
2
2
  import { C as resolveCliAuth, F as agentProfilesDirectory, G as createClient, H as requireDefaultLoginProfile, K as createConfig, N as agentProfileDirectory, R as loadConnectedAgentProfile, S as normalizeApiBaseUrl, T as saveSignupCredentials, W as PrimitiveApiClient, _ as deleteCliCredentials, c as resolveConfigEnvironment, d as validateCliHeaderName, f as validateCliHeaderValue, i as loadCliConfig, j as AGENT_PROFILE_ENV, m as cliAccessTokenExpiresAt, p as acquireCliCredentialsLock, w as saveCliCredentials, x as loadCliCredentials, y as detectPrimitiveKeyEnvMisname } from "./cli-config-DMszFbGn.js";
3
3
  import { h as writeMailJson, m as withMailLock, p as syncMailDirectory, u as privateMailPermissions } from "./shared-mail-files-MwlVE90c.js";
4
4
  import { Command, Errors, Flags } from "@oclif/core";
@@ -316,7 +316,13 @@ const verifyAgentSignup = (options) => (options.client ?? client).post({
316
316
  * addresses that have already sent it authenticated mail) with tight send
317
317
  * limits. Use the returned `api_key` as a Bearer token on later calls. The
318
318
  * account can be upgraded to a full developer account by confirming an
319
- * email through the claim flow. This endpoint does not require an API key.
319
+ * email through the claim flow. Upgrading raises the send cap and grants
320
+ * the developer plan's default features (such as Functions); it does not
321
+ * unlock sending to arbitrary recipients, because the recipient rules on
322
+ * the account still apply. `GET /send-permissions` reports those rules
323
+ * (its list of individual addresses can be partial), and
324
+ * `POST /sendability` answers for one specific recipient. This endpoint
325
+ * does not require an API key.
320
326
  *
321
327
  */
322
328
  const createAgentAccount = (options) => (options.client ?? client).post({
@@ -356,8 +362,13 @@ const startAgentClaim = (options) => (options.client ?? client).post({
356
362
  *
357
363
  * Confirms the verification code emailed by `/agent/claim/start` and
358
364
  * upgrades the account to the `developer` plan. The org id, API key, and
359
- * managed inbox all carry over; the send cap lifts. Authenticated by the
360
- * agent's own API key.
365
+ * managed inbox all carry over; the send cap lifts and the developer
366
+ * plan's default features (such as Functions) unlock. Upgrading does not
367
+ * unlock sending to arbitrary recipients: the recipient rules on the
368
+ * account still apply. `GET /send-permissions` reports those rules (its
369
+ * list of individual addresses can be partial), and `POST /sendability`
370
+ * answers for one specific recipient. Authenticated by the agent's own
371
+ * API key.
361
372
  *
362
373
  */
363
374
  const verifyAgentClaim = (options) => (options.client ?? client).post({
@@ -5133,7 +5144,7 @@ function savedConnectedProfiles(configDir, exclude) {
5133
5144
  */
5134
5145
  async function otherProfiles(configDir, session, current) {
5135
5146
  if (session) try {
5136
- const { connectedProfilesForSession } = await import("./machine-session-Bdr3jFm4.js").then((n) => n.s);
5147
+ const { connectedProfilesForSession } = await import("./machine-session-NjXIXTRX.js").then((n) => n.s);
5137
5148
  return {
5138
5149
  inSession: true,
5139
5150
  profiles: connectedProfilesForSession(configDir, session, current)
@@ -1,9 +1,9 @@
1
- import { b as __exportAll } from "./repeats-x4QM2yoG-De3MV3st.js";
1
+ import { b as __exportAll } from "./repeats-x4QM2yoG-DTpqXyRo.js";
2
2
  import { B as parseOwnerMemberAddress, F as agentProfilesDirectory, I as connectedAgentIdentity, L as connectedApiBaseUrl, M as AgentConnectionSetupError, N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, U as saveConnectedAgentProfile, V as profileAlreadyConnectedMessage, W as PrimitiveApiClient, j as AGENT_PROFILE_ENV, x as loadCliCredentials, z as parseConnectedAgentProfile } from "./cli-config-DMszFbGn.js";
3
- import { Ct as cliInvocation, Jn as putAgentContactPolicy, Jt as refreshStoredCliCredentials, Pn as listDomains, Tt as defaultConnectionName, Vn as listSentEmails, Yn as putContact, an as deleteAgentContact, ar as sendEmail, jn as listContacts, kn as listAgentContacts, mn as getContact, nr as searchEmails, on as deleteContact, pn as getAgentContactPolicy, qn as putAgentContact, vn as getEmail } from "./api-command-Bj8WyqXK.js";
3
+ import { Ct as cliInvocation, Jn as putAgentContactPolicy, Jt as refreshStoredCliCredentials, Pn as listDomains, Tt as defaultConnectionName, Vn as listSentEmails, Yn as putContact, an as deleteAgentContact, ar as sendEmail, jn as listContacts, kn as listAgentContacts, mn as getContact, nr as searchEmails, on as deleteContact, pn as getAgentContactPolicy, qn as putAgentContact, vn as getEmail } from "./api-command-CDjvGDQS.js";
4
4
  import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, g as ListenStateError, h as writeMailJson, i as mailId, l as privateMailDirectory, o as mailObject, r as mailAddress, s as mailString } from "./shared-mail-files-MwlVE90c.js";
5
- import { _ as detectAgentRuntime, a as NotificationRetryError, d as defaultSessionSocket, f as NativeSessionDisconnectedError, l as SESSION_UUID, t as notificationScope, u as connectNativeSession, v as installConnectSkill, x as readBundledConnectSkill } from "./notify-session-anckNIzA.js";
6
- import { a as scopedChatSenderTrust } from "./scoped-chat-C7cpIxVS.js";
5
+ import { _ as detectAgentRuntime, a as NotificationRetryError, d as defaultSessionSocket, f as NativeSessionDisconnectedError, l as SESSION_UUID, t as notificationScope, u as connectNativeSession, v as installConnectSkill, x as readBundledConnectSkill } from "./notify-session-7JzG7GNX.js";
6
+ import { a as scopedChatSenderTrust } from "./scoped-chat-BvkUTggT.js";
7
7
  import { l as stopBackgroundListen, r as backgroundListenStatus } from "./listen-background--0peztKE.js";
8
8
  import { t as readSharedMailOwner } from "./shared-mail-watch-DtKpsgg8.js";
9
9
  import { accessSync, chmodSync, closeSync, constants, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
@@ -1,5 +1,5 @@
1
- import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, v as parseWebhookEvent } from "./repeats-x4QM2yoG-De3MV3st.js";
2
- import { F as wakeReadCommand, P as skillFirstLine, Y as wakeInteractionSentence, dn as downloadEmailAttachmentPart } from "./api-command-Bj8WyqXK.js";
1
+ import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, v as parseWebhookEvent } from "./repeats-x4QM2yoG-DTpqXyRo.js";
2
+ import { F as wakeReadCommand, P as skillFirstLine, Y as wakeInteractionSentence, dn as downloadEmailAttachmentPart } from "./api-command-CDjvGDQS.js";
3
3
  import { _ as acquireListenLock, g as ListenStateError, y as listenIdentity } from "./shared-mail-files-MwlVE90c.js";
4
4
  import { closeSync, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, opendirSync, readFileSync, readdirSync, readlinkSync, renameSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import { createHash, randomUUID, scryptSync } from "node:crypto";
@@ -1,6 +1,6 @@
1
- import { A as readThreadContext, En as getSentEmail, Kt as createAuthenticatedCliApiClient } from "../api-command-Bj8WyqXK.js";
1
+ import { A as readThreadContext, En as getSentEmail, Kt as createAuthenticatedCliApiClient } from "../api-command-CDjvGDQS.js";
2
2
  import { _ as acquireListenLock } from "../shared-mail-files-MwlVE90c.js";
3
- import { t as sendSignal } from "../signal-command-DWKXZSsI.js";
3
+ import { t as sendSignal } from "../signal-command-50rw5Sh-.js";
4
4
  import { AUTO_SIGNAL_KIND_ENV, AUTO_WORKING_RENEW_MS, autoSignalsDisabled, clearWorkingSending, markWorkingSending, readAutoClaim, readWorkingLease, recordRenewer, stopWorkingLease, writeWorkingLease } from "./auto-signals.js";
5
5
  import { join } from "node:path";
6
6
  import { homedir } from "node:os";
@@ -1,5 +1,5 @@
1
1
  import { d as readMailJson, h as writeMailJson, i as mailId, l as privateMailDirectory, r as mailAddress } from "../shared-mail-files-MwlVE90c.js";
2
- import { a as scopedChatSenderTrust, n as isPlainChatReply } from "../scoped-chat-C7cpIxVS.js";
2
+ import { a as scopedChatSenderTrust, n as isPlainChatReply } from "../scoped-chat-BvkUTggT.js";
3
3
  import { existsSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { join } from "node:path";