@kanadego/dsh-heartbeat 1.9.3 → 2.0.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/LICENSE +21 -21
- package/README.md +103 -110
- package/client.js +12 -0
- package/config/policy.json +74 -74
- package/config/profile-schema.json +306 -306
- package/dist/{bindings-225SI7KC.js → bindings-U2M3CO2D.js} +3 -3
- package/dist/{chunk-TY6UP74X.js → chunk-3DNGY4DS.js} +2 -2
- package/dist/{chunk-CUOSICYJ.js → chunk-544QOJN5.js} +397 -23
- package/dist/chunk-544QOJN5.js.map +1 -0
- package/dist/{chunk-TRO4E6WG.js → chunk-6MVKWICX.js} +587 -139
- package/dist/chunk-6MVKWICX.js.map +1 -0
- package/dist/{chunk-WLZSABBH.js → chunk-6XM6KY7M.js} +27 -10
- package/dist/chunk-6XM6KY7M.js.map +1 -0
- package/dist/chunk-AKIJ4LS2.js +680 -0
- package/dist/chunk-AKIJ4LS2.js.map +1 -0
- package/dist/{chunk-KB5SMG3F.js → chunk-DC5HMCJC.js} +3 -3
- package/dist/{chunk-3MDBU6WY.js → chunk-DZ7YCFGX.js} +37 -7
- package/dist/chunk-DZ7YCFGX.js.map +1 -0
- package/dist/{chunk-WRUTATW4.js → chunk-IBBAISSW.js} +13 -2
- package/dist/chunk-IBBAISSW.js.map +1 -0
- package/dist/{chunk-XYYEJK3W.js → chunk-IFRMKVIC.js} +82 -21
- package/dist/chunk-IFRMKVIC.js.map +1 -0
- package/dist/{chunk-XFNCTOW7.js → chunk-NCPKOWS7.js} +52 -4
- package/dist/chunk-NCPKOWS7.js.map +1 -0
- package/dist/{chunk-JDH2LDFS.js → chunk-TVX4HV4Y.js} +4 -6
- package/dist/{chunk-JDH2LDFS.js.map → chunk-TVX4HV4Y.js.map} +1 -1
- package/dist/cli/index.js +149 -26
- package/dist/cli/index.js.map +1 -1
- package/dist/{inbox-P26DDMWC.js → inbox-OWBK6PE2.js} +8 -7
- package/dist/index.d.ts +48 -315
- package/dist/index.js +259 -918
- package/dist/index.js.map +1 -1
- package/dist/migrate-TQ5PB2DI.js +27 -0
- package/dist/{orchestrator-ZPRGVDCB.js → orchestrator-P7AEWVYR.js} +23 -12
- package/dist/{pool-UTXQJJ5C.js → pool-2T6TVS2L.js} +4 -5
- package/dist/{snapshot-K5VHETTK.js → snapshot-F5B2DD56.js} +5 -5
- package/package.json +84 -83
- package/dist/chunk-3MDBU6WY.js.map +0 -1
- package/dist/chunk-CUOSICYJ.js.map +0 -1
- package/dist/chunk-IV2ZWQA3.js +0 -56
- package/dist/chunk-IV2ZWQA3.js.map +0 -1
- package/dist/chunk-K5Y6JP2B.js +0 -399
- package/dist/chunk-K5Y6JP2B.js.map +0 -1
- package/dist/chunk-TRO4E6WG.js.map +0 -1
- package/dist/chunk-WLZSABBH.js.map +0 -1
- package/dist/chunk-WRUTATW4.js.map +0 -1
- package/dist/chunk-XFNCTOW7.js.map +0 -1
- package/dist/chunk-XYYEJK3W.js.map +0 -1
- package/dist/migrate-D4VKAKYT.js +0 -21
- /package/dist/{bindings-225SI7KC.js.map → bindings-U2M3CO2D.js.map} +0 -0
- /package/dist/{chunk-TY6UP74X.js.map → chunk-3DNGY4DS.js.map} +0 -0
- /package/dist/{chunk-KB5SMG3F.js.map → chunk-DC5HMCJC.js.map} +0 -0
- /package/dist/{inbox-P26DDMWC.js.map → inbox-OWBK6PE2.js.map} +0 -0
- /package/dist/{migrate-D4VKAKYT.js.map → migrate-TQ5PB2DI.js.map} +0 -0
- /package/dist/{orchestrator-ZPRGVDCB.js.map → orchestrator-P7AEWVYR.js.map} +0 -0
- /package/dist/{pool-UTXQJJ5C.js.map → pool-2T6TVS2L.js.map} +0 -0
- /package/dist/{snapshot-K5VHETTK.js.map → snapshot-F5B2DD56.js.map} +0 -0
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
inboxDrain,
|
|
7
7
|
inboxFileExists,
|
|
8
8
|
inboxFilePath,
|
|
9
|
-
inboxHealthCheck
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
9
|
+
inboxHealthCheck,
|
|
10
|
+
inboxRemoveIds
|
|
11
|
+
} from "./chunk-DZ7YCFGX.js";
|
|
12
|
+
import "./chunk-AKIJ4LS2.js";
|
|
13
|
+
import "./chunk-IBBAISSW.js";
|
|
14
14
|
export {
|
|
15
15
|
dedupeItems,
|
|
16
16
|
inboxAppend,
|
|
@@ -19,6 +19,7 @@ export {
|
|
|
19
19
|
inboxDrain,
|
|
20
20
|
inboxFileExists,
|
|
21
21
|
inboxFilePath,
|
|
22
|
-
inboxHealthCheck
|
|
22
|
+
inboxHealthCheck,
|
|
23
|
+
inboxRemoveIds
|
|
23
24
|
};
|
|
24
|
-
//# sourceMappingURL=inbox-
|
|
25
|
+
//# sourceMappingURL=inbox-OWBK6PE2.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,289 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
/** The Standard Typed interface. This is a base type extended by other specs. */
|
|
4
|
-
interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
5
|
-
/** The Standard properties. */
|
|
6
|
-
readonly "~standard": StandardTypedV1.Props<Input, Output>;
|
|
7
|
-
}
|
|
8
|
-
declare namespace StandardTypedV1 {
|
|
9
|
-
/** The Standard Typed properties interface. */
|
|
10
|
-
interface Props<Input = unknown, Output = Input> {
|
|
11
|
-
/** The version number of the standard. */
|
|
12
|
-
readonly version: 1;
|
|
13
|
-
/** The vendor name of the schema library. */
|
|
14
|
-
readonly vendor: string;
|
|
15
|
-
/** Inferred types associated with the schema. */
|
|
16
|
-
readonly types?: Types<Input, Output> | undefined;
|
|
17
|
-
}
|
|
18
|
-
/** The Standard Typed types interface. */
|
|
19
|
-
interface Types<Input = unknown, Output = Input> {
|
|
20
|
-
/** The input type of the schema. */
|
|
21
|
-
readonly input: Input;
|
|
22
|
-
/** The output type of the schema. */
|
|
23
|
-
readonly output: Output;
|
|
24
|
-
}
|
|
25
|
-
/** Infers the input type of a Standard Typed. */
|
|
26
|
-
type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
27
|
-
/** Infers the output type of a Standard Typed. */
|
|
28
|
-
type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
29
|
-
}
|
|
30
|
-
/** The Standard Schema interface. */
|
|
31
|
-
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
32
|
-
/** The Standard Schema properties. */
|
|
33
|
-
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
34
|
-
}
|
|
35
|
-
declare namespace StandardSchemaV1 {
|
|
36
|
-
/** The Standard Schema properties interface. */
|
|
37
|
-
interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
|
|
38
|
-
/** Validates unknown input values. */
|
|
39
|
-
readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
|
|
40
|
-
}
|
|
41
|
-
/** The result interface of the validate function. */
|
|
42
|
-
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
43
|
-
/** The result interface if validation succeeds. */
|
|
44
|
-
interface SuccessResult<Output> {
|
|
45
|
-
/** The typed output value. */
|
|
46
|
-
readonly value: Output;
|
|
47
|
-
/** A falsy value for `issues` indicates success. */
|
|
48
|
-
readonly issues?: undefined;
|
|
49
|
-
}
|
|
50
|
-
interface Options {
|
|
51
|
-
/** Explicit support for additional vendor-specific parameters, if needed. */
|
|
52
|
-
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
53
|
-
}
|
|
54
|
-
/** The result interface if validation fails. */
|
|
55
|
-
interface FailureResult {
|
|
56
|
-
/** The issues of failed validation. */
|
|
57
|
-
readonly issues: ReadonlyArray<Issue>;
|
|
58
|
-
}
|
|
59
|
-
/** The issue interface of the failure output. */
|
|
60
|
-
interface Issue {
|
|
61
|
-
/** The error message of the issue. */
|
|
62
|
-
readonly message: string;
|
|
63
|
-
/** The path of the issue, if any. */
|
|
64
|
-
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
65
|
-
}
|
|
66
|
-
/** The path segment interface of the issue. */
|
|
67
|
-
interface PathSegment {
|
|
68
|
-
/** The key representing a path segment. */
|
|
69
|
-
readonly key: PropertyKey;
|
|
70
|
-
}
|
|
71
|
-
/** The Standard types interface. */
|
|
72
|
-
interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {
|
|
73
|
-
}
|
|
74
|
-
/** Infers the input type of a Standard. */
|
|
75
|
-
type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
|
|
76
|
-
/** Infers the output type of a Standard. */
|
|
77
|
-
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
declare const kSchema: unique symbol;
|
|
81
|
-
declare global {
|
|
82
|
-
namespace Schemastery {
|
|
83
|
-
/** Convert primitive constructors, constants, and existing schemas into a schema type. */
|
|
84
|
-
type From<X> = X extends string | number | boolean ? Schema<X> : X extends Schema<any, any, SchemaMode> ? X : X extends typeof String ? Schema<string> : X extends typeof Number ? Schema<number> : X extends typeof Boolean ? Schema<boolean> : X extends typeof Function ? Schema<Function, (...args: any[]) => any> : X extends Constructor<infer S> ? Schema<S> : never;
|
|
85
|
-
type TypeS1<X> = X extends Schema<infer S, infer _T, infer _M> ? S : never;
|
|
86
|
-
type Inverse<X> = X extends Schema<infer _S, infer T, infer M> ? (arg: SchemaOutput<T, M>) => void : never;
|
|
87
|
-
/** Input type accepted by a schema-like value. */
|
|
88
|
-
type TypeS<X> = TypeS1<From<X>>;
|
|
89
|
-
/** Output type returned by a schema-like value after validation. */
|
|
90
|
-
type TypeT<X> = ReturnType<From<X>>;
|
|
91
|
-
/** Resolver callback used by custom schema types registered with `Schema.extend()`. */
|
|
92
|
-
type Resolve = (data: any, schema: Schema, options: Options, strict?: boolean) => [any, any?];
|
|
93
|
-
/** Input type accepted by one schema in an intersection. */
|
|
94
|
-
type IntersectS<X> = From<X> extends Schema<infer S, infer _T, infer _M> ? S : never;
|
|
95
|
-
/** Output type returned by one schema in an intersection. */
|
|
96
|
-
type IntersectT<X> = Inverse<From<X>> extends ((arg: infer T) => void) ? T : never;
|
|
97
|
-
type TupleS<X extends readonly any[]> = X extends readonly [infer L, ...infer R] ? [TypeS<L>?, ...TupleS<R>] : any[];
|
|
98
|
-
type TupleT<X extends readonly any[]> = X extends readonly [infer L, ...infer R] ? [TypeT<L>?, ...TupleT<R>] : any[];
|
|
99
|
-
type ObjectS<X extends Dict> = {
|
|
100
|
-
[K in keyof X]?: TypeS<X[K]> | null;
|
|
101
|
-
} & Dict;
|
|
102
|
-
type ObjectT<X extends Dict> = {
|
|
103
|
-
[K in keyof X]: TypeT<X[K]>;
|
|
104
|
-
} & Dict;
|
|
105
|
-
type Constructor<T = any> = new (...args: any[]) => T;
|
|
106
|
-
/** Static constructor and factory methods exposed by the default `Schema` export. */
|
|
107
|
-
interface Static {
|
|
108
|
-
<T = any>(options: Partial<Schema<T>>): Schema<T>;
|
|
109
|
-
new <T = any>(options: Partial<Schema<T>>): Schema<T>;
|
|
110
|
-
prototype: Schema;
|
|
111
|
-
/** Validate a value against a schema node and return `[output, adaptedInput?]`. */
|
|
112
|
-
resolve: Resolve;
|
|
113
|
-
/** Infer a schema from a primitive value, constructor, or existing schema. */
|
|
114
|
-
from<X = any>(source?: X): From<X>;
|
|
115
|
-
/** Register a resolver for a custom schema `type`. */
|
|
116
|
-
extend(type: string, resolve: Resolve): void;
|
|
117
|
-
/** Accept any value without validation. */
|
|
118
|
-
any<T = any>(): Schema<T>;
|
|
119
|
-
/** Accept only nullable input. */
|
|
120
|
-
never(): Schema<never>;
|
|
121
|
-
/** Accept exactly one constant value. */
|
|
122
|
-
const<const T>(value: T): Schema<T>;
|
|
123
|
-
/** Accept strings, with optional metadata constraints added by instance methods. */
|
|
124
|
-
string(): Schema<string>;
|
|
125
|
-
/** Accept numbers, with optional range and step constraints. */
|
|
126
|
-
number(): Schema<number>;
|
|
127
|
-
/** Accept non-negative integer numbers. */
|
|
128
|
-
natural(): Schema<number>;
|
|
129
|
-
/** Accept a number between 0 and 1 and mark it as a slider. */
|
|
130
|
-
percent(): Schema<number>;
|
|
131
|
-
/** Accept booleans. */
|
|
132
|
-
boolean(): Schema<boolean>;
|
|
133
|
-
/** Accept `Date` instances or parse datetime strings into `Date` objects. */
|
|
134
|
-
date(): Schema<string | Date, Date>;
|
|
135
|
-
/** Accept `RegExp` instances or parse strings into regular expressions. */
|
|
136
|
-
regExp(flag?: string): Schema<string | RegExp, RegExp>;
|
|
137
|
-
/** Accept binary sources and normalize them to `ArrayBufferLike`. */
|
|
138
|
-
arrayBuffer(): Schema<Binary.Source, ArrayBufferLike>;
|
|
139
|
-
arrayBuffer(encoding: 'hex' | 'base64'): Schema<Binary.Source | string, ArrayBufferLike>;
|
|
140
|
-
/** Accept a numeric bitset or string keys and normalize to a number. */
|
|
141
|
-
bitset<K extends string>(bits: Partial<Record<K, number>>): Schema<number | readonly K[], number>;
|
|
142
|
-
/** Accept functions. */
|
|
143
|
-
function(): Schema<Function, (...args: any[]) => any>;
|
|
144
|
-
/** Accept instances of a constructor or objects whose constructor name matches. */
|
|
145
|
-
is(constructor: string): Schema;
|
|
146
|
-
is<T>(constructor: Constructor<T>): Schema<T>;
|
|
147
|
-
/** Accept arrays whose elements match `inner`. */
|
|
148
|
-
array<X>(inner: X): Schema<TypeS<X>[], TypeT<X>[]>;
|
|
149
|
-
/** Accept plain objects with values matching `inner` and optional key schema. */
|
|
150
|
-
dict<X, Y extends Schema<any, string> = Schema<string>>(inner: X, sKey?: Y): Schema<Dict<TypeS<X>, TypeS<Y>>, Dict<TypeT<X>, TypeT<Y>>>;
|
|
151
|
-
/** Accept tuple arrays where each index matches the corresponding schema. */
|
|
152
|
-
tuple<const X extends readonly any[]>(list: X): Schema<TupleS<X>, TupleT<X>>;
|
|
153
|
-
/** Accept plain objects; infer fields from the dictionary, not the enclosing schema's output type. */
|
|
154
|
-
object<X extends Dict>(dict: X): Schema<ObjectS<NoInfer<X>>, ObjectT<NoInfer<X>>>;
|
|
155
|
-
/** Accept values matching at least one schema in `list`. */
|
|
156
|
-
union<const X>(list: readonly X[]): Schema<TypeS<X>, TypeT<X>>;
|
|
157
|
-
/** Accept values matching every schema in `list`, merging object outputs. */
|
|
158
|
-
intersect<const X>(list: readonly X[]): Schema<IntersectS<X>, IntersectT<X>>;
|
|
159
|
-
/** Validate with `inner`, then convert the result with `callback`. */
|
|
160
|
-
transform<X, T>(inner: X, callback: (value: TypeS<X>, options: Schemastery.Options) => T, preserve?: boolean): Schema<TypeS<X>, T>;
|
|
161
|
-
/** Defer construction of a recursive schema until validation or serialization. */
|
|
162
|
-
lazy<X extends Schema<any, any, SchemaMode>>(callback: () => X): X;
|
|
163
|
-
ValidationError: typeof ValidationError;
|
|
164
|
-
}
|
|
165
|
-
/** Runtime validation options shared by all schema calls. */
|
|
166
|
-
interface Options {
|
|
167
|
-
/** Remove invalid object properties instead of throwing when possible. */
|
|
168
|
-
autofix?: boolean;
|
|
169
|
-
/** Skip validation for selected values and schema nodes. */
|
|
170
|
-
ignore?(data: any, schema: Schema): boolean;
|
|
171
|
-
/** Path used to format nested validation errors. */
|
|
172
|
-
path?: (keyof any)[];
|
|
173
|
-
}
|
|
174
|
-
/** UI and validation metadata attached by schema builder methods. */
|
|
175
|
-
interface Meta<T = any> {
|
|
176
|
-
default?: T extends {} ? Partial<T> : T;
|
|
177
|
-
required?: boolean;
|
|
178
|
-
/** Parse this node as a stable config reference; its type and UI metadata remain unchanged. */
|
|
179
|
-
volatile?: boolean;
|
|
180
|
-
disabled?: boolean;
|
|
181
|
-
collapse?: boolean;
|
|
182
|
-
badges?: {
|
|
183
|
-
text: string;
|
|
184
|
-
type: string;
|
|
185
|
-
}[];
|
|
186
|
-
hidden?: boolean;
|
|
187
|
-
loose?: boolean;
|
|
188
|
-
role?: string;
|
|
189
|
-
extra?: any;
|
|
190
|
-
link?: string;
|
|
191
|
-
description?: string | Dict<string>;
|
|
192
|
-
comment?: string;
|
|
193
|
-
pattern?: {
|
|
194
|
-
source: string;
|
|
195
|
-
flags?: string;
|
|
196
|
-
};
|
|
197
|
-
max?: number;
|
|
198
|
-
min?: number;
|
|
199
|
-
step?: number;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
/** Callable schema instance that validates input and returns normalized output. */
|
|
203
|
-
interface Schemastery<S = any, T = S, Mode extends SchemaMode = 'plain'> {
|
|
204
|
-
(data?: S | null, options?: Schemastery.Options): SchemaOutput<T, Mode>;
|
|
205
|
-
new (data?: S | null, options?: Schemastery.Options): SchemaOutput<T, Mode>;
|
|
206
|
-
[kSchema]: true;
|
|
207
|
-
uid: number;
|
|
208
|
-
meta: Schemastery.Meta<T>;
|
|
209
|
-
type: string;
|
|
210
|
-
sKey?: Schema;
|
|
211
|
-
inner?: Schema;
|
|
212
|
-
list?: Schema[];
|
|
213
|
-
dict?: Dict<Schema>;
|
|
214
|
-
bits?: Dict<number>;
|
|
215
|
-
callback?: Function;
|
|
216
|
-
constructor?: string | Function;
|
|
217
|
-
builder?: Function;
|
|
218
|
-
value?: T;
|
|
219
|
-
refs?: Dict<Schema>;
|
|
220
|
-
preserve?: boolean;
|
|
221
|
-
'~standard': StandardSchemaV1.Props;
|
|
222
|
-
/** Format this schema as a compact TypeScript-like type string. */
|
|
223
|
-
toString(inline?: boolean): string;
|
|
224
|
-
/** Serialize this schema, preserving shared and recursive references. */
|
|
225
|
-
toJSON(): Schema<S, T, Mode>;
|
|
226
|
-
/** Mark nullable input as invalid unless a default supplies a fallback. */
|
|
227
|
-
required<R extends boolean = true>(value?: R): Schema<S, T, SetRequired<Mode, R>>;
|
|
228
|
-
/**
|
|
229
|
-
* Parse this config field as a stable reference containing immutable data.
|
|
230
|
-
* @returns a schema whose output supports get(), including when the field is absent.
|
|
231
|
-
*/
|
|
232
|
-
volatile(): Schema<NoInfer<S>, NoInfer<T>, Mode extends 'defined' | 'volatile-defined' ? 'volatile-defined' : 'volatile'>;
|
|
233
|
-
/** Hide this schema node from UI renderers. */
|
|
234
|
-
hidden(value?: boolean): Schema<S, T, Mode>;
|
|
235
|
-
/** Return the default value instead of throwing when validation fails. */
|
|
236
|
-
loose(value?: boolean): Schema<S, T, Mode>;
|
|
237
|
-
/** Attach a renderer role and optional role-specific metadata. */
|
|
238
|
-
role(text: string, extra?: any): Schema<S, T, Mode>;
|
|
239
|
-
/** Attach an external documentation link. */
|
|
240
|
-
link(link: string): Schema<S, T, Mode>;
|
|
241
|
-
/** Set the fallback value used for nullable input. */
|
|
242
|
-
default(value: T | NoInfer<Partial<S>>): Schema<S, T, SetRequired<Mode, true>>;
|
|
243
|
-
/** Attach an auxiliary comment for documentation or form UIs. */
|
|
244
|
-
comment(text: string): Schema<S, T, Mode>;
|
|
245
|
-
/** Attach a localized or plain description for documentation or form UIs. */
|
|
246
|
-
description(text: string): Schema<S, T, Mode>;
|
|
247
|
-
/** Mark this schema node as disabled for form UIs. */
|
|
248
|
-
disabled(value?: boolean): Schema<S, T, Mode>;
|
|
249
|
-
/** Request collapsed rendering for nested form UIs. */
|
|
250
|
-
collapse(value?: boolean): Schema<S, T, Mode>;
|
|
251
|
-
/** Add a deprecated badge to this schema node. */
|
|
252
|
-
deprecated(): Schema<S, T, Mode>;
|
|
253
|
-
/** Add an experimental badge to this schema node. */
|
|
254
|
-
experimental(): Schema<S, T, Mode>;
|
|
255
|
-
/** Require strings to match a regular expression. */
|
|
256
|
-
pattern(regexp: RegExp): Schema<S, T, Mode>;
|
|
257
|
-
/** Set an inclusive maximum for numbers or collection lengths. */
|
|
258
|
-
max(value: number): Schema<S, T, Mode>;
|
|
259
|
-
/** Set an inclusive minimum for numbers or collection lengths. */
|
|
260
|
-
min(value: number): Schema<S, T, Mode>;
|
|
261
|
-
/** Set the numeric increment constraint. */
|
|
262
|
-
step(value: number): Schema<S, T, Mode>;
|
|
263
|
-
/** Add or replace an object property schema. */
|
|
264
|
-
set(key: string, value: Schema): Schema<S, T, Mode>;
|
|
265
|
-
/** Append a tuple, union, or intersection member schema. */
|
|
266
|
-
push(value: Schema): Schema<S, T, Mode>;
|
|
267
|
-
/** Remove values equal to schema defaults from normalized output. */
|
|
268
|
-
simplify(value?: any): any;
|
|
269
|
-
/** Return a schema clone with descriptions merged from locale messages. */
|
|
270
|
-
i18n(messages: Dict): Schema<S, T, Mode>;
|
|
271
|
-
/** Attach arbitrary metadata consumed by form renderers and downstream tools. */
|
|
272
|
-
extra<K extends keyof Schemastery.Meta>(key: K, value: Schemastery.Meta[K]): Schema<S, T, Mode>;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
declare class ValidationError extends TypeError {
|
|
276
|
-
options: Schemastery.Options;
|
|
277
|
-
name: string;
|
|
278
|
-
constructor(message: string, options: Schemastery.Options);
|
|
279
|
-
static is(error: any): error is ValidationError;
|
|
280
|
-
}
|
|
281
|
-
type SchemaMode = 'plain' | 'defined' | 'volatile' | 'volatile-defined';
|
|
282
|
-
type SchemaOutput<T, M extends SchemaMode> = M extends 'volatile' ? Volatile<T | undefined> : M extends 'volatile-defined' ? Volatile<T> : T;
|
|
283
|
-
type SetRequired<M extends SchemaMode, R extends boolean> = M extends 'volatile' | 'volatile-defined' ? R extends true ? 'volatile-defined' : 'volatile' : R extends true ? 'defined' : 'plain';
|
|
284
|
-
type Schema<S = any, T = S, Mode extends SchemaMode = 'plain'> = Schemastery<S, T, Mode>;
|
|
285
|
-
declare const Schema: Schemastery.Static;
|
|
286
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import z from '@deepseek-ai/schemastery';
|
|
287
2
|
|
|
288
3
|
interface QuietHours {
|
|
289
4
|
start: string;
|
|
@@ -453,76 +168,92 @@ declare const name = "heartbeat";
|
|
|
453
168
|
* service access, so the name must be declared here.
|
|
454
169
|
*/
|
|
455
170
|
declare const inject: string[];
|
|
456
|
-
declare const Config:
|
|
171
|
+
declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
457
172
|
/** Override the runtime data dir (workspace guard boundary). Empty = default (<packageRoot>/data). */
|
|
458
|
-
dataDir:
|
|
173
|
+
dataDir: z<string, string, "defined">;
|
|
459
174
|
/** UI-editable: heartbeat interval in minutes. 0 = use policy file / factory. */
|
|
460
|
-
intervalMin:
|
|
175
|
+
intervalMin: z<number, number, "defined">;
|
|
461
176
|
/** UI-editable: daily expression cap. 0 = use policy file / factory. */
|
|
462
|
-
maxDailySend:
|
|
177
|
+
maxDailySend: z<number, number, "defined">;
|
|
463
178
|
/**
|
|
464
179
|
* Agent preset the heartbeat agent joins (`<dshHome>/.agent-presets/<id>/`).
|
|
465
180
|
* Without a preset the agent is a BARE agent: tools/prompt sections resolve
|
|
466
181
|
* against the empty global layer, so it cannot even see `web_search`.
|
|
467
182
|
*/
|
|
468
|
-
agentPreset:
|
|
183
|
+
agentPreset: z<string, string, "defined">;
|
|
469
184
|
/**
|
|
470
185
|
* Install the bundled preset (see `agentPreset`) into the roster's user root
|
|
471
186
|
* on first run, so setup needs no manual file copy. An existing preset is
|
|
472
187
|
* never overwritten; set false to manage the preset entirely by hand.
|
|
473
188
|
*/
|
|
474
|
-
installPreset:
|
|
475
|
-
/** Self-built time injection interval (D20, §17.6). 0 disables injection.
|
|
476
|
-
|
|
189
|
+
installPreset: z<boolean, boolean, "defined">;
|
|
190
|
+
/** Self-built time injection interval (D20, §17.6). 0 disables injection.
|
|
191
|
+
* Left OPTIONAL on purpose (2026-10-17): a schema default here is
|
|
192
|
+
* indistinguishable from an explicit choice, and `applySettingsOverrides`
|
|
193
|
+
* applies this value over ui.json — so a default would silently undo the
|
|
194
|
+
* card on every reload. Unset falls back at the refs below. */
|
|
195
|
+
timeInjectMin: z<number, number, "plain">;
|
|
477
196
|
/** IANA timezone for the injected clock; empty = process zone. */
|
|
478
|
-
timeZone:
|
|
197
|
+
timeZone: z<string, string, "defined">;
|
|
479
198
|
/** Statusbar master switch (D19). Off = no section/pre-step status; time injection unaffected. */
|
|
480
|
-
statusbar:
|
|
199
|
+
statusbar: z<boolean, boolean, "plain">;
|
|
481
200
|
/** v1.6.3 闲着模式:素材池为空时用画像话题兜底主动搭话(默认关)。 */
|
|
482
|
-
idleMode:
|
|
201
|
+
idleMode: z<boolean, boolean, "plain">;
|
|
483
202
|
/** v1.7.0 节省 token 模式:用户离开(闲置 ≥30 分钟)或锁屏时整跳暂停(默认关)。 */
|
|
484
|
-
tokenSaver:
|
|
203
|
+
tokenSaver: z<boolean, boolean, "plain">;
|
|
485
204
|
/** v1.8.0 账本工具:向所有日常会话 agent 注册共享账本工具(默认开)。 */
|
|
486
|
-
ledgerTool:
|
|
205
|
+
ledgerTool: z<boolean, boolean, "defined">;
|
|
487
206
|
/** v1.9.0 素材报账工具:投递后由陪伴 agent 主动报账(默认开)。 */
|
|
488
|
-
seedReportTool:
|
|
207
|
+
seedReportTool: z<boolean, boolean, "defined">;
|
|
208
|
+
/** v2.0.0 心事匣工具:留给下一跳的一句便签(默认开)。 */
|
|
209
|
+
notepadTool: z<boolean, boolean, "defined">;
|
|
210
|
+
/** v2.0.0 摘抄本工具:留句子和小事的地方(默认开)。 */
|
|
211
|
+
excerptTool: z<boolean, boolean, "defined">;
|
|
489
212
|
/** v1.8.0 引擎室追加工具:逗号分隔的全局工具名,存在才加入白名单(bili 压缩工具自动探测,无需手填)。 */
|
|
490
|
-
extraTools:
|
|
213
|
+
extraTools: z<string, string, "defined">;
|
|
491
214
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
492
215
|
/** Override the runtime data dir (workspace guard boundary). Empty = default (<packageRoot>/data). */
|
|
493
|
-
dataDir:
|
|
216
|
+
dataDir: z<string, string, "defined">;
|
|
494
217
|
/** UI-editable: heartbeat interval in minutes. 0 = use policy file / factory. */
|
|
495
|
-
intervalMin:
|
|
218
|
+
intervalMin: z<number, number, "defined">;
|
|
496
219
|
/** UI-editable: daily expression cap. 0 = use policy file / factory. */
|
|
497
|
-
maxDailySend:
|
|
220
|
+
maxDailySend: z<number, number, "defined">;
|
|
498
221
|
/**
|
|
499
222
|
* Agent preset the heartbeat agent joins (`<dshHome>/.agent-presets/<id>/`).
|
|
500
223
|
* Without a preset the agent is a BARE agent: tools/prompt sections resolve
|
|
501
224
|
* against the empty global layer, so it cannot even see `web_search`.
|
|
502
225
|
*/
|
|
503
|
-
agentPreset:
|
|
226
|
+
agentPreset: z<string, string, "defined">;
|
|
504
227
|
/**
|
|
505
228
|
* Install the bundled preset (see `agentPreset`) into the roster's user root
|
|
506
229
|
* on first run, so setup needs no manual file copy. An existing preset is
|
|
507
230
|
* never overwritten; set false to manage the preset entirely by hand.
|
|
508
231
|
*/
|
|
509
|
-
installPreset:
|
|
510
|
-
/** Self-built time injection interval (D20, §17.6). 0 disables injection.
|
|
511
|
-
|
|
232
|
+
installPreset: z<boolean, boolean, "defined">;
|
|
233
|
+
/** Self-built time injection interval (D20, §17.6). 0 disables injection.
|
|
234
|
+
* Left OPTIONAL on purpose (2026-10-17): a schema default here is
|
|
235
|
+
* indistinguishable from an explicit choice, and `applySettingsOverrides`
|
|
236
|
+
* applies this value over ui.json — so a default would silently undo the
|
|
237
|
+
* card on every reload. Unset falls back at the refs below. */
|
|
238
|
+
timeInjectMin: z<number, number, "plain">;
|
|
512
239
|
/** IANA timezone for the injected clock; empty = process zone. */
|
|
513
|
-
timeZone:
|
|
240
|
+
timeZone: z<string, string, "defined">;
|
|
514
241
|
/** Statusbar master switch (D19). Off = no section/pre-step status; time injection unaffected. */
|
|
515
|
-
statusbar:
|
|
242
|
+
statusbar: z<boolean, boolean, "plain">;
|
|
516
243
|
/** v1.6.3 闲着模式:素材池为空时用画像话题兜底主动搭话(默认关)。 */
|
|
517
|
-
idleMode:
|
|
244
|
+
idleMode: z<boolean, boolean, "plain">;
|
|
518
245
|
/** v1.7.0 节省 token 模式:用户离开(闲置 ≥30 分钟)或锁屏时整跳暂停(默认关)。 */
|
|
519
|
-
tokenSaver:
|
|
246
|
+
tokenSaver: z<boolean, boolean, "plain">;
|
|
520
247
|
/** v1.8.0 账本工具:向所有日常会话 agent 注册共享账本工具(默认开)。 */
|
|
521
|
-
ledgerTool:
|
|
248
|
+
ledgerTool: z<boolean, boolean, "defined">;
|
|
522
249
|
/** v1.9.0 素材报账工具:投递后由陪伴 agent 主动报账(默认开)。 */
|
|
523
|
-
seedReportTool:
|
|
250
|
+
seedReportTool: z<boolean, boolean, "defined">;
|
|
251
|
+
/** v2.0.0 心事匣工具:留给下一跳的一句便签(默认开)。 */
|
|
252
|
+
notepadTool: z<boolean, boolean, "defined">;
|
|
253
|
+
/** v2.0.0 摘抄本工具:留句子和小事的地方(默认开)。 */
|
|
254
|
+
excerptTool: z<boolean, boolean, "defined">;
|
|
524
255
|
/** v1.8.0 引擎室追加工具:逗号分隔的全局工具名,存在才加入白名单(bili 压缩工具自动探测,无需手填)。 */
|
|
525
|
-
extraTools:
|
|
256
|
+
extraTools: z<string, string, "defined">;
|
|
526
257
|
}>>, "plain">;
|
|
527
258
|
interface HeartbeatConfig {
|
|
528
259
|
dataDir?: string | null;
|
|
@@ -537,6 +268,8 @@ interface HeartbeatConfig {
|
|
|
537
268
|
tokenSaver?: boolean;
|
|
538
269
|
ledgerTool?: boolean;
|
|
539
270
|
seedReportTool?: boolean;
|
|
271
|
+
notepadTool?: boolean;
|
|
272
|
+
excerptTool?: boolean;
|
|
540
273
|
extraTools?: string;
|
|
541
274
|
}
|
|
542
275
|
declare function apply(ctx: OrchestratorDeps['ctx'] & {
|