@swmansion/argent 0.34.1-next.65 → 0.34.1-next.66

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/cli-cmds.mjs CHANGED
@@ -9492,6 +9492,11 @@ var FLAG_REGISTRY = [
9492
9492
  description: "Overlay the argent corner watermark on recorded screen videos. On by default; turn it off with `argent disable video-watermark`.",
9493
9493
  defaultEnabled: true
9494
9494
  },
9495
+ {
9496
+ name: "whats-new",
9497
+ description: "After an update, tell the agent the highlights of the new Argent version on its first tool call. On by default; turn it off with `argent disable whats-new`.",
9498
+ defaultEnabled: true
9499
+ },
9495
9500
  {
9496
9501
  name: "macos-apps",
9497
9502
  description: "Control native Mac apps, including Mac Catalyst. Adds the macos platform to list-devices and boot-device, and the file-panel and menu-bar tools. On by default; turn it off with `argent disable macos-apps`.",
package/dist/client.js CHANGED
@@ -7808,6 +7808,11 @@ var FLAG_REGISTRY = [
7808
7808
  description: "Overlay the argent corner watermark on recorded screen videos. On by default; turn it off with `argent disable video-watermark`.",
7809
7809
  defaultEnabled: true
7810
7810
  },
7811
+ {
7812
+ name: "whats-new",
7813
+ description: "After an update, tell the agent the highlights of the new Argent version on its first tool call. On by default; turn it off with `argent disable whats-new`.",
7814
+ defaultEnabled: true
7815
+ },
7811
7816
  {
7812
7817
  name: "macos-apps",
7813
7818
  description: "Control native Mac apps, including Mac Catalyst. Adds the macos platform to list-devices and boot-device, and the file-panel and menu-bar tools. On by default; turn it off with `argent disable macos-apps`.",
@@ -15214,6 +15214,44 @@ function readConfigObject(scope = "global", options = {}) {
15214
15214
  }
15215
15215
  return {};
15216
15216
  }
15217
+ var FORBIDDEN_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
15218
+ function splitKey(dottedKey) {
15219
+ const parts = dottedKey.split(".");
15220
+ if (parts.length === 0 || parts.some((p) => p === "")) {
15221
+ throw new Error(`Invalid config key "${dottedKey}": empty path segment`);
15222
+ }
15223
+ for (const p of parts) {
15224
+ if (FORBIDDEN_SEGMENTS.has(p)) {
15225
+ throw new Error(`Invalid config key "${dottedKey}": forbidden segment "${p}"`);
15226
+ }
15227
+ }
15228
+ return parts;
15229
+ }
15230
+ function isPlainObject(value) {
15231
+ return !!value && typeof value === "object" && !Array.isArray(value);
15232
+ }
15233
+ function getAtPath(obj, dottedKey) {
15234
+ const parts = splitKey(dottedKey);
15235
+ let cur = obj;
15236
+ for (const part of parts) {
15237
+ if (!isPlainObject(cur)) return void 0;
15238
+ cur = cur[part];
15239
+ }
15240
+ return cur;
15241
+ }
15242
+ function setAtPath(obj, dottedKey, value) {
15243
+ const parts = splitKey(dottedKey);
15244
+ let cur = obj;
15245
+ for (let i2 = 0; i2 < parts.length - 1; i2++) {
15246
+ const part = parts[i2];
15247
+ const next = cur[part];
15248
+ if (!isPlainObject(next)) {
15249
+ cur[part] = {};
15250
+ }
15251
+ cur = cur[part];
15252
+ }
15253
+ cur[parts[parts.length - 1]] = value;
15254
+ }
15217
15255
  var LOCK_STALE_MS = 1e4;
15218
15256
  var LOCK_MAX_WAIT_MS = 2e3;
15219
15257
  var LOCK_RETRY_MS = 25;
@@ -15286,6 +15324,16 @@ function updateConfig(mutate, scope = "global", options = {}) {
15286
15324
  }
15287
15325
  }
15288
15326
 
15327
+ // ../configuration-core/src/whats-new.ts
15328
+ var WHATS_NEW_SEEN_KEY = "notices.whats_new_seen";
15329
+ function getWhatsNewSeenVersion(options = {}) {
15330
+ const value = getAtPath(readConfigObject("global", options), WHATS_NEW_SEEN_KEY);
15331
+ return typeof value === "string" ? value : null;
15332
+ }
15333
+ function setWhatsNewSeenVersion(version, options = {}) {
15334
+ updateConfig((config) => setAtPath(config, WHATS_NEW_SEEN_KEY, version), "global", options);
15335
+ }
15336
+
15289
15337
  // ../configuration-core/src/secrets.ts
15290
15338
  var import_dotenv = __toESM(require_dist(), 1);
15291
15339
  import * as fs5 from "node:fs";
@@ -22505,6 +22553,9 @@ function printFirstRunNotice() {
22505
22553
  );
22506
22554
  markFirstRunNoticeShown();
22507
22555
  }
22556
+ function seedWhatsNewVersion(version) {
22557
+ if (getWhatsNewSeenVersion() === null) setWhatsNewSeenVersion(version);
22558
+ }
22508
22559
  async function resolveTelemetryConsent(opts) {
22509
22560
  if (opts.disableFlag) {
22510
22561
  writeConsentFlag(false);
@@ -24019,6 +24070,7 @@ async function init2(args) {
24019
24070
  }
24020
24071
  }
24021
24072
  writeCliRecord({ mode: tel.installMode, projectRoot, version });
24073
+ seedWhatsNewVersion(version);
24022
24074
  const allowlist = await configureAllowlist({
24023
24075
  adapters: writtenAdapters,
24024
24076
  effectiveRoot,