@athenaintel/react 0.60.0 → 0.61.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.md +225 -2
- package/dist/agent-runtime/src/client-tool-bridge.cjs +20 -2
- package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -1
- package/dist/agent-runtime/src/client-tool-bridge.d.ts +9 -4
- package/dist/agent-runtime/src/client-tool-bridge.js +20 -2
- package/dist/agent-runtime/src/client-tool-bridge.js.map +1 -1
- package/dist/agent-runtime/src/client-tools.cjs.map +1 -1
- package/dist/agent-runtime/src/client-tools.d.ts +9 -0
- package/dist/agent-runtime/src/client-tools.js.map +1 -1
- package/dist/agent-ui/AgentTarget.cjs +11 -0
- package/dist/agent-ui/AgentTarget.cjs.map +1 -0
- package/dist/agent-ui/AgentTarget.d.ts +17 -0
- package/dist/agent-ui/AgentTarget.js +11 -0
- package/dist/agent-ui/AgentTarget.js.map +1 -0
- package/dist/agent-ui/AgentUiLayer.cjs +387 -0
- package/dist/agent-ui/AgentUiLayer.cjs.map +1 -0
- package/dist/agent-ui/AgentUiLayer.d.ts +40 -0
- package/dist/agent-ui/AgentUiLayer.js +387 -0
- package/dist/agent-ui/AgentUiLayer.js.map +1 -0
- package/dist/agent-ui/contract.cjs +104 -0
- package/dist/agent-ui/contract.cjs.map +1 -0
- package/dist/agent-ui/contract.d.ts +113 -0
- package/dist/agent-ui/contract.js +104 -0
- package/dist/agent-ui/contract.js.map +1 -0
- package/dist/agent-ui/driver.cjs +335 -0
- package/dist/agent-ui/driver.cjs.map +1 -0
- package/dist/agent-ui/driver.d.ts +66 -0
- package/dist/agent-ui/driver.js +335 -0
- package/dist/agent-ui/driver.js.map +1 -0
- package/dist/agent-ui/index.cjs +33 -0
- package/dist/agent-ui/index.cjs.map +1 -0
- package/dist/agent-ui/index.d.ts +19 -0
- package/dist/agent-ui/index.js +33 -0
- package/dist/agent-ui/index.js.map +1 -0
- package/dist/agent-ui/pace.cjs +121 -0
- package/dist/agent-ui/pace.cjs.map +1 -0
- package/dist/agent-ui/pace.d.ts +66 -0
- package/dist/agent-ui/pace.js +121 -0
- package/dist/agent-ui/pace.js.map +1 -0
- package/dist/agent-ui/screen.cjs +471 -0
- package/dist/agent-ui/screen.cjs.map +1 -0
- package/dist/agent-ui/screen.d.ts +97 -0
- package/dist/agent-ui/screen.js +471 -0
- package/dist/agent-ui/screen.js.map +1 -0
- package/dist/agent-ui/secret-fields.cjs +50 -0
- package/dist/agent-ui/secret-fields.cjs.map +1 -0
- package/dist/agent-ui/secret-fields.d.ts +15 -0
- package/dist/agent-ui/secret-fields.js +50 -0
- package/dist/agent-ui/secret-fields.js.map +1 -0
- package/dist/agent-ui/stage.cjs +196 -0
- package/dist/agent-ui/stage.cjs.map +1 -0
- package/dist/agent-ui/stage.d.ts +110 -0
- package/dist/agent-ui/stage.js +196 -0
- package/dist/agent-ui/stage.js.map +1 -0
- package/dist/agent-ui/tools.cjs +448 -0
- package/dist/agent-ui/tools.cjs.map +1 -0
- package/dist/agent-ui/tools.d.ts +103 -0
- package/dist/agent-ui/tools.js +448 -0
- package/dist/agent-ui/tools.js.map +1 -0
- package/dist/agent-ui/use-agent-target.cjs +63 -0
- package/dist/agent-ui/use-agent-target.cjs.map +1 -0
- package/dist/agent-ui/use-agent-target.d.ts +27 -0
- package/dist/agent-ui/use-agent-target.js +63 -0
- package/dist/agent-ui/use-agent-target.js.map +1 -0
- package/dist/agent-ui/use-agent-ui.cjs +15 -0
- package/dist/agent-ui/use-agent-ui.cjs.map +1 -0
- package/dist/agent-ui/use-agent-ui.d.ts +24 -0
- package/dist/agent-ui/use-agent-ui.js +15 -0
- package/dist/agent-ui/use-agent-ui.js.map +1 -0
- package/dist/chat/AthenaChat.cjs +19 -4
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +13 -0
- package/dist/chat/AthenaChat.js +19 -4
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireClientToolBridge.cjs +74 -1
- package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
- package/dist/chat/StatewireClientToolBridge.d.ts +16 -1
- package/dist/chat/StatewireClientToolBridge.js +75 -2
- package/dist/chat/StatewireClientToolBridge.js.map +1 -1
- package/dist/chat/StatewireClientToolConsentCard.cjs +66 -0
- package/dist/chat/StatewireClientToolConsentCard.cjs.map +1 -0
- package/dist/chat/StatewireClientToolConsentCard.d.ts +25 -0
- package/dist/chat/StatewireClientToolConsentCard.js +66 -0
- package/dist/chat/StatewireClientToolConsentCard.js.map +1 -0
- package/dist/chat/chat-voice-controls.cjs +5 -2
- package/dist/chat/chat-voice-controls.cjs.map +1 -1
- package/dist/chat/chat-voice-controls.d.ts +6 -1
- package/dist/chat/chat-voice-controls.js +6 -3
- package/dist/chat/chat-voice-controls.js.map +1 -1
- package/dist/chat/client-tool-write-consent.cjs +122 -0
- package/dist/chat/client-tool-write-consent.cjs.map +1 -0
- package/dist/chat/client-tool-write-consent.d.ts +79 -0
- package/dist/chat/client-tool-write-consent.js +122 -0
- package/dist/chat/client-tool-write-consent.js.map +1 -0
- package/dist/chat/statewire-client-tools.cjs +30 -5
- package/dist/chat/statewire-client-tools.cjs.map +1 -1
- package/dist/chat/statewire-client-tools.d.ts +34 -2
- package/dist/chat/statewire-client-tools.js +30 -5
- package/dist/chat/statewire-client-tools.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs +13 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.d.ts +12 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js +13 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +2 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +3 -2
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.cjs +2 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.cjs.map +1 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.d.ts +2 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.js +2 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.js.map +1 -1
- package/dist/chat-ui/messages/message-components.cjs +1 -1
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.d.ts +2 -2
- package/dist/chat-ui/messages/message-components.js +1 -1
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/statewire.cjs +4 -0
- package/dist/chat-ui/statewire.cjs.map +1 -1
- package/dist/chat-ui/statewire.d.ts +2 -0
- package/dist/chat-ui/statewire.js +4 -0
- package/dist/chat-ui/statewire.js.map +1 -1
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/provider/AthenaProvider.cjs +59 -11
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +25 -1
- package/dist/provider/AthenaProvider.js +55 -7
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6
|
+
const POINT_DEFAULT_MS = 5e3;
|
|
7
|
+
const POINT_MAX_MS = 3e4;
|
|
8
|
+
const STEP_MIN_MS = 2500;
|
|
9
|
+
const STEP_MS_PER_CHAR = 45;
|
|
10
|
+
const STEP_DEFAULT_MAX_MS = 12e3;
|
|
11
|
+
const MAX_STEPS = 12;
|
|
12
|
+
const NORMAL = {
|
|
13
|
+
smoothScroll: true,
|
|
14
|
+
scrollSettleMaxMs: 1200,
|
|
15
|
+
markBeforeActMs: 450,
|
|
16
|
+
cursorGlideMs: 400,
|
|
17
|
+
pressMs: 140,
|
|
18
|
+
typeCharMs: 60,
|
|
19
|
+
typeMaxMs: 2600,
|
|
20
|
+
typeByCharacter: true,
|
|
21
|
+
afterActMs: 350,
|
|
22
|
+
settleQuietMs: 150,
|
|
23
|
+
settleMaxMs: 1500,
|
|
24
|
+
lingerAfterActMs: 1200,
|
|
25
|
+
fadeMs: 600
|
|
26
|
+
};
|
|
27
|
+
const QUICK = {
|
|
28
|
+
...NORMAL,
|
|
29
|
+
markBeforeActMs: 200,
|
|
30
|
+
cursorGlideMs: 200,
|
|
31
|
+
pressMs: 70,
|
|
32
|
+
typeCharMs: 25,
|
|
33
|
+
typeMaxMs: 1200,
|
|
34
|
+
afterActMs: 200,
|
|
35
|
+
lingerAfterActMs: 700,
|
|
36
|
+
fadeMs: 300
|
|
37
|
+
};
|
|
38
|
+
const INSTANT = {
|
|
39
|
+
smoothScroll: false,
|
|
40
|
+
scrollSettleMaxMs: 0,
|
|
41
|
+
markBeforeActMs: 0,
|
|
42
|
+
cursorGlideMs: 0,
|
|
43
|
+
pressMs: 0,
|
|
44
|
+
typeCharMs: 0,
|
|
45
|
+
typeMaxMs: 0,
|
|
46
|
+
typeByCharacter: false,
|
|
47
|
+
afterActMs: 0,
|
|
48
|
+
settleQuietMs: 0,
|
|
49
|
+
settleMaxMs: 0,
|
|
50
|
+
lingerAfterActMs: 0,
|
|
51
|
+
fadeMs: 0
|
|
52
|
+
};
|
|
53
|
+
function prefersReducedMotion(doc) {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
try {
|
|
56
|
+
return ((_b = (_a = doc.defaultView) == null ? void 0 : _a.matchMedia) == null ? void 0 : _b.call(_a, "(prefers-reduced-motion: reduce)").matches) === true;
|
|
57
|
+
} catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function resolvePace({
|
|
62
|
+
speed,
|
|
63
|
+
reducedMotion
|
|
64
|
+
}) {
|
|
65
|
+
const base = speed === "instant" ? INSTANT : speed === "quick" ? QUICK : NORMAL;
|
|
66
|
+
if (!reducedMotion || speed === "instant") return base;
|
|
67
|
+
return { ...base, smoothScroll: false, cursorGlideMs: 0, typeByCharacter: false };
|
|
68
|
+
}
|
|
69
|
+
class AgentUiInterrupted extends Error {
|
|
70
|
+
constructor(reason) {
|
|
71
|
+
super(reason === "person" ? "The person took over." : "The run was stopped.");
|
|
72
|
+
__publicField(this, "reason");
|
|
73
|
+
this.name = "AgentUiInterrupted";
|
|
74
|
+
this.reason = reason;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function interruptOf(signal) {
|
|
78
|
+
return new AgentUiInterrupted(signal.reason === "person" ? "person" : "stopped");
|
|
79
|
+
}
|
|
80
|
+
function throwIfInterrupted(signal) {
|
|
81
|
+
if (signal == null ? void 0 : signal.aborted) throw interruptOf(signal);
|
|
82
|
+
}
|
|
83
|
+
function pause(ms, signal) {
|
|
84
|
+
throwIfInterrupted(signal);
|
|
85
|
+
if (ms <= 0) return Promise.resolve();
|
|
86
|
+
return new Promise((resolve, reject) => {
|
|
87
|
+
const onAbort = () => {
|
|
88
|
+
clearTimeout(timer);
|
|
89
|
+
reject(signal ? interruptOf(signal) : new AgentUiInterrupted("stopped"));
|
|
90
|
+
};
|
|
91
|
+
const timer = setTimeout(() => {
|
|
92
|
+
signal == null ? void 0 : signal.removeEventListener("abort", onAbort);
|
|
93
|
+
resolve();
|
|
94
|
+
}, ms);
|
|
95
|
+
signal == null ? void 0 : signal.addEventListener("abort", onAbort, { once: true });
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function stepDurationMs({ text, seconds }) {
|
|
99
|
+
if (typeof seconds === "number" && Number.isFinite(seconds) && seconds > 0) {
|
|
100
|
+
return Math.min(Math.max(seconds * 1e3, 1e3), POINT_MAX_MS);
|
|
101
|
+
}
|
|
102
|
+
return Math.min(Math.max(STEP_MIN_MS + text.length * STEP_MS_PER_CHAR, STEP_MIN_MS), STEP_DEFAULT_MAX_MS);
|
|
103
|
+
}
|
|
104
|
+
function pointDurationMs(seconds) {
|
|
105
|
+
if (typeof seconds !== "number" || !Number.isFinite(seconds) || seconds <= 0) return POINT_DEFAULT_MS;
|
|
106
|
+
return Math.min(Math.max(seconds * 1e3, 1e3), POINT_MAX_MS);
|
|
107
|
+
}
|
|
108
|
+
exports.AgentUiInterrupted = AgentUiInterrupted;
|
|
109
|
+
exports.MAX_STEPS = MAX_STEPS;
|
|
110
|
+
exports.POINT_DEFAULT_MS = POINT_DEFAULT_MS;
|
|
111
|
+
exports.POINT_MAX_MS = POINT_MAX_MS;
|
|
112
|
+
exports.STEP_DEFAULT_MAX_MS = STEP_DEFAULT_MAX_MS;
|
|
113
|
+
exports.STEP_MIN_MS = STEP_MIN_MS;
|
|
114
|
+
exports.STEP_MS_PER_CHAR = STEP_MS_PER_CHAR;
|
|
115
|
+
exports.pause = pause;
|
|
116
|
+
exports.pointDurationMs = pointDurationMs;
|
|
117
|
+
exports.prefersReducedMotion = prefersReducedMotion;
|
|
118
|
+
exports.resolvePace = resolvePace;
|
|
119
|
+
exports.stepDurationMs = stepDurationMs;
|
|
120
|
+
exports.throwIfInterrupted = throwIfInterrupted;
|
|
121
|
+
//# sourceMappingURL=pace.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pace.cjs","sources":["../../src/agent-ui/pace.ts"],"sourcesContent":["/*\n * Pacing: every action the agent takes on the page is shown at a speed a\n * person can follow. It scrolls there, marks the element, then acts.\n *\n * The numbers follow what Athena's own surfaces already use: the highlight\n * stays five seconds unless told otherwise and thirty at most\n * (`highlight_in_asset`), the cursor glides in 400 ms (Athena in Chrome), and\n * a person who prefers reduced motion gets the same steps without the motion:\n * scrolls jump, the cursor lands in place and typed text arrives whole.\n */\n\n/** How fast the agent's actions play: at a followable pace, briskly, or with no waiting at all. */\nexport type AgentUiSpeed = 'normal' | 'quick' | 'instant';\n\nexport interface AgentUiPace {\n /** Scroll smoothly (false: jump). */\n smoothScroll: boolean;\n /** The longest a scroll is waited on before the next step. */\n scrollSettleMaxMs: number;\n /** How long the mark shows on an element before the agent acts on it. */\n markBeforeActMs: number;\n /** The cursor's glide to an element. */\n cursorGlideMs: number;\n /** The pause between the cursor arriving and the click. */\n pressMs: number;\n /** One typed character. */\n typeCharMs: number;\n /** The longest typing a value takes; longer text is typed in larger pieces. */\n typeMaxMs: number;\n /** Type character by character (false: the whole value at once). */\n typeByCharacter: boolean;\n /** The pause after acting, before the page is read back. */\n afterActMs: number;\n /** How long the page must stay unchanged to count as settled, and the longest that is waited for. */\n settleQuietMs: number;\n settleMaxMs: number;\n /** How long the mark stays after an action. */\n lingerAfterActMs: number;\n /** A mark's fade out. */\n fadeMs: number;\n}\n\n/** How long `point_at` keeps its mark when the agent names no duration. */\nexport const POINT_DEFAULT_MS = 5_000;\n/** The longest a mark or a walkthrough step stays. */\nexport const POINT_MAX_MS = 30_000;\n/** The shortest a walkthrough step stays. */\nexport const STEP_MIN_MS = 2_500;\n/** A walkthrough step's reading time, per character of its text. */\nexport const STEP_MS_PER_CHAR = 45;\n/** The longest a step stays when the agent names no duration. */\nexport const STEP_DEFAULT_MAX_MS = 12_000;\n/** The most steps one walkthrough holds. */\nexport const MAX_STEPS = 12;\n\nconst NORMAL: AgentUiPace = {\n smoothScroll: true,\n scrollSettleMaxMs: 1_200,\n markBeforeActMs: 450,\n cursorGlideMs: 400,\n pressMs: 140,\n typeCharMs: 60,\n typeMaxMs: 2_600,\n typeByCharacter: true,\n afterActMs: 350,\n settleQuietMs: 150,\n settleMaxMs: 1_500,\n lingerAfterActMs: 1_200,\n fadeMs: 600,\n};\n\nconst QUICK: AgentUiPace = {\n ...NORMAL,\n markBeforeActMs: 200,\n cursorGlideMs: 200,\n pressMs: 70,\n typeCharMs: 25,\n typeMaxMs: 1_200,\n afterActMs: 200,\n lingerAfterActMs: 700,\n fadeMs: 300,\n};\n\nconst INSTANT: AgentUiPace = {\n smoothScroll: false,\n scrollSettleMaxMs: 0,\n markBeforeActMs: 0,\n cursorGlideMs: 0,\n pressMs: 0,\n typeCharMs: 0,\n typeMaxMs: 0,\n typeByCharacter: false,\n afterActMs: 0,\n settleQuietMs: 0,\n settleMaxMs: 0,\n lingerAfterActMs: 0,\n fadeMs: 0,\n};\n\n/** Whether the person asked their system for less motion. */\nexport function prefersReducedMotion(doc: Document): boolean {\n try {\n return doc.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches === true;\n } catch {\n return false;\n }\n}\n\n/** The pace for a speed, with the motion taken out when the person prefers that. */\nexport function resolvePace({\n speed,\n reducedMotion,\n}: {\n speed: AgentUiSpeed;\n reducedMotion: boolean;\n}): AgentUiPace {\n const base = speed === 'instant' ? INSTANT : speed === 'quick' ? QUICK : NORMAL;\n if (!reducedMotion || speed === 'instant') return base;\n // The same steps and holds, with nothing travelling.\n return { ...base, smoothScroll: false, cursorGlideMs: 0, typeByCharacter: false };\n}\n\n/** Why an action in flight ended early. */\nexport type AgentUiInterruptReason = 'stopped' | 'person';\n\n/** Thrown through an action in flight when its run is stopped or the person takes over. */\nexport class AgentUiInterrupted extends Error {\n readonly reason: AgentUiInterruptReason;\n\n constructor(reason: AgentUiInterruptReason) {\n super(reason === 'person' ? 'The person took over.' : 'The run was stopped.');\n this.name = 'AgentUiInterrupted';\n this.reason = reason;\n }\n}\n\nfunction interruptOf(signal: AbortSignal): AgentUiInterrupted {\n return new AgentUiInterrupted(signal.reason === 'person' ? 'person' : 'stopped');\n}\n\n/** Throws when the action was interrupted. */\nexport function throwIfInterrupted(signal: AbortSignal | undefined): void {\n if (signal?.aborted) throw interruptOf(signal);\n}\n\n/** Wait `ms`, ending early (by throwing {@link AgentUiInterrupted}) when the action is interrupted. */\nexport function pause(ms: number, signal?: AbortSignal): Promise<void> {\n throwIfInterrupted(signal);\n if (ms <= 0) return Promise.resolve();\n return new Promise<void>((resolve, reject) => {\n const onAbort = () => {\n clearTimeout(timer);\n reject(signal ? interruptOf(signal) : new AgentUiInterrupted('stopped'));\n };\n const timer = setTimeout(() => {\n signal?.removeEventListener('abort', onAbort);\n resolve();\n }, ms);\n signal?.addEventListener('abort', onAbort, { once: true });\n });\n}\n\n/** The reading time of a walkthrough step that names no duration. */\nexport function stepDurationMs({ text, seconds }: { text: string; seconds?: number }): number {\n if (typeof seconds === 'number' && Number.isFinite(seconds) && seconds > 0) {\n return Math.min(Math.max(seconds * 1_000, 1_000), POINT_MAX_MS);\n }\n return Math.min(Math.max(STEP_MIN_MS + text.length * STEP_MS_PER_CHAR, STEP_MIN_MS), STEP_DEFAULT_MAX_MS);\n}\n\n/** How long a mark stays for the seconds the agent asked for. */\nexport function pointDurationMs(seconds: number | undefined): number {\n if (typeof seconds !== 'number' || !Number.isFinite(seconds) || seconds <= 0) return POINT_DEFAULT_MS;\n return Math.min(Math.max(seconds * 1_000, 1_000), POINT_MAX_MS);\n}\n"],"names":[],"mappings":";;;;;AA2CO,MAAM,mBAAmB;AAEzB,MAAM,eAAe;AAErB,MAAM,cAAc;AAEpB,MAAM,mBAAmB;AAEzB,MAAM,sBAAsB;AAE5B,MAAM,YAAY;AAEzB,MAAM,SAAsB;AAAA,EAC1B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AAAA,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,SAAS,MAAM,IAAY,QAAqC;AACrE,qBAAmB,MAAM;AACzB,MAAI,MAAM,EAAG,QAAO,QAAQ,QAAA;AAC5B,SAAO,IAAI,QAAc,CAAC,SAAS,WAAW;AAC5C,UAAM,UAAU,MAAM;AACpB,mBAAa,KAAK;AAClB,aAAO,SAAS,YAAY,MAAM,IAAI,IAAI,mBAAmB,SAAS,CAAC;AAAA,IACzE;AACA,UAAM,QAAQ,WAAW,MAAM;AAC7B,uCAAQ,oBAAoB,SAAS;AACrC,cAAA;AAAA,IACF,GAAG,EAAE;AACL,qCAAQ,iBAAiB,SAAS,SAAS,EAAE,MAAM;EACrD,CAAC;AACH;AAGO,SAAS,eAAe,EAAE,MAAM,WAAuD;AAC5F,MAAI,OAAO,YAAY,YAAY,OAAO,SAAS,OAAO,KAAK,UAAU,GAAG;AAC1E,WAAO,KAAK,IAAI,KAAK,IAAI,UAAU,KAAO,GAAK,GAAG,YAAY;AAAA,EAChE;AACA,SAAO,KAAK,IAAI,KAAK,IAAI,cAAc,KAAK,SAAS,kBAAkB,WAAW,GAAG,mBAAmB;AAC1G;AAGO,SAAS,gBAAgB,SAAqC;AACnE,MAAI,OAAO,YAAY,YAAY,CAAC,OAAO,SAAS,OAAO,KAAK,WAAW,EAAG,QAAO;AACrF,SAAO,KAAK,IAAI,KAAK,IAAI,UAAU,KAAO,GAAK,GAAG,YAAY;AAChE;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** How fast the agent's actions play: at a followable pace, briskly, or with no waiting at all. */
|
|
2
|
+
export type AgentUiSpeed = 'normal' | 'quick' | 'instant';
|
|
3
|
+
export interface AgentUiPace {
|
|
4
|
+
/** Scroll smoothly (false: jump). */
|
|
5
|
+
smoothScroll: boolean;
|
|
6
|
+
/** The longest a scroll is waited on before the next step. */
|
|
7
|
+
scrollSettleMaxMs: number;
|
|
8
|
+
/** How long the mark shows on an element before the agent acts on it. */
|
|
9
|
+
markBeforeActMs: number;
|
|
10
|
+
/** The cursor's glide to an element. */
|
|
11
|
+
cursorGlideMs: number;
|
|
12
|
+
/** The pause between the cursor arriving and the click. */
|
|
13
|
+
pressMs: number;
|
|
14
|
+
/** One typed character. */
|
|
15
|
+
typeCharMs: number;
|
|
16
|
+
/** The longest typing a value takes; longer text is typed in larger pieces. */
|
|
17
|
+
typeMaxMs: number;
|
|
18
|
+
/** Type character by character (false: the whole value at once). */
|
|
19
|
+
typeByCharacter: boolean;
|
|
20
|
+
/** The pause after acting, before the page is read back. */
|
|
21
|
+
afterActMs: number;
|
|
22
|
+
/** How long the page must stay unchanged to count as settled, and the longest that is waited for. */
|
|
23
|
+
settleQuietMs: number;
|
|
24
|
+
settleMaxMs: number;
|
|
25
|
+
/** How long the mark stays after an action. */
|
|
26
|
+
lingerAfterActMs: number;
|
|
27
|
+
/** A mark's fade out. */
|
|
28
|
+
fadeMs: number;
|
|
29
|
+
}
|
|
30
|
+
/** How long `point_at` keeps its mark when the agent names no duration. */
|
|
31
|
+
export declare const POINT_DEFAULT_MS = 5000;
|
|
32
|
+
/** The longest a mark or a walkthrough step stays. */
|
|
33
|
+
export declare const POINT_MAX_MS = 30000;
|
|
34
|
+
/** The shortest a walkthrough step stays. */
|
|
35
|
+
export declare const STEP_MIN_MS = 2500;
|
|
36
|
+
/** A walkthrough step's reading time, per character of its text. */
|
|
37
|
+
export declare const STEP_MS_PER_CHAR = 45;
|
|
38
|
+
/** The longest a step stays when the agent names no duration. */
|
|
39
|
+
export declare const STEP_DEFAULT_MAX_MS = 12000;
|
|
40
|
+
/** The most steps one walkthrough holds. */
|
|
41
|
+
export declare const MAX_STEPS = 12;
|
|
42
|
+
/** Whether the person asked their system for less motion. */
|
|
43
|
+
export declare function prefersReducedMotion(doc: Document): boolean;
|
|
44
|
+
/** The pace for a speed, with the motion taken out when the person prefers that. */
|
|
45
|
+
export declare function resolvePace({ speed, reducedMotion, }: {
|
|
46
|
+
speed: AgentUiSpeed;
|
|
47
|
+
reducedMotion: boolean;
|
|
48
|
+
}): AgentUiPace;
|
|
49
|
+
/** Why an action in flight ended early. */
|
|
50
|
+
export type AgentUiInterruptReason = 'stopped' | 'person';
|
|
51
|
+
/** Thrown through an action in flight when its run is stopped or the person takes over. */
|
|
52
|
+
export declare class AgentUiInterrupted extends Error {
|
|
53
|
+
readonly reason: AgentUiInterruptReason;
|
|
54
|
+
constructor(reason: AgentUiInterruptReason);
|
|
55
|
+
}
|
|
56
|
+
/** Throws when the action was interrupted. */
|
|
57
|
+
export declare function throwIfInterrupted(signal: AbortSignal | undefined): void;
|
|
58
|
+
/** Wait `ms`, ending early (by throwing {@link AgentUiInterrupted}) when the action is interrupted. */
|
|
59
|
+
export declare function pause(ms: number, signal?: AbortSignal): Promise<void>;
|
|
60
|
+
/** The reading time of a walkthrough step that names no duration. */
|
|
61
|
+
export declare function stepDurationMs({ text, seconds }: {
|
|
62
|
+
text: string;
|
|
63
|
+
seconds?: number;
|
|
64
|
+
}): number;
|
|
65
|
+
/** How long a mark stays for the seconds the agent asked for. */
|
|
66
|
+
export declare function pointDurationMs(seconds: number | undefined): number;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
const POINT_DEFAULT_MS = 5e3;
|
|
5
|
+
const POINT_MAX_MS = 3e4;
|
|
6
|
+
const STEP_MIN_MS = 2500;
|
|
7
|
+
const STEP_MS_PER_CHAR = 45;
|
|
8
|
+
const STEP_DEFAULT_MAX_MS = 12e3;
|
|
9
|
+
const MAX_STEPS = 12;
|
|
10
|
+
const NORMAL = {
|
|
11
|
+
smoothScroll: true,
|
|
12
|
+
scrollSettleMaxMs: 1200,
|
|
13
|
+
markBeforeActMs: 450,
|
|
14
|
+
cursorGlideMs: 400,
|
|
15
|
+
pressMs: 140,
|
|
16
|
+
typeCharMs: 60,
|
|
17
|
+
typeMaxMs: 2600,
|
|
18
|
+
typeByCharacter: true,
|
|
19
|
+
afterActMs: 350,
|
|
20
|
+
settleQuietMs: 150,
|
|
21
|
+
settleMaxMs: 1500,
|
|
22
|
+
lingerAfterActMs: 1200,
|
|
23
|
+
fadeMs: 600
|
|
24
|
+
};
|
|
25
|
+
const QUICK = {
|
|
26
|
+
...NORMAL,
|
|
27
|
+
markBeforeActMs: 200,
|
|
28
|
+
cursorGlideMs: 200,
|
|
29
|
+
pressMs: 70,
|
|
30
|
+
typeCharMs: 25,
|
|
31
|
+
typeMaxMs: 1200,
|
|
32
|
+
afterActMs: 200,
|
|
33
|
+
lingerAfterActMs: 700,
|
|
34
|
+
fadeMs: 300
|
|
35
|
+
};
|
|
36
|
+
const INSTANT = {
|
|
37
|
+
smoothScroll: false,
|
|
38
|
+
scrollSettleMaxMs: 0,
|
|
39
|
+
markBeforeActMs: 0,
|
|
40
|
+
cursorGlideMs: 0,
|
|
41
|
+
pressMs: 0,
|
|
42
|
+
typeCharMs: 0,
|
|
43
|
+
typeMaxMs: 0,
|
|
44
|
+
typeByCharacter: false,
|
|
45
|
+
afterActMs: 0,
|
|
46
|
+
settleQuietMs: 0,
|
|
47
|
+
settleMaxMs: 0,
|
|
48
|
+
lingerAfterActMs: 0,
|
|
49
|
+
fadeMs: 0
|
|
50
|
+
};
|
|
51
|
+
function prefersReducedMotion(doc) {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
try {
|
|
54
|
+
return ((_b = (_a = doc.defaultView) == null ? void 0 : _a.matchMedia) == null ? void 0 : _b.call(_a, "(prefers-reduced-motion: reduce)").matches) === true;
|
|
55
|
+
} catch {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function resolvePace({
|
|
60
|
+
speed,
|
|
61
|
+
reducedMotion
|
|
62
|
+
}) {
|
|
63
|
+
const base = speed === "instant" ? INSTANT : speed === "quick" ? QUICK : NORMAL;
|
|
64
|
+
if (!reducedMotion || speed === "instant") return base;
|
|
65
|
+
return { ...base, smoothScroll: false, cursorGlideMs: 0, typeByCharacter: false };
|
|
66
|
+
}
|
|
67
|
+
class AgentUiInterrupted extends Error {
|
|
68
|
+
constructor(reason) {
|
|
69
|
+
super(reason === "person" ? "The person took over." : "The run was stopped.");
|
|
70
|
+
__publicField(this, "reason");
|
|
71
|
+
this.name = "AgentUiInterrupted";
|
|
72
|
+
this.reason = reason;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function interruptOf(signal) {
|
|
76
|
+
return new AgentUiInterrupted(signal.reason === "person" ? "person" : "stopped");
|
|
77
|
+
}
|
|
78
|
+
function throwIfInterrupted(signal) {
|
|
79
|
+
if (signal == null ? void 0 : signal.aborted) throw interruptOf(signal);
|
|
80
|
+
}
|
|
81
|
+
function pause(ms, signal) {
|
|
82
|
+
throwIfInterrupted(signal);
|
|
83
|
+
if (ms <= 0) return Promise.resolve();
|
|
84
|
+
return new Promise((resolve, reject) => {
|
|
85
|
+
const onAbort = () => {
|
|
86
|
+
clearTimeout(timer);
|
|
87
|
+
reject(signal ? interruptOf(signal) : new AgentUiInterrupted("stopped"));
|
|
88
|
+
};
|
|
89
|
+
const timer = setTimeout(() => {
|
|
90
|
+
signal == null ? void 0 : signal.removeEventListener("abort", onAbort);
|
|
91
|
+
resolve();
|
|
92
|
+
}, ms);
|
|
93
|
+
signal == null ? void 0 : signal.addEventListener("abort", onAbort, { once: true });
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function stepDurationMs({ text, seconds }) {
|
|
97
|
+
if (typeof seconds === "number" && Number.isFinite(seconds) && seconds > 0) {
|
|
98
|
+
return Math.min(Math.max(seconds * 1e3, 1e3), POINT_MAX_MS);
|
|
99
|
+
}
|
|
100
|
+
return Math.min(Math.max(STEP_MIN_MS + text.length * STEP_MS_PER_CHAR, STEP_MIN_MS), STEP_DEFAULT_MAX_MS);
|
|
101
|
+
}
|
|
102
|
+
function pointDurationMs(seconds) {
|
|
103
|
+
if (typeof seconds !== "number" || !Number.isFinite(seconds) || seconds <= 0) return POINT_DEFAULT_MS;
|
|
104
|
+
return Math.min(Math.max(seconds * 1e3, 1e3), POINT_MAX_MS);
|
|
105
|
+
}
|
|
106
|
+
export {
|
|
107
|
+
AgentUiInterrupted,
|
|
108
|
+
MAX_STEPS,
|
|
109
|
+
POINT_DEFAULT_MS,
|
|
110
|
+
POINT_MAX_MS,
|
|
111
|
+
STEP_DEFAULT_MAX_MS,
|
|
112
|
+
STEP_MIN_MS,
|
|
113
|
+
STEP_MS_PER_CHAR,
|
|
114
|
+
pause,
|
|
115
|
+
pointDurationMs,
|
|
116
|
+
prefersReducedMotion,
|
|
117
|
+
resolvePace,
|
|
118
|
+
stepDurationMs,
|
|
119
|
+
throwIfInterrupted
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=pace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pace.js","sources":["../../src/agent-ui/pace.ts"],"sourcesContent":["/*\n * Pacing: every action the agent takes on the page is shown at a speed a\n * person can follow. It scrolls there, marks the element, then acts.\n *\n * The numbers follow what Athena's own surfaces already use: the highlight\n * stays five seconds unless told otherwise and thirty at most\n * (`highlight_in_asset`), the cursor glides in 400 ms (Athena in Chrome), and\n * a person who prefers reduced motion gets the same steps without the motion:\n * scrolls jump, the cursor lands in place and typed text arrives whole.\n */\n\n/** How fast the agent's actions play: at a followable pace, briskly, or with no waiting at all. */\nexport type AgentUiSpeed = 'normal' | 'quick' | 'instant';\n\nexport interface AgentUiPace {\n /** Scroll smoothly (false: jump). */\n smoothScroll: boolean;\n /** The longest a scroll is waited on before the next step. */\n scrollSettleMaxMs: number;\n /** How long the mark shows on an element before the agent acts on it. */\n markBeforeActMs: number;\n /** The cursor's glide to an element. */\n cursorGlideMs: number;\n /** The pause between the cursor arriving and the click. */\n pressMs: number;\n /** One typed character. */\n typeCharMs: number;\n /** The longest typing a value takes; longer text is typed in larger pieces. */\n typeMaxMs: number;\n /** Type character by character (false: the whole value at once). */\n typeByCharacter: boolean;\n /** The pause after acting, before the page is read back. */\n afterActMs: number;\n /** How long the page must stay unchanged to count as settled, and the longest that is waited for. */\n settleQuietMs: number;\n settleMaxMs: number;\n /** How long the mark stays after an action. */\n lingerAfterActMs: number;\n /** A mark's fade out. */\n fadeMs: number;\n}\n\n/** How long `point_at` keeps its mark when the agent names no duration. */\nexport const POINT_DEFAULT_MS = 5_000;\n/** The longest a mark or a walkthrough step stays. */\nexport const POINT_MAX_MS = 30_000;\n/** The shortest a walkthrough step stays. */\nexport const STEP_MIN_MS = 2_500;\n/** A walkthrough step's reading time, per character of its text. */\nexport const STEP_MS_PER_CHAR = 45;\n/** The longest a step stays when the agent names no duration. */\nexport const STEP_DEFAULT_MAX_MS = 12_000;\n/** The most steps one walkthrough holds. */\nexport const MAX_STEPS = 12;\n\nconst NORMAL: AgentUiPace = {\n smoothScroll: true,\n scrollSettleMaxMs: 1_200,\n markBeforeActMs: 450,\n cursorGlideMs: 400,\n pressMs: 140,\n typeCharMs: 60,\n typeMaxMs: 2_600,\n typeByCharacter: true,\n afterActMs: 350,\n settleQuietMs: 150,\n settleMaxMs: 1_500,\n lingerAfterActMs: 1_200,\n fadeMs: 600,\n};\n\nconst QUICK: AgentUiPace = {\n ...NORMAL,\n markBeforeActMs: 200,\n cursorGlideMs: 200,\n pressMs: 70,\n typeCharMs: 25,\n typeMaxMs: 1_200,\n afterActMs: 200,\n lingerAfterActMs: 700,\n fadeMs: 300,\n};\n\nconst INSTANT: AgentUiPace = {\n smoothScroll: false,\n scrollSettleMaxMs: 0,\n markBeforeActMs: 0,\n cursorGlideMs: 0,\n pressMs: 0,\n typeCharMs: 0,\n typeMaxMs: 0,\n typeByCharacter: false,\n afterActMs: 0,\n settleQuietMs: 0,\n settleMaxMs: 0,\n lingerAfterActMs: 0,\n fadeMs: 0,\n};\n\n/** Whether the person asked their system for less motion. */\nexport function prefersReducedMotion(doc: Document): boolean {\n try {\n return doc.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches === true;\n } catch {\n return false;\n }\n}\n\n/** The pace for a speed, with the motion taken out when the person prefers that. */\nexport function resolvePace({\n speed,\n reducedMotion,\n}: {\n speed: AgentUiSpeed;\n reducedMotion: boolean;\n}): AgentUiPace {\n const base = speed === 'instant' ? INSTANT : speed === 'quick' ? QUICK : NORMAL;\n if (!reducedMotion || speed === 'instant') return base;\n // The same steps and holds, with nothing travelling.\n return { ...base, smoothScroll: false, cursorGlideMs: 0, typeByCharacter: false };\n}\n\n/** Why an action in flight ended early. */\nexport type AgentUiInterruptReason = 'stopped' | 'person';\n\n/** Thrown through an action in flight when its run is stopped or the person takes over. */\nexport class AgentUiInterrupted extends Error {\n readonly reason: AgentUiInterruptReason;\n\n constructor(reason: AgentUiInterruptReason) {\n super(reason === 'person' ? 'The person took over.' : 'The run was stopped.');\n this.name = 'AgentUiInterrupted';\n this.reason = reason;\n }\n}\n\nfunction interruptOf(signal: AbortSignal): AgentUiInterrupted {\n return new AgentUiInterrupted(signal.reason === 'person' ? 'person' : 'stopped');\n}\n\n/** Throws when the action was interrupted. */\nexport function throwIfInterrupted(signal: AbortSignal | undefined): void {\n if (signal?.aborted) throw interruptOf(signal);\n}\n\n/** Wait `ms`, ending early (by throwing {@link AgentUiInterrupted}) when the action is interrupted. */\nexport function pause(ms: number, signal?: AbortSignal): Promise<void> {\n throwIfInterrupted(signal);\n if (ms <= 0) return Promise.resolve();\n return new Promise<void>((resolve, reject) => {\n const onAbort = () => {\n clearTimeout(timer);\n reject(signal ? interruptOf(signal) : new AgentUiInterrupted('stopped'));\n };\n const timer = setTimeout(() => {\n signal?.removeEventListener('abort', onAbort);\n resolve();\n }, ms);\n signal?.addEventListener('abort', onAbort, { once: true });\n });\n}\n\n/** The reading time of a walkthrough step that names no duration. */\nexport function stepDurationMs({ text, seconds }: { text: string; seconds?: number }): number {\n if (typeof seconds === 'number' && Number.isFinite(seconds) && seconds > 0) {\n return Math.min(Math.max(seconds * 1_000, 1_000), POINT_MAX_MS);\n }\n return Math.min(Math.max(STEP_MIN_MS + text.length * STEP_MS_PER_CHAR, STEP_MIN_MS), STEP_DEFAULT_MAX_MS);\n}\n\n/** How long a mark stays for the seconds the agent asked for. */\nexport function pointDurationMs(seconds: number | undefined): number {\n if (typeof seconds !== 'number' || !Number.isFinite(seconds) || seconds <= 0) return POINT_DEFAULT_MS;\n return Math.min(Math.max(seconds * 1_000, 1_000), POINT_MAX_MS);\n}\n"],"names":[],"mappings":";;;AA2CO,MAAM,mBAAmB;AAEzB,MAAM,eAAe;AAErB,MAAM,cAAc;AAEpB,MAAM,mBAAmB;AAEzB,MAAM,sBAAsB;AAE5B,MAAM,YAAY;AAEzB,MAAM,SAAsB;AAAA,EAC1B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,QAAQ;AACV;AAEA,MAAM,QAAqB;AAAA,EACzB,GAAG;AAAA,EACH,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,QAAQ;AACV;AAEA,MAAM,UAAuB;AAAA,EAC3B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,QAAQ;AACV;AAGO,SAAS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