@staff0rd/assist 0.493.0 → 0.494.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/README.md +4 -2
- package/allowed.cli-reads +1 -0
- package/dist/allowed.cli-reads +1 -0
- package/dist/commands/sessions/web/bundle.js +331 -331
- package/dist/index.js +402 -270
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.494.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -416,7 +416,7 @@ function resolveRepoWriteLabel(globalRaw, origin) {
|
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
// src/shared/types.ts
|
|
419
|
-
import { z as
|
|
419
|
+
import { z as z3 } from "zod";
|
|
420
420
|
|
|
421
421
|
// src/shared/runConfigSchema.ts
|
|
422
422
|
import { z } from "zod";
|
|
@@ -444,183 +444,194 @@ var runLinkSchema = z.strictObject({
|
|
|
444
444
|
prefix: z.string()
|
|
445
445
|
});
|
|
446
446
|
|
|
447
|
+
// src/shared/secretConfigValue.ts
|
|
448
|
+
import { z as z2 } from "zod";
|
|
449
|
+
var SECRET_META_KEY = "assistSecret";
|
|
450
|
+
function secretConfigValue(schema2) {
|
|
451
|
+
return schema2.meta({ [SECRET_META_KEY]: true });
|
|
452
|
+
}
|
|
453
|
+
function isSecretSchemaNode(node) {
|
|
454
|
+
const meta = z2.globalRegistry.get(node);
|
|
455
|
+
return meta?.[SECRET_META_KEY] === true;
|
|
456
|
+
}
|
|
457
|
+
|
|
447
458
|
// src/shared/types.ts
|
|
448
|
-
var transcriptConfigSchema =
|
|
449
|
-
vttDir:
|
|
450
|
-
transcriptsDir:
|
|
451
|
-
summaryDir:
|
|
459
|
+
var transcriptConfigSchema = z3.strictObject({
|
|
460
|
+
vttDir: z3.string(),
|
|
461
|
+
transcriptsDir: z3.string(),
|
|
462
|
+
summaryDir: z3.string()
|
|
452
463
|
});
|
|
453
464
|
var DEFAULT_WAKE_WORDS = ["computer"];
|
|
454
465
|
var DEFAULT_MODELS_DIR = "~/.assist/voice/models";
|
|
455
466
|
var DEFAULT_BACKUP_DIR = "~/.assist/backups";
|
|
456
467
|
var DEFAULT_CLONE_DIR = "~/git";
|
|
457
468
|
var assistConfigShape = {
|
|
458
|
-
backup:
|
|
459
|
-
dir:
|
|
469
|
+
backup: z3.strictObject({
|
|
470
|
+
dir: z3.string().default(DEFAULT_BACKUP_DIR)
|
|
460
471
|
}).default({ dir: DEFAULT_BACKUP_DIR }),
|
|
461
|
-
clone:
|
|
462
|
-
baseDir:
|
|
472
|
+
clone: z3.strictObject({
|
|
473
|
+
baseDir: z3.string().default(DEFAULT_CLONE_DIR)
|
|
463
474
|
}).default({ baseDir: DEFAULT_CLONE_DIR }),
|
|
464
|
-
commit:
|
|
465
|
-
conventional:
|
|
466
|
-
pull:
|
|
467
|
-
push:
|
|
468
|
-
expectedBranch:
|
|
475
|
+
commit: z3.strictObject({
|
|
476
|
+
conventional: z3.boolean().default(false),
|
|
477
|
+
pull: z3.boolean().default(false),
|
|
478
|
+
push: z3.boolean().default(false),
|
|
479
|
+
expectedBranch: z3.string().optional()
|
|
469
480
|
}).default({ conventional: false, pull: false, push: false }),
|
|
470
|
-
branch:
|
|
471
|
-
prefix:
|
|
472
|
-
defaultBranch:
|
|
481
|
+
branch: z3.strictObject({
|
|
482
|
+
prefix: z3.string().optional(),
|
|
483
|
+
defaultBranch: z3.string().optional()
|
|
473
484
|
}).optional(),
|
|
474
|
-
devlog:
|
|
475
|
-
name:
|
|
476
|
-
ignore:
|
|
477
|
-
skip:
|
|
485
|
+
devlog: z3.strictObject({
|
|
486
|
+
name: z3.string().optional(),
|
|
487
|
+
ignore: z3.array(z3.string()).optional(),
|
|
488
|
+
skip: z3.record(z3.string(), z3.array(z3.string())).optional()
|
|
478
489
|
}).optional(),
|
|
479
|
-
notify:
|
|
480
|
-
enabled:
|
|
490
|
+
notify: z3.strictObject({
|
|
491
|
+
enabled: z3.boolean().default(true)
|
|
481
492
|
}).default({ enabled: true }),
|
|
482
|
-
complexity:
|
|
483
|
-
ignore:
|
|
493
|
+
complexity: z3.strictObject({
|
|
494
|
+
ignore: z3.array(z3.string()).default(["**/*test.ts*"])
|
|
484
495
|
}).default({ ignore: ["**/*test.ts*"] }),
|
|
485
|
-
hardcodedColors:
|
|
486
|
-
ignore:
|
|
496
|
+
hardcodedColors: z3.strictObject({
|
|
497
|
+
ignore: z3.array(z3.string()).default([])
|
|
487
498
|
}).optional(),
|
|
488
|
-
blockCodeComments:
|
|
489
|
-
ignore:
|
|
499
|
+
blockCodeComments: z3.strictObject({
|
|
500
|
+
ignore: z3.array(z3.string()).default([])
|
|
490
501
|
}).optional(),
|
|
491
|
-
restructure:
|
|
492
|
-
ignore:
|
|
502
|
+
restructure: z3.strictObject({
|
|
503
|
+
ignore: z3.array(z3.string()).default([])
|
|
493
504
|
}).optional(),
|
|
494
|
-
jira:
|
|
495
|
-
acField:
|
|
505
|
+
jira: z3.strictObject({
|
|
506
|
+
acField: z3.string().default("customfield_11937")
|
|
496
507
|
}).optional(),
|
|
497
|
-
roam:
|
|
498
|
-
clientId:
|
|
499
|
-
clientSecret:
|
|
500
|
-
accessToken:
|
|
501
|
-
refreshToken:
|
|
502
|
-
tokenExpiresAt:
|
|
508
|
+
roam: z3.strictObject({
|
|
509
|
+
clientId: secretConfigValue(z3.string()),
|
|
510
|
+
clientSecret: secretConfigValue(z3.string()),
|
|
511
|
+
accessToken: secretConfigValue(z3.string()).optional(),
|
|
512
|
+
refreshToken: secretConfigValue(z3.string()).optional(),
|
|
513
|
+
tokenExpiresAt: z3.number().optional()
|
|
503
514
|
}).optional(),
|
|
504
|
-
prs:
|
|
505
|
-
slack:
|
|
506
|
-
required:
|
|
507
|
-
promptJira:
|
|
515
|
+
prs: z3.strictObject({
|
|
516
|
+
slack: z3.string().optional(),
|
|
517
|
+
required: z3.boolean().default(false),
|
|
518
|
+
promptJira: z3.boolean().default(false)
|
|
508
519
|
}).optional(),
|
|
509
|
-
worktree:
|
|
510
|
-
enabled:
|
|
511
|
-
trunk:
|
|
512
|
-
includeDrafts:
|
|
513
|
-
root:
|
|
514
|
-
install:
|
|
515
|
-
commitBeforeManualChecks:
|
|
516
|
-
copy:
|
|
520
|
+
worktree: z3.strictObject({
|
|
521
|
+
enabled: z3.boolean().default(false),
|
|
522
|
+
trunk: z3.boolean().default(false),
|
|
523
|
+
includeDrafts: z3.boolean().default(false),
|
|
524
|
+
root: z3.string().optional(),
|
|
525
|
+
install: z3.union([z3.boolean(), z3.string()]).default(true),
|
|
526
|
+
commitBeforeManualChecks: z3.boolean().default(false),
|
|
527
|
+
copy: z3.array(z3.string()).default([
|
|
517
528
|
".env",
|
|
518
529
|
"settings.local.json",
|
|
519
530
|
".claude/settings.local.json"
|
|
520
531
|
])
|
|
521
532
|
}).optional(),
|
|
522
|
-
run:
|
|
523
|
-
subtasks:
|
|
524
|
-
|
|
525
|
-
title:
|
|
526
|
-
description:
|
|
533
|
+
run: z3.array(z3.union([runConfigSchema, runLinkSchema])).optional(),
|
|
534
|
+
subtasks: z3.array(
|
|
535
|
+
z3.strictObject({
|
|
536
|
+
title: z3.string(),
|
|
537
|
+
description: z3.string().optional()
|
|
527
538
|
})
|
|
528
539
|
).optional(),
|
|
529
540
|
transcript: transcriptConfigSchema.optional(),
|
|
530
|
-
cliReadVerbs:
|
|
531
|
-
dotnet:
|
|
532
|
-
inspect:
|
|
533
|
-
suppress:
|
|
541
|
+
cliReadVerbs: z3.record(z3.string(), z3.array(z3.string())).optional(),
|
|
542
|
+
dotnet: z3.strictObject({
|
|
543
|
+
inspect: z3.strictObject({
|
|
544
|
+
suppress: z3.array(z3.string()).default([])
|
|
534
545
|
}).default({ suppress: [] })
|
|
535
546
|
}).optional(),
|
|
536
|
-
ravendb:
|
|
537
|
-
connections:
|
|
538
|
-
|
|
539
|
-
name:
|
|
540
|
-
url:
|
|
541
|
-
database:
|
|
542
|
-
apiKeyRef:
|
|
547
|
+
ravendb: z3.strictObject({
|
|
548
|
+
connections: z3.array(
|
|
549
|
+
z3.strictObject({
|
|
550
|
+
name: z3.string(),
|
|
551
|
+
url: z3.string(),
|
|
552
|
+
database: z3.string(),
|
|
553
|
+
apiKeyRef: z3.string()
|
|
543
554
|
})
|
|
544
555
|
).default([]),
|
|
545
|
-
defaultConnection:
|
|
556
|
+
defaultConnection: z3.string().optional()
|
|
546
557
|
}).optional(),
|
|
547
|
-
seq:
|
|
548
|
-
connections:
|
|
549
|
-
|
|
550
|
-
name:
|
|
551
|
-
url:
|
|
552
|
-
apiToken:
|
|
558
|
+
seq: z3.strictObject({
|
|
559
|
+
connections: z3.array(
|
|
560
|
+
z3.strictObject({
|
|
561
|
+
name: z3.string(),
|
|
562
|
+
url: z3.string(),
|
|
563
|
+
apiToken: secretConfigValue(z3.string())
|
|
553
564
|
})
|
|
554
565
|
).default([]),
|
|
555
|
-
defaultConnection:
|
|
566
|
+
defaultConnection: z3.string().optional()
|
|
556
567
|
}).optional(),
|
|
557
|
-
sql:
|
|
558
|
-
connections:
|
|
559
|
-
|
|
560
|
-
name:
|
|
561
|
-
server:
|
|
562
|
-
port:
|
|
563
|
-
user:
|
|
564
|
-
password:
|
|
565
|
-
database:
|
|
568
|
+
sql: z3.strictObject({
|
|
569
|
+
connections: z3.array(
|
|
570
|
+
z3.strictObject({
|
|
571
|
+
name: z3.string(),
|
|
572
|
+
server: z3.string(),
|
|
573
|
+
port: z3.number(),
|
|
574
|
+
user: z3.string(),
|
|
575
|
+
password: secretConfigValue(z3.string()),
|
|
576
|
+
database: z3.string()
|
|
566
577
|
})
|
|
567
578
|
).default([]),
|
|
568
|
-
defaultConnection:
|
|
579
|
+
defaultConnection: z3.string().optional()
|
|
569
580
|
}).optional(),
|
|
570
|
-
screenshot:
|
|
571
|
-
outputDir:
|
|
581
|
+
screenshot: z3.strictObject({
|
|
582
|
+
outputDir: z3.string().default("./screenshots")
|
|
572
583
|
}).default({ outputDir: "./screenshots" }),
|
|
573
|
-
sessions:
|
|
584
|
+
sessions: z3.strictObject({
|
|
574
585
|
// why: Windows .claude/projects root as seen from WSL (e.g. /mnt/c/Users/<user>/.claude/projects); when set its transcripts are discovered and tagged windows-origin
|
|
575
|
-
windowsProjectsRoot:
|
|
586
|
+
windowsProjectsRoot: z3.string().optional(),
|
|
576
587
|
// why: host the WSL daemon dials to reach the native Windows daemon over TCP (WSL can't use the Windows named pipe); defaults to 127.0.0.1 (WSL2 mirrored networking). NAT-mode users set the Windows host IP.
|
|
577
|
-
windowsDaemonHost:
|
|
588
|
+
windowsDaemonHost: z3.string().optional(),
|
|
578
589
|
// why: TCP port the native Windows daemon listens on for the WSL bridge; defaults to 51764
|
|
579
|
-
windowsDaemonPort:
|
|
580
|
-
windowsVersionCheck:
|
|
581
|
-
includeCommittedChanges:
|
|
582
|
-
topBar:
|
|
583
|
-
floatWaiting:
|
|
584
|
-
floatWaitingAfterMs:
|
|
585
|
-
maxLive:
|
|
590
|
+
windowsDaemonPort: z3.number().optional(),
|
|
591
|
+
windowsVersionCheck: z3.enum(["block", "warn", "off"]).default("block"),
|
|
592
|
+
includeCommittedChanges: z3.boolean().default(true),
|
|
593
|
+
topBar: z3.boolean().default(true),
|
|
594
|
+
floatWaiting: z3.boolean().default(true),
|
|
595
|
+
floatWaitingAfterMs: z3.number().default(5e3),
|
|
596
|
+
maxLive: z3.number().default(24)
|
|
586
597
|
}).optional(),
|
|
587
|
-
database:
|
|
588
|
-
url:
|
|
598
|
+
database: z3.strictObject({
|
|
599
|
+
url: secretConfigValue(z3.string()).optional()
|
|
589
600
|
}).default({}),
|
|
590
|
-
mermaid:
|
|
591
|
-
krokiUrl:
|
|
601
|
+
mermaid: z3.strictObject({
|
|
602
|
+
krokiUrl: z3.string().default("https://kroki.io")
|
|
592
603
|
}).default({ krokiUrl: "https://kroki.io" }),
|
|
593
|
-
deny:
|
|
594
|
-
|
|
595
|
-
pattern:
|
|
596
|
-
message:
|
|
604
|
+
deny: z3.array(
|
|
605
|
+
z3.strictObject({
|
|
606
|
+
pattern: z3.string(),
|
|
607
|
+
message: z3.string()
|
|
597
608
|
})
|
|
598
609
|
).optional(),
|
|
599
|
-
forbiddenStrings:
|
|
600
|
-
|
|
601
|
-
file:
|
|
602
|
-
paths:
|
|
603
|
-
disallowed:
|
|
610
|
+
forbiddenStrings: z3.array(
|
|
611
|
+
z3.strictObject({
|
|
612
|
+
file: z3.string(),
|
|
613
|
+
paths: z3.array(z3.string()),
|
|
614
|
+
disallowed: z3.string()
|
|
604
615
|
})
|
|
605
616
|
).optional(),
|
|
606
|
-
sync:
|
|
607
|
-
autoConfirm:
|
|
617
|
+
sync: z3.strictObject({
|
|
618
|
+
autoConfirm: z3.boolean().default(false)
|
|
608
619
|
}).default({ autoConfirm: false }),
|
|
609
|
-
harness:
|
|
610
|
-
engine:
|
|
611
|
-
exposeCodexActions:
|
|
612
|
-
exposePiActions:
|
|
620
|
+
harness: z3.strictObject({
|
|
621
|
+
engine: z3.enum(["claude", "codex", "pi"]).default("claude"),
|
|
622
|
+
exposeCodexActions: z3.boolean().optional(),
|
|
623
|
+
exposePiActions: z3.boolean().optional()
|
|
613
624
|
}).default({ engine: "claude" }),
|
|
614
|
-
voice:
|
|
615
|
-
wakeWords:
|
|
616
|
-
mic:
|
|
617
|
-
cwd:
|
|
618
|
-
modelsDir:
|
|
619
|
-
lockDir:
|
|
620
|
-
submitWindows:
|
|
621
|
-
models:
|
|
622
|
-
vad:
|
|
623
|
-
smartTurn:
|
|
625
|
+
voice: z3.strictObject({
|
|
626
|
+
wakeWords: z3.array(z3.string()).default(DEFAULT_WAKE_WORDS),
|
|
627
|
+
mic: z3.string().optional(),
|
|
628
|
+
cwd: z3.string().optional(),
|
|
629
|
+
modelsDir: z3.string().default(DEFAULT_MODELS_DIR),
|
|
630
|
+
lockDir: z3.string().optional(),
|
|
631
|
+
submitWindows: z3.array(z3.string()).optional(),
|
|
632
|
+
models: z3.strictObject({
|
|
633
|
+
vad: z3.string().optional(),
|
|
634
|
+
smartTurn: z3.string().optional()
|
|
624
635
|
}).default({})
|
|
625
636
|
}).default({
|
|
626
637
|
wakeWords: DEFAULT_WAKE_WORDS,
|
|
@@ -628,10 +639,10 @@ var assistConfigShape = {
|
|
|
628
639
|
models: {}
|
|
629
640
|
})
|
|
630
641
|
};
|
|
631
|
-
var repoConfigSchema =
|
|
632
|
-
var assistConfigSchema =
|
|
642
|
+
var repoConfigSchema = z3.strictObject(assistConfigShape).partial();
|
|
643
|
+
var assistConfigSchema = z3.strictObject({
|
|
633
644
|
...assistConfigShape,
|
|
634
|
-
repos:
|
|
645
|
+
repos: z3.record(z3.string(), repoConfigSchema).optional()
|
|
635
646
|
});
|
|
636
647
|
|
|
637
648
|
// src/shared/loadConfigFrom.ts
|
|
@@ -3813,10 +3824,12 @@ function opaqueConfigNode(inner, base) {
|
|
|
3813
3824
|
}
|
|
3814
3825
|
function build(node, path71) {
|
|
3815
3826
|
const { inner, defaultValue, optional } = unwrapSchemaNode(node);
|
|
3827
|
+
const secret = isSecretSchemaNode(node) || isSecretSchemaNode(inner);
|
|
3816
3828
|
const base = {
|
|
3817
3829
|
path: path71,
|
|
3818
3830
|
...optional ? { optional: true } : {},
|
|
3819
|
-
...defaultValue === void 0 ? {} : { defaultValue }
|
|
3831
|
+
...defaultValue === void 0 ? {} : { defaultValue },
|
|
3832
|
+
...secret ? { secret: true } : {}
|
|
3820
3833
|
};
|
|
3821
3834
|
return scalarConfigNode(inner, base) ?? objectConfigNode(inner, base, build) ?? listConfigNode(inner, base, build) ?? recordConfigNode(inner, base, build) ?? unionOfObjectsConfigNode(inner, base, build) ?? opaqueConfigNode(inner, base);
|
|
3822
3835
|
}
|
|
@@ -3869,6 +3882,7 @@ function toLeaf(node) {
|
|
|
3869
3882
|
}
|
|
3870
3883
|
if (node.kind === "scalarList") leaf.itemType = node.itemType;
|
|
3871
3884
|
if (node.defaultValue !== void 0) leaf.defaultValue = node.defaultValue;
|
|
3885
|
+
if (node.secret) leaf.secret = true;
|
|
3872
3886
|
return leaf;
|
|
3873
3887
|
}
|
|
3874
3888
|
function flatten(node, out) {
|
|
@@ -6380,92 +6394,92 @@ async function loadAllItems(orm, origin) {
|
|
|
6380
6394
|
import { readFileSync as readFileSync15 } from "fs";
|
|
6381
6395
|
|
|
6382
6396
|
// src/commands/backlog/types.ts
|
|
6383
|
-
import { z as
|
|
6384
|
-
var backlogStatusSchema =
|
|
6385
|
-
var backlogTypeSchema =
|
|
6386
|
-
var planTaskSchema =
|
|
6387
|
-
task:
|
|
6397
|
+
import { z as z4 } from "zod";
|
|
6398
|
+
var backlogStatusSchema = z4.enum(["todo", "in-progress", "done", "wontdo"]);
|
|
6399
|
+
var backlogTypeSchema = z4.enum(["story", "bug"]);
|
|
6400
|
+
var planTaskSchema = z4.object({
|
|
6401
|
+
task: z4.string()
|
|
6388
6402
|
}).strip();
|
|
6389
|
-
var planPhaseSchema =
|
|
6390
|
-
name:
|
|
6391
|
-
tasks:
|
|
6392
|
-
manualChecks:
|
|
6403
|
+
var planPhaseSchema = z4.strictObject({
|
|
6404
|
+
name: z4.string(),
|
|
6405
|
+
tasks: z4.array(planTaskSchema),
|
|
6406
|
+
manualChecks: z4.array(z4.string()).optional()
|
|
6393
6407
|
});
|
|
6394
|
-
var phaseUsageSchema =
|
|
6395
|
-
phaseIdx:
|
|
6396
|
-
tokensUp:
|
|
6397
|
-
tokensDown:
|
|
6398
|
-
activeMs:
|
|
6399
|
-
peakContextPct:
|
|
6408
|
+
var phaseUsageSchema = z4.strictObject({
|
|
6409
|
+
phaseIdx: z4.number(),
|
|
6410
|
+
tokensUp: z4.number(),
|
|
6411
|
+
tokensDown: z4.number(),
|
|
6412
|
+
activeMs: z4.number(),
|
|
6413
|
+
peakContextPct: z4.number()
|
|
6400
6414
|
});
|
|
6401
|
-
var phaseSessionSchema =
|
|
6402
|
-
phaseIdx:
|
|
6403
|
-
claudeSessionId:
|
|
6404
|
-
hostname:
|
|
6405
|
-
osUser:
|
|
6415
|
+
var phaseSessionSchema = z4.strictObject({
|
|
6416
|
+
phaseIdx: z4.number(),
|
|
6417
|
+
claudeSessionId: z4.string(),
|
|
6418
|
+
hostname: z4.string(),
|
|
6419
|
+
osUser: z4.string()
|
|
6406
6420
|
});
|
|
6407
|
-
var phaseUsageTotalSchema =
|
|
6408
|
-
tokensUp:
|
|
6409
|
-
tokensDown:
|
|
6410
|
-
activeMs:
|
|
6411
|
-
peakContextPct:
|
|
6421
|
+
var phaseUsageTotalSchema = z4.strictObject({
|
|
6422
|
+
tokensUp: z4.number(),
|
|
6423
|
+
tokensDown: z4.number(),
|
|
6424
|
+
activeMs: z4.number(),
|
|
6425
|
+
peakContextPct: z4.number()
|
|
6412
6426
|
});
|
|
6413
|
-
var subtaskStatusSchema =
|
|
6414
|
-
var subtaskSchema =
|
|
6415
|
-
title:
|
|
6416
|
-
description:
|
|
6427
|
+
var subtaskStatusSchema = z4.enum(["todo", "in-progress", "done"]);
|
|
6428
|
+
var subtaskSchema = z4.strictObject({
|
|
6429
|
+
title: z4.string(),
|
|
6430
|
+
description: z4.string().optional(),
|
|
6417
6431
|
status: subtaskStatusSchema.default("todo")
|
|
6418
6432
|
});
|
|
6419
|
-
var backlogCommentTypeSchema =
|
|
6420
|
-
var backlogCommentSchema =
|
|
6421
|
-
id:
|
|
6422
|
-
text:
|
|
6423
|
-
phase:
|
|
6424
|
-
timestamp:
|
|
6433
|
+
var backlogCommentTypeSchema = z4.enum(["comment", "summary"]);
|
|
6434
|
+
var backlogCommentSchema = z4.strictObject({
|
|
6435
|
+
id: z4.number().optional(),
|
|
6436
|
+
text: z4.string(),
|
|
6437
|
+
phase: z4.number().optional(),
|
|
6438
|
+
timestamp: z4.string(),
|
|
6425
6439
|
type: backlogCommentTypeSchema
|
|
6426
6440
|
});
|
|
6427
|
-
var gitRefKindSchema =
|
|
6441
|
+
var gitRefKindSchema = z4.enum([
|
|
6428
6442
|
"branch",
|
|
6429
6443
|
"commit",
|
|
6430
6444
|
"commit-parent",
|
|
6431
6445
|
"pr",
|
|
6432
6446
|
"slack"
|
|
6433
6447
|
]);
|
|
6434
|
-
var gitRefSchema =
|
|
6448
|
+
var gitRefSchema = z4.strictObject({
|
|
6435
6449
|
kind: gitRefKindSchema,
|
|
6436
|
-
ref:
|
|
6437
|
-
title:
|
|
6438
|
-
url:
|
|
6439
|
-
state:
|
|
6440
|
-
createdAt:
|
|
6450
|
+
ref: z4.string(),
|
|
6451
|
+
title: z4.string().optional(),
|
|
6452
|
+
url: z4.string().optional(),
|
|
6453
|
+
state: z4.string().optional(),
|
|
6454
|
+
createdAt: z4.string().optional()
|
|
6441
6455
|
});
|
|
6442
|
-
var backlogLinkTypeSchema =
|
|
6443
|
-
var backlogLinkSchema =
|
|
6456
|
+
var backlogLinkTypeSchema = z4.enum(["relates-to", "depends-on"]);
|
|
6457
|
+
var backlogLinkSchema = z4.strictObject({
|
|
6444
6458
|
type: backlogLinkTypeSchema,
|
|
6445
|
-
targetId:
|
|
6459
|
+
targetId: z4.number()
|
|
6446
6460
|
});
|
|
6447
|
-
var backlogItemSchema =
|
|
6448
|
-
id:
|
|
6461
|
+
var backlogItemSchema = z4.strictObject({
|
|
6462
|
+
id: z4.number(),
|
|
6449
6463
|
type: backlogTypeSchema.default("story"),
|
|
6450
|
-
name:
|
|
6451
|
-
description:
|
|
6452
|
-
acceptanceCriteria:
|
|
6453
|
-
plan:
|
|
6454
|
-
currentPhase:
|
|
6455
|
-
starred:
|
|
6464
|
+
name: z4.string(),
|
|
6465
|
+
description: z4.string().optional(),
|
|
6466
|
+
acceptanceCriteria: z4.array(z4.string()),
|
|
6467
|
+
plan: z4.array(planPhaseSchema).optional(),
|
|
6468
|
+
currentPhase: z4.number().optional(),
|
|
6469
|
+
starred: z4.boolean().default(false),
|
|
6456
6470
|
status: backlogStatusSchema,
|
|
6457
|
-
comments:
|
|
6458
|
-
subtasks:
|
|
6459
|
-
links:
|
|
6460
|
-
phaseUsage:
|
|
6461
|
-
phaseSessions:
|
|
6471
|
+
comments: z4.array(backlogCommentSchema).optional(),
|
|
6472
|
+
subtasks: z4.array(subtaskSchema).optional(),
|
|
6473
|
+
links: z4.array(backlogLinkSchema).optional(),
|
|
6474
|
+
phaseUsage: z4.array(phaseUsageSchema).optional(),
|
|
6475
|
+
phaseSessions: z4.array(phaseSessionSchema).optional(),
|
|
6462
6476
|
usageTotal: phaseUsageTotalSchema.optional(),
|
|
6463
|
-
gitRefs:
|
|
6464
|
-
origin:
|
|
6465
|
-
jiraKey:
|
|
6466
|
-
githubIssue:
|
|
6477
|
+
gitRefs: z4.array(gitRefSchema).optional(),
|
|
6478
|
+
origin: z4.string().optional(),
|
|
6479
|
+
jiraKey: z4.string().optional(),
|
|
6480
|
+
githubIssue: z4.string().optional()
|
|
6467
6481
|
});
|
|
6468
|
-
var backlogFileSchema =
|
|
6482
|
+
var backlogFileSchema = z4.array(backlogItemSchema);
|
|
6469
6483
|
|
|
6470
6484
|
// src/commands/backlog/parseBacklogJsonl.ts
|
|
6471
6485
|
function parseBacklogJsonl(path71) {
|
|
@@ -7517,18 +7531,18 @@ async function persistPhaseSessionId(itemId2, phaseIdx, claudeSessionId) {
|
|
|
7517
7531
|
import { mkdirSync as mkdirSync9, readFileSync as readFileSync18, rmSync as rmSync2, writeFileSync as writeFileSync19 } from "fs";
|
|
7518
7532
|
import { homedir as homedir10 } from "os";
|
|
7519
7533
|
import { dirname as dirname17, join as join22 } from "path";
|
|
7520
|
-
import { z as
|
|
7521
|
-
var activitySchema =
|
|
7522
|
-
kind:
|
|
7523
|
-
harness:
|
|
7524
|
-
name:
|
|
7525
|
-
itemId:
|
|
7526
|
-
itemName:
|
|
7527
|
-
phase:
|
|
7528
|
-
phaseName:
|
|
7529
|
-
totalPhases:
|
|
7530
|
-
claudeSessionId:
|
|
7531
|
-
startedAt:
|
|
7534
|
+
import { z as z5 } from "zod";
|
|
7535
|
+
var activitySchema = z5.object({
|
|
7536
|
+
kind: z5.enum(["command", "backlog"]),
|
|
7537
|
+
harness: z5.enum(["claude", "codex", "pi"]).optional(),
|
|
7538
|
+
name: z5.string().optional(),
|
|
7539
|
+
itemId: z5.number().optional(),
|
|
7540
|
+
itemName: z5.string().optional(),
|
|
7541
|
+
phase: z5.number().optional(),
|
|
7542
|
+
phaseName: z5.string().optional(),
|
|
7543
|
+
totalPhases: z5.number().optional(),
|
|
7544
|
+
claudeSessionId: z5.string().optional(),
|
|
7545
|
+
startedAt: z5.number()
|
|
7532
7546
|
});
|
|
7533
7547
|
function activityPath(sessionId) {
|
|
7534
7548
|
return join22(homedir10(), ".assist", "activity", `activity-${sessionId}.json`);
|
|
@@ -9772,6 +9786,78 @@ async function getBackups(_req, res) {
|
|
|
9772
9786
|
respondJson(res, 200, await listBackups(await getDb()));
|
|
9773
9787
|
}
|
|
9774
9788
|
|
|
9789
|
+
// src/shared/configNodeFieldName.ts
|
|
9790
|
+
function configNodeFieldName(node) {
|
|
9791
|
+
const last = node.path.at(-1);
|
|
9792
|
+
return last?.kind === "key" ? last.name : void 0;
|
|
9793
|
+
}
|
|
9794
|
+
|
|
9795
|
+
// src/shared/configNodeField.ts
|
|
9796
|
+
function fieldsOf(node) {
|
|
9797
|
+
if (node.kind === "object") return node.fields;
|
|
9798
|
+
if (node.kind === "unionOfObjects")
|
|
9799
|
+
return node.variants.flatMap((variant) => variant.fields);
|
|
9800
|
+
return [];
|
|
9801
|
+
}
|
|
9802
|
+
function configNodeField(node, name) {
|
|
9803
|
+
const matches = fieldsOf(node).filter(
|
|
9804
|
+
(field) => configNodeFieldName(field) === name
|
|
9805
|
+
);
|
|
9806
|
+
return matches.find((field) => field.secret) ?? matches[0];
|
|
9807
|
+
}
|
|
9808
|
+
|
|
9809
|
+
// src/shared/isPlainRecord.ts
|
|
9810
|
+
function isPlainRecord(value) {
|
|
9811
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9812
|
+
}
|
|
9813
|
+
|
|
9814
|
+
// src/shared/mapConfigSecrets.ts
|
|
9815
|
+
function mapChildren(value, path71, childNode, map) {
|
|
9816
|
+
if (!isPlainRecord(value)) return value;
|
|
9817
|
+
return Object.fromEntries(
|
|
9818
|
+
Object.entries(value).map(([name, child]) => [
|
|
9819
|
+
name,
|
|
9820
|
+
walk(child, [...path71, name], childNode(name), map)
|
|
9821
|
+
])
|
|
9822
|
+
);
|
|
9823
|
+
}
|
|
9824
|
+
function mapItems(value, path71, item, map) {
|
|
9825
|
+
if (!Array.isArray(value)) return value;
|
|
9826
|
+
return value.map((entry, index3) => walk(entry, [...path71, index3], item, map));
|
|
9827
|
+
}
|
|
9828
|
+
function walk(value, path71, node, map) {
|
|
9829
|
+
if (!node || value === void 0 || value === null) return value;
|
|
9830
|
+
if (node.secret) return map(value, path71);
|
|
9831
|
+
switch (node.kind) {
|
|
9832
|
+
case "object":
|
|
9833
|
+
case "unionOfObjects":
|
|
9834
|
+
return mapChildren(
|
|
9835
|
+
value,
|
|
9836
|
+
path71,
|
|
9837
|
+
(name) => configNodeField(node, name),
|
|
9838
|
+
map
|
|
9839
|
+
);
|
|
9840
|
+
case "objectList":
|
|
9841
|
+
return mapItems(value, path71, node.item, map);
|
|
9842
|
+
case "record":
|
|
9843
|
+
return mapChildren(value, path71, () => node.value, map);
|
|
9844
|
+
default:
|
|
9845
|
+
return value;
|
|
9846
|
+
}
|
|
9847
|
+
}
|
|
9848
|
+
function mapConfigSecrets(value, node, map) {
|
|
9849
|
+
return walk(value, [], node, map);
|
|
9850
|
+
}
|
|
9851
|
+
|
|
9852
|
+
// src/shared/redactConfigSecrets.ts
|
|
9853
|
+
var REDACTED_SECRET = { assistSecret: "set" };
|
|
9854
|
+
function isRedactedSecret(value) {
|
|
9855
|
+
return typeof value === "object" && value !== null && value.assistSecret === "set";
|
|
9856
|
+
}
|
|
9857
|
+
function redactConfigSecrets(value, node) {
|
|
9858
|
+
return mapConfigSecrets(value, node, () => REDACTED_SECRET);
|
|
9859
|
+
}
|
|
9860
|
+
|
|
9775
9861
|
// src/commands/config/getNestedValue.ts
|
|
9776
9862
|
function isTraversable(value) {
|
|
9777
9863
|
return value !== null && value !== void 0 && typeof value === "object";
|
|
@@ -9820,12 +9906,6 @@ function resolveConfigSources(key, layers) {
|
|
|
9820
9906
|
return sources;
|
|
9821
9907
|
}
|
|
9822
9908
|
|
|
9823
|
-
// src/shared/configNodeFieldName.ts
|
|
9824
|
-
function configNodeFieldName(node) {
|
|
9825
|
-
const last = node.path.at(-1);
|
|
9826
|
-
return last?.kind === "key" ? last.name : void 0;
|
|
9827
|
-
}
|
|
9828
|
-
|
|
9829
9909
|
// src/shared/findConfigNode.ts
|
|
9830
9910
|
function objectField(node, segment) {
|
|
9831
9911
|
if (segment.kind !== "key") return void 0;
|
|
@@ -9915,14 +9995,16 @@ function readConfigEntries(cwd) {
|
|
|
9915
9995
|
return describeConfigLeaves(assistConfigSchema).filter((leaf) => !KEYS_STRIPPED_FROM_MERGED_CONFIG.has(leaf.key)).map((leaf) => {
|
|
9916
9996
|
const sources = resolveConfigSources(leaf.key, layers);
|
|
9917
9997
|
const source = sources[0] ?? "default";
|
|
9998
|
+
const node = configEntryNode(schema2, leaf.key);
|
|
9918
9999
|
return {
|
|
9919
10000
|
...leaf,
|
|
9920
|
-
|
|
10001
|
+
...leaf.defaultValue === void 0 ? {} : { defaultValue: redactConfigSecrets(leaf.defaultValue, node) },
|
|
10002
|
+
value: redactConfigSecrets(getNestedValue(config, leaf.key), node),
|
|
9921
10003
|
source,
|
|
9922
10004
|
sources,
|
|
9923
10005
|
...layers.repoKey ? { repoKey: layers.repoKey } : {},
|
|
9924
10006
|
globalOnly: isGlobalOnlyConfigKey(leaf.key),
|
|
9925
|
-
node
|
|
10007
|
+
node
|
|
9926
10008
|
};
|
|
9927
10009
|
});
|
|
9928
10010
|
}
|
|
@@ -10809,6 +10891,38 @@ function coerceUnion(key, raw, types) {
|
|
|
10809
10891
|
return { ok: false, error: `${key}: expected ${types.join(" or ")}` };
|
|
10810
10892
|
}
|
|
10811
10893
|
|
|
10894
|
+
// src/shared/valueAtConfigPath.ts
|
|
10895
|
+
function valueAtConfigPath(value, path71) {
|
|
10896
|
+
let current = value;
|
|
10897
|
+
for (const key of path71) {
|
|
10898
|
+
if (typeof key === "number") {
|
|
10899
|
+
if (!Array.isArray(current)) return void 0;
|
|
10900
|
+
current = current[key];
|
|
10901
|
+
continue;
|
|
10902
|
+
}
|
|
10903
|
+
if (typeof current !== "object" || current === null) return void 0;
|
|
10904
|
+
current = current[key];
|
|
10905
|
+
}
|
|
10906
|
+
return current;
|
|
10907
|
+
}
|
|
10908
|
+
|
|
10909
|
+
// src/shared/restoreConfigSecrets.ts
|
|
10910
|
+
function restoreConfigSecrets(value, stored, node) {
|
|
10911
|
+
return mapConfigSecrets(
|
|
10912
|
+
value,
|
|
10913
|
+
node,
|
|
10914
|
+
(secret, path71) => isRedactedSecret(secret) ? valueAtConfigPath(stored, path71) : secret
|
|
10915
|
+
);
|
|
10916
|
+
}
|
|
10917
|
+
|
|
10918
|
+
// src/commands/config/restoreConfigWriteSecrets.ts
|
|
10919
|
+
function restoreConfigWriteSecrets(key, value, cwd) {
|
|
10920
|
+
const node = configEntryNode(describeConfigNode(assistConfigSchema), key);
|
|
10921
|
+
if (!node) return value;
|
|
10922
|
+
const stored = loadConfigFrom(cwd);
|
|
10923
|
+
return restoreConfigSecrets(value, getNestedValue(stored, key), node);
|
|
10924
|
+
}
|
|
10925
|
+
|
|
10812
10926
|
// src/commands/config/setNestedValue.ts
|
|
10813
10927
|
function isPlainObject2(val) {
|
|
10814
10928
|
return val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -11016,7 +11130,10 @@ async function handleConfigWrite(req, res, apply) {
|
|
|
11016
11130
|
// src/commands/sessions/web/setConfig.ts
|
|
11017
11131
|
function setConfig(req, res) {
|
|
11018
11132
|
return handleConfigWrite(req, res, (request) => {
|
|
11019
|
-
const coerced = coerceConfigValue(
|
|
11133
|
+
const coerced = coerceConfigValue(
|
|
11134
|
+
request.key,
|
|
11135
|
+
restoreConfigWriteSecrets(request.key, request.value, request.cwd)
|
|
11136
|
+
);
|
|
11020
11137
|
if (!coerced.ok) return { ok: false, errors: [coerced.error] };
|
|
11021
11138
|
return applyScopedConfigSet(
|
|
11022
11139
|
request.key,
|
|
@@ -12811,18 +12928,18 @@ ${issues}`);
|
|
|
12811
12928
|
}
|
|
12812
12929
|
|
|
12813
12930
|
// src/commands/backlog/propose/proposedItemSchema.ts
|
|
12814
|
-
import { z as
|
|
12815
|
-
var proposedPhaseSchema =
|
|
12816
|
-
name:
|
|
12817
|
-
tasks:
|
|
12818
|
-
manualChecks:
|
|
12931
|
+
import { z as z6 } from "zod";
|
|
12932
|
+
var proposedPhaseSchema = z6.strictObject({
|
|
12933
|
+
name: z6.string().trim().min(1, "phase name is required"),
|
|
12934
|
+
tasks: z6.array(z6.string().trim().min(1)).min(1, "a phase needs at least one task"),
|
|
12935
|
+
manualChecks: z6.array(z6.string().trim().min(1)).default([])
|
|
12819
12936
|
});
|
|
12820
|
-
var proposedItemSchema =
|
|
12821
|
-
name:
|
|
12822
|
-
type:
|
|
12823
|
-
description:
|
|
12824
|
-
acceptanceCriteria:
|
|
12825
|
-
phases:
|
|
12937
|
+
var proposedItemSchema = z6.strictObject({
|
|
12938
|
+
name: z6.string().trim().min(1, "name is required"),
|
|
12939
|
+
type: z6.enum(["story", "bug"]),
|
|
12940
|
+
description: z6.string().optional(),
|
|
12941
|
+
acceptanceCriteria: z6.array(z6.string().trim().min(1)).default([]),
|
|
12942
|
+
phases: z6.array(proposedPhaseSchema).default([])
|
|
12826
12943
|
});
|
|
12827
12944
|
|
|
12828
12945
|
// src/commands/backlog/propose/readProposedItem.ts
|
|
@@ -14220,9 +14337,9 @@ async function update(id, options2) {
|
|
|
14220
14337
|
import chalk115 from "chalk";
|
|
14221
14338
|
|
|
14222
14339
|
// src/commands/backlog/updatePlan/planUpdateSchema.ts
|
|
14223
|
-
import { z as
|
|
14224
|
-
var planUpdateSchema =
|
|
14225
|
-
phases:
|
|
14340
|
+
import { z as z7 } from "zod";
|
|
14341
|
+
var planUpdateSchema = z7.strictObject({
|
|
14342
|
+
phases: z7.array(proposedPhaseSchema).min(1, "a plan needs at least one phase")
|
|
14226
14343
|
});
|
|
14227
14344
|
|
|
14228
14345
|
// src/commands/backlog/updatePlan/readPlanUpdate.ts
|
|
@@ -15940,7 +16057,7 @@ function applyIgnoreGlobs(files, extraIgnore = []) {
|
|
|
15940
16057
|
const ignore3 = [...complexity.ignore, ...extraIgnore];
|
|
15941
16058
|
return files.filter((f) => !ignore3.some((glob) => minimatch5(f, glob)));
|
|
15942
16059
|
}
|
|
15943
|
-
function
|
|
16060
|
+
function walk2(dir, results) {
|
|
15944
16061
|
if (!fs19.existsSync(dir)) {
|
|
15945
16062
|
return;
|
|
15946
16063
|
}
|
|
@@ -15950,7 +16067,7 @@ function walk(dir, results) {
|
|
|
15950
16067
|
const fullPath = path26.join(dir, entry.name);
|
|
15951
16068
|
if (entry.isDirectory()) {
|
|
15952
16069
|
if (entry.name !== "node_modules" && entry.name !== ".git") {
|
|
15953
|
-
|
|
16070
|
+
walk2(fullPath, results);
|
|
15954
16071
|
}
|
|
15955
16072
|
} else if (entry.isFile() && extensions.some((ext) => entry.name.endsWith(ext))) {
|
|
15956
16073
|
results.push(fullPath);
|
|
@@ -15960,7 +16077,7 @@ function walk(dir, results) {
|
|
|
15960
16077
|
function findSourceFiles2(pattern2, baseDir = ".", extraIgnore = []) {
|
|
15961
16078
|
const results = [];
|
|
15962
16079
|
if (pattern2.includes("*")) {
|
|
15963
|
-
|
|
16080
|
+
walk2(baseDir, results);
|
|
15964
16081
|
return applyIgnoreGlobs(
|
|
15965
16082
|
results.filter((f) => minimatch5(f, pattern2)),
|
|
15966
16083
|
extraIgnore
|
|
@@ -15970,10 +16087,10 @@ function findSourceFiles2(pattern2, baseDir = ".", extraIgnore = []) {
|
|
|
15970
16087
|
return [pattern2];
|
|
15971
16088
|
}
|
|
15972
16089
|
if (fs19.existsSync(pattern2) && fs19.statSync(pattern2).isDirectory()) {
|
|
15973
|
-
|
|
16090
|
+
walk2(pattern2, results);
|
|
15974
16091
|
return applyIgnoreGlobs(results, extraIgnore);
|
|
15975
16092
|
}
|
|
15976
|
-
|
|
16093
|
+
walk2(baseDir, results);
|
|
15977
16094
|
return applyIgnoreGlobs(
|
|
15978
16095
|
results.filter((f) => minimatch5(f, pattern2)),
|
|
15979
16096
|
extraIgnore
|
|
@@ -16554,19 +16671,34 @@ function registerComplexity(program2) {
|
|
|
16554
16671
|
|
|
16555
16672
|
// src/commands/config/index.ts
|
|
16556
16673
|
import { stringify as stringifyYaml2 } from "yaml";
|
|
16674
|
+
|
|
16675
|
+
// src/shared/maskConfigSecrets.ts
|
|
16676
|
+
var SECRET_MASK = "<hidden>";
|
|
16677
|
+
function maskConfigSecrets(value, node) {
|
|
16678
|
+
return mapConfigSecrets(value, node, () => SECRET_MASK);
|
|
16679
|
+
}
|
|
16680
|
+
|
|
16681
|
+
// src/commands/config/index.ts
|
|
16557
16682
|
function configList() {
|
|
16558
|
-
const config =
|
|
16683
|
+
const config = maskConfigSecrets(
|
|
16684
|
+
loadConfig(),
|
|
16685
|
+
describeConfigNode(assistConfigSchema)
|
|
16686
|
+
);
|
|
16559
16687
|
console.log(stringifyYaml2(config, { lineWidth: 0 }).trimEnd());
|
|
16560
16688
|
}
|
|
16561
16689
|
|
|
16562
16690
|
// src/commands/config/configGet.ts
|
|
16563
16691
|
import chalk131 from "chalk";
|
|
16564
|
-
function configGet(key) {
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
)
|
|
16692
|
+
function configGet(key, options2 = {}) {
|
|
16693
|
+
const value = requireNestedValue(
|
|
16694
|
+
loadConfig(),
|
|
16695
|
+
key
|
|
16569
16696
|
);
|
|
16697
|
+
console.log(formatOutput(options2.reveal ? value : maskSecretsAt(value, key)));
|
|
16698
|
+
}
|
|
16699
|
+
function maskSecretsAt(value, key) {
|
|
16700
|
+
const node = configEntryNode(describeConfigNode(assistConfigSchema), key);
|
|
16701
|
+
return maskConfigSecrets(value, node);
|
|
16570
16702
|
}
|
|
16571
16703
|
function formatOutput(value) {
|
|
16572
16704
|
return typeof value === "object" && value !== null ? JSON.stringify(value, null, 2) : String(value);
|
|
@@ -16709,8 +16841,8 @@ function registerConfig(program2) {
|
|
|
16709
16841
|
"-r, --repo [name]",
|
|
16710
16842
|
"Requires -g: remove the key from a repo's identity block (defaults to the current repo)"
|
|
16711
16843
|
).action((key, options2) => configUnset(key, options2));
|
|
16712
|
-
configCommand.command("get <key>").description("Get a config value").action(configGet);
|
|
16713
|
-
configCommand.command("list").description("List all config values").action(configList);
|
|
16844
|
+
configCommand.command("get <key>").description("Get a config value (secrets print as <hidden>)").option("--reveal", "Print the raw value of a secret, undecorated").action((key, options2) => configGet(key, options2));
|
|
16845
|
+
configCommand.command("list").description("List all config values (secrets print as <hidden>)").action(configList);
|
|
16714
16846
|
}
|
|
16715
16847
|
|
|
16716
16848
|
// src/commands/db/reportMigrationStatus.ts
|
|
@@ -17577,13 +17709,13 @@ function buildTree(csprojPath, repoRoot, visited = /* @__PURE__ */ new Set()) {
|
|
|
17577
17709
|
}
|
|
17578
17710
|
function collectAllDeps(node) {
|
|
17579
17711
|
const result = /* @__PURE__ */ new Set();
|
|
17580
|
-
function
|
|
17712
|
+
function walk3(n) {
|
|
17581
17713
|
for (const child of n.children) {
|
|
17582
17714
|
result.add(child.path);
|
|
17583
|
-
|
|
17715
|
+
walk3(child);
|
|
17584
17716
|
}
|
|
17585
17717
|
}
|
|
17586
|
-
|
|
17718
|
+
walk3(node);
|
|
17587
17719
|
return result;
|
|
17588
17720
|
}
|
|
17589
17721
|
|
|
@@ -19228,30 +19360,30 @@ function stringOrUndefined(value) {
|
|
|
19228
19360
|
}
|
|
19229
19361
|
|
|
19230
19362
|
// src/commands/sessions/daemon/persistedSessionSchema.ts
|
|
19231
|
-
import { z as
|
|
19232
|
-
var persistedSessionSchema =
|
|
19233
|
-
id:
|
|
19234
|
-
name:
|
|
19235
|
-
title:
|
|
19236
|
-
generatedTitle:
|
|
19237
|
-
subtitle:
|
|
19238
|
-
commandType:
|
|
19239
|
-
harness:
|
|
19240
|
-
status:
|
|
19241
|
-
cwd:
|
|
19242
|
-
startedAt:
|
|
19243
|
-
runningMs:
|
|
19244
|
-
claudeSessionId:
|
|
19245
|
-
initialPrompt:
|
|
19246
|
-
runName:
|
|
19247
|
-
runArgs:
|
|
19248
|
-
assistArgs:
|
|
19363
|
+
import { z as z8 } from "zod";
|
|
19364
|
+
var persistedSessionSchema = z8.object({
|
|
19365
|
+
id: z8.string().optional(),
|
|
19366
|
+
name: z8.string(),
|
|
19367
|
+
title: z8.string().optional(),
|
|
19368
|
+
generatedTitle: z8.string().optional(),
|
|
19369
|
+
subtitle: z8.string().optional(),
|
|
19370
|
+
commandType: z8.enum(["claude", "run", "assist"]),
|
|
19371
|
+
harness: z8.enum(["claude", "codex", "pi"]).optional(),
|
|
19372
|
+
status: z8.enum(["running", "waiting", "done", "error", "stopped"]).optional(),
|
|
19373
|
+
cwd: z8.string(),
|
|
19374
|
+
startedAt: z8.number(),
|
|
19375
|
+
runningMs: z8.number().optional(),
|
|
19376
|
+
claudeSessionId: z8.string().optional(),
|
|
19377
|
+
initialPrompt: z8.string().optional(),
|
|
19378
|
+
runName: z8.string().optional(),
|
|
19379
|
+
runArgs: z8.array(z8.string()).optional(),
|
|
19380
|
+
assistArgs: z8.array(z8.string()).optional(),
|
|
19249
19381
|
activity: activitySchema.optional(),
|
|
19250
|
-
starred:
|
|
19251
|
-
autoRun:
|
|
19252
|
-
autoAdvance:
|
|
19253
|
-
reviewStarted:
|
|
19254
|
-
undurable:
|
|
19382
|
+
starred: z8.boolean().optional(),
|
|
19383
|
+
autoRun: z8.boolean().optional(),
|
|
19384
|
+
autoAdvance: z8.boolean().optional(),
|
|
19385
|
+
reviewStarted: z8.boolean().optional(),
|
|
19386
|
+
undurable: z8.object({ reason: z8.string(), removesTree: z8.boolean().optional() }).optional()
|
|
19255
19387
|
});
|
|
19256
19388
|
|
|
19257
19389
|
// src/commands/sessions/daemon/toPersistedSession.ts
|
|
@@ -28632,9 +28764,9 @@ function createAutoExit(exit, graceMs = DEFAULT_GRACE_MS) {
|
|
|
28632
28764
|
}
|
|
28633
28765
|
|
|
28634
28766
|
// src/commands/sessions/daemon/loadActiveSelection.ts
|
|
28635
|
-
import { z as
|
|
28767
|
+
import { z as z9 } from "zod";
|
|
28636
28768
|
var ACTIVE_FILE = "active.json";
|
|
28637
|
-
var activeSelectionSchema =
|
|
28769
|
+
var activeSelectionSchema = z9.record(z9.string(), z9.string());
|
|
28638
28770
|
function loadActiveSelection() {
|
|
28639
28771
|
const parsed = activeSelectionSchema.safeParse(
|
|
28640
28772
|
loadJson(ACTIVE_FILE)
|