tapline-host 1.6.2 → 1.7.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/dist/accounts.d.ts +129 -12
- package/dist/accounts.js +844 -75
- package/dist/accounts.js.map +1 -1
- package/dist/actionlog.d.ts +11 -4
- package/dist/actionlog.js +22 -1
- package/dist/actionlog.js.map +1 -1
- package/dist/animations.d.ts +4 -2
- package/dist/animations.js +7 -7
- package/dist/animations.js.map +1 -1
- package/dist/api.d.ts +7 -1
- package/dist/api.js +12 -1
- package/dist/api.js.map +1 -1
- package/dist/audit.d.ts +1 -0
- package/dist/auditlog.d.ts +40 -0
- package/dist/auditlog.js +150 -0
- package/dist/auditlog.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +143 -7
- package/dist/cli.js.map +1 -1
- package/dist/control.d.ts +51 -0
- package/dist/control.js +110 -0
- package/dist/control.js.map +1 -1
- package/dist/doctor.d.ts +6 -0
- package/dist/doctor.js +61 -4
- package/dist/doctor.js.map +1 -1
- package/dist/drive.d.ts +5 -2
- package/dist/drive.js +50 -13
- package/dist/drive.js.map +1 -1
- package/dist/elicit.d.ts +47 -0
- package/dist/elicit.js +87 -0
- package/dist/elicit.js.map +1 -1
- package/dist/format.d.ts +6 -0
- package/dist/format.js +25 -4
- package/dist/format.js.map +1 -1
- package/dist/grants.d.ts +297 -0
- package/dist/grants.js +938 -0
- package/dist/grants.js.map +1 -0
- package/dist/grantscmd.d.ts +34 -0
- package/dist/grantscmd.js +100 -0
- package/dist/grantscmd.js.map +1 -0
- package/dist/hostfacts.d.ts +23 -0
- package/dist/hostfacts.js +65 -0
- package/dist/hostfacts.js.map +1 -0
- package/dist/inspect.d.ts +3 -2
- package/dist/inspect.js +20 -8
- package/dist/inspect.js.map +1 -1
- package/dist/mapcmd.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/nochange.d.ts +1 -0
- package/dist/otpclient.d.ts +79 -0
- package/dist/otpclient.js +362 -0
- package/dist/otpclient.js.map +1 -0
- package/dist/pidlock.d.ts +99 -0
- package/dist/pidlock.js +382 -0
- package/dist/pidlock.js.map +1 -0
- package/dist/places.d.ts +11 -0
- package/dist/places.js +28 -2
- package/dist/places.js.map +1 -1
- package/dist/policy.d.ts +2 -1
- package/dist/policy.js +5 -2
- package/dist/policy.js.map +1 -1
- package/dist/protocol.d.ts +4 -0
- package/dist/protocol.js +2 -0
- package/dist/protocol.js.map +1 -1
- package/dist/report.d.ts +8 -0
- package/dist/report.js +34 -1
- package/dist/report.js.map +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +27 -11
- package/dist/routes.js.map +1 -1
- package/dist/runschedule.d.ts +119 -0
- package/dist/runschedule.js +281 -0
- package/dist/runschedule.js.map +1 -0
- package/dist/runtime.d.ts +48 -1
- package/dist/runtime.js +214 -18
- package/dist/runtime.js.map +1 -1
- package/dist/schedule.d.ts +145 -0
- package/dist/schedule.js +401 -0
- package/dist/schedule.js.map +1 -0
- package/dist/schedulehost.d.ts +73 -0
- package/dist/schedulehost.js +391 -0
- package/dist/schedulehost.js.map +1 -0
- package/dist/script.d.ts +2 -0
- package/dist/script.js +2 -0
- package/dist/script.js.map +1 -1
- package/dist/server.d.ts +6 -0
- package/dist/server.js +3 -1
- package/dist/server.js.map +1 -1
- package/dist/thincall.d.ts +13 -0
- package/dist/thincall.js +139 -59
- package/dist/thincall.js.map +1 -1
- package/dist/tool-text-data.d.ts +1 -1
- package/dist/tool-text-data.js +1 -1
- package/dist/tool-text-data.js.map +1 -1
- package/dist/tool-text.d.ts +1 -1
- package/dist/tools.d.ts +116 -6
- package/dist/tools.js +758 -134
- package/dist/tools.js.map +1 -1
- package/dist/unlockcmd.d.ts +44 -0
- package/dist/unlockcmd.js +80 -0
- package/dist/unlockcmd.js.map +1 -0
- package/dist/uxcheck.d.ts +1 -0
- package/dist/vault.d.ts +75 -0
- package/dist/vault.js +395 -0
- package/dist/vault.js.map +1 -0
- package/package.json +1 -1
- package/skills/tapline/SKILL.md +34 -6
- package/skills/tapline/references/setup.md +11 -1
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { readFileSync } from "node:fs";
|
|
5
|
+
import { configDir, tokenFilePath } from "./config.js";
|
|
6
|
+
import { loadAccounts } from "./accounts.js";
|
|
7
|
+
import { loadPolicy } from "./policy.js";
|
|
8
|
+
import { callTool, isToolName } from "./dispatch.js";
|
|
9
|
+
import { bounded, isBusyAnswer, ScheduleTimeout, VAULT_LOAD_TIMEOUT_MS } from "./runschedule.js";
|
|
10
|
+
import { canonicalPath, createRuntime, HOST_FACTS_TOOL, LEASE_TOOL, LEASE_TTL_MS } from "./runtime.js";
|
|
11
|
+
import { runThinCall } from "./thincall.js";
|
|
12
|
+
import { hashMapsOnDisk, policyFingerprint } from "./hostfacts.js";
|
|
13
|
+
/**
|
|
14
|
+
* The real hosts behind `tapline run-schedule` (AGENT-TOOLS 1.14 §22.2): a `tapline host` that is already running with the app
|
|
15
|
+
* connected (reached by the thin call, with its own policy and vault), else a host of its own that takes the schedule's
|
|
16
|
+
* policy, accounts and maps. Not tested against a phone; runschedule.ts is tested with a fake host.
|
|
17
|
+
*/
|
|
18
|
+
/** The real `schtasks`/PowerShell runner: a program and its arguments, never a shell line; `env` adds to this process's. */
|
|
19
|
+
export const spawnSchedRunner = (command, args, env) => new Promise((resolve) => {
|
|
20
|
+
const child = spawn(command, args, { env: { ...process.env, ...env }, windowsHide: true, stdio: ["ignore", "pipe", "pipe"] });
|
|
21
|
+
const out = [];
|
|
22
|
+
const err = [];
|
|
23
|
+
child.stdout.on("data", (b) => out.push(b));
|
|
24
|
+
child.stderr.on("data", (b) => err.push(b));
|
|
25
|
+
child.on("error", (error) => resolve({ code: 1, stdout: "", stderr: error.message }));
|
|
26
|
+
child.on("close", (code) => resolve({ code: code ?? 1, stdout: Buffer.concat(out).toString("utf8"), stderr: Buffer.concat(err).toString("utf8") }));
|
|
27
|
+
});
|
|
28
|
+
/** What the Task Scheduler runs: this node, and the `tapline` entry (bin.js) that sits next to cli.js. */
|
|
29
|
+
export function realTaskEntry() {
|
|
30
|
+
return { exe: process.execPath, script: join(dirname(fileURLToPath(import.meta.url)), "bin.js") };
|
|
31
|
+
}
|
|
32
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
33
|
+
function thinIO(env, pin, signal, onHost) {
|
|
34
|
+
const ports = [];
|
|
35
|
+
for (let port = 7210; port <= 7219; port++)
|
|
36
|
+
ports.push(port);
|
|
37
|
+
const out = [];
|
|
38
|
+
return {
|
|
39
|
+
out,
|
|
40
|
+
io: { out: (t) => void out.push(t), err: () => undefined, env, ppid: process.pid, ports, address: "127.0.0.1", onHost, ...(pin !== undefined ? { pin } : {}), ...(signal !== undefined ? { signal } : {}) },
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** One thin call to a running host: `null` when none could be reached (exit 3). A pinned call goes to its port only. */
|
|
44
|
+
async function thinCall(env, client, tool, args, pin, signal) {
|
|
45
|
+
let port;
|
|
46
|
+
const { io, out } = thinIO(env, pin, signal, (p) => void (port = p));
|
|
47
|
+
const code = await runThinCall([tool, JSON.stringify(args), "--client", client, "--json"], io);
|
|
48
|
+
if (code === 3)
|
|
49
|
+
return null;
|
|
50
|
+
try {
|
|
51
|
+
const parsed = JSON.parse(out.join(""));
|
|
52
|
+
if (typeof parsed.text === "string")
|
|
53
|
+
return { text: parsed.text, isError: code !== 0, ...(port !== undefined ? { port } : {}) };
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
// a refusal or an unknown outcome has no answer
|
|
57
|
+
}
|
|
58
|
+
return { text: code === 1 ? "Error unknown_outcome: the call was sent but no answer came back." : "Error bad_params: the host refused the call.", isError: true, ...(port !== undefined ? { port } : {}) };
|
|
59
|
+
}
|
|
60
|
+
const HEX = /^[0-9a-f]{16,128}$/;
|
|
61
|
+
function asFacts(text) {
|
|
62
|
+
try {
|
|
63
|
+
const raw = JSON.parse(text);
|
|
64
|
+
if (typeof raw !== "object" || raw === null)
|
|
65
|
+
return null;
|
|
66
|
+
const { version, instance, policy, noPolicy, accounts, maps, policyHash, accountsHash, mapsHash } = raw;
|
|
67
|
+
if (version !== 3 || typeof instance !== "string" || !HEX.test(instance) || typeof noPolicy !== "boolean" || typeof maps !== "string" || typeof mapsHash !== "string")
|
|
68
|
+
return null;
|
|
69
|
+
if ((policy !== null && typeof policy !== "string") || (accounts !== null && typeof accounts !== "string"))
|
|
70
|
+
return null;
|
|
71
|
+
if ((policyHash !== null && typeof policyHash !== "string") || (accountsHash !== null && typeof accountsHash !== "string"))
|
|
72
|
+
return null;
|
|
73
|
+
return { version: 3, instance, policy, noPolicy, accounts, maps, policyHash, accountsHash, mapsHash };
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** The hasher of the real files. The vault's hash is an HMAC under the host token this computer holds (the thin call's own token). */
|
|
80
|
+
export function factHasher(env = process.env, vaultDeps, gitProbe) {
|
|
81
|
+
return {
|
|
82
|
+
policy(path) {
|
|
83
|
+
try {
|
|
84
|
+
return policyFingerprint(loadPolicy(path));
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
async accounts(path, signal) {
|
|
91
|
+
try {
|
|
92
|
+
const token = readFileSync(tokenFilePath(env), "utf8").trim();
|
|
93
|
+
if (token === "")
|
|
94
|
+
return null;
|
|
95
|
+
const loaded = await loadAccounts(path, gitProbe, vaultDeps, signal);
|
|
96
|
+
return loaded.store === null || loaded.fingerprint === undefined ? null : loaded.fingerprint(token);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
maps: hashMapsOnDisk,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Why a running host can't carry this schedule, or null when it can (fail closed): the policy must be on and the same file as the
|
|
107
|
+
* schedule's (both the built-in policy when the schedule names none), the accounts file and the maps folder the same, and what the host
|
|
108
|
+
* LOADED must be what this run would load now: asked, the host reloads first, and a block word or a permission changed since is in its hashes.
|
|
109
|
+
*/
|
|
110
|
+
export async function factsMismatch(schedule, facts, env = process.env, hasher = factHasher(env), signal) {
|
|
111
|
+
if (facts === null)
|
|
112
|
+
return "its policy, accounts and maps can't be read";
|
|
113
|
+
if (facts.noPolicy)
|
|
114
|
+
return "it runs with --no-policy";
|
|
115
|
+
const same = (wanted, had) => (wanted === null ? had === null : had !== null && canonicalPath(wanted) === had);
|
|
116
|
+
if (!same(schedule.policy, facts.policy))
|
|
117
|
+
return "it runs with another policy";
|
|
118
|
+
if (!same(schedule.accounts, facts.accounts))
|
|
119
|
+
return "it runs with other accounts";
|
|
120
|
+
const maps = schedule.maps ?? join(configDir(env), "maps");
|
|
121
|
+
if (canonicalPath(maps) !== facts.maps)
|
|
122
|
+
return "it keeps its maps in another folder";
|
|
123
|
+
if (schedule.policy !== null) {
|
|
124
|
+
const now = hasher.policy(schedule.policy);
|
|
125
|
+
if (now === null || facts.policyHash === null || now !== facts.policyHash)
|
|
126
|
+
return "the policy the host holds is not the one in the file";
|
|
127
|
+
}
|
|
128
|
+
if (schedule.accounts !== null) {
|
|
129
|
+
const now = await hasher.accounts(schedule.accounts, signal);
|
|
130
|
+
if (now === null || facts.accountsHash === null || now !== facts.accountsHash)
|
|
131
|
+
return "the vault the host holds is not the one the accounts file gives";
|
|
132
|
+
}
|
|
133
|
+
if (hasher.maps(maps) !== facts.mapsHash)
|
|
134
|
+
return "the maps the host holds are not the ones on disk";
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
/** Every reach of the control lease and the facts goes through this. */
|
|
138
|
+
const LEASE_RENEW_MS = 15_000;
|
|
139
|
+
/** A lease call that hasn't answered by then is cut off (a renewal that can't succeed before the lease runs out stops the run). */
|
|
140
|
+
export const LEASE_CALL_TIMEOUT_MS = 10_000;
|
|
141
|
+
/** Looking for a running host (the first scan of the ports) and each later check that the app is connected. */
|
|
142
|
+
export const DISCOVERY_TIMEOUT_MS = 30_000;
|
|
143
|
+
/** The running host's facts (its policy, accounts and maps, reloaded when asked). */
|
|
144
|
+
export const FACTS_TIMEOUT_MS = 30_000;
|
|
145
|
+
export { VAULT_LOAD_TIMEOUT_MS };
|
|
146
|
+
/** Starting a host of its own (the runtime and its listener). */
|
|
147
|
+
export const OWN_HOST_SETUP_TIMEOUT_MS = 30_000;
|
|
148
|
+
/**
|
|
149
|
+
* One route call (a `replay` or a `drive`): a saved route is minutes at most; one that hasn't ended in 30 minutes is cut off, the run
|
|
150
|
+
* fails with `timeout`, and the lease is given back.
|
|
151
|
+
*/
|
|
152
|
+
export const ROUTE_CALL_TIMEOUT_MS = 30 * 60_000;
|
|
153
|
+
/** What a run reports when the phone was taken from it mid-run (§22.3: nothing further is run). */
|
|
154
|
+
export const LOST_TEXT = "Error lease_lost: the run lost the phone (the host's lease was not renewed, or the host changed); no further step was run.";
|
|
155
|
+
/**
|
|
156
|
+
* A running `tapline host` the app is connected to: used only when its settings match the schedule's (`mismatch` says what
|
|
157
|
+
* differs when they don't). The run pins the host it checked (its port and instance id) and sends them with every later call, so
|
|
158
|
+
* a call can never reach another host with other settings; it holds the host's lease, by the credential the host gave it, while
|
|
159
|
+
* it drives. A renewal that fails, or a lease that is lost, stops the run before its next step.
|
|
160
|
+
*/
|
|
161
|
+
async function runningHost(env, client, schedule, thin, hasher) {
|
|
162
|
+
// Every wait here is bounded: a host that accepts and never answers fails the run with its reason instead of holding the run lock.
|
|
163
|
+
const first = await bounded("the search for a running host", DISCOVERY_TIMEOUT_MS, (signal) => thin(env, client, "apps", {}, undefined, signal));
|
|
164
|
+
if (first === null)
|
|
165
|
+
return { host: null, mismatch: null };
|
|
166
|
+
if (first.port === undefined)
|
|
167
|
+
return { host: null, mismatch: "the host's port can't be told" };
|
|
168
|
+
const port = first.port;
|
|
169
|
+
const asked = await bounded("the host's facts", FACTS_TIMEOUT_MS, (signal) => thin(env, client, HOST_FACTS_TOOL, {}, { port }, signal));
|
|
170
|
+
const facts = asked === null || asked.isError ? null : asFacts(asked.text);
|
|
171
|
+
const mismatch = await bounded("loading the vault", VAULT_LOAD_TIMEOUT_MS, (signal) => factsMismatch(schedule, facts, env, hasher, signal));
|
|
172
|
+
if (mismatch !== null || facts === null)
|
|
173
|
+
return { host: null, mismatch: mismatch ?? "its policy, accounts and maps can't be read" };
|
|
174
|
+
const instance = facts.instance;
|
|
175
|
+
let credential;
|
|
176
|
+
const pinned = () => ({ port, instance, ...(credential !== undefined ? { lease: credential } : {}) });
|
|
177
|
+
// When the host's lease runs out at the latest, by this computer's clock counted from when the last acquire or renewal was SENT
|
|
178
|
+
// (the host's own term began after that, so this is never later than the host's).
|
|
179
|
+
let goodUntil = 0;
|
|
180
|
+
let expiry;
|
|
181
|
+
const lease = async (action) => {
|
|
182
|
+
const sentAt = Date.now();
|
|
183
|
+
// A renewal gets at most LEASE_CALL_TIMEOUT_MS and never more than what is left of the lease.
|
|
184
|
+
const room = action === "renew" ? Math.min(LEASE_CALL_TIMEOUT_MS, goodUntil - sentAt) : LEASE_CALL_TIMEOUT_MS;
|
|
185
|
+
if (room <= 0)
|
|
186
|
+
return false;
|
|
187
|
+
let answer;
|
|
188
|
+
const sentPin = pinned();
|
|
189
|
+
try {
|
|
190
|
+
answer = await bounded(`the lease ${action}`, room, (signal) => thin(env, client, LEASE_TOOL, { action, ttl_ms: LEASE_TTL_MS }, sentPin, signal));
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
// An acquire that never answers fails the run with its reason (the host's lease runs out by itself); a renewal or a release that
|
|
194
|
+
// doesn't answer is a lost or unconfirmed lease, handled by its caller.
|
|
195
|
+
if (error instanceof ScheduleTimeout && action === "acquire")
|
|
196
|
+
throw error;
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
if (answer === null || answer.isError)
|
|
200
|
+
return false;
|
|
201
|
+
try {
|
|
202
|
+
const body = JSON.parse(answer.text);
|
|
203
|
+
if (body.ok !== true)
|
|
204
|
+
return false;
|
|
205
|
+
if (action === "acquire" && typeof body.credential === "string" && HEX.test(body.credential))
|
|
206
|
+
credential = body.credential;
|
|
207
|
+
if (action === "acquire" && credential === undefined)
|
|
208
|
+
return false;
|
|
209
|
+
if (action !== "release") {
|
|
210
|
+
if (Date.now() >= sentAt + LEASE_TTL_MS)
|
|
211
|
+
return false; // answered too late to count
|
|
212
|
+
goodUntil = sentAt + LEASE_TTL_MS;
|
|
213
|
+
if (expiry !== undefined)
|
|
214
|
+
clearTimeout(expiry);
|
|
215
|
+
expiry = setTimeout(() => lose(), LEASE_TTL_MS);
|
|
216
|
+
expiry.unref();
|
|
217
|
+
}
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
let held = false;
|
|
225
|
+
let lost = false;
|
|
226
|
+
let beat;
|
|
227
|
+
let inflight;
|
|
228
|
+
const stopBeat = () => {
|
|
229
|
+
if (beat !== undefined)
|
|
230
|
+
clearInterval(beat);
|
|
231
|
+
beat = undefined;
|
|
232
|
+
if (expiry !== undefined)
|
|
233
|
+
clearTimeout(expiry);
|
|
234
|
+
expiry = undefined;
|
|
235
|
+
};
|
|
236
|
+
const drop = async () => {
|
|
237
|
+
stopBeat();
|
|
238
|
+
if (!held)
|
|
239
|
+
return;
|
|
240
|
+
held = false;
|
|
241
|
+
await lease("release");
|
|
242
|
+
credential = undefined;
|
|
243
|
+
};
|
|
244
|
+
// A renewal that fails means the run no longer holds the phone: the call in flight is cut off (the host stops it before its next
|
|
245
|
+
// step) and every later call answers that the run lost the phone.
|
|
246
|
+
const lose = () => {
|
|
247
|
+
if (lost)
|
|
248
|
+
return;
|
|
249
|
+
lost = true;
|
|
250
|
+
stopBeat();
|
|
251
|
+
inflight?.abort();
|
|
252
|
+
};
|
|
253
|
+
const renew = async () => {
|
|
254
|
+
if (lost || !held)
|
|
255
|
+
return;
|
|
256
|
+
if (!(await lease("renew")))
|
|
257
|
+
lose();
|
|
258
|
+
};
|
|
259
|
+
return {
|
|
260
|
+
host: {
|
|
261
|
+
via: "a running host",
|
|
262
|
+
appOpen: async (waitMs) => {
|
|
263
|
+
const until = Date.now() + waitMs;
|
|
264
|
+
for (;;) {
|
|
265
|
+
const answer = await bounded("asking the host which apps are connected", DISCOVERY_TIMEOUT_MS, (signal) => thin(env, client, "apps", {}, pinned(), signal));
|
|
266
|
+
if (answer !== null && answer.text.startsWith("Connected apps:"))
|
|
267
|
+
return true;
|
|
268
|
+
if (Date.now() >= until)
|
|
269
|
+
return false;
|
|
270
|
+
await sleep(1000);
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
// In use while another agent or a person is on the phone: the run holds the host's lease from the moment it gets it.
|
|
274
|
+
inUse: async () => {
|
|
275
|
+
if (held)
|
|
276
|
+
return false;
|
|
277
|
+
held = await lease("acquire");
|
|
278
|
+
if (held) {
|
|
279
|
+
beat = setInterval(() => void renew(), LEASE_RENEW_MS);
|
|
280
|
+
beat.unref();
|
|
281
|
+
}
|
|
282
|
+
return !held;
|
|
283
|
+
},
|
|
284
|
+
call: async (tool, args) => {
|
|
285
|
+
// The lease is checked right before the call goes out: one whose term has run out sends nothing.
|
|
286
|
+
if (held && !lost && Date.now() >= goodUntil)
|
|
287
|
+
lose();
|
|
288
|
+
if (lost)
|
|
289
|
+
return { text: LOST_TEXT, isError: true };
|
|
290
|
+
const mine = new AbortController();
|
|
291
|
+
inflight = mine;
|
|
292
|
+
let answer;
|
|
293
|
+
try {
|
|
294
|
+
// The route's own limit: a call that hasn't ended in ROUTE_CALL_TIMEOUT_MS is cut off, and the run fails with `timeout`.
|
|
295
|
+
const sentPin = pinned();
|
|
296
|
+
answer = (await bounded("the route call", ROUTE_CALL_TIMEOUT_MS, (signal) => thin(env, client, tool, args, sentPin, signal), mine.signal)) ?? {
|
|
297
|
+
text: "Error not_connected: the running host went away.",
|
|
298
|
+
isError: true,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
if (!(error instanceof ScheduleTimeout))
|
|
303
|
+
throw error;
|
|
304
|
+
stopBeat();
|
|
305
|
+
answer = { text: `Error timeout: ${error.message}; the call was cut off and the lease is given back.`, isError: true };
|
|
306
|
+
}
|
|
307
|
+
finally {
|
|
308
|
+
if (inflight === mine)
|
|
309
|
+
inflight = undefined;
|
|
310
|
+
}
|
|
311
|
+
// Another host answered at this port, or the lease went while the call ran: the run stops here, whatever the call said.
|
|
312
|
+
if (lost || /^Error wrong_host:/.test(answer.text)) {
|
|
313
|
+
lose();
|
|
314
|
+
return { text: LOST_TEXT, isError: true };
|
|
315
|
+
}
|
|
316
|
+
// A person came back: give the phone up while the run waits, so other agents aren't held out for minutes.
|
|
317
|
+
if (isBusyAnswer(answer))
|
|
318
|
+
await drop();
|
|
319
|
+
return { text: answer.text, isError: answer.isError };
|
|
320
|
+
},
|
|
321
|
+
close: async () => {
|
|
322
|
+
stopBeat();
|
|
323
|
+
await drop();
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
async function ownHost(schedule, name, env, closedNote) {
|
|
329
|
+
const runtime = await bounded("starting a host of its own", OWN_HOST_SETUP_TIMEOUT_MS, () => createRuntime({
|
|
330
|
+
env,
|
|
331
|
+
screenshots: "file",
|
|
332
|
+
...(schedule.policy !== null ? { policy: schedule.policy } : {}),
|
|
333
|
+
...(schedule.accounts !== null ? { accounts: schedule.accounts } : {}),
|
|
334
|
+
...(schedule.maps !== null ? { maps: schedule.maps } : {}),
|
|
335
|
+
log: () => undefined,
|
|
336
|
+
}));
|
|
337
|
+
const tools = runtime.toolsFor(`schedule-${name}`);
|
|
338
|
+
return {
|
|
339
|
+
via: "its own host",
|
|
340
|
+
...(closedNote !== undefined ? { closedNote } : {}),
|
|
341
|
+
appOpen: async (waitMs) => {
|
|
342
|
+
const until = Date.now() + waitMs;
|
|
343
|
+
while (runtime.host.current() === undefined && Date.now() < until)
|
|
344
|
+
await sleep(250);
|
|
345
|
+
return runtime.host.current() !== undefined;
|
|
346
|
+
},
|
|
347
|
+
inUse: () => runtime.phoneInUse(),
|
|
348
|
+
call: async (tool, args) => {
|
|
349
|
+
if (!isToolName(tool))
|
|
350
|
+
return { text: `Error bad_params: no tool ${tool}.`, isError: true };
|
|
351
|
+
try {
|
|
352
|
+
const result = await bounded("the route call", ROUTE_CALL_TIMEOUT_MS, (signal) => tools.withCall(signal, () => callTool(tools, tool, args)));
|
|
353
|
+
return { text: result.content.map((block) => (block.type === "text" ? block.text : "")).join("\n"), isError: result.isError === true };
|
|
354
|
+
}
|
|
355
|
+
catch (error) {
|
|
356
|
+
if (!(error instanceof ScheduleTimeout))
|
|
357
|
+
throw error;
|
|
358
|
+
return { text: `Error timeout: ${error.message}; the call was cut off.`, isError: true };
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
close: () => runtime.close(),
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* A host the app is connected to: a running one whose policy, accounts and maps are the schedule's; else one of its own that takes
|
|
366
|
+
* the schedule's files. A running host that differs (or can't say) is never used: the run starts its own, and when the app
|
|
367
|
+
* doesn't connect to it the run skips and says the running host differed.
|
|
368
|
+
*/
|
|
369
|
+
export async function connectScheduleHost(schedule, name, env = process.env, deps = {}) {
|
|
370
|
+
const running = await runningHost(env, `schedule-${name}`, schedule, deps.thin ?? thinCall, deps.hasher ?? factHasher(env));
|
|
371
|
+
if (running.host !== null)
|
|
372
|
+
return running.host;
|
|
373
|
+
const own = deps.own ?? ownHost;
|
|
374
|
+
return running.mismatch === null ? await own(schedule, name, env) : await own(schedule, name, env, `the running host differs from the schedule: ${running.mismatch}`);
|
|
375
|
+
}
|
|
376
|
+
/** The vault's redaction for a schedule's report: the accounts file the schedule names, else nothing to scrub. */
|
|
377
|
+
export async function redactorFor(schedule, signal) {
|
|
378
|
+
if (schedule.accounts === null)
|
|
379
|
+
return (text) => text;
|
|
380
|
+
try {
|
|
381
|
+
const loaded = await loadAccounts(schedule.accounts, undefined, undefined, signal);
|
|
382
|
+
return loaded.store === null ? (text) => text : (text) => loaded.store.redact(text);
|
|
383
|
+
}
|
|
384
|
+
catch (error) {
|
|
385
|
+
// A load that was cut off is not "no vault": the caller fails the run instead of going on with a scrubber that hides nothing.
|
|
386
|
+
if (signal?.aborted === true)
|
|
387
|
+
throw error;
|
|
388
|
+
return (text) => text;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
//# sourceMappingURL=schedulehost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedulehost.js","sourceRoot":"","sources":["../src/schedulehost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,YAAY,EAAiB,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAsC,MAAM,kBAAkB,CAAC;AAErI,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,E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CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,8HAA8H;QAC9H,IAAI,MAAM,EAAE,OAAO,KAAK,IAAI;YAAE,MAAM,KAAK,CAAC;QAC1C,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;IACxB,CAAC;AACH,CAAC"}
|
package/dist/script.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export declare const sharedScriptV2Schema: z.ZodObject<{
|
|
|
37
37
|
start: z.ZodOptional<z.ZodString>;
|
|
38
38
|
end: z.ZodOptional<z.ZodString>;
|
|
39
39
|
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
draftsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
40
41
|
format: z.ZodLiteral<"agent-tools-script">;
|
|
41
42
|
name: z.ZodString;
|
|
42
43
|
app: z.ZodOptional<z.ZodString>;
|
|
@@ -97,6 +98,7 @@ export declare const sharedScriptSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
97
98
|
start: z.ZodOptional<z.ZodString>;
|
|
98
99
|
end: z.ZodOptional<z.ZodString>;
|
|
99
100
|
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
101
|
+
draftsOnly: z.ZodOptional<z.ZodBoolean>;
|
|
100
102
|
format: z.ZodLiteral<"agent-tools-script">;
|
|
101
103
|
name: z.ZodString;
|
|
102
104
|
app: z.ZodOptional<z.ZodString>;
|
package/dist/script.js
CHANGED
|
@@ -23,6 +23,8 @@ export const sharedScriptV2Schema = z.object({
|
|
|
23
23
|
start: z.string().min(1).optional(),
|
|
24
24
|
end: z.string().min(1).optional(),
|
|
25
25
|
variables: z.array(variableNameSchema).optional(),
|
|
26
|
+
/** AGENT-TOOLS 1.14 §18.5, §21.3: every touch on a word that reaches other people stops at a draft shown to a person. */
|
|
27
|
+
draftsOnly: z.boolean().optional(),
|
|
26
28
|
});
|
|
27
29
|
export const sharedScriptSchema = z.union([sharedScriptV1Schema, sharedScriptV2Schema]);
|
|
28
30
|
/** Tapline's script before 1.1: the app's methods and their parameters. */
|
package/dist/script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script.js","sourceRoot":"","sources":["../src/script.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAa,MAAM,UAAU,CAAC;AAEjD;;;;;GAKG;AAEH,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEvF,uGAAuG;AACvG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,8CAA8C,CAAC,CAAC;AAErH,6GAA6G;AAC7G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,UAAU;IACb,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC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CAAwC;QACxC,sBAAsB,OAAO,CAAC,MAAM,eAAe,QAAQ,WAAW,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;QAC1F,6CAA6C,OAAO,CAAC,MAAM,eAAe,QAAQ,WAAW,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;QACjH,GAAG,KAAK;QACR,gBAAgB;QAChB,eAAe;QACf,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -120,6 +120,11 @@ export interface TaplineHostOptions {
|
|
|
120
120
|
* it: how test accounts' values stay out of every answer (AGENT-TOOLS 1.13 §18.6).
|
|
121
121
|
*/
|
|
122
122
|
redact?: (text: string) => string;
|
|
123
|
+
/**
|
|
124
|
+
* Whether `redact` hides vault values (what `redacting` answers). Default: true when `redact` is given. A host that scrubs only
|
|
125
|
+
* one-time codes sets false, so the vault's own handling stays off while no vault is loaded.
|
|
126
|
+
*/
|
|
127
|
+
redactsVault?: boolean;
|
|
123
128
|
}
|
|
124
129
|
/** The longest touch another tool may announce (`POST /agent-touch`), in milliseconds. */
|
|
125
130
|
export declare const MAX_AGENT_TOUCH_MS = 10000;
|
|
@@ -238,6 +243,7 @@ export declare class TaplineHost extends EventEmitter<HostEvents> {
|
|
|
238
243
|
private listenCalled;
|
|
239
244
|
private closed;
|
|
240
245
|
private readonly redact;
|
|
246
|
+
private readonly redactsVault;
|
|
241
247
|
constructor(options: TaplineHostOptions);
|
|
242
248
|
/**
|
|
243
249
|
* Another tool on this computer (Tapwright) is about to touch the phone for an agent, for about
|
package/dist/server.js
CHANGED
|
@@ -185,6 +185,7 @@ export class TaplineHost extends EventEmitter {
|
|
|
185
185
|
listenCalled = false;
|
|
186
186
|
closed = false;
|
|
187
187
|
redact;
|
|
188
|
+
redactsVault;
|
|
188
189
|
constructor(options) {
|
|
189
190
|
super();
|
|
190
191
|
this.token = options.token;
|
|
@@ -199,6 +200,7 @@ export class TaplineHost extends EventEmitter {
|
|
|
199
200
|
this.agentTouchSlackMs = options.agentTouchSlackMs ?? 1500;
|
|
200
201
|
this.api = options.api;
|
|
201
202
|
this.redact = options.redact;
|
|
203
|
+
this.redactsVault = options.redactsVault ?? true;
|
|
202
204
|
}
|
|
203
205
|
/**
|
|
204
206
|
* Another tool on this computer (Tapwright) is about to touch the phone for an agent, for about
|
|
@@ -605,7 +607,7 @@ export class TaplineHost extends EventEmitter {
|
|
|
605
607
|
// ---- requests -------------------------------------------------------------
|
|
606
608
|
/** Whether account values are scrubbed from what the apps send (a test accounts file is loaded). */
|
|
607
609
|
get redacting() {
|
|
608
|
-
return this.redact !== undefined;
|
|
610
|
+
return this.redact !== undefined && this.redactsVault;
|
|
609
611
|
}
|
|
610
612
|
/** Scrubs a value (text and property names) the way every answer from an app is; for what an `internal` request gave. */
|
|
611
613
|
redactOut(value) {
|