@pinecall/dot 0.11.23 → 0.11.25
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 +145 -63
- package/dist/agent/index.d.ts +3 -2
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +2 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/tutor.d.ts +12 -10
- package/dist/agent/tutor.d.ts.map +1 -1
- package/dist/agent/tutor.js +81 -68
- package/dist/agent/tutor.js.map +1 -1
- package/dist/agent/walks.d.ts +19 -0
- package/dist/agent/walks.d.ts.map +1 -0
- package/dist/agent/walks.js +89 -0
- package/dist/agent/walks.js.map +1 -0
- package/dist/page/page.d.ts +2 -2
- package/dist/page/page.d.ts.map +1 -1
- package/dist/page/page.js +5 -5
- package/dist/page/page.js.map +1 -1
- package/dist/page/roles.d.ts +2 -0
- package/dist/page/roles.d.ts.map +1 -1
- package/dist/page/roles.js +21 -2
- package/dist/page/roles.js.map +1 -1
- package/dist/pointer/asking.d.ts +25 -0
- package/dist/pointer/asking.d.ts.map +1 -0
- package/dist/pointer/asking.js +82 -0
- package/dist/pointer/asking.js.map +1 -0
- package/dist/pointer/flight.d.ts +40 -4
- package/dist/pointer/flight.d.ts.map +1 -1
- package/dist/pointer/flight.js +139 -17
- package/dist/pointer/flight.js.map +1 -1
- package/dist/pointer/frames.d.ts +28 -0
- package/dist/pointer/frames.d.ts.map +1 -0
- package/dist/pointer/frames.js +66 -0
- package/dist/pointer/frames.js.map +1 -0
- package/dist/pointer/icons.d.ts +8 -0
- package/dist/pointer/icons.d.ts.map +1 -0
- package/dist/pointer/icons.js +15 -0
- package/dist/pointer/icons.js.map +1 -0
- package/dist/pointer/menu.d.ts +5 -4
- package/dist/pointer/menu.d.ts.map +1 -1
- package/dist/pointer/menu.js +56 -47
- package/dist/pointer/menu.js.map +1 -1
- package/dist/pointer/person.d.ts +13 -2
- package/dist/pointer/person.d.ts.map +1 -1
- package/dist/pointer/person.js +47 -41
- package/dist/pointer/person.js.map +1 -1
- package/dist/pointer/pressing.d.ts +6 -0
- package/dist/pointer/pressing.d.ts.map +1 -0
- package/dist/pointer/pressing.js +32 -0
- package/dist/pointer/pressing.js.map +1 -0
- package/dist/pointer/sections.d.ts +4 -7
- package/dist/pointer/sections.d.ts.map +1 -1
- package/dist/pointer/sections.js +11 -17
- package/dist/pointer/sections.js.map +1 -1
- package/dist/pointer/typing.d.ts +5 -3
- package/dist/pointer/typing.d.ts.map +1 -1
- package/dist/pointer/typing.js +46 -15
- package/dist/pointer/typing.js.map +1 -1
- package/dist/server/index.d.ts +34 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +108 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/questions.d.ts +30 -0
- package/dist/server/questions.d.ts.map +1 -0
- package/dist/server/questions.js +136 -0
- package/dist/server/questions.js.map +1 -0
- package/dist/server/saying.d.ts +31 -0
- package/dist/server/saying.d.ts.map +1 -0
- package/dist/server/saying.js +124 -0
- package/dist/server/saying.js.map +1 -0
- package/dist/tutor/acting.d.ts +42 -0
- package/dist/tutor/acting.d.ts.map +1 -0
- package/dist/tutor/acting.js +180 -0
- package/dist/tutor/acting.js.map +1 -0
- package/dist/tutor/aloud.d.ts +50 -0
- package/dist/tutor/aloud.d.ts.map +1 -0
- package/dist/tutor/aloud.js +288 -0
- package/dist/tutor/aloud.js.map +1 -0
- package/dist/tutor/ask.d.ts +49 -0
- package/dist/tutor/ask.d.ts.map +1 -0
- package/dist/tutor/ask.js +47 -0
- package/dist/tutor/ask.js.map +1 -0
- package/dist/tutor/listening.d.ts +17 -0
- package/dist/tutor/listening.d.ts.map +1 -0
- package/dist/tutor/listening.js +66 -0
- package/dist/tutor/listening.js.map +1 -0
- package/dist/tutor/options.d.ts +37 -1
- package/dist/tutor/options.d.ts.map +1 -1
- package/dist/tutor/options.js +1 -1
- package/dist/tutor/options.js.map +1 -1
- package/dist/tutor/reading.d.ts +58 -0
- package/dist/tutor/reading.d.ts.map +1 -0
- package/dist/tutor/reading.js +193 -0
- package/dist/tutor/reading.js.map +1 -0
- package/dist/tutor/text.d.ts +16 -0
- package/dist/tutor/text.d.ts.map +1 -0
- package/dist/tutor/text.js +119 -0
- package/dist/tutor/text.js.map +1 -0
- package/dist/tutor/tutor.d.ts +2 -9
- package/dist/tutor/tutor.d.ts.map +1 -1
- package/dist/tutor/tutor.js +110 -87
- package/dist/tutor/tutor.js.map +1 -1
- package/dist/tutor/walking.d.ts +26 -8
- package/dist/tutor/walking.d.ts.map +1 -1
- package/dist/tutor/walking.js +145 -30
- package/dist/tutor/walking.js.map +1 -1
- package/dist/tutor/walks.d.ts +33 -0
- package/dist/tutor/walks.d.ts.map +1 -1
- package/dist/tutor/walks.js +121 -13
- package/dist/tutor/walks.js.map +1 -1
- package/dist/wire/acts.d.ts +60 -0
- package/dist/wire/acts.d.ts.map +1 -0
- package/dist/wire/acts.js +120 -0
- package/dist/wire/acts.js.map +1 -0
- package/dist/wire/ask.d.ts +132 -0
- package/dist/wire/ask.d.ts.map +1 -0
- package/dist/wire/ask.js +102 -0
- package/dist/wire/ask.js.map +1 -0
- package/dist/wire/index.d.ts +38 -8
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +86 -12
- package/dist/wire/index.js.map +1 -1
- package/docs/macros.md +216 -0
- package/docs/write-a-tutor.md +247 -0
- package/package.json +11 -6
package/dist/wire/index.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
// Both ride what a call already has. The page's facts go up as events (`call.event(name, data)`,
|
|
4
4
|
// the agent's `onEvent`); the agent's moves come down on `pinecall.ui`, beside its cards and
|
|
5
5
|
// choices, told apart by `type`.
|
|
6
|
+
import { actOf, guardsOf, isAct, paramsOf, slotsOf } from "./acts.js";
|
|
7
|
+
export * from "./acts.js";
|
|
6
8
|
/** The topic the agent sends on, and the page's `onUi` hears. */
|
|
7
9
|
export const UI = "pinecall.ui";
|
|
8
10
|
/**
|
|
@@ -24,12 +26,32 @@ export const WALKED = "page.walked";
|
|
|
24
26
|
/** The name the agent publishes its recorded walks under, which the page reads with no key. */
|
|
25
27
|
export const WALKS = "walks";
|
|
26
28
|
/**
|
|
27
|
-
* What the pointer can do. `type` fills a field with what the visitor said
|
|
28
|
-
*
|
|
29
|
+
* What the pointer can do. `type` fills a field with what the visitor said, and never touches a password
|
|
30
|
+
* or a card. `press` presses a button a walk names, one outside any form or in a search form: never a
|
|
31
|
+
* form that sends the visitor's details, and never a page left. `wait` waits for the page to change.
|
|
29
32
|
*/
|
|
30
|
-
export const ACTIONS = ["point", "highlight", "unhighlight", "scroll_to", "here", "home", "type"];
|
|
33
|
+
export const ACTIONS = ["point", "highlight", "unhighlight", "scroll_to", "here", "home", "type", "press", "wait"];
|
|
34
|
+
/** The moves a macro's beat cannot make: what types, presses or waits is a step of its own. */
|
|
35
|
+
const NOT_A_BEAT = ["type", "press", "wait"];
|
|
31
36
|
/** A target that is a ref of the snapshot rather than a name. */
|
|
32
37
|
export const A_REF = /^e\d+$/;
|
|
38
|
+
/** A path as a page names it: no trailing slash but the root's. */
|
|
39
|
+
const pathOf = (path) => (path.length > 1 ? path.replace(/\/+$/, "") : path) || "/";
|
|
40
|
+
/**
|
|
41
|
+
* The name of the document the walks of a page are published under: `walks` for the home, `walks-security`
|
|
42
|
+
* for `/security`. A document is read by every visitor of its page, so each page has its own: a page asks
|
|
43
|
+
* only for the walks that are for it. (A document's name is a lower case letter, then letters, digits and dashes, 40 at most.)
|
|
44
|
+
*/
|
|
45
|
+
export function walksDocument(path) {
|
|
46
|
+
const slug = pathOf(path).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
47
|
+
return slug === "" ? "walks" : `walks-${slug}`.slice(0, 40).replace(/-+$/, "");
|
|
48
|
+
}
|
|
49
|
+
/** Whether a walk for `pages` is for the page at `path`: any walk is, with no pages named; a path unknown is any page. */
|
|
50
|
+
export function onPage(pages, path) {
|
|
51
|
+
if (pages === undefined || pages.length === 0 || path === "")
|
|
52
|
+
return true;
|
|
53
|
+
return pages.some((page) => pathOf(page) === pathOf(path));
|
|
54
|
+
}
|
|
33
55
|
/** What a step shows, checked; null for one that is not: a window with no title or text, lines out of order. */
|
|
34
56
|
export function shownOf(fields) {
|
|
35
57
|
const { code, lines } = fields;
|
|
@@ -65,7 +87,7 @@ function isBeat(value) {
|
|
|
65
87
|
const nth = beat["nth"];
|
|
66
88
|
// A beat has no words to type: a macro shows, and the agent fills a field only with what the visitor said.
|
|
67
89
|
const move = beat["do"];
|
|
68
|
-
return typeof beat["word"] === "string" && isAction(move) && move
|
|
90
|
+
return typeof beat["word"] === "string" && isAction(move) && !NOT_A_BEAT.includes(move) && found && (nth === undefined || (typeof nth === "number" && nth >= 1));
|
|
69
91
|
}
|
|
70
92
|
/** A message on `pinecall.ui` the tutor carries out, or null for one that is not its own (a card, choices). */
|
|
71
93
|
export function tutoring(data) {
|
|
@@ -77,10 +99,15 @@ export function tutoring(data) {
|
|
|
77
99
|
if (message["type"] === "macro.done" && typeof message["macro"] === "string")
|
|
78
100
|
return { type: "macro.done", macro: message["macro"] };
|
|
79
101
|
const action = message["action"];
|
|
102
|
+
const ms = message["ms"];
|
|
80
103
|
if (message["type"] === "cursor" && isAction(action) && optionalText(message["target"]) && optionalText(message["text"])) {
|
|
81
104
|
if (action === "type" && (message["target"] === undefined || message["text"] === undefined))
|
|
82
105
|
return null;
|
|
83
|
-
|
|
106
|
+
if ((action === "press" || action === "wait") && message["target"] === undefined)
|
|
107
|
+
return null;
|
|
108
|
+
if (ms !== undefined && (typeof ms !== "number" || ms <= 0))
|
|
109
|
+
return null;
|
|
110
|
+
return { type: "cursor", action, target: message["target"], text: message["text"], ...(ms === undefined ? {} : { ms }) };
|
|
84
111
|
}
|
|
85
112
|
const beats = message["beats"];
|
|
86
113
|
if (message["type"] === "macro.step" &&
|
|
@@ -123,13 +150,24 @@ function stepOf(value) {
|
|
|
123
150
|
if (typeof value !== "object" || value === null)
|
|
124
151
|
return null;
|
|
125
152
|
const step = { ...value };
|
|
153
|
+
const guards = guardsOf(step);
|
|
154
|
+
if (guards === null)
|
|
155
|
+
return null;
|
|
156
|
+
if (isAct(step)) {
|
|
157
|
+
const act = actOf(step);
|
|
158
|
+
return act === null ? null : { ...act, ...guards };
|
|
159
|
+
}
|
|
126
160
|
const { say, audio, durationMs, words, beats } = step;
|
|
127
|
-
|
|
161
|
+
const shown = shownOf(step);
|
|
162
|
+
if (typeof say !== "string" || !Array.isArray(beats) || !beats.every(isBeat) || shown === null)
|
|
128
163
|
return null;
|
|
129
|
-
if (
|
|
164
|
+
if (step["live"] === true)
|
|
165
|
+
return { say, beats, live: true, ...shown, ...guards };
|
|
166
|
+
if (typeof audio !== "string" || !/^https?:\/\//.test(audio) || typeof durationMs !== "number")
|
|
130
167
|
return null;
|
|
131
|
-
|
|
132
|
-
|
|
168
|
+
if (!Array.isArray(words) || !words.every(isWord))
|
|
169
|
+
return null;
|
|
170
|
+
return { say, audio, durationMs, words, beats, ...shown, ...guards };
|
|
133
171
|
}
|
|
134
172
|
/** The walks a published document holds, each checked: a walk with any step that is not one is left out. */
|
|
135
173
|
export function walksOf(value) {
|
|
@@ -143,13 +181,17 @@ export function walksOf(value) {
|
|
|
143
181
|
if (typeof item !== "object" || item === null)
|
|
144
182
|
return [];
|
|
145
183
|
const walk = { ...item };
|
|
146
|
-
const { name, title, when, steps } = walk;
|
|
184
|
+
const { name, title, when, steps, pages } = walk;
|
|
147
185
|
if (typeof name !== "string" || typeof title !== "string" || !Array.isArray(steps) || steps.length === 0)
|
|
148
186
|
return [];
|
|
149
187
|
const checked = steps.map(stepOf);
|
|
150
188
|
if (checked.some((step) => step === null))
|
|
151
189
|
return [];
|
|
152
|
-
|
|
190
|
+
const params = walk["params"] === undefined ? undefined : paramsOf(walk["params"]);
|
|
191
|
+
if (params === null)
|
|
192
|
+
return [];
|
|
193
|
+
const paths = Array.isArray(pages) && pages.every((page) => typeof page === "string") ? pages : undefined;
|
|
194
|
+
return [{ name, title, when: typeof when === "string" ? when : undefined, pages: paths, ...(params === undefined ? {} : { params }), steps: checked.filter((step) => step !== null) }];
|
|
153
195
|
});
|
|
154
196
|
}
|
|
155
197
|
/** A macro as its JSON file says it, checked; it throws naming what is wrong, at the class's load. */
|
|
@@ -160,10 +202,33 @@ export function macroOf(name, value) {
|
|
|
160
202
|
const steps = macro["steps"];
|
|
161
203
|
if (!Array.isArray(steps) || steps.length === 0)
|
|
162
204
|
throw new Error(`macro ${name}: no steps`);
|
|
205
|
+
const params = macro["params"] === undefined ? {} : paramsOf(macro["params"]);
|
|
206
|
+
if (params === null)
|
|
207
|
+
throw new Error(`macro ${name}: params are {"<name>": {"about": "...", "one_of"?: {"<option>": "..."}}}`);
|
|
208
|
+
// A slot is a param, or a row an earlier step read: `{name}`, `{hit.Time}`.
|
|
209
|
+
const known = new Set(Object.keys(params));
|
|
210
|
+
const slotted = (at, text) => {
|
|
211
|
+
const unknown = slotsOf(text).find((slot) => !known.has(slot.split(".")[0] ?? ""));
|
|
212
|
+
if (unknown !== undefined)
|
|
213
|
+
throw new Error(`macro ${name}: step ${at + 1} fills {${unknown}}, which is no param and no row read before it`);
|
|
214
|
+
};
|
|
163
215
|
const checked = steps.map((step, at) => {
|
|
164
216
|
if (typeof step !== "object" || step === null)
|
|
165
217
|
throw new Error(`macro ${name}: step ${at + 1} is not an object`);
|
|
166
218
|
const fields = { ...step };
|
|
219
|
+
const guards = guardsOf(fields);
|
|
220
|
+
if (guards === null)
|
|
221
|
+
throw new Error(`macro ${name}: step ${at + 1} has an if or unless that is not a slot's name`);
|
|
222
|
+
if (isAct(fields)) {
|
|
223
|
+
const act = actOf(fields);
|
|
224
|
+
if (act === null)
|
|
225
|
+
throw new Error(`macro ${name}: step ${at + 1} is not {fill, with}, {press}, {wait, ms?} or {read, as, row?}`);
|
|
226
|
+
if ("fill" in act)
|
|
227
|
+
slotted(at, act.with);
|
|
228
|
+
if ("read" in act)
|
|
229
|
+
known.add(act.as);
|
|
230
|
+
return { ...act, ...guards };
|
|
231
|
+
}
|
|
167
232
|
const say = fields["say"];
|
|
168
233
|
const beats = fields["beats"] ?? [];
|
|
169
234
|
if (typeof say !== "string" || say.trim() === "")
|
|
@@ -173,18 +238,27 @@ export function macroOf(name, value) {
|
|
|
173
238
|
for (const beat of beats) {
|
|
174
239
|
if (!wordsOf(say).some((word) => word === normal(beat.word)))
|
|
175
240
|
throw new Error(`macro ${name}: step ${at + 1} never says "${beat.word}"`);
|
|
241
|
+
if (beat.find !== undefined)
|
|
242
|
+
slotted(at, beat.find[1]);
|
|
176
243
|
}
|
|
244
|
+
slotted(at, say);
|
|
177
245
|
const shown = shownOf(fields);
|
|
178
246
|
if (shown === null)
|
|
179
247
|
throw new Error(`macro ${name}: step ${at + 1} shows code that is not {code: {title, text} or null, lines: [from, to]}`);
|
|
180
|
-
return { say, beats, ...shown };
|
|
248
|
+
return { say, beats, ...shown, ...guards };
|
|
181
249
|
});
|
|
182
250
|
const when = macro["when"];
|
|
183
251
|
const title = macro["title"];
|
|
252
|
+
const pages = macro["pages"];
|
|
253
|
+
if (pages !== undefined && !(Array.isArray(pages) && pages.every((page) => typeof page === "string" && page.startsWith("/")))) {
|
|
254
|
+
throw new Error(`macro ${name}: pages are paths that begin with a slash, as ["/security"]`);
|
|
255
|
+
}
|
|
184
256
|
return {
|
|
185
257
|
name: typeof macro["name"] === "string" ? macro["name"] : name,
|
|
186
258
|
title: typeof title === "string" ? title : undefined,
|
|
187
259
|
when: typeof when === "string" ? when : undefined,
|
|
260
|
+
pages: pages === undefined ? undefined : pages,
|
|
261
|
+
...(Object.keys(params).length === 0 ? {} : { params }),
|
|
188
262
|
steps: checked,
|
|
189
263
|
};
|
|
190
264
|
}
|
package/dist/wire/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wire/index.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1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,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;AACrE,CAAC"}
|
package/docs/macros.md
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Macros
|
|
2
|
+
|
|
3
|
+
> **Experimental.** `@pinecall/dot` may change in any release. This page is true of the version it ships with.
|
|
4
|
+
|
|
5
|
+
A macro is a guided walk, a JSON file in the agent's folder (`macros/<name>.json`). The agent says
|
|
6
|
+
each step as written; the page runs each step's moves as their words are said. The same file is
|
|
7
|
+
what a visitor plays with no call (a *walk*, recorded in the agent's voice). [Write a tutor
|
|
8
|
+
agent](write-a-tutor.md) shows where it goes; this page is the format.
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"name": "plans",
|
|
13
|
+
"title": "Plans and prices",
|
|
14
|
+
"when": "the visitor asks what it costs, or which plan to choose",
|
|
15
|
+
"steps": [
|
|
16
|
+
{
|
|
17
|
+
"say": "Here are our three plans: one monthly price instead of a surprise bill.",
|
|
18
|
+
"beats": [
|
|
19
|
+
{ "word": "Here", "do": "scroll_to", "find": ["region", "Pricing"] },
|
|
20
|
+
{ "word": "three", "do": "highlight", "find": ["region", "Pricing"] }
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"say": "Family Care is the one most families pick.",
|
|
25
|
+
"beats": [
|
|
26
|
+
{ "word": "Family", "do": "highlight", "find": ["article", "Family Care plan"] },
|
|
27
|
+
{ "word": "pick", "do": "point", "find": ["article", "Family Care plan"] }
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## The file
|
|
35
|
+
|
|
36
|
+
| field | |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `name` | what the model names it in `runMacro`. The key it is given in `macros({ plans })` when left out |
|
|
39
|
+
| `title` | the visitor's button: "Plans and prices". `name` when left out |
|
|
40
|
+
| `when` | when to run it, in the words the model reads: "the visitor asks what it costs" |
|
|
41
|
+
| `pages` | the paths of the pages it is for: `["/security"]`. Left out, it is for every page. See below |
|
|
42
|
+
| `steps` | at least one |
|
|
43
|
+
|
|
44
|
+
A step:
|
|
45
|
+
|
|
46
|
+
| field | |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `say` | the sentence, said exactly as written |
|
|
49
|
+
| `beats` | the moves hung on its words; may be empty |
|
|
50
|
+
| `code` | `{ "title": "agent.ts", "text": "…" }` opens a window of code beside the page; `null` closes it. A step that names none leaves the window as it is |
|
|
51
|
+
| `lines` | `[from, to]`, from 1: lights those lines of the window and dims the rest, and the pointer goes to them |
|
|
52
|
+
|
|
53
|
+
A beat:
|
|
54
|
+
|
|
55
|
+
| field | |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `word` | the word of `say` it runs on. Case and punctuation do not count: `"Whitening,"` is `whitening` |
|
|
58
|
+
| `do` | the move, below |
|
|
59
|
+
| `find` | `[role, name]`: the element, as the page's snapshot names it. Needed by every move but `unhighlight`, `here` and `home` |
|
|
60
|
+
| `nth` | which time the word is said in the step, from 1 (the first by default), for a word that repeats |
|
|
61
|
+
|
|
62
|
+
## The moves
|
|
63
|
+
|
|
64
|
+
| `do` | |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `point` | the pointer flies to the element, the face beside it, and rests under its first words. Scrolls first if it is off the screen |
|
|
67
|
+
| `highlight` | dims the rest of the page and lights the element, following it as the page scrolls |
|
|
68
|
+
| `unhighlight` | takes the light away |
|
|
69
|
+
| `scroll_to` | scrolls the page, eased, until the element sits in the upper middle of the screen, below the site's own header (a fixed or sticky bar along the top, or the page's `scroll-padding-top`). A thing that fits is shown whole; a section taller than the screen shows from its start, just under the header |
|
|
70
|
+
| `here` | a ring at the pointer, twice |
|
|
71
|
+
| `home` | the pointer goes back to its corner |
|
|
72
|
+
|
|
73
|
+
A beat never types or presses: a walk shows, a step of its own acts, and the agent writes into a field
|
|
74
|
+
only what the visitor said.
|
|
75
|
+
|
|
76
|
+
## A macro as a function
|
|
77
|
+
|
|
78
|
+
A macro can take params, and act on the page between its sentences. It is then a function the visitor
|
|
79
|
+
calls by asking: in a call the model passes the params to `runMacro`; typed to the dot, the site's door
|
|
80
|
+
picks them out of what was typed.
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"name": "times",
|
|
85
|
+
"title": "Find a time",
|
|
86
|
+
"when": "the visitor wants an open time: for a treatment, with a dentist, or on a day",
|
|
87
|
+
"params": { "what": { "about": "the treatment, the dentist or the day they want a time for" } },
|
|
88
|
+
"steps": [
|
|
89
|
+
{ "say": "Let me look for {what}.", "beats": [] },
|
|
90
|
+
{ "fill": "Treatment or dentist", "with": "{what}" },
|
|
91
|
+
{ "press": "Search times" },
|
|
92
|
+
{ "wait": "Open times", "ms": 6000 },
|
|
93
|
+
{ "read": "Open times", "as": "hit", "row": "best" },
|
|
94
|
+
{ "if": "hit", "say": "The best fit is {hit.Day} at {hit.Time}.", "beats": [{ "word": "best", "do": "highlight", "find": ["row", "{hit}"] }] },
|
|
95
|
+
{ "unless": "hit", "say": "I found no open times for {what}.", "beats": [] }
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
| | |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `params` | `{ "<name>": { "about": "…" } }`: the visitor's own words, one to five of them in a row (a name, a phone, an email, what to search). With `"one_of": { "<option>": "…" }`, one of those options |
|
|
103
|
+
| `{slot}` | in `say`, in what `fill` types and in what a beat's `find` names: a param, or a row read before it (`{hit}` the row, `{hit.Time}` its cell under the header "Time") |
|
|
104
|
+
| `fill` | types `with`, filled, into the field the screen names so. Never a password, a card, a file or a hidden field |
|
|
105
|
+
| `press` | presses the button the screen names so: one outside any form, or in a search form (`<search>`, `role="search"`). Never a link, never a form that books, buys or signs up. Its name is the site's: no slot |
|
|
106
|
+
| `wait` | waits for the thing it names to change, stay still a moment and not be `aria-busy`: a search answered and drawn. `ms` at most (8000 when not said, 20000 the most) |
|
|
107
|
+
| `read` | reads the table the screen names so (a `<table>`, or the section that holds one): each row by its header's words. `row` is `first` (the default) or `best`, the one that answers what the visitor typed |
|
|
108
|
+
| `if`, `unless` | keep the step only when a slot has a value, or has none |
|
|
109
|
+
|
|
110
|
+
A step with a slot nothing filled is left out, so a walk asked for without a param says the rest.
|
|
111
|
+
|
|
112
|
+
**In a call** the sentences are said with their slots filled, and the acts sent to the page one at a
|
|
113
|
+
time, each answered once it ended. A `read` ends the walk's own words: what the table shows is handed
|
|
114
|
+
to the model, which answers the visitor in its own words and can light the row it talks about.
|
|
115
|
+
|
|
116
|
+
**With no call** the page does the acts between the sentences. A sentence with slots cannot be recorded
|
|
117
|
+
before the visitor says what fills them: `pinecall start` publishes it as a live step, and the page asks
|
|
118
|
+
the site's door to record it when it is reached, with its values. The door reads the sentence from the
|
|
119
|
+
walks the agent published, never from the page, and the gateway keeps each recording: the same
|
|
120
|
+
sentence with the same values costs nothing the second time. A walk with params is not in the menu: it
|
|
121
|
+
is asked for. A site's search that says it is busy while it asks (`aria-busy="true"` on its table) is
|
|
122
|
+
waited on to the end.
|
|
123
|
+
|
|
124
|
+
## Walks for some pages
|
|
125
|
+
|
|
126
|
+
A site with several pages usually has a walk for each, and a visitor on `/security` should not be
|
|
127
|
+
offered the tour of the home. Name the pages in the file:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{ "name": "keys", "title": "Where your keys live", "pages": ["/security"], "steps": [ … ] }
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
- **The menu** lists only the walks for the page the visitor is on (a trailing slash does not
|
|
134
|
+
matter: `/security` and `/security/` are one page).
|
|
135
|
+
- **A call** is the same: the page tells the agent its path, and the agent offers and runs only
|
|
136
|
+
the walks for it. A walk that names no page is for all of them, so name the home's
|
|
137
|
+
walks too (`"pages": ["/"]`) if they are only for the home.
|
|
138
|
+
- **Each page has its own published document**, so a visitor downloads only the walks for the page
|
|
139
|
+
they are on: `walks` for the home (with the walks that name no page), `walks-security` for `/security`,
|
|
140
|
+
`walks-developers-sdk` for `/developers/sdk`. The page reads its own and, where the agent published none
|
|
141
|
+
for it, `walks`. A document is 64 KiB at most; a page with a great many walks can pass it, and is split
|
|
142
|
+
by naming the pages.
|
|
143
|
+
- **A page that never said its path** (an older page) is offered every walk.
|
|
144
|
+
- A path is exact: `/developers` is not `/developers/sdk`. List both.
|
|
145
|
+
|
|
146
|
+
## Naming elements: `find`
|
|
147
|
+
|
|
148
|
+
`find` is `[role, name]`: the first element of that role whose name *contains* the text (case does
|
|
149
|
+
not matter). Roles and names are the accessibility tree's, not the markup's:
|
|
150
|
+
|
|
151
|
+
| role | what it is | its name |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| `region` | a `<section>` with `aria-label` or `aria-labelledby` | that label |
|
|
154
|
+
| `heading` | `<h1>`–`<h6>` | its text |
|
|
155
|
+
| `article` | `<article>` | its `aria-label` |
|
|
156
|
+
| `button`, `link`, `tab` | a `<button>` or `summary`, an `<a href>`, `role="tab"` | its text or `aria-label` |
|
|
157
|
+
| `group` | `role="group"`, or `<details>` | its `aria-label` |
|
|
158
|
+
| `textbox`, `combobox`, `checkbox`, `radio` | fields | their label |
|
|
159
|
+
| `img` | `<img>`, `<figure>` | its `alt` |
|
|
160
|
+
| `form` | `<form>` | its `aria-label` |
|
|
161
|
+
|
|
162
|
+
Three habits keep a walk alive:
|
|
163
|
+
|
|
164
|
+
1. **Name the parts you point at.** A plain `<div>` has no name, so a macro cannot find it: give
|
|
165
|
+
it `role="group"` and an `aria-label`, or point at its heading instead. This is the whole
|
|
166
|
+
reason a beat "does nothing".
|
|
167
|
+
2. **Use a part of the name, not the whole.** `["region", "Pricing"]` finds "Pricing, three plans"
|
|
168
|
+
too; a label you reword later still matches.
|
|
169
|
+
3. **A beat that finds nothing is skipped**, quietly, in a walk and in a call. The walk goes on, so a
|
|
170
|
+
renamed section loses a move, not the walk.
|
|
171
|
+
|
|
172
|
+
## Writing sentences that play well
|
|
173
|
+
|
|
174
|
+
The sentence is read aloud by the agent's voice, and a walk is recorded once in it.
|
|
175
|
+
|
|
176
|
+
- **Short sentences, one idea each.** The visitor can stop at any step, and the agent is told how far
|
|
177
|
+
they got.
|
|
178
|
+
- **Put the beat on the word that names the thing**, not before it: `"Family"` for "Family Care is
|
|
179
|
+
the one most families pick", so the pointer arrives as the name is said. Avoid a word that is also
|
|
180
|
+
said earlier in the sentence unless you mean it, or give `nth`.
|
|
181
|
+
- **Light, then point, then let go.** `highlight` on the first word, `point` a few words later,
|
|
182
|
+
`unhighlight` before you move to a part of the page the light is not on.
|
|
183
|
+
- **Move the light before the page moves.** A step that goes to another section lights it first, on
|
|
184
|
+
the same word as the scroll (`highlight`, then `scroll_to`, both on that word): the light then comes
|
|
185
|
+
in with the section. A light left on a section the page scrolls away from dims the whole screen.
|
|
186
|
+
- **Write numbers and symbols as you would say them**: "nineteen dollars a month", not "$19/mo".
|
|
187
|
+
- **Check it with your ears.** `pinecall walks play plans` plays the recorded walk in the terminal;
|
|
188
|
+
a sentence cut short or a name said strangely is a lexicon entry (`pinecall lexicon`), after which
|
|
189
|
+
that sentence is recorded again.
|
|
190
|
+
|
|
191
|
+
## What is checked, and when
|
|
192
|
+
|
|
193
|
+
`macros({ … })` checks every file when the agent's class loads, and refuses one that is not a JSON
|
|
194
|
+
object, has no steps, a step that says nothing, a beat that is not `{ word, do, find?, nth? }` or
|
|
195
|
+
uses `type`, `press` or `wait`, a word its sentence never says, `code`/`lines` of the wrong shape, a
|
|
196
|
+
param that is not `{ about, one_of? }`, an act that is not one of the four, or a slot that is no param
|
|
197
|
+
and no row read before it. The message names the macro and the step:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
macro plans: step 2 never says "Familia"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
What it cannot check is the page: whether `find` names something that exists. That is found by
|
|
204
|
+
running it.
|
|
205
|
+
|
|
206
|
+
## How the agent runs one
|
|
207
|
+
|
|
208
|
+
In a call, `runMacro("plans")` sends each step to the page and then says it. The model names a walk
|
|
209
|
+
the way it heard it: `runMacro("site tour")` runs `tour` (every word of a macro's name is in what was
|
|
210
|
+
asked), and an agent with a single macro runs it whatever it is called. The page binds the step to the reply that
|
|
211
|
+
follows and runs each beat as its word is said, by the voice's own timings. When the visitor speaks,
|
|
212
|
+
the walk stops and the agent answers them; the result tells it how far it got.
|
|
213
|
+
|
|
214
|
+
With no call, the page plays the recorded sentence and runs the same beats on the audio's clock,
|
|
215
|
+
the words lit as they are said. A call opened after a walk played is told which one and how far, so
|
|
216
|
+
the agent goes on from there instead of saying it again.
|