dsh-click 0.1.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.
@@ -0,0 +1,94 @@
1
+ /**
2
+ * The action executor: the safety boundary every mutating action crosses.
3
+ * One shared flow for click/type/scroll/key — re-observe the window and
4
+ * refuse on staleness, gate through approval (or the allowlist), perform
5
+ * through the backend, verify process identity before/after — plus a separate
6
+ * gate-and-launch flow for `app_launch`. Every decision and outcome lands in
7
+ * the `dsh-click/action` session audit event.
8
+ *
9
+ * @module dsh-click/actions
10
+ */
11
+ import type { Context } from '@deepseek-ai/cordis';
12
+ import type { ToolRunContext } from '@deepseek-ai/dsh-tools';
13
+ import type { ResolvedConfig } from './config.ts';
14
+ import { ObservationStore } from './observe.ts';
15
+ import { type ActionOutcome, type DesktopBackend, type LaunchOutcome } from './platform/types.ts';
16
+ /** Which gate allowed an action, for the audit trail. */
17
+ export type ApprovalKind = 'approval' | 'allowlist' | 'none';
18
+ /** The executor's dependencies, all injected at construction. */
19
+ export interface ActionExecutorDeps {
20
+ /** The mounting context. */
21
+ readonly ctx: Context;
22
+ /** Resolved plugin config. */
23
+ readonly config: ResolvedConfig;
24
+ /** The active desktop backend. */
25
+ readonly backend: DesktopBackend;
26
+ /** The observation cache. */
27
+ readonly observations: ObservationStore;
28
+ }
29
+ /** Executes mutating desktop actions behind the full safety boundary. */
30
+ export declare class ActionExecutor {
31
+ private readonly deps;
32
+ /** @param deps - executor dependencies. */
33
+ constructor(deps: ActionExecutorDeps);
34
+ /** The mounting context. */
35
+ private get ctx();
36
+ /** The resolved config. */
37
+ private get config();
38
+ /** Append one action audit event; a failed append never changes the outcome. */
39
+ private audit;
40
+ /**
41
+ * The staleness boundary: resolve the cited observation, re-observe the
42
+ * window right now, and compare.
43
+ *
44
+ * @param observationId - the observation the action cites.
45
+ * @param windowId - the window the action addresses.
46
+ * @param signal - cancellation.
47
+ * @returns the cited record and the fresh snapshot.
48
+ */
49
+ private requireFreshWindow;
50
+ /**
51
+ * The approval gate. Matchers run against the sanitized window title and
52
+ * the executable path; a match skips the ask (still audited as allowlist).
53
+ * With no matcher, a missing approval service or a missing calling agent
54
+ * fails closed; the real approval service is asked otherwise.
55
+ *
56
+ * @param exec - the calling tool execution.
57
+ * @param toolName - the tool asking (audit + prompt identity).
58
+ * @param subject - what the action targets, for the reason and the matchers.
59
+ * @param signal - cancellation.
60
+ * @returns which gate allowed the action.
61
+ */
62
+ private gate;
63
+ /**
64
+ * Compare the process identity captured before and after an action.
65
+ *
66
+ * @param before - facts captured pre-action.
67
+ * @param after - facts captured post-action.
68
+ */
69
+ private assertProcessUnchanged;
70
+ /**
71
+ * Run one window-scoped mutating action through the shared boundary:
72
+ * freshness, approval, perform, process check, audit.
73
+ *
74
+ * @param toolName - the calling tool name.
75
+ * @param exec - the calling execution.
76
+ * @param observationId - the cited observation.
77
+ * @param windowId - the target window.
78
+ * @param run - the backend call (receives the resolved focus flag).
79
+ * @returns the validated backend outcome.
80
+ */
81
+ perform(toolName: string, exec: ToolRunContext, observationId: string, windowId: number, run: (focusFallback: boolean) => Promise<ActionOutcome>): Promise<ActionOutcome>;
82
+ /**
83
+ * Gate and launch one application. No window observation exists yet, so the
84
+ * gate runs against the requested name/path alone and the launch outcome's
85
+ * process facts are the post-identity proof.
86
+ *
87
+ * @param exec - the calling execution.
88
+ * @param name - the app name or executable path.
89
+ * @param args - launch arguments.
90
+ * @returns the launch outcome.
91
+ */
92
+ launch(exec: ToolRunContext, name: string, args: readonly string[]): Promise<LaunchOutcome>;
93
+ }
94
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE5D,OAAO,KAA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AAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC;CAoBlG"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Plugin configuration and its explicit resolve step. `resolveConfig` re-judges
3
+ * every default and bound so programmatic construction that bypasses
4
+ * Schemastery normalization still fails loud instead of running with hidden
5
+ * defaults (the explicit-resolve contract).
6
+ *
7
+ * @module dsh-click/config
8
+ */
9
+ import z from '@deepseek-ai/schemastery';
10
+ /** How `screen_shot` decides between an image block and a text description. */
11
+ export type ImageMode = 'auto' | 'text';
12
+ /** Whether mutating actions may ever bring the target window to the foreground. */
13
+ export type FocusFallback = 'never' | 'allow';
14
+ /** Default per-helper-call timeout in milliseconds. */
15
+ export declare const DEFAULT_HELPER_TIMEOUT_MS = 30000;
16
+ /** Ceiling for one helper call: a screenshot of a large desktop can take a while. */
17
+ export declare const MAX_HELPER_TIMEOUT_MS = 300000;
18
+ /** Default cap on one helper response in bytes (PNG screenshots are base64-heavy). */
19
+ export declare const DEFAULT_MAX_HELPER_OUTPUT_BYTES: number;
20
+ /** Ceiling on one helper response. */
21
+ export declare const MAX_HELPER_OUTPUT_BYTES: number;
22
+ /** Default longest side of a captured screenshot in pixels (larger captures downscale). */
23
+ export declare const DEFAULT_MAX_SCREENSHOT_SIDE = 2560;
24
+ /** Bounds for the screenshot side: too small reads nothing, too large is unusable. */
25
+ export declare const MIN_SCREENSHOT_SIDE = 320;
26
+ export declare const MAX_SCREENSHOT_SIDE = 7680;
27
+ /** Default maximum age of an observation that an action may still base on. */
28
+ export declare const DEFAULT_MAX_OBSERVATION_AGE_MS = 30000;
29
+ /** Bounds for the observation age. */
30
+ export declare const MIN_OBSERVATION_AGE_MS = 1000;
31
+ export declare const MAX_OBSERVATION_AGE_MS = 600000;
32
+ /** Default cap on cached observations (LRU; actions address them by id). */
33
+ export declare const DEFAULT_MAX_CACHED_OBSERVATIONS = 8;
34
+ /** Ceiling on cached observations. */
35
+ export declare const MAX_CACHED_OBSERVATIONS = 64;
36
+ /** Default cap on elements the accessibility walk returns per observation. */
37
+ export declare const DEFAULT_MAX_ELEMENTS = 500;
38
+ /** Ceiling on the element cap. */
39
+ export declare const MAX_ELEMENTS = 2000;
40
+ /** Default maximum depth of the accessibility tree walk. */
41
+ export declare const DEFAULT_MAX_TREE_DEPTH = 32;
42
+ /** Ceiling on the tree depth. */
43
+ export declare const MAX_TREE_DEPTH = 64;
44
+ /** Default truncation length for sanitized model-visible strings. */
45
+ export declare const DEFAULT_MAX_TEXT_LENGTH = 200;
46
+ /** Ceiling on the sanitization truncation length. */
47
+ export declare const MAX_TEXT_LENGTH = 10000;
48
+ /** Configuration for the dsh-click desktop-control tools. */
49
+ export interface Config {
50
+ /** Gate every mutating action (click/type/scroll/key/app_launch) behind approval (default true). */
51
+ requireApproval?: boolean;
52
+ /** Window title or executable-path regexes that skip the approval ask (still audited; default []). */
53
+ autoApproveWindows?: string[];
54
+ /** Whether mutating actions may bring the target window to the foreground as a fallback (default 'never'). */
55
+ focusFallback?: FocusFallback;
56
+ /** How `screen_shot` renders: image block for vision models, text otherwise (default 'auto'). */
57
+ imageMode?: ImageMode;
58
+ /** Per-helper-call timeout in milliseconds (default 30000). */
59
+ helperTimeoutMs?: number;
60
+ /** Cap on one helper response in bytes (default 25165824). */
61
+ maxHelperOutputBytes?: number;
62
+ /** Longest side of a captured screenshot in pixels (default 2560). */
63
+ maxScreenshotSide?: number;
64
+ /** Compare a fresh pixel hash before every action (default true; the stale-state boundary). */
65
+ staleCheckPixels?: boolean;
66
+ /** Maximum age in ms of an observation that an action may still base on (default 30000). */
67
+ maxObservationAgeMs?: number;
68
+ /** Cap on cached observations (default 8). */
69
+ maxCachedObservations?: number;
70
+ /** Cap on elements the accessibility walk returns (default 500). */
71
+ maxElements?: number;
72
+ /** Maximum depth of the accessibility tree walk (default 32). */
73
+ maxTreeDepth?: number;
74
+ /** Truncation length for sanitized model-visible strings (default 200). */
75
+ maxTextLength?: number;
76
+ /** Back up and restore control text when `type` fails (default true). */
77
+ rollbackEnabled?: boolean;
78
+ }
79
+ /** Fully resolved configuration captured at plugin load. */
80
+ export interface ResolvedConfig {
81
+ /** Whether mutating actions require approval. */
82
+ requireApproval: boolean;
83
+ /** Compiled allowlist matchers (window title or executable path). */
84
+ autoApproveMatchers: ReadonlyArray<RegExp>;
85
+ /** Whether focus fallback is permitted. */
86
+ focusFallback: FocusFallback;
87
+ /** Screenshot render mode. */
88
+ imageMode: ImageMode;
89
+ /** Per-helper-call timeout in milliseconds. */
90
+ helperTimeoutMs: number;
91
+ /** Cap on one helper response in bytes. */
92
+ maxHelperOutputBytes: number;
93
+ /** Longest screenshot side in pixels. */
94
+ maxScreenshotSide: number;
95
+ /** Whether the pixel-level stale check runs. */
96
+ staleCheckPixels: boolean;
97
+ /** Maximum observation age in milliseconds. */
98
+ maxObservationAgeMs: number;
99
+ /** Cap on cached observations. */
100
+ maxCachedObservations: number;
101
+ /** Cap on elements per observation. */
102
+ maxElements: number;
103
+ /** Maximum tree-walk depth. */
104
+ maxTreeDepth: number;
105
+ /** Truncation length for sanitized strings. */
106
+ maxTextLength: number;
107
+ /** Whether `type` backs up and restores control text on failure. */
108
+ rollbackEnabled: boolean;
109
+ }
110
+ /** Schemastery schema for loader-validated configuration. */
111
+ export declare const Config: z<Config>;
112
+ /**
113
+ * Resolve raw config to the runtime policy, re-validating defaults and bounds.
114
+ *
115
+ * @param config - raw loader config; `undefined` for a bare row.
116
+ * @returns the frozen resolved config.
117
+ */
118
+ export declare function resolveConfig(config: Config | undefined): ResolvedConfig;
119
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,+EAA+E;AAC/E,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;AAEvC,mFAAmF;AACnF,MAAM,MAAM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Ae,EAAE,OAAO,CAAA;CACzB;AAED,6DAA6D;AAC7D,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CAe3B,CAAA;AAgBF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,CA0ExE"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Session audit events for dsh-click (declaration merging into the harness's
3
+ * `SessionEventMap`). Both events are log-only; on harness builds that support
4
+ * the append envelope they should be marked `ignorable` (the pinned peer
5
+ * 0.1.0-rc.6 has no envelope option, so the append stays two-argument and
6
+ * remains compatible with both). Tool arguments and rendered results are
7
+ * already logged by the tool runtime as `tool/call` + `tool/result`; these
8
+ * events carry the observation and action facts that exist outside them:
9
+ * window identity, process identity, and the approval/outcome audit trail.
10
+ *
11
+ * @module dsh-click/events
12
+ */
13
+ import type { ImageMediaType } from '@deepseek-ai/dsh-attachment';
14
+ /** Process identity facts captured immediately before and after an action. */
15
+ export interface ProcessFacts {
16
+ /** Process id owning the target window. */
17
+ pid: number;
18
+ /** Executable path, or null when the helper could not read it (permissions). */
19
+ executablePath: string | null;
20
+ }
21
+ /** One image saved into the attachment store by `screen_shot`. */
22
+ export interface ObservedImage {
23
+ /** Content-addressed attachment id. */
24
+ attachmentId: string;
25
+ /** Verified media type of the stored bytes. */
26
+ mediaType: ImageMediaType;
27
+ /** Encoded byte length. */
28
+ bytes: number;
29
+ /** Intrinsic width in pixels. */
30
+ width: number;
31
+ /** Intrinsic height in pixels. */
32
+ height: number;
33
+ }
34
+ declare module '@deepseek-ai/dsh-session/types' {
35
+ interface SessionEventMap {
36
+ /**
37
+ * A screen observation was produced by `screen_shot` or `screen_read` —
38
+ * log-only audit. `observationId` is the id later actions cite in
39
+ * `basedOn`; window and process identity are the facts the action-time
40
+ * freshness check compares against.
41
+ */
42
+ 'dsh-click/observed': {
43
+ /** Observation id (hash of the observed state). */
44
+ observationId: string;
45
+ /** Observed window handle. */
46
+ windowId: number;
47
+ /** Process id owning the window. */
48
+ processId: number;
49
+ /** Sanitized executable path, or null when unreadable. */
50
+ executablePath: string | null;
51
+ /** Sanitized window title. */
52
+ windowTitle: string;
53
+ /** Number of accessibility elements captured. */
54
+ elementCount: number;
55
+ /** The attached screenshot, when `screen_shot` stored one. */
56
+ image?: ObservedImage;
57
+ };
58
+ /**
59
+ * A mutating action was gated and executed (or refused) — log-only audit.
60
+ * `approved` records which gate allowed it; process facts prove the target
61
+ * process identity before and after the action.
62
+ */
63
+ 'dsh-click/action': {
64
+ /** Tool that ran the action. */
65
+ tool: string;
66
+ /** Which gate allowed the action: approval ask, allowlist match, or none required. */
67
+ approved: 'approval' | 'allowlist' | 'none';
68
+ /** Final outcome: the action ran, or it was refused/failed. */
69
+ outcome: 'ok' | 'error';
70
+ /** Observation the action based on, when one was required. */
71
+ observationId?: string;
72
+ /** Target window handle, when the action addressed a window. */
73
+ windowId?: number;
74
+ /** Process identity captured before the action. */
75
+ processBefore?: ProcessFacts;
76
+ /** Process identity captured after the action. */
77
+ processAfter?: ProcessFacts;
78
+ /** True when a failed `type` restored the original control text. */
79
+ restored?: boolean;
80
+ /** Short sanitized detail (denial reason, stale-check detail). */
81
+ detail?: string;
82
+ };
83
+ }
84
+ }
85
+ /** The observation audit event type. */
86
+ export declare const OBSERVED_EVENT: "dsh-click/observed";
87
+ /** The action audit event type. */
88
+ export declare const ACTION_EVENT: "dsh-click/action";
89
+ /** Type of the observation audit payload. */
90
+ export type ObservedEvent = {
91
+ observationId: string;
92
+ windowId: number;
93
+ processId: number;
94
+ executablePath: string | null;
95
+ windowTitle: string;
96
+ elementCount: number;
97
+ image?: ObservedImage;
98
+ };
99
+ /** Type of the action audit payload. */
100
+ export type ActionEvent = {
101
+ tool: string;
102
+ approved: 'approval' | 'allowlist' | 'none';
103
+ outcome: 'ok' | 'error';
104
+ observationId?: string;
105
+ windowId?: number;
106
+ processBefore?: ProcessFacts;
107
+ processAfter?: ProcessFacts;
108
+ restored?: boolean;
109
+ detail?: string;
110
+ };
111
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAEjE,8EAA8E;AAC9E,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,gFAAgF;IAChF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAA;IACpB,+CAA+C;IAC/C,SAAS,EAAE,cAAc,CAAA;IACzB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAA;CACf;AAED,OAAO,QAAQ,gCAAgC,CAAC;IAC9C,UAAU,eAAe;QACvB;;;;;WAKG;QACH,oBAAoB,EAAE;YACpB,mDAAmD;YACnD,aAAa,EAAE,MAAM,CAAA;YACrB,8BAA8B;YAC9B,QAAQ,EAAE,MAAM,CAAA;YAChB,oCAAoC;YACpC,SAAS,EAAE,MAAM,CAAA;YACjB,0DAA0D;YAC1D,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;YAC7B,8BAA8B;YAC9B,WAAW,EAAE,MAAM,CAAA;YACnB,iDAAiD;YACjD,YAAY,EAAE,MAAM,CAAA;YACpB,8DAA8D;YAC9D,KAAK,CAAC,EAAE,aAAa,CAAA;SACtB,CAAA;QACD;;;;WAIG;QACH,kBAAkB,EAAE;YAClB,gCAAgC;YAChC,IAAI,EAAE,MAAM,CAAA;YACZ,sFAAsF;YACtF,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,MAAM,CAAA;YAC3C,+DAA+D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click` — cross-platform native desktop control for DeepSeek Harness
3
+ * (Windows first, macOS/Linux backends reserved).
4
+ *
5
+ * Host-only function plugin — no default export (the Loader unwraps
6
+ * `exports.default ?? exports`). It registers eight tools behind one shared
7
+ * safety boundary: observations are structured text (accessibility tree +
8
+ * pixel hints) so text-only models work, mutating actions must cite a fresh
9
+ * observation and pass approval (or the configured window allowlist), the
10
+ * native helper never steals foreground focus, and every action verifies the
11
+ * target process identity before and after.
12
+ *
13
+ * @module dsh-click
14
+ */
15
+ import type { Context } from '@deepseek-ai/cordis';
16
+ import { Config } from './config.ts';
17
+ export declare const name = "dsh-click";
18
+ /** Hard services: the tool registry every contribution lands in. */
19
+ export declare const inject: string[];
20
+ export { Config, resolveConfig } from './config.ts';
21
+ export { VERSION, HELPER_PROTOCOL_VERSION } from './version.ts';
22
+ export { DshClickError } from './platform/types.ts';
23
+ export { ObservationStore, observationIdOf, type ObservationRecord, type FreshnessVerdict } from './observe.ts';
24
+ export { ActionExecutor, type ActionExecutorDeps, type ApprovalKind } from './actions.ts';
25
+ export { createBackend, UnavailableBackend } from './platform/selection.ts';
26
+ export { HelperBackend } from './platform/runner.ts';
27
+ export { allTools, type ToolServices } from './tools.ts';
28
+ export { OBSERVED_EVENT, ACTION_EVENT, type ObservedEvent, type ActionEvent, type ProcessFacts } from './events.ts';
29
+ export { sanitizeText, sanitizePath, redactSensitive, sanitizeVisible } from './sanitize.ts';
30
+ /**
31
+ * Mount the plugin: resolve config, select the platform backend, and register
32
+ * every tool through `ctx.tools.register` (each registration is an effect
33
+ * whose disposer removes exactly that tool on stop/HMR).
34
+ *
35
+ * @param ctx - context carrying the tools registry.
36
+ * @param config - raw loader config; defaults applied through {@link resolveConfig}.
37
+ */
38
+ export declare function apply(ctx: Context, config: Config): void;
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAA;AAMnD,eAAO,MAAM,IAAI,cAAc,CAAA;AAE/B,oEAAoE;AACpE,eAAO,MAAM,MAAM,UAAY,CAAA;AAE/B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/G,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AACzF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AACnH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE5F;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAYxD"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Observation cache and the staleness boundary. Every observation stores the
3
+ * window's identity facts plus content hashes; before any action the executor
4
+ * re-observes the window and this store compares. Identity, tree, or pixel
5
+ * drift — or an expired observation — refuses the action, so the model must
6
+ * re-observe instead of acting on a screen that changed.
7
+ *
8
+ * @module dsh-click/observe
9
+ */
10
+ import type { ResolvedConfig } from './config.ts';
11
+ import type { Rect, WindowSnapshot } from './platform/types.ts';
12
+ /** One cached observation, immutable after construction. */
13
+ export interface ObservationRecord {
14
+ /** Observation id (content hash). */
15
+ id: string;
16
+ windowId: number;
17
+ processId: number;
18
+ executablePath: string | null;
19
+ title: string;
20
+ className: string;
21
+ rect: Rect;
22
+ treeHash: string;
23
+ shotHash: string;
24
+ elementCount: number;
25
+ /** Wall-clock capture time in milliseconds. */
26
+ observedAt: number;
27
+ }
28
+ /** The staleness verdict: ok, or a stable refusal code plus a model-readable detail. */
29
+ export type FreshnessVerdict = {
30
+ ok: true;
31
+ } | {
32
+ ok: false;
33
+ code: 'UNKNOWN_OBSERVATION' | 'EXPIRED' | 'STALE_IDENTITY' | 'STALE_TREE' | 'STALE_PIXELS';
34
+ detail: string;
35
+ };
36
+ /**
37
+ * Hash the observable state of one window into a stable observation id.
38
+ *
39
+ * @param snapshot - the snapshot facts.
40
+ * @returns a hex observation id.
41
+ */
42
+ export declare function observationIdOf(snapshot: WindowSnapshot): string;
43
+ /** Bounded LRU cache of observations, plus the staleness verdict logic. */
44
+ export declare class ObservationStore {
45
+ private readonly config;
46
+ private readonly entries;
47
+ /** @param config - resolved caps (cache size, max age, pixel check). */
48
+ constructor(config: ResolvedConfig);
49
+ /**
50
+ * Cache one observation and return it.
51
+ *
52
+ * @param snapshot - the snapshot facts it came from.
53
+ * @returns the stored record (id = hash of the state).
54
+ */
55
+ record(snapshot: WindowSnapshot): ObservationRecord;
56
+ /**
57
+ * Look one observation up by id.
58
+ *
59
+ * @param id - the observation id an action cites.
60
+ * @returns the record, or undefined when unknown or evicted.
61
+ */
62
+ get(id: string): ObservationRecord | undefined;
63
+ /**
64
+ * Compare a fresh re-observation against the cited record. The verdict is
65
+ * `ok` only when identity (window/pid/exe/title/class/rect), the tree hash,
66
+ * and — when `staleCheckPixels` is on — the pixel hash all still match, and
67
+ * the record is not older than `maxObservationAgeMs`.
68
+ *
69
+ * @param record - the observation the action cites.
70
+ * @param fresh - the re-observation captured immediately before the action.
71
+ * @param now - wall-clock now (injectable for tests).
72
+ * @returns the verdict.
73
+ */
74
+ verify(record: ObservationRecord, fresh: WindowSnapshot, now?: number): FreshnessVerdict;
75
+ }
76
+ //# sourceMappingURL=observe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAE/D,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,qBAAqB,GAAG,SAAS,GAAG,gBAAgB,GAAG,YAAY,GAAG,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7H;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAYhE;AAED,2EAA2E;AAC3E,qBAAa,gBAAgB;IAIf,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;IAE/D,wEAAwE;gBAC3C,MAAM,EAAE,cAAc;IAEnD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,cAAc,GAAG,iBAAiB;IAwBnD;;;;;OAKG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAI9C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,GAAE,MAAmB,GAAG,gBAAgB;CAsCrG"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The Windows backend: every operation spawns the native PowerShell helper
3
+ * (`native/win32/dsh-click-helper.ps1`) through the harness's `ctx.subprocess`
4
+ * seam. The request travels as JSON on stdin; the response is JSON on stdout
5
+ * and is validated field-by-field at this wire boundary. Each call is
6
+ * deadline-bounded (config `helperTimeoutMs`) and aborts with the caller's
7
+ * signal (the subprocess service escalates to tree termination).
8
+ *
9
+ * @module dsh-click/platform/runner
10
+ */
11
+ import type { SubprocessRuntime } from '@deepseek-ai/dsh-subprocess';
12
+ import type { ResolvedConfig } from '../config.ts';
13
+ import { type ActionOutcome, type AppInfo, type ClickRequest, type DesktopBackend, type KeyRequest, type LaunchOutcome, type Screenshot, type ScrollRequest, type Tree, type WindowInfo, type WindowRef, type WindowSnapshot, type TypeRequest } from './types.ts';
14
+ /** The Windows helper backend over `ctx.subprocess`. */
15
+ export declare class HelperBackend implements DesktopBackend {
16
+ private readonly config;
17
+ private readonly subprocess;
18
+ /** Resolved powershell executable path, cached across calls. */
19
+ private powershell;
20
+ readonly available = true;
21
+ /** @param config - resolved limits for timeout and output size. */
22
+ /** @param subprocess - the subprocess service that runs the helper. */
23
+ constructor(config: ResolvedConfig, subprocess: SubprocessRuntime);
24
+ readonly platform = "win32";
25
+ /** Run one helper operation and return its validated result payload. */
26
+ private invoke;
27
+ /** Resolve (and cache) the powershell executable through the subprocess seam. */
28
+ private resolvePowershell;
29
+ listWindows(signal?: AbortSignal): Promise<WindowInfo[]>;
30
+ shot(ref: WindowRef, maxSide: number, signal?: AbortSignal): Promise<Screenshot>;
31
+ tree(ref: WindowRef, maxElements: number, maxDepth: number, includePixels: boolean, signal?: AbortSignal): Promise<Tree>;
32
+ snapshot(windowId: number, signal?: AbortSignal): Promise<WindowSnapshot>;
33
+ click(request: ClickRequest, focusFallback: boolean, signal?: AbortSignal): Promise<ActionOutcome>;
34
+ type(request: TypeRequest, focusFallback: boolean, signal?: AbortSignal): Promise<ActionOutcome>;
35
+ scroll(request: ScrollRequest, focusFallback: boolean, signal?: AbortSignal): Promise<ActionOutcome>;
36
+ key(request: KeyRequest, focusFallback: boolean, signal?: AbortSignal): Promise<ActionOutcome>;
37
+ apps(signal?: AbortSignal): Promise<AppInfo[]>;
38
+ launch(name: string, args: readonly string[], signal?: AbortSignal): Promise<LaunchOutcome>;
39
+ }
40
+ //# sourceMappingURL=runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/platform/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,cAAc,EAInB,KAAK,UAAU,EACf,KAAK,aAAa,EAGlB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AA6HnB,wDAAwD;AACxD,qBAAa,aAAc,YAAW,cAAc;IAShD,OAAO,CAAC,QAAQ,CAAC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WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAK9F,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAoB9C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;CAYlG"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Backend selection: which {@link DesktopBackend} serves this deployment.
3
+ * Selection never fails at load — an unsupported platform or a missing
4
+ * subprocess service yields an unavailable backend whose every call fails
5
+ * closed with a model-readable reason, so profiles keep booting everywhere
6
+ * and actions refuse loudly instead of silently doing nothing.
7
+ *
8
+ * @module dsh-click/platform/selection
9
+ */
10
+ import type { Context } from '@deepseek-ai/cordis';
11
+ import type { ResolvedConfig } from '../config.ts';
12
+ import { type ActionOutcome, type AppInfo, type DesktopBackend, type LaunchOutcome, type Screenshot, type Tree, type WindowInfo, type WindowSnapshot } from './types.ts';
13
+ /** A backend that cannot act: every operation fails closed with the given reason. */
14
+ export declare class UnavailableBackend implements DesktopBackend {
15
+ readonly platform: string;
16
+ readonly reason: string;
17
+ /** @param platform - the platform id this stub stands in for. */
18
+ /** @param reason - model-readable reason why the backend cannot act. */
19
+ constructor(platform: string, reason: string);
20
+ readonly available = false;
21
+ get unavailableReason(): string;
22
+ /** Throw the shared backend-unavailable failure. */
23
+ private refuse;
24
+ listWindows(): Promise<WindowInfo[]>;
25
+ shot(): Promise<Screenshot>;
26
+ tree(): Promise<Tree>;
27
+ snapshot(): Promise<WindowSnapshot>;
28
+ click(): Promise<ActionOutcome>;
29
+ type(): Promise<ActionOutcome>;
30
+ scroll(): Promise<ActionOutcome>;
31
+ key(): Promise<ActionOutcome>;
32
+ apps(): Promise<AppInfo[]>;
33
+ launch(): Promise<LaunchOutcome>;
34
+ }
35
+ /**
36
+ * Select the backend for this deployment. Windows needs `ctx.subprocess` to
37
+ * run the native helper; every other platform is reserved and fails closed.
38
+ *
39
+ * @param ctx - the mounting context.
40
+ * @param config - resolved plugin config (helper limits).
41
+ * @returns the active backend (possibly unavailable).
42
+ */
43
+ export declare function createBackend(ctx: Context, config: ResolvedConfig): DesktopBackend;
44
+ //# sourceMappingURL=selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/platform/selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,YAAY,CAAA;AAEnB,qFAAqF;AACrF,qBAAa,kBAAmB,YAAW,cAAc;IAG3C,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM;IAF9D,iEAAiE;IACjE,wEAAwE;gBACnD,QAAQ,EAAE,MAAM,EAAW,MAAM,EAAE,MAAM;IAE9D,QAAQ,CAAC,SAAS,SAAQ;IAE1B,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,oDAAoD;IACpD,OAAO,CAAC,MAAM;IAOd,WAAW,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IACpC,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC;IAC3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IACrB,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC;IACnC,KAAK,IAAI,OAAO,CAAC,aAAa,CAAC;IAC/B,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC;IAC9B,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC;IAChC,GAAG,IA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