@kici-dev/orchestrator 0.4.0 → 0.6.0

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 (183) hide show
  1. package/dist/__test-helpers__/fake-scaler-state-store.d.ts +24 -0
  2. package/dist/__test-helpers__/mock-db-query.d.ts +130 -0
  3. package/dist/__test-helpers__/mock-db.d.ts +27 -0
  4. package/dist/agent/agent-version.d.ts +34 -0
  5. package/dist/agent/dispatcher.d.ts +151 -13
  6. package/dist/agent/host-roster.d.ts +37 -5
  7. package/dist/agent/registry.d.ts +2 -0
  8. package/dist/app.d.ts +56 -7
  9. package/dist/approvals/apply-decision.d.ts +67 -19
  10. package/dist/approvals/held-run-release-wiring.d.ts +45 -0
  11. package/dist/approvals/independent-wiring.d.ts +55 -0
  12. package/dist/approvals/resume-router.d.ts +9 -0
  13. package/dist/approvals/triggerer-subject.d.ts +37 -0
  14. package/dist/cache/dep-cache.d.ts +54 -10
  15. package/dist/cache/global-eval-round-cache.d.ts +95 -0
  16. package/dist/cache/index.d.ts +3 -0
  17. package/dist/cache/pending-global-evals.d.ts +42 -0
  18. package/dist/cache/pending-inits.d.ts +10 -0
  19. package/dist/cli/api-client.d.ts +18 -0
  20. package/dist/cli/commands/cluster-settings.d.ts +52 -3
  21. package/dist/cli/commands/diagnose.d.ts +6 -0
  22. package/dist/cli/commands/held-run.d.ts +58 -0
  23. package/dist/cli/commands/runs.d.ts +1 -0
  24. package/dist/cli/commands/trust-policy.d.ts +117 -12
  25. package/dist/cli/kici-admin.d.ts +10 -0
  26. package/dist/cli.js +2770 -938
  27. package/dist/cluster/cluster-identity.d.ts +3 -3
  28. package/dist/cluster/cluster-settings-reader.d.ts +59 -1
  29. package/dist/cluster/coordinator.d.ts +44 -0
  30. package/dist/cluster/index.d.ts +4 -0
  31. package/dist/cluster/peer-handler.d.ts +19 -0
  32. package/dist/cluster/peer-registry.d.ts +17 -0
  33. package/dist/cluster/plan-headroom-store.d.ts +26 -0
  34. package/dist/cluster/worker-eviction.d.ts +69 -0
  35. package/dist/cold-store/load-event-log-range.d.ts +10 -3
  36. package/dist/cold-store/load-secret-audit-log-range.d.ts +4 -3
  37. package/dist/cold-store/tables/secret-audit-log.d.ts +4 -3
  38. package/dist/config.d.ts +48 -21
  39. package/dist/content-requirements-cache.d.ts +55 -0
  40. package/dist/contexts/held-runs.d.ts +123 -16
  41. package/dist/contexts/protection/aggregate.d.ts +3 -2
  42. package/dist/contexts/protection/branch-gate.d.ts +15 -0
  43. package/dist/contexts/protection/concurrency-gate.d.ts +8 -2
  44. package/dist/contexts/protection/pipeline.d.ts +18 -0
  45. package/dist/contexts/release-queued-holds.d.ts +35 -0
  46. package/dist/dashboard/attestation-filters.d.ts +8 -0
  47. package/dist/dashboard/handler.d.ts +6 -24
  48. package/dist/db/migrations/109_cluster_settings_cache_knobs.d.ts +4 -0
  49. package/dist/db/migrations/110_cluster_settings_global_eval_knobs.d.ts +4 -0
  50. package/dist/db/migrations/111_cluster_settings_global_eval_wait.d.ts +4 -0
  51. package/dist/db/migrations/112_execution_runs_workflow_repo.d.ts +4 -0
  52. package/dist/db/migrations/113_execution_runs_workflow_repo_index.d.ts +30 -0
  53. package/dist/db/migrations/114_ingest_queue_claim.d.ts +4 -0
  54. package/dist/db/migrations/115_global_workflows_cluster_switch.d.ts +9 -0
  55. package/dist/db/migrations/116_org_plan_headroom.d.ts +4 -0
  56. package/dist/db/migrations/117_invoke_gate_proxy_jobs.d.ts +4 -0
  57. package/dist/db/migrations/118_invoke_gate_scheduling.d.ts +4 -0
  58. package/dist/db/migrations/119_scaler_ha_ownership.d.ts +4 -0
  59. package/dist/db/migrations/120_cluster_settings_scaler_reaper.d.ts +4 -0
  60. package/dist/db/migrations/121_org_settings_allow_untrusted_dockerfile_builds.d.ts +19 -0
  61. package/dist/db/migrations/122_host_roster_scaler_managed.d.ts +25 -0
  62. package/dist/db/migrations/123_workflow_registrations_default_branch.d.ts +24 -0
  63. package/dist/db/migrations/124_cluster_settings_provision_backoff.d.ts +4 -0
  64. package/dist/db/migrations/125_org_trust_directory.d.ts +30 -0
  65. package/dist/db/migrations/126_held_runs_posted_pending_check.d.ts +28 -0
  66. package/dist/db/migrations/127_org_trust_policy_approval_expiry_seconds.d.ts +26 -0
  67. package/dist/db/migrations/128_execution_runs_global_eval_round.d.ts +23 -0
  68. package/dist/db/migrations/129_execution_runs_dispatch_routing_key.d.ts +24 -0
  69. package/dist/db/migrations/130_scaler_provision_outcomes.d.ts +32 -0
  70. package/dist/db/types.d.ts +428 -12
  71. package/dist/entry-helpers.d.ts +28 -0
  72. package/dist/events/event-emitter.d.ts +22 -0
  73. package/dist/events/event-router.d.ts +87 -1
  74. package/dist/events/types.d.ts +2 -23
  75. package/dist/git/credential-broker.d.ts +94 -0
  76. package/dist/git/inherited-secret.d.ts +24 -0
  77. package/dist/git/installation-token.d.ts +38 -0
  78. package/dist/git/job-context.d.ts +13 -0
  79. package/dist/index.js +324 -84
  80. package/dist/metrics/agent-metrics-aggregator.d.ts +4 -4
  81. package/dist/metrics/prometheus.d.ts +170 -3
  82. package/dist/oidc/oidc-mint-registration.d.ts +7 -3
  83. package/dist/orchestrator-core.d.ts +91 -24
  84. package/dist/pipeline/content-filter.d.ts +71 -0
  85. package/dist/pipeline/direct-ingress-deps.d.ts +100 -0
  86. package/dist/pipeline/dispatch-matched-workflow.d.ts +521 -11
  87. package/dist/pipeline/global-eval-round.d.ts +307 -0
  88. package/dist/pipeline/internal-event-pipeline.d.ts +140 -0
  89. package/dist/pipeline/invoke-gate.d.ts +164 -0
  90. package/dist/pipeline/job-contexts.d.ts +16 -17
  91. package/dist/pipeline/needs-scheduler.d.ts +13 -0
  92. package/dist/pipeline/process-webhook.d.ts +126 -31
  93. package/dist/pipeline/processor.d.ts +282 -23
  94. package/dist/pipeline/rerun.d.ts +21 -0
  95. package/dist/pipeline/resume-workflow.d.ts +40 -7
  96. package/dist/pipeline/route-or-dispatch-jobs.d.ts +15 -0
  97. package/dist/pipeline/security-hold-check.d.ts +217 -0
  98. package/dist/pipeline/test-pipeline.d.ts +12 -0
  99. package/dist/pipeline/undispatched-hold-checks.d.ts +23 -0
  100. package/dist/pipeline/webhook-payload-store.d.ts +20 -0
  101. package/dist/policy/dashboard-write-policy-listener.d.ts +62 -0
  102. package/dist/policy/dashboard-write-policy.d.ts +14 -0
  103. package/dist/provenance/backfill-run.d.ts +10 -1
  104. package/dist/provider-registry.d.ts +47 -4
  105. package/dist/providers/github/check-status-poster.d.ts +33 -3
  106. package/dist/providers/github/commit-message.d.ts +20 -0
  107. package/dist/providers/github/file-contents.d.ts +40 -0
  108. package/dist/providers/github/index.d.ts +2 -2
  109. package/dist/providers/github/normalizer.d.ts +3 -2
  110. package/dist/providers/local/normalizer.d.ts +3 -5
  111. package/dist/providers/universal-git/config.d.ts +2 -0
  112. package/dist/providers/universal-git/index.d.ts +11 -2
  113. package/dist/providers/universal-git/normalizer.d.ts +10 -0
  114. package/dist/queue/cleanup.d.ts +7 -1
  115. package/dist/queue/job-queue.d.ts +112 -7
  116. package/dist/queue/terminalize-unroutable.d.ts +13 -0
  117. package/dist/registration/extractor.d.ts +3 -3
  118. package/dist/registration/registration-index.d.ts +7 -0
  119. package/dist/registration/registration-run-match.d.ts +47 -0
  120. package/dist/registration/registration-store.d.ts +22 -0
  121. package/dist/reporting/check-run-reporter.d.ts +146 -2
  122. package/dist/reporting/check-run-summary.d.ts +25 -1
  123. package/dist/reporting/execution-tracker.d.ts +324 -9
  124. package/dist/reporting/log-chunk-sink.d.ts +8 -5
  125. package/dist/reporting/run-aggregator.d.ts +4 -14
  126. package/dist/reporting/step-display-order.d.ts +43 -0
  127. package/dist/routes/admin-held-runs.d.ts +142 -0
  128. package/dist/routes/admin-org-settings.d.ts +5 -0
  129. package/dist/routes/admin-trust-policy.d.ts +34 -6
  130. package/dist/routes/admin.d.ts +15 -0
  131. package/dist/scaler/backend-factory.d.ts +55 -0
  132. package/dist/scaler/bare-metal-backend.d.ts +43 -5
  133. package/dist/scaler/claim-store.d.ts +119 -0
  134. package/dist/scaler/config.d.ts +4 -0
  135. package/dist/scaler/container-backend.d.ts +18 -4
  136. package/dist/scaler/container-routing.d.ts +23 -0
  137. package/dist/scaler/container-spawn.d.ts +28 -0
  138. package/dist/scaler/event-backend.d.ts +124 -0
  139. package/dist/scaler/event-provision-reaper.d.ts +350 -0
  140. package/dist/scaler/failure-tracker.d.ts +1 -1
  141. package/dist/scaler/firecracker-backend.d.ts +33 -6
  142. package/dist/scaler/index.d.ts +11 -1
  143. package/dist/scaler/label-matcher.d.ts +4 -3
  144. package/dist/scaler/manager.d.ts +905 -76
  145. package/dist/scaler/resolve-container-auth.d.ts +45 -0
  146. package/dist/scaler/scaler-events.d.ts +11 -0
  147. package/dist/scaler/scaler-state-store.d.ts +294 -10
  148. package/dist/scaler/types.d.ts +131 -13
  149. package/dist/scaler/warm-pool.d.ts +132 -29
  150. package/dist/security/comment-handler.d.ts +50 -11
  151. package/dist/security/global-workflow-policy.d.ts +52 -12
  152. package/dist/security/identity-link.d.ts +60 -0
  153. package/dist/security/lock-source.d.ts +11 -13
  154. package/dist/security/reduced-privilege-note.d.ts +59 -0
  155. package/dist/security/trust-directory-store.d.ts +233 -0
  156. package/dist/security/trust-policy-gate.d.ts +94 -59
  157. package/dist/security/trust-policy-store.d.ts +3 -0
  158. package/dist/security/trust-resolver.d.ts +14 -98
  159. package/dist/server.d.ts +11 -1
  160. package/dist/server.js +56329 -42234
  161. package/dist/stale-detector/gate-deadline-detector.d.ts +52 -0
  162. package/dist/stale-detector/stale-run-detector.d.ts +61 -3
  163. package/dist/standalone.js +37619 -23570
  164. package/dist/webhook/ingest-accept.d.ts +70 -0
  165. package/dist/webhook/ingest-overflow-buffer.d.ts +35 -4
  166. package/dist/webhook/ingest-overflow-replayer.d.ts +50 -6
  167. package/dist/worker/in-memory-job-queue.d.ts +1 -1
  168. package/dist/ws/agent-handler.d.ts +31 -4
  169. package/dist/ws/dashboard-context-handler.d.ts +28 -4
  170. package/dist/ws/dashboard-global-workflows-handler.d.ts +36 -9
  171. package/dist/ws/execution-status-frame.d.ts +32 -0
  172. package/dist/ws/failure-messages.d.ts +2 -0
  173. package/dist/ws/git-credential-relay.d.ts +39 -0
  174. package/dist/ws/oidc-token-relay.d.ts +6 -11
  175. package/dist/ws/platform-client.d.ts +68 -9
  176. package/dist/ws/test-relay-handlers.d.ts +35 -10
  177. package/installer-image-digests.json +3 -3
  178. package/package.json +24 -19
  179. package/sbom.spdx.json +868 -821
  180. package/dist/approvals/team-membership-lookup.d.ts +0 -13
  181. package/dist/pipeline/inline-eval.d.ts +0 -44
  182. package/dist/providers/github/contributor-resolver.d.ts +0 -30
  183. package/dist/security/contributor-cache.d.ts +0 -83
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Held-run commands for kici-admin.
3
+ *
4
+ * Subcommand namespace: `kici-admin held-run <list|approve|reject>`.
5
+ *
6
+ * The local answer to a held run, for an orchestrator that has no Platform.
7
+ * Every other release surface is Platform-relayed — the dashboard approval
8
+ * queue, `kici approve` / `kici reject`, and the developer MCP tools all reach
9
+ * the applier over the control-plane connection — and the one surface that is
10
+ * not, a `/kici approve` pull-request comment, releases the `security` queue
11
+ * only. So on an independent orchestrator an approval-queue hold had no answer
12
+ * at all and could only expire.
13
+ *
14
+ * These verbs are therefore the mirror image of `trust-policy set`: they work
15
+ * only where no Platform is attached, and the route refuses with 409 wherever
16
+ * one is. That refusal is surfaced verbatim rather than reworded here, so the
17
+ * CLI cannot drift from what the server actually said.
18
+ *
19
+ * A hold is named the same way `kici approve` names one — `--job` / `--step` /
20
+ * `--hold-type` / `--hold`, resolved by the shared `resolveHeldRunId` — so an
21
+ * operator disambiguating a doubly-held job types the same flags on either
22
+ * surface. That sharing is the point: a job gated by BOTH a reviewer hold and a
23
+ * security hold writes two pending rows requiring two decisions, and a second
24
+ * resolver would be free to disagree about which one `--job` means.
25
+ */
26
+ import type { Command } from 'commander';
27
+ import { ApprovalDecision, type HeldRunSummary } from '@kici-dev/engine';
28
+ import type { AdminApiClient } from '../api-client.js';
29
+ /** One held-run row as the admin route reports it, with the clause list it adds. */
30
+ type AdminHeldRunSummary = HeldRunSummary & {
31
+ /** Approver clauses the hold's requirement carries; `[]` when it names nobody. */
32
+ clauses?: Array<{
33
+ team: string;
34
+ } | {
35
+ user: string;
36
+ }>;
37
+ };
38
+ /** The decision response the admin route returns. */
39
+ interface DecisionResponse {
40
+ status: string;
41
+ remainingClauses?: number;
42
+ }
43
+ /**
44
+ * Render the pending holds for a run.
45
+ *
46
+ * Per-entry rather than a count: "which hold do I answer, and who may answer
47
+ * it" is the question this command exists to answer, and the hold id it prints
48
+ * is the `--hold <id>` disambiguator the resolver hands back when nothing else
49
+ * separates two holds.
50
+ */
51
+ export declare function formatHeldRuns(res: {
52
+ heldRuns: AdminHeldRunSummary[];
53
+ }, format: string): string;
54
+ /** Say what the applier did, in the vocabulary `ApplyDecisionResult.status` uses. */
55
+ export declare function formatDecision(res: DecisionResponse, decision: ApprovalDecision): string;
56
+ export declare function registerHeldRunCommands(program: Command, getClient: () => AdminApiClient): void;
57
+ export {};
58
+ //# sourceMappingURL=held-run.d.ts.map
@@ -9,6 +9,7 @@
9
9
  * runs list List execution runs (table or JSON)
10
10
  * runs show <runId> Show run detail with jobs and steps
11
11
  * runs jobs <runId> List jobs for a run (optional steps)
12
+ * runs logs <runId> --job <jobId> Print a page of one step's log lines
12
13
  * runs ephemeral-key <runId> Show scrub status of the run's key
13
14
  * runs secret-outputs <runId> List secret outputs (masked / reveal)
14
15
  *
@@ -1,26 +1,47 @@
1
1
  /**
2
2
  * Org trust-policy commands for kici-admin.
3
3
  *
4
- * Subcommand namespace: `kici-admin trust-policy <show|set>`.
4
+ * Subcommand namespace:
5
+ * `kici-admin trust-policy <show|set|directory|directory-set|directory-remove>`.
5
6
  *
6
7
  * Talks to the orchestrator admin API directly (not the Platform dashboard
7
8
  * proxy), so the CLI stays operable even when Platform is unavailable. Backed
8
9
  * by `packages/orchestrator/src/routes/admin-trust-policy.ts`.
9
10
  *
10
- * `set` only works on an independent orchestrator. Wherever a Platform is
11
- * attached the Platform owns the policy and the route refuses with 409; the
12
- * message is surfaced verbatim rather than reworded here, so the CLI cannot
13
- * drift from what the server actually said.
11
+ * `show` and `directory` read, in every mode. `set`, `directory-set`, and
12
+ * `directory-remove` write, and only work on an independent orchestrator:
13
+ * wherever a Platform is attached it owns both the policy and the approval
14
+ * directory, and the route refuses with 409. That message is surfaced verbatim
15
+ * rather than reworded here, so the CLI cannot drift from what the server
16
+ * actually said.
17
+ *
18
+ * The two directory writers live in this namespace rather than one of their
19
+ * own because they are the same org-trust concept as the policy, gated by the
20
+ * same mode rule against the same `--customer-id`, and reached through the same
21
+ * admin route file. Splitting them out would put half of "who may approve" in a
22
+ * second top-level command with its own copy of that story. They are siblings
23
+ * of the `directory` reader rather than subcommands under it, because turning
24
+ * that leaf into a group would break `kici-admin trust-policy directory` for
25
+ * anyone already running it.
14
26
  */
15
27
  import type { Command } from 'commander';
16
- import { TrustPolicyEnforcement } from '../../security/trust-policy-gate.js';
17
28
  import type { AdminApiClient } from '../api-client.js';
18
29
  /**
19
30
  * The policy shape the admin route returns.
20
31
  *
21
- * The four policy fields are OPTIONAL because the route omits them under
22
- * `enforcement: 'legacy'` there they would be values nothing enforces, and
23
- * printing them is the false assurance this feature exists to remove.
32
+ * The four policy fields are OPTIONAL because a **v0.5.0 independent**
33
+ * orchestrator omits them: there, and only there, no policy row and no attached
34
+ * Platform meant no policy was resolved at all, and it reported
35
+ * `enforcement: 'legacy'` with the fields absent. A v0.5.0 Platform-attached
36
+ * orchestrator with no row still sent the fail-closed values. This build's route
37
+ * always sends them in every mode, so the `unknown` fallbacks below — and the
38
+ * `no policy stored` provenance wording — render only against that older
39
+ * independent orchestrator.
40
+ *
41
+ * The route also sends a deprecated `enforcement` field. Nothing here reads it —
42
+ * on this build it is always `policy` — so it is absent from this shape;
43
+ * `--format json` stringifies the parsed policy object, so the field still
44
+ * reaches the operator verbatim.
24
45
  */
25
46
  export interface TrustPolicyView {
26
47
  customerId: string;
@@ -28,15 +49,39 @@ export interface TrustPolicyView {
28
49
  unknownContributorPolicy?: string;
29
50
  workflowChangePolicy?: string;
30
51
  approvalExpiryHours?: number;
31
- /** `policy` = the values below are enforced; `legacy` = only the legacy rule. */
32
- enforcement?: TrustPolicyEnforcement;
52
+ /**
53
+ * The authoritative hold window. Absent from any orchestrator that predates
54
+ * it, in which case `approvalExpiryHours` is the only window on offer.
55
+ */
56
+ approvalExpirySeconds?: number;
33
57
  source: string | null;
34
58
  updatedAt: string | null;
35
59
  effectiveDefault?: boolean;
36
60
  platformManaged?: boolean;
37
61
  }
38
- /** Render the policy as an aligned table, or as JSON when asked. */
62
+ /**
63
+ * Render the policy as an aligned table, or as JSON when asked.
64
+ *
65
+ * The two deprecated arms are deliberately absent from the table: no dispatch
66
+ * decision reads either one, so a row claiming `Unknown contributor policy:
67
+ * hold` would assert an enforcement that is not happening. They are still
68
+ * stored and still echoed back, and `--format json` prints the policy object the
69
+ * route returned, so the values remain reachable for anyone who needs them.
70
+ */
39
71
  export declare function formatPolicy(policy: TrustPolicyView, format: string): string;
72
+ /**
73
+ * Render the enforced hold window.
74
+ *
75
+ * A whole number of hours still prints as `72 h`, exactly as it always did, so
76
+ * no existing policy's output moves. Anything finer prints in seconds, because
77
+ * the hours spelling cannot express it and rounding would report a window the
78
+ * orchestrator is not applying.
79
+ *
80
+ * A policy carrying neither field is an orchestrator old enough to have
81
+ * resolved no policy at all (see {@link TrustPolicyView}); one carrying only
82
+ * hours is an orchestrator that predates the seconds window.
83
+ */
84
+ export declare function formatExpiry(policy: TrustPolicyView): string;
40
85
  /**
41
86
  * Turn CLI flags into a PATCH body, exiting on an unknown value.
42
87
  *
@@ -44,5 +89,65 @@ export declare function formatPolicy(policy: TrustPolicyView, format: string): s
44
89
  * clear local message naming the accepted values instead of a 400 from the API.
45
90
  */
46
91
  export declare function buildPolicyPatch(opts: Record<string, string | undefined>): Record<string, string | number>;
92
+ /**
93
+ * Warn when a patch names both spellings of the hold window.
94
+ *
95
+ * The route resolves this deterministically — the more specific seconds value
96
+ * wins — but an operator who passed both asked for two different things, so the
97
+ * one that is not applied is named rather than dropped in silence.
98
+ *
99
+ * Returns the lines rather than printing them so the check is unit-testable,
100
+ * matching `policyDeprecationWarnings` below.
101
+ */
102
+ export declare function policyExpiryWarnings(patch: Record<string, string | number>): string[];
103
+ /**
104
+ * Warn about deprecated flags and deprecated values in an already-built patch.
105
+ *
106
+ * Every one of these still PATCHes through unchanged — the orchestrator stores
107
+ * what it is given, and an older Platform or CLI keeps seeing the value it
108
+ * expects. The warning says what the value does now, which for all three is
109
+ * nothing the fork switch reads.
110
+ *
111
+ * Returns the lines rather than printing them so the check is unit-testable,
112
+ * matching `unpairedEvalTimeoutWarnings` in `cluster-settings.ts`.
113
+ */
114
+ export declare function policyDeprecationWarnings(patch: Record<string, string | number>): string[];
115
+ /** One identity link as the directory route reports it. */
116
+ interface DirectoryIdentityLink {
117
+ userId: string;
118
+ provider: string;
119
+ providerUsername: string;
120
+ providerUserId?: string | null;
121
+ }
122
+ /** One operator-defined team as the directory route reports it. */
123
+ interface DirectoryTeam {
124
+ teamName: string;
125
+ memberUserIds: string[];
126
+ }
127
+ /** The cached approval directory as the admin route returns it. */
128
+ export interface TrustDirectoryView {
129
+ customerId: string;
130
+ identityLinks: DirectoryIdentityLink[];
131
+ memberCiTrustLevels: Record<string, string>;
132
+ teamMemberships: DirectoryTeam[];
133
+ updatedAt: string;
134
+ }
135
+ interface DirectoryResponse {
136
+ directory: TrustDirectoryView | null;
137
+ platformManaged: boolean;
138
+ /** Present on `directory-remove`: false when the member held nothing. */
139
+ removed?: boolean;
140
+ }
141
+ /**
142
+ * Render the stored approval directory, or say why there is nothing to render.
143
+ *
144
+ * The directory is what `/kici approve` is resolved against: a commenter is
145
+ * matched to a KiCI user through the identity links, that user's CI trust level
146
+ * decides whether the approval counts, and a `{team}` clause is matched against
147
+ * the team memberships. So the listing is per-entry rather than a set of counts
148
+ * — "who can approve right now" is the question this command exists to answer.
149
+ */
150
+ export declare function formatDirectory(res: DirectoryResponse, format: string): string;
47
151
  export declare function registerTrustPolicyCommands(program: Command, getClient: () => AdminApiClient): void;
152
+ export {};
48
153
  //# sourceMappingURL=trust-policy.d.ts.map
@@ -10,6 +10,16 @@
10
10
  * --token / -t Admin API token (env: KICI_ADMIN_TOKEN, required)
11
11
  */
12
12
  import { Command } from 'commander';
13
+ /**
14
+ * The version `kici-admin --version` reports.
15
+ *
16
+ * `scripts/build-service.mjs` defines `KICI_PKG_VERSION` for every orchestrator
17
+ * build entry, `cli.js` included, so a shipped binary reports the package
18
+ * version it was built from. The fallback covers a source run (tests, `tsx`),
19
+ * where no bundler substituted the constant — the same shape `server.ts` and
20
+ * `standalone.ts` use for `ORCHESTRATOR_VERSION`.
21
+ */
22
+ export declare const CLI_VERSION: string;
13
23
  /**
14
24
  * Build the kici-admin Commander program with every command group registered.
15
25
  * Exported so the surface registry can walk the real command tree without