primcli 1.57.0 → 1.58.1

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.
@@ -7,7 +7,7 @@ import { $ as describeSessionHookItem, A as evaluateContactPolicy, B as agentInv
7
7
  import { a as scopedChatSenderTrust, i as readBeforeDeadline, n as isPlainChatReply, o as presenceDisposition, r as isScopedChatReply, s as readPresenceProjection, t as isConnectedChatCredential } from "../scoped-chat-C7cpIxVS.js";
8
8
  import { c as startBackgroundListen, i as backgroundListenToken, l as stopBackgroundListen, o as runBackgroundListen, r as backgroundListenStatus, u as verifyBackgroundListenTarget } from "../listen-background--0peztKE.js";
9
9
  import { a as ensureSharedMailSubscription, c as reserveSharedMailSubscription, d as otherParticipants, f as EventConnection, i as sharedMailScope, l as followEmailConversation, n as reconcileChatSend, o as createSharedMailWaiter, p as EventReceiverError, r as openSharedMailReceiver, s as openSharedMailStore, t as sendSignal, u as readConversationFollow } from "../signal-command-KEfppb9h.js";
10
- import { autoSignalEligible, dispatchAutoRead, dispatchAutoWorking, haltAutoWorking, isSentSignal, restoreAutoWorking } from "./auto-signals.js";
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";
13
13
  import { chmodSync, closeSync, constants, cpSync, existsSync, fstatSync, fsyncSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
@@ -42224,6 +42224,14 @@ const NO_SIGNAL_DESCRIPTION = "With --brief, do not report working to the sender
42224
42224
  function workingStopCommand(emailId, prefix) {
42225
42225
  return `${prefix} emails get --id ${emailId} --brief --no-signal`;
42226
42226
  }
42227
+ /**
42228
+ * Whether a working report from an earlier read is still being renewed: not
42229
+ * stopped, and inside the renewal cap (past it nothing renews, whatever the
42230
+ * saved lease says).
42231
+ */
42232
+ function workingStillRunning(lease, now = Date.now()) {
42233
+ return lease !== null && lease.stopped_at === null && now - lease.started_at < 9e5;
42234
+ }
42227
42235
  function workingStopLine(command) {
42228
42236
  return `The sender now sees you working on this until you answer. If you will not act on it, stop that with ${command} (it sends nothing).`;
42229
42237
  }
@@ -42268,7 +42276,7 @@ async function runBrief(command, flags) {
42268
42276
  const stop = !flags["no-signal"] && detail.sender_connected_agent_verified !== true && dispatchAutoWorking({
42269
42277
  configDir: command.config.configDir,
42270
42278
  emailId: detail.id
42271
- }) ? workingStopCommand(detail.id, followUpCommandPrefix()) : null;
42279
+ }) || !flags["no-signal"] && workingStillRunning(readWorkingLease(command.config.configDir, detail.id)) ? workingStopCommand(detail.id, followUpCommandPrefix()) : null;
42272
42280
  command.log(flags.json ? JSON.stringify(stop ? {
42273
42281
  ...brief,
42274
42282
  working_signal: { stop_command: stop }
@@ -43969,7 +43977,7 @@ const PRIMITIVE_TEAM_AUTHOR = {
43969
43977
  url: "https://primitive.dev"
43970
43978
  };
43971
43979
  const SDK_VERSION_RANGE = "^1.35.0";
43972
- const CLI_VERSION_RANGE = "^1.57.0";
43980
+ const CLI_VERSION_RANGE = "^1.58.0";
43973
43981
  const ESBUILD_VERSION_RANGE = "^0.27.0";
43974
43982
  function renderHandler() {
43975
43983
  return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primcli",
3
- "version": "1.57.0",
3
+ "version": "1.58.1",
4
4
  "description": "Official Primitive CLI: deploy Primitive Functions, send and inspect mail, manage endpoints, all from the terminal. Wraps the @primitivedotdev/sdk runtime client with one-shot commands.",
5
5
  "type": "module",
6
6
  "sideEffects": false,