primcli 1.66.0 → 1.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -10
- package/bin/claude-pending-mail.mjs +58 -1
- package/bin/claude-wake.mjs +6 -1
- package/dist/{api-command-T189Vupo.js → api-command-D7DPn2Ro.js} +77 -15
- package/dist/{machine-session-CgEAzThT.js → machine-session-7bISVcRb.js} +183 -28
- package/dist/{notify-session-CaG0vpjw.js → notify-session-Cp0Kkstb.js} +2 -2
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/auto-signals.js +1 -1
- package/dist/oclif/index.js +112 -44
- package/dist/oclif/receiver-heal.js +1 -1
- package/dist/{repeats-BL7ZC-_6-O_YE1_cO.js → repeats-BL7ZC-_6-BZ-MphTV.js} +59 -7
- package/dist/{scoped-chat-DKpjp27r.js → scoped-chat-Dsark9hm.js} +1 -1
- package/dist/{signal-command-CztPfoRE.js → signal-command-Bi2U2BR_.js} +4 -4
- package/dist/skills/primitive-connect/SKILL.md +6 -0
- package/dist/skills/primitive-connect/package-lock.json +78 -78
- package/dist/skills/primitive-connect/package.json +1 -1
- package/dist/skills/primitive-connect/references/conversations.md +22 -1
- package/dist/skills/primitive-connect.json +6 -6
- package/package.json +1 -1
package/dist/oclif/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as REPEAT_IDLE_MAX_MINUTES, b as parseWebhookEvent, d as parseRepeatTick, f as preparePresenceAliveEmail, 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 isEmailReceivedEvent, x as parseFromHeader } from "../repeats-BL7ZC-_6-
|
|
1
|
+
import { a as REPEAT_IDLE_MAX_MINUTES, b as parseWebhookEvent, d as parseRepeatTick, f as preparePresenceAliveEmail, 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 isEmailReceivedEvent, x as parseFromHeader } from "../repeats-BL7ZC-_6-BZ-MphTV.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 replyToEmail, $t as completeWebhookEvent, A as readThreadContext, An as listAgentNetworks, At as formatAlreadySentNotice, B as pendingMailPath, Bn as listRoutes, Bt as expectedAutomatedVerdicts, C as queryUsesAwaiting, Cn as getMemory, Cr as verifyAgentSignup, Ct as cliInvocation, D as displayAddress, Dn as getThread, Dt as identitySuggestions, E as describeWake, En as getSentEmail, Et as generatedAgentName, F as wakeReadCommand, Fn as listEmails, Ft as AUTOMATED_VALUES, G as interactionNextActions, Gn as pollCliLogin, H as recordPendingMail, Hn as listWakeAuthorizations, Ht as isAutomatedRejectedError, I as wakeRecipientField, In as listEndpoints, It as AutomatedFilterUnsupportedError, J as replyInteractionWarning, Jt as refreshStoredCliCredentials, K as readEmailInteraction, Kn as pullWebhookEvent, Kt as createAuthenticatedCliApiClient, L as wakeRelationship, Ln as listFunctionLogs, Lt as assertAutomatedVerdict, M as serverMuted, Mn as listDefaultNetworkAgents, Mt as withFlagSuggestion, N as serverRelationship, Nn as listDefaultNetworkMembers, Nt as AUTOMATED_FILTER_UNSUPPORTED_CODE, O as formatMailWakeLine, On as getWakeSchedule, Ot as loadSkillLine, Pn as listDomains, Pt as AUTOMATED_FLAG_DESCRIPTION, Q as SEND_OUTCOME_HELP, Qn as reorderRoutes, Qt as cliLogout, R as clearConsumedPendingMail, Rn as listFunctions, Rt as automatedRejectedError, S as isAwaitingRejectedError, Sn as getInboxStatus, Sr as verifyAgentClaim, T as bareAddress, Tn as getRepeatingSend, U as removePendingMail, Un as listWakeDispatches, Ut as queryUsesAutomated, V as readPendingMail, Vn as listSentEmails, Vt as hasAutomatedVerdict, W as interactionHumanLine, Wn as listWakeSchedules, Wt as ConnectedAgentKeyRequiredError, X as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, Xn as redeemCreditCode, Xt as addDefaultNetworkMember, Yt as resolveCliApiRequestConfig, Z as MAX_SEND_WAIT_TIMEOUT_MS, Zn as removeDefaultNetworkMember, Zt as checkDefaultNetworkContactAdmission, _ as awaitingRejectedError, _n as getDefaultNetworkAgent, _r as updateFunction, _t as sendWaitClampNotice, a as extractErrorCode, ar as sendEmail, at as deriveSendIdempotencyKey, b as formatRepliesCell, bn as getFunctionRouting, br as updateWakeAuthorization, bt as successfulSendOutcome, c as readTextFileFlag, cn as deleteRoute, cr as setMemory, ct as formatDeletedEarlierSendNotice, d as writeErrorWithHints, dr as startAgentSignup, dt as formatSendFailureSummary, en as createEndpoint, er as resendAgentSignupVerification, et as assertValidIdempotencyKey, f as AWAITING_FLAG_DESCRIPTION, fn as getAccount, fr as startCliLogin, ft as formatSendRecordFailureSummary, g as assertAwaitingFilterRows, gn as getCreditBalance, gr as updateDefaultNetworkMember, gt as sendOutcomeExitCode, h as ReplyStateUnsupportedError, hn as getConversation, hr as unsetFunctionRoute, ht as sendIdentityFields, i as createOperationCommand, in as createWakeSchedule, ir as semanticSearch, it as classifySendError, j as sentInThread, jt as writeIdempotentReplayBannerIfReplay, k as latestOwnOutbound, kn as listAgentContacts, kt as currentMailSessionKey, l as runWithTiming, ln as deleteWakeAuthorization, lr as simulateRoute, lt as formatPriorRepliesCheckSkipped, m as REPLY_STATE_UNSUPPORTED_CODE, mr as testFunction, mt as reportSendCommandResult, n as API_ERROR_CODES, nn as createRoute, nr as searchEmails, nt as buildThrownSendFailureEnvelope, o as extractErrorPayload, or as setFunctionRoute, ot as excludeSignalReplies, p as AWAITING_VALUES, pn as getAgentContactPolicy, pr as stopRepeatFromEmail, pt as priorRepliesThatWentOut, q as replyExpectation, qt as createCliApiClient, r as TIME_FLAG_DESCRIPTION, rn as createWakeAuthorization, rr as searchMemories, rt as checkPriorReplies, s as formatErrorPayload, sn as deleteMemory, sr as setFunctionSecret, st as followUpCommandPrefix, t as API_BASE_URL_FLAG_DESCRIPTION, tn as createFunction, tr as runWakeSchedule, tt as buildFollowUpCommand, u as surfaceUnauthorizedHint, un as deleteWakeSchedule, ur as startAgentClaim, ut as formatPriorRepliesWarning, v as ensureSearchReportsReplyState, vn as getEmail, vr as updateRepeatingSend, vt as sentHistoryWindowStart, w as explainPendingMailNotFound, wn as getOrgRoutingTopology, wt as connectNextSteps, x as hasReplyState, xn as getFunctionTestRunTrace, xr as updateWakeSchedule, xt as thrownErrorExitCode, y as formatAwaitingCell, yn as getFunction, yr as updateRoute, yt as serializeErrorPayload, z as clearReadPendingMail, zn as listRepeatingSends, zt as ensureSearchReportsAutomated } from "../api-command-
|
|
3
|
+
import { $ as apiResultHttpStatus, $n as replyToEmail, $t as completeWebhookEvent, A as readThreadContext, An as listAgentNetworks, At as formatAlreadySentNotice, B as pendingMailPath, Bn as listRoutes, Bt as expectedAutomatedVerdicts, C as queryUsesAwaiting, Cn as getMemory, Cr as verifyAgentSignup, Ct as cliInvocation, D as displayAddress, Dn as getThread, Dt as identitySuggestions, E as describeWake, En as getSentEmail, Et as generatedAgentName, F as wakeReadCommand, Fn as listEmails, Ft as AUTOMATED_VALUES, G as interactionNextActions, Gn as pollCliLogin, H as recordPendingMail, Hn as listWakeAuthorizations, Ht as isAutomatedRejectedError, I as wakeRecipientField, In as listEndpoints, It as AutomatedFilterUnsupportedError, J as replyInteractionWarning, Jt as refreshStoredCliCredentials, K as readEmailInteraction, Kn as pullWebhookEvent, Kt as createAuthenticatedCliApiClient, L as wakeRelationship, Ln as listFunctionLogs, Lt as assertAutomatedVerdict, M as serverMuted, Mn as listDefaultNetworkAgents, Mt as withFlagSuggestion, N as serverRelationship, Nn as listDefaultNetworkMembers, Nt as AUTOMATED_FILTER_UNSUPPORTED_CODE, O as formatMailWakeLine, On as getWakeSchedule, Ot as loadSkillLine, Pn as listDomains, Pt as AUTOMATED_FLAG_DESCRIPTION, Q as SEND_OUTCOME_HELP, Qn as reorderRoutes, Qt as cliLogout, R as clearConsumedPendingMail, Rn as listFunctions, Rt as automatedRejectedError, S as isAwaitingRejectedError, Sn as getInboxStatus, Sr as verifyAgentClaim, T as bareAddress, Tn as getRepeatingSend, U as removePendingMail, Un as listWakeDispatches, Ut as queryUsesAutomated, V as readPendingMail, Vn as listSentEmails, Vt as hasAutomatedVerdict, W as interactionHumanLine, Wn as listWakeSchedules, Wt as ConnectedAgentKeyRequiredError, X as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, Xn as redeemCreditCode, Xt as addDefaultNetworkMember, Yt as resolveCliApiRequestConfig, Z as MAX_SEND_WAIT_TIMEOUT_MS, Zn as removeDefaultNetworkMember, Zt as checkDefaultNetworkContactAdmission, _ as awaitingRejectedError, _n as getDefaultNetworkAgent, _r as updateFunction, _t as sendWaitClampNotice, a as extractErrorCode, ar as sendEmail, at as deriveSendIdempotencyKey, b as formatRepliesCell, bn as getFunctionRouting, br as updateWakeAuthorization, bt as successfulSendOutcome, c as readTextFileFlag, cn as deleteRoute, cr as setMemory, ct as formatDeletedEarlierSendNotice, d as writeErrorWithHints, dr as startAgentSignup, dt as formatSendFailureSummary, en as createEndpoint, er as resendAgentSignupVerification, et as assertValidIdempotencyKey, f as AWAITING_FLAG_DESCRIPTION, fn as getAccount, fr as startCliLogin, ft as formatSendRecordFailureSummary, g as assertAwaitingFilterRows, gn as getCreditBalance, gr as updateDefaultNetworkMember, gt as sendOutcomeExitCode, h as ReplyStateUnsupportedError, hn as getConversation, hr as unsetFunctionRoute, ht as sendIdentityFields, i as createOperationCommand, in as createWakeSchedule, ir as semanticSearch, it as classifySendError, j as sentInThread, jt as writeIdempotentReplayBannerIfReplay, k as latestOwnOutbound, kn as listAgentContacts, kt as currentMailSessionKey, l as runWithTiming, ln as deleteWakeAuthorization, lr as simulateRoute, lt as formatPriorRepliesCheckSkipped, m as REPLY_STATE_UNSUPPORTED_CODE, mr as testFunction, mt as reportSendCommandResult, n as API_ERROR_CODES, nn as createRoute, nr as searchEmails, nt as buildThrownSendFailureEnvelope, o as extractErrorPayload, or as setFunctionRoute, ot as excludeSignalReplies, p as AWAITING_VALUES, pn as getAgentContactPolicy, pr as stopRepeatFromEmail, pt as priorRepliesThatWentOut, q as replyExpectation, qt as createCliApiClient, r as TIME_FLAG_DESCRIPTION, rn as createWakeAuthorization, rr as searchMemories, rt as checkPriorReplies, s as formatErrorPayload, sn as deleteMemory, sr as setFunctionSecret, st as followUpCommandPrefix, t as API_BASE_URL_FLAG_DESCRIPTION, tn as createFunction, tr as runWakeSchedule, tt as buildFollowUpCommand, u as surfaceUnauthorizedHint, un as deleteWakeSchedule, ur as startAgentClaim, ut as formatPriorRepliesWarning, v as ensureSearchReportsReplyState, vn as getEmail, vr as updateRepeatingSend, vt as sentHistoryWindowStart, w as explainPendingMailNotFound, wn as getOrgRoutingTopology, wt as connectNextSteps, x as hasReplyState, xn as getFunctionTestRunTrace, xr as updateWakeSchedule, xt as thrownErrorExitCode, y as formatAwaitingCell, yn as getFunction, yr as updateRoute, yt as serializeErrorPayload, z as clearReadPendingMail, zn as listRepeatingSends, zt as ensureSearchReportsAutomated } from "../api-command-D7DPn2Ro.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
|
|
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-
|
|
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-Cp0Kkstb.js";
|
|
6
|
+
import { $ as installClaudeWakeHook, A as evaluateContactPolicy, B as contactAddress, C as RECEIVER_MODES, Ct as withOwnerMemberAddress, D as NETWORK_ADMISSION_PENDING_RETRY_MS, E as ContactPolicyReadRetryError, F as disconnectAgent, G as connectAgent, H as runContactRequest, I as AddressNotesApiError, J as refusalAfterReplacement, K as readAgentInvitation, L as addressNoteTarget, M as AgentDisconnectError, N as claimOverRevokedSetup, O as NetworkAdmissionPendingError, P as clearRevokedAddresses, Q as releaseRegistrationsForProfile, R as runAddressNotesRequest, S as runAgentConnect, St as refreshOwnerMemberAddressPeriodically, T as verificationReplySubmitted, U as agentConnectionStatus, V as contactAgentAddress, W as agentInvitationHash, X as savedReceiver, Y as saveConnectionName, Z as MACHINE_RUNTIMES, _ as enrollmentResumes, _t as jsonIndentation, a as endSession, at as describeSessionHookItem, b as invitationProfileName, bt as writeManagedFile, c as pendingSessionDisconnects, ct as findOnPath, d as registerSession, dt as readClaudeSettings, et as recordHookMailCheck, f as retryPendingDisconnects, ft as repairClaudeHooks, g as enrollAgent, gt as inspectManagedBlock, h as staleSessionAgents, ht as MachineFileError, i as connectedProfilesForSession, it as describeSessionHookChange, j as canonicalContactSelector, k as createNotificationContactPolicy, l as psProcessInfo, lt as hasMachineSessionHooks, m as runDetached, mt as writeClaudeSettings, n as OMP_MAIN, nt as claudeConfigDir, o as headlessClaudeRun, ot as ensureHookLauncher, p as revokeStaleSessionAgents, pt as samePath, q as receiverStatusCommand, r as agentConnectionState, rt as currentCliLocation, st as ephemeralCliReason, t as HOOK_END_GRACE_MS, tt as boundSessionProfiles, u as readClaudeHookInput, ut as inspectClaudeHooks, v as connectWarnings, vt as readManagedFile, w as externalReceivingState, x as pollCheckCommand, xt as readHookLauncherWarning, y as defaultAgentProfileName, yt as upsertManagedBlock, z as ContactsApiError } from "../machine-session-7bISVcRb.js";
|
|
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-Dsark9hm.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 isConnectedAgentKey, d as reserveSharedMailSubscription, f as followEmailConversation, g as EventReceiverError, h as EventConnection, i as sharedMailScope, l as createSharedMailWaiter, m as otherParticipants, n as reconcileChatSend, p as readConversationFollow, r as openSharedMailReceiver, s as AGENT_CONNECTION_REQUIRED_MESSAGE, t as sendSignal, u as openSharedMailStore } from "../signal-command-
|
|
9
|
+
import { a as ensureSharedMailSubscription, c as isConnectedAgentKey, d as reserveSharedMailSubscription, f as followEmailConversation, g as EventReceiverError, h as EventConnection, i as sharedMailScope, l as createSharedMailWaiter, m as otherParticipants, n as reconcileChatSend, p as readConversationFollow, r as openSharedMailReceiver, s as AGENT_CONNECTION_REQUIRED_MESSAGE, t as sendSignal, u as openSharedMailStore } from "../signal-command-Bi2U2BR_.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";
|
|
@@ -37599,9 +37599,13 @@ var AgentRuntimeGetCommand = class AgentRuntimeGetCommand extends Command {
|
|
|
37599
37599
|
//#endregion
|
|
37600
37600
|
//#region src/oclif/commands/agent-session-end.ts
|
|
37601
37601
|
var AgentSessionEndCommand = class AgentSessionEndCommand extends Command {
|
|
37602
|
-
static summary = "
|
|
37603
|
-
static description = "
|
|
37604
|
-
static examples = [
|
|
37602
|
+
static summary = "Record that a registered session ended";
|
|
37603
|
+
static description = "Marks this session ended and removes its exact-session receive hooks. The agent that `primitive agent session-register` created for the session stays connected, with its credential and profile, so resuming the session (for example `claude --resume`) re-verifies it and reinstalls the hooks at the same address. Its presence lapses on its own once the session stops running. An agent whose session has not started again for 30 days is disconnected by `primitive machine doctor --fix` or the next `agent session-register` on this machine. --revoke disconnects the agent now instead. Agents connected any other way are never disconnected, including an agent later connected into the same profile with `primitive agent connect`. Never blocks or fails a session: every outcome exits 0 with a status. --hook reads Claude's SessionEnd hook input from stdin and finishes in the background after a grace period: Claude reports the same end for a restart, a switch to another session and a real exit, so a start of the same session within the grace period cancels the end.";
|
|
37604
|
+
static examples = [
|
|
37605
|
+
"<%= config.bin %> agent session-end --runtime claude --json",
|
|
37606
|
+
"<%= config.bin %> agent session-end --runtime codex --session 11111111-1111-4111-8111-111111111111",
|
|
37607
|
+
"<%= config.bin %> agent session-end --runtime claude --session 11111111-1111-4111-8111-111111111111 --revoke"
|
|
37608
|
+
];
|
|
37605
37609
|
static flags = {
|
|
37606
37610
|
runtime: Flags.string({
|
|
37607
37611
|
required: true,
|
|
@@ -37612,10 +37616,11 @@ var AgentSessionEndCommand = class AgentSessionEndCommand extends Command {
|
|
|
37612
37616
|
grace: Flags.integer({
|
|
37613
37617
|
min: 0,
|
|
37614
37618
|
max: 3600,
|
|
37615
|
-
description: "Seconds to wait before
|
|
37619
|
+
description: "Seconds to wait before the end takes effect; a start of the same session meanwhile cancels it"
|
|
37616
37620
|
}),
|
|
37621
|
+
revoke: Flags.boolean({ description: "Disconnect the agent session-register created for this session instead of keeping it for a resume" }),
|
|
37617
37622
|
reason: Flags.string({ description: "The runtime's reason for the end, recorded with it" }),
|
|
37618
|
-
hook: Flags.boolean({ description: "Read Claude hook JSON from stdin and
|
|
37623
|
+
hook: Flags.boolean({ description: "Read Claude hook JSON from stdin and finish in the background" }),
|
|
37619
37624
|
json: Flags.boolean({ description: "Print the result as JSON" }),
|
|
37620
37625
|
quiet: Flags.boolean({ description: "Print nothing" })
|
|
37621
37626
|
};
|
|
@@ -37638,6 +37643,7 @@ var AgentSessionEndCommand = class AgentSessionEndCommand extends Command {
|
|
|
37638
37643
|
"--grace",
|
|
37639
37644
|
String(HOOK_END_GRACE_MS / 1e3),
|
|
37640
37645
|
...input.reason ? ["--reason", input.reason] : [],
|
|
37646
|
+
...flags.revoke ? ["--revoke"] : [],
|
|
37641
37647
|
"--quiet"
|
|
37642
37648
|
],
|
|
37643
37649
|
env: process.env,
|
|
@@ -37650,7 +37656,8 @@ var AgentSessionEndCommand = class AgentSessionEndCommand extends Command {
|
|
|
37650
37656
|
runtime,
|
|
37651
37657
|
session: flags.session,
|
|
37652
37658
|
graceMs: (flags.grace ?? 0) * 1e3,
|
|
37653
|
-
reason: flags.reason ?? null
|
|
37659
|
+
reason: flags.reason ?? null,
|
|
37660
|
+
revoke: flags.revoke === true
|
|
37654
37661
|
});
|
|
37655
37662
|
const { status, ...rest } = result;
|
|
37656
37663
|
if (flags.json) this.log(JSON.stringify({
|
|
@@ -37666,7 +37673,7 @@ var AgentSessionEndCommand = class AgentSessionEndCommand extends Command {
|
|
|
37666
37673
|
const HOOK_BUDGET_MS = 3e3;
|
|
37667
37674
|
var AgentSessionRegisterCommand = class AgentSessionRegisterCommand extends Command {
|
|
37668
37675
|
static summary = "Register this coding session with Primitive, once";
|
|
37669
|
-
static description = "Gives the current Claude Code, Codex or omp session an address in your organization using the saved member login, without a browser. Safe to run on every start and resume: a session that already has a profile is only re-verified, and a session whose agent was disconnected or removed never gets a second address. The session ID comes from CLAUDE_CODE_SESSION_ID (Claude), CODEX_THREAD_ID or CODEX_SESSION_ID (Codex), or --session. omp does not expose a session ID to commands, so omp sessions use one generated ID per running omp process, and receiving mail is not supported for them. The agent is named <runtime>-<repository> and gets a private AGENT_INFO note naming the runtime and repository when it has none. Claude sessions receive mail through exact-session hooks; Codex through the native receiver. Non-interactive Claude runs (claude -p and SDK hosts, by CLAUDE_CODE_ENTRYPOINT) are skipped with status skipped_headless. Never blocks a session: every outcome, including no login or no network, exits 0 with a status. --hook reads Claude's or Codex's SessionStart hook input from stdin, returns within a few seconds and finishes slower work in the background.";
|
|
37676
|
+
static description = "Gives the current Claude Code, Codex or omp session an address in your organization using the saved member login, without a browser. Safe to run on every start and resume: a session that already has a profile is only re-verified, and a session that ended and starts again (for example `claude --resume`) keeps its agent and address, and a session whose agent was disconnected or removed never gets a second address. Each run also disconnects the agents of sessions on this machine that ended more than 30 days ago without starting again, only while their profile still holds the credential this command created. The session ID comes from CLAUDE_CODE_SESSION_ID (Claude), CODEX_THREAD_ID or CODEX_SESSION_ID (Codex), or --session. omp does not expose a session ID to commands, so omp sessions use one generated ID per running omp process, and receiving mail is not supported for them. The agent is named <runtime>-<repository> and gets a private AGENT_INFO note naming the runtime and repository when it has none. Claude sessions receive mail through exact-session hooks; Codex through the native receiver. Non-interactive Claude runs (claude -p and SDK hosts, by CLAUDE_CODE_ENTRYPOINT) are skipped with status skipped_headless. Never blocks a session: every outcome, including no login or no network, exits 0 with a status. --hook reads Claude's or Codex's SessionStart hook input from stdin, returns within a few seconds and finishes slower work in the background.";
|
|
37670
37677
|
static examples = [
|
|
37671
37678
|
"<%= config.bin %> agent session-register --runtime codex --quiet",
|
|
37672
37679
|
"<%= config.bin %> agent session-register --runtime claude --json",
|
|
@@ -37732,6 +37739,9 @@ var AgentSessionRegisterCommand = class AgentSessionRegisterCommand extends Comm
|
|
|
37732
37739
|
...identity
|
|
37733
37740
|
}));
|
|
37734
37741
|
else if (!flags.quiet) this.log(`${result.status}: ${result.detail}`);
|
|
37742
|
+
try {
|
|
37743
|
+
await revokeStaleSessionAgents(this.config.configDir, { exclude: result.session });
|
|
37744
|
+
} catch {}
|
|
37735
37745
|
}
|
|
37736
37746
|
};
|
|
37737
37747
|
//#endregion
|
|
@@ -38931,11 +38941,19 @@ async function openConnectedReplyWait(options) {
|
|
|
38931
38941
|
signal: AbortSignal.timeout(2e3)
|
|
38932
38942
|
})).cancelRejectedSend(requestId);
|
|
38933
38943
|
},
|
|
38934
|
-
|
|
38944
|
+
/**
|
|
38945
|
+
* The session consumed this reply. Pass the reply itself when it is at
|
|
38946
|
+
* hand, so the older pending notices in its thread are cleared too.
|
|
38947
|
+
*/
|
|
38948
|
+
async observed(emailId, email) {
|
|
38935
38949
|
if (options.contactRequest && await store.observeNotifiedContactReply(emailId, requestId, waiter.token)) return;
|
|
38936
38950
|
await store.markWaitObserved(emailId, requestId);
|
|
38937
38951
|
try {
|
|
38938
|
-
await clearConsumedPendingMail(options.configDir, options.sessionKey, emailId
|
|
38952
|
+
await clearConsumedPendingMail(options.configDir, options.sessionKey, emailId, email ? {
|
|
38953
|
+
thread_id: email.thread_id ?? null,
|
|
38954
|
+
received_at: email.received_at,
|
|
38955
|
+
recipient: options.from
|
|
38956
|
+
} : null);
|
|
38939
38957
|
} catch {}
|
|
38940
38958
|
},
|
|
38941
38959
|
finish: () => store.finishWait(requestId),
|
|
@@ -39274,7 +39292,7 @@ async function requestContact(context, options) {
|
|
|
39274
39292
|
outcome: "sent_awaiting_reply"
|
|
39275
39293
|
}
|
|
39276
39294
|
};
|
|
39277
|
-
await wait.observed(accepted.id);
|
|
39295
|
+
await wait.observed(accepted.id, accepted);
|
|
39278
39296
|
await wait.finish();
|
|
39279
39297
|
return {
|
|
39280
39298
|
exitCode: 0,
|
|
@@ -39407,7 +39425,7 @@ async function waitForContact(context, sentId, timeoutSeconds) {
|
|
|
39407
39425
|
guidance: "Still awaiting acceptance. An active session listener can notify you later. Continue independent work instead of immediately chaining another wait; resume this same request when needed, without resending."
|
|
39408
39426
|
}
|
|
39409
39427
|
};
|
|
39410
|
-
await wait.observed(accepted.id);
|
|
39428
|
+
await wait.observed(accepted.id, accepted);
|
|
39411
39429
|
await wait.finish();
|
|
39412
39430
|
return {
|
|
39413
39431
|
exitCode: 0,
|
|
@@ -41136,7 +41154,7 @@ var ChatCommand = class ChatCommand extends Command {
|
|
|
41136
41154
|
requestId: connectedWait.requestId
|
|
41137
41155
|
};
|
|
41138
41156
|
saveChatReceipt(receipt);
|
|
41139
|
-
await connectedWait.observed(replyResult.reply.id);
|
|
41157
|
+
await connectedWait.observed(replyResult.reply.id, replyResult.reply);
|
|
41140
41158
|
await connectedWait.finish();
|
|
41141
41159
|
}
|
|
41142
41160
|
progress?.succeed(`Reply received from ${replyResult.reply.from_email}`);
|
|
@@ -43076,12 +43094,15 @@ const LINKS_DESCRIPTION = "With --compact, return the target URLs of links as `l
|
|
|
43076
43094
|
* Remove the email from the current profile's pending wake notices once the
|
|
43077
43095
|
* session has read it. Never fails the read.
|
|
43078
43096
|
*/
|
|
43079
|
-
async function clearPendingAfterRead(configDir, emailId) {
|
|
43097
|
+
async function clearPendingAfterRead(configDir, emailId, known) {
|
|
43080
43098
|
try {
|
|
43081
43099
|
const profileName = resolveCliAuth({ configDir }).connectedAgent?.profileName;
|
|
43082
43100
|
if (!profileName) return;
|
|
43083
43101
|
const runtime = currentMailSessionKey();
|
|
43084
|
-
await clearReadPendingMail(configDir, profileName, runtime ? runtime.slice(runtime.indexOf(":") + 1) : null, emailId
|
|
43102
|
+
await clearReadPendingMail(configDir, profileName, runtime ? runtime.slice(runtime.indexOf(":") + 1) : null, emailId, typeof known?.received_at === "string" ? {
|
|
43103
|
+
thread_id: known.thread_id ?? null,
|
|
43104
|
+
received_at: known.received_at
|
|
43105
|
+
} : null);
|
|
43085
43106
|
} catch {}
|
|
43086
43107
|
}
|
|
43087
43108
|
const NO_SIGNAL_DESCRIPTION = "With --context, do not report working to the sender, and stop a working report an earlier read of this email started; nothing is sent. By default, reading mail from the verified owner or a same-organization member (not another agent) that a receiver surfaced to this session reports working in the background until you answer (also disabled by PRIMITIVE_NO_AUTO_SIGNALS=1).";
|
|
@@ -43150,7 +43171,7 @@ async function runBrief(command, flags) {
|
|
|
43150
43171
|
...brief,
|
|
43151
43172
|
working_signal: { stop_command: stop }
|
|
43152
43173
|
} : brief, null, 2) : `${renderEmailBrief(brief)}${stop ? `\n${workingStopLine(stop)}` : ""}`);
|
|
43153
|
-
await clearPendingAfterRead(command.config.configDir, detail.id);
|
|
43174
|
+
await clearPendingAfterRead(command.config.configDir, detail.id, detail);
|
|
43154
43175
|
});
|
|
43155
43176
|
}
|
|
43156
43177
|
const ROUTE_MISSING_NOTICE = "Note: this server does not offer the readable read yet, so a local compact view was printed.\n";
|
|
@@ -43180,7 +43201,7 @@ async function runCompact(command, flags) {
|
|
|
43180
43201
|
});
|
|
43181
43202
|
if (readable.kind === "ok") {
|
|
43182
43203
|
command.log(JSON.stringify(readable.data, null, 2));
|
|
43183
|
-
await clearPendingAfterRead(command.config.configDir, readable.data.id);
|
|
43204
|
+
await clearPendingAfterRead(command.config.configDir, readable.data.id, readable.data);
|
|
43184
43205
|
return;
|
|
43185
43206
|
}
|
|
43186
43207
|
if (readable.kind === "error") {
|
|
@@ -43199,7 +43220,7 @@ async function runCompact(command, flags) {
|
|
|
43199
43220
|
}
|
|
43200
43221
|
process.stderr.write(ROUTE_MISSING_NOTICE);
|
|
43201
43222
|
command.log(JSON.stringify(buildEmailCompact(detail), null, 2));
|
|
43202
|
-
await clearPendingAfterRead(command.config.configDir, detail.id);
|
|
43223
|
+
await clearPendingAfterRead(command.config.configDir, detail.id, detail);
|
|
43203
43224
|
});
|
|
43204
43225
|
}
|
|
43205
43226
|
/**
|
|
@@ -43585,7 +43606,7 @@ var EmailsWaitCommand = class EmailsWaitCommand extends Command {
|
|
|
43585
43606
|
const email = await waiter.next();
|
|
43586
43607
|
if (!email) break;
|
|
43587
43608
|
printEmail(email);
|
|
43588
|
-
await waiter.observed(email.id);
|
|
43609
|
+
await waiter.observed(email.id, email);
|
|
43589
43610
|
}
|
|
43590
43611
|
if (matched >= flags.number) {
|
|
43591
43612
|
await waiter.finish();
|
|
@@ -44928,7 +44949,7 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
44928
44949
|
url: "https://primitive.dev"
|
|
44929
44950
|
};
|
|
44930
44951
|
const SDK_VERSION_RANGE = "^2.0.0";
|
|
44931
|
-
const CLI_VERSION_RANGE = "^1.
|
|
44952
|
+
const CLI_VERSION_RANGE = "^1.68.0";
|
|
44932
44953
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
44933
44954
|
function renderHandler() {
|
|
44934
44955
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -49199,6 +49220,13 @@ async function createWakeMail(options) {
|
|
|
49199
49220
|
let wakeContext;
|
|
49200
49221
|
let statusEvent;
|
|
49201
49222
|
let autoSignal;
|
|
49223
|
+
let held;
|
|
49224
|
+
function surface(wake) {
|
|
49225
|
+
wakeId = wake.wakeId;
|
|
49226
|
+
senderRelation = wake.senderRelation;
|
|
49227
|
+
wakeContext = wake.context;
|
|
49228
|
+
autoSignal = wake.autoSignal;
|
|
49229
|
+
}
|
|
49202
49230
|
let pendingRequest;
|
|
49203
49231
|
const profileName = identity?.profileName;
|
|
49204
49232
|
const outcome = (accepted) => ({
|
|
@@ -49437,19 +49465,23 @@ async function createWakeMail(options) {
|
|
|
49437
49465
|
context
|
|
49438
49466
|
};
|
|
49439
49467
|
else {
|
|
49440
|
-
|
|
49441
|
-
|
|
49442
|
-
|
|
49443
|
-
|
|
49444
|
-
|
|
49445
|
-
|
|
49446
|
-
|
|
49447
|
-
|
|
49448
|
-
|
|
49449
|
-
|
|
49450
|
-
|
|
49451
|
-
|
|
49452
|
-
|
|
49468
|
+
const wake = {
|
|
49469
|
+
wakeId: detail.id,
|
|
49470
|
+
senderRelation: admission.senderRelation,
|
|
49471
|
+
context,
|
|
49472
|
+
autoSignal: profileName && autoSignalEligible(detail, {
|
|
49473
|
+
agentAddress: recipient,
|
|
49474
|
+
ownerAddress: identity?.ownerAddress
|
|
49475
|
+
}, admission) ? {
|
|
49476
|
+
emailId: detail.id,
|
|
49477
|
+
profileName,
|
|
49478
|
+
sender,
|
|
49479
|
+
threadId: detail.thread_id ?? null,
|
|
49480
|
+
replyToSentEmailId: detail.reply_to_sent_email_id ?? null
|
|
49481
|
+
} : void 0
|
|
49482
|
+
};
|
|
49483
|
+
if (context.newer !== void 0 && context.newer > 0) held = wake;
|
|
49484
|
+
else surface(wake);
|
|
49453
49485
|
}
|
|
49454
49486
|
return outcome(true);
|
|
49455
49487
|
} catch (error) {
|
|
@@ -49465,6 +49497,14 @@ async function createWakeMail(options) {
|
|
|
49465
49497
|
status: () => statusEvent,
|
|
49466
49498
|
autoSignal: () => wakeId === autoSignal?.emailId ? autoSignal : void 0,
|
|
49467
49499
|
completed: completePending,
|
|
49500
|
+
/** A superseded wake this run accepted and has not surfaced. */
|
|
49501
|
+
held: () => held?.wakeId,
|
|
49502
|
+
/** Surface the held wake, when nothing newer arrived for it. */
|
|
49503
|
+
wakeHeld: () => {
|
|
49504
|
+
if (wakeId || statusEvent || !held) return;
|
|
49505
|
+
surface(held);
|
|
49506
|
+
held = void 0;
|
|
49507
|
+
},
|
|
49468
49508
|
receiving: (ready) => {
|
|
49469
49509
|
receiving = ready;
|
|
49470
49510
|
},
|
|
@@ -49474,6 +49514,11 @@ async function createWakeMail(options) {
|
|
|
49474
49514
|
//#endregion
|
|
49475
49515
|
//#region src/oclif/commands/listen.ts
|
|
49476
49516
|
const RESUME_LOCK_RETRY_MS = 4e3;
|
|
49517
|
+
/**
|
|
49518
|
+
* How long a wake listener holding a superseded wake (one whose thread has
|
|
49519
|
+
* newer mail) waits for that newer mail before waking for the held one.
|
|
49520
|
+
*/
|
|
49521
|
+
const HELD_WAKE_SETTLE_MS = 5e3;
|
|
49477
49522
|
const MAIL_CHECK_RECORD_MS = 5e3;
|
|
49478
49523
|
const RESUME_LOCK_RETRY_STEP_MS = 250;
|
|
49479
49524
|
function isListenLockContention(error) {
|
|
@@ -49933,8 +49978,12 @@ var ListenCommand = class ListenCommand extends Command {
|
|
|
49933
49978
|
if (!target || !options.notifySession || !requestConfig) {
|
|
49934
49979
|
let resumeLockDeadline;
|
|
49935
49980
|
do {
|
|
49981
|
+
const settle = wake?.held?.() ? AbortSignal.timeout(HELD_WAKE_SETTLE_MS) : void 0;
|
|
49936
49982
|
for (;;) try {
|
|
49937
|
-
await runListen(
|
|
49983
|
+
await runListen(settle ? {
|
|
49984
|
+
...options,
|
|
49985
|
+
signal: AbortSignal.any([controller.signal, settle])
|
|
49986
|
+
} : options);
|
|
49938
49987
|
break;
|
|
49939
49988
|
} catch (error) {
|
|
49940
49989
|
if (!isListenLockContention(error) || hookEventName !== "SessionStart" || controller.signal.aborted) throw error;
|
|
@@ -49944,6 +49993,7 @@ var ListenCommand = class ListenCommand extends Command {
|
|
|
49944
49993
|
await new Promise((resolve) => setTimeout(resolve, Math.min(RESUME_LOCK_RETRY_STEP_MS, remaining)));
|
|
49945
49994
|
}
|
|
49946
49995
|
wake?.completed();
|
|
49996
|
+
if (settle?.aborted && !controller.signal.aborted) wake?.wakeHeld?.();
|
|
49947
49997
|
} while (wake && !wake.wakeId() && !wake.status() && !controller.signal.aborted);
|
|
49948
49998
|
} else {
|
|
49949
49999
|
const notify = options.notifySession;
|
|
@@ -52406,18 +52456,31 @@ async function runMachineDoctor(options) {
|
|
|
52406
52456
|
"profiles.orphaned": {
|
|
52407
52457
|
inspect: async () => {
|
|
52408
52458
|
const result = await inspectProfiles();
|
|
52409
|
-
const
|
|
52410
|
-
|
|
52411
|
-
const
|
|
52412
|
-
|
|
52459
|
+
const at = options.sessionDisconnect?.now?.() ?? now();
|
|
52460
|
+
const pending = pendingSessionDisconnects(options.configDir, at);
|
|
52461
|
+
const stale = staleSessionAgents(options.configDir, at);
|
|
52462
|
+
if (!pending.length && !stale.length) return result;
|
|
52463
|
+
const addresses = (records) => {
|
|
52464
|
+
const list = records.flatMap((record) => record.address ? [record.address] : []);
|
|
52465
|
+
return list.length ? ` (${list.join(", ")})` : "";
|
|
52466
|
+
};
|
|
52467
|
+
return check("profiles.orphaned", "fail", `${[...pending.length ? [`${pending.length} ended sessions still need their agent disconnected${addresses(pending)}; a repair retries it.`] : [], ...stale.length ? [`${stale.length} sessions ended more than 30 days ago without starting again and still hold the agent session-register created for them${addresses(stale)}; a repair disconnects it.`] : []].join(" ")}${result.status === "ok" ? "" : ` ${result.detail}`}`, { fixable: true });
|
|
52413
52468
|
},
|
|
52414
52469
|
repair: async () => {
|
|
52470
|
+
const stale = await revokeStaleSessionAgents(options.configDir, {
|
|
52471
|
+
env,
|
|
52472
|
+
fetch: options.fetch,
|
|
52473
|
+
dependencies: {
|
|
52474
|
+
now,
|
|
52475
|
+
...options.sessionDisconnect
|
|
52476
|
+
}
|
|
52477
|
+
});
|
|
52415
52478
|
const retried = await retryPendingDisconnects(options.configDir, {
|
|
52416
52479
|
env,
|
|
52417
52480
|
fetch: options.fetch,
|
|
52418
52481
|
...options.sessionDisconnect ? { dependencies: options.sessionDisconnect } : {}
|
|
52419
52482
|
});
|
|
52420
|
-
return await moveOrphans() || retried > 0;
|
|
52483
|
+
return await moveOrphans() || retried > 0 || stale > 0;
|
|
52421
52484
|
}
|
|
52422
52485
|
}
|
|
52423
52486
|
};
|
|
@@ -56221,6 +56284,11 @@ var ReplyCommand = class ReplyCommand extends Command {
|
|
|
56221
56284
|
const repeatLine = formatRepeatStarted(result, repeat);
|
|
56222
56285
|
if (repeatLine) process.stderr.write(`${repeatLine}\n`);
|
|
56223
56286
|
if (outcome === "not_sent") restoreAutoWorking(halted);
|
|
56287
|
+
const answered = priorRepliesCheck.status === "checked" && priorRepliesCheck.detail?.id === emailId ? priorRepliesCheck.detail : null;
|
|
56288
|
+
if (outcome !== "not_sent" && outcome !== "uncertain" && sessionKey && auth.connectedAgent) await clearReadPendingMail(this.config.configDir, auth.connectedAgent.profileName, sessionKey.slice(sessionKey.indexOf(":") + 1), emailId, answered ? {
|
|
56289
|
+
thread_id: answered.thread_id ?? null,
|
|
56290
|
+
received_at: answered.received_at
|
|
56291
|
+
} : null).catch(() => void 0);
|
|
56224
56292
|
const exitCode = sendOutcomeExitCode(outcome);
|
|
56225
56293
|
if (exitCode !== 0) process.exitCode = exitCode;
|
|
56226
56294
|
});
|
|
@@ -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-Cp0Kkstb.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";
|
|
@@ -956,7 +956,7 @@ function parseFromHeader(header) {
|
|
|
956
956
|
};
|
|
957
957
|
}
|
|
958
958
|
//#endregion
|
|
959
|
-
//#region ../sdk-node/dist/trust-
|
|
959
|
+
//#region ../sdk-node/dist/trust-CmCl198c.js
|
|
960
960
|
/**
|
|
961
961
|
* AUTO-GENERATED - DO NOT EDIT
|
|
962
962
|
* Run `pnpm generate:validator` to regenerate.
|
|
@@ -1139,6 +1139,15 @@ const schema12 = {
|
|
|
1139
1139
|
"relay": {
|
|
1140
1140
|
"anyOf": [{ "$ref": "#/definitions/EmailRelay" }, { "type": "null" }],
|
|
1141
1141
|
"description": "Set when the message reached Primitive through a Primitive mail relay. Null for other mail. The field may be absent; treat a missing value the same as null."
|
|
1142
|
+
},
|
|
1143
|
+
"automated": {
|
|
1144
|
+
"type": "boolean",
|
|
1145
|
+
"description": "Whether the message was sent by a machine rather than a person (bounce, auto-reply, list or bulk mail, report, or mail from the address it was delivered to). Same value GET /v1/emails/{id} returns. The field may be absent; treat a missing value as unknown."
|
|
1146
|
+
},
|
|
1147
|
+
"automated_reasons": {
|
|
1148
|
+
"type": "array",
|
|
1149
|
+
"items": { "type": "string" },
|
|
1150
|
+
"description": "Why automated is true, in rule order; empty when it is false. Current values: null_envelope_sender, no_identifiable_sender, own_address, mailer_daemon, auto_submitted, precedence, list_unsubscribe, list_id, auto_response_suppress, failed_recipients, report. Treat an unfamiliar value as one added after your client was built."
|
|
1142
1151
|
}
|
|
1143
1152
|
},
|
|
1144
1153
|
"required": [
|
|
@@ -9268,29 +9277,72 @@ function validate11$1(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
9268
9277
|
}
|
|
9269
9278
|
}
|
|
9270
9279
|
}
|
|
9280
|
+
if (data14.automated !== void 0) {
|
|
9281
|
+
if (typeof data14.automated !== "boolean") {
|
|
9282
|
+
const err89 = {
|
|
9283
|
+
instancePath: instancePath + "/email/automated",
|
|
9284
|
+
schemaPath: "#/properties/email/properties/automated/type",
|
|
9285
|
+
keyword: "type",
|
|
9286
|
+
params: { type: "boolean" },
|
|
9287
|
+
message: "must be boolean"
|
|
9288
|
+
};
|
|
9289
|
+
if (vErrors === null) vErrors = [err89];
|
|
9290
|
+
else vErrors.push(err89);
|
|
9291
|
+
errors++;
|
|
9292
|
+
}
|
|
9293
|
+
}
|
|
9294
|
+
if (data14.automated_reasons !== void 0) {
|
|
9295
|
+
let data44 = data14.automated_reasons;
|
|
9296
|
+
if (Array.isArray(data44)) {
|
|
9297
|
+
const len1 = data44.length;
|
|
9298
|
+
for (let i1 = 0; i1 < len1; i1++) if (typeof data44[i1] !== "string") {
|
|
9299
|
+
const err90 = {
|
|
9300
|
+
instancePath: instancePath + "/email/automated_reasons/" + i1,
|
|
9301
|
+
schemaPath: "#/properties/email/properties/automated_reasons/items/type",
|
|
9302
|
+
keyword: "type",
|
|
9303
|
+
params: { type: "string" },
|
|
9304
|
+
message: "must be string"
|
|
9305
|
+
};
|
|
9306
|
+
if (vErrors === null) vErrors = [err90];
|
|
9307
|
+
else vErrors.push(err90);
|
|
9308
|
+
errors++;
|
|
9309
|
+
}
|
|
9310
|
+
} else {
|
|
9311
|
+
const err91 = {
|
|
9312
|
+
instancePath: instancePath + "/email/automated_reasons",
|
|
9313
|
+
schemaPath: "#/properties/email/properties/automated_reasons/type",
|
|
9314
|
+
keyword: "type",
|
|
9315
|
+
params: { type: "array" },
|
|
9316
|
+
message: "must be array"
|
|
9317
|
+
};
|
|
9318
|
+
if (vErrors === null) vErrors = [err91];
|
|
9319
|
+
else vErrors.push(err91);
|
|
9320
|
+
errors++;
|
|
9321
|
+
}
|
|
9322
|
+
}
|
|
9271
9323
|
} else {
|
|
9272
|
-
const
|
|
9324
|
+
const err92 = {
|
|
9273
9325
|
instancePath: instancePath + "/email",
|
|
9274
9326
|
schemaPath: "#/properties/email/type",
|
|
9275
9327
|
keyword: "type",
|
|
9276
9328
|
params: { type: "object" },
|
|
9277
9329
|
message: "must be object"
|
|
9278
9330
|
};
|
|
9279
|
-
if (vErrors === null) vErrors = [
|
|
9280
|
-
else vErrors.push(
|
|
9331
|
+
if (vErrors === null) vErrors = [err92];
|
|
9332
|
+
else vErrors.push(err92);
|
|
9281
9333
|
errors++;
|
|
9282
9334
|
}
|
|
9283
9335
|
}
|
|
9284
9336
|
} else {
|
|
9285
|
-
const
|
|
9337
|
+
const err93 = {
|
|
9286
9338
|
instancePath,
|
|
9287
9339
|
schemaPath: "#/type",
|
|
9288
9340
|
keyword: "type",
|
|
9289
9341
|
params: { type: "object" },
|
|
9290
9342
|
message: "must be object"
|
|
9291
9343
|
};
|
|
9292
|
-
if (vErrors === null) vErrors = [
|
|
9293
|
-
else vErrors.push(
|
|
9344
|
+
if (vErrors === null) vErrors = [err93];
|
|
9345
|
+
else vErrors.push(err93);
|
|
9294
9346
|
errors++;
|
|
9295
9347
|
}
|
|
9296
9348
|
validate11$1.errors = vErrors;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as classifySignalContent, y as isTrustedSender } from "./repeats-BL7ZC-_6-
|
|
1
|
+
import { c as classifySignalContent, y as isTrustedSender } from "./repeats-BL7ZC-_6-BZ-MphTV.js";
|
|
2
2
|
//#region src/oclif/presence-provenance.ts
|
|
3
3
|
function readPresenceProjection(detail) {
|
|
4
4
|
if (!detail || typeof detail !== "object") return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as sendPreparedSignal, p as prepareSignalEmail } from "./repeats-BL7ZC-_6-
|
|
2
|
-
import { T as bareAddress, Vn as listSentEmails, ar as sendEmail, bt as successfulSendOutcome, en as createEndpoint, it as classifySendError, o as extractErrorPayload, vn as getEmail } from "./api-command-
|
|
1
|
+
import { h as sendPreparedSignal, p as prepareSignalEmail } from "./repeats-BL7ZC-_6-BZ-MphTV.js";
|
|
2
|
+
import { T as bareAddress, Vn as listSentEmails, ar as sendEmail, bt as successfulSendOutcome, en as createEndpoint, it as classifySendError, o as extractErrorPayload, vn as getEmail } from "./api-command-D7DPn2Ro.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
|
-
import { a as scopedChatSenderTrust, i as readBeforeDeadline, n as isPlainChatReply } from "./scoped-chat-
|
|
4
|
+
import { a as scopedChatSenderTrust, i as readBeforeDeadline, n as isPlainChatReply } from "./scoped-chat-Dsark9hm.js";
|
|
5
5
|
import { n as tryOwnSharedMail, r as waitForSharedMailChange, t as readSharedMailOwner } from "./shared-mail-watch-DtKpsgg8.js";
|
|
6
6
|
import { recordSentSignal } from "./oclif/auto-signals.js";
|
|
7
7
|
import { Errors } from "@oclif/core";
|
|
@@ -9,7 +9,7 @@ import { opendirSync } from "node:fs";
|
|
|
9
9
|
import { createHash, randomUUID, scryptSync } from "node:crypto";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
12
|
-
//#region ../sdk-node/dist/api-
|
|
12
|
+
//#region ../sdk-node/dist/api-Dgfcji86.js
|
|
13
13
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
14
14
|
function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
|
|
15
15
|
let lastEventId;
|
|
@@ -158,6 +158,12 @@ line or check result names.
|
|
|
158
158
|
are responding to, and address each message they sent since your last
|
|
159
159
|
reply; never send a generic status that ignores their question. See
|
|
160
160
|
[Answer the latest message](references/conversations.md#answer-the-latest-message).
|
|
161
|
+
When the message has other To or Cc recipients, add `--all` so everyone on
|
|
162
|
+
it stays on it; a plain reply goes to the sender only. Never drop
|
|
163
|
+
recipients silently: if a reply is deliberately private, say so in it.
|
|
164
|
+
Continue an existing discussion in its thread rather than with a new
|
|
165
|
+
`primitive send`; see
|
|
166
|
+
[Keep one discussion in one thread](references/conversations.md#keep-one-discussion-in-one-thread).
|
|
161
167
|
Send `primitive signal typing --id <id>` just before composing a longer
|
|
162
168
|
answer. If you pause on a request from anyone other than your owner (to
|
|
163
169
|
ask your owner, or to wait on something else), or decide not to act on
|