primcli 1.51.0 → 1.52.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-Bd21hvqY.js → api-command-DWTysV8D.js} +25 -9
- package/dist/{machine-session-DqxgyupM.js → machine-session-D4UbgQCW.js} +2 -2
- package/dist/{notify-session-ejjYXO3O.js → notify-session-CPdFxyt7.js} +1 -1
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/index.js +11 -6
- package/dist/oclif/receiver-heal.js +1 -1
- package/dist/{signal-command-DaQuMT8l.js → signal-command-CaKUsE4H.js} +1 -1
- package/dist/skills/primitive-connect/SKILL.md +85 -511
- package/dist/skills/primitive-connect/references/collaboration.md +91 -0
- package/dist/skills/primitive-connect/references/communication.md +3 -2
- package/dist/skills/primitive-connect/references/contact-requests.md +4 -3
- package/dist/skills/primitive-connect/references/contacts.md +130 -0
- package/dist/skills/primitive-connect/references/conversations.md +172 -0
- package/dist/skills/primitive-connect/references/manual-setup.md +10 -9
- package/dist/skills/primitive-connect/references/native-session.md +3 -3
- package/dist/skills/primitive-connect/references/presence-and-receiving.md +124 -0
- package/dist/skills/primitive-connect/references/private-api-fallback.md +2 -2
- package/dist/skills/primitive-connect.json +12 -8
- package/package.json +1 -1
|
@@ -3930,7 +3930,7 @@ function priorRepliesThatWentOut(replies, options = {}) {
|
|
|
3930
3930
|
function formatPriorRepliesWarning(prior) {
|
|
3931
3931
|
const latest = prior.at(-1);
|
|
3932
3932
|
if (!latest) return null;
|
|
3933
|
-
return `This email already has ${prior.length === 1 ? "1 outgoing email" : `${prior.length} outgoing emails`}, most recently at ${latest.created_at} (sent id ${latest.id}).
|
|
3933
|
+
return `This email already has ${prior.length === 1 ? "1 outgoing email" : `${prior.length} outgoing emails`}, most recently at ${latest.created_at} (sent id ${latest.id}). Status signals are not counted, and an earlier reply does not prove the request was completed. Sending this reply.`;
|
|
3934
3934
|
}
|
|
3935
3935
|
function formatPriorRepliesCheckSkipped(emailId, reason) {
|
|
3936
3936
|
return `Could not check whether you already replied to email ${emailId} (${reason}). Prior-reply check skipped; sending the reply anyway.`;
|
|
@@ -3969,6 +3969,22 @@ async function threadSignalIds(client, threadId) {
|
|
|
3969
3969
|
* send, so every failure comes back as `skipped` with a reason the
|
|
3970
3970
|
* caller surfaces.
|
|
3971
3971
|
*/
|
|
3972
|
+
/**
|
|
3973
|
+
* Drop status signals (this CLI's own automatic Read or Working, or any send
|
|
3974
|
+
* the thread marks as a signal) from a list of replies that went out. Reply
|
|
3975
|
+
* entries carry no signal marking, and a signal sent from another machine has
|
|
3976
|
+
* no local record, but the thread's outbound entries do carry it, so one
|
|
3977
|
+
* thread read settles whatever the local record leaves.
|
|
3978
|
+
*/
|
|
3979
|
+
async function excludeSignalReplies(params) {
|
|
3980
|
+
const isLocalSignal = params.isLocalSignal ?? (() => false);
|
|
3981
|
+
let prior = params.replies.filter((reply) => !isSignalReply(reply, isLocalSignal));
|
|
3982
|
+
if (prior.length > 0 && params.threadId) {
|
|
3983
|
+
const signals = await threadSignalIds(params.client, params.threadId);
|
|
3984
|
+
prior = prior.filter((reply) => !signals.has(reply.id));
|
|
3985
|
+
}
|
|
3986
|
+
return prior;
|
|
3987
|
+
}
|
|
3972
3988
|
async function checkPriorReplies(params) {
|
|
3973
3989
|
try {
|
|
3974
3990
|
const result = await getEmail({
|
|
@@ -3990,12 +4006,12 @@ async function checkPriorReplies(params) {
|
|
|
3990
4006
|
reason: "the email lookup returned no reply history"
|
|
3991
4007
|
};
|
|
3992
4008
|
const wentOut = priorRepliesThatWentOut(detail.replies);
|
|
3993
|
-
const
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
}
|
|
4009
|
+
const prior = await excludeSignalReplies({
|
|
4010
|
+
client: params.client,
|
|
4011
|
+
replies: wentOut,
|
|
4012
|
+
threadId: detail.thread_id,
|
|
4013
|
+
isLocalSignal: params.isLocalSignal
|
|
4014
|
+
});
|
|
3999
4015
|
return {
|
|
4000
4016
|
status: "checked",
|
|
4001
4017
|
prior,
|
|
@@ -5076,7 +5092,7 @@ function savedConnectedProfiles(configDir, exclude) {
|
|
|
5076
5092
|
*/
|
|
5077
5093
|
async function otherProfiles(configDir, session, current) {
|
|
5078
5094
|
if (session) try {
|
|
5079
|
-
const { connectedProfilesForSession } = await import("./machine-session-
|
|
5095
|
+
const { connectedProfilesForSession } = await import("./machine-session-D4UbgQCW.js").then((n) => n.s);
|
|
5080
5096
|
return {
|
|
5081
5097
|
inSession: true,
|
|
5082
5098
|
profiles: connectedProfilesForSession(configDir, session, current)
|
|
@@ -5944,4 +5960,4 @@ function canonicalizeCliReferences(description) {
|
|
|
5944
5960
|
return description.replaceAll("`primitive emails:latest`", "`primitive emails latest`").replaceAll("`primitive describe emails:get-email | jq '.responseSchema.properties'`", "`primitive describe emails:get | jq '.responseSchema.properties'`");
|
|
5945
5961
|
}
|
|
5946
5962
|
//#endregion
|
|
5947
|
-
export { readEmailInteraction as $,
|
|
5963
|
+
export { readEmailInteraction as $, runWakeSchedule as $n, createFunction as $t, readThreadContext as A, listDefaultNetworkAgents as An, writeIdempotentReplayBannerIfReplay as At, connectNextSteps as B, listWakeAuthorizations as Bn, hasAutomatedVerdict as Bt, queryUsesAwaiting as C, getRepeatingSend as Cn, sendWaitClampNotice as Ct, displayAddress as D, listAgentContacts as Dn, thrownErrorExitCode as Dt, describeWake as E, getWakeSchedule as En, successfulSendOutcome as Et, wakeReadCommand as F, listFunctionLogs as Fn, AutomatedFilterUnsupportedError as Ft, clearConsumedPendingMail as G, putAgentContact as Gn, createCliApiClient as Gt, generatedAgentName as H, listWakeSchedules as Hn, queryUsesAutomated as Ht, wakeRecipientField as I, listFunctions as In, assertAutomatedVerdict as It, readPendingMail as J, redeemCreditCode as Jn, addDefaultNetworkMember as Jt, clearReadPendingMail as K, putAgentContactPolicy as Kn, refreshStoredCliCredentials as Kt, wakeRelationship as L, listRepeatingSends as Ln, automatedRejectedError as Lt, serverMuted as M, listDomains as Mn, AUTOMATED_FILTER_UNSUPPORTED_CODE as Mt, serverRelationship as N, listEmails as Nn, AUTOMATED_FLAG_DESCRIPTION as Nt, formatMailWakeLine as O, listAgentNetworks as On, currentMailSessionKey as Ot, skillFirstLine as P, listEndpoints as Pn, AUTOMATED_VALUES as Pt, interactionNextActions as Q, resendAgentSignupVerification as Qn, createEndpoint as Qt, DEFAULT_ENROLL_NAME as R, listRoutes as Rn, ensureSearchReportsAutomated as Rt, isAwaitingRejectedError as S, getOrgRoutingTopology as Sn, sendOutcomeExitCode as St, bareAddress$1 as T, getThread as Tn, serializeErrorPayload as Tt, identitySuggestions as U, pollCliLogin as Un, SAVED_CLI_OAUTH_SESSION_EXPIRED_MESSAGE as Ut, defaultConnectionName as V, listWakeDispatches as Vn, isAutomatedRejectedError as Vt, loadSkillLine as W, pullWebhookEvent as Wn, createAuthenticatedCliApiClient as Wt, removePendingMail as X, reorderRoutes as Xn, cliLogout as Xt, recordPendingMail as Y, removeDefaultNetworkMember as Yn, checkDefaultNetworkContactAdmission as Yt, interactionHumanLine as Z, replyToEmail as Zn, completeWebhookEvent as Zt, awaitingRejectedError as _, getFunction as _n, updateRoute as _r, formatSendFailureSummary as _t, extractErrorCode as a, deleteMemory as an, setFunctionSecret as ar, SEND_OUTCOME_HELP as at, formatRepliesCell as b, getInboxStatus as bn, verifyAgentClaim as br, reportSendCommandResult as bt, readTextFileFlag as c, deleteWakeSchedule as cn, startAgentClaim as cr, buildFollowUpCommand as ct, writeErrorWithHints as d, getAgentContactPolicy as dn, stopRepeatFromEmail as dr, classifySendError as dt, createRoute as en, searchEmails as er, replyExpectation as et, AWAITING_FLAG_DESCRIPTION as f, getContact as fn, testFunction as fr, deriveSendIdempotencyKey as ft, assertAwaitingFilterRows as g, getEmail as gn, updateRepeatingSend as gr, formatPriorRepliesWarning as gt, ReplyStateUnsupportedError as h, getDefaultNetworkAgent as hn, updateFunction as hr, formatPriorRepliesCheckSkipped as ht, createOperationCommand as i, deleteContact as in, setFunctionRoute as ir, MAX_SEND_WAIT_TIMEOUT_MS as it, sentInThread as j, listDefaultNetworkMembers as jn, withFlagSuggestion as jt, latestOwnOutbound as k, listContacts as kn, formatAlreadySentNotice as kt, runWithTiming as l, downloadEmailAttachmentPart as ln, startAgentSignup as lr, buildThrownSendFailureEnvelope as lt, REPLY_STATE_UNSUPPORTED_CODE as m, getCreditBalance as mn, updateDefaultNetworkMember as mr, formatDeletedEarlierSendNotice as mt, API_ERROR_CODES as n, createWakeSchedule as nn, semanticSearch as nr, wakeInteractionSentence as nt, extractErrorPayload as o, deleteRoute as on, setMemory as or, apiResultHttpStatus as ot, AWAITING_VALUES as p, getConversation as pn, unsetFunctionRoute as pr, excludeSignalReplies as pt, pendingMailPath as q, putContact as qn, resolveCliApiRequestConfig as qt, TIME_FLAG_DESCRIPTION as r, deleteAgentContact as rn, sendEmail as rr, IDEMPOTENCY_KEY_FLAG_DESCRIPTION as rt, formatErrorPayload as s, deleteWakeAuthorization as sn, simulateRoute as sr, assertValidIdempotencyKey as st, API_BASE_URL_FLAG_DESCRIPTION as t, createWakeAuthorization as tn, searchMemories as tr, replyInteractionWarning as tt, surfaceUnauthorizedHint as u, getAccount as un, startCliLogin as ur, checkPriorReplies as ut, ensureSearchReportsReplyState as v, getFunctionRouting as vn, updateWakeAuthorization as vr, formatSendRecordFailureSummary as vt, explainPendingMailNotFound as w, getSentEmail as wn, sentHistoryWindowStart as wt, hasReplyState as x, getMemory as xn, verifyAgentSignup as xr, sendIdentityFields as xt, formatAwaitingCell as y, getFunctionTestRunTrace as yn, updateWakeSchedule as yr, priorRepliesThatWentOut as yt, cliInvocation as z, listSentEmails as zn, expectedAutomatedVerdicts as zt };
|
|
@@ -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 {
|
|
3
|
+
import { Dn as listAgentContacts, Gn as putAgentContact, Kn as putAgentContactPolicy, Kt as refreshStoredCliCredentials, Mn as listDomains, V as defaultConnectionName, dn as getAgentContactPolicy, er as searchEmails, fn as getContact, gn as getEmail, in as deleteContact, kn as listContacts, qn as putContact, rn as deleteAgentContact, rr as sendEmail, zn as listSentEmails } from "./api-command-DWTysV8D.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 { _ 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-CPdFxyt7.js";
|
|
6
6
|
import { a as scopedChatSenderTrust } from "./scoped-chat-BJVYBRim.js";
|
|
7
7
|
import { l as stopBackgroundListen, r as backgroundListenStatus } from "./listen-background-CMfxkeVP.js";
|
|
8
8
|
import { t as readSharedMailOwner } from "./shared-mail-watch-CWhpfJ0N.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as wakeReadCommand, P as skillFirstLine,
|
|
1
|
+
import { F as wakeReadCommand, P as skillFirstLine, ln as downloadEmailAttachmentPart, nt as wakeInteractionSentence } from "./api-command-DWTysV8D.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-B8Wq41vG.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,6 +1,6 @@
|
|
|
1
|
-
import { A as readThreadContext,
|
|
1
|
+
import { A as readThreadContext, Wt as createAuthenticatedCliApiClient, wn as getSentEmail } from "../api-command-DWTysV8D.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-CaKUsE4H.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 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 readEmailInteraction, $n as
|
|
2
|
+
import { $ as readEmailInteraction, $n as runWakeSchedule, $t as createFunction, A as readThreadContext, An as listDefaultNetworkAgents, At as writeIdempotentReplayBannerIfReplay, B as connectNextSteps, Bn as listWakeAuthorizations, Bt as hasAutomatedVerdict, C as queryUsesAwaiting, Cn as getRepeatingSend, Ct as sendWaitClampNotice, D as displayAddress, Dn as listAgentContacts, Dt as thrownErrorExitCode, E as describeWake, En as getWakeSchedule, Et as successfulSendOutcome, F as wakeReadCommand, Fn as listFunctionLogs, Ft as AutomatedFilterUnsupportedError, G as clearConsumedPendingMail, Gt as createCliApiClient, H as generatedAgentName, Hn as listWakeSchedules, Ht as queryUsesAutomated, I as wakeRecipientField, In as listFunctions, It as assertAutomatedVerdict, J as readPendingMail, Jn as redeemCreditCode, Jt as addDefaultNetworkMember, K as clearReadPendingMail, Kt as refreshStoredCliCredentials, L as wakeRelationship, Ln as listRepeatingSends, Lt as automatedRejectedError, M as serverMuted, Mn as listDomains, Mt as AUTOMATED_FILTER_UNSUPPORTED_CODE, N as serverRelationship, Nn as listEmails, Nt as AUTOMATED_FLAG_DESCRIPTION, O as formatMailWakeLine, On as listAgentNetworks, Ot as currentMailSessionKey, Pn as listEndpoints, Pt as AUTOMATED_VALUES, Q as interactionNextActions, Qn as resendAgentSignupVerification, Qt as createEndpoint, Rn as listRoutes, Rt as ensureSearchReportsAutomated, S as isAwaitingRejectedError, Sn as getOrgRoutingTopology, St as sendOutcomeExitCode, T as bareAddress, Tn as getThread, Tt as serializeErrorPayload, U as identitySuggestions, Un as pollCliLogin, Vn as listWakeDispatches, Vt as isAutomatedRejectedError, W as loadSkillLine, Wn as pullWebhookEvent, Wt as createAuthenticatedCliApiClient, X as removePendingMail, Xn as reorderRoutes, Xt as cliLogout, Y as recordPendingMail, Yn as removeDefaultNetworkMember, Yt as checkDefaultNetworkContactAdmission, Z as interactionHumanLine, Zn as replyToEmail, Zt as completeWebhookEvent, _ as awaitingRejectedError, _n as getFunction, _r as updateRoute, _t as formatSendFailureSummary, a as extractErrorCode, an as deleteMemory, ar as setFunctionSecret, at as SEND_OUTCOME_HELP, b as formatRepliesCell, bn as getInboxStatus, br as verifyAgentClaim, bt as reportSendCommandResult, c as readTextFileFlag, cn as deleteWakeSchedule, cr as startAgentClaim, ct as buildFollowUpCommand, d as writeErrorWithHints, dn as getAgentContactPolicy, dr as stopRepeatFromEmail, dt as classifySendError, en as createRoute, er as searchEmails, et as replyExpectation, f as AWAITING_FLAG_DESCRIPTION, fr as testFunction, ft as deriveSendIdempotencyKey, g as assertAwaitingFilterRows, gn as getEmail, gr as updateRepeatingSend, gt as formatPriorRepliesWarning, h as ReplyStateUnsupportedError, hn as getDefaultNetworkAgent, hr as updateFunction, ht as formatPriorRepliesCheckSkipped, i as createOperationCommand, ir as setFunctionRoute, it as MAX_SEND_WAIT_TIMEOUT_MS, j as sentInThread, jn as listDefaultNetworkMembers, jt as withFlagSuggestion, k as latestOwnOutbound, kt as formatAlreadySentNotice, l as runWithTiming, lr as startAgentSignup, lt as buildThrownSendFailureEnvelope, m as REPLY_STATE_UNSUPPORTED_CODE, mn as getCreditBalance, mr as updateDefaultNetworkMember, mt as formatDeletedEarlierSendNotice, n as API_ERROR_CODES, nn as createWakeSchedule, nr as semanticSearch, o as extractErrorPayload, on as deleteRoute, or as setMemory, ot as apiResultHttpStatus, p as AWAITING_VALUES, pn as getConversation, pr as unsetFunctionRoute, pt as excludeSignalReplies, q as pendingMailPath, qt as resolveCliApiRequestConfig, r as TIME_FLAG_DESCRIPTION, rr as sendEmail, rt as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, s as formatErrorPayload, sn as deleteWakeAuthorization, sr as simulateRoute, st as assertValidIdempotencyKey, t as API_BASE_URL_FLAG_DESCRIPTION, tn as createWakeAuthorization, tr as searchMemories, tt as replyInteractionWarning, u as surfaceUnauthorizedHint, un as getAccount, ur as startCliLogin, ut as checkPriorReplies, v as ensureSearchReportsReplyState, vn as getFunctionRouting, vr as updateWakeAuthorization, vt as formatSendRecordFailureSummary, w as explainPendingMailNotFound, wn as getSentEmail, wt as sentHistoryWindowStart, x as hasReplyState, xn as getMemory, xr as verifyAgentSignup, xt as sendIdentityFields, y as formatAwaitingCell, yn as getFunctionTestRunTrace, yr as updateWakeSchedule, yt as priorRepliesThatWentOut, z as cliInvocation, zn as listSentEmails, zt as expectedAutomatedVerdicts } from "../api-command-DWTysV8D.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 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-
|
|
5
|
-
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-
|
|
4
|
+
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-CPdFxyt7.js";
|
|
5
|
+
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-D4UbgQCW.js";
|
|
6
6
|
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-BJVYBRim.js";
|
|
7
7
|
import { c as startBackgroundListen, i as backgroundListenToken, l as stopBackgroundListen, o as runBackgroundListen, r as backgroundListenStatus, u as verifyBackgroundListenTarget } from "../listen-background-CMfxkeVP.js";
|
|
8
8
|
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-B8Wq41vG.js";
|
|
9
|
-
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-
|
|
9
|
+
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-CaKUsE4H.js";
|
|
10
10
|
import { autoSignalEligible, dispatchAutoRead, dispatchAutoWorking, haltAutoWorking, isSentSignal, 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";
|
|
@@ -39900,7 +39900,12 @@ var ChatCommand = class ChatCommand extends Command {
|
|
|
39900
39900
|
const resumed = receipt.data.sent !== null;
|
|
39901
39901
|
this.chatProgress.sendStartedAtIso = sentAtIso;
|
|
39902
39902
|
if (parentReply !== void 0) {
|
|
39903
|
-
const priorReplies = Array.isArray(parentReply.replies) ?
|
|
39903
|
+
const priorReplies = Array.isArray(parentReply.replies) ? await excludeSignalReplies({
|
|
39904
|
+
client: apiClient.client,
|
|
39905
|
+
replies: priorRepliesThatWentOut(parentReply.replies, { excludeSentId: receipt.data.sent?.id }),
|
|
39906
|
+
threadId: parentReply.thread_id,
|
|
39907
|
+
isLocalSignal: (sentId) => isSentSignal(this.config.configDir, sentId)
|
|
39908
|
+
}) : null;
|
|
39904
39909
|
this.chatProgress.priorReplies = priorReplies;
|
|
39905
39910
|
if (!resumed) {
|
|
39906
39911
|
const warning = priorReplies === null ? `Could not check whether you already replied to email ${parentReply.id} (the API returned no reply history). Prior-reply check skipped; sending the reply anyway.` : formatPriorRepliesWarning(priorReplies);
|
|
@@ -43587,7 +43592,7 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
43587
43592
|
url: "https://primitive.dev"
|
|
43588
43593
|
};
|
|
43589
43594
|
const SDK_VERSION_RANGE = "^1.35.0";
|
|
43590
|
-
const CLI_VERSION_RANGE = "^1.
|
|
43595
|
+
const CLI_VERSION_RANGE = "^1.52.0";
|
|
43591
43596
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
43592
43597
|
function renderHandler() {
|
|
43593
43598
|
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-DGrZCUfw.js";
|
|
2
2
|
import { d as readMailJson } from "../shared-mail-files-SPPcis9g.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-CPdFxyt7.js";
|
|
4
4
|
import { a as claimBackgroundListenRestart, n as backgroundListenRestartable, r as backgroundListenStatus } from "../listen-background-CMfxkeVP.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Et as successfulSendOutcome, Qt as createEndpoint, T as bareAddress, dt as classifySendError, gn as getEmail, o as extractErrorPayload, rr as sendEmail, zn as listSentEmails } from "./api-command-DWTysV8D.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 { a as scopedChatSenderTrust, i as readBeforeDeadline, n as isPlainChatReply } from "./scoped-chat-BJVYBRim.js";
|
|
4
4
|
import { h as sendPreparedSignal, p as prepareSignalEmail } from "./repeats-D2xtLium-B8Wq41vG.js";
|