specguard-mcp 0.1.21 → 0.1.23

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
@@ -34,8 +34,8 @@ refuses to boot and takes the tools that needed no configuration down with it.
34
34
  | --- | --- | --- | --- |
35
35
  | `SPECGUARD_ENDPOINT` | `get_repository_overview`, `list_repositories`, `add_repository`, `registrable_repositories` | — | your SpecGuard instance's root URL, **including the scheme** — e.g. `https://specguard.example.com`, or `http://localhost:3000`. A value with no scheme is refused by name (`SPECGUARD_ENDPOINT is not a usable URL: "sg.example.com"`) rather than surfacing later as an opaque failure. `SPECGUARD_URL` is accepted as an alias, and is the name every message uses when it is the one you set. A blank value counts as unset, so leaving `SPECGUARD_ENDPOINT` empty in a templated config falls through to `SPECGUARD_URL` instead of suppressing it |
36
36
  | `SPECGUARD_API_KEY` | `get_repository_overview`, `near_duplicate_clusters` (default calls) | — | an agent/CI API key (`sgk_…`) issued by that deployment — a **per-repository** key, which is the single repository those tools answer about by default |
37
- | `SPECGUARD_USER_API_KEY` | `list_repositories` (fallback), `add_repository`, `registrable_repositories`, `remove_repository` (fallback), `create_repository_api_key` (fallback), `revoke_repository_api_key` (fallback), `list_repository_agent_keys` (fallback), `revoke_repository_agent_key` (fallback), `list_repository_agent_keys_presented_revoked` (fallback), `list_repository_members` (fallback), `add_repository_member` (fallback), `update_repository_member_permissions` (fallback), `remove_repository_member` (fallback), `get_repository_overview` / `near_duplicate_clusters` **with** `repository` (fallback), `rename_repository` | — | a **user** API key (`sgu_…`), minted from that deployment's account page. A different credential from the one above, not a second place to put the same value: SpecGuard decides which of them a request may use from the token's prefix, before it reads anything, and answers `401` for the other one. Set whichever your tools need — both, if you use both |
38
- | `SPECGUARD_AGENT_API_KEY` | `list_repositories` (preferred), `remove_repository` (preferred), `create_repository_api_key` (preferred), `revoke_repository_api_key` (preferred), `list_repository_agent_keys` (preferred), `revoke_repository_agent_key` (preferred), `list_repository_agent_keys_presented_revoked` (preferred), `list_repository_members` (preferred), `add_repository_member` (preferred), `update_repository_member_permissions` (preferred), `remove_repository_member` (preferred), `get_repository_overview` / `near_duplicate_clusters` **with** `repository` (preferred) | — | an **agent** API key (`sga_…`), minted from that deployment's account page (Agent keys panel) with an explicit set of repositories and permissions. It speaks for nobody: its reach is exactly the set granted onto it, fixed at mint time, and every read is bounded by that set server-side. This is the credential to give an automated agent — one key, many repositories, none of a person's rights. When it and `SPECGUARD_USER_API_KEY` are both set, every tool that answers either key — `list_repositories`, `remove_repository`, the members tools, the key-lifecycle tools, and `get_repository_overview` / `near_duplicate_clusters` **with** `repository` — uses **this** one, so discovery stays inside the set the other tools can reach |
37
+ | `SPECGUARD_USER_API_KEY` | `list_repositories` (fallback), `add_repository`, `registrable_repositories`, `remove_repository` (fallback), `create_repository_api_key` (fallback), `revoke_repository_api_key` (fallback), `list_repository_api_keys` (fallback), `list_repository_agent_keys` (fallback), `revoke_repository_agent_key` (fallback), `list_repository_agent_keys_presented_revoked` (fallback), `list_repository_members` (fallback), `add_repository_member` (fallback), `update_repository_member_permissions` (fallback), `remove_repository_member` (fallback), `get_repository_overview` / `near_duplicate_clusters` **with** `repository` (fallback), `rename_repository` | — | a **user** API key (`sgu_…`), minted from that deployment's account page. A different credential from the one above, not a second place to put the same value: SpecGuard decides which of them a request may use from the token's prefix, before it reads anything, and answers `401` for the other one. Set whichever your tools need — both, if you use both |
38
+ | `SPECGUARD_AGENT_API_KEY` | `list_repositories` (preferred), `remove_repository` (preferred), `create_repository_api_key` (preferred), `revoke_repository_api_key` (preferred), `list_repository_api_keys` (preferred), `list_repository_agent_keys` (preferred), `revoke_repository_agent_key` (preferred), `list_repository_agent_keys_presented_revoked` (preferred), `list_repository_members` (preferred), `add_repository_member` (preferred), `update_repository_member_permissions` (preferred), `remove_repository_member` (preferred), `get_repository_overview` / `near_duplicate_clusters` **with** `repository` (preferred) | — | an **agent** API key (`sga_…`), minted from that deployment's account page (Agent keys panel) with an explicit set of repositories and permissions. It speaks for nobody: its reach is exactly the set granted onto it, fixed at mint time, and every read is bounded by that set server-side. This is the credential to give an automated agent — one key, many repositories, none of a person's rights. When it and `SPECGUARD_USER_API_KEY` are both set, every tool that answers either key — `list_repositories`, `remove_repository`, the members tools, the key-lifecycle tools, and `get_repository_overview` / `near_duplicate_clusters` **with** `repository` — uses **this** one, so discovery stays inside the set the other tools can reach |
39
39
  | `SPECGUARD_LINT_COMMAND` | `lint_intent_annotations` | `specguard-lint` | the command that runs the linter. Most Ruby projects need `bundle exec specguard-lint` |
40
40
  | `SPECGUARD_TIMEOUT_MS` | HTTP tools | `30000` | how long a call to SpecGuard may take |
41
41
 
@@ -78,7 +78,7 @@ Validates the `@intent:` annotations in a Ruby project's spec files against the
78
78
  | --- | --- |
79
79
  | `project_dir` | the project to lint; defaults to the server's working directory. A path that does not exist, or is not a directory, is refused by name — never reported as a missing linter |
80
80
  | `paths` | specific spec files, relative to `project_dir`; omit to check all of them. An empty list is an error rather than a synonym for "everything", because a run that selected nothing must not come back clean |
81
- | `changed` | check only what differs from the merge base with the default branch — CI's mode |
81
+ | `changed` | check what the branch changed since the merge base with the default branch — CI's mode; untracked spec files count too (no `git add` needed), `.gitignore`d paths never enter the selection |
82
82
  | `base` | diff `changed` against this ref instead |
83
83
 
84
84
  Needs no SpecGuard deployment and no API key. A **missing** annotation is never a failure: adoption
@@ -433,7 +433,9 @@ trip through the browser.
433
433
 
434
434
  The body comes back as SpecGuard serves it: a `repository` block (`id`, `full_name`, `name`,
435
435
  `registered_at` — deliberately the same four fields `get_repository_overview` serves in its own
436
- `repository` block) and an `api_key` block (`name`, `token`, `hint`, `created_at`).
436
+ `repository` block) and an `api_key` block (`id`, `name`, `token`, `hint`, `created_at`). `id` is
437
+ the key's durable handle (the token is reveal-once); every **other** key's id comes from
438
+ `list_repository_api_keys`.
437
439
 
438
440
  > ⚠️ **`api_key.token` is shown once and never again.** Nothing stores it and no endpoint can
439
441
  > re-serve it. Capture it from this response — an agent should hand it straight to the person it is
@@ -581,17 +583,20 @@ reads. With both set the **agent** key wins, so the removal answers inside the s
581
583
 
582
584
  ### `create_repository_api_key`
583
585
 
584
- Mints a new CI API key (`sgk_…`) for a SpecGuard repository and returns it alongside the
585
- repository's existing keys. Minting does not disturb existing keys each key on a repository
586
- authenticates independently until revoked.
586
+ Mints a new CI API key (`sgk_…`) for a SpecGuard repository, returning the new key **alone** in
587
+ an `api_key` block — the repository's full key set (keys minted in the web panel or in an
588
+ earlier session included) is `list_repository_api_keys`' answer, never this response's.
589
+ Minting does not disturb existing keys — each key on a repository authenticates independently
590
+ until revoked.
587
591
 
588
592
  | argument | |
589
593
  | --- | --- |
590
594
  | `repository_id` | the repository to mint the key for — its numeric `id`, as `add_repository` returns and `list_repositories` reports, not the `org/repo` handle |
591
595
  | `name` | an optional label for the key; omit it to let SpecGuard use its default name |
592
596
 
593
- The body comes back as SpecGuard serves it: an `api_key` block (`name`, `token`, `hint`,
594
- `created_at`) — the same shape `add_repository` serves.
597
+ The body comes back as SpecGuard serves it: an `api_key` block (`id`, `name`, `token`, `hint`,
598
+ `created_at`) — the same shape `add_repository` serves. `id` is the key's durable handle (the
599
+ token is reveal-once); every **other** key's id comes from `list_repository_api_keys`.
595
600
 
596
601
  > ⚠️ **`api_key.token` is shown once and never again.** Nothing stores it and no endpoint can
597
602
  > re-serve it. Hand it to the person you are working for in your reply. If it is dropped, the
@@ -611,6 +616,45 @@ reads. With both set the **agent** key wins, so the mint answers inside the same
611
616
  key's **owner** (the server's `attributed_user` rule), so minted-key counts keep naming a person
612
617
  rather than nobody.
613
618
 
619
+ ### `list_repository_api_keys`
620
+
621
+ Lists a SpecGuard repository's CI API keys (`sgk_…` keys) — every row of the repository's own key
622
+ set, **live and revoked alike** (unlike the `sga_` listing `list_repository_agent_keys`, which
623
+ serves live rows only). One row per key: `id`, `name`, `token_hint`, `created_at`, `created_by`,
624
+ `last_used_at` — `null` meaning the key has never presented, the negative served rather than
625
+ omitted — `rotated_at`, and `rotated_and_unused` (live-scoped: the stranded shape
626
+ `get_repository_overview`'s `credential_health` reports, at row grain). `status` is
627
+ `live`/`revoked`, with `revoked_at` present only on revoked rows — a revoked `sgk_` row is not a
628
+ credential either, but the rotation's story lives in the population.
629
+
630
+ | argument | |
631
+ | --- | --- |
632
+ | `repository_id` | the repository whose API keys to list — its numeric `id`, as `add_repository` returns and `list_repositories` reports, not the `org/repo` handle |
633
+
634
+ **This is the verify step of the mint-and-replace rotation.** After minting a replacement with
635
+ `create_repository_api_key` and deploying it, list here and check the replacement's
636
+ `last_used_at` BEFORE revoking the old key — `null` means the new token has not presented itself
637
+ yet, and cutting the old key then locks the repository's CI out until a human mints in a browser.
638
+ Neither the mint response (point-in-time by construction: it describes only the key it just made)
639
+ nor `credential_health` (findings only — a never-presented replacement is neither stranded nor
640
+ presented-revoked) can answer this.
641
+
642
+ **This is the id source for every row this session did not mint.** The mint response carries the
643
+ id of the key IT minted (SPGD-993); a key minted in the web panel, or in an earlier session, has
644
+ no other bridge-learnable id — list here to name a `key_id` for `revoke_repository_api_key`.
645
+
646
+ `token_hint` is a hint, never the token — the plaintext existed for exactly one response at mint
647
+ time and nothing persisted it. There is no regenerate: rotation is mint-and-replace
648
+ (`create_repository_api_key` → deploy → verify here → `revoke_repository_api_key`).
649
+
650
+ It reads either of two credentials, whichever is set — and a different one from the `sgk_…` key
651
+ `get_repository_overview` uses. `SPECGUARD_AGENT_API_KEY` (`sga_…`) when it is set: the call then
652
+ reaches only the repositories granted onto that key at mint time, and only where the grant carries
653
+ `keys.manage` — a repository outside that set is answered `404` in SpecGuard's own words.
654
+ `SPECGUARD_USER_API_KEY` (`sgu_…`) when no agent key is set: the same **person** key
655
+ `add_repository` reads. With both set the **agent** key wins, so the listing answers inside the
656
+ same set `list_repositories` reports.
657
+
614
658
  ### `revoke_repository_api_key`
615
659
 
616
660
  Revokes one CI API key on a SpecGuard repository. The key stops authenticating immediately; every
@@ -619,7 +663,7 @@ Revokes one CI API key on a SpecGuard repository. The key stops authenticating i
619
663
  | argument | |
620
664
  | --- | --- |
621
665
  | `repository_id` | the repository the key belongs to — its numeric `id`, as `add_repository` returns and `list_repositories` reports, not the `org/repo` handle |
622
- | `key_id` | the id of the key to revoke, as served in the `api_key` block of `add_repository` or `create_repository_api_key` |
666
+ | `key_id` | the id of the key to revoke the mint response carries the id of the key it minted in its `api_key` block (`create_repository_api_key`, or `add_repository` for the registration key); every **other** key's id comes from `list_repository_api_keys` |
623
667
 
624
668
  The `key_id` is scoped to `repository_id`: a key id belonging to a different repository is refused
625
669
  `404`, never a cross-repository delete. Authorization is the `keys_manage` capability; a member
@@ -325,6 +325,18 @@ function describeFailure(status, body, api) {
325
325
  `${api.endpoint} ${rejection}.`, status);
326
326
  }
327
327
  if (status === 404) {
328
+ // Order by certainty: a body that names its own cause beats the heuristic.
329
+ // The platform's own `render_not_found` body is an in-contract answer with
330
+ // a named cause — most commonly a stale or wrong key id on the
331
+ // rotation/orphan-recovery arc (`repository.api_keys.find` raising into
332
+ // it) — so it is surfaced verbatim FIRST, exactly as the 401 branch does
333
+ // for `reason: "revoked"`. Every body that is not that shape still answers
334
+ // the canned endpoint hint below, because for a 404 whose body is a
335
+ // proxy's HTML (or nothing at all) endpoint misconfiguration remains the
336
+ // likeliest cause and the hint is the right diagnosis for it.
337
+ const notFound = notFoundMessage(body);
338
+ if (notFound !== undefined)
339
+ return new ApiError(notFound, status);
328
340
  return new ApiError(`${api.endpoint} has no such endpoint (404). Check that ${api.endpointVariable} is the ` +
329
341
  "deployment's root URL, without a path.", status);
330
342
  }
@@ -436,6 +448,57 @@ function revokedCredentialMessage(body) {
436
448
  return undefined;
437
449
  return message;
438
450
  }
451
+ /**
452
+ * The 404 whose cause SpecGuard names itself, or nothing.
453
+ *
454
+ * `Api::BaseController` rescues `ActiveRecord::RecordNotFound` into
455
+ * `render_not_found`, which renders `{error: "not_found", message:}` at 404 —
456
+ * and the messages it carries are complete operator guidance ("No repository
457
+ * with that id is available to this key."). On the endpoints this bridge
458
+ * wraps, the most common of those is a stale or wrong key id on the
459
+ * rotation/orphan-recovery arc the revoke tool itself prescribes (mint
460
+ * replacement → deploy → revoke orphan), which reaches here through
461
+ * `repository.api_keys.find`. Answering the canned endpoint hint to that body
462
+ * sends the reader to debug `SPECGUARD_ENDPOINT` when the actual fix is
463
+ * re-checking WHICH key it named — a fault-assigning message recruiting the
464
+ * reader toward the wrong remedy, the same defect class the 401 branch's
465
+ * wrong-kind sentence was.
466
+ *
467
+ * SURFACING IT IS THE OPPOSITE OF RESHAPING IT, the revoked-credential
468
+ * doctrine verbatim: the platform's sentence is handed through with no
469
+ * prefix and no framing, because it is already complete. The 404 status still
470
+ * rides the `ApiError`.
471
+ *
472
+ * The discriminator is the `error` FIELD, never the presence of a `message` —
473
+ * the same field-keyed doctrine the 401 arm applies to `reason: "revoked"`:
474
+ * a 404 from anything that is not this contract (a proxy's HTML, an empty
475
+ * body, JSON with some other `error`) still names no cause at all, so the
476
+ * canned endpoint-hint sentence stays the contract for everything that is not
477
+ * this disclosure. Returns `undefined` rather than a fallback for the same
478
+ * reason its two siblings do, so the decision about what to say stays in one
479
+ * place: a body that does not parse, is not an object, carries any other
480
+ * `error`, or whose `message` is absent, blank or not a string falls back to
481
+ * the canned sentence rather than to a thrown parse error or an invented
482
+ * reading.
483
+ */
484
+ function notFoundMessage(body) {
485
+ let parsed;
486
+ try {
487
+ parsed = JSON.parse(body);
488
+ }
489
+ catch {
490
+ return undefined;
491
+ }
492
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
493
+ return undefined;
494
+ const record = parsed;
495
+ if (record["error"] !== "not_found")
496
+ return undefined;
497
+ const message = record["message"];
498
+ if (typeof message !== "string" || message.trim() === "")
499
+ return undefined;
500
+ return message;
501
+ }
439
502
  /**
440
503
  * The (credential, path) pair ONE repository ask must travel as — both arms
441
504
  * of the singular/plural branch, chosen together or not at all.
@@ -1 +1 @@
1
- {"version":3,"file":"specguard-api.js","sourceRoot":"","sources":["../../../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,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,SAAS,CAAC;IAE7F,MAAM,MAAM,GAAG,MAAiC,CAAC;IACjD,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW;QAAE,OAAO,SAAS,CAAC;IAEtD,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAE3E,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,UAA8B;IAE9B,MAAM,GAAG,GACP,UAAU,KAAK,SAAS;QACtB,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC;QAC1B,CAAC,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,IAAI,GACR,UAAU,KAAK,SAAS;QACtB,CAAC,CAAC,oBAAoB;QACtB,CAAC,CAAC,wBAAwB,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;IAC/D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AACvB,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,CAAC"}
@@ -60,7 +60,9 @@ const addRepository = {
60
60
  "Takes `full_name` as `org/repo` — the same handle `list_repositories` reports and every other " +
61
61
  "SpecGuard surface names a repository by. " +
62
62
  "On success the response carries a `repository` block (`id`, `full_name`, `name`, " +
63
- "`registered_at`) and an `api_key` block (`name`, `token`, `hint`, `created_at`). " +
63
+ "`registered_at`) and an `api_key` block (`id`, `name`, `token`, `hint`, " +
64
+ "`created_at`); `id` is the key's durable handle (the token is reveal-once), and every " +
65
+ "OTHER key's id comes from `list_repository_api_keys`. " +
64
66
  "⚠️ `api_key.token` is shown THIS ONCE AND NEVER AGAIN — nothing stores it and no endpoint can " +
65
67
  "re-serve it, so hand it to the user in your reply rather than assuming it can be fetched " +
66
68
  "later. " +
@@ -1 +1 @@
1
- {"version":3,"file":"add-repository.js","sourceRoot":"","sources":["../../../src/tools/add-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,aAAa,GAAmB;IACpC,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,gBAAgB;IACvB,WAAW,EACT,4FAA4F;QAC5F,mEAAmE;QACnE,gGAAgG;QAChG,2CAA2C;QAC3C,mFAAmF;QACnF,mFAAmF;QACnF,gGAAgG;QAChG,2FAA2F;QAC3F,SAAS;QACT,6FAA6F;QAC7F,8FAA8F;QAC9F,yFAAyF;QACzF,sFAAsF;QACtF,6FAA6F;QAC7F,gGAAgG;QAChG,yFAAyF;QACzF,6FAA6F;QAC7F,+DAA+D;QAC/D,6FAA6F;QAC7F,mFAAmF;QACnF,iCAAiC;IACnC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oFAAoF;oBACpF,gFAAgF;oBAChF,8EAA8E;aACjF;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,yEAAyE;QACzE,6EAA6E;QAC7E,4EAA4E;QAC5E,qEAAqE;QACrE,iEAAiE;QACjE,oBAAoB,EAAE,KAAK;KAC5B;IAED,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO;QACrB,6EAA6E;QAC7E,2EAA2E;QAC3E,gDAAgD;QAChD,MAA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X,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oFAAoF;oBACpF,gFAAgF;oBAChF,8EAA8E;aACjF;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,yEAAyE;QACzE,6EAA6E;QAC7E,4EAA4E;QAC5E,qEAAqE;QACrE,iEAAiE;QACjE,oBAAoB,EAAE,KAAK;KAC5B;IAED,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO;QACrB,6EAA6E;QAC7E,2EAA2E;QAC3E,gDAAgD;QAChD,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;QAE/D,MAAM,GAAG,GAAG,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEjD,MAAM,YAAY,GAAG,MAAM,cAAc,CACvC,GAAG,EACH,sBAAsB,EACtB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAC9B,OAAO,CAAC,KAAK,CACd,CAAC;QAEF,4EAA4E;QAC5E,8EAA8E;QAC9E,2EAA2E;QAC3E,qBAAqB;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,UAAU,EAAE,YAAY;SACzB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -26,14 +26,18 @@ import { optionalString, requireString } from "./args.js";
26
26
  const createRepositoryApiKey = {
27
27
  name: "create_repository_api_key",
28
28
  title: "Create repository API key",
29
- description: "Mints a new CI API key (an sgk_… key) for a SpecGuard repository, and returns it " +
30
- "alongside the repository's existing keys. " +
29
+ description: "Mints a new CI API key (an sgk_… key) for a SpecGuard repository, returning the new key " +
30
+ "ALONE in an `api_key` block — the repository's full key set (keys minted in the web panel " +
31
+ "or in an earlier session included) is `list_repository_api_keys`' answer, never this " +
32
+ "response's. " +
31
33
  "⚠️ `api_key.token` is shown THIS ONCE AND NEVER AGAIN — nothing stores it and no " +
32
34
  "endpoint can re-serve it, so hand it to the user in your reply rather than assuming " +
33
35
  "it can be fetched later. If it is dropped, the recovery is minting another key with " +
34
36
  "this same tool (the platform has no regenerate), then revoking the orphaned one. " +
35
- "On success the response carries an `api_key` block (`name`, `token`, `hint`, " +
36
- "`created_at`) — the same reveal-once shape `add_repository` serves. " +
37
+ "On success the response carries an `api_key` block (`id`, `name`, `token`, `hint`, " +
38
+ "`created_at`) — the same reveal-once shape `add_repository` serves; `id` is the key's " +
39
+ "durable handle (the token is reveal-once), and every OTHER key's id comes from " +
40
+ "`list_repository_api_keys`. " +
37
41
  "Minting does not disturb existing keys: each key on a repository authenticates " +
38
42
  "independently until revoked. " +
39
43
  "Takes `repository_id` (the numeric id `list_repositories` reports) and an optional " +
@@ -1 +1 @@
1
- {"version":3,"file":"create-repository-api-key.js","sourceRoot":"","sources":["../../../src/tools/create-repository-api-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,sBAAsB,GAAmB;IAC7C,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,mFAAmF;QACnF,4CAA4C;QAC5C,mFAAmF;QACnF,sFAAsF;QACtF,sFAAsF;QACtF,mFAAmF;QACnF,+EAA+E;QAC/E,sEAAsE;QACtE,iFAAiF;QACjF,+BAA+B;QAC/B,qFAAqF;QACrF,kDAAkD;QAClD,qFAAqF;QACrF,4BAA4B;QAC5B,8FAA8F;QAC9F,8FAA8F;QAC9F,wFAAwF;QACxF,6FAA6F;QAC7F,kFAAkF;QAClF,8FAA8F;QAC9F,8FAA8F;QAC9F,+FAA+F;QAC/F,2CAA2C;QAC3C,wEAAwE;QACxE,8EAA8E;IAChF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,aAAa,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,2EAA2E;oBAC3E,qEAAqE;aACxE;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,gFAAgF;oBAChF,6EAA6E;aAChF;SACF;QACD,QAAQ,EAAE,CAAC,eAAe,CAAC;QAC3B,4EAA4E;QAC5E,+EAA+E;QAC/E,oBAAoB,EAAE,KAAK;KAC5B;IAED,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO;QACrB,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;QAElD,MAAM,GAAG,GAAG,2BAA2B,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAExD,2EAA2E;QAC3E,qEAAqE;QACrE,0DAA0D;QAC1D,MAAM,OAAO,GAAG,MAAM,cAAc,CAClC,GAAG,EACH,wBAAwB,kBAAkB,CAAC,YAAY,CAAC,WAAW,EACnE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAClC,OAAO,CAAC,KAAK,CACd,CAAC;QAEF,wEAAwE;QACxE,yEAAyE;QACzE,kCAAkC;QAClC,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACtC,UAAU,EAAE,OAAO;SACpB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"create-repository-api-key.js","sourceRoot":"","sources":["../../../src/tools/create-repository-api-key.ts"],"names":[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C,EAAE,MAAM,CAAC,CAAC;QAElD,MAAM,GAAG,GAAG,2BAA2B,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAExD,2EAA2E;QAC3E,qEAAqE;QACrE,0DAA0D;QAC1D,MAAM,OAAO,GAAG,MAAM,cAAc,CAClC,GAAG,EACH,wBAAwB,kBAAkB,CAAC,YAAY,CAAC,WAAW,EACnE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAClC,OAAO,CAAC,KAAK,CACd,CAAC;QAEF,wEAAwE;QACxE,yEAAyE;QACzE,kCAAkC;QAClC,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACtC,UAAU,EAAE,OAAO;SACpB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -100,6 +100,12 @@ import type { ToolDefinition } from "./types.js";
100
100
  * returns the raw body text instead of routing an empty 204 through
101
101
  * `requestJson`'s JSON parse.
102
102
  *
103
+ * - `list_repository_api_keys` wraps the same controller's inventory read
104
+ * (`GET repositories/:repository_id/api_keys`; shipped: SPGD-993,
105
+ * specguard) — the verify step of the mint-and-replace rotation the pair
106
+ * above prescribe, and the id source for every `sgk_` row this session
107
+ * did not mint.
108
+ *
103
109
  * The standing rule itself is unchanged and still binding — which still keeps
104
110
  * out `/check-intent`: it has no backing endpoint (`routes.rb:113` mounts it
105
111
  * as a comment only). A tool advertised in `tools/list` remains a promise an
@@ -5,6 +5,7 @@ import lintIntentAnnotations from "./lint-intent-annotations.js";
5
5
  import listRepositories from "./list-repositories.js";
6
6
  import listRepositoryAgentKeys from "./list-repository-agent-keys.js";
7
7
  import listRepositoryAgentKeysPresentedRevoked from "./list-repository-agent-keys-presented-revoked.js";
8
+ import listRepositoryApiKeys from "./list-repository-api-keys.js";
8
9
  import listRepositoryMembers from "./list-repository-members.js";
9
10
  import nearDuplicateClusters from "./near-duplicate-clusters.js";
10
11
  import getRepositoryOverview from "./repository-overview.js";
@@ -116,6 +117,12 @@ import updateRepositoryMemberPermissions from "./update-repository-member-permis
116
117
  * returns the raw body text instead of routing an empty 204 through
117
118
  * `requestJson`'s JSON parse.
118
119
  *
120
+ * - `list_repository_api_keys` wraps the same controller's inventory read
121
+ * (`GET repositories/:repository_id/api_keys`; shipped: SPGD-993,
122
+ * specguard) — the verify step of the mint-and-replace rotation the pair
123
+ * above prescribe, and the id source for every `sgk_` row this session
124
+ * did not mint.
125
+ *
119
126
  * The standing rule itself is unchanged and still binding — which still keeps
120
127
  * out `/check-intent`: it has no backing endpoint (`routes.rb:113` mounts it
121
128
  * as a comment only). A tool advertised in `tools/list` remains a promise an
@@ -200,6 +207,7 @@ export const TOOLS = [
200
207
  removeRepository,
201
208
  createRepositoryApiKey,
202
209
  revokeRepositoryApiKey,
210
+ listRepositoryApiKeys,
203
211
  nearDuplicateClusters,
204
212
  listRepositoryMembers,
205
213
  addRepositoryMember,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,sBAAsB,MAAM,gCAAgC,CAAC;AACpE,OAAO,qBAAqB,MAAM,8BAA8B,CAAC;AACjE,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,uBAAuB,MAAM,iCAAiC,CAAC;AACtE,OAAO,uCAAuC,MAAM,mDAAmD,CAAC;AACxG,OAAO,qBAAqB,MAAM,8BAA8B,CAAC;AACjE,OAAO,qBAAqB,MAAM,8BAA8B,CAAC;AACjE,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,uBAAuB,MAAM,+BAA+B,CAAC;AACpE,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,sBAAsB,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BAAuB,MAAM,+BAA+B,CAAC;AACpE,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,sBAAsB,MAAM,+BAA+B,CAAC;AACnE,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AACxE,OAAO,sBAAsB,MAAM,gCAAgC,CAAC;AACpE,OAAO,iCAAiC,MAAM,2CAA2C,CAAC;AAG1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqLG;AACH,MAAM,CAAC,MAAM,KAAK,GAA8B;IAC9C,qBAAqB;IACrB,qBAAqB;IACrB,gBAAgB;IAChB,aAAa;IACb,uBAAuB;IACvB,gBAAgB;IAChB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;IACrB,mBAAmB;IACnB,iCAAiC;IACjC,sBAAsB;IACtB,gBAAgB;IAChB,uBAAuB;IACvB,uCAAuC;IACvC,wBAAwB;CACzB,CAAC"}
@@ -72,8 +72,13 @@ const lintIntentAnnotations = {
72
72
  },
73
73
  changed: {
74
74
  type: "boolean",
75
- description: "Check only spec files that differ from the merge base with the default branch — the " +
76
- "mode CI uses. Cannot be combined with `paths`.",
75
+ description: "Check the spec files the branch changed since the merge base with the default branch — " +
76
+ "the mode CI uses. Untracked spec files count as changed too, so a brand-new spec needs " +
77
+ "no `git add`; `.gitignore`d paths never enter the selection. When `changed` is set and " +
78
+ "files were selected, the selection provenance line — the base actually diffed against " +
79
+ "and how many selected files arrived untracked — rides `linter_stderr`, so verifying the " +
80
+ "selection means reading that field, not doing arithmetic on `summary.files`. Cannot be " +
81
+ "combined with `paths`.",
77
82
  },
78
83
  base: {
79
84
  type: "string",
@@ -231,8 +236,9 @@ function parseReport(result) {
231
236
  if (truncated) {
232
237
  throw new CommandError(`specguard-lint produced more than ${MAX_OUTPUT_BYTES / 1024 / 1024} MB of output, so ` +
233
238
  "this bridge truncated it and the JSON document is incomplete — no findings could be " +
234
- "read from it. Narrow the run with `paths`, or with `changed` to check only what " +
235
- "differs from the merge base.");
239
+ "read from it. Narrow the run with `paths`, or with `changed` to check what the " +
240
+ "branch changed the diff since the merge base plus untracked spec files; " +
241
+ "`.gitignore`d paths never enter the selection.");
236
242
  }
237
243
  // The same reasoning one rung further out, and it is ordered AFTER truncation
238
244
  // deliberately: both mean "this bridge stopped reading", but truncation is
@@ -1 +1 @@
1
- {"version":3,"file":"lint-intent-annotations.js","sourceRoot":"","sources":["../../../src/tools/lint-intent-annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAsB,MAAM,2BAA2B,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,qBAAqB,GAAmB;IAC5C,IAAI,EAAE,yBAAyB;IAE/B,KAAK,EAAE,0BAA0B;IAEjC,WAAW,EACT,kFAAkF;QAClF,4FAA4F;QAC5F,6FAA6F;QAC7F,mFAAmF;QACnF,+EAA+E;QAC/E,6FAA6F;QAC7F,4FAA4F;IAE9F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,oFAAoF;oBACpF,8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AAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IAEzD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,YAAY,CACpB,KAAK,KAAK,iCAAiC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,0BAA0B,IAAI;YACnG,wFAAwF;YACxF,0FAA0F;YAC1F,gEAAgE,CACnE,CAAC;IACJ,CAAC;IAED,4EAA4E;IAC5E,8EAA8E;IAC9E,8EAA8E;IAC9E,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;QAC7B,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,YAAY,CACpB,KAAK,KAAK,4DAA4D,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAChG,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,57 @@
1
+ import type { ToolDefinition } from "./types.js";
2
+ /**
3
+ * `GET /api/v1/repositories/:repository_id/api_keys` as a tool — shipped in
4
+ * the platform (`specguard/config/routes.rb:233`,
5
+ * `Api::V1::UserRepositoryApiKeysController#index`, SPGD-993).
6
+ *
7
+ * == The verify step of the rotation this bridge otherwise cannot see
8
+ *
9
+ * The README prescribes the `sgk_` rotation — mint a replacement with
10
+ * `create_repository_api_key`, deploy it, THEN revoke the old one — but until
11
+ * this tool the bridge could not answer the question the middle step turns
12
+ * on: has the replacement presented itself? The mint response is
13
+ * point-in-time by construction (an `api_key` block describing only the new
14
+ * key; usage accrues after it), and the one other read that touches keys,
15
+ * `get_repository_overview`, serves findings only — its `credential_health`
16
+ * is stranded + presented-revoked, and a replacement that never presented is
17
+ * neither. Revoking first would lock the repository's CI out until a human
18
+ * mints in a browser, so the listing is the check to run BEFORE the cut.
19
+ *
20
+ * == The id source for every row this session did not mint
21
+ *
22
+ * `revoke_repository_api_key`'s `key_id` is documented as coming from
23
+ * `add_repository`'s or `create_repository_api_key`'s response — i.e. keys
24
+ * this session minted. A key minted by a person in the panel, or in an
25
+ * earlier session, has no bridge-learnable id except through this listing.
26
+ * The mint response does carry the id of the key IT minted (SPGD-993); this
27
+ * listing is the id source for every OTHER row.
28
+ *
29
+ * == Rows, pass-through
30
+ *
31
+ * The endpoint answers `{api_keys: [...]}` over the repository's key set —
32
+ * LIVE AND REVOKED rows alike, unlike the `sga_` listing
33
+ * (`list_repository_agent_keys`), which deliberately serves live rows only.
34
+ * A revoked `sgk_` row is not a credential either, but the rotation's story
35
+ * lives in the population: `status` (`live`/`revoked`, with `revoked_at`
36
+ * present only on revoked rows) is what tells a replacement apart from its
37
+ * predecessor. Each row serves the controller's own serialization: `id`,
38
+ * `name`, `token_hint`, `created_at`, `created_by`, `last_used_at`
39
+ * (null meaning the key has NEVER presented — the negative is served, not
40
+ * omitted), `rotated_at` (null until `regenerate!` retired a token), and
41
+ * `rotated_and_unused` (live-scoped — the stranded shape `credential_health`
42
+ * reports, served here at row grain). `token_hint` is a hint and never the
43
+ * token: the plaintext existed for exactly one response at mint time and
44
+ * nothing persisted it. Passed through UNRESHAPED — the rows are the
45
+ * controller's own serialization, and reshaping is how a field the revoke
46
+ * needs gets dropped.
47
+ *
48
+ * == No client-side capability probing
49
+ *
50
+ * The server gates at `current_repository(:keys_manage)` — the same gate the
51
+ * create/revoke pair answers to. A caller without `keys_manage` is refused
52
+ * 403 in SpecGuard's own words; a repository outside the credential's reach
53
+ * answers the nil-is-404 fork. This tool predicts neither; it reports what
54
+ * came back.
55
+ */
56
+ declare const listRepositoryApiKeys: ToolDefinition;
57
+ export default listRepositoryApiKeys;
@@ -0,0 +1,119 @@
1
+ import { getJsonObject, requireUserOrAgentApiConfig } from "../support/specguard-api.js";
2
+ import { requireString } from "./args.js";
3
+ /**
4
+ * `GET /api/v1/repositories/:repository_id/api_keys` as a tool — shipped in
5
+ * the platform (`specguard/config/routes.rb:233`,
6
+ * `Api::V1::UserRepositoryApiKeysController#index`, SPGD-993).
7
+ *
8
+ * == The verify step of the rotation this bridge otherwise cannot see
9
+ *
10
+ * The README prescribes the `sgk_` rotation — mint a replacement with
11
+ * `create_repository_api_key`, deploy it, THEN revoke the old one — but until
12
+ * this tool the bridge could not answer the question the middle step turns
13
+ * on: has the replacement presented itself? The mint response is
14
+ * point-in-time by construction (an `api_key` block describing only the new
15
+ * key; usage accrues after it), and the one other read that touches keys,
16
+ * `get_repository_overview`, serves findings only — its `credential_health`
17
+ * is stranded + presented-revoked, and a replacement that never presented is
18
+ * neither. Revoking first would lock the repository's CI out until a human
19
+ * mints in a browser, so the listing is the check to run BEFORE the cut.
20
+ *
21
+ * == The id source for every row this session did not mint
22
+ *
23
+ * `revoke_repository_api_key`'s `key_id` is documented as coming from
24
+ * `add_repository`'s or `create_repository_api_key`'s response — i.e. keys
25
+ * this session minted. A key minted by a person in the panel, or in an
26
+ * earlier session, has no bridge-learnable id except through this listing.
27
+ * The mint response does carry the id of the key IT minted (SPGD-993); this
28
+ * listing is the id source for every OTHER row.
29
+ *
30
+ * == Rows, pass-through
31
+ *
32
+ * The endpoint answers `{api_keys: [...]}` over the repository's key set —
33
+ * LIVE AND REVOKED rows alike, unlike the `sga_` listing
34
+ * (`list_repository_agent_keys`), which deliberately serves live rows only.
35
+ * A revoked `sgk_` row is not a credential either, but the rotation's story
36
+ * lives in the population: `status` (`live`/`revoked`, with `revoked_at`
37
+ * present only on revoked rows) is what tells a replacement apart from its
38
+ * predecessor. Each row serves the controller's own serialization: `id`,
39
+ * `name`, `token_hint`, `created_at`, `created_by`, `last_used_at`
40
+ * (null meaning the key has NEVER presented — the negative is served, not
41
+ * omitted), `rotated_at` (null until `regenerate!` retired a token), and
42
+ * `rotated_and_unused` (live-scoped — the stranded shape `credential_health`
43
+ * reports, served here at row grain). `token_hint` is a hint and never the
44
+ * token: the plaintext existed for exactly one response at mint time and
45
+ * nothing persisted it. Passed through UNRESHAPED — the rows are the
46
+ * controller's own serialization, and reshaping is how a field the revoke
47
+ * needs gets dropped.
48
+ *
49
+ * == No client-side capability probing
50
+ *
51
+ * The server gates at `current_repository(:keys_manage)` — the same gate the
52
+ * create/revoke pair answers to. A caller without `keys_manage` is refused
53
+ * 403 in SpecGuard's own words; a repository outside the credential's reach
54
+ * answers the nil-is-404 fork. This tool predicts neither; it reports what
55
+ * came back.
56
+ */
57
+ const listRepositoryApiKeys = {
58
+ name: "list_repository_api_keys",
59
+ title: "List repository API keys",
60
+ description: "Lists a SpecGuard repository's CI API keys (`sgk_…` keys) — the verify step of the " +
61
+ "mint-and-replace rotation. After minting a replacement with `create_repository_api_key` " +
62
+ "and deploying it, list HERE and check the replacement's `last_used_at` before revoking the " +
63
+ "old key: `null` means the new token has not presented itself yet, and cutting the old key " +
64
+ "then locks the repository's CI out until a human mints in a browser. " +
65
+ "The mint response carries the id of the key IT minted (in its `api_key` block); THIS " +
66
+ "listing is the id source for every other row — keys minted in the web panel or in an " +
67
+ "earlier session have no other bridge-learnable id, so list here to name a `key_id` for " +
68
+ "`revoke_repository_api_key`. " +
69
+ "The population is LIVE AND REVOKED rows alike — `status` (`live`/`revoked`), with " +
70
+ "`revoked_at` present only on revoked rows — a deliberate contrast with the `sga_` listing " +
71
+ "`list_repository_agent_keys`, which serves live rows only: a revoked `sgk_` row is not a " +
72
+ "credential either, but the rotation's story lives in the population. Each row serves " +
73
+ "`id`, `name`, `token_hint`, `created_at`, `created_by`, `last_used_at` (null meaning the " +
74
+ "key has never presented), `rotated_at`, and `rotated_and_unused` — the stranded shape " +
75
+ "`get_repository_overview`'s `credential_health` reports, at row grain. " +
76
+ "`token_hint` is a hint, never the token — the plaintext existed for exactly one response " +
77
+ "at mint time and nothing persisted it. " +
78
+ "Takes `repository_id` (the numeric id `list_repositories` reports, not the `org/repo` handle). " +
79
+ "It authenticates with EITHER of this server's two key-administration credentials, whichever " +
80
+ "is set: SPECGUARD_AGENT_API_KEY (an sga_… key — the call then reaches only the repositories " +
81
+ "granted onto that key at mint time, and only where the grant carries `keys.manage`; a caller " +
82
+ "without that capability is refused 403 in SpecGuard's own words, and a repository outside " +
83
+ "the credential's reach answers 404 — this tool predicts neither) and, " +
84
+ "when that is not set, SPECGUARD_USER_API_KEY (an sgu_… key, the same credential the other " +
85
+ "key-administration tools read). With both set the agent key wins, so the answer stays " +
86
+ "inside the same set `list_repositories` reports. " +
87
+ "Either way it is a DIFFERENT credential from the sgk_… repository key `get_repository_overview` " +
88
+ "uses; SpecGuard refuses each in the other's place.",
89
+ inputSchema: {
90
+ type: "object",
91
+ properties: {
92
+ repository_id: {
93
+ type: "string",
94
+ description: "The repository whose API keys to list — its numeric id, as `add_repository` " +
95
+ "returns and `list_repositories` reports, not the `org/repo` handle.",
96
+ },
97
+ },
98
+ required: ["repository_id"],
99
+ // Closed for the reason every tool here states: `server.ts` forwards
100
+ // `arguments` unvalidated, so an open schema would let a misspelled argument
101
+ // be dropped silently.
102
+ additionalProperties: false,
103
+ },
104
+ async run(args, context) {
105
+ const repositoryId = requireString(args["repository_id"], "repository_id");
106
+ const api = requireUserOrAgentApiConfig(context.config);
107
+ const body = await getJsonObject(api, `/api/v1/repositories/${encodeURIComponent(repositoryId)}/api_keys`, {}, context.fetch);
108
+ // Passed through unreshaped, the standing rule (`types.ts`: "A thin client
109
+ // that reshapes its upstream is not thin") — the rows are the controller's
110
+ // own serialization, and the `id` the revoke needs on a key this session
111
+ // did not mint is one of the fields a reshape could drop.
112
+ return {
113
+ text: JSON.stringify(body, null, 2),
114
+ structured: body,
115
+ };
116
+ },
117
+ };
118
+ export default listRepositoryApiKeys;
119
+ //# sourceMappingURL=list-repository-api-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-repository-api-keys.js","sourceRoot":"","sources":["../../../src/tools/list-repository-api-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA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AC,YAAY,CAAC,WAAW,EACnE,EAAE,EACF,OAAO,CAAC,KAAK,CACd,CAAC;QAEF,2EAA2E;QAC3E,2EAA2E;QAC3E,yEAAyE;QACzE,0DAA0D;QAC1D,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YACnC,UAAU,EAAE,IAAI;SACjB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -40,8 +40,10 @@ const revokeRepositoryApiKey = {
40
40
  "a human mints a new key in a browser. " +
41
41
  "Authorization is the `keys_manage` capability — a member without it is refused " +
42
42
  "403 in SpecGuard's own words. A 204 means the key is revoked. " +
43
- "Takes `repository_id` (the numeric id `list_repositories` reports) and `key_id` " +
44
- "(the id from `add_repository`'s or `create_repository_api_key`'s response). " +
43
+ "Takes `repository_id` (the numeric id `list_repositories` reports) and `key_id` — the mint " +
44
+ "response carries the id of the key IT minted in its `api_key` block " +
45
+ "(`create_repository_api_key`, or `add_repository` for the registration key), and every OTHER " +
46
+ "key's id comes from `list_repository_api_keys`. " +
45
47
  "It authenticates with EITHER of this server's two key-administration credentials, whichever " +
46
48
  "is set: SPECGUARD_AGENT_API_KEY (an sga_… key — the call then reaches only the repositories " +
47
49
  "granted onto that key at mint time, and only where the grant carries `keys.manage`; a " +
@@ -61,9 +63,11 @@ const revokeRepositoryApiKey = {
61
63
  },
62
64
  key_id: {
63
65
  type: "string",
64
- description: "The id of the key to revoke, as served in the `api_key` block of " +
65
- "`add_repository` or `create_repository_api_key` (or the repository's " +
66
- "API-keys page). Scoped to `repository_id`: a foreign key id is refused 404.",
66
+ description: "The id of the key to revoke. The mint response carries the id of the key IT minted " +
67
+ "in its `api_key` block (`create_repository_api_key`, or `add_repository` for the " +
68
+ "registration key); every OTHER key's id comes from `list_repository_api_keys` keys " +
69
+ "minted in the web panel or in an earlier session have no other bridge-learnable id. " +
70
+ "Scoped to `repository_id`: a foreign key id is refused 404.",
67
71
  },
68
72
  },
69
73
  required: ["repository_id", "key_id"],
@@ -1 +1 @@
1
- {"version":3,"file":"revoke-repository-api-key.js","sourceRoot":"","sources":["../../../src/tools/revoke-repository-api-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,sBAAsB,GAAmB;IAC7C,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,iFAAiF;QACjF,4EAA4E;QAC5E,yCAAyC;QACzC,+EAA+E;QAC/E,8DAA8D;QAC9D,mFAAmF;QACnF,8EAA8E;QAC9E,kFAAkF;QAClF,wCAAwC;QACxC,iFAAiF;QACjF,gEAAgE;QAChE,kFAAkF;QAClF,8EAA8E;QAC9E,8FAA8F;QAC9F,8FAA8F;QAC9F,wFAAwF;QACxF,6FAA6F;QAC7F,kFAAkF;QAClF,gGAAgG;QAChG,4CAA4C;QAC5C,wEAAwE;QACxE,8EAA8E;IAChF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,aAAa,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,0EAA0E;oBAC1E,qEAAqE;aACxE;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,mEAAmE;oBACnE,uEAAuE;oBACvE,6EAA6E;aAChF;SACF;QACD,QAAQ,EAAE,CAAC,eAAe,EAAE,QAAQ,CAAC;QACrC,4EAA4E;QAC5E,uEAAuE;QACvE,yDAAyD;QACzD,oBAAoB,EAAE,KAAK;KAC5B;IAED,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO;QACrB,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC;QAC3E,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;QAEtD,MAAM,GAAG,GAAG,2BAA2B,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAExD,MAAM,IAAI,GAAG,MAAM,UAAU,CAC3B,GAAG,EACH,wBAAwB,kBAAkB,CAAC,YAAY,CAAC,aAAa,kBAAkB,CAAC,KAAK,CAAC,EAAE,EAChG,OAAO,CAAC,KAAK,CACd,CAAC;QAEF,0EAA0E;QAC1E,2BAA2B;QAC3B,OAAO;YACL,IAAI,EACF,IAAI,KAAK,EAAE;gBACT,CAAC,CAAC,OAAO,KAAK,mEAAmE;gBACjF,CAAC,CAAC,IAAI;YACV,UAAU,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;SAC1E,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"revoke-repository-api-key.js","sourceRoot":"","sources":["../../../src/tools/revoke-repository-api-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,sBAAsB,GAAmB;IAC7C,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,iFAAiF;QACjF,4EAA4E;QAC5E,yCAAyC;QACzC,+EAA+E;QAC/E,8DAA8D;QAC9D,mFAAmF;QACnF,8EAA8E;QAC9E,kFAAkF;QAClF,wCAAwC;QACxC,iFAAiF;QACjF,gEAAgE;QAChE,6FAA6F;QAC7F,sEAAsE;QACtE,+FAA+F;QAC/F,kDAAkD;QAClD,8FAA8F;QAC9F,8FAA8F;QAC9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F,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specguard-mcp",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "MCP server exposing SpecGuard suite intelligence to AI coding agents",
5
5
  "license": "ISC",
6
6
  "type": "module",