@sentropic/track 0.98.11-rc.9 → 0.98.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adopt/apply.d.ts +1 -0
- package/dist/adopt/apply.d.ts.map +1 -1
- package/dist/adopt/apply.js +5 -1
- package/dist/adopt/apply.js.map +1 -1
- package/dist/capture/cli.d.ts +5 -0
- package/dist/capture/cli.d.ts.map +1 -0
- package/dist/capture/cli.js +532 -0
- package/dist/capture/cli.js.map +1 -0
- package/dist/capture/index.d.ts +8 -0
- package/dist/capture/index.d.ts.map +1 -0
- package/dist/capture/index.js +8 -0
- package/dist/capture/index.js.map +1 -0
- package/dist/capture/inscribe.d.ts +64 -0
- package/dist/capture/inscribe.d.ts.map +1 -0
- package/dist/capture/inscribe.js +407 -0
- package/dist/capture/inscribe.js.map +1 -0
- package/dist/capture/markers.d.ts +10 -0
- package/dist/capture/markers.d.ts.map +1 -0
- package/dist/capture/markers.js +26 -0
- package/dist/capture/markers.js.map +1 -0
- package/dist/capture/queue.d.ts +131 -0
- package/dist/capture/queue.d.ts.map +1 -0
- package/dist/capture/queue.js +422 -0
- package/dist/capture/queue.js.map +1 -0
- package/dist/capture/reader.d.ts +42 -0
- package/dist/capture/reader.d.ts.map +1 -0
- package/dist/capture/reader.js +72 -0
- package/dist/capture/reader.js.map +1 -0
- package/dist/capture/registry.d.ts +42 -0
- package/dist/capture/registry.d.ts.map +1 -0
- package/dist/capture/registry.js +141 -0
- package/dist/capture/registry.js.map +1 -0
- package/dist/capture/secrets.d.ts +30 -0
- package/dist/capture/secrets.d.ts.map +1 -0
- package/dist/capture/secrets.js +145 -0
- package/dist/capture/secrets.js.map +1 -0
- package/dist/cli/adopt.d.ts +1 -1
- package/dist/cli/adopt.d.ts.map +1 -1
- package/dist/cli/adopt.js +3 -2
- package/dist/cli/adopt.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +113 -22
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/journal-reference.d.ts +2 -0
- package/dist/cli/journal-reference.d.ts.map +1 -1
- package/dist/cli/journal-reference.js +12 -0
- package/dist/cli/journal-reference.js.map +1 -1
- package/dist/cli/journal.d.ts +1 -1
- package/dist/cli/journal.d.ts.map +1 -1
- package/dist/cli/journal.js +130 -6
- package/dist/cli/journal.js.map +1 -1
- package/dist/cli/restructure-apply.d.ts +3 -0
- package/dist/cli/restructure-apply.d.ts.map +1 -1
- package/dist/cli/restructure-apply.js +5 -1
- package/dist/cli/restructure-apply.js.map +1 -1
- package/dist/events/store.d.ts +5 -1
- package/dist/events/store.d.ts.map +1 -1
- package/dist/events/store.js +8 -1
- package/dist/events/store.js.map +1 -1
- package/dist/events/types.d.ts +8 -3
- package/dist/events/types.d.ts.map +1 -1
- package/dist/events/types.js +4 -0
- package/dist/events/types.js.map +1 -1
- package/dist/focus-vendor/artifact/manifest.d.ts +1 -1
- package/dist/focus-vendor/artifact/manifest.js +4 -4
- package/dist/focus-vendor/artifact/manifest.js.map +1 -1
- package/dist/focus-vendor/cli/index.d.ts +1 -1
- package/dist/focus-vendor/cli/index.d.ts.map +1 -1
- package/dist/focus-vendor/cli/index.js +38 -3
- package/dist/focus-vendor/cli/index.js.map +1 -1
- package/dist/focus-vendor/index.d.ts +2 -1
- package/dist/focus-vendor/index.js +4 -1
- package/dist/focus-vendor/index.js.map +1 -1
- package/dist/focus-vendor/model.d.ts +13 -0
- package/dist/focus-vendor/model.d.ts.map +1 -1
- package/dist/focus-vendor/model.js +13 -0
- package/dist/focus-vendor/model.js.map +1 -1
- package/dist/focus-vendor/registry/definitions.js +7 -7
- package/dist/focus-vendor/registry/definitions.js.map +1 -1
- package/dist/focus-vendor/registry/entries.v1.json +14 -14
- package/dist/focus-vendor/render/html.d.ts +1 -1
- package/dist/focus-vendor/render/html.d.ts.map +1 -1
- package/dist/focus-vendor/render/html.js +8 -2
- package/dist/focus-vendor/render/html.js.map +1 -1
- package/dist/focus-vendor/render/theme.d.ts +17 -0
- package/dist/focus-vendor/render/theme.d.ts.map +1 -0
- package/dist/focus-vendor/render/theme.js +654 -0
- package/dist/focus-vendor/render/theme.js.map +1 -0
- package/dist/focus-vendor/validation/index.d.ts +6 -0
- package/dist/focus-vendor/validation/index.d.ts.map +1 -1
- package/dist/focus-vendor/validation/index.js +14 -1
- package/dist/focus-vendor/validation/index.js.map +1 -1
- package/dist/focus-vendor/validation/readability.d.ts.map +1 -1
- package/dist/focus-vendor/validation/readability.js +25 -25
- package/dist/focus-vendor/validation/readability.js.map +1 -1
- package/dist/fs-private.d.ts +37 -0
- package/dist/fs-private.d.ts.map +1 -0
- package/dist/fs-private.js +224 -0
- package/dist/fs-private.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/journal/index-store.d.ts.map +1 -1
- package/dist/journal/index-store.js +9 -24
- package/dist/journal/index-store.js.map +1 -1
- package/dist/model/decision.d.ts +3 -0
- package/dist/model/decision.d.ts.map +1 -1
- package/dist/model/decision.js.map +1 -1
- package/dist/model/demand.d.ts +19 -1
- package/dist/model/demand.d.ts.map +1 -1
- package/dist/model/demand.js +4 -0
- package/dist/model/demand.js.map +1 -1
- package/dist/read/commands.d.ts +2 -0
- package/dist/read/commands.d.ts.map +1 -1
- package/dist/read/commands.js +3 -1
- package/dist/read/commands.js.map +1 -1
- package/dist/report/owner-table-qualified.d.ts +28 -0
- package/dist/report/owner-table-qualified.d.ts.map +1 -1
- package/dist/report/owner-table-qualified.js +90 -8
- package/dist/report/owner-table-qualified.js.map +1 -1
- package/dist/report/owner-table-scope.d.ts +13 -1
- package/dist/report/owner-table-scope.d.ts.map +1 -1
- package/dist/report/owner-table-scope.js +35 -6
- package/dist/report/owner-table-scope.js.map +1 -1
- package/dist/report/owner-table-strings.d.ts +43 -3
- package/dist/report/owner-table-strings.d.ts.map +1 -1
- package/dist/report/owner-table-strings.js +86 -18
- package/dist/report/owner-table-strings.js.map +1 -1
- package/dist/report/owner-table.d.ts +21 -1
- package/dist/report/owner-table.d.ts.map +1 -1
- package/dist/report/owner-table.js +98 -1
- package/dist/report/owner-table.js.map +1 -1
- package/dist/state/fold.d.ts.map +1 -1
- package/dist/state/fold.js +47 -0
- package/dist/state/fold.js.map +1 -1
- package/dist/track.d.ts +26 -1
- package/dist/track.d.ts.map +1 -1
- package/dist/track.js +72 -0
- package/dist/track.js.map +1 -1
- package/dist/write-policy.d.ts +83 -0
- package/dist/write-policy.d.ts.map +1 -0
- package/dist/write-policy.js +290 -0
- package/dist/write-policy.js.map +1 -0
- package/package.json +1 -1
- package/skills/present-decision/SKILL.md +24 -25
- package/skills/present-decision/assets/dossier-template.md +2 -3
- package/skills/present-decision/assets/self-audit.md +11 -10
package/dist/cli/index.js
CHANGED
|
@@ -7,10 +7,14 @@ import { EventStore } from '../events/store.js';
|
|
|
7
7
|
import { validate } from '../events/validate.js';
|
|
8
8
|
import { cmdEventsContains } from './events-contains.js';
|
|
9
9
|
import { cmdAdopt } from './adopt.js';
|
|
10
|
+
import { cmdCapture } from '../capture/cli.js';
|
|
11
|
+
import { readCaptureViewForIdentity } from '../capture/reader.js';
|
|
12
|
+
import { maskSecrets } from '../capture/secrets.js';
|
|
10
13
|
import { cmdInstallSkills } from './install-skills.js';
|
|
11
14
|
import { initTrackDir, resolveTrackDir, resolveTrackDirOrNull } from './resolve.js';
|
|
12
15
|
import { resolveJournalOfReference } from './journal-reference.js';
|
|
13
16
|
import { cmdJournal } from './journal.js';
|
|
17
|
+
import { readWritePolicy } from '../write-policy.js';
|
|
14
18
|
import { resolveOwnerTablePolicyFile, trackStateHome } from '../state-home.js';
|
|
15
19
|
import { canonicalPath, identityOf, isInsideDir, isJournalIdentity, projectIdentity, tmpCeilingFor } from '../journal/identity.js';
|
|
16
20
|
import { deriveLabelFromIndex, readJournalIndex } from '../journal/index-store.js';
|
|
@@ -33,9 +37,12 @@ const USAGE = `usage: track <command>
|
|
|
33
37
|
--help | help
|
|
34
38
|
global read/store override: --track-dir <directory-containing-events.jsonl> (or TRACK_DIR)
|
|
35
39
|
may appear before or after the command; it redirects reads AND writes to that directory
|
|
40
|
+
global write-policy token: --writer-token-file <path> (or TRACK_WRITER_TOKEN)
|
|
41
|
+
may appear before or after the command; presents the exclusive writer token
|
|
36
42
|
--version | -v
|
|
37
43
|
init
|
|
38
|
-
journal which [--format json|text] | designate <dir> [--by <name>] | attach --to <dir>
|
|
44
|
+
journal which [--format json|text] | designate <dir> [--by <name>] | attach --to <dir> | declare-writer --holder <name> [--token-file <path>] | takeover --holder <name> --reason <text> [--token-file <path>] | release | status [--format json|text]
|
|
45
|
+
capture add|register|status|list|remind|classify|inscribe|acknowledge ...
|
|
39
46
|
item new --kind <feature|bug|chore> --title <t> --workspace <w> [--body <b>] [--parent <id>] [--role <workpackage|spec-phase|stream>] [--accountable <a>] [--responsible <a,a>] [--link <kind=locator>] (repeatable --link; trim actor IDs; blank responsible members are dropped)
|
|
40
47
|
item link <itemId> --kind <kind> --locator <locator> [--reason <text>] [--client-token <t>] (attach one link/pin to an existing item; kind spec-exempt requires --reason)
|
|
41
48
|
item reparent <itemId> [--parent <pid>] [--detach]
|
|
@@ -111,7 +118,10 @@ function eventsPathOf(trackDir) {
|
|
|
111
118
|
return join(trackDir, 'events.jsonl');
|
|
112
119
|
}
|
|
113
120
|
function store(ctx) {
|
|
114
|
-
return new EventStore(ctx.eventsPath
|
|
121
|
+
return new EventStore(ctx.eventsPath, {
|
|
122
|
+
...(ctx.writerTokenFile !== undefined ? { writerTokenFile: ctx.writerTokenFile } : {}),
|
|
123
|
+
...(ctx.io.env !== undefined ? { env: ctx.io.env } : {}),
|
|
124
|
+
});
|
|
115
125
|
}
|
|
116
126
|
function gitHead(cwd) {
|
|
117
127
|
try {
|
|
@@ -438,6 +448,28 @@ function extractTrackDirFlag(argv) {
|
|
|
438
448
|
}
|
|
439
449
|
return trackDirFlag !== undefined ? { trackDirFlag, rest } : { rest };
|
|
440
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Pull a global `--writer-token-file <path>` out of argv BEFORE per-command parsing (plan/07 Lot 3),
|
|
453
|
+
* mirroring `extractTrackDirFlag`. Fails closed when `--writer-token-file` is passed without a path.
|
|
454
|
+
*/
|
|
455
|
+
function extractWriterTokenFileFlag(argv, cwd) {
|
|
456
|
+
const rest = [];
|
|
457
|
+
let writerTokenFile;
|
|
458
|
+
for (let i = 0; i < argv.length; i++) {
|
|
459
|
+
const a = argv[i];
|
|
460
|
+
if (a === '--writer-token-file') {
|
|
461
|
+
const next = argv[i + 1];
|
|
462
|
+
if (next === undefined || next.startsWith('--')) {
|
|
463
|
+
throw new DomainError('--writer-token-file requires a path');
|
|
464
|
+
}
|
|
465
|
+
writerTokenFile = isAbsolute(next) ? next : resolve(cwd, next);
|
|
466
|
+
i++;
|
|
467
|
+
continue;
|
|
468
|
+
}
|
|
469
|
+
rest.push(a);
|
|
470
|
+
}
|
|
471
|
+
return writerTokenFile !== undefined ? { writerTokenFile, rest } : { rest };
|
|
472
|
+
}
|
|
441
473
|
/**
|
|
442
474
|
* Request-lifecycle Part 1 (Lot L2) — pull a REPEATABLE value flag's occurrences out of argv.
|
|
443
475
|
* `parseFlags` keeps only the LAST occurrence of a repeated key, so `item new --link a --link b`
|
|
@@ -484,7 +516,19 @@ Rebind the exact rendering context with --scope/--period/--since/--until/--now/-
|
|
|
484
516
|
--track-dir is a global override and may appear before or after the command. It selects the directory that contains events.jsonl; it is especially useful for a read-only fixture. TRACK_DIR is the environment equivalent.
|
|
485
517
|
`;
|
|
486
518
|
export function runCli(rawArgv, io) {
|
|
487
|
-
const { trackDirFlag, rest:
|
|
519
|
+
const { trackDirFlag, rest: argvAfterTrackDir } = extractTrackDirFlag(rawArgv);
|
|
520
|
+
let writerTokenFile;
|
|
521
|
+
let argv;
|
|
522
|
+
try {
|
|
523
|
+
const extracted = extractWriterTokenFileFlag(argvAfterTrackDir, io.cwd);
|
|
524
|
+
writerTokenFile = extracted.writerTokenFile;
|
|
525
|
+
argv = extracted.rest;
|
|
526
|
+
}
|
|
527
|
+
catch (error) {
|
|
528
|
+
const rawMsg = error instanceof Error ? error.message : String(error);
|
|
529
|
+
io.err(`error: ${maskSecrets(rawMsg).text}\n`);
|
|
530
|
+
return 1;
|
|
531
|
+
}
|
|
488
532
|
const cmd = argv[0];
|
|
489
533
|
const rest = argv.slice(1);
|
|
490
534
|
if (cmd === '--help' || cmd === 'help' || cmd === undefined) {
|
|
@@ -495,7 +539,7 @@ export function runCli(rawArgv, io) {
|
|
|
495
539
|
io.out(REPORT_USAGE);
|
|
496
540
|
return 0;
|
|
497
541
|
}
|
|
498
|
-
const trackDirEnv = process.env['TRACK_DIR'];
|
|
542
|
+
const trackDirEnv = (io.env ?? process.env)['TRACK_DIR'];
|
|
499
543
|
const resolveOpts = {
|
|
500
544
|
cwd: io.cwd,
|
|
501
545
|
...(trackDirFlag !== undefined ? { flag: trackDirFlag } : {}),
|
|
@@ -513,24 +557,25 @@ export function runCli(rawArgv, io) {
|
|
|
513
557
|
return cmdDecisionLs(rest, {
|
|
514
558
|
io,
|
|
515
559
|
eventsPath: trackDir !== null ? eventsPathOf(trackDir) : eventsPathOf(join(resolve(io.cwd), '.track')),
|
|
560
|
+
writerTokenFile,
|
|
516
561
|
});
|
|
517
562
|
}
|
|
518
563
|
// `demand raise` and `decision number` resolve their journal via `resolveJournalOfReference`
|
|
519
564
|
// (spec DS-6: main checkout from a linked worktree, temp-root ceiling included, never falling
|
|
520
565
|
// back to `resolveTrackDir`).
|
|
521
566
|
if (cmd === 'demand' && rest[0] === 'raise') {
|
|
522
|
-
const ref = resolveJournalOfReference(resolveOpts);
|
|
567
|
+
const ref = resolveJournalOfReference({ ...resolveOpts, processEnv: io.env ?? process.env });
|
|
523
568
|
if (ref.trackDir === null) {
|
|
524
569
|
throw new DomainError(formatOwnerTableNoJournalMessage(io.cwd, ref.reason));
|
|
525
570
|
}
|
|
526
|
-
return cmdDemandRaise(rest.slice(1), { io, eventsPath: eventsPathOf(ref.trackDir) });
|
|
571
|
+
return cmdDemandRaise(rest.slice(1), { io, eventsPath: eventsPathOf(ref.trackDir), writerTokenFile });
|
|
527
572
|
}
|
|
528
573
|
if (cmd === 'decision' && rest[0] === 'number') {
|
|
529
|
-
const ref = resolveJournalOfReference(resolveOpts);
|
|
574
|
+
const ref = resolveJournalOfReference({ ...resolveOpts, processEnv: io.env ?? process.env });
|
|
530
575
|
if (ref.trackDir === null) {
|
|
531
576
|
throw new DomainError(formatOwnerTableNoJournalMessage(io.cwd, ref.reason));
|
|
532
577
|
}
|
|
533
|
-
return cmdDecisionNumber(rest.slice(1), { io, eventsPath: eventsPathOf(ref.trackDir) });
|
|
578
|
+
return cmdDecisionNumber(rest.slice(1), { io, eventsPath: eventsPathOf(ref.trackDir), writerTokenFile });
|
|
534
579
|
}
|
|
535
580
|
switch (cmd) {
|
|
536
581
|
case '--version':
|
|
@@ -560,12 +605,13 @@ export function runCli(rawArgv, io) {
|
|
|
560
605
|
// so it dispatches here alongside install-skills/workspace-id, before store resolution.
|
|
561
606
|
return cmdEventsContains(rest, io);
|
|
562
607
|
case 'adopt':
|
|
563
|
-
return cmdAdopt(rest, io, resolveOpts, resolveCommit, cliActor);
|
|
608
|
+
return cmdAdopt(rest, io, resolveOpts, resolveCommit, cliActor, writerTokenFile);
|
|
564
609
|
case 'journal':
|
|
565
|
-
// Journal of reference inspection
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
610
|
+
// Journal of reference inspection, designation/attachment (lot 4a), and write policy (lot 3a).
|
|
611
|
+
return cmdJournal(rest, io, { ...resolveOpts, processEnv: io.env ?? process.env }, writerTokenFile);
|
|
612
|
+
case 'capture':
|
|
613
|
+
// Capture queue, registry, classification, inscription, and acknowledgement (lot 3a).
|
|
614
|
+
return cmdCapture(rest, io, { ...resolveOpts, processEnv: io.env ?? process.env }, cliActor, writerTokenFile);
|
|
569
615
|
// READ commands SERVE-EMPTY (launch/serve alignment): they resolve via the non-throwing
|
|
570
616
|
// `resolveTrackDirOrNull`, so an unadopted repo yields rc=0 + an honest-empty view + a stderr
|
|
571
617
|
// `track init` hint, never a boot crash. NEVER creates. A bad EXPLICIT override still throws
|
|
@@ -645,7 +691,7 @@ export function runCli(rawArgv, io) {
|
|
|
645
691
|
case 'restructure':
|
|
646
692
|
case 'ingest':
|
|
647
693
|
case 'reseal': {
|
|
648
|
-
const ctx = { io, eventsPath: eventsPathOf(resolveTrackDir(resolveOpts)) };
|
|
694
|
+
const ctx = { io, eventsPath: eventsPathOf(resolveTrackDir(resolveOpts)), writerTokenFile };
|
|
649
695
|
switch (cmd) {
|
|
650
696
|
case 'item':
|
|
651
697
|
return cmdItem(rest, ctx);
|
|
@@ -682,7 +728,8 @@ export function runCli(rawArgv, io) {
|
|
|
682
728
|
}
|
|
683
729
|
}
|
|
684
730
|
catch (error) {
|
|
685
|
-
|
|
731
|
+
const rawMsg = error instanceof Error ? error.message : String(error);
|
|
732
|
+
io.err(`error: ${maskSecrets(rawMsg).text}\n`);
|
|
686
733
|
return 1;
|
|
687
734
|
}
|
|
688
735
|
}
|
|
@@ -1017,7 +1064,11 @@ function cmdRestructure(args, ctx) {
|
|
|
1017
1064
|
catch {
|
|
1018
1065
|
throw new DomainError('restructure apply: --plan must be a valid JSON plan file');
|
|
1019
1066
|
}
|
|
1020
|
-
const res = applyRestructurePlan(ctx.eventsPath, plan, {
|
|
1067
|
+
const res = applyRestructurePlan(ctx.eventsPath, plan, {
|
|
1068
|
+
by: cliActor(io.cwd),
|
|
1069
|
+
...(ctx.writerTokenFile !== undefined ? { writerTokenFile: ctx.writerTokenFile } : {}),
|
|
1070
|
+
...(io.env !== undefined ? { env: io.env } : {}),
|
|
1071
|
+
});
|
|
1021
1072
|
io.out(`applied ${res.applied} edge(s) of ${res.edges} (${res.alreadyApplied} already applied) [plan ${res.planHash}]\n`);
|
|
1022
1073
|
return 0;
|
|
1023
1074
|
}
|
|
@@ -1566,10 +1617,52 @@ function cmdReport(args, ctx, noTrackDir = false, journalRef) {
|
|
|
1566
1617
|
}
|
|
1567
1618
|
const reader = new TrackReader(ctx.eventsPath);
|
|
1568
1619
|
if (ownerTable) {
|
|
1620
|
+
const procEnv = io.env ?? process.env;
|
|
1621
|
+
const ceiling = tmpCeilingFor(io.cwd);
|
|
1622
|
+
const stateHome = trackStateHome(procEnv);
|
|
1623
|
+
const indexAllowed = ceiling === undefined ||
|
|
1624
|
+
isInsideDir(resolve(stateHome), resolve(ceiling)) ||
|
|
1625
|
+
isInsideDir(canonicalPath(stateHome), canonicalPath(ceiling));
|
|
1626
|
+
const captureView = indexAllowed && journalRef !== undefined
|
|
1627
|
+
? readCaptureViewForIdentity(journalRef.identity, { env: procEnv, now: periodClock })
|
|
1628
|
+
: undefined;
|
|
1569
1629
|
if (noTrackDir) {
|
|
1630
|
+
// DS-2 (spec §4 G4, §5, §7.1): active capture without a journal is a readable source —
|
|
1631
|
+
// render header, captured-not-inscribed section and partial-scope sentence, exit 0, write nothing.
|
|
1632
|
+
if (journalRef?.captureActive === true && captureView !== undefined) {
|
|
1633
|
+
const resolvedPolicy = resolveOwnerTablePolicyFile({
|
|
1634
|
+
flagPolicyPath: opt(flags, 'policy'),
|
|
1635
|
+
env: procEnv,
|
|
1636
|
+
});
|
|
1637
|
+
const policyFound = resolvedPolicy.policyPath !== undefined && existsSync(resolvedPolicy.policyPath);
|
|
1638
|
+
const emptyView = {
|
|
1639
|
+
kind: 'owner-table-report',
|
|
1640
|
+
rows: [],
|
|
1641
|
+
decisions: [],
|
|
1642
|
+
replyLine: '',
|
|
1643
|
+
registeredNumbers: [],
|
|
1644
|
+
archivedNumbers: [],
|
|
1645
|
+
...(resolvedPolicy.policyPath !== undefined ? { policyPath: resolvedPolicy.policyPath } : {}),
|
|
1646
|
+
statePolicyPath: resolvedPolicy.statePolicyPath,
|
|
1647
|
+
};
|
|
1648
|
+
const qualified = buildQualifiedOwnerTable(emptyView, {
|
|
1649
|
+
now: periodClock,
|
|
1650
|
+
mode: strict ? 'strict' : 'default',
|
|
1651
|
+
policyFound,
|
|
1652
|
+
captureView,
|
|
1653
|
+
header: {
|
|
1654
|
+
label: journalRef.label,
|
|
1655
|
+
resolution: journalRef.resolution ?? 'dossier',
|
|
1656
|
+
noJournal: true,
|
|
1657
|
+
},
|
|
1658
|
+
...(resolvedPolicy.policyPath !== undefined ? { policyPath: resolvedPolicy.policyPath } : {}),
|
|
1659
|
+
statePolicyPath: resolvedPolicy.statePolicyPath,
|
|
1660
|
+
});
|
|
1661
|
+
io.out(renderQualifiedOwnerTable(qualified, format));
|
|
1662
|
+
return 0;
|
|
1663
|
+
}
|
|
1570
1664
|
throw new DomainError(formatOwnerTableNoJournalMessage(io.cwd, journalRef?.reason));
|
|
1571
1665
|
}
|
|
1572
|
-
const procEnv = io.env ?? process.env;
|
|
1573
1666
|
const resolvedPolicy = resolveOwnerTablePolicyFile({
|
|
1574
1667
|
flagPolicyPath: opt(flags, 'policy'),
|
|
1575
1668
|
trackDir: dirname(ctx.eventsPath),
|
|
@@ -1591,11 +1684,6 @@ function cmdReport(args, ctx, noTrackDir = false, journalRef) {
|
|
|
1591
1684
|
io.err(`Notice: ${notice}\n`);
|
|
1592
1685
|
}
|
|
1593
1686
|
}
|
|
1594
|
-
const ceiling = tmpCeilingFor(io.cwd);
|
|
1595
|
-
const stateHome = trackStateHome(procEnv);
|
|
1596
|
-
const indexAllowed = ceiling === undefined ||
|
|
1597
|
-
isInsideDir(resolve(stateHome), resolve(ceiling)) ||
|
|
1598
|
-
isInsideDir(canonicalPath(stateHome), canonicalPath(ceiling));
|
|
1599
1687
|
const journalIndex = indexAllowed ? readJournalIndex(procEnv) : { version: 1, identities: {} };
|
|
1600
1688
|
const isOffRepo = journalRef?.resolution === 'journal hors dépôt';
|
|
1601
1689
|
const desyncEval = evaluateDesync(tableCtx.state, reader.journalProjectDir(), {
|
|
@@ -1604,6 +1692,7 @@ function cmdReport(args, ctx, noTrackDir = false, journalRef) {
|
|
|
1604
1692
|
offRepo: isOffRepo,
|
|
1605
1693
|
fallbackRoot: journalRef?.identityRoot ?? null,
|
|
1606
1694
|
});
|
|
1695
|
+
const writePolicy = readWritePolicy(ctx.eventsPath);
|
|
1607
1696
|
// Origin labels for rows raised from an identity different from the journal's own identity (lot 4a).
|
|
1608
1697
|
const journalOwnIdentity = journalRef?.conductorIdentity ??
|
|
1609
1698
|
(isOffRepo
|
|
@@ -1634,6 +1723,8 @@ function cmdReport(args, ctx, noTrackDir = false, journalRef) {
|
|
|
1634
1723
|
unverifiedDocsCount: desyncEval.unverifiedCount,
|
|
1635
1724
|
unassignedJournal: journalRef !== undefined && !journalRef.designated && journalRef.knownCopies > 1,
|
|
1636
1725
|
rowOriginLabels,
|
|
1726
|
+
writePolicy: { mode: writePolicy.mode, holder: writePolicy.holder },
|
|
1727
|
+
...(captureView !== undefined ? { captureView } : {}),
|
|
1637
1728
|
header: {
|
|
1638
1729
|
...(journalRef?.label !== undefined ? { label: journalRef.label } : {}),
|
|
1639
1730
|
resolution: journalRef?.resolution ?? 'dossier',
|