@camstack/types 1.2.327 → 1.2.329
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/addon/base-addon.d.ts +58 -0
- package/dist/addon/secret-aware-context.d.ts +27 -0
- package/dist/addon/secret-paths.d.ts +48 -0
- package/dist/addon/secret-settings-view.d.ts +80 -0
- package/dist/addon.d.ts +1 -0
- package/dist/addon.js +52 -4
- package/dist/addon.mjs +27 -5
- package/dist/capabilities/addons.cap.d.ts +4 -4
- package/dist/capabilities/alarm-panel.cap.d.ts +8 -8
- package/dist/capabilities/alerts.cap.d.ts +5 -5
- package/dist/capabilities/control.cap.d.ts +11 -11
- package/dist/capabilities/day-night.cap.d.ts +16 -16
- package/dist/capabilities/device-manager.cap.d.ts +2 -0
- package/dist/capabilities/enum-sensor.cap.d.ts +4 -4
- package/dist/capabilities/index.d.ts +6 -2
- package/dist/capabilities/integrations.cap.d.ts +6 -3
- package/dist/capabilities/keychain-admin.cap.d.ts +312 -0
- package/dist/capabilities/keychain.cap.d.ts +180 -0
- package/dist/capabilities/lawn-mower-control.cap.d.ts +4 -4
- package/dist/capabilities/log-channels.cap.d.ts +1 -1
- package/dist/capabilities/log-destination.cap.d.ts +5 -5
- package/dist/capabilities/notification-rules.cap.d.ts +118 -118
- package/dist/capabilities/osd-manager.cap.d.ts +11 -11
- package/dist/capabilities/osd.cap.d.ts +5 -5
- package/dist/capabilities/pipeline-analytics.cap.d.ts +1291 -118
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +384 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +145 -2
- package/dist/capabilities/storage.cap.d.ts +1 -1
- package/dist/capabilities/system.cap.d.ts +16 -16
- package/dist/capabilities/webrtc-session.cap.d.ts +3 -3
- package/dist/client.js +37 -1
- package/dist/client.mjs +37 -1
- package/dist/device/device-context.d.ts +11 -1
- package/dist/device/index.d.ts +1 -1
- package/dist/enums/event-category.d.ts +7 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-CtBAl88K.js → event-category-CHduMGvg.js} +7 -0
- package/dist/{event-category-B_0XEcLF.mjs → event-category-DaIZi00R.mjs} +7 -0
- package/dist/generated/addon-api.d.ts +289 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +8 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +4 -2
- package/dist/health/wiring-health.d.ts +8 -8
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1881 -101
- package/dist/index.mjs +1766 -98
- package/dist/interfaces/addon.d.ts +25 -0
- package/dist/interfaces/config-ui-secrets.d.ts +12 -0
- package/dist/interfaces/config-ui.d.ts +29 -1
- package/dist/interfaces/event-bus.d.ts +11 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts +18 -0
- package/dist/keychain/index.d.ts +5 -0
- package/dist/keychain/known-secrets.d.ts +31 -0
- package/dist/keychain/resolve-secret-views.d.ts +2 -0
- package/dist/keychain/secret-marker.d.ts +52 -0
- package/dist/keychain/secret-ref.d.ts +62 -0
- package/dist/keychain/secrets-access.d.ts +77 -0
- package/dist/logging/log-channel.d.ts +2 -2
- package/dist/pipeline/auto-tune/plan-schemas.d.ts +123 -0
- package/dist/pipeline/auto-tune/recommend.d.ts +26 -1
- package/dist/pipeline/load-balancing/schemas.d.ts +8 -7
- package/dist/pipeline/node-benchmark/benchmark-mode.d.ts +57 -0
- package/dist/pipeline/node-benchmark/index.d.ts +9 -0
- package/dist/pipeline/node-benchmark/results.d.ts +52 -0
- package/dist/pipeline/node-benchmark/schemas.d.ts +848 -0
- package/dist/pipeline/node-benchmark/step-tree.d.ts +23 -0
- package/dist/{sleep-az1qiFzK.js → sleep-ClNXPpWR.js} +1580 -121
- package/dist/{sleep-B0JG7-_F.mjs → sleep-DujUvOcb.mjs} +1340 -121
- package/package.json +1 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
/**
|
|
4
|
+
* `keychain-admin` — the operator's view of the keychain (System → Secrets).
|
|
5
|
+
*
|
|
6
|
+
* Every method is `admin`. Two methods hand out material, each audited and
|
|
7
|
+
* each named for exactly that: {@link keychainAdminCapability.methods.reveal}
|
|
8
|
+
* (one value, shown briefly by the UI) and `downloadRecoveryKey` (the master
|
|
9
|
+
* key itself, so the operator can keep a copy off the hub). Nothing else
|
|
10
|
+
* returns a value.
|
|
11
|
+
*
|
|
12
|
+
* The master key's LOCATION is configuration, never an env var (D788):
|
|
13
|
+
* `keychain.keyFile` in `config.yaml`, the OS keychain on a desktop hub, else
|
|
14
|
+
* `<dataDir>/.keychain/master.key` — which sits beside the database in every
|
|
15
|
+
* whole-volume backup, and the status says so.
|
|
16
|
+
*/
|
|
17
|
+
/** Where the master key in use came from. */
|
|
18
|
+
export declare const KeychainKeySourceKindSchema: z.ZodEnum<{
|
|
19
|
+
platform: "platform";
|
|
20
|
+
"config-file": "config-file";
|
|
21
|
+
"previous-config-file": "previous-config-file";
|
|
22
|
+
"default-file": "default-file";
|
|
23
|
+
}>;
|
|
24
|
+
export type KeychainKeySourceKind = z.infer<typeof KeychainKeySourceKindSchema>;
|
|
25
|
+
export declare const KeychainKeySourceSchema: z.ZodObject<{
|
|
26
|
+
kind: z.ZodEnum<{
|
|
27
|
+
platform: "platform";
|
|
28
|
+
"config-file": "config-file";
|
|
29
|
+
"previous-config-file": "previous-config-file";
|
|
30
|
+
"default-file": "default-file";
|
|
31
|
+
}>;
|
|
32
|
+
path: z.ZodOptional<z.ZodString>;
|
|
33
|
+
sharesBackupWithDatabase: z.ZodBoolean;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type KeychainKeySource = z.infer<typeof KeychainKeySourceSchema>;
|
|
36
|
+
export declare const KeychainStatusSchema: z.ZodObject<{
|
|
37
|
+
keychain: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
state: z.ZodLiteral<"ready">;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
state: z.ZodLiteral<"locked">;
|
|
41
|
+
reason: z.ZodEnum<{
|
|
42
|
+
"key-missing": "key-missing";
|
|
43
|
+
"wrong-key": "wrong-key";
|
|
44
|
+
"key-file-unreadable": "key-file-unreadable";
|
|
45
|
+
"store-unavailable": "store-unavailable";
|
|
46
|
+
"not-initialized": "not-initialized";
|
|
47
|
+
"decrypt-failed": "decrypt-failed";
|
|
48
|
+
}>;
|
|
49
|
+
}, z.core.$strip>], "state">;
|
|
50
|
+
keySource: z.ZodNullable<z.ZodObject<{
|
|
51
|
+
kind: z.ZodEnum<{
|
|
52
|
+
platform: "platform";
|
|
53
|
+
"config-file": "config-file";
|
|
54
|
+
"previous-config-file": "previous-config-file";
|
|
55
|
+
"default-file": "default-file";
|
|
56
|
+
}>;
|
|
57
|
+
path: z.ZodOptional<z.ZodString>;
|
|
58
|
+
sharesBackupWithDatabase: z.ZodBoolean;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
configuredSource: z.ZodObject<{
|
|
61
|
+
kind: z.ZodEnum<{
|
|
62
|
+
platform: "platform";
|
|
63
|
+
"config-file": "config-file";
|
|
64
|
+
"previous-config-file": "previous-config-file";
|
|
65
|
+
"default-file": "default-file";
|
|
66
|
+
}>;
|
|
67
|
+
path: z.ZodOptional<z.ZodString>;
|
|
68
|
+
sharesBackupWithDatabase: z.ZodBoolean;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
71
|
+
activeKeyId: z.ZodNullable<z.ZodString>;
|
|
72
|
+
rotationPending: z.ZodBoolean;
|
|
73
|
+
retiredWraps: z.ZodNumber;
|
|
74
|
+
recoveryKeyDownloadedAt: z.ZodNullable<z.ZodNumber>;
|
|
75
|
+
secretCount: z.ZodNumber;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export type KeychainStatus = z.infer<typeof KeychainStatusSchema>;
|
|
78
|
+
/**
|
|
79
|
+
* Whether a stored value is still pointed at by its owner's settings.
|
|
80
|
+
* `unknown` is a first-class answer: a scope whose blob could not be read is
|
|
81
|
+
* never reported as an orphan (and never deleted as one).
|
|
82
|
+
*/
|
|
83
|
+
export declare const KeychainSecretUsageSchema: z.ZodEnum<{
|
|
84
|
+
unknown: "unknown";
|
|
85
|
+
"in-use": "in-use";
|
|
86
|
+
orphan: "orphan";
|
|
87
|
+
}>;
|
|
88
|
+
export type KeychainSecretUsage = z.infer<typeof KeychainSecretUsageSchema>;
|
|
89
|
+
export declare const KeychainAdminSecretSchema: z.ZodObject<{
|
|
90
|
+
ref: z.ZodString;
|
|
91
|
+
owner: z.ZodString;
|
|
92
|
+
scope: z.ZodString;
|
|
93
|
+
fieldPath: z.ZodString;
|
|
94
|
+
version: z.ZodNumber;
|
|
95
|
+
createdAt: z.ZodNumber;
|
|
96
|
+
updatedAt: z.ZodNumber;
|
|
97
|
+
updatedBy: z.ZodString;
|
|
98
|
+
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
99
|
+
usage: z.ZodEnum<{
|
|
100
|
+
unknown: "unknown";
|
|
101
|
+
"in-use": "in-use";
|
|
102
|
+
orphan: "orphan";
|
|
103
|
+
}>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
export type KeychainAdminSecret = z.infer<typeof KeychainAdminSecretSchema>;
|
|
106
|
+
export declare const KeychainAuditActionSchema: z.ZodEnum<{
|
|
107
|
+
delete: "delete";
|
|
108
|
+
reset: "reset";
|
|
109
|
+
put: "put";
|
|
110
|
+
reveal: "reveal";
|
|
111
|
+
"rotate-master-key": "rotate-master-key";
|
|
112
|
+
"purge-retired-keys": "purge-retired-keys";
|
|
113
|
+
"download-recovery-key": "download-recovery-key";
|
|
114
|
+
"delete-orphans": "delete-orphans";
|
|
115
|
+
initialize: "initialize";
|
|
116
|
+
}>;
|
|
117
|
+
export type KeychainAuditAction = z.infer<typeof KeychainAuditActionSchema>;
|
|
118
|
+
export declare const KeychainAuditEntrySchema: z.ZodObject<{
|
|
119
|
+
id: z.ZodString;
|
|
120
|
+
at: z.ZodNumber;
|
|
121
|
+
action: z.ZodEnum<{
|
|
122
|
+
delete: "delete";
|
|
123
|
+
reset: "reset";
|
|
124
|
+
put: "put";
|
|
125
|
+
reveal: "reveal";
|
|
126
|
+
"rotate-master-key": "rotate-master-key";
|
|
127
|
+
"purge-retired-keys": "purge-retired-keys";
|
|
128
|
+
"download-recovery-key": "download-recovery-key";
|
|
129
|
+
"delete-orphans": "delete-orphans";
|
|
130
|
+
initialize: "initialize";
|
|
131
|
+
}>;
|
|
132
|
+
actor: z.ZodString;
|
|
133
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
134
|
+
detail: z.ZodNullable<z.ZodString>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
export type KeychainAuditEntry = z.infer<typeof KeychainAuditEntrySchema>;
|
|
137
|
+
export declare const KEYCHAIN_RESET_CONFIRMATION = "RESET KEYCHAIN";
|
|
138
|
+
export declare const keychainAdminCapability: {
|
|
139
|
+
readonly name: "keychain-admin";
|
|
140
|
+
readonly scope: "system";
|
|
141
|
+
readonly mode: "singleton";
|
|
142
|
+
readonly methods: {
|
|
143
|
+
readonly status: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
keychain: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
145
|
+
state: z.ZodLiteral<"ready">;
|
|
146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
state: z.ZodLiteral<"locked">;
|
|
148
|
+
reason: z.ZodEnum<{
|
|
149
|
+
"key-missing": "key-missing";
|
|
150
|
+
"wrong-key": "wrong-key";
|
|
151
|
+
"key-file-unreadable": "key-file-unreadable";
|
|
152
|
+
"store-unavailable": "store-unavailable";
|
|
153
|
+
"not-initialized": "not-initialized";
|
|
154
|
+
"decrypt-failed": "decrypt-failed";
|
|
155
|
+
}>;
|
|
156
|
+
}, z.core.$strip>], "state">;
|
|
157
|
+
keySource: z.ZodNullable<z.ZodObject<{
|
|
158
|
+
kind: z.ZodEnum<{
|
|
159
|
+
platform: "platform";
|
|
160
|
+
"config-file": "config-file";
|
|
161
|
+
"previous-config-file": "previous-config-file";
|
|
162
|
+
"default-file": "default-file";
|
|
163
|
+
}>;
|
|
164
|
+
path: z.ZodOptional<z.ZodString>;
|
|
165
|
+
sharesBackupWithDatabase: z.ZodBoolean;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
configuredSource: z.ZodObject<{
|
|
168
|
+
kind: z.ZodEnum<{
|
|
169
|
+
platform: "platform";
|
|
170
|
+
"config-file": "config-file";
|
|
171
|
+
"previous-config-file": "previous-config-file";
|
|
172
|
+
"default-file": "default-file";
|
|
173
|
+
}>;
|
|
174
|
+
path: z.ZodOptional<z.ZodString>;
|
|
175
|
+
sharesBackupWithDatabase: z.ZodBoolean;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
178
|
+
activeKeyId: z.ZodNullable<z.ZodString>;
|
|
179
|
+
rotationPending: z.ZodBoolean;
|
|
180
|
+
retiredWraps: z.ZodNumber;
|
|
181
|
+
recoveryKeyDownloadedAt: z.ZodNullable<z.ZodNumber>;
|
|
182
|
+
secretCount: z.ZodNumber;
|
|
183
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
184
|
+
readonly listSecrets: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
185
|
+
ref: z.ZodString;
|
|
186
|
+
owner: z.ZodString;
|
|
187
|
+
scope: z.ZodString;
|
|
188
|
+
fieldPath: z.ZodString;
|
|
189
|
+
version: z.ZodNumber;
|
|
190
|
+
createdAt: z.ZodNumber;
|
|
191
|
+
updatedAt: z.ZodNumber;
|
|
192
|
+
updatedBy: z.ZodString;
|
|
193
|
+
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
194
|
+
usage: z.ZodEnum<{
|
|
195
|
+
unknown: "unknown";
|
|
196
|
+
"in-use": "in-use";
|
|
197
|
+
orphan: "orphan";
|
|
198
|
+
}>;
|
|
199
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
200
|
+
readonly listAudit: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
201
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
203
|
+
id: z.ZodString;
|
|
204
|
+
at: z.ZodNumber;
|
|
205
|
+
action: z.ZodEnum<{
|
|
206
|
+
delete: "delete";
|
|
207
|
+
reset: "reset";
|
|
208
|
+
put: "put";
|
|
209
|
+
reveal: "reveal";
|
|
210
|
+
"rotate-master-key": "rotate-master-key";
|
|
211
|
+
"purge-retired-keys": "purge-retired-keys";
|
|
212
|
+
"download-recovery-key": "download-recovery-key";
|
|
213
|
+
"delete-orphans": "delete-orphans";
|
|
214
|
+
initialize: "initialize";
|
|
215
|
+
}>;
|
|
216
|
+
actor: z.ZodString;
|
|
217
|
+
ref: z.ZodNullable<z.ZodString>;
|
|
218
|
+
detail: z.ZodNullable<z.ZodString>;
|
|
219
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
220
|
+
/**
|
|
221
|
+
* Show one value to the operator. Audited. The UI hides it again after a
|
|
222
|
+
* few seconds; nothing caches it.
|
|
223
|
+
*/
|
|
224
|
+
readonly reveal: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
225
|
+
ref: z.ZodString;
|
|
226
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
227
|
+
value: z.ZodString;
|
|
228
|
+
version: z.ZodNumber;
|
|
229
|
+
}, z.core.$strip>, "mutation"> & {
|
|
230
|
+
readonly caller: "required";
|
|
231
|
+
};
|
|
232
|
+
/** Delete refs no owner points at any more. Re-checked here; `unknown` is kept. */
|
|
233
|
+
readonly deleteOrphans: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
234
|
+
refs: z.ZodArray<z.ZodString>;
|
|
235
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
236
|
+
deleted: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
237
|
+
kept: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
238
|
+
ref: z.ZodString;
|
|
239
|
+
usage: z.ZodEnum<{
|
|
240
|
+
unknown: "unknown";
|
|
241
|
+
"in-use": "in-use";
|
|
242
|
+
orphan: "orphan";
|
|
243
|
+
}>;
|
|
244
|
+
}, z.core.$strip>>>;
|
|
245
|
+
}, z.core.$strip>, "mutation"> & {
|
|
246
|
+
readonly caller: "required";
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Wrap the data key under the configured primary master key.
|
|
250
|
+
*
|
|
251
|
+
* Pending rotation (the keychain unlocked with a previous source): re-wrap
|
|
252
|
+
* under the primary. Otherwise, with the default file as primary: generate
|
|
253
|
+
* a new master key, write it there, re-wrap. A file or OS-keychain primary
|
|
254
|
+
* that is already in use cannot be replaced from here — put the new key at
|
|
255
|
+
* the source, keep the old one as `keychain.previousKeyFile`, restart, and
|
|
256
|
+
* rotate. No value is re-encrypted either way; the previous wrap is kept
|
|
257
|
+
* (retired) until purged.
|
|
258
|
+
*/
|
|
259
|
+
readonly rotateMasterKey: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
260
|
+
fingerprint: z.ZodString;
|
|
261
|
+
keySource: z.ZodObject<{
|
|
262
|
+
kind: z.ZodEnum<{
|
|
263
|
+
platform: "platform";
|
|
264
|
+
"config-file": "config-file";
|
|
265
|
+
"previous-config-file": "previous-config-file";
|
|
266
|
+
"default-file": "default-file";
|
|
267
|
+
}>;
|
|
268
|
+
path: z.ZodOptional<z.ZodString>;
|
|
269
|
+
sharesBackupWithDatabase: z.ZodBoolean;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
}, z.core.$strip>, "mutation"> & {
|
|
272
|
+
readonly caller: "required";
|
|
273
|
+
};
|
|
274
|
+
readonly purgeRetiredKeys: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
275
|
+
purged: z.ZodNumber;
|
|
276
|
+
}, z.core.$strip>, "mutation"> & {
|
|
277
|
+
readonly caller: "required";
|
|
278
|
+
};
|
|
279
|
+
/** The master key, base64. Audited; marks the recovery copy as taken. */
|
|
280
|
+
readonly downloadRecoveryKey: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
281
|
+
key: z.ZodString;
|
|
282
|
+
fingerprint: z.ZodString;
|
|
283
|
+
keySource: z.ZodObject<{
|
|
284
|
+
kind: z.ZodEnum<{
|
|
285
|
+
platform: "platform";
|
|
286
|
+
"config-file": "config-file";
|
|
287
|
+
"previous-config-file": "previous-config-file";
|
|
288
|
+
"default-file": "default-file";
|
|
289
|
+
}>;
|
|
290
|
+
path: z.ZodOptional<z.ZodString>;
|
|
291
|
+
sharesBackupWithDatabase: z.ZodBoolean;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
}, z.core.$strip>, "mutation"> & {
|
|
294
|
+
readonly caller: "required";
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Lost-key recovery: archive every stored value into a
|
|
298
|
+
* `keychain:secrets-orphaned-<ts>` table and start over with a new data
|
|
299
|
+
* key. Every secret field then reads "not set". Requires the typed
|
|
300
|
+
* confirmation {@link KEYCHAIN_RESET_CONFIRMATION}.
|
|
301
|
+
*/
|
|
302
|
+
readonly resetKeychain: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
303
|
+
confirm: z.ZodLiteral<"RESET KEYCHAIN">;
|
|
304
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
305
|
+
archivedCollection: z.ZodNullable<z.ZodString>;
|
|
306
|
+
archived: z.ZodNumber;
|
|
307
|
+
}, z.core.$strip>, "mutation"> & {
|
|
308
|
+
readonly caller: "required";
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
export type IKeychainAdminProvider = InferProvider<typeof keychainAdminCapability>;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
/**
|
|
4
|
+
* `keychain` — the hub's encrypted store of secret values (D787).
|
|
5
|
+
*
|
|
6
|
+
* Settings blobs never hold a secret: they hold a marker
|
|
7
|
+
* `{"$secret":"secret://<owner>/<scope>/<fieldPath>","v":1}` and the value
|
|
8
|
+
* lives here, AES-256-GCM under a data key that a master key wraps. This cap
|
|
9
|
+
* is the OWNER's door to its own values: every method is owner-checked
|
|
10
|
+
* against the CALLER, never against anything the caller claims.
|
|
11
|
+
*
|
|
12
|
+
* Who the caller is: the transport stamps `callerAddonId` into the args of a
|
|
13
|
+
* call that crossed a process (the parent `LocalChildRegistry` from the UDS
|
|
14
|
+
* connection, the agent from its child's connection carried in
|
|
15
|
+
* `$hub-cap-fwd`'s envelope). A stamp always overwrites; a wire call with no
|
|
16
|
+
* stamp has its claim stripped. Only a hub in-process caller may state its own
|
|
17
|
+
* identity — `ctx.secrets` does that with the addon id closed over. This is
|
|
18
|
+
* identity against BUGS and misrouting, not against a malicious addon (every
|
|
19
|
+
* runner is the same OS user): see the threat model in
|
|
20
|
+
* `docs/design/2026-10-08-secrets-keychain.md`.
|
|
21
|
+
*
|
|
22
|
+
* `callerAddonId` is deliberately NOT in any input schema: the tRPC router
|
|
23
|
+
* parses the input, so a session can never supply it, and the internal mount
|
|
24
|
+
* floors every method to admin anyway (D240).
|
|
25
|
+
*
|
|
26
|
+
* Internal: addons reach it through `ctx.secrets`, never directly.
|
|
27
|
+
*/
|
|
28
|
+
/** Why a value cannot be served right now. Never folded into "missing". */
|
|
29
|
+
export declare const KeychainUnavailableReasonSchema: z.ZodEnum<{
|
|
30
|
+
"key-missing": "key-missing";
|
|
31
|
+
"wrong-key": "wrong-key";
|
|
32
|
+
"key-file-unreadable": "key-file-unreadable";
|
|
33
|
+
"store-unavailable": "store-unavailable";
|
|
34
|
+
"not-initialized": "not-initialized";
|
|
35
|
+
"decrypt-failed": "decrypt-failed";
|
|
36
|
+
}>;
|
|
37
|
+
export type KeychainUnavailableReason = z.infer<typeof KeychainUnavailableReasonSchema>;
|
|
38
|
+
export declare const KeychainStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39
|
+
state: z.ZodLiteral<"ready">;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
state: z.ZodLiteral<"locked">;
|
|
42
|
+
reason: z.ZodEnum<{
|
|
43
|
+
"key-missing": "key-missing";
|
|
44
|
+
"wrong-key": "wrong-key";
|
|
45
|
+
"key-file-unreadable": "key-file-unreadable";
|
|
46
|
+
"store-unavailable": "store-unavailable";
|
|
47
|
+
"not-initialized": "not-initialized";
|
|
48
|
+
"decrypt-failed": "decrypt-failed";
|
|
49
|
+
}>;
|
|
50
|
+
}, z.core.$strip>], "state">;
|
|
51
|
+
export type KeychainState = z.infer<typeof KeychainStateSchema>;
|
|
52
|
+
export declare const KeychainResolveEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
|
+
kind: z.ZodLiteral<"value">;
|
|
54
|
+
value: z.ZodString;
|
|
55
|
+
version: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"missing">;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"unavailable">;
|
|
60
|
+
reason: z.ZodEnum<{
|
|
61
|
+
"key-missing": "key-missing";
|
|
62
|
+
"wrong-key": "wrong-key";
|
|
63
|
+
"key-file-unreadable": "key-file-unreadable";
|
|
64
|
+
"store-unavailable": "store-unavailable";
|
|
65
|
+
"not-initialized": "not-initialized";
|
|
66
|
+
"decrypt-failed": "decrypt-failed";
|
|
67
|
+
}>;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"forbidden">;
|
|
70
|
+
}, z.core.$strip>], "kind">;
|
|
71
|
+
export type KeychainResolveEntry = z.infer<typeof KeychainResolveEntrySchema>;
|
|
72
|
+
export declare const KeychainResolveResultSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
73
|
+
kind: z.ZodLiteral<"value">;
|
|
74
|
+
value: z.ZodString;
|
|
75
|
+
version: z.ZodNumber;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
kind: z.ZodLiteral<"missing">;
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"unavailable">;
|
|
80
|
+
reason: z.ZodEnum<{
|
|
81
|
+
"key-missing": "key-missing";
|
|
82
|
+
"wrong-key": "wrong-key";
|
|
83
|
+
"key-file-unreadable": "key-file-unreadable";
|
|
84
|
+
"store-unavailable": "store-unavailable";
|
|
85
|
+
"not-initialized": "not-initialized";
|
|
86
|
+
"decrypt-failed": "decrypt-failed";
|
|
87
|
+
}>;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
kind: z.ZodLiteral<"forbidden">;
|
|
90
|
+
}, z.core.$strip>], "kind">>;
|
|
91
|
+
export type KeychainResolveResult = z.infer<typeof KeychainResolveResultSchema>;
|
|
92
|
+
/** Metadata of one stored value — never the value. */
|
|
93
|
+
export declare const KeychainSecretMetaSchema: z.ZodObject<{
|
|
94
|
+
ref: z.ZodString;
|
|
95
|
+
owner: z.ZodString;
|
|
96
|
+
scope: z.ZodString;
|
|
97
|
+
fieldPath: z.ZodString;
|
|
98
|
+
version: z.ZodNumber;
|
|
99
|
+
createdAt: z.ZodNumber;
|
|
100
|
+
updatedAt: z.ZodNumber;
|
|
101
|
+
updatedBy: z.ZodString;
|
|
102
|
+
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export type KeychainSecretMeta = z.infer<typeof KeychainSecretMetaSchema>;
|
|
105
|
+
/** A batch bound: one `resolveConfig` resolves every marker of one blob at once. */
|
|
106
|
+
export declare const KEYCHAIN_MAX_REFS_PER_CALL = 512;
|
|
107
|
+
export declare const keychainCapability: {
|
|
108
|
+
readonly name: "keychain";
|
|
109
|
+
readonly scope: "system";
|
|
110
|
+
readonly mode: "singleton";
|
|
111
|
+
readonly internal: true;
|
|
112
|
+
readonly methods: {
|
|
113
|
+
/** Store (or replace) the caller's value at `ref`. Refused while locked. */
|
|
114
|
+
readonly put: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
115
|
+
ref: z.ZodString;
|
|
116
|
+
value: z.ZodString;
|
|
117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
118
|
+
ref: z.ZodString;
|
|
119
|
+
version: z.ZodNumber;
|
|
120
|
+
}, z.core.$strip>, "mutation">;
|
|
121
|
+
/**
|
|
122
|
+
* Resolve the caller's refs in one round-trip. A locked keychain answers
|
|
123
|
+
* `unavailable` per ref — never `missing`, never an empty value.
|
|
124
|
+
*/
|
|
125
|
+
readonly resolve: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
126
|
+
refs: z.ZodArray<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
128
|
+
kind: z.ZodLiteral<"value">;
|
|
129
|
+
value: z.ZodString;
|
|
130
|
+
version: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
kind: z.ZodLiteral<"missing">;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"unavailable">;
|
|
135
|
+
reason: z.ZodEnum<{
|
|
136
|
+
"key-missing": "key-missing";
|
|
137
|
+
"wrong-key": "wrong-key";
|
|
138
|
+
"key-file-unreadable": "key-file-unreadable";
|
|
139
|
+
"store-unavailable": "store-unavailable";
|
|
140
|
+
"not-initialized": "not-initialized";
|
|
141
|
+
"decrypt-failed": "decrypt-failed";
|
|
142
|
+
}>;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
kind: z.ZodLiteral<"forbidden">;
|
|
145
|
+
}, z.core.$strip>], "kind">>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
146
|
+
/** Remove the caller's refs. Unknown refs are ignored. */
|
|
147
|
+
readonly delete: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
148
|
+
refs: z.ZodArray<z.ZodString>;
|
|
149
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
+
deleted: z.ZodNumber;
|
|
151
|
+
}, z.core.$strip>, "mutation">;
|
|
152
|
+
/** The caller's own refs, metadata only. */
|
|
153
|
+
readonly listMeta: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
154
|
+
ref: z.ZodString;
|
|
155
|
+
owner: z.ZodString;
|
|
156
|
+
scope: z.ZodString;
|
|
157
|
+
fieldPath: z.ZodString;
|
|
158
|
+
version: z.ZodNumber;
|
|
159
|
+
createdAt: z.ZodNumber;
|
|
160
|
+
updatedAt: z.ZodNumber;
|
|
161
|
+
updatedBy: z.ZodString;
|
|
162
|
+
lastReadAt: z.ZodNullable<z.ZodNumber>;
|
|
163
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
164
|
+
/** Whether values can be served — the save path refuses a write while locked. */
|
|
165
|
+
readonly getState: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
166
|
+
state: z.ZodLiteral<"ready">;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
state: z.ZodLiteral<"locked">;
|
|
169
|
+
reason: z.ZodEnum<{
|
|
170
|
+
"key-missing": "key-missing";
|
|
171
|
+
"wrong-key": "wrong-key";
|
|
172
|
+
"key-file-unreadable": "key-file-unreadable";
|
|
173
|
+
"store-unavailable": "store-unavailable";
|
|
174
|
+
"not-initialized": "not-initialized";
|
|
175
|
+
"decrypt-failed": "decrypt-failed";
|
|
176
|
+
}>;
|
|
177
|
+
}, z.core.$strip>], "state">, import("./capability-definition.js").CapabilityMethodKind>;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
export type IKeychainProvider = InferProvider<typeof keychainCapability>;
|
|
@@ -22,8 +22,8 @@ export declare const LawnMowerActivitySchema: z.ZodEnum<{
|
|
|
22
22
|
export type LawnMowerActivity = z.infer<typeof LawnMowerActivitySchema>;
|
|
23
23
|
/** Severity of the current device/error code — info (status), warning, error. */
|
|
24
24
|
export declare const DeviceCodeSeveritySchema: z.ZodEnum<{
|
|
25
|
-
error: "error";
|
|
26
25
|
info: "info";
|
|
26
|
+
error: "error";
|
|
27
27
|
warning: "warning";
|
|
28
28
|
}>;
|
|
29
29
|
export type DeviceCodeSeverity = z.infer<typeof DeviceCodeSeveritySchema>;
|
|
@@ -40,8 +40,8 @@ export declare const LawnMowerControlStatusSchema: z.ZodObject<{
|
|
|
40
40
|
currentCode: z.ZodNullable<z.ZodNumber>;
|
|
41
41
|
currentCodeLabel: z.ZodNullable<z.ZodString>;
|
|
42
42
|
severity: z.ZodEnum<{
|
|
43
|
-
error: "error";
|
|
44
43
|
info: "info";
|
|
44
|
+
error: "error";
|
|
45
45
|
warning: "warning";
|
|
46
46
|
}>;
|
|
47
47
|
lastChangedAt: z.ZodNumber;
|
|
@@ -78,8 +78,8 @@ export declare const lawnMowerControlCapability: {
|
|
|
78
78
|
currentCode: z.ZodNullable<z.ZodNumber>;
|
|
79
79
|
currentCodeLabel: z.ZodNullable<z.ZodString>;
|
|
80
80
|
severity: z.ZodEnum<{
|
|
81
|
-
error: "error";
|
|
82
81
|
info: "info";
|
|
82
|
+
error: "error";
|
|
83
83
|
warning: "warning";
|
|
84
84
|
}>;
|
|
85
85
|
lastChangedAt: z.ZodNumber;
|
|
@@ -103,8 +103,8 @@ export declare const lawnMowerControlCapability: {
|
|
|
103
103
|
currentCode: z.ZodNullable<z.ZodNumber>;
|
|
104
104
|
currentCodeLabel: z.ZodNullable<z.ZodString>;
|
|
105
105
|
severity: z.ZodEnum<{
|
|
106
|
-
error: "error";
|
|
107
106
|
info: "info";
|
|
107
|
+
error: "error";
|
|
108
108
|
warning: "warning";
|
|
109
109
|
}>;
|
|
110
110
|
lastChangedAt: z.ZodNumber;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type InferProvider } from './capability-definition.js';
|
|
3
3
|
declare const LogLevelSchema: z.ZodEnum<{
|
|
4
|
+
info: "info";
|
|
4
5
|
error: "error";
|
|
5
6
|
debug: "debug";
|
|
6
|
-
info: "info";
|
|
7
7
|
warn: "warn";
|
|
8
8
|
}>;
|
|
9
9
|
declare const LogEntrySchema: z.ZodObject<{
|
|
10
10
|
timestamp: z.ZodDate;
|
|
11
11
|
level: z.ZodEnum<{
|
|
12
|
+
info: "info";
|
|
12
13
|
error: "error";
|
|
13
14
|
debug: "debug";
|
|
14
|
-
info: "info";
|
|
15
15
|
warn: "warn";
|
|
16
16
|
}>;
|
|
17
17
|
scope: z.ZodArray<z.ZodString>;
|
|
@@ -28,9 +28,9 @@ export declare const logDestinationCapability: {
|
|
|
28
28
|
readonly write: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
29
29
|
timestamp: z.ZodDate;
|
|
30
30
|
level: z.ZodEnum<{
|
|
31
|
+
info: "info";
|
|
31
32
|
error: "error";
|
|
32
33
|
debug: "debug";
|
|
33
|
-
info: "info";
|
|
34
34
|
warn: "warn";
|
|
35
35
|
}>;
|
|
36
36
|
scope: z.ZodArray<z.ZodString>;
|
|
@@ -41,9 +41,9 @@ export declare const logDestinationCapability: {
|
|
|
41
41
|
readonly query: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
42
42
|
scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
43
|
level: z.ZodOptional<z.ZodEnum<{
|
|
44
|
+
info: "info";
|
|
44
45
|
error: "error";
|
|
45
46
|
debug: "debug";
|
|
46
|
-
info: "info";
|
|
47
47
|
warn: "warn";
|
|
48
48
|
}>>;
|
|
49
49
|
since: z.ZodOptional<z.ZodDate>;
|
|
@@ -53,9 +53,9 @@ export declare const logDestinationCapability: {
|
|
|
53
53
|
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
54
54
|
timestamp: z.ZodDate;
|
|
55
55
|
level: z.ZodEnum<{
|
|
56
|
+
info: "info";
|
|
56
57
|
error: "error";
|
|
57
58
|
debug: "debug";
|
|
58
|
-
info: "info";
|
|
59
59
|
warn: "warn";
|
|
60
60
|
}>;
|
|
61
61
|
scope: z.ZodArray<z.ZodString>;
|