@caplets/core 0.24.1 → 0.25.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.
Files changed (50) hide show
  1. package/dist/attach/options.d.ts +1 -0
  2. package/dist/attach/server.d.ts +3 -0
  3. package/dist/cli/commands.d.ts +10 -2
  4. package/dist/cli/doctor.d.ts +4 -1
  5. package/dist/cli.d.ts +3 -2
  6. package/dist/{completion-BeVXdm9q.js → completion-DrPr2vYw.js} +27 -5
  7. package/dist/daemon/config.d.ts +8 -0
  8. package/dist/daemon/env.d.ts +2 -0
  9. package/dist/daemon/index.d.ts +18 -0
  10. package/dist/daemon/logs.d.ts +15 -0
  11. package/dist/daemon/manager.d.ts +2 -0
  12. package/dist/daemon/paths.d.ts +2 -0
  13. package/dist/daemon/platform-darwin.d.ts +3 -0
  14. package/dist/daemon/platform-linux.d.ts +3 -0
  15. package/dist/daemon/platform-windows.d.ts +3 -0
  16. package/dist/daemon/process.d.ts +11 -0
  17. package/dist/daemon/shell.d.ts +20 -0
  18. package/dist/daemon/types.d.ts +178 -0
  19. package/dist/daemon/validation.d.ts +13 -0
  20. package/dist/daemon/xml.d.ts +1 -0
  21. package/dist/index.js +5857 -3604
  22. package/dist/native/options.d.ts +5 -2
  23. package/dist/native/remote.d.ts +6 -1
  24. package/dist/native.js +1 -1
  25. package/dist/project-binding/attach.d.ts +1 -3
  26. package/dist/project-binding/session.d.ts +1 -0
  27. package/dist/remote/credential-store.d.ts +12 -0
  28. package/dist/remote/options.d.ts +2 -7
  29. package/dist/remote/pairing.d.ts +13 -0
  30. package/dist/remote/profile-store.d.ts +94 -0
  31. package/dist/remote/profiles.d.ts +47 -0
  32. package/dist/remote/selection.d.ts +4 -4
  33. package/dist/remote/server-credential-store.d.ts +84 -0
  34. package/dist/remote/server-credentials.d.ts +21 -0
  35. package/dist/remote-control/client.d.ts +4 -1
  36. package/dist/serve/http.d.ts +5 -0
  37. package/dist/serve/index.d.ts +1 -3
  38. package/dist/serve/options.d.ts +7 -12
  39. package/dist/server/options.d.ts +2 -9
  40. package/dist/{service-Cvnuu9wr.js → service-DjwB8aiW.js} +1084 -254
  41. package/package.json +1 -1
  42. package/dist/serve/daemon/config.d.ts +0 -8
  43. package/dist/serve/daemon/index.d.ts +0 -16
  44. package/dist/serve/daemon/paths.d.ts +0 -3
  45. package/dist/serve/daemon/platform-darwin.d.ts +0 -2
  46. package/dist/serve/daemon/platform-linux.d.ts +0 -2
  47. package/dist/serve/daemon/platform-windows.d.ts +0 -2
  48. package/dist/serve/daemon/platform.d.ts +0 -9
  49. package/dist/serve/daemon/process.d.ts +0 -5
  50. package/dist/serve/daemon/types.d.ts +0 -86
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caplets/core",
3
- "version": "0.24.1",
3
+ "version": "0.25.0",
4
4
  "description": "Core runtime library for Caplets Code Mode and progressive disclosure gateways.",
5
5
  "keywords": [
6
6
  "caplets",
@@ -1,8 +0,0 @@
1
- import type { DaemonCommandPlan, ServeDaemonConfig, ServeDaemonPaths, ServeDaemonState, ServeDaemonStatus } from "./types";
2
- export declare function readDaemonConfig(paths: ServeDaemonPaths): ServeDaemonConfig | undefined;
3
- export declare function writeDaemonConfig(paths: ServeDaemonPaths, serve: ServeDaemonConfig["serve"], command: DaemonCommandPlan, now?: Date): ServeDaemonConfig;
4
- export declare function readDaemonState(paths: ServeDaemonPaths): ServeDaemonState | undefined;
5
- export declare function writeDaemonState(paths: ServeDaemonPaths, state: Omit<ServeDaemonState, "instance" | "updatedAt"> & {
6
- updatedAt?: string;
7
- }, now?: Date): ServeDaemonState;
8
- export declare function redactDaemonStatus(status: ServeDaemonStatus): ServeDaemonStatus;
@@ -1,16 +0,0 @@
1
- import { type RawServeOptions } from "../options";
2
- import type { DaemonPlatformDescriptor, ServeDaemonOperationOptions, ServeDaemonOperationResult, ServeDaemonStatus } from "./types";
3
- export type ServeDaemonServiceResult = {
4
- enabled: boolean;
5
- descriptor: DaemonPlatformDescriptor;
6
- status: ServeDaemonStatus;
7
- };
8
- export declare function startDaemon(raw?: RawServeOptions, options?: ServeDaemonOperationOptions): Promise<ServeDaemonOperationResult>;
9
- export declare function stopDaemon(options?: ServeDaemonOperationOptions): Promise<ServeDaemonOperationResult>;
10
- export declare function restartDaemon(raw?: RawServeOptions, options?: ServeDaemonOperationOptions): Promise<ServeDaemonOperationResult>;
11
- export declare function daemonStatus(options?: ServeDaemonOperationOptions): Promise<ServeDaemonStatus>;
12
- export declare function enableDaemon(options?: ServeDaemonOperationOptions): Promise<ServeDaemonServiceResult>;
13
- export declare function disableDaemon(options?: ServeDaemonOperationOptions): Promise<ServeDaemonServiceResult>;
14
- export { buildDaemonPlatformDescriptor } from "./platform";
15
- export { resolveServeDaemonPaths } from "./paths";
16
- export type { DaemonPlatformDescriptor, DaemonProcessRunner, ServeDaemonConfig, ServeDaemonOperationOptions, ServeDaemonPaths, ServeDaemonState, ServeDaemonStatus, } from "./types";
@@ -1,3 +0,0 @@
1
- import type { ServeDaemonOperationOptions, ServeDaemonPaths } from "./types";
2
- export declare function resolveServeDaemonPaths(options?: Pick<ServeDaemonOperationOptions, "env" | "home" | "platform">): ServeDaemonPaths;
3
- export declare function daemonServiceDescriptorPath(paths: ServeDaemonPaths, platform: NodeJS.Platform): string;
@@ -1,2 +0,0 @@
1
- import type { DaemonCommandPlan, LaunchdUserAgentDescriptor, ServeDaemonPaths } from "./types";
2
- export declare function buildLaunchdUserAgentDescriptor(paths: ServeDaemonPaths, command: DaemonCommandPlan): LaunchdUserAgentDescriptor;
@@ -1,2 +0,0 @@
1
- import type { DaemonCommandPlan, ManualServiceDescriptor, ServeDaemonPaths, SystemdUserServiceDescriptor } from "./types";
2
- export declare function buildLinuxServiceDescriptor(paths: ServeDaemonPaths, command: DaemonCommandPlan, serviceAvailable?: boolean): SystemdUserServiceDescriptor | ManualServiceDescriptor;
@@ -1,2 +0,0 @@
1
- import type { DaemonCommandPlan, WindowsScheduledTaskDescriptor } from "./types";
2
- export declare function buildWindowsScheduledTaskDescriptor(command: DaemonCommandPlan): WindowsScheduledTaskDescriptor;
@@ -1,9 +0,0 @@
1
- import type { DaemonCommandPlan, DaemonPlatformDescriptor, ServeDaemonPaths } from "./types";
2
- export type BuildDaemonPlatformDescriptorOptions = {
3
- platform?: NodeJS.Platform;
4
- serviceAvailable?: boolean;
5
- paths: ServeDaemonPaths;
6
- command: DaemonCommandPlan;
7
- };
8
- export declare function buildDaemonPlatformDescriptor(options: BuildDaemonPlatformDescriptorOptions): DaemonPlatformDescriptor;
9
- export declare function escapeXml(value: string): string;
@@ -1,5 +0,0 @@
1
- import type { HttpServeOptions } from "../options";
2
- import type { DaemonCommandPlan, DaemonProcessRunner } from "./types";
3
- export declare function daemonServeCommand(options: HttpServeOptions): DaemonCommandPlan;
4
- export declare function daemonServeArgs(options: HttpServeOptions): string[];
5
- export declare function createNodeDaemonProcessRunner(): DaemonProcessRunner;
@@ -1,86 +0,0 @@
1
- import type { HttpServeOptions, RawServeOptions } from "../options";
2
- export type ServeDaemonInstance = "default";
3
- export type ServeDaemonPaths = {
4
- instance: ServeDaemonInstance;
5
- stateDir: string;
6
- logDir: string;
7
- stateFile: string;
8
- pidFile: string;
9
- stdoutLog: string;
10
- stderrLog: string;
11
- configFile: string;
12
- };
13
- export type ServeDaemonConfig = {
14
- instance: ServeDaemonInstance;
15
- serve: HttpServeOptions;
16
- command: DaemonCommandPlan;
17
- paths: ServeDaemonPaths;
18
- updatedAt: string;
19
- };
20
- export type ServeDaemonState = {
21
- instance: ServeDaemonInstance;
22
- running: boolean;
23
- pid?: number;
24
- startedAt?: string;
25
- updatedAt: string;
26
- enabled: boolean;
27
- };
28
- export type ServeDaemonStatus = ServeDaemonState & {
29
- paths: ServeDaemonPaths;
30
- config?: ServeDaemonConfig;
31
- };
32
- export type DaemonCommandPlan = {
33
- executable: string;
34
- args: string[];
35
- };
36
- export type DaemonProcessStart = {
37
- args: string[];
38
- stdoutLog: string;
39
- stderrLog: string;
40
- configFile: string;
41
- };
42
- export type DaemonProcessRunner = {
43
- isRunning(pid: number): Promise<boolean>;
44
- start(command: DaemonProcessStart): Promise<number>;
45
- stop(pid: number): Promise<void>;
46
- };
47
- export type ServeDaemonOperationOptions = {
48
- env?: NodeJS.ProcessEnv | Record<string, string | undefined>;
49
- home?: string;
50
- platform?: NodeJS.Platform;
51
- process?: DaemonProcessRunner;
52
- serviceAvailable?: boolean;
53
- };
54
- export type ServeDaemonStartOptions = ServeDaemonOperationOptions & {
55
- raw?: RawServeOptions;
56
- };
57
- export type ServeDaemonOperationResult = {
58
- status: ServeDaemonStatus;
59
- };
60
- export type LaunchdUserAgentDescriptor = {
61
- kind: "launchd-user-agent";
62
- label: string;
63
- path: string;
64
- plist: string;
65
- };
66
- export type SystemdUserServiceDescriptor = {
67
- kind: "systemd-user";
68
- unitName: string;
69
- path: string;
70
- unit: string;
71
- };
72
- export type ManualServiceDescriptor = {
73
- kind: "manual";
74
- reason: string;
75
- command: DaemonCommandPlan;
76
- };
77
- export type WindowsScheduledTaskDescriptor = {
78
- kind: "windows-scheduled-task";
79
- taskName: string;
80
- commands: {
81
- register: string;
82
- unregister: string;
83
- query: string;
84
- };
85
- };
86
- export type DaemonPlatformDescriptor = LaunchdUserAgentDescriptor | SystemdUserServiceDescriptor | ManualServiceDescriptor | WindowsScheduledTaskDescriptor;