@kici-dev/orchestrator 0.0.0 → 0.1.1
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/LICENSE +661 -0
- package/README.md +1 -6
- package/dist/__test-helpers__/mock-db.d.ts +103 -0
- package/dist/__test-helpers__/mock-ws.d.ts +13 -0
- package/dist/agent/dispatcher.d.ts +231 -0
- package/dist/agent/ownership-tracker.d.ts +46 -0
- package/dist/agent/registry.d.ts +255 -0
- package/dist/agent/token-store.d.ts +96 -0
- package/dist/app.d.ts +234 -0
- package/dist/audit/access-log.d.ts +92 -0
- package/dist/audit/sampling-rate-limiter.d.ts +41 -0
- package/dist/cache/build-coordinator.d.ts +42 -0
- package/dist/cache/dep-cache.d.ts +51 -0
- package/dist/cache/index.d.ts +16 -0
- package/dist/cache/pending-builds.d.ts +14 -0
- package/dist/cache/pending-dynamics.d.ts +15 -0
- package/dist/cache/pending-inits.d.ts +19 -0
- package/dist/cache/pending-tracker.d.ts +65 -0
- package/dist/cache/source-cache.d.ts +30 -0
- package/dist/cli/api-client.d.ts +411 -0
- package/dist/cli/commands/access-log.d.ts +30 -0
- package/dist/cli/commands/agent-service/index.d.ts +15 -0
- package/dist/cli/commands/agent-service/install.d.ts +9 -0
- package/dist/cli/commands/agent-service/logs.d.ts +9 -0
- package/dist/cli/commands/agent-service/restart.d.ts +8 -0
- package/dist/cli/commands/agent-service/start.d.ts +8 -0
- package/dist/cli/commands/agent-service/status.d.ts +10 -0
- package/dist/cli/commands/agent-service/stop.d.ts +8 -0
- package/dist/cli/commands/agent-service/uninstall.d.ts +9 -0
- package/dist/cli/commands/agent-service/upgrade.d.ts +11 -0
- package/dist/cli/commands/agent.d.ts +10 -0
- package/dist/cli/commands/api-key.d.ts +12 -0
- package/dist/cli/commands/audit.d.ts +9 -0
- package/dist/cli/commands/backend.d.ts +17 -0
- package/dist/cli/commands/cold-store-impl.d.ts +101 -0
- package/dist/cli/commands/cold-store.d.ts +30 -0
- package/dist/cli/commands/config.d.ts +16 -0
- package/dist/cli/commands/db.d.ts +19 -0
- package/dist/cli/commands/debug-bundle.d.ts +16 -0
- package/dist/cli/commands/diagnose.d.ts +15 -0
- package/dist/cli/commands/environment.d.ts +24 -0
- package/dist/cli/commands/event-dlq.d.ts +19 -0
- package/dist/cli/commands/event-log.d.ts +27 -0
- package/dist/cli/commands/event.d.ts +4 -0
- package/dist/cli/commands/execution.d.ts +17 -0
- package/dist/cli/commands/inspect-bundle.d.ts +16 -0
- package/dist/cli/commands/maintenance.d.ts +4 -0
- package/dist/cli/commands/orchestrator-service/index.d.ts +12 -0
- package/dist/cli/commands/orchestrator-service/install.d.ts +10 -0
- package/dist/cli/commands/orchestrator-service/logs.d.ts +10 -0
- package/dist/cli/commands/orchestrator-service/restart.d.ts +8 -0
- package/dist/cli/commands/orchestrator-service/start.d.ts +8 -0
- package/dist/cli/commands/orchestrator-service/status.d.ts +10 -0
- package/dist/cli/commands/orchestrator-service/stop.d.ts +8 -0
- package/dist/cli/commands/orchestrator-service/uninstall.d.ts +9 -0
- package/dist/cli/commands/orchestrator-service/upgrade.d.ts +12 -0
- package/dist/cli/commands/org-settings.d.ts +17 -0
- package/dist/cli/commands/peer.d.ts +13 -0
- package/dist/cli/commands/queue.d.ts +16 -0
- package/dist/cli/commands/registration.d.ts +18 -0
- package/dist/cli/commands/rotate.d.ts +9 -0
- package/dist/cli/commands/runs.d.ts +34 -0
- package/dist/cli/commands/secret.d.ts +12 -0
- package/dist/cli/commands/shared/db.d.ts +16 -0
- package/dist/cli/commands/shared/versioned-upgrade.d.ts +38 -0
- package/dist/cli/commands/source.d.ts +24 -0
- package/dist/cli/commands/token.d.ts +10 -0
- package/dist/cli/commands/workflow.d.ts +31 -0
- package/dist/cli/join.d.ts +14 -0
- package/dist/cli/kici-admin.d.ts +13 -0
- package/dist/cli/lazy-deps/cache.d.ts +17 -0
- package/dist/cli/lazy-deps/downloader.d.ts +33 -0
- package/dist/cli/lazy-deps/registry.d.ts +43 -0
- package/dist/cli/service/compose.d.ts +25 -0
- package/dist/cli/service/index.d.ts +24 -0
- package/dist/cli/service/launchd.d.ts +34 -0
- package/dist/cli/service/platform-detect.d.ts +59 -0
- package/dist/cli/service/systemd.d.ts +41 -0
- package/dist/cli/service/types.d.ts +91 -0
- package/dist/cli/service/windows.d.ts +20 -0
- package/dist/cli/wizard/agent-wizard.d.ts +24 -0
- package/dist/cli/wizard/orchestrator-wizard.d.ts +38 -0
- package/dist/cli/wizard/prompts.d.ts +23 -0
- package/dist/cli.js +11435 -0
- package/dist/cluster/cluster-identity.d.ts +59 -0
- package/dist/cluster/coordinator.d.ts +204 -0
- package/dist/cluster/health-api.d.ts +30 -0
- package/dist/cluster/index.d.ts +24 -0
- package/dist/cluster/join-client.d.ts +75 -0
- package/dist/cluster/join-handler.d.ts +58 -0
- package/dist/cluster/join-token.d.ts +94 -0
- package/dist/cluster/orphan-recovery.d.ts +67 -0
- package/dist/cluster/peer-client.d.ts +190 -0
- package/dist/cluster/peer-credentials.d.ts +108 -0
- package/dist/cluster/peer-crypto.d.ts +57 -0
- package/dist/cluster/peer-handler.d.ts +97 -0
- package/dist/cluster/peer-registry.d.ts +186 -0
- package/dist/cluster/raft-state.d.ts +36 -0
- package/dist/cluster/raft.d.ts +140 -0
- package/dist/cold-store/load-access-log-range.d.ts +73 -0
- package/dist/cold-store/load-event-log-range.d.ts +62 -0
- package/dist/cold-store/load-secret-audit-log-range.d.ts +38 -0
- package/dist/cold-store/orchestrator-cold-store.d.ts +58 -0
- package/dist/cold-store/tables/access-log.d.ts +80 -0
- package/dist/cold-store/tables/event-log.d.ts +70 -0
- package/dist/cold-store/tables/execution-jobs.d.ts +63 -0
- package/dist/cold-store/tables/execution-runs.d.ts +81 -0
- package/dist/cold-store/tables/execution-steps.d.ts +65 -0
- package/dist/cold-store/tables/secret-audit-log.d.ts +77 -0
- package/dist/concurrency/dispatch-next-queued.d.ts +63 -0
- package/dist/concurrency/group-tracker.d.ts +51 -0
- package/dist/concurrency/index.d.ts +3 -0
- package/dist/concurrency/queue-manager.d.ts +68 -0
- package/dist/concurrency/waiters.d.ts +58 -0
- package/dist/config/encryption.d.ts +82 -0
- package/dist/config/env-overlay.d.ts +45 -0
- package/dist/config/index.d.ts +16 -0
- package/dist/config/loader.d.ts +26 -0
- package/dist/config/reload.d.ts +113 -0
- package/dist/config/resolver.d.ts +47 -0
- package/dist/config/schema.d.ts +210 -0
- package/dist/config/shared-store.d.ts +142 -0
- package/dist/config/types.d.ts +218 -0
- package/dist/config.d.ts +249 -0
- package/dist/cron/cron-scheduler.d.ts +78 -0
- package/dist/cron/cron-store.d.ts +38 -0
- package/dist/dashboard/handler.d.ts +243 -0
- package/dist/db/client.d.ts +13 -0
- package/dist/db/migration-provider.d.ts +9 -0
- package/dist/db/migrations/001_initial.d.ts +8 -0
- package/dist/db/migrations/002_config_versions_key_version.d.ts +16 -0
- package/dist/db/migrations/003_access_log.d.ts +26 -0
- package/dist/db/migrations/004_rename_bundle_to_source.d.ts +19 -0
- package/dist/db/migrations/005_cold_store_chunk_counter.d.ts +19 -0
- package/dist/db/migrations/006_runs_jobs_steps_archived_at.d.ts +38 -0
- package/dist/db/migrations/007_audit_logs_archived_at.d.ts +42 -0
- package/dist/db/migrations/008_event_log_archived_at.d.ts +40 -0
- package/dist/db/migrations/009_access_log_trigram.d.ts +15 -0
- package/dist/db/migrations/010_cold_store_chunks.d.ts +34 -0
- package/dist/db/migrations/011_drop_source_secrets_notify.d.ts +21 -0
- package/dist/db/migrations/012_peer_credentials_active_uniq.d.ts +28 -0
- package/dist/db/migrations/013_execution_log_bytes.d.ts +21 -0
- package/dist/db/migrations/014_kici_events_lease_retry.d.ts +36 -0
- package/dist/db/migrations/015_org_settings_customer_scoped.d.ts +30 -0
- package/dist/db/migrations/016_org_settings_allow_http_npm.d.ts +15 -0
- package/dist/db/migrations/017_org_id_widen.d.ts +4 -0
- package/dist/db/migrations/018_org_id_prefix_backfill.d.ts +4 -0
- package/dist/db/migrator.d.ts +32 -0
- package/dist/db/types.d.ts +1266 -0
- package/dist/diagnostics/bundle-reader.d.ts +48 -0
- package/dist/diagnostics/bundle-writer.d.ts +57 -0
- package/dist/diagnostics/checks/agents.d.ts +10 -0
- package/dist/diagnostics/checks/certs.d.ts +9 -0
- package/dist/diagnostics/checks/config.d.ts +10 -0
- package/dist/diagnostics/checks/db.d.ts +9 -0
- package/dist/diagnostics/checks/disk.d.ts +9 -0
- package/dist/diagnostics/checks/index.d.ts +17 -0
- package/dist/diagnostics/checks/ws.d.ts +9 -0
- package/dist/diagnostics/index.d.ts +13 -0
- package/dist/diagnostics/runner.d.ts +23 -0
- package/dist/diagnostics/types.d.ts +38 -0
- package/dist/entry-helpers.d.ts +93 -0
- package/dist/environments/binding-store.d.ts +27 -0
- package/dist/environments/environment-store.d.ts +74 -0
- package/dist/environments/held-runs.d.ts +64 -0
- package/dist/environments/index.d.ts +10 -0
- package/dist/environments/protection/branch-gate.d.ts +5 -0
- package/dist/environments/protection/concurrency-gate.d.ts +7 -0
- package/dist/environments/protection/pipeline.d.ts +18 -0
- package/dist/environments/protection/reviewer-gate.d.ts +7 -0
- package/dist/environments/protection/trust-gate.d.ts +7 -0
- package/dist/environments/protection/wait-timer-gate.d.ts +7 -0
- package/dist/environments/variable-store.d.ts +39 -0
- package/dist/events/circuit-breaker.d.ts +33 -0
- package/dist/events/event-emitter.d.ts +55 -0
- package/dist/events/event-retry-scanner.d.ts +52 -0
- package/dist/events/event-router.d.ts +183 -0
- package/dist/events/event-store.d.ts +157 -0
- package/dist/events/trust-store.d.ts +54 -0
- package/dist/events/types.d.ts +61 -0
- package/dist/helpers/ip-extraction.d.ts +29 -0
- package/dist/helpers/rate-limiter.d.ts +23 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +772 -0
- package/dist/lockfile-cache.d.ts +39 -0
- package/dist/metrics/agent-metrics-aggregator.d.ts +116 -0
- package/dist/metrics/metrics-reporter.d.ts +40 -0
- package/dist/metrics/prometheus.d.ts +261 -0
- package/dist/metrics/scheduled-jobs.d.ts +20 -0
- package/dist/orchestrator-core.d.ts +193 -0
- package/dist/pipeline/dispatch-matched-workflow.d.ts +102 -0
- package/dist/pipeline/inline-eval.d.ts +28 -0
- package/dist/pipeline/install-secrets-resolver.d.ts +73 -0
- package/dist/pipeline/manual-schedule.d.ts +21 -0
- package/dist/pipeline/needs-scheduler.d.ts +85 -0
- package/dist/pipeline/process-webhook.d.ts +38 -0
- package/dist/pipeline/processor.d.ts +326 -0
- package/dist/pipeline/rerun.d.ts +79 -0
- package/dist/pipeline/test-pipeline.d.ts +110 -0
- package/dist/provider-registry.d.ts +122 -0
- package/dist/providers/generic/index.d.ts +23 -0
- package/dist/providers/generic/normalizer.d.ts +112 -0
- package/dist/providers/generic/verification.d.ts +47 -0
- package/dist/providers/github/auth.d.ts +60 -0
- package/dist/providers/github/changed-files.d.ts +51 -0
- package/dist/providers/github/check-status-poster.d.ts +35 -0
- package/dist/providers/github/contributor-resolver.d.ts +30 -0
- package/dist/providers/github/index.d.ts +20 -0
- package/dist/providers/github/lock-file.d.ts +32 -0
- package/dist/providers/github/normalizer.d.ts +103 -0
- package/dist/providers/github/repo-url.d.ts +35 -0
- package/dist/providers/internal/index.d.ts +32 -0
- package/dist/providers/internal/lock-file-fetcher.d.ts +34 -0
- package/dist/providers/internal/normalizer.d.ts +89 -0
- package/dist/providers/internal/repo-url-builder.d.ts +42 -0
- package/dist/providers/universal-git/changed-files.d.ts +42 -0
- package/dist/providers/universal-git/clone-token.d.ts +83 -0
- package/dist/providers/universal-git/config.d.ts +192 -0
- package/dist/providers/universal-git/index.d.ts +55 -0
- package/dist/providers/universal-git/lock-file.d.ts +71 -0
- package/dist/providers/universal-git/normalizer.d.ts +90 -0
- package/dist/providers/universal-git/repo-url.d.ts +50 -0
- package/dist/providers/universal-git/ssh-auth.d.ts +94 -0
- package/dist/queue/bootstrap.d.ts +50 -0
- package/dist/queue/cleanup.d.ts +41 -0
- package/dist/queue/depth-refresher.d.ts +65 -0
- package/dist/queue/job-queue.d.ts +343 -0
- package/dist/queue/scheduled-job.d.ts +91 -0
- package/dist/registration/extractor.d.ts +44 -0
- package/dist/registration/registration-index.d.ts +162 -0
- package/dist/registration/registration-store.d.ts +111 -0
- package/dist/reporting/check-run-summary.d.ts +102 -0
- package/dist/reporting/commit-status.d.ts +382 -0
- package/dist/reporting/execution-tracker.d.ts +538 -0
- package/dist/reporting/fs-log-storage.d.ts +41 -0
- package/dist/reporting/log-pull-handler.d.ts +35 -0
- package/dist/reporting/log-storage.d.ts +70 -0
- package/dist/reporting/log-writer.d.ts +45 -0
- package/dist/reporting/s3-log-storage.d.ts +42 -0
- package/dist/reporting/step-log-buffer.d.ts +57 -0
- package/dist/routes/admin-access-log.d.ts +34 -0
- package/dist/routes/admin-backends.d.ts +28 -0
- package/dist/routes/admin-config.d.ts +57 -0
- package/dist/routes/admin-db.d.ts +20 -0
- package/dist/routes/admin-environments.d.ts +42 -0
- package/dist/routes/admin-errors.d.ts +4 -0
- package/dist/routes/admin-event-dlq.d.ts +39 -0
- package/dist/routes/admin-event-log.d.ts +42 -0
- package/dist/routes/admin-events.d.ts +46 -0
- package/dist/routes/admin-maintenance.d.ts +22 -0
- package/dist/routes/admin-org-settings.d.ts +29 -0
- package/dist/routes/admin-queue-execution.d.ts +27 -0
- package/dist/routes/admin-registrations.d.ts +37 -0
- package/dist/routes/admin-runs.d.ts +57 -0
- package/dist/routes/admin-scheduled-jobs.d.ts +36 -0
- package/dist/routes/admin-sources.d.ts +18 -0
- package/dist/routes/admin.d.ts +103 -0
- package/dist/routes/capabilities.d.ts +24 -0
- package/dist/routes/diagnostics.d.ts +16 -0
- package/dist/routes/health.d.ts +20 -0
- package/dist/routes/test-trigger.d.ts +41 -0
- package/dist/routes/uploads.d.ts +38 -0
- package/dist/routes/webhooks.d.ts +36 -0
- package/dist/scaler/bare-metal-backend.d.ts +107 -0
- package/dist/scaler/config.d.ts +303 -0
- package/dist/scaler/container-backend.d.ts +125 -0
- package/dist/scaler/file-tail.d.ts +23 -0
- package/dist/scaler/firecracker-api.d.ts +100 -0
- package/dist/scaler/firecracker-backend.d.ts +263 -0
- package/dist/scaler/index.d.ts +24 -0
- package/dist/scaler/ip-allocator.d.ts +177 -0
- package/dist/scaler/label-matcher.d.ts +73 -0
- package/dist/scaler/log-forwarder.d.ts +54 -0
- package/dist/scaler/machine-ledger.d.ts +160 -0
- package/dist/scaler/manager.d.ts +338 -0
- package/dist/scaler/nftables.d.ts +85 -0
- package/dist/scaler/types.d.ts +388 -0
- package/dist/scaler/warm-pool.d.ts +81 -0
- package/dist/secrets/audit-logger.d.ts +65 -0
- package/dist/secrets/backend-health.d.ts +60 -0
- package/dist/secrets/backend-registry.d.ts +68 -0
- package/dist/secrets/backend-sync.d.ts +40 -0
- package/dist/secrets/cleanup.d.ts +40 -0
- package/dist/secrets/config.d.ts +51 -0
- package/dist/secrets/crypto.d.ts +49 -0
- package/dist/secrets/ephemeral-keys.d.ts +49 -0
- package/dist/secrets/index.d.ts +17 -0
- package/dist/secrets/pg-secret-store.d.ts +105 -0
- package/dist/secrets/rbac.d.ts +47 -0
- package/dist/secrets/secret-output-store.d.ts +46 -0
- package/dist/secrets/secret-resolver.d.ts +137 -0
- package/dist/secrets/source-credentials.d.ts +61 -0
- package/dist/secrets/token-manager.d.ts +63 -0
- package/dist/secrets/vault-secret-store.d.ts +85 -0
- package/dist/security/comment-handler.d.ts +67 -0
- package/dist/security/contributor-cache.d.ts +75 -0
- package/dist/security/global-workflow-policy.d.ts +72 -0
- package/dist/security/lock-source.d.ts +34 -0
- package/dist/security/trust-resolver.d.ts +108 -0
- package/dist/security/workflow-diff.d.ts +26 -0
- package/dist/server.d.ts +17 -0
- package/dist/server.js +48055 -0
- package/dist/sources/index.d.ts +10 -0
- package/dist/sources/source-manager.d.ts +63 -0
- package/dist/sources/source-store.d.ts +79 -0
- package/dist/sources/source-validator.d.ts +16 -0
- package/dist/stale-detector/stale-run-detector.d.ts +109 -0
- package/dist/standalone.d.ts +20 -0
- package/dist/standalone.js +41546 -0
- package/dist/storage/blob-routes.d.ts +20 -0
- package/dist/storage/filesystem.d.ts +60 -0
- package/dist/storage/index.d.ts +20 -0
- package/dist/storage/s3.d.ts +68 -0
- package/dist/storage/sign-url.d.ts +45 -0
- package/dist/storage/types.d.ts +98 -0
- package/dist/webhook/dedup.d.ts +44 -0
- package/dist/webhook/event-log.d.ts +83 -0
- package/dist/webhook/generic-sources.d.ts +169 -0
- package/dist/webhook/handler.d.ts +23 -0
- package/dist/webhook/relay-buffer.d.ts +96 -0
- package/dist/webhook/verify-inbound.d.ts +78 -0
- package/dist/worker/in-memory-execution-tracker.d.ts +94 -0
- package/dist/worker/in-memory-job-queue.d.ts +74 -0
- package/dist/worker/static-agent-token-store.d.ts +58 -0
- package/dist/worker/worker-status.d.ts +36 -0
- package/dist/worker-core.d.ts +74 -0
- package/dist/ws/agent-api-registry.d.ts +49 -0
- package/dist/ws/agent-handler.d.ts +176 -0
- package/dist/ws/agent-heartbeat.d.ts +45 -0
- package/dist/ws/dashboard-backends-handler.d.ts +51 -0
- package/dist/ws/dashboard-diagnostics-handler.d.ts +56 -0
- package/dist/ws/dashboard-env-handler.d.ts +107 -0
- package/dist/ws/dashboard-global-workflows-handler.d.ts +72 -0
- package/dist/ws/dashboard-registrations-handler.d.ts +84 -0
- package/dist/ws/event-buffer.d.ts +16 -0
- package/dist/ws/observer-handler.d.ts +42 -0
- package/dist/ws/observer-registry.d.ts +88 -0
- package/dist/ws/platform-client.d.ts +270 -0
- package/dist/ws/server-options.d.ts +15 -0
- package/package.json +87 -6
- package/sbom.spdx.json +14370 -0
- package/index.js +0 -3
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic pending-job tracker for coordinating two-phase orchestrator pipelines
|
|
3
|
+
* (build-then-execute, init-then-execute, dynamic-eval-then-execute).
|
|
4
|
+
*
|
|
5
|
+
* The orchestrator dispatches a precursor job (build / init / dynamic eval) and
|
|
6
|
+
* needs to wait for the agent to report completion before continuing. This
|
|
7
|
+
* tracker exposes a deferred Promise per jobId that resolves with a typed
|
|
8
|
+
* payload (or rejects on failure / disconnect).
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* - dispatcher calls track(jobId), awaits the returned promise
|
|
12
|
+
* - terminal-status handler calls resolve(jobId, value) or reject(jobId, err)
|
|
13
|
+
* - cleanup(jobId) is invoked on agent disconnect to reject with a fixed error
|
|
14
|
+
*/
|
|
15
|
+
export interface PendingTrackerOptions<T> {
|
|
16
|
+
/** Logger prefix, e.g. 'pending-builds'. */
|
|
17
|
+
logPrefix: string;
|
|
18
|
+
/** Noun used in log messages, e.g. 'build', 'init', 'dynamic eval'. */
|
|
19
|
+
itemLabel: string;
|
|
20
|
+
/** Error message used when cleanup() rejects a pending entry on disconnect. */
|
|
21
|
+
disconnectError: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional extractor that derives extra structured log fields from the
|
|
24
|
+
* resolved value (e.g. `jobCount` for dynamic-eval results). The returned
|
|
25
|
+
* keys are merged into the `resolve` log line for telemetry / debugging.
|
|
26
|
+
*/
|
|
27
|
+
extractResolveMeta?: (value: T) => Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
export declare class PendingTracker<T> {
|
|
30
|
+
private readonly pending;
|
|
31
|
+
private readonly logger;
|
|
32
|
+
private readonly opts;
|
|
33
|
+
constructor(opts: PendingTrackerOptions<T>);
|
|
34
|
+
/**
|
|
35
|
+
* Register a pending job and return a promise that resolves when the agent
|
|
36
|
+
* reports completion (or rejects on failure / disconnect).
|
|
37
|
+
*
|
|
38
|
+
* Each call creates a new Promise. If track() is called for the same jobId
|
|
39
|
+
* twice, the previous Promise's callbacks are replaced -- the previous
|
|
40
|
+
* caller's Promise will never settle (orphaned). Callers (e.g. BuildCoordinator)
|
|
41
|
+
* are responsible for coalescing duplicate work upstream.
|
|
42
|
+
*/
|
|
43
|
+
track(jobId: string): Promise<T>;
|
|
44
|
+
/**
|
|
45
|
+
* Resolve a pending entry (agent reported success).
|
|
46
|
+
*/
|
|
47
|
+
resolve(jobId: string, value: T): void;
|
|
48
|
+
/**
|
|
49
|
+
* Reject a pending entry (agent reported failure).
|
|
50
|
+
*/
|
|
51
|
+
reject(jobId: string, error: Error): void;
|
|
52
|
+
/**
|
|
53
|
+
* Clean up on agent disconnect. Rejects with the configured disconnect error.
|
|
54
|
+
*/
|
|
55
|
+
cleanup(jobId: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* Check if an entry is pending for a given jobId.
|
|
58
|
+
*/
|
|
59
|
+
has(jobId: string): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Number of pending entries (for metrics / debugging).
|
|
62
|
+
*/
|
|
63
|
+
get size(): number;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=pending-tracker.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source-tarball cache layer wrapping CacheStorage.
|
|
3
|
+
*
|
|
4
|
+
* Provides content-hash-keyed operations for customer-workflow source tarballs
|
|
5
|
+
* (the `.kici/` directory minus `node_modules/`, packed by the agent's build
|
|
6
|
+
* job via `source-packer.ts`). Tarballs are platform-independent: raw TypeScript
|
|
7
|
+
* source files are identical across architectures. Refreshes TTL on reads
|
|
8
|
+
* (touch-on-read) so actively used sources stay in cache longer.
|
|
9
|
+
*
|
|
10
|
+
* Cache key format: source/{contentHash}.tar.gz
|
|
11
|
+
*
|
|
12
|
+
* Replaces the former `BundleCache` / `bundles/{contentHash}.js` layout that
|
|
13
|
+
* stored Rolldown-bundled `.compiled.mjs` artifacts — the new execution path
|
|
14
|
+
* downloads the source tarball, extracts it, and imports the workflow entry
|
|
15
|
+
* via the shared oxc-transform ESM loader hook.
|
|
16
|
+
*/
|
|
17
|
+
import type { CacheStorage } from '../storage/types.js';
|
|
18
|
+
export declare class SourceCache {
|
|
19
|
+
private readonly storage;
|
|
20
|
+
constructor(options: {
|
|
21
|
+
storage: CacheStorage;
|
|
22
|
+
});
|
|
23
|
+
has(contentHash: string): Promise<boolean>;
|
|
24
|
+
get(contentHash: string): Promise<Buffer | null>;
|
|
25
|
+
getUrl(contentHash: string): Promise<string | null>;
|
|
26
|
+
getUploadUrl(contentHash: string): Promise<string>;
|
|
27
|
+
store(contentHash: string, tarball: Buffer | string): Promise<void>;
|
|
28
|
+
remove(contentHash: string): Promise<boolean>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=source-cache.d.ts.map
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP client wrapper for the kici-admin CLI.
|
|
3
|
+
*
|
|
4
|
+
* Communicates with the orchestrator admin API via Bearer token authentication.
|
|
5
|
+
* All methods are thin wrappers around fetch() that handle JSON serialization,
|
|
6
|
+
* error formatting, and URL construction.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Universal-git configuration shape carried in `git_config` on
|
|
10
|
+
* generic_webhook_sources. Matches `UniversalGitConfigSchema` in
|
|
11
|
+
* `providers/universal-git/config.ts`. Kept as a loose `Record` here to
|
|
12
|
+
* avoid a cross-package import in the CLI wire type.
|
|
13
|
+
*/
|
|
14
|
+
export type GenericSourceGitConfigPayload = Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* Response shape for generic webhook sources from the admin API.
|
|
17
|
+
*/
|
|
18
|
+
export interface GenericSourceResponse {
|
|
19
|
+
id: string;
|
|
20
|
+
customer_id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
routing_key: string;
|
|
23
|
+
verification_method: string;
|
|
24
|
+
verification_config: string;
|
|
25
|
+
event_type_header: string | null;
|
|
26
|
+
event_type_path: string | null;
|
|
27
|
+
idempotency_key_header: string | null;
|
|
28
|
+
idempotency_key_path: string | null;
|
|
29
|
+
dedup_window_seconds: number;
|
|
30
|
+
max_payload_bytes: number;
|
|
31
|
+
allowed_events: string | null;
|
|
32
|
+
strip_headers: string;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
rate_limit_rpm: number;
|
|
35
|
+
created_at: string;
|
|
36
|
+
updated_at: string;
|
|
37
|
+
deleted_at: string | null;
|
|
38
|
+
provider_type?: string;
|
|
39
|
+
/** Universal-git config; raw JSON string or parsed object (pg driver dependent). */
|
|
40
|
+
git_config?: string | GenericSourceGitConfigPayload | null;
|
|
41
|
+
}
|
|
42
|
+
export declare class AdminApiClient {
|
|
43
|
+
private readonly baseUrl;
|
|
44
|
+
private readonly token;
|
|
45
|
+
constructor(baseUrl: string, token: string);
|
|
46
|
+
/**
|
|
47
|
+
* Make an authenticated HTTP request to the admin API.
|
|
48
|
+
*/
|
|
49
|
+
private request;
|
|
50
|
+
/**
|
|
51
|
+
* Public GET request returning parsed JSON.
|
|
52
|
+
*/
|
|
53
|
+
get<T>(path: string): Promise<T>;
|
|
54
|
+
/**
|
|
55
|
+
* Public POST request returning parsed JSON.
|
|
56
|
+
*/
|
|
57
|
+
post<T>(path: string, body: unknown): Promise<T>;
|
|
58
|
+
/**
|
|
59
|
+
* Public PATCH request returning parsed JSON.
|
|
60
|
+
*/
|
|
61
|
+
patch<T>(path: string, body: unknown): Promise<T>;
|
|
62
|
+
/**
|
|
63
|
+
* Public DELETE request returning parsed JSON.
|
|
64
|
+
*/
|
|
65
|
+
delete<T>(path: string): Promise<T>;
|
|
66
|
+
/**
|
|
67
|
+
* Public GET request returning raw response text.
|
|
68
|
+
*/
|
|
69
|
+
getText(path: string): Promise<string>;
|
|
70
|
+
listScopes(orgId: string): Promise<{
|
|
71
|
+
scopes: string[];
|
|
72
|
+
}>;
|
|
73
|
+
listKeys(orgId: string, scope: string): Promise<{
|
|
74
|
+
keys: string[];
|
|
75
|
+
}>;
|
|
76
|
+
setSecret(orgId: string, scope: string, key: string, value: string): Promise<void>;
|
|
77
|
+
deleteSecret(orgId: string, scope: string, key: string): Promise<void>;
|
|
78
|
+
rotateKey(): Promise<{
|
|
79
|
+
reEncrypted: number;
|
|
80
|
+
reEncryptedConfigs: number;
|
|
81
|
+
skippedConfigs: number;
|
|
82
|
+
}>;
|
|
83
|
+
createGenericSource(data: {
|
|
84
|
+
orgId: string;
|
|
85
|
+
name: string;
|
|
86
|
+
verificationMethod?: string;
|
|
87
|
+
verificationConfig?: Record<string, unknown>;
|
|
88
|
+
eventTypeHeader?: string;
|
|
89
|
+
eventTypePath?: string;
|
|
90
|
+
idempotencyKeyHeader?: string;
|
|
91
|
+
idempotencyKeyPath?: string;
|
|
92
|
+
dedupWindowSeconds?: number;
|
|
93
|
+
maxPayloadBytes?: number;
|
|
94
|
+
allowedEvents?: string[];
|
|
95
|
+
stripHeaders?: string[];
|
|
96
|
+
rateLimitRpm?: number;
|
|
97
|
+
providerType?: string;
|
|
98
|
+
gitConfig?: GenericSourceGitConfigPayload;
|
|
99
|
+
}): Promise<{
|
|
100
|
+
source: GenericSourceResponse;
|
|
101
|
+
}>;
|
|
102
|
+
listGenericSources(orgId: string, includeDeleted?: boolean): Promise<{
|
|
103
|
+
sources: GenericSourceResponse[];
|
|
104
|
+
}>;
|
|
105
|
+
getGenericSource(id: string): Promise<{
|
|
106
|
+
source: GenericSourceResponse;
|
|
107
|
+
}>;
|
|
108
|
+
updateGenericSource(id: string, data: {
|
|
109
|
+
name?: string;
|
|
110
|
+
verificationMethod?: string;
|
|
111
|
+
verificationConfig?: Record<string, unknown>;
|
|
112
|
+
eventTypeHeader?: string;
|
|
113
|
+
eventTypePath?: string;
|
|
114
|
+
idempotencyKeyHeader?: string;
|
|
115
|
+
idempotencyKeyPath?: string;
|
|
116
|
+
dedupWindowSeconds?: number;
|
|
117
|
+
maxPayloadBytes?: number;
|
|
118
|
+
allowedEvents?: string[];
|
|
119
|
+
stripHeaders?: string[];
|
|
120
|
+
rateLimitRpm?: number;
|
|
121
|
+
providerType?: string;
|
|
122
|
+
/** `null` clears the config; omit to leave unchanged. */
|
|
123
|
+
gitConfig?: GenericSourceGitConfigPayload | null;
|
|
124
|
+
}): Promise<{
|
|
125
|
+
source: GenericSourceResponse;
|
|
126
|
+
}>;
|
|
127
|
+
deleteGenericSource(id: string, hard?: boolean): Promise<{
|
|
128
|
+
deleted: boolean;
|
|
129
|
+
hard: boolean;
|
|
130
|
+
}>;
|
|
131
|
+
enableGenericSource(id: string): Promise<{
|
|
132
|
+
enabled: boolean;
|
|
133
|
+
}>;
|
|
134
|
+
disableGenericSource(id: string): Promise<{
|
|
135
|
+
enabled: boolean;
|
|
136
|
+
}>;
|
|
137
|
+
queryAudit(opts?: {
|
|
138
|
+
contextName?: string;
|
|
139
|
+
routingKey?: string;
|
|
140
|
+
action?: string;
|
|
141
|
+
from?: string;
|
|
142
|
+
to?: string;
|
|
143
|
+
limit?: number;
|
|
144
|
+
offset?: number;
|
|
145
|
+
/** Phase D opt-in for cold-store read-through. */
|
|
146
|
+
includeArchived?: boolean;
|
|
147
|
+
}): Promise<any[]>;
|
|
148
|
+
createToken(data: {
|
|
149
|
+
label: string;
|
|
150
|
+
role: string;
|
|
151
|
+
routingKey?: string;
|
|
152
|
+
}): Promise<{
|
|
153
|
+
token: string;
|
|
154
|
+
id: string;
|
|
155
|
+
}>;
|
|
156
|
+
listTokens(): Promise<any[]>;
|
|
157
|
+
revokeToken(id: string): Promise<void>;
|
|
158
|
+
createAgentToken(opts: {
|
|
159
|
+
labels?: string[];
|
|
160
|
+
}): Promise<{
|
|
161
|
+
id: string;
|
|
162
|
+
token: string;
|
|
163
|
+
}>;
|
|
164
|
+
listAgentTokens(opts?: {
|
|
165
|
+
type?: string;
|
|
166
|
+
}): Promise<{
|
|
167
|
+
tokens: any[];
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* Revoke an agent token.
|
|
171
|
+
*
|
|
172
|
+
* The orchestrator both flips `agent_tokens.revoked_at` AND
|
|
173
|
+
* synchronously closes every in-flight agent WS authenticated by
|
|
174
|
+
* this token. The returned `kicked` count is the number
|
|
175
|
+
* of WS connections that were closed on the wire — surface it to
|
|
176
|
+
* the operator so they know the revocation actually propagated.
|
|
177
|
+
*/
|
|
178
|
+
revokeAgentToken(id: string): Promise<{
|
|
179
|
+
kicked: number;
|
|
180
|
+
}>;
|
|
181
|
+
configSeed(config: object, description?: string): Promise<{
|
|
182
|
+
version: number;
|
|
183
|
+
}>;
|
|
184
|
+
configGet(path?: string): Promise<{
|
|
185
|
+
config: unknown;
|
|
186
|
+
version: number;
|
|
187
|
+
source: string;
|
|
188
|
+
}>;
|
|
189
|
+
configSet(path: string, value: unknown, description?: string): Promise<{
|
|
190
|
+
version: number;
|
|
191
|
+
}>;
|
|
192
|
+
configDelete(path: string, description?: string): Promise<{
|
|
193
|
+
version: number;
|
|
194
|
+
}>;
|
|
195
|
+
configExport(): Promise<{
|
|
196
|
+
config: object;
|
|
197
|
+
version: number;
|
|
198
|
+
}>;
|
|
199
|
+
configValidate(config: object, type?: string): Promise<{
|
|
200
|
+
valid: boolean;
|
|
201
|
+
errors?: any[];
|
|
202
|
+
}>;
|
|
203
|
+
configDiff(): Promise<{
|
|
204
|
+
local: object;
|
|
205
|
+
shared: object;
|
|
206
|
+
differences: any[];
|
|
207
|
+
}>;
|
|
208
|
+
configHistory(limit?: number): Promise<{
|
|
209
|
+
versions: any[];
|
|
210
|
+
}>;
|
|
211
|
+
configRollback(version: number): Promise<{
|
|
212
|
+
newVersion: number;
|
|
213
|
+
}>;
|
|
214
|
+
configReload(opts?: {
|
|
215
|
+
drain?: boolean;
|
|
216
|
+
target?: string;
|
|
217
|
+
}): Promise<{
|
|
218
|
+
success: boolean;
|
|
219
|
+
version?: number;
|
|
220
|
+
errors?: string[];
|
|
221
|
+
}>;
|
|
222
|
+
createApiKey(opts: {
|
|
223
|
+
label?: string;
|
|
224
|
+
routingKeys?: string[];
|
|
225
|
+
}): Promise<{
|
|
226
|
+
id: string;
|
|
227
|
+
key: string;
|
|
228
|
+
routingKeys: string[];
|
|
229
|
+
}>;
|
|
230
|
+
addRoutingKeyPermission(keyId: string, pattern: string): Promise<{
|
|
231
|
+
id: string;
|
|
232
|
+
pattern: string;
|
|
233
|
+
}>;
|
|
234
|
+
addBackend(params: {
|
|
235
|
+
name: string;
|
|
236
|
+
backendType: string;
|
|
237
|
+
config: Record<string, unknown>;
|
|
238
|
+
scopeFilter?: string;
|
|
239
|
+
syncIntervalMs?: number;
|
|
240
|
+
}): Promise<Record<string, unknown>>;
|
|
241
|
+
removeBackend(name: string): Promise<{
|
|
242
|
+
removed: boolean;
|
|
243
|
+
scopeCount: number;
|
|
244
|
+
}>;
|
|
245
|
+
listBackends(): Promise<{
|
|
246
|
+
backends: Record<string, unknown>[];
|
|
247
|
+
}>;
|
|
248
|
+
getBackend(name: string): Promise<Record<string, unknown>>;
|
|
249
|
+
testBackend(params: {
|
|
250
|
+
name: string;
|
|
251
|
+
backendType: string;
|
|
252
|
+
config: Record<string, unknown>;
|
|
253
|
+
scopeFilter?: string;
|
|
254
|
+
syncIntervalMs?: number;
|
|
255
|
+
}): Promise<{
|
|
256
|
+
ok: boolean;
|
|
257
|
+
error?: string;
|
|
258
|
+
latencyMs: number;
|
|
259
|
+
}>;
|
|
260
|
+
testNamedBackend(name: string): Promise<{
|
|
261
|
+
ok: boolean;
|
|
262
|
+
error?: string;
|
|
263
|
+
latencyMs: number;
|
|
264
|
+
}>;
|
|
265
|
+
syncBackend(name: string): Promise<{
|
|
266
|
+
synced: boolean;
|
|
267
|
+
scopeCount: number;
|
|
268
|
+
}>;
|
|
269
|
+
syncAllBackends(): Promise<{
|
|
270
|
+
results: Array<{
|
|
271
|
+
name: string;
|
|
272
|
+
scopeCount: number;
|
|
273
|
+
error?: string;
|
|
274
|
+
}>;
|
|
275
|
+
}>;
|
|
276
|
+
/**
|
|
277
|
+
* List execution runs. `status` accepts either a single status or a
|
|
278
|
+
* comma-separated list (e.g. `success,failed`). `since` is an ISO-8601
|
|
279
|
+
* timestamp; only runs with `created_at` strictly later than this value
|
|
280
|
+
* are returned.
|
|
281
|
+
*/
|
|
282
|
+
listRuns(opts?: {
|
|
283
|
+
status?: string;
|
|
284
|
+
workflowName?: string;
|
|
285
|
+
repo?: string;
|
|
286
|
+
since?: string;
|
|
287
|
+
limit?: number;
|
|
288
|
+
offset?: number;
|
|
289
|
+
}): Promise<{
|
|
290
|
+
runs: Array<Record<string, unknown>>;
|
|
291
|
+
total: number;
|
|
292
|
+
limit: number;
|
|
293
|
+
offset: number;
|
|
294
|
+
}>;
|
|
295
|
+
/**
|
|
296
|
+
* Count matching runs without returning the row list. Wraps the list
|
|
297
|
+
* endpoint with `?count=true`, which skips the row query server-side.
|
|
298
|
+
*/
|
|
299
|
+
countRuns(opts?: {
|
|
300
|
+
status?: string;
|
|
301
|
+
workflowName?: string;
|
|
302
|
+
repo?: string;
|
|
303
|
+
since?: string;
|
|
304
|
+
}): Promise<{
|
|
305
|
+
total: number;
|
|
306
|
+
since: string | null;
|
|
307
|
+
status: string[] | null;
|
|
308
|
+
workflowName: string | null;
|
|
309
|
+
repo: string | null;
|
|
310
|
+
}>;
|
|
311
|
+
/**
|
|
312
|
+
* Fetch the run header (no jobs, no steps). Use `getRunJobs` for the
|
|
313
|
+
* jobs sub-resource.
|
|
314
|
+
*/
|
|
315
|
+
getRun(runId: string): Promise<{
|
|
316
|
+
run: Record<string, unknown>;
|
|
317
|
+
}>;
|
|
318
|
+
/**
|
|
319
|
+
* Fetch the jobs list for a run. When `includeSteps: true`, each job
|
|
320
|
+
* entry embeds a `steps[]` array.
|
|
321
|
+
*/
|
|
322
|
+
getRunJobs(runId: string, opts?: {
|
|
323
|
+
includeSteps?: boolean;
|
|
324
|
+
}): Promise<{
|
|
325
|
+
jobs: Array<Record<string, unknown>>;
|
|
326
|
+
}>;
|
|
327
|
+
/**
|
|
328
|
+
* Fetch the scrub status of the run's ephemeral key. Never returns the
|
|
329
|
+
* key material itself — only `{ exists, createdAt }`.
|
|
330
|
+
*/
|
|
331
|
+
getRunEphemeralKey(runId: string): Promise<{
|
|
332
|
+
exists: boolean;
|
|
333
|
+
createdAt: string | null;
|
|
334
|
+
}>;
|
|
335
|
+
/**
|
|
336
|
+
* List secret outputs for a run. Values are masked unless `reveal: true`
|
|
337
|
+
* is passed AND the calling token has the `secret.reveal` permission.
|
|
338
|
+
* Every reveal call writes a `secret-outputs.reveal` row to the
|
|
339
|
+
* secret_audit_log table.
|
|
340
|
+
*/
|
|
341
|
+
getRunSecretOutputs(runId: string, opts?: {
|
|
342
|
+
outputKey?: string;
|
|
343
|
+
reveal?: boolean;
|
|
344
|
+
}): Promise<{
|
|
345
|
+
outputs: Array<{
|
|
346
|
+
id: string;
|
|
347
|
+
jobId: string;
|
|
348
|
+
outputKey: string;
|
|
349
|
+
createdAt: string;
|
|
350
|
+
value: string | null;
|
|
351
|
+
masked: boolean;
|
|
352
|
+
revealError?: string;
|
|
353
|
+
}>;
|
|
354
|
+
}>;
|
|
355
|
+
listEventLog(opts?: {
|
|
356
|
+
orgId?: string;
|
|
357
|
+
routingKey?: string;
|
|
358
|
+
event?: string;
|
|
359
|
+
action?: string;
|
|
360
|
+
status?: string;
|
|
361
|
+
from?: string;
|
|
362
|
+
to?: string;
|
|
363
|
+
deliveryId?: string;
|
|
364
|
+
limit?: number;
|
|
365
|
+
offset?: number;
|
|
366
|
+
includeArchived?: boolean;
|
|
367
|
+
}): Promise<{
|
|
368
|
+
deliveries: Array<Record<string, unknown>>;
|
|
369
|
+
total: number;
|
|
370
|
+
limit: number;
|
|
371
|
+
offset: number;
|
|
372
|
+
}>;
|
|
373
|
+
getEventLog(deliveryId: string, opts: {
|
|
374
|
+
orgId: string;
|
|
375
|
+
includePayload?: boolean;
|
|
376
|
+
routingKey?: string;
|
|
377
|
+
}): Promise<Record<string, unknown>>;
|
|
378
|
+
listAccessLog(opts?: {
|
|
379
|
+
orgId?: string;
|
|
380
|
+
actorType?: string;
|
|
381
|
+
actorId?: string;
|
|
382
|
+
action?: string;
|
|
383
|
+
source?: string;
|
|
384
|
+
outcome?: string;
|
|
385
|
+
targetType?: string;
|
|
386
|
+
targetId?: string;
|
|
387
|
+
from?: string;
|
|
388
|
+
to?: string;
|
|
389
|
+
q?: string;
|
|
390
|
+
limit?: number;
|
|
391
|
+
cursor?: string;
|
|
392
|
+
}): Promise<{
|
|
393
|
+
items: Array<Record<string, unknown>>;
|
|
394
|
+
nextCursor: string | null;
|
|
395
|
+
}>;
|
|
396
|
+
getAccessLogEntry(id: string, opts?: {
|
|
397
|
+
orgId?: string;
|
|
398
|
+
}): Promise<Record<string, unknown>>;
|
|
399
|
+
diagnose(): Promise<{
|
|
400
|
+
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
401
|
+
checks: Array<{
|
|
402
|
+
name: string;
|
|
403
|
+
status: 'pass' | 'warn' | 'fail';
|
|
404
|
+
message: string;
|
|
405
|
+
details?: Record<string, unknown>;
|
|
406
|
+
durationMs: number;
|
|
407
|
+
}>;
|
|
408
|
+
timestamp: string;
|
|
409
|
+
}>;
|
|
410
|
+
}
|
|
411
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Access log commands for kici-admin.
|
|
3
|
+
*
|
|
4
|
+
* Operator-facing read access to the orchestrator's access_log table
|
|
5
|
+
* (read + mutation attribution with ActorPrincipal). Dogfood replacement
|
|
6
|
+
* for raw psql when an operator asks "who read this run's payload last
|
|
7
|
+
* Tuesday" or "show me everything a platform_operator actor did".
|
|
8
|
+
*
|
|
9
|
+
* access-log list List access-log rows with filters (cursor-paginated)
|
|
10
|
+
* access-log show Show a single entry by id
|
|
11
|
+
*
|
|
12
|
+
* Filter flags for `list`:
|
|
13
|
+
* --org-id -> ?orgId=
|
|
14
|
+
* --actor-type -> ?actorType=
|
|
15
|
+
* --actor-id -> ?actorId=
|
|
16
|
+
* --action -> ?action=
|
|
17
|
+
* --source -> ?source=
|
|
18
|
+
* --outcome -> ?outcome=
|
|
19
|
+
* --target-type -> ?targetType=
|
|
20
|
+
* --target-id -> ?targetId=
|
|
21
|
+
* --from / --to -> ?from= / ?to= (ISO timestamps)
|
|
22
|
+
* --q -> ?q= (substring of error_message, trigram-indexed)
|
|
23
|
+
* --limit -> ?limit= (default 50, max 200)
|
|
24
|
+
* --cursor -> ?cursor=
|
|
25
|
+
* --json Emit raw JSON
|
|
26
|
+
*/
|
|
27
|
+
import type { Command } from 'commander';
|
|
28
|
+
import type { AdminApiClient } from '../api-client.js';
|
|
29
|
+
export declare function registerAccessLogCommands(program: Command, getClient: () => AdminApiClient): void;
|
|
30
|
+
//# sourceMappingURL=access-log.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent service command group registration.
|
|
3
|
+
*
|
|
4
|
+
* Adds install, uninstall, start, stop, restart, status, logs, and upgrade
|
|
5
|
+
* subcommands to the existing `agent` command group for managing the agent
|
|
6
|
+
* as a system service.
|
|
7
|
+
*
|
|
8
|
+
* These commands manage local services directly and do NOT use AdminApiClient.
|
|
9
|
+
* They coexist with the existing agent token management commands (register, list, revoke).
|
|
10
|
+
*
|
|
11
|
+
* Must be called AFTER registerAgentCommands() so the `agent` command already exists.
|
|
12
|
+
*/
|
|
13
|
+
import type { Command } from 'commander';
|
|
14
|
+
export declare function registerAgentServiceCommands(program: Command): void;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kici-admin agent install` command.
|
|
3
|
+
*
|
|
4
|
+
* Registers the agent as a native system service on the current platform.
|
|
5
|
+
* Accepts orchestrator URL and token for connecting to the orchestrator.
|
|
6
|
+
*/
|
|
7
|
+
import type { Command } from 'commander';
|
|
8
|
+
export declare function registerAgentInstall(agent: Command): void;
|
|
9
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kici-admin agent-service logs` command.
|
|
3
|
+
*
|
|
4
|
+
* Tails and follows agent service logs with filtering.
|
|
5
|
+
* Delegates to the platform-specific service manager.
|
|
6
|
+
*/
|
|
7
|
+
import type { Command } from 'commander';
|
|
8
|
+
export declare function registerAgentLogsCommand(parent: Command): void;
|
|
9
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kici-admin agent-service status` command.
|
|
3
|
+
*
|
|
4
|
+
* Shows OS-level service status (state, PID, uptime) and queries
|
|
5
|
+
* the running agent's health API for agent-specific info (labels,
|
|
6
|
+
* orchestrator connection, current job).
|
|
7
|
+
*/
|
|
8
|
+
import type { Command } from 'commander';
|
|
9
|
+
export declare function registerAgentStatusCommand(parent: Command): void;
|
|
10
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kici-admin agent uninstall` command.
|
|
3
|
+
*
|
|
4
|
+
* Removes the agent service registration.
|
|
5
|
+
* Preserves config files and logs per user decision.
|
|
6
|
+
*/
|
|
7
|
+
import type { Command } from 'commander';
|
|
8
|
+
export declare function registerAgentUninstall(agent: Command): void;
|
|
9
|
+
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `kici-admin agent-service upgrade` command.
|
|
3
|
+
*
|
|
4
|
+
* Upgrades the agent using the versioned directory layout:
|
|
5
|
+
* - Same pattern as orchestrator: versioned directories with symlink switching
|
|
6
|
+
* - Extracts to agent-{version}/, symlink at agent/
|
|
7
|
+
* - No database migrations (agents are stateless)
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from 'commander';
|
|
10
|
+
export declare function registerAgentUpgradeCommand(parent: Command): void;
|
|
11
|
+
//# sourceMappingURL=upgrade.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent token management commands for kici-admin.
|
|
3
|
+
*
|
|
4
|
+
* Provides CRUD operations for agent authentication tokens:
|
|
5
|
+
* agent register, list, revoke
|
|
6
|
+
*/
|
|
7
|
+
import type { Command } from 'commander';
|
|
8
|
+
import type { AdminApiClient } from '../api-client.js';
|
|
9
|
+
export declare function registerAgentCommands(program: Command, getClient: () => AdminApiClient): void;
|
|
10
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform API key management commands for kici-admin.
|
|
3
|
+
*
|
|
4
|
+
* These commands target the Platform admin API for managing API keys
|
|
5
|
+
* and routing key permissions. Uses the same --url flag (point to Platform URL).
|
|
6
|
+
*
|
|
7
|
+
* api-key create, add-routing-key
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from 'commander';
|
|
10
|
+
import type { AdminApiClient } from '../api-client.js';
|
|
11
|
+
export declare function registerApiKeyCommands(program: Command, getClient: () => AdminApiClient): void;
|
|
12
|
+
//# sourceMappingURL=api-key.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audit log query command for kici-admin.
|
|
3
|
+
*
|
|
4
|
+
* Queries the secrets audit log with optional filters.
|
|
5
|
+
*/
|
|
6
|
+
import type { Command } from 'commander';
|
|
7
|
+
import type { AdminApiClient } from '../api-client.js';
|
|
8
|
+
export declare function registerAuditCommands(program: Command, getClient: () => AdminApiClient): void;
|
|
9
|
+
//# sourceMappingURL=audit.d.ts.map
|