@artblocks/abx-cli 0.1.0-alpha.4 → 0.1.0-alpha.41

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 (189) hide show
  1. package/CHANGELOG.md +161 -0
  2. package/assets/renderer-scaffold/README.md +41 -11
  3. package/assets/renderer-scaffold/foundry.toml +5 -0
  4. package/assets/renderer-scaffold/remappings.txt +1 -1
  5. package/assets/renderer-scaffold/script/DeployHooks.s.sol +24 -0
  6. package/assets/renderer-scaffold/script/Preview.s.sol +99 -0
  7. package/assets/renderer-scaffold/src/MyHooks.sol +20 -0
  8. package/assets/renderer-scaffold/src/MyRenderer.sol +4 -4
  9. package/assets/renderer-scaffold/src/MyTraits.sol +2 -2
  10. package/assets/renderer-scaffold/test/MyRenderer.t.sol +60 -3
  11. package/dist/bin.d.ts +26 -0
  12. package/dist/bin.d.ts.map +1 -0
  13. package/dist/bin.js +63 -0
  14. package/dist/bin.js.map +1 -0
  15. package/dist/capabilities.d.ts +99 -0
  16. package/dist/capabilities.d.ts.map +1 -0
  17. package/dist/capabilities.js +144 -0
  18. package/dist/capabilities.js.map +1 -0
  19. package/dist/commands/auth.d.ts +54 -0
  20. package/dist/commands/auth.d.ts.map +1 -0
  21. package/dist/commands/auth.js +447 -0
  22. package/dist/commands/auth.js.map +1 -0
  23. package/dist/commands/deploy.d.ts +242 -0
  24. package/dist/commands/deploy.d.ts.map +1 -0
  25. package/dist/commands/deploy.js +5429 -0
  26. package/dist/commands/deploy.js.map +1 -0
  27. package/dist/commands/feedback.d.ts +7 -0
  28. package/dist/commands/feedback.d.ts.map +1 -0
  29. package/dist/commands/feedback.js +147 -0
  30. package/dist/commands/feedback.js.map +1 -0
  31. package/dist/commands/maintenance.d.ts +4 -0
  32. package/dist/commands/maintenance.d.ts.map +1 -0
  33. package/dist/commands/maintenance.js +114 -0
  34. package/dist/commands/maintenance.js.map +1 -0
  35. package/dist/commands/project.d.ts +429 -0
  36. package/dist/commands/project.d.ts.map +1 -0
  37. package/dist/commands/project.js +1720 -0
  38. package/dist/commands/project.js.map +1 -0
  39. package/dist/commands/reads.d.ts +85 -0
  40. package/dist/commands/reads.d.ts.map +1 -0
  41. package/dist/commands/reads.js +868 -0
  42. package/dist/commands/reads.js.map +1 -0
  43. package/dist/commands/scaffold.d.ts +89 -0
  44. package/dist/commands/scaffold.d.ts.map +1 -0
  45. package/dist/commands/scaffold.js +738 -0
  46. package/dist/commands/scaffold.js.map +1 -0
  47. package/dist/commands/service.d.ts +67 -0
  48. package/dist/commands/service.d.ts.map +1 -0
  49. package/dist/commands/service.js +748 -0
  50. package/dist/commands/service.js.map +1 -0
  51. package/dist/commands/storage.d.ts +51 -0
  52. package/dist/commands/storage.d.ts.map +1 -0
  53. package/dist/commands/storage.js +399 -0
  54. package/dist/commands/storage.js.map +1 -0
  55. package/dist/commands/submit-app.d.ts +102 -0
  56. package/dist/commands/submit-app.d.ts.map +1 -0
  57. package/dist/commands/submit-app.js +622 -0
  58. package/dist/commands/submit-app.js.map +1 -0
  59. package/dist/config.d.ts +105 -2
  60. package/dist/config.d.ts.map +1 -1
  61. package/dist/config.js +351 -12
  62. package/dist/config.js.map +1 -1
  63. package/dist/conformance.d.ts +31 -0
  64. package/dist/conformance.d.ts.map +1 -0
  65. package/dist/conformance.js +390 -0
  66. package/dist/conformance.js.map +1 -0
  67. package/dist/contract-read-error.d.ts +5 -0
  68. package/dist/contract-read-error.d.ts.map +1 -0
  69. package/dist/contract-read-error.js +37 -0
  70. package/dist/contract-read-error.js.map +1 -0
  71. package/dist/deploy-plan.d.ts +150 -0
  72. package/dist/deploy-plan.d.ts.map +1 -0
  73. package/dist/deploy-plan.js +31 -0
  74. package/dist/deploy-plan.js.map +1 -0
  75. package/dist/deps.d.ts +6 -39
  76. package/dist/deps.d.ts.map +1 -1
  77. package/dist/deps.js +4 -68
  78. package/dist/deps.js.map +1 -1
  79. package/dist/errors.d.ts +20 -0
  80. package/dist/errors.d.ts.map +1 -0
  81. package/dist/errors.js +25 -0
  82. package/dist/errors.js.map +1 -0
  83. package/dist/flag-allowlists.d.ts +53 -0
  84. package/dist/flag-allowlists.d.ts.map +1 -0
  85. package/dist/flag-allowlists.js +184 -0
  86. package/dist/flag-allowlists.js.map +1 -0
  87. package/dist/flags.d.ts +47 -0
  88. package/dist/flags.d.ts.map +1 -1
  89. package/dist/flags.js +125 -1
  90. package/dist/flags.js.map +1 -1
  91. package/dist/jsonout.d.ts +37 -0
  92. package/dist/jsonout.d.ts.map +1 -0
  93. package/dist/jsonout.js +79 -0
  94. package/dist/jsonout.js.map +1 -0
  95. package/dist/kind.d.ts +57 -0
  96. package/dist/kind.d.ts.map +1 -0
  97. package/dist/kind.js +122 -0
  98. package/dist/kind.js.map +1 -0
  99. package/dist/main.js +786 -4838
  100. package/dist/main.js.map +1 -1
  101. package/dist/mintpage.d.ts +17 -2
  102. package/dist/mintpage.d.ts.map +1 -1
  103. package/dist/mintpage.js +241 -54
  104. package/dist/mintpage.js.map +1 -1
  105. package/dist/output.d.ts +179 -0
  106. package/dist/output.d.ts.map +1 -0
  107. package/dist/output.js +780 -0
  108. package/dist/output.js.map +1 -0
  109. package/dist/ownerops.d.ts +381 -57
  110. package/dist/ownerops.d.ts.map +1 -1
  111. package/dist/ownerops.js +2014 -359
  112. package/dist/ownerops.js.map +1 -1
  113. package/dist/preview.d.ts +23 -5
  114. package/dist/preview.d.ts.map +1 -1
  115. package/dist/preview.js +95 -43
  116. package/dist/preview.js.map +1 -1
  117. package/dist/prompt.d.ts +17 -0
  118. package/dist/prompt.d.ts.map +1 -0
  119. package/dist/prompt.js +19 -0
  120. package/dist/prompt.js.map +1 -0
  121. package/dist/provision.d.ts +3 -13
  122. package/dist/provision.d.ts.map +1 -1
  123. package/dist/provision.js +19 -21
  124. package/dist/provision.js.map +1 -1
  125. package/dist/remote.d.ts +157 -52
  126. package/dist/remote.d.ts.map +1 -1
  127. package/dist/remote.js +435 -46
  128. package/dist/remote.js.map +1 -1
  129. package/dist/riskgate.d.ts +62 -0
  130. package/dist/riskgate.d.ts.map +1 -0
  131. package/dist/riskgate.js +234 -0
  132. package/dist/riskgate.js.map +1 -0
  133. package/dist/scaffold.d.ts +12 -0
  134. package/dist/scaffold.d.ts.map +1 -0
  135. package/dist/scaffold.js +56 -0
  136. package/dist/scaffold.js.map +1 -0
  137. package/dist/schema.d.ts +36 -1
  138. package/dist/schema.d.ts.map +1 -1
  139. package/dist/schema.js +121 -26
  140. package/dist/schema.js.map +1 -1
  141. package/dist/script-chunks.d.ts +8 -0
  142. package/dist/script-chunks.d.ts.map +1 -0
  143. package/dist/script-chunks.js +35 -0
  144. package/dist/script-chunks.js.map +1 -0
  145. package/dist/served.d.ts +30 -0
  146. package/dist/served.d.ts.map +1 -0
  147. package/dist/served.js +112 -0
  148. package/dist/served.js.map +1 -0
  149. package/dist/signer.d.ts +13 -0
  150. package/dist/signer.d.ts.map +1 -1
  151. package/dist/signer.js +84 -15
  152. package/dist/signer.js.map +1 -1
  153. package/dist/update-check.d.ts +86 -5
  154. package/dist/update-check.d.ts.map +1 -1
  155. package/dist/update-check.js +161 -20
  156. package/dist/update-check.js.map +1 -1
  157. package/package.json +13 -12
  158. package/skill/SKILL.md +181 -347
  159. package/skill/agents/openai.yaml +4 -0
  160. package/skill/reference/capabilities.md +188 -0
  161. package/skill/reference/code.md +220 -0
  162. package/skill/reference/creator-token.md +94 -0
  163. package/skill/reference/deploy.md +174 -0
  164. package/skill/reference/diagnose.md +178 -0
  165. package/skill/reference/hosting.md +186 -93
  166. package/skill/reference/operate.md +220 -0
  167. package/skill/reference/services.md +121 -0
  168. package/skill/reference/setup.md +154 -36
  169. package/assets/renderer-scaffold/src/interfaces/IAbxFieldRenderer.sol +0 -32
  170. package/assets/renderer-scaffold/src/interfaces/IAbxParams.sol +0 -26
  171. package/dist/inspect.d.ts +0 -48
  172. package/dist/inspect.d.ts.map +0 -1
  173. package/dist/inspect.js +0 -184
  174. package/dist/inspect.js.map +0 -1
  175. package/dist/migrate.d.ts +0 -65
  176. package/dist/migrate.d.ts.map +0 -1
  177. package/dist/migrate.js +0 -180
  178. package/dist/migrate.js.map +0 -1
  179. package/dist/onchain-uri.d.ts +0 -97
  180. package/dist/onchain-uri.d.ts.map +0 -1
  181. package/dist/onchain-uri.js +0 -243
  182. package/dist/onchain-uri.js.map +0 -1
  183. package/dist/upload.d.ts +0 -28
  184. package/dist/upload.d.ts.map +0 -1
  185. package/dist/upload.js +0 -41
  186. package/dist/upload.js.map +0 -1
  187. package/skill/reference/code-projects.md +0 -246
  188. package/skill/reference/operating.md +0 -116
  189. package/skill/reference/troubleshooting.md +0 -28
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,+FAA+F;AAC/F,MAAM,UAAU,GAAG,SAAS,CAAC;AAE7B,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;AAC5D,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjE;;;;GAIG;AACH,SAAS,aAAa,CAAC,OAAe;IACpC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;IAClD,OAAO,KAAK,KAAK,EAAE,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAe;IACxC,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC;QACnC,CAAC,CAAC,mGAAmG,KAAK,CAAC,0CAA0C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,IAAI;QACvL,CAAC,CAAC,EAAE,CAAC;IACP,OAAO,CACL,KAAK,GAAG,CAAC,GAAG,CAAC,sCAAsC,GAAG,CAAC,aAAa,CAAC,qCAAqC;QAC1G,kBAAkB,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,IAAI;QACxC,kBAAkB,KAAK,CAAC,IAAI,UAAU,EAAE,CAAC,eAAe;QACxD,gCAAgC;QAChC,OAAO,KAAK,CAAC,8BAA8B,CAAC,MAAM,GAAG,CAAC,yBAAyB,CAAC,IAAI;QACpF,OAAO,KAAK,CAAC,YAAY,CAAC,IAAI;QAC9B,MAAM,CACP,CAAC;AACJ,CAAC;AAED,IAAI,CAAC;IACH,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;AAC9B,CAAC;AAAC,MAAM,CAAC;IACP,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC"}
@@ -0,0 +1,99 @@
1
+ import type { Flags } from './flags.js';
2
+ /**
3
+ * The machine-readable ABX capability contract.
4
+ *
5
+ * Keep this deliberately smaller than command help: it records product boundaries and the
6
+ * supported combinations agents routinely get wrong. Command-specific syntax still belongs to
7
+ * `abx help <command>`, while deploy planning belongs to `<deploy-command> --dry-run --json`.
8
+ * Human help, the shipped skill, and tests consume this object instead of maintaining competing
9
+ * matrices in prose.
10
+ */
11
+ export declare const ABX_CAPABILITIES: {
12
+ readonly schemaVersion: 1;
13
+ readonly supportedChains: readonly string[];
14
+ readonly deploymentCommands: {
15
+ readonly deploy: {
16
+ readonly artifact: "one static work";
17
+ readonly unique: {
18
+ readonly contract: "OneOfOneImage (ERC-721)";
19
+ readonly inputs: readonly ["--image"];
20
+ };
21
+ readonly edition: {
22
+ readonly contract: "OneOfOneEdition (ERC-1155)";
23
+ readonly selector: "--copies <n|open>";
24
+ readonly summary: "one work × copies; supports on-chain bytes, on-chain JSON with external media, or a resolver";
25
+ readonly supported: readonly ["--onchain-image (hot or wallet signing)", "--onchain-uri", "--backend", "--public-base-url"];
26
+ readonly unsupported: readonly ["--onchain-image with --unsigned"];
27
+ };
28
+ };
29
+ readonly deploySeries: {
30
+ readonly artifact: "a folder of distinct static works";
31
+ readonly unique: {
32
+ readonly contract: "SeriesImage (ERC-721)";
33
+ readonly inputs: readonly ["--dir"];
34
+ };
35
+ readonly edition: {
36
+ readonly contract: "EditionImage (ERC-1155)";
37
+ readonly selector: "--copies <n|open>";
38
+ readonly summary: "N folder items × copies per id; supports on-chain bytes, on-chain JSON with external media, or a resolver";
39
+ readonly supported: readonly ["--onchain-image (hot or wallet signing)", "--onchain-uri", "--backend", "--public-base-url"];
40
+ readonly unsupported: readonly ["--onchain-image with --unsigned"];
41
+ };
42
+ };
43
+ readonly deployCode: {
44
+ readonly artifact: "a program or field renderer whose output depends on token state";
45
+ readonly unique: {
46
+ readonly contract: "SeriesCode (ERC-721)";
47
+ readonly inputs: readonly ["--script", "--code-dir", "--image-renderer", "--attributes-renderer"];
48
+ };
49
+ readonly edition: {
50
+ readonly contract: "EditionCode (ERC-1155)";
51
+ readonly selector: "--copies <n|open>";
52
+ readonly summary: "N generated ids × copies per id; supports scripts, directory builds, dependencies, deterministic per-id off-chain stills, and Solidity image/trait renderers";
53
+ readonly supported: readonly ["--script", "--code-dir", "--dep", "--dep-registry", "--image-renderer", "--attributes-renderer", "--image-base", "--onchain-uri", "--public-base-url"];
54
+ readonly unsupported: readonly ["--no-delegation"];
55
+ };
56
+ };
57
+ };
58
+ readonly extensionRoutes: readonly [{
59
+ readonly route: "custom minter";
60
+ readonly command: "abx set-minter";
61
+ readonly availableOn: "Series and editions";
62
+ readonly useFor: readonly ["auctions", "allowlists", "raffles", "free claims", "ERC-20 pricing"];
63
+ }, {
64
+ readonly route: "configure hook";
65
+ readonly command: "abx set-param-hooks --configure";
66
+ readonly availableOn: "SeriesCode and EditionCode";
67
+ readonly useFor: readonly ["validated writes", "monotonic values", "structured collector input"];
68
+ }, {
69
+ readonly route: "transfer hook";
70
+ readonly command: "abx set-param-hooks --transfer";
71
+ readonly availableOn: "SeriesCode and EditionCode";
72
+ readonly useFor: readonly ["transfer restrictions", "soulbinding", "vesting", "redemption", "escrow"];
73
+ }, {
74
+ readonly route: "augment hook";
75
+ readonly command: "abx set-param-hooks --augment";
76
+ readonly availableOn: "SeriesCode and EditionCode";
77
+ readonly useFor: readonly ["live derived data", "oracle-fed state", "read-time metadata"];
78
+ }, {
79
+ readonly route: "field renderer";
80
+ readonly command: "abx deploy-code --image-renderer/--attributes-renderer";
81
+ readonly availableOn: "SeriesCode and EditionCode";
82
+ readonly useFor: readonly ["on-chain SVG images", "on-chain computed traits"];
83
+ }, {
84
+ readonly route: "replace an unlocked script";
85
+ readonly command: "abx replace-script";
86
+ readonly availableOn: "SeriesCode and EditionCode, before `abx lock-script`";
87
+ readonly useFor: readonly ["shipping a fix to a live generative program", "iterating pre-lock without a full redeploy"];
88
+ }];
89
+ readonly deployTimeChoices: readonly ["contract shape and token standard (--copies)", "code-capable versus static contract type", "burnability (--burnable)", "ERC-721C/ERC-1155C enrollment (--721c)"];
90
+ readonly unsupportedToday: readonly ["mainnet deployment through the toolkit", "unsupported chains", "secondary-market listings or an order book", "compiling or deploying custom Solidity through abx", "retrofitting a deploy-time choice on an existing collection"];
91
+ readonly interpretation: {
92
+ readonly native: "A documented command/flag combination performs the request directly.";
93
+ readonly extension: "A canonical extension seam performs it while the token remains a factory clone.";
94
+ readonly unsupported: "The request is listed under unsupportedToday or is blocked by an irreversible choice already made.";
95
+ readonly unknown: "Do not infer support from absence. Inspect command help, contract type, and this contract; report uncertainty if no route is proven.";
96
+ };
97
+ };
98
+ export declare function cmdCapabilities(flags: Flags): void;
99
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEtC;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GnB,CAAC;AAEX,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAyBlD"}
@@ -0,0 +1,144 @@
1
+ import { KNOWN_CHAIN_KEYS } from '@artblocks/abx-sdk';
2
+ /**
3
+ * The machine-readable ABX capability contract.
4
+ *
5
+ * Keep this deliberately smaller than command help: it records product boundaries and the
6
+ * supported combinations agents routinely get wrong. Command-specific syntax still belongs to
7
+ * `abx help <command>`, while deploy planning belongs to `<deploy-command> --dry-run --json`.
8
+ * Human help, the shipped skill, and tests consume this object instead of maintaining competing
9
+ * matrices in prose.
10
+ */
11
+ export const ABX_CAPABILITIES = {
12
+ schemaVersion: 1,
13
+ supportedChains: [...KNOWN_CHAIN_KEYS],
14
+ deploymentCommands: {
15
+ deploy: {
16
+ artifact: 'one static work',
17
+ unique: {
18
+ contract: 'OneOfOneImage (ERC-721)',
19
+ inputs: ['--image'],
20
+ },
21
+ edition: {
22
+ contract: 'OneOfOneEdition (ERC-1155)',
23
+ selector: '--copies <n|open>',
24
+ summary: 'one work × copies; supports on-chain bytes, on-chain JSON with external media, or a resolver',
25
+ supported: ['--onchain-image (hot or wallet signing)', '--onchain-uri', '--backend', '--public-base-url'],
26
+ unsupported: ['--onchain-image with --unsigned'],
27
+ },
28
+ },
29
+ deploySeries: {
30
+ artifact: 'a folder of distinct static works',
31
+ unique: {
32
+ contract: 'SeriesImage (ERC-721)',
33
+ inputs: ['--dir'],
34
+ },
35
+ edition: {
36
+ contract: 'EditionImage (ERC-1155)',
37
+ selector: '--copies <n|open>',
38
+ summary: 'N folder items × copies per id; supports on-chain bytes, on-chain JSON with external media, or a resolver',
39
+ supported: ['--onchain-image (hot or wallet signing)', '--onchain-uri', '--backend', '--public-base-url'],
40
+ unsupported: ['--onchain-image with --unsigned'],
41
+ },
42
+ },
43
+ deployCode: {
44
+ artifact: 'a program or field renderer whose output depends on token state',
45
+ unique: {
46
+ contract: 'SeriesCode (ERC-721)',
47
+ inputs: ['--script', '--code-dir', '--image-renderer', '--attributes-renderer'],
48
+ },
49
+ edition: {
50
+ contract: 'EditionCode (ERC-1155)',
51
+ selector: '--copies <n|open>',
52
+ summary: 'N generated ids × copies per id; supports scripts, directory builds, dependencies, deterministic per-id off-chain stills, and Solidity image/trait renderers',
53
+ supported: ['--script', '--code-dir', '--dep', '--dep-registry', '--image-renderer', '--attributes-renderer', '--image-base', '--onchain-uri', '--public-base-url'],
54
+ // `--resume` isn't listed in `supported`/`unsupported` at all (neither lane lists it — it's a
55
+ // REPAIR verb against an EXISTING contract, not a deploy-time flag): `abx deploy-code --resume
56
+ // <address>` now diffs an EditionCode target's per-id mint shortfall exactly as it always has
57
+ // for a 721 SeriesCode target (see resume.ts's `planEditionResume`).
58
+ unsupported: ['--no-delegation'],
59
+ },
60
+ },
61
+ },
62
+ extensionRoutes: [
63
+ {
64
+ route: 'custom minter',
65
+ command: 'abx set-minter',
66
+ availableOn: 'Series and editions',
67
+ useFor: ['auctions', 'allowlists', 'raffles', 'free claims', 'ERC-20 pricing'],
68
+ },
69
+ {
70
+ route: 'configure hook',
71
+ command: 'abx set-param-hooks --configure',
72
+ availableOn: 'SeriesCode and EditionCode',
73
+ useFor: ['validated writes', 'monotonic values', 'structured collector input'],
74
+ },
75
+ {
76
+ route: 'transfer hook',
77
+ command: 'abx set-param-hooks --transfer',
78
+ availableOn: 'SeriesCode and EditionCode',
79
+ useFor: ['transfer restrictions', 'soulbinding', 'vesting', 'redemption', 'escrow'],
80
+ },
81
+ {
82
+ route: 'augment hook',
83
+ command: 'abx set-param-hooks --augment',
84
+ availableOn: 'SeriesCode and EditionCode',
85
+ useFor: ['live derived data', 'oracle-fed state', 'read-time metadata'],
86
+ },
87
+ {
88
+ route: 'field renderer',
89
+ command: 'abx deploy-code --image-renderer/--attributes-renderer',
90
+ availableOn: 'SeriesCode and EditionCode',
91
+ useFor: ['on-chain SVG images', 'on-chain computed traits'],
92
+ },
93
+ {
94
+ route: 'replace an unlocked script',
95
+ command: 'abx replace-script',
96
+ availableOn: 'SeriesCode and EditionCode, before `abx lock-script`',
97
+ useFor: ['shipping a fix to a live generative program', 'iterating pre-lock without a full redeploy'],
98
+ },
99
+ ],
100
+ deployTimeChoices: [
101
+ 'contract shape and token standard (--copies)',
102
+ 'code-capable versus static contract type',
103
+ 'burnability (--burnable)',
104
+ 'ERC-721C/ERC-1155C enrollment (--721c)',
105
+ ],
106
+ unsupportedToday: [
107
+ 'mainnet deployment through the toolkit',
108
+ 'unsupported chains',
109
+ 'secondary-market listings or an order book',
110
+ 'compiling or deploying custom Solidity through abx',
111
+ 'retrofitting a deploy-time choice on an existing collection',
112
+ ],
113
+ interpretation: {
114
+ native: 'A documented command/flag combination performs the request directly.',
115
+ extension: 'A canonical extension seam performs it while the token remains a factory clone.',
116
+ unsupported: 'The request is listed under unsupportedToday or is blocked by an irreversible choice already made.',
117
+ unknown: 'Do not infer support from absence. Inspect command help, contract type, and this contract; report uncertainty if no route is proven.',
118
+ },
119
+ };
120
+ export function cmdCapabilities(flags) {
121
+ if (flags.json !== undefined) {
122
+ console.log(JSON.stringify(ABX_CAPABILITIES, null, 2));
123
+ return;
124
+ }
125
+ console.log('ABX capability contract v1\n');
126
+ console.log('Native deployment lanes:');
127
+ for (const [name, lane] of Object.entries(ABX_CAPABILITIES.deploymentCommands)) {
128
+ console.log(` ${name}: ${lane.artifact}`);
129
+ console.log(` unique ${lane.unique.contract} — ${lane.unique.inputs.join(' | ')}`);
130
+ console.log(` edition ${lane.edition.contract} — ${lane.edition.summary}`);
131
+ if (lane.edition.unsupported.length)
132
+ console.log(` limits ${lane.edition.unsupported.join(' · ')}`);
133
+ }
134
+ console.log('\nCanonical extension routes:');
135
+ for (const seam of ABX_CAPABILITIES.extensionRoutes) {
136
+ console.log(` ${seam.route}: ${seam.availableOn} — ${seam.useFor.join(', ')}`);
137
+ }
138
+ console.log('\nUnsupported today:');
139
+ for (const item of ABX_CAPABILITIES.unsupportedToday)
140
+ console.log(` - ${item}`);
141
+ console.log('\nUse `abx capabilities --json` for the stable machine-readable form,');
142
+ console.log('`abx help <command>` for current flags, and `<deploy-command> --dry-run --json` for a concrete plan.');
143
+ }
144
+ //# sourceMappingURL=capabilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAGpD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa,EAAE,CAAC;IAChB,eAAe,EAAE,CAAC,GAAG,gBAAgB,CAAC;IACtC,kBAAkB,EAAE;QAClB,MAAM,EAAE;YACN,QAAQ,EAAE,iBAAiB;YAC3B,MAAM,EAAE;gBACN,QAAQ,EAAE,yBAAyB;gBACnC,MAAM,EAAE,CAAC,SAAS,CAAC;aACpB;YACD,OAAO,EAAE;gBACP,QAAQ,EAAE,4BAA4B;gBACtC,QAAQ,EAAE,mB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IAAI,IAAI,gBAAgB,CAAC,gBAAgB;QAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAEjF,OAAO,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,sGAAsG,CAAC,CAAC;AACtH,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { type Flags } from '../flags.js';
2
+ export interface DeviceLoginDeps {
3
+ fetchImpl?: typeof fetch;
4
+ sleep?: (ms: number) => Promise<void>;
5
+ now?: () => number;
6
+ openBrowser?: (url: string) => boolean;
7
+ line?: (message: string) => void;
8
+ warning?: (message: string) => void;
9
+ }
10
+ export interface DeviceLoginOptions {
11
+ baseUrl: string;
12
+ envVar: string;
13
+ envPath: string;
14
+ force?: boolean;
15
+ noOpen?: boolean;
16
+ }
17
+ export interface OAuthLogoutOptions {
18
+ baseUrl: string;
19
+ envVar: string;
20
+ envPath: string;
21
+ token?: string;
22
+ }
23
+ export interface OAuthLogoutDeps {
24
+ fetchImpl?: typeof fetch;
25
+ }
26
+ export type OAuthLogoutResult = {
27
+ status: 'absent';
28
+ } | {
29
+ status: 'revoked';
30
+ local: 'removed' | 'external' | 'different';
31
+ };
32
+ /** Refuse the two silent secret-exposure modes: replacing a tracked file, or creating an unignored
33
+ * .env inside a Git worktree. A non-Git directory is fine. */
34
+ export declare function assertPrivateEnvPath(envPath: string): void;
35
+ /** Bearer-token grammar (RFC 6750) — the default value shape {@link saveEnvSecret} accepts. Exported
36
+ * so a caller writing something differently-shaped (a URL, say) can pass its own `valuePattern`
37
+ * instead of fighting this one. */
38
+ export declare const BEARER_TOKEN_PATTERN: RegExp;
39
+ export declare function saveEnvSecret(envPath: string, key: string, value: string, valuePattern?: RegExp): void;
40
+ /** Validate and replace several env values with one atomic rename. A credential pair must never
41
+ * land half-updated because the process stopped between two individually-atomic writes. */
42
+ export declare function saveEnvSecrets(envPath: string, entries: Array<{
43
+ key: string;
44
+ value: string;
45
+ valuePattern?: RegExp;
46
+ }>): void;
47
+ /** Standards-only core, dependency-injected for a no-secret-output regression test. */
48
+ export declare function deviceLogin(options: DeviceLoginOptions, deps?: DeviceLoginDeps): Promise<void>;
49
+ /** RFC 7009 logout: revoke remotely first, then remove the matching local assignment. Keeping the
50
+ * credential when discovery or revocation fails preserves the user's ability to retry safely. */
51
+ export declare function oauthLogout(options: OAuthLogoutOptions, deps?: OAuthLogoutDeps): Promise<OAuthLogoutResult>;
52
+ export declare function cmdAuth(args: string[], flags: Flags): Promise<void>;
53
+ export declare const AUTH_HELP: string;
54
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,KAAK,EAAkB,MAAM,aAAa,CAAA;AA4BxD,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;IACxB,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;IACtC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CA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