@alphafox/cli 0.1.5 → 0.3.2

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 (104) hide show
  1. package/README.md +42 -4
  2. package/dist/auth/browser-login.d.ts +30 -0
  3. package/dist/auth/browser-login.js +193 -0
  4. package/dist/auth/loopback-callback.d.ts +32 -0
  5. package/dist/auth/loopback-callback.js +175 -0
  6. package/dist/auth/open-browser.d.ts +15 -0
  7. package/dist/auth/open-browser.js +54 -0
  8. package/dist/auth/refresh.d.ts +27 -2
  9. package/dist/auth/refresh.js +52 -15
  10. package/dist/catalog/allowlist.d.ts +20 -4
  11. package/dist/catalog/allowlist.js +126 -25
  12. package/dist/catalog/command-tree.d.ts +35 -0
  13. package/dist/catalog/command-tree.js +119 -0
  14. package/dist/catalog/compatibility.d.ts +23 -0
  15. package/dist/catalog/compatibility.js +58 -0
  16. package/dist/catalog/generated/registry.json +6137 -0
  17. package/dist/catalog/generated/schemas.json +31036 -0
  18. package/dist/catalog/operations.d.ts +76 -3
  19. package/dist/catalog/operations.js +87 -213
  20. package/dist/catalog/validate-body.d.ts +22 -0
  21. package/dist/catalog/validate-body.js +98 -0
  22. package/dist/commands/request-body.d.ts +21 -0
  23. package/dist/commands/request-body.js +92 -0
  24. package/dist/commands/run.js +283 -162
  25. package/dist/config/profiles.js +3 -3
  26. package/dist/engine-backtest/errors.d.ts +18 -0
  27. package/dist/engine-backtest/errors.js +26 -0
  28. package/dist/engine-backtest/fetch-runtime.d.ts +38 -0
  29. package/dist/engine-backtest/fetch-runtime.js +170 -0
  30. package/dist/engine-backtest/native-import.d.ts +1 -0
  31. package/dist/engine-backtest/native-import.js +10 -0
  32. package/dist/engine-backtest/parse-args.d.ts +6 -0
  33. package/dist/engine-backtest/parse-args.js +281 -0
  34. package/dist/engine-backtest/persist.d.ts +32 -0
  35. package/dist/engine-backtest/persist.js +94 -0
  36. package/dist/engine-backtest/replay-timeframe.d.ts +16 -0
  37. package/dist/engine-backtest/replay-timeframe.js +48 -0
  38. package/dist/engine-backtest/resolve-packages.d.ts +27 -0
  39. package/dist/engine-backtest/resolve-packages.js +288 -0
  40. package/dist/engine-backtest/run-command.d.ts +38 -0
  41. package/dist/engine-backtest/run-command.js +540 -0
  42. package/dist/engine-backtest/types.d.ts +249 -0
  43. package/dist/engine-backtest/types.js +2 -0
  44. package/dist/envelope.d.ts +3 -0
  45. package/dist/envelope.js +43 -3
  46. package/dist/http/client.js +18 -15
  47. package/dist/index.d.ts +16 -5
  48. package/dist/index.js +47 -1
  49. package/dist/install/exec.d.ts +13 -0
  50. package/dist/install/exec.js +73 -0
  51. package/dist/install/package-root.d.ts +4 -0
  52. package/dist/install/package-root.js +59 -0
  53. package/dist/install/types.d.ts +69 -0
  54. package/dist/install/types.js +26 -0
  55. package/dist/install/wizard.d.ts +21 -0
  56. package/dist/install/wizard.js +332 -0
  57. package/dist/keychain/linux-secret-service.d.ts +11 -0
  58. package/dist/keychain/linux-secret-service.js +93 -0
  59. package/dist/keychain/store.d.ts +20 -1
  60. package/dist/keychain/store.js +94 -6
  61. package/dist/keychain/windows-credential.d.ts +13 -0
  62. package/dist/keychain/windows-credential.js +176 -0
  63. package/dist/safety/confirmation.d.ts +10 -3
  64. package/dist/safety/confirmation.js +27 -4
  65. package/dist/version.d.ts +2 -2
  66. package/dist/version.js +3 -2
  67. package/docs/.nojekyll +0 -0
  68. package/docs/agents/domain.md +51 -0
  69. package/docs/agents/issue-tracker.md +156 -0
  70. package/docs/agents/triage-labels.md +18 -0
  71. package/docs/alphafox-cli-installation-guide.md +105 -0
  72. package/docs/e2e-staging.md +76 -6
  73. package/docs/favicon.svg +4 -0
  74. package/docs/index.html +748 -0
  75. package/docs/logo/alphafox-mark.svg +4 -0
  76. package/docs/logo/alphafox-wordmark-black-en.svg +17 -0
  77. package/docs/logo/alphafox-wordmark-white-en.svg +16 -0
  78. package/docs/release-supply-chain.md +107 -26
  79. package/package.json +10 -3
  80. package/skills/account/SKILL.md +8 -6
  81. package/skills/admin/SKILL.md +9 -4
  82. package/skills/alphafox-shared/SKILL.md +44 -14
  83. package/skills/auth/SKILL.md +21 -6
  84. package/skills/engine-backtest/SKILL.md +71 -0
  85. package/skills/exchange/SKILL.md +10 -3
  86. package/skills/market/SKILL.md +9 -4
  87. package/skills/notification/SKILL.md +8 -3
  88. package/skills/strategy/SKILL.md +23 -9
  89. package/skills/trading/SKILL.md +18 -5
  90. package/vendor/backtest-runner/NOTICE.md +1 -0
  91. package/vendor/backtest-runner/README.md +97 -0
  92. package/vendor/backtest-runner/index.d.ts +423 -0
  93. package/vendor/backtest-runner/index.mjs +59 -0
  94. package/vendor/backtest-runner/lib/abortable.mjs +23 -0
  95. package/vendor/backtest-runner/lib/cache.mjs +159 -0
  96. package/vendor/backtest-runner/lib/coverage.mjs +238 -0
  97. package/vendor/backtest-runner/lib/encode.mjs +28 -0
  98. package/vendor/backtest-runner/lib/exchanges.mjs +143 -0
  99. package/vendor/backtest-runner/lib/proxy.mjs +78 -0
  100. package/vendor/backtest-runner/lib/scenario.mjs +66 -0
  101. package/vendor/backtest-runner/lib/series.mjs +370 -0
  102. package/vendor/backtest-runner/lib/tape-loader.mjs +614 -0
  103. package/vendor/backtest-runner/lib/timeframes.mjs +55 -0
  104. package/vendor/backtest-runner/package.json +13 -0
@@ -0,0 +1,4 @@
1
+ <svg width="880" height="1320" viewBox="560 400 880 1320" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M600 859.99V448.467C600 444.343 603.341 440.997 607.455 441.283C633.947 443.127 687.377 454.464 738.326 489.713C790.889 526.08 819.686 577.964 829.376 603.853C830.516 606.899 833.375 608.999 836.627 608.999H974.473C977.797 608.999 980.699 606.816 981.805 603.682C989.573 581.673 1012.28 537.164 1054.85 499.081C1097.95 460.53 1170.23 445.26 1207.73 441.629C1212.01 441.215 1215.61 444.632 1215.61 448.934V860.713C1215.61 864.837 1212.28 868.175 1208.15 868.278C1166.66 869.316 1082.4 878.881 1024.32 911.272C971.303 940.844 930.998 987.234 911.43 1015.2C907.935 1020.2 899.832 1019.72 896.775 1014.44C882.18 989.258 849.547 947.01 795.65 911.272C735.079 871.11 650.192 865.287 608.157 867.588C603.768 867.828 600 864.385 600 859.99Z" fill="#FF991F"/>
3
+ <path d="M600.58 1235.01L600.58 969.867C600.58 965.744 603.924 962.4 608.047 962.458C675.284 963.412 740.225 977.952 799.655 1043.32C866.429 1116.76 897.008 1187.09 1027.44 1187.09L1133.53 1187.09C1290.79 1187.09 1400 1305.96 1400 1452.22L1400 1676.91C1400 1684.08 1391.55 1686.6 1387.59 1680.62C1357.88 1635.76 1286.34 1537.49 1154.22 1537.49L897.008 1537.49C718.527 1537.49 600.58 1420.82 600.58 1235.01Z" fill="#FF991F"/>
4
+ </svg>
@@ -0,0 +1,17 @@
1
+ <svg width="2060" height="400" viewBox="600 300 2060 400" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1048.72" y="319" width="278.736" height="43.8751" transform="rotate(90 1048.72 319)" fill="#151515"/>
3
+ <path d="M2406.27 404.172H2461.76L2642.42 599.029H2586.93L2406.27 404.172Z" fill="#151515"/>
4
+ <path d="M2517.25 540.964L2489.83 512.574L2404.98 599.034H2462.42L2517.25 540.964Z" fill="#151515"/>
5
+ <path d="M2535.31 463.541L2567.57 498.383L2642.42 404.18H2584.98L2535.31 463.541Z" fill="#FF991F"/>
6
+ <path d="M786.758 342.22C799.662 342.22 819.019 340.93 837.085 369.32C851.538 392.031 932.579 531.055 971.292 597.728H923.545C884.419 531.915 805.126 398.485 800.953 391.258C795.738 382.225 780.306 383.515 776.435 391.258C773.338 397.452 702.019 531.485 666.747 597.728H619C654.272 529.787 727.656 388.988 739.012 369.32C753.207 344.733 773.853 342.22 786.758 342.22ZM866.765 539.66H718.364L737.721 502.237H844.827L866.765 539.66Z" fill="#151515"/>
7
+ <path d="M2318.52 404.168C2355.94 404.168 2388.2 440.3 2388.2 477.723V528.051C2388.2 570.635 2352.07 600.315 2318.52 600.315H2244.96C2206.25 600.315 2173.99 562.893 2173.99 528.051V477.723C2173.99 442.881 2207.54 404.168 2244.96 404.168H2318.52ZM2258.89 445.463C2235.9 445.463 2215.28 467.876 2215.28 488.048V517.185C2215.28 537.356 2235.1 559.022 2258.89 559.022H2304.09C2324.7 559.022 2346.91 541.839 2346.91 517.185V488.048C2346.91 466.382 2327.08 445.463 2304.09 445.463H2258.89Z" fill="#151515"/>
8
+ <path d="M1846.21 448.056L1878.47 482.898L1942.37 401.788H1884.93L1846.21 448.056Z" fill="#FF991F"/>
9
+ <path d="M1713.3 600.323H1761.04C1779.11 600.323 1797.5 591.005 1810.08 579.678C1822.99 568.064 1832.02 553.869 1842.34 538.384L1810.08 506.123C1807.5 511.284 1800.53 524.447 1793.31 535.803C1784.27 549.998 1763.62 559.029 1753.3 559.029H1724.91C1701.12 559.029 1681.04 537.362 1681.04 517.19V488.055C1681.04 467.883 1704.23 445.47 1727.23 445.47H1757.17C1770.08 445.47 1779.88 450.114 1788.14 458.374C1796.4 466.635 1876.75 555.589 1917.19 600.323H1971.39C1921.49 544.834 1822.73 437.213 1811.37 424.824C1792.45 404.175 1770.08 404.174 1741.69 404.177L1717.17 404.176C1679.75 404.176 1639.74 448.051 1639.74 482.893V525.478C1639.74 560.32 1674.58 600.323 1713.3 600.323Z" fill="#151515"/>
10
+ <path d="M1345.52 475.149C1345.52 437.726 1313.26 401.594 1275.84 401.594H1202.28C1162.28 401.594 1118.4 435.145 1118.4 485.473V681.62H1162.28V485.473C1162.28 462.245 1182.92 442.888 1216.21 442.888H1261.41C1284.4 442.888 1304.23 463.807 1304.23 485.473V514.608C1304.23 539.263 1282.02 556.447 1261.41 556.447H1175.18V597.741H1275.84C1309.39 597.741 1345.52 568.061 1345.52 525.476V475.149Z" fill="#151515"/>
11
+ <path d="M1438.43 414.505C1451.03 406.42 1466.16 401.592 1482.02 401.592H1514.57C1573.93 401.592 1603.61 445.467 1603.61 479.019V599.03H1561.77V494.504C1561.77 468.695 1545.54 442.887 1514.57 442.887H1482.02C1460.1 442.887 1438.5 462.415 1438.43 485.362V597.74H1394.56V319.004H1438.43V414.505Z" fill="#151515"/>
12
+ <path d="M2013.97 413.201L2013.97 600.316L2055.26 600.316L2055.26 479.015L2146.89 479.015L2146.89 435.427L2055.26 435.427L2055.26 413.201C2055.26 382.23 2081.07 365.998 2106.88 365.998L2164.95 365.998L2164.95 324.16L2091.4 324.16C2057.85 324.16 2013.97 353.84 2013.97 413.201Z" fill="#151515"/>
13
+ <path d="M211 426.942V261.467C211 257.343 214.343 254.022 218.433 254.554C230.549 256.131 250.514 261.414 269.653 274.655C290.113 288.811 302.081 308.512 307.084 320.14C308.37 323.127 311.228 325.235 314.48 325.235H366.551C369.875 325.235 372.785 323.037 374.049 319.963C378.161 309.963 387.59 293.188 403.866 278.628C420.524 263.726 447.466 257.028 464.142 254.794C468.406 254.223 472.03 257.632 472.03 261.934V427.665C472.03 431.789 468.694 435.129 464.576 435.338C445.93 436.283 413.682 440.709 390.921 453.404C372.313 463.782 357.399 479.045 348.107 490.722C344.31 495.493 335.784 495.048 332.272 490.063C324.84 479.511 312.305 465.568 293.959 453.404C270.37 437.762 238.082 434.404 219.165 434.717C214.77 434.789 211 431.337 211 426.942Z" fill="#FF991F"/>
14
+ <path d="M211.247 590.674L211.247 482.54C211.247 478.416 214.591 475.066 218.712 475.215C245.69 476.188 271.727 483.073 295.658 509.393C323.971 540.533 336.937 570.354 392.241 570.354L437.225 570.354C503.907 570.354 550.215 620.759 550.215 682.776L550.215 747.65C550.215 754.821 541.259 757.744 536.525 752.358C523.226 737.231 501.546 718.93 471.36 718.93L336.937 718.93C261.258 718.93 211.247 669.463 211.247 590.674Z" fill="#FF991F"/>
15
+ </svg>
16
+
17
+
@@ -0,0 +1,16 @@
1
+ <svg width="2060" height="400" viewBox="600 300 2060 400" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1048.72" y="317.996" width="278.736" height="43.8751" transform="rotate(90 1048.72 317.996)" fill="white"/>
3
+ <path d="M2406.27 403.168H2461.76L2642.42 598.025H2586.93L2406.27 403.168Z" fill="white"/>
4
+ <path d="M2517.25 539.96L2489.83 511.57L2404.98 598.03H2462.42L2517.25 539.96Z" fill="white"/>
5
+ <path d="M2535.31 462.537L2567.57 497.379L2642.42 403.176H2584.98L2535.31 462.537Z" fill="#FF991F"/>
6
+ <path d="M786.758 341.216C799.662 341.216 819.019 339.926 837.085 368.316C851.538 391.027 932.578 530.052 971.291 596.725H923.545C884.419 530.912 805.125 397.481 800.953 390.254C795.738 381.221 780.306 382.512 776.435 390.254C773.337 396.448 702.018 530.482 666.746 596.725H619C654.272 528.784 727.656 387.985 739.012 368.316C753.207 343.729 773.853 341.216 786.758 341.216ZM866.765 538.656H718.363L737.721 501.234H844.827L866.765 538.656Z" fill="white"/>
7
+ <path d="M2318.52 403.164C2355.94 403.164 2388.2 439.296 2388.2 476.719V527.047C2388.2 569.631 2352.07 599.311 2318.52 599.312H2244.96C2206.25 599.312 2173.99 561.889 2173.99 527.047V476.719C2173.99 441.877 2207.54 403.164 2244.96 403.164H2318.52ZM2258.89 444.459C2235.9 444.459 2215.28 466.872 2215.28 487.044V516.181C2215.28 536.352 2235.1 558.019 2258.89 558.019H2304.09C2324.7 558.019 2346.91 540.835 2346.91 516.181V487.044C2346.91 465.378 2327.08 444.459 2304.09 444.459H2258.89Z" fill="white"/>
8
+ <path d="M1846.21 447.045L1878.47 481.887L1942.37 400.777H1884.93L1846.21 447.045Z" fill="#FF991F"/>
9
+ <path d="M1713.3 599.312H1761.04C1779.11 599.312 1797.5 589.993 1810.08 578.666C1822.99 567.052 1832.02 552.857 1842.34 537.372L1810.08 505.111C1807.5 510.273 1800.53 523.435 1793.31 534.791C1784.27 548.986 1763.62 558.017 1753.3 558.017H1724.91C1701.12 558.017 1681.04 536.35 1681.04 516.179V487.043C1681.04 466.871 1704.23 444.459 1727.23 444.458H1757.17C1770.08 444.458 1779.88 449.102 1788.14 457.363C1796.4 465.623 1876.75 554.577 1917.19 599.312H1971.39C1921.49 543.822 1822.73 436.202 1811.37 423.812C1792.45 403.164 1770.08 403.163 1741.69 403.165L1717.17 403.164C1679.75 403.164 1639.74 447.039 1639.74 481.881V524.466C1639.74 559.308 1674.58 599.312 1713.3 599.312Z" fill="white"/>
10
+ <path d="M1345.52 474.145C1345.52 436.722 1313.26 400.59 1275.84 400.59H1202.28C1162.28 400.59 1118.4 434.141 1118.4 484.469V680.616H1162.28V484.469C1162.28 461.241 1182.92 441.884 1216.21 441.884H1261.41C1284.4 441.884 1304.23 462.803 1304.23 484.469V513.605C1304.23 538.259 1282.02 555.443 1261.41 555.443H1175.18V596.737H1275.84C1309.39 596.737 1345.52 567.057 1345.52 524.473V474.145Z" fill="white"/>
11
+ <path d="M1438.43 413.501C1451.03 405.416 1466.16 400.588 1482.02 400.588H1514.57C1573.93 400.588 1603.61 444.463 1603.61 478.015V598.026H1561.77V493.5C1561.77 467.691 1545.54 441.883 1514.57 441.883H1482.02C1460.09 441.883 1438.47 461.441 1438.43 484.412V596.736H1394.56V318H1438.43L1438.43 413.501Z" fill="white"/>
12
+ <path d="M2013.97 412.197L2013.97 599.313L2055.26 599.313L2055.26 478.011L2146.89 478.011L2146.89 434.423L2055.26 434.423L2055.26 412.197C2055.26 381.226 2081.07 364.994 2106.88 364.994L2164.95 364.994L2164.95 323.156L2091.4 323.156C2057.85 323.156 2013.97 352.836 2013.97 412.197Z" fill="white"/>
13
+ <path d="M211 426.942V261.467C211 257.343 214.343 254.022 218.433 254.554C230.549 256.131 250.514 261.414 269.653 274.655C290.113 288.811 302.081 308.512 307.084 320.14C308.37 323.127 311.228 325.235 314.48 325.235H366.551C369.875 325.235 372.785 323.037 374.049 319.963C378.161 309.963 387.59 293.188 403.866 278.628C420.524 263.726 447.466 257.028 464.142 254.794C468.406 254.223 472.03 257.632 472.03 261.934V427.665C472.03 431.789 468.694 435.129 464.576 435.338C445.93 436.283 413.682 440.709 390.921 453.404C372.313 463.782 357.399 479.045 348.107 490.722C344.31 495.493 335.784 495.048 332.272 490.063C324.84 479.511 312.305 465.568 293.959 453.404C270.37 437.762 238.082 434.404 219.165 434.717C214.77 434.789 211 431.337 211 426.942Z" fill="#FF991F"/>
14
+ <path d="M211.247 590.674L211.247 482.54C211.247 478.416 214.591 475.066 218.712 475.215C245.69 476.188 271.727 483.073 295.658 509.393C323.971 540.533 336.937 570.354 392.241 570.354L437.225 570.354C503.907 570.354 550.215 620.759 550.215 682.776L550.215 747.65C550.215 754.821 541.259 757.744 536.525 752.358C523.226 737.231 501.546 718.93 471.36 718.93L336.937 718.93C261.258 718.93 211.247 669.463 211.247 590.674Z" fill="#FF991F"/>
15
+ </svg>
16
+
@@ -1,49 +1,130 @@
1
1
  # Release: npm, Skills, supply chain (t101375)
2
2
 
3
+ **Status:** Frozen (G0)
4
+ **Date:** 2026-08-13
5
+ **Canonical package:** `@alphafox/cli` on the public npmjs.org registry.
6
+
7
+ This document freezes distribution policy. It supersedes the earlier draft that
8
+ named `@alphafoxai/cli` (that name was never published; npmjs returns 404).
9
+
3
10
  ## Package
4
11
 
5
- | Field | Value |
6
- |-------|--------|
7
- | Name | `@alphafoxai/cli` |
8
- | Binary | `alphafox` |
9
- | Visibility | public npm (org `@alphafoxai`) |
10
- | Node | LTS 20 |
11
- | OS | macOS, Linux, Windows |
12
+ | Field | Frozen value |
13
+ |-------|----------------|
14
+ | Name | `@alphafox/cli` |
15
+ | Binary | `alphafox` (`bin/alphafox.js`) |
16
+ | Registry | `https://registry.npmjs.org/` |
17
+ | Visibility | **public** (`publishConfig.access=public`) |
18
+ | npm org / owner | `@alphafox` scope; maintainer `alphafox <joe@alphafox.app>` |
19
+ | License | MIT |
20
+ | Node | LTS **≥ 20** (`engines.node`) |
21
+ | OS | macOS, Linux, Windows (npm install; no standalone native binary in v1) |
22
+ | Package contents | `bin/`, `dist/`, `skills/`, `README.md`, `docs/`, `LICENSE` |
23
+
24
+ v1 does **not** ship independent GitHub Release binaries, so there is no extra
25
+ binary signing/checksum channel. Integrity is npm pack integrity plus
26
+ provenance (below).
27
+
28
+ Do **not** republish under `@alphafoxai/cli` without a new ADR. Skills and docs
29
+ that still mention that name are stale and must follow this freeze.
12
30
 
13
- ## Publish rules
31
+ ## Publish rules (normative)
14
32
 
15
- - Publish **only** from CI on protected tags (`v*`)
16
- - Prefer npm **trusted publishing / OIDC provenance** no long-lived npm tokens
17
- - 2FA required for org owners
18
- - Package contents: `dist/`, `skills/`, README, docs — **no** secrets, fixtures, private endpoints, or `.env`
33
+ 1. Publish **only** from CI on a protected git tag matching `v*` (example:
34
+ `v0.2.0`). Humans must not `npm publish` from a laptop for any release
35
+ after this freeze, except an explicit incident rollback documented in the
36
+ change ticket.
37
+ 2. CI MUST use npm **trusted publishing / OIDC provenance**. Long-lived npm
38
+ tokens are forbidden for publish.
39
+ 3. npm org owners MUST have 2FA. Publish permission is CI identity plus owners;
40
+ no shared user tokens in git or chat.
41
+ 4. Package tarball MUST NOT contain secrets, test fixtures with credentials,
42
+ `.env`, private endpoints, or internal-only hostnames.
43
+ 5. `prepublishOnly` builds from the tagged SHA. The published `CLI_VERSION`
44
+ (or equivalent) MUST equal the npm version.
45
+
46
+ ### Grandfathered 0.1.x
47
+
48
+ npmjs currently has `@alphafox/cli@0.1.0`–`0.1.5` (latest `0.1.5`). Those
49
+ tarballs have registry signatures and **no** provenance attestations
50
+ (`dist.attestations` is empty). They were published by the human npm user
51
+ `alphafox`. They remain installable but are **not** the compliance target.
52
+ The next minor/patch that this policy covers MUST be the first
53
+ OIDC-provenance release.
19
54
 
20
55
  ## Skills distribution
21
56
 
22
- - Co-versioned inside the npm package under `skills/`
23
- - Compatibility: Skills major aligns with CLI major; `contractVersion` must match API or CLI fails closed
57
+ - Skills ship **inside** the same npm tarball under `skills/` (co-versioned).
58
+ - Skills major aligns with CLI major. There is no separate Skills registry
59
+ in v1 and no silent download of a different Skills version at runtime.
60
+ - `npm install -g @alphafox/cli` places `skills/` next to the binary only.
61
+ Agents do not load that directory. `alphafox install` (and the Agent
62
+ install guide) copy those files into Agent skill dirs via
63
+ `npx skills add`:
64
+ 1. the globally installed package path (co-versioned with the CLI)
65
+ 2. the running package / checkout `skills/` tree
66
+ 3. GitHub `alphafoxai/alphafox-cli` as a last-resort fallback
67
+ - `contractVersion` on the CLI profile MUST match the Public API
68
+ `contractVersion` (or the documented compatible range). Mismatch → fail
69
+ closed; do not download an older contract or degrade quietly.
70
+
71
+ ## Compatibility / channels / deprecation
72
+
73
+ | Channel | npm dist-tag | Meaning |
74
+ |---------|--------------|---------|
75
+ | stable | `latest` | Supported release |
76
+ | prerelease | `next` | Opt-in only |
24
77
 
25
- ## Support matrix
78
+ - Breaking API/contract/minCLI/maxCLI changes: announce ≥ **30 days** before
79
+ `latest` moves; keep the previous compatible CLI installable on npm.
80
+ - Incompatible CLI ↔ API ↔ contract: CLI exits non-zero with a machine-readable
81
+ error. No silent skip, no automatic down-version.
82
+ - Emergency unpublish is a last resort (npm unpublish window). Preferred:
83
+ `npm deprecate @alphafox/cli@<bad> "<reason>; use <good>"` and tell
84
+ operators to install the last good version.
26
85
 
27
- | Platform | Install | Keychain |
28
- |----------|---------|----------|
29
- | macOS | npm global / npx | Keychain Access |
30
- | Linux | npm global / npx | Secret Service or file fallback 0600 |
31
- | Windows | npm global / npx | Credential Manager (file fallback until implemented) |
86
+ ## Support matrix (install / update / uninstall)
32
87
 
33
- ## Channels
88
+ | Platform | Install | Update | Uninstall | Secrets |
89
+ |----------|---------|--------|-----------|---------|
90
+ | macOS | `npm install -g @alphafox/cli` or `npx @alphafox/cli` | `npm update -g @alphafox/cli` or pin `@<version>` | `npm uninstall -g @alphafox/cli` | Keychain Access |
91
+ | Linux | same | same | same | Secret Service, or file fallback mode `0600` |
92
+ | Windows | same | same | same | Credential Manager (`CredWrite`/`CredRead`); file fallback mode `0600` if unavailable |
34
93
 
35
- - `latest` stable
36
- - `next` — prerelease
37
- - Deprecation window: ≥ 30 days for breaking contract changes
94
+ Fresh-machine acceptance (release checklist, not optional):
95
+
96
+ ```bash
97
+ npm install -g @alphafox/cli@<version>
98
+ npm view @alphafox/cli@<version> --json # attestations present after first OIDC release
99
+ alphafox version
100
+ alphafox doctor
101
+ alphafox schema me.whoami
102
+ ```
38
103
 
39
104
  ## Rollback
40
105
 
41
106
  ```bash
42
- npm install -g @alphafoxai/cli@<previous>
107
+ npm install -g @alphafox/cli@<previous-compatible>
43
108
  alphafox version
44
109
  alphafox doctor
45
110
  ```
46
111
 
112
+ Failed install leaves the previous global binary in place (npm does not
113
+ half-replace). If `doctor` fails after a successful install, roll back with
114
+ the command above. Do not point the CLI at a different environment to “make
115
+ it work”.
116
+
47
117
  ## SBOM / audit
48
118
 
49
- CI should generate SBOM (e.g. `cyclonedx` / `npm sbom`) and fail on critical vulns in runtime deps.
119
+ CI MUST emit an SBOM (CycloneDX from the pnpm production tree via
120
+ `scripts/generate-sbom.mjs`) from the tagged SHA and fail the release job on
121
+ **critical** vulnerabilities in **runtime** dependencies (`pnpm audit --prod`).
122
+ Dev-only advisories do not block publish. SBOM is an artifact of the release
123
+ workflow, not a file committed to `main` by default.
124
+
125
+ ## Out of scope (v1)
126
+
127
+ - Private npm / GitHub Packages as the user install path
128
+ - Homebrew / scoop / standalone signed binaries
129
+ - Separate Skills marketplace
130
+ - Automation-token distribution (ADR 0004)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alphafox/cli",
3
- "version": "0.1.5",
4
- "description": "Alphafox CLI \u2014 Agent/Human entry for the public Application API.",
3
+ "version": "0.3.2",
4
+ "description": "Alphafox CLI Agent/Human entry for the public Application API.",
5
5
  "type": "commonjs",
6
6
  "bin": {
7
7
  "alphafox": "bin/alphafox.js"
@@ -12,14 +12,19 @@
12
12
  "bin",
13
13
  "dist",
14
14
  "skills",
15
+ "vendor",
15
16
  "README.md",
16
17
  "docs",
17
18
  "LICENSE"
18
19
  ],
19
20
  "scripts": {
20
21
  "build": "tsc -p tsconfig.build.json && node scripts/postbuild.cjs",
22
+ "generate:catalog": "node scripts/generate-catalog.mjs",
23
+ "check:catalog-drift": "node scripts/generate-catalog.mjs --check",
21
24
  "typecheck": "tsc -p tsconfig.json --noEmit",
22
- "test": "npm run build && node scripts/build-mvp-web-bundle.mjs && tsc -p tsconfig.test.json && node --test dist-test/**/*.test.js",
25
+ "test": "npm run check:catalog-drift && npm run build && node scripts/build-mvp-web-bundle.mjs && tsc -p tsconfig.test.json && node --test dist-test/**/*.test.js",
26
+ "test:release": "npm run build && tsc -p tsconfig.test.json && node scripts/run-release-tests.mjs",
27
+ "sbom": "node scripts/generate-sbom.mjs",
23
28
  "test:mvp": "node scripts/build-mvp-web-bundle.mjs && tsc -p tsconfig.test.json && node --test dist-test/tests/mvp-oauth-web-handlers.test.js",
24
29
  "alphafox": "node dist/cli.js",
25
30
  "prepublishOnly": "npm run build"
@@ -50,6 +55,8 @@
50
55
  "license": "MIT",
51
56
  "packageManager": "pnpm@10.33.0",
52
57
  "dependencies": {
58
+ "ajv": "^8.20.0",
59
+ "ccxt": "^4.5.73",
53
60
  "zod": "^4.3.6"
54
61
  },
55
62
  "devDependencies": {
@@ -1,21 +1,23 @@
1
1
  ---
2
2
  name: alphafox-account
3
3
  description: Account, wallet, and subscription read paths.
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  ---
6
6
 
7
7
  # Account / wallet
8
8
 
9
+ Always `--format json --no-input`. These paths are read-first. Wallet mutations are write/high-risk — `alphafox schema` first (do not invent fields), `--dry-run` then `--yes`; never auto-retry. Large bodies: `--config @file`.
10
+
9
11
  ```bash
10
- alphafox api GET /api/v1/wallet
11
- alphafox api GET /api/v1/account/exchange-uids
12
- alphafox api GET /api/v1/subscriptions/me
13
- alphafox api GET /api/v1/managed-wallets
12
+ alphafox api GET /api/v1/wallet --format json --no-input
13
+ alphafox api GET /api/v1/account/exchange-uids --format json --no-input
14
+ alphafox api GET /api/v1/subscriptions/me --format json --no-input
15
+ alphafox api GET /api/v1/managed-wallets --format json --no-input
14
16
  ```
15
17
 
16
18
  ## operationIds
17
19
 
18
20
  - `wallet.get`
19
21
  - `account.exchange_uids.list`
20
- - `subscriptions.me.get`
22
+ - `subscriptions.me.get` (facade `GET /api/v1/subscriptions/me`)
21
23
  - `managed_wallets.list`
@@ -1,18 +1,23 @@
1
1
  ---
2
2
  name: alphafox-admin
3
3
  description: Admin-only operations reusing Web role authorization.
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  ---
6
6
 
7
7
  # Admin
8
8
 
9
- Requires admin role on the server. CLI confirmation does not grant privilege.
9
+ Requires admin role on the server. CLI confirmation does not grant privilege. Not available to automation (v1 deferred). Always `--format json --no-input`.
10
10
 
11
11
  ```bash
12
- alphafox api GET /api/v1/admin/users
12
+ alphafox api GET /api/v1/admin/users --format json --no-input
13
13
  ```
14
14
 
15
- High-risk admin writes: `--dry-run` then `--yes`. Not available to automation (v1 deferred).
15
+ High-risk admin writes: `alphafox schema <operationId>` first, then `--dry-run` then `--yes`. Body fields must come from that schema; use `--config @file` for large objects. If the operator is not admin, expect `403` and stop.
16
+
17
+ ## Recovery
18
+
19
+ - `401`: re-auth. `403`: not admin — do not escalate by switching profiles.
20
+ - Uncataloged admin POST/PATCH/DELETE still require `--yes` (unknown risk).
16
21
 
17
22
  ## operationIds
18
23
 
@@ -1,20 +1,29 @@
1
1
  ---
2
2
  name: alphafox-shared
3
3
  description: Shared Alphafox CLI rules for Agents — auth, profiles, envelopes, risk gates, and public operationIds only.
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  ---
6
6
 
7
7
  # Alphafox shared Agent contract
8
8
 
9
+ Co-versioned with `@alphafox/cli`. Query compatibility with `alphafox version --format json` (`version`, `contractVersion`, `catalogVersion`) and `alphafox catalog`.
10
+
9
11
  ## Install / identity
10
12
 
13
+ Prefer the wizard (CLI + Agent Skills) or the Agent install guide. Do not treat
14
+ `npm install -g @alphafox/cli` as enough for Agents — Skills must be registered
15
+ with `npx skills add`.
16
+
11
17
  ```bash
12
- npx @alphafoxai/cli version
13
- npx @alphafoxai/cli doctor
18
+ npx @alphafox/cli@latest install
19
+ # Agent playbook:
20
+ # https://github.com/alphafoxai/alphafox-cli/blob/main/docs/alphafox-cli-installation-guide.md
21
+ npx @alphafox/cli version --format json --no-input
22
+ npx @alphafox/cli doctor --format json --no-input
14
23
  ```
15
24
 
16
25
  - Default profile: `production`. Use `--profile staging|local` explicitly.
17
- - Tokens: OS keychain only. Never pass `--token`. Never read tokens from config JSON.
26
+ - Tokens: OS keychain only (macOS Keychain, Linux Secret Service, Windows Credential Manager). Never pass `--token`. Never read tokens from config JSON.
18
27
  - Automation tokens are **not supported in v1** (interactive Device Flow / PKCE only).
19
28
 
20
29
  ## Output
@@ -25,35 +34,56 @@ Always use:
25
34
  alphafox … --format json --no-input
26
35
  ```
27
36
 
28
- Parse the JSON envelope: `ok === true` for success. Errors land on **stderr** with `ok: false` and may include HTTP `status` + `requestId`.
37
+ Optional: `--jq '<filter>'` requires the `jq` binary; missing jq fails closed (does not print the unfiltered envelope).
38
+
39
+ Parse the JSON envelope: `ok === true` for success. Errors land on **stderr** with `ok: false` and may include HTTP `status` + `requestId`. Stream watch uses JSONL. Do not parse human tables.
29
40
 
30
41
  ## Auth
31
42
 
32
43
  ```bash
33
- alphafox auth login --no-wait
34
- # show verification_uri to the user, then:
35
- alphafox auth login --device-code <device_code>
36
- alphafox auth status --verify
37
- alphafox whoami
44
+ alphafox auth login --no-wait --format json --no-input
45
+ # show verification_uri / user_code to the human, then:
46
+ alphafox auth login --device-code <device_code> --format json --no-input
47
+ alphafox auth status --verify --format json --no-input
48
+ alphafox whoami --format json --no-input
38
49
  ```
39
50
 
51
+ Local browser: `alphafox auth login --browser --format json --no-input` (loopback 127.0.0.1). If the browser cannot open, copy `authorizeUrl` from the error; do not invent a Device Flow retry unless the operator is headless.
52
+
53
+ Wrong environment / missing permission / missing `--yes`: stop. Do not retry with a different profile.
54
+
40
55
  ## Commands
41
56
 
42
57
  1. Prefer typed catalog: `alphafox schema <operationId>` then invoke domain commands.
43
58
  2. Raw escape hatch only for allowlisted facade:
44
59
 
45
60
  ```bash
46
- alphafox api GET /api/v1/me
61
+ alphafox api GET /api/v1/me --format json --no-input
47
62
  ```
48
63
 
49
- Forbidden: `/backend`, `/control-plane`, `/signal-center`, internal secrets, non-`/api/v1` product routes.
64
+ Forbidden: `/backend`, `/control-plane`, `/signal-center`, internal secrets, non-`/api/v1` product routes, `--token`.
65
+
66
+ ## Writes — schema first, never invent fields
67
+
68
+ Before every write (`POST` / `PUT` / `PATCH` / `DELETE` with a body):
69
+
70
+ 1. Run `alphafox schema <operationId> --format json --no-input`.
71
+ 2. Build the body **only** from `request.body` (property names, types, enums, required). Do not guess fields from memory, from another operationId, or from training data.
72
+ 3. Small object: typed command + `--body '<json>'`.
73
+ 4. Nested / large object: write a JSON file, then `--config @./payload.json`. Do not paste 20+ fields onto argv.
74
+ 5. `--dry-run` first when the risk is `write` or `high-risk-write`.
75
+
76
+ CLI validates `--body` / `--config` against the catalog **before** HTTP. `body_schema` / `body_schema_missing` (exit `64`) means the payload is wrong — re-read `schema`, do not add extra keys to “make it work”. `--body` and `--config` cannot be combined. `--body @file` is also a file (same as `--config @file`).
77
+
78
+ Uncataloged writes cannot carry a non-empty body. Find the `operationId` first.
50
79
 
51
80
  ## Risk
52
81
 
53
- - `high-risk-write` requires `--yes` (exit code `10` if missing).
82
+ - `high-risk-write` and uncataloged mutations (`unknown`) require `--yes` (exit code `10` if missing).
54
83
  - Prefer `--dry-run` first for trader start/stop, withdrawals, admin writes.
55
84
  - Never auto-retry unknown write outcomes.
85
+ - CLI `--yes` is UX only; the server still enforces role, ownership, and scopes.
56
86
 
57
87
  ## Public operationIds only
58
88
 
59
- Skills must reference registry `operationId`s (see `alphafox schema` / `alphafox catalog`). Do not hardcode internal service URLs.
89
+ Skills must reference registry `operationId`s (see `alphafox schema` / `alphafox catalog`). Shortcuts may only compose those operationIds. Do not hardcode internal service URLs or invent a second catalog.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: alphafox-auth
3
3
  description: Login, status, logout, whoami, and environment isolation for Alphafox CLI.
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  ---
6
6
 
7
7
  # Auth Skill
@@ -10,24 +10,39 @@ version: 0.1.0
10
10
 
11
11
  User needs to sign in, verify session, switch profile, or revoke tokens.
12
12
 
13
+ Always `--format json --no-input`. Never `--token`.
14
+
13
15
  ## Workflows
14
16
 
15
17
  ### Device Flow (headless / Agent)
16
18
 
17
- 1. `alphafox auth login --no-wait --format json`
19
+ 1. `alphafox auth login --no-wait --format json --no-input`
18
20
  2. Present `verification_uri` / `user_code` to the human.
19
- 3. After approval: `alphafox auth login --device-code <device_code>`
20
- 4. `alphafox whoami` / `alphafox auth status --verify`
21
+ 3. After approval: `alphafox auth login --device-code <device_code> --format json --no-input`
22
+ 4. `alphafox whoami --format json --no-input` / `alphafox auth status --verify --format json --no-input`
23
+
24
+ ### Browser loopback (human, local machine)
25
+
26
+ 1. `alphafox auth login --browser --format json --no-input`
27
+ 2. CLI binds `127.0.0.1` and opens the system browser. Do not copy codes or verifiers.
28
+ 3. After the localhost callback, `alphafox whoami` / `alphafox auth status --verify`
29
+ 4. If the browser cannot open, the error includes a copyable `authorizeUrl`. Do not retry as Device Flow unless the human is headless.
21
30
 
22
31
  ### Status / logout
23
32
 
24
- - `alphafox auth status --verify`
25
- - `alphafox auth logout` (server revoke + local keychain clear)
33
+ - `alphafox auth status --verify --format json --no-input`
34
+ - `alphafox auth logout --format json --no-input` (server revoke + local keychain clear). If `remoteRevoke` is `failed`, local tokens are still cleared but exit is non-zero — do not claim a full logout.
35
+
36
+ ### Recovery
37
+
38
+ - `401` / `expired_token`: re-run Device Flow or browser login. Do not reuse a token from another profile.
39
+ - Cross-env: production tokens are rejected on staging/local. Switch `--profile` only with explicit operator intent.
26
40
 
27
41
  ## Safety
28
42
 
29
43
  - Fail closed on cross-environment tokens (prod token never hits staging).
30
44
  - Do not copy refresh tokens into CI (automation deferred — ADR 0004).
45
+ - Scopes: `openid` `profile` `offline_access` at grant time.
31
46
 
32
47
  ## operationIds
33
48
 
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: alphafox-engine-backtest
3
+ description: Local Engine WASM backtest (alphafox engine-backtest run) vs catalog experiment CRUD vs chat backtests stub.
4
+ version: 0.3.2
5
+ ---
6
+
7
+ # Engine Backtest
8
+
9
+ Always `--format json --no-input` (or `--format jsonl` when you need progress). Never `--token`. Tokens live in the OS keychain via `alphafox auth login`.
10
+
11
+ ## Which command
12
+
13
+ | Intent | Use | Do not |
14
+ |---|---|---|
15
+ | Iterate a strategy locally (pull tape + run wasm + optional persist) | `alphafox engine-backtest run` (hyphen, built-in) | Do not treat this as server-side execution of `engine_backtest.experiments.byId.runs.create` |
16
+ | List / get / create / rename / delete experiments and persisted runs | Catalog `engine_backtest.*` (underscore) | Do not invent a second catalog |
17
+ | Chat-attached `/api/v1/backtests` job | `skills/strategy` + `backtests.*` | That stub is **not** the Engine WASM runner |
18
+
19
+ Read the create-experiment body with `alphafox schema` **before** composing JSON. Do not invent experiment fields. Large create/run payloads use `--config @file`, never a guessed `--body`.
20
+
21
+ ```bash
22
+ alphafox schema engine_backtest.experiments.create --format json --no-input
23
+ alphafox engine_backtest experiments create --config @./experiment.json --format json --no-input
24
+ ```
25
+
26
+ ## Local run
27
+
28
+ The tape runner ships inside the CLI (plus `ccxt` for public-market pulls). The wasm / Node host is downloaded from the public Vercel Blob manifest (`engine-backtest/latest.json`) into `~/.cache/alphafox/engine-backtest/<hash>/` on first run.
29
+
30
+ Local overrides, in order:
31
+
32
+ 1. `ALPHAFOX_BACKTEST_WASM_DIR` / `ALPHAFOX_BACKTEST_RUNNER_DIR`
33
+ 2. `ALPHAFOX_ENGINE_ROOT` + `/npm/backtest-wasm` or `/npm/backtest-runner`
34
+ 3. Sibling `../alphafox-engine/npm/...` only when `ALPHAFOX_USE_LOCAL_BACKTEST=1`
35
+
36
+ Do not install `@alphafoxai/backtest-wasm` or `@alphafoxai/backtest-runner` from GitHub Packages.
37
+
38
+ ```bash
39
+ alphafox engine-backtest run \
40
+ --experiment <uuid> \
41
+ --definition grid \
42
+ --config @./grid.json \
43
+ --exchange binance \
44
+ --range 2026-08-01..2026-08-08 \
45
+ --initial-equity 10000 \
46
+ --format jsonl --no-input
47
+ ```
48
+
49
+ Also valid: `--from` / `--to` instead of `--range`. `--create-experiment --name "..."` when there is no `--experiment` (needs `strategyDefinitionId` + `strategyDefinitionDisplay` `{zh,en}`; pass `--definition-label-zh` / `--definition-label-en` or the CLI falls back to the definition id). Persisted runs use the account tier from `subscriptions.me.get`; if `--tier` is supplied, it must match. With `--no-persist`, `runs.create` is skipped and `--tier` may simulate `free|pro|pro_max` (default `pro`). `--data-quality` defaults to `strict`. `--replay-timeframe` defaults to `1m` (allowed `1m|3m|5m|15m|30m|1h|4h`); this is the replay/download bar and is merged with plan indicator timeframes so a 4h RSI grid still replays on 1m. `runs.create` is `write`, not `high-risk-write` — do not add `--yes`. Do not update or delete experiments through this command.
50
+
51
+ `--format jsonl` writes one JSON object per progress line (`{event:"progress",stage,fraction}`), then a final `{ok:true,data:{...}}` envelope.
52
+
53
+ ## Iterate
54
+
55
+ 1. Edit config JSON.
56
+ 2. `engine-backtest run` (reuse `--experiment` after the first create).
57
+ 3. Read `data.metrics` / `data.engineVersion` / `data.runId` / `data.experimentUrl`.
58
+ 4. Adjust parameters and run again. Do not invent a token flag if persist returns 401 — `alphafox auth login`.
59
+
60
+ ## Safety
61
+
62
+ - Unauthenticated persist/create fails like `whoami` (HTTP 401, exit 77).
63
+ - `strict` data quality: missing/gapped tape **stops**. Do not retry as `basic` unless the operator asks.
64
+ - `planBacktest` unsupported → fail with the plan reason. Do not degrade to a guessed universe.
65
+ - Catalog `engine_backtest.experiments.byId.update` / `.delete` are high-risk-write and are **not** this command.
66
+
67
+ ## operationIds (catalog only)
68
+
69
+ - `engine_backtest.experiments.create` / `.list` / `.byId.get`
70
+ - `engine_backtest.experiments.byId.runs.create` / `.list`
71
+ - High-risk (not this skill's run path): `engine_backtest.experiments.byId.update` / `.byId.delete` / `.byId.runs.byId.delete`
@@ -1,16 +1,23 @@
1
1
  ---
2
2
  name: alphafox-exchange
3
3
  description: Exchange connectors list and connection management via Public API.
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  ---
6
6
 
7
7
  # Exchange connectors
8
8
 
9
+ Always `--format json --no-input`. List is `exchange-connectors:read`.
10
+
9
11
  ```bash
10
- alphafox api GET /api/v1/exchange-connectors
12
+ alphafox api GET /api/v1/exchange-connectors --format json --no-input
11
13
  ```
12
14
 
13
- Writes that create/disable connectors may be `high-risk-write` — use `--dry-run` / `--yes`.
15
+ Writes that create/disable connectors may be `high-risk-write` — `alphafox schema` first, then `--dry-run` / `--yes`. Do not invent connector fields; large bodies use `--config @file`. Uncataloged connector POST cannot carry a non-empty body.
16
+
17
+ ## Recovery
18
+
19
+ - `403` / wrong resource: stop. Do not retry with production tokens on staging.
20
+ - Never log connector secrets from request bodies.
14
21
 
15
22
  ## operationIds
16
23
 
@@ -1,14 +1,19 @@
1
1
  ---
2
2
  name: alphafox-market
3
3
  description: Market data and spread-radar readonly queries.
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  ---
6
6
 
7
7
  # Market
8
8
 
9
+ Always `--format json --no-input`. Prefer readonly scopes. No mock success if upstream fails.
10
+
9
11
  ```bash
10
- alphafox api GET /api/v1/market/symbols
11
- alphafox api GET /api/v1/spread-radar/pairs
12
+ alphafox api GET /api/v1/spread-radar/pairs --format json --no-input
13
+ alphafox api GET /api/v1/market/symbols --format json --no-input
12
14
  ```
13
15
 
14
- Prefer readonly scopes. No mock success if upstream fails.
16
+ ## operationIds
17
+
18
+ - `spread_radar.pairs.list`
19
+ - `market.symbols.list`
@@ -1,16 +1,21 @@
1
1
  ---
2
2
  name: alphafox-notification
3
3
  description: Notification channels and subscriptions.
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  ---
6
6
 
7
7
  # Notification
8
8
 
9
+ Always `--format json --no-input`. List is `notification:read`. Channel create/replace/delete may be write or high-risk — `alphafox schema` first (no invented fields), then `--dry-run` / `--yes`. Large bodies: `--config @file`.
10
+
9
11
  ```bash
10
- alphafox api GET /api/v1/notification/channels
11
- alphafox api GET /api/v1/notification/subscriptions
12
+ alphafox api GET /api/v1/notification/channels --format json --no-input
13
+ alphafox api GET /api/v1/notification/subscriptions --format json --no-input
12
14
  ```
13
15
 
16
+ If a path is not allowlisted, stop with the structured error. Do not call notification internals.
17
+
14
18
  ## operationIds
15
19
 
16
20
  - `notification.channels.list`
21
+ - `notification.subscriptions.list`