primcli 1.46.0 → 1.47.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-CZGBgE5W.js → api-command-C1JvJqV0.js} +13 -1
- package/dist/{connect-skill-BkWye3gd.js → connect-skill-CH2pq436.js} +1 -1
- package/dist/{machine-session-nMJA9Q3F.js → machine-session-Dr5W2fHb.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/index.js +89 -30
- package/dist/oclif/receiver-heal.js +1 -1
- package/dist/{signal-command-D8_oaLYi.js → signal-command-Dbyqyas9.js} +2 -2
- package/dist/skills/primitive-connect/SKILL.md +11 -7
- package/dist/skills/primitive-connect.json +3 -3
- package/package.json +1 -1
|
@@ -1774,6 +1774,13 @@ const updateRepeatingSend = (options) => (options.client ?? client).patch({
|
|
|
1774
1774
|
* attempt, including gate-denied attempts that the agent
|
|
1775
1775
|
* never called and rows still in `queued` state.
|
|
1776
1776
|
*
|
|
1777
|
+
* Under an address-bound agent connection credential, the
|
|
1778
|
+
* list holds this agent's own sends plus delivered sends from
|
|
1779
|
+
* other addresses in the org that name this agent in to, cc
|
|
1780
|
+
* or bcc and have matching inbound delivery evidence at this
|
|
1781
|
+
* agent. Pass `from` with the agent's own address to list
|
|
1782
|
+
* only its own sends.
|
|
1783
|
+
*
|
|
1777
1784
|
* For inbound mail received at your verified domains, see
|
|
1778
1785
|
* /emails. There is no unified send/receive history endpoint;
|
|
1779
1786
|
* the two surfaces are intentionally separate because the
|
|
@@ -1828,6 +1835,11 @@ const deleteSentEmail = (options) => (options.client ?? client).delete({
|
|
|
1828
1835
|
* SMTP response on a `bounced` row or pulling the gate
|
|
1829
1836
|
* denial detail on a `gate_denied` row.
|
|
1830
1837
|
*
|
|
1838
|
+
* Under an address-bound agent connection credential, only
|
|
1839
|
+
* ids in the same scope as /sent-emails resolve: this agent's
|
|
1840
|
+
* own sends, and delivered sends addressed to it with
|
|
1841
|
+
* matching inbound delivery evidence. Other ids return 404.
|
|
1842
|
+
*
|
|
1831
1843
|
*/
|
|
1832
1844
|
const getSentEmail = (options) => (options.client ?? client).get({
|
|
1833
1845
|
security: [{
|
|
@@ -4879,7 +4891,7 @@ function savedConnectedProfiles(configDir, exclude) {
|
|
|
4879
4891
|
*/
|
|
4880
4892
|
async function otherProfiles(configDir, session, current) {
|
|
4881
4893
|
if (session) try {
|
|
4882
|
-
const { connectedProfilesForSession } = await import("./machine-session-
|
|
4894
|
+
const { connectedProfilesForSession } = await import("./machine-session-Dr5W2fHb.js").then((n) => n.s);
|
|
4883
4895
|
return {
|
|
4884
4896
|
inSession: true,
|
|
4885
4897
|
profiles: connectedProfilesForSession(configDir, session, current)
|
|
@@ -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-C1JvJqV0.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-C1JvJqV0.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-CH2pq436.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-C1JvJqV0.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-Dbyqyas9.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-C1JvJqV0.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-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";
|
|
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-Dbyqyas9.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";
|
|
@@ -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": {
|
|
@@ -31747,7 +31747,7 @@ const operationManifest = [
|
|
|
31747
31747
|
"binaryResponse": false,
|
|
31748
31748
|
"bodyRequired": false,
|
|
31749
31749
|
"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",
|
|
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\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
31751
|
"hasJsonBody": false,
|
|
31752
31752
|
"method": "GET",
|
|
31753
31753
|
"operationId": "getSentEmail",
|
|
@@ -32186,7 +32186,7 @@ const operationManifest = [
|
|
|
32186
32186
|
"binaryResponse": false,
|
|
32187
32187
|
"bodyRequired": false,
|
|
32188
32188
|
"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",
|
|
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\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
32190
|
"hasJsonBody": false,
|
|
32191
32191
|
"method": "GET",
|
|
32192
32192
|
"operationId": "listSentEmails",
|
|
@@ -36845,20 +36845,54 @@ async function run$1(command, flags, write, action) {
|
|
|
36845
36845
|
}
|
|
36846
36846
|
});
|
|
36847
36847
|
}
|
|
36848
|
+
/** How long `set --stdin` waits for input on a nonblocking pipe. */
|
|
36849
|
+
const STDIN_WAIT_MS = 3e4;
|
|
36850
|
+
/** Where `set --stdin` reads the claim from; replaced in tests. */
|
|
36851
|
+
const workingClaimStdin = { read: () => {
|
|
36852
|
+
if (process.stdin.isTTY) throw new Error("--stdin needs the claim piped in, not typed at a terminal.");
|
|
36853
|
+
const limit = 2002;
|
|
36854
|
+
const buffer = Buffer.alloc(limit + 1);
|
|
36855
|
+
const pause = new Int32Array(new SharedArrayBuffer(4));
|
|
36856
|
+
const deadline = Date.now() + STDIN_WAIT_MS;
|
|
36857
|
+
let length = 0;
|
|
36858
|
+
while (length <= limit) {
|
|
36859
|
+
let read = 0;
|
|
36860
|
+
try {
|
|
36861
|
+
read = readSync(0, buffer, length, limit + 1 - length, null);
|
|
36862
|
+
} catch (error) {
|
|
36863
|
+
const code = error.code;
|
|
36864
|
+
if (code === "EOF") break;
|
|
36865
|
+
if (code !== "EAGAIN") throw error;
|
|
36866
|
+
if (Date.now() > deadline) throw new Error("--stdin received no end of input; pipe the claim from a file.");
|
|
36867
|
+
Atomics.wait(pause, 0, 0, 20);
|
|
36868
|
+
continue;
|
|
36869
|
+
}
|
|
36870
|
+
if (read === 0) break;
|
|
36871
|
+
length += read;
|
|
36872
|
+
}
|
|
36873
|
+
if (length > limit) throw new Error(`The claim must be at most 500 characters.`);
|
|
36874
|
+
return buffer.subarray(0, length).toString("utf8");
|
|
36875
|
+
} };
|
|
36848
36876
|
function isNotFound(error) {
|
|
36849
36877
|
return error instanceof AddressNotesApiError && error.status === 404;
|
|
36850
36878
|
}
|
|
36851
36879
|
var AgentWorkingSetCommand = class AgentWorkingSetCommand extends Command {
|
|
36852
36880
|
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 = [
|
|
36881
|
+
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.`;
|
|
36882
|
+
static examples = [
|
|
36883
|
+
"<%= config.bin %> agent working set \"phone composer: apps/mobile/src/message-composer.tsx\"",
|
|
36884
|
+
"<%= config.bin %> agent working set \"billing export: src/billing/\" --until 2026-10-01T18:00:00Z",
|
|
36885
|
+
"<%= config.bin %> agent working set --stdin < ./private-claim.txt"
|
|
36886
|
+
];
|
|
36855
36887
|
static args = { claim: Args.string({
|
|
36856
|
-
description: "One line naming the task and the files or areas changed",
|
|
36857
|
-
required:
|
|
36888
|
+
description: "One line naming the task and the files or areas changed (or use --stdin)",
|
|
36889
|
+
required: false,
|
|
36890
|
+
ignoreStdin: true
|
|
36858
36891
|
}) };
|
|
36859
36892
|
static flags = {
|
|
36860
36893
|
...commonFlags$1,
|
|
36861
36894
|
address: writeAddressFlag,
|
|
36895
|
+
stdin: Flags.boolean({ description: "Read the claim from stdin instead of an argument, so it stays out of process listings and shell history" }),
|
|
36862
36896
|
until: Flags.string({ description: "Expiry as an ISO 8601 time with a timezone (default: 4 hours from now)" }),
|
|
36863
36897
|
public: Flags.boolean({
|
|
36864
36898
|
description: "Make the claim note public",
|
|
@@ -36871,8 +36905,10 @@ var AgentWorkingSetCommand = class AgentWorkingSetCommand extends Command {
|
|
|
36871
36905
|
};
|
|
36872
36906
|
async run() {
|
|
36873
36907
|
const { args, flags } = await this.parse(AgentWorkingSetCommand);
|
|
36908
|
+
if (flags.stdin && args.claim !== void 0) this.error("Pass the claim as an argument or with --stdin, not both.", { exit: 2 });
|
|
36909
|
+
if (!flags.stdin && args.claim === void 0) this.error("Pass the claim as an argument, or pipe it in with --stdin.", { exit: 2 });
|
|
36874
36910
|
const value = buildWorkingClaim({
|
|
36875
|
-
claim: args.claim,
|
|
36911
|
+
claim: flags.stdin ? workingClaimStdin.read().replace(/\r?\n$/, "") : args.claim,
|
|
36876
36912
|
until: flags.until
|
|
36877
36913
|
});
|
|
36878
36914
|
await run$1(this, flags, true, async ({ client, address }) => {
|
|
@@ -43306,7 +43342,7 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
43306
43342
|
url: "https://primitive.dev"
|
|
43307
43343
|
};
|
|
43308
43344
|
const SDK_VERSION_RANGE = "^1.34.0";
|
|
43309
|
-
const CLI_VERSION_RANGE = "^1.
|
|
43345
|
+
const CLI_VERSION_RANGE = "^1.47.0";
|
|
43310
43346
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
43311
43347
|
function renderHandler() {
|
|
43312
43348
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -50259,12 +50295,25 @@ async function memberCredentialsFor(options) {
|
|
|
50259
50295
|
return null;
|
|
50260
50296
|
}
|
|
50261
50297
|
}
|
|
50262
|
-
/**
|
|
50263
|
-
|
|
50298
|
+
/** Pages to read before giving up on confirming absence (10,000 agents). */
|
|
50299
|
+
const OWNER_LIST_MAX_PAGES = 200;
|
|
50300
|
+
/**
|
|
50301
|
+
* The member's connection list, hidden agents included, as address to status.
|
|
50302
|
+
* Read once per run. `complete` is true only when every page was read and the
|
|
50303
|
+
* last one explicitly ended the list (`meta.cursor: null`): a status found on
|
|
50304
|
+
* any page stands, but absence is proof only from a complete list.
|
|
50305
|
+
*/
|
|
50306
|
+
async function ownerConnectionStatuses(credentials, fetchImpl) {
|
|
50307
|
+
const statuses = /* @__PURE__ */ new Map();
|
|
50308
|
+
const partial = () => ({
|
|
50309
|
+
statuses,
|
|
50310
|
+
complete: false
|
|
50311
|
+
});
|
|
50264
50312
|
let cursor;
|
|
50265
|
-
for (let page = 0; page <
|
|
50313
|
+
for (let page = 0; page < OWNER_LIST_MAX_PAGES; page++) {
|
|
50266
50314
|
const url = new URL(`${credentials.api_base_url}/agent-connections`);
|
|
50267
50315
|
url.searchParams.set("limit", "50");
|
|
50316
|
+
url.searchParams.set("include_hidden", "true");
|
|
50268
50317
|
if (cursor) url.searchParams.set("cursor", cursor);
|
|
50269
50318
|
try {
|
|
50270
50319
|
const response = await fetchImpl(url, {
|
|
@@ -50278,21 +50327,25 @@ async function ownerListedStatus(credentials, address, fetchImpl) {
|
|
|
50278
50327
|
});
|
|
50279
50328
|
if (response.status !== 200) {
|
|
50280
50329
|
await response.body?.cancel().catch(() => void 0);
|
|
50281
|
-
return
|
|
50330
|
+
return partial();
|
|
50282
50331
|
}
|
|
50283
50332
|
const text = await response.text();
|
|
50284
|
-
if (text.length > 1048576) return
|
|
50333
|
+
if (text.length > 1048576) return partial();
|
|
50285
50334
|
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 ===
|
|
50335
|
+
if (body.success !== true || !Array.isArray(body.data)) return partial();
|
|
50336
|
+
for (const row of body.data) if (typeof row?.address === "string" && typeof row.status === "string") statuses.set(row.address, row.status);
|
|
50288
50337
|
const next = body.meta?.cursor;
|
|
50289
|
-
if (
|
|
50338
|
+
if (next === null) return {
|
|
50339
|
+
statuses,
|
|
50340
|
+
complete: true
|
|
50341
|
+
};
|
|
50342
|
+
if (typeof next !== "string" || !next || next === cursor) return partial();
|
|
50290
50343
|
cursor = next;
|
|
50291
50344
|
} catch {
|
|
50292
|
-
return
|
|
50345
|
+
return partial();
|
|
50293
50346
|
}
|
|
50294
50347
|
}
|
|
50295
|
-
return
|
|
50348
|
+
return partial();
|
|
50296
50349
|
}
|
|
50297
50350
|
function check(id, status, detail, extra = {}) {
|
|
50298
50351
|
return {
|
|
@@ -50545,7 +50598,9 @@ async function runMachineDoctor(options) {
|
|
|
50545
50598
|
}
|
|
50546
50599
|
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
50600
|
let member;
|
|
50548
|
-
|
|
50601
|
+
const unconfirmed = [];
|
|
50602
|
+
let elsewhere = 0;
|
|
50603
|
+
let ownerList;
|
|
50549
50604
|
let unknown = 0;
|
|
50550
50605
|
let connected = 0;
|
|
50551
50606
|
const states = [];
|
|
@@ -50556,12 +50611,16 @@ async function runMachineDoctor(options) {
|
|
|
50556
50611
|
for (const entry of states) if (entry.state === "revoked") orphans.push(entry);
|
|
50557
50612
|
else if (entry.state === "rejected") {
|
|
50558
50613
|
member ??= await memberCredentialsFor(options);
|
|
50559
|
-
|
|
50560
|
-
|
|
50614
|
+
const checkable = !!member && member.org_id === entry.profile.org_id && member.api_base_url === entry.profile.api_base_url;
|
|
50615
|
+
if (member && !checkable) elsewhere++;
|
|
50616
|
+
if (checkable && member && ownerList === void 0) ownerList = await ownerConnectionStatuses(member, fetchImpl);
|
|
50617
|
+
const listed = checkable && ownerList ? ownerList.statuses.get(entry.profile.agent_address) ?? (ownerList.complete ? "absent" : null) : null;
|
|
50618
|
+
if (listed === "revoked" || listed === "absent") orphans.push(entry);
|
|
50619
|
+
else unconfirmed.push(entry.profile.agent_address);
|
|
50561
50620
|
} else if (entry.state === "unavailable") unknown++;
|
|
50562
50621
|
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
|
|
50622
|
+
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 });
|
|
50623
|
+
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
50624
|
if (unknown && !connected) return check("profiles.orphaned", "skip", "Primitive could not be reached to check saved profiles.");
|
|
50566
50625
|
return check("profiles.orphaned", "ok", `${connected} saved profiles are connected${unknown ? `; ${unknown} could not be checked` : ""}.`);
|
|
50567
50626
|
};
|
|
@@ -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-CH2pq436.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";
|
|
@@ -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-C1JvJqV0.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-DhmH89R-.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primcli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.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,
|