@kici-dev/orchestrator 0.10.0 → 0.11.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.
- package/dist/cli/api-client.d.ts +20 -1
- package/dist/cli/commands/attestations.d.ts +10 -0
- package/dist/cli/commands/cold-store-impl.d.ts +3 -3
- package/dist/cli/commands/cold-store.d.ts +6 -3
- package/dist/cli/commands/context.d.ts +3 -1
- package/dist/cli/commands/dashboard-encryption-key.d.ts +18 -0
- package/dist/cli/commands/event-dlq.d.ts +2 -2
- package/dist/cli/commands/registration.d.ts +8 -4
- package/dist/cli/commands/secret.d.ts +1 -0
- package/dist/cli/commands/shared/confirm.d.ts +19 -0
- package/dist/cli.js +251 -158
- package/dist/contexts/variable-store.d.ts +2 -0
- package/dist/index.js +26 -0
- package/dist/routes/admin-contexts.d.ts +6 -0
- package/dist/routes/admin-registrations.d.ts +2 -2
- package/dist/secrets/audit-logger.d.ts +1 -1
- package/dist/server.js +174 -25
- package/dist/standalone.js +174 -25
- package/installer-image-digests.json +3 -3
- package/package.json +4 -4
- package/sbom.spdx.json +53 -53
package/dist/cli/api-client.d.ts
CHANGED
|
@@ -158,6 +158,25 @@ export declare class AdminApiClient {
|
|
|
158
158
|
}>;
|
|
159
159
|
setSecret(orgId: string, scope: string, key: string, value: string): Promise<void>;
|
|
160
160
|
deleteSecret(orgId: string, scope: string, key: string): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Create an empty secret scope. A `<backend>:` qualifier selects the
|
|
163
|
+
* backend; an unqualified scope targets the PG backend. Creating a scope
|
|
164
|
+
* that already exists succeeds and changes nothing.
|
|
165
|
+
*/
|
|
166
|
+
createScope(orgId: string, scope: string): Promise<{
|
|
167
|
+
created: boolean;
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* Rename a secret scope inside its backend. The route refuses a move between
|
|
171
|
+
* backends and a rename onto a scope that already exists.
|
|
172
|
+
*/
|
|
173
|
+
renameScope(orgId: string, oldScope: string, newScope: string): Promise<{
|
|
174
|
+
renamed: boolean;
|
|
175
|
+
}>;
|
|
176
|
+
/** Delete a secret scope and every secret in it. */
|
|
177
|
+
deleteScope(orgId: string, scope: string): Promise<{
|
|
178
|
+
deleted: boolean;
|
|
179
|
+
}>;
|
|
161
180
|
/**
|
|
162
181
|
* Create (or upsert) a deployment context. `allowLocalExecution` lets
|
|
163
182
|
* CLI-initiated / local runs resolve secrets through this context.
|
|
@@ -273,7 +292,7 @@ export declare class AdminApiClient {
|
|
|
273
292
|
to?: string;
|
|
274
293
|
limit?: number;
|
|
275
294
|
offset?: number;
|
|
276
|
-
/**
|
|
295
|
+
/** Opt-in cold-store read-through. */
|
|
277
296
|
includeArchived?: boolean;
|
|
278
297
|
}): Promise<any[]>;
|
|
279
298
|
createToken(data: {
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kici-admin attestations` — orchestrator-DB-direct provenance maintenance.
|
|
3
|
+
*
|
|
4
|
+
* attestations reverify [--all] Recompute stored verdicts (verify-at-ingest
|
|
5
|
+
* backfill). Default scope: pending /
|
|
6
|
+
* unverifiable rows; `--all` re-evaluates
|
|
7
|
+
* every row. Direct DB + object storage.
|
|
8
|
+
*
|
|
9
|
+
* Classified `kici-admin` (orchestrator DB plane) per .claude/rules/platform-admin.md.
|
|
10
|
+
*/
|
|
1
11
|
import type { Command } from 'commander';
|
|
2
12
|
import type { AdminApiClient } from '../api-client.js';
|
|
3
13
|
export declare function registerAttestationsCommands(program: Command, getClient: () => AdminApiClient): void;
|
|
@@ -45,7 +45,7 @@ export declare function replayChunk(opts: {
|
|
|
45
45
|
instanceId?: string;
|
|
46
46
|
}): Promise<void>;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Promote a chunk's rows back into the orchestrator PG.
|
|
49
49
|
* Mirrors the Platform-side `replayIntoPg`. Adapter must implement
|
|
50
50
|
* `replayInsert` — currently only `execution_runs`.
|
|
51
51
|
*/
|
|
@@ -65,7 +65,7 @@ export declare function reconcile(opts: {
|
|
|
65
65
|
instanceId?: string;
|
|
66
66
|
}): Promise<void>;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* List chunks past their cold-retention horizon. Read-only;
|
|
69
69
|
* no S3 or PG mutation. Emits one JSON line per row so the output is
|
|
70
70
|
* easy to pipe through `jq` / `column -t` / etc.
|
|
71
71
|
*/
|
|
@@ -77,7 +77,7 @@ export declare function listPurgeable(opts: {
|
|
|
77
77
|
instanceId?: string;
|
|
78
78
|
}): Promise<void>;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Delete S3 objects + clean up PG bookkeeping for chunks
|
|
81
81
|
* past their cold-retention horizon. Defaults to dry-run; pass
|
|
82
82
|
* `--apply` to actually delete.
|
|
83
83
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cold-store commands for kici-admin (orchestrator side).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Every subcommand builds an `OrchestratorColdStore` against the
|
|
5
|
+
* orchestrator Postgres + S3 and delegates to the helpers in
|
|
6
|
+
* `cold-store-impl.ts`. Mirrors
|
|
7
7
|
* `kici-platform-admin cold-store …` on the Platform side.
|
|
8
8
|
*
|
|
9
9
|
* cold-store archive-now <table> Run one cycle for a single adapter
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
* cold-store list-chunks <table> List chunks for a table
|
|
12
12
|
* cold-store verify-chunk <chunkId> Recompute contentHash for a chunk
|
|
13
13
|
* cold-store replay-chunk <chunkId> Re-run UPDATE+DELETE for a stuck chunk
|
|
14
|
+
* cold-store replay-into-pg <chunkId> Promote a chunk's rows back into PG
|
|
14
15
|
* cold-store reconcile <table> Rebuild orphaned manifests from data
|
|
16
|
+
* cold-store list-purgeable List chunks past cold retention
|
|
17
|
+
* cold-store purge-now Purge expired chunks (dry-run default)
|
|
15
18
|
* cold-store peek-chunk <chunkId> Stream the first N rows of a chunk
|
|
16
19
|
*
|
|
17
20
|
* The CLI talks **directly** to the orchestrator Postgres (and the same
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* context show — show a single context with variables + bindings
|
|
9
9
|
* context delete — delete a context (cascades bindings, variables, overrides; held-run history survives; pending held runs block with a clear error, resolved holds do not)
|
|
10
10
|
* context create-template — create/update a context template + its seed variables
|
|
11
|
+
* context source-override list|set|delete — per-source variable overrides (HTTP only)
|
|
11
12
|
*
|
|
12
|
-
* Each command supports two modes
|
|
13
|
+
* Each command except `source-override` supports two modes, the same split
|
|
14
|
+
* `maintenance.ts` uses:
|
|
13
15
|
*
|
|
14
16
|
* HTTP mode (default): requires `--url` + `--token`, routes through the
|
|
15
17
|
* orchestrator admin HTTP API at /api/v1/admin/contexts.
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kici-admin dashboard-encryption-key` — the orchestrator's X25519
|
|
3
|
+
* dashboard-encryption key: the trust root a browser seals a secret / variable
|
|
4
|
+
* value to under the `encrypted` dashboard-write posture, so the hosted control
|
|
5
|
+
* plane relays only opaque ciphertext.
|
|
6
|
+
*
|
|
7
|
+
* dashboard-encryption-key show Print the active kid, its public JWK, where
|
|
8
|
+
* the JWKS is published, and the Verified-tier
|
|
9
|
+
* URL (when that tier is opted into).
|
|
10
|
+
* dashboard-encryption-key list List every key on record (kid / status / created_at).
|
|
11
|
+
* dashboard-encryption-key rotate Mint a new active key; the prior active key
|
|
12
|
+
* is retired from the published JWKS, but its
|
|
13
|
+
* private half stays on record so envelopes
|
|
14
|
+
* already sealed to it still decrypt.
|
|
15
|
+
*
|
|
16
|
+
* The PRIVATE half is master-key wrapped (`KICI_SECRET_KEY`) in the orchestrator
|
|
17
|
+
* DB and is never exportable — recovery from a lost key is a routine rotation.
|
|
18
|
+
*/
|
|
1
19
|
import type { Command } from 'commander';
|
|
2
20
|
export declare function registerDashboardEncryptionKeyCommands(program: Command): void;
|
|
3
21
|
//# sourceMappingURL=dashboard-encryption-key.d.ts.map
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* event-dlq retry <id> — clear DLQ flag, schedule for retry, pg_notify
|
|
7
7
|
* event-dlq discard <id> — permanently delete a DLQ event
|
|
8
8
|
*
|
|
9
|
-
* Operator dogfooding path for at-least-once event delivery
|
|
10
|
-
*
|
|
9
|
+
* Operator dogfooding path for at-least-once event delivery. Customers
|
|
10
|
+
* should generally never see anything in
|
|
11
11
|
* the DLQ — when something lands here it usually means a workflow handler is
|
|
12
12
|
* consistently failing and should be fixed at its root cause. This CLI is the
|
|
13
13
|
* triage surface: inspect last_error, retry once a fix is deployed, or discard
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Workflow registration
|
|
2
|
+
* Workflow registration CLI commands for kici-admin.
|
|
3
3
|
*
|
|
4
4
|
* registration list [--org <id>] [--routing-key <k>] [--repo <ident>] [--limit <n>]
|
|
5
5
|
* registration show <id>
|
|
6
|
+
* registration disable <id> | enable <id>
|
|
7
|
+
* registration delete <id> [--yes]
|
|
6
8
|
*
|
|
7
9
|
* A distinct namespace from `workflow list` — `workflow` is workflow-code,
|
|
8
10
|
* `registration` is the registered-workflow-instance row in
|
|
9
|
-
* workflow_registrations. Both coexist
|
|
10
|
-
* untouched by this plan.
|
|
11
|
+
* workflow_registrations. Both coexist.
|
|
11
12
|
*
|
|
12
|
-
*
|
|
13
|
+
* `list` and `show` are dual-mode: HTTP (via AdminApiClient on the
|
|
13
14
|
* /api/v1/admin/registrations admin API) or `--database-url` (direct DB).
|
|
15
|
+
* `disable`, `enable` and `delete` are HTTP only: they are the operator path
|
|
16
|
+
* for the dashboard's registration writes, and the admin route bumps the
|
|
17
|
+
* registry version so every peer reloads.
|
|
14
18
|
*/
|
|
15
19
|
import type { Command } from 'commander';
|
|
16
20
|
import type { AdminApiClient } from '../api-client.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Message of the error raised when stdin ends before the operator answers. */
|
|
2
|
+
export declare const NO_CONFIRMATION_ANSWER: string;
|
|
3
|
+
/** The streams the prompt writes to and reads from. */
|
|
4
|
+
export interface ConfirmIo {
|
|
5
|
+
input: NodeJS.ReadableStream;
|
|
6
|
+
output: NodeJS.WritableStream;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Write `prompt` and read one line of answer.
|
|
10
|
+
*
|
|
11
|
+
* Resolves true when the line is `y` or `yes` (any case, surrounding spaces
|
|
12
|
+
* ignored) and false for any other line. Rejects with
|
|
13
|
+
* {@link NO_CONFIRMATION_ANSWER} when stdin ends before a line arrives, as it
|
|
14
|
+
* does for a script, a cron job or a `< /dev/null` redirect. Resolving false
|
|
15
|
+
* there would let a verb run without `--yes` exit 0 having done nothing, and
|
|
16
|
+
* the script that ran it would read that as success.
|
|
17
|
+
*/
|
|
18
|
+
export declare function confirmPrompt(prompt: string, io?: ConfirmIo): Promise<boolean>;
|
|
19
|
+
//# sourceMappingURL=confirm.d.ts.map
|