salt-agent-sdk 0.1.0 → 0.18.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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +941 -30
  3. package/dist/actions.d.ts +21 -5
  4. package/dist/actions.d.ts.map +1 -1
  5. package/dist/actions.js +673 -54
  6. package/dist/actions.js.map +1 -1
  7. package/dist/ask.d.ts +83 -0
  8. package/dist/ask.d.ts.map +1 -0
  9. package/dist/ask.js +215 -0
  10. package/dist/ask.js.map +1 -0
  11. package/dist/chatPrivacy.d.ts +34 -0
  12. package/dist/chatPrivacy.d.ts.map +1 -0
  13. package/dist/chatPrivacy.js +60 -0
  14. package/dist/chatPrivacy.js.map +1 -0
  15. package/dist/client.d.ts +2783 -35
  16. package/dist/client.d.ts.map +1 -1
  17. package/dist/client.js +1200 -143
  18. package/dist/client.js.map +1 -1
  19. package/dist/config.d.ts +16 -6
  20. package/dist/config.d.ts.map +1 -1
  21. package/dist/config.js +16 -5
  22. package/dist/config.js.map +1 -1
  23. package/dist/crypto.d.ts +62 -0
  24. package/dist/crypto.d.ts.map +1 -1
  25. package/dist/crypto.js +121 -0
  26. package/dist/crypto.js.map +1 -1
  27. package/dist/delegations.d.ts +25 -8
  28. package/dist/delegations.d.ts.map +1 -1
  29. package/dist/delegations.js +67 -11
  30. package/dist/delegations.js.map +1 -1
  31. package/dist/device/client.d.ts +161 -0
  32. package/dist/device/client.d.ts.map +1 -0
  33. package/dist/device/client.js +601 -0
  34. package/dist/device/client.js.map +1 -0
  35. package/dist/device/host.d.ts +222 -0
  36. package/dist/device/host.d.ts.map +1 -0
  37. package/dist/device/host.js +891 -0
  38. package/dist/device/host.js.map +1 -0
  39. package/dist/device/http.d.ts +12 -0
  40. package/dist/device/http.d.ts.map +1 -0
  41. package/dist/device/http.js +124 -0
  42. package/dist/device/http.js.map +1 -0
  43. package/dist/device/index.d.ts +5 -0
  44. package/dist/device/index.d.ts.map +1 -0
  45. package/dist/device/index.js +27 -0
  46. package/dist/device/index.js.map +1 -0
  47. package/dist/device/protocol.d.ts +312 -0
  48. package/dist/device/protocol.d.ts.map +1 -0
  49. package/dist/device/protocol.js +435 -0
  50. package/dist/device/protocol.js.map +1 -0
  51. package/dist/identities.d.ts +9 -2
  52. package/dist/identities.d.ts.map +1 -1
  53. package/dist/identities.js +33 -3
  54. package/dist/identities.js.map +1 -1
  55. package/dist/identity.d.ts +155 -0
  56. package/dist/identity.d.ts.map +1 -0
  57. package/dist/identity.js +196 -0
  58. package/dist/identity.js.map +1 -0
  59. package/dist/identityShare.d.ts +129 -0
  60. package/dist/identityShare.d.ts.map +1 -0
  61. package/dist/identityShare.js +308 -0
  62. package/dist/identityShare.js.map +1 -0
  63. package/dist/ids.d.ts +11 -0
  64. package/dist/ids.d.ts.map +1 -0
  65. package/dist/ids.js +17 -0
  66. package/dist/ids.js.map +1 -0
  67. package/dist/index.d.ts +13 -0
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +13 -0
  70. package/dist/index.js.map +1 -1
  71. package/dist/reconcile.d.ts +25 -0
  72. package/dist/reconcile.d.ts.map +1 -0
  73. package/dist/reconcile.js +60 -0
  74. package/dist/reconcile.js.map +1 -0
  75. package/dist/recovery.d.ts +51 -0
  76. package/dist/recovery.d.ts.map +1 -0
  77. package/dist/recovery.js +59 -0
  78. package/dist/recovery.js.map +1 -0
  79. package/dist/register.d.ts +32 -0
  80. package/dist/register.d.ts.map +1 -0
  81. package/dist/register.js +65 -0
  82. package/dist/register.js.map +1 -0
  83. package/dist/scriptJob.d.ts +92 -0
  84. package/dist/scriptJob.d.ts.map +1 -0
  85. package/dist/scriptJob.js +270 -0
  86. package/dist/scriptJob.js.map +1 -0
  87. package/dist/sessions.d.ts +131 -0
  88. package/dist/sessions.d.ts.map +1 -0
  89. package/dist/sessions.js +240 -0
  90. package/dist/sessions.js.map +1 -0
  91. package/dist/socket.d.ts +115 -0
  92. package/dist/socket.d.ts.map +1 -0
  93. package/dist/socket.js +1038 -0
  94. package/dist/socket.js.map +1 -0
  95. package/dist/webhook.d.ts +613 -24
  96. package/dist/webhook.d.ts.map +1 -1
  97. package/dist/webhook.js +1384 -83
  98. package/dist/webhook.js.map +1 -1
  99. package/dist/work.d.ts +57 -0
  100. package/dist/work.d.ts.map +1 -0
  101. package/dist/work.js +213 -0
  102. package/dist/work.js.map +1 -0
  103. package/package.json +26 -4
@@ -0,0 +1,222 @@
1
+ import { DeviceProtocolError, type AppsResult, type ClickArgs, type DeviceCountClass, type DeviceErrorCode, type DeviceOp, type DevicePauseReason, type FileResult, type KeyArgs, type ObservationResult, type ObserveArgs, type Progress, type ScrollArgs, type SubmitArgs, type TaskArgs, type TaskResult } from "./protocol.js";
2
+ import type { LaneReaders } from "./client.js";
3
+ import { type SaltId } from "../ids.js";
4
+ /** The seams. The desktop app implements every method; the host calls one only
5
+ * after it has passed every gate below. A handler may throw -- the host turns
6
+ * a throw into an `error { code: "failed" }` and counts it as an error. */
7
+ export interface DeviceHostHandlers {
8
+ observe(args: ObserveArgs): Promise<ObservationResult>;
9
+ click(args: ClickArgs): Promise<HandlerResult>;
10
+ type(args: {
11
+ text: string;
12
+ }): Promise<HandlerResult>;
13
+ key(args: KeyArgs): Promise<HandlerResult>;
14
+ scroll(args: ScrollArgs): Promise<HandlerResult>;
15
+ submit(args: SubmitArgs): Promise<HandlerResult>;
16
+ focusApp(args: {
17
+ app: string;
18
+ }): Promise<HandlerResult>;
19
+ listApps(): Promise<AppsResult>;
20
+ readFile(args: {
21
+ path: string;
22
+ }): Promise<FileResult>;
23
+ writeFile(args: {
24
+ path: string;
25
+ content_b64: string;
26
+ }): Promise<HandlerResult>;
27
+ /** Do ONE whole task (op `task`, capability `device.task`). Optional: a host without it
28
+ * answers `unsupported`. The host holds the device lock for the whole run. What comes back
29
+ * is allow-listed field by field into a `TaskResult` (see `normalizeTaskResult`), so an
30
+ * extra field never reaches the agent. Let a `DeviceBudgetSpentError` from `ctx.spend`
31
+ * bubble: it ends the task and the session. */
32
+ task?(args: TaskArgs, ctx: DeviceTaskContext): Promise<TaskResult>;
33
+ }
34
+ /** What `ctx.spend` counts a task step as. `act` is counted as a `click` (the closest of the
35
+ * existing classes: a press of a control) and `apps` as `app_focus`. */
36
+ export type TaskSpendClass = "command" | "look" | "act" | "observe" | "apps";
37
+ /** What a `task` handler is given besides its arguments. */
38
+ export interface DeviceTaskContext {
39
+ /** Aborts when the agent cancels the task (`reason` "cancelled"), when `timeout_s` runs out
40
+ * ("timeout") and when the session ends ("session_ended"). A handler that ignores it is cut
41
+ * off 15 s after `timeout_s` with a `timeout` result and the device lock is released. */
42
+ signal: AbortSignal;
43
+ /** Tell the agent (and keep the session alive) with one plain line. The host allow-lists the
44
+ * fields, cuts `line` to 140 and sends at most one every 2 s (the newest waiting one goes
45
+ * out when the gap is over). Never throws. Call it at least once a minute on a long task:
46
+ * Salt ends a session that has run nothing for 2 minutes (5 when a person supervises). */
47
+ progress(p: Progress): void;
48
+ /** Count one step toward the grant's budget and the metadata counts, and keep the session
49
+ * alive. Throws `DeviceBudgetSpentError` when `max_actions` is already spent: let it bubble. */
50
+ spend(cls: TaskSpendClass): void;
51
+ /** Why the session is paused (the person has the computer), or null. A task must not act
52
+ * while this is non-null. */
53
+ paused(): DevicePauseReason | null;
54
+ /** Resolves `running` at once when not paused, or when the pause ends; `paused_out` when the
55
+ * task's own time runs out first (finish with status `paused_out`); `stopped` when the task
56
+ * is cancelled or the session ends. */
57
+ waitWhilePaused(): Promise<"running" | "paused_out" | "stopped">;
58
+ /** The `device.task` rule's mode: `ask` means every command asks the person first (Limited
59
+ * grant), `auto` runs it, `notify` runs it and tells them. The host does not ask for the
60
+ * task as a whole; the handler asks per command. */
61
+ mode: DeviceCapRule["mode"];
62
+ /** The grant's other rules (`device.observe`, `device.act`, `device.apps`, ...), read-only. */
63
+ caps: Readonly<Partial<Record<string, DeviceCapRule>>>;
64
+ }
65
+ /** `ctx.spend` when the grant's `max_actions` is already spent. A `DeviceProtocolError` with
66
+ * code `out_of_scope`, so a handler that lets it bubble answers the agent "action budget
67
+ * spent" and the host ends the session `budget_exhausted`. */
68
+ export declare class DeviceBudgetSpentError extends DeviceProtocolError {
69
+ constructor();
70
+ }
71
+ /** What a mutating handler may hand back: nothing, or a record about how the action went
72
+ * (a typed text reports `typed`, `method`, `verified`, `note`). Only those four fields ride
73
+ * into the ack, each with its own type, so the agent learns what the computer really did and
74
+ * nothing else (never a field's text, a screen, or any other handler-supplied field). */
75
+ export type HandlerResult = void | Record<string, unknown>;
76
+ /** The ack body: the allow-listed handler fields (typed: finite number, method: string,
77
+ * verified: boolean, note: string capped at 300), then `ok: true` (which a handler cannot
78
+ * override, so an old agent that only reads `ok` sees the same wire it always did). */
79
+ export declare function ackBody(result: unknown): Record<string, unknown>;
80
+ /** What the server told the device about this session in the
81
+ * `device_session_request` delivery. The device trusts this snapshot and
82
+ * re-checks it on EVERY command; it never widens it (only the person, locally,
83
+ * can widen a mandate, and that produces a new snapshot). */
84
+ export interface DeviceCapsSnapshot {
85
+ sessionId: SaltId;
86
+ agentId: SaltId;
87
+ /** Armored public keys of every lane reader; results are encrypted for all. */
88
+ readers: LaneReaders;
89
+ /** The capabilities granted, keyed by `device.*`. A command whose op maps to
90
+ * a capability not present here is `out_of_scope`. */
91
+ caps: Partial<Record<string, DeviceCapRule>>;
92
+ budget?: {
93
+ maxActions?: number;
94
+ maxDurationS?: number;
95
+ };
96
+ /** ISO8601; past it, the session ends `mandate_expired`. */
97
+ expiresAt?: string;
98
+ }
99
+ export interface DeviceCapRule {
100
+ /** auto = run; ask = ask the person at the machine first; notify = run and
101
+ * tell them. The device holds this decision, never the server. */
102
+ mode: "auto" | "ask" | "notify";
103
+ /** For device.apps: the only bundle ids / exe names in scope (empty/omitted
104
+ * = any app the floor allows). */
105
+ apps?: string[];
106
+ /** For device.files.*: the only path prefixes in scope. A file op outside
107
+ * every root is `out_of_scope`. */
108
+ fileRoots?: string[];
109
+ }
110
+ export interface DeviceHostTransport {
111
+ /** Encrypt `plaintext` for the lane readers and POST it as one lane message. */
112
+ postResult(plaintext: string, readers: LaneReaders): Promise<void>;
113
+ /** POST /device_sessions/:sid/beat. A 409 means the session is over: the
114
+ * transport should throw a DeviceBeatOverError so the host stops at once. */
115
+ beat(sessionId: SaltId, report?: DeviceBeatReport): Promise<void>;
116
+ /** PATCH /device_sessions/:sid/counts with whole-number per-class counts and
117
+ * the newest executed seq. Salt extends an agent's lease ONLY from these
118
+ * device reports (it never sees commands). */
119
+ reportCounts(sessionId: SaltId, counts: Partial<Record<DeviceCountClass, number>>, report?: {
120
+ last_seq?: number;
121
+ }): Promise<void>;
122
+ /** POST /device_sessions/:sid/stop with an end reason (subtract-only). */
123
+ stop(sessionId: SaltId, reason: string): Promise<void>;
124
+ /** POST /device_sessions/:sid/pause `{reason}` (device key). Optional: a
125
+ * transport without it still pauses locally. The only place the pause
126
+ * endpoint's shape lives is httpDeviceHostTransport (http.ts). */
127
+ pause?(sessionId: SaltId, reason: DevicePauseReason): Promise<void>;
128
+ /** POST /device_sessions/:sid/resume (device key). */
129
+ resume?(sessionId: SaltId): Promise<void>;
130
+ }
131
+ /** The optional body of a beat: when the device last executed a command
132
+ * (ISO8601) and that command's seq. Sent on every beat once one has run. */
133
+ export interface DeviceBeatReport {
134
+ last_command_at?: string;
135
+ last_seq?: number;
136
+ /** True on every beat while a `task` handler is running: one model call can take two minutes, and a
137
+ * plain beat does not keep the session alive past the idle lease. */
138
+ task_running?: true;
139
+ }
140
+ export declare class DeviceBeatOverError extends Error {
141
+ }
142
+ /** A FIFO async mutex. One of these guards every mutating command (click /
143
+ * type / key / scroll / focus_app) on the machine, whichever session sent it.
144
+ * `sharedDeviceLock` is the process-wide instance every host uses by default,
145
+ * so two sessions on one machine can never interleave input. salt-device may
146
+ * pass its own via `options.deviceLock` (e.g. to also hold it around local
147
+ * tray actions that inject input). */
148
+ export declare class DeviceLock {
149
+ private tail;
150
+ /** Resolves with a release function once every earlier holder released. */
151
+ acquire(): Promise<() => void>;
152
+ /** Run `fn` while holding the lock. */
153
+ run<T>(fn: () => Promise<T>): Promise<T>;
154
+ }
155
+ /** The process-wide device mutex (default for every host). */
156
+ export declare const sharedDeviceLock: DeviceLock;
157
+ export interface DeviceHostCallbacks {
158
+ /** The LOCAL approval prompt for an `ask`-mode command. Resolves true if the
159
+ * person at the machine approved. The host shows `needs_approval` until it
160
+ * does. The DESKTOP APP owns this UI; absent, every ask-mode op is refused. */
161
+ requestLocalApproval?(op: DeviceOp, args: unknown, opts?: {
162
+ timeoutMs: number;
163
+ }): Promise<boolean>;
164
+ /** Told after a `notify`-mode command runs, so the app can surface it. */
165
+ onNotify?(op: DeviceOp, args: unknown): void;
166
+ /** Told when the host ends the session itself (budget, duration, lost beat,
167
+ * a stop command). The app updates its indicator and writes its audit line. */
168
+ onEnded?(reason: string): void;
169
+ /** Every gate decision, for the app's append-only on-disk audit log. Content
170
+ * is the caller's to redact; the host passes op + decision + reason only. */
171
+ onAudit?(entry: DeviceAuditEntry): void;
172
+ }
173
+ export interface DeviceAuditEntry {
174
+ at: number;
175
+ commandId: string;
176
+ op: string;
177
+ decision: "ran" | "refused" | "needs_approval" | "ended";
178
+ code?: DeviceErrorCode;
179
+ reason?: string;
180
+ }
181
+ /** Apps the floor never allows a command to target, whatever a mandate says:
182
+ * password managers and keychains. The desktop app extends this with its own
183
+ * Salt windows (which it also blanks in the capture handler). Browsers are
184
+ * deliberately NOT here (owner: browsers full, no deny-list). */
185
+ export declare const NEVER_ALLOWED_APPS: readonly string[];
186
+ export interface DeviceHost {
187
+ /** Feed a decrypted lane message in. Non-device lines and results from
188
+ * elsewhere return false and are ignored. A command is answered (ack /
189
+ * observation / error / ...) via the transport. */
190
+ handleCommand(plaintext: string): Promise<boolean>;
191
+ /** Start the live heartbeat + budget/duration watch. The desktop app calls
192
+ * this once the session is active. */
193
+ start(): void;
194
+ /** End the session locally (subtract-only) and tell the server. */
195
+ stop(reason?: string): Promise<void>;
196
+ /** The spent count of budgeted actions, for the indicator. */
197
+ actionsSpent(): number;
198
+ /** Pause the session: every command (except `stop` and `cancel`) is refused
199
+ * `paused` with `reason` until resume(). Takes effect synchronously; the
200
+ * returned promise settles when Salt has been told (a failed report never
201
+ * un-pauses). Idempotent; a second reason replaces the first. Does not
202
+ * interrupt a command already executing. */
203
+ pause(reason: DevicePauseReason): Promise<void>;
204
+ /** Clear the pause and tell Salt. No-op when not paused. */
205
+ resume(): Promise<void>;
206
+ /** The current pause reason, or null. */
207
+ pausedReason(): DevicePauseReason | null;
208
+ }
209
+ export declare function createDeviceHost(snapshot: DeviceCapsSnapshot, handlers: DeviceHostHandlers, transport: DeviceHostTransport, callbacks?: DeviceHostCallbacks, options?: {
210
+ beatIntervalMs?: number;
211
+ neverAllowedApps?: readonly string[];
212
+ /** Device-wide mutex for mutating ops. Default: the process-wide
213
+ * `sharedDeviceLock`, so every host in this process shares one. */
214
+ deviceLock?: DeviceLock;
215
+ /** Clock, for tests. */
216
+ now?: () => number;
217
+ /** Least gap between two `progress` lines of a task (default PROGRESS_MIN_INTERVAL_MS). */
218
+ progressMinIntervalMs?: number;
219
+ /** How long past `timeout_s` a task handler may run before it is cut off (default 15 s). */
220
+ taskGraceMs?: number;
221
+ }): DeviceHost;
222
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/device/host.ts"],"names":[],"mappings":"AAiCA,OAAO,EAKL,mBAAmB,EAenB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAEpB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,UAAU,EAChB,MAAM,eAAe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