@kici-dev/orchestrator 0.1.11 → 0.1.13

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 (33) hide show
  1. package/dist/cli/commands/agent-service/install.d.ts +7 -0
  2. package/dist/cli/commands/agent-service/logs.d.ts +8 -3
  3. package/dist/cli/commands/agent-service/restart.d.ts +5 -1
  4. package/dist/cli/commands/agent-service/start.d.ts +5 -1
  5. package/dist/cli/commands/agent-service/status.d.ts +5 -1
  6. package/dist/cli/commands/agent-service/stop.d.ts +5 -1
  7. package/dist/cli/commands/agent-service/uninstall.d.ts +6 -2
  8. package/dist/cli/commands/agent-service/upgrade.d.ts +13 -3
  9. package/dist/cli/commands/orchestrator-service/logs.d.ts +4 -0
  10. package/dist/cli/commands/orchestrator-service/restart.d.ts +5 -1
  11. package/dist/cli/commands/orchestrator-service/start.d.ts +5 -1
  12. package/dist/cli/commands/orchestrator-service/status.d.ts +4 -0
  13. package/dist/cli/commands/orchestrator-service/stop.d.ts +5 -1
  14. package/dist/cli/commands/orchestrator-service/uninstall.d.ts +6 -2
  15. package/dist/cli/commands/orchestrator-service/upgrade.d.ts +9 -0
  16. package/dist/cli/commands/shared/versioned-upgrade.d.ts +54 -2
  17. package/dist/cli/service/compose.d.ts +3 -2
  18. package/dist/cli/service/index.d.ts +7 -1
  19. package/dist/cli/service/instance/index-file.d.ts +30 -0
  20. package/dist/cli/service/instance/manifest.d.ts +21 -0
  21. package/dist/cli/service/instance/resolve.d.ts +59 -0
  22. package/dist/cli/service/instance/types.d.ts +55 -0
  23. package/dist/cli/service/launchd.d.ts +19 -1
  24. package/dist/cli/service/platform-detect.d.ts +29 -9
  25. package/dist/cli/service/systemd.d.ts +2 -1
  26. package/dist/cli/service/types.d.ts +28 -0
  27. package/dist/cli/service/windows.d.ts +2 -1
  28. package/dist/cli.js +1670 -1029
  29. package/dist/metrics/prometheus.d.ts +32 -4
  30. package/dist/server.js +19 -19
  31. package/dist/standalone.js +19 -19
  32. package/package.json +4 -4
  33. package/sbom.spdx.json +36 -36
@@ -59,6 +59,15 @@ export interface ServiceConfig {
59
59
  isUserLevel: boolean;
60
60
  /** Restart policy configuration. */
61
61
  restartPolicy: RestartPolicy;
62
+ /**
63
+ * Which KiCI component this service runs. Embedded in the unit (X-KiCI-Component
64
+ * for systemd, KiCIComponent for launchd, dev.kici.component label for compose,
65
+ * description prefix for Windows) so per-driver `list()` scans can classify
66
+ * a discovered unit without relying on naming conventions.
67
+ *
68
+ * Optional during lifecycle ops that don't regenerate the unit; required on install.
69
+ */
70
+ component?: 'orchestrator' | 'agent';
62
71
  }
63
72
  /** Current state of a service. */
64
73
  export type ServiceState = 'running' | 'stopped' | 'failed' | 'unknown';
@@ -84,6 +93,15 @@ export interface LogOptions {
84
93
  /** Follow (tail -f) mode. */
85
94
  follow?: boolean;
86
95
  }
96
+ /** Result of a per-driver discovery scan. */
97
+ export interface DiscoveredInstance {
98
+ name: string;
99
+ /** Always set; the driver knows its own platform. */
100
+ platform: ServicePlatform;
101
+ isUserLevel: boolean;
102
+ /** The component this unit belongs to, decoded from the unit's KiCI marker. */
103
+ component: 'orchestrator' | 'agent';
104
+ }
87
105
  /**
88
106
  * Interface that all platform-specific service managers must implement.
89
107
  *
@@ -106,5 +124,15 @@ export interface ServiceManager {
106
124
  logs(config: ServiceConfig, options: LogOptions): Promise<void>;
107
125
  /** Check if the service is currently installed/registered. */
108
126
  isInstalled(config: ServiceConfig): Promise<boolean>;
127
+ /**
128
+ * Discover KiCI-managed services on this platform. The driver enumerates
129
+ * its native registry (systemctl/launchctl/sc/podman) and decodes each
130
+ * unit's component marker. Used by resolve.ts#listInstances to reconcile
131
+ * the index cache against ground truth.
132
+ *
133
+ * `isUserLevel` selects user vs system scope on platforms where that matters
134
+ * (systemd, launchd); ignored on Windows/compose.
135
+ */
136
+ list(isUserLevel: boolean): Promise<DiscoveredInstance[]>;
109
137
  }
110
138
  //# sourceMappingURL=types.d.ts.map
@@ -6,7 +6,7 @@
6
6
  * dependency on first use. Service configuration (auto-start, recovery)
7
7
  * is handled via sc.exe.
8
8
  */
9
- import type { ServiceManager, ServiceConfig, ServiceStatus, LogOptions } from './types.js';
9
+ import type { ServiceManager, ServiceConfig, ServiceStatus, LogOptions, DiscoveredInstance } from './types.js';
10
10
  export declare class WindowsServiceManager implements ServiceManager {
11
11
  install(config: ServiceConfig): Promise<void>;
12
12
  uninstall(config: ServiceConfig): Promise<void>;
@@ -16,5 +16,6 @@ export declare class WindowsServiceManager implements ServiceManager {
16
16
  status(config: ServiceConfig): Promise<ServiceStatus>;
17
17
  logs(config: ServiceConfig, _options: LogOptions): Promise<void>;
18
18
  isInstalled(config: ServiceConfig): Promise<boolean>;
19
+ list(isUserLevel: boolean): Promise<DiscoveredInstance[]>;
19
20
  }
20
21
  //# sourceMappingURL=windows.d.ts.map