@byteplus/ark-cli 1.0.19-probe.dfb2bfca8b29 → 1.0.20-prerelease.f03075994108

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/manifest.json CHANGED
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "package": "@byteplus/ark-cli",
3
- "version": "1.0.19-probe.dfb2bfca8b29",
3
+ "version": "1.0.20-prerelease.f03075994108",
4
4
  "platforms": {
5
5
  "darwin-amd64": {
6
6
  "kind": "cdn",
7
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.19-probe.dfb2bfca8b29/arkcli-1.0.19-probe.dfb2bfca8b29-darwin-amd64",
8
- "sha256": "abde48f22acfa015a12103d6287361166bfbe492a08d8ca0bc0abe02ab05a041"
7
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-darwin-amd64",
8
+ "sha256": "b8b7b0a09edf010e051674e570f4b821e3518a38680483ae6578049a071eea7b"
9
9
  },
10
10
  "darwin-arm64": {
11
11
  "kind": "cdn",
12
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.19-probe.dfb2bfca8b29/arkcli-1.0.19-probe.dfb2bfca8b29-darwin-arm64",
13
- "sha256": "f3ecc2256a02ded8c067b694769248cdde2e3db5dc43c1b56f9c6e836b027ec1"
12
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-darwin-arm64",
13
+ "sha256": "e6ff3620ad25102e2bd24f4a58ceb84305303cff3d79dc3606430f147e7e6a8c"
14
14
  },
15
15
  "linux-amd64": {
16
16
  "kind": "cdn",
17
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.19-probe.dfb2bfca8b29/arkcli-1.0.19-probe.dfb2bfca8b29-linux-amd64",
18
- "sha256": "235cf0cedf55020627360cff48dec83b2c39e59ab6611592c4486282f84a3eb0"
17
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-linux-amd64",
18
+ "sha256": "7960d431bf8802d882c2f6d438e88558713e04c3a907416b6a978fc2dde23f99"
19
19
  },
20
20
  "linux-arm64": {
21
21
  "kind": "cdn",
22
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.19-probe.dfb2bfca8b29/arkcli-1.0.19-probe.dfb2bfca8b29-linux-arm64",
23
- "sha256": "b2fe2e90d9c8736bad2832ba6ad634bbd91015800c7f48bfe5697b5ce73ef3ed"
22
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-linux-arm64",
23
+ "sha256": "08e1bbbcebce06f6a893ca07ea0198627c4d57bbf4b8de31e586edb6169ec811"
24
24
  },
25
25
  "windows-amd64": {
26
26
  "kind": "cdn",
27
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.19-probe.dfb2bfca8b29/arkcli-1.0.19-probe.dfb2bfca8b29-windows-amd64.exe",
28
- "sha256": "f8168fc1fb15771aaf5d542d66044b36ef3b90f75cf17266c4882337b56287f8"
27
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-windows-amd64.exe",
28
+ "sha256": "a99cb9f4850b3b268ec5e6fab84ec5f8714cbadeb37bf8b3abc79c02e672d5b4"
29
29
  },
30
30
  "windows-arm64": {
31
31
  "kind": "cdn",
32
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.19-probe.dfb2bfca8b29/arkcli-1.0.19-probe.dfb2bfca8b29-windows-arm64.exe",
33
- "sha256": "5c2412b36fd36231e897c39a4003f18eac5e54c239f70f8353f5020c94840ac5"
32
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-windows-arm64.exe",
33
+ "sha256": "45dc8d7e54081f08ab53d152072a64f38458c5f00ff6c37592746dbe8d02c6c5"
34
34
  }
35
35
  },
36
36
  "skills": {
37
37
  "primary": {
38
38
  "kind": "cdn",
39
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.19-probe.dfb2bfca8b29/skills.tar.gz",
40
- "sha256": "cc73575939364a9efaff78f53fb60f81434c1e224688ef16622b6b4178b61e93"
39
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/skills.tar.gz",
40
+ "sha256": "b20aa67572f5bb07560a53b31757b9284604ea12787d7683a629d613e112c1c2"
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/ark-cli",
3
- "version": "1.0.19-probe.dfb2bfca8b29",
3
+ "version": "1.0.20-prerelease.f03075994108",
4
4
  "description": "BytePlus Ark command-line interface",
5
5
  "bin": {
6
6
  "arkcli": "scripts/run.js"
@@ -10,6 +10,7 @@ const fs = require("fs");
10
10
  const http = require("http");
11
11
  const https = require("https");
12
12
  const path = require("path");
13
+ const os = require("os");
13
14
  const { execFileSync } = require("child_process");
14
15
  const { Transform, pipeline } = require("stream");
15
16
 
@@ -64,6 +65,14 @@ if (!platform || !arch) {
64
65
  process.exit(1);
65
66
  }
66
67
 
68
+ // Snapshot product state before bootstrap or the downloaded binary can create
69
+ // it. Any lookup failure is historical/ambiguous and therefore not fresh.
70
+ let freshStateAbsent = false;
71
+ try {
72
+ const home = os.homedir();
73
+ freshStateAbsent = home !== "" && !fs.existsSync(path.join(home, ".arkcli-bp"));
74
+ } catch (_) {}
75
+
67
76
  function readJSON(file, label) {
68
77
  try {
69
78
  return JSON.parse(fs.readFileSync(file, "utf8"));
@@ -388,9 +397,9 @@ async function install() {
388
397
  }
389
398
 
390
399
  if (process.env.npm_config_global === "true") {
391
- // Bootstrap provisioning is best-effort updater setup. It must never turn
392
- // a valid public package install into a publication or installation gate.
393
- let bootstrapReady = false;
400
+ // Enrollment publishes only inert exact-install evidence. Active consent
401
+ // can be created only by later successful human CLI invocations.
402
+ let bootstrapReady = process.platform !== "win32";
394
403
  let bootstrapError;
395
404
  if (process.platform === "win32") {
396
405
  try {
@@ -405,8 +414,9 @@ async function install() {
405
414
  }
406
415
  let automaticSupported;
407
416
  let mode;
417
+ let enrollmentPhase;
408
418
  let policyError;
409
- if (bootstrapReady && hasInteractiveInstallConsole()) {
419
+ if (bootstrapReady) {
410
420
  try {
411
421
  const supported = execFileSync(
412
422
  binPath,
@@ -418,6 +428,23 @@ async function install() {
418
428
  }
419
429
  automaticSupported = supported === "true";
420
430
  if (automaticSupported) {
431
+ enrollmentPhase = execFileSync(
432
+ binPath,
433
+ [
434
+ "_refresh-update-cache", "--initialize-enrollment",
435
+ `--fresh-state-absent=${freshStateAbsent}`,
436
+ ],
437
+ { timeout: 10000, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] },
438
+ ).trim();
439
+ if (![
440
+ "disabled",
441
+ "fresh_pending",
442
+ "grace_completed",
443
+ "automatic_active",
444
+ "manual_reinstall_suspended",
445
+ ].includes(enrollmentPhase)) {
446
+ throw new Error(`unexpected automatic-update enrollment phase ${JSON.stringify(enrollmentPhase)}`);
447
+ }
421
448
  mode = execFileSync(
422
449
  binPath,
423
450
  ["_refresh-update-cache", "--print-mode"],
@@ -446,12 +473,16 @@ async function install() {
446
473
  );
447
474
  } else if (automaticSupported === false) {
448
475
  writeInstallNotice(`${PACKAGE_NAME}: update notices/manual update remain active by default; silent automatic update is not enabled for this product and platform.`);
449
- } else if (mode === "automatic") {
450
- writeInstallNotice(`${PACKAGE_NAME}: this reinstall retired the prior automatic binding; run \`arkcli config set update.mode automatic\` to authorize this exact install again.`);
451
- } else if (mode === "disabled") {
452
- writeInstallNotice(`${PACKAGE_NAME}: the disabled update policy was preserved; silent automatic update is not active.`);
453
- } else if (bootstrapReady && automaticSupported) {
454
- writeInstallNotice(`${PACKAGE_NAME}: update notices/manual update remain active by default; run \`arkcli config set update.mode automatic\` to opt in to silent automatic update.`);
476
+ } else if (enrollmentPhase === "fresh_pending") {
477
+ writeInstallNotice(`${PACKAGE_NAME}: silent stable patch updates are enabled by default for this new install; the first human command will not update. Disable with \`arkcli config set update.mode disabled\`.`);
478
+ } else if (enrollmentPhase === "manual_reinstall_suspended") {
479
+ writeInstallNotice(`${PACKAGE_NAME}: a manual npm install or version change was detected, so silent automatic updates are paused. Keep this version with \`arkcli config set update.mode disabled\`; resume with \`arkcli config set update.mode automatic\`.`);
480
+ } else if (enrollmentPhase === "disabled" || mode === "disabled") {
481
+ writeInstallNotice(`${PACKAGE_NAME}: the disabled update policy was preserved; update notices remain active and silent automatic update is not active.`);
482
+ } else if (enrollmentPhase === "grace_completed") {
483
+ writeInstallNotice(`${PACKAGE_NAME}: first-run grace is complete; the next successful human command only activates exact-install consent and will not update immediately. Disable with \`arkcli config set update.mode disabled\`.`);
484
+ } else if (enrollmentPhase === "automatic_active") {
485
+ writeInstallNotice(`${PACKAGE_NAME}: silent stable patch update consent remains active for this exact install. Disable with \`arkcli config set update.mode disabled\`.`);
455
486
  }
456
487
  }
457
488