@0xmaxma/claude-gateway 2.1.8 → 2.1.10
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/dist/agent/runner.d.ts +25 -4
- package/dist/agent/runner.d.ts.map +1 -1
- package/dist/agent/runner.js +4 -0
- package/dist/agent/runner.js.map +1 -1
- package/dist/api/connectors-router.d.ts.map +1 -1
- package/dist/api/connectors-router.js +27 -3
- package/dist/api/connectors-router.js.map +1 -1
- package/dist/api/router.d.ts.map +1 -1
- package/dist/api/router.js +14 -0
- package/dist/api/router.js.map +1 -1
- package/dist/automation/browser-outcome.d.ts +3 -1
- package/dist/automation/browser-outcome.d.ts.map +1 -1
- package/dist/automation/browser-outcome.js +2 -2
- package/dist/automation/browser-outcome.js.map +1 -1
- package/dist/automation/browser-trace.d.ts +1 -1
- package/dist/automation/command-speech.d.ts +9 -1
- package/dist/automation/command-speech.d.ts.map +1 -1
- package/dist/automation/command-speech.js +18 -0
- package/dist/automation/command-speech.js.map +1 -1
- package/dist/automation/command-steps.d.ts +2 -0
- package/dist/automation/command-steps.d.ts.map +1 -1
- package/dist/automation/command-steps.js +34 -2
- package/dist/automation/command-steps.js.map +1 -1
- package/dist/automation/computer-command.d.ts +1 -0
- package/dist/automation/computer-command.d.ts.map +1 -1
- package/dist/automation/computer-command.js +31 -5
- package/dist/automation/computer-command.js.map +1 -1
- package/dist/automation/computer-outcome.d.ts +26 -3
- package/dist/automation/computer-outcome.d.ts.map +1 -1
- package/dist/automation/computer-outcome.js +183 -13
- package/dist/automation/computer-outcome.js.map +1 -1
- package/dist/automation/computer-policy.d.ts +10 -1
- package/dist/automation/computer-policy.d.ts.map +1 -1
- package/dist/automation/computer-policy.js +20 -6
- package/dist/automation/computer-policy.js.map +1 -1
- package/dist/automation/computer-use.d.ts +34 -0
- package/dist/automation/computer-use.d.ts.map +1 -1
- package/dist/automation/computer-use.js +211 -17
- package/dist/automation/computer-use.js.map +1 -1
- package/dist/automation/direct-command.d.ts +8 -0
- package/dist/automation/direct-command.d.ts.map +1 -1
- package/dist/automation/direct-command.js +12 -0
- package/dist/automation/direct-command.js.map +1 -1
- package/dist/automation/model-choice-evaluator.d.ts +3 -0
- package/dist/automation/model-choice-evaluator.d.ts.map +1 -1
- package/dist/automation/model-choice-evaluator.js +3 -1
- package/dist/automation/model-choice-evaluator.js.map +1 -1
- package/dist/automation/vision-decider.d.ts +4 -2
- package/dist/automation/vision-decider.d.ts.map +1 -1
- package/dist/automation/vision-decider.js +69 -15
- package/dist/automation/vision-decider.js.map +1 -1
- package/dist/build-provenance.json +4 -4
- package/dist/connectors/custom-connectors-store.d.ts.map +1 -1
- package/dist/connectors/custom-connectors-store.js +6 -1
- package/dist/connectors/custom-connectors-store.js.map +1 -1
- package/dist/connectors/custom.d.ts +14 -0
- package/dist/connectors/custom.d.ts.map +1 -1
- package/dist/connectors/custom.js +43 -2
- package/dist/connectors/custom.js.map +1 -1
- package/dist/connectors/proxy.d.ts +8 -0
- package/dist/connectors/proxy.d.ts.map +1 -1
- package/dist/connectors/proxy.js +53 -5
- package/dist/connectors/proxy.js.map +1 -1
- package/dist/connectors/resolve.d.ts.map +1 -1
- package/dist/connectors/resolve.js +16 -2
- package/dist/connectors/resolve.js.map +1 -1
- package/dist/connectors/sidecar.d.ts +131 -0
- package/dist/connectors/sidecar.d.ts.map +1 -0
- package/dist/connectors/sidecar.js +768 -0
- package/dist/connectors/sidecar.js.map +1 -0
- package/dist/connectors/token-env.d.ts +2 -0
- package/dist/connectors/token-env.d.ts.map +1 -1
- package/dist/connectors/token-env.js +16 -0
- package/dist/connectors/token-env.js.map +1 -1
- package/dist/connectors/types.d.ts +4 -0
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/connectors/uv-runtime.d.ts +37 -0
- package/dist/connectors/uv-runtime.d.ts.map +1 -0
- package/dist/connectors/uv-runtime.js +236 -0
- package/dist/connectors/uv-runtime.js.map +1 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/jev/browser-contract.d.ts +3 -0
- package/dist/jev/browser-contract.d.ts.map +1 -1
- package/dist/jev/browser-contract.js +6 -0
- package/dist/jev/browser-contract.js.map +1 -1
- package/dist/jev/browser-evidence-summary.d.ts +1 -1
- package/dist/orchestration/agent-tool-schemas.d.ts +18 -0
- package/dist/orchestration/agent-tool-schemas.d.ts.map +1 -1
- package/dist/orchestration/agent-tool-schemas.js +11 -3
- package/dist/orchestration/agent-tool-schemas.js.map +1 -1
- package/dist/orchestration/bridge.d.ts.map +1 -1
- package/dist/orchestration/bridge.js +25 -5
- package/dist/orchestration/bridge.js.map +1 -1
- package/dist/orchestration/browser-routing.d.ts.map +1 -1
- package/dist/orchestration/browser-routing.js +2 -1
- package/dist/orchestration/browser-routing.js.map +1 -1
- package/dist/orchestration/computer-decisions.d.ts +1 -1
- package/dist/orchestration/computer-decisions.d.ts.map +1 -1
- package/dist/orchestration/computer-decisions.js +21 -7
- package/dist/orchestration/computer-decisions.js.map +1 -1
- package/dist/orchestration/computer-live.d.ts +62 -0
- package/dist/orchestration/computer-live.d.ts.map +1 -0
- package/dist/orchestration/computer-live.js +126 -0
- package/dist/orchestration/computer-live.js.map +1 -0
- package/dist/orchestration/connector-context.d.ts +17 -0
- package/dist/orchestration/connector-context.d.ts.map +1 -0
- package/dist/orchestration/connector-context.js +56 -0
- package/dist/orchestration/connector-context.js.map +1 -0
- package/dist/orchestration/container-tool-schemas.d.ts.map +1 -1
- package/dist/orchestration/container-tool-schemas.js +3 -0
- package/dist/orchestration/container-tool-schemas.js.map +1 -1
- package/dist/orchestration/decisions.d.ts +3 -1
- package/dist/orchestration/decisions.d.ts.map +1 -1
- package/dist/orchestration/decisions.js +4 -2
- package/dist/orchestration/decisions.js.map +1 -1
- package/dist/orchestration/gateway-tasks/browser.d.ts +1 -1
- package/dist/orchestration/gateway-tasks/browser.d.ts.map +1 -1
- package/dist/orchestration/gateway-tasks/browser.js +4 -3
- package/dist/orchestration/gateway-tasks/browser.js.map +1 -1
- package/dist/orchestration/gateway-tasks/computer-context.d.ts +4 -1
- package/dist/orchestration/gateway-tasks/computer-context.d.ts.map +1 -1
- package/dist/orchestration/gateway-tasks/computer-context.js +3 -1
- package/dist/orchestration/gateway-tasks/computer-context.js.map +1 -1
- package/dist/orchestration/gateway-tasks/computer.d.ts +78 -15
- package/dist/orchestration/gateway-tasks/computer.d.ts.map +1 -1
- package/dist/orchestration/gateway-tasks/computer.js +298 -31
- package/dist/orchestration/gateway-tasks/computer.js.map +1 -1
- package/dist/orchestration/gateway-tasks/controller.d.ts +14 -2
- package/dist/orchestration/gateway-tasks/controller.d.ts.map +1 -1
- package/dist/orchestration/gateway-tasks/controller.js +63 -2
- package/dist/orchestration/gateway-tasks/controller.js.map +1 -1
- package/dist/orchestration/notification-mailbox.js +3 -3
- package/dist/orchestration/notification-mailbox.js.map +1 -1
- package/dist/orchestration/process-turn.d.ts.map +1 -1
- package/dist/orchestration/process-turn.js +4 -1
- package/dist/orchestration/process-turn.js.map +1 -1
- package/dist/orchestration/runtime.d.ts +22 -1
- package/dist/orchestration/runtime.d.ts.map +1 -1
- package/dist/orchestration/runtime.js +87 -7
- package/dist/orchestration/runtime.js.map +1 -1
- package/dist/orchestration/task-controls.d.ts +8 -0
- package/dist/orchestration/task-controls.d.ts.map +1 -1
- package/dist/orchestration/task-controls.js +3 -2
- package/dist/orchestration/task-controls.js.map +1 -1
- package/dist/orchestration/tasks/automation-session.d.ts +42 -11
- package/dist/orchestration/tasks/automation-session.d.ts.map +1 -1
- package/dist/orchestration/tasks/automation-session.js +101 -21
- package/dist/orchestration/tasks/automation-session.js.map +1 -1
- package/dist/orchestration/tasks/driver.d.ts.map +1 -1
- package/dist/orchestration/tasks/driver.js +4 -0
- package/dist/orchestration/tasks/driver.js.map +1 -1
- package/dist/orchestration/tasks/service.d.ts +23 -0
- package/dist/orchestration/tasks/service.d.ts.map +1 -1
- package/dist/orchestration/tasks/service.js +120 -12
- package/dist/orchestration/tasks/service.js.map +1 -1
- package/dist/orchestration/telegram-tool-status.d.ts.map +1 -1
- package/dist/orchestration/telegram-tool-status.js +2 -0
- package/dist/orchestration/telegram-tool-status.js.map +1 -1
- package/dist/orchestration/types.d.ts +19 -0
- package/dist/orchestration/types.d.ts.map +1 -1
- package/dist/orchestration/types.js.map +1 -1
- package/dist/session/managed-connectors.d.ts +2 -0
- package/dist/session/managed-connectors.d.ts.map +1 -1
- package/dist/session/managed-connectors.js +9 -4
- package/dist/session/managed-connectors.js.map +1 -1
- package/dist/session/process.d.ts +3 -0
- package/dist/session/process.d.ts.map +1 -1
- package/dist/session/process.js +21 -3
- package/dist/session/process.js.map +1 -1
- package/dist/session/runtime-profile.d.ts +2 -0
- package/dist/session/runtime-profile.d.ts.map +1 -1
- package/dist/session/runtime-profile.js.map +1 -1
- package/dist/ui/voice-call-client.d.ts +3 -0
- package/dist/ui/voice-call-client.d.ts.map +1 -1
- package/dist/ui/voice-call-client.js +10 -1
- package/dist/ui/voice-call-client.js.map +1 -1
- package/dist/voice/errors.d.ts +1 -1
- package/dist/voice/errors.js +1 -1
- package/dist/voice/errors.js.map +1 -1
- package/dist/voice/providers/elevenlabs-tts.d.ts.map +1 -1
- package/dist/voice/providers/elevenlabs-tts.js +17 -1
- package/dist/voice/providers/elevenlabs-tts.js.map +1 -1
- package/dist/voice/providers/socket.js +25 -6
- package/dist/voice/providers/socket.js.map +1 -1
- package/dist/voice/session.js +3 -2
- package/dist/voice/session.js.map +1 -1
- package/mcp/fixtures/workspace-mcp-tools.json +260 -0
- package/mcp/lazy-tools.test.ts +137 -1
- package/mcp/lazy-tools.ts +40 -7
- package/mcp/server.ts +1 -1
- package/mcp/tools/tasks/module.ts +2 -1
- package/package.json +1 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UNKNOWN_PREFIX = void 0;
|
|
3
|
+
exports.ANSWERED_FROM_SCREEN = exports.UNKNOWN_PREFIX = void 0;
|
|
4
|
+
exports.computerReasonText = computerReasonText;
|
|
5
|
+
exports.computerProgressText = computerProgressText;
|
|
4
6
|
exports.computerActionText = computerActionText;
|
|
5
7
|
exports.stepRunText = stepRunText;
|
|
8
|
+
exports.computerRoundDone = computerRoundDone;
|
|
6
9
|
exports.computerOutcomeText = computerOutcomeText;
|
|
7
10
|
/**
|
|
8
11
|
* One owner-facing line per direct command: what was done, or why nothing was
|
|
@@ -16,7 +19,7 @@ const HINTS = {
|
|
|
16
19
|
FOCUS_REQUIRED: 'the target needs keyboard focus first. Click the field, then send the command again.',
|
|
17
20
|
FOCUS_UNSUPPORTED: 'this control cannot take keyboard focus. Click it instead.',
|
|
18
21
|
TARGET_OCCLUDED: 'the target is covered by another window or popup. Close it, then try again.',
|
|
19
|
-
UI_NOT_READY: 'the screen
|
|
22
|
+
UI_NOT_READY: 'the screen kept changing while it waited. Send the command again.',
|
|
20
23
|
STALE_OBSERVATION: 'the screen changed before the action ran. Send the command again.',
|
|
21
24
|
ACTION_CONTEXT_CHANGED: 'the screen changed before the action ran. Send the command again.',
|
|
22
25
|
SUBMIT_CONTEXT_CHANGED: 'the field changed before Enter was pressed. Check it and press Enter if still wanted.',
|
|
@@ -26,7 +29,115 @@ const HINTS = {
|
|
|
26
29
|
CONFIRMATION_DECLINED: 'the user said no, so it was not pressed.',
|
|
27
30
|
COMPLETION_NOT_ESTABLISHED: 'the result could not be confirmed from the screen.',
|
|
28
31
|
SEQUENCE_TARGET_MISSING: 'the next button was not found exactly once on the screen.',
|
|
32
|
+
RAW_INPUT_REQUIRED: 'this app shows no controls Computer Use can read, so it has to work from the screen with the mouse and keyboard. Turn on "Allow mouse and keyboard control" in GetPod\'s Computer Use settings, then send the command again.',
|
|
33
|
+
RAW_INPUT_UNAVAILABLE: 'this app shows no controls Computer Use can read, and mouse and keyboard control is not available on this computer yet.',
|
|
34
|
+
SCREEN_CAPTURE_REQUIRED: 'this app shows no controls Computer Use can read, and its window could not be captured to work from the screen. Check the Screen Recording permission for GetPod, then send the command again.',
|
|
35
|
+
SCREEN_CAPTURE_UNAVAILABLE: 'this app shows no controls Computer Use can read, and its window could not be captured to work from the screen. Check the app window and try again.',
|
|
36
|
+
APPLICATION_LAUNCH_UNCONFIRMED: 'the computer did not confirm that the app opened. Check that it is in front, then send the command again.',
|
|
37
|
+
ADDRESS_NOT_SHOWN: 'the page in front does not show the web address yet. Check the browser, then send the command again.',
|
|
29
38
|
};
|
|
39
|
+
/** Stop codes as one plain sentence for the owner (the card) and for the agent to pass on. A code not listed here is
|
|
40
|
+
* still never shown raw: the owner reads a generic line, and the agent's message keeps the code for diagnosis. */
|
|
41
|
+
const REASONS = {
|
|
42
|
+
FOCUS_REQUIRED: 'The app didn\'t accept typing: no text field had keyboard focus.',
|
|
43
|
+
FOCUS_CHANGED: 'Keyboard focus moved before the action ran.',
|
|
44
|
+
SECURE_FIELD: 'The field in focus is a password field, which Computer Use never types into.',
|
|
45
|
+
TEXT_NOT_IN_GOAL: 'It would have typed text that is not in your request, so it did not.',
|
|
46
|
+
APPLICATION_NOT_APPROVED: 'The app in front is not approved for Computer Use.',
|
|
47
|
+
APPLICATION_PROTECTED: 'The screen was hidden because a protected app such as GetPod was in front.',
|
|
48
|
+
NO_SUPPORTED_ACTION: 'No control on the screen matched the request.',
|
|
49
|
+
STEP_LIMIT: 'It reached the action limit it was given.',
|
|
50
|
+
NO_PROGRESS: 'Its last actions did not change the screen.',
|
|
51
|
+
ROUND_TIME_LIMIT: 'It used up its time for one round.',
|
|
52
|
+
COMMAND_WAITING_INPUT: 'It stopped before finishing.',
|
|
53
|
+
THINKING_WAITING_INPUT: 'It stopped before finishing.',
|
|
54
|
+
LOW_CONFIDENCE: 'The next step was unclear from the screen.',
|
|
55
|
+
COMPLETION_UNCERTAIN: 'The goal may already be done, but the screen was not clear enough to say.',
|
|
56
|
+
COMPLETION_CANDIDATE: 'The goal may be done, but it was not confirmed.',
|
|
57
|
+
VERIFICATION_FAILED: 'The result could not be confirmed on the screen.',
|
|
58
|
+
APPLICATION_LAUNCH_UNCONFIRMED: 'The computer did not confirm that the app opened.',
|
|
59
|
+
ADDRESS_NOT_SHOWN: 'The page in front does not show the web address yet.',
|
|
60
|
+
LOOP_CYCLE_BUDGET: 'It took too many turns without finishing.',
|
|
61
|
+
TIMEOUT: 'It ran out of time.',
|
|
62
|
+
CANCELLED: 'It was stopped.',
|
|
63
|
+
REVISION_SUPERSEDED: 'A newer command replaced it.',
|
|
64
|
+
OUTCOME_UNKNOWN: 'The last action may have run, but the computer did not confirm it.',
|
|
65
|
+
DEVICE_OFFLINE: 'The computer disconnected and did not reconnect within 12 seconds.',
|
|
66
|
+
ACCESS_DENIED: 'Access to the computer was withdrawn.',
|
|
67
|
+
COMPUTER_ACCESS_DENIED: 'Access to the computer was denied.',
|
|
68
|
+
COMPUTER_ACCESS_STOPPED: 'Access was stopped on the computer.',
|
|
69
|
+
COMPUTER_ACCESS_TIMEOUT: 'Nobody approved access on the computer in time.',
|
|
70
|
+
UNSUPPORTED_ACTION: 'The computer does not support that kind of action.',
|
|
71
|
+
RAW_INPUT_DISABLED: 'Mouse and keyboard control is turned off on the computer.',
|
|
72
|
+
RAW_INPUT_REQUIRED: 'The app shows no controls Computer Use can read, and mouse and keyboard control is turned off.',
|
|
73
|
+
RAW_INPUT_UNAVAILABLE: 'The app shows no controls Computer Use can read, and mouse and keyboard control is not available on this computer yet.',
|
|
74
|
+
SCREEN_CAPTURE_REQUIRED: 'The app shows no controls Computer Use can read, and its window could not be captured.',
|
|
75
|
+
SCREEN_CAPTURE_UNAVAILABLE: 'The app shows no controls Computer Use can read, and its window could not be captured.',
|
|
76
|
+
VISION_TARGET_NOT_FOUND: 'What it needed was not on the screen.',
|
|
77
|
+
VISION_SIGN_IN_REQUIRED: 'The app needs you to sign in first.',
|
|
78
|
+
VISION_HIGH_IMPACT_ACTION: 'The next step would buy, send, delete or change something, so it stopped for you.',
|
|
79
|
+
VISION_APP_UNAVAILABLE: 'The app was not available.',
|
|
80
|
+
VISION_OTHER: 'The model found no way to finish on the screen.',
|
|
81
|
+
VISION_NO_DECISION: 'The model did not choose an action.',
|
|
82
|
+
VISION_REFUSED: 'The model declined to continue.',
|
|
83
|
+
JEV_INVALID_REQUEST: 'The decision model rejected the request.',
|
|
84
|
+
JEV_RATE_LIMITED: 'The decision model is busy. Try again shortly.',
|
|
85
|
+
JEV_QUOTA_EXCEEDED: 'The decision model\'s quota is used up.',
|
|
86
|
+
JEV_DEADLINE_EXCEEDED: 'The decision model took too long to answer.',
|
|
87
|
+
JEV_AUTHENTICATION_FAILED: 'The decision model did not accept the agent\'s credentials.',
|
|
88
|
+
JEV_ACCESS_DENIED: 'The decision model is not available to this agent.',
|
|
89
|
+
JEV_MODEL_UNAVAILABLE: 'The decision model is not available.',
|
|
90
|
+
JEV_PROVIDER_UNAVAILABLE: 'The decision model could not be reached.',
|
|
91
|
+
JEV_INVALID_RESPONSE: 'The decision model gave an answer that could not be used.',
|
|
92
|
+
};
|
|
93
|
+
/** The owner's sentence for a stop code; `undefined` only for an empty code. */
|
|
94
|
+
function computerReasonText(code) {
|
|
95
|
+
if (!code)
|
|
96
|
+
return;
|
|
97
|
+
const bare = code.replace(/^COMPUTER_(?=ACCESS_)/, '');
|
|
98
|
+
if (REASONS[code] ?? REASONS[bare])
|
|
99
|
+
return REASONS[code] ?? REASONS[bare];
|
|
100
|
+
if (code.startsWith('JEV_'))
|
|
101
|
+
return 'The decision model could not decide the next step.';
|
|
102
|
+
if (code.startsWith('VISION_'))
|
|
103
|
+
return 'The model\'s chosen actions could not run.';
|
|
104
|
+
return 'It could not continue.';
|
|
105
|
+
}
|
|
106
|
+
/** Card copy per progress phase; a phase without a label reads as Working. */
|
|
107
|
+
const PHASE_LABELS = {
|
|
108
|
+
awaiting_access: 'Waiting for access on the computer',
|
|
109
|
+
observing: 'Looking at the screen', observed: 'Looking at the screen',
|
|
110
|
+
evaluating: 'Deciding the next step', decided: 'Deciding the next step', thinking: 'Working out what to type',
|
|
111
|
+
acting: 'Acting on the screen', acted: 'Acting on the screen',
|
|
112
|
+
verifying: 'Checking the result', reconciling: 'Checking the last action', waiting: 'Waiting',
|
|
113
|
+
};
|
|
114
|
+
const plural = (n, word) => `${n} ${word}${n === 1 ? '' : 's'}`;
|
|
115
|
+
/** The task card while a round runs and once it ended: a label, never a raw phase or code, and actions only. */
|
|
116
|
+
function computerProgressText(report) {
|
|
117
|
+
const actions = plural(report.steps, 'action');
|
|
118
|
+
if (report.phase !== 'terminal')
|
|
119
|
+
return `Computer Use · ${PHASE_LABELS[report.phase ?? ''] ?? 'Working'} · ${actions} so far`;
|
|
120
|
+
// Live progress reports keep status 'running'; their outcome rides on the terminal trace event.
|
|
121
|
+
const last = report.trace?.at(-1);
|
|
122
|
+
const status = report.status !== 'running' ? report.status : last?.phase === 'terminal' ? last.status : undefined;
|
|
123
|
+
if (status === 'succeeded')
|
|
124
|
+
return `Done after ${actions}.`;
|
|
125
|
+
const paused = pausedText(report);
|
|
126
|
+
if (paused)
|
|
127
|
+
return paused;
|
|
128
|
+
const stop = computerReasonText(report.reason);
|
|
129
|
+
// The last action the computer refused names the cause when the stop itself is generic (the model gave up after it).
|
|
130
|
+
const refused = [...(report.trace ?? [])].reverse().find(e => e.phase === 'acted' && e.outcome === 'not_executed' && e.reason)?.reason;
|
|
131
|
+
const before = refused && REASONS[refused] && REASONS[refused] !== stop ? ` Before that, ${REASONS[refused][0].toLowerCase()}${REASONS[refused].slice(1)}` : '';
|
|
132
|
+
return `Stopped after ${actions}. ${stop}${before}`;
|
|
133
|
+
}
|
|
134
|
+
/** A goal round that paused on its own (ROUND_PAUSES): the user's reply resumes it. */
|
|
135
|
+
function pausedText(report) {
|
|
136
|
+
if (report.reason === 'NO_PROGRESS')
|
|
137
|
+
return 'Paused: the last 3 actions didn\'t change the screen. Reply to continue.';
|
|
138
|
+
if (report.reason === 'ROUND_TIME_LIMIT')
|
|
139
|
+
return `Paused after ${plural(Math.max(1, Math.round((report.durationMs ?? 0) / 60000)), 'minute')} of work. Reply to continue.`;
|
|
140
|
+
}
|
|
30
141
|
/** A round whose last dispatched action has no receipt; it may have run. */
|
|
31
142
|
exports.UNKNOWN_PREFIX = 'Unknown:';
|
|
32
143
|
const quoted = (label) => label ? JSON.stringify(label.slice(0, 80)) : 'the chosen control';
|
|
@@ -38,29 +149,73 @@ function computerActionText(action) {
|
|
|
38
149
|
case 'key': return `pressed the ${action.key ?? ''} key`.replace(' ', ' ');
|
|
39
150
|
case 'scroll': return `scrolled ${action.direction ?? ''}`.trim();
|
|
40
151
|
case 'navigate': return `went ${action.direction ?? 'back'}`;
|
|
41
|
-
case 'open': return `opened ${action.appId ?? 'the application'}`;
|
|
152
|
+
case 'open': return `opened ${action.appName ?? action.appId ?? 'the application'}`;
|
|
153
|
+
// Vision actions: a click on what was there, a key chord, typed text.
|
|
154
|
+
case 'pointer': return action.label ? `clicked ${quoted(action.label)}` : 'clicked on the screen';
|
|
155
|
+
case 'key_chord': return `pressed ${action.key ?? 'a key'}`;
|
|
156
|
+
case 'type_focused': return 'typed text';
|
|
42
157
|
default: return 'completed the action';
|
|
43
158
|
}
|
|
44
159
|
}
|
|
45
|
-
/** Shared step-run summary; the surface supplies its own hint for a stop detail.
|
|
46
|
-
|
|
160
|
+
/** Shared step-run summary; the surface supplies its own hint for a stop detail.
|
|
161
|
+
* The first lines are for the owner; raw stop codes go on the last "Details:" line.
|
|
162
|
+
* A stopped step that may have run is never listed as not run: only later steps are. */
|
|
163
|
+
function stepRunText(run, hintFor, context = {}) {
|
|
47
164
|
const head = `${run.completed}/${run.total} steps done.${run.notes?.length ? ' ' + run.notes.join(' ') : ''}`;
|
|
48
165
|
if (run.stopReason === 'ALL_STEPS_DONE')
|
|
49
166
|
return head + (run.unverifiedSteps?.length ? ` No visible change after step ${run.unverifiedSteps.join(', ')}.` : '');
|
|
50
167
|
const detailHint = run.detail ? hintFor(run.detail) : undefined;
|
|
51
|
-
const
|
|
52
|
-
|
|
168
|
+
const step = run.stoppedAt ?? run.completed + 1;
|
|
169
|
+
const done = run.doneParts?.length ? ` Already done in step ${step}: ${run.doneParts.map(s => JSON.stringify(s)).join(', ')}.` : '';
|
|
170
|
+
const later = run.remaining.slice(1);
|
|
171
|
+
const notStarted = later.length ? ` Not started: ${later.map(s => JSON.stringify(s)).join(', ')}.` : '';
|
|
172
|
+
const details = `\nDetails: ${run.stopReason}${run.detail ? ` · ${run.detail}` : ''}`;
|
|
173
|
+
let line;
|
|
174
|
+
if (run.stopReason === 'OUTCOME_UNKNOWN') {
|
|
175
|
+
const last = context.lastAction, device = context.surface === 'browser' ? 'the browser' : 'this computer';
|
|
176
|
+
const effect = last?.kind === 'open' && last.appId ? `${last.appId.slice(0, 80)} may have opened` : 'its last action may have run';
|
|
177
|
+
line = `Step ${step} couldn't be confirmed: ${effect}, but ${device} didn't confirm it. ${context.handedOff ? 'The assistant is checking the screen.' : 'Check the screen before sending it again.'}`;
|
|
178
|
+
}
|
|
179
|
+
else if (context.handedOff)
|
|
180
|
+
line = `Step ${step} needs a decision — handing it to the assistant…`;
|
|
181
|
+
else
|
|
182
|
+
line = `Stopped at step ${step} ${JSON.stringify(run.stoppedStep ?? '')}: ${detailHint ?? 'it could not be completed.'}`;
|
|
183
|
+
return `${head} ${line}${done}${notStarted}`.slice(0, 1400) + details.slice(0, 100);
|
|
184
|
+
}
|
|
185
|
+
/** The card line once the assistant confirmed a parked run's goal from fresh evidence (verify_computer/verify_browser). */
|
|
186
|
+
exports.ANSWERED_FROM_SCREEN = 'Done · The assistant answered from the screen.';
|
|
187
|
+
/** Whether a settled round did what it was asked: its own outcome line says Done (or Ready, or a read
|
|
188
|
+
* the assistant answers), or every step of its step list ran. */
|
|
189
|
+
function computerRoundDone(report) {
|
|
190
|
+
if (report.stepRun)
|
|
191
|
+
return report.stepRun.stopReason === 'ALL_STEPS_DONE';
|
|
192
|
+
const text = computerOutcomeText(report);
|
|
193
|
+
return ['Done', 'Ready:', 'Read request:'].some(prefix => text.startsWith(prefix));
|
|
53
194
|
}
|
|
54
|
-
|
|
195
|
+
/** Said when a round that did not finish last saw a withheld screen (report.screenWithheld). */
|
|
196
|
+
const WITHHELD_HINT = 'The screen was hidden because a protected app such as GetPod was in front.';
|
|
197
|
+
const withheldHint = (report) => report.targetApp ? `${WITHHELD_HINT} The next command switches back to ${report.targetApp.name.slice(0, 80)} first.` : WITHHELD_HINT;
|
|
198
|
+
function computerOutcomeText(report, context = {}) {
|
|
199
|
+
const text = outcomeText(report, context);
|
|
200
|
+
if (!report.screenWithheld || text.startsWith('Done') || report.stepRun?.stopReason === 'ALL_STEPS_DONE')
|
|
201
|
+
return text;
|
|
202
|
+
// A step run's raw codes stay on its last "Details:" line.
|
|
203
|
+
const details = text.lastIndexOf('\nDetails:');
|
|
204
|
+
return details < 0 ? `${text} ${withheldHint(report)}` : `${text.slice(0, details)} ${withheldHint(report)}${text.slice(details)}`;
|
|
205
|
+
}
|
|
206
|
+
function outcomeText(report, context) {
|
|
55
207
|
const run = report.stepRun;
|
|
56
208
|
if (run)
|
|
57
|
-
return stepRunText(run, detail => HINTS[detail] ? hint(detail, report) : undefined);
|
|
209
|
+
return stepRunText(run, detail => HINTS[detail] ? hint(detail, report) : undefined, { ...context, surface: 'computer', ...(report.lastAction ? { lastAction: report.lastAction } : {}) });
|
|
58
210
|
const trace = report.trace ?? [];
|
|
59
211
|
// A goal run's own end (reached, out of steps) is the report's reason; other stops are waits.
|
|
60
212
|
const waiting = ['GOAL_REACHED', 'STEP_LIMIT'].includes(report.reason) ? report.reason : [...trace].reverse().find(e => e.phase === 'waiting' && e.reason !== 'POST_ACTION_EVIDENCE_STALE')?.reason;
|
|
61
213
|
// The device may have acted: never tell the owner it was not done.
|
|
62
214
|
if (report.reason === 'OUTCOME_UNKNOWN')
|
|
63
215
|
return `${exports.UNKNOWN_PREFIX} the last action may have run. Check the screen before sending the command again.`;
|
|
216
|
+
const paused = pausedText(report);
|
|
217
|
+
if (paused)
|
|
218
|
+
return paused;
|
|
64
219
|
if (waiting === 'SESSION_READY' && !report.steps)
|
|
65
220
|
return 'Ready: the session is open and waits for the next command.';
|
|
66
221
|
if (waiting === 'READ_REQUEST' && !report.steps)
|
|
@@ -72,22 +227,37 @@ function computerOutcomeText(report) {
|
|
|
72
227
|
// A goal run took several actions: say how it ended, never "Done" for a stop.
|
|
73
228
|
const actions = `${report.steps} action${report.steps === 1 ? '' : 's'}`;
|
|
74
229
|
if (waiting === 'GOAL_REACHED' && report.steps > 0)
|
|
75
|
-
return `Done
|
|
230
|
+
return `Done after ${actions}. Last: ${report.lastAction && !report.lastAction.blocked ? computerActionText(report.lastAction) : 'the action was sent'}.${report.accessReleased ? ' Computer access was released.' : ' Send the next command.'}`;
|
|
76
231
|
if (waiting === 'STEP_LIMIT' && report.steps > 0)
|
|
77
|
-
return `Not finished: stopped after ${actions}, the limit
|
|
232
|
+
return `Not finished: stopped after ${actions}, the action limit it was given. Check the screen and send the next command.`;
|
|
78
233
|
if (waiting === 'COMPLETION_UNCERTAIN' && report.steps > 0)
|
|
79
234
|
return `Not confirmed: ${actions} done, and the goal may already be complete, but the screen was not clear enough to say. Check the screen, then send the next command.`;
|
|
80
235
|
if (waiting === 'LOW_CONFIDENCE' && report.steps > 0)
|
|
81
236
|
return `Not finished: ${actions} done, then the next step was unclear from the screen. Say what to do next.`;
|
|
82
|
-
|
|
237
|
+
// One action, then a stop after it, is not done either. Pod-jinawong r8, task b0ba459d: a goal run
|
|
238
|
+
// opened Spotify, found no control for the search, and the card said "Done: opened com.spotify.client".
|
|
239
|
+
const acted = trace.map(e => e.phase).lastIndexOf('acted');
|
|
240
|
+
const stoppedAfterAction = acted >= 0 && trace.slice(acted + 1).some(e => e.phase === 'waiting' && e.reason === waiting);
|
|
241
|
+
if ((report.steps > 1 || stoppedAfterAction) && waiting && HINTS[waiting])
|
|
83
242
|
return `Not finished: ${actions} done, then ${hint(waiting, report)}`;
|
|
243
|
+
// A round that ended blocked or failed is never Done, whatever its last action was.
|
|
244
|
+
if (['blocked', 'failed', 'cancelled'].includes(report.status) && report.steps > 0)
|
|
245
|
+
return `Not finished: ${actions} done, then it stopped. ${computerReasonText(report.reason)}`;
|
|
84
246
|
if (report.lastAction && !report.lastAction.blocked && report.steps > 0)
|
|
85
247
|
return `Done: ${computerActionText(report.lastAction)}. Send the next command.`;
|
|
86
248
|
if (report.steps > 0)
|
|
87
249
|
return 'Done: the action was sent. Send the next command.';
|
|
250
|
+
// An open the computer never confirmed names the app (pod-jinawong r10, task 457a4930 rev3: TradingView's open).
|
|
251
|
+
if (waiting === 'APPLICATION_LAUNCH_UNCONFIRMED') {
|
|
252
|
+
const id = [...trace].reverse().find(e => e.action === 'open' && e.appId)?.appId, name = id && report.targetApp?.id === id ? report.targetApp.name : id;
|
|
253
|
+
if (name)
|
|
254
|
+
return `Not done: opening ${name.slice(0, 80)} was not confirmed by the computer.`;
|
|
255
|
+
}
|
|
88
256
|
if (waiting && HINTS[waiting])
|
|
89
257
|
return `Not done: ${hint(waiting, report)}`;
|
|
90
|
-
|
|
258
|
+
// Never a raw code on the card: the reason's own sentence (pod-jinawong r10, task 457a4930: "Not done: COMMAND_WAITING_INPUT").
|
|
259
|
+
const reason = computerReasonText(waiting && waiting !== 'COMMAND_WAITING_INPUT' ? waiting : report.reason);
|
|
260
|
+
return `Not done: ${reason[0].toLowerCase()}${reason.slice(1)} Send the next command.`;
|
|
91
261
|
}
|
|
92
262
|
function hint(reason, report) {
|
|
93
263
|
return HINTS[reason].replace('{target}', quoted(report.lastAction?.label));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer-outcome.js","sourceRoot":"","sources":["../../src/automation/computer-outcome.ts"],"names":[],"mappings":";;;AA4BA,gDAWC;AAED,kCAMC;AACD,kDAwBC;AAtED;;;;GAIG;AACH,MAAM,KAAK,GAAuB;IACjC,OAAO,EAAC,+FAA+F;IACvG,mBAAmB,EAAC,6HAA6H;IACjJ,mBAAmB,EAAC,gGAAgG;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,KAAG,EAAE,CAAA,CAAC,CAAA,MAAM,CAAC,SAAS,CAAC,IAAI,CAAA,CAAC,CAAA,EAAE,CAAC;QACrI,IAAG,IAAI;YAAC,OAAO,qBAAqB,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC,EAAE,CAAC,qCAAqC,CAAC;IAC3F,CAAC;IACD,IAAG,OAAO,IAAE,KAAK,CAAC,OAAO,CAAC;QAAC,OAAO,aAAa,IAAI,CAAC,OAAO,EAAC,MAAM,CAAC,EAAE,CAAC;IACtE,gIAAgI;IAChI,MAAM,MAAM,GAAC,kBAAkB,CAAC,OAAO,IAAE,OAAO,KAAG,uBAAuB,CAAA,CAAC,CAAA,OAAO,CAAA,CAAC,CAAA,MAAM,CAAC,MAAM,CAAE,CAAC;IACnG,OAAO,aAAa,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC;AACxF,CAAC;AACD,SAAS,IAAI,CAAC,MAAa,EAAC,MAAyB;IACpD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAU,EAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -12,7 +12,10 @@ export declare function readChoice(raw: unknown, options: Record<string, string>
|
|
|
12
12
|
};
|
|
13
13
|
/** Meaningful observed effect, deliberately separate from strict freshness checks. */
|
|
14
14
|
export declare function observedEffect(before: ComputerState, after: ComputerState, action: Record<string, unknown>): boolean;
|
|
15
|
+
/** Why a withheld observation (frontmostProtected) shows nothing, for the decision model and the agent. */
|
|
16
|
+
export declare const SCREEN_WITHHELD_NOTE = "The screen is withheld because a protected app (such as GetPod, where the user typed the command) is frontmost. This is not a missing approval or permission for the target app. Open or switch to the app or browser the command needs (from apps); its screen is observed after that.";
|
|
15
17
|
export declare function decisionState(state: ComputerState): {
|
|
18
|
+
screenWithheld?: string | undefined;
|
|
16
19
|
controls: {
|
|
17
20
|
ref: string;
|
|
18
21
|
label: string;
|
|
@@ -56,6 +59,8 @@ export declare function decisionState(state: ComputerState): {
|
|
|
56
59
|
supportedActions?: ("scroll:up" | "scroll:down" | "navigate:back" | "navigate:forward")[] | undefined;
|
|
57
60
|
screenshotAvailable?: boolean | undefined;
|
|
58
61
|
screenshotRestriction?: string | undefined;
|
|
62
|
+
frontmostProtected?: boolean | undefined;
|
|
63
|
+
reason?: string | undefined;
|
|
59
64
|
observationStats?: {
|
|
60
65
|
visited: number;
|
|
61
66
|
candidates: number;
|
|
@@ -79,6 +84,10 @@ export declare function decisionState(state: ComputerState): {
|
|
|
79
84
|
helperCommit?: string | undefined;
|
|
80
85
|
} | undefined;
|
|
81
86
|
};
|
|
82
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Literal values only; do not invent domains or parse language-specific commands.
|
|
89
|
+
* Code (`…`, ```…```) spans come first, then quoted ("…", “…”) spans, ranked ahead of
|
|
90
|
+
* names ("Terminal") by format alone; URLs last. The decision model picks among them.
|
|
91
|
+
*/
|
|
83
92
|
export declare function literalTextCandidates(goal: string): string[];
|
|
84
93
|
//# sourceMappingURL=computer-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer-policy.d.ts","sourceRoot":"","sources":["../../src/automation/computer-policy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AAKF,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC;;;;;EAOtE;AACD,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,WAYzG;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAC,aAAa
|
|
1
|
+
{"version":3,"file":"computer-policy.d.ts","sourceRoot":"","sources":["../../src/automation/computer-policy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AAKF,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC;;;;;EAOtE;AACD,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,WAYzG;AACD,2GAA2G;AAC3G,eAAO,MAAM,oBAAoB,4RAA0R,CAAC;AAC5T,wBAAgB,aAAa,CAAC,KAAK,EAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAC,MAAM,GAAE,MAAM,EAAE,CAc1D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decisionInstructions = void 0;
|
|
3
|
+
exports.SCREEN_WITHHELD_NOTE = exports.decisionInstructions = void 0;
|
|
4
4
|
exports.readChoice = readChoice;
|
|
5
5
|
exports.observedEffect = observedEffect;
|
|
6
6
|
exports.decisionState = decisionState;
|
|
@@ -40,17 +40,31 @@ function observedEffect(before, after, action) {
|
|
|
40
40
|
JSON.stringify([after.application, after.windowTitle, after.focusedControl,
|
|
41
41
|
after.controls.map(c => [c.role, c.value, c.focused]), after.text]);
|
|
42
42
|
}
|
|
43
|
+
/** Why a withheld observation (frontmostProtected) shows nothing, for the decision model and the agent. */
|
|
44
|
+
exports.SCREEN_WITHHELD_NOTE = 'The screen is withheld because a protected app (such as GetPod, where the user typed the command) is frontmost. This is not a missing approval or permission for the target app. Open or switch to the app or browser the command needs (from apps); its screen is observed after that.';
|
|
43
45
|
function decisionState(state) {
|
|
44
|
-
return { ...state, controls: state.controls.filter(c => !c.sensitive) };
|
|
46
|
+
return { ...state, controls: state.controls.filter(c => !c.sensitive), ...(state.frontmostProtected ? { screenWithheld: exports.SCREEN_WITHHELD_NOTE } : {}) };
|
|
45
47
|
}
|
|
46
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Literal values only; do not invent domains or parse language-specific commands.
|
|
50
|
+
* Code (`…`, ```…```) spans come first, then quoted ("…", “…”) spans, ranked ahead of
|
|
51
|
+
* names ("Terminal") by format alone; URLs last. The decision model picks among them.
|
|
52
|
+
*/
|
|
47
53
|
function literalTextCandidates(goal) {
|
|
54
|
+
const spans = [];
|
|
55
|
+
for (const match of goal.matchAll(/```([\s\S]*?)```|`([^`\n]+)`|"([^"\n]+)"|“([^”\n]+)”/g)) {
|
|
56
|
+
const code = match[1] !== undefined || match[2] !== undefined;
|
|
57
|
+
// A fence may open with a language tag line ("```sh").
|
|
58
|
+
const value = match[1] !== undefined ? match[1].replace(/^[\w+-]*\n/, '').trim() : match[2] ?? match[3] ?? match[4];
|
|
59
|
+
spans.push({ value, rank: code ? 0 : 1 });
|
|
60
|
+
}
|
|
48
61
|
const values = [];
|
|
49
62
|
const add = (value) => { if (value.length > 0 && value.length <= 2000 && !values.includes(value) && values.length < 16)
|
|
50
63
|
values.push(value); };
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
// Array.prototype.sort is stable: equal ranks keep their order in the goal.
|
|
65
|
+
for (const span of spans.sort((a, b) => a.rank - b.rank))
|
|
66
|
+
add(span.value);
|
|
67
|
+
for (const match of goal.matchAll(/https?:\/\/[^\s"<>`]+|(?<![A-Za-z0-9@._-])(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,63}(?:\/[^\s"<>`]*)?/gi))
|
|
54
68
|
add(match[0]);
|
|
55
69
|
return values;
|
|
56
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer-policy.js","sourceRoot":"","sources":["../../src/automation/computer-policy.ts"],"names":[],"mappings":";;;AAaA,gCAOC;AAED,wCAYC;
|
|
1
|
+
{"version":3,"file":"computer-policy.js","sourceRoot":"","sources":["../../src/automation/computer-policy.ts"],"names":[],"mappings":";;;AAaA,gCAOC;AAED,wCAYC;AAGD,sCAEC;AAOD,sDAcC;AA5DD,6BAAwB;AAExB,sDAA+D;AAE/D,2FAA2F;AAC9E,QAAA,oBAAoB,GAAG;IAClC,MAAM,EAAE,42BAA42B;IACp3B,UAAU,EAAE,2UAA2U;CACxV,CAAC;AACF,MAAM,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;IACtB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACjE,aAAa,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACvE,CAAC,CAAC;AACH,SAAgB,UAAU,CAAC,GAAY,EAAE,OAA8B;IACrE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC;IACxF,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,C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IAAI,CAAC;QAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnE,KAAI,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,gHAAgH,CAAC;QAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACjK,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -35,6 +35,8 @@ export declare const ComputerObservation: z.ZodPipe<z.ZodObject<{
|
|
|
35
35
|
}>>, unknown>>;
|
|
36
36
|
screenshotAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
37
37
|
screenshotRestriction: z.ZodOptional<z.ZodString>;
|
|
38
|
+
frontmostProtected: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
39
|
+
reason: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
38
40
|
observationStats: z.ZodOptional<z.ZodObject<{
|
|
39
41
|
visited: z.ZodNumber;
|
|
40
42
|
candidates: z.ZodNumber;
|
|
@@ -128,6 +130,8 @@ export declare const ComputerObservation: z.ZodPipe<z.ZodObject<{
|
|
|
128
130
|
supportedActions?: ("scroll:up" | "scroll:down" | "navigate:back" | "navigate:forward")[] | undefined;
|
|
129
131
|
screenshotAvailable?: boolean | undefined;
|
|
130
132
|
screenshotRestriction?: string | undefined;
|
|
133
|
+
frontmostProtected?: boolean | undefined;
|
|
134
|
+
reason?: string | undefined;
|
|
131
135
|
observationStats?: {
|
|
132
136
|
visited: number;
|
|
133
137
|
candidates: number;
|
|
@@ -194,6 +198,8 @@ export declare const ComputerObservation: z.ZodPipe<z.ZodObject<{
|
|
|
194
198
|
supportedActions?: ("scroll:up" | "scroll:down" | "navigate:back" | "navigate:forward")[] | undefined;
|
|
195
199
|
screenshotAvailable?: boolean | undefined;
|
|
196
200
|
screenshotRestriction?: string | undefined;
|
|
201
|
+
frontmostProtected?: boolean | undefined;
|
|
202
|
+
reason?: string | undefined;
|
|
197
203
|
observationStats?: {
|
|
198
204
|
visited: number;
|
|
199
205
|
candidates: number;
|
|
@@ -299,6 +305,14 @@ export interface ComputerUseResult {
|
|
|
299
305
|
observation?: ComputerState;
|
|
300
306
|
stepRun?: import('./computer-steps').ComputerStepRun;
|
|
301
307
|
lastAction?: ComputerLastAction;
|
|
308
|
+
/** A goal run stopped at a field it has no literal value for: the agent is asked for it. */
|
|
309
|
+
fieldRequest?: {
|
|
310
|
+
label: string;
|
|
311
|
+
application?: string;
|
|
312
|
+
windowTitle?: string;
|
|
313
|
+
role?: string;
|
|
314
|
+
reason: 'missing';
|
|
315
|
+
};
|
|
302
316
|
}
|
|
303
317
|
/** The command's own interaction, for the owner's outcome line. Never typed text. */
|
|
304
318
|
export interface ComputerLastAction {
|
|
@@ -318,7 +332,27 @@ export interface ComputerLastAction {
|
|
|
318
332
|
target?: string;
|
|
319
333
|
/** Asked by the vision loop: a yes resumes it there, where the target was hashed. */
|
|
320
334
|
vision?: boolean;
|
|
335
|
+
/** The opened application's name from the approved catalogue, for the owner's line ("opened TradingView"). */
|
|
336
|
+
appName?: string;
|
|
321
337
|
}
|
|
338
|
+
/** GetPod Desktop opens a new relay socket 3 s after one closes (its desktop-client.ts): a lease or a look that met the
|
|
339
|
+
* gap asks again for this long before the round says the computer is offline. Pod-jinawong r11, task ec82ed05: the
|
|
340
|
+
* socket closed at 04:31:11Z while computer_acquire waited, the app was back 4 s later, and the task had already failed
|
|
341
|
+
* as "the computer went offline". Reads only (the lease, an observation): an action is never sent twice. */
|
|
342
|
+
export declare const DEVICE_RECONNECT_GRACE_MS = 12000;
|
|
343
|
+
export declare function reconnecting<T>(name: string, read: () => Promise<T>, signal: AbortSignal, graceMs?: number): Promise<T>;
|
|
344
|
+
/** The one approved application a command names, for a round that starts with a protected app in front and no target
|
|
345
|
+
* from an earlier round: an app's name as a whole word, as it is cased (any case only for a name whose casing is
|
|
346
|
+
* distinctive: an inner capital, a digit or several words, e.g. TradingView, not Maps), else its bundle id. Two apps
|
|
347
|
+
* named, or one name inside another's match, picks the longer; still two is none. Structural: the device's own app
|
|
348
|
+
* list, no word list. */
|
|
349
|
+
export declare function namedApp(text: string, apps: readonly {
|
|
350
|
+
id: string;
|
|
351
|
+
name: string;
|
|
352
|
+
}[]): {
|
|
353
|
+
id: string;
|
|
354
|
+
name: string;
|
|
355
|
+
} | undefined;
|
|
322
356
|
/** A high-impact action's exact target (kind, window, control and position), hashed: a yes covers only this. The vision
|
|
323
357
|
* loop hashes a click on an Accessibility control as its press, so a yes carries over when a run falls back here. */
|
|
324
358
|
export declare const confirmationTarget: (state: ComputerState, action: string, planned: Record<string, unknown> | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computer-use.d.ts","sourceRoot":"","sources":["../../src/automation/computer-use.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,6BAA6B,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"computer-use.d.ts","sourceRoot":"","sources":["../../src/automation/computer-use.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAwB/C,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,gEAA4D,CAAC;AAK5F,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAC,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC9D,MAAM,WAAW,YAAY;IAAE,QAAQ,EAAC,MAAM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