bulletin-deploy 0.18.4 → 0.19.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.
Files changed (57) hide show
  1. package/README.md +1 -1
  2. package/dist/auth-config.js +4 -4
  3. package/dist/bug-report.js +4 -4
  4. package/dist/chain-health.js +3 -3
  5. package/dist/{chunk-K23BCUAG.js → chunk-6H3GBTBA.js} +21 -16
  6. package/dist/{chunk-GZ4O5DIU.js → chunk-A7MFUE2N.js} +1 -1
  7. package/dist/chunk-DMNLTQGA.js +64 -0
  8. package/dist/{chunk-WCGCM45C.js → chunk-G2Z4U4OQ.js} +11 -44
  9. package/dist/{chunk-TTUXQMD3.js → chunk-G664B5Y4.js} +1 -1
  10. package/dist/{chunk-CVQ7DJHG.js → chunk-I5PNPQZO.js} +64 -3
  11. package/dist/{chunk-5HFXRNCQ.js → chunk-IQUS43B7.js} +1 -1
  12. package/dist/{chunk-4NIOCONP.js → chunk-J6N3W3KJ.js} +1 -1
  13. package/dist/{chunk-STXAFUTQ.js → chunk-JZTZWMP7.js} +4 -1
  14. package/dist/{chunk-7I3MTGOR.js → chunk-K5SP4OUC.js} +19 -1
  15. package/dist/{chunk-MJCXPKBL.js → chunk-K6OAMQQU.js} +62 -14
  16. package/dist/{chunk-JGIPHFBT.js → chunk-KXQVZWDW.js} +2 -2
  17. package/dist/{chunk-WEVSXHII.js → chunk-NKDGBZBP.js} +1 -1
  18. package/dist/{chunk-HDGD5FYX.js → chunk-NYNAUG4V.js} +13 -4
  19. package/dist/{chunk-A55GRHCX.js → chunk-R7HIFZDM.js} +3 -3
  20. package/dist/{chunk-E7PNP2NP.js → chunk-RBI2B5SW.js} +3 -3
  21. package/dist/{chunk-5MS64TTR.js → chunk-SVVPNIGN.js} +2 -2
  22. package/dist/{chunk-RXV677CJ.js → chunk-YTRNJMI4.js} +7 -36
  23. package/dist/chunk-probe.js +3 -3
  24. package/dist/commands/login.js +13 -13
  25. package/dist/commands/logout.js +5 -5
  26. package/dist/commands/transfer.js +6 -6
  27. package/dist/commands/whoami.js +4 -4
  28. package/dist/deploy-actors.js +8 -8
  29. package/dist/deploy.d.ts +1 -1
  30. package/dist/deploy.js +13 -13
  31. package/dist/dotns-protocol.d.ts +32 -1
  32. package/dist/dotns-protocol.js +5 -1
  33. package/dist/dotns.d.ts +12 -3
  34. package/dist/dotns.js +8 -6
  35. package/dist/environments.d.ts +5 -2
  36. package/dist/environments.js +3 -1
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.js +21 -20
  39. package/dist/manifest/byte-budget.js +2 -1
  40. package/dist/manifest/compose.d.ts +20 -0
  41. package/dist/manifest/compose.js +8 -0
  42. package/dist/manifest/config-load.js +2 -2
  43. package/dist/manifest/publish.js +18 -17
  44. package/dist/manifest/schema.js +1 -1
  45. package/dist/manifest/types.d.ts +29 -1
  46. package/dist/memory-report.js +2 -2
  47. package/dist/merkle.js +13 -13
  48. package/dist/personhood/bootstrap.js +7 -7
  49. package/dist/personhood/people-client.js +6 -6
  50. package/dist/run-state.js +1 -1
  51. package/dist/sss-allowance-cache.js +5 -5
  52. package/dist/storage-signer.js +13 -13
  53. package/dist/telemetry.d.ts +1 -1
  54. package/dist/telemetry.js +2 -2
  55. package/dist/version-check.js +3 -3
  56. package/docs/product-manifest.md +76 -0
  57. package/package.json +3 -3
package/dist/run-state.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  shouldSkipStaleWarning,
8
8
  stateFilePath,
9
9
  writeRunState
10
- } from "./chunk-E7PNP2NP.js";
10
+ } from "./chunk-RBI2B5SW.js";
11
11
  export {
12
12
  VERSION,
13
13
  loadRunState,
@@ -4,14 +4,14 @@ import {
4
4
  preflightSssAllowance,
5
5
  sssPeriodEndSec,
6
6
  writeSssAllowanceCache
7
- } from "./chunk-GZ4O5DIU.js";
7
+ } from "./chunk-A7MFUE2N.js";
8
8
  import "./chunk-GRPLHUYC.js";
9
- import "./chunk-5MS64TTR.js";
9
+ import "./chunk-SVVPNIGN.js";
10
10
  import "./chunk-TSPERKUS.js";
11
- import "./chunk-HDGD5FYX.js";
11
+ import "./chunk-NYNAUG4V.js";
12
12
  import "./chunk-ZOC4GITL.js";
13
- import "./chunk-STXAFUTQ.js";
14
- import "./chunk-E7PNP2NP.js";
13
+ import "./chunk-JZTZWMP7.js";
14
+ import "./chunk-RBI2B5SW.js";
15
15
  export {
16
16
  clearSssAllowanceCache,
17
17
  isSssAllowanceCacheValid,
@@ -8,34 +8,34 @@ import {
8
8
  waitForBulletinAuthorization,
9
9
  withTransientRetry,
10
10
  writeBulletinSlotKey
11
- } from "./chunk-K23BCUAG.js";
11
+ } from "./chunk-6H3GBTBA.js";
12
12
  import "./chunk-HNJWIY55.js";
13
13
  import "./chunk-M5AKL3FL.js";
14
- import "./chunk-GZ4O5DIU.js";
14
+ import "./chunk-A7MFUE2N.js";
15
15
  import "./chunk-GRPLHUYC.js";
16
16
  import "./chunk-IW3X2MJF.js";
17
17
  import "./chunk-LPTKBQII.js";
18
18
  import "./chunk-3MAIF2SF.js";
19
19
  import "./chunk-WPC2PUCV.js";
20
- import "./chunk-A55GRHCX.js";
21
- import "./chunk-TTUXQMD3.js";
22
- import "./chunk-4NIOCONP.js";
20
+ import "./chunk-R7HIFZDM.js";
21
+ import "./chunk-G664B5Y4.js";
22
+ import "./chunk-J6N3W3KJ.js";
23
23
  import "./chunk-C2TS5MER.js";
24
- import "./chunk-JGIPHFBT.js";
24
+ import "./chunk-KXQVZWDW.js";
25
25
  import "./chunk-JQKKMUCT.js";
26
26
  import "./chunk-5FLTDWWP.js";
27
27
  import "./chunk-RIRDBSBG.js";
28
- import "./chunk-MJCXPKBL.js";
28
+ import "./chunk-K6OAMQQU.js";
29
29
  import "./chunk-SI2ZUOYD.js";
30
30
  import "./chunk-AYAVRPAP.js";
31
- import "./chunk-5MS64TTR.js";
31
+ import "./chunk-SVVPNIGN.js";
32
32
  import "./chunk-TSPERKUS.js";
33
- import "./chunk-HDGD5FYX.js";
33
+ import "./chunk-NYNAUG4V.js";
34
34
  import "./chunk-ZOC4GITL.js";
35
- import "./chunk-5HFXRNCQ.js";
36
- import "./chunk-STXAFUTQ.js";
37
- import "./chunk-E7PNP2NP.js";
38
- import "./chunk-7I3MTGOR.js";
35
+ import "./chunk-IQUS43B7.js";
36
+ import "./chunk-JZTZWMP7.js";
37
+ import "./chunk-RBI2B5SW.js";
38
+ import "./chunk-K5SP4OUC.js";
39
39
  export {
40
40
  BulletinSlotAuthError,
41
41
  extractBulletinSlotKey,
@@ -79,7 +79,7 @@ declare function isExpectedError(msg: string, variant?: string): boolean;
79
79
  declare function classifyDeployError(msg: string, variant?: string): DeployErrorCategory;
80
80
  declare function classifySadReason(message: string): string;
81
81
  declare function computeDeployOutcome(errorCategory: DeployErrorCategory | null, isSad: boolean, sadReason: string): string;
82
- type DeployErrorKind = 'contract-revert' | 'chain-timeout' | 'nonce-stale' | 'connection' | 'naming.pop_required' | 'naming.nostatus_required' | 'naming.contract_unavailable' | 'naming.contract_function_removed' | 'dotns.abi_decode_empty' | 'naming.already_owned' | 'naming.governance_reserved' | 'naming.short_names_closed' | 'naming.subdomain_orphan' | 'naming.tld_mismatch' | 'funding.insufficient_balance' | 'verify.contenthash_mismatch' | 'verify.dagpb_not_finalised' | 'network.recovery_exhausted' | 'account.mapping_pending' | 'chain.api_timeout' | 'chain.tx_timeout' | 'chain.tx_silent' | 'chain.extrinsic_expired' | 'chain.quota_exhausted' | 'chain.bad_proof' | 'signer.message_too_large' | 'storage.rejected' | 'user.aborted' | 'signer.phone_confirmation_unavailable' | 'tool.invariant' | 'unknown';
82
+ type DeployErrorKind = 'contract-revert' | 'chain-timeout' | 'nonce-stale' | 'connection' | 'naming.pop_required' | 'naming.nostatus_required' | 'naming.contract_unavailable' | 'naming.contract_function_removed' | 'dotns.abi_decode_empty' | 'naming.already_owned' | 'naming.governance_reserved' | 'naming.short_names_closed' | 'naming.soulbound' | 'naming.subdomain_orphan' | 'naming.tld_mismatch' | 'funding.insufficient_balance' | 'verify.contenthash_mismatch' | 'verify.dagpb_not_finalised' | 'network.recovery_exhausted' | 'account.mapping_pending' | 'chain.api_timeout' | 'chain.tx_timeout' | 'chain.tx_silent' | 'chain.extrinsic_expired' | 'chain.quota_exhausted' | 'chain.bad_proof' | 'signer.message_too_large' | 'storage.rejected' | 'user.aborted' | 'signer.phone_confirmation_unavailable' | 'tool.invariant' | 'unknown';
83
83
  /**
84
84
  * Every kind that some rule below can produce. Exported so the test suite can
85
85
  * assert the fall-through guard actually covers all of them — without that,
package/dist/telemetry.js CHANGED
@@ -41,8 +41,8 @@ import {
41
41
  withDeploySpan,
42
42
  withManifestSpan,
43
43
  withSpan
44
- } from "./chunk-STXAFUTQ.js";
45
- import "./chunk-E7PNP2NP.js";
44
+ } from "./chunk-JZTZWMP7.js";
45
+ import "./chunk-RBI2B5SW.js";
46
46
  export {
47
47
  VERSION,
48
48
  __setDeployRootSpanForTest,
@@ -12,9 +12,9 @@ import {
12
12
  isPreReleaseVersion,
13
13
  preReleaseWarning,
14
14
  promptYesNo
15
- } from "./chunk-TTUXQMD3.js";
16
- import "./chunk-STXAFUTQ.js";
17
- import "./chunk-E7PNP2NP.js";
15
+ } from "./chunk-G664B5Y4.js";
16
+ import "./chunk-JZTZWMP7.js";
17
+ import "./chunk-RBI2B5SW.js";
18
18
  export {
19
19
  assessVersion,
20
20
  checkNodeVersion,
@@ -0,0 +1,76 @@
1
+ # Product manifest
2
+
3
+ A deploy writes two kinds of manifest to dotNS text records, from one `bulletin-deploy.config.ts`:
4
+
5
+ - a **root manifest** on the product's base name, as the `manifest` text record — who the product is
6
+ - one **executable manifest** per modality, on `app|widget|funding|worker.<product>.<tld>`, as the `executable` text record — how to run it
7
+
8
+ Both are JSON, both carry a `$v` schema version, and both are composed from the same config file by `publishManifest`. The shapes follow the RFC at `paritytech/host-rust-core` `docs/rfcs/product-manifest.md`, which is authoritative where this document is thinner.
9
+
10
+ ## Config
11
+
12
+ `bulletin-deploy.config.ts` default-exports a `ProductConfig`. `defineConfig` is an identity helper that exists to give editors the discriminated union for `executables`:
13
+
14
+ ```ts
15
+ import { defineConfig } from "bulletin-deploy";
16
+
17
+ export default defineConfig({
18
+ domain: "humanity.dot", // the product's dotNS name, including the TLD
19
+ displayName: "Humanity", // shown to a person choosing the product
20
+ description: "One identity …", // one line, also shown to a person
21
+ icon: { path: "./icon.png", format: "png" }, // png or jpeg, uploaded and referenced by CID
22
+ executables: [ // one entry per modality; kinds must be unique
23
+ { kind: "app", path: "../dist", appVersion: [1, 4, 0] },
24
+ ],
25
+ trustedProducts: { dim2: ["context"] }, // optional; see below
26
+ });
27
+ ```
28
+
29
+ | Field | Required | Notes |
30
+ |---|---|---|
31
+ | `domain` | yes | Must end in the TLD the target environment's registry reports, checked before any chain write |
32
+ | `displayName` | yes | Non-empty |
33
+ | `description` | yes | May be empty |
34
+ | `icon` | yes | `path` is relative to the config file; `format` is `png` or `jpeg` |
35
+ | `executables` | yes | Non-empty; one entry per `kind` |
36
+ | `trustedProducts` | no | Cross-product grants, keyed by the other product's bare label |
37
+
38
+ ## Trusted products
39
+
40
+ `trustedProducts` pre-approves cross-product interactions that the Host would otherwise prompt for. Each entry names what another product may do **to this one**, and says nothing about the reverse direction:
41
+
42
+ ```ts
43
+ trustedProducts: {
44
+ dim2: ["context"], // dim2 may act as this product's account
45
+ gallery: ["storage"], // gallery may read this product's host-local storage
46
+ suite: ["all"], // suite gets every mediated interaction, present and future
47
+ }
48
+ ```
49
+
50
+ - **Keys are bare product labels with no TLD suffix** — `dim2`, never `dim2.paseo`. The Host appends the TLD of the network it resolves against. A key written with a suffix resolves to a name that does not exist, so the entry grants nothing.
51
+ - **Values are a set.** Order is not significant and duplicates collapse. `all` is a superset: `["all", "storage"]` means `["all"]`.
52
+ - **`context` is materially wider than `storage`.** It covers acting as the product's account — reading its identity, and producing signatures and ring-VRF proofs under its keys. A product granted `context` can sign as the grantor.
53
+ - **Absence, `{}` and an empty array all mean no grants**, and the Host prompts as usual.
54
+ - **A key naming a product that does not resolve is inert**, not an error. So is a product listing itself.
55
+
56
+ The composer normalises before writing: it sorts keys and grants, collapses `all`, drops empty entries and drops a self-listing. A config that differs only in ordering therefore serialises to identical bytes, which keeps the skip-if-unchanged pre-check from billing an on-chain write for a change that is not one.
57
+
58
+ ### Validation is asymmetric
59
+
60
+ Publishing is strict; reading is lenient. The two run in opposite directions on purpose, and the RFC requires both:
61
+
62
+ - `validateProductConfig` **rejects** a TLD-suffixed key and an unrecognised grant value. A publisher must not emit either, and both would otherwise deploy green and grant nothing — the failure is silent at exactly the point where it is still cheap to catch.
63
+ - `validateRootManifest` **accepts** both. It models whether a Host would accept a manifest already on chain, and a Host ignores an unrecognised grant while keeping the recognised ones in the same entry. A manifest carrying a grant from a newer RFC version still has to validate.
64
+
65
+ Structural errors — `trustedProducts` not an object, a value not an array — fail on both sides.
66
+
67
+ ## Byte budget
68
+
69
+ Each text record must fit the dotNS wire limit, **1024 bytes** by default, overridable with `BULLETIN_TEXT_BUDGET` for probing a raised cap. A typical root manifest uses about 180 bytes, leaving roughly 844. One grant costs about 39 bytes, so the limit sits around 39 entries.
70
+
71
+ `trustedProducts` is the only unbounded field in root manifest v1. The preflight composes every record with a placeholder CID and measures it before any upload, so an oversized config aborts with no chain writes. The check runs twice — once at config load, once inside `publishManifest` for callers using it as a library.
72
+
73
+ ## Open questions
74
+
75
+ - The 1024-byte budget is this tool's conservative figure, not a value read from the chain. The dotNS team's proof-of-concept will confirm the real cap.
76
+ - `Granted` covers the three values v1 defines. Further values fit the same shape without a `$v` bump, since the ignore-unrecognised rule already covers them — but a config using one fails this tool's publish-side validation until it is added here.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulletin-deploy",
3
- "version": "0.18.4",
3
+ "version": "0.19.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,11 +46,11 @@
46
46
  "tools/verify-baked-dsn.mjs"
47
47
  ],
48
48
  "scripts": {
49
- "build": "tsup src/suppress-localstorage-warning.ts src/index.ts src/deploy.ts src/dotns.ts src/dotns-protocol.ts src/pool.ts src/telemetry.ts src/chain-health.ts src/memory-report.ts src/merkle.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/subname-depth.ts src/manifest.ts src/chunk-probe.ts src/manifest-embed.ts src/manifest-fetch.ts src/manifest-roundtrip.ts src/incremental-stats.ts src/chunker.ts src/personhood/encoding.ts src/personhood/hashing.ts src/personhood/constants.ts src/personhood/member-key.ts src/personhood/people-client.ts src/personhood/proof-validity.ts src/personhood/ring-proof.ts src/personhood/reprove.ts src/personhood/bind-personal-id.ts src/personhood/claim-pgas.ts src/personhood/bind-paid-alias.ts src/personhood/bootstrap.ts src/personhood/chain-prereqs.ts src/manifest/types.ts src/manifest/schema.ts src/manifest/byte-budget.ts src/manifest/config-load.ts src/manifest/publish.ts src/auth/index.ts src/auth/vendor/index.ts src/auth/vendor/ui/index.ts src/auth-config.ts src/commands/login.ts src/commands/logout.ts src/commands/whoami.ts src/commands/transfer.ts src/storage-signer.ts src/spinner.ts src/sss-allowance.ts src/sss-allowance-cache.ts src/deploy-actors.ts src/product-account.ts --format esm --dts --clean --target node22",
49
+ "build": "tsup src/suppress-localstorage-warning.ts src/index.ts src/deploy.ts src/dotns.ts src/dotns-protocol.ts src/pool.ts src/telemetry.ts src/chain-health.ts src/memory-report.ts src/merkle.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/subname-depth.ts src/manifest.ts src/chunk-probe.ts src/manifest-embed.ts src/manifest-fetch.ts src/manifest-roundtrip.ts src/incremental-stats.ts src/chunker.ts src/personhood/encoding.ts src/personhood/hashing.ts src/personhood/constants.ts src/personhood/member-key.ts src/personhood/people-client.ts src/personhood/proof-validity.ts src/personhood/ring-proof.ts src/personhood/reprove.ts src/personhood/bind-personal-id.ts src/personhood/claim-pgas.ts src/personhood/bind-paid-alias.ts src/personhood/bootstrap.ts src/personhood/chain-prereqs.ts src/manifest/types.ts src/manifest/schema.ts src/manifest/byte-budget.ts src/manifest/compose.ts src/manifest/config-load.ts src/manifest/publish.ts src/auth/index.ts src/auth/vendor/index.ts src/auth/vendor/ui/index.ts src/auth-config.ts src/commands/login.ts src/commands/logout.ts src/commands/whoami.ts src/commands/transfer.ts src/storage-signer.ts src/spinner.ts src/sss-allowance.ts src/sss-allowance-cache.ts src/deploy-actors.ts src/product-account.ts --format esm --dts --clean --target node22",
50
50
  "refresh-environments": "node scripts/refresh-environments.mjs",
51
51
  "postinstall": "patch-package || true",
52
52
  "prepare": "npm run build",
53
- "test": "npm run build && node --test test/test.js test/cli-help.test.js test/helpers/e2e-helpers.test.js test/helpers/e2e-exit-guard.test.js test/environments.test.js test/refresh-environments.test.js test/chunk-sharing-report.test.js test/dotns-deployments-parser.test.js test/dotns-token-id.test.js test/dotns-subnode-id.test.js test/dotns-protocol.test.js test/product-manifest.test.js test/cache-savings-totals.test.js test/error-pattern-signature.test.js test/exit-codes.test.js test/probe-env-health.test.js test/e2e-chain-calls.test.js test/auth-config.test.js test/whoami.test.js test/login.test.js test/logout.test.js test/auth-resolve.test.js test/storage-signer.test.js test/spinner.test.js test/sss-allowance.test.js test/sss-allowance-cache.test.js test/dotns-transfer.test.js test/deploy-actors.test.js test/transfer-command.test.js test/dotns-register-fee.test.js test/deploy-label-ordering.test.js test/benign-teardown.test.js test/verify-baked-dsn.test.js test/product-account.test.js test/post-release-monitor-skill.test.js test/test-release-retry-wrapper.js test/reprove-alias-tool.test.js test/bootstrap-env.test.js test/check-chain-identity.test.js && npm run test:vendor",
53
+ "test": "npm run build && node --test test/test.js test/cli-help.test.js test/helpers/e2e-helpers.test.js test/helpers/e2e-exit-guard.test.js test/environments.test.js test/refresh-environments.test.js test/chunk-sharing-report.test.js test/dotns-deployments-parser.test.js test/dotns-token-id.test.js test/dotns-subnode-id.test.js test/dotns-protocol.test.js test/product-manifest.test.js test/manifest-trusted-products.test.js test/cache-savings-totals.test.js test/error-pattern-signature.test.js test/exit-codes.test.js test/probe-env-health.test.js test/e2e-chain-calls.test.js test/auth-config.test.js test/whoami.test.js test/login.test.js test/logout.test.js test/auth-resolve.test.js test/storage-signer.test.js test/spinner.test.js test/sss-allowance.test.js test/sss-allowance-cache.test.js test/dotns-transfer.test.js test/deploy-actors.test.js test/transfer-command.test.js test/dotns-register-fee.test.js test/deploy-label-ordering.test.js test/benign-teardown.test.js test/verify-baked-dsn.test.js test/product-account.test.js test/post-release-monitor-skill.test.js test/test-release-retry-wrapper.js test/reprove-alias-tool.test.js test/bootstrap-env.test.js test/check-chain-identity.test.js && npm run test:vendor",
54
54
  "test:e2e": "npm run build && node --test test/e2e.test.js",
55
55
  "test:e2e:smoke": "bash scripts/e2e-pass.sh smoke",
56
56
  "test:e2e:pr": "bash scripts/e2e-pass.sh pr",