@kici-dev/orchestrator 0.1.26 → 0.2.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/__test-helpers__/mock-db.d.ts +2 -0
- package/dist/agent/dispatcher.d.ts +52 -2
- package/dist/agent/host-roster-reaper.d.ts +1 -2
- package/dist/agent/host-roster.d.ts +34 -0
- package/dist/agent/ownership-refusal.d.ts +12 -0
- package/dist/agent/ownership-tracker.d.ts +64 -16
- package/dist/agent/token-store.d.ts +13 -0
- package/dist/agent-packaging/availability.d.ts +27 -0
- package/dist/agent-packaging/build-package.d.ts +16 -0
- package/dist/agent-packaging/download.d.ts +30 -0
- package/dist/agent-packaging/index.d.ts +9 -0
- package/dist/agent-packaging/install-closure.d.ts +30 -0
- package/dist/agent-packaging/node-binary.d.ts +26 -0
- package/dist/agent-packaging/refresh.d.ts +50 -0
- package/dist/agent-packaging/store.d.ts +15 -0
- package/dist/agent-packaging/upload.d.ts +24 -0
- package/dist/app-on-error.d.ts +29 -0
- package/dist/app.d.ts +69 -8
- package/dist/approvals/apply-decision.d.ts +1 -1
- package/dist/approvals/step-approval-bridge.d.ts +1 -1
- package/dist/artifacts/artifact-store.d.ts +233 -0
- package/dist/artifacts/failure-messages.d.ts +46 -0
- package/dist/audit/access-log.d.ts +18 -1
- package/dist/cache/dep-cache.d.ts +15 -0
- package/dist/cache/pending-inits.d.ts +4 -4
- package/dist/cache/user-cache.d.ts +37 -0
- package/dist/cancel/cancel-run.d.ts +10 -3
- package/dist/cancel/dashboard-cancel-handler.d.ts +19 -0
- package/dist/cli/api-client.d.ts +51 -5
- package/dist/cli/commands/agent-package.d.ts +34 -0
- package/dist/cli/commands/check-run.d.ts +26 -0
- package/dist/cli/commands/cluster-settings.d.ts +55 -0
- package/dist/cli/commands/context.d.ts +25 -0
- package/dist/cli/commands/dashboard-encryption-key.d.ts +3 -0
- package/dist/cli/commands/db-backup.d.ts +71 -0
- package/dist/cli/commands/debug-bundle.d.ts +1 -1
- package/dist/cli/commands/orchestrator-service/drain.d.ts +31 -0
- package/dist/cli/commands/orchestrator-service/index.d.ts +7 -4
- package/dist/cli/commands/orchestrator-service/install-env.d.ts +58 -0
- package/dist/cli/commands/secret.d.ts +45 -1
- package/dist/cli/commands/shared/admin-cli-access-log.d.ts +46 -0
- package/dist/cli/commands/shared/versioned-upgrade.d.ts +65 -2
- package/dist/cli/commands/signing-key.d.ts +3 -0
- package/dist/cli/commands/source.d.ts +12 -0
- package/dist/cli/commands/token.d.ts +9 -0
- package/dist/cli/commands/trust-policy.d.ts +48 -0
- package/dist/cli/commands/variable.d.ts +6 -6
- package/dist/cli/join.d.ts +1 -1
- package/dist/cli/service/index.d.ts +2 -2
- package/dist/cli/service/instance/manifest.d.ts +17 -0
- package/dist/cli/service/instance/resolve.d.ts +11 -0
- package/dist/cli/service/windows.d.ts +6 -0
- package/dist/cli/wizard/orchestrator-wizard.d.ts +39 -11
- package/dist/cli.js +10263 -3667
- package/dist/cluster/cluster-settings-reader.d.ts +78 -0
- package/dist/cluster/coordinator.d.ts +81 -9
- package/dist/cluster/join-client.d.ts +1 -1
- package/dist/cluster/leader-gated-scheduler.d.ts +50 -0
- package/dist/cluster/orphan-recovery.d.ts +14 -0
- package/dist/cluster/peer-client.d.ts +12 -2
- package/dist/cluster/peer-handler.d.ts +15 -4
- package/dist/cluster/peer-registry.d.ts +12 -0
- package/dist/cluster/verified-issuer-poller.d.ts +11 -0
- package/dist/cluster/verified-issuer.d.ts +63 -0
- package/dist/cold-store/tables/access-log.d.ts +1 -1
- package/dist/cold-store/tables/event-log.d.ts +1 -1
- package/dist/cold-store/tables/execution-jobs.d.ts +1 -1
- package/dist/cold-store/tables/execution-runs.d.ts +1 -1
- package/dist/cold-store/tables/execution-steps.d.ts +1 -1
- package/dist/cold-store/tables/secret-audit-log.d.ts +1 -1
- package/dist/config/loader.d.ts +1 -1
- package/dist/config/resolver.d.ts +2 -1
- package/dist/config/schema.d.ts +8 -6
- package/dist/config/types.d.ts +3 -2
- package/dist/config.d.ts +372 -46
- package/dist/contexts/binding-store.d.ts +36 -0
- package/dist/contexts/context-store.d.ts +100 -0
- package/dist/contexts/glob-specificity.d.ts +30 -0
- package/dist/{environments → contexts}/held-runs.d.ts +64 -32
- package/dist/{environments → contexts}/index.d.ts +1 -1
- package/dist/contexts/protection/aggregate.d.ts +43 -0
- package/dist/contexts/protection/branch-gate.d.ts +5 -0
- package/dist/contexts/protection/concurrency-gate.d.ts +4 -0
- package/dist/{environments → contexts}/protection/pipeline.d.ts +3 -3
- package/dist/contexts/protection/reviewer-gate.d.ts +4 -0
- package/dist/{environments → contexts}/protection/satisfiability.d.ts +22 -22
- package/dist/contexts/protection/trust-gate.d.ts +4 -0
- package/dist/contexts/protection/wait-timer-gate.d.ts +4 -0
- package/dist/contexts/variable-store.d.ts +39 -0
- package/dist/cron/cron-scheduler.d.ts +24 -4
- package/dist/cron/cron-store.d.ts +21 -7
- package/dist/dashboard/attestation-filters.d.ts +94 -74
- package/dist/dashboard/handler.d.ts +63 -3
- package/dist/db/migration-test-harness.d.ts +41 -0
- package/dist/db/migrations/067_environments_to_contexts.d.ts +36 -0
- package/dist/db/migrations/068_request_idempotency.d.ts +17 -0
- package/dist/db/migrations/069_reroute_tunables.d.ts +21 -0
- package/dist/db/migrations/070_execution_runs_failure_class.d.ts +4 -0
- package/dist/db/migrations/071_batch_accumulation.d.ts +26 -0
- package/dist/db/migrations/072_dispatch_queue_run_id_index.d.ts +15 -0
- package/dist/db/migrations/073_org_settings_ingest_concurrency.d.ts +13 -0
- package/dist/db/migrations/074_normalize_zero_concurrency_limit.d.ts +13 -0
- package/dist/db/migrations/075_ingest_overflow_buffer.d.ts +16 -0
- package/dist/db/migrations/076_artifacts.d.ts +19 -0
- package/dist/db/migrations/077_backup_runs.d.ts +13 -0
- package/dist/db/migrations/078_org_settings_backup_staleness.d.ts +12 -0
- package/dist/db/migrations/079_org_settings_scaler_spawn_timeout.d.ts +14 -0
- package/dist/db/migrations/080_cluster_settings.d.ts +17 -0
- package/dist/db/migrations/081_org_settings_queue_timeout.d.ts +19 -0
- package/dist/db/migrations/082_host_s3_reachable.d.ts +16 -0
- package/dist/db/migrations/083_org_settings_artifact_caps.d.ts +18 -0
- package/dist/db/migrations/084_orchestrator_signing_keys.d.ts +20 -0
- package/dist/db/migrations/085_cluster_settings_reroute_flap_grace_ms.d.ts +12 -0
- package/dist/db/migrations/086_cluster_settings_max_fanout_hosts.d.ts +12 -0
- package/dist/db/migrations/087_cluster_settings_event_router_rate_limit.d.ts +12 -0
- package/dist/db/migrations/088_cluster_settings_cache_max_tarball_bytes.d.ts +12 -0
- package/dist/db/migrations/089_cluster_settings_cache_ttl_days.d.ts +12 -0
- package/dist/db/migrations/090_cluster_settings_concurrency_wait_timeout_ms.d.ts +12 -0
- package/dist/db/migrations/091_cluster_settings_agent_token_ttl_ms.d.ts +12 -0
- package/dist/db/migrations/092_cluster_settings_version.d.ts +16 -0
- package/dist/db/migrations/093_org_settings_sandbox_allowlist.d.ts +4 -0
- package/dist/db/migrations/094_dashboard_encryption_keys.d.ts +21 -0
- package/dist/db/migrations/095_dashboard_write_policy_tristate.d.ts +20 -0
- package/dist/db/migrations/096_multi_schedule_cron_last_fired.d.ts +4 -0
- package/dist/db/migrations/097_execution_runs_pr_number.d.ts +4 -0
- package/dist/db/migrations/098_execution_runs_customer_id.d.ts +4 -0
- package/dist/db/migrations/099_cluster_settings_dashboard_verified_issuer.d.ts +21 -0
- package/dist/db/migrations/100_held_runs_hold_type_vocabulary.d.ts +31 -0
- package/dist/db/migrations/101_contexts_hold_expiry_drop_default.d.ts +31 -0
- package/dist/db/migrations/102_dispatch_queue_agent_id.d.ts +20 -0
- package/dist/db/migrations/103_cluster_settings_ownership_db_check_timeout_ms.d.ts +20 -0
- package/dist/db/migrations/104_check_run_terminal_sent.d.ts +22 -0
- package/dist/db/migrations/105_org_trust_policy.d.ts +19 -0
- package/dist/db/migrations/106_cluster_settings_check_run_tracking_ttl_days.d.ts +18 -0
- package/dist/db/migrations/107_check_run_tracking_updated_at_index.d.ts +23 -0
- package/dist/db/repos/dashboard-encryption-keys-repo.d.ts +48 -0
- package/dist/db/repos/signing-keys-repo.d.ts +34 -0
- package/dist/db/types.d.ts +499 -66
- package/dist/deployment/deployment-identity.d.ts +87 -2
- package/dist/diagnostics/checks/backup.d.ts +18 -0
- package/dist/diagnostics/checks/index.d.ts +2 -1
- package/dist/diagnostics/fleet-collector.d.ts +1 -1
- package/dist/drain/drain-controller.d.ts +52 -0
- package/dist/events/batch-accumulator.d.ts +63 -0
- package/dist/events/circuit-breaker.d.ts +9 -3
- package/dist/events/event-emitter.d.ts +31 -0
- package/dist/events/event-retry-scanner.d.ts +12 -2
- package/dist/events/event-router.d.ts +29 -0
- package/dist/firecracker/host-network.d.ts +2 -0
- package/dist/firecracker/net-interfaces.d.ts +14 -0
- package/dist/github-app-name-refresher/github-app-name-refresher.d.ts +19 -9
- package/dist/index.d.ts +2 -0
- package/dist/index.js +625 -22
- package/dist/lockfile-cache.d.ts +4 -0
- package/dist/lockfile-validate.d.ts +16 -9
- package/dist/metrics/prometheus.d.ts +114 -15
- package/dist/oidc/aws-kms-signer.d.ts +37 -0
- package/dist/oidc/command-signer.d.ts +23 -0
- package/dist/oidc/db-signer.d.ts +48 -0
- package/dist/oidc/id-token-claims.d.ts +76 -0
- package/dist/oidc/jwt.d.ts +18 -0
- package/dist/oidc/local-dev-signer.d.ts +31 -0
- package/dist/oidc/local-mint.d.ts +77 -0
- package/dist/oidc/oidc-mint-registration.d.ts +65 -0
- package/dist/oidc/orchestrator-mint.d.ts +97 -0
- package/dist/oidc/orchestrator-signer-factory.d.ts +33 -0
- package/dist/oidc/reconcile-signing-key.d.ts +21 -0
- package/dist/oidc/signer.d.ts +25 -0
- package/dist/oidc/signing-key-status.d.ts +23 -0
- package/dist/orchestrator-core.d.ts +42 -2
- package/dist/pipeline/decorating-secret-resolver.d.ts +5 -4
- package/dist/pipeline/dispatch-matched-workflow.d.ts +44 -3
- package/dist/pipeline/inline-eval.d.ts +2 -2
- package/dist/pipeline/install-secrets-resolver.d.ts +25 -14
- package/dist/pipeline/{job-environments.d.ts → job-contexts.d.ts} +23 -23
- package/dist/pipeline/manual-schedule.d.ts +28 -14
- package/dist/pipeline/pending-workflow-context.d.ts +1 -1
- package/dist/pipeline/process-webhook.d.ts +57 -2
- package/dist/pipeline/processor.d.ts +49 -13
- package/dist/pipeline/request-idempotency.d.ts +28 -0
- package/dist/pipeline/rerun.d.ts +20 -13
- package/dist/pipeline/resolve-sandbox-grant.d.ts +28 -0
- package/dist/pipeline/resume-workflow.d.ts +1 -1
- package/dist/pipeline/route-or-dispatch-jobs.d.ts +71 -0
- package/dist/pipeline/sandbox-allowlist-reader.d.ts +33 -0
- package/dist/pipeline/test-pipeline.d.ts +2 -2
- package/dist/policy/dashboard-write-policy.d.ts +9 -4
- package/dist/provenance/backfill-run.d.ts +1 -0
- package/dist/provenance/trust-root.d.ts +20 -0
- package/dist/provider-registry.d.ts +8 -0
- package/dist/providers/generic/normalizer.d.ts +1 -1
- package/dist/providers/github/auth.d.ts +1 -1
- package/dist/providers/github/changed-files.d.ts +14 -6
- package/dist/providers/github/check-status-poster.d.ts +19 -3
- package/dist/providers/github/contributor-resolver.d.ts +1 -1
- package/dist/providers/github/lock-file.d.ts +1 -1
- package/dist/providers/github/normalizer.d.ts +1 -1
- package/dist/providers/github/repo-url.d.ts +1 -1
- package/dist/providers/local/index.d.ts +1 -0
- package/dist/providers/local/local-source-config.d.ts +1 -0
- package/dist/providers/local/lock-file-fetcher.d.ts +1 -1
- package/dist/providers/local/normalizer.d.ts +1 -1
- package/dist/providers/local/repo-url-builder.d.ts +1 -1
- package/dist/providers/universal-git/changed-files.d.ts +8 -7
- package/dist/providers/universal-git/clone-token.d.ts +1 -1
- package/dist/providers/universal-git/config.d.ts +4 -4
- package/dist/providers/universal-git/index.d.ts +5 -1
- package/dist/providers/universal-git/lock-file.d.ts +6 -1
- package/dist/providers/universal-git/normalizer.d.ts +1 -1
- package/dist/providers/universal-git/repo-url.d.ts +1 -1
- package/dist/queue/cleanup.d.ts +69 -8
- package/dist/queue/job-queue.d.ts +94 -14
- package/dist/queue/scheduled-job.d.ts +2 -2
- package/dist/registration/registration-index.d.ts +1 -1
- package/dist/reporting/agent-failure-category.d.ts +4 -1
- package/dist/reporting/check-run-reporter.d.ts +34 -14
- package/dist/reporting/check-run-tracking-store.d.ts +70 -8
- package/dist/reporting/execution-tracker.d.ts +173 -17
- package/dist/reporting/fs-log-storage.d.ts +31 -2
- package/dist/reporting/job-check-run-completion.d.ts +50 -0
- package/dist/reporting/log-chunk-sink.d.ts +47 -0
- package/dist/reporting/log-retention.d.ts +16 -0
- package/dist/reporting/log-storage.d.ts +64 -4
- package/dist/reporting/log-writer.d.ts +22 -7
- package/dist/reporting/peer-log-normalize.d.ts +14 -0
- package/dist/reporting/run-aggregator.d.ts +36 -36
- package/dist/reporting/s3-log-storage.d.ts +102 -8
- package/dist/routes/admin-auth.d.ts +90 -0
- package/dist/routes/admin-cluster-settings.d.ts +31 -0
- package/dist/routes/admin-contexts.d.ts +47 -0
- package/dist/routes/admin-events.d.ts +3 -0
- package/dist/routes/admin-orchestrator-drain.d.ts +35 -0
- package/dist/routes/admin-registrations.d.ts +2 -2
- package/dist/routes/admin-runs.d.ts +9 -0
- package/dist/routes/admin-sources.d.ts +7 -0
- package/dist/routes/admin-trust-policy.d.ts +49 -0
- package/dist/routes/admin.d.ts +15 -1
- package/dist/routes/github-webhook.d.ts +9 -3
- package/dist/routes/provenance-oidc.d.ts +38 -0
- package/dist/routes/verify-attestation.d.ts +21 -0
- package/dist/scaler/bare-metal-backend.d.ts +9 -2
- package/dist/scaler/config.d.ts +25 -4
- package/dist/scaler/container-backend.d.ts +9 -1
- package/dist/scaler/firecracker-backend.d.ts +29 -2
- package/dist/scaler/index.d.ts +1 -1
- package/dist/scaler/manager.d.ts +166 -8
- package/dist/scaler/pending-scale-sweeper.d.ts +35 -0
- package/dist/scaler/types.d.ts +75 -6
- package/dist/secrets/backend-registry.d.ts +32 -1
- package/dist/secrets/context-secret-resolver.d.ts +30 -0
- package/dist/secrets/dashboard-encryption-key.d.ts +48 -0
- package/dist/secrets/ephemeral-keys.d.ts +16 -0
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/pg-secret-store.d.ts +13 -3
- package/dist/secrets/rbac.d.ts +5 -1
- package/dist/secrets/routing-key-scope.d.ts +6 -0
- package/dist/secrets/scope-routing.d.ts +126 -0
- package/dist/secrets/secret-resolver.d.ts +19 -32
- package/dist/secrets/token-manager.d.ts +5 -1
- package/dist/security/comment-handler.d.ts +1 -1
- package/dist/security/contributor-cache.d.ts +9 -1
- package/dist/security/trust-policy-gate.d.ts +117 -0
- package/dist/security/trust-policy-store.d.ts +78 -0
- package/dist/server.js +44012 -32721
- package/dist/sources/source-manager.d.ts +24 -0
- package/dist/stale-detector/stale-run-detector.d.ts +8 -1
- package/dist/standalone.js +44106 -33690
- package/dist/storage/blob-routes.d.ts +16 -0
- package/dist/storage/filesystem.d.ts +17 -0
- package/dist/storage/key-discriminator.d.ts +20 -0
- package/dist/storage/s3.d.ts +2 -0
- package/dist/storage/types.d.ts +16 -0
- package/dist/webhook/dedup.d.ts +9 -1
- package/dist/webhook/event-log.d.ts +13 -2
- package/dist/webhook/generic-sources-listener.d.ts +4 -0
- package/dist/webhook/ingest-admission.d.ts +140 -0
- package/dist/webhook/ingest-overflow-buffer.d.ts +27 -0
- package/dist/webhook/ingest-overflow-replayer.d.ts +49 -0
- package/dist/webhook/ingest-overflow-types.d.ts +73 -0
- package/dist/webhook/loop-lag-source.d.ts +40 -0
- package/dist/webhook/observed-relay-guard.d.ts +40 -0
- package/dist/webhook/org-ingest-cap-reader.d.ts +24 -0
- package/dist/webhook/register-source-bundle.d.ts +3 -0
- package/dist/webhook/relay-reinject.d.ts +43 -0
- package/dist/worker/in-memory-job-queue.d.ts +8 -3
- package/dist/worker-core.d.ts +10 -0
- package/dist/ws/agent-api-registry.d.ts +20 -0
- package/dist/ws/agent-handler.d.ts +63 -7
- package/dist/ws/bringup-api.d.ts +99 -0
- package/dist/ws/{dashboard-env-handler.d.ts → dashboard-context-handler.d.ts} +43 -25
- package/dist/ws/dashboard-run-state-handler.d.ts +31 -0
- package/dist/ws/failure-messages.d.ts +29 -0
- package/dist/ws/oidc-token-relay.d.ts +15 -0
- package/dist/ws/ownership-gate.d.ts +22 -0
- package/dist/ws/platform-client.d.ts +96 -1
- package/dist/ws/replay-chunker.d.ts +37 -0
- package/installer-image-digests.json +3 -3
- package/package.json +22 -21
- package/sbom.spdx.json +1245 -1793
- package/dist/cli/commands/environment.d.ts +0 -25
- package/dist/environments/binding-store.d.ts +0 -36
- package/dist/environments/environment-store.d.ts +0 -87
- package/dist/environments/protection/aggregate.d.ts +0 -43
- package/dist/environments/protection/branch-gate.d.ts +0 -5
- package/dist/environments/protection/concurrency-gate.d.ts +0 -7
- package/dist/environments/protection/reviewer-gate.d.ts +0 -7
- package/dist/environments/protection/trust-gate.d.ts +0 -7
- package/dist/environments/protection/wait-timer-gate.d.ts +0 -7
- package/dist/environments/variable-store.d.ts +0 -39
- package/dist/routes/admin-environments.d.ts +0 -47
|
@@ -6,5 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Command } from 'commander';
|
|
8
8
|
import type { AdminApiClient } from '../api-client.js';
|
|
9
|
+
/**
|
|
10
|
+
* Parse a `--expires` value into an absolute expiry Date.
|
|
11
|
+
*
|
|
12
|
+
* Accepts either a duration shorthand relative to now (`<N>d` days,
|
|
13
|
+
* `<N>h` hours, `<N>m` minutes — e.g. `30d`, `12h`, `45m`) or an
|
|
14
|
+
* absolute ISO-8601 datetime (e.g. `2026-12-31T00:00:00Z`). Throws on any
|
|
15
|
+
* other input so a typo never silently creates a non-expiring token.
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseExpiresAt(input: string, now?: Date): Date;
|
|
9
18
|
export declare function registerTokenCommands(program: Command, getClient: () => AdminApiClient): void;
|
|
10
19
|
//# sourceMappingURL=token.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Org trust-policy commands for kici-admin.
|
|
3
|
+
*
|
|
4
|
+
* Subcommand namespace: `kici-admin trust-policy <show|set>`.
|
|
5
|
+
*
|
|
6
|
+
* Talks to the orchestrator admin API directly (not the Platform dashboard
|
|
7
|
+
* proxy), so the CLI stays operable even when Platform is unavailable. Backed
|
|
8
|
+
* by `packages/orchestrator/src/routes/admin-trust-policy.ts`.
|
|
9
|
+
*
|
|
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.
|
|
14
|
+
*/
|
|
15
|
+
import type { Command } from 'commander';
|
|
16
|
+
import { TrustPolicyEnforcement } from '../../security/trust-policy-gate.js';
|
|
17
|
+
import type { AdminApiClient } from '../api-client.js';
|
|
18
|
+
/**
|
|
19
|
+
* The policy shape the admin route returns.
|
|
20
|
+
*
|
|
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.
|
|
24
|
+
*/
|
|
25
|
+
export interface TrustPolicyView {
|
|
26
|
+
customerId: string;
|
|
27
|
+
forkPolicy?: string;
|
|
28
|
+
unknownContributorPolicy?: string;
|
|
29
|
+
workflowChangePolicy?: string;
|
|
30
|
+
approvalExpiryHours?: number;
|
|
31
|
+
/** `policy` = the values below are enforced; `legacy` = only the legacy rule. */
|
|
32
|
+
enforcement?: TrustPolicyEnforcement;
|
|
33
|
+
source: string | null;
|
|
34
|
+
updatedAt: string | null;
|
|
35
|
+
effectiveDefault?: boolean;
|
|
36
|
+
platformManaged?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** Render the policy as an aligned table, or as JSON when asked. */
|
|
39
|
+
export declare function formatPolicy(policy: TrustPolicyView, format: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Turn CLI flags into a PATCH body, exiting on an unknown value.
|
|
42
|
+
*
|
|
43
|
+
* Validating here as well as on the route is deliberate: it turns a typo into a
|
|
44
|
+
* clear local message naming the accepted values instead of a 400 from the API.
|
|
45
|
+
*/
|
|
46
|
+
export declare function buildPolicyPatch(opts: Record<string, string | undefined>): Record<string, string | number>;
|
|
47
|
+
export declare function registerTrustPolicyCommands(program: Command, getClient: () => AdminApiClient): void;
|
|
48
|
+
//# sourceMappingURL=trust-policy.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Context variable management commands for kici-admin.
|
|
3
3
|
*
|
|
4
|
-
* kici-admin variable list <orgId> <
|
|
5
|
-
* kici-admin variable get <orgId> <
|
|
6
|
-
* kici-admin variable set <orgId> <
|
|
7
|
-
* kici-admin variable delete <orgId> <
|
|
4
|
+
* kici-admin variable list <orgId> <context>
|
|
5
|
+
* kici-admin variable get <orgId> <context> <key>
|
|
6
|
+
* kici-admin variable set <orgId> <context> <key> [--value | --from-stdin | --from-file | --from-env | --prompt]
|
|
7
|
+
* kici-admin variable delete <orgId> <context> <key>
|
|
8
8
|
*
|
|
9
|
-
* Org-level
|
|
9
|
+
* Org-level context variables are plaintext-at-rest in the
|
|
10
10
|
* orchestrator's DB; the dashboard write path is gated by the
|
|
11
11
|
* `variables.set` / `variables.delete` switches in the dashboard-write
|
|
12
12
|
* policy. This CLI is the always-available authority path when the
|
package/dist/cli/join.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* writing the local YAML config.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* kici-admin join --token kici_join_v1.xxx.yyy --platform wss://
|
|
9
|
+
* kici-admin join --token kici_join_v1.xxx.yyy --platform wss://api.kici.dev/ws --api-key KEY
|
|
10
10
|
* kici-admin join --token kici_join_v1.xxx.yyy --peer https://orch-1:8080
|
|
11
11
|
*/
|
|
12
12
|
import type { Command } from 'commander';
|
|
@@ -12,9 +12,9 @@ export { detectPlatform, isRoot, kiciConfigRoot, getConfigDir, getLogDir, getCac
|
|
|
12
12
|
export { resolveUserLevel, type PrivilegeOpts } from './privilege.js';
|
|
13
13
|
export type { Component, InstanceManifest, IndexEntry, ResolveOptions, ResolvedInstance, } from './instance/types.js';
|
|
14
14
|
export { COMPONENTS, isComponent } from './instance/types.js';
|
|
15
|
-
export { manifestFilename, manifestPath, readManifest, writeManifest, readKiciVersion, resolveVersionFromLaunchSpec, } from './instance/manifest.js';
|
|
15
|
+
export { manifestFilename, manifestPath, readManifest, writeManifest, readKiciVersion, resolveVersionFromLaunchSpec, resolveNpmInstallTarget, type NpmInstallTarget, } from './instance/manifest.js';
|
|
16
16
|
export { indexPath, readIndex, writeIndex, appendIndexEntry, removeIndexEntry, } from './instance/index-file.js';
|
|
17
|
-
export { listInstances, resolveInstance, formatRefusal } from './instance/resolve.js';
|
|
17
|
+
export { listInstances, resolveInstance, formatRefusal, InstanceNotFoundError, } from './instance/resolve.js';
|
|
18
18
|
export type { ListedInstance, ResolveArgs, ListInstancesArgs } from './instance/resolve.js';
|
|
19
19
|
import type { ServiceManager, ServicePlatform } from './types.js';
|
|
20
20
|
/**
|
|
@@ -39,4 +39,21 @@ export declare function readKiciVersion(): string;
|
|
|
39
39
|
* stand behind.
|
|
40
40
|
*/
|
|
41
41
|
export declare function resolveVersionFromLaunchSpec(spec: LaunchSpec, component: Component): string | null;
|
|
42
|
+
/**
|
|
43
|
+
* The global npm package + node runtime an npm-source upgrade must install
|
|
44
|
+
* into, derived from a unit's launch spec. `owningPackage` is the top-level
|
|
45
|
+
* global package whose ExecStart the unit runs — `kici-admin` when the
|
|
46
|
+
* component is loaded through its nested node_modules, or `@kici-dev/<component>`
|
|
47
|
+
* for a standalone install. `npmPath` is the npm co-located with the unit's
|
|
48
|
+
* pinned node, so `npm install -g` with it lands in exactly the prefix
|
|
49
|
+
* ExecStart resolves from, regardless of the shell's active node.
|
|
50
|
+
*/
|
|
51
|
+
export interface NpmInstallTarget {
|
|
52
|
+
nodeExecPath: string;
|
|
53
|
+
npmPath: string;
|
|
54
|
+
owningPackage: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function resolveNpmInstallTarget(spec: LaunchSpec, component: Component, opts: {
|
|
57
|
+
windows: boolean;
|
|
58
|
+
}): NpmInstallTarget | null;
|
|
42
59
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -41,6 +41,17 @@ export interface ListInstancesArgs {
|
|
|
41
41
|
* the requested component + isUserLevel.
|
|
42
42
|
*/
|
|
43
43
|
export declare function listInstances(args: ListInstancesArgs): Promise<ListedInstance[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Thrown by resolveInstance when `--name <n>` is given but no installed
|
|
46
|
+
* instance matches. Lifecycle commands catch this to treat stop/uninstall of
|
|
47
|
+
* a never-installed instance as an idempotent no-op. Distinct from the
|
|
48
|
+
* ambiguous-refusal and missing-manifest errors, which stay hard failures.
|
|
49
|
+
*/
|
|
50
|
+
export declare class InstanceNotFoundError extends Error {
|
|
51
|
+
readonly component: Component;
|
|
52
|
+
readonly instanceName: string;
|
|
53
|
+
constructor(component: Component, instanceName: string, message: string);
|
|
54
|
+
}
|
|
44
55
|
export interface ResolveArgs {
|
|
45
56
|
component: Component;
|
|
46
57
|
opts: ResolveOptions;
|
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { ServiceManager, ServiceConfig, ServiceStatus, LogOptions, DiscoveredInstance, LaunchSpec } from './types.js';
|
|
10
10
|
export declare class WindowsServiceManager implements ServiceManager {
|
|
11
|
+
/**
|
|
12
|
+
* Check whether a Windows service is currently registered.
|
|
13
|
+
* `sc.exe query` exits non-zero (execSync throws) when the service does
|
|
14
|
+
* not exist; exit 0 means it exists (possibly pending-delete).
|
|
15
|
+
*/
|
|
16
|
+
private serviceExists;
|
|
11
17
|
install(config: ServiceConfig): Promise<void>;
|
|
12
18
|
uninstall(config: ServiceConfig): Promise<void>;
|
|
13
19
|
start(config: ServiceConfig): Promise<void>;
|
|
@@ -5,34 +5,62 @@
|
|
|
5
5
|
* port, secrets key) with sensible defaults. Returns a config
|
|
6
6
|
* object that the install command uses to write the env file.
|
|
7
7
|
*/
|
|
8
|
+
import { OrchestratorMode } from '@kici-dev/engine';
|
|
9
|
+
/** A GitHub App source the wizard collected, to be added once the orchestrator is running. */
|
|
10
|
+
export interface OrchestratorSourceHint {
|
|
11
|
+
name: string;
|
|
12
|
+
appId: string;
|
|
13
|
+
/** Filesystem path to the App private key (.pem) — NOT the key contents. */
|
|
14
|
+
privateKeyPath: string;
|
|
15
|
+
webhookSecret?: string;
|
|
16
|
+
}
|
|
8
17
|
/** Config produced by the orchestrator wizard. */
|
|
9
18
|
interface OrchestratorInstallConfig {
|
|
10
|
-
mode:
|
|
19
|
+
mode: OrchestratorMode;
|
|
11
20
|
databaseUrl: string;
|
|
12
21
|
port: number;
|
|
13
22
|
secretsKey: string;
|
|
14
23
|
bootstrapAdminToken: string;
|
|
15
24
|
platformUrl?: string;
|
|
16
25
|
platformToken?: string;
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
appId: string;
|
|
22
|
-
privateKey: string;
|
|
23
|
-
webhookSecret?: string;
|
|
24
|
-
};
|
|
26
|
+
/** Public base URL of this orchestrator's own ingress (required in observed mode). */
|
|
27
|
+
webhookPublicUrl?: string;
|
|
28
|
+
/** GitHub App source to add after the orchestrator is running. */
|
|
29
|
+
source?: OrchestratorSourceHint;
|
|
25
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Render the post-install next-step lines for adding the collected GitHub App
|
|
33
|
+
* source. The primary command inlines the webhook secret (copy-paste-runnable);
|
|
34
|
+
* when a secret is present a "Secure alternative" pipes it via stdin so the
|
|
35
|
+
* secret stays out of the process argument list (printf is a shell builtin, and
|
|
36
|
+
* kici-admin receives the value on stdin — so it never appears in `ps`). Returns
|
|
37
|
+
* indented lines for the install "Next steps" block.
|
|
38
|
+
*/
|
|
39
|
+
export declare function formatSourceAddHint(hint: OrchestratorSourceHint): string[];
|
|
40
|
+
/**
|
|
41
|
+
* Check that the private-key path the operator gave is readable. Returns a
|
|
42
|
+
* warning string when it is not, so the wizard can surface it without aborting
|
|
43
|
+
* the whole install — the source is opt-in and secondary to the orchestrator.
|
|
44
|
+
*/
|
|
45
|
+
export declare function checkPrivateKeyReadable(keyPath: string): Promise<string | null>;
|
|
46
|
+
/**
|
|
47
|
+
* Default Platform relay URL offered by the install wizard. Kept in lockstep
|
|
48
|
+
* with the quickstart compose `KICI_PLATFORM_URL` value (`wss://api.kici.dev/ws`)
|
|
49
|
+
* — the single hosted KiCI Platform relay endpoint. Pinned by
|
|
50
|
+
* orchestrator-wizard.test.ts so the two surfaces cannot drift.
|
|
51
|
+
*/
|
|
52
|
+
export declare const DEFAULT_PLATFORM_RELAY_URL = "wss://api.kici.dev/ws";
|
|
26
53
|
/**
|
|
27
54
|
* Run the interactive orchestrator setup wizard.
|
|
28
55
|
*
|
|
29
56
|
* Asks only essential questions per the user decision:
|
|
30
|
-
* 1. Mode (platform/hybrid/independent)
|
|
57
|
+
* 1. Mode (platform/hybrid/observed/independent)
|
|
31
58
|
* 2. Database URL
|
|
32
59
|
* 3. Port
|
|
33
60
|
* 4. Secrets encryption key
|
|
34
61
|
* 5. Bootstrap admin token (for kici-admin authentication)
|
|
35
|
-
* 6. Platform URL + token (if platform/hybrid mode)
|
|
62
|
+
* 6. Platform URL + token (if platform/hybrid/observed mode), plus the public
|
|
63
|
+
* webhook base URL when observed
|
|
36
64
|
* 7. Webhook secret (if hybrid/independent mode)
|
|
37
65
|
*/
|
|
38
66
|
export declare function runOrchestratorWizard(): Promise<OrchestratorInstallConfig>;
|