@code-yeongyu/senpi 2026.9.25 → 2026.9.26

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 (102) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/bundle/chunks/{app-server-command-RB6QUPRI.js → app-server-command-ZRCKWY2X.js} +1 -1
  3. package/dist/bundle/chunks/{chunk-JJ3NJZBD.js → chunk-QGC46CGK.js} +5 -5
  4. package/dist/bundle/chunks/chunk-T3JBT2IK.js +8 -0
  5. package/dist/bundle/chunks/{cli-main-KO53KYDN.js → cli-main-H6JAXAXV.js} +1 -1
  6. package/dist/bundle/chunks/{interactive-mode-ABDNLJSI.js → interactive-mode-HM7UQYRC.js} +1 -1
  7. package/dist/bundle/chunks/{multi-session-host-JV3MNWXZ.js → multi-session-host-7YX2I7UK.js} +1 -1
  8. package/dist/bundle/chunks/{package-manager-cli-ZYYAVCXU.js → package-manager-cli-3ISYTEL2.js} +1 -1
  9. package/dist/bundle/chunks/{rpc-mode-Q2OUJURB.js → rpc-mode-6PY4TN5F.js} +1 -1
  10. package/dist/bundle/chunks/session-worker.js +4 -4
  11. package/dist/bundle/cli.js +1 -1
  12. package/dist/bundle/index.js +1 -1
  13. package/dist/bundle/rpc-entry.js +1 -1
  14. package/dist/core/dynamic-prompt/handoff.js +1 -1
  15. package/dist/core/dynamic-prompt/handoff.js.map +1 -1
  16. package/dist/core/extensions/builtin/todotools/state.d.ts +1 -1
  17. package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
  18. package/dist/core/extensions/builtin/todotools/state.js +1 -1
  19. package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
  20. package/dist/core/extensions/builtin/ttsr/detectors/repetitive-turns.d.ts.map +1 -1
  21. package/dist/core/extensions/builtin/ttsr/detectors/repetitive-turns.js +3 -1
  22. package/dist/core/extensions/builtin/ttsr/detectors/repetitive-turns.js.map +1 -1
  23. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +12 -0
  24. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  25. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  26. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  27. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  28. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  29. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  30. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  31. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  32. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  33. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  34. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  35. package/package.json +7 -22
  36. package/dist/bundle/chunks/chunk-SGYEOIOJ.js +0 -8
  37. package/node_modules/@code-yeongyu/senpi-desktop-engine/README.md +0 -31
  38. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/handshake.d.ts +0 -38
  39. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/handshake.d.ts.map +0 -1
  40. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/handshake.js +0 -117
  41. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/handshake.js.map +0 -1
  42. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/index.d.ts +0 -3
  43. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/index.d.ts.map +0 -1
  44. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/index.js +0 -3
  45. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/index.js.map +0 -1
  46. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/locator.d.ts +0 -42
  47. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/locator.d.ts.map +0 -1
  48. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/locator.js +0 -79
  49. package/node_modules/@code-yeongyu/senpi-desktop-engine/dist/locator.js.map +0 -1
  50. package/node_modules/@code-yeongyu/senpi-desktop-engine/native/check-prebuild-fresh.mjs +0 -160
  51. package/node_modules/@code-yeongyu/senpi-desktop-engine/native/index.d.ts +0 -20
  52. package/node_modules/@code-yeongyu/senpi-desktop-engine/native/index.js +0 -23
  53. package/node_modules/@code-yeongyu/senpi-desktop-engine/native/prebuilds/darwin-arm64/senpi-desktop-engine +0 -0
  54. package/node_modules/@code-yeongyu/senpi-desktop-engine/package.json +0 -53
  55. package/node_modules/@code-yeongyu/senpi-desktop-prelude/README.md +0 -20
  56. package/node_modules/@code-yeongyu/senpi-desktop-prelude/dist/index.d.ts +0 -2
  57. package/node_modules/@code-yeongyu/senpi-desktop-prelude/dist/index.d.ts.map +0 -1
  58. package/node_modules/@code-yeongyu/senpi-desktop-prelude/dist/index.js +0 -2
  59. package/node_modules/@code-yeongyu/senpi-desktop-prelude/dist/index.js.map +0 -1
  60. package/node_modules/@code-yeongyu/senpi-desktop-prelude/package.json +0 -44
  61. package/node_modules/@code-yeongyu/senpi-desktop-protocol/README.md +0 -20
  62. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/audit.d.ts +0 -38
  63. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/audit.d.ts.map +0 -1
  64. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/audit.js +0 -2
  65. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/audit.js.map +0 -1
  66. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/call.d.ts +0 -28
  67. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/call.d.ts.map +0 -1
  68. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/call.js +0 -102
  69. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/call.js.map +0 -1
  70. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/engine-schema.generated.d.ts +0 -14
  71. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/engine-schema.generated.d.ts.map +0 -1
  72. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/engine-schema.generated.js +0 -71
  73. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/engine-schema.generated.js.map +0 -1
  74. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/index.d.ts +0 -7
  75. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/index.d.ts.map +0 -1
  76. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/index.js +0 -4
  77. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/index.js.map +0 -1
  78. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/json-rpc.d.ts +0 -66
  79. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/json-rpc.d.ts.map +0 -1
  80. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/json-rpc.js +0 -8
  81. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/json-rpc.js.map +0 -1
  82. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/session.d.ts +0 -44
  83. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/session.d.ts.map +0 -1
  84. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/session.js +0 -2
  85. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/session.js.map +0 -1
  86. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/wire.d.ts +0 -59
  87. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/wire.d.ts.map +0 -1
  88. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/wire.js +0 -2
  89. package/node_modules/@code-yeongyu/senpi-desktop-protocol/dist/wire.js.map +0 -1
  90. package/node_modules/@code-yeongyu/senpi-desktop-protocol/package.json +0 -45
  91. package/node_modules/@code-yeongyu/senpi-desktop-service/README.md +0 -27
  92. package/node_modules/@code-yeongyu/senpi-desktop-service/dist/index.d.ts +0 -2
  93. package/node_modules/@code-yeongyu/senpi-desktop-service/dist/index.d.ts.map +0 -1
  94. package/node_modules/@code-yeongyu/senpi-desktop-service/dist/index.js +0 -2
  95. package/node_modules/@code-yeongyu/senpi-desktop-service/dist/index.js.map +0 -1
  96. package/node_modules/@code-yeongyu/senpi-desktop-service/package.json +0 -44
  97. package/node_modules/@code-yeongyu/senpi-desktop-tool/README.md +0 -20
  98. package/node_modules/@code-yeongyu/senpi-desktop-tool/dist/index.d.ts +0 -2
  99. package/node_modules/@code-yeongyu/senpi-desktop-tool/dist/index.d.ts.map +0 -1
  100. package/node_modules/@code-yeongyu/senpi-desktop-tool/dist/index.js +0 -2
  101. package/node_modules/@code-yeongyu/senpi-desktop-tool/dist/index.js.map +0 -1
  102. package/node_modules/@code-yeongyu/senpi-desktop-tool/package.json +0 -44
@@ -1,53 +0,0 @@
1
- {
2
- "name": "@code-yeongyu/senpi-desktop-engine",
3
- "private": true,
4
- "version": "2026.9.24-2",
5
- "description": "Locator, ABI handshake, and vendored host prebuild for the senpi-desktop-engine binary",
6
- "type": "module",
7
- "main": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js"
13
- },
14
- "./native": {
15
- "types": "./native/index.d.ts",
16
- "import": "./native/index.js"
17
- },
18
- "./package.json": "./package.json"
19
- },
20
- "files": [
21
- "dist",
22
- "native",
23
- "README.md"
24
- ],
25
- "scripts": {
26
- "clean": "shx rm -rf dist",
27
- "build": "tsgo -p tsconfig.build.json",
28
- "test": "vitest --run test",
29
- "check:prebuild": "node native/check-prebuild-fresh.mjs",
30
- "prepublishOnly": "npm run clean && npm run build"
31
- },
32
- "keywords": [
33
- "senpi",
34
- "desktop",
35
- "computer-use"
36
- ],
37
- "author": "Yeongyu Kim",
38
- "license": "MIT",
39
- "repository": {
40
- "type": "git",
41
- "url": "git+https://github.com/code-yeongyu/senpi.git",
42
- "directory": "packages/desktop-engine"
43
- },
44
- "engines": {
45
- "node": ">=24.0.0"
46
- },
47
- "dependencies": {
48
- "@code-yeongyu/senpi-desktop-protocol": "^2026.9.24-2"
49
- },
50
- "devDependencies": {
51
- "@types/node": "26.6.2"
52
- }
53
- }
@@ -1,20 +0,0 @@
1
- # @code-yeongyu/senpi-desktop-prelude
2
-
3
- Holds the codemode prelude assets (`prelude.js`, `prelude.py`, declarations) and the model documentation for the `computer` tool. The prelude is sugar over the ordinary registered tool call `tool.computer(...)`. This package is a skeleton until todo 23 of the computer-use plan fills it in.
4
-
5
- ## Settings
6
-
7
- None.
8
-
9
- ## Import direction
10
-
11
- `scripts/desktop-package-boundaries.test.mjs` enforces these edges, in both `package.json` and `src/`:
12
-
13
- - `@code-yeongyu/senpi-desktop-protocol` and `@code-yeongyu/senpi-desktop-prelude` import no workspace package.
14
- - `@code-yeongyu/senpi-desktop-engine` may import `-protocol`.
15
- - `@code-yeongyu/senpi-desktop-service` may import `-protocol`, `-engine`, and `-prelude`.
16
- - `@code-yeongyu/senpi-desktop-tool` may import `-protocol`, `-engine`, `-prelude`, and `-service`.
17
- - `@code-yeongyu/senpi` (coding-agent) may import only `-tool` and `-service`. `@code-yeongyu/senpi-codemode` imports none of them.
18
- - No desktop package imports `pi-agent-core`, `pi-ai`, or `pi-tui`. There is no shared utils package: the five desktop packages are the whole set.
19
-
20
- The Rust side runs the other way: `senpi-desktop-core` <- `-safety` <- `-session` <- backends <- `senpi-desktop-engine` (the binary). The TS packages reach it only through the engine's stdio JSON-RPC.
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"","sourcesContent":["// Skeleton entry: the public surface lands with todo 23 of the computer-use plan.\nexport {};\n"]}
@@ -1,44 +0,0 @@
1
- {
2
- "name": "@code-yeongyu/senpi-desktop-prelude",
3
- "private": true,
4
- "version": "2026.9.24-2",
5
- "description": "Codemode prelude assets and model documentation for the senpi computer tool",
6
- "type": "module",
7
- "main": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js"
13
- }
14
- },
15
- "files": [
16
- "dist",
17
- "README.md"
18
- ],
19
- "scripts": {
20
- "clean": "shx rm -rf dist",
21
- "build": "tsgo -p tsconfig.build.json",
22
- "test": "vitest --run test"
23
- },
24
- "keywords": [
25
- "senpi",
26
- "desktop",
27
- "computer-use"
28
- ],
29
- "author": "Yeongyu Kim",
30
- "license": "MIT",
31
- "repository": {
32
- "type": "git",
33
- "url": "git+https://github.com/code-yeongyu/senpi.git",
34
- "directory": "packages/desktop-prelude"
35
- },
36
- "engines": {
37
- "node": ">=24.0.0"
38
- },
39
- "devDependencies": {
40
- "@types/node": "26.6.2",
41
- "shx": "0.4.0",
42
- "vitest": "5.0.1"
43
- }
44
- }
@@ -1,20 +0,0 @@
1
- # @code-yeongyu/senpi-desktop-protocol
2
-
3
- Defines the engine JSON-RPC types, the session snapshot, the error codes, and the computer-call approval tiers. `src/engine-schema.generated.ts` is generated from the engine method table with `bun run generate`. Never edit it by hand.
4
-
5
- ## Settings
6
-
7
- None.
8
-
9
- ## Import direction
10
-
11
- `scripts/desktop-package-boundaries.test.mjs` enforces these edges, in both `package.json` and `src/`:
12
-
13
- - `@code-yeongyu/senpi-desktop-protocol` and `@code-yeongyu/senpi-desktop-prelude` import no workspace package.
14
- - `@code-yeongyu/senpi-desktop-engine` may import `-protocol`.
15
- - `@code-yeongyu/senpi-desktop-service` may import `-protocol`, `-engine`, and `-prelude`.
16
- - `@code-yeongyu/senpi-desktop-tool` may import `-protocol`, `-engine`, `-prelude`, and `-service`.
17
- - `@code-yeongyu/senpi` (coding-agent) may import only `-tool` and `-service`. `@code-yeongyu/senpi-codemode` imports none of them.
18
- - No desktop package imports `pi-agent-core`, `pi-ai`, or `pi-tui`. There is no shared utils package: the five desktop packages are the whole set.
19
-
20
- The Rust side runs the other way: `senpi-desktop-core` <- `-safety` <- `-session` <- backends <- `senpi-desktop-engine` (the binary). The TS packages reach it only through the engine's stdio JSON-RPC.
@@ -1,38 +0,0 @@
1
- import type { EngineMethod, ErrorCode } from "./engine-schema.generated.ts";
2
- /** Outcome of one audited desktop action. */
3
- export type AuditStatus = "success" | "error" | "suspended";
4
- /** The first failure of an audited action, as reported to the model. */
5
- export interface AuditPrimaryError {
6
- readonly code: ErrorCode;
7
- readonly message: string;
8
- }
9
- /**
10
- * One persisted audit line: the engine `AuditEvent` plus run context. FROZEN field set;
11
- * the engine audit writer (todo 22) persists exactly these fields.
12
- */
13
- export interface AuditRecord {
14
- /** ISO-8601 UTC timestamp. */
15
- readonly timestamp: string;
16
- readonly sessionId: string;
17
- readonly runId: string;
18
- readonly action: EngineMethod;
19
- readonly target: string;
20
- /** `background` or `foreground`. */
21
- readonly delivery: string;
22
- readonly frameId: string | null;
23
- /** `null` when the action succeeded. */
24
- readonly code: ErrorCode | null;
25
- readonly status: AuditStatus;
26
- readonly primaryError?: AuditPrimaryError;
27
- readonly durationMs: number;
28
- readonly focusRestored?: boolean;
29
- readonly screenshotPath?: string;
30
- readonly screenshotWidth?: number;
31
- readonly screenshotHeight?: number;
32
- readonly textLength?: number;
33
- /** First 16 hex digits of the typed text's SHA-256; the text itself is never audited. */
34
- readonly textSha256?: string;
35
- readonly keys?: readonly string[];
36
- readonly message?: string;
37
- }
38
- //# sourceMappingURL=audit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE5E,6CAA6C;A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B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=audit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit.js","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"","sourcesContent":["import type { EngineMethod, ErrorCode } from \"./engine-schema.generated.ts\";\n\n/** Outcome of one audited desktop action. */\nexport type AuditStatus = \"success\" | \"error\" | \"suspended\";\n\n/** The first failure of an audited action, as reported to the model. */\nexport interface AuditPrimaryError {\n\treadonly code: ErrorCode;\n\treadonly message: string;\n}\n\n/**\n * One persisted audit line: the engine `AuditEvent` plus run context. FROZEN field set;\n * the engine audit writer (todo 22) persists exactly these fields.\n */\nexport interface AuditRecord {\n\t/** ISO-8601 UTC timestamp. */\n\treadonly timestamp: string;\n\treadonly sessionId: string;\n\treadonly runId: string;\n\treadonly action: EngineMethod;\n\treadonly target: string;\n\t/** `background` or `foreground`. */\n\treadonly delivery: string;\n\treadonly frameId: string | null;\n\t/** `null` when the action succeeded. */\n\treadonly code: ErrorCode | null;\n\treadonly status: AuditStatus;\n\treadonly primaryError?: AuditPrimaryError;\n\treadonly durationMs: number;\n\treadonly focusRestored?: boolean;\n\treadonly screenshotPath?: string;\n\treadonly screenshotWidth?: number;\n\treadonly screenshotHeight?: number;\n\treadonly textLength?: number;\n\t/** First 16 hex digits of the typed text's SHA-256; the text itself is never audited. */\n\treadonly textSha256?: string;\n\treadonly keys?: readonly string[];\n\treadonly message?: string;\n}\n"]}
@@ -1,28 +0,0 @@
1
- /** One allowlisted method invocation in a direct computer call chain. */
2
- export interface ComputerCallStep {
3
- readonly method: string;
4
- readonly args?: readonly unknown[];
5
- }
6
- /** Approval tier a direct computer helper needs: inspection reads, input and mutation execute. */
7
- export type ComputerCallPolicy = "read" | "exec";
8
- type MethodPolicies = Readonly<Record<string, ComputerCallPolicy>>;
9
- /** Helpers callable on the `desktop` root; `window` and `ref` also anchor one-hop handle chains. */
10
- export declare const DESKTOP_METHODS: MethodPolicies;
11
- /** Helpers callable on a window handle resolved through `desktop.window(id)`. */
12
- export declare const WINDOW_METHODS: MethodPolicies;
13
- /** Helpers callable on an AX element handle resolved through `desktop.ref(ref)`. */
14
- export declare const ELEMENT_METHODS: MethodPolicies;
15
- /** Why a call chain was refused before classification. */
16
- export type ComputerCallErrorReason = "empty" | "tooLong" | "unknownMethod" | "notChainable";
17
- /** A call chain that is not an allowlisted one-hop desktop call. */
18
- export declare class ComputerCallError extends Error {
19
- readonly reason: ComputerCallErrorReason;
20
- constructor(reason: ComputerCallErrorReason, message: string);
21
- }
22
- /**
23
- * Whether every step of a direct computer call is inspection-only, so the call needs read approval.
24
- * Throws `ComputerCallError` for an empty, over-long, unknown, or unchainable chain.
25
- */
26
- export declare function isReadOnlyComputerCall(chain: readonly ComputerCallStep[]): boolean;
27
- export {};
28
- //# sourceMappingURL=call.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../src/call.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACnC;AAED,kGAAkG;AAClG,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,KAAK,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAEnE,oGAAoG;AACpG,eAAO,MAAM,eAAe,EAAE,cAmB7B,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,cAAc,EAAE,cAa5B,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,eAAe,EAAE,cAY7B,CAAC;AAQF,0DAA0D;AAC1D,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;AAE7F,oEAAoE;AACpE,qBAAa,iBAAkB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IAEzC,YAAY,MAAM,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,EAI3D;CACD;AAgDD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAElF"}
@@ -1,102 +0,0 @@
1
- /** Helpers callable on the `desktop` root; `window` and `ref` also anchor one-hop handle chains. */
2
- export const DESKTOP_METHODS = {
3
- capabilities: "read",
4
- displays: "read",
5
- windows: "read",
6
- window: "read",
7
- focusedWindow: "read",
8
- screenshot: "read",
9
- click: "exec",
10
- doubleClick: "exec",
11
- move: "exec",
12
- drag: "exec",
13
- scroll: "exec",
14
- type: "exec",
15
- press: "exec",
16
- elementAt: "read",
17
- focusedElement: "read",
18
- ref: "read",
19
- "clipboard.read": "read",
20
- "clipboard.write": "exec",
21
- };
22
- /** Helpers callable on a window handle resolved through `desktop.window(id)`. */
23
- export const WINDOW_METHODS = {
24
- screenshot: "read",
25
- click: "exec",
26
- doubleClick: "exec",
27
- move: "exec",
28
- drag: "exec",
29
- scroll: "exec",
30
- type: "exec",
31
- press: "exec",
32
- raise: "exec",
33
- ax: "read",
34
- find: "read",
35
- ref: "read",
36
- };
37
- /** Helpers callable on an AX element handle resolved through `desktop.ref(ref)`. */
38
- export const ELEMENT_METHODS = {
39
- value: "read",
40
- setValue: "exec",
41
- bounds: "read",
42
- attributes: "read",
43
- actions: "read",
44
- perform: "exec",
45
- press: "exec",
46
- click: "exec",
47
- focus: "exec",
48
- parent: "read",
49
- children: "read",
50
- };
51
- /** Root methods whose result accepts one chained handle call, mapped to the handle's method table. */
52
- const HANDLE_ROOTS = {
53
- window: { label: "window", methods: WINDOW_METHODS },
54
- ref: { label: "element", methods: ELEMENT_METHODS },
55
- };
56
- /** A call chain that is not an allowlisted one-hop desktop call. */
57
- export class ComputerCallError extends Error {
58
- constructor(reason, message) {
59
- super(message);
60
- this.name = "ComputerCallError";
61
- this.reason = reason;
62
- }
63
- }
64
- function policyOf(methods, method) {
65
- return Object.hasOwn(methods, method) ? methods[method] : undefined;
66
- }
67
- function describe(methods) {
68
- return Object.keys(methods).join(", ");
69
- }
70
- function classifyComputerCall(chain) {
71
- const [root, step, ...rest] = chain;
72
- if (root === undefined) {
73
- throw new ComputerCallError("empty", "Action 'call' requires a non-empty 'chain'.");
74
- }
75
- if (rest.length > 0) {
76
- throw new ComputerCallError("tooLong", "Call chains support one handle hop at most; use computer.run(fn) for longer sequences.");
77
- }
78
- const rootPolicy = policyOf(DESKTOP_METHODS, root.method);
79
- if (rootPolicy === undefined) {
80
- throw new ComputerCallError("unknownMethod", `Unknown desktop method "${root.method}". Desktop helpers support: ${describe(DESKTOP_METHODS)}.`);
81
- }
82
- if (step === undefined) {
83
- return rootPolicy;
84
- }
85
- const handle = Object.hasOwn(HANDLE_ROOTS, root.method) ? HANDLE_ROOTS[root.method] : undefined;
86
- if (handle === undefined) {
87
- throw new ComputerCallError("notChainable", `Only desktop.window(id)/desktop.ref(ref) results accept a chained call; got desktop.${root.method}().`);
88
- }
89
- const stepPolicy = policyOf(handle.methods, step.method);
90
- if (stepPolicy === undefined) {
91
- throw new ComputerCallError("unknownMethod", `Unknown ${handle.label} method "${step.method}". Supported ${handle.label} methods: ${describe(handle.methods)}.`);
92
- }
93
- return stepPolicy;
94
- }
95
- /**
96
- * Whether every step of a direct computer call is inspection-only, so the call needs read approval.
97
- * Throws `ComputerCallError` for an empty, over-long, unknown, or unchainable chain.
98
- */
99
- export function isReadOnlyComputerCall(chain) {
100
- return classifyComputerCall(chain) === "read";
101
- }
102
- //# sourceMappingURL=call.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"call.js","sourceRoot":"","sources":["../src/call.ts"],"names":[],"mappings":"AAWA,oGAAoG;AACpG,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC9C,YAAY,EAAE,MAAM;IACpB,QAAQ,EAAE,MAAM;IAChB,O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,UAAU,CAAC;IACnB,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAChG,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,iBAAiB,CAC1B,cAAc,EACd,uFAAuF,IAAI,CAAC,MAAM,KAAK,CACvG,CAAC;IACH,CAAC;IACD,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,iBAAiB,CAC1B,eAAe,EACf,WAAW,MAAM,CAAC,KAAK,YAAY,IAAI,CAAC,MAAM,gBAAgB,MAAM,CAAC,KAAK,aAAa,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAClH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAkC;IACxE,OAAO,oBAAoB,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC;AAC/C,CAAC","sourcesContent":["/** One allowlisted method invocation in a direct computer call chain. */\nexport interface ComputerCallStep {\n\treadonly method: string;\n\treadonly args?: readonly unknown[];\n}\n\n/** Approval tier a direct computer helper needs: inspection reads, input and mutation execute. */\nexport type ComputerCallPolicy = \"read\" | \"exec\";\n\ntype MethodPolicies = Readonly<Record<string, ComputerCallPolicy>>;\n\n/** Helpers callable on the `desktop` root; `window` and `ref` also anchor one-hop handle chains. */\nexport const DESKTOP_METHODS: MethodPolicies = {\n\tcapabilities: \"read\",\n\tdisplays: \"read\",\n\twindows: \"read\",\n\twindow: \"read\",\n\tfocusedWindow: \"read\",\n\tscreenshot: \"read\",\n\tclick: \"exec\",\n\tdoubleClick: \"exec\",\n\tmove: \"exec\",\n\tdrag: \"exec\",\n\tscroll: \"exec\",\n\ttype: \"exec\",\n\tpress: \"exec\",\n\telementAt: \"read\",\n\tfocusedElement: \"read\",\n\tref: \"read\",\n\t\"clipboard.read\": \"read\",\n\t\"clipboard.write\": \"exec\",\n};\n\n/** Helpers callable on a window handle resolved through `desktop.window(id)`. */\nexport const WINDOW_METHODS: MethodPolicies = {\n\tscreenshot: \"read\",\n\tclick: \"exec\",\n\tdoubleClick: \"exec\",\n\tmove: \"exec\",\n\tdrag: \"exec\",\n\tscroll: \"exec\",\n\ttype: \"exec\",\n\tpress: \"exec\",\n\traise: \"exec\",\n\tax: \"read\",\n\tfind: \"read\",\n\tref: \"read\",\n};\n\n/** Helpers callable on an AX element handle resolved through `desktop.ref(ref)`. */\nexport const ELEMENT_METHODS: MethodPolicies = {\n\tvalue: \"read\",\n\tsetValue: \"exec\",\n\tbounds: \"read\",\n\tattributes: \"read\",\n\tactions: \"read\",\n\tperform: \"exec\",\n\tpress: \"exec\",\n\tclick: \"exec\",\n\tfocus: \"exec\",\n\tparent: \"read\",\n\tchildren: \"read\",\n};\n\n/** Root methods whose result accepts one chained handle call, mapped to the handle's method table. */\nconst HANDLE_ROOTS: Readonly<Record<string, { readonly label: string; readonly methods: MethodPolicies }>> = {\n\twindow: { label: \"window\", methods: WINDOW_METHODS },\n\tref: { label: \"element\", methods: ELEMENT_METHODS },\n};\n\n/** Why a call chain was refused before classification. */\nexport type ComputerCallErrorReason = \"empty\" | \"tooLong\" | \"unknownMethod\" | \"notChainable\";\n\n/** A call chain that is not an allowlisted one-hop desktop call. */\nexport class ComputerCallError extends Error {\n\treadonly reason: ComputerCallErrorReason;\n\n\tconstructor(reason: ComputerCallErrorReason, message: string) {\n\t\tsuper(message);\n\t\tthis.name = \"ComputerCallError\";\n\t\tthis.reason = reason;\n\t}\n}\n\nfunction policyOf(methods: MethodPolicies, method: string): ComputerCallPolicy | undefined {\n\treturn Object.hasOwn(methods, method) ? methods[method] : undefined;\n}\n\nfunction describe(methods: MethodPolicies): string {\n\treturn Object.keys(methods).join(\", \");\n}\n\nfunction classifyComputerCall(chain: readonly ComputerCallStep[]): ComputerCallPolicy {\n\tconst [root, step, ...rest] = chain;\n\tif (root === undefined) {\n\t\tthrow new ComputerCallError(\"empty\", \"Action 'call' requires a non-empty 'chain'.\");\n\t}\n\tif (rest.length > 0) {\n\t\tthrow new ComputerCallError(\n\t\t\t\"tooLong\",\n\t\t\t\"Call chains support one handle hop at most; use computer.run(fn) for longer sequences.\",\n\t\t);\n\t}\n\tconst rootPolicy = policyOf(DESKTOP_METHODS, root.method);\n\tif (rootPolicy === undefined) {\n\t\tthrow new ComputerCallError(\n\t\t\t\"unknownMethod\",\n\t\t\t`Unknown desktop method \"${root.method}\". Desktop helpers support: ${describe(DESKTOP_METHODS)}.`,\n\t\t);\n\t}\n\tif (step === undefined) {\n\t\treturn rootPolicy;\n\t}\n\tconst handle = Object.hasOwn(HANDLE_ROOTS, root.method) ? HANDLE_ROOTS[root.method] : undefined;\n\tif (handle === undefined) {\n\t\tthrow new ComputerCallError(\n\t\t\t\"notChainable\",\n\t\t\t`Only desktop.window(id)/desktop.ref(ref) results accept a chained call; got desktop.${root.method}().`,\n\t\t);\n\t}\n\tconst stepPolicy = policyOf(handle.methods, step.method);\n\tif (stepPolicy === undefined) {\n\t\tthrow new ComputerCallError(\n\t\t\t\"unknownMethod\",\n\t\t\t`Unknown ${handle.label} method \"${step.method}\". Supported ${handle.label} methods: ${describe(handle.methods)}.`,\n\t\t);\n\t}\n\treturn stepPolicy;\n}\n\n/**\n * Whether every step of a direct computer call is inspection-only, so the call needs read approval.\n * Throws `ComputerCallError` for an empty, over-long, unknown, or unchainable chain.\n */\nexport function isReadOnlyComputerCall(chain: readonly ComputerCallStep[]): boolean {\n\treturn classifyComputerCall(chain) === \"read\";\n}\n"]}
@@ -1,14 +0,0 @@
1
- /** Engine protocol version the host must see in `engine.hello`. */
2
- export declare const PROTOCOL_VERSION: "1";
3
- /** Engine ABI sentinel the host must see in `engine.hello`. */
4
- export declare const ENGINE_ABI: "senpi-desktop/1";
5
- /** Every engine JSON-RPC method, by wire name, in schema order. */
6
- export declare const ENGINE_METHODS: readonly ["engine.hello", "session.open", "session.close", "capabilities", "displays", "windows", "capture", "click", "moveMouse", "drag", "scroll", "typeText", "keyChord", "raiseWindow", "clipboard.read", "clipboard.write", "ax.snapshot", "ax.query", "ax.elementAt", "ax.focused", "ax.node", "ax.attributes", "ax.children", "ax.parent", "ax.perform", "ax.setValue", "ax.focus", "ax.click", "stopPath.start", "stopPath.status", "stopPath.heartbeat", "stopPath.stop", "stopPath.resume", "$/cancel", "$/test.advanceClock"];
7
- /** Every server-to-client notification, by wire name. */
8
- export declare const ENGINE_NOTIFICATIONS: readonly ["audit", "stopPath.changed", "engine.log"];
9
- /** The frozen desktop error vocabulary mirrored from core `ErrorCode`. */
10
- export declare const ERROR_CODES: readonly ["PermissionDenied", "CaptureFailed", "InputFailed", "BackgroundUnavailable", "WindowNotFound", "InvalidTarget", "InvalidKey", "InvalidCoordinateFrame", "StaleRef", "AxUnsupported", "AxFailed", "Timeout", "Closed", "Internal", "StopPathUnavailable", "Suspended", "ScreenLocked", "Cancelled", "CursorRestoreFailed", "FocusRestoreFailed", "TransactionFailed"];
11
- export type EngineMethod = (typeof ENGINE_METHODS)[number];
12
- export type EngineNotification = (typeof ENGINE_NOTIFICATIONS)[number];
13
- export type ErrorCode = (typeof ERROR_CODES)[number];
14
- //# sourceMappingURL=engine-schema.generated.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine-schema.generated.d.ts","sourceRoot":"","sources":["../src/engine-schema.generated.ts"],"names":[],"mappings":"AAGA,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,EAAG,GAAY,CAAC;AAE7C,+DAA+D;AAC/D,eAAO,MAAM,UAAU,EAAG,iBAA0B,CAAC;AAErD,mEAAmE;AACnE,eAAO,MAAM,cAAc,YAC1B,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,UAAU,EACV,SAAS,EACT,SAAS,EACT,OAAO,EACP,WAAW,EACX,MAAM,EACN,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,qBAAqB,CACZ,CAAC;AAEX,yDAAyD;AACzD,eAAO,MAAM,oBAAoB,YAAI,OAAO,EAAE,kBAAkB,EAAE,YAAY,CAAU,CAAC;AAEzF,0EAA0E;AAC1E,eAAO,MAAM,WAAW,YACvB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,UAAU,EACV,eAAe,EACf,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,WAAW,EACX,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,CACV,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,71 +0,0 @@
1
- // GENERATED by scripts/generate-engine-schema.ts from crates/senpi-desktop-core/schema/engine.schema.json.
2
- // Do not edit by hand; run `bun run --cwd packages/desktop-protocol generate`.
3
- /** Engine protocol version the host must see in `engine.hello`. */
4
- export const PROTOCOL_VERSION = "1";
5
- /** Engine ABI sentinel the host must see in `engine.hello`. */
6
- export const ENGINE_ABI = "senpi-desktop/1";
7
- /** Every engine JSON-RPC method, by wire name, in schema order. */
8
- export const ENGINE_METHODS = [
9
- "engine.hello",
10
- "session.open",
11
- "session.close",
12
- "capabilities",
13
- "displays",
14
- "windows",
15
- "capture",
16
- "click",
17
- "moveMouse",
18
- "drag",
19
- "scroll",
20
- "typeText",
21
- "keyChord",
22
- "raiseWindow",
23
- "clipboard.read",
24
- "clipboard.write",
25
- "ax.snapshot",
26
- "ax.query",
27
- "ax.elementAt",
28
- "ax.focused",
29
- "ax.node",
30
- "ax.attributes",
31
- "ax.children",
32
- "ax.parent",
33
- "ax.perform",
34
- "ax.setValue",
35
- "ax.focus",
36
- "ax.click",
37
- "stopPath.start",
38
- "stopPath.status",
39
- "stopPath.heartbeat",
40
- "stopPath.stop",
41
- "stopPath.resume",
42
- "$/cancel",
43
- "$/test.advanceClock",
44
- ];
45
- /** Every server-to-client notification, by wire name. */
46
- export const ENGINE_NOTIFICATIONS = ["audit", "stopPath.changed", "engine.log"];
47
- /** The frozen desktop error vocabulary mirrored from core `ErrorCode`. */
48
- export const ERROR_CODES = [
49
- "PermissionDenied",
50
- "CaptureFailed",
51
- "InputFailed",
52
- "BackgroundUnavailable",
53
- "WindowNotFound",
54
- "InvalidTarget",
55
- "InvalidKey",
56
- "InvalidCoordinateFrame",
57
- "StaleRef",
58
- "AxUnsupported",
59
- "AxFailed",
60
- "Timeout",
61
- "Closed",
62
- "Internal",
63
- "StopPathUnavailable",
64
- "Suspended",
65
- "ScreenLocked",
66
- "Cancelled",
67
- "CursorRestoreFailed",
68
- "FocusRestoreFailed",
69
- "TransactionFailed",
70
- ];
71
- //# sourceMappingURL=engine-schema.generated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine-schema.generated.js","sourceRoot":"","sources":["../src/engine-schema.generated.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,+EAA+E;AAE/E,mEAAmE;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAY,CAAC;AAE7C,+DAA+D;AAC/D,MAAM,CAAC,MAAM,UAAU,GAAG,iBAA0B,CAAC;AAErD,mEAAmE;AACnE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,cAAc;IACd,cAAc;IACd,eAAe;IACf,cAAc;IACd,UAAU;IACV,SAAS;IACT,SAAS;IACT,OAAO;IACP,WAAW;IACX,MAAM;IACN,QAAQ;IACR,UAAU;IACV,UAAU;IACV,aAAa;IACb,gBAAgB;IAChB,iBAAiB;IACjB,aAAa;IACb,UAAU;IACV,cAAc;IACd,YAAY;IACZ,SAAS;IACT,eAAe;IACf,aAAa;IACb,WAAW;IACX,YAAY;IACZ,aAAa;IACb,UAAU;IACV,UAAU;IACV,gBAAgB;IAChB,iBAAiB;IACjB,oBAAoB;IACpB,eAAe;IACf,iBAAiB;IACjB,UAAU;IACV,qBAAqB;CACZ,CAAC;AAEX,yDAAyD;AACzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,kBAAkB,EAAE,YAAY,CAAU,CAAC;AAEzF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,kBAAkB;IAClB,eAAe;IACf,aAAa;IACb,uBAAuB;IACvB,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,wBAAwB;IACxB,UAAU;IACV,eAAe;IACf,UAAU;IACV,SAAS;IACT,QAAQ;IACR,UAAU;IACV,qBAAqB;IACrB,WAAW;IACX,cAAc;IACd,WAAW;IACX,qBAAqB;IACrB,oBAAoB;IACpB,mBAAmB;CACV,CAAC","sourcesContent":["// GENERATED by scripts/generate-engine-schema.ts from crates/senpi-desktop-core/schema/engine.schema.json.\n// Do not edit by hand; run `bun run --cwd packages/desktop-protocol generate`.\n\n/** Engine protocol version the host must see in `engine.hello`. */\nexport const PROTOCOL_VERSION = \"1\" as const;\n\n/** Engine ABI sentinel the host must see in `engine.hello`. */\nexport const ENGINE_ABI = \"senpi-desktop/1\" as const;\n\n/** Every engine JSON-RPC method, by wire name, in schema order. */\nexport const ENGINE_METHODS = [\n\t\"engine.hello\",\n\t\"session.open\",\n\t\"session.close\",\n\t\"capabilities\",\n\t\"displays\",\n\t\"windows\",\n\t\"capture\",\n\t\"click\",\n\t\"moveMouse\",\n\t\"drag\",\n\t\"scroll\",\n\t\"typeText\",\n\t\"keyChord\",\n\t\"raiseWindow\",\n\t\"clipboard.read\",\n\t\"clipboard.write\",\n\t\"ax.snapshot\",\n\t\"ax.query\",\n\t\"ax.elementAt\",\n\t\"ax.focused\",\n\t\"ax.node\",\n\t\"ax.attributes\",\n\t\"ax.children\",\n\t\"ax.parent\",\n\t\"ax.perform\",\n\t\"ax.setValue\",\n\t\"ax.focus\",\n\t\"ax.click\",\n\t\"stopPath.start\",\n\t\"stopPath.status\",\n\t\"stopPath.heartbeat\",\n\t\"stopPath.stop\",\n\t\"stopPath.resume\",\n\t\"$/cancel\",\n\t\"$/test.advanceClock\",\n] as const;\n\n/** Every server-to-client notification, by wire name. */\nexport const ENGINE_NOTIFICATIONS = [\"audit\", \"stopPath.changed\", \"engine.log\"] as const;\n\n/** The frozen desktop error vocabulary mirrored from core `ErrorCode`. */\nexport const ERROR_CODES = [\n\t\"PermissionDenied\",\n\t\"CaptureFailed\",\n\t\"InputFailed\",\n\t\"BackgroundUnavailable\",\n\t\"WindowNotFound\",\n\t\"InvalidTarget\",\n\t\"InvalidKey\",\n\t\"InvalidCoordinateFrame\",\n\t\"StaleRef\",\n\t\"AxUnsupported\",\n\t\"AxFailed\",\n\t\"Timeout\",\n\t\"Closed\",\n\t\"Internal\",\n\t\"StopPathUnavailable\",\n\t\"Suspended\",\n\t\"ScreenLocked\",\n\t\"Cancelled\",\n\t\"CursorRestoreFailed\",\n\t\"FocusRestoreFailed\",\n\t\"TransactionFailed\",\n] as const;\n\nexport type EngineMethod = (typeof ENGINE_METHODS)[number];\nexport type EngineNotification = (typeof ENGINE_NOTIFICATIONS)[number];\nexport type ErrorCode = (typeof ERROR_CODES)[number];\n"]}
@@ -1,7 +0,0 @@
1
- export type { AuditPrimaryError, AuditRecord, AuditStatus } from "./audit.ts";
2
- export { ComputerCallError, type ComputerCallErrorReason, type ComputerCallPolicy, type ComputerCallStep, DESKTOP_METHODS, ELEMENT_METHODS, isReadOnlyComputerCall, WINDOW_METHODS, } from "./call.ts";
3
- export { ENGINE_ABI, ENGINE_METHODS, ENGINE_NOTIFICATIONS, type EngineMethod, type EngineNotification, ERROR_CODES, type ErrorCode, PROTOCOL_VERSION, } from "./engine-schema.generated.ts";
4
- export { type EngineErrorData, type EngineNotificationParams, type JsonRpcError, type JsonRpcErrorData, type JsonRpcFailure, type JsonRpcNotification, type JsonRpcRequest, type JsonRpcResponse, type JsonRpcSuccess, type JsonRpcVersion, type MethodRejection, type MethodRejectionData, type RequestId, STANDARD_RPC_ERRORS, } from "./json-rpc.ts";
5
- export type { ComputerDisplay, ComputerImageDisplay, ComputerRunOk, ComputerScreenshot, ComputerSessionSnapshot, ComputerTextDisplay, } from "./session.ts";
6
- export type { AuditEvent, DesktopCapabilities, EngineLog, LogLevel, StopPathKind, StopPathStatus } from "./wire.ts";
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EACN,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,SAAS,EACd,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,mBAAmB,GACnB,MAAM,eAAe,CAAC;AACvB,YAAY,EACX,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
@@ -1,4 +0,0 @@
1
- export { ComputerCallError, DESKTOP_METHODS, ELEMENT_METHODS, isReadOnlyComputerCall, WINDOW_METHODS, } from "./call.js";
2
- export { ENGINE_ABI, ENGINE_METHODS, ENGINE_NOTIFICATIONS, ERROR_CODES, PROTOCOL_VERSION, } from "./engine-schema.generated.js";
3
- export { STANDARD_RPC_ERRORS, } from "./json-rpc.js";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,iBAAiB,EAIjB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,UAAU,EACV,cAAc,EACd,oBAAoB,EAGpB,WAAW,EAEX,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAcN,mBAAmB,GACnB,MAAM,eAAe,CAAC","sourcesContent":["export type { AuditPrimaryError, AuditRecord, AuditStatus } from \"./audit.ts\";\nexport {\n\tComputerCallError,\n\ttype ComputerCallErrorReason,\n\ttype ComputerCallPolicy,\n\ttype ComputerCallStep,\n\tDESKTOP_METHODS,\n\tELEMENT_METHODS,\n\tisReadOnlyComputerCall,\n\tWINDOW_METHODS,\n} from \"./call.ts\";\nexport {\n\tENGINE_ABI,\n\tENGINE_METHODS,\n\tENGINE_NOTIFICATIONS,\n\ttype EngineMethod,\n\ttype EngineNotification,\n\tERROR_CODES,\n\ttype ErrorCode,\n\tPROTOCOL_VERSION,\n} from \"./engine-schema.generated.ts\";\nexport {\n\ttype EngineErrorData,\n\ttype EngineNotificationParams,\n\ttype JsonRpcError,\n\ttype JsonRpcErrorData,\n\ttype JsonRpcFailure,\n\ttype JsonRpcNotification,\n\ttype JsonRpcRequest,\n\ttype JsonRpcResponse,\n\ttype JsonRpcSuccess,\n\ttype JsonRpcVersion,\n\ttype MethodRejection,\n\ttype MethodRejectionData,\n\ttype RequestId,\n\tSTANDARD_RPC_ERRORS,\n} from \"./json-rpc.ts\";\nexport type {\n\tComputerDisplay,\n\tComputerImageDisplay,\n\tComputerRunOk,\n\tComputerScreenshot,\n\tComputerSessionSnapshot,\n\tComputerTextDisplay,\n} from \"./session.ts\";\nexport type { AuditEvent, DesktopCapabilities, EngineLog, LogLevel, StopPathKind, StopPathStatus } from \"./wire.ts\";\n"]}
@@ -1,66 +0,0 @@
1
- import type { EngineMethod, EngineNotification, ErrorCode } from "./engine-schema.generated.ts";
2
- import type { AuditEvent, EngineLog, StopPathStatus } from "./wire.ts";
3
- /** A JSON-RPC request id: a number or a string, echoed verbatim by the engine. */
4
- export type RequestId = number | string;
5
- /** The `jsonrpc` member, always `"2.0"`. */
6
- export type JsonRpcVersion = "2.0";
7
- /** A client request; `id` is absent only for client notifications such as `$/cancel`. */
8
- export interface JsonRpcRequest<P = unknown> {
9
- readonly jsonrpc: JsonRpcVersion;
10
- readonly id?: RequestId;
11
- readonly method: EngineMethod;
12
- readonly params?: P;
13
- }
14
- /** Why the engine answered a request with `-32601`. */
15
- export type MethodRejection = "unknown" | "hostOnly" | "testOnly";
16
- /** Error data carried by every `ErrorCode` failure. */
17
- export interface EngineErrorData {
18
- readonly code: ErrorCode;
19
- /** Recovery hint for the model, e.g. `capture it again`. */
20
- readonly hint?: string | null;
21
- }
22
- /** Error data carried by every `-32601` rejection. */
23
- export interface MethodRejectionData {
24
- readonly reason: MethodRejection;
25
- }
26
- export type JsonRpcErrorData = EngineErrorData | MethodRejectionData;
27
- export interface JsonRpcError {
28
- readonly code: number;
29
- readonly message: string;
30
- readonly data?: JsonRpcErrorData | null;
31
- }
32
- export interface JsonRpcSuccess<R = unknown> {
33
- readonly jsonrpc: JsonRpcVersion;
34
- readonly id: RequestId;
35
- readonly result: R;
36
- }
37
- /** `id` is `null` only when the engine could not read the request id (parse error). */
38
- export interface JsonRpcFailure {
39
- readonly jsonrpc: JsonRpcVersion;
40
- readonly id: RequestId | null;
41
- readonly error: JsonRpcError;
42
- }
43
- /** A reply to one request. */
44
- export type JsonRpcResponse<R = unknown> = JsonRpcSuccess<R> | JsonRpcFailure;
45
- /** Payload of each server-to-client notification; a schema notification without an entry fails to compile. */
46
- export type EngineNotificationParams = {
47
- readonly audit: AuditEvent;
48
- readonly "stopPath.changed": StopPathStatus;
49
- readonly "engine.log": EngineLog;
50
- };
51
- /** A server-to-client notification, discriminated by `method`. */
52
- export type JsonRpcNotification = {
53
- readonly [N in EngineNotification]: {
54
- readonly jsonrpc: JsonRpcVersion;
55
- readonly method: N;
56
- readonly params: EngineNotificationParams[N];
57
- };
58
- }[EngineNotification];
59
- /** JSON-RPC 2.0 standard error codes the engine emits. */
60
- export declare const STANDARD_RPC_ERRORS: {
61
- readonly parseError: -32700;
62
- readonly invalidRequest: -32600;
63
- readonly methodNotFound: -32601;
64
- readonly invalidParams: -32602;
65
- };
66
- //# sourceMappingURL=json-rpc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json-rpc.d.ts","sourceRoot":"","sources":["../src/json-rpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,Y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ACvB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;CACnB;AAED,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC7B;AAED,8BAA8B;AAC9B,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC;AAE9E,8GAA8G;AAC9G,MAAM,MAAM,wBAAwB,GAAG;IACtC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,EAAE,cAAc,CAAC;IAC5C,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;CACjC,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,CAAC,IAAI,kBAAkB,GAAG;QACnC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;QACjC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACnB,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;KAC7C;CACD,CAAC,kBAAkB,CAAC,CAAC;AAEtB,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB;aAC/B,UAAU,EAAE,CAAC,KAAK;aAClB,cAAc,EAAE,CAAC,KAAK;aACtB,cAAc,EAAE,CAAC,KAAK;aACtB,aAAa,EAAE,CAAC,KAAK;CACZ,CAAC"}
@@ -1,8 +0,0 @@
1
- /** JSON-RPC 2.0 standard error codes the engine emits. */
2
- export const STANDARD_RPC_ERRORS = {
3
- parseError: -32700,
4
- invalidRequest: -32600,
5
- methodNotFound: -32601,
6
- invalidParams: -32602,
7
- };
8
- //# sourceMappingURL=json-rpc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json-rpc.js","sourceRoot":"","sources":["../src/json-rpc.ts"],"names":[],"mappings":"AAwEA,0DAA0D;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,UAAU,EAAE,CAAC,KAAK;IAClB,cAAc,EAAE,CAAC,KAAK;IACtB,cAAc,EAAE,CAAC,KAAK;IACtB,aAAa,EAAE,CAAC,KAAK;CACZ,CAAC","sourcesContent":["import type { EngineMethod, EngineNotification, ErrorCode } from \"./engine-schema.generated.ts\";\nimport type { AuditEvent, EngineLog, StopPathStatus } from \"./wire.ts\";\n\n/** A JSON-RPC request id: a number or a string, echoed verbatim by the engine. */\nexport type RequestId = number | string;\n\n/** The `jsonrpc` member, always `\"2.0\"`. */\nexport type JsonRpcVersion = \"2.0\";\n\n/** A client request; `id` is absent only for client notifications such as `$/cancel`. */\nexport interface JsonRpcRequest<P = unknown> {\n\treadonly jsonrpc: JsonRpcVersion;\n\treadonly id?: RequestId;\n\treadonly method: EngineMethod;\n\treadonly params?: P;\n}\n\n/** Why the engine answered a request with `-32601`. */\nexport type MethodRejection = \"unknown\" | \"hostOnly\" | \"testOnly\";\n\n/** Error data carried by every `ErrorCode` failure. */\nexport interface EngineErrorData {\n\treadonly code: ErrorCode;\n\t/** Recovery hint for the model, e.g. `capture it again`. */\n\treadonly hint?: string | null;\n}\n\n/** Error data carried by every `-32601` rejection. */\nexport interface MethodRejectionData {\n\treadonly reason: MethodRejection;\n}\n\nexport type JsonRpcErrorData = EngineErrorData | MethodRejectionData;\n\nexport interface JsonRpcError {\n\treadonly code: number;\n\treadonly message: string;\n\treadonly data?: JsonRpcErrorData | null;\n}\n\nexport interface JsonRpcSuccess<R = unknown> {\n\treadonly jsonrpc: JsonRpcVersion;\n\treadonly id: RequestId;\n\treadonly result: R;\n}\n\n/** `id` is `null` only when the engine could not read the request id (parse error). */\nexport interface JsonRpcFailure {\n\treadonly jsonrpc: JsonRpcVersion;\n\treadonly id: RequestId | null;\n\treadonly error: JsonRpcError;\n}\n\n/** A reply to one request. */\nexport type JsonRpcResponse<R = unknown> = JsonRpcSuccess<R> | JsonRpcFailure;\n\n/** Payload of each server-to-client notification; a schema notification without an entry fails to compile. */\nexport type EngineNotificationParams = {\n\treadonly audit: AuditEvent;\n\treadonly \"stopPath.changed\": StopPathStatus;\n\treadonly \"engine.log\": EngineLog;\n};\n\n/** A server-to-client notification, discriminated by `method`. */\nexport type JsonRpcNotification = {\n\treadonly [N in EngineNotification]: {\n\t\treadonly jsonrpc: JsonRpcVersion;\n\t\treadonly method: N;\n\t\treadonly params: EngineNotificationParams[N];\n\t};\n}[EngineNotification];\n\n/** JSON-RPC 2.0 standard error codes the engine emits. */\nexport const STANDARD_RPC_ERRORS = {\n\tparseError: -32700,\n\tinvalidRequest: -32600,\n\tmethodNotFound: -32601,\n\tinvalidParams: -32602,\n} as const;\n"]}