@kici-dev/orchestrator 0.1.16 → 0.1.18

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 (83) hide show
  1. package/dist/agent/dispatcher.d.ts +27 -1
  2. package/dist/agent/host-roster-reaper.d.ts +42 -0
  3. package/dist/agent/host-roster.d.ts +110 -0
  4. package/dist/agent/registry.d.ts +65 -2
  5. package/dist/app.d.ts +3 -0
  6. package/dist/approvals/apply-decision.d.ts +11 -1
  7. package/dist/cache/pending-inits.d.ts +5 -0
  8. package/dist/cli/api-client.d.ts +11 -0
  9. package/dist/cli/commands/host.d.ts +13 -0
  10. package/dist/cli/commands/local-hook.d.ts +15 -0
  11. package/dist/cli/commands/local-trigger.d.ts +24 -0
  12. package/dist/cli/commands/remote-source.d.ts +17 -0
  13. package/dist/cli/commands/shared/versioned-upgrade.d.ts +37 -0
  14. package/dist/cli/kici-admin.d.ts +13 -0
  15. package/dist/cli/service/compose.d.ts +2 -1
  16. package/dist/cli/service/index.d.ts +2 -2
  17. package/dist/cli/service/instance/manifest.d.ts +12 -0
  18. package/dist/cli/service/instance/resolve.d.ts +12 -2
  19. package/dist/cli/service/launchd.d.ts +4 -1
  20. package/dist/cli/service/platform-detect.d.ts +5 -0
  21. package/dist/cli/service/systemd.d.ts +2 -1
  22. package/dist/cli/service/types.d.ts +37 -0
  23. package/dist/cli/service/windows.d.ts +2 -1
  24. package/dist/cli.js +1340 -198
  25. package/dist/cluster/coordinator.d.ts +5 -1
  26. package/dist/config/schema.d.ts +4 -0
  27. package/dist/config/types.d.ts +9 -0
  28. package/dist/config.d.ts +6 -4
  29. package/dist/dashboard/handler.d.ts +26 -2
  30. package/dist/dashboard/needs-edges.d.ts +13 -0
  31. package/dist/db/migrations/035_pending_workflow_contexts.d.ts +11 -0
  32. package/dist/db/migrations/036_attestations.d.ts +15 -0
  33. package/dist/db/migrations/037_generic_sources_provider_type_local.d.ts +19 -0
  34. package/dist/db/migrations/038_remote_sources.d.ts +14 -0
  35. package/dist/db/migrations/039_host_roster.d.ts +19 -0
  36. package/dist/db/migrations/040_runsonall_pin.d.ts +4 -0
  37. package/dist/db/migrations/041_wave_gated.d.ts +4 -0
  38. package/dist/db/migrations/042_dispatch_queue_patterns.d.ts +4 -0
  39. package/dist/db/types.d.ts +144 -10
  40. package/dist/diagnostics/fleet-collector.d.ts +1 -1
  41. package/dist/entry-helpers.d.ts +7 -29
  42. package/dist/environments/held-runs.d.ts +33 -0
  43. package/dist/index.js +1 -0
  44. package/dist/lockfile-redos-guard.d.ts +19 -0
  45. package/dist/metrics/prometheus.d.ts +17 -2
  46. package/dist/metrics/scheduled-jobs.d.ts +2 -2
  47. package/dist/orchestrator-core.d.ts +94 -1
  48. package/dist/pipeline/dispatch-matched-workflow.d.ts +60 -2
  49. package/dist/pipeline/install-secrets-resolver.d.ts +32 -5
  50. package/dist/pipeline/needs-scheduler.d.ts +12 -10
  51. package/dist/pipeline/pending-workflow-context.d.ts +44 -0
  52. package/dist/pipeline/processor.d.ts +31 -4
  53. package/dist/pipeline/remote-source-store.d.ts +21 -0
  54. package/dist/pipeline/resume-workflow.d.ts +26 -0
  55. package/dist/pipeline/wave-scheduler.d.ts +60 -0
  56. package/dist/providers/local/index.d.ts +33 -0
  57. package/dist/providers/local/local-source-config.d.ts +17 -0
  58. package/dist/providers/{internal → local}/lock-file-fetcher.d.ts +6 -6
  59. package/dist/providers/{internal → local}/normalizer.d.ts +28 -28
  60. package/dist/providers/{internal → local}/repo-url-builder.d.ts +6 -6
  61. package/dist/queue/job-queue.d.ts +61 -2
  62. package/dist/reporting/execution-tracker.d.ts +61 -0
  63. package/dist/routes/admin-events.d.ts +3 -4
  64. package/dist/routes/uploads.d.ts +36 -26
  65. package/dist/server.js +53755 -50888
  66. package/dist/sources/build-platform-sources.d.ts +4 -2
  67. package/dist/stale-detector/stale-run-detector.d.ts +14 -1
  68. package/dist/standalone.js +17234 -15725
  69. package/dist/webhook/generic-sources-listener.d.ts +4 -0
  70. package/dist/webhook/generic-sources.d.ts +37 -11
  71. package/dist/webhook/register-source-bundle.d.ts +14 -4
  72. package/dist/ws/agent-handler.d.ts +17 -0
  73. package/dist/ws/dashboard-dispatch-guard.d.ts +21 -0
  74. package/dist/ws/dashboard-env-handler.d.ts +13 -1
  75. package/dist/ws/oidc-token-relay.d.ts +59 -0
  76. package/dist/ws/platform-client.d.ts +30 -1
  77. package/dist/ws/test-relay-handlers.d.ts +112 -0
  78. package/installer-image-digests.json +3 -3
  79. package/package.json +22 -22
  80. package/sbom.spdx.json +3228 -6633
  81. package/dist/providers/internal/index.d.ts +0 -32
  82. package/dist/routes/test-trigger.d.ts +0 -41
  83. package/dist/ws/observer-handler.d.ts +0 -42
@@ -1,32 +0,0 @@
1
- /**
2
- * Internal provider implementations for KiCI E2E tests.
3
- *
4
- * Provides a complete provider bundle for testing the webhook processing pipeline
5
- * without GitHub dependencies. Uses file:// URLs for cloning and reads lock files
6
- * directly from the filesystem.
7
- *
8
- * Classes:
9
- * - InternalWebhookNormalizer -> WebhookNormalizer (extracts from custom headers)
10
- * - InternalLockFileFetcher -> LockFileFetcher (reads from local filesystem)
11
- * - InternalRepoUrlBuilder -> RepoUrlBuilder (returns file:// URLs)
12
- */
13
- import type { ProviderBundle } from '../../provider-registry.js';
14
- export { InternalWebhookNormalizer } from './normalizer.js';
15
- export { InternalLockFileFetcher } from './lock-file-fetcher.js';
16
- export { InternalRepoUrlBuilder } from './repo-url-builder.js';
17
- /**
18
- * Create a ProviderBundle for internal/test webhook sources.
19
- *
20
- * Provides normalizer, lock file fetcher, and repo URL builder.
21
- * Clone token provider and changed files fetcher are null since
22
- * file:// URLs need no auth and internal events don't track changed files.
23
- *
24
- * @param opts.repoBasePath - Base directory where test repos live on disk
25
- * @param opts.cloneUrlBase - Optional URL base for clone operations (e.g. git://host/path)
26
- * @returns Complete ProviderBundle for internal provider
27
- */
28
- export declare function createInternalProviderBundle(opts: {
29
- repoBasePath: string;
30
- cloneUrlBase?: string;
31
- }): ProviderBundle;
32
- //# sourceMappingURL=index.d.ts.map
@@ -1,41 +0,0 @@
1
- /**
2
- * REST endpoints for CLI-initiated test runs.
3
- *
4
- * POST /api/v1/test/trigger - Trigger a test run with a fixture event
5
- * GET /api/v1/test/runs/:runId - Get status of a test run
6
- * GET /api/v1/test/runs/:runId/logs - Get logs for a test run
7
- * POST /api/v1/test/cancel - Cancel a running test run
8
- *
9
- * All endpoints require Bearer token authentication via the admin token system.
10
- * The test trigger injects a synthetic event into the existing pipeline,
11
- * reusing trigger matching and job dispatch.
12
- */
13
- import { Hono } from 'hono';
14
- import { type TestPipelineDeps } from '../pipeline/test-pipeline.js';
15
- import type { AppConfig } from '../config.js';
16
- import type { TokenManager } from '../secrets/token-manager.js';
17
- import type { Kysely } from 'kysely';
18
- import type { Database } from '../db/types.js';
19
- /** Hono env type for test trigger routes with context variables. */
20
- type TestTriggerEnv = {
21
- Variables: {
22
- userId: string;
23
- routingKey: string | null;
24
- };
25
- };
26
- /**
27
- * Dependencies for test trigger routes.
28
- * Extends TestPipelineDeps with additional route-specific deps.
29
- */
30
- export interface TestTriggerRouteDeps extends TestPipelineDeps {
31
- config: AppConfig;
32
- tokenManager?: TokenManager;
33
- db: Kysely<Database>;
34
- cacheStorage?: import('../storage/types.js').CacheStorage;
35
- }
36
- /**
37
- * Create Hono routes for test trigger and cancel endpoints.
38
- */
39
- export declare function createTestTriggerRoutes(deps: TestTriggerRouteDeps): Hono<TestTriggerEnv>;
40
- export {};
41
- //# sourceMappingURL=test-trigger.d.ts.map
@@ -1,42 +0,0 @@
1
- /**
2
- * WebSocket handler for observer connections.
3
- *
4
- * CLI clients connect to observe a running execution in real-time.
5
- * The observer channel is read-only: clients subscribe with a run ID
6
- * and token, then receive log chunks, step status changes, and
7
- * completion events broadcast by the ObserverRegistry.
8
- *
9
- * Auth flow:
10
- * 1. Connection opens, 5-second auth timeout starts
11
- * 2. First message must be `observe.subscribe` with valid token and runId
12
- * 3. Token validated against admin_tokens (same as admin API auth)
13
- * 4. Run ID validated against execution_runs table
14
- * 5. If valid: registered in ObserverRegistry, initial status sent
15
- * 6. Subsequent messages ignored (read-only channel)
16
- * 7. On close: unregistered from ObserverRegistry
17
- */
18
- import type { WSEvents } from 'hono/ws';
19
- import type { Kysely } from 'kysely';
20
- import type { Database } from '../db/types.js';
21
- import type { ObserverRegistry } from './observer-registry.js';
22
- import type { TokenManager } from '../secrets/token-manager.js';
23
- export declare const WS_CLOSE_OBSERVER_AUTH_FAILED = 4001;
24
- export declare const WS_CLOSE_OBSERVER_AUTH_TIMEOUT = 4002;
25
- export declare const WS_CLOSE_OBSERVER_INVALID_MESSAGE = 4003;
26
- export declare const WS_CLOSE_OBSERVER_RUN_NOT_FOUND = 4030;
27
- export interface ObserverHandlerDeps {
28
- observerRegistry: ObserverRegistry;
29
- db: Kysely<Database>;
30
- tokenManager: TokenManager;
31
- }
32
- /**
33
- * Create a Hono WS event handler for observer connections.
34
- *
35
- * Flow:
36
- * 1. onOpen: start 5-second auth timeout
37
- * 2. First onMessage: must be observe.subscribe with valid token + runId
38
- * 3. Subsequent messages: ignored (read-only channel)
39
- * 4. onClose: cleanup from registry
40
- */
41
- export declare function createObserverWsHandler(deps: ObserverHandlerDeps): WSEvents;
42
- //# sourceMappingURL=observer-handler.d.ts.map