primcli 1.47.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 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> --signup-code <code> --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.
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` (pass `--signup-code <code>` too if you have one).
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. `signup_code` is optional;
215
- * omit it to sign up without one. The API creates a pending signup
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. When the session was started with a `signup_code`, the
249
- * reserved code is redeemed; sessions started without a code skip
250
- * the redemption step. Either way an org-scoped OAuth CLI session
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. `signup_code` is optional;
267
- * omit it to sign up without one. The API creates a pending signup
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. When the session was started with a
301
- * `signup_code`, the reserved code is redeemed; sessions started
302
- * without a code skip the redemption step. An org-scoped OAuth
303
- * session for CLI authentication is minted and the raw tokens are
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({
@@ -4891,7 +4883,7 @@ function savedConnectedProfiles(configDir, exclude) {
4891
4883
  */
4892
4884
  async function otherProfiles(configDir, session, current) {
4893
4885
  if (session) try {
4894
- const { connectedProfilesForSession } = await import("./machine-session-Dr5W2fHb.js").then((n) => n.s);
4886
+ const { connectedProfilesForSession } = await import("./machine-session-BaJ1Xmdm.js").then((n) => n.s);
4895
4887
  return {
4896
4888
  inSession: true,
4897
4889
  profiles: connectedProfilesForSession(configDir, session, current)
@@ -5564,7 +5556,7 @@ const OPERATION_HINTS = {
5564
5556
  getMemory: "Tip: prefer `primitive memories get <key> [--function <function-id>]` for the common read path.",
5565
5557
  deleteMemory: "Tip: prefer `primitive memories delete <key> [--function <function-id>]` for the common delete path.",
5566
5558
  searchMemories: "Tip: prefer `primitive memories search [prefix] [--metadata-only] [--function <function-id>]` for the common search path.",
5567
- startAgentSignup: "Tip: pass --terms-accepted, and optionally --signup-code <code> if you have one. 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.",
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.",
5568
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."
5569
5561
  };
5570
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-C1JvJqV0.js";
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-C1JvJqV0.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-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-CH2pq436.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-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-C1JvJqV0.js";
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-Dbyqyas9.js";
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";
@@ -1,11 +1,11 @@
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-C1JvJqV0.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-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-Dr5W2fHb.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-CH2pq436.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-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-Dbyqyas9.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-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";
@@ -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. `signup_code` is optional;\nomit it to sign up without one. The API creates a pending signup\nsession, 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",
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. When the session was started with a `signup_code`, the\nreserved code is redeemed; sessions started without a code skip\nthe redemption step. Either way an org-scoped OAuth CLI session\nis created and the token set is returned exactly once. This\nendpoint does not require an API key.\n",
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, invalid signup code, rejected password, or account creation failure",
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. `signup_code` is optional;\nomit it to sign up without one. The API creates a pending signup\nsession, 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",
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. When the session was started with a\n`signup_code`, the reserved code is redeemed; sessions started\nwithout a code skip the redemption step. An org-scoped OAuth\nsession for CLI authentication is minted and the raw tokens are\nreturned exactly once. For existing users, the optional `org_id`\nselects which accessible workspace should receive the new\nsession (no signup-code redemption is performed for existing\nusers regardless of how the session was started).\n",
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, invalid signup code, or account creation failure",
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" },
@@ -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. `signup_code` is optional;\nomit it to sign up without one. The API creates a pending signup\nsession, 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",
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. When the session was started with a\n`signup_code`, the reserved code is redeemed; sessions started\nwithout a code skip the redemption step. An org-scoped OAuth\nsession for CLI authentication is minted and the raw tokens are\nreturned exactly once. For existing users, the optional `org_id`\nselects which accessible workspace should receive the new\nsession (no signup-code redemption is performed for existing\nusers regardless of how the session was started).\n",
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. `signup_code` is optional;\nomit it to sign up without one. The API creates a pending signup\nsession, 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",
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. When the session was started with a `signup_code`, the\nreserved code is redeemed; sessions started without a code skip\nthe redemption step. Either way an org-scoped OAuth CLI session\nis created and the token set is returned exactly once. This\nendpoint does not require an API key.\n",
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",
@@ -43341,8 +43316,8 @@ const PRIMITIVE_TEAM_AUTHOR = {
43341
43316
  name: "Primitive Team",
43342
43317
  url: "https://primitive.dev"
43343
43318
  };
43344
- const SDK_VERSION_RANGE = "^1.34.0";
43345
- const CLI_VERSION_RANGE = "^1.47.0";
43319
+ const SDK_VERSION_RANGE = "^1.35.0";
43320
+ const CLI_VERSION_RANGE = "^1.48.0";
43346
43321
  const ESBUILD_VERSION_RANGE = "^0.27.0";
43347
43322
  function renderHandler() {
43348
43323
  return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
@@ -48969,8 +48944,7 @@ const DEFAULT_SIGNUP_COMMAND_COPY = {
48969
48944
  actionGerund: "creating a new account",
48970
48945
  confirmCommand: (email) => `signup confirm ${email} <code>`,
48971
48946
  resendCommand: (email) => `signup resend ${email}`,
48972
- startCommand: (email) => `signup ${email}`,
48973
- codeRequired: false
48947
+ startCommand: (email) => `signup ${email}`
48974
48948
  };
48975
48949
  function cliError$2(message) {
48976
48950
  return new Errors.CLIError(message, { exit: 1 });
@@ -49252,16 +49226,12 @@ async function startSignup(params) {
49252
49226
  }
49253
49227
  if (params.flags.force) deletePendingAgentSignup(params.configDir);
49254
49228
  const confirmTermsFn = params.deps.confirmTerms ?? confirmTerms;
49255
- const promptRequiredFn = params.deps.promptRequired ?? promptRequired;
49256
49229
  const startFn = params.deps.startAgentSignup ?? startAgentSignup;
49257
- const rawSignupCode = params.flags["signup-code"];
49258
- const signupCode = (rawSignupCode && rawSignupCode.trim().length > 0 ? rawSignupCode : void 0) ?? (copy.codeRequired ? await promptRequiredFn("Signup code: ") : void 0);
49259
49230
  if (!params.flags["accept-terms"]) await confirmTermsFn();
49260
49231
  const started = await startFn({
49261
49232
  body: {
49262
49233
  device_name: params.flags["device-name"] ?? hostname(),
49263
49234
  email: params.email,
49264
- ...signupCode ? { signup_code: signupCode } : {},
49265
49235
  terms_accepted: true
49266
49236
  },
49267
49237
  client: params.apiClient.client,
@@ -49489,10 +49459,6 @@ function commonStartFlags() {
49489
49459
  force: Flags.boolean({
49490
49460
  char: "f",
49491
49461
  description: "Replace saved credentials or pending signup state when needed"
49492
- }),
49493
- "signup-code": Flags.string({
49494
- description: "Optional signup code. Omit if you do not have one.",
49495
- env: "PRIMITIVE_SIGNUP_CODE"
49496
49462
  })
49497
49463
  };
49498
49464
  }
@@ -49506,7 +49472,6 @@ var SignupCommand = class SignupCommand extends Command {
49506
49472
  static examples = [
49507
49473
  "<%= config.bin %> signup user@example.com",
49508
49474
  "<%= config.bin %> signup user@example.com --accept-terms",
49509
- "<%= config.bin %> signup user@example.com --signup-code invite-code --accept-terms",
49510
49475
  "<%= config.bin %> signup confirm user@example.com 123456"
49511
49476
  ];
49512
49477
  static flags = commonStartFlags();
@@ -55823,40 +55788,35 @@ const SIGNIN_OTP_COPY = {
55823
55788
  actionGerund: "signing in",
55824
55789
  confirmCommand: (email) => `signin otp confirm ${email} <code>`,
55825
55790
  resendCommand: (email) => `signin otp resend ${email}`,
55826
- startCommand: (email) => `signin otp ${email}`,
55827
- codeRequired: true
55791
+ startCommand: (email) => `signin otp ${email}`
55828
55792
  };
55829
55793
  const SIGNIN_EMAIL_COPY = {
55830
55794
  actionNoun: "sign-in",
55831
55795
  actionGerund: "signing in",
55832
55796
  confirmCommand: (email) => `signin confirm ${email} <code>`,
55833
55797
  resendCommand: (email) => `signin resend ${email}`,
55834
- startCommand: (email) => `signin ${email}`,
55835
- codeRequired: true
55798
+ startCommand: (email) => `signin ${email}`
55836
55799
  };
55837
55800
  const LOGIN_EMAIL_COPY = {
55838
55801
  actionNoun: "login",
55839
55802
  actionGerund: "logging in",
55840
55803
  confirmCommand: (email) => `login confirm ${email} <code>`,
55841
55804
  resendCommand: (email) => `login resend ${email}`,
55842
- startCommand: (email) => `login ${email}`,
55843
- codeRequired: true
55805
+ startCommand: (email) => `login ${email}`
55844
55806
  };
55845
55807
  const LOGIN_OTP_COPY = {
55846
55808
  actionNoun: "login",
55847
55809
  actionGerund: "logging in",
55848
55810
  confirmCommand: (email) => `login otp confirm ${email} <code>`,
55849
55811
  resendCommand: (email) => `login otp resend ${email}`,
55850
- startCommand: (email) => `login otp ${email}`,
55851
- codeRequired: true
55812
+ startCommand: (email) => `login otp ${email}`
55852
55813
  };
55853
55814
  const OTP_COPY = {
55854
55815
  actionNoun: "email-code auth",
55855
55816
  actionGerund: "authenticating",
55856
55817
  confirmCommand: (email) => `otp confirm ${email} <code>`,
55857
55818
  resendCommand: (email) => `otp resend ${email}`,
55858
- startCommand: (email) => `otp ${email}`,
55859
- codeRequired: true
55819
+ startCommand: (email) => `otp ${email}`
55860
55820
  };
55861
55821
  function acquireCredentialsLock(configDir) {
55862
55822
  try {
@@ -55877,10 +55837,6 @@ function commonOtpStartFlags() {
55877
55837
  force: Flags.boolean({
55878
55838
  char: "f",
55879
55839
  description: "Replace saved credentials or pending email-code auth state when needed"
55880
- }),
55881
- "signup-code": Flags.string({
55882
- description: "Signup code required to start email-code sign-in",
55883
- env: "PRIMITIVE_SIGNUP_CODE"
55884
55840
  })
55885
55841
  };
55886
55842
  }
@@ -55891,15 +55847,15 @@ var SigninCommand = class extends LoginCommand$1 {
55891
55847
  }) };
55892
55848
  static description = `Sign in or log in to an existing Primitive account and save an org-scoped OAuth session locally.
55893
55849
 
55894
- Run \`primitive signin <email> --signup-code <code> --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>\`.`;
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>\`.`;
55895
55851
  static summary = "Sign in to an existing account";
55896
55852
  static examples = [
55897
55853
  "<%= config.bin %> signin",
55898
55854
  "<%= config.bin %> signin browser",
55899
55855
  "<%= config.bin %> signin --no-browser",
55900
- "<%= config.bin %> signin user@example.com --signup-code invite-code --accept-terms",
55856
+ "<%= config.bin %> signin user@example.com --accept-terms",
55901
55857
  "<%= config.bin %> signin confirm user@example.com 123456",
55902
- "<%= config.bin %> signin otp user@example.com --signup-code invite-code --accept-terms",
55858
+ "<%= config.bin %> signin otp user@example.com --accept-terms",
55903
55859
  "<%= config.bin %> signin otp confirm user@example.com 123456"
55904
55860
  ];
55905
55861
  static flags = {
@@ -55914,7 +55870,7 @@ Run \`primitive signin <email> --signup-code <code> --accept-terms\` for email-c
55914
55870
  const commandClass = this.constructor;
55915
55871
  const { args, flags } = await this.parse(commandClass);
55916
55872
  if (!args.email) {
55917
- if (flags["signup-code"] || flags["accept-terms"]) throw cliError(`Email-code auth needs an email address. Run \`primitive ${this.emailCodeCopy().startCommand("<email>")} --signup-code <code> --accept-terms\`.`);
55873
+ if (flags["accept-terms"]) throw cliError(`Email-code auth needs an email address. Run \`primitive ${this.emailCodeCopy().startCommand("<email>")} --accept-terms\`.`);
55918
55874
  await this.runBrowserLogin(flags, this.retryCommand());
55919
55875
  return;
55920
55876
  }
@@ -55941,15 +55897,15 @@ var LoginCommand = class extends SigninCommand {
55941
55897
  static args = SigninCommand.args;
55942
55898
  static description = `Log in or sign in to an existing Primitive account and save an org-scoped OAuth session locally.
55943
55899
 
55944
- Run \`primitive login <email> --signup-code <code> --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>\`.`;
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>\`.`;
55945
55901
  static summary = "Log in to an existing account";
55946
55902
  static examples = [
55947
55903
  "<%= config.bin %> login",
55948
55904
  "<%= config.bin %> login browser",
55949
55905
  "<%= config.bin %> login --no-browser",
55950
- "<%= config.bin %> login user@example.com --signup-code invite-code --accept-terms",
55906
+ "<%= config.bin %> login user@example.com --accept-terms",
55951
55907
  "<%= config.bin %> login confirm user@example.com 123456",
55952
- "<%= config.bin %> login otp user@example.com --signup-code invite-code --accept-terms",
55908
+ "<%= config.bin %> login otp user@example.com --accept-terms",
55953
55909
  "<%= config.bin %> login otp confirm user@example.com 123456"
55954
55910
  ];
55955
55911
  static flags = SigninCommand.flags;
@@ -55991,9 +55947,9 @@ var SigninOtpCommand = class extends Command {
55991
55947
  description: "Email address to sign in with",
55992
55948
  required: false
55993
55949
  }) };
55994
- static description = "Start email-code sign-in using Primitive's signup/auth OTP flow, send a verification code, and save the pending token locally. Requires a signup code.";
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.";
55995
55951
  static summary = "Start OTP sign-in";
55996
- static examples = ["<%= config.bin %> signin otp user@example.com --signup-code invite-code --accept-terms", "<%= config.bin %> signin otp confirm user@example.com 123456"];
55952
+ static examples = ["<%= config.bin %> signin otp user@example.com --accept-terms", "<%= config.bin %> signin otp confirm user@example.com 123456"];
55997
55953
  static flags = commonOtpStartFlags();
55998
55954
  async run() {
55999
55955
  const commandClass = this.constructor;
@@ -56016,9 +55972,9 @@ var SigninOtpCommand = class extends Command {
56016
55972
  };
56017
55973
  var LoginOtpCommand = class extends SigninOtpCommand {
56018
55974
  static args = SigninOtpCommand.args;
56019
- static description = "Start email-code login using Primitive's signup/auth OTP flow, send a verification code, and save the pending token locally. Requires a signup code.";
55975
+ static description = "Start email-code login using Primitive's signup/auth OTP flow, send a verification code, and save the pending token locally.";
56020
55976
  static summary = "Start OTP login";
56021
- static examples = ["<%= config.bin %> login otp user@example.com --signup-code invite-code --accept-terms", "<%= config.bin %> login otp confirm user@example.com 123456"];
55977
+ static examples = ["<%= config.bin %> login otp user@example.com --accept-terms", "<%= config.bin %> login otp confirm user@example.com 123456"];
56022
55978
  static flags = SigninOtpCommand.flags;
56023
55979
  emailCodeCopy() {
56024
55980
  return LOGIN_OTP_COPY;
@@ -56026,9 +55982,9 @@ var LoginOtpCommand = class extends SigninOtpCommand {
56026
55982
  };
56027
55983
  var OtpCommand = class extends SigninOtpCommand {
56028
55984
  static args = SigninOtpCommand.args;
56029
- static description = "Start email-code authentication, send a verification code, and save the pending token locally. Requires a signup code.";
55985
+ static description = "Start email-code authentication, send a verification code, and save the pending token locally.";
56030
55986
  static summary = "Start email-code auth";
56031
- static examples = ["<%= config.bin %> otp user@example.com --signup-code invite-code --accept-terms", "<%= config.bin %> otp confirm user@example.com 123456"];
55987
+ static examples = ["<%= config.bin %> otp user@example.com --accept-terms", "<%= config.bin %> otp confirm user@example.com 123456"];
56032
55988
  static flags = SigninOtpCommand.flags;
56033
55989
  emailCodeCopy() {
56034
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-CH2pq436.js";
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-C1JvJqV0.js";
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-DhmH89R-.js
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;
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 --signup-code CODE --accept-terms
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.47.0",
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,