@rynx-ai/daemon 0.1.0 → 0.1.9

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 (89) hide show
  1. package/dist/browser-cli-args.d.ts +20 -0
  2. package/dist/browser-cli-args.js +100 -0
  3. package/dist/browser-runner-session-context.d.ts +24 -0
  4. package/dist/browser-runner-session-context.js +113 -0
  5. package/dist/cdp-keyboard-input.d.ts +6 -0
  6. package/dist/cdp-keyboard-input.js +209 -0
  7. package/dist/channel-store.d.ts +0 -6
  8. package/dist/channel-store.js +2 -18
  9. package/dist/chrome-for-testing-release-resolver.d.ts +34 -0
  10. package/dist/chrome-for-testing-release-resolver.js +214 -0
  11. package/dist/chrome-for-testing-store.d.ts +85 -0
  12. package/dist/chrome-for-testing-store.js +836 -0
  13. package/dist/cli.js +467 -30
  14. package/dist/control-client.d.ts +113 -0
  15. package/dist/control-client.js +792 -0
  16. package/dist/control-deps.js +37 -6
  17. package/dist/control-endpoint.d.ts +14 -0
  18. package/dist/control-endpoint.js +124 -0
  19. package/dist/control-link-store.d.ts +16 -0
  20. package/dist/control-link-store.js +53 -0
  21. package/dist/daemon-owner.d.ts +14 -0
  22. package/dist/daemon-owner.js +104 -0
  23. package/dist/daemon-server.d.ts +12 -2
  24. package/dist/daemon-server.js +559 -28
  25. package/dist/db.js +140 -10
  26. package/dist/desktop-browser-host-client.d.ts +34 -0
  27. package/dist/desktop-browser-host-client.js +413 -0
  28. package/dist/direct-runtime-authenticator.d.ts +13 -0
  29. package/dist/direct-runtime-authenticator.js +127 -0
  30. package/dist/direct-runtime-config.d.ts +20 -0
  31. package/dist/direct-runtime-config.js +101 -0
  32. package/dist/embedded-browser-profile-cleanup.d.ts +58 -0
  33. package/dist/embedded-browser-profile-cleanup.js +338 -0
  34. package/dist/headless-browser-host.d.ts +14 -0
  35. package/dist/headless-browser-host.js +2156 -0
  36. package/dist/index-daemon.js +28 -5
  37. package/dist/installation-id.d.ts +33 -0
  38. package/dist/installation-id.js +692 -0
  39. package/dist/migrations/cleanup-legacy-sessions.d.ts +0 -3
  40. package/dist/migrations/cleanup-legacy-sessions.js +10 -28
  41. package/dist/plugin-cli.d.ts +30 -0
  42. package/dist/plugin-cli.js +270 -0
  43. package/dist/plugin-host-rpc.d.ts +85 -0
  44. package/dist/plugin-host-rpc.js +878 -0
  45. package/dist/plugin-install-restart.d.ts +13 -0
  46. package/dist/plugin-install-restart.js +24 -0
  47. package/dist/plugin-installer.d.ts +36 -15
  48. package/dist/plugin-installer.js +420 -155
  49. package/dist/plugin-package.d.ts +38 -0
  50. package/dist/plugin-package.js +553 -0
  51. package/dist/plugin-runtime-control.d.ts +2 -0
  52. package/dist/plugin-runtime-control.js +37 -0
  53. package/dist/plugin-store.d.ts +37 -8
  54. package/dist/plugin-store.js +80 -15
  55. package/dist/plugin-supervisor.d.ts +160 -0
  56. package/dist/plugin-supervisor.js +1143 -0
  57. package/dist/pm2.d.ts +3 -1
  58. package/dist/pm2.js +55 -13
  59. package/dist/provider-cli-service.d.ts +46 -0
  60. package/dist/provider-cli-service.js +510 -0
  61. package/dist/registry.d.ts +6 -19
  62. package/dist/registry.js +22 -87
  63. package/dist/remote-runtime-access-store.d.ts +61 -0
  64. package/dist/remote-runtime-access-store.js +386 -0
  65. package/dist/remote-runtime-admin.d.ts +32 -0
  66. package/dist/remote-runtime-admin.js +107 -0
  67. package/dist/remote-runtime-connection-manager.d.ts +92 -0
  68. package/dist/remote-runtime-connection-manager.js +1409 -0
  69. package/dist/remote-runtime-credential-store.d.ts +45 -0
  70. package/dist/remote-runtime-credential-store.js +639 -0
  71. package/dist/remote-runtime-target-control.d.ts +47 -0
  72. package/dist/remote-runtime-target-control.js +433 -0
  73. package/dist/remote-runtime-target-store.d.ts +53 -0
  74. package/dist/remote-runtime-target-store.js +307 -0
  75. package/dist/runtime-share-addresses.d.ts +21 -0
  76. package/dist/runtime-share-addresses.js +50 -0
  77. package/dist/session-browser-capability-store.d.ts +13 -0
  78. package/dist/session-browser-capability-store.js +58 -0
  79. package/dist/session-emulator-binding-store.d.ts +10 -0
  80. package/dist/session-emulator-binding-store.js +61 -0
  81. package/dist/session-launch-operations.d.ts +41 -0
  82. package/dist/session-launch-operations.js +124 -0
  83. package/dist/session-meta-store.d.ts +3 -2
  84. package/dist/session-meta-store.js +57 -7
  85. package/dist/setup.js +9 -4
  86. package/dist/skills-catalog.js +8 -4
  87. package/dist/update.d.ts +11 -2
  88. package/dist/update.js +0 -27
  89. package/package.json +18 -10
@@ -0,0 +1,113 @@
1
+ import { type DaemonStatus } from "@rynx-ai/protocol/remote-runtime";
2
+ import { type RemoteRuntimeRpcMethod, type RemoteRuntimeRpcParams, type RemoteRuntimeRpcResultFor } from "@rynx-ai/protocol/remote-runtime-rpc";
3
+ import { type PairingOffer } from "@rynx-ai/protocol/direct-runtime";
4
+ import { type RuntimeBrowserBootstrapCredential, type RuntimeBrowserEndpointDescriptor } from "@rynx-ai/protocol/runtime-browser-bootstrap";
5
+ export { connectResidentDesktopBrowserHost, type ResidentDesktopBrowserHostConnection, type ResidentDesktopBrowserHostCommandRequest, type ResidentDesktopBrowserHostConnectOptions, type ResidentDesktopBrowserHostFailure, } from "./desktop-browser-host-client.js";
6
+ export interface ResidentDaemon {
7
+ origin: string;
8
+ }
9
+ export interface ResidentDaemonIdentity {
10
+ installationId: string;
11
+ algorithm: "Ed25519";
12
+ publicKey: string;
13
+ }
14
+ export interface ResidentPluginCommandResult {
15
+ code: number;
16
+ stdout: string;
17
+ stderr: string;
18
+ truncated: boolean;
19
+ }
20
+ export interface ResidentRemoteRuntimeClientGrant {
21
+ grantId: string;
22
+ clientId: string;
23
+ clientLabel: string | null;
24
+ clientKeyFingerprint: string;
25
+ authorities: string[];
26
+ createdAt: string;
27
+ revokedAt: string | null;
28
+ lastUsedAt: string | null;
29
+ }
30
+ export interface ResidentRuntimeTargetView {
31
+ selector: string;
32
+ daemonId: string;
33
+ displayName: string;
34
+ binding: "local" | "direct";
35
+ endpoint?: string;
36
+ identityKeyFingerprint?: string;
37
+ createdAt?: string;
38
+ }
39
+ export interface ResidentRuntimeTargetTestResult {
40
+ target: ResidentRuntimeTargetView;
41
+ status: DaemonStatus;
42
+ }
43
+ export interface InvokeResidentPluginCommandOptions {
44
+ stdin?: string;
45
+ signal?: AbortSignal;
46
+ }
47
+ export type ResidentRuntimeCallErrorCode = "invalid_target" | "invalid_request" | "not_found" | "conflict" | "failed_precondition" | "method_not_found" | "deadline_exceeded" | "unreachable" | "tls_error" | "identity_mismatch" | "incompatible" | "authentication_failed" | "protocol_error" | "operation_failed" | "outcome_unknown" | "cancelled" | "unauthorized" | "closed" | "internal" | "internal_error";
48
+ export type ResidentRuntimeCallOutcome = "not_started" | "unknown";
49
+ /** Stable error returned by the resident daemon's typed Runtime gateway. */
50
+ export declare class ResidentRuntimeCallError extends Error {
51
+ readonly code: ResidentRuntimeCallErrorCode;
52
+ readonly status?: number | undefined;
53
+ readonly outcome?: ResidentRuntimeCallOutcome;
54
+ constructor(code: ResidentRuntimeCallErrorCode, message: string, status?: number | undefined, options?: ErrorOptions & {
55
+ outcome?: ResidentRuntimeCallOutcome;
56
+ });
57
+ }
58
+ /** Connect to the one resident daemon, starting its supervisor when absent. */
59
+ export declare function ensureResidentDaemon(): Promise<ResidentDaemon>;
60
+ /** Read the stable public identity of the single resident daemon. */
61
+ export declare function getResidentDaemonIdentity(): Promise<ResidentDaemonIdentity>;
62
+ /** Read the transport-independent status of the resident daemon process. */
63
+ export declare function getResidentDaemonRuntimeStatus(): Promise<DaemonStatus>;
64
+ /** Create one pairing offer on the resident daemon for a selected reachable route. */
65
+ export declare function createResidentRemoteRuntimePairingOffer(input?: {
66
+ clientLabel?: string;
67
+ address?: string;
68
+ }): Promise<PairingOffer>;
69
+ /** List redacted client grants accepted by the resident daemon. */
70
+ export declare function listResidentRemoteRuntimeClients(): Promise<ResidentRemoteRuntimeClientGrant[]>;
71
+ /** Revoke one resident-daemon client grant and close its active channels. */
72
+ export declare function revokeResidentRemoteRuntimeClient(grantId: string): Promise<{
73
+ revoked: true;
74
+ closedConnections: number;
75
+ }>;
76
+ /** List local and paired Runtime targets through the resident daemon BFF. */
77
+ export declare function listResidentRuntimeTargets(): Promise<ResidentRuntimeTargetView[]>;
78
+ /** Pair a target; the offer remains inside the loopback management request. */
79
+ export declare function pairResidentRuntimeTarget(offer: unknown, displayName?: string): Promise<ResidentRuntimeTargetTestResult>;
80
+ export declare function testResidentRuntimeTarget(selector: string): Promise<ResidentRuntimeTargetTestResult>;
81
+ export declare function forgetResidentRuntimeTarget(daemonId: string): Promise<{
82
+ forgotten: true;
83
+ }>;
84
+ /**
85
+ * Invoke one typed Runtime method through the single resident daemon.
86
+ *
87
+ * The short-lived CLI process never reads Direct credentials or opens a
88
+ * remote socket. The resident daemon owns target resolution, Local/Direct
89
+ * connection reuse, authorization and no-retry outcome semantics.
90
+ */
91
+ export declare function callResidentRuntime<M extends RemoteRuntimeRpcMethod>(selectorInput: string, method: M, params: RemoteRuntimeRpcParams<M>, options?: {
92
+ signal?: AbortSignal;
93
+ }): Promise<RemoteRuntimeRpcResultFor<M>>;
94
+ /** Read the current managed Session credential without exposing it in output. */
95
+ export declare function readManagedRuntimeBrowserCredential(env?: NodeJS.ProcessEnv): Promise<RuntimeBrowserBootstrapCredential>;
96
+ /** Return undefined only when the process has no managed Session context at all. */
97
+ export declare function readOptionalManagedRuntimeBrowserCredential(env?: NodeJS.ProcessEnv): Promise<RuntimeBrowserBootstrapCredential | undefined>;
98
+ /**
99
+ * Invoke Browser control for the caller's own managed Session. Unlike the
100
+ * operator Runtime gateway, this path never reads or sends daemon management
101
+ * authority and cannot select a remote Runtime or another Session.
102
+ */
103
+ export declare function callManagedRuntimeBrowser<M extends RemoteRuntimeRpcMethod>(credential: RuntimeBrowserBootstrapCredential, method: M, params: RemoteRuntimeRpcParams<M>, options?: {
104
+ signal?: AbortSignal;
105
+ }): Promise<RemoteRuntimeRpcResultFor<M>>;
106
+ /** Resolve native CDP for the caller's own Session on this Runtime only. */
107
+ export declare function getResidentRuntimeLocalBrowserEndpoint(options?: {
108
+ env?: NodeJS.ProcessEnv;
109
+ sessionId?: string;
110
+ signal?: AbortSignal;
111
+ }): Promise<RuntimeBrowserEndpointDescriptor>;
112
+ /** Invoke one command declared by an installed plugin through the resident daemon. */
113
+ export declare function invokeResidentPluginCommand(pluginId: string, args: readonly string[], options?: InvokeResidentPluginCommandOptions): Promise<ResidentPluginCommandResult>;