@skrr-ai/cli 0.1.93 → 0.1.95

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.
Files changed (174) hide show
  1. package/README.md +153 -165
  2. package/bin/run.js +32 -0
  3. package/bin/update-npm-runner.cjs +33 -0
  4. package/bin/update-session.cjs +194 -0
  5. package/bin/update-worker.cjs +208 -0
  6. package/dist/base-command.js +0 -15
  7. package/dist/commands/agents/operating-plan.d.ts +11 -0
  8. package/dist/commands/agents/operating-plan.js +54 -0
  9. package/dist/commands/agents/roles/example.d.ts +11 -0
  10. package/dist/commands/agents/roles/example.js +30 -0
  11. package/dist/commands/{commitments/mode.d.ts → agents/roles/export.d.ts} +5 -5
  12. package/dist/commands/agents/roles/export.js +81 -0
  13. package/dist/commands/agents/roles/install.d.ts +12 -0
  14. package/dist/commands/agents/roles/install.js +48 -0
  15. package/dist/commands/agents/roles/list.d.ts +11 -0
  16. package/dist/commands/agents/roles/list.js +36 -0
  17. package/dist/commands/agents/roles/preview.d.ts +14 -0
  18. package/dist/commands/agents/roles/preview.js +49 -0
  19. package/dist/commands/agents/roles/withdraw.d.ts +13 -0
  20. package/dist/commands/agents/roles/withdraw.js +43 -0
  21. package/dist/commands/code/doctor.d.ts +1 -0
  22. package/dist/commands/code/doctor.js +6 -0
  23. package/dist/commands/code/index.js +4 -0
  24. package/dist/commands/code/install.d.ts +5 -62
  25. package/dist/commands/code/install.js +86 -279
  26. package/dist/commands/code/rollback.d.ts +8 -0
  27. package/dist/commands/code/rollback.js +20 -0
  28. package/dist/commands/code/update.d.ts +8 -37
  29. package/dist/commands/code/update.js +134 -213
  30. package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.d.ts +5 -7
  31. package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.js +13 -15
  32. package/dist/commands/commitments/cost.d.ts +1 -1
  33. package/dist/commands/commitments/cost.js +1 -1
  34. package/dist/commands/commitments/create.d.ts +0 -7
  35. package/dist/commands/commitments/create.js +9 -98
  36. package/dist/commands/commitments/delivery.js +3 -21
  37. package/dist/commands/commitments/doctor.js +28 -27
  38. package/dist/commands/commitments/effective-policy.js +5 -36
  39. package/dist/commands/commitments/evaluations.d.ts +15 -0
  40. package/dist/commands/commitments/evaluations.js +54 -0
  41. package/dist/commands/commitments/pack/activate.d.ts +11 -0
  42. package/dist/commands/commitments/pack/activate.js +22 -0
  43. package/dist/commands/commitments/pack/bind.js +1 -1
  44. package/dist/commands/commitments/remediate.js +2 -5
  45. package/dist/commands/commitments/show.js +1 -1
  46. package/dist/commands/commitments/update.js +9 -9
  47. package/dist/commands/commitments/wake-capabilities.d.ts +1 -3
  48. package/dist/commands/commitments/wake-capabilities.js +5 -21
  49. package/dist/commands/daemon/install.js +4 -0
  50. package/dist/commands/generate-recovery-code.d.ts +13 -1
  51. package/dist/commands/generate-recovery-code.js +146 -13
  52. package/dist/commands/instructions/guide.d.ts +20 -0
  53. package/dist/commands/instructions/guide.js +84 -0
  54. package/dist/commands/instructions/install.js +57 -33
  55. package/dist/commands/instructions/setup.d.ts +14 -0
  56. package/dist/commands/instructions/setup.js +72 -0
  57. package/dist/commands/integrations/execute.js +1 -1
  58. package/dist/commands/login.d.ts +5 -6
  59. package/dist/commands/login.js +27 -11
  60. package/dist/commands/logout.js +7 -7
  61. package/dist/commands/security/overview.d.ts +11 -0
  62. package/dist/commands/security/overview.js +158 -0
  63. package/dist/commands/spaces/claim.d.ts +12 -0
  64. package/dist/commands/spaces/claim.js +42 -0
  65. package/dist/commands/spaces/ownership.d.ts +12 -0
  66. package/dist/commands/spaces/ownership.js +46 -0
  67. package/dist/commands/tasks/cancel-cascade.js +1 -1
  68. package/dist/commands/tasks/create-tree.d.ts +5 -1
  69. package/dist/commands/tasks/create-tree.js +35 -7
  70. package/dist/commands/tasks/interrupt.js +2 -2
  71. package/dist/commands/tasks/pause-schedule.js +1 -1
  72. package/dist/commands/token/list.d.ts +3 -5
  73. package/dist/commands/token/list.js +99 -57
  74. package/dist/commands/update.d.ts +14 -0
  75. package/dist/commands/update.js +61 -0
  76. package/dist/generated/managed-instruction-guides.json +9 -0
  77. package/dist/hooks/init.d.ts +5 -0
  78. package/dist/hooks/init.js +27 -0
  79. package/dist/lib/commitment-product.d.ts +0 -6
  80. package/dist/lib/commitment-product.js +1 -30
  81. package/dist/lib/commitments.d.ts +9 -53
  82. package/dist/lib/commitments.js +23 -146
  83. package/dist/lib/daemon-installer.d.ts +2 -0
  84. package/dist/lib/daemon-installer.js +100 -24
  85. package/dist/lib/first-party-harness-doctor.js +31 -1
  86. package/dist/lib/first-party-harness-remote-install.d.ts +71 -0
  87. package/dist/lib/first-party-harness-remote-install.js +310 -0
  88. package/dist/lib/first-party-harness-remote-update.d.ts +46 -0
  89. package/dist/lib/first-party-harness-remote-update.js +242 -0
  90. package/dist/lib/first-party-harness-startup-update.d.ts +26 -0
  91. package/dist/lib/first-party-harness-startup-update.js +166 -0
  92. package/dist/lib/first-party-harness-update.d.ts +46 -0
  93. package/dist/lib/first-party-harness-update.js +289 -0
  94. package/dist/lib/first-party-harness.js +7 -4
  95. package/dist/lib/managed-instruction-local.d.ts +12 -0
  96. package/dist/lib/managed-instruction-local.js +58 -0
  97. package/dist/lib/managed-instruction-setup.d.ts +35 -0
  98. package/dist/lib/managed-instruction-setup.js +306 -0
  99. package/dist/lib/memory-sync.d.ts +1 -0
  100. package/dist/lib/memory-sync.js +279 -68
  101. package/dist/lib/northstars.js +1 -1
  102. package/dist/lib/platform-update-local.d.ts +2 -0
  103. package/dist/lib/platform-update-local.js +113 -0
  104. package/dist/lib/platform-update.d.ts +39 -0
  105. package/dist/lib/platform-update.js +84 -0
  106. package/dist/lib/profile-machine-identity-guard.d.ts +2 -0
  107. package/dist/lib/profile-machine-identity-guard.js +13 -0
  108. package/dist/lib/prompt.d.ts +1 -0
  109. package/dist/lib/prompt.js +4 -3
  110. package/dist/lib/roles.d.ts +98 -0
  111. package/dist/lib/roles.js +45 -0
  112. package/dist/lib/task-batch.d.ts +9 -0
  113. package/dist/lib/task-batch.js +94 -17
  114. package/dist/lib/task-instruction-offer.d.ts +1 -4
  115. package/dist/lib/task-instruction-offer.js +3 -129
  116. package/dist/lib/update-check.d.ts +61 -53
  117. package/dist/lib/update-check.js +453 -314
  118. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.d.ts +45 -0
  119. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.js +550 -0
  120. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.d.ts +3 -4
  121. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.js +3 -4
  122. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessReleaseKeys.d.ts +82 -0
  123. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessReleaseKeys.js +105 -0
  124. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessUpdater.d.ts +110 -0
  125. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessUpdater.js +945 -0
  126. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessPermissionControls.d.ts +32 -0
  127. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessPermissionControls.js +62 -0
  128. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +2 -0
  129. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +4 -1
  130. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.js +35 -5
  131. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releasePolicy.d.ts +63 -0
  132. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releasePolicy.js +169 -0
  133. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releaseVersions.d.ts +2 -0
  134. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releaseVersions.js +44 -0
  135. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.d.ts +7 -44
  136. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.js +8 -47
  137. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.d.ts +45 -0
  138. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.js +545 -0
  139. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.d.ts +3 -4
  140. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.js +3 -4
  141. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessReleaseKeys.d.ts +82 -0
  142. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessReleaseKeys.js +102 -0
  143. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessUpdater.d.ts +110 -0
  144. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessUpdater.js +923 -0
  145. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessPermissionControls.d.ts +32 -0
  146. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessPermissionControls.js +59 -0
  147. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +2 -0
  148. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +2 -0
  149. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.js +35 -5
  150. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releasePolicy.d.ts +63 -0
  151. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releasePolicy.js +163 -0
  152. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releaseVersions.d.ts +2 -0
  153. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releaseVersions.js +41 -0
  154. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.d.ts +7 -44
  155. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.js +8 -47
  156. package/dist/node_modules/@skrr-ai/auth-core/package.json +41 -1
  157. package/dist/node_modules/@skrr-ai/data-provider/index.js +7362 -7232
  158. package/dist/node_modules/@skrr-ai/data-provider/package.json +2 -2
  159. package/docs/v1/README.md +28 -0
  160. package/docs/v1/api.md +55 -0
  161. package/docs/v1/changelog.md +16 -0
  162. package/docs/v1/check-examples.mjs +178 -0
  163. package/docs/v1/examples/api-readonly.mjs +144 -0
  164. package/docs/v1/operations.md +87 -0
  165. package/docs/v1/quickstart.md +71 -0
  166. package/oclif.manifest.json +46381 -45478
  167. package/package.json +16 -11
  168. package/dist/commands/commitments/autonomy.d.ts +0 -30
  169. package/dist/commands/commitments/autonomy.js +0 -67
  170. package/dist/commands/commitments/mode.js +0 -58
  171. package/dist/commands/commitments/pack/promote.d.ts +0 -19
  172. package/dist/commands/commitments/pack/promote.js +0 -46
  173. package/dist/commands/commitments/pack/shadow.d.ts +0 -20
  174. package/dist/commands/commitments/pack/shadow.js +0 -42
@@ -0,0 +1,82 @@
1
+ /**
2
+ * WL-6.8 — ed25519 public keys that vouch for a **first-party harness binary**.
3
+ *
4
+ * ── Why this is not `daemon/src/release-keys.ts` ───────────────────────────
5
+ *
6
+ * `verifyHarnessProvenance` originally defaulted to the daemon's own
7
+ * self-update keys. That is convenient and wrong. Those two keys answer
8
+ * different questions and protect different things:
9
+ *
10
+ * `OVERSKY_RELEASE_PUBLIC_KEYS` — "may this binary REPLACE the daemon?"
11
+ * `FIRST_PARTY_HARNESS_RELEASE_PUBLIC_KEYS` — "may this binary receive a
12
+ * platform credential?"
13
+ *
14
+ * Sharing one key means a compromise of the harness signing identity is also a
15
+ * forged-daemon-self-update primitive: an attacker who can sign a harness can
16
+ * sign a manifest that the daemon installs over itself. That is a strictly
17
+ * larger blast radius than the harness key needs to carry, and it is
18
+ * unnecessary — the two artifacts have different release cadences and
19
+ * different publishers, so they were always going to want independent
20
+ * rotation.
21
+ *
22
+ * Separating them costs one more secret to provision and removes an
23
+ * escalation path. That trade is not close.
24
+ *
25
+ * ── Fail-closed, and in the direction that matters ─────────────────────────
26
+ *
27
+ * EMPTY means provenance can never be established. Until 2026-08-11 that also
28
+ * meant the first-party harness was held at Tier 2 on a scoped gateway token; that
29
+ * floor has since been removed, and it is DECLARED Tier 1, so an empty list no
30
+ * longer withholds the credential privilege from it. What an empty list still
31
+ * costs is the ability to say WHICH BYTES held the credential — the verdict
32
+ * becomes `unverifiable`, and the record is silent about the binary on disk.
33
+ *
34
+ * The fail-closed direction below still governs every OTHER
35
+ * OverSky-distributed harness, and remains the correct posture for this one if
36
+ * the floor is ever restored.
37
+ *
38
+ * Note this is the OPPOSITE posture to the daemon's own `../release-keys.ts`
39
+ * (same basename, different module), deliberately. There,
40
+ * an empty list disables verification and the updater proceeds, because a fleet
41
+ * that cannot update is its own outage. Here, an empty list withholds a
42
+ * privilege, because absence of evidence must never grant one. Getting these
43
+ * two backwards would mean provisioning a key *reduces* what the daemon trusts.
44
+ *
45
+ * ── Provisioning ──────────────────────────────────────────────────────────
46
+ *
47
+ * 1. Mint: node scripts/first-party-harness/generate-signing-key.mjs (in the fork)
48
+ * 2. Store the PRIVATE half as the GH Actions secret
49
+ * `FIRST_PARTY_HARNESS_ENV.signingKey.name` (the only name the publish
50
+ * workflow reads) + AWS Secrets Manager. It must never be committed and
51
+ * never leave CI.
52
+ * 3. Paste the PUBLIC half below, newest first.
53
+ * 4. Ship a daemon build carrying it BEFORE the first signed harness
54
+ * release, so the fleet can verify what it is about to be handed.
55
+ *
56
+ * Rotation is the same shape as the daemon's: add the next key ABOVE the
57
+ * current one, ship that build, then start dual-signing. Verification accepts
58
+ * any pinned key, so an overlap window has no gap.
59
+ */
60
+ import type { ReleaseKey } from './releaseKeys.js';
61
+ export type { ReleaseKey };
62
+ /**
63
+ * Pinned first-party harness signing public keys, newest first.
64
+ *
65
+ * Provisioned 2026-08-07 (WL-6.8). The private half lives in the GitHub secret
66
+ * named by `FIRST_PARTY_HARNESS_ENV.signingKey` and in AWS Secrets Manager — a
67
+ * HARNESS key, deliberately a different trust domain from the daemon
68
+ * self-update key in `../release-keys.ts`.
69
+ *
70
+ * ── Two literals that must NOT follow a rename (contract §6) ────────────────
71
+ * The `keyId` below and the AWS secret path `oversky/sky-code/signing-key` are
72
+ * historical identifiers, not the product name. A key id is inside every
73
+ * signature ever issued and every provenance sidecar ever written, so changing
74
+ * it would make every existing release unverifiable; the secret is stateful
75
+ * infrastructure. Both move only at the next key ROTATION.
76
+ *
77
+ * ORDER OF OPERATIONS, and it only works one way round: this pinned build must
78
+ * SHIP before any harness release is signed. Backwards, the fleet receives an
79
+ * artifact it cannot verify and every daemon reports `invalid-signature` —
80
+ * which from the outside is indistinguishable from a real attack.
81
+ */
82
+ export declare const FIRST_PARTY_HARNESS_RELEASE_PUBLIC_KEYS: ReleaseKey[];
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ /**
3
+ * WL-6.8 — ed25519 public keys that vouch for a **first-party harness binary**.
4
+ *
5
+ * ── Why this is not `daemon/src/release-keys.ts` ───────────────────────────
6
+ *
7
+ * `verifyHarnessProvenance` originally defaulted to the daemon's own
8
+ * self-update keys. That is convenient and wrong. Those two keys answer
9
+ * different questions and protect different things:
10
+ *
11
+ * `OVERSKY_RELEASE_PUBLIC_KEYS` — "may this binary REPLACE the daemon?"
12
+ * `FIRST_PARTY_HARNESS_RELEASE_PUBLIC_KEYS` — "may this binary receive a
13
+ * platform credential?"
14
+ *
15
+ * Sharing one key means a compromise of the harness signing identity is also a
16
+ * forged-daemon-self-update primitive: an attacker who can sign a harness can
17
+ * sign a manifest that the daemon installs over itself. That is a strictly
18
+ * larger blast radius than the harness key needs to carry, and it is
19
+ * unnecessary — the two artifacts have different release cadences and
20
+ * different publishers, so they were always going to want independent
21
+ * rotation.
22
+ *
23
+ * Separating them costs one more secret to provision and removes an
24
+ * escalation path. That trade is not close.
25
+ *
26
+ * ── Fail-closed, and in the direction that matters ─────────────────────────
27
+ *
28
+ * EMPTY means provenance can never be established. Until 2026-08-11 that also
29
+ * meant the first-party harness was held at Tier 2 on a scoped gateway token; that
30
+ * floor has since been removed, and it is DECLARED Tier 1, so an empty list no
31
+ * longer withholds the credential privilege from it. What an empty list still
32
+ * costs is the ability to say WHICH BYTES held the credential — the verdict
33
+ * becomes `unverifiable`, and the record is silent about the binary on disk.
34
+ *
35
+ * The fail-closed direction below still governs every OTHER
36
+ * OverSky-distributed harness, and remains the correct posture for this one if
37
+ * the floor is ever restored.
38
+ *
39
+ * Note this is the OPPOSITE posture to the daemon's own `../release-keys.ts`
40
+ * (same basename, different module), deliberately. There,
41
+ * an empty list disables verification and the updater proceeds, because a fleet
42
+ * that cannot update is its own outage. Here, an empty list withholds a
43
+ * privilege, because absence of evidence must never grant one. Getting these
44
+ * two backwards would mean provisioning a key *reduces* what the daemon trusts.
45
+ *
46
+ * ── Provisioning ──────────────────────────────────────────────────────────
47
+ *
48
+ * 1. Mint: node scripts/first-party-harness/generate-signing-key.mjs (in the fork)
49
+ * 2. Store the PRIVATE half as the GH Actions secret
50
+ * `FIRST_PARTY_HARNESS_ENV.signingKey.name` (the only name the publish
51
+ * workflow reads) + AWS Secrets Manager. It must never be committed and
52
+ * never leave CI.
53
+ * 3. Paste the PUBLIC half below, newest first.
54
+ * 4. Ship a daemon build carrying it BEFORE the first signed harness
55
+ * release, so the fleet can verify what it is about to be handed.
56
+ *
57
+ * Rotation is the same shape as the daemon's: add the next key ABOVE the
58
+ * current one, ship that build, then start dual-signing. Verification accepts
59
+ * any pinned key, so an overlap window has no gap.
60
+ */
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ exports.FIRST_PARTY_HARNESS_RELEASE_PUBLIC_KEYS = void 0;
63
+ /**
64
+ * Pinned first-party harness signing public keys, newest first.
65
+ *
66
+ * Provisioned 2026-08-07 (WL-6.8). The private half lives in the GitHub secret
67
+ * named by `FIRST_PARTY_HARNESS_ENV.signingKey` and in AWS Secrets Manager — a
68
+ * HARNESS key, deliberately a different trust domain from the daemon
69
+ * self-update key in `../release-keys.ts`.
70
+ *
71
+ * ── Two literals that must NOT follow a rename (contract §6) ────────────────
72
+ * The `keyId` below and the AWS secret path `oversky/sky-code/signing-key` are
73
+ * historical identifiers, not the product name. A key id is inside every
74
+ * signature ever issued and every provenance sidecar ever written, so changing
75
+ * it would make every existing release unverifiable; the secret is stateful
76
+ * infrastructure. Both move only at the next key ROTATION.
77
+ *
78
+ * ORDER OF OPERATIONS, and it only works one way round: this pinned build must
79
+ * SHIP before any harness release is signed. Backwards, the fleet receives an
80
+ * artifact it cannot verify and every daemon reports `invalid-signature` —
81
+ * which from the outside is indistinguishable from a real attack.
82
+ */
83
+ exports.FIRST_PARTY_HARNESS_RELEASE_PUBLIC_KEYS = [
84
+ // ── NEXT key goes ABOVE this line during a rotation (newest first). ──
85
+ {
86
+ // Literal on purpose: a key id is inside every signature issued (contract §6).
87
+ keyId: 'sky-code-2026-08',
88
+ publicKeySpkiB64: 'MCowBQYDK2VwAyEAO/5glF6bICuz5MGYgG1PJaDEgXJZkUuv2cLzguVZCvY=',
89
+ },
90
+ ];
91
+ /*
92
+ * Dev/test escape hatch: an absolute path to a JSON file holding
93
+ * `[{ keyId, publicKeySpkiB64 }]`, named by `FIRST_PARTY_HARNESS_ENV.devKeys` and
94
+ * read in `./provenance.ts` with `readFirstPartyHarnessEnv(env, 'devKeys')` — its
95
+ * brand-neutral name, the only one read.
96
+ *
97
+ * Exists so a developer can build, sign, and verify a local harness end to end
98
+ * without minting a production key — the alternative is that the whole trust
99
+ * chain is only ever exercised in CI, which is how it rots.
100
+ *
101
+ * Deliberately NOT a way to weaken production: it can only ADD keys a local
102
+ * operator explicitly pointed at, it is read from an absolute path (a relative
103
+ * one would be attacker-influenced via cwd), and a build that ships with an
104
+ * empty pinned list still refuses to elevate without it.
105
+ */
@@ -0,0 +1,110 @@
1
+ import { type FirstPartyHarnessChannel } from './firstPartyHarnessChannels.js';
2
+ import { type DaemonVersionManifest, type PlatformArtifact, type ReleaseKey } from './releaseManifest.js';
3
+ export { FIRST_PARTY_HARNESS_RELEASE_PUBLIC_KEYS } from './firstPartyHarnessReleaseKeys.js';
4
+ export { firstPartyHarnessFeedBase, firstPartyHarnessFeedCandidates, } from './firstPartyHarnessChannels.js';
5
+ export { firstPartyHarnessManifestFile } from './firstPartyHarness.js';
6
+ export type { ReleaseKey } from './releaseManifest.js';
7
+ export declare const PREVIOUS_SUFFIX = ".previous";
8
+ export declare const PROVENANCE_SUFFIX = ".oversky-provenance.json";
9
+ export declare const MAX_ARTIFACT_BYTES: number;
10
+ export type InstallFailureCode = 'unsupported-platform' | 'feed-unreachable' | 'manifest-malformed' | 'manifest-unverified' | 'artifact-missing' | 'artifact-unverified' | 'download-failed' | 'hash-mismatch' | 'too-large' | 'install-failed' | 'no-pinned-keys' | 'downgrade-refused' | 'version-invalid' | 'lock-busy' | 'minimum-version' | 'policy-rejected';
11
+ export interface InstallResult {
12
+ ok: boolean;
13
+ version?: string;
14
+ platform?: string;
15
+ binaryPath?: string;
16
+ replaced?: boolean;
17
+ changed?: boolean;
18
+ reason?: string;
19
+ code?: InstallFailureCode;
20
+ error?: string;
21
+ }
22
+ export interface InstallOptions {
23
+ env?: NodeJS.ProcessEnv;
24
+ keys?: readonly ReleaseKey[];
25
+ fetchImpl?: typeof fetch;
26
+ platform?: NodeJS.Platform;
27
+ arch?: string;
28
+ onProgress?: (message: string) => void;
29
+ version?: string;
30
+ allowDowngrade?: boolean;
31
+ signal?: AbortSignal;
32
+ manifestTimeoutMs?: number;
33
+ autonomous?: boolean;
34
+ cohortSubject?: string;
35
+ contracts?: Record<string, number>;
36
+ now?: Date;
37
+ }
38
+ export interface HarnessProvenanceRecord {
39
+ version: string;
40
+ platform: string;
41
+ sha256: string;
42
+ url: string;
43
+ sig: string;
44
+ sigs?: PlatformArtifact['sigs'];
45
+ keyId?: string;
46
+ }
47
+ export interface FirstPartyHarnessUpdateState {
48
+ operation: 'install' | 'rollback';
49
+ status: 'running' | 'succeeded' | 'failed';
50
+ attemptedAt: number;
51
+ completedAt?: number;
52
+ targetVersion?: string;
53
+ installedVersion?: string;
54
+ code?: InstallFailureCode;
55
+ error?: string;
56
+ changed?: boolean;
57
+ }
58
+ type InstallFailure = InstallResult & {
59
+ ok: false;
60
+ };
61
+ export declare function firstPartyHarnessInstallDir(env?: NodeJS.ProcessEnv): string;
62
+ export declare function firstPartyHarnessBinaryPath(env?: NodeJS.ProcessEnv): string;
63
+ export declare function firstPartyHarnessPlatformKey(platform?: NodeJS.Platform, arch?: string): string | null;
64
+ export declare function fetchVerifiedManifest(options?: InstallOptions): Promise<{
65
+ ok: true;
66
+ manifest: DaemonVersionManifest;
67
+ } | InstallFailure>;
68
+ export declare function isManagedFirstPartyHarnessReleasePath(binaryPath: string, env?: NodeJS.ProcessEnv): boolean;
69
+ /** Read a single immutable binary/sidecar pair, never two different `current` targets. */
70
+ export declare function getVerifiedInstalledFirstPartyHarness(options?: Pick<InstallOptions, 'env' | 'keys' | 'platform' | 'arch'>): {
71
+ binaryPath: string;
72
+ version: string | null;
73
+ verified: boolean;
74
+ exists: boolean;
75
+ provenance: HarnessProvenanceRecord | null;
76
+ };
77
+ export declare function readFirstPartyHarnessUpdateState(env?: NodeJS.ProcessEnv): FirstPartyHarnessUpdateState | null;
78
+ export interface ActivateFirstPartyHarnessOptions {
79
+ binary: Buffer;
80
+ provenance: HarnessProvenanceRecord;
81
+ env?: NodeJS.ProcessEnv;
82
+ keys?: readonly ReleaseKey[];
83
+ platform?: NodeJS.Platform;
84
+ arch?: string;
85
+ allowDowngrade?: boolean;
86
+ onProgress?: (message: string) => void;
87
+ preserveUnknownInstalled?: boolean;
88
+ preserveExternalLink?: boolean;
89
+ /** Optional already verified signed manifest; retained as minimum-floor evidence. */
90
+ manifest?: DaemonVersionManifest;
91
+ }
92
+ /** Desktop's already-downloaded signed artifact uses the exact same transaction. */
93
+ export declare function activateVerifiedFirstPartyHarnessArtifact(options: ActivateFirstPartyHarnessOptions): InstallResult;
94
+ /** Signed-manifest check reads only; no lock, migration, state writes or login. */
95
+ export declare function checkFirstPartyHarnessUpdate(options?: InstallOptions): Promise<{
96
+ ok: true;
97
+ installedVersion: string | null;
98
+ latestVersion: string;
99
+ channel: FirstPartyHarnessChannel;
100
+ updateAvailable: boolean;
101
+ binaryPath: string;
102
+ owner: 'managed' | 'external';
103
+ installedVerified: boolean;
104
+ minimumVersion: string;
105
+ lastUpdate: FirstPartyHarnessUpdateState | null;
106
+ } | InstallFailure>;
107
+ export declare function installFirstPartyHarness(options?: InstallOptions): Promise<InstallResult>;
108
+ /** Rollback validates the retained immutable release and preserves its signature. */
109
+ export declare function rollbackFirstPartyHarness(env?: NodeJS.ProcessEnv, options?: Pick<InstallOptions, 'keys'>): InstallResult;
110
+ export declare function installedFirstPartyHarnessSize(env?: NodeJS.ProcessEnv): number | null;