@venizia/vulcan 0.4.9-0 → 0.4.9-2
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/base/extensions/vulcan-guards.ts +48 -41
- package/base/hooks/antigravity-guards.ts +2 -2
- package/base/hooks/codex-guards.ts +15 -5
- package/base/hooks/guard-git.ts +8 -8
- package/base/hooks/guard-manifest.ts +4 -5
- package/base/hooks/guard-outside.ts +8 -8
- package/base/hooks/guard-package.ts +5 -6
- package/base/hooks/guard-remote-hosts.ts +6 -7
- package/base/hooks/guard-scripting.ts +5 -6
- package/base/hooks/guard-writes.ts +8 -9
- package/base/hooks/post-tool.ts +2 -2
- package/base/hooks/prompt-submit.ts +2 -2
- package/base/hooks/session-start.ts +3 -3
- package/base/hooks/stop.ts +2 -2
- package/base/hooks/subagent-start.ts +2 -2
- package/base/skills/docs-update/SKILL.md +4 -2
- package/base/skills/visualize-work/SKILL.md +9 -0
- package/package.json +3 -3
- package/src/agents/atlas-block.ts +43 -43
- package/src/agents/codex-hooks.ts +45 -43
- package/src/agents/detect.ts +19 -16
- package/src/agents/exclude.ts +96 -97
- package/src/agents/hooks-json.ts +38 -36
- package/src/agents/local.ts +46 -43
- package/src/agents/prompt.ts +45 -42
- package/src/agents/render.ts +201 -195
- package/src/agents/resolve.ts +133 -134
- package/src/agents/table.ts +12 -8
- package/src/commands/add.command.ts +2 -2
- package/src/commands/agents.command.ts +11 -17
- package/src/commands/clean.command.ts +6 -6
- package/src/commands/doctor.command.ts +4 -4
- package/src/commands/init.command.ts +12 -8
- package/src/commands/preset.command.ts +2 -2
- package/src/commands/profile.command.ts +42 -49
- package/src/commands/sync.command.ts +109 -111
- package/src/commands/upgrade.command.ts +80 -75
- package/src/commands/visualize.command.ts +7 -13
- package/src/commands/x.command.ts +55 -50
- package/src/common/format.ts +23 -21
- package/src/common/json.ts +8 -5
- package/src/common/layout-folder.ts +94 -91
- package/src/common/paths.ts +14 -12
- package/src/config/loader.ts +52 -49
- package/src/config/packages.ts +14 -11
- package/src/config/schema.ts +3 -3
- package/src/create/add-app.ts +519 -509
- package/src/create/add-lib.ts +237 -240
- package/src/create/bunfig.ts +26 -23
- package/src/create/checks.ts +36 -34
- package/src/create/diff.ts +21 -23
- package/src/create/dockerignore.ts +26 -24
- package/src/create/files.ts +7 -5
- package/src/create/init-monorepo.ts +75 -80
- package/src/create/lib-preset.ts +59 -63
- package/src/create/manifest-json.ts +10 -4
- package/src/create/names.ts +217 -210
- package/src/create/next.ts +26 -23
- package/src/create/plan.ts +15 -12
- package/src/create/preset-diff.ts +301 -303
- package/src/create/preset-menu.ts +38 -32
- package/src/create/preset.ts +202 -197
- package/src/create/process.ts +79 -72
- package/src/create/scratch.ts +48 -49
- package/src/create/workspace.ts +404 -396
- package/src/doctor/checks.ts +1027 -1014
- package/src/doctor/makefile.ts +17 -13
- package/src/doctor/runner.ts +88 -118
- package/src/doctor/skills.ts +97 -95
- package/src/doctor/tags.ts +42 -37
- package/src/hooks/codex-patch.ts +25 -22
- package/src/hooks/command-view.ts +44 -39
- package/src/hooks/decision.ts +37 -37
- package/src/hooks/guard-git.ts +51 -49
- package/src/hooks/guard-manifest.ts +58 -55
- package/src/hooks/guard-outside.ts +93 -91
- package/src/hooks/guard-package.ts +82 -79
- package/src/hooks/guard-scripting.ts +19 -14
- package/src/hooks/guard-writes.ts +154 -149
- package/src/hooks/owner-reply.ts +127 -127
- package/src/hooks/post-tool.ts +94 -93
- package/src/hooks/project-guards.ts +65 -62
- package/src/hooks/project-tmp.ts +27 -24
- package/src/hooks/remote-hosts.ts +153 -130
- package/src/hooks/session-digest.ts +98 -101
- package/src/hooks/shell.ts +509 -499
- package/src/hooks/subagent-card.ts +11 -7
- package/src/hooks/trusted-scripts.ts +106 -104
- package/src/init/scaffold.ts +135 -132
- package/src/local/clean.ts +38 -36
- package/src/local/format.ts +21 -17
- package/src/local/scan.ts +144 -138
- package/src/manifest/render.ts +110 -104
- package/src/owner/card.ts +51 -46
- package/src/owner/profile.ts +99 -93
- package/src/owner/reply-switch.ts +9 -6
- package/src/owner/shape.ts +71 -69
- package/src/owner/survey.ts +173 -171
- package/src/owner/view.ts +62 -59
- package/src/owner/violations.ts +119 -123
- package/src/rules/base.ts +15 -11
- package/src/rules/parser.ts +39 -32
- package/src/rules/slots.ts +8 -6
- package/src/signals/claims.ts +30 -28
- package/src/signals/classify.ts +38 -33
- package/src/signals/loop.ts +39 -37
- package/src/signals/state.ts +79 -81
- package/src/skills/frontmatter.ts +28 -28
- package/src/sync/agent-files.ts +217 -199
- package/src/sync/agent-removal.ts +56 -59
- package/src/sync/atlas-block.ts +45 -43
- package/src/sync/base-rules.ts +32 -30
- package/src/sync/claude-launch.ts +36 -34
- package/src/sync/exclude.ts +77 -69
- package/src/sync/local-choice.ts +50 -47
- package/src/sync/planner.ts +59 -61
- package/src/sync/prune.ts +52 -48
- package/src/sync/settings.ts +166 -167
- package/src/ui/capability.ts +12 -7
- package/src/ui/keyboard.ts +38 -38
- package/src/ui/prompt.ts +79 -77
- package/src/visualize/assets.ts +33 -24
- package/src/visualize/charts.ts +179 -176
- package/src/visualize/compare-css.ts +3 -2
- package/src/visualize/compare-render.ts +9 -7
- package/src/visualize/diagrams.ts +189 -174
- package/src/visualize/grid-span.ts +34 -0
- package/src/visualize/icons.ts +7 -5
- package/src/visualize/kinds-render.ts +50 -45
- package/src/visualize/kinds-validate.ts +12 -10
- package/src/visualize/labels.ts +21 -17
- package/src/visualize/layout.ts +112 -97
- package/src/visualize/page.ts +92 -104
- package/src/visualize/render.ts +143 -140
- package/src/visualize/sections.ts +395 -384
- package/src/visualize/sources.ts +2 -2
- package/src/visualize/theme.ts +12 -10
- package/src/visualize/validate.ts +13 -9
- package/src/wiki/anchors.ts +38 -36
- package/src/wiki/command.ts +4 -4
- package/src/wiki/source-links.ts +46 -44
package/src/create/next.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import {
|
|
3
|
+
import { PortRegistry } from './workspace.ts';
|
|
4
4
|
|
|
5
5
|
/** One app of the monorepo as `make dev` serves it: its port, and the paths worth opening. */
|
|
6
6
|
interface INextApp {
|
|
@@ -29,25 +29,28 @@ const readRecordedUrls = (opts: { directory: string }): string[] => {
|
|
|
29
29
|
return Array.isArray(urls) ? urls.filter((url) => typeof url === 'string') : [];
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
opts
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
32
|
+
export class NextStep {
|
|
33
|
+
/** The apps already in the monorepo: those with a `*PORT=` line in .env.example, as they were made. */
|
|
34
|
+
static readExistingApps(opts: { root: string; paths: string[] }): INextApp[] {
|
|
35
|
+
return opts.paths.flatMap((path) => {
|
|
36
|
+
const directory = join(opts.root, path);
|
|
37
|
+
const envFile = join(directory, '.env.example');
|
|
38
|
+
const port = existsSync(envFile)
|
|
39
|
+
? PortRegistry.read({ envExample: readFileSync(envFile, 'utf8') })
|
|
40
|
+
: undefined;
|
|
41
|
+
|
|
42
|
+
return port === undefined ? [] : [{ port, urls: readRecordedUrls({ directory }) }];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** The closing message: what ran, then one `open` line per url, or per app root when it has none. */
|
|
47
|
+
static render(opts: { done: string; command: string; apps: INextApp[] }): string {
|
|
48
|
+
const lines = opts.apps.flatMap((app) =>
|
|
49
|
+
(app.urls.length === 0 ? [''] : app.urls).map(
|
|
50
|
+
(path) => ` open http://localhost:${app.port}${path}`,
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
return `${opts.done} Next:\n ${opts.command}\n${lines.join('\n')}\n`;
|
|
55
|
+
}
|
|
56
|
+
}
|
package/src/create/plan.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TerminalCapability, TerminalPrompt } from '../ui/index.ts';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export class WritePlan {
|
|
4
|
+
/** `label value` lines with the values in one column. */
|
|
5
|
+
static planLines(opts: { rows: [label: string, value: string][] }): string[] {
|
|
6
|
+
const width = Math.max(...opts.rows.map(([label]) => label.length));
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
}
|
|
8
|
+
return opts.rows.map(([label, value]) => `${label.padEnd(width)} ${value}`);
|
|
9
|
+
}
|
|
9
10
|
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Before anything is written, a terminal that can draw menus shows what will be written and asks.
|
|
13
|
+
* Without one nothing is asked: flags and pipes keep writing as they always did.
|
|
14
|
+
*/
|
|
15
|
+
static async confirm(opts: { title: string; lines: string[] }): Promise<boolean> {
|
|
16
|
+
return TerminalCapability.menusAvailable() ? TerminalPrompt.promptPlan(opts) : true;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
16
19
|
|
|
17
20
|
export const ABORTED = 'aborted: nothing was written';
|