primcli 1.42.0 → 1.44.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.
@@ -1,4 +1,4 @@
1
- import { _ as isTrustedSender, c as classifySignalContent } from "./repeats-CoK0tpCK-Bx7nmyRi.js";
1
+ import { _ as isTrustedSender, c as classifySignalContent } from "./repeats-D2xtLium-Dv34tqei.js";
2
2
  import { d as readMailJson, h as writeMailJson, i as mailId, l as privateMailDirectory, r as mailAddress } from "./shared-mail-files-SPPcis9g.js";
3
3
  import { existsSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { randomUUID } from "node:crypto";
@@ -764,6 +764,21 @@ function parseOwnerMemberAddress(value, ownerAddress, agentAddress) {
764
764
  if (address === ownerAddress || address === agentAddress) throw new Error();
765
765
  return address;
766
766
  }
767
+ /**
768
+ * Refusal text for a profile that is already connected (or mid-setup) with a
769
+ * different invitation. It never tells the agent to pick another profile on
770
+ * its own: whether this session keeps its address or replaces it is the
771
+ * user's decision.
772
+ */
773
+ function profileAlreadyConnectedMessage(profileName, address) {
774
+ const who = address ? `already connected as ${address}` : "already set up";
775
+ const it = address ?? "it";
776
+ return [
777
+ `Agent profile ${profileName} is ${who} with a different invitation. No invitation was claimed and nothing was changed.`,
778
+ `Do not create a separate profile on your own. Ask the user whether to keep ${it} and not connect a new address, or to disconnect it first. Do not decide for them.`,
779
+ `If they choose to disconnect it, run \`primitive agent disconnect --profile ${profileName}\` (or rerun this command with --replace-existing when it is bound to this session), then connect again. If they want a second address on purpose, rerun with a new --profile and --keep-existing.`
780
+ ].join(" ");
781
+ }
767
782
  //#endregion
768
783
  //#region src/oclif/chat-state.ts
769
784
  const CHAT_STATE_FILE = "chat-state.json";
@@ -1480,4 +1495,4 @@ function redactCliEnvironment(environment) {
1480
1495
  };
1481
1496
  }
1482
1497
  //#endregion
1483
- export { saveActiveChatState as A, parseOwnerMemberAddress as B, resolveCliAuth as C, deleteChatState as D, chatStatePath as E, agentProfilesDirectory as F, createConfig as G, saveConnectedAgentProfile as H, connectedAgentIdentity as I, connectedApiBaseUrl as L, AgentConnectionSetupError as M, agentProfileDirectory as N, loadActiveChatState as O, agentProfileName as P, loadConnectedAgentProfile as R, normalizeApiBaseUrl as S, saveSignupCredentials as T, PrimitiveApiClient as U, requireDefaultLoginProfile as V, createClient as W, deleteCliCredentials as _, normalizeCliEnvironmentName as a, hasStoredCliLogin as b, resolveConfigEnvironment as c, validateCliHeaderName as d, validateCliHeaderValue as f, credentialsPath as g, credentialsLockPath as h, loadCliConfig as i, AGENT_PROFILE_ENV as j, loadChatConversationByLocalId as k, saveCliConfig as l, cliAccessTokenExpiresAt as m, deleteCliConfig as n, redactCliEnvironment as o, acquireCliCredentialsLock as p, emptyCliConfig as r, removeCliEnvironment as s, DEFAULT_ENVIRONMENT as t, upsertCliEnvironment as u, deleteCliCredentialsLock as v, saveCliCredentials as w, loadCliCredentials as x, detectPrimitiveKeyEnvMisname as y, parseConnectedAgentProfile as z };
1498
+ export { saveActiveChatState as A, parseOwnerMemberAddress as B, resolveCliAuth as C, deleteChatState as D, chatStatePath as E, agentProfilesDirectory as F, createClient as G, requireDefaultLoginProfile as H, connectedAgentIdentity as I, createConfig as K, connectedApiBaseUrl as L, AgentConnectionSetupError as M, agentProfileDirectory as N, loadActiveChatState as O, agentProfileName as P, loadConnectedAgentProfile as R, normalizeApiBaseUrl as S, saveSignupCredentials as T, saveConnectedAgentProfile as U, profileAlreadyConnectedMessage as V, PrimitiveApiClient as W, deleteCliCredentials as _, normalizeCliEnvironmentName as a, hasStoredCliLogin as b, resolveConfigEnvironment as c, validateCliHeaderName as d, validateCliHeaderValue as f, credentialsPath as g, credentialsLockPath as h, loadCliConfig as i, AGENT_PROFILE_ENV as j, loadChatConversationByLocalId as k, saveCliConfig as l, cliAccessTokenExpiresAt as m, deleteCliConfig as n, redactCliEnvironment as o, acquireCliCredentialsLock as p, emptyCliConfig as r, removeCliEnvironment as s, DEFAULT_ENVIRONMENT as t, upsertCliEnvironment as u, deleteCliCredentialsLock as v, saveCliCredentials as w, loadCliCredentials as x, detectPrimitiveKeyEnvMisname as y, parseConnectedAgentProfile as z };
@@ -1,5 +1,5 @@
1
- import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, v as parseWebhookEvent } from "./repeats-CoK0tpCK-Bx7nmyRi.js";
2
- import { Nt as downloadEmailAttachmentPart, c as wakeInteractionSentence } from "./interaction-actions-D5o_frTT.js";
1
+ import { _ as isTrustedSender, c as classifySignalContent, g as isEmailReceivedEvent, v as parseWebhookEvent } from "./repeats-D2xtLium-Dv34tqei.js";
2
+ import { Xt as downloadEmailAttachmentPart, q as wakeInteractionSentence } from "./api-command-CpW39SQw.js";
3
3
  import { _ as acquireListenLock, g as ListenStateError, y as listenIdentity } from "./shared-mail-files-SPPcis9g.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,7 +1,7 @@
1
- import { Jt as getSentEmail, mt as createAuthenticatedCliApiClient } from "../interaction-actions-D5o_frTT.js";
1
+ import { A as readThreadContext, dn as getSentEmail, jt as createAuthenticatedCliApiClient } from "../api-command-CpW39SQw.js";
2
2
  import { _ as acquireListenLock } from "../shared-mail-files-SPPcis9g.js";
3
- import { _ as readThreadContext, t as sendSignal } from "../signal-command-D5YGxi_o.js";
4
- import { A as stopWorkingLease, b as readWorkingLease, d as autoSignalsDisabled, j as writeWorkingLease, p as clearWorkingSending, r as AUTO_SIGNAL_KIND_ENV, s as AUTO_WORKING_RENEW_MS, v as markWorkingSending, x as recordRenewer, y as readAutoClaim } from "../auto-signals-D3NqwgYA.js";
3
+ import { t as sendSignal } from "../signal-command-BbdorL9t.js";
4
+ import { A as stopWorkingLease, b as readWorkingLease, d as autoSignalsDisabled, j as writeWorkingLease, p as clearWorkingSending, r as AUTO_SIGNAL_KIND_ENV, s as AUTO_WORKING_RENEW_MS, v as markWorkingSending, x as recordRenewer, y as readAutoClaim } from "../auto-signals-oSCnNgts.js";
5
5
  import { join } from "node:path";
6
6
  import { homedir } from "node:os";
7
7
  //#region src/oclif/auto-signal-worker.ts
@@ -1,2 +1,2 @@
1
- import { A as stopWorkingLease, C as releaseStopHold, D as resumeAutoWorking, E as restoreWorkingLease, O as spawnAutoSignalWorker, S as recordSentSignal, T as restoreAutoWorking, _ as isSentSignal, a as AUTO_WORKING_CAP_MS, b as readWorkingLease, c as activeWorkingLeases, d as autoSignalsDisabled, f as claimAutoRead, g as haltAutoWorking, h as dispatchAutoWorking, i as AUTO_SIGNAL_WORKER_ENV, j as writeWorkingLease, k as startWorkingLease, l as autoSignalEligible, m as dispatchAutoRead, n as AUTO_SIGNAL_EMAIL_ENV, o as AUTO_WORKING_EXPIRES_SECONDS, p as clearWorkingSending, r as AUTO_SIGNAL_KIND_ENV, s as AUTO_WORKING_RENEW_MS, t as AUTO_SIGNALS_OPT_OUT_ENV, u as autoSignalEntrypoint, v as markWorkingSending, w as renewerAlive, x as recordRenewer, y as readAutoClaim } from "../auto-signals-D3NqwgYA.js";
1
+ import { A as stopWorkingLease, C as releaseStopHold, D as resumeAutoWorking, E as restoreWorkingLease, O as spawnAutoSignalWorker, S as recordSentSignal, T as restoreAutoWorking, _ as isSentSignal, a as AUTO_WORKING_CAP_MS, b as readWorkingLease, c as activeWorkingLeases, d as autoSignalsDisabled, f as claimAutoRead, g as haltAutoWorking, h as dispatchAutoWorking, i as AUTO_SIGNAL_WORKER_ENV, j as writeWorkingLease, k as startWorkingLease, l as autoSignalEligible, m as dispatchAutoRead, n as AUTO_SIGNAL_EMAIL_ENV, o as AUTO_WORKING_EXPIRES_SECONDS, p as clearWorkingSending, r as AUTO_SIGNAL_KIND_ENV, s as AUTO_WORKING_RENEW_MS, t as AUTO_SIGNALS_OPT_OUT_ENV, u as autoSignalEntrypoint, v as markWorkingSending, w as renewerAlive, x as recordRenewer, y as readAutoClaim } from "../auto-signals-oSCnNgts.js";
2
2
  export { AUTO_SIGNALS_OPT_OUT_ENV, AUTO_SIGNAL_EMAIL_ENV, AUTO_SIGNAL_KIND_ENV, AUTO_SIGNAL_WORKER_ENV, AUTO_WORKING_CAP_MS, AUTO_WORKING_EXPIRES_SECONDS, AUTO_WORKING_RENEW_MS, activeWorkingLeases, autoSignalEligible, autoSignalEntrypoint, autoSignalsDisabled, claimAutoRead, clearWorkingSending, dispatchAutoRead, dispatchAutoWorking, haltAutoWorking, isSentSignal, markWorkingSending, readAutoClaim, readWorkingLease, recordRenewer, recordSentSignal, releaseStopHold, renewerAlive, restoreAutoWorking, restoreWorkingLease, resumeAutoWorking, spawnAutoSignalWorker, startWorkingLease, stopWorkingLease, writeWorkingLease };