forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagentControlTools.ts
More file actions
70 lines (63 loc) · 2.59 KB
/
Copy pathagentControlTools.ts
File metadata and controls
70 lines (63 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Published "tool surface" contract for the Windows port's agent control plane.
// Track 2's in-session voice tool-calling codes against these names + taxonomy.
// Const + types only — no handler logic in this PR.
//
// Tool names mirror macOS `agent/src/runtime/control-tool-manifest.ts`
// (agentControlCapabilityManifest). The policy taxonomy mirrors
// `agent/src/runtime/desktop-tool-policy.ts`.
/**
* The 17 LLM-callable agent-control tool names, in manifest order.
*
* EXCLUDED (host-only, never advertised to agent-facing surfaces):
* - `spawn_background_agent` — internal Swift coordinator entrypoint
* (manifest `surfaces: []`).
* - the five `*_workstream_continuity` tools — host-only, not in this manifest.
*/
export const AGENT_CONTROL_TOOL_NAMES = [
'list_agent_sessions',
'get_agent_run',
'build_desktop_awareness_snapshot',
'list_desktop_action_queue',
'get_desktop_open_loops',
'build_desktop_context_packet',
'route_desktop_intent',
'evaluate_desktop_tool_policy',
'create_desktop_dispatch',
'resolve_desktop_dispatch',
'cancel_agent_run',
'inspect_agent_artifacts',
'update_agent_artifact_lifecycle',
'send_agent_message',
'spawn_agent',
'run_agent_and_wait',
'set_desktop_attention_override'
] as const
/** Union of the 17 LLM-callable agent-control tool names. */
export type AgentControlToolName = (typeof AGENT_CONTROL_TOOL_NAMES)[number]
/**
* The 12 capability bundles the desktop coordinator gates tools on. Mirrors
* `desktop-tool-policy.ts` `DesktopCoordinatorBundle`.
*/
export type DesktopCoordinatorBundle =
| 'desktop.agent_control.read'
| 'desktop.agent_control.manage'
| 'desktop.context.local_read'
| 'desktop.context.screen_summary'
| 'desktop.context.screenshot_image'
| 'desktop.tasks.readwrite'
| 'desktop.artifacts.manage'
| 'desktop.automation.read'
| 'desktop.automation.act_dev_only'
| 'desktop.permissions.request'
| 'external.write_prepare'
| 'external.write_send'
/** Tool risk tier. Mirrors `desktop-tool-policy.ts` `DesktopToolRiskTier`. */
export type RiskTier = 'low' | 'medium' | 'high'
/** Tool privacy tier. Mirrors `desktop-tool-policy.ts` `DesktopToolPrivacyTier`. */
export type PrivacyTier = 'low' | 'local_private' | 'sensitive'
/** Per-tool approval policy. Mirrors `desktop-tool-policy.ts`
* `DesktopToolApprovalPolicy`. */
export type ApprovalPolicy = 'allow' | 'user_approval' | 'policy_grant' | 'deny'
/** Coordinator policy outcome for a tool/capability request. Mirrors
* `desktop-tool-policy.ts` `DesktopToolPolicyDecision`. */
export type ToolPolicyDecision = 'allow' | 'deny' | 'dispatch_required'