primcli 1.46.0 → 1.48.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 +2 -2
- package/dist/{api-command-CZGBgE5W.js → api-command-DzQ8KxD9.js} +25 -21
- package/dist/{connect-skill-BkWye3gd.js → connect-skill-DHPc9dVN.js} +1 -1
- package/dist/{machine-session-nMJA9Q3F.js → machine-session-BaJ1Xmdm.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/index.js +119 -104
- package/dist/oclif/receiver-heal.js +1 -1
- package/dist/oclif/root-signup-hint.js +0 -1
- package/dist/{signal-command-D8_oaLYi.js → signal-command-BbeV2Nd8.js} +2 -2
- package/dist/skills/primitive-connect/SKILL.md +11 -7
- package/dist/skills/primitive-connect.json +3 -3
- package/man/primitive.1 +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -167,11 +167,11 @@ is complete.
|
|
|
167
167
|
|
|
168
168
|
Use `primitive signin` or `primitive login` for existing accounts. With no email, both use browser approval; `primitive signin browser` and `primitive login browser` are the explicit browser forms.
|
|
169
169
|
|
|
170
|
-
Use `primitive signin <email> --
|
|
170
|
+
Use `primitive signin <email> --accept-terms`, then `primitive signin confirm <email> <code>` for email-code sign-in. `primitive login <email>` and `primitive otp <email>` support the same email-code flow with matching `confirm` and `resend` subcommands.
|
|
171
171
|
|
|
172
172
|
Use `primitive logout --force` to remove local CLI credentials, pending email-code auth state, and stale credential locks without contacting Primitive. This is the recovery command when an interrupted auth command leaves the CLI saying another credential operation is already in progress.
|
|
173
173
|
|
|
174
|
-
Use `primitive signup <email>` for new account creation, then `primitive signup confirm <email> <code>` with the emailed verification code. Non-interactive signup is available with `--accept-terms
|
|
174
|
+
Use `primitive signup <email>` for new account creation, then `primitive signup confirm <email> <code>` with the emailed verification code. Non-interactive signup is available with `--accept-terms`.
|
|
175
175
|
|
|
176
176
|
## Reply state and the agent loop
|
|
177
177
|
|
|
@@ -211,9 +211,8 @@ const pollCliLogin = (options) => (options.client ?? client).post({
|
|
|
211
211
|
/**
|
|
212
212
|
* Start CLI account signup
|
|
213
213
|
*
|
|
214
|
-
* Starts a terminal-native CLI signup.
|
|
215
|
-
*
|
|
216
|
-
* session, sends an email verification code, and returns an opaque
|
|
214
|
+
* Starts a terminal-native CLI signup. The API creates a pending
|
|
215
|
+
* signup session, sends an email verification code, and returns an opaque
|
|
217
216
|
* signup token used by the resend and verify steps. This endpoint
|
|
218
217
|
* does not require an API key.
|
|
219
218
|
*
|
|
@@ -245,11 +244,9 @@ const resendCliSignupVerification = (options) => (options.client ?? client).post
|
|
|
245
244
|
* Verify CLI signup and create OAuth session
|
|
246
245
|
*
|
|
247
246
|
* Verifies the email code for a CLI signup session and creates the
|
|
248
|
-
* account.
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
* is created and the token set is returned exactly once. This
|
|
252
|
-
* endpoint does not require an API key.
|
|
247
|
+
* account. An org-scoped OAuth CLI session is created and the
|
|
248
|
+
* token set is returned exactly once. This endpoint does not
|
|
249
|
+
* require an API key.
|
|
253
250
|
*
|
|
254
251
|
*/
|
|
255
252
|
const verifyCliSignup = (options) => (options.client ?? client).post({
|
|
@@ -263,9 +260,8 @@ const verifyCliSignup = (options) => (options.client ?? client).post({
|
|
|
263
260
|
/**
|
|
264
261
|
* Start agent account signup
|
|
265
262
|
*
|
|
266
|
-
* Starts an agent-native signup session.
|
|
267
|
-
*
|
|
268
|
-
* session, sends an email verification code, and returns an opaque
|
|
263
|
+
* Starts an agent-native signup session. The API creates a pending
|
|
264
|
+
* signup session, sends an email verification code, and returns an opaque
|
|
269
265
|
* signup token used by the resend and verify steps. This endpoint
|
|
270
266
|
* does not require an API key.
|
|
271
267
|
*
|
|
@@ -297,14 +293,10 @@ const resendAgentSignupVerification = (options) => (options.client ?? client).po
|
|
|
297
293
|
* Verify agent signup and create OAuth tokens
|
|
298
294
|
*
|
|
299
295
|
* Verifies the email code for an agent signup session and creates
|
|
300
|
-
* the account when needed.
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* returned exactly once. For existing users, the optional `org_id`
|
|
305
|
-
* selects which accessible workspace should receive the new
|
|
306
|
-
* session (no signup-code redemption is performed for existing
|
|
307
|
-
* users regardless of how the session was started).
|
|
296
|
+
* the account when needed. An org-scoped OAuth session for CLI
|
|
297
|
+
* authentication is minted and the raw tokens are returned exactly
|
|
298
|
+
* once. For existing users, the optional `org_id` selects which
|
|
299
|
+
* accessible workspace should receive the new session.
|
|
308
300
|
*
|
|
309
301
|
*/
|
|
310
302
|
const verifyAgentSignup = (options) => (options.client ?? client).post({
|
|
@@ -1774,6 +1766,13 @@ const updateRepeatingSend = (options) => (options.client ?? client).patch({
|
|
|
1774
1766
|
* attempt, including gate-denied attempts that the agent
|
|
1775
1767
|
* never called and rows still in `queued` state.
|
|
1776
1768
|
*
|
|
1769
|
+
* Under an address-bound agent connection credential, the
|
|
1770
|
+
* list holds this agent's own sends plus delivered sends from
|
|
1771
|
+
* other addresses in the org that name this agent in to, cc
|
|
1772
|
+
* or bcc and have matching inbound delivery evidence at this
|
|
1773
|
+
* agent. Pass `from` with the agent's own address to list
|
|
1774
|
+
* only its own sends.
|
|
1775
|
+
*
|
|
1777
1776
|
* For inbound mail received at your verified domains, see
|
|
1778
1777
|
* /emails. There is no unified send/receive history endpoint;
|
|
1779
1778
|
* the two surfaces are intentionally separate because the
|
|
@@ -1828,6 +1827,11 @@ const deleteSentEmail = (options) => (options.client ?? client).delete({
|
|
|
1828
1827
|
* SMTP response on a `bounced` row or pulling the gate
|
|
1829
1828
|
* denial detail on a `gate_denied` row.
|
|
1830
1829
|
*
|
|
1830
|
+
* Under an address-bound agent connection credential, only
|
|
1831
|
+
* ids in the same scope as /sent-emails resolve: this agent's
|
|
1832
|
+
* own sends, and delivered sends addressed to it with
|
|
1833
|
+
* matching inbound delivery evidence. Other ids return 404.
|
|
1834
|
+
*
|
|
1831
1835
|
*/
|
|
1832
1836
|
const getSentEmail = (options) => (options.client ?? client).get({
|
|
1833
1837
|
security: [{
|
|
@@ -4879,7 +4883,7 @@ function savedConnectedProfiles(configDir, exclude) {
|
|
|
4879
4883
|
*/
|
|
4880
4884
|
async function otherProfiles(configDir, session, current) {
|
|
4881
4885
|
if (session) try {
|
|
4882
|
-
const { connectedProfilesForSession } = await import("./machine-session-
|
|
4886
|
+
const { connectedProfilesForSession } = await import("./machine-session-BaJ1Xmdm.js").then((n) => n.s);
|
|
4883
4887
|
return {
|
|
4884
4888
|
inSession: true,
|
|
4885
4889
|
profiles: connectedProfilesForSession(configDir, session, current)
|
|
@@ -5552,7 +5556,7 @@ const OPERATION_HINTS = {
|
|
|
5552
5556
|
getMemory: "Tip: prefer `primitive memories get <key> [--function <function-id>]` for the common read path.",
|
|
5553
5557
|
deleteMemory: "Tip: prefer `primitive memories delete <key> [--function <function-id>]` for the common delete path.",
|
|
5554
5558
|
searchMemories: "Tip: prefer `primitive memories search [prefix] [--metadata-only] [--function <function-id>]` for the common search path.",
|
|
5555
|
-
startAgentSignup: "Tip: pass --terms-accepted
|
|
5559
|
+
startAgentSignup: "Tip: pass --terms-accepted. Capture the signup_token from the response and feed it to `primitive agent verify-agent-signup --signup-token <token> --verification-code <6-digit-code>` (the verify flag accepts --code as an alias). The high-level `primitive signup <email>` command walks an interactive user through both steps with friendlier prompts.",
|
|
5556
5560
|
verifyAgentSignup: "Tip: pass --verification-code <code> (or --code; both work). The response carries OAuth tokens but not your assigned inbox domain; run `primitive domains list` (or `primitive whoami`) after success to see the managed *.primitive.email address that routes to this account."
|
|
5557
5561
|
};
|
|
5558
5562
|
const OPERATION_FLAG_ALIASES = { verifyAgentSignup: { verification_code: ["code"] } };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as wakeReadCommand, Zt as downloadEmailAttachmentPart, q as wakeInteractionSentence } from "./api-command-
|
|
1
|
+
import { P as wakeReadCommand, Zt as downloadEmailAttachmentPart, q as wakeInteractionSentence } from "./api-command-DzQ8KxD9.js";
|
|
2
2
|
import { _ as acquireListenLock, g as ListenStateError, y as listenIdentity } from "./shared-mail-files-SPPcis9g.js";
|
|
3
3
|
import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, v as parseWebhookEvent } from "./repeats-D2xtLium-DdiJECLI.js";
|
|
4
4
|
import { closeSync, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, opendirSync, readFileSync, readdirSync, readlinkSync, renameSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-CNZpIYwj.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-DGrZCUfw.js";
|
|
3
|
-
import { $t as getAgentContactPolicy, Dn as listSentEmails, Fn as putContact, Gn as sendEmail, Gt as deleteAgentContact, Hn as searchEmails, Kt as deleteContact, Nn as putAgentContact, Pn as putAgentContactPolicy, Pt as refreshStoredCliCredentials, _n as listContacts, bn as listDomains, en as getContact, hn as listAgentContacts, in as getEmail } from "./api-command-
|
|
3
|
+
import { $t as getAgentContactPolicy, Dn as listSentEmails, Fn as putContact, Gn as sendEmail, Gt as deleteAgentContact, Hn as searchEmails, Kt as deleteContact, Nn as putAgentContact, Pn as putAgentContactPolicy, Pt as refreshStoredCliCredentials, _n as listContacts, bn as listDomains, en as getContact, hn as listAgentContacts, in as getEmail } from "./api-command-DzQ8KxD9.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-SPPcis9g.js";
|
|
5
|
-
import { a as readBundledConnectSkill, h as connectNativeSession, m as SESSION_UUID, n as detectAgentRuntime, o as notificationScope, r as installConnectSkill, u as NotificationRetryError } from "./connect-skill-
|
|
5
|
+
import { a as readBundledConnectSkill, h as connectNativeSession, m as SESSION_UUID, n as detectAgentRuntime, o as notificationScope, r as installConnectSkill, u as NotificationRetryError } from "./connect-skill-DHPc9dVN.js";
|
|
6
6
|
import { l as stopBackgroundListen, r as backgroundListenStatus } from "./listen-background-CyLc8VBn.js";
|
|
7
7
|
import { t as readSharedMailOwner } from "./shared-mail-watch-BUfUaq6j.js";
|
|
8
8
|
import { a as scopedChatSenderTrust } from "./scoped-chat-DhxtuNXs.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as readThreadContext, Mt as createAuthenticatedCliApiClient, fn as getSentEmail } from "../api-command-
|
|
1
|
+
import { A as readThreadContext, Mt as createAuthenticatedCliApiClient, fn as getSentEmail } from "../api-command-DzQ8KxD9.js";
|
|
2
2
|
import { _ as acquireListenLock } from "../shared-mail-files-SPPcis9g.js";
|
|
3
|
-
import { t as sendSignal } from "../signal-command-
|
|
3
|
+
import { t as sendSignal } from "../signal-command-BbeV2Nd8.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";
|
package/dist/oclif/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { A as saveActiveChatState, C as resolveCliAuth, D as deleteChatState, E as chatStatePath, F as agentProfilesDirectory, H as requireDefaultLoginProfile, M as AgentConnectionSetupError, N as agentProfileDirectory, O as loadActiveChatState, P as agentProfileName, R as loadConnectedAgentProfile, T as saveSignupCredentials, W as PrimitiveApiClient, _ as deleteCliCredentials, a as normalizeCliEnvironmentName, b as hasStoredCliLogin, c as resolveConfigEnvironment, g as credentialsPath, h as credentialsLockPath, i as loadCliConfig, j as AGENT_PROFILE_ENV, k as loadChatConversationByLocalId, l as saveCliConfig, m as cliAccessTokenExpiresAt, n as deleteCliConfig, o as redactCliEnvironment, p as acquireCliCredentialsLock, r as emptyCliConfig, s as removeCliEnvironment, u as upsertCliEnvironment, v as deleteCliCredentialsLock, w as saveCliCredentials, x as loadCliCredentials, y as detectPrimitiveKeyEnvMisname } from "../cli-config-DGrZCUfw.js";
|
|
2
|
-
import { $ as buildThrownSendFailureEnvelope, $n as stopRepeatFromEmail, $t as getAgentContactPolicy, A as readThreadContext, An as listWakeSchedules, At as queryUsesAutomated, B as recordPendingMail, Bn as resendAgentSignupVerification, Bt as createEndpoint, C as queryUsesAwaiting, Cn as listFunctionLogs, Ct as AutomatedFilterUnsupportedError, D as displayAddress, Dn as listSentEmails, Dt as expectedAutomatedVerdicts, E as describeWake, En as listRoutes, Et as ensureSearchReportsAutomated, F as wakeRecipientField, Ft as resolveCliApiRequestConfig, G as replyExpectation, Gn as sendEmail, H as interactionHumanLine, Hn as searchEmails, Ht as createRoute, I as wakeRelationship, In as redeemCreditCode, It as addDefaultNetworkMember, J as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, Jn as setMemory, Jt as deleteRoute, K as replyInteractionWarning, Kn as setFunctionRoute, L as clearReadPendingMail, Ln as removeDefaultNetworkMember, Lt as checkDefaultNetworkContactAdmission, M as serverMuted, Mn as pullWebhookEvent, Mt as createAuthenticatedCliApiClient, N as serverRelationship, Nt as createCliApiClient, O as formatWakeContext, On as listWakeAuthorizations, Ot as hasAutomatedVerdict, P as wakeReadCommand, Pt as refreshStoredCliCredentials, Q as buildFollowUpCommand, Qn as startCliLogin, Qt as getAccount, R as pendingMailPath, Rn as reorderRoutes, Rt as cliLogout, S as isAwaitingRejectedError, Sn as listEndpoints, St as AUTOMATED_VALUES, T as bareAddress, Tn as listRepeatingSends, Tt as automatedRejectedError, U as interactionNextActions, Un as searchMemories, Ut as createWakeAuthorization, V as removePendingMail, Vn as runWakeSchedule, Vt as createFunction, W as readEmailInteraction, Wn as semanticSearch, Wt as createWakeSchedule, X as apiResultHttpStatus, Xn as startAgentClaim, Xt as deleteWakeSchedule, Y as SEND_OUTCOME_HELP, Yn as simulateRoute, Yt as deleteWakeAuthorization, Z as assertValidIdempotencyKey, Zn as startAgentSignup, _ as awaitingRejectedError, _t as formatAlreadySentNotice, a as extractErrorCode, an as getFunction, ar as updateRoute, at as formatPriorRepliesWarning, b as formatRepliesCell, bn as listDomains, bt as AUTOMATED_FILTER_UNSUPPORTED_CODE, c as readTextFileFlag, cn as getInboxStatus, cr as verifyAgentClaim, ct as priorRepliesThatWentOut, d as writeErrorWithHints, dn as getRepeatingSend, dt as sendOutcomeExitCode, er as testFunction, et as checkPriorReplies, f as AWAITING_FLAG_DESCRIPTION, fn as getSentEmail, ft as sentHistoryWindowStart, g as assertAwaitingFilterRows, gn as listAgentNetworks, gt as currentMailSessionKey, h as ReplyStateUnsupportedError, hn as listAgentContacts, ht as thrownErrorExitCode, i as createOperationCommand, in as getEmail, ir as updateRepeatingSend, it as formatPriorRepliesCheckSkipped, j as sentInThread, jn as pollCliLogin, k as latestOwnOutbound, kn as listWakeDispatches, kt as isAutomatedRejectedError, l as runWithTiming, ln as getMemory, lr as verifyAgentSignup, lt as reportSendCommandResult, m as REPLY_STATE_UNSUPPORTED_CODE, mn as getWakeSchedule, mt as successfulSendOutcome, n as API_ERROR_CODES, nn as getCreditBalance, nr as updateDefaultNetworkMember, nt as deriveSendIdempotencyKey, o as extractErrorPayload, on as getFunctionRouting, or as updateWakeAuthorization, ot as formatSendFailureSummary, p as AWAITING_VALUES, pn as getThread, pt as serializeErrorPayload, q as wakeInteractionSentence, qn as setFunctionSecret, qt as deleteMemory, r as TIME_FLAG_DESCRIPTION, rn as getDefaultNetworkAgent, rr as updateFunction, rt as formatDeletedEarlierSendNotice, s as formatErrorPayload, sn as getFunctionTestRunTrace, sr as updateWakeSchedule, st as formatSendRecordFailureSummary, t as API_BASE_URL_FLAG_DESCRIPTION, tn as getConversation, tr as unsetFunctionRoute, tt as classifySendError, u as surfaceUnauthorizedHint, un as getOrgRoutingTopology, ut as sendIdentityFields, v as ensureSearchReportsReplyState, vn as listDefaultNetworkAgents, vt as writeIdempotentReplayBannerIfReplay, w as explainPendingMailNotFound, wn as listFunctions, wt as assertAutomatedVerdict, x as hasReplyState, xn as listEmails, xt as AUTOMATED_FLAG_DESCRIPTION, y as formatAwaitingCell, yn as listDefaultNetworkMembers, yt as withFlagSuggestion, z as readPendingMail, zn as replyToEmail, zt as completeWebhookEvent } from "../api-command-
|
|
2
|
+
import { $ as buildThrownSendFailureEnvelope, $n as stopRepeatFromEmail, $t as getAgentContactPolicy, A as readThreadContext, An as listWakeSchedules, At as queryUsesAutomated, B as recordPendingMail, Bn as resendAgentSignupVerification, Bt as createEndpoint, C as queryUsesAwaiting, Cn as listFunctionLogs, Ct as AutomatedFilterUnsupportedError, D as displayAddress, Dn as listSentEmails, Dt as expectedAutomatedVerdicts, E as describeWake, En as listRoutes, Et as ensureSearchReportsAutomated, F as wakeRecipientField, Ft as resolveCliApiRequestConfig, G as replyExpectation, Gn as sendEmail, H as interactionHumanLine, Hn as searchEmails, Ht as createRoute, I as wakeRelationship, In as redeemCreditCode, It as addDefaultNetworkMember, J as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, Jn as setMemory, Jt as deleteRoute, K as replyInteractionWarning, Kn as setFunctionRoute, L as clearReadPendingMail, Ln as removeDefaultNetworkMember, Lt as checkDefaultNetworkContactAdmission, M as serverMuted, Mn as pullWebhookEvent, Mt as createAuthenticatedCliApiClient, N as serverRelationship, Nt as createCliApiClient, O as formatWakeContext, On as listWakeAuthorizations, Ot as hasAutomatedVerdict, P as wakeReadCommand, Pt as refreshStoredCliCredentials, Q as buildFollowUpCommand, Qn as startCliLogin, Qt as getAccount, R as pendingMailPath, Rn as reorderRoutes, Rt as cliLogout, S as isAwaitingRejectedError, Sn as listEndpoints, St as AUTOMATED_VALUES, T as bareAddress, Tn as listRepeatingSends, Tt as automatedRejectedError, U as interactionNextActions, Un as searchMemories, Ut as createWakeAuthorization, V as removePendingMail, Vn as runWakeSchedule, Vt as createFunction, W as readEmailInteraction, Wn as semanticSearch, Wt as createWakeSchedule, X as apiResultHttpStatus, Xn as startAgentClaim, Xt as deleteWakeSchedule, Y as SEND_OUTCOME_HELP, Yn as simulateRoute, Yt as deleteWakeAuthorization, Z as assertValidIdempotencyKey, Zn as startAgentSignup, _ as awaitingRejectedError, _t as formatAlreadySentNotice, a as extractErrorCode, an as getFunction, ar as updateRoute, at as formatPriorRepliesWarning, b as formatRepliesCell, bn as listDomains, bt as AUTOMATED_FILTER_UNSUPPORTED_CODE, c as readTextFileFlag, cn as getInboxStatus, cr as verifyAgentClaim, ct as priorRepliesThatWentOut, d as writeErrorWithHints, dn as getRepeatingSend, dt as sendOutcomeExitCode, er as testFunction, et as checkPriorReplies, f as AWAITING_FLAG_DESCRIPTION, fn as getSentEmail, ft as sentHistoryWindowStart, g as assertAwaitingFilterRows, gn as listAgentNetworks, gt as currentMailSessionKey, h as ReplyStateUnsupportedError, hn as listAgentContacts, ht as thrownErrorExitCode, i as createOperationCommand, in as getEmail, ir as updateRepeatingSend, it as formatPriorRepliesCheckSkipped, j as sentInThread, jn as pollCliLogin, k as latestOwnOutbound, kn as listWakeDispatches, kt as isAutomatedRejectedError, l as runWithTiming, ln as getMemory, lr as verifyAgentSignup, lt as reportSendCommandResult, m as REPLY_STATE_UNSUPPORTED_CODE, mn as getWakeSchedule, mt as successfulSendOutcome, n as API_ERROR_CODES, nn as getCreditBalance, nr as updateDefaultNetworkMember, nt as deriveSendIdempotencyKey, o as extractErrorPayload, on as getFunctionRouting, or as updateWakeAuthorization, ot as formatSendFailureSummary, p as AWAITING_VALUES, pn as getThread, pt as serializeErrorPayload, q as wakeInteractionSentence, qn as setFunctionSecret, qt as deleteMemory, r as TIME_FLAG_DESCRIPTION, rn as getDefaultNetworkAgent, rr as updateFunction, rt as formatDeletedEarlierSendNotice, s as formatErrorPayload, sn as getFunctionTestRunTrace, sr as updateWakeSchedule, st as formatSendRecordFailureSummary, t as API_BASE_URL_FLAG_DESCRIPTION, tn as getConversation, tr as unsetFunctionRoute, tt as classifySendError, u as surfaceUnauthorizedHint, un as getOrgRoutingTopology, ut as sendIdentityFields, v as ensureSearchReportsReplyState, vn as listDefaultNetworkAgents, vt as writeIdempotentReplayBannerIfReplay, w as explainPendingMailNotFound, wn as listFunctions, wt as assertAutomatedVerdict, x as hasReplyState, xn as listEmails, xt as AUTOMATED_FLAG_DESCRIPTION, y as formatAwaitingCell, yn as listDefaultNetworkMembers, yt as withFlagSuggestion, z as readPendingMail, zn as replyToEmail, zt as completeWebhookEvent } from "../api-command-DzQ8KxD9.js";
|
|
3
3
|
import { S as resolveListenSubscription, _ as acquireListenLock, a as mailLockBusy, c as mailTime, d as readMailJson, f as removeMailFile, g as ListenStateError, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, o as mailObject, u as privateMailPermissions, x as normalizeListenOrigin, y as listenIdentity } from "../shared-mail-files-SPPcis9g.js";
|
|
4
|
-
import { $ as describeSessionHookItem, A as NetworkAdmissionPendingError, B as runContactRequest, C as pollCheckCommand, D as verificationReplySubmitted, E as RECEIVER_MODES, F as addressNoteTarget, G as receiverStatusCommand, H as agentInvitationHash, I as runAddressNotesRequest, J as recordHookMailCheck, K as savedReceiver, L as ContactsApiError, M as evaluateContactPolicy, N as canonicalContactSelector, O as ContactPolicyReadRetryError, P as AddressNotesApiError, Q as describeSessionHookChange, R as contactAddress, S as invitationProfileName, T as withOwnerMemberAddress, U as connectAgent, V as agentConnectionStatus, W as readAgentInvitation, X as claudeConfigDir, Y as boundSessionProfiles, Z as currentCliLocation, _ as disconnectAgent, a as endSession, at as samePath, b as identitySuggestions, c as pendingSessionDisconnects, ct as inspectManagedBlock, d as registerSession, dt as upsertManagedBlock, et as ephemeralCliReason, f as retryPendingDisconnects, ft as writeManagedFile, g as AgentDisconnectError, h as enrollmentResumes, i as connectedProfilesForSession, it as repairClaudeHooks, j as createNotificationContactPolicy, k as NETWORK_ADMISSION_PENDING_RETRY_MS, l as psProcessInfo, lt as jsonIndentation, m as enrollAgent, n as OMP_MAIN, nt as inspectClaudeHooks, o as headlessClaudeRun, ot as writeClaudeSettings, p as runDetached, q as installClaudeWakeHook, r as agentConnectionState, rt as readClaudeSettings, st as MachineFileError, t as MACHINE_RUNTIMES, tt as findOnPath, u as readClaudeHookInput, ut as readManagedFile, v as cliInvocation, w as runAgentConnect, x as defaultAgentProfileName, y as generatedAgentName, z as contactAgentAddress } from "../machine-session-
|
|
5
|
-
import { _ as NativeSessionDisconnectedError, a as readBundledConnectSkill, b as NotificationOutcomeUnknownError, c as openSessionNotifications, d as isRoutineNotificationContent, f as notificationPartReader, g as defaultSessionSocket, i as installedVersion, l as notificationReceiptPage, m as SESSION_UUID$1, o as notificationScope, p as readConversationStatusContent, r as installConnectSkill, s as notificationSenders, t as connectSkillTarget, u as NotificationRetryError, v as NativeSessionError, y as NativeSessionNotLoadedError } from "../connect-skill-
|
|
4
|
+
import { $ as describeSessionHookItem, A as NetworkAdmissionPendingError, B as runContactRequest, C as pollCheckCommand, D as verificationReplySubmitted, E as RECEIVER_MODES, F as addressNoteTarget, G as receiverStatusCommand, H as agentInvitationHash, I as runAddressNotesRequest, J as recordHookMailCheck, K as savedReceiver, L as ContactsApiError, M as evaluateContactPolicy, N as canonicalContactSelector, O as ContactPolicyReadRetryError, P as AddressNotesApiError, Q as describeSessionHookChange, R as contactAddress, S as invitationProfileName, T as withOwnerMemberAddress, U as connectAgent, V as agentConnectionStatus, W as readAgentInvitation, X as claudeConfigDir, Y as boundSessionProfiles, Z as currentCliLocation, _ as disconnectAgent, a as endSession, at as samePath, b as identitySuggestions, c as pendingSessionDisconnects, ct as inspectManagedBlock, d as registerSession, dt as upsertManagedBlock, et as ephemeralCliReason, f as retryPendingDisconnects, ft as writeManagedFile, g as AgentDisconnectError, h as enrollmentResumes, i as connectedProfilesForSession, it as repairClaudeHooks, j as createNotificationContactPolicy, k as NETWORK_ADMISSION_PENDING_RETRY_MS, l as psProcessInfo, lt as jsonIndentation, m as enrollAgent, n as OMP_MAIN, nt as inspectClaudeHooks, o as headlessClaudeRun, ot as writeClaudeSettings, p as runDetached, q as installClaudeWakeHook, r as agentConnectionState, rt as readClaudeSettings, st as MachineFileError, t as MACHINE_RUNTIMES, tt as findOnPath, u as readClaudeHookInput, ut as readManagedFile, v as cliInvocation, w as runAgentConnect, x as defaultAgentProfileName, y as generatedAgentName, z as contactAgentAddress } from "../machine-session-BaJ1Xmdm.js";
|
|
5
|
+
import { _ as NativeSessionDisconnectedError, a as readBundledConnectSkill, b as NotificationOutcomeUnknownError, c as openSessionNotifications, d as isRoutineNotificationContent, f as notificationPartReader, g as defaultSessionSocket, i as installedVersion, l as notificationReceiptPage, m as SESSION_UUID$1, o as notificationScope, p as readConversationStatusContent, r as installConnectSkill, s as notificationSenders, t as connectSkillTarget, u as NotificationRetryError, v as NativeSessionError, y as NativeSessionNotLoadedError } from "../connect-skill-DHPc9dVN.js";
|
|
6
6
|
import { c as startBackgroundListen, i as backgroundListenToken, l as stopBackgroundListen, o as runBackgroundListen, r as backgroundListenStatus, u as verifyBackgroundListenTarget } from "../listen-background-CyLc8VBn.js";
|
|
7
7
|
import { a as REPEAT_IDLE_MAX_MINUTES, d as parseRepeatTick, f as preparePresenceAliveEmail, g as isEmailReceivedEvent, i as REPEAT_EVERY_MAX_MINUTES, l as parseInteractionEnvelope$1, m as repeatStopCommand, o as REPEAT_MAX_SENDS_MAX, p as prepareSignalEmail, s as buildRepeatStopBody, u as parsePresenceEnvelope, v as parseWebhookEvent, y as parseFromHeader } from "../repeats-D2xtLium-DdiJECLI.js";
|
|
8
|
-
import { a as ensureSharedMailSubscription, c as reserveSharedMailSubscription, d as otherParticipants, f as EventConnection, h as pushFile, i as sharedMailScope, l as followEmailConversation, m as pullFile, n as reconcileChatSend, o as createSharedMailWaiter, p as EventReceiverError, r as openSharedMailReceiver, s as openSharedMailStore, t as sendSignal, u as readConversationFollow } from "../signal-command-
|
|
8
|
+
import { a as ensureSharedMailSubscription, c as reserveSharedMailSubscription, d as otherParticipants, f as EventConnection, h as pushFile, i as sharedMailScope, l as followEmailConversation, m as pullFile, n as reconcileChatSend, o as createSharedMailWaiter, p as EventReceiverError, r as openSharedMailReceiver, s as openSharedMailStore, t as sendSignal, u as readConversationFollow } from "../signal-command-BbeV2Nd8.js";
|
|
9
9
|
import { a as scopedChatSenderTrust, i as readBeforeDeadline, n as isPlainChatReply, o as presenceDisposition, r as isScopedChatReply, s as readPresenceProjection, t as isConnectedChatCredential } from "../scoped-chat-DhxtuNXs.js";
|
|
10
10
|
import { autoSignalEligible, dispatchAutoRead, dispatchAutoWorking, haltAutoWorking, restoreAutoWorking } from "./auto-signals.js";
|
|
11
11
|
import { t as guardJsonOutputCommands } from "../json-output-Cf-GFeff.js";
|
|
12
12
|
import { Args, Command, Errors, Flags, ux } from "@oclif/core";
|
|
13
|
-
import { chmodSync, closeSync, constants, cpSync, existsSync, fstatSync, fsyncSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
13
|
+
import { chmodSync, closeSync, constants, cpSync, existsSync, fstatSync, fsyncSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
14
14
|
import { createHash, randomUUID, scryptSync } from "node:crypto";
|
|
15
15
|
import path, { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
16
16
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
@@ -272,7 +272,7 @@ const openapiDocument = {
|
|
|
272
272
|
"/cli/signup/start": { "post": {
|
|
273
273
|
"operationId": "startCliSignup",
|
|
274
274
|
"summary": "Start CLI account signup",
|
|
275
|
-
"description": "Starts a terminal-native CLI signup.
|
|
275
|
+
"description": "Starts a terminal-native CLI signup. The API creates a pending\nsignup session, sends an email verification code, and returns an opaque\nsignup token used by the resend and verify steps. This endpoint\ndoes not require an API key.\n",
|
|
276
276
|
"tags": ["CLI"],
|
|
277
277
|
"security": [],
|
|
278
278
|
"requestBody": {
|
|
@@ -334,7 +334,7 @@ const openapiDocument = {
|
|
|
334
334
|
"/cli/signup/verify": { "post": {
|
|
335
335
|
"operationId": "verifyCliSignup",
|
|
336
336
|
"summary": "Verify CLI signup and create OAuth session",
|
|
337
|
-
"description": "Verifies the email code for a CLI signup session and creates the\naccount.
|
|
337
|
+
"description": "Verifies the email code for a CLI signup session and creates the\naccount. An org-scoped OAuth CLI session is created and the\ntoken set is returned exactly once. This endpoint does not\nrequire an API key.\n",
|
|
338
338
|
"tags": ["CLI"],
|
|
339
339
|
"security": [],
|
|
340
340
|
"requestBody": {
|
|
@@ -354,7 +354,7 @@ const openapiDocument = {
|
|
|
354
354
|
}] } } }
|
|
355
355
|
},
|
|
356
356
|
"400": {
|
|
357
|
-
"description": "Invalid request, invalid verification code, expired token,
|
|
357
|
+
"description": "Invalid request, invalid verification code, expired token, rejected password, or account creation failure",
|
|
358
358
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
359
359
|
},
|
|
360
360
|
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
@@ -363,7 +363,7 @@ const openapiDocument = {
|
|
|
363
363
|
"/agent/signup/start": { "post": {
|
|
364
364
|
"operationId": "startAgentSignup",
|
|
365
365
|
"summary": "Start agent account signup",
|
|
366
|
-
"description": "Starts an agent-native signup session.
|
|
366
|
+
"description": "Starts an agent-native signup session. The API creates a pending\nsignup session, sends an email verification code, and returns an opaque\nsignup token used by the resend and verify steps. This endpoint\ndoes not require an API key.\n",
|
|
367
367
|
"tags": ["Agent"],
|
|
368
368
|
"security": [],
|
|
369
369
|
"requestBody": {
|
|
@@ -425,7 +425,7 @@ const openapiDocument = {
|
|
|
425
425
|
"/agent/signup/verify": { "post": {
|
|
426
426
|
"operationId": "verifyAgentSignup",
|
|
427
427
|
"summary": "Verify agent signup and create OAuth tokens",
|
|
428
|
-
"description": "Verifies the email code for an agent signup session and creates\nthe account when needed.
|
|
428
|
+
"description": "Verifies the email code for an agent signup session and creates\nthe account when needed. An org-scoped OAuth session for CLI\nauthentication is minted and the raw tokens are returned exactly\nonce. For existing users, the optional `org_id` selects which\naccessible workspace should receive the new session.\n",
|
|
429
429
|
"tags": ["Agent"],
|
|
430
430
|
"security": [],
|
|
431
431
|
"requestBody": {
|
|
@@ -445,7 +445,7 @@ const openapiDocument = {
|
|
|
445
445
|
}] } } }
|
|
446
446
|
},
|
|
447
447
|
"400": {
|
|
448
|
-
"description": "Invalid request, invalid verification code, expired token,
|
|
448
|
+
"description": "Invalid request, invalid verification code, expired token, or account creation failure",
|
|
449
449
|
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
450
450
|
},
|
|
451
451
|
"403": { "$ref": "#/components/responses/Forbidden" },
|
|
@@ -2678,7 +2678,7 @@ const openapiDocument = {
|
|
|
2678
2678
|
"/sent-emails": { "get": {
|
|
2679
2679
|
"operationId": "listSentEmails",
|
|
2680
2680
|
"summary": "List outbound sent emails",
|
|
2681
|
-
"description": "Returns a paginated list of OUTBOUND emails the caller's\norg has sent via /send-mail (and /emails/{id}/reply, which\nforwards through /send-mail). Includes every recorded\nattempt, including gate-denied attempts that the agent\nnever called and rows still in `queued` state.\n\nFor inbound mail received at your verified domains, see\n/emails. There is no unified send/receive history endpoint;\nthe two surfaces are intentionally separate because the\nunderlying tables, statuses, and lifecycle differ.\n\nEmail bodies (`body_text`, `body_html`) are NOT included on\nlist rows so a 50-row page can't balloon into a multi-MB\nresponse when sends are near the 5MB body cap. Use\n/sent-emails/{id} to fetch a single row with bodies, or\ncross-reference by `client_idempotency_key` if the caller\nalready has the body locally.\n",
|
|
2681
|
+
"description": "Returns a paginated list of OUTBOUND emails the caller's\norg has sent via /send-mail (and /emails/{id}/reply, which\nforwards through /send-mail). Includes every recorded\nattempt, including gate-denied attempts that the agent\nnever called and rows still in `queued` state.\n\nUnder an address-bound agent connection credential, the\nlist holds this agent's own sends plus delivered sends from\nother addresses in the org that name this agent in to, cc\nor bcc and have matching inbound delivery evidence at this\nagent. Pass `from` with the agent's own address to list\nonly its own sends.\n\nFor inbound mail received at your verified domains, see\n/emails. There is no unified send/receive history endpoint;\nthe two surfaces are intentionally separate because the\nunderlying tables, statuses, and lifecycle differ.\n\nEmail bodies (`body_text`, `body_html`) are NOT included on\nlist rows so a 50-row page can't balloon into a multi-MB\nresponse when sends are near the 5MB body cap. Use\n/sent-emails/{id} to fetch a single row with bodies, or\ncross-reference by `client_idempotency_key` if the caller\nalready has the body locally.\n",
|
|
2682
2682
|
"tags": ["Sending"],
|
|
2683
2683
|
"parameters": [
|
|
2684
2684
|
{ "$ref": "#/components/parameters/Cursor" },
|
|
@@ -2819,7 +2819,7 @@ const openapiDocument = {
|
|
|
2819
2819
|
"get": {
|
|
2820
2820
|
"operationId": "getSentEmail",
|
|
2821
2821
|
"summary": "Get a sent email by id",
|
|
2822
|
-
"description": "Returns the full sent-email record by id, including\n`body_text` and `body_html` (omitted from the listing\nendpoint to keep paginated responses small). Use this when\ndiagnosing a specific send, e.g. inspecting the receiver's\nSMTP response on a `bounced` row or pulling the gate\ndenial detail on a `gate_denied` row.\n",
|
|
2822
|
+
"description": "Returns the full sent-email record by id, including\n`body_text` and `body_html` (omitted from the listing\nendpoint to keep paginated responses small). Use this when\ndiagnosing a specific send, e.g. inspecting the receiver's\nSMTP response on a `bounced` row or pulling the gate\ndenial detail on a `gate_denied` row.\n\nUnder an address-bound agent connection credential, only\nids in the same scope as /sent-emails resolve: this agent's\nown sends, and delivered sends addressed to it with\nmatching inbound delivery evidence. Other ids return 404.\n",
|
|
2823
2823
|
"tags": ["Sending"],
|
|
2824
2824
|
"parameters": [{ "$ref": "#/components/parameters/ResourceId" }],
|
|
2825
2825
|
"responses": {
|
|
@@ -9765,7 +9765,6 @@ const openapiDocument = {
|
|
|
9765
9765
|
"access_denied",
|
|
9766
9766
|
"expired_token",
|
|
9767
9767
|
"invalid_device_code",
|
|
9768
|
-
"invalid_signup_code",
|
|
9769
9768
|
"invalid_signup_token",
|
|
9770
9769
|
"invalid_verification_code",
|
|
9771
9770
|
"email_delivery_failed",
|
|
@@ -10070,12 +10069,6 @@ const openapiDocument = {
|
|
|
10070
10069
|
"format": "email",
|
|
10071
10070
|
"maxLength": 254
|
|
10072
10071
|
},
|
|
10073
|
-
"signup_code": {
|
|
10074
|
-
"type": "string",
|
|
10075
|
-
"minLength": 1,
|
|
10076
|
-
"maxLength": 128,
|
|
10077
|
-
"description": "Optional signup code. Omit if you do not have one."
|
|
10078
|
-
},
|
|
10079
10072
|
"terms_accepted": {
|
|
10080
10073
|
"type": "boolean",
|
|
10081
10074
|
"const": true,
|
|
@@ -10255,12 +10248,6 @@ const openapiDocument = {
|
|
|
10255
10248
|
"format": "email",
|
|
10256
10249
|
"maxLength": 254
|
|
10257
10250
|
},
|
|
10258
|
-
"signup_code": {
|
|
10259
|
-
"type": "string",
|
|
10260
|
-
"minLength": 1,
|
|
10261
|
-
"maxLength": 128,
|
|
10262
|
-
"description": "Optional signup code. Omit if you do not have one."
|
|
10263
|
-
},
|
|
10264
10251
|
"terms_accepted": {
|
|
10265
10252
|
"type": "boolean",
|
|
10266
10253
|
"const": true,
|
|
@@ -17470,7 +17457,7 @@ const operationManifest = [
|
|
|
17470
17457
|
"binaryResponse": false,
|
|
17471
17458
|
"bodyRequired": true,
|
|
17472
17459
|
"command": "start-agent-signup",
|
|
17473
|
-
"description": "Starts an agent-native signup session.
|
|
17460
|
+
"description": "Starts an agent-native signup session. The API creates a pending\nsignup session, sends an email verification code, and returns an opaque\nsignup token used by the resend and verify steps. This endpoint\ndoes not require an API key.\n",
|
|
17474
17461
|
"hasJsonBody": true,
|
|
17475
17462
|
"method": "POST",
|
|
17476
17463
|
"operationId": "startAgentSignup",
|
|
@@ -17486,12 +17473,6 @@ const operationManifest = [
|
|
|
17486
17473
|
"format": "email",
|
|
17487
17474
|
"maxLength": 254
|
|
17488
17475
|
},
|
|
17489
|
-
"signup_code": {
|
|
17490
|
-
"type": "string",
|
|
17491
|
-
"minLength": 1,
|
|
17492
|
-
"maxLength": 128,
|
|
17493
|
-
"description": "Optional signup code. Omit if you do not have one."
|
|
17494
|
-
},
|
|
17495
17476
|
"terms_accepted": {
|
|
17496
17477
|
"type": "boolean",
|
|
17497
17478
|
"const": true,
|
|
@@ -17626,7 +17607,7 @@ const operationManifest = [
|
|
|
17626
17607
|
"binaryResponse": false,
|
|
17627
17608
|
"bodyRequired": true,
|
|
17628
17609
|
"command": "verify-agent-signup",
|
|
17629
|
-
"description": "Verifies the email code for an agent signup session and creates\nthe account when needed.
|
|
17610
|
+
"description": "Verifies the email code for an agent signup session and creates\nthe account when needed. An org-scoped OAuth session for CLI\nauthentication is minted and the raw tokens are returned exactly\nonce. For existing users, the optional `org_id` selects which\naccessible workspace should receive the new session.\n",
|
|
17630
17611
|
"hasJsonBody": true,
|
|
17631
17612
|
"method": "POST",
|
|
17632
17613
|
"operationId": "verifyAgentSignup",
|
|
@@ -19817,7 +19798,7 @@ const operationManifest = [
|
|
|
19817
19798
|
"binaryResponse": false,
|
|
19818
19799
|
"bodyRequired": true,
|
|
19819
19800
|
"command": "start-cli-signup",
|
|
19820
|
-
"description": "Starts a terminal-native CLI signup.
|
|
19801
|
+
"description": "Starts a terminal-native CLI signup. The API creates a pending\nsignup session, sends an email verification code, and returns an opaque\nsignup token used by the resend and verify steps. This endpoint\ndoes not require an API key.\n",
|
|
19821
19802
|
"hasJsonBody": true,
|
|
19822
19803
|
"method": "POST",
|
|
19823
19804
|
"operationId": "startCliSignup",
|
|
@@ -19833,12 +19814,6 @@ const operationManifest = [
|
|
|
19833
19814
|
"format": "email",
|
|
19834
19815
|
"maxLength": 254
|
|
19835
19816
|
},
|
|
19836
|
-
"signup_code": {
|
|
19837
|
-
"type": "string",
|
|
19838
|
-
"minLength": 1,
|
|
19839
|
-
"maxLength": 128,
|
|
19840
|
-
"description": "Optional signup code. Omit if you do not have one."
|
|
19841
|
-
},
|
|
19842
19817
|
"terms_accepted": {
|
|
19843
19818
|
"type": "boolean",
|
|
19844
19819
|
"const": true,
|
|
@@ -19899,7 +19874,7 @@ const operationManifest = [
|
|
|
19899
19874
|
"binaryResponse": false,
|
|
19900
19875
|
"bodyRequired": true,
|
|
19901
19876
|
"command": "verify-cli-signup",
|
|
19902
|
-
"description": "Verifies the email code for a CLI signup session and creates the\naccount.
|
|
19877
|
+
"description": "Verifies the email code for a CLI signup session and creates the\naccount. An org-scoped OAuth CLI session is created and the\ntoken set is returned exactly once. This endpoint does not\nrequire an API key.\n",
|
|
19903
19878
|
"hasJsonBody": true,
|
|
19904
19879
|
"method": "POST",
|
|
19905
19880
|
"operationId": "verifyCliSignup",
|
|
@@ -31747,7 +31722,7 @@ const operationManifest = [
|
|
|
31747
31722
|
"binaryResponse": false,
|
|
31748
31723
|
"bodyRequired": false,
|
|
31749
31724
|
"command": "get-sent-email",
|
|
31750
|
-
"description": "Returns the full sent-email record by id, including\n`body_text` and `body_html` (omitted from the listing\nendpoint to keep paginated responses small). Use this when\ndiagnosing a specific send, e.g. inspecting the receiver's\nSMTP response on a `bounced` row or pulling the gate\ndenial detail on a `gate_denied` row.\n",
|
|
31725
|
+
"description": "Returns the full sent-email record by id, including\n`body_text` and `body_html` (omitted from the listing\nendpoint to keep paginated responses small). Use this when\ndiagnosing a specific send, e.g. inspecting the receiver's\nSMTP response on a `bounced` row or pulling the gate\ndenial detail on a `gate_denied` row.\n\nUnder an address-bound agent connection credential, only\nids in the same scope as /sent-emails resolve: this agent's\nown sends, and delivered sends addressed to it with\nmatching inbound delivery evidence. Other ids return 404.\n",
|
|
31751
31726
|
"hasJsonBody": false,
|
|
31752
31727
|
"method": "GET",
|
|
31753
31728
|
"operationId": "getSentEmail",
|
|
@@ -32186,7 +32161,7 @@ const operationManifest = [
|
|
|
32186
32161
|
"binaryResponse": false,
|
|
32187
32162
|
"bodyRequired": false,
|
|
32188
32163
|
"command": "list-sent-emails",
|
|
32189
|
-
"description": "Returns a paginated list of OUTBOUND emails the caller's\norg has sent via /send-mail (and /emails/{id}/reply, which\nforwards through /send-mail). Includes every recorded\nattempt, including gate-denied attempts that the agent\nnever called and rows still in `queued` state.\n\nFor inbound mail received at your verified domains, see\n/emails. There is no unified send/receive history endpoint;\nthe two surfaces are intentionally separate because the\nunderlying tables, statuses, and lifecycle differ.\n\nEmail bodies (`body_text`, `body_html`) are NOT included on\nlist rows so a 50-row page can't balloon into a multi-MB\nresponse when sends are near the 5MB body cap. Use\n/sent-emails/{id} to fetch a single row with bodies, or\ncross-reference by `client_idempotency_key` if the caller\nalready has the body locally.\n",
|
|
32164
|
+
"description": "Returns a paginated list of OUTBOUND emails the caller's\norg has sent via /send-mail (and /emails/{id}/reply, which\nforwards through /send-mail). Includes every recorded\nattempt, including gate-denied attempts that the agent\nnever called and rows still in `queued` state.\n\nUnder an address-bound agent connection credential, the\nlist holds this agent's own sends plus delivered sends from\nother addresses in the org that name this agent in to, cc\nor bcc and have matching inbound delivery evidence at this\nagent. Pass `from` with the agent's own address to list\nonly its own sends.\n\nFor inbound mail received at your verified domains, see\n/emails. There is no unified send/receive history endpoint;\nthe two surfaces are intentionally separate because the\nunderlying tables, statuses, and lifecycle differ.\n\nEmail bodies (`body_text`, `body_html`) are NOT included on\nlist rows so a 50-row page can't balloon into a multi-MB\nresponse when sends are near the 5MB body cap. Use\n/sent-emails/{id} to fetch a single row with bodies, or\ncross-reference by `client_idempotency_key` if the caller\nalready has the body locally.\n",
|
|
32190
32165
|
"hasJsonBody": false,
|
|
32191
32166
|
"method": "GET",
|
|
32192
32167
|
"operationId": "listSentEmails",
|
|
@@ -36845,20 +36820,54 @@ async function run$1(command, flags, write, action) {
|
|
|
36845
36820
|
}
|
|
36846
36821
|
});
|
|
36847
36822
|
}
|
|
36823
|
+
/** How long `set --stdin` waits for input on a nonblocking pipe. */
|
|
36824
|
+
const STDIN_WAIT_MS = 3e4;
|
|
36825
|
+
/** Where `set --stdin` reads the claim from; replaced in tests. */
|
|
36826
|
+
const workingClaimStdin = { read: () => {
|
|
36827
|
+
if (process.stdin.isTTY) throw new Error("--stdin needs the claim piped in, not typed at a terminal.");
|
|
36828
|
+
const limit = 2002;
|
|
36829
|
+
const buffer = Buffer.alloc(limit + 1);
|
|
36830
|
+
const pause = new Int32Array(new SharedArrayBuffer(4));
|
|
36831
|
+
const deadline = Date.now() + STDIN_WAIT_MS;
|
|
36832
|
+
let length = 0;
|
|
36833
|
+
while (length <= limit) {
|
|
36834
|
+
let read = 0;
|
|
36835
|
+
try {
|
|
36836
|
+
read = readSync(0, buffer, length, limit + 1 - length, null);
|
|
36837
|
+
} catch (error) {
|
|
36838
|
+
const code = error.code;
|
|
36839
|
+
if (code === "EOF") break;
|
|
36840
|
+
if (code !== "EAGAIN") throw error;
|
|
36841
|
+
if (Date.now() > deadline) throw new Error("--stdin received no end of input; pipe the claim from a file.");
|
|
36842
|
+
Atomics.wait(pause, 0, 0, 20);
|
|
36843
|
+
continue;
|
|
36844
|
+
}
|
|
36845
|
+
if (read === 0) break;
|
|
36846
|
+
length += read;
|
|
36847
|
+
}
|
|
36848
|
+
if (length > limit) throw new Error(`The claim must be at most 500 characters.`);
|
|
36849
|
+
return buffer.subarray(0, length).toString("utf8");
|
|
36850
|
+
} };
|
|
36848
36851
|
function isNotFound(error) {
|
|
36849
36852
|
return error instanceof AddressNotesApiError && error.status === 404;
|
|
36850
36853
|
}
|
|
36851
36854
|
var AgentWorkingSetCommand = class AgentWorkingSetCommand extends Command {
|
|
36852
36855
|
static summary = "Set this agent's work claim";
|
|
36853
|
-
static description = `Record what this agent is working on, with an expiry, in the ${WORKING_NOTE_NAME} address note. A claim is one short line naming the task and the files or areas being changed. Set it when work starts and clear it when work ends; peers read it before editing a shared file. Claims are advisory, not locks. The claim expires 4 hours from now unless --until is given. The note is stored as JSON { claim, until }. New notes are private to the organization; an update keeps the note's visibility unless --public or --private is given.`;
|
|
36854
|
-
static examples = [
|
|
36856
|
+
static description = `Record what this agent is working on, with an expiry, in the ${WORKING_NOTE_NAME} address note. A claim is one short line naming the task and the files or areas being changed. Pass it as an argument, or with --stdin to keep it out of process listings and shell history. Set it when work starts and clear it when work ends; peers read it before editing a shared file. Claims are advisory, not locks. The claim expires 4 hours from now unless --until is given. The note is stored as JSON { claim, until }. New notes are private to the organization; an update keeps the note's visibility unless --public or --private is given.`;
|
|
36857
|
+
static examples = [
|
|
36858
|
+
"<%= config.bin %> agent working set \"phone composer: apps/mobile/src/message-composer.tsx\"",
|
|
36859
|
+
"<%= config.bin %> agent working set \"billing export: src/billing/\" --until 2026-10-01T18:00:00Z",
|
|
36860
|
+
"<%= config.bin %> agent working set --stdin < ./private-claim.txt"
|
|
36861
|
+
];
|
|
36855
36862
|
static args = { claim: Args.string({
|
|
36856
|
-
description: "One line naming the task and the files or areas changed",
|
|
36857
|
-
required:
|
|
36863
|
+
description: "One line naming the task and the files or areas changed (or use --stdin)",
|
|
36864
|
+
required: false,
|
|
36865
|
+
ignoreStdin: true
|
|
36858
36866
|
}) };
|
|
36859
36867
|
static flags = {
|
|
36860
36868
|
...commonFlags$1,
|
|
36861
36869
|
address: writeAddressFlag,
|
|
36870
|
+
stdin: Flags.boolean({ description: "Read the claim from stdin instead of an argument, so it stays out of process listings and shell history" }),
|
|
36862
36871
|
until: Flags.string({ description: "Expiry as an ISO 8601 time with a timezone (default: 4 hours from now)" }),
|
|
36863
36872
|
public: Flags.boolean({
|
|
36864
36873
|
description: "Make the claim note public",
|
|
@@ -36871,8 +36880,10 @@ var AgentWorkingSetCommand = class AgentWorkingSetCommand extends Command {
|
|
|
36871
36880
|
};
|
|
36872
36881
|
async run() {
|
|
36873
36882
|
const { args, flags } = await this.parse(AgentWorkingSetCommand);
|
|
36883
|
+
if (flags.stdin && args.claim !== void 0) this.error("Pass the claim as an argument or with --stdin, not both.", { exit: 2 });
|
|
36884
|
+
if (!flags.stdin && args.claim === void 0) this.error("Pass the claim as an argument, or pipe it in with --stdin.", { exit: 2 });
|
|
36874
36885
|
const value = buildWorkingClaim({
|
|
36875
|
-
claim: args.claim,
|
|
36886
|
+
claim: flags.stdin ? workingClaimStdin.read().replace(/\r?\n$/, "") : args.claim,
|
|
36876
36887
|
until: flags.until
|
|
36877
36888
|
});
|
|
36878
36889
|
await run$1(this, flags, true, async ({ client, address }) => {
|
|
@@ -43305,8 +43316,8 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
43305
43316
|
name: "Primitive Team",
|
|
43306
43317
|
url: "https://primitive.dev"
|
|
43307
43318
|
};
|
|
43308
|
-
const SDK_VERSION_RANGE = "^1.
|
|
43309
|
-
const CLI_VERSION_RANGE = "^1.
|
|
43319
|
+
const SDK_VERSION_RANGE = "^1.35.0";
|
|
43320
|
+
const CLI_VERSION_RANGE = "^1.48.0";
|
|
43310
43321
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
43311
43322
|
function renderHandler() {
|
|
43312
43323
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -48933,8 +48944,7 @@ const DEFAULT_SIGNUP_COMMAND_COPY = {
|
|
|
48933
48944
|
actionGerund: "creating a new account",
|
|
48934
48945
|
confirmCommand: (email) => `signup confirm ${email} <code>`,
|
|
48935
48946
|
resendCommand: (email) => `signup resend ${email}`,
|
|
48936
|
-
startCommand: (email) => `signup ${email}
|
|
48937
|
-
codeRequired: false
|
|
48947
|
+
startCommand: (email) => `signup ${email}`
|
|
48938
48948
|
};
|
|
48939
48949
|
function cliError$2(message) {
|
|
48940
48950
|
return new Errors.CLIError(message, { exit: 1 });
|
|
@@ -49216,16 +49226,12 @@ async function startSignup(params) {
|
|
|
49216
49226
|
}
|
|
49217
49227
|
if (params.flags.force) deletePendingAgentSignup(params.configDir);
|
|
49218
49228
|
const confirmTermsFn = params.deps.confirmTerms ?? confirmTerms;
|
|
49219
|
-
const promptRequiredFn = params.deps.promptRequired ?? promptRequired;
|
|
49220
49229
|
const startFn = params.deps.startAgentSignup ?? startAgentSignup;
|
|
49221
|
-
const rawSignupCode = params.flags["signup-code"];
|
|
49222
|
-
const signupCode = (rawSignupCode && rawSignupCode.trim().length > 0 ? rawSignupCode : void 0) ?? (copy.codeRequired ? await promptRequiredFn("Signup code: ") : void 0);
|
|
49223
49230
|
if (!params.flags["accept-terms"]) await confirmTermsFn();
|
|
49224
49231
|
const started = await startFn({
|
|
49225
49232
|
body: {
|
|
49226
49233
|
device_name: params.flags["device-name"] ?? hostname(),
|
|
49227
49234
|
email: params.email,
|
|
49228
|
-
...signupCode ? { signup_code: signupCode } : {},
|
|
49229
49235
|
terms_accepted: true
|
|
49230
49236
|
},
|
|
49231
49237
|
client: params.apiClient.client,
|
|
@@ -49453,10 +49459,6 @@ function commonStartFlags() {
|
|
|
49453
49459
|
force: Flags.boolean({
|
|
49454
49460
|
char: "f",
|
|
49455
49461
|
description: "Replace saved credentials or pending signup state when needed"
|
|
49456
|
-
}),
|
|
49457
|
-
"signup-code": Flags.string({
|
|
49458
|
-
description: "Optional signup code. Omit if you do not have one.",
|
|
49459
|
-
env: "PRIMITIVE_SIGNUP_CODE"
|
|
49460
49462
|
})
|
|
49461
49463
|
};
|
|
49462
49464
|
}
|
|
@@ -49470,7 +49472,6 @@ var SignupCommand = class SignupCommand extends Command {
|
|
|
49470
49472
|
static examples = [
|
|
49471
49473
|
"<%= config.bin %> signup user@example.com",
|
|
49472
49474
|
"<%= config.bin %> signup user@example.com --accept-terms",
|
|
49473
|
-
"<%= config.bin %> signup user@example.com --signup-code invite-code --accept-terms",
|
|
49474
49475
|
"<%= config.bin %> signup confirm user@example.com 123456"
|
|
49475
49476
|
];
|
|
49476
49477
|
static flags = commonStartFlags();
|
|
@@ -50259,12 +50260,25 @@ async function memberCredentialsFor(options) {
|
|
|
50259
50260
|
return null;
|
|
50260
50261
|
}
|
|
50261
50262
|
}
|
|
50262
|
-
/**
|
|
50263
|
-
|
|
50263
|
+
/** Pages to read before giving up on confirming absence (10,000 agents). */
|
|
50264
|
+
const OWNER_LIST_MAX_PAGES = 200;
|
|
50265
|
+
/**
|
|
50266
|
+
* The member's connection list, hidden agents included, as address to status.
|
|
50267
|
+
* Read once per run. `complete` is true only when every page was read and the
|
|
50268
|
+
* last one explicitly ended the list (`meta.cursor: null`): a status found on
|
|
50269
|
+
* any page stands, but absence is proof only from a complete list.
|
|
50270
|
+
*/
|
|
50271
|
+
async function ownerConnectionStatuses(credentials, fetchImpl) {
|
|
50272
|
+
const statuses = /* @__PURE__ */ new Map();
|
|
50273
|
+
const partial = () => ({
|
|
50274
|
+
statuses,
|
|
50275
|
+
complete: false
|
|
50276
|
+
});
|
|
50264
50277
|
let cursor;
|
|
50265
|
-
for (let page = 0; page <
|
|
50278
|
+
for (let page = 0; page < OWNER_LIST_MAX_PAGES; page++) {
|
|
50266
50279
|
const url = new URL(`${credentials.api_base_url}/agent-connections`);
|
|
50267
50280
|
url.searchParams.set("limit", "50");
|
|
50281
|
+
url.searchParams.set("include_hidden", "true");
|
|
50268
50282
|
if (cursor) url.searchParams.set("cursor", cursor);
|
|
50269
50283
|
try {
|
|
50270
50284
|
const response = await fetchImpl(url, {
|
|
@@ -50278,21 +50292,25 @@ async function ownerListedStatus(credentials, address, fetchImpl) {
|
|
|
50278
50292
|
});
|
|
50279
50293
|
if (response.status !== 200) {
|
|
50280
50294
|
await response.body?.cancel().catch(() => void 0);
|
|
50281
|
-
return
|
|
50295
|
+
return partial();
|
|
50282
50296
|
}
|
|
50283
50297
|
const text = await response.text();
|
|
50284
|
-
if (text.length > 1048576) return
|
|
50298
|
+
if (text.length > 1048576) return partial();
|
|
50285
50299
|
const body = JSON.parse(text);
|
|
50286
|
-
if (body.success !== true || !Array.isArray(body.data)) return
|
|
50287
|
-
for (const row of body.data) if (row?.address ===
|
|
50300
|
+
if (body.success !== true || !Array.isArray(body.data)) return partial();
|
|
50301
|
+
for (const row of body.data) if (typeof row?.address === "string" && typeof row.status === "string") statuses.set(row.address, row.status);
|
|
50288
50302
|
const next = body.meta?.cursor;
|
|
50289
|
-
if (
|
|
50303
|
+
if (next === null) return {
|
|
50304
|
+
statuses,
|
|
50305
|
+
complete: true
|
|
50306
|
+
};
|
|
50307
|
+
if (typeof next !== "string" || !next || next === cursor) return partial();
|
|
50290
50308
|
cursor = next;
|
|
50291
50309
|
} catch {
|
|
50292
|
-
return
|
|
50310
|
+
return partial();
|
|
50293
50311
|
}
|
|
50294
50312
|
}
|
|
50295
|
-
return
|
|
50313
|
+
return partial();
|
|
50296
50314
|
}
|
|
50297
50315
|
function check(id, status, detail, extra = {}) {
|
|
50298
50316
|
return {
|
|
@@ -50545,7 +50563,9 @@ async function runMachineDoctor(options) {
|
|
|
50545
50563
|
}
|
|
50546
50564
|
if (!profiles.length) return unreadable ? check("profiles.orphaned", "warn", `${unreadable} saved profiles could not be read; they were left unchanged.`) : check("profiles.orphaned", "ok", "No saved agent profiles.");
|
|
50547
50565
|
let member;
|
|
50548
|
-
|
|
50566
|
+
const unconfirmed = [];
|
|
50567
|
+
let elsewhere = 0;
|
|
50568
|
+
let ownerList;
|
|
50549
50569
|
let unknown = 0;
|
|
50550
50570
|
let connected = 0;
|
|
50551
50571
|
const states = [];
|
|
@@ -50556,12 +50576,16 @@ async function runMachineDoctor(options) {
|
|
|
50556
50576
|
for (const entry of states) if (entry.state === "revoked") orphans.push(entry);
|
|
50557
50577
|
else if (entry.state === "rejected") {
|
|
50558
50578
|
member ??= await memberCredentialsFor(options);
|
|
50559
|
-
|
|
50560
|
-
|
|
50579
|
+
const checkable = !!member && member.org_id === entry.profile.org_id && member.api_base_url === entry.profile.api_base_url;
|
|
50580
|
+
if (member && !checkable) elsewhere++;
|
|
50581
|
+
if (checkable && member && ownerList === void 0) ownerList = await ownerConnectionStatuses(member, fetchImpl);
|
|
50582
|
+
const listed = checkable && ownerList ? ownerList.statuses.get(entry.profile.agent_address) ?? (ownerList.complete ? "absent" : null) : null;
|
|
50583
|
+
if (listed === "revoked" || listed === "absent") orphans.push(entry);
|
|
50584
|
+
else unconfirmed.push(entry.profile.agent_address);
|
|
50561
50585
|
} else if (entry.state === "unavailable") unknown++;
|
|
50562
50586
|
else connected++;
|
|
50563
|
-
if (orphans.length) return check("profiles.orphaned", "fail", `${orphans.length} saved profiles were disconnected in Primitive: ${orphans.map((entry) => entry.profile.agent_address).join(", ")}. A repair moves them aside locally; nothing changes in Primitive.`, { fixable: true });
|
|
50564
|
-
if (unconfirmed || unreadable) return check("profiles.orphaned", "warn", [unconfirmed ? `${unconfirmed} profiles
|
|
50587
|
+
if (orphans.length) return check("profiles.orphaned", "fail", `${orphans.length} saved profiles were disconnected or removed in Primitive: ${orphans.map((entry) => entry.profile.agent_address).join(", ")}. A repair moves them aside locally; nothing changes in Primitive.`, { fixable: true });
|
|
50588
|
+
if (unconfirmed.length || unreadable) return check("profiles.orphaned", "warn", [unconfirmed.length ? `${unconfirmed.length} saved profiles have credentials Primitive no longer accepts (${unconfirmed.slice(0, 5).join(", ")}${unconfirmed.length > 5 ? `, and ${unconfirmed.length - 5} more` : ""}). They cannot send or receive. To clean them up, sign in with \`primitive login --force\` as a member of their organization and run \`primitive machine doctor --fix\`, which confirms each one is disconnected before moving it aside${elsewhere ? `. ${elsewhere} of them belong to an organization or Primitive API your current sign-in is not for, so sign in there to check them` : ""}` : "", unreadable ? `${unreadable} profiles could not be read` : ""].filter(Boolean).join("; ").concat("; they were left unchanged."));
|
|
50565
50589
|
if (unknown && !connected) return check("profiles.orphaned", "skip", "Primitive could not be reached to check saved profiles.");
|
|
50566
50590
|
return check("profiles.orphaned", "ok", `${connected} saved profiles are connected${unknown ? `; ${unknown} could not be checked` : ""}.`);
|
|
50567
50591
|
};
|
|
@@ -55764,40 +55788,35 @@ const SIGNIN_OTP_COPY = {
|
|
|
55764
55788
|
actionGerund: "signing in",
|
|
55765
55789
|
confirmCommand: (email) => `signin otp confirm ${email} <code>`,
|
|
55766
55790
|
resendCommand: (email) => `signin otp resend ${email}`,
|
|
55767
|
-
startCommand: (email) => `signin otp ${email}
|
|
55768
|
-
codeRequired: true
|
|
55791
|
+
startCommand: (email) => `signin otp ${email}`
|
|
55769
55792
|
};
|
|
55770
55793
|
const SIGNIN_EMAIL_COPY = {
|
|
55771
55794
|
actionNoun: "sign-in",
|
|
55772
55795
|
actionGerund: "signing in",
|
|
55773
55796
|
confirmCommand: (email) => `signin confirm ${email} <code>`,
|
|
55774
55797
|
resendCommand: (email) => `signin resend ${email}`,
|
|
55775
|
-
startCommand: (email) => `signin ${email}
|
|
55776
|
-
codeRequired: true
|
|
55798
|
+
startCommand: (email) => `signin ${email}`
|
|
55777
55799
|
};
|
|
55778
55800
|
const LOGIN_EMAIL_COPY = {
|
|
55779
55801
|
actionNoun: "login",
|
|
55780
55802
|
actionGerund: "logging in",
|
|
55781
55803
|
confirmCommand: (email) => `login confirm ${email} <code>`,
|
|
55782
55804
|
resendCommand: (email) => `login resend ${email}`,
|
|
55783
|
-
startCommand: (email) => `login ${email}
|
|
55784
|
-
codeRequired: true
|
|
55805
|
+
startCommand: (email) => `login ${email}`
|
|
55785
55806
|
};
|
|
55786
55807
|
const LOGIN_OTP_COPY = {
|
|
55787
55808
|
actionNoun: "login",
|
|
55788
55809
|
actionGerund: "logging in",
|
|
55789
55810
|
confirmCommand: (email) => `login otp confirm ${email} <code>`,
|
|
55790
55811
|
resendCommand: (email) => `login otp resend ${email}`,
|
|
55791
|
-
startCommand: (email) => `login otp ${email}
|
|
55792
|
-
codeRequired: true
|
|
55812
|
+
startCommand: (email) => `login otp ${email}`
|
|
55793
55813
|
};
|
|
55794
55814
|
const OTP_COPY = {
|
|
55795
55815
|
actionNoun: "email-code auth",
|
|
55796
55816
|
actionGerund: "authenticating",
|
|
55797
55817
|
confirmCommand: (email) => `otp confirm ${email} <code>`,
|
|
55798
55818
|
resendCommand: (email) => `otp resend ${email}`,
|
|
55799
|
-
startCommand: (email) => `otp ${email}
|
|
55800
|
-
codeRequired: true
|
|
55819
|
+
startCommand: (email) => `otp ${email}`
|
|
55801
55820
|
};
|
|
55802
55821
|
function acquireCredentialsLock(configDir) {
|
|
55803
55822
|
try {
|
|
@@ -55818,10 +55837,6 @@ function commonOtpStartFlags() {
|
|
|
55818
55837
|
force: Flags.boolean({
|
|
55819
55838
|
char: "f",
|
|
55820
55839
|
description: "Replace saved credentials or pending email-code auth state when needed"
|
|
55821
|
-
}),
|
|
55822
|
-
"signup-code": Flags.string({
|
|
55823
|
-
description: "Signup code required to start email-code sign-in",
|
|
55824
|
-
env: "PRIMITIVE_SIGNUP_CODE"
|
|
55825
55840
|
})
|
|
55826
55841
|
};
|
|
55827
55842
|
}
|
|
@@ -55832,15 +55847,15 @@ var SigninCommand = class extends LoginCommand$1 {
|
|
|
55832
55847
|
}) };
|
|
55833
55848
|
static description = `Sign in or log in to an existing Primitive account and save an org-scoped OAuth session locally.
|
|
55834
55849
|
|
|
55835
|
-
Run \`primitive signin <email> --
|
|
55850
|
+
Run \`primitive signin <email> --accept-terms\` for email-code sign-in, then \`primitive signin confirm <email> <code>\`. Run \`primitive signin\` with no email to use browser approval; \`primitive signin browser\` is the explicit browser form. \`primitive login\` supports the same flows with login-shaped commands. \`primitive otp <email>\` is the shortest email-code auth form. For new account creation, use \`primitive signup <email>\`.`;
|
|
55836
55851
|
static summary = "Sign in to an existing account";
|
|
55837
55852
|
static examples = [
|
|
55838
55853
|
"<%= config.bin %> signin",
|
|
55839
55854
|
"<%= config.bin %> signin browser",
|
|
55840
55855
|
"<%= config.bin %> signin --no-browser",
|
|
55841
|
-
"<%= config.bin %> signin user@example.com --
|
|
55856
|
+
"<%= config.bin %> signin user@example.com --accept-terms",
|
|
55842
55857
|
"<%= config.bin %> signin confirm user@example.com 123456",
|
|
55843
|
-
"<%= config.bin %> signin otp user@example.com --
|
|
55858
|
+
"<%= config.bin %> signin otp user@example.com --accept-terms",
|
|
55844
55859
|
"<%= config.bin %> signin otp confirm user@example.com 123456"
|
|
55845
55860
|
];
|
|
55846
55861
|
static flags = {
|
|
@@ -55855,7 +55870,7 @@ Run \`primitive signin <email> --signup-code <code> --accept-terms\` for email-c
|
|
|
55855
55870
|
const commandClass = this.constructor;
|
|
55856
55871
|
const { args, flags } = await this.parse(commandClass);
|
|
55857
55872
|
if (!args.email) {
|
|
55858
|
-
if (flags["
|
|
55873
|
+
if (flags["accept-terms"]) throw cliError(`Email-code auth needs an email address. Run \`primitive ${this.emailCodeCopy().startCommand("<email>")} --accept-terms\`.`);
|
|
55859
55874
|
await this.runBrowserLogin(flags, this.retryCommand());
|
|
55860
55875
|
return;
|
|
55861
55876
|
}
|
|
@@ -55882,15 +55897,15 @@ var LoginCommand = class extends SigninCommand {
|
|
|
55882
55897
|
static args = SigninCommand.args;
|
|
55883
55898
|
static description = `Log in or sign in to an existing Primitive account and save an org-scoped OAuth session locally.
|
|
55884
55899
|
|
|
55885
|
-
Run \`primitive login <email> --
|
|
55900
|
+
Run \`primitive login <email> --accept-terms\` for email-code login, then \`primitive login confirm <email> <code>\`. Run \`primitive login\` with no email to use browser approval; \`primitive login browser\` is the explicit browser form. \`primitive signin\` supports the same flows with signin-shaped commands. \`primitive otp <email>\` is the shortest email-code auth form. For new account creation, use \`primitive signup <email>\`.`;
|
|
55886
55901
|
static summary = "Log in to an existing account";
|
|
55887
55902
|
static examples = [
|
|
55888
55903
|
"<%= config.bin %> login",
|
|
55889
55904
|
"<%= config.bin %> login browser",
|
|
55890
55905
|
"<%= config.bin %> login --no-browser",
|
|
55891
|
-
"<%= config.bin %> login user@example.com --
|
|
55906
|
+
"<%= config.bin %> login user@example.com --accept-terms",
|
|
55892
55907
|
"<%= config.bin %> login confirm user@example.com 123456",
|
|
55893
|
-
"<%= config.bin %> login otp user@example.com --
|
|
55908
|
+
"<%= config.bin %> login otp user@example.com --accept-terms",
|
|
55894
55909
|
"<%= config.bin %> login otp confirm user@example.com 123456"
|
|
55895
55910
|
];
|
|
55896
55911
|
static flags = SigninCommand.flags;
|
|
@@ -55932,9 +55947,9 @@ var SigninOtpCommand = class extends Command {
|
|
|
55932
55947
|
description: "Email address to sign in with",
|
|
55933
55948
|
required: false
|
|
55934
55949
|
}) };
|
|
55935
|
-
static description = "Start email-code sign-in using Primitive's signup/auth OTP flow, send a verification code, and save the pending token locally.
|
|
55950
|
+
static description = "Start email-code sign-in using Primitive's signup/auth OTP flow, send a verification code, and save the pending token locally.";
|
|
55936
55951
|
static summary = "Start OTP sign-in";
|
|
55937
|
-
static examples = ["<%= config.bin %> signin otp user@example.com --
|
|
55952
|
+
static examples = ["<%= config.bin %> signin otp user@example.com --accept-terms", "<%= config.bin %> signin otp confirm user@example.com 123456"];
|
|
55938
55953
|
static flags = commonOtpStartFlags();
|
|
55939
55954
|
async run() {
|
|
55940
55955
|
const commandClass = this.constructor;
|
|
@@ -55957,9 +55972,9 @@ var SigninOtpCommand = class extends Command {
|
|
|
55957
55972
|
};
|
|
55958
55973
|
var LoginOtpCommand = class extends SigninOtpCommand {
|
|
55959
55974
|
static args = SigninOtpCommand.args;
|
|
55960
|
-
static description = "Start email-code login using Primitive's signup/auth OTP flow, send a verification code, and save the pending token locally.
|
|
55975
|
+
static description = "Start email-code login using Primitive's signup/auth OTP flow, send a verification code, and save the pending token locally.";
|
|
55961
55976
|
static summary = "Start OTP login";
|
|
55962
|
-
static examples = ["<%= config.bin %> login otp user@example.com --
|
|
55977
|
+
static examples = ["<%= config.bin %> login otp user@example.com --accept-terms", "<%= config.bin %> login otp confirm user@example.com 123456"];
|
|
55963
55978
|
static flags = SigninOtpCommand.flags;
|
|
55964
55979
|
emailCodeCopy() {
|
|
55965
55980
|
return LOGIN_OTP_COPY;
|
|
@@ -55967,9 +55982,9 @@ var LoginOtpCommand = class extends SigninOtpCommand {
|
|
|
55967
55982
|
};
|
|
55968
55983
|
var OtpCommand = class extends SigninOtpCommand {
|
|
55969
55984
|
static args = SigninOtpCommand.args;
|
|
55970
|
-
static description = "Start email-code authentication, send a verification code, and save the pending token locally.
|
|
55985
|
+
static description = "Start email-code authentication, send a verification code, and save the pending token locally.";
|
|
55971
55986
|
static summary = "Start email-code auth";
|
|
55972
|
-
static examples = ["<%= config.bin %> otp user@example.com --
|
|
55987
|
+
static examples = ["<%= config.bin %> otp user@example.com --accept-terms", "<%= config.bin %> otp confirm user@example.com 123456"];
|
|
55973
55988
|
static flags = SigninOtpCommand.flags;
|
|
55974
55989
|
emailCodeCopy() {
|
|
55975
55990
|
return OTP_COPY;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, j as AGENT_PROFILE_ENV } from "../cli-config-DGrZCUfw.js";
|
|
2
2
|
import { d as readMailJson } from "../shared-mail-files-SPPcis9g.js";
|
|
3
|
-
import { m as SESSION_UUID, n as detectAgentRuntime, o as notificationScope } from "../connect-skill-
|
|
3
|
+
import { m as SESSION_UUID, n as detectAgentRuntime, o as notificationScope } from "../connect-skill-DHPc9dVN.js";
|
|
4
4
|
import { a as claimBackgroundListenRestart, n as backgroundListenRestartable, r as backgroundListenStatus } from "../listen-background-CyLc8VBn.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
@@ -115,7 +115,6 @@ function loggedOutSignupHint() {
|
|
|
115
115
|
" You or your user don't have an account yet?",
|
|
116
116
|
" Run `primitive signup <email> --accept-terms`",
|
|
117
117
|
" to create an account and get started.",
|
|
118
|
-
" Add `--signup-code <code>` if you have one.",
|
|
119
118
|
""
|
|
120
119
|
].join("\n");
|
|
121
120
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as createEndpoint, Dn as listSentEmails, Gn as sendEmail, T as bareAddress, in as getEmail, mt as successfulSendOutcome, o as extractErrorPayload, tt as classifySendError } from "./api-command-
|
|
1
|
+
import { Bt as createEndpoint, Dn as listSentEmails, Gn as sendEmail, T as bareAddress, in as getEmail, mt as successfulSendOutcome, o as extractErrorPayload, tt as classifySendError } from "./api-command-DzQ8KxD9.js";
|
|
2
2
|
import { _ as acquireListenLock, b as listenProcessIdentity, 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, y as listenIdentity } from "./shared-mail-files-SPPcis9g.js";
|
|
3
3
|
import { h as sendPreparedSignal, p as prepareSignalEmail } from "./repeats-D2xtLium-DdiJECLI.js";
|
|
4
4
|
import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-BUfUaq6j.js";
|
|
@@ -334,7 +334,7 @@ async function pullFile(root, outPath, opts) {
|
|
|
334
334
|
return manifest;
|
|
335
335
|
}
|
|
336
336
|
//#endregion
|
|
337
|
-
//#region ../sdk-node/dist/api-
|
|
337
|
+
//#region ../sdk-node/dist/api-DhHWJdMM.js
|
|
338
338
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
339
339
|
function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
|
|
340
340
|
let lastEventId;
|
|
@@ -155,10 +155,11 @@ line or check result names.
|
|
|
155
155
|
answer.
|
|
156
156
|
4. Acknowledge without waking the sender: `primitive reply --id <id> --fyi`.
|
|
157
157
|
Never answer mail marked `fyi`, and never answer your own mail.
|
|
158
|
-
5. For work that outlasts the reply, keep a work claim: write
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
run `primitive agent working clear`
|
|
158
|
+
5. For work that outlasts the reply, keep a work claim: write one line
|
|
159
|
+
naming the task and files to a private file and run
|
|
160
|
+
`primitive agent working set --stdin --private < <file>` (it expires in 4 hours
|
|
161
|
+
unless you add `--until <ISO time>`); run `primitive agent working clear`
|
|
162
|
+
when done. Check a peer's
|
|
162
163
|
claim with `primitive agent working get --address <peer>` before editing
|
|
163
164
|
shared files.
|
|
164
165
|
6. Mute a thread that is not yours: `primitive threads mute --id <thread-id>`.
|
|
@@ -983,9 +984,12 @@ this session alone.
|
|
|
983
984
|
- Claims are advisory, not locks, and grant no authority.
|
|
984
985
|
|
|
985
986
|
Claim text names private work, so never pass it as a command argument, where
|
|
986
|
-
process listings and shell history can show it. With the CLI, write the
|
|
987
|
-
|
|
988
|
-
--
|
|
987
|
+
process listings and shell history can show it. With the CLI, write the claim
|
|
988
|
+
line to a private file and run `primitive agent working set --stdin
|
|
989
|
+
--private < <private-claim-file>`, which stores the expiring JSON form and checks it. On a
|
|
990
|
+
CLI older than 1.47.0, which has no `--stdin`, write the JSON value instead with
|
|
991
|
+
`primitive agent notes set AGENT_WORKING --value-file <private-claim-json-file>
|
|
992
|
+
--private`. Read a peer's claim with
|
|
989
993
|
`primitive agent working get --address <peer-address>`, and end yours with
|
|
990
994
|
`primitive agent working clear`.
|
|
991
995
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primitive-connect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "011e1c8d88dba40f",
|
|
4
4
|
"source": {
|
|
5
5
|
"repository": "https://github.com/primitivedotdev/skills",
|
|
6
6
|
"path": "skills/primitive-connect",
|
|
7
|
-
"commit": "
|
|
7
|
+
"commit": "e71ec5d857096eec39a05372bc78f99448fb1e31"
|
|
8
8
|
},
|
|
9
9
|
"files": {
|
|
10
|
-
"SKILL.md": "
|
|
10
|
+
"SKILL.md": "8c18870f708563ba3e3a922fad0621aff85b6b279d2fb19cf249a454fc615d99",
|
|
11
11
|
"package-lock.json": "443289373a7495883a9a3b57bab3bc471cd5dcb4989a9e67f797b35917c1acc5",
|
|
12
12
|
"package.json": "8cc45b2c28ba415960c9b85f6c1449f15f9c10bac0b96922e7907b40d50e3dbf",
|
|
13
13
|
"references/communication.md": "c931aada9553a8592088c28de5b272d5e0a15234aa9c9318ea7d1d5f69b39a79",
|
package/man/primitive.1
CHANGED
|
@@ -169,7 +169,7 @@ or
|
|
|
169
169
|
.BR PRIMITIVE_API_KEY .
|
|
170
170
|
.PP
|
|
171
171
|
Run
|
|
172
|
-
.B primitive signin EMAIL --
|
|
172
|
+
.B primitive signin EMAIL --accept-terms
|
|
173
173
|
to start email-code sign-in, then run
|
|
174
174
|
.B primitive signin confirm EMAIL CODE
|
|
175
175
|
with the emailed verification code.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primcli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
4
|
"description": "Official Primitive CLI: deploy Primitive Functions, send and inspect mail, manage endpoints, all from the terminal. Wraps the @primitivedotdev/sdk runtime client with one-shot commands.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|