@venizia/vulcan 0.4.9-4 → 0.4.9-5

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.
Files changed (46) hide show
  1. package/base/ci-global.json +13 -0
  2. package/base/claude/events.json +60 -0
  3. package/base/hooks/event.ts +37 -0
  4. package/base/rules.md +1 -1
  5. package/base/templates/ci/github-actions.yml +75 -0
  6. package/base/templates/ci/gitlab-ci.yml +52 -0
  7. package/package.json +3 -3
  8. package/src/ci/affected.ts +176 -0
  9. package/src/ci/command.ts +166 -0
  10. package/src/ci/common/constants.ts +76 -0
  11. package/src/ci/common/index.ts +2 -0
  12. package/src/ci/common/types.ts +37 -0
  13. package/src/ci/git.ts +72 -0
  14. package/src/ci/global.ts +48 -0
  15. package/src/ci/graph.ts +43 -0
  16. package/src/ci/index.ts +7 -0
  17. package/src/ci/workspace.ts +119 -0
  18. package/src/commands/ci.command.ts +4 -0
  19. package/src/commands/clean.command.ts +3 -5
  20. package/src/commands/event.command.ts +5 -0
  21. package/src/commands/help.command.ts +10 -2
  22. package/src/commands/index.ts +3 -0
  23. package/src/common/constants.ts +10 -0
  24. package/src/config/common/constants.ts +1 -0
  25. package/src/config/schema.ts +49 -0
  26. package/src/doctor/checks.ts +81 -7
  27. package/src/doctor/common/constants.ts +1 -0
  28. package/src/doctor/runner.ts +2 -0
  29. package/src/events/actor.ts +116 -0
  30. package/src/events/command.ts +191 -0
  31. package/src/events/common/constants.ts +118 -0
  32. package/src/events/common/index.ts +2 -0
  33. package/src/events/common/types.ts +39 -0
  34. package/src/events/flow.ts +92 -0
  35. package/src/events/hook.ts +163 -0
  36. package/src/events/index.ts +8 -0
  37. package/src/events/log.ts +162 -0
  38. package/src/events/settings.ts +80 -0
  39. package/src/events/text.ts +49 -0
  40. package/src/local/constants.ts +36 -1
  41. package/src/local/scan.ts +256 -27
  42. package/src/manifest/render.ts +18 -0
  43. package/src/router.ts +24 -0
  44. package/src/sync/common/constants.ts +2 -0
  45. package/src/sync/local-choice.ts +3 -3
  46. package/src/sync/planner.ts +10 -1
@@ -0,0 +1,163 @@
1
+ import { RecordValue } from '../common/record.ts';
2
+ import { ClaudeHookEvents, EventConstants, EventKinds, EventSources } from './common/index.ts';
3
+ import type { IEvent, IHookEvent } from './common/index.ts';
4
+ import { EventActor } from './actor.ts';
5
+ import { EventFlow } from './flow.ts';
6
+ import { EventLog } from './log.ts';
7
+ import { EventSettings } from './settings.ts';
8
+ import { EventText } from './text.ts';
9
+
10
+ const text = (opts: { value: unknown }): string =>
11
+ typeof opts.value === 'string' ? opts.value : '';
12
+
13
+ /** What Claude Code tells a hook, turned into log lines. It reads names and short labels, never bodies. */
14
+ export class EventHook {
15
+ /**
16
+ * The event a payload stands for, or `undefined` when the payload is not one to log. Only these fields are
17
+ * read: `source` and `model` of a session start, `stop_hook_active` of a stop, `agent_type` and `agent_id` of a
18
+ * subagent stop, `notification_type` and `title` of a notification, and `to` and `summary` of a SendMessage
19
+ * call (its first line, only when the sender gave no summary). `last_assistant_message`, `message`,
20
+ * `tool_response` and every command stay unread.
21
+ */
22
+ static map(opts: { input: unknown }): IHookEvent | undefined {
23
+ const { input } = opts;
24
+
25
+ if (!RecordValue.isRecord(input)) {
26
+ return undefined;
27
+ }
28
+
29
+ switch (input.hook_event_name) {
30
+ case ClaudeHookEvents.SESSION_START: {
31
+ return {
32
+ kind: EventKinds.SESSION_START,
33
+ summary: [text({ value: input.source }), text({ value: input.model })]
34
+ .filter((word) => word !== '')
35
+ .join(' '),
36
+ };
37
+ }
38
+
39
+ case ClaudeHookEvents.STOP: {
40
+ return input.stop_hook_active === true
41
+ ? undefined
42
+ : { kind: EventKinds.SESSION_STOP, summary: 'turn ended' };
43
+ }
44
+
45
+ case ClaudeHookEvents.SUBAGENT_STOP: {
46
+ return {
47
+ kind: EventKinds.SUBAGENT_STOP,
48
+ summary: [text({ value: input.agent_type }), text({ value: input.agent_id })]
49
+ .filter((word) => word !== '')
50
+ .join(' '),
51
+ };
52
+ }
53
+
54
+ case ClaudeHookEvents.NOTIFICATION: {
55
+ const type = text({ value: input.notification_type });
56
+
57
+ return ClaudeHookEvents.OWNER_NOTIFICATIONS.has(type)
58
+ ? { kind: EventKinds.NEEDS_OWNER, summary: text({ value: input.title }) || type }
59
+ : undefined;
60
+ }
61
+
62
+ case ClaudeHookEvents.POST_TOOL_USE: {
63
+ return EventHook.mapSend({ input });
64
+ }
65
+
66
+ default: {
67
+ return undefined;
68
+ }
69
+ }
70
+ }
71
+
72
+ /**
73
+ * Who a message went to, without where. A name stays as it is; an address with a path (`uds:/run/user/1000/cc-socks/3326301.sock`)
74
+ * keeps its scheme and the last part of the path, so no folder of the machine is logged.
75
+ */
76
+ private static recipientOf(opts: { to: string }): string {
77
+ if (!/[\\/]/.test(opts.to)) {
78
+ return opts.to;
79
+ }
80
+
81
+ const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(opts.to)?.[1];
82
+ const last =
83
+ opts.to
84
+ .split(/[\\/]/)
85
+ .filter((part) => part !== '')
86
+ .pop() ?? '';
87
+
88
+ return scheme === undefined ? last : `${scheme}:${last}`;
89
+ }
90
+
91
+ private static mapSend(opts: { input: Record<string, unknown> }): IHookEvent | undefined {
92
+ const { input } = opts;
93
+ const call = input.tool_input;
94
+
95
+ if (input.tool_name !== ClaudeHookEvents.SEND_MESSAGE_TOOL || !RecordValue.isRecord(call)) {
96
+ return undefined;
97
+ }
98
+
99
+ // Only a send that failed on its own account is left out; a reply shape this does not know still logs.
100
+ if (RecordValue.isRecord(input.tool_response) && input.tool_response.success === false) {
101
+ return undefined;
102
+ }
103
+
104
+ const message = text({ value: call.message });
105
+ const label = EventText.oneLine({
106
+ text: text({ value: call.summary }),
107
+ max: EventConstants.SUMMARY_MAX,
108
+ });
109
+ const recipient = text({ value: call.to });
110
+
111
+ return {
112
+ kind: EventKinds.MSG_SENT,
113
+ summary: label === '' ? EventConstants.MESSAGE_SENT_LABEL : label,
114
+ ...(recipient === '' ? {} : { ref: `to:${EventHook.recipientOf({ to: recipient })}` }),
115
+ flowText: message,
116
+ };
117
+ }
118
+
119
+ /**
120
+ * Logs what a payload stands for, when the manifest says the log is on. Returns the line it wrote.
121
+ * `root` is the project, where the manifest is; the flow comes from the message, else the branch at the
122
+ * payload's `cwd`.
123
+ */
124
+ static run(opts: {
125
+ root: string;
126
+ input: unknown;
127
+ env: Record<string, string | undefined>;
128
+ now?: number;
129
+ }): IEvent | undefined {
130
+ const settings = EventSettings.read({ root: opts.root });
131
+
132
+ if (!settings.log) {
133
+ return undefined;
134
+ }
135
+
136
+ const mapped = EventHook.map({ input: opts.input });
137
+
138
+ if (mapped === undefined || !RecordValue.isRecord(opts.input)) {
139
+ return undefined;
140
+ }
141
+
142
+ const cwd = text({ value: opts.input.cwd }) || opts.root;
143
+ const flowId =
144
+ (mapped.flowText === undefined ? undefined : EventFlow.fromText({ text: mapped.flowText })) ??
145
+ EventFlow.fromBranch({ cwd });
146
+ const event = EventLog.build({
147
+ kind: mapped.kind,
148
+ summary: mapped.summary,
149
+ actor: EventActor.resolve({
150
+ sessionId: text({ value: opts.input.session_id }),
151
+ env: opts.env,
152
+ }),
153
+ source: EventSources.CLAUDE_HOOK,
154
+ ...(flowId === undefined ? {} : { flowId }),
155
+ ...(mapped.ref === undefined ? {} : { ref: mapped.ref }),
156
+ ...(opts.now === undefined ? {} : { now: opts.now }),
157
+ });
158
+
159
+ EventLog.append({ dir: EventSettings.dirOf({ root: opts.root, settings }), event });
160
+
161
+ return event;
162
+ }
163
+ }
@@ -0,0 +1,8 @@
1
+ export * from './common/index.ts';
2
+ export * from './actor.ts';
3
+ export * from './command.ts';
4
+ export * from './flow.ts';
5
+ export * from './hook.ts';
6
+ export * from './log.ts';
7
+ export * from './settings.ts';
8
+ export * from './text.ts';
@@ -0,0 +1,162 @@
1
+ import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { RecordValue } from '../common/record.ts';
4
+ import { EventConstants, EventKinds } from './common/index.ts';
5
+ import type { IEvent, IEventRead, TEventKind } from './common/index.ts';
6
+ import { EventText } from './text.ts';
7
+
8
+ const DAY_FILE = /^(\d{4}-\d{2}-\d{2})\.jsonl$/;
9
+ const ID_TIME_WIDTH = 9;
10
+ const ID_RANDOM_BYTES = 4;
11
+
12
+ /** The append-only log: one JSON line per event, one file per local day, in one folder. */
13
+ export class EventLog {
14
+ /** Time-ordered and collision-safe across sessions: the time in base 36, then 8 random hex digits. */
15
+ static newId(opts: { now?: number }): string {
16
+ const time = (opts.now ?? Date.now()).toString(36).padStart(ID_TIME_WIDTH, '0');
17
+ const random = Array.from(crypto.getRandomValues(new Uint8Array(ID_RANDOM_BYTES)))
18
+ .map((byte) => byte.toString(16).padStart(2, '0'))
19
+ .join('');
20
+
21
+ return `${time}${random}`;
22
+ }
23
+
24
+ /** `yyyy-mm-dd` of a moment, in the local time zone: the name of the day file. */
25
+ static dayOf(opts: { time: number }): string {
26
+ const date = new Date(opts.time);
27
+ const month = String(date.getMonth() + 1).padStart(2, '0');
28
+ const day = String(date.getDate()).padStart(2, '0');
29
+
30
+ return `${date.getFullYear()}-${month}-${day}`;
31
+ }
32
+
33
+ /** An event with its text made safe: one line, secrets redacted, limits applied. */
34
+ static build(opts: {
35
+ kind: TEventKind;
36
+ summary: string;
37
+ actor: string;
38
+ source: string;
39
+ flowId?: string;
40
+ ref?: string;
41
+ now?: number;
42
+ }): IEvent {
43
+ const now = opts.now ?? Date.now();
44
+ const ref =
45
+ opts.ref === undefined
46
+ ? ''
47
+ : EventText.oneLine({ text: opts.ref, max: EventConstants.REF_MAX });
48
+
49
+ return {
50
+ id: EventLog.newId({ now }),
51
+ ts: new Date(now).toISOString(),
52
+ ...(opts.flowId === undefined ? {} : { flowId: opts.flowId }),
53
+ actor: opts.actor,
54
+ kind: opts.kind,
55
+ summary: EventText.oneLine({ text: opts.summary, max: EventConstants.SUMMARY_MAX }),
56
+ ...(ref === '' ? {} : { ref }),
57
+ source: opts.source,
58
+ };
59
+ }
60
+
61
+ /** Adds the event to the day file of its time as one write, so sessions writing at once do not interleave. */
62
+ static append(opts: { dir: string; event: IEvent }): string {
63
+ const file = join(
64
+ opts.dir,
65
+ `${EventLog.dayOf({ time: Date.parse(opts.event.ts) })}${EventConstants.FILE_SUFFIX}`,
66
+ );
67
+
68
+ mkdirSync(opts.dir, { recursive: true });
69
+ appendFileSync(file, `${JSON.stringify(opts.event)}\n`);
70
+
71
+ return file;
72
+ }
73
+
74
+ /**
75
+ * Every event at or after `since` (milliseconds), oldest first. A line that is not an event is counted
76
+ * and skipped. A folder that does not exist holds no events.
77
+ */
78
+ static read(opts: { dir: string; since?: number }): IEventRead {
79
+ if (!existsSync(opts.dir)) {
80
+ return { events: [], skipped: 0 };
81
+ }
82
+
83
+ // A day file holds the local day of its events; one day earlier covers a reader in another zone.
84
+ const first =
85
+ opts.since === undefined
86
+ ? undefined
87
+ : EventLog.dayOf({ time: opts.since - EventConstants.DAY_MS });
88
+ const files = readdirSync(opts.dir)
89
+ .filter((name) => DAY_FILE.test(name) && (first === undefined || name >= first))
90
+ .sort();
91
+ const events: IEvent[] = [];
92
+ let skipped = 0;
93
+
94
+ for (const name of files) {
95
+ for (const line of readFileSync(join(opts.dir, name), 'utf8').split('\n')) {
96
+ if (line.trim() === '') {
97
+ continue;
98
+ }
99
+
100
+ const event = EventLog.parse({ line });
101
+
102
+ if (event === undefined) {
103
+ skipped++;
104
+ } else if (opts.since === undefined || Date.parse(event.ts) >= opts.since) {
105
+ events.push(event);
106
+ }
107
+ }
108
+ }
109
+
110
+ events.sort((left, right) =>
111
+ left.ts === right.ts ? left.id.localeCompare(right.id) : left.ts.localeCompare(right.ts),
112
+ );
113
+
114
+ return { events, skipped };
115
+ }
116
+
117
+ /** One line as an event, or `undefined` when it is not the shape this writes. */
118
+ static parse(opts: { line: string }): IEvent | undefined {
119
+ let value: unknown;
120
+
121
+ try {
122
+ value = JSON.parse(opts.line);
123
+ } catch {
124
+ return undefined;
125
+ }
126
+
127
+ if (!RecordValue.isRecord(value)) {
128
+ return undefined;
129
+ }
130
+
131
+ const { id, ts, flowId, actor, kind, summary, ref, source } = value;
132
+
133
+ if (
134
+ typeof id !== 'string' ||
135
+ typeof ts !== 'string' ||
136
+ !Number.isFinite(Date.parse(ts)) ||
137
+ typeof actor !== 'string' ||
138
+ typeof kind !== 'string' ||
139
+ !EventKinds.isValid(kind) ||
140
+ typeof summary !== 'string' ||
141
+ typeof source !== 'string' ||
142
+ (flowId !== undefined && typeof flowId !== 'string') ||
143
+ (ref !== undefined && typeof ref !== 'string')
144
+ ) {
145
+ return undefined;
146
+ }
147
+
148
+ // A reader prints these: whatever a writer put there, no control character reaches a terminal.
149
+ const clean = (field: string): string => EventText.stripControl({ text: field });
150
+
151
+ return {
152
+ id: clean(id),
153
+ ts: clean(ts),
154
+ ...(flowId === undefined ? {} : { flowId: clean(flowId) }),
155
+ actor: clean(actor),
156
+ kind: kind as TEventKind,
157
+ summary: clean(summary),
158
+ ...(ref === undefined ? {} : { ref: clean(ref) }),
159
+ source: clean(source),
160
+ };
161
+ }
162
+ }
@@ -0,0 +1,80 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { dirname, isAbsolute, join, resolve } from 'node:path';
3
+ import { RecordValue } from '../common/record.ts';
4
+ import { EventConstants } from './common/index.ts';
5
+ import type { IEventSettings } from './common/index.ts';
6
+
7
+ /** Where the log is and whether the Claude Code hooks write it: the `events` block of the manifest `vulcan sync` wrote. */
8
+ export class EventSettings {
9
+ /** Why `dir` cannot be the shared folder, or `undefined` when it can. */
10
+ static dirError(opts: { dir: string }): string | undefined {
11
+ if (opts.dir.includes('\0')) {
12
+ return 'a folder path cannot contain a NUL character';
13
+ }
14
+
15
+ return isAbsolute(opts.dir)
16
+ ? undefined
17
+ : 'an absolute path, such as /home/me/work/.agents/local/events (~ and relative paths are not expanded)';
18
+ }
19
+
20
+ /**
21
+ * What the manifest says; the log is off, in the project's own folder, when the file, the block or a
22
+ * value is missing or is not what sync writes. It never throws: a hook reads it on every event.
23
+ */
24
+ static read(opts: { root: string }): IEventSettings {
25
+ const file = join(opts.root, EventConstants.MANIFEST_FILE);
26
+
27
+ if (!existsSync(file)) {
28
+ return { log: false };
29
+ }
30
+
31
+ try {
32
+ const manifest: unknown = JSON.parse(readFileSync(file, 'utf8'));
33
+ const block = RecordValue.isRecord(manifest) ? manifest.events : undefined;
34
+
35
+ if (!RecordValue.isRecord(block)) {
36
+ return { log: false };
37
+ }
38
+
39
+ const { dir } = block;
40
+
41
+ return {
42
+ log: block.log === true,
43
+ ...(typeof dir === 'string' && EventSettings.dirError({ dir }) === undefined
44
+ ? { dir }
45
+ : {}),
46
+ };
47
+ } catch {
48
+ return { log: false };
49
+ }
50
+ }
51
+
52
+ /**
53
+ * The project folder a command run in `cwd` belongs to: the nearest folder above it (itself included) that
54
+ * holds the manifest or `.git`, else `cwd`. A command run in a subfolder then reads the same `events` block
55
+ * as one run at the top; a repository inside a project is a project of its own.
56
+ */
57
+ static rootOf(opts: { cwd: string }): string {
58
+ const start = resolve(opts.cwd);
59
+
60
+ for (let directory = start; ; directory = dirname(directory)) {
61
+ if (
62
+ existsSync(join(directory, EventConstants.MANIFEST_FILE)) ||
63
+ existsSync(join(directory, '.git'))
64
+ ) {
65
+ return directory;
66
+ }
67
+
68
+ if (dirname(directory) === directory) {
69
+ return start;
70
+ }
71
+ }
72
+ }
73
+
74
+ /** The folder the log lives in: the one asked for, else the manifest's `dir`, else the project's own. */
75
+ static dirOf(opts: { root: string; dir?: string; settings?: IEventSettings }): string {
76
+ const settings = opts.settings ?? EventSettings.read({ root: opts.root });
77
+
78
+ return resolve(opts.root, opts.dir ?? settings.dir ?? EventConstants.DEFAULT_DIRECTORY);
79
+ }
80
+ }
@@ -0,0 +1,49 @@
1
+ import { EventConstants, EventSecrets } from './common/index.ts';
2
+
3
+ /** The words that go into a log line: one line, no secret-shaped token, a fixed length. */
4
+ export class EventText {
5
+ /** `text` with every secret-shaped token replaced. Best effort: the writer keeps secrets out of its summary. */
6
+ static redact(opts: { text: string }): string {
7
+ let text = opts.text;
8
+
9
+ for (const pattern of EventSecrets.PATTERNS) {
10
+ text = text.replace(pattern, EventConstants.REDACTED);
11
+ }
12
+
13
+ return text
14
+ .replace(EventSecrets.URL_USERINFO, `$1${EventConstants.REDACTED}@`)
15
+ .replace(EventSecrets.ASSIGNMENT, `$1=${EventConstants.REDACTED}`)
16
+ .replace(EventSecrets.SPOKEN, `$1 is ${EventConstants.REDACTED}`);
17
+ }
18
+
19
+ /** `text` with each run of control characters (C0, DEL and C1) replaced by one space: what a reader prints is never an escape sequence. */
20
+ static stripControl(opts: { text: string }): string {
21
+ let stripped = '';
22
+ let inRun = false;
23
+
24
+ for (const character of opts.text) {
25
+ const code = character.codePointAt(0) ?? 0;
26
+ const isControl = code <= 0x1f || (code >= 0x7f && code <= 0x9f);
27
+
28
+ if (!isControl) {
29
+ stripped += character;
30
+ } else if (!inRun) {
31
+ stripped += ' ';
32
+ }
33
+
34
+ inRun = isControl;
35
+ }
36
+
37
+ return stripped;
38
+ }
39
+
40
+ /** One line of at most `max` characters: control characters and runs of space become one space, secrets are redacted first. */
41
+ static oneLine(opts: { text: string; max: number }): string {
42
+ const flat = EventText.stripControl({ text: opts.text }).replace(/\s+/g, ' ').trim();
43
+
44
+ return Array.from(EventText.redact({ text: flat }))
45
+ .slice(0, opts.max)
46
+ .join('')
47
+ .trim();
48
+ }
49
+ }
@@ -13,6 +13,8 @@ export class LocalStates {
13
13
  static readonly ORPHAN = 'orphan';
14
14
  /** A worktree on a merged or gone branch that still holds uncommitted or untracked files: never removed. */
15
15
  static readonly DIRTY = 'dirty';
16
+ /** A release candidate whose version has been tagged: the release shipped, so it can go. */
17
+ static readonly SHIPPED = 'shipped';
16
18
  /** git could not say (not a repository, or git is missing): left alone. */
17
19
  static readonly UNKNOWN = 'unknown';
18
20
  }
@@ -26,7 +28,9 @@ export class CleanScopes {
26
28
  static readonly REPORTS = 'reports';
27
29
  static readonly PROTOTYPES = 'prototypes';
28
30
  static readonly PROFILE = 'profile';
29
- /** `--all`: what an agent creates and can recreate. Reports, prototypes and the profile are named, never swept. */
31
+ static readonly EVENTS = 'events';
32
+ static readonly RELEASE_CANDIDATES = 'release-candidates';
33
+ /** `--all`: what an agent creates and can recreate. Reports, prototypes, events, release candidates and the profile are named, never swept. */
30
34
  static readonly ALL = [this.TMP, this.WORKTREES, this.CLONES, this.CACHE];
31
35
  static readonly SCHEME_SET = new Set<string>([
32
36
  this.TMP,
@@ -36,6 +40,8 @@ export class CleanScopes {
36
40
  this.REPORTS,
37
41
  this.PROTOTYPES,
38
42
  this.PROFILE,
43
+ this.EVENTS,
44
+ this.RELEASE_CANDIDATES,
39
45
  ]);
40
46
  static isValid(value: string): boolean {
41
47
  return this.SCHEME_SET.has(value);
@@ -47,4 +53,33 @@ export class LocalConstants {
47
53
  /** `doctor` prints the size of `.agents/local/` once it passes this. */
48
54
  static readonly NOTE_BYTES = 50 * 1024 * 1024;
49
55
  static readonly GIT_TIMEOUT_MS = 10_000;
56
+ /** Files VULCAN itself writes directly under `.agents/local/`; anything else there that is not a layout folder is unknown. */
57
+ static readonly KNOWN_FILES = new Set([
58
+ 'profile.json',
59
+ 'claude.launch.settings.json',
60
+ 'violations.jsonl',
61
+ '.gitkeep',
62
+ ]);
63
+ /**
64
+ * Scratch folders a browser leaves directly under the temp folder it was given (`.agents/local` when it is
65
+ * the folder that is short enough for Chrome's socket). They are tmp that sits one level too high.
66
+ */
67
+ static readonly STRAY_TEMP = [/^\.?com\.google\.Chrome\./, /^\.?org\.chromium\.Chromium\./];
68
+ /** Ignored folders a build or an install makes again; an ignored file outside these keeps a worktree. Data, not code. */
69
+ static readonly REBUILDABLE_DIRECTORIES = [
70
+ 'node_modules',
71
+ 'dist',
72
+ '.turbo',
73
+ 'coverage',
74
+ '.cache',
75
+ ];
76
+ static readonly REBUILDABLE_SUFFIXES = ['.tsbuildinfo'];
77
+ /** The name of a release candidate: a version, with an optional `v`. Any other name in `release-candidates/` is kept. */
78
+ static readonly RELEASE_VERSION = /^v?\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;
79
+ /** How many entries of an ignored directory are looked at before it is reported whole. */
80
+ static readonly IGNORED_WALK_LIMIT = 20_000;
81
+ /** How many ignored files a note names before it says "and N more". */
82
+ static readonly NOTE_FILES = 5;
83
+ /** A stray folder may belong to a browser that is running; one this old does not. */
84
+ static readonly STRAY_MIN_AGE_MS = 60 * 60 * 1000;
50
85
  }