@anionex/dsh-computer-use 0.1.0 → 0.2.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.
- package/README.i18n.yaml +2 -2
- package/README.md +15 -1
- package/README.zh.md +15 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/lib/providers/macos.js +37 -23
- package/lib/providers/macos.js.map +1 -1
- package/lib/providers/native-helper.js +151 -6
- package/lib/providers/native-helper.js.map +1 -1
- package/lib/providers/unsupported.js +45 -0
- package/lib/providers/unsupported.js.map +1 -0
- package/lib/service.js +101 -15
- package/lib/service.js.map +1 -1
- package/lib/skill.js +7 -1
- package/lib/skill.js.map +1 -1
- package/lib/tools.js +18 -0
- package/lib/tools.js.map +1 -1
- package/lib/types/backend.d.ts +17 -2
- package/lib/types/backend.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/providers/macos.d.ts +20 -1
- package/lib/types/providers/macos.d.ts.map +1 -1
- package/lib/types/providers/native-helper.d.ts +6 -2
- package/lib/types/providers/native-helper.d.ts.map +1 -1
- package/lib/types/providers/unsupported.d.ts +19 -0
- package/lib/types/providers/unsupported.d.ts.map +1 -0
- package/lib/types/service.d.ts +6 -0
- package/lib/types/service.d.ts.map +1 -1
- package/lib/types/skill.d.ts +1 -1
- package/lib/types/skill.d.ts.map +1 -1
- package/lib/types/tools.d.ts.map +1 -1
- package/lib/types/types.d.ts +23 -1
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/native/macos/Sources/Helper/CursorOverlay.swift +96 -21
- package/native/macos/Sources/Helper/WindowNumberMatcher.swift +29 -0
- package/native/macos/Sources/Helper/main.swift +20 -7
- package/native/macos/bin/dsh-computer-use-helper +0 -0
- package/native/macos/manifest.json +3 -3
- package/package.json +1 -1
- package/scripts/build-native.mjs +8 -1
- package/scripts/model-e2e.mjs +11 -2
- package/src/backend.ts +18 -2
- package/src/index.ts +6 -0
- package/src/providers/macos.ts +35 -19
- package/src/providers/native-helper.ts +154 -5
- package/src/providers/unsupported.ts +67 -0
- package/src/service.ts +103 -16
- package/src/skill.ts +7 -1
- package/src/tools.ts +18 -0
- package/src/types.ts +21 -1
package/src/tools.ts
CHANGED
|
@@ -170,6 +170,24 @@ const actionResultSchema = {
|
|
|
170
170
|
targetChanged: { type: 'boolean', required: true },
|
|
171
171
|
},
|
|
172
172
|
},
|
|
173
|
+
agentCursor: {
|
|
174
|
+
type: 'object',
|
|
175
|
+
additionalProperties: false,
|
|
176
|
+
properties: {
|
|
177
|
+
visible: { type: 'boolean', const: false, required: true },
|
|
178
|
+
reason: { type: 'string' },
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
effect: {
|
|
182
|
+
type: 'object',
|
|
183
|
+
additionalProperties: false,
|
|
184
|
+
required: true,
|
|
185
|
+
properties: {
|
|
186
|
+
observedStateChanged: { type: 'boolean', required: true },
|
|
187
|
+
observedForMs: { type: 'integer', required: true },
|
|
188
|
+
note: { type: 'string' },
|
|
189
|
+
},
|
|
190
|
+
},
|
|
173
191
|
observation: { ...observationSchema, required: true },
|
|
174
192
|
},
|
|
175
193
|
} as const satisfies ValueSchemaSpec
|
package/src/types.ts
CHANGED
|
@@ -252,9 +252,29 @@ export interface ComputerActionResult {
|
|
|
252
252
|
pointerRouting: 'none' | 'target-process'
|
|
253
253
|
/** Present when the action addressed an observed element. */
|
|
254
254
|
resolution?: ComputerTargetResolutionResult
|
|
255
|
+
/** Present only when the agent cursor should be on screen and is not. */
|
|
256
|
+
agentCursor?: { visible: false; reason?: string }
|
|
257
|
+
/** What changed in the bounded post-action structural observation. */
|
|
258
|
+
effect: ComputerActionEffect
|
|
255
259
|
observation: ComputerObservation
|
|
256
260
|
}
|
|
257
261
|
|
|
262
|
+
/**
|
|
263
|
+
* What changed in the bounded structural observation after an action.
|
|
264
|
+
*
|
|
265
|
+
* The comparison covers the window title, id and frame plus the Accessibility
|
|
266
|
+
* element tree. It does not prove that the action caused the change, and it
|
|
267
|
+
* cannot observe pixel-only, transient, remote, or otherwise external effects.
|
|
268
|
+
*/
|
|
269
|
+
export interface ComputerActionEffect {
|
|
270
|
+
/** True when the post-action structural state hash differed. */
|
|
271
|
+
observedStateChanged: boolean
|
|
272
|
+
/** How long the settle loop watched, in milliseconds. */
|
|
273
|
+
observedForMs: number
|
|
274
|
+
/** Scope guidance when no structural change was observed. */
|
|
275
|
+
note?: string
|
|
276
|
+
}
|
|
277
|
+
|
|
258
278
|
/** Confirmation request binding an exact proposed action to human-readable impact. */
|
|
259
279
|
export interface ComputerConfirmRequest {
|
|
260
280
|
action: Omit<ComputerActionRequest, 'confirmationToken'>
|
|
@@ -282,7 +302,7 @@ export interface ComputerUseContext {
|
|
|
282
302
|
/** Provider and permission diagnostics exposed to Settings. */
|
|
283
303
|
export interface ComputerUseStatus {
|
|
284
304
|
platform: NodeJS.Platform
|
|
285
|
-
provider: 'macos-ax'
|
|
305
|
+
provider: 'macos-ax' | 'unsupported'
|
|
286
306
|
generation: number
|
|
287
307
|
ready: boolean
|
|
288
308
|
helperPath: string
|