primcli 1.58.1 → 1.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-command-CyWk4AU1.js → api-command-DhVH83yC.js} +1 -1
- package/dist/{machine-session-BP8zoOTi.js → machine-session-RQaFXKFO.js} +5 -5
- package/dist/{notify-session-ByQ8Iq4v.js → notify-session-DHE3g9kC.js} +1 -1
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/index.js +30 -7
- package/dist/oclif/receiver-heal.js +1 -1
- package/dist/{signal-command-KEfppb9h.js → signal-command-BRZtDVlD.js} +1 -1
- package/package.json +1 -1
|
@@ -5126,7 +5126,7 @@ function savedConnectedProfiles(configDir, exclude) {
|
|
|
5126
5126
|
*/
|
|
5127
5127
|
async function otherProfiles(configDir, session, current) {
|
|
5128
5128
|
if (session) try {
|
|
5129
|
-
const { connectedProfilesForSession } = await import("./machine-session-
|
|
5129
|
+
const { connectedProfilesForSession } = await import("./machine-session-RQaFXKFO.js").then((n) => n.s);
|
|
5130
5130
|
return {
|
|
5131
5131
|
inSession: true,
|
|
5132
5132
|
profiles: connectedProfilesForSession(configDir, session, current)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { b as __exportAll } from "./repeats-x4QM2yoG-De3MV3st.js";
|
|
2
2
|
import { B as parseOwnerMemberAddress, F as agentProfilesDirectory, I as connectedAgentIdentity, L as connectedApiBaseUrl, M as AgentConnectionSetupError, N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, U as saveConnectedAgentProfile, V as profileAlreadyConnectedMessage, W as PrimitiveApiClient, j as AGENT_PROFILE_ENV, x as loadCliCredentials, z as parseConnectedAgentProfile } from "./cli-config-DMszFbGn.js";
|
|
3
|
-
import { An as listContacts, Bn as listSentEmails, Jn as putContact, Kn as putAgentContact, Nn as listDomains, On as listAgentContacts, Tt as defaultConnectionName, _n as getEmail, an as deleteContact, fn as getAgentContactPolicy, in as deleteAgentContact, ir as sendEmail, pn as getContact, qn as putAgentContactPolicy, qt as refreshStoredCliCredentials, tr as searchEmails } from "./api-command-
|
|
3
|
+
import { An as listContacts, Bn as listSentEmails, Ct as cliInvocation, Jn as putContact, Kn as putAgentContact, Nn as listDomains, On as listAgentContacts, Tt as defaultConnectionName, _n as getEmail, an as deleteContact, fn as getAgentContactPolicy, in as deleteAgentContact, ir as sendEmail, pn as getContact, qn as putAgentContactPolicy, qt as refreshStoredCliCredentials, tr as searchEmails } from "./api-command-DhVH83yC.js";
|
|
4
4
|
import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, g as ListenStateError, h as writeMailJson, i as mailId, l as privateMailDirectory, o as mailObject, r as mailAddress, s as mailString } from "./shared-mail-files-MwlVE90c.js";
|
|
5
|
-
import { _ as detectAgentRuntime, a as NotificationRetryError, d as defaultSessionSocket, f as NativeSessionDisconnectedError, l as SESSION_UUID, t as notificationScope, u as connectNativeSession, v as installConnectSkill, x as readBundledConnectSkill } from "./notify-session-
|
|
5
|
+
import { _ as detectAgentRuntime, a as NotificationRetryError, d as defaultSessionSocket, f as NativeSessionDisconnectedError, l as SESSION_UUID, t as notificationScope, u as connectNativeSession, v as installConnectSkill, x as readBundledConnectSkill } from "./notify-session-DHE3g9kC.js";
|
|
6
6
|
import { a as scopedChatSenderTrust } from "./scoped-chat-C7cpIxVS.js";
|
|
7
7
|
import { l as stopBackgroundListen, r as backgroundListenStatus } from "./listen-background--0peztKE.js";
|
|
8
8
|
import { t as readSharedMailOwner } from "./shared-mail-watch-DtKpsgg8.js";
|
|
@@ -1769,15 +1769,15 @@ function savedReceiver(configDir, profileName) {
|
|
|
1769
1769
|
* poll receivers run no background listener, so `listen --status` would
|
|
1770
1770
|
* report one absent; they are inspected with `agent connect --status`.
|
|
1771
1771
|
*/
|
|
1772
|
-
function receiverStatusCommand(configDir, profileName) {
|
|
1772
|
+
function receiverStatusCommand(configDir, profileName, entry = process.argv[1]) {
|
|
1773
1773
|
const receiver = savedReceiver(configDir, profileName);
|
|
1774
1774
|
if (receiver?.mode === "native" && receiver.session) return {
|
|
1775
1775
|
mode: "native",
|
|
1776
|
-
command: `PRIMITIVE_AGENT_PROFILE=${profileName}
|
|
1776
|
+
command: `PRIMITIVE_AGENT_PROFILE=${profileName} ${cliInvocation(entry)} listen --status --notify-session ${receiver.session}`
|
|
1777
1777
|
};
|
|
1778
1778
|
return {
|
|
1779
1779
|
mode: receiver?.mode ?? null,
|
|
1780
|
-
command:
|
|
1780
|
+
command: `${cliInvocation(entry)} agent connect --profile ${profileName} --status --json`
|
|
1781
1781
|
};
|
|
1782
1782
|
}
|
|
1783
1783
|
/** Offline metadata only; a saved profile is not proof of current API or listener readiness. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, v as parseWebhookEvent } from "./repeats-x4QM2yoG-De3MV3st.js";
|
|
2
|
-
import { F as wakeReadCommand, P as skillFirstLine, Y as wakeInteractionSentence, un as downloadEmailAttachmentPart } from "./api-command-
|
|
2
|
+
import { F as wakeReadCommand, P as skillFirstLine, Y as wakeInteractionSentence, un as downloadEmailAttachmentPart } from "./api-command-DhVH83yC.js";
|
|
3
3
|
import { _ as acquireListenLock, g as ListenStateError, y as listenIdentity } from "./shared-mail-files-MwlVE90c.js";
|
|
4
4
|
import { closeSync, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, opendirSync, readFileSync, readdirSync, readlinkSync, renameSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { createHash, randomUUID, scryptSync } from "node:crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as readThreadContext, Gt as createAuthenticatedCliApiClient, Tn as getSentEmail } from "../api-command-
|
|
1
|
+
import { A as readThreadContext, Gt as createAuthenticatedCliApiClient, Tn as getSentEmail } from "../api-command-DhVH83yC.js";
|
|
2
2
|
import { _ as acquireListenLock } from "../shared-mail-files-MwlVE90c.js";
|
|
3
|
-
import { t as sendSignal } from "../signal-command-
|
|
3
|
+
import { t as sendSignal } from "../signal-command-BRZtDVlD.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,12 +1,12 @@
|
|
|
1
1
|
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-x4QM2yoG-De3MV3st.js";
|
|
2
2
|
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-DMszFbGn.js";
|
|
3
|
-
import { $ as apiResultHttpStatus, $n as resendAgentSignupVerification, $t as createEndpoint, A as readThreadContext, At as formatAlreadySentNotice, B as pendingMailPath, Bn as listSentEmails, Bt as expectedAutomatedVerdicts, C as queryUsesAwaiting, Cn as getOrgRoutingTopology, Ct as cliInvocation, D as displayAddress, Dn as getWakeSchedule, Dt as identitySuggestions, E as describeWake, En as getThread, Et as generatedAgentName, F as wakeReadCommand, Fn as listEndpoints, Ft as AUTOMATED_VALUES, G as interactionNextActions, Gn as pullWebhookEvent, Gt as createAuthenticatedCliApiClient, H as recordPendingMail, Hn as listWakeDispatches, Ht as isAutomatedRejectedError, I as wakeRecipientField, In as listFunctionLogs, It as AutomatedFilterUnsupportedError, J as replyInteractionWarning, Jt as resolveCliApiRequestConfig, K as readEmailInteraction, Kt as createCliApiClient, L as wakeRelationship, Ln as listFunctions, Lt as assertAutomatedVerdict, M as serverMuted, Mn as listDefaultNetworkMembers, Mt as withFlagSuggestion, N as serverRelationship, Nn as listDomains, Nt as AUTOMATED_FILTER_UNSUPPORTED_CODE, O as formatMailWakeLine, On as listAgentContacts, Ot as loadSkillLine, Pn as listEmails, Pt as AUTOMATED_FLAG_DESCRIPTION, Q as SEND_OUTCOME_HELP, Qn as replyToEmail, Qt as completeWebhookEvent, R as clearConsumedPendingMail, Rn as listRepeatingSends, Rt as automatedRejectedError, S as isAwaitingRejectedError, Sn as getMemory, Sr as verifyAgentSignup, T as bareAddress, Tn as getSentEmail, U as removePendingMail, Un as listWakeSchedules, Ut as queryUsesAutomated, V as readPendingMail, Vn as listWakeAuthorizations, Vt as hasAutomatedVerdict, W as interactionHumanLine, Wn as pollCliLogin, X as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, Xn as removeDefaultNetworkMember, Xt as checkDefaultNetworkContactAdmission, Yn as redeemCreditCode, Yt as addDefaultNetworkMember, Z as MAX_SEND_WAIT_TIMEOUT_MS, Zn as reorderRoutes, Zt as cliLogout, _ as awaitingRejectedError, _n as getEmail, _r as updateRepeatingSend, _t as sendWaitClampNotice, a as extractErrorCode, ar as setFunctionRoute, at as deriveSendIdempotencyKey, b as formatRepliesCell, bn as getFunctionTestRunTrace, br as updateWakeSchedule, bt as successfulSendOutcome, c as readTextFileFlag, cn as deleteWakeAuthorization, cr as simulateRoute, ct as formatDeletedEarlierSendNotice, d as writeErrorWithHints, dn as getAccount, dr as startCliLogin, dt as formatSendFailureSummary, en as createFunction, er as runWakeSchedule, et as assertValidIdempotencyKey, f as AWAITING_FLAG_DESCRIPTION, fn as getAgentContactPolicy, fr as stopRepeatFromEmail, ft as formatSendRecordFailureSummary, g as assertAwaitingFilterRows, gn as getDefaultNetworkAgent, gr as updateFunction, gt as sendOutcomeExitCode, h as ReplyStateUnsupportedError, hn as getCreditBalance, hr as updateDefaultNetworkMember, ht as sendIdentityFields, i as createOperationCommand, ir as sendEmail, it as classifySendError, j as sentInThread, jn as listDefaultNetworkAgents, jt as writeIdempotentReplayBannerIfReplay, k as latestOwnOutbound, kn as listAgentNetworks, kt as currentMailSessionKey, l as runWithTiming, ln as deleteWakeSchedule, lr as startAgentClaim, lt as formatPriorRepliesCheckSkipped, m as REPLY_STATE_UNSUPPORTED_CODE, mn as getConversation, mr as unsetFunctionRoute, mt as reportSendCommandResult, n as API_ERROR_CODES, nn as createWakeAuthorization, nr as searchMemories, nt as buildThrownSendFailureEnvelope, o as extractErrorPayload, on as deleteMemory, or as setFunctionSecret, ot as excludeSignalReplies, p as AWAITING_VALUES, pr as testFunction, pt as priorRepliesThatWentOut, q as replyExpectation, qt as refreshStoredCliCredentials, r as TIME_FLAG_DESCRIPTION, rn as createWakeSchedule, rr as semanticSearch, rt as checkPriorReplies, s as formatErrorPayload, sn as deleteRoute, sr as setMemory, st as followUpCommandPrefix, t as API_BASE_URL_FLAG_DESCRIPTION, tn as createRoute, tr as searchEmails, tt as buildFollowUpCommand, u as surfaceUnauthorizedHint, ur as startAgentSignup, ut as formatPriorRepliesWarning, v as ensureSearchReportsReplyState, vn as getFunction, vr as updateRoute, vt as sentHistoryWindowStart, w as explainPendingMailNotFound, wn as getRepeatingSend, wt as connectNextSteps, x as hasReplyState, xn as getInboxStatus, xr as verifyAgentClaim, xt as thrownErrorExitCode, y as formatAwaitingCell, yn as getFunctionRouting, yr as updateWakeAuthorization, yt as serializeErrorPayload, z as clearReadPendingMail, zn as listRoutes, zt as ensureSearchReportsAutomated } from "../api-command-
|
|
3
|
+
import { $ as apiResultHttpStatus, $n as resendAgentSignupVerification, $t as createEndpoint, A as readThreadContext, At as formatAlreadySentNotice, B as pendingMailPath, Bn as listSentEmails, Bt as expectedAutomatedVerdicts, C as queryUsesAwaiting, Cn as getOrgRoutingTopology, Ct as cliInvocation, D as displayAddress, Dn as getWakeSchedule, Dt as identitySuggestions, E as describeWake, En as getThread, Et as generatedAgentName, F as wakeReadCommand, Fn as listEndpoints, Ft as AUTOMATED_VALUES, G as interactionNextActions, Gn as pullWebhookEvent, Gt as createAuthenticatedCliApiClient, H as recordPendingMail, Hn as listWakeDispatches, Ht as isAutomatedRejectedError, I as wakeRecipientField, In as listFunctionLogs, It as AutomatedFilterUnsupportedError, J as replyInteractionWarning, Jt as resolveCliApiRequestConfig, K as readEmailInteraction, Kt as createCliApiClient, L as wakeRelationship, Ln as listFunctions, Lt as assertAutomatedVerdict, M as serverMuted, Mn as listDefaultNetworkMembers, Mt as withFlagSuggestion, N as serverRelationship, Nn as listDomains, Nt as AUTOMATED_FILTER_UNSUPPORTED_CODE, O as formatMailWakeLine, On as listAgentContacts, Ot as loadSkillLine, Pn as listEmails, Pt as AUTOMATED_FLAG_DESCRIPTION, Q as SEND_OUTCOME_HELP, Qn as replyToEmail, Qt as completeWebhookEvent, R as clearConsumedPendingMail, Rn as listRepeatingSends, Rt as automatedRejectedError, S as isAwaitingRejectedError, Sn as getMemory, Sr as verifyAgentSignup, T as bareAddress, Tn as getSentEmail, U as removePendingMail, Un as listWakeSchedules, Ut as queryUsesAutomated, V as readPendingMail, Vn as listWakeAuthorizations, Vt as hasAutomatedVerdict, W as interactionHumanLine, Wn as pollCliLogin, X as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, Xn as removeDefaultNetworkMember, Xt as checkDefaultNetworkContactAdmission, Yn as redeemCreditCode, Yt as addDefaultNetworkMember, Z as MAX_SEND_WAIT_TIMEOUT_MS, Zn as reorderRoutes, Zt as cliLogout, _ as awaitingRejectedError, _n as getEmail, _r as updateRepeatingSend, _t as sendWaitClampNotice, a as extractErrorCode, ar as setFunctionRoute, at as deriveSendIdempotencyKey, b as formatRepliesCell, bn as getFunctionTestRunTrace, br as updateWakeSchedule, bt as successfulSendOutcome, c as readTextFileFlag, cn as deleteWakeAuthorization, cr as simulateRoute, ct as formatDeletedEarlierSendNotice, d as writeErrorWithHints, dn as getAccount, dr as startCliLogin, dt as formatSendFailureSummary, en as createFunction, er as runWakeSchedule, et as assertValidIdempotencyKey, f as AWAITING_FLAG_DESCRIPTION, fn as getAgentContactPolicy, fr as stopRepeatFromEmail, ft as formatSendRecordFailureSummary, g as assertAwaitingFilterRows, gn as getDefaultNetworkAgent, gr as updateFunction, gt as sendOutcomeExitCode, h as ReplyStateUnsupportedError, hn as getCreditBalance, hr as updateDefaultNetworkMember, ht as sendIdentityFields, i as createOperationCommand, ir as sendEmail, it as classifySendError, j as sentInThread, jn as listDefaultNetworkAgents, jt as writeIdempotentReplayBannerIfReplay, k as latestOwnOutbound, kn as listAgentNetworks, kt as currentMailSessionKey, l as runWithTiming, ln as deleteWakeSchedule, lr as startAgentClaim, lt as formatPriorRepliesCheckSkipped, m as REPLY_STATE_UNSUPPORTED_CODE, mn as getConversation, mr as unsetFunctionRoute, mt as reportSendCommandResult, n as API_ERROR_CODES, nn as createWakeAuthorization, nr as searchMemories, nt as buildThrownSendFailureEnvelope, o as extractErrorPayload, on as deleteMemory, or as setFunctionSecret, ot as excludeSignalReplies, p as AWAITING_VALUES, pr as testFunction, pt as priorRepliesThatWentOut, q as replyExpectation, qt as refreshStoredCliCredentials, r as TIME_FLAG_DESCRIPTION, rn as createWakeSchedule, rr as semanticSearch, rt as checkPriorReplies, s as formatErrorPayload, sn as deleteRoute, sr as setMemory, st as followUpCommandPrefix, t as API_BASE_URL_FLAG_DESCRIPTION, tn as createRoute, tr as searchEmails, tt as buildFollowUpCommand, u as surfaceUnauthorizedHint, ur as startAgentSignup, ut as formatPriorRepliesWarning, v as ensureSearchReportsReplyState, vn as getFunction, vr as updateRoute, vt as sentHistoryWindowStart, w as explainPendingMailNotFound, wn as getRepeatingSend, wt as connectNextSteps, x as hasReplyState, xn as getInboxStatus, xr as verifyAgentClaim, xt as thrownErrorExitCode, y as formatAwaitingCell, yn as getFunctionRouting, yr as updateWakeAuthorization, yt as serializeErrorPayload, z as clearReadPendingMail, zn as listRoutes, zt as ensureSearchReportsAutomated } from "../api-command-DhVH83yC.js";
|
|
4
4
|
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-MwlVE90c.js";
|
|
5
|
-
import { _ as detectAgentRuntime, a as NotificationRetryError, b as installedVersion, c as readConversationStatusContent, d as defaultSessionSocket, f as NativeSessionDisconnectedError, g as connectSkillTarget, h as NotificationOutcomeUnknownError, i as notificationReceiptPage, l as SESSION_UUID$1, m as NativeSessionNotLoadedError, n as notificationSenders, o as isRoutineNotificationContent, p as NativeSessionError, r as openSessionNotifications, s as notificationPartReader, t as notificationScope, v as installConnectSkill, x as readBundledConnectSkill, y as installedConnectSkillFile } from "../notify-session-
|
|
6
|
-
import { $ as describeSessionHookItem, A as evaluateContactPolicy, B as agentInvitationHash, C as RECEIVER_MODES, D as NETWORK_ADMISSION_PENDING_RETRY_MS, E as ContactPolicyReadRetryError, F as ContactsApiError, G as saveConnectionName, H as readAgentInvitation, I as contactAddress, J as recordHookMailCheck, K as savedReceiver, L as contactAgentAddress, M as AddressNotesApiError, N as addressNoteTarget, O as NetworkAdmissionPendingError, P as runAddressNotesRequest, Q as describeSessionHookChange, R as runContactRequest, S as runAgentConnect, T as verificationReplySubmitted, U as receiverStatusCommand, V as connectAgent, W as refusalAfterReplacement, X as claudeConfigDir, Y as boundSessionProfiles, Z as currentCliLocation, _ as disconnectAgent, _t as withOwnerMemberAddress, a as endSession, at as readClaudeSettings, b as invitationProfileName, c as pendingSessionDisconnects, ct as writeClaudeSettings, d as registerSession, dt as jsonIndentation, et as ensureHookLauncher, f as retryPendingDisconnects, ft as readManagedFile, g as AgentDisconnectError, gt as refreshOwnerMemberAddressPeriodically, h as enrollmentResumes, ht as readHookLauncherWarning, i as connectedProfilesForSession, it as inspectClaudeHooks, j as canonicalContactSelector, k as createNotificationContactPolicy, l as psProcessInfo, lt as MachineFileError, m as enrollAgent, mt as writeManagedFile, n as OMP_MAIN, nt as findOnPath, o as headlessClaudeRun, ot as repairClaudeHooks, p as runDetached, pt as upsertManagedBlock, q as installClaudeWakeHook, r as agentConnectionState, rt as hasMachineSessionHooks, st as samePath, t as MACHINE_RUNTIMES, tt as ephemeralCliReason, u as readClaudeHookInput, ut as inspectManagedBlock, v as connectWarnings, w as externalReceivingState, x as pollCheckCommand, y as defaultAgentProfileName, z as agentConnectionStatus } from "../machine-session-
|
|
5
|
+
import { _ as detectAgentRuntime, a as NotificationRetryError, b as installedVersion, c as readConversationStatusContent, d as defaultSessionSocket, f as NativeSessionDisconnectedError, g as connectSkillTarget, h as NotificationOutcomeUnknownError, i as notificationReceiptPage, l as SESSION_UUID$1, m as NativeSessionNotLoadedError, n as notificationSenders, o as isRoutineNotificationContent, p as NativeSessionError, r as openSessionNotifications, s as notificationPartReader, t as notificationScope, v as installConnectSkill, x as readBundledConnectSkill, y as installedConnectSkillFile } from "../notify-session-DHE3g9kC.js";
|
|
6
|
+
import { $ as describeSessionHookItem, A as evaluateContactPolicy, B as agentInvitationHash, C as RECEIVER_MODES, D as NETWORK_ADMISSION_PENDING_RETRY_MS, E as ContactPolicyReadRetryError, F as ContactsApiError, G as saveConnectionName, H as readAgentInvitation, I as contactAddress, J as recordHookMailCheck, K as savedReceiver, L as contactAgentAddress, M as AddressNotesApiError, N as addressNoteTarget, O as NetworkAdmissionPendingError, P as runAddressNotesRequest, Q as describeSessionHookChange, R as runContactRequest, S as runAgentConnect, T as verificationReplySubmitted, U as receiverStatusCommand, V as connectAgent, W as refusalAfterReplacement, X as claudeConfigDir, Y as boundSessionProfiles, Z as currentCliLocation, _ as disconnectAgent, _t as withOwnerMemberAddress, a as endSession, at as readClaudeSettings, b as invitationProfileName, c as pendingSessionDisconnects, ct as writeClaudeSettings, d as registerSession, dt as jsonIndentation, et as ensureHookLauncher, f as retryPendingDisconnects, ft as readManagedFile, g as AgentDisconnectError, gt as refreshOwnerMemberAddressPeriodically, h as enrollmentResumes, ht as readHookLauncherWarning, i as connectedProfilesForSession, it as inspectClaudeHooks, j as canonicalContactSelector, k as createNotificationContactPolicy, l as psProcessInfo, lt as MachineFileError, m as enrollAgent, mt as writeManagedFile, n as OMP_MAIN, nt as findOnPath, o as headlessClaudeRun, ot as repairClaudeHooks, p as runDetached, pt as upsertManagedBlock, q as installClaudeWakeHook, r as agentConnectionState, rt as hasMachineSessionHooks, st as samePath, t as MACHINE_RUNTIMES, tt as ephemeralCliReason, u as readClaudeHookInput, ut as inspectManagedBlock, v as connectWarnings, w as externalReceivingState, x as pollCheckCommand, y as defaultAgentProfileName, z as agentConnectionStatus } from "../machine-session-RQaFXKFO.js";
|
|
7
7
|
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-C7cpIxVS.js";
|
|
8
8
|
import { c as startBackgroundListen, i as backgroundListenToken, l as stopBackgroundListen, o as runBackgroundListen, r as backgroundListenStatus, u as verifyBackgroundListenTarget } from "../listen-background--0peztKE.js";
|
|
9
|
-
import { a as ensureSharedMailSubscription, c as reserveSharedMailSubscription, d as otherParticipants, f as EventConnection, i as sharedMailScope, l as followEmailConversation, n as reconcileChatSend, o as createSharedMailWaiter, p as EventReceiverError, r as openSharedMailReceiver, s as openSharedMailStore, t as sendSignal, u as readConversationFollow } from "../signal-command-
|
|
9
|
+
import { a as ensureSharedMailSubscription, c as reserveSharedMailSubscription, d as otherParticipants, f as EventConnection, i as sharedMailScope, l as followEmailConversation, n as reconcileChatSend, o as createSharedMailWaiter, p as EventReceiverError, r as openSharedMailReceiver, s as openSharedMailStore, t as sendSignal, u as readConversationFollow } from "../signal-command-BRZtDVlD.js";
|
|
10
10
|
import { autoSignalEligible, dispatchAutoRead, dispatchAutoWorking, haltAutoWorking, isSentSignal, readWorkingLease, restoreAutoWorking } from "./auto-signals.js";
|
|
11
11
|
import { t as guardJsonOutputCommands } from "../json-output-CEskSQJi.js";
|
|
12
12
|
import { Args, Command, Errors, Flags, ux } from "@oclif/core";
|
|
@@ -41583,12 +41583,35 @@ function checkApiKey(opts) {
|
|
|
41583
41583
|
hint: "Run `primitive logout` to clear it, then `primitive signin` to recreate."
|
|
41584
41584
|
};
|
|
41585
41585
|
}
|
|
41586
|
+
const profiles = savedAgentProfiles(opts.configDir);
|
|
41587
|
+
if (profiles.length > 0) {
|
|
41588
|
+
const shown = profiles.slice(0, 5).join(", ");
|
|
41589
|
+
return {
|
|
41590
|
+
status: "warn",
|
|
41591
|
+
message: `no member login or API key; this machine has connected agent profile${profiles.length === 1 ? "" : "s"} ${shown}${profiles.length > 5 ? `, and ${profiles.length - 5} more` : ""}`,
|
|
41592
|
+
hint: `Select one to check it: ${AGENT_PROFILE_ENV}=${profiles[0]} ${cliInvocation(process.argv[1])} doctor`
|
|
41593
|
+
};
|
|
41594
|
+
}
|
|
41586
41595
|
return {
|
|
41587
41596
|
status: "fail",
|
|
41588
41597
|
message: "no CLI OAuth session or explicit API key found",
|
|
41589
41598
|
hint: "Run `primitive signin`, pass --api-key explicitly, or export PRIMITIVE_API_KEY=prim_..."
|
|
41590
41599
|
};
|
|
41591
41600
|
}
|
|
41601
|
+
/** Names of saved connected agent profiles that load, sorted. */
|
|
41602
|
+
function savedAgentProfiles(configDir) {
|
|
41603
|
+
try {
|
|
41604
|
+
return readdirSync(join(agentProfilesDirectory(configDir), "profiles")).filter((name) => {
|
|
41605
|
+
try {
|
|
41606
|
+
return loadConnectedAgentProfile(configDir, name) !== null;
|
|
41607
|
+
} catch {
|
|
41608
|
+
return false;
|
|
41609
|
+
}
|
|
41610
|
+
}).sort();
|
|
41611
|
+
} catch {
|
|
41612
|
+
return [];
|
|
41613
|
+
}
|
|
41614
|
+
}
|
|
41592
41615
|
async function checkAccount(client) {
|
|
41593
41616
|
try {
|
|
41594
41617
|
const result = await getAccount({
|
|
@@ -41701,7 +41724,7 @@ var DoctorCommand = class DoctorCommand extends Command {
|
|
|
41701
41724
|
const apiKeyCheck = connected ? {
|
|
41702
41725
|
status: "warn",
|
|
41703
41726
|
message: `Saved connected profile ${connected.profileName} for ${connected.agentAddress} (offline; live authentication and receiving not verified)`,
|
|
41704
|
-
hint: `Use
|
|
41727
|
+
hint: `Use \`${AGENT_PROFILE_ENV}=${connected.profileName} ${cliInvocation(process.argv[1])} whoami --json\` for saved identity and \`${receiverStatusCommand(this.config.configDir, connected.profileName).command}\` for this profile's receiver.`
|
|
41705
41728
|
} : checkApiKey({
|
|
41706
41729
|
apiKey: flags["api-key"],
|
|
41707
41730
|
configDir: this.config.configDir
|
|
@@ -42233,7 +42256,7 @@ function workingStillRunning(lease, now = Date.now()) {
|
|
|
42233
42256
|
return lease !== null && lease.stopped_at === null && now - lease.started_at < 9e5;
|
|
42234
42257
|
}
|
|
42235
42258
|
function workingStopLine(command) {
|
|
42236
|
-
return `The sender now sees you working on this until you answer. If you will not act on it,
|
|
42259
|
+
return `The sender now sees you working on this until you answer. If you will not act on it, run ${command} now: it only clears that working status, sends nothing and is not an action toward the sender.`;
|
|
42237
42260
|
}
|
|
42238
42261
|
async function runBrief(command, flags) {
|
|
42239
42262
|
await runWithTiming(flags.time === true, async () => {
|
|
@@ -43977,7 +44000,7 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
43977
44000
|
url: "https://primitive.dev"
|
|
43978
44001
|
};
|
|
43979
44002
|
const SDK_VERSION_RANGE = "^1.35.0";
|
|
43980
|
-
const CLI_VERSION_RANGE = "^1.
|
|
44003
|
+
const CLI_VERSION_RANGE = "^1.59.0";
|
|
43981
44004
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
43982
44005
|
function renderHandler() {
|
|
43983
44006
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, j as AGENT_PROFILE_ENV } from "../cli-config-DMszFbGn.js";
|
|
2
2
|
import { d as readMailJson } from "../shared-mail-files-MwlVE90c.js";
|
|
3
|
-
import { _ as detectAgentRuntime, l as SESSION_UUID, t as notificationScope } from "../notify-session-
|
|
3
|
+
import { _ as detectAgentRuntime, l as SESSION_UUID, t as notificationScope } from "../notify-session-DHE3g9kC.js";
|
|
4
4
|
import { a as claimBackgroundListenRestart, n as backgroundListenRestartable, r as backgroundListenStatus } from "../listen-background--0peztKE.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as sendPreparedSignal, p as prepareSignalEmail } from "./repeats-x4QM2yoG-De3MV3st.js";
|
|
2
|
-
import { $t as createEndpoint, Bn as listSentEmails, T as bareAddress, _n as getEmail, bt as successfulSendOutcome, ir as sendEmail, it as classifySendError, o as extractErrorPayload } from "./api-command-
|
|
2
|
+
import { $t as createEndpoint, Bn as listSentEmails, T as bareAddress, _n as getEmail, bt as successfulSendOutcome, ir as sendEmail, it as classifySendError, o as extractErrorPayload } from "./api-command-DhVH83yC.js";
|
|
3
3
|
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-MwlVE90c.js";
|
|
4
4
|
import { a as scopedChatSenderTrust, i as readBeforeDeadline, n as isPlainChatReply } from "./scoped-chat-C7cpIxVS.js";
|
|
5
5
|
import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-DtKpsgg8.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primcli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.59.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,
|