tapline-host 1.6.1 → 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 +55 -16
- 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/mapcmd.js +5 -4
- package/dist/mapcmd.js.map +1 -1
- 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 +17 -0
- package/dist/places.js +44 -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
package/dist/accounts.d.ts
CHANGED
|
@@ -1,4 +1,49 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { type VaultDeps } from "./vault.js";
|
|
3
|
+
export declare const VAULT_KINDS: readonly ["account", "card", "address", "identity", "note", "phone"];
|
|
4
|
+
export type VaultKind = (typeof VAULT_KINDS)[number];
|
|
5
|
+
/** The fields each kind has. `phone` is Tapwright's: Tapline holds it and never types it. */
|
|
6
|
+
export declare const KIND_FIELDS: Record<VaultKind, readonly string[]>;
|
|
7
|
+
/** Version 2 (§20.1). A top-level `otp` key is Tapwright's and is ignored here. */
|
|
8
|
+
export declare const vaultFileSchema: z.ZodObject<{
|
|
9
|
+
version: z.ZodLiteral<2>;
|
|
10
|
+
vault: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
11
|
+
kind: z.ZodLiteral<"account">;
|
|
12
|
+
username: z.ZodOptional<z.ZodString>;
|
|
13
|
+
password: z.ZodOptional<z.ZodString>;
|
|
14
|
+
apps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
+
kind: z.ZodLiteral<"card">;
|
|
17
|
+
number: z.ZodOptional<z.ZodString>;
|
|
18
|
+
expiry: z.ZodOptional<z.ZodString>;
|
|
19
|
+
cvc: z.ZodOptional<z.ZodString>;
|
|
20
|
+
apps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
22
|
+
kind: z.ZodLiteral<"address">;
|
|
23
|
+
street: z.ZodOptional<z.ZodString>;
|
|
24
|
+
city: z.ZodOptional<z.ZodString>;
|
|
25
|
+
postcode: z.ZodOptional<z.ZodString>;
|
|
26
|
+
country: z.ZodOptional<z.ZodString>;
|
|
27
|
+
apps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"identity">;
|
|
30
|
+
name: z.ZodOptional<z.ZodString>;
|
|
31
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
32
|
+
email: z.ZodOptional<z.ZodString>;
|
|
33
|
+
birthday: z.ZodOptional<z.ZodString>;
|
|
34
|
+
apps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
kind: z.ZodLiteral<"note">;
|
|
37
|
+
text: z.ZodOptional<z.ZodString>;
|
|
38
|
+
apps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"phone">;
|
|
41
|
+
passcode: z.ZodOptional<z.ZodString>;
|
|
42
|
+
apps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
}, z.core.$strip>], "kind">>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export type VaultFile = z.infer<typeof vaultFileSchema>;
|
|
46
|
+
/** Version 1 (§18.6). */
|
|
2
47
|
export declare const accountsFileSchema: z.ZodObject<{
|
|
3
48
|
version: z.ZodLiteral<1>;
|
|
4
49
|
accounts: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -9,6 +54,14 @@ export declare const accountsFileSchema: z.ZodObject<{
|
|
|
9
54
|
}, z.core.$strip>>;
|
|
10
55
|
}, z.core.$strip>;
|
|
11
56
|
export type AccountsFile = z.infer<typeof accountsFileSchema>;
|
|
57
|
+
/** An entry as the store holds it, whatever file version it came from. */
|
|
58
|
+
export interface VaultEntry {
|
|
59
|
+
kind: VaultKind;
|
|
60
|
+
values: Record<string, string>;
|
|
61
|
+
apps?: string[];
|
|
62
|
+
}
|
|
63
|
+
/** Where `value=` and the other answers name a value: `<home's street>`. */
|
|
64
|
+
export declare function placeholderOf(name: string, field: string): string;
|
|
12
65
|
export type AccountField = "username" | "password";
|
|
13
66
|
export type AccountResolved = {
|
|
14
67
|
ok: true;
|
|
@@ -19,16 +72,26 @@ export type AccountResolved = {
|
|
|
19
72
|
message: string;
|
|
20
73
|
};
|
|
21
74
|
export interface AccountStore {
|
|
22
|
-
/** The
|
|
75
|
+
/** The entries' names, never their values. */
|
|
23
76
|
names(): string[];
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/**
|
|
77
|
+
/** What kind an entry is. */
|
|
78
|
+
kindOf(name: string): VaultKind | undefined;
|
|
79
|
+
/** One value of an account, for an app (`${account.<field>}`: the call's `account` names the entry, and it is an `account`). */
|
|
80
|
+
resolve(name: string, field: string, appId: string): AccountResolved;
|
|
81
|
+
/** One value of any entry, for an app (`${vault.<name>.<field>}`). */
|
|
82
|
+
resolveEntry(name: string, field: string, appId: string): AccountResolved;
|
|
83
|
+
/** Replaces every vault value with its placeholder, such as `<tester2's username>` or `<home's street>`. */
|
|
27
84
|
redact(text: string): string;
|
|
28
85
|
}
|
|
29
|
-
/** What the
|
|
86
|
+
/** What the vault file gave: its entries (and the plain file's warning), or why none were loaded. */
|
|
30
87
|
export type AccountsLoad = {
|
|
31
88
|
store: AccountStore;
|
|
89
|
+
note?: string;
|
|
90
|
+
/**
|
|
91
|
+
* HMAC-SHA256 under `key` of the vault's canonical JSON as it was decrypted (every value and every per-app permission), so two
|
|
92
|
+
* loads of the same vault agree and a changed one differs, while nothing in it can be guessed from the hash alone.
|
|
93
|
+
*/
|
|
94
|
+
fingerprint?: (key: string) => string;
|
|
32
95
|
} | {
|
|
33
96
|
store: null;
|
|
34
97
|
blocked: string;
|
|
@@ -42,31 +105,85 @@ export interface GitProbe {
|
|
|
42
105
|
/** The real probe: the user's own git, run without a shell. When git can't run, a `.git` above the file counts as a work tree. */
|
|
43
106
|
export declare const realGitProbe: GitProbe;
|
|
44
107
|
/** What the user is told wherever the accounts option is described (the parameter text, `--help`, `doctor`). */
|
|
45
|
-
export declare const ACCOUNTS_WARNING = "A password stays out of pictures only while its field is secure; a \"show password\" toggle shows it. Keep the
|
|
108
|
+
export declare const ACCOUNTS_WARNING = "A password stays out of pictures only while its field is secure; a \"show password\" toggle shows it. Keep the vault file outside the folders the agent may read.";
|
|
46
109
|
/** The refusal's words, for the first answer, `doctor` and every use. */
|
|
47
110
|
export declare function blockedMessage(file: string): string;
|
|
111
|
+
/**
|
|
112
|
+
* The shapes a value can take on its way back: as it is, with direction marks and zero-width characters stripped, with
|
|
113
|
+
* whitespace collapsed (as the app's `normalizeText` leaves it), each of those inside a JSON string (also twice, and with
|
|
114
|
+
* non-ASCII escaped), and in a URL (percent or form encoded, either case of hex). A value the app cuts at 200 characters
|
|
115
|
+
* leaves its first 200.
|
|
116
|
+
*/
|
|
117
|
+
export declare function variantsOf(value: string): string[];
|
|
118
|
+
/**
|
|
119
|
+
* A scrubber for loose values that are not vault entries (a one-time code, AGENT-TOOLS 1.14 §20.4): each shows as `token`.
|
|
120
|
+
* The same forms and the same minimum length as a vault value.
|
|
121
|
+
*/
|
|
122
|
+
export declare function looseScrubber(values: readonly string[], token: string): (text: string) => string;
|
|
123
|
+
/**
|
|
124
|
+
* One scrubber over the values of several stores (the current one and the ones a reload retired): every value is matched against the
|
|
125
|
+
* ORIGINAL text in one pass and the spans are merged leftmost-longest, so a value two stores share a prefix, a suffix or a middle
|
|
126
|
+
* of is never half-scrubbed by the other one. Each value keeps its own entry's placeholder.
|
|
127
|
+
*/
|
|
128
|
+
export declare function combinedRedact(stores: readonly AccountStore[], codes?: {
|
|
129
|
+
values: readonly string[];
|
|
130
|
+
token: string;
|
|
131
|
+
}): (text: string) => string;
|
|
132
|
+
/** The registered one-time codes, as the one matcher needs them: the codes (the same array until one is added) and their placeholder. */
|
|
133
|
+
export interface CodeSource {
|
|
134
|
+
values(): readonly string[];
|
|
135
|
+
readonly token: string;
|
|
136
|
+
redact(text: string): string;
|
|
137
|
+
}
|
|
138
|
+
/** A store that also scrubs every retired store's values (redaction is cumulative for a session, section 20.3), in one matcher. */
|
|
139
|
+
export declare function historyStore(current: AccountStore, retired: readonly AccountStore[]): AccountStore;
|
|
140
|
+
/**
|
|
141
|
+
* Scrubs a text of every vault value (current and retired) AND every registered one-time code with ONE matcher over the original
|
|
142
|
+
* text, never one scrubber after another: where a code and a vault value overlap, the longer complete match wins. The matcher is
|
|
143
|
+
* cached until a code is registered or the vault's stores change.
|
|
144
|
+
*/
|
|
145
|
+
export declare function redactAll(store: AccountStore | null | undefined, codes: CodeSource, text: string): string;
|
|
146
|
+
/** The store of a version 1 file (the accounts of §18.6). */
|
|
48
147
|
export declare function accountStore(file: AccountsFile): AccountStore;
|
|
148
|
+
/** The store of a version 2 file (§20.1). */
|
|
149
|
+
export declare function vaultStore(file: VaultFile): AccountStore;
|
|
49
150
|
/**
|
|
50
|
-
* Reads the
|
|
51
|
-
*
|
|
151
|
+
* Reads the vault file. A plain file inside a git work tree that doesn't ignore it is not loaded (a protected file holds no
|
|
152
|
+
* value, so that rule doesn't apply to it). A protected file that can't be opened loads nothing and says why. A file that
|
|
153
|
+
* can't be read or isn't the format throws a plain message that never quotes the file (it holds secrets).
|
|
52
154
|
*/
|
|
53
|
-
export declare function loadAccounts(file: string, probe?: GitProbe): Promise<AccountsLoad>;
|
|
155
|
+
export declare function loadAccounts(file: string, probe?: GitProbe, deps?: VaultDeps, signal?: AbortSignal): Promise<AccountsLoad>;
|
|
54
156
|
/**
|
|
55
157
|
* Scrubs every string in a JSON value (an app's answer), keeping its shape. Property names are scrubbed too; two names
|
|
56
158
|
* that come out the same stay apart with a numbered suffix.
|
|
57
159
|
*/
|
|
58
160
|
export declare function redactValue(value: unknown, redact: (text: string) => string): unknown;
|
|
161
|
+
/**
|
|
162
|
+
* The backstop at a writer of files (§20.3): scrubs the content values of a JSON value, never its keys, so a script keeps
|
|
163
|
+
* its tool names and its `${vault.home.street}` placeholders.
|
|
164
|
+
*/
|
|
165
|
+
export declare function redactContent(value: unknown, redact: (text: string) => string): unknown;
|
|
166
|
+
/** Whether a text refers to the vault (`${account.…}`, `${vault.…}`) or to a one-time code (`${otp.<app>}`, §20.4). */
|
|
167
|
+
export declare function mentionsVault(text: string): boolean;
|
|
168
|
+
/** What a reference named: which entry and field, and its kind. */
|
|
169
|
+
export interface VaultUse {
|
|
170
|
+
name: string;
|
|
171
|
+
kind: VaultKind;
|
|
172
|
+
field: string;
|
|
173
|
+
}
|
|
59
174
|
export type AccountText = {
|
|
60
175
|
ok: true;
|
|
61
176
|
text: string;
|
|
62
|
-
field:
|
|
177
|
+
field: string | null;
|
|
178
|
+
use?: VaultUse;
|
|
63
179
|
} | {
|
|
64
180
|
ok: false;
|
|
65
181
|
code: "not_found" | "bad_params";
|
|
66
182
|
message: string;
|
|
67
183
|
};
|
|
68
184
|
/**
|
|
69
|
-
* `${account.username}
|
|
70
|
-
* other text it could get a password past the secure-field rule. Text without a
|
|
185
|
+
* `${account.username}`, `${account.password}` or `${vault.<name>.<field>}` becomes the value, but only when it is the whole
|
|
186
|
+
* text: joined with other text it could get a password past the secure-field rule. Text without a reference passes unchanged
|
|
187
|
+
* (field null).
|
|
71
188
|
*/
|
|
72
189
|
export declare function substituteAccount(text: string, store: AccountStore, name: string | undefined, appId: string): AccountText;
|