clinkx 1.3.0 → 1.4.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/CHANGELOG.md +28 -0
- package/README.md +13 -6
- package/clinkx-workflows/dist/child-env.d.ts +3 -0
- package/clinkx-workflows/dist/child-env.js +11 -0
- package/clinkx-workflows/dist/child-env.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/api-routes.d.ts +21 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js +27 -0
- package/clinkx-workflows/dist/dashboard/api-routes.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.d.ts +13 -0
- package/clinkx-workflows/dist/dashboard/auth/challenge-store.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/controller.d.ts +27 -0
- package/clinkx-workflows/dist/dashboard/auth/controller.js +262 -23
- package/clinkx-workflows/dist/dashboard/auth/controller.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.d.ts +62 -0
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js +70 -0
- package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/request-admission.d.ts +6 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js +9 -0
- package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/server-factory.js +15 -1
- package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -1
- package/clinkx-workflows/dist/dashboard/settings-contract.d.ts +1806 -0
- package/clinkx-workflows/dist/dashboard/settings-contract.js +630 -0
- package/clinkx-workflows/dist/dashboard/settings-contract.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.d.ts +48 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.js +195 -0
- package/clinkx-workflows/dist/dashboard/settings-process-reader.js.map +1 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.d.ts +87 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.js +690 -0
- package/clinkx-workflows/dist/dashboard/settings-routes.js.map +1 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/index-DSOtuS0p.js +122 -0
- package/clinkx-workflows/dist/dashboard-ui/assets/style-C5guUjwN.css +1 -0
- package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
- package/clinkx-workflows/dist/durable-file-core.d.ts +76 -0
- package/clinkx-workflows/dist/durable-file-core.js +146 -0
- package/clinkx-workflows/dist/durable-file-core.js.map +1 -0
- package/clinkx-workflows/dist/durable-file.d.ts +8 -64
- package/clinkx-workflows/dist/durable-file.js +14 -137
- package/clinkx-workflows/dist/durable-file.js.map +1 -1
- package/clinkx-workflows/dist/index.js +68 -2
- package/clinkx-workflows/dist/index.js.map +1 -1
- package/clinkx-workflows/dist/settings/audit.d.ts +101 -0
- package/clinkx-workflows/dist/settings/audit.js +318 -0
- package/clinkx-workflows/dist/settings/audit.js.map +1 -0
- package/clinkx-workflows/dist/settings/bootstrap.d.ts +35 -0
- package/clinkx-workflows/dist/settings/bootstrap.js +52 -0
- package/clinkx-workflows/dist/settings/bootstrap.js.map +1 -0
- package/clinkx-workflows/dist/settings/codec.d.ts +51 -0
- package/clinkx-workflows/dist/settings/codec.js +410 -0
- package/clinkx-workflows/dist/settings/codec.js.map +1 -0
- package/clinkx-workflows/dist/settings/durable-write.d.ts +48 -0
- package/clinkx-workflows/dist/settings/durable-write.js +31 -0
- package/clinkx-workflows/dist/settings/durable-write.js.map +1 -0
- package/clinkx-workflows/dist/settings/index.d.ts +20 -0
- package/clinkx-workflows/dist/settings/index.js +23 -0
- package/clinkx-workflows/dist/settings/index.js.map +1 -0
- package/clinkx-workflows/dist/settings/loader.d.ts +80 -0
- package/clinkx-workflows/dist/settings/loader.js +577 -0
- package/clinkx-workflows/dist/settings/loader.js.map +1 -0
- package/clinkx-workflows/dist/settings/lock.d.ts +108 -0
- package/clinkx-workflows/dist/settings/lock.js +344 -0
- package/clinkx-workflows/dist/settings/lock.js.map +1 -0
- package/clinkx-workflows/dist/settings/paths.d.ts +65 -0
- package/clinkx-workflows/dist/settings/paths.js +173 -0
- package/clinkx-workflows/dist/settings/paths.js.map +1 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.d.ts +47 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.js +305 -0
- package/clinkx-workflows/dist/settings/process-heartbeat.js.map +1 -0
- package/clinkx-workflows/dist/settings/registry.d.ts +178 -0
- package/clinkx-workflows/dist/settings/registry.js +1285 -0
- package/clinkx-workflows/dist/settings/registry.js.map +1 -0
- package/clinkx-workflows/dist/settings/schema.d.ts +404 -0
- package/clinkx-workflows/dist/settings/schema.js +415 -0
- package/clinkx-workflows/dist/settings/schema.js.map +1 -0
- package/clinkx-workflows/dist/settings/store.d.ts +157 -0
- package/clinkx-workflows/dist/settings/store.js +842 -0
- package/clinkx-workflows/dist/settings/store.js.map +1 -0
- package/clinkx-workflows/dist/stdio-entry.d.ts +2 -0
- package/clinkx-workflows/dist/stdio-entry.js +52 -0
- package/clinkx-workflows/dist/stdio-entry.js.map +1 -0
- package/dist/dashboard-cli.js +50 -1
- package/dist/dashboard-cli.js.map +1 -1
- package/dist/dashboard-companion/protocol.js +17 -0
- package/dist/dashboard-companion/protocol.js.map +1 -1
- package/dist/dashboard-gateway/control-plane/contracts.d.ts +38 -38
- package/dist/dashboard-gateway/tunnel-http.js +20 -0
- package/dist/dashboard-gateway/tunnel-http.js.map +1 -1
- package/dist/elaris/config.d.ts +10 -0
- package/dist/elaris/config.js +27 -1
- package/dist/elaris/config.js.map +1 -1
- package/dist/elaris/tools.js +4 -1
- package/dist/elaris/tools.js.map +1 -1
- package/dist/index.d.ts +0 -31
- package/dist/index.js +41 -404
- package/dist/index.js.map +1 -1
- package/dist/lib.d.ts +17 -0
- package/dist/lib.js +17 -0
- package/dist/lib.js.map +1 -0
- package/dist/progress-report/lock.d.ts +17 -59
- package/dist/progress-report/lock.js +25 -329
- package/dist/progress-report/lock.js.map +1 -1
- package/dist/server.js +75 -4
- package/dist/server.js.map +1 -1
- package/dist/settings-cli/clients.d.ts +137 -0
- package/dist/settings-cli/clients.js +1124 -0
- package/dist/settings-cli/clients.js.map +1 -0
- package/dist/settings-cli/commands.d.ts +67 -0
- package/dist/settings-cli/commands.js +726 -0
- package/dist/settings-cli/commands.js.map +1 -0
- package/dist/settings-cli/format.d.ts +34 -0
- package/dist/settings-cli/format.js +40 -0
- package/dist/settings-cli/format.js.map +1 -0
- package/dist/settings-cli/main.d.ts +18 -0
- package/dist/settings-cli/main.js +256 -0
- package/dist/settings-cli/main.js.map +1 -0
- package/dist/stdio-main.d.ts +73 -0
- package/dist/stdio-main.js +455 -0
- package/dist/stdio-main.js.map +1 -0
- package/docs/configuration.md +340 -39
- package/docs/security.md +150 -6
- package/package.json +2 -2
- package/clinkx-workflows/dist/dashboard-ui/assets/index-DRId2DVA.js +0 -119
- package/clinkx-workflows/dist/dashboard-ui/assets/style-CHAw57y5.css +0 -1
|
@@ -0,0 +1,1806 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard Settings wire contract — S0-1 freeze point.
|
|
3
|
+
*
|
|
4
|
+
* GET/POST schemas for the dashboard Settings API (decision 1: the dashboard
|
|
5
|
+
* can write settings in every mode; OQ-7: tuning/retention/feature/reader-first
|
|
6
|
+
* saves need a normal session, policy and secret saves need a passkey
|
|
7
|
+
* step-up). Wire casing is camelCase, matching the existing dashboard wire
|
|
8
|
+
* conventions (progress reports, prompt-builder library); the on-disk
|
|
9
|
+
* documents in settings/schema.ts stay snake_case.
|
|
10
|
+
*
|
|
11
|
+
* Paths are literals so the companion/gateway POST allowlists can match with
|
|
12
|
+
* exact equality (same reason as prompt-builder-library-contract.ts).
|
|
13
|
+
*
|
|
14
|
+
* Security invariants frozen here:
|
|
15
|
+
* - A GET response can never carry a secret value: `secrets` entries are
|
|
16
|
+
* exactly `{set, updatedAt}` (strict) — no `value` key parses.
|
|
17
|
+
* - Settings saves reject secret-class keys; secret values only ever travel
|
|
18
|
+
* in the separate secrets save (step-up bound) and are never echoed.
|
|
19
|
+
* - The step-up options request is secret-free: it carries the canonical
|
|
20
|
+
* intent projection `{expectedRevision, ops:[{key, action, value?}]}` with
|
|
21
|
+
* values omitted for secret keys (TASKS amendment 4).
|
|
22
|
+
* - The descriptor projection is browser-safe: no consumer internal paths,
|
|
23
|
+
* no encode functions, no secret defaults.
|
|
24
|
+
*
|
|
25
|
+
* S0-1 coordinator addendum (pre-W1):
|
|
26
|
+
* - Every GET state carries `secrets` + `secretsRevision` (0 = no secrets
|
|
27
|
+
* document): secrets can exist without a settings document. `shadowedByEnv`
|
|
28
|
+
* is GONE — the dashboard's own env is not any MCP server's env; shadow
|
|
29
|
+
* information comes only from the processes endpoint.
|
|
30
|
+
* - The `unreadable` state carries `digest` (sha256 of the unreadable bytes);
|
|
31
|
+
* an explicit recovery save echoes it via `recover:true` + `expectedDigest`.
|
|
32
|
+
* Without recover, the store rejects a save against an unreadable document
|
|
33
|
+
* with `settings_unreadable` (409).
|
|
34
|
+
* - The processes response is strict and never carries a secret or env VALUE:
|
|
35
|
+
* only key names, provenance-derived key lists and bounded warning strings.
|
|
36
|
+
*/
|
|
37
|
+
import { z } from "zod";
|
|
38
|
+
import { type SettingDescriptor, type SettingValue } from "../settings/registry.js";
|
|
39
|
+
export declare const SETTINGS_API_SCHEMA_VERSION = "clinkx-settings-api-v1";
|
|
40
|
+
export declare const SETTINGS_READ_PATH = "/api/settings";
|
|
41
|
+
export declare const SETTINGS_SAVE_PATH = "/api/settings/save";
|
|
42
|
+
export declare const SETTINGS_SECRETS_SAVE_PATH = "/api/settings/secrets/save";
|
|
43
|
+
export declare const SETTINGS_STEP_UP_OPTIONS_PATH = "/api/settings/step-up";
|
|
44
|
+
/** GET only — the processes endpoint is read-only liveness/shadow reporting. */
|
|
45
|
+
export declare const SETTINGS_PROCESSES_PATH = "/api/settings/processes";
|
|
46
|
+
export declare const MAX_SETTINGS_OPS_PER_SAVE = 64;
|
|
47
|
+
export declare const MAX_SETTINGS_SECRET_CHARS = 4096;
|
|
48
|
+
export declare const MAX_SETTINGS_PROCESSES = 200;
|
|
49
|
+
/** Lowercase hex sha256 — shared by the unreadable digest and `expectedDigest`. */
|
|
50
|
+
export declare const Sha256HexSchema: z.ZodString;
|
|
51
|
+
export declare const SettingValueWireSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>;
|
|
52
|
+
export type SettingValueWire = z.infer<typeof SettingValueWireSchema>;
|
|
53
|
+
export declare const SettingsUpdatedByWireSchema: z.ZodObject<{
|
|
54
|
+
actor: z.ZodEnum<["dashboard", "cli", "system"]>;
|
|
55
|
+
auth: z.ZodEnum<["passkey", "bearer", "none", "local-fs"]>;
|
|
56
|
+
}, "strict", z.ZodTypeAny, {
|
|
57
|
+
actor: "dashboard" | "cli" | "system";
|
|
58
|
+
auth: "passkey" | "bearer" | "none" | "local-fs";
|
|
59
|
+
}, {
|
|
60
|
+
actor: "dashboard" | "cli" | "system";
|
|
61
|
+
auth: "passkey" | "bearer" | "none" | "local-fs";
|
|
62
|
+
}>;
|
|
63
|
+
export type SettingsUpdatedByWire = z.infer<typeof SettingsUpdatedByWireSchema>;
|
|
64
|
+
/**
|
|
65
|
+
* One save op. `expectedRevision` 0 means "expect the document to be absent"
|
|
66
|
+
* (the first save); documents themselves start at revision 1.
|
|
67
|
+
*/
|
|
68
|
+
export declare const SettingsOpSchema: z.ZodEffects<z.ZodObject<{
|
|
69
|
+
key: z.ZodString;
|
|
70
|
+
action: z.ZodEnum<["set", "unset"]>;
|
|
71
|
+
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
72
|
+
}, "strict", z.ZodTypeAny, {
|
|
73
|
+
key: string;
|
|
74
|
+
action: "set" | "unset";
|
|
75
|
+
value?: string | number | boolean | string[] | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
key: string;
|
|
78
|
+
action: "set" | "unset";
|
|
79
|
+
value?: string | number | boolean | string[] | undefined;
|
|
80
|
+
}>, {
|
|
81
|
+
key: string;
|
|
82
|
+
action: "set" | "unset";
|
|
83
|
+
value?: string | number | boolean | string[] | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
key: string;
|
|
86
|
+
action: "set" | "unset";
|
|
87
|
+
value?: string | number | boolean | string[] | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
export type SettingsOp = z.infer<typeof SettingsOpSchema>;
|
|
90
|
+
/**
|
|
91
|
+
* Recovery (S0-1 addendum): the settings document on disk can be unreadable
|
|
92
|
+
* (corrupt JSON, invalid shape). A routine save never overwrites it — the
|
|
93
|
+
* store rejects with `settings_unreadable` (409) unless the caller explicitly
|
|
94
|
+
* recovers: `recover: true` plus `expectedDigest`, the sha256 of the unreadable
|
|
95
|
+
* bytes exactly as reported by the GET response. The digest match is the
|
|
96
|
+
* CAS fence (the bytes a human inspected are the bytes being replaced).
|
|
97
|
+
*/
|
|
98
|
+
/**
|
|
99
|
+
* Step-up assertion carried ON the save request itself (coordinator G1): the
|
|
100
|
+
* server verifies the WebAuthn assertion against the challenge it issued and
|
|
101
|
+
* recomputes the intent digest from THIS request, so binding and consumption
|
|
102
|
+
* happen atomically with the write. There is no separate verify endpoint and
|
|
103
|
+
* no bearer-style step-up token. `response` is the browser's
|
|
104
|
+
* AuthenticationResponseJSON, opaque to this contract and bounded by the
|
|
105
|
+
* route's request byte cap.
|
|
106
|
+
*/
|
|
107
|
+
export declare const StepUpAssertionSchema: z.ZodObject<{
|
|
108
|
+
challengeId: z.ZodString;
|
|
109
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
110
|
+
}, "strict", z.ZodTypeAny, {
|
|
111
|
+
challengeId: string;
|
|
112
|
+
response: Record<string, unknown>;
|
|
113
|
+
}, {
|
|
114
|
+
challengeId: string;
|
|
115
|
+
response: Record<string, unknown>;
|
|
116
|
+
}>;
|
|
117
|
+
export type StepUpAssertion = z.infer<typeof StepUpAssertionSchema>;
|
|
118
|
+
export declare const SettingsSaveRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
119
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-save-v1">;
|
|
120
|
+
expectedRevision: z.ZodNumber;
|
|
121
|
+
ops: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
122
|
+
key: z.ZodString;
|
|
123
|
+
action: z.ZodEnum<["set", "unset"]>;
|
|
124
|
+
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
125
|
+
}, "strict", z.ZodTypeAny, {
|
|
126
|
+
key: string;
|
|
127
|
+
action: "set" | "unset";
|
|
128
|
+
value?: string | number | boolean | string[] | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
key: string;
|
|
131
|
+
action: "set" | "unset";
|
|
132
|
+
value?: string | number | boolean | string[] | undefined;
|
|
133
|
+
}>, {
|
|
134
|
+
key: string;
|
|
135
|
+
action: "set" | "unset";
|
|
136
|
+
value?: string | number | boolean | string[] | undefined;
|
|
137
|
+
}, {
|
|
138
|
+
key: string;
|
|
139
|
+
action: "set" | "unset";
|
|
140
|
+
value?: string | number | boolean | string[] | undefined;
|
|
141
|
+
}>, "many">;
|
|
142
|
+
recover: z.ZodOptional<z.ZodLiteral<true>>;
|
|
143
|
+
expectedDigest: z.ZodOptional<z.ZodString>;
|
|
144
|
+
stepUp: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
challengeId: z.ZodString;
|
|
146
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
147
|
+
}, "strict", z.ZodTypeAny, {
|
|
148
|
+
challengeId: string;
|
|
149
|
+
response: Record<string, unknown>;
|
|
150
|
+
}, {
|
|
151
|
+
challengeId: string;
|
|
152
|
+
response: Record<string, unknown>;
|
|
153
|
+
}>>;
|
|
154
|
+
}, "strict", z.ZodTypeAny, {
|
|
155
|
+
schemaVersion: "clinkx-settings-save-v1";
|
|
156
|
+
expectedRevision: number;
|
|
157
|
+
ops: {
|
|
158
|
+
key: string;
|
|
159
|
+
action: "set" | "unset";
|
|
160
|
+
value?: string | number | boolean | string[] | undefined;
|
|
161
|
+
}[];
|
|
162
|
+
recover?: true | undefined;
|
|
163
|
+
stepUp?: {
|
|
164
|
+
challengeId: string;
|
|
165
|
+
response: Record<string, unknown>;
|
|
166
|
+
} | undefined;
|
|
167
|
+
expectedDigest?: string | undefined;
|
|
168
|
+
}, {
|
|
169
|
+
schemaVersion: "clinkx-settings-save-v1";
|
|
170
|
+
expectedRevision: number;
|
|
171
|
+
ops: {
|
|
172
|
+
key: string;
|
|
173
|
+
action: "set" | "unset";
|
|
174
|
+
value?: string | number | boolean | string[] | undefined;
|
|
175
|
+
}[];
|
|
176
|
+
recover?: true | undefined;
|
|
177
|
+
stepUp?: {
|
|
178
|
+
challengeId: string;
|
|
179
|
+
response: Record<string, unknown>;
|
|
180
|
+
} | undefined;
|
|
181
|
+
expectedDigest?: string | undefined;
|
|
182
|
+
}>, {
|
|
183
|
+
schemaVersion: "clinkx-settings-save-v1";
|
|
184
|
+
expectedRevision: number;
|
|
185
|
+
ops: {
|
|
186
|
+
key: string;
|
|
187
|
+
action: "set" | "unset";
|
|
188
|
+
value?: string | number | boolean | string[] | undefined;
|
|
189
|
+
}[];
|
|
190
|
+
recover?: true | undefined;
|
|
191
|
+
stepUp?: {
|
|
192
|
+
challengeId: string;
|
|
193
|
+
response: Record<string, unknown>;
|
|
194
|
+
} | undefined;
|
|
195
|
+
expectedDigest?: string | undefined;
|
|
196
|
+
}, {
|
|
197
|
+
schemaVersion: "clinkx-settings-save-v1";
|
|
198
|
+
expectedRevision: number;
|
|
199
|
+
ops: {
|
|
200
|
+
key: string;
|
|
201
|
+
action: "set" | "unset";
|
|
202
|
+
value?: string | number | boolean | string[] | undefined;
|
|
203
|
+
}[];
|
|
204
|
+
recover?: true | undefined;
|
|
205
|
+
stepUp?: {
|
|
206
|
+
challengeId: string;
|
|
207
|
+
response: Record<string, unknown>;
|
|
208
|
+
} | undefined;
|
|
209
|
+
expectedDigest?: string | undefined;
|
|
210
|
+
}>;
|
|
211
|
+
export type SettingsSaveRequest = z.infer<typeof SettingsSaveRequestSchema>;
|
|
212
|
+
export declare const SecretsSaveOpSchema: z.ZodEffects<z.ZodObject<{
|
|
213
|
+
key: z.ZodString;
|
|
214
|
+
action: z.ZodEnum<["set", "unset"]>;
|
|
215
|
+
value: z.ZodOptional<z.ZodString>;
|
|
216
|
+
}, "strict", z.ZodTypeAny, {
|
|
217
|
+
key: string;
|
|
218
|
+
action: "set" | "unset";
|
|
219
|
+
value?: string | undefined;
|
|
220
|
+
}, {
|
|
221
|
+
key: string;
|
|
222
|
+
action: "set" | "unset";
|
|
223
|
+
value?: string | undefined;
|
|
224
|
+
}>, {
|
|
225
|
+
key: string;
|
|
226
|
+
action: "set" | "unset";
|
|
227
|
+
value?: string | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
key: string;
|
|
230
|
+
action: "set" | "unset";
|
|
231
|
+
value?: string | undefined;
|
|
232
|
+
}>;
|
|
233
|
+
export type SecretsSaveOp = z.infer<typeof SecretsSaveOpSchema>;
|
|
234
|
+
export declare const SecretsSaveRequestSchema: z.ZodObject<{
|
|
235
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-secrets-save-v1">;
|
|
236
|
+
expectedRevision: z.ZodNumber;
|
|
237
|
+
ops: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
238
|
+
key: z.ZodString;
|
|
239
|
+
action: z.ZodEnum<["set", "unset"]>;
|
|
240
|
+
value: z.ZodOptional<z.ZodString>;
|
|
241
|
+
}, "strict", z.ZodTypeAny, {
|
|
242
|
+
key: string;
|
|
243
|
+
action: "set" | "unset";
|
|
244
|
+
value?: string | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
key: string;
|
|
247
|
+
action: "set" | "unset";
|
|
248
|
+
value?: string | undefined;
|
|
249
|
+
}>, {
|
|
250
|
+
key: string;
|
|
251
|
+
action: "set" | "unset";
|
|
252
|
+
value?: string | undefined;
|
|
253
|
+
}, {
|
|
254
|
+
key: string;
|
|
255
|
+
action: "set" | "unset";
|
|
256
|
+
value?: string | undefined;
|
|
257
|
+
}>, "many">;
|
|
258
|
+
stepUp: z.ZodOptional<z.ZodObject<{
|
|
259
|
+
challengeId: z.ZodString;
|
|
260
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
261
|
+
}, "strict", z.ZodTypeAny, {
|
|
262
|
+
challengeId: string;
|
|
263
|
+
response: Record<string, unknown>;
|
|
264
|
+
}, {
|
|
265
|
+
challengeId: string;
|
|
266
|
+
response: Record<string, unknown>;
|
|
267
|
+
}>>;
|
|
268
|
+
}, "strict", z.ZodTypeAny, {
|
|
269
|
+
schemaVersion: "clinkx-settings-secrets-save-v1";
|
|
270
|
+
expectedRevision: number;
|
|
271
|
+
ops: {
|
|
272
|
+
key: string;
|
|
273
|
+
action: "set" | "unset";
|
|
274
|
+
value?: string | undefined;
|
|
275
|
+
}[];
|
|
276
|
+
stepUp?: {
|
|
277
|
+
challengeId: string;
|
|
278
|
+
response: Record<string, unknown>;
|
|
279
|
+
} | undefined;
|
|
280
|
+
}, {
|
|
281
|
+
schemaVersion: "clinkx-settings-secrets-save-v1";
|
|
282
|
+
expectedRevision: number;
|
|
283
|
+
ops: {
|
|
284
|
+
key: string;
|
|
285
|
+
action: "set" | "unset";
|
|
286
|
+
value?: string | undefined;
|
|
287
|
+
}[];
|
|
288
|
+
stepUp?: {
|
|
289
|
+
challengeId: string;
|
|
290
|
+
response: Record<string, unknown>;
|
|
291
|
+
} | undefined;
|
|
292
|
+
}>;
|
|
293
|
+
export type SecretsSaveRequest = z.infer<typeof SecretsSaveRequestSchema>;
|
|
294
|
+
export declare const SettingsSaveResponseSchema: z.ZodObject<{
|
|
295
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-save-response-v1">;
|
|
296
|
+
revision: z.ZodNumber;
|
|
297
|
+
updatedAt: z.ZodString;
|
|
298
|
+
applied: z.ZodArray<z.ZodObject<{
|
|
299
|
+
key: z.ZodString;
|
|
300
|
+
action: z.ZodEnum<["set", "unset"]>;
|
|
301
|
+
}, "strict", z.ZodTypeAny, {
|
|
302
|
+
key: string;
|
|
303
|
+
action: "set" | "unset";
|
|
304
|
+
}, {
|
|
305
|
+
key: string;
|
|
306
|
+
action: "set" | "unset";
|
|
307
|
+
}>, "many">;
|
|
308
|
+
}, "strict", z.ZodTypeAny, {
|
|
309
|
+
revision: number;
|
|
310
|
+
applied: {
|
|
311
|
+
key: string;
|
|
312
|
+
action: "set" | "unset";
|
|
313
|
+
}[];
|
|
314
|
+
schemaVersion: "clinkx-settings-save-response-v1";
|
|
315
|
+
updatedAt: string;
|
|
316
|
+
}, {
|
|
317
|
+
revision: number;
|
|
318
|
+
applied: {
|
|
319
|
+
key: string;
|
|
320
|
+
action: "set" | "unset";
|
|
321
|
+
}[];
|
|
322
|
+
schemaVersion: "clinkx-settings-save-response-v1";
|
|
323
|
+
updatedAt: string;
|
|
324
|
+
}>;
|
|
325
|
+
export type SettingsSaveResponse = z.infer<typeof SettingsSaveResponseSchema>;
|
|
326
|
+
export declare const SecretsSaveResponseSchema: z.ZodObject<{
|
|
327
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-secrets-save-response-v1">;
|
|
328
|
+
revision: z.ZodNumber;
|
|
329
|
+
updatedAt: z.ZodString;
|
|
330
|
+
applied: z.ZodArray<z.ZodObject<{
|
|
331
|
+
key: z.ZodString;
|
|
332
|
+
action: z.ZodEnum<["set", "unset"]>;
|
|
333
|
+
}, "strict", z.ZodTypeAny, {
|
|
334
|
+
key: string;
|
|
335
|
+
action: "set" | "unset";
|
|
336
|
+
}, {
|
|
337
|
+
key: string;
|
|
338
|
+
action: "set" | "unset";
|
|
339
|
+
}>, "many">;
|
|
340
|
+
}, "strict", z.ZodTypeAny, {
|
|
341
|
+
revision: number;
|
|
342
|
+
applied: {
|
|
343
|
+
key: string;
|
|
344
|
+
action: "set" | "unset";
|
|
345
|
+
}[];
|
|
346
|
+
schemaVersion: "clinkx-settings-secrets-save-response-v1";
|
|
347
|
+
updatedAt: string;
|
|
348
|
+
}, {
|
|
349
|
+
revision: number;
|
|
350
|
+
applied: {
|
|
351
|
+
key: string;
|
|
352
|
+
action: "set" | "unset";
|
|
353
|
+
}[];
|
|
354
|
+
schemaVersion: "clinkx-settings-secrets-save-response-v1";
|
|
355
|
+
updatedAt: string;
|
|
356
|
+
}>;
|
|
357
|
+
export type SecretsSaveResponse = z.infer<typeof SecretsSaveResponseSchema>;
|
|
358
|
+
/**
|
|
359
|
+
* Secret-free canonical intent projection: `{expectedRevision, ops:[{key,
|
|
360
|
+
* action, value-if-not-secret}]}`. The server computes the intentDigest over
|
|
361
|
+
* this projection; the challenge binds {sessionId, intentDigest}. The options
|
|
362
|
+
* REQUEST carries the same projection so the browser never needs the digest
|
|
363
|
+
* algorithm — and never a secret value.
|
|
364
|
+
*/
|
|
365
|
+
export declare const StepUpIntentOpSchema: z.ZodEffects<z.ZodObject<{
|
|
366
|
+
key: z.ZodString;
|
|
367
|
+
action: z.ZodEnum<["set", "unset"]>;
|
|
368
|
+
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
369
|
+
}, "strict", z.ZodTypeAny, {
|
|
370
|
+
key: string;
|
|
371
|
+
action: "set" | "unset";
|
|
372
|
+
value?: string | number | boolean | string[] | undefined;
|
|
373
|
+
}, {
|
|
374
|
+
key: string;
|
|
375
|
+
action: "set" | "unset";
|
|
376
|
+
value?: string | number | boolean | string[] | undefined;
|
|
377
|
+
}>, {
|
|
378
|
+
key: string;
|
|
379
|
+
action: "set" | "unset";
|
|
380
|
+
value?: string | number | boolean | string[] | undefined;
|
|
381
|
+
}, {
|
|
382
|
+
key: string;
|
|
383
|
+
action: "set" | "unset";
|
|
384
|
+
value?: string | number | boolean | string[] | undefined;
|
|
385
|
+
}>;
|
|
386
|
+
export type StepUpIntentOp = z.infer<typeof StepUpIntentOpSchema>;
|
|
387
|
+
export declare const StepUpOptionsRequestSchema: z.ZodObject<{
|
|
388
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-step-up-v1">;
|
|
389
|
+
intent: z.ZodEffects<z.ZodObject<{
|
|
390
|
+
target: z.ZodEnum<["settings", "secrets"]>;
|
|
391
|
+
expectedRevision: z.ZodNumber;
|
|
392
|
+
ops: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
393
|
+
key: z.ZodString;
|
|
394
|
+
action: z.ZodEnum<["set", "unset"]>;
|
|
395
|
+
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
396
|
+
}, "strict", z.ZodTypeAny, {
|
|
397
|
+
key: string;
|
|
398
|
+
action: "set" | "unset";
|
|
399
|
+
value?: string | number | boolean | string[] | undefined;
|
|
400
|
+
}, {
|
|
401
|
+
key: string;
|
|
402
|
+
action: "set" | "unset";
|
|
403
|
+
value?: string | number | boolean | string[] | undefined;
|
|
404
|
+
}>, {
|
|
405
|
+
key: string;
|
|
406
|
+
action: "set" | "unset";
|
|
407
|
+
value?: string | number | boolean | string[] | undefined;
|
|
408
|
+
}, {
|
|
409
|
+
key: string;
|
|
410
|
+
action: "set" | "unset";
|
|
411
|
+
value?: string | number | boolean | string[] | undefined;
|
|
412
|
+
}>, "many">;
|
|
413
|
+
/** Mirrors the save request (T09 wire delta): a recovery save's
|
|
414
|
+
* ceremony must be minted for the SAME recover-bound intent. */
|
|
415
|
+
recover: z.ZodOptional<z.ZodLiteral<true>>;
|
|
416
|
+
expectedDigest: z.ZodOptional<z.ZodString>;
|
|
417
|
+
}, "strict", z.ZodTypeAny, {
|
|
418
|
+
expectedRevision: number;
|
|
419
|
+
ops: {
|
|
420
|
+
key: string;
|
|
421
|
+
action: "set" | "unset";
|
|
422
|
+
value?: string | number | boolean | string[] | undefined;
|
|
423
|
+
}[];
|
|
424
|
+
target: "settings" | "secrets";
|
|
425
|
+
recover?: true | undefined;
|
|
426
|
+
expectedDigest?: string | undefined;
|
|
427
|
+
}, {
|
|
428
|
+
expectedRevision: number;
|
|
429
|
+
ops: {
|
|
430
|
+
key: string;
|
|
431
|
+
action: "set" | "unset";
|
|
432
|
+
value?: string | number | boolean | string[] | undefined;
|
|
433
|
+
}[];
|
|
434
|
+
target: "settings" | "secrets";
|
|
435
|
+
recover?: true | undefined;
|
|
436
|
+
expectedDigest?: string | undefined;
|
|
437
|
+
}>, {
|
|
438
|
+
expectedRevision: number;
|
|
439
|
+
ops: {
|
|
440
|
+
key: string;
|
|
441
|
+
action: "set" | "unset";
|
|
442
|
+
value?: string | number | boolean | string[] | undefined;
|
|
443
|
+
}[];
|
|
444
|
+
target: "settings" | "secrets";
|
|
445
|
+
recover?: true | undefined;
|
|
446
|
+
expectedDigest?: string | undefined;
|
|
447
|
+
}, {
|
|
448
|
+
expectedRevision: number;
|
|
449
|
+
ops: {
|
|
450
|
+
key: string;
|
|
451
|
+
action: "set" | "unset";
|
|
452
|
+
value?: string | number | boolean | string[] | undefined;
|
|
453
|
+
}[];
|
|
454
|
+
target: "settings" | "secrets";
|
|
455
|
+
recover?: true | undefined;
|
|
456
|
+
expectedDigest?: string | undefined;
|
|
457
|
+
}>;
|
|
458
|
+
}, "strict", z.ZodTypeAny, {
|
|
459
|
+
schemaVersion: "clinkx-settings-step-up-v1";
|
|
460
|
+
intent: {
|
|
461
|
+
expectedRevision: number;
|
|
462
|
+
ops: {
|
|
463
|
+
key: string;
|
|
464
|
+
action: "set" | "unset";
|
|
465
|
+
value?: string | number | boolean | string[] | undefined;
|
|
466
|
+
}[];
|
|
467
|
+
target: "settings" | "secrets";
|
|
468
|
+
recover?: true | undefined;
|
|
469
|
+
expectedDigest?: string | undefined;
|
|
470
|
+
};
|
|
471
|
+
}, {
|
|
472
|
+
schemaVersion: "clinkx-settings-step-up-v1";
|
|
473
|
+
intent: {
|
|
474
|
+
expectedRevision: number;
|
|
475
|
+
ops: {
|
|
476
|
+
key: string;
|
|
477
|
+
action: "set" | "unset";
|
|
478
|
+
value?: string | number | boolean | string[] | undefined;
|
|
479
|
+
}[];
|
|
480
|
+
target: "settings" | "secrets";
|
|
481
|
+
recover?: true | undefined;
|
|
482
|
+
expectedDigest?: string | undefined;
|
|
483
|
+
};
|
|
484
|
+
}>;
|
|
485
|
+
export type StepUpOptionsRequest = z.infer<typeof StepUpOptionsRequestSchema>;
|
|
486
|
+
export declare const StepUpOptionsResponseSchema: z.ZodEffects<z.ZodObject<{
|
|
487
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-step-up-response-v1">;
|
|
488
|
+
required: z.ZodBoolean;
|
|
489
|
+
challenge: z.ZodOptional<z.ZodObject<{
|
|
490
|
+
challengeId: z.ZodString;
|
|
491
|
+
createdAt: z.ZodString;
|
|
492
|
+
expiresAt: z.ZodString;
|
|
493
|
+
}, "strict", z.ZodTypeAny, {
|
|
494
|
+
createdAt: string;
|
|
495
|
+
challengeId: string;
|
|
496
|
+
expiresAt: string;
|
|
497
|
+
}, {
|
|
498
|
+
createdAt: string;
|
|
499
|
+
challengeId: string;
|
|
500
|
+
expiresAt: string;
|
|
501
|
+
}>>;
|
|
502
|
+
intentDigest: z.ZodString;
|
|
503
|
+
/**
|
|
504
|
+
* WebAuthn PublicKeyCredentialRequestOptionsJSON issued for this
|
|
505
|
+
* challenge (coordinator G1). Present iff `required` is true; the client
|
|
506
|
+
* passes it to the same ceremony helper login uses.
|
|
507
|
+
*/
|
|
508
|
+
publicKey: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
509
|
+
}, "strict", z.ZodTypeAny, {
|
|
510
|
+
required: boolean;
|
|
511
|
+
schemaVersion: "clinkx-settings-step-up-response-v1";
|
|
512
|
+
intentDigest: string;
|
|
513
|
+
challenge?: {
|
|
514
|
+
createdAt: string;
|
|
515
|
+
challengeId: string;
|
|
516
|
+
expiresAt: string;
|
|
517
|
+
} | undefined;
|
|
518
|
+
publicKey?: Record<string, unknown> | undefined;
|
|
519
|
+
}, {
|
|
520
|
+
required: boolean;
|
|
521
|
+
schemaVersion: "clinkx-settings-step-up-response-v1";
|
|
522
|
+
intentDigest: string;
|
|
523
|
+
challenge?: {
|
|
524
|
+
createdAt: string;
|
|
525
|
+
challengeId: string;
|
|
526
|
+
expiresAt: string;
|
|
527
|
+
} | undefined;
|
|
528
|
+
publicKey?: Record<string, unknown> | undefined;
|
|
529
|
+
}>, {
|
|
530
|
+
required: boolean;
|
|
531
|
+
schemaVersion: "clinkx-settings-step-up-response-v1";
|
|
532
|
+
intentDigest: string;
|
|
533
|
+
challenge?: {
|
|
534
|
+
createdAt: string;
|
|
535
|
+
challengeId: string;
|
|
536
|
+
expiresAt: string;
|
|
537
|
+
} | undefined;
|
|
538
|
+
publicKey?: Record<string, unknown> | undefined;
|
|
539
|
+
}, {
|
|
540
|
+
required: boolean;
|
|
541
|
+
schemaVersion: "clinkx-settings-step-up-response-v1";
|
|
542
|
+
intentDigest: string;
|
|
543
|
+
challenge?: {
|
|
544
|
+
createdAt: string;
|
|
545
|
+
challengeId: string;
|
|
546
|
+
expiresAt: string;
|
|
547
|
+
} | undefined;
|
|
548
|
+
publicKey?: Record<string, unknown> | undefined;
|
|
549
|
+
}>;
|
|
550
|
+
export type StepUpOptionsResponse = z.infer<typeof StepUpOptionsResponseSchema>;
|
|
551
|
+
export declare const SETTINGS_ERROR_CODES: readonly ["settings_conflict", "settings_locked", "settings_invalid", "settings_unreadable", "step_up_required", "step_up_failed", "step_up_unavailable", "settings_auth_required", "settings_unavailable", "settings_published_uncertain", "content_too_large_for_dashboard"];
|
|
552
|
+
export type SettingsErrorCode = (typeof SETTINGS_ERROR_CODES)[number];
|
|
553
|
+
/** Matches the dashboard's existing HTTP status mapping conventions. */
|
|
554
|
+
export declare const SETTINGS_ERROR_HTTP_STATUS: Readonly<Record<SettingsErrorCode, number>>;
|
|
555
|
+
export declare const SettingsFieldErrorSchema: z.ZodObject<{
|
|
556
|
+
key: z.ZodString;
|
|
557
|
+
message: z.ZodString;
|
|
558
|
+
}, "strict", z.ZodTypeAny, {
|
|
559
|
+
message: string;
|
|
560
|
+
key: string;
|
|
561
|
+
}, {
|
|
562
|
+
message: string;
|
|
563
|
+
key: string;
|
|
564
|
+
}>;
|
|
565
|
+
export type SettingsFieldError = z.infer<typeof SettingsFieldErrorSchema>;
|
|
566
|
+
export declare const SettingsErrorSchema: z.ZodEffects<z.ZodObject<{
|
|
567
|
+
error: z.ZodEnum<["settings_conflict", "settings_locked", "settings_invalid", "settings_unreadable", "step_up_required", "step_up_failed", "step_up_unavailable", "settings_auth_required", "settings_unavailable", "settings_published_uncertain", "content_too_large_for_dashboard"]>;
|
|
568
|
+
message: z.ZodString;
|
|
569
|
+
fieldErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
570
|
+
key: z.ZodString;
|
|
571
|
+
message: z.ZodString;
|
|
572
|
+
}, "strict", z.ZodTypeAny, {
|
|
573
|
+
message: string;
|
|
574
|
+
key: string;
|
|
575
|
+
}, {
|
|
576
|
+
message: string;
|
|
577
|
+
key: string;
|
|
578
|
+
}>, "many">>;
|
|
579
|
+
expectedRevision: z.ZodOptional<z.ZodNumber>;
|
|
580
|
+
/** The revision that WAS published — `settings_published_uncertain` only. */
|
|
581
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
582
|
+
}, "strict", z.ZodTypeAny, {
|
|
583
|
+
message: string;
|
|
584
|
+
error: "content_too_large_for_dashboard" | "settings_conflict" | "settings_locked" | "settings_unreadable" | "settings_invalid" | "settings_unavailable" | "step_up_required" | "step_up_failed" | "step_up_unavailable" | "settings_auth_required" | "settings_published_uncertain";
|
|
585
|
+
revision?: number | undefined;
|
|
586
|
+
fieldErrors?: {
|
|
587
|
+
message: string;
|
|
588
|
+
key: string;
|
|
589
|
+
}[] | undefined;
|
|
590
|
+
expectedRevision?: number | undefined;
|
|
591
|
+
}, {
|
|
592
|
+
message: string;
|
|
593
|
+
error: "content_too_large_for_dashboard" | "settings_conflict" | "settings_locked" | "settings_unreadable" | "settings_invalid" | "settings_unavailable" | "step_up_required" | "step_up_failed" | "step_up_unavailable" | "settings_auth_required" | "settings_published_uncertain";
|
|
594
|
+
revision?: number | undefined;
|
|
595
|
+
fieldErrors?: {
|
|
596
|
+
message: string;
|
|
597
|
+
key: string;
|
|
598
|
+
}[] | undefined;
|
|
599
|
+
expectedRevision?: number | undefined;
|
|
600
|
+
}>, {
|
|
601
|
+
message: string;
|
|
602
|
+
error: "content_too_large_for_dashboard" | "settings_conflict" | "settings_locked" | "settings_unreadable" | "settings_invalid" | "settings_unavailable" | "step_up_required" | "step_up_failed" | "step_up_unavailable" | "settings_auth_required" | "settings_published_uncertain";
|
|
603
|
+
revision?: number | undefined;
|
|
604
|
+
fieldErrors?: {
|
|
605
|
+
message: string;
|
|
606
|
+
key: string;
|
|
607
|
+
}[] | undefined;
|
|
608
|
+
expectedRevision?: number | undefined;
|
|
609
|
+
}, {
|
|
610
|
+
message: string;
|
|
611
|
+
error: "content_too_large_for_dashboard" | "settings_conflict" | "settings_locked" | "settings_unreadable" | "settings_invalid" | "settings_unavailable" | "step_up_required" | "step_up_failed" | "step_up_unavailable" | "settings_auth_required" | "settings_published_uncertain";
|
|
612
|
+
revision?: number | undefined;
|
|
613
|
+
fieldErrors?: {
|
|
614
|
+
message: string;
|
|
615
|
+
key: string;
|
|
616
|
+
}[] | undefined;
|
|
617
|
+
expectedRevision?: number | undefined;
|
|
618
|
+
}>;
|
|
619
|
+
export type SettingsError = z.infer<typeof SettingsErrorSchema>;
|
|
620
|
+
export interface DescriptorProjection {
|
|
621
|
+
readonly key: string;
|
|
622
|
+
readonly settingClass: "tuning" | "retention" | "feature" | "reader_first" | "policy" | "secret";
|
|
623
|
+
readonly type: "bool" | "int" | "enum" | "string" | "url" | "list";
|
|
624
|
+
readonly unit: string;
|
|
625
|
+
/** Omitted for secrets (no default is ever exposed). */
|
|
626
|
+
readonly default?: SettingValue;
|
|
627
|
+
readonly choices?: readonly string[];
|
|
628
|
+
readonly min?: number;
|
|
629
|
+
readonly max?: number;
|
|
630
|
+
/** Present on int-type descriptors only (T09 wire delta): whether the
|
|
631
|
+
* consumer grammar accepts decimal values (`CLINKX_SERVER_IDLE_TIMEOUT_
|
|
632
|
+
* SECONDS`) or integers only. */
|
|
633
|
+
readonly numberKind?: "int" | "decimal";
|
|
634
|
+
readonly requiresStepUp: boolean;
|
|
635
|
+
readonly restartRequired: true;
|
|
636
|
+
readonly readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
637
|
+
readonly affectsResumeFingerprint: boolean;
|
|
638
|
+
readonly requires: readonly string[];
|
|
639
|
+
readonly legacyAliases: readonly string[];
|
|
640
|
+
readonly onInvalid: "default" | "restrictive";
|
|
641
|
+
readonly docs: {
|
|
642
|
+
readonly title: string;
|
|
643
|
+
readonly summary: string;
|
|
644
|
+
readonly warning?: string;
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Project a registry descriptor for the browser. Drops consumer internal
|
|
649
|
+
* paths (`consumers`), the encode function and secret defaults; renames
|
|
650
|
+
* `class` → `settingClass` (reserved-word friendly). Pure and total.
|
|
651
|
+
*/
|
|
652
|
+
export declare function projectSettingDescriptor(descriptor: SettingDescriptor): DescriptorProjection;
|
|
653
|
+
/** Secrets exposure is exactly {set, updatedAt} — a `value` key never parses. */
|
|
654
|
+
export declare const SettingsSecretStateSchema: z.ZodObject<{
|
|
655
|
+
set: z.ZodBoolean;
|
|
656
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
657
|
+
}, "strict", z.ZodTypeAny, {
|
|
658
|
+
set: boolean;
|
|
659
|
+
updatedAt?: string | undefined;
|
|
660
|
+
}, {
|
|
661
|
+
set: boolean;
|
|
662
|
+
updatedAt?: string | undefined;
|
|
663
|
+
}>;
|
|
664
|
+
export type SettingsSecretState = z.infer<typeof SettingsSecretStateSchema>;
|
|
665
|
+
/**
|
|
666
|
+
* Settings-document state as one bindable value (T09 wire delta): the
|
|
667
|
+
* unreadable variant carries the sha256 of the unreadable bytes so the
|
|
668
|
+
* recovery UI can bind `expectedDigest` without discriminating on `state`.
|
|
669
|
+
*/
|
|
670
|
+
export declare const SettingsStateWireSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
671
|
+
status: z.ZodLiteral<"ok">;
|
|
672
|
+
}, "strict", z.ZodTypeAny, {
|
|
673
|
+
status: "ok";
|
|
674
|
+
}, {
|
|
675
|
+
status: "ok";
|
|
676
|
+
}>, z.ZodObject<{
|
|
677
|
+
status: z.ZodLiteral<"absent">;
|
|
678
|
+
}, "strict", z.ZodTypeAny, {
|
|
679
|
+
status: "absent";
|
|
680
|
+
}, {
|
|
681
|
+
status: "absent";
|
|
682
|
+
}>, z.ZodObject<{
|
|
683
|
+
status: z.ZodLiteral<"unreadable">;
|
|
684
|
+
digest: z.ZodString;
|
|
685
|
+
}, "strict", z.ZodTypeAny, {
|
|
686
|
+
status: "unreadable";
|
|
687
|
+
digest: string;
|
|
688
|
+
}, {
|
|
689
|
+
status: "unreadable";
|
|
690
|
+
digest: string;
|
|
691
|
+
}>]>;
|
|
692
|
+
export type SettingsStateWire = z.infer<typeof SettingsStateWireSchema>;
|
|
693
|
+
/**
|
|
694
|
+
* Every state carries `secrets` + `secretsRevision`: the secrets document has
|
|
695
|
+
* its own revision and can exist (or not) independently of the settings
|
|
696
|
+
* document. `shadowedByEnv` is deliberately absent from every state — the
|
|
697
|
+
* dashboard's own env is not any MCP server's env; shadow information comes
|
|
698
|
+
* only from the processes endpoint.
|
|
699
|
+
*/
|
|
700
|
+
export declare const SettingsGetResponseSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
|
|
701
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-get-v1">;
|
|
702
|
+
state: z.ZodLiteral<"absent">;
|
|
703
|
+
settingsState: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
704
|
+
status: z.ZodLiteral<"ok">;
|
|
705
|
+
}, "strict", z.ZodTypeAny, {
|
|
706
|
+
status: "ok";
|
|
707
|
+
}, {
|
|
708
|
+
status: "ok";
|
|
709
|
+
}>, z.ZodObject<{
|
|
710
|
+
status: z.ZodLiteral<"absent">;
|
|
711
|
+
}, "strict", z.ZodTypeAny, {
|
|
712
|
+
status: "absent";
|
|
713
|
+
}, {
|
|
714
|
+
status: "absent";
|
|
715
|
+
}>, z.ZodObject<{
|
|
716
|
+
status: z.ZodLiteral<"unreadable">;
|
|
717
|
+
digest: z.ZodString;
|
|
718
|
+
}, "strict", z.ZodTypeAny, {
|
|
719
|
+
status: "unreadable";
|
|
720
|
+
digest: string;
|
|
721
|
+
}, {
|
|
722
|
+
status: "unreadable";
|
|
723
|
+
digest: string;
|
|
724
|
+
}>]>;
|
|
725
|
+
secretsState: z.ZodEnum<["ok", "absent", "unreadable"]>;
|
|
726
|
+
secrets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
727
|
+
set: z.ZodBoolean;
|
|
728
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
729
|
+
}, "strict", z.ZodTypeAny, {
|
|
730
|
+
set: boolean;
|
|
731
|
+
updatedAt?: string | undefined;
|
|
732
|
+
}, {
|
|
733
|
+
set: boolean;
|
|
734
|
+
updatedAt?: string | undefined;
|
|
735
|
+
}>>;
|
|
736
|
+
secretsRevision: z.ZodNumber;
|
|
737
|
+
serverNow: z.ZodString;
|
|
738
|
+
descriptors: z.ZodArray<z.ZodObject<{
|
|
739
|
+
key: z.ZodString;
|
|
740
|
+
settingClass: z.ZodEnum<["tuning", "retention", "feature", "reader_first", "policy", "secret"]>;
|
|
741
|
+
type: z.ZodEnum<["bool", "int", "enum", "string", "url", "list"]>;
|
|
742
|
+
unit: z.ZodString;
|
|
743
|
+
default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
744
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
745
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
746
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
747
|
+
/** Int-type descriptors only (T09 wire delta). */
|
|
748
|
+
numberKind: z.ZodOptional<z.ZodEnum<["int", "decimal"]>>;
|
|
749
|
+
requiresStepUp: z.ZodBoolean;
|
|
750
|
+
restartRequired: z.ZodLiteral<true>;
|
|
751
|
+
readTiming: z.ZodEnum<["module_load", "startup", "startup_singleton", "per_call"]>;
|
|
752
|
+
affectsResumeFingerprint: z.ZodBoolean;
|
|
753
|
+
requires: z.ZodArray<z.ZodString, "many">;
|
|
754
|
+
legacyAliases: z.ZodArray<z.ZodString, "many">;
|
|
755
|
+
onInvalid: z.ZodEnum<["default", "restrictive"]>;
|
|
756
|
+
docs: z.ZodObject<{
|
|
757
|
+
title: z.ZodString;
|
|
758
|
+
summary: z.ZodString;
|
|
759
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
760
|
+
}, "strict", z.ZodTypeAny, {
|
|
761
|
+
summary: string;
|
|
762
|
+
title: string;
|
|
763
|
+
warning?: string | undefined;
|
|
764
|
+
}, {
|
|
765
|
+
summary: string;
|
|
766
|
+
title: string;
|
|
767
|
+
warning?: string | undefined;
|
|
768
|
+
}>;
|
|
769
|
+
}, "strict", z.ZodTypeAny, {
|
|
770
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
771
|
+
key: string;
|
|
772
|
+
restartRequired: true;
|
|
773
|
+
unit: string;
|
|
774
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
775
|
+
affectsResumeFingerprint: boolean;
|
|
776
|
+
onInvalid: "default" | "restrictive";
|
|
777
|
+
requires: string[];
|
|
778
|
+
legacyAliases: string[];
|
|
779
|
+
docs: {
|
|
780
|
+
summary: string;
|
|
781
|
+
title: string;
|
|
782
|
+
warning?: string | undefined;
|
|
783
|
+
};
|
|
784
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
785
|
+
requiresStepUp: boolean;
|
|
786
|
+
default?: string | number | boolean | string[] | undefined;
|
|
787
|
+
min?: number | undefined;
|
|
788
|
+
max?: number | undefined;
|
|
789
|
+
choices?: string[] | undefined;
|
|
790
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
791
|
+
}, {
|
|
792
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
793
|
+
key: string;
|
|
794
|
+
restartRequired: true;
|
|
795
|
+
unit: string;
|
|
796
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
797
|
+
affectsResumeFingerprint: boolean;
|
|
798
|
+
onInvalid: "default" | "restrictive";
|
|
799
|
+
requires: string[];
|
|
800
|
+
legacyAliases: string[];
|
|
801
|
+
docs: {
|
|
802
|
+
summary: string;
|
|
803
|
+
title: string;
|
|
804
|
+
warning?: string | undefined;
|
|
805
|
+
};
|
|
806
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
807
|
+
requiresStepUp: boolean;
|
|
808
|
+
default?: string | number | boolean | string[] | undefined;
|
|
809
|
+
min?: number | undefined;
|
|
810
|
+
max?: number | undefined;
|
|
811
|
+
choices?: string[] | undefined;
|
|
812
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
813
|
+
}>, "many">;
|
|
814
|
+
}, "strict", z.ZodTypeAny, {
|
|
815
|
+
state: "absent";
|
|
816
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
817
|
+
serverNow: string;
|
|
818
|
+
secrets: Record<string, {
|
|
819
|
+
set: boolean;
|
|
820
|
+
updatedAt?: string | undefined;
|
|
821
|
+
}>;
|
|
822
|
+
settingsState: {
|
|
823
|
+
status: "ok";
|
|
824
|
+
} | {
|
|
825
|
+
status: "absent";
|
|
826
|
+
} | {
|
|
827
|
+
status: "unreadable";
|
|
828
|
+
digest: string;
|
|
829
|
+
};
|
|
830
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
831
|
+
secretsRevision: number;
|
|
832
|
+
descriptors: {
|
|
833
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
834
|
+
key: string;
|
|
835
|
+
restartRequired: true;
|
|
836
|
+
unit: string;
|
|
837
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
838
|
+
affectsResumeFingerprint: boolean;
|
|
839
|
+
onInvalid: "default" | "restrictive";
|
|
840
|
+
requires: string[];
|
|
841
|
+
legacyAliases: string[];
|
|
842
|
+
docs: {
|
|
843
|
+
summary: string;
|
|
844
|
+
title: string;
|
|
845
|
+
warning?: string | undefined;
|
|
846
|
+
};
|
|
847
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
848
|
+
requiresStepUp: boolean;
|
|
849
|
+
default?: string | number | boolean | string[] | undefined;
|
|
850
|
+
min?: number | undefined;
|
|
851
|
+
max?: number | undefined;
|
|
852
|
+
choices?: string[] | undefined;
|
|
853
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
854
|
+
}[];
|
|
855
|
+
}, {
|
|
856
|
+
state: "absent";
|
|
857
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
858
|
+
serverNow: string;
|
|
859
|
+
secrets: Record<string, {
|
|
860
|
+
set: boolean;
|
|
861
|
+
updatedAt?: string | undefined;
|
|
862
|
+
}>;
|
|
863
|
+
settingsState: {
|
|
864
|
+
status: "ok";
|
|
865
|
+
} | {
|
|
866
|
+
status: "absent";
|
|
867
|
+
} | {
|
|
868
|
+
status: "unreadable";
|
|
869
|
+
digest: string;
|
|
870
|
+
};
|
|
871
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
872
|
+
secretsRevision: number;
|
|
873
|
+
descriptors: {
|
|
874
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
875
|
+
key: string;
|
|
876
|
+
restartRequired: true;
|
|
877
|
+
unit: string;
|
|
878
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
879
|
+
affectsResumeFingerprint: boolean;
|
|
880
|
+
onInvalid: "default" | "restrictive";
|
|
881
|
+
requires: string[];
|
|
882
|
+
legacyAliases: string[];
|
|
883
|
+
docs: {
|
|
884
|
+
summary: string;
|
|
885
|
+
title: string;
|
|
886
|
+
warning?: string | undefined;
|
|
887
|
+
};
|
|
888
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
889
|
+
requiresStepUp: boolean;
|
|
890
|
+
default?: string | number | boolean | string[] | undefined;
|
|
891
|
+
min?: number | undefined;
|
|
892
|
+
max?: number | undefined;
|
|
893
|
+
choices?: string[] | undefined;
|
|
894
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
895
|
+
}[];
|
|
896
|
+
}>, z.ZodObject<{
|
|
897
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-get-v1">;
|
|
898
|
+
state: z.ZodLiteral<"unreadable">;
|
|
899
|
+
settingsState: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
900
|
+
status: z.ZodLiteral<"ok">;
|
|
901
|
+
}, "strict", z.ZodTypeAny, {
|
|
902
|
+
status: "ok";
|
|
903
|
+
}, {
|
|
904
|
+
status: "ok";
|
|
905
|
+
}>, z.ZodObject<{
|
|
906
|
+
status: z.ZodLiteral<"absent">;
|
|
907
|
+
}, "strict", z.ZodTypeAny, {
|
|
908
|
+
status: "absent";
|
|
909
|
+
}, {
|
|
910
|
+
status: "absent";
|
|
911
|
+
}>, z.ZodObject<{
|
|
912
|
+
status: z.ZodLiteral<"unreadable">;
|
|
913
|
+
digest: z.ZodString;
|
|
914
|
+
}, "strict", z.ZodTypeAny, {
|
|
915
|
+
status: "unreadable";
|
|
916
|
+
digest: string;
|
|
917
|
+
}, {
|
|
918
|
+
status: "unreadable";
|
|
919
|
+
digest: string;
|
|
920
|
+
}>]>;
|
|
921
|
+
secretsState: z.ZodEnum<["ok", "absent", "unreadable"]>;
|
|
922
|
+
/** Bounded, sanitized reason; no raw file contents. */
|
|
923
|
+
reason: z.ZodString;
|
|
924
|
+
/** sha256 of the unreadable bytes — what an explicit recovery save must echo. */
|
|
925
|
+
digest: z.ZodString;
|
|
926
|
+
secrets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
927
|
+
set: z.ZodBoolean;
|
|
928
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
929
|
+
}, "strict", z.ZodTypeAny, {
|
|
930
|
+
set: boolean;
|
|
931
|
+
updatedAt?: string | undefined;
|
|
932
|
+
}, {
|
|
933
|
+
set: boolean;
|
|
934
|
+
updatedAt?: string | undefined;
|
|
935
|
+
}>>;
|
|
936
|
+
secretsRevision: z.ZodNumber;
|
|
937
|
+
serverNow: z.ZodString;
|
|
938
|
+
descriptors: z.ZodArray<z.ZodObject<{
|
|
939
|
+
key: z.ZodString;
|
|
940
|
+
settingClass: z.ZodEnum<["tuning", "retention", "feature", "reader_first", "policy", "secret"]>;
|
|
941
|
+
type: z.ZodEnum<["bool", "int", "enum", "string", "url", "list"]>;
|
|
942
|
+
unit: z.ZodString;
|
|
943
|
+
default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
944
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
945
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
946
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
947
|
+
/** Int-type descriptors only (T09 wire delta). */
|
|
948
|
+
numberKind: z.ZodOptional<z.ZodEnum<["int", "decimal"]>>;
|
|
949
|
+
requiresStepUp: z.ZodBoolean;
|
|
950
|
+
restartRequired: z.ZodLiteral<true>;
|
|
951
|
+
readTiming: z.ZodEnum<["module_load", "startup", "startup_singleton", "per_call"]>;
|
|
952
|
+
affectsResumeFingerprint: z.ZodBoolean;
|
|
953
|
+
requires: z.ZodArray<z.ZodString, "many">;
|
|
954
|
+
legacyAliases: z.ZodArray<z.ZodString, "many">;
|
|
955
|
+
onInvalid: z.ZodEnum<["default", "restrictive"]>;
|
|
956
|
+
docs: z.ZodObject<{
|
|
957
|
+
title: z.ZodString;
|
|
958
|
+
summary: z.ZodString;
|
|
959
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
960
|
+
}, "strict", z.ZodTypeAny, {
|
|
961
|
+
summary: string;
|
|
962
|
+
title: string;
|
|
963
|
+
warning?: string | undefined;
|
|
964
|
+
}, {
|
|
965
|
+
summary: string;
|
|
966
|
+
title: string;
|
|
967
|
+
warning?: string | undefined;
|
|
968
|
+
}>;
|
|
969
|
+
}, "strict", z.ZodTypeAny, {
|
|
970
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
971
|
+
key: string;
|
|
972
|
+
restartRequired: true;
|
|
973
|
+
unit: string;
|
|
974
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
975
|
+
affectsResumeFingerprint: boolean;
|
|
976
|
+
onInvalid: "default" | "restrictive";
|
|
977
|
+
requires: string[];
|
|
978
|
+
legacyAliases: string[];
|
|
979
|
+
docs: {
|
|
980
|
+
summary: string;
|
|
981
|
+
title: string;
|
|
982
|
+
warning?: string | undefined;
|
|
983
|
+
};
|
|
984
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
985
|
+
requiresStepUp: boolean;
|
|
986
|
+
default?: string | number | boolean | string[] | undefined;
|
|
987
|
+
min?: number | undefined;
|
|
988
|
+
max?: number | undefined;
|
|
989
|
+
choices?: string[] | undefined;
|
|
990
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
991
|
+
}, {
|
|
992
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
993
|
+
key: string;
|
|
994
|
+
restartRequired: true;
|
|
995
|
+
unit: string;
|
|
996
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
997
|
+
affectsResumeFingerprint: boolean;
|
|
998
|
+
onInvalid: "default" | "restrictive";
|
|
999
|
+
requires: string[];
|
|
1000
|
+
legacyAliases: string[];
|
|
1001
|
+
docs: {
|
|
1002
|
+
summary: string;
|
|
1003
|
+
title: string;
|
|
1004
|
+
warning?: string | undefined;
|
|
1005
|
+
};
|
|
1006
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1007
|
+
requiresStepUp: boolean;
|
|
1008
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1009
|
+
min?: number | undefined;
|
|
1010
|
+
max?: number | undefined;
|
|
1011
|
+
choices?: string[] | undefined;
|
|
1012
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1013
|
+
}>, "many">;
|
|
1014
|
+
}, "strict", z.ZodTypeAny, {
|
|
1015
|
+
digest: string;
|
|
1016
|
+
reason: string;
|
|
1017
|
+
state: "unreadable";
|
|
1018
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1019
|
+
serverNow: string;
|
|
1020
|
+
secrets: Record<string, {
|
|
1021
|
+
set: boolean;
|
|
1022
|
+
updatedAt?: string | undefined;
|
|
1023
|
+
}>;
|
|
1024
|
+
settingsState: {
|
|
1025
|
+
status: "ok";
|
|
1026
|
+
} | {
|
|
1027
|
+
status: "absent";
|
|
1028
|
+
} | {
|
|
1029
|
+
status: "unreadable";
|
|
1030
|
+
digest: string;
|
|
1031
|
+
};
|
|
1032
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1033
|
+
secretsRevision: number;
|
|
1034
|
+
descriptors: {
|
|
1035
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1036
|
+
key: string;
|
|
1037
|
+
restartRequired: true;
|
|
1038
|
+
unit: string;
|
|
1039
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1040
|
+
affectsResumeFingerprint: boolean;
|
|
1041
|
+
onInvalid: "default" | "restrictive";
|
|
1042
|
+
requires: string[];
|
|
1043
|
+
legacyAliases: string[];
|
|
1044
|
+
docs: {
|
|
1045
|
+
summary: string;
|
|
1046
|
+
title: string;
|
|
1047
|
+
warning?: string | undefined;
|
|
1048
|
+
};
|
|
1049
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1050
|
+
requiresStepUp: boolean;
|
|
1051
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1052
|
+
min?: number | undefined;
|
|
1053
|
+
max?: number | undefined;
|
|
1054
|
+
choices?: string[] | undefined;
|
|
1055
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1056
|
+
}[];
|
|
1057
|
+
}, {
|
|
1058
|
+
digest: string;
|
|
1059
|
+
reason: string;
|
|
1060
|
+
state: "unreadable";
|
|
1061
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1062
|
+
serverNow: string;
|
|
1063
|
+
secrets: Record<string, {
|
|
1064
|
+
set: boolean;
|
|
1065
|
+
updatedAt?: string | undefined;
|
|
1066
|
+
}>;
|
|
1067
|
+
settingsState: {
|
|
1068
|
+
status: "ok";
|
|
1069
|
+
} | {
|
|
1070
|
+
status: "absent";
|
|
1071
|
+
} | {
|
|
1072
|
+
status: "unreadable";
|
|
1073
|
+
digest: string;
|
|
1074
|
+
};
|
|
1075
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1076
|
+
secretsRevision: number;
|
|
1077
|
+
descriptors: {
|
|
1078
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1079
|
+
key: string;
|
|
1080
|
+
restartRequired: true;
|
|
1081
|
+
unit: string;
|
|
1082
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1083
|
+
affectsResumeFingerprint: boolean;
|
|
1084
|
+
onInvalid: "default" | "restrictive";
|
|
1085
|
+
requires: string[];
|
|
1086
|
+
legacyAliases: string[];
|
|
1087
|
+
docs: {
|
|
1088
|
+
summary: string;
|
|
1089
|
+
title: string;
|
|
1090
|
+
warning?: string | undefined;
|
|
1091
|
+
};
|
|
1092
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1093
|
+
requiresStepUp: boolean;
|
|
1094
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1095
|
+
min?: number | undefined;
|
|
1096
|
+
max?: number | undefined;
|
|
1097
|
+
choices?: string[] | undefined;
|
|
1098
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1099
|
+
}[];
|
|
1100
|
+
}>, z.ZodObject<{
|
|
1101
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-get-v1">;
|
|
1102
|
+
state: z.ZodLiteral<"ok">;
|
|
1103
|
+
settingsState: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
1104
|
+
status: z.ZodLiteral<"ok">;
|
|
1105
|
+
}, "strict", z.ZodTypeAny, {
|
|
1106
|
+
status: "ok";
|
|
1107
|
+
}, {
|
|
1108
|
+
status: "ok";
|
|
1109
|
+
}>, z.ZodObject<{
|
|
1110
|
+
status: z.ZodLiteral<"absent">;
|
|
1111
|
+
}, "strict", z.ZodTypeAny, {
|
|
1112
|
+
status: "absent";
|
|
1113
|
+
}, {
|
|
1114
|
+
status: "absent";
|
|
1115
|
+
}>, z.ZodObject<{
|
|
1116
|
+
status: z.ZodLiteral<"unreadable">;
|
|
1117
|
+
digest: z.ZodString;
|
|
1118
|
+
}, "strict", z.ZodTypeAny, {
|
|
1119
|
+
status: "unreadable";
|
|
1120
|
+
digest: string;
|
|
1121
|
+
}, {
|
|
1122
|
+
status: "unreadable";
|
|
1123
|
+
digest: string;
|
|
1124
|
+
}>]>;
|
|
1125
|
+
secretsState: z.ZodEnum<["ok", "absent", "unreadable"]>;
|
|
1126
|
+
revision: z.ZodNumber;
|
|
1127
|
+
updatedAt: z.ZodString;
|
|
1128
|
+
updatedBy: z.ZodObject<{
|
|
1129
|
+
actor: z.ZodEnum<["dashboard", "cli", "system"]>;
|
|
1130
|
+
auth: z.ZodEnum<["passkey", "bearer", "none", "local-fs"]>;
|
|
1131
|
+
}, "strict", z.ZodTypeAny, {
|
|
1132
|
+
actor: "dashboard" | "cli" | "system";
|
|
1133
|
+
auth: "passkey" | "bearer" | "none" | "local-fs";
|
|
1134
|
+
}, {
|
|
1135
|
+
actor: "dashboard" | "cli" | "system";
|
|
1136
|
+
auth: "passkey" | "bearer" | "none" | "local-fs";
|
|
1137
|
+
}>;
|
|
1138
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
1139
|
+
secrets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1140
|
+
set: z.ZodBoolean;
|
|
1141
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
1142
|
+
}, "strict", z.ZodTypeAny, {
|
|
1143
|
+
set: boolean;
|
|
1144
|
+
updatedAt?: string | undefined;
|
|
1145
|
+
}, {
|
|
1146
|
+
set: boolean;
|
|
1147
|
+
updatedAt?: string | undefined;
|
|
1148
|
+
}>>;
|
|
1149
|
+
secretsRevision: z.ZodNumber;
|
|
1150
|
+
serverNow: z.ZodString;
|
|
1151
|
+
descriptors: z.ZodArray<z.ZodObject<{
|
|
1152
|
+
key: z.ZodString;
|
|
1153
|
+
settingClass: z.ZodEnum<["tuning", "retention", "feature", "reader_first", "policy", "secret"]>;
|
|
1154
|
+
type: z.ZodEnum<["bool", "int", "enum", "string", "url", "list"]>;
|
|
1155
|
+
unit: z.ZodString;
|
|
1156
|
+
default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
1157
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1158
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1159
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1160
|
+
/** Int-type descriptors only (T09 wire delta). */
|
|
1161
|
+
numberKind: z.ZodOptional<z.ZodEnum<["int", "decimal"]>>;
|
|
1162
|
+
requiresStepUp: z.ZodBoolean;
|
|
1163
|
+
restartRequired: z.ZodLiteral<true>;
|
|
1164
|
+
readTiming: z.ZodEnum<["module_load", "startup", "startup_singleton", "per_call"]>;
|
|
1165
|
+
affectsResumeFingerprint: z.ZodBoolean;
|
|
1166
|
+
requires: z.ZodArray<z.ZodString, "many">;
|
|
1167
|
+
legacyAliases: z.ZodArray<z.ZodString, "many">;
|
|
1168
|
+
onInvalid: z.ZodEnum<["default", "restrictive"]>;
|
|
1169
|
+
docs: z.ZodObject<{
|
|
1170
|
+
title: z.ZodString;
|
|
1171
|
+
summary: z.ZodString;
|
|
1172
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
1173
|
+
}, "strict", z.ZodTypeAny, {
|
|
1174
|
+
summary: string;
|
|
1175
|
+
title: string;
|
|
1176
|
+
warning?: string | undefined;
|
|
1177
|
+
}, {
|
|
1178
|
+
summary: string;
|
|
1179
|
+
title: string;
|
|
1180
|
+
warning?: string | undefined;
|
|
1181
|
+
}>;
|
|
1182
|
+
}, "strict", z.ZodTypeAny, {
|
|
1183
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1184
|
+
key: string;
|
|
1185
|
+
restartRequired: true;
|
|
1186
|
+
unit: string;
|
|
1187
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1188
|
+
affectsResumeFingerprint: boolean;
|
|
1189
|
+
onInvalid: "default" | "restrictive";
|
|
1190
|
+
requires: string[];
|
|
1191
|
+
legacyAliases: string[];
|
|
1192
|
+
docs: {
|
|
1193
|
+
summary: string;
|
|
1194
|
+
title: string;
|
|
1195
|
+
warning?: string | undefined;
|
|
1196
|
+
};
|
|
1197
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1198
|
+
requiresStepUp: boolean;
|
|
1199
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1200
|
+
min?: number | undefined;
|
|
1201
|
+
max?: number | undefined;
|
|
1202
|
+
choices?: string[] | undefined;
|
|
1203
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1204
|
+
}, {
|
|
1205
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1206
|
+
key: string;
|
|
1207
|
+
restartRequired: true;
|
|
1208
|
+
unit: string;
|
|
1209
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1210
|
+
affectsResumeFingerprint: boolean;
|
|
1211
|
+
onInvalid: "default" | "restrictive";
|
|
1212
|
+
requires: string[];
|
|
1213
|
+
legacyAliases: string[];
|
|
1214
|
+
docs: {
|
|
1215
|
+
summary: string;
|
|
1216
|
+
title: string;
|
|
1217
|
+
warning?: string | undefined;
|
|
1218
|
+
};
|
|
1219
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1220
|
+
requiresStepUp: boolean;
|
|
1221
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1222
|
+
min?: number | undefined;
|
|
1223
|
+
max?: number | undefined;
|
|
1224
|
+
choices?: string[] | undefined;
|
|
1225
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1226
|
+
}>, "many">;
|
|
1227
|
+
}, "strict", z.ZodTypeAny, {
|
|
1228
|
+
values: Record<string, string | number | boolean | string[]>;
|
|
1229
|
+
revision: number;
|
|
1230
|
+
state: "ok";
|
|
1231
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1232
|
+
serverNow: string;
|
|
1233
|
+
updatedAt: string;
|
|
1234
|
+
updatedBy: {
|
|
1235
|
+
actor: "dashboard" | "cli" | "system";
|
|
1236
|
+
auth: "passkey" | "bearer" | "none" | "local-fs";
|
|
1237
|
+
};
|
|
1238
|
+
secrets: Record<string, {
|
|
1239
|
+
set: boolean;
|
|
1240
|
+
updatedAt?: string | undefined;
|
|
1241
|
+
}>;
|
|
1242
|
+
settingsState: {
|
|
1243
|
+
status: "ok";
|
|
1244
|
+
} | {
|
|
1245
|
+
status: "absent";
|
|
1246
|
+
} | {
|
|
1247
|
+
status: "unreadable";
|
|
1248
|
+
digest: string;
|
|
1249
|
+
};
|
|
1250
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1251
|
+
secretsRevision: number;
|
|
1252
|
+
descriptors: {
|
|
1253
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1254
|
+
key: string;
|
|
1255
|
+
restartRequired: true;
|
|
1256
|
+
unit: string;
|
|
1257
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1258
|
+
affectsResumeFingerprint: boolean;
|
|
1259
|
+
onInvalid: "default" | "restrictive";
|
|
1260
|
+
requires: string[];
|
|
1261
|
+
legacyAliases: string[];
|
|
1262
|
+
docs: {
|
|
1263
|
+
summary: string;
|
|
1264
|
+
title: string;
|
|
1265
|
+
warning?: string | undefined;
|
|
1266
|
+
};
|
|
1267
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1268
|
+
requiresStepUp: boolean;
|
|
1269
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1270
|
+
min?: number | undefined;
|
|
1271
|
+
max?: number | undefined;
|
|
1272
|
+
choices?: string[] | undefined;
|
|
1273
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1274
|
+
}[];
|
|
1275
|
+
}, {
|
|
1276
|
+
values: Record<string, string | number | boolean | string[]>;
|
|
1277
|
+
revision: number;
|
|
1278
|
+
state: "ok";
|
|
1279
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1280
|
+
serverNow: string;
|
|
1281
|
+
updatedAt: string;
|
|
1282
|
+
updatedBy: {
|
|
1283
|
+
actor: "dashboard" | "cli" | "system";
|
|
1284
|
+
auth: "passkey" | "bearer" | "none" | "local-fs";
|
|
1285
|
+
};
|
|
1286
|
+
secrets: Record<string, {
|
|
1287
|
+
set: boolean;
|
|
1288
|
+
updatedAt?: string | undefined;
|
|
1289
|
+
}>;
|
|
1290
|
+
settingsState: {
|
|
1291
|
+
status: "ok";
|
|
1292
|
+
} | {
|
|
1293
|
+
status: "absent";
|
|
1294
|
+
} | {
|
|
1295
|
+
status: "unreadable";
|
|
1296
|
+
digest: string;
|
|
1297
|
+
};
|
|
1298
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1299
|
+
secretsRevision: number;
|
|
1300
|
+
descriptors: {
|
|
1301
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1302
|
+
key: string;
|
|
1303
|
+
restartRequired: true;
|
|
1304
|
+
unit: string;
|
|
1305
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1306
|
+
affectsResumeFingerprint: boolean;
|
|
1307
|
+
onInvalid: "default" | "restrictive";
|
|
1308
|
+
requires: string[];
|
|
1309
|
+
legacyAliases: string[];
|
|
1310
|
+
docs: {
|
|
1311
|
+
summary: string;
|
|
1312
|
+
title: string;
|
|
1313
|
+
warning?: string | undefined;
|
|
1314
|
+
};
|
|
1315
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1316
|
+
requiresStepUp: boolean;
|
|
1317
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1318
|
+
min?: number | undefined;
|
|
1319
|
+
max?: number | undefined;
|
|
1320
|
+
choices?: string[] | undefined;
|
|
1321
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1322
|
+
}[];
|
|
1323
|
+
}>]>, {
|
|
1324
|
+
state: "absent";
|
|
1325
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1326
|
+
serverNow: string;
|
|
1327
|
+
secrets: Record<string, {
|
|
1328
|
+
set: boolean;
|
|
1329
|
+
updatedAt?: string | undefined;
|
|
1330
|
+
}>;
|
|
1331
|
+
settingsState: {
|
|
1332
|
+
status: "ok";
|
|
1333
|
+
} | {
|
|
1334
|
+
status: "absent";
|
|
1335
|
+
} | {
|
|
1336
|
+
status: "unreadable";
|
|
1337
|
+
digest: string;
|
|
1338
|
+
};
|
|
1339
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1340
|
+
secretsRevision: number;
|
|
1341
|
+
descriptors: {
|
|
1342
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1343
|
+
key: string;
|
|
1344
|
+
restartRequired: true;
|
|
1345
|
+
unit: string;
|
|
1346
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1347
|
+
affectsResumeFingerprint: boolean;
|
|
1348
|
+
onInvalid: "default" | "restrictive";
|
|
1349
|
+
requires: string[];
|
|
1350
|
+
legacyAliases: string[];
|
|
1351
|
+
docs: {
|
|
1352
|
+
summary: string;
|
|
1353
|
+
title: string;
|
|
1354
|
+
warning?: string | undefined;
|
|
1355
|
+
};
|
|
1356
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1357
|
+
requiresStepUp: boolean;
|
|
1358
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1359
|
+
min?: number | undefined;
|
|
1360
|
+
max?: number | undefined;
|
|
1361
|
+
choices?: string[] | undefined;
|
|
1362
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1363
|
+
}[];
|
|
1364
|
+
} | {
|
|
1365
|
+
digest: string;
|
|
1366
|
+
reason: string;
|
|
1367
|
+
state: "unreadable";
|
|
1368
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1369
|
+
serverNow: string;
|
|
1370
|
+
secrets: Record<string, {
|
|
1371
|
+
set: boolean;
|
|
1372
|
+
updatedAt?: string | undefined;
|
|
1373
|
+
}>;
|
|
1374
|
+
settingsState: {
|
|
1375
|
+
status: "ok";
|
|
1376
|
+
} | {
|
|
1377
|
+
status: "absent";
|
|
1378
|
+
} | {
|
|
1379
|
+
status: "unreadable";
|
|
1380
|
+
digest: string;
|
|
1381
|
+
};
|
|
1382
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1383
|
+
secretsRevision: number;
|
|
1384
|
+
descriptors: {
|
|
1385
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1386
|
+
key: string;
|
|
1387
|
+
restartRequired: true;
|
|
1388
|
+
unit: string;
|
|
1389
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1390
|
+
affectsResumeFingerprint: boolean;
|
|
1391
|
+
onInvalid: "default" | "restrictive";
|
|
1392
|
+
requires: string[];
|
|
1393
|
+
legacyAliases: string[];
|
|
1394
|
+
docs: {
|
|
1395
|
+
summary: string;
|
|
1396
|
+
title: string;
|
|
1397
|
+
warning?: string | undefined;
|
|
1398
|
+
};
|
|
1399
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1400
|
+
requiresStepUp: boolean;
|
|
1401
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1402
|
+
min?: number | undefined;
|
|
1403
|
+
max?: number | undefined;
|
|
1404
|
+
choices?: string[] | undefined;
|
|
1405
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1406
|
+
}[];
|
|
1407
|
+
} | {
|
|
1408
|
+
values: Record<string, string | number | boolean | string[]>;
|
|
1409
|
+
revision: number;
|
|
1410
|
+
state: "ok";
|
|
1411
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1412
|
+
serverNow: string;
|
|
1413
|
+
updatedAt: string;
|
|
1414
|
+
updatedBy: {
|
|
1415
|
+
actor: "dashboard" | "cli" | "system";
|
|
1416
|
+
auth: "passkey" | "bearer" | "none" | "local-fs";
|
|
1417
|
+
};
|
|
1418
|
+
secrets: Record<string, {
|
|
1419
|
+
set: boolean;
|
|
1420
|
+
updatedAt?: string | undefined;
|
|
1421
|
+
}>;
|
|
1422
|
+
settingsState: {
|
|
1423
|
+
status: "ok";
|
|
1424
|
+
} | {
|
|
1425
|
+
status: "absent";
|
|
1426
|
+
} | {
|
|
1427
|
+
status: "unreadable";
|
|
1428
|
+
digest: string;
|
|
1429
|
+
};
|
|
1430
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1431
|
+
secretsRevision: number;
|
|
1432
|
+
descriptors: {
|
|
1433
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1434
|
+
key: string;
|
|
1435
|
+
restartRequired: true;
|
|
1436
|
+
unit: string;
|
|
1437
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1438
|
+
affectsResumeFingerprint: boolean;
|
|
1439
|
+
onInvalid: "default" | "restrictive";
|
|
1440
|
+
requires: string[];
|
|
1441
|
+
legacyAliases: string[];
|
|
1442
|
+
docs: {
|
|
1443
|
+
summary: string;
|
|
1444
|
+
title: string;
|
|
1445
|
+
warning?: string | undefined;
|
|
1446
|
+
};
|
|
1447
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1448
|
+
requiresStepUp: boolean;
|
|
1449
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1450
|
+
min?: number | undefined;
|
|
1451
|
+
max?: number | undefined;
|
|
1452
|
+
choices?: string[] | undefined;
|
|
1453
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1454
|
+
}[];
|
|
1455
|
+
}, {
|
|
1456
|
+
state: "absent";
|
|
1457
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1458
|
+
serverNow: string;
|
|
1459
|
+
secrets: Record<string, {
|
|
1460
|
+
set: boolean;
|
|
1461
|
+
updatedAt?: string | undefined;
|
|
1462
|
+
}>;
|
|
1463
|
+
settingsState: {
|
|
1464
|
+
status: "ok";
|
|
1465
|
+
} | {
|
|
1466
|
+
status: "absent";
|
|
1467
|
+
} | {
|
|
1468
|
+
status: "unreadable";
|
|
1469
|
+
digest: string;
|
|
1470
|
+
};
|
|
1471
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1472
|
+
secretsRevision: number;
|
|
1473
|
+
descriptors: {
|
|
1474
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1475
|
+
key: string;
|
|
1476
|
+
restartRequired: true;
|
|
1477
|
+
unit: string;
|
|
1478
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1479
|
+
affectsResumeFingerprint: boolean;
|
|
1480
|
+
onInvalid: "default" | "restrictive";
|
|
1481
|
+
requires: string[];
|
|
1482
|
+
legacyAliases: string[];
|
|
1483
|
+
docs: {
|
|
1484
|
+
summary: string;
|
|
1485
|
+
title: string;
|
|
1486
|
+
warning?: string | undefined;
|
|
1487
|
+
};
|
|
1488
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1489
|
+
requiresStepUp: boolean;
|
|
1490
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1491
|
+
min?: number | undefined;
|
|
1492
|
+
max?: number | undefined;
|
|
1493
|
+
choices?: string[] | undefined;
|
|
1494
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1495
|
+
}[];
|
|
1496
|
+
} | {
|
|
1497
|
+
digest: string;
|
|
1498
|
+
reason: string;
|
|
1499
|
+
state: "unreadable";
|
|
1500
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1501
|
+
serverNow: string;
|
|
1502
|
+
secrets: Record<string, {
|
|
1503
|
+
set: boolean;
|
|
1504
|
+
updatedAt?: string | undefined;
|
|
1505
|
+
}>;
|
|
1506
|
+
settingsState: {
|
|
1507
|
+
status: "ok";
|
|
1508
|
+
} | {
|
|
1509
|
+
status: "absent";
|
|
1510
|
+
} | {
|
|
1511
|
+
status: "unreadable";
|
|
1512
|
+
digest: string;
|
|
1513
|
+
};
|
|
1514
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1515
|
+
secretsRevision: number;
|
|
1516
|
+
descriptors: {
|
|
1517
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1518
|
+
key: string;
|
|
1519
|
+
restartRequired: true;
|
|
1520
|
+
unit: string;
|
|
1521
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1522
|
+
affectsResumeFingerprint: boolean;
|
|
1523
|
+
onInvalid: "default" | "restrictive";
|
|
1524
|
+
requires: string[];
|
|
1525
|
+
legacyAliases: string[];
|
|
1526
|
+
docs: {
|
|
1527
|
+
summary: string;
|
|
1528
|
+
title: string;
|
|
1529
|
+
warning?: string | undefined;
|
|
1530
|
+
};
|
|
1531
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1532
|
+
requiresStepUp: boolean;
|
|
1533
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1534
|
+
min?: number | undefined;
|
|
1535
|
+
max?: number | undefined;
|
|
1536
|
+
choices?: string[] | undefined;
|
|
1537
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1538
|
+
}[];
|
|
1539
|
+
} | {
|
|
1540
|
+
values: Record<string, string | number | boolean | string[]>;
|
|
1541
|
+
revision: number;
|
|
1542
|
+
state: "ok";
|
|
1543
|
+
schemaVersion: "clinkx-settings-get-v1";
|
|
1544
|
+
serverNow: string;
|
|
1545
|
+
updatedAt: string;
|
|
1546
|
+
updatedBy: {
|
|
1547
|
+
actor: "dashboard" | "cli" | "system";
|
|
1548
|
+
auth: "passkey" | "bearer" | "none" | "local-fs";
|
|
1549
|
+
};
|
|
1550
|
+
secrets: Record<string, {
|
|
1551
|
+
set: boolean;
|
|
1552
|
+
updatedAt?: string | undefined;
|
|
1553
|
+
}>;
|
|
1554
|
+
settingsState: {
|
|
1555
|
+
status: "ok";
|
|
1556
|
+
} | {
|
|
1557
|
+
status: "absent";
|
|
1558
|
+
} | {
|
|
1559
|
+
status: "unreadable";
|
|
1560
|
+
digest: string;
|
|
1561
|
+
};
|
|
1562
|
+
secretsState: "absent" | "unreadable" | "ok";
|
|
1563
|
+
secretsRevision: number;
|
|
1564
|
+
descriptors: {
|
|
1565
|
+
type: "string" | "url" | "list" | "enum" | "int" | "bool";
|
|
1566
|
+
key: string;
|
|
1567
|
+
restartRequired: true;
|
|
1568
|
+
unit: string;
|
|
1569
|
+
readTiming: "module_load" | "startup" | "startup_singleton" | "per_call";
|
|
1570
|
+
affectsResumeFingerprint: boolean;
|
|
1571
|
+
onInvalid: "default" | "restrictive";
|
|
1572
|
+
requires: string[];
|
|
1573
|
+
legacyAliases: string[];
|
|
1574
|
+
docs: {
|
|
1575
|
+
summary: string;
|
|
1576
|
+
title: string;
|
|
1577
|
+
warning?: string | undefined;
|
|
1578
|
+
};
|
|
1579
|
+
settingClass: "policy" | "retention" | "tuning" | "feature" | "reader_first" | "secret";
|
|
1580
|
+
requiresStepUp: boolean;
|
|
1581
|
+
default?: string | number | boolean | string[] | undefined;
|
|
1582
|
+
min?: number | undefined;
|
|
1583
|
+
max?: number | undefined;
|
|
1584
|
+
choices?: string[] | undefined;
|
|
1585
|
+
numberKind?: "int" | "decimal" | undefined;
|
|
1586
|
+
}[];
|
|
1587
|
+
}>;
|
|
1588
|
+
export type SettingsGetResponse = z.infer<typeof SettingsGetResponseSchema>;
|
|
1589
|
+
/**
|
|
1590
|
+
* One observed ClinkX process, projected from its heartbeat. Strict; key
|
|
1591
|
+
* NAME lists only — a secret or env value can never appear here (no
|
|
1592
|
+
* `value`/`effective`/`env`-shaped field parses).
|
|
1593
|
+
*/
|
|
1594
|
+
export declare const ProcessWireSchema: z.ZodObject<{
|
|
1595
|
+
/**
|
|
1596
|
+
* Stable process identity = the heartbeat's `boot_nonce` (T09 wire delta,
|
|
1597
|
+
* S4): the previous `hostname-pid-bootNonce` composition overflowed the
|
|
1598
|
+
* wire cap for long hostnames (a 100-char host made every row fail
|
|
1599
|
+
* validation and the whole endpoint 500). Host and pid travel separately.
|
|
1600
|
+
*/
|
|
1601
|
+
id: z.ZodString;
|
|
1602
|
+
host: z.ZodString;
|
|
1603
|
+
pid: z.ZodNumber;
|
|
1604
|
+
entry: z.ZodEnum<["root", "workflows-standalone", "dashboard", "companion", "gateway", "static-ui", "other"]>;
|
|
1605
|
+
version: z.ZodString;
|
|
1606
|
+
startedAt: z.ZodString;
|
|
1607
|
+
lastSeenAt: z.ZodString;
|
|
1608
|
+
liveness: z.ZodEnum<["live", "stale", "unknown"]>;
|
|
1609
|
+
settingsState: z.ZodEnum<["off", "absent", "loaded", "unreadable"]>;
|
|
1610
|
+
/** Revision the process loaded; null when it loaded no document. */
|
|
1611
|
+
loadedRevision: z.ZodNullable<z.ZodNumber>;
|
|
1612
|
+
/** Secrets revision the process loaded; null when none was read. */
|
|
1613
|
+
loadedSecretsRevision: z.ZodNullable<z.ZodNumber>;
|
|
1614
|
+
/**
|
|
1615
|
+
* True only when the loaded settings revision AND digest AND secrets
|
|
1616
|
+
* revision all match the store's current documents (T09). A row with
|
|
1617
|
+
* missing metadata (pre-W3 heartbeat, no revision/digest) is `false` —
|
|
1618
|
+
* its freshness is unknown, never confirmed.
|
|
1619
|
+
*/
|
|
1620
|
+
current: z.ZodBoolean;
|
|
1621
|
+
/**
|
|
1622
|
+
* Registry keys whose source is env, except those whose env value equals
|
|
1623
|
+
* the file value (`envEqualsFileKeys`). Includes keys with no file value,
|
|
1624
|
+
* and secret or withheld keys, which carry no equality hint.
|
|
1625
|
+
*/
|
|
1626
|
+
shadowedKeys: z.ZodArray<z.ZodString, "many">;
|
|
1627
|
+
/** Keys where env and file carry the same effective value. */
|
|
1628
|
+
envEqualsFileKeys: z.ZodArray<z.ZodString, "many">;
|
|
1629
|
+
/** Keys filled with the registry-declared restrictive value (invalid file value). */
|
|
1630
|
+
invalidFallbackKeys: z.ZodArray<z.ZodString, "many">;
|
|
1631
|
+
/** Unclassified CLINKX_* names present in that process's env. */
|
|
1632
|
+
unknownEnvKeys: z.ZodArray<z.ZodString, "many">;
|
|
1633
|
+
/** Bounded sanitized diagnostics; never secret or env values. */
|
|
1634
|
+
warnings: z.ZodArray<z.ZodString, "many">;
|
|
1635
|
+
}, "strict", z.ZodTypeAny, {
|
|
1636
|
+
id: string;
|
|
1637
|
+
version: string;
|
|
1638
|
+
entry: "dashboard" | "other" | "root" | "workflows-standalone" | "companion" | "gateway" | "static-ui";
|
|
1639
|
+
startedAt: string;
|
|
1640
|
+
pid: number;
|
|
1641
|
+
warnings: string[];
|
|
1642
|
+
current: boolean;
|
|
1643
|
+
liveness: "unknown" | "live" | "stale";
|
|
1644
|
+
settingsState: "off" | "absent" | "unreadable" | "loaded";
|
|
1645
|
+
host: string;
|
|
1646
|
+
lastSeenAt: string;
|
|
1647
|
+
loadedRevision: number | null;
|
|
1648
|
+
loadedSecretsRevision: number | null;
|
|
1649
|
+
shadowedKeys: string[];
|
|
1650
|
+
envEqualsFileKeys: string[];
|
|
1651
|
+
invalidFallbackKeys: string[];
|
|
1652
|
+
unknownEnvKeys: string[];
|
|
1653
|
+
}, {
|
|
1654
|
+
id: string;
|
|
1655
|
+
version: string;
|
|
1656
|
+
entry: "dashboard" | "other" | "root" | "workflows-standalone" | "companion" | "gateway" | "static-ui";
|
|
1657
|
+
startedAt: string;
|
|
1658
|
+
pid: number;
|
|
1659
|
+
warnings: string[];
|
|
1660
|
+
current: boolean;
|
|
1661
|
+
liveness: "unknown" | "live" | "stale";
|
|
1662
|
+
settingsState: "off" | "absent" | "unreadable" | "loaded";
|
|
1663
|
+
host: string;
|
|
1664
|
+
lastSeenAt: string;
|
|
1665
|
+
loadedRevision: number | null;
|
|
1666
|
+
loadedSecretsRevision: number | null;
|
|
1667
|
+
shadowedKeys: string[];
|
|
1668
|
+
envEqualsFileKeys: string[];
|
|
1669
|
+
invalidFallbackKeys: string[];
|
|
1670
|
+
unknownEnvKeys: string[];
|
|
1671
|
+
}>;
|
|
1672
|
+
export type ProcessWire = z.infer<typeof ProcessWireSchema>;
|
|
1673
|
+
export declare const SettingsProcessesResponseSchema: z.ZodObject<{
|
|
1674
|
+
schemaVersion: z.ZodLiteral<"clinkx-settings-processes-v1">;
|
|
1675
|
+
serverNow: z.ZodString;
|
|
1676
|
+
/** Freshest known settings revision; null when no document exists. */
|
|
1677
|
+
currentRevision: z.ZodNullable<z.ZodNumber>;
|
|
1678
|
+
processes: z.ZodArray<z.ZodObject<{
|
|
1679
|
+
/**
|
|
1680
|
+
* Stable process identity = the heartbeat's `boot_nonce` (T09 wire delta,
|
|
1681
|
+
* S4): the previous `hostname-pid-bootNonce` composition overflowed the
|
|
1682
|
+
* wire cap for long hostnames (a 100-char host made every row fail
|
|
1683
|
+
* validation and the whole endpoint 500). Host and pid travel separately.
|
|
1684
|
+
*/
|
|
1685
|
+
id: z.ZodString;
|
|
1686
|
+
host: z.ZodString;
|
|
1687
|
+
pid: z.ZodNumber;
|
|
1688
|
+
entry: z.ZodEnum<["root", "workflows-standalone", "dashboard", "companion", "gateway", "static-ui", "other"]>;
|
|
1689
|
+
version: z.ZodString;
|
|
1690
|
+
startedAt: z.ZodString;
|
|
1691
|
+
lastSeenAt: z.ZodString;
|
|
1692
|
+
liveness: z.ZodEnum<["live", "stale", "unknown"]>;
|
|
1693
|
+
settingsState: z.ZodEnum<["off", "absent", "loaded", "unreadable"]>;
|
|
1694
|
+
/** Revision the process loaded; null when it loaded no document. */
|
|
1695
|
+
loadedRevision: z.ZodNullable<z.ZodNumber>;
|
|
1696
|
+
/** Secrets revision the process loaded; null when none was read. */
|
|
1697
|
+
loadedSecretsRevision: z.ZodNullable<z.ZodNumber>;
|
|
1698
|
+
/**
|
|
1699
|
+
* True only when the loaded settings revision AND digest AND secrets
|
|
1700
|
+
* revision all match the store's current documents (T09). A row with
|
|
1701
|
+
* missing metadata (pre-W3 heartbeat, no revision/digest) is `false` —
|
|
1702
|
+
* its freshness is unknown, never confirmed.
|
|
1703
|
+
*/
|
|
1704
|
+
current: z.ZodBoolean;
|
|
1705
|
+
/**
|
|
1706
|
+
* Registry keys whose source is env, except those whose env value equals
|
|
1707
|
+
* the file value (`envEqualsFileKeys`). Includes keys with no file value,
|
|
1708
|
+
* and secret or withheld keys, which carry no equality hint.
|
|
1709
|
+
*/
|
|
1710
|
+
shadowedKeys: z.ZodArray<z.ZodString, "many">;
|
|
1711
|
+
/** Keys where env and file carry the same effective value. */
|
|
1712
|
+
envEqualsFileKeys: z.ZodArray<z.ZodString, "many">;
|
|
1713
|
+
/** Keys filled with the registry-declared restrictive value (invalid file value). */
|
|
1714
|
+
invalidFallbackKeys: z.ZodArray<z.ZodString, "many">;
|
|
1715
|
+
/** Unclassified CLINKX_* names present in that process's env. */
|
|
1716
|
+
unknownEnvKeys: z.ZodArray<z.ZodString, "many">;
|
|
1717
|
+
/** Bounded sanitized diagnostics; never secret or env values. */
|
|
1718
|
+
warnings: z.ZodArray<z.ZodString, "many">;
|
|
1719
|
+
}, "strict", z.ZodTypeAny, {
|
|
1720
|
+
id: string;
|
|
1721
|
+
version: string;
|
|
1722
|
+
entry: "dashboard" | "other" | "root" | "workflows-standalone" | "companion" | "gateway" | "static-ui";
|
|
1723
|
+
startedAt: string;
|
|
1724
|
+
pid: number;
|
|
1725
|
+
warnings: string[];
|
|
1726
|
+
current: boolean;
|
|
1727
|
+
liveness: "unknown" | "live" | "stale";
|
|
1728
|
+
settingsState: "off" | "absent" | "unreadable" | "loaded";
|
|
1729
|
+
host: string;
|
|
1730
|
+
lastSeenAt: string;
|
|
1731
|
+
loadedRevision: number | null;
|
|
1732
|
+
loadedSecretsRevision: number | null;
|
|
1733
|
+
shadowedKeys: string[];
|
|
1734
|
+
envEqualsFileKeys: string[];
|
|
1735
|
+
invalidFallbackKeys: string[];
|
|
1736
|
+
unknownEnvKeys: string[];
|
|
1737
|
+
}, {
|
|
1738
|
+
id: string;
|
|
1739
|
+
version: string;
|
|
1740
|
+
entry: "dashboard" | "other" | "root" | "workflows-standalone" | "companion" | "gateway" | "static-ui";
|
|
1741
|
+
startedAt: string;
|
|
1742
|
+
pid: number;
|
|
1743
|
+
warnings: string[];
|
|
1744
|
+
current: boolean;
|
|
1745
|
+
liveness: "unknown" | "live" | "stale";
|
|
1746
|
+
settingsState: "off" | "absent" | "unreadable" | "loaded";
|
|
1747
|
+
host: string;
|
|
1748
|
+
lastSeenAt: string;
|
|
1749
|
+
loadedRevision: number | null;
|
|
1750
|
+
loadedSecretsRevision: number | null;
|
|
1751
|
+
shadowedKeys: string[];
|
|
1752
|
+
envEqualsFileKeys: string[];
|
|
1753
|
+
invalidFallbackKeys: string[];
|
|
1754
|
+
unknownEnvKeys: string[];
|
|
1755
|
+
}>, "many">;
|
|
1756
|
+
truncated: z.ZodBoolean;
|
|
1757
|
+
}, "strict", z.ZodTypeAny, {
|
|
1758
|
+
truncated: boolean;
|
|
1759
|
+
schemaVersion: "clinkx-settings-processes-v1";
|
|
1760
|
+
serverNow: string;
|
|
1761
|
+
processes: {
|
|
1762
|
+
id: string;
|
|
1763
|
+
version: string;
|
|
1764
|
+
entry: "dashboard" | "other" | "root" | "workflows-standalone" | "companion" | "gateway" | "static-ui";
|
|
1765
|
+
startedAt: string;
|
|
1766
|
+
pid: number;
|
|
1767
|
+
warnings: string[];
|
|
1768
|
+
current: boolean;
|
|
1769
|
+
liveness: "unknown" | "live" | "stale";
|
|
1770
|
+
settingsState: "off" | "absent" | "unreadable" | "loaded";
|
|
1771
|
+
host: string;
|
|
1772
|
+
lastSeenAt: string;
|
|
1773
|
+
loadedRevision: number | null;
|
|
1774
|
+
loadedSecretsRevision: number | null;
|
|
1775
|
+
shadowedKeys: string[];
|
|
1776
|
+
envEqualsFileKeys: string[];
|
|
1777
|
+
invalidFallbackKeys: string[];
|
|
1778
|
+
unknownEnvKeys: string[];
|
|
1779
|
+
}[];
|
|
1780
|
+
currentRevision: number | null;
|
|
1781
|
+
}, {
|
|
1782
|
+
truncated: boolean;
|
|
1783
|
+
schemaVersion: "clinkx-settings-processes-v1";
|
|
1784
|
+
serverNow: string;
|
|
1785
|
+
processes: {
|
|
1786
|
+
id: string;
|
|
1787
|
+
version: string;
|
|
1788
|
+
entry: "dashboard" | "other" | "root" | "workflows-standalone" | "companion" | "gateway" | "static-ui";
|
|
1789
|
+
startedAt: string;
|
|
1790
|
+
pid: number;
|
|
1791
|
+
warnings: string[];
|
|
1792
|
+
current: boolean;
|
|
1793
|
+
liveness: "unknown" | "live" | "stale";
|
|
1794
|
+
settingsState: "off" | "absent" | "unreadable" | "loaded";
|
|
1795
|
+
host: string;
|
|
1796
|
+
lastSeenAt: string;
|
|
1797
|
+
loadedRevision: number | null;
|
|
1798
|
+
loadedSecretsRevision: number | null;
|
|
1799
|
+
shadowedKeys: string[];
|
|
1800
|
+
envEqualsFileKeys: string[];
|
|
1801
|
+
invalidFallbackKeys: string[];
|
|
1802
|
+
unknownEnvKeys: string[];
|
|
1803
|
+
}[];
|
|
1804
|
+
currentRevision: number | null;
|
|
1805
|
+
}>;
|
|
1806
|
+
export type SettingsProcessesResponse = z.infer<typeof SettingsProcessesResponseSchema>;
|