@wirecat/cli-core 0.422.0 → 0.424.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 +29 -0
- package/dist/analysis/settings.d.ts +0 -6
- package/dist/analysis/settings.js +2 -5
- package/dist/cli/analysis-choice.d.ts +0 -1
- package/dist/cli/analysis-choice.js +9 -22
- package/dist/cli/bot/context.js +1 -1
- package/dist/cli/config-command.js +33 -25
- package/dist/cli/config-issues.d.ts +52 -0
- package/dist/cli/config-issues.js +187 -0
- package/dist/cli/config-keys.js +4 -28
- package/dist/cli/context.d.ts +1 -1
- package/dist/cli/context.js +3 -1
- package/dist/cli/embedding-choice.d.ts +1 -2
- package/dist/cli/embedding-choice.js +2 -4
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/messenger/context.js +1 -1
- package/dist/cli/messenger/conversations-command.js +5 -9
- package/dist/cli/messenger/doctor-command.js +38 -4
- package/dist/cli/messenger/inbox.js +2 -6
- package/dist/cli/messenger/private-people-command.js +1 -2
- package/dist/cli/messenger/review.js +2 -5
- package/dist/cli/permission-keys.d.ts +9 -2
- package/dist/cli/permission-keys.js +21 -6
- package/dist/cli/preview.d.ts +3 -2
- package/dist/cli/preview.js +4 -3
- package/dist/cli/program.d.ts +1 -1
- package/dist/cli/program.js +14 -9
- package/dist/cli/runs/search.d.ts +1 -1
- package/dist/cli/settings.d.ts +34 -117
- package/dist/cli/settings.js +130 -118
- package/dist/cli/shared-command-exports.d.ts +4 -232
- package/dist/entities/index.d.ts +3 -3
- package/dist/entities/recorded-run.d.ts +3 -3
- package/dist/entities/recorded-run.js +1 -1
- package/dist/mcp/tool.js +3 -1
- package/dist/meetings/mcp/index.d.ts +15 -15
- package/dist/models/settings.d.ts +1 -7
- package/dist/models/settings.js +1 -18
- package/dist/runs/recording.d.ts +2 -1
- package/dist/runs/recording.js +2 -2
- package/dist/runs/run.d.ts +3 -2
- package/dist/runs/run.js +1 -1
- package/dist/search/account-list.js +8 -7
- package/package.json +1 -1
package/dist/entities/index.d.ts
CHANGED
|
@@ -6990,7 +6990,7 @@ export declare const ENTITIES: {
|
|
|
6990
6990
|
readonly run: v.StrictObjectSchema<{
|
|
6991
6991
|
readonly run_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6992
6992
|
readonly command: v.StringSchema<undefined>;
|
|
6993
|
-
readonly profile: v.StringSchema<undefined>;
|
|
6993
|
+
readonly profile: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
6994
6994
|
readonly started_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
6995
6995
|
readonly completed_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
|
|
6996
6996
|
readonly status: v.PicklistSchema<["success", "failed", "partial", "running"], undefined>;
|
|
@@ -7024,7 +7024,7 @@ export declare const ENTITIES: {
|
|
|
7024
7024
|
readonly "run.details": v.StrictObjectSchema<{
|
|
7025
7025
|
readonly run_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
7026
7026
|
readonly command: v.StringSchema<undefined>;
|
|
7027
|
-
readonly profile: v.StringSchema<undefined>;
|
|
7027
|
+
readonly profile: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
7028
7028
|
readonly started_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
7029
7029
|
readonly completed_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
|
|
7030
7030
|
readonly status: v.PicklistSchema<["success", "failed", "partial", "running"], undefined>;
|
|
@@ -7057,7 +7057,7 @@ export declare const ENTITIES: {
|
|
|
7057
7057
|
readonly "run.hit": v.StrictObjectSchema<{
|
|
7058
7058
|
readonly run_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
7059
7059
|
readonly command: v.StringSchema<undefined>;
|
|
7060
|
-
readonly profile: v.StringSchema<undefined>;
|
|
7060
|
+
readonly profile: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
7061
7061
|
readonly started_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
7062
7062
|
readonly completed_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
|
|
7063
7063
|
readonly status: v.PicklistSchema<["success", "failed", "partial", "running"], undefined>;
|
|
@@ -2,7 +2,7 @@ import * as v from "valibot";
|
|
|
2
2
|
export declare const recordedRun: v.StrictObjectSchema<{
|
|
3
3
|
readonly run_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
4
4
|
readonly command: v.StringSchema<undefined>;
|
|
5
|
-
readonly profile: v.StringSchema<undefined>;
|
|
5
|
+
readonly profile: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
6
6
|
readonly started_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
7
7
|
readonly completed_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
|
|
8
8
|
readonly status: v.PicklistSchema<["success", "failed", "partial", "running"], undefined>;
|
|
@@ -36,7 +36,7 @@ export declare const recordedRun: v.StrictObjectSchema<{
|
|
|
36
36
|
export declare const runDetails: v.StrictObjectSchema<{
|
|
37
37
|
readonly run_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
38
38
|
readonly command: v.StringSchema<undefined>;
|
|
39
|
-
readonly profile: v.StringSchema<undefined>;
|
|
39
|
+
readonly profile: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
40
40
|
readonly started_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
41
41
|
readonly completed_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
|
|
42
42
|
readonly status: v.PicklistSchema<["success", "failed", "partial", "running"], undefined>;
|
|
@@ -69,7 +69,7 @@ export declare const runDetails: v.StrictObjectSchema<{
|
|
|
69
69
|
export declare const runHit: v.StrictObjectSchema<{
|
|
70
70
|
readonly run_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
71
71
|
readonly command: v.StringSchema<undefined>;
|
|
72
|
-
readonly profile: v.StringSchema<undefined>;
|
|
72
|
+
readonly profile: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
73
73
|
readonly started_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
74
74
|
readonly completed_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
|
|
75
75
|
readonly status: v.PicklistSchema<["success", "failed", "partial", "running"], undefined>;
|
|
@@ -4,7 +4,7 @@ const events = v.array(v.record(v.string(), v.unknown()));
|
|
|
4
4
|
export const recordedRun = v.strictObject({
|
|
5
5
|
run_id: id,
|
|
6
6
|
command: text,
|
|
7
|
-
profile: text,
|
|
7
|
+
profile: v.optional(text),
|
|
8
8
|
started_at: time,
|
|
9
9
|
completed_at: v.optional(time),
|
|
10
10
|
status: v.picklist(["success", "failed", "partial", "running"]),
|
package/dist/mcp/tool.js
CHANGED
|
@@ -107,7 +107,9 @@ export const entryRunner = (registration) => {
|
|
|
107
107
|
? startRecording({
|
|
108
108
|
app,
|
|
109
109
|
command,
|
|
110
|
-
|
|
110
|
+
...(registration.defaults.settings.profile === undefined
|
|
111
|
+
? {}
|
|
112
|
+
: { profile: registration.defaults.settings.profile }),
|
|
111
113
|
env: registration.defaults.env,
|
|
112
114
|
record: false,
|
|
113
115
|
keepFailed: true,
|
|
@@ -38,7 +38,6 @@ export declare const meetingTools: ({
|
|
|
38
38
|
max_read_bytes?: undefined;
|
|
39
39
|
cursor?: undefined;
|
|
40
40
|
} | {
|
|
41
|
-
limit?: undefined;
|
|
42
41
|
event_id?: undefined;
|
|
43
42
|
series_id?: undefined;
|
|
44
43
|
page?: undefined;
|
|
@@ -54,11 +53,11 @@ export declare const meetingTools: ({
|
|
|
54
53
|
format?: undefined;
|
|
55
54
|
transcript_id?: undefined;
|
|
56
55
|
query?: undefined;
|
|
56
|
+
limit?: undefined;
|
|
57
57
|
scan_limit?: undefined;
|
|
58
58
|
max_read_bytes?: undefined;
|
|
59
59
|
cursor?: undefined;
|
|
60
60
|
} | {
|
|
61
|
-
limit?: undefined;
|
|
62
61
|
event_id?: undefined;
|
|
63
62
|
series_id?: undefined;
|
|
64
63
|
page?: undefined;
|
|
@@ -76,11 +75,11 @@ export declare const meetingTools: ({
|
|
|
76
75
|
format?: undefined;
|
|
77
76
|
transcript_id?: undefined;
|
|
78
77
|
query?: undefined;
|
|
78
|
+
limit?: undefined;
|
|
79
79
|
scan_limit?: undefined;
|
|
80
80
|
max_read_bytes?: undefined;
|
|
81
81
|
cursor?: undefined;
|
|
82
82
|
} | {
|
|
83
|
-
limit?: undefined;
|
|
84
83
|
event_id?: undefined;
|
|
85
84
|
series_id?: undefined;
|
|
86
85
|
page?: undefined;
|
|
@@ -102,6 +101,7 @@ export declare const meetingTools: ({
|
|
|
102
101
|
minimum: number;
|
|
103
102
|
};
|
|
104
103
|
query?: undefined;
|
|
104
|
+
limit?: undefined;
|
|
105
105
|
scan_limit?: undefined;
|
|
106
106
|
max_read_bytes?: undefined;
|
|
107
107
|
cursor?: undefined;
|
|
@@ -188,7 +188,6 @@ export declare const meetingTools: ({
|
|
|
188
188
|
max_read_bytes?: undefined;
|
|
189
189
|
cursor?: undefined;
|
|
190
190
|
} | {
|
|
191
|
-
limit?: undefined;
|
|
192
191
|
event_id?: undefined;
|
|
193
192
|
series_id?: undefined;
|
|
194
193
|
page?: undefined;
|
|
@@ -204,11 +203,11 @@ export declare const meetingTools: ({
|
|
|
204
203
|
format?: undefined;
|
|
205
204
|
transcript_id?: undefined;
|
|
206
205
|
query?: undefined;
|
|
206
|
+
limit?: undefined;
|
|
207
207
|
scan_limit?: undefined;
|
|
208
208
|
max_read_bytes?: undefined;
|
|
209
209
|
cursor?: undefined;
|
|
210
210
|
} | {
|
|
211
|
-
limit?: undefined;
|
|
212
211
|
event_id?: undefined;
|
|
213
212
|
series_id?: undefined;
|
|
214
213
|
page?: undefined;
|
|
@@ -226,11 +225,11 @@ export declare const meetingTools: ({
|
|
|
226
225
|
format?: undefined;
|
|
227
226
|
transcript_id?: undefined;
|
|
228
227
|
query?: undefined;
|
|
228
|
+
limit?: undefined;
|
|
229
229
|
scan_limit?: undefined;
|
|
230
230
|
max_read_bytes?: undefined;
|
|
231
231
|
cursor?: undefined;
|
|
232
232
|
} | {
|
|
233
|
-
limit?: undefined;
|
|
234
233
|
event_id?: undefined;
|
|
235
234
|
series_id?: undefined;
|
|
236
235
|
page?: undefined;
|
|
@@ -252,6 +251,7 @@ export declare const meetingTools: ({
|
|
|
252
251
|
minimum: number;
|
|
253
252
|
};
|
|
254
253
|
query?: undefined;
|
|
254
|
+
limit?: undefined;
|
|
255
255
|
scan_limit?: undefined;
|
|
256
256
|
max_read_bytes?: undefined;
|
|
257
257
|
cursor?: undefined;
|
|
@@ -338,7 +338,6 @@ export declare const meetingTools: ({
|
|
|
338
338
|
max_read_bytes?: undefined;
|
|
339
339
|
cursor?: undefined;
|
|
340
340
|
} | {
|
|
341
|
-
limit?: undefined;
|
|
342
341
|
event_id?: undefined;
|
|
343
342
|
series_id?: undefined;
|
|
344
343
|
page?: undefined;
|
|
@@ -354,11 +353,11 @@ export declare const meetingTools: ({
|
|
|
354
353
|
format?: undefined;
|
|
355
354
|
transcript_id?: undefined;
|
|
356
355
|
query?: undefined;
|
|
356
|
+
limit?: undefined;
|
|
357
357
|
scan_limit?: undefined;
|
|
358
358
|
max_read_bytes?: undefined;
|
|
359
359
|
cursor?: undefined;
|
|
360
360
|
} | {
|
|
361
|
-
limit?: undefined;
|
|
362
361
|
event_id?: undefined;
|
|
363
362
|
series_id?: undefined;
|
|
364
363
|
page?: undefined;
|
|
@@ -376,11 +375,11 @@ export declare const meetingTools: ({
|
|
|
376
375
|
format?: undefined;
|
|
377
376
|
transcript_id?: undefined;
|
|
378
377
|
query?: undefined;
|
|
378
|
+
limit?: undefined;
|
|
379
379
|
scan_limit?: undefined;
|
|
380
380
|
max_read_bytes?: undefined;
|
|
381
381
|
cursor?: undefined;
|
|
382
382
|
} | {
|
|
383
|
-
limit?: undefined;
|
|
384
383
|
event_id?: undefined;
|
|
385
384
|
series_id?: undefined;
|
|
386
385
|
page?: undefined;
|
|
@@ -402,6 +401,7 @@ export declare const meetingTools: ({
|
|
|
402
401
|
minimum: number;
|
|
403
402
|
};
|
|
404
403
|
query?: undefined;
|
|
404
|
+
limit?: undefined;
|
|
405
405
|
scan_limit?: undefined;
|
|
406
406
|
max_read_bytes?: undefined;
|
|
407
407
|
cursor?: undefined;
|
|
@@ -488,7 +488,6 @@ export declare const meetingTools: ({
|
|
|
488
488
|
max_read_bytes?: undefined;
|
|
489
489
|
cursor?: undefined;
|
|
490
490
|
} | {
|
|
491
|
-
limit?: undefined;
|
|
492
491
|
event_id?: undefined;
|
|
493
492
|
series_id?: undefined;
|
|
494
493
|
page?: undefined;
|
|
@@ -504,11 +503,11 @@ export declare const meetingTools: ({
|
|
|
504
503
|
format?: undefined;
|
|
505
504
|
transcript_id?: undefined;
|
|
506
505
|
query?: undefined;
|
|
506
|
+
limit?: undefined;
|
|
507
507
|
scan_limit?: undefined;
|
|
508
508
|
max_read_bytes?: undefined;
|
|
509
509
|
cursor?: undefined;
|
|
510
510
|
} | {
|
|
511
|
-
limit?: undefined;
|
|
512
511
|
event_id?: undefined;
|
|
513
512
|
series_id?: undefined;
|
|
514
513
|
page?: undefined;
|
|
@@ -526,11 +525,11 @@ export declare const meetingTools: ({
|
|
|
526
525
|
format?: undefined;
|
|
527
526
|
transcript_id?: undefined;
|
|
528
527
|
query?: undefined;
|
|
528
|
+
limit?: undefined;
|
|
529
529
|
scan_limit?: undefined;
|
|
530
530
|
max_read_bytes?: undefined;
|
|
531
531
|
cursor?: undefined;
|
|
532
532
|
} | {
|
|
533
|
-
limit?: undefined;
|
|
534
533
|
event_id?: undefined;
|
|
535
534
|
series_id?: undefined;
|
|
536
535
|
page?: undefined;
|
|
@@ -552,6 +551,7 @@ export declare const meetingTools: ({
|
|
|
552
551
|
minimum: number;
|
|
553
552
|
};
|
|
554
553
|
query?: undefined;
|
|
554
|
+
limit?: undefined;
|
|
555
555
|
scan_limit?: undefined;
|
|
556
556
|
max_read_bytes?: undefined;
|
|
557
557
|
cursor?: undefined;
|
|
@@ -638,7 +638,6 @@ export declare const meetingTools: ({
|
|
|
638
638
|
max_read_bytes?: undefined;
|
|
639
639
|
cursor?: undefined;
|
|
640
640
|
} | {
|
|
641
|
-
limit?: undefined;
|
|
642
641
|
event_id?: undefined;
|
|
643
642
|
series_id?: undefined;
|
|
644
643
|
page?: undefined;
|
|
@@ -654,11 +653,11 @@ export declare const meetingTools: ({
|
|
|
654
653
|
format?: undefined;
|
|
655
654
|
transcript_id?: undefined;
|
|
656
655
|
query?: undefined;
|
|
656
|
+
limit?: undefined;
|
|
657
657
|
scan_limit?: undefined;
|
|
658
658
|
max_read_bytes?: undefined;
|
|
659
659
|
cursor?: undefined;
|
|
660
660
|
} | {
|
|
661
|
-
limit?: undefined;
|
|
662
661
|
event_id?: undefined;
|
|
663
662
|
series_id?: undefined;
|
|
664
663
|
page?: undefined;
|
|
@@ -676,11 +675,11 @@ export declare const meetingTools: ({
|
|
|
676
675
|
format?: undefined;
|
|
677
676
|
transcript_id?: undefined;
|
|
678
677
|
query?: undefined;
|
|
678
|
+
limit?: undefined;
|
|
679
679
|
scan_limit?: undefined;
|
|
680
680
|
max_read_bytes?: undefined;
|
|
681
681
|
cursor?: undefined;
|
|
682
682
|
} | {
|
|
683
|
-
limit?: undefined;
|
|
684
683
|
event_id?: undefined;
|
|
685
684
|
series_id?: undefined;
|
|
686
685
|
page?: undefined;
|
|
@@ -702,6 +701,7 @@ export declare const meetingTools: ({
|
|
|
702
701
|
minimum: number;
|
|
703
702
|
};
|
|
704
703
|
query?: undefined;
|
|
704
|
+
limit?: undefined;
|
|
705
705
|
scan_limit?: undefined;
|
|
706
706
|
max_read_bytes?: undefined;
|
|
707
707
|
cursor?: undefined;
|
|
@@ -7,16 +7,10 @@ export declare const modelSettingsShape: v.RecordSchema<v.SchemaWithPipe<readonl
|
|
|
7
7
|
readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
|
|
8
8
|
}, undefined>, undefined>;
|
|
9
9
|
export type ModelSettings = v.InferOutput<typeof modelSettingsShape>;
|
|
10
|
-
export declare const resolveModelSettings: (prefix: string, layers: readonly (readonly [string, Readonly<Record<string, unknown>> | undefined])[], env: NodeJS.ProcessEnv
|
|
11
|
-
values: Record<string, unknown>;
|
|
12
|
-
sources: Record<string, string>;
|
|
13
|
-
}) => {
|
|
10
|
+
export declare const resolveModelSettings: (prefix: string, layers: readonly (readonly [string, Readonly<Record<string, unknown>> | undefined])[], env: NodeJS.ProcessEnv) => {
|
|
14
11
|
models: ModelSettings;
|
|
15
12
|
sources: Record<string, string>;
|
|
16
13
|
};
|
|
17
14
|
export declare const modelTarget: (settings: {
|
|
18
15
|
models?: ModelSettings;
|
|
19
|
-
analysisProvider?: string;
|
|
20
|
-
analysisModel?: string;
|
|
21
|
-
analysisBaseUrl?: string;
|
|
22
16
|
}, purpose: string) => ModelTarget | undefined;
|
package/dist/models/settings.js
CHANGED
|
@@ -7,7 +7,7 @@ export const modelSettingsShape = v.record(v.pipe(v.string(), v.regex(/^[a-z][a-
|
|
|
7
7
|
model: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200))),
|
|
8
8
|
base_url: v.optional(v.pipe(v.string(), v.check((value) => endpoint(value), "use an HTTP/S endpoint without credentials, query or fragment"))),
|
|
9
9
|
}));
|
|
10
|
-
export const resolveModelSettings = (prefix, layers, env
|
|
10
|
+
export const resolveModelSettings = (prefix, layers, env) => {
|
|
11
11
|
const configured = layers.map(([from, scope]) => [from, (scope?.models ?? {})]);
|
|
12
12
|
const purposes = new Set([
|
|
13
13
|
"default",
|
|
@@ -26,21 +26,12 @@ export const resolveModelSettings = (prefix, layers, env, legacy) => {
|
|
|
26
26
|
const resolved = {};
|
|
27
27
|
for (const field of MODEL_FIELDS) {
|
|
28
28
|
const variable = `${prefix}_MODELS_${purpose.replaceAll("-", "_").toUpperCase()}_${field.toUpperCase()}`;
|
|
29
|
-
const legacyKey = { provider: "analysisProvider", model: "analysisModel", base_url: "analysisBaseUrl" }[field];
|
|
30
29
|
const candidates = [
|
|
31
30
|
[variable, env[variable]?.trim() || undefined],
|
|
32
31
|
...configured.map(([from, model]) => [
|
|
33
32
|
`${from}: models.${purpose}.${field}`,
|
|
34
33
|
model[purpose]?.[field],
|
|
35
34
|
]),
|
|
36
|
-
...(purpose === "analysis" && legacy.sources[legacyKey] !== "default"
|
|
37
|
-
? [
|
|
38
|
-
[
|
|
39
|
-
legacy.sources[legacyKey] ?? "legacy analysis setting",
|
|
40
|
-
legacy.values[legacyKey] === "agent" ? "off" : legacy.values[legacyKey],
|
|
41
|
-
],
|
|
42
|
-
]
|
|
43
|
-
: []),
|
|
44
35
|
...(purpose === "default"
|
|
45
36
|
? []
|
|
46
37
|
: [
|
|
@@ -69,14 +60,6 @@ export const resolveModelSettings = (prefix, layers, env, legacy) => {
|
|
|
69
60
|
};
|
|
70
61
|
export const modelTarget = (settings, purpose) => {
|
|
71
62
|
const configured = { ...settings.models?.default, ...settings.models?.[purpose] };
|
|
72
|
-
if (purpose === "analysis" &&
|
|
73
|
-
configured.provider === undefined &&
|
|
74
|
-
settings.analysisProvider &&
|
|
75
|
-
settings.analysisProvider !== "agent") {
|
|
76
|
-
configured.provider = settings.analysisProvider;
|
|
77
|
-
configured.model ??= settings.analysisModel;
|
|
78
|
-
configured.base_url ??= settings.analysisBaseUrl;
|
|
79
|
-
}
|
|
80
63
|
if (configured.provider === undefined || configured.provider === "off")
|
|
81
64
|
return undefined;
|
|
82
65
|
if (!configured.model)
|
package/dist/runs/recording.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ export interface RecordingOptions {
|
|
|
5
5
|
app: AppIdentity;
|
|
6
6
|
/** As typed, without the arguments: `chats list`. It names the run directory. */
|
|
7
7
|
command: string;
|
|
8
|
-
|
|
8
|
+
/** Unset when nothing named one: a run is never put down to a profile the owner did not choose. */
|
|
9
|
+
profile?: string;
|
|
9
10
|
record: boolean;
|
|
10
11
|
/** Keep the run if it fails, even though `record` is off. */
|
|
11
12
|
keepFailed: boolean;
|
package/dist/runs/recording.js
CHANGED
|
@@ -19,7 +19,7 @@ export const recorded = async (options, body) => {
|
|
|
19
19
|
runId: recording.runId,
|
|
20
20
|
command: options.command,
|
|
21
21
|
startedAt: Date.now(),
|
|
22
|
-
profile: options.profile,
|
|
22
|
+
...(options.profile === undefined ? {} : { profile: options.profile }),
|
|
23
23
|
...(recording.traceId ? { traceId: recording.traceId } : {}),
|
|
24
24
|
};
|
|
25
25
|
if (options.processRun)
|
|
@@ -44,7 +44,7 @@ export const startRecording = (options) => {
|
|
|
44
44
|
runsDir: options.runsDir ?? runsDirFor(options.app, options.env),
|
|
45
45
|
runId,
|
|
46
46
|
command: options.command,
|
|
47
|
-
profile: options.profile,
|
|
47
|
+
...(options.profile === undefined ? {} : { profile: options.profile }),
|
|
48
48
|
service: options.app.command,
|
|
49
49
|
cliVersion: options.app.version,
|
|
50
50
|
...(traceId === undefined ? {} : { traceId }),
|
package/dist/runs/run.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ export interface RunMetadata {
|
|
|
10
10
|
runId: string;
|
|
11
11
|
/** As typed, without the arguments: `chats list`, `messages send`. */
|
|
12
12
|
command: string;
|
|
13
|
-
profile
|
|
13
|
+
/** Left out when the command named no profile. */
|
|
14
|
+
profile?: string;
|
|
14
15
|
startedAt: string;
|
|
15
16
|
completedAt?: string;
|
|
16
17
|
status: RunStatus | "running";
|
|
@@ -47,7 +48,7 @@ export interface RunMetadata {
|
|
|
47
48
|
export interface StartRunOptions {
|
|
48
49
|
runsDir: string;
|
|
49
50
|
command: string;
|
|
50
|
-
profile
|
|
51
|
+
profile?: string;
|
|
51
52
|
/** The log record's `resource.service`: the program's own name, `tg` or `max`. */
|
|
52
53
|
service: string;
|
|
53
54
|
cliVersion: string;
|
package/dist/runs/run.js
CHANGED
|
@@ -66,7 +66,7 @@ export const startRun = (options) => {
|
|
|
66
66
|
const metadata = {
|
|
67
67
|
runId: id,
|
|
68
68
|
command: options.command,
|
|
69
|
-
profile: options.profile,
|
|
69
|
+
...(options.profile === undefined ? {} : { profile: options.profile }),
|
|
70
70
|
startedAt: startedAt.toISOString(),
|
|
71
71
|
status: "running",
|
|
72
72
|
cliVersion: options.cliVersion,
|
|
@@ -34,12 +34,12 @@ const heldOf = (stored, running) => [
|
|
|
34
34
|
{ provider: "notes", account: INTERNAL_NOTES, name: null, kind: "notes" },
|
|
35
35
|
...stored
|
|
36
36
|
.filter(({ provider }) => isFolderProvider(provider))
|
|
37
|
-
.map(({ id, name, provider }) => ({
|
|
37
|
+
.map(({ id, name, provider, account }) => ({
|
|
38
38
|
provider: "notes",
|
|
39
39
|
account: String(id),
|
|
40
40
|
name,
|
|
41
41
|
kind: "notes",
|
|
42
|
-
|
|
42
|
+
stored: { provider, account },
|
|
43
43
|
})),
|
|
44
44
|
...stored
|
|
45
45
|
.filter(({ provider }) => isDocumentAccountProvider(provider))
|
|
@@ -78,8 +78,11 @@ const accountOf = (prefix, ref, held, context) => {
|
|
|
78
78
|
if (stored)
|
|
79
79
|
return stored;
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
const
|
|
81
|
+
const folder = isFolderProvider(provider);
|
|
82
|
+
const ofProvider = folder
|
|
83
|
+
? storedAs(held, { provider, account: "" })
|
|
84
|
+
: held.filter((one) => one.provider === provider);
|
|
85
|
+
const byId = ofProvider.find(({ account, stored }) => account === ref || account === ref.toLowerCase() || (folder && stored?.account === ref.toUpperCase()));
|
|
83
86
|
if (byId)
|
|
84
87
|
return byId;
|
|
85
88
|
const keyed = (key) => ofProvider.find(({ account }) => account === key.account) ?? {
|
|
@@ -132,10 +135,8 @@ const accountsOfWord = (word, held, context) => {
|
|
|
132
135
|
Object.values(recorded).every((key) => isFolderProvider(key.provider) || isDocumentAccountProvider(key.provider)))
|
|
133
136
|
return Object.keys(recorded).map((profile) => accountOf(word, profile, held, context));
|
|
134
137
|
const provider = providerOf(word, held, context);
|
|
135
|
-
if (isDocumentAccountProvider(provider))
|
|
138
|
+
if (isDocumentAccountProvider(provider) || isFolderProvider(provider))
|
|
136
139
|
return storedAs(held, { provider, account: "" });
|
|
137
|
-
if (isFolderProvider(provider))
|
|
138
|
-
return held.filter(({ folder }) => folder === provider);
|
|
139
140
|
return held.filter((one) => one.provider === provider);
|
|
140
141
|
};
|
|
141
142
|
const keyOf = ({ provider, account }) => `${provider}\u0000${account}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.424.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|