argocd-axi 0.1.0 → 0.1.3

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.
package/README.md CHANGED
@@ -1,4 +1,12 @@
1
- # argocd-axi
1
+ <h1 align="center">argocd-axi</h1>
2
+
3
+ <p align="center">
4
+ <a href="https://www.npmjs.com/package/argocd-axi"><img alt="npm" src="https://img.shields.io/npm/v/argocd-axi?style=flat-square" /></a>
5
+ <a href="https://github.com/Dematom1/argocd-axi/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/Dematom1/argocd-axi/ci.yml?style=flat-square&label=ci" /></a>
6
+ <a href="https://github.com/Dematom1/argocd-axi/actions/workflows/release-please.yml"><img alt="Release" src="https://img.shields.io/github/actions/workflow/status/Dematom1/argocd-axi/release-please.yml?style=flat-square&label=release" /></a>
7
+ <a href="https://img.shields.io/badge/platform-macOS%20%7C%20Linux-blue?style=flat-square"><img alt="Platform" src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux-blue?style=flat-square" /></a>
8
+ <a href="https://x.com/dematom1"><img alt="X" src="https://img.shields.io/badge/X-@dematom1-black?style=flat-square" /></a>
9
+ </p>
2
10
 
3
11
  Read-only Argo CD for agents. `argocd-axi` wraps the `argocd` CLI and answers
4
12
  the questions an agent asks during a deployment problem (which apps need
@@ -48,17 +56,20 @@ argocd-axi turns that into small, definitive answers:
48
56
  - **Never hangs.** Nothing streams or follows; waits are bounded; no prompt can
49
57
  block because argocd never gets a stdin.
50
58
 
51
- ## Install
59
+ ## Quick start
60
+
61
+ Install the published package:
52
62
 
53
63
  ```sh
54
64
  npm install -g argocd-axi
65
+ argocd-axi setup hooks
55
66
  ```
56
67
 
57
- Or run it without installing: `npx -y argocd-axi`.
68
+ Or run without installing: `npx -y argocd-axi`. The session hook requires a global install.
58
69
 
59
70
  Requirements:
60
71
 
61
- - Node.js 20 or newer.
72
+ - Node.js 22.12 or newer.
62
73
  - The [`argocd` CLI](https://argo-cd.readthedocs.io/en/stable/cli_installation/)
63
74
  on `PATH`, ideally matching your server's version. Tested with argocd
64
75
  v3.3.6. There is no hard minimum; `ctx` and the home view warn when the CLI
@@ -227,8 +238,11 @@ specific app.
227
238
 
228
239
  ## Development
229
240
 
241
+ Build from source and run checks:
242
+
230
243
  ```sh
231
244
  npm install
245
+ npm run build
232
246
  npm run check # format, lint, typecheck, tests, skill drift check
233
247
  ```
234
248
 
@@ -239,6 +253,30 @@ the recorded fixtures in `test/fixtures/`, and each test gets a throwaway
239
253
  `HOME`. After changing help text, run `npm run build:skill` to regenerate the
240
254
  skill.
241
255
 
256
+ ## Releases
257
+
258
+ Releases are cut by [release-please](https://github.com/googleapis/release-please)
259
+ from conventional commits (`feat:`, `fix:`, `docs:`, ...) on `main`. It keeps
260
+ a release PR open that bumps the package version, updates `src/version.ts`,
261
+ and updates `CHANGELOG.md`; merging
262
+ that PR tags the release and publishes it to npm from
263
+ `.github/workflows/release-please.yml` through npm trusted publishing, with
264
+ provenance and no stored npm token. Each release is staged: after the workflow
265
+ runs, approve the staged version with 2FA using `npm stage approve <id>` or
266
+ npmjs.com. The version is not live on npm until approved. `CHANGELOG.md` and
267
+ `.release-please-manifest.json` are generated, so never edit them by hand.
268
+
269
+ If a release was tagged but its publish failed, re-run the publish on that tag
270
+ (the run must be dispatched on the tag so the provenance names its commit):
271
+
272
+ ```sh
273
+ gh workflow run release-please.yml --ref v0.1.1 -f tag=v0.1.1
274
+ ```
275
+
276
+ A version that is staged but not yet approved does not count as published, so
277
+ re-running would try to stage it again and fail. Approve or discard the staged
278
+ version instead.
279
+
242
280
  ## License
243
281
 
244
282
  [MIT](LICENSE)
package/ROADMAP.md CHANGED
@@ -90,7 +90,8 @@ Default list limits, the attention threshold for Progressing apps
90
90
  app-of-apps, apps in any namespace) are tuned once the target Argo CD
91
91
  instances (version, SSO provider, app count) are known.
92
92
 
93
- ## Publishing
93
+ ## AXI community catalog
94
94
 
95
- npm publication and submission to the
96
- [AXI community catalog](https://github.com/kunchenguid/axi) come after v1.
95
+ Submission to the [AXI community catalog](https://github.com/kunchenguid/axi)
96
+ comes after v1. npm releases are automated; see the Releases section in
97
+ [README.md](README.md).
package/dist/src/args.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { validationError } from "./errors.js";
2
- import { renderBlocks, renderTextBlock } from "./toon.js";
2
+ import { renderBlocks, renderHelpBlock } from "./toon.js";
3
3
  export const BIN = "argocd-axi";
4
4
  /** `--context` selects the Argo CD context; it is accepted by every command. */
5
5
  export const CONTEXT_FLAG = {
@@ -46,10 +46,10 @@ export function renderCommandHelp(spec) {
46
46
  return renderBlocks([
47
47
  `usage: ${usageLine(spec)}`,
48
48
  `description: ${spec.summary}`,
49
- renderTextBlock("args", spec.positionals.map((p) => `<${p.name}>: ${p.description}`)),
50
- renderTextBlock("flags", spec.flags.map((f) => `${flagLabel(f)}: ${f.description}`)),
51
- renderTextBlock("examples", spec.examples),
52
- renderTextBlock("notes", spec.notes ?? []),
49
+ renderHelpBlock("args", spec.positionals.map((p) => `<${p.name}>: ${p.description}`)),
50
+ renderHelpBlock("flags", spec.flags.map((f) => `${flagLabel(f)}: ${f.description}`)),
51
+ renderHelpBlock("examples", spec.examples),
52
+ renderHelpBlock("notes", spec.notes ?? []),
53
53
  ]);
54
54
  }
55
55
  function findFlag(spec, token) {
@@ -3,7 +3,7 @@ import { validateContextName } from "../context.js";
3
3
  import { CODES, axiError } from "../errors.js";
4
4
  import { redactionNotice } from "../redact.js";
5
5
  import { PLANNED_WRITES, REFUSALS } from "../registry.js";
6
- import { encodeObject, renderBlocks, renderHelp, renderTextBlock, } from "../toon.js";
6
+ import { encodeObject, renderBlocks, renderHelp, renderHelpBlock, } from "../toon.js";
7
7
  export { CONTEXT_FLAG };
8
8
  /** The `--context` flag, validated, ready for `runArgocd` options. */
9
9
  export function contextOption(parsed) {
@@ -69,7 +69,7 @@ export async function dispatch(noun, args, subcommands, fallback) {
69
69
  function renderGroupHelp(spec, subcommands) {
70
70
  return renderBlocks([
71
71
  renderCommandHelp(spec),
72
- renderTextBlock("subcommands", Object.values(subcommands).map((sub) => `${sub.spec.path}: ${sub.spec.summary}`)),
72
+ renderHelpBlock("subcommands", Object.values(subcommands).map((sub) => `${sub.spec.path}: ${sub.spec.summary}`)),
73
73
  Object.keys(subcommands).length > 0
74
74
  ? renderHelp([
75
75
  `Run \`argocd-axi ${spec.path} <subcommand> --help\` for subcommand flags`,
package/dist/src/help.js CHANGED
@@ -1,4 +1,4 @@
1
- import { renderBlocks, renderTextBlock } from "./toon.js";
1
+ import { renderBlocks, renderHelpBlock } from "./toon.js";
2
2
  export const DESCRIPTION = "Read-only Argo CD for agents: applications needing attention, diffs, history, health, logs, projects and sync windows";
3
3
  /** The commands block; the skill is generated from it so the two never drift. */
4
4
  export const COMMAND_LINES = [
@@ -24,19 +24,19 @@ export const COMMAND_LINES = [
24
24
  export const TOP_HELP = `${renderBlocks([
25
25
  "usage: argocd-axi <command> [args] [flags]",
26
26
  `description: ${DESCRIPTION}`,
27
- renderTextBlock("commands", COMMAND_LINES),
28
- renderTextBlock("flags", [
27
+ renderHelpBlock("commands", COMMAND_LINES),
28
+ renderHelpBlock("flags", [
29
29
  "--context <name>: Argo CD context to target (default: the current context); accepted by every command that reads Argo CD",
30
30
  "--help: per-command usage, flags and examples, e.g. `argocd-axi apps view --help`",
31
31
  "-v, --version: print the version",
32
32
  ]),
33
- renderTextBlock("examples", [
33
+ renderHelpBlock("examples", [
34
34
  "argocd-axi",
35
35
  "argocd-axi apps --problems",
36
36
  "argocd-axi apps view payments-api --context prod",
37
37
  "argocd-axi apps diff payments-api",
38
38
  ]),
39
- renderTextBlock("notes", [
39
+ renderHelpBlock("notes", [
40
40
  "Read-only: v1 never syncs, rolls back, refreshes or deletes; those verbs answer REFUSED with the raw argocd route (writes are on the roadmap)",
41
41
  "Output is TOON on stdout, errors included; exit 0 = success (an unhealthy app is data, not an error), 1 = error, 2 = usage",
42
42
  "Secret-looking values are redacted and counted; no flag reveals them",
package/dist/src/toon.js CHANGED
@@ -24,14 +24,17 @@ export function encodeObject(value) {
24
24
  * sentences, so help is formatted by hand like other AXI tools do.
25
25
  */
26
26
  export function renderHelp(lines) {
27
- return renderTextBlock("help", lines);
27
+ return renderHelpBlock("help", lines);
28
28
  }
29
- /** Render multi-line text (logs, diffs, manifests) as an indented block. */
30
- export function renderTextBlock(label, lines) {
29
+ /** Render help sections as readable indented lines, not data arrays. */
30
+ export function renderHelpBlock(label, lines) {
31
31
  if (lines.length === 0)
32
32
  return "";
33
- const body = lines.map((line) => ` ${line}`).join("\n");
34
- return `${label}[${lines.length}]:\n${body}`;
33
+ return `${label}[${lines.length}]:\n${lines.map((line) => ` ${line}`).join("\n")}`;
34
+ }
35
+ /** Encode multi-line text (logs, diffs, manifests) as a TOON array. */
36
+ export function renderTextBlock(label, lines) {
37
+ return lines.length === 0 ? "" : encodeObject({ [label]: lines });
35
38
  }
36
39
  /** Join non-empty TOON blocks into one output string. */
37
40
  export function renderBlocks(blocks) {
@@ -1,3 +1,3 @@
1
1
  // Leaf module: node builtins only, so the bin fast path can answer
2
2
  // `--version` without loading the command graph.
3
- export const VERSION = "0.1.0";
3
+ export const VERSION = "0.1.3"; // x-release-please-version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argocd-axi",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Agent-ergonomic, read-only Argo CD CLI - AXI-compliant argocd wrapper with token-efficient TOON output",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -35,7 +35,7 @@
35
35
  "ROADMAP.md"
36
36
  ],
37
37
  "engines": {
38
- "node": ">=20"
38
+ "node": ">=22.12"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -66,6 +66,6 @@
66
66
  "prettier": "3.9.10",
67
67
  "typescript": "5.9.3",
68
68
  "typescript-eslint": "8.72.1",
69
- "vitest": "3.2.7"
69
+ "vitest": "^5.0.5"
70
70
  }
71
71
  }