primcli 3.0.0-preview.27 → 3.0.0-preview.28
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-B-nuABGm.js → api-command-DSfZl8fj.js} +62 -1
- package/dist/{machine-session-1utuweTi.js → machine-session-Bh5Bh4tf.js} +2 -2
- package/dist/{notify-session-CM4_ZYe9.js → notify-session-qbfowlNN.js} +1 -1
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/index.js +38 -10
- package/dist/oclif/receiver-heal.js +1 -1
- package/dist/{signal-command-D4ZIidPX.js → signal-command-DvIH9E_B.js} +1 -1
- package/package.json +1 -1
|
@@ -1068,6 +1068,16 @@ const operationManifest = [
|
|
|
1068
1068
|
"maxLength": 255,
|
|
1069
1069
|
"pattern": "^[!-~]{1,255}$"
|
|
1070
1070
|
},
|
|
1071
|
+
"if_absent": {
|
|
1072
|
+
"type": "boolean",
|
|
1073
|
+
"description": "When true with idempotency_key, atomically claim work only if no active or completed activity exists for this actor and key (takes over expired started claims; otherwise returns 409 with error.details.activity)."
|
|
1074
|
+
},
|
|
1075
|
+
"claim_ttl_seconds": {
|
|
1076
|
+
"type": "integer",
|
|
1077
|
+
"minimum": 1,
|
|
1078
|
+
"maximum": 86400,
|
|
1079
|
+
"description": "Optional lease duration in seconds (1 to 86400) for status started claims."
|
|
1080
|
+
},
|
|
1071
1081
|
"visibility": {
|
|
1072
1082
|
"type": "string",
|
|
1073
1083
|
"enum": ["thread", "actor_only"],
|
|
@@ -1291,6 +1301,11 @@ const operationManifest = [
|
|
|
1291
1301
|
"type": ["string", "null"],
|
|
1292
1302
|
"format": "date-time"
|
|
1293
1303
|
},
|
|
1304
|
+
"claim_expires_at": {
|
|
1305
|
+
"type": ["string", "null"],
|
|
1306
|
+
"format": "date-time",
|
|
1307
|
+
"description": "Optional expiry timestamp for an active started claim lease."
|
|
1308
|
+
},
|
|
1294
1309
|
"updated_by": { "oneOf": [{
|
|
1295
1310
|
"type": "object",
|
|
1296
1311
|
"additionalProperties": false,
|
|
@@ -1456,6 +1471,16 @@ const operationManifest = [
|
|
|
1456
1471
|
"maxLength": 255,
|
|
1457
1472
|
"pattern": "^[!-~]{1,255}$"
|
|
1458
1473
|
},
|
|
1474
|
+
"if_absent": {
|
|
1475
|
+
"type": "boolean",
|
|
1476
|
+
"description": "When true with idempotency_key, atomically claim work only if no active or completed activity exists for this actor and key (takes over expired started claims; otherwise returns 409 with error.details.activity)."
|
|
1477
|
+
},
|
|
1478
|
+
"claim_ttl_seconds": {
|
|
1479
|
+
"type": "integer",
|
|
1480
|
+
"minimum": 1,
|
|
1481
|
+
"maximum": 86400,
|
|
1482
|
+
"description": "Optional lease duration in seconds (1 to 86400) for status started claims."
|
|
1483
|
+
},
|
|
1459
1484
|
"visibility": {
|
|
1460
1485
|
"type": "string",
|
|
1461
1486
|
"enum": ["thread", "actor_only"],
|
|
@@ -1679,6 +1704,11 @@ const operationManifest = [
|
|
|
1679
1704
|
"type": ["string", "null"],
|
|
1680
1705
|
"format": "date-time"
|
|
1681
1706
|
},
|
|
1707
|
+
"claim_expires_at": {
|
|
1708
|
+
"type": ["string", "null"],
|
|
1709
|
+
"format": "date-time",
|
|
1710
|
+
"description": "Optional expiry timestamp for an active started claim lease."
|
|
1711
|
+
},
|
|
1682
1712
|
"updated_by": { "oneOf": [{
|
|
1683
1713
|
"type": "object",
|
|
1684
1714
|
"additionalProperties": false,
|
|
@@ -2167,6 +2197,11 @@ const operationManifest = [
|
|
|
2167
2197
|
"type": ["string", "null"],
|
|
2168
2198
|
"format": "date-time"
|
|
2169
2199
|
},
|
|
2200
|
+
"claim_expires_at": {
|
|
2201
|
+
"type": ["string", "null"],
|
|
2202
|
+
"format": "date-time",
|
|
2203
|
+
"description": "Optional expiry timestamp for an active started claim lease."
|
|
2204
|
+
},
|
|
2170
2205
|
"updated_by": { "oneOf": [{
|
|
2171
2206
|
"type": "object",
|
|
2172
2207
|
"additionalProperties": false,
|
|
@@ -3082,6 +3117,11 @@ const operationManifest = [
|
|
|
3082
3117
|
"type": ["string", "null"],
|
|
3083
3118
|
"format": "date-time"
|
|
3084
3119
|
},
|
|
3120
|
+
"claim_expires_at": {
|
|
3121
|
+
"type": ["string", "null"],
|
|
3122
|
+
"format": "date-time",
|
|
3123
|
+
"description": "Optional expiry timestamp for an active started claim lease."
|
|
3124
|
+
},
|
|
3085
3125
|
"updated_by": { "oneOf": [{
|
|
3086
3126
|
"type": "object",
|
|
3087
3127
|
"additionalProperties": false,
|
|
@@ -3229,6 +3269,17 @@ const operationManifest = [
|
|
|
3229
3269
|
"type": "string",
|
|
3230
3270
|
"enum": ["thread", "actor_only"],
|
|
3231
3271
|
"description": "Visibility of a thread activity (`thread` is shared with scoped readers; `actor_only` is private to the creating actor unless an auditor passes `include_private=true`)."
|
|
3272
|
+
},
|
|
3273
|
+
"claim_ttl_seconds": {
|
|
3274
|
+
"type": ["integer", "null"],
|
|
3275
|
+
"minimum": 1,
|
|
3276
|
+
"maximum": 86400,
|
|
3277
|
+
"description": "Optional lease duration in seconds (1 to 86400) when status is started (null clears)."
|
|
3278
|
+
},
|
|
3279
|
+
"if_revision": {
|
|
3280
|
+
"type": "integer",
|
|
3281
|
+
"minimum": 1,
|
|
3282
|
+
"description": "Expected current revision for compare-and-set updates (returns 409 with error.details.activity on mismatch)."
|
|
3232
3283
|
}
|
|
3233
3284
|
}
|
|
3234
3285
|
},
|
|
@@ -3447,6 +3498,11 @@ const operationManifest = [
|
|
|
3447
3498
|
"type": ["string", "null"],
|
|
3448
3499
|
"format": "date-time"
|
|
3449
3500
|
},
|
|
3501
|
+
"claim_expires_at": {
|
|
3502
|
+
"type": ["string", "null"],
|
|
3503
|
+
"format": "date-time",
|
|
3504
|
+
"description": "Optional expiry timestamp for an active started claim lease."
|
|
3505
|
+
},
|
|
3450
3506
|
"updated_by": { "oneOf": [{
|
|
3451
3507
|
"type": "object",
|
|
3452
3508
|
"additionalProperties": false,
|
|
@@ -28394,6 +28450,11 @@ const operationManifest = [
|
|
|
28394
28450
|
"type": ["string", "null"],
|
|
28395
28451
|
"format": "date-time"
|
|
28396
28452
|
},
|
|
28453
|
+
"claim_expires_at": {
|
|
28454
|
+
"type": ["string", "null"],
|
|
28455
|
+
"format": "date-time",
|
|
28456
|
+
"description": "Optional expiry timestamp for an active started claim lease."
|
|
28457
|
+
},
|
|
28397
28458
|
"updated_by": { "oneOf": [{
|
|
28398
28459
|
"type": "object",
|
|
28399
28460
|
"additionalProperties": false,
|
|
@@ -62599,7 +62660,7 @@ function savedConnectedProfiles(configDir, exclude) {
|
|
|
62599
62660
|
*/
|
|
62600
62661
|
async function otherProfiles(configDir, session, current) {
|
|
62601
62662
|
if (session) try {
|
|
62602
|
-
const { connectedProfilesForSession } = await import("./machine-session-
|
|
62663
|
+
const { connectedProfilesForSession } = await import("./machine-session-Bh5Bh4tf.js").then((n) => n.s);
|
|
62603
62664
|
return {
|
|
62604
62665
|
inSession: true,
|
|
62605
62666
|
profiles: connectedProfilesForSession(configDir, session, current)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { B as agentProfileDirectory, G as loadConnectedAgentProfile, H as agentProfilesDirectory, J as profileAlreadyConnectedMessage, K as parseConnectedAgentProfile, R as AGENT_PROFILE_ENV, S as loadCliCredentials, U as connectedAgentIdentity, V as agentProfileName, W as connectedApiBaseUrl, X as saveConnectedAgentProfile, dt as detectAgentRuntime, mt as PrimitiveApiClient, q as parseOwnerMemberAddress, z as AgentConnectionSetupError } from "./cli-config-CwZJQIcn.js";
|
|
2
2
|
import { An as putAgentContact, Ft as getContact, Gn as sendEmail, Hn as searchEmails, Mn as putContact, Pt as getAgentContactPolicy, St as deleteContact, an as listAgentContacts, fr as __exportAll, in as listAgentConnections, jn as putAgentContactPolicy, sn as listContacts, tn as inviteAgentConnection, un as listDomains, wn as listSentEmails, xt as deleteAgentContact, zt as getEmail } from "./repeats-Dj_o6c-X-CK1wU9lP.js";
|
|
3
|
-
import { At as cliInvocation, Cn as refuseOrgSelectionForProfile, Mt as defaultConnectionName, Sn as refreshStoredCliCredentials } from "./api-command-
|
|
3
|
+
import { At as cliInvocation, Cn as refuseOrgSelectionForProfile, Mt as defaultConnectionName, Sn as refreshStoredCliCredentials } from "./api-command-DSfZl8fj.js";
|
|
4
4
|
import { _ as acquireListenLock, b as listenLockHeld, c as mailTime, d as readMailJson, f as removeMailFile, g as ListenStateError, h as writeMailJson, i as mailId, l as privateMailDirectory, o as mailObject, p as syncMailDirectory, r as mailAddress, s as mailString } from "./shared-mail-files-BAQSGxxz.js";
|
|
5
|
-
import { a as NotificationRetryError, d as SESSION_UUID, f as connectNativeSession, m as NativeSessionDisconnectedError, p as defaultSessionSocket, t as notificationScope, w as readBundledConnectSkill, x as installSkill } from "./notify-session-
|
|
5
|
+
import { a as NotificationRetryError, d as SESSION_UUID, f as connectNativeSession, m as NativeSessionDisconnectedError, p as defaultSessionSocket, t as notificationScope, w as readBundledConnectSkill, x as installSkill } from "./notify-session-qbfowlNN.js";
|
|
6
6
|
import { a as backgroundListenStatus, d as stopBackgroundListen } from "./listen-background-DyBYca28.js";
|
|
7
7
|
import { t as readSharedMailOwner } from "./shared-mail-watch-DdtgJOrV.js";
|
|
8
8
|
import { withoutOrgSelection } from "./oclif/global-org-flag.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, kt as downloadEmailAttachmentPart, v as parseWebhookEvent } from "./repeats-Dj_o6c-X-CK1wU9lP.js";
|
|
2
|
-
import { B as wakeReadCommand, tt as wakeInteractionSentence, z as skillFirstLine } from "./api-command-
|
|
2
|
+
import { B as wakeReadCommand, tt as wakeInteractionSentence, z as skillFirstLine } from "./api-command-DSfZl8fj.js";
|
|
3
3
|
import { _ as acquireListenLock, g as ListenStateError, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
|
|
4
4
|
import { closeSync, copyFileSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, opendirSync, readFileSync, readdirSync, readlinkSync, renameSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { createHash, randomUUID, scryptSync } from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Qt as getSentEmail } from "../repeats-Dj_o6c-X-CK1wU9lP.js";
|
|
2
|
-
import { F as readThreadContext, yn as createAuthenticatedCliApiClient } from "../api-command-
|
|
2
|
+
import { F as readThreadContext, yn as createAuthenticatedCliApiClient } from "../api-command-DSfZl8fj.js";
|
|
3
3
|
import { AUTO_SIGNAL_KIND_ENV, AUTO_WORKING_RENEW_MS, autoSignalsDisabled, clearWorkingSending, markWorkingSending, readAutoClaim, readWorkingLease, recordRenewer, stopWorkingLease, writeWorkingLease } from "./auto-signals.js";
|
|
4
4
|
import { _ as acquireListenLock } from "../shared-mail-files-BAQSGxxz.js";
|
|
5
|
-
import { t as sendSignal } from "../signal-command-
|
|
5
|
+
import { t as sendSignal } from "../signal-command-DvIH9E_B.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { homedir } from "node:os";
|
|
8
8
|
// src/oclif/auto-signal-worker.ts
|
package/dist/oclif/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { $ as replyExpectation, $t as readDomainsOrRefusal, A as bareAddress, An as fetchCliOrgs, At as cliInvocation, B as wakeReadCommand, Bn as operationManifest, Bt as NO_FOCUS, C as terminalApprovalIo, Cn as refuseOrgSelectionForProfile, Ct as sendOutcomeExitCode, D as listenForCopyHotkey, Dn as RESTRICTED_ROLE_NOTE, Dt as successfulSendOutcome, E as formatBrowserLoginInstructions, En as CliOrgRefusedError, Et as serializeErrorPayload, F as readThreadContext, Fn as switchCurrentOrg, Ft as loadSkillLine, G as clearReadPendingMail, Gn as validateActivityReason, Gt as focusForCorpus, H as wakeRelationship, Hn as PRIMITIVE_RUN_ID_HEADER, Ht as focusEmptyHint, I as sentInThread, In as routeWarningLines, It as currentMailSessionKey, J as recordPendingMail, Jt as loadSavedFocus, K as pendingMailPath, Kn as validateActivityRunId, Kt as focusProfile, L as serverMuted, Ln as sanitizeForTerminal, Lt as formatAlreadySentNotice, M as displayAddress, Mn as revokeUserLogin, N as formatMailWakeLine, Nn as roleKeyLabel, Nt as generatedAgentName, O as openBrowser, On as credentialsFromUserLogin, Ot as thrownErrorExitCode, P as latestOwnOutbound, Pn as roleKeyText, Pt as identitySuggestions, Q as readEmailInteraction, Qt as queryScopesItself, R as serverRelationship, Rn as shownLine, Rt as FOCUS_ENV, S as promptLine$2, Sn as refreshStoredCliCredentials, St as sendIdentityFields, T as canOfferCopyHotkey, Tn as selectedOrgFromEnv, Tt as sentHistoryWindowStart, U as claimPendingMail, Un as attachActivityContextFlags, Ut as focusFlagValues, V as wakeRecipientField, Vn as PRIMITIVE_REASON_HEADER, Vt as countFromMeta, W as clearConsumedPendingMail, Wn as cliActivityHeadersFromEnv, Wt as focusFlags, X as interactionHumanLine, Xt as normalizeDomainNames, Y as removePendingMail, Yt as manyDomainsSupported, Z as interactionNextActions, Zt as oneDomainAtATimeError, _ as writeErrorWithHints, _n as ConnectedAgentKeyRequiredError, _t as formatSendFailureSummary, a as agentPassErrorHint, an as writeFocusLine, at as apiResultHttpStatus, b as STEP_UP_TOKEN_FLAG_DESCRIPTION, bn as createCliApiClient, bt as reportSendCommandResult, c as extractErrorPayload, cn as mailReach, ct as buildThrownSendFailureEnvelope, d as isGrantRefusal, dn as isEmailId, dt as deriveSendIdempotencyKey, en as resolveDomainNames, et as replyInteractionWarning, f as networkErrorHint, fn as fetchBoundedPages, ft as excludeSignalReplies, g as surfaceUnauthorizedHint, gn as withAttachmentWait, gt as formatPriorRepliesWarning, h as runWithTiming, hn as ATTACHMENT_WAIT_MAX_MS, ht as formatPriorRepliesCheckSkipped, i as TIME_FLAG_DESCRIPTION, in as withoutFocus, it as SEND_OUTCOME_HELP, j as describeWake, jn as isBuiltInRoleKey, jt as connectNextSteps, k as explainPendingMailNotFound, kn as displayedRoleKey, l as formatErrorPayload, ln as readCallerMailFor, lt as checkPriorReplies, m as refusesCredential, mn as ATTACHMENT_WAIT_FLAG_DESCRIPTION, mt as formatDeletedEarlierSendNotice, n as API_ERROR_CODES, nn as saveFocus, nt as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, o as createOperationCommand, on as withFlagSuggestion, ot as assertValidIdempotencyKey, p as readTextFileFlag, pn as withBooleanFlagValues, pt as followUpCommandPrefix, q as readPendingMail, qt as joinNames, r as PAGED_LIMIT_MAX, rn as withFocusMeta, rt as MAX_SEND_WAIT_TIMEOUT_MS, s as extractErrorCode, sn as emptyEmailListHint, st as buildFollowUpCommand, t as API_BASE_URL_FLAG_DESCRIPTION, tn as resolveFocus, u as hasControlCharacter$1, un as formatFact, ut as classifySendError, v as BROWSER_FLAG_DESCRIPTION, vt as formatSendRecordFailureSummary, w as withApproval, wn as resolveCliApiRequestConfig, wt as sendWaitClampNotice, x as approveThenRerunHint, xn as mergeHeadersCaseInsensitive, xt as sendErrorMessage, y as STEP_UP_HEADER$1, yn as createAuthenticatedCliApiClient, yt as priorRepliesThatWentOut, zn as setKnownCommands, zt as FOCUS_SERVER_SUPPORT } from "../api-command-
|
|
1
|
+
import { $ as replyExpectation, $t as readDomainsOrRefusal, A as bareAddress, An as fetchCliOrgs, At as cliInvocation, B as wakeReadCommand, Bn as operationManifest, Bt as NO_FOCUS, C as terminalApprovalIo, Cn as refuseOrgSelectionForProfile, Ct as sendOutcomeExitCode, D as listenForCopyHotkey, Dn as RESTRICTED_ROLE_NOTE, Dt as successfulSendOutcome, E as formatBrowserLoginInstructions, En as CliOrgRefusedError, Et as serializeErrorPayload, F as readThreadContext, Fn as switchCurrentOrg, Ft as loadSkillLine, G as clearReadPendingMail, Gn as validateActivityReason, Gt as focusForCorpus, H as wakeRelationship, Hn as PRIMITIVE_RUN_ID_HEADER, Ht as focusEmptyHint, I as sentInThread, In as routeWarningLines, It as currentMailSessionKey, J as recordPendingMail, Jt as loadSavedFocus, K as pendingMailPath, Kn as validateActivityRunId, Kt as focusProfile, L as serverMuted, Ln as sanitizeForTerminal, Lt as formatAlreadySentNotice, M as displayAddress, Mn as revokeUserLogin, N as formatMailWakeLine, Nn as roleKeyLabel, Nt as generatedAgentName, O as openBrowser, On as credentialsFromUserLogin, Ot as thrownErrorExitCode, P as latestOwnOutbound, Pn as roleKeyText, Pt as identitySuggestions, Q as readEmailInteraction, Qt as queryScopesItself, R as serverRelationship, Rn as shownLine, Rt as FOCUS_ENV, S as promptLine$2, Sn as refreshStoredCliCredentials, St as sendIdentityFields, T as canOfferCopyHotkey, Tn as selectedOrgFromEnv, Tt as sentHistoryWindowStart, U as claimPendingMail, Un as attachActivityContextFlags, Ut as focusFlagValues, V as wakeRecipientField, Vn as PRIMITIVE_REASON_HEADER, Vt as countFromMeta, W as clearConsumedPendingMail, Wn as cliActivityHeadersFromEnv, Wt as focusFlags, X as interactionHumanLine, Xt as normalizeDomainNames, Y as removePendingMail, Yt as manyDomainsSupported, Z as interactionNextActions, Zt as oneDomainAtATimeError, _ as writeErrorWithHints, _n as ConnectedAgentKeyRequiredError, _t as formatSendFailureSummary, a as agentPassErrorHint, an as writeFocusLine, at as apiResultHttpStatus, b as STEP_UP_TOKEN_FLAG_DESCRIPTION, bn as createCliApiClient, bt as reportSendCommandResult, c as extractErrorPayload, cn as mailReach, ct as buildThrownSendFailureEnvelope, d as isGrantRefusal, dn as isEmailId, dt as deriveSendIdempotencyKey, en as resolveDomainNames, et as replyInteractionWarning, f as networkErrorHint, fn as fetchBoundedPages, ft as excludeSignalReplies, g as surfaceUnauthorizedHint, gn as withAttachmentWait, gt as formatPriorRepliesWarning, h as runWithTiming, hn as ATTACHMENT_WAIT_MAX_MS, ht as formatPriorRepliesCheckSkipped, i as TIME_FLAG_DESCRIPTION, in as withoutFocus, it as SEND_OUTCOME_HELP, j as describeWake, jn as isBuiltInRoleKey, jt as connectNextSteps, k as explainPendingMailNotFound, kn as displayedRoleKey, l as formatErrorPayload, ln as readCallerMailFor, lt as checkPriorReplies, m as refusesCredential, mn as ATTACHMENT_WAIT_FLAG_DESCRIPTION, mt as formatDeletedEarlierSendNotice, n as API_ERROR_CODES, nn as saveFocus, nt as IDEMPOTENCY_KEY_FLAG_DESCRIPTION, o as createOperationCommand, on as withFlagSuggestion, ot as assertValidIdempotencyKey, p as readTextFileFlag, pn as withBooleanFlagValues, pt as followUpCommandPrefix, q as readPendingMail, qt as joinNames, r as PAGED_LIMIT_MAX, rn as withFocusMeta, rt as MAX_SEND_WAIT_TIMEOUT_MS, s as extractErrorCode, sn as emptyEmailListHint, st as buildFollowUpCommand, t as API_BASE_URL_FLAG_DESCRIPTION, tn as resolveFocus, u as hasControlCharacter$1, un as formatFact, ut as classifySendError, v as BROWSER_FLAG_DESCRIPTION, vt as formatSendRecordFailureSummary, w as withApproval, wn as resolveCliApiRequestConfig, wt as sendWaitClampNotice, x as approveThenRerunHint, xn as mergeHeadersCaseInsensitive, xt as sendErrorMessage, y as STEP_UP_HEADER$1, yn as createAuthenticatedCliApiClient, yt as priorRepliesThatWentOut, zn as setKnownCommands, zt as FOCUS_SERVER_SUPPORT } from "../api-command-DSfZl8fj.js";
|
|
2
2
|
import { a as canonicalCommandId, c as operationCommandId, i as canonicalCliText, l as retiredCommandTarget, n as COMMAND_RENAMES, o as canonicalCommands, s as canonicalOperation, t as COMMAND_PAIR_RENAMES } from "../cli-command-names-no0f7d7s.js";
|
|
3
3
|
import { ignoreArgumentStdin } from "./command-stdin.js";
|
|
4
4
|
import { a as runStreamingJson, i as jsonOutputRequested, n as captureOutput, o as thrownErrorBody, r as guardJsonOutputCommands, t as JSON_OUTPUT_FLAG } from "../json-output-BMZrLH47.js";
|
|
5
5
|
import { $ as AUTOMATED_VALUES, $n as stopRepeatFromEmail, $t as getThread, A as collectNewAcceptedEmails, At as downloadSentAttachmentArchiveMember, B as REPLY_STATE_UNSUPPORTED_CODE, Bn as runWakeSchedule, Cn as listSentAttachmentArchiveMembers, Ct as deleteMemory, D as transientFailure, Dn as listWakeSchedules, Dt as downloadEmailAttachmentArchiveMember, E as retryingOperation, En as listWakeDispatches, Et as deleteWakeSchedule, F as lateMailReread, Fn as reorderRoutes, G as formatAwaitingCell, Gn as sendEmail, Gt as getKey, H as assertAwaitingFilterRows, Hn as searchEmails, Ht as getFunctionRouting, I as sinceFromFlags, In as replyToEmail, It as getConversation, J as isAwaitingRejectedError, Jn as setMemory, Jt as getOutboundStatus, K as formatRepliesCell, Kn as setFunctionRoute, Kt as getMemory, L as sleep$3, Ln as resendAgentSignupVerification, Lt as getCreditBalance, M as encodeReceivedAtSearchCursor, Mt as getAccessMode, N as fetchEmailSearchPage, Nn as redeemCreditCode, Nt as getAccount, O as waitOutRetryAfter, On as pollCliLogin, Ot as downloadEmailAttachmentByFilename, P as filtersFromFlags, Pn as removeDefaultNetworkMember, Pt as getAgentContactPolicy, Q as AUTOMATED_FLAG_DESCRIPTION, Qn as startCliLogin, Qt as getSentEmail, R as AWAITING_FLAG_DESCRIPTION, Rn as revokeCredential, Rt as getDefaultNetworkAgent, S as describeApiFailure, Sn as listRoutes, T as retryTransient, Tn as listWakeAuthorizations, Tt as deleteWakeAuthorization, U as awaitingRejectedError, Un as searchMemories, Ut as getFunctionTestRunTrace, V as ReplyStateUnsupportedError, Vt as getFunction, W as ensureSearchReportsReplyState, Wn as semanticSearch, Wt as getInboxStatus, Xn as startAgentClaim, Xt as getRepeatingSend, Y as queryUsesAwaiting, Yn as simulateRoute, Yt as getOwnGrant, Z as AUTOMATED_FILTER_UNSUPPORTED_CODE, Zn as startAgentSignup, Zt as getSendFrom, _n as listKeys, _t as createKey, a as REPEAT_IDLE_MAX_MINUTES, an as listAgentContacts, ar as updateRepeatingSend, b as WaitDeadlineReached, bn as listRepeatingSends, bt as createWakeSchedule, cn as listDefaultNetworkAgents, cr as updateWakeSchedule, ct as addDefaultNetworkMember, d as parseRepeatTick, dn as listEmailAttachmentArchiveMembers, dr as whoami, dt as checkDefaultNetworkContactAdmission, en as getWakeSchedule, er as testFunction, et as AutomatedFilterUnsupportedError, f as preparePresenceAliveEmail, fn as listEmails, ft as checkSendability, g as isEmailReceivedEvent, gn as listGroups, gt as createFunction, hn as listFunctions, ht as createEndpoint, i as REPEAT_EVERY_MAX_MINUTES, ir as updateKey, j as cursorFromAcceptedRows, jt as downloadSentAttachmentByFilename, k as SINCE_VALUE_HELP, kn as pullWebhookEvent, l as parseInteractionEnvelope, ln as listDefaultNetworkMembers, lr as verifyAgentClaim, lt as cancelSentEmail, m as repeatStopCommand, mn as listFunctionLogs, mt as completeWebhookEvent, nn as leaveOrganization, nr as updateDefaultNetworkMember, nt as automatedRejectedError, o as REPEAT_MAX_SENDS_MAX, on as listAgentNetworks, or as updateRoute, ot as hasAutomatedVerdict, p as prepareSignalEmail, pn as listEndpoints, pt as cliLogout, q as hasReplyState, qn as setFunctionSecret, qt as getOrgRoutingTopology, rn as listActivityObjects, rr as updateFunction, s as buildRepeatStopBody, sr as updateWakeAuthorization, st as isAutomatedRejectedError, tr as unsetFunctionRoute, tt as assertAutomatedVerdict, u as parsePresenceEnvelope, un as listDomains, ur as verifyAgentSignup, ut as cancelSentEmailByIdempotencyKey, v as parseWebhookEvent, vn as listMailboxAccess, vt as createRoute, w as pauseForTransientFailure, wn as listSentEmails, wt as deleteRoute, x as backoffDelay, xn as listRoles, y as parseFromHeader, yn as listOrganizationPeople, yt as createWakeAuthorization, z as AWAITING_VALUES, zn as rotateKey, zt as getEmail } from "../repeats-Dj_o6c-X-CK1wU9lP.js";
|
|
6
|
-
import { C as installedVersion, S as installedConnectSkillFile, T as readBundledSkill, _ as NotificationOutcomeUnknownError, a as NotificationRetryError, b as connectSkillTarget, c as readConversationStatusContent, d as SESSION_UUID$1, g as NativeSessionNotLoadedError, h as NativeSessionError, i as notificationReceiptPage, l as createListenHandler, m as NativeSessionDisconnectedError, n as notificationSenders, o as isRoutineNotificationContent, p as defaultSessionSocket, r as openSessionNotifications, s as notificationPartReader, t as notificationScope, u as readableDelivery, v as CONNECT_SKILL_NAME, w as readBundledConnectSkill, x as installSkill, y as bundledSkillNames } from "../notify-session-
|
|
6
|
+
import { C as installedVersion, S as installedConnectSkillFile, T as readBundledSkill, _ as NotificationOutcomeUnknownError, a as NotificationRetryError, b as connectSkillTarget, c as readConversationStatusContent, d as SESSION_UUID$1, g as NativeSessionNotLoadedError, h as NativeSessionError, i as notificationReceiptPage, l as createListenHandler, m as NativeSessionDisconnectedError, n as notificationSenders, o as isRoutineNotificationContent, p as defaultSessionSocket, r as openSessionNotifications, s as notificationPartReader, t as notificationScope, u as readableDelivery, v as CONNECT_SKILL_NAME, w as readBundledConnectSkill, x as installSkill, y as bundledSkillNames } from "../notify-session-qbfowlNN.js";
|
|
7
7
|
import { $ as agentPassMetadata, A as removeCliLockState, B as agentProfileDirectory, D as CliAuthLockedError, E as saveSignupCredentials, F as loadChatConversationByLocalId, G as loadConnectedAgentProfile, H as agentProfilesDirectory, I as saveActiveChatState, L as AGENT_ADDRESS_ENV, M as chatStatePath, N as deleteChatState, O as parseUnlockDurationSeconds, P as loadActiveChatState, Q as AgentPassAuthError, R as AGENT_PROFILE_ENV, S as loadCliCredentials, T as saveCliCredentials, V as agentProfileName, Y as requireDefaultLoginProfile, Z as AGENT_PASS_PROFILE_ENV, _ as credentialsPath, a as normalizeCliEnvironmentName, at as parseAccessPassInput, b as detectPrimitiveKeyEnvMisname, c as removeCliEnvironment, ct as revokeAccessPassRemote, d as upsertCliEnvironment, dt as detectAgentRuntime, et as agentPassTokenSha256, ft as detectRuntimeSession, g as credentialsLockPath, h as cliAccessTokenExpiresAt, i as loadCliConfig, it as loadCachedAgentPassByToken, j as writeCliLockState, k as readCliLockState, l as resolveConfigEnvironment, lt as saveAgentPass, m as acquireCliCredentialsLock, mt as PrimitiveApiClient, n as deleteCliConfig, nt as deleteAgentPass, o as parseHeaderAssignment, ot as readAgentPassFile, pt as runtimeSessionVariableList, r as emptyCliConfig, s as redactCliEnvironment, st as resolveAgentPassSlot, tt as claimAccessPassRemote, u as saveCliConfig, ut as syncAgentPassMetadataFromGrant, v as deleteCliCredentials, w as resolveCliAuth, x as hasStoredCliLogin, y as deleteCliCredentialsLock, z as AgentConnectionSetupError } from "../cli-config-CwZJQIcn.js";
|
|
8
8
|
import { C as resolveListenSubscription, S as normalizeListenOrigin, _ 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, y as listenIdentity } from "../shared-mail-files-BAQSGxxz.js";
|
|
9
|
-
import { $ as saveConnectionName, A as ContactPolicyReadRetryError, B as AddressNotesApiError, C as RECEIVER_MODES, Ct as upsertManagedBlock, D as registrationSummary, Dt as refreshOwnerMemberAddressPeriodically, E as failedSessionRegistration, Et as addSessionReceiver, F as canonicalContactSelector, G as contactAgentAddress, H as runAddressNotesRequest, I as AgentDisconnectError, J as agentInvitationHash, K as runContactRequest, L as claimOverRevokedSetup, M as NetworkAdmissionPendingError, N as createNotificationContactPolicy, O as registrationSummaryLine, Ot as withOwnerMemberAddress, P as evaluateContactPolicy, Q as refusalAfterReplacement, R as clearRevokedAddresses, S as runAgentConnect, St as readManagedFile, T as verificationReplySubmitted, Tt as readHookLauncherWarning, U as ContactsApiError, V as addressNoteTarget, W as contactAddress, X as readAgentInvitation, Y as connectAgent, Z as receiverStatusCommand, _ as enrollmentResumes, _t as samePath, a as endSession, at as boundSessionProfiles, b as invitationProfileName, bt as inspectManagedBlock, c as pendingSessionDisconnects, ct as describeSessionHookChange, d as registerSession, dt as ephemeralCliReason, et as savedReceiver, f as retryPendingDisconnects, ft as findOnPath, g as enrollAgent, gt as repairClaudeHooks, h as staleSessionAgents, ht as readClaudeSettings, i as connectedProfilesForSession, it as recordHookMailCheck, j as NETWORK_ADMISSION_PENDING_RETRY_MS, k as waitForRegistrations, l as psProcessInfo, lt as describeSessionHookItem, m as runDetached, mt as inspectClaudeHooks, n as OMP_MAIN, nt as releaseRegistrationsForProfile, o as headlessClaudeRun, ot as claudeConfigDir, p as revokeStaleSessionAgents, pt as hasMachineSessionHooks, q as agentConnectionStatus, r as agentConnectionState, rt as installClaudeWakeHook, st as currentCliLocation, t as HOOK_END_GRACE_MS, tt as MACHINE_RUNTIMES, u as readClaudeHookInput, ut as ensureHookLauncher, v as connectWarnings, vt as writeClaudeSettings, w as externalReceivingState, wt as writeManagedFile, x as pollCheckCommand, xt as jsonIndentation, y as defaultAgentProfileName, yt as MachineFileError, z as disconnectAgent } from "../machine-session-
|
|
9
|
+
import { $ as saveConnectionName, A as ContactPolicyReadRetryError, B as AddressNotesApiError, C as RECEIVER_MODES, Ct as upsertManagedBlock, D as registrationSummary, Dt as refreshOwnerMemberAddressPeriodically, E as failedSessionRegistration, Et as addSessionReceiver, F as canonicalContactSelector, G as contactAgentAddress, H as runAddressNotesRequest, I as AgentDisconnectError, J as agentInvitationHash, K as runContactRequest, L as claimOverRevokedSetup, M as NetworkAdmissionPendingError, N as createNotificationContactPolicy, O as registrationSummaryLine, Ot as withOwnerMemberAddress, P as evaluateContactPolicy, Q as refusalAfterReplacement, R as clearRevokedAddresses, S as runAgentConnect, St as readManagedFile, T as verificationReplySubmitted, Tt as readHookLauncherWarning, U as ContactsApiError, V as addressNoteTarget, W as contactAddress, X as readAgentInvitation, Y as connectAgent, Z as receiverStatusCommand, _ as enrollmentResumes, _t as samePath, a as endSession, at as boundSessionProfiles, b as invitationProfileName, bt as inspectManagedBlock, c as pendingSessionDisconnects, ct as describeSessionHookChange, d as registerSession, dt as ephemeralCliReason, et as savedReceiver, f as retryPendingDisconnects, ft as findOnPath, g as enrollAgent, gt as repairClaudeHooks, h as staleSessionAgents, ht as readClaudeSettings, i as connectedProfilesForSession, it as recordHookMailCheck, j as NETWORK_ADMISSION_PENDING_RETRY_MS, k as waitForRegistrations, l as psProcessInfo, lt as describeSessionHookItem, m as runDetached, mt as inspectClaudeHooks, n as OMP_MAIN, nt as releaseRegistrationsForProfile, o as headlessClaudeRun, ot as claudeConfigDir, p as revokeStaleSessionAgents, pt as hasMachineSessionHooks, q as agentConnectionStatus, r as agentConnectionState, rt as installClaudeWakeHook, st as currentCliLocation, t as HOOK_END_GRACE_MS, tt as MACHINE_RUNTIMES, u as readClaudeHookInput, ut as ensureHookLauncher, v as connectWarnings, vt as writeClaudeSettings, w as externalReceivingState, wt as writeManagedFile, x as pollCheckCommand, xt as jsonIndentation, y as defaultAgentProfileName, yt as MachineFileError, z as disconnectAgent } from "../machine-session-Bh5Bh4tf.js";
|
|
10
10
|
import { a as readBeforeDeadline, c as readPresenceProjection, i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust, r as isScopedChatReply, s as presenceDisposition, t as isConnectedChatCredential } from "../scoped-chat-DN0qj4AY.js";
|
|
11
11
|
import { autoSignalEligible, dispatchAutoRead, dispatchAutoWorking, haltAutoWorking, isSentSignal, readWorkingLease, restoreAutoWorking } from "./auto-signals.js";
|
|
12
|
-
import { _ as EventConnection, a as ensureSharedMailSubscription, d as createSharedMailWaiter, f as openSharedMailStore, g as otherParticipants, h as readConversationFollow, i as sharedMailScope, l as KEY_REVOKED_MESSAGE, m as followEmailConversation, n as reconcileChatSend, p as reserveSharedMailSubscription, r as openSharedMailReceiver, s as AGENT_CONNECTION_REQUIRED_MESSAGE, t as sendSignal, u as isConnectedAgentKey, v as EventReceiverError } from "../signal-command-
|
|
12
|
+
import { _ as EventConnection, a as ensureSharedMailSubscription, d as createSharedMailWaiter, f as openSharedMailStore, g as otherParticipants, h as readConversationFollow, i as sharedMailScope, l as KEY_REVOKED_MESSAGE, m as followEmailConversation, n as reconcileChatSend, p as reserveSharedMailSubscription, r as openSharedMailReceiver, s as AGENT_CONNECTION_REQUIRED_MESSAGE, t as sendSignal, u as isConnectedAgentKey, v as EventReceiverError } from "../signal-command-DvIH9E_B.js";
|
|
13
13
|
import { a as backgroundListenStatus, c as runBackgroundListen, d as stopBackgroundListen, f as verifyBackgroundListenTarget, o as backgroundListenToken, r as backgroundListenConfiguration, u as startBackgroundListen } from "../listen-background-DyBYca28.js";
|
|
14
14
|
import { ORG_SELECTION_ENV } from "./global-org-flag.js";
|
|
15
15
|
import { n as createConfig, t as createClient } from "../client.gen-6rZvmHfx.js";
|
|
@@ -8923,19 +8923,28 @@ async function callActivityApi(options) {
|
|
|
8923
8923
|
if (!response.ok) {
|
|
8924
8924
|
let message = `Primitive API returned HTTP ${response.status}.`;
|
|
8925
8925
|
let code;
|
|
8926
|
+
let details;
|
|
8926
8927
|
try {
|
|
8927
8928
|
const parsed = JSON.parse(rawText);
|
|
8928
8929
|
code = parsed.error?.code;
|
|
8929
8930
|
if (parsed.error?.message) message = parsed.error.message;
|
|
8931
|
+
if (parsed.error?.details && typeof parsed.error.details === "object") details = parsed.error.details;
|
|
8930
8932
|
} catch {
|
|
8931
8933
|
const sanitized = sanitizeErrorText(rawText);
|
|
8932
8934
|
if (sanitized) message = sanitized;
|
|
8933
8935
|
}
|
|
8936
|
+
const existingActivity = details?.activity && typeof details.activity === "object" ? details.activity : null;
|
|
8937
|
+
const conflictMetaParts = [];
|
|
8938
|
+
if (existingActivity?.started_at) conflictMetaParts.push(`started ${existingActivity.started_at}`);
|
|
8939
|
+
if (existingActivity?.claim_expires_at) conflictMetaParts.push(`claim expires ${existingActivity.claim_expires_at}`);
|
|
8940
|
+
const conflictSummary = response.status === 409 && existingActivity ? ` Existing activity ${existingActivity.id ?? "unknown"} [${existingActivity.status ?? "unknown"}] rev ${existingActivity.revision ?? "?"}${conflictMetaParts.length > 0 ? ` (${conflictMetaParts.join(", ")})` : ""}.` : "";
|
|
8934
8941
|
const hint = code === "grant_forbidden" ? " Check whether this credential holds mail.activity:read / mail.activity:write." : code === "access_reason_required" ? " Pass --reason \"...\" or set PRIMITIVE_REASON." : code === "feature_not_enabled" ? " Mail activity tracking is not enabled for this organization." : code === "activity_header_invalid" ? " Check --reason / PRIMITIVE_REASON (1-500 printable ASCII) and --run-id / PRIMITIVE_RUN_ID ([A-Za-z0-9._:/-], 1-128 chars)." : "";
|
|
8935
|
-
|
|
8942
|
+
const cliErr = new Errors.CLIError(`${message}${conflictSummary}${hint}`, {
|
|
8936
8943
|
exit: 1,
|
|
8937
8944
|
...code ? { code } : {}
|
|
8938
8945
|
});
|
|
8946
|
+
if (details) cliErr.details = details;
|
|
8947
|
+
throw cliErr;
|
|
8939
8948
|
}
|
|
8940
8949
|
if (options.rawText) return {
|
|
8941
8950
|
data: void 0,
|
|
@@ -11826,8 +11835,8 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
11826
11835
|
name: "Primitive Team",
|
|
11827
11836
|
url: "https://primitive.dev"
|
|
11828
11837
|
};
|
|
11829
|
-
const SDK_VERSION_RANGE = "^3.0.0-preview.
|
|
11830
|
-
const CLI_VERSION_RANGE = "^3.0.0-preview.
|
|
11838
|
+
const SDK_VERSION_RANGE = "^3.0.0-preview.28";
|
|
11839
|
+
const CLI_VERSION_RANGE = "^3.0.0-preview.28";
|
|
11831
11840
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
11832
11841
|
function renderHandler() {
|
|
11833
11842
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -21665,8 +21674,8 @@ const COMMON_API_FLAGS = {
|
|
|
21665
21674
|
};
|
|
21666
21675
|
var ActivityLogCommand = class ActivityLogCommand extends Command {
|
|
21667
21676
|
static summary = "Log an agent work note, external action outcome, or handoff";
|
|
21668
|
-
static description = "Record structured work on a Primitive email or thread so humans and other agents see what already happened.
|
|
21669
|
-
static examples = [`<%= config.bin %> activity log --email <email-id> --action brex.upload_invoice --status
|
|
21677
|
+
static description = "Record structured work on a Primitive email or thread so humans and other agents see what already happened. Without --idempotency-key every call appends a new row. With --idempotency-key (scoped per thread and actor), retries update in place; add --if-absent and --claim-ttl to atomically claim work across replicas.";
|
|
21678
|
+
static examples = [`<%= config.bin %> activity log --email <email-id> --action brex.upload_invoice --status started --summary "Uploading Acme invoice #412 to Brex" --idempotency-key brex.upload_invoice:<email-id> --if-absent --claim-ttl 300`, `<%= config.bin %> activity log --thread <thread-id> --kind handoff --action brex.review_receipt --status needs_review --summary "Personal invoice detected; needs confirmation"`];
|
|
21670
21679
|
static args = { summary: Args.string({
|
|
21671
21680
|
description: "Optional positional summary (alternative to --summary)",
|
|
21672
21681
|
required: false
|
|
@@ -21705,7 +21714,9 @@ var ActivityLogCommand = class ActivityLogCommand extends Command {
|
|
|
21705
21714
|
env: "PRIMITIVE_RUN_ID"
|
|
21706
21715
|
}),
|
|
21707
21716
|
"trace-url": Flags.string({ description: "Optional https:// URL to the agent execution trace" }),
|
|
21708
|
-
"idempotency-key": Flags.string({ description: "
|
|
21717
|
+
"idempotency-key": Flags.string({ description: "Optional key scoped per (thread, actor). Reusing it updates in place; omit to append a new row" }),
|
|
21718
|
+
"if-absent": Flags.boolean({ description: "With --idempotency-key: atomically create only if no active/completed activity exists (takes over expired started claims; otherwise exits with 409 conflict)" }),
|
|
21719
|
+
"claim-ttl": Flags.integer({ description: "Claim lease TTL in seconds (1 to 86400) for status=started entries; after expiry, another replica can take over via --if-absent" }),
|
|
21709
21720
|
visibility: Flags.string({
|
|
21710
21721
|
description: "Visibility: thread (default, shared) or actor_only (private)",
|
|
21711
21722
|
options: [...ACTIVITY_VISIBILITIES]
|
|
@@ -21725,6 +21736,8 @@ var ActivityLogCommand = class ActivityLogCommand extends Command {
|
|
|
21725
21736
|
const sentEmailId = flags["sent-email"] !== void 0 ? assertUuid(flags["sent-email"], "--sent-email") : void 0;
|
|
21726
21737
|
if (flags.action !== void 0 && !ACTION_SLUG_RE.test(flags.action.trim())) throw new Errors.CLIError("--action must start with a lowercase letter or digit and use only a-z, 0-9, ., _, :, - (max 128 chars).", { exit: 2 });
|
|
21727
21738
|
if (flags["idempotency-key"] !== void 0 && !IDEMPOTENCY_KEY_RE.test(flags["idempotency-key"].trim())) throw new Errors.CLIError("--idempotency-key must be 1 to 255 printable ASCII characters without spaces.", { exit: 2 });
|
|
21739
|
+
if (flags["if-absent"] && !flags["idempotency-key"]?.trim()) throw new Errors.CLIError("--if-absent requires --idempotency-key <key>.", { exit: 2 });
|
|
21740
|
+
if (flags["claim-ttl"] !== void 0 && (flags["claim-ttl"] < 1 || flags["claim-ttl"] > 86400)) throw new Errors.CLIError("--claim-ttl must be an integer between 1 and 86400 seconds.", { exit: 2 });
|
|
21728
21741
|
const detail = flags["detail-file"] !== void 0 ? readUtf8File(flags["detail-file"], "--detail-file") : flags.detail;
|
|
21729
21742
|
if (detail !== void 0 && detail.length > 8e3) throw new Errors.CLIError("Detail must be at most 8000 characters.", { exit: 2 });
|
|
21730
21743
|
const data = flags["data-file"] !== void 0 ? parseJsonObjectFlag(readUtf8File(flags["data-file"], "--data-file"), "--data-file") : flags.data !== void 0 ? parseJsonObjectFlag(flags.data, "--data") : void 0;
|
|
@@ -21743,6 +21756,8 @@ var ActivityLogCommand = class ActivityLogCommand extends Command {
|
|
|
21743
21756
|
...runId ? { run_id: runId } : {},
|
|
21744
21757
|
...traceUrl ? { trace_url: traceUrl } : {},
|
|
21745
21758
|
...flags["idempotency-key"] ? { idempotency_key: flags["idempotency-key"].trim() } : {},
|
|
21759
|
+
...flags["if-absent"] ? { if_absent: true } : {},
|
|
21760
|
+
...flags["claim-ttl"] !== void 0 ? { claim_ttl_seconds: flags["claim-ttl"] } : {},
|
|
21746
21761
|
...flags.visibility ? { visibility: flags.visibility } : {}
|
|
21747
21762
|
};
|
|
21748
21763
|
const path = threadId ? `/threads/${threadId}/activities` : `/emails/${emailId}/activities`;
|
|
@@ -21806,6 +21821,9 @@ var ActivityUpdateCommand = class ActivityUpdateCommand extends Command {
|
|
|
21806
21821
|
description: "Updated visibility: thread or actor_only",
|
|
21807
21822
|
options: [...ACTIVITY_VISIBILITIES]
|
|
21808
21823
|
}),
|
|
21824
|
+
"claim-ttl": Flags.integer({ description: "Updated claim lease TTL in seconds (1 to 86400) when status is started" }),
|
|
21825
|
+
"clear-claim-ttl": Flags.boolean({ description: "Clear claim_expires_at (sets null)" }),
|
|
21826
|
+
"if-revision": Flags.integer({ description: "Expected current revision for compare-and-set updates (exits with 409 conflict if modified since)" }),
|
|
21809
21827
|
...COMMON_API_FLAGS
|
|
21810
21828
|
};
|
|
21811
21829
|
async run() {
|
|
@@ -21844,7 +21862,17 @@ var ActivityUpdateCommand = class ActivityUpdateCommand extends Command {
|
|
|
21844
21862
|
if (flags["clear-trace-url"]) body.trace_url = null;
|
|
21845
21863
|
else if (flags["trace-url"] !== void 0) body.trace_url = assertHttpUrl(flags["trace-url"], "--trace-url");
|
|
21846
21864
|
if (flags.visibility) body.visibility = flags.visibility;
|
|
21865
|
+
if (flags["clear-claim-ttl"] && flags["claim-ttl"] !== void 0) throw new Errors.CLIError("--clear-claim-ttl cannot be combined with --claim-ttl.", { exit: 2 });
|
|
21866
|
+
if (flags["clear-claim-ttl"]) body.claim_ttl_seconds = null;
|
|
21867
|
+
else if (flags["claim-ttl"] !== void 0) {
|
|
21868
|
+
if (flags["claim-ttl"] < 1 || flags["claim-ttl"] > 86400) throw new Errors.CLIError("--claim-ttl must be an integer between 1 and 86400 seconds.", { exit: 2 });
|
|
21869
|
+
body.claim_ttl_seconds = flags["claim-ttl"];
|
|
21870
|
+
}
|
|
21847
21871
|
if (Object.keys(body).length === 0) throw new Errors.CLIError("Provide at least one field to update.", { exit: 2 });
|
|
21872
|
+
if (flags["if-revision"] !== void 0) {
|
|
21873
|
+
if (flags["if-revision"] < 1) throw new Errors.CLIError("--if-revision must be at least 1.", { exit: 2 });
|
|
21874
|
+
body.if_revision = flags["if-revision"];
|
|
21875
|
+
}
|
|
21848
21876
|
await runWithTiming(flags.time === true, async () => {
|
|
21849
21877
|
const result = await callActivityApi({
|
|
21850
21878
|
configDir: this.config.configDir,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as agentProfileDirectory, G as loadConnectedAgentProfile, R as AGENT_PROFILE_ENV, V as agentProfileName, dt as detectAgentRuntime } from "../cli-config-CwZJQIcn.js";
|
|
2
2
|
import { a as backgroundListenStatus, i as backgroundListenRestartable, s as claimBackgroundListenRestart, t as BACKGROUND_LISTEN_RELAUNCH_ENV } from "../listen-background-DyBYca28.js";
|
|
3
|
-
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-
|
|
3
|
+
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-qbfowlNN.js";
|
|
4
4
|
import { d as readMailJson } from "../shared-mail-files-BAQSGxxz.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Gn as sendEmail, S as describeApiFailure, h as sendPreparedSignal, ht as createEndpoint, p as prepareSignalEmail, wn as listSentEmails, zt as getEmail } from "./repeats-Dj_o6c-X-CK1wU9lP.js";
|
|
2
|
-
import { A as bareAddress, Dt as successfulSendOutcome, c as extractErrorPayload, ut as classifySendError } from "./api-command-
|
|
2
|
+
import { A as bareAddress, Dt as successfulSendOutcome, c as extractErrorPayload, ut as classifySendError } from "./api-command-DSfZl8fj.js";
|
|
3
3
|
import { recordSentSignal } from "./oclif/auto-signals.js";
|
|
4
4
|
import { _ as acquireListenLock, 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, x as listenProcessIdentity, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
|
|
5
5
|
import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-DN0qj4AY.js";
|