@ekanos/cli 0.1.4 → 0.1.6

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 (72) hide show
  1. package/README.md +132 -6
  2. package/dist/bin.js +14 -1
  3. package/dist/bin.js.map +1 -1
  4. package/dist/commands/dev.d.ts +4 -0
  5. package/dist/commands/dev.js +6 -20
  6. package/dist/commands/dev.js.map +1 -1
  7. package/dist/commands/init.d.ts +25 -0
  8. package/dist/commands/init.js +19 -8
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/publish.d.ts +59 -1
  11. package/dist/commands/publish.js +209 -25
  12. package/dist/commands/publish.js.map +1 -1
  13. package/dist/commands/sources.d.ts +17 -0
  14. package/dist/commands/sources.js +75 -0
  15. package/dist/commands/sources.js.map +1 -0
  16. package/dist/commands/status.js +9 -2
  17. package/dist/commands/status.js.map +1 -1
  18. package/dist/commands/upgrade.d.ts +47 -0
  19. package/dist/commands/upgrade.js +445 -0
  20. package/dist/commands/upgrade.js.map +1 -0
  21. package/dist/commands/use.d.ts +21 -0
  22. package/dist/commands/use.js +62 -0
  23. package/dist/commands/use.js.map +1 -0
  24. package/dist/commands/validate.d.ts +5 -0
  25. package/dist/commands/validate.js +20 -6
  26. package/dist/commands/validate.js.map +1 -1
  27. package/dist/commands/whoami.d.ts +6 -0
  28. package/dist/commands/whoami.js +26 -1
  29. package/dist/commands/whoami.js.map +1 -1
  30. package/dist/context.d.ts +9 -0
  31. package/dist/context.js +9 -0
  32. package/dist/context.js.map +1 -1
  33. package/dist/delegate.d.ts +28 -0
  34. package/dist/delegate.js +136 -0
  35. package/dist/delegate.js.map +1 -0
  36. package/dist/harness-scaffold.d.ts +21 -6
  37. package/dist/harness-scaffold.js +8 -5
  38. package/dist/harness-scaffold.js.map +1 -1
  39. package/dist/index.d.ts +8 -0
  40. package/dist/index.js +81 -4
  41. package/dist/index.js.map +1 -1
  42. package/dist/package-manager.d.ts +10 -0
  43. package/dist/package-manager.js +32 -0
  44. package/dist/package-manager.js.map +1 -1
  45. package/dist/schema-skew.d.ts +77 -0
  46. package/dist/schema-skew.js +163 -0
  47. package/dist/schema-skew.js.map +1 -0
  48. package/dist/seats.d.ts +21 -0
  49. package/dist/seats.js +15 -0
  50. package/dist/seats.js.map +1 -0
  51. package/dist/sources-api.d.ts +44 -0
  52. package/dist/sources-api.js +69 -0
  53. package/dist/sources-api.js.map +1 -0
  54. package/dist/toolchain-api.d.ts +54 -0
  55. package/dist/toolchain-api.js +58 -0
  56. package/dist/toolchain-api.js.map +1 -0
  57. package/dist/toolchain-resolve.d.ts +26 -0
  58. package/dist/toolchain-resolve.js +100 -0
  59. package/dist/toolchain-resolve.js.map +1 -0
  60. package/dist/toolchain.d.ts +21 -0
  61. package/dist/toolchain.js +16 -0
  62. package/dist/toolchain.js.map +1 -0
  63. package/dist/update-notice.d.ts +32 -0
  64. package/dist/update-notice.js +180 -0
  65. package/dist/update-notice.js.map +1 -0
  66. package/dist/validate-findings.d.ts +12 -0
  67. package/dist/validate-findings.js +12 -0
  68. package/dist/validate-findings.js.map +1 -1
  69. package/package.json +1 -1
  70. package/templates/AGENTS.md.tmpl +81 -18
  71. package/templates/CLAUDE.md.tmpl +2 -1
  72. package/templates/claude-skill.md.tmpl +45 -13
@@ -18,8 +18,24 @@ root. Read it before writing integration code. The definition is one
18
18
  3. `npx tsc --noEmit` — types clean.
19
19
  4. `npx ekanos validate --json` — findings clean.
20
20
  5. `npm test` — green.
21
- 6. `npx ekanos publish` submits to the Fusion host (refuses while any
22
- error-severity finding remains).
21
+ 6. **Before publishing, know your target.** If you hold more than one
22
+ developer seat, run `npx ekanos sources --json` and pass the intended
23
+ `--source <slug>` explicitly to `publish`. Never pass `--yes` to get past
24
+ an ambiguous-target error you have not actually resolved — `--yes` is
25
+ consent to a target you already chose, not a way to silence the check.
26
+ 7. `npx ekanos publish --source <slug>` — submits to the Fusion host (refuses
27
+ while any error-severity finding remains, and refuses `forbidden` if you
28
+ hold no seat on that source).
29
+
30
+ ## Keeping the toolchain current
31
+
32
+ If a `validate` finding smells like version skew (an unrecognized-key error on
33
+ a field you're confident is correct), run `npx ekanos upgrade --check` —
34
+ read-only, always safe, reports current vs. target versions and changes
35
+ nothing. A bare `npx ekanos upgrade` MUTATES the project (installs the target
36
+ toolchain, verifies with validate + the test script, rolls back automatically
37
+ on any failure). Never run the bare form just to "see what happens" — use
38
+ `--check` for that.
23
39
 
24
40
  ## Reading CLI output
25
41
 
@@ -32,22 +48,38 @@ remediation instructions and follow them verbatim.** `ekanos validate` puts
32
48
  findings in `data.findings`; `ekanos publish` refuses with exit 10 and the
33
49
  same findings in `data.findings`.
34
50
 
35
- Exit codes to branch on: `0` ok · `2` usage · `3` validation · `4` run
36
- `ekanos login` · `7` version already submitted (bump `package.json#version`) ·
37
- `8` network (retry do NOT re-login) · `9` precondition · `10` fix findings,
38
- publish again.
51
+ Exit codes to branch on: `0` ok · `2` usage · `3` validation (also: ambiguous
52
+ publish target pass `--source` or `--yes`, never guess) · `4` run
53
+ `ekanos login` · `5` forbidden (also: no seat on the target source run
54
+ `ekanos sources`) · `7` version already submitted (bump `package.json#version`) ·
55
+ `8` network (retry — do NOT re-login) · `9` precondition (also: the project's
56
+ `@ekanos/integration-schema` is newer than this CLI bundles — run
57
+ `ekanos upgrade`) · `10` fix findings, publish again.
39
58
 
40
59
  ## Hosts and sessions
41
60
 
42
61
  `ekanos login --host <url>` stores a session; after that, `logout`/`whoami`/
43
- `status`/`publish` resolve the host from `--host` → `EKANOS_HOST` →
44
- ekanos.json's `host` field → the sole stored login. `login` itself never reads
45
- ekanos.json for a host — only `--host`, `EKANOS_HOST`, or the sole stored
46
- login — since it is the verb that creates credentials. `ekanos status` shows
47
- who you are logged in as and what this project has submitted. The first
48
- successful publish saves `host` and `source` into ekanos.json.
62
+ `status`/`sources`/`use`/`publish` resolve the host from `--host` →
63
+ `EKANOS_HOST` → ekanos.json's `host` field → the sole stored login. `login`
64
+ itself never reads ekanos.json for a host — only `--host`, `EKANOS_HOST`, or
65
+ the sole stored login — since it is the verb that creates credentials.
66
+ `ekanos status` shows who you are logged in as and what this project has
67
+ submitted. The first successful publish saves `host` and `source` into
68
+ ekanos.json.
69
+
70
+ ## Publish targets, when you hold more than one seat
71
+
72
+ `ekanos sources` lists every source you hold a seat on; `ekanos use <slug>`
73
+ sets this project's saved target (seat-checked — refuses a slug you don't
74
+ hold). `publish` verifies its resolved target against your seats before
75
+ packing anything, and — running as an agent, which is JSON/non-interactive
76
+ mode — never prompts: an ambiguous implicit target (ekanos.json, more than one
77
+ seat) is refused with the seat list unless you pass `--yes`. **Always resolve
78
+ the ambiguity yourself** (pick the right `--source`) rather than reaching for
79
+ `--yes` on a target you have not verified.
49
80
 
50
81
  ## Before claiming done
51
82
 
52
83
  Run steps 3-5 above and confirm all three are clean — a publish is only as
53
- good as the validate that precedes it.
84
+ good as the validate that precedes it. If publishing, confirm you named the
85
+ right `--source` rather than relying on `--yes`.