@venizia/vulcan 0.4.10-2 → 0.4.10-21
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 +30 -23
- package/base/checks/wiki-source-links.ts +17 -1
- package/base/claude/events.json +1 -11
- package/base/claude/settings.json +5 -76
- package/base/extensions/vulcan-guards.ts +81 -18
- package/base/hooks/guard-git.ts +95 -19
- package/base/hooks/guard-outside.ts +163 -43
- package/base/hooks/guard-writes.ts +15 -36
- package/base/hooks/session-start.ts +1 -1
- package/base/make/vulcan.mk +8 -5
- package/base/packs/venizia.md +16 -0
- package/base/references/delegation-brief.md +3 -5
- package/base/references/testing.md +1 -9
- package/base/rules.md +33 -38
- package/base/skills/build-a-feature/SKILL.md +4 -4
- package/base/skills/docs-update/SKILL.md +19 -8
- package/base/skills/fix-a-bug/SKILL.md +4 -2
- package/base/skills/plan-a-change/SKILL.md +1 -1
- package/base/skills/research/SKILL.md +1 -1
- package/base/skills/retro/SKILL.md +2 -2
- package/base/skills/review-a-change/SKILL.md +1 -1
- package/base/skills/visualize-work/SKILL.md +3 -3
- package/base/skills/visualize-work/references/spec.md +6 -3
- package/base/templates/AGENTS.md +9 -7
- package/base/templates/board.html +10 -110
- package/package.json +3 -3
- package/src/agents/atlas-block.ts +8 -31
- package/src/agents/codex-hooks.ts +1 -1
- package/src/agents/generated-block.ts +52 -0
- package/src/agents/hooks-json.ts +22 -3
- package/src/agents/index.ts +2 -0
- package/src/agents/render.ts +15 -2
- package/src/agents/resolve.ts +1 -0
- package/src/agents/rules-block.ts +92 -0
- package/src/board/command.ts +92 -30
- package/src/board/common/constants.ts +26 -0
- package/src/board/common/types.ts +10 -3
- package/src/board/fold.ts +1 -1
- package/src/board/github.ts +1 -2
- package/src/board/gitlab.ts +436 -0
- package/src/board/index.ts +1 -0
- package/src/board/logo.ts +49 -0
- package/src/board/open-file.ts +110 -0
- package/src/board/page.ts +57 -5
- package/src/board/schema.ts +4 -1
- package/src/board/server.ts +87 -3
- package/src/board/settings.ts +21 -24
- package/src/commands/changelog.command.ts +40 -0
- package/src/commands/clean.command.ts +6 -1
- package/src/commands/help.command.ts +2 -63
- package/src/commands/index.ts +6 -1
- package/src/commands/migrate.command.ts +71 -0
- package/src/commands/profile.command.ts +1 -1
- package/src/commands/runners.command.ts +43 -0
- package/src/commands/sync.command.ts +8 -4
- package/src/commands/table.ts +362 -0
- package/src/commit/check.ts +1 -0
- package/src/commit/common/constants.ts +4 -0
- package/src/commit/hook.ts +112 -8
- package/src/common/constants.ts +11 -9
- package/src/common/env-variables.ts +41 -0
- package/src/common/index.ts +1 -0
- package/src/common/layout-folder.ts +3 -4
- package/src/common/record.ts +5 -0
- package/src/config/common/constants.ts +28 -22
- package/src/config/loader.ts +22 -0
- package/src/config/schema.ts +330 -146
- package/src/create/add-app.ts +7 -2
- package/src/create/add-lib.ts +2 -4
- package/src/create/common/constants.ts +5 -3
- package/src/create/preset.ts +1 -0
- package/src/create/scratch.ts +2 -1
- package/src/doctor/checks.ts +277 -448
- package/src/doctor/common/constants.ts +27 -19
- package/src/doctor/private-values.ts +4 -1
- package/src/doctor/runner.ts +5 -12
- package/src/doctor/schema.ts +4 -0
- package/src/events/common/actor-names.ts +12 -0
- package/src/events/common/constants.ts +65 -38
- package/src/events/common/index.ts +1 -0
- package/src/events/hook.ts +5 -56
- package/src/events/text.ts +41 -6
- package/src/hooks/command-view.ts +80 -19
- package/src/hooks/common/constants.ts +26 -17
- package/src/hooks/common/types.ts +13 -24
- package/src/hooks/decision.ts +30 -12
- package/src/hooks/git-queries.ts +113 -0
- package/src/hooks/guard-git.ts +76 -24
- package/src/hooks/guard-outside.ts +334 -311
- package/src/hooks/guard-runner.ts +206 -0
- package/src/hooks/guard-writes.ts +87 -184
- package/src/hooks/hook-input.ts +57 -0
- package/src/hooks/index.ts +3 -6
- package/src/hooks/link-makers.ts +315 -0
- package/src/hooks/package-runners.ts +268 -0
- package/src/hooks/project-guards.ts +81 -44
- package/src/hooks/project-tmp.ts +39 -4
- package/src/hooks/runner-scan.ts +257 -0
- package/src/hooks/script-runners.ts +400 -0
- package/src/hooks/session-digest.ts +27 -117
- package/src/hooks/shell-folders.ts +760 -0
- package/src/hooks/shell-writes.ts +646 -0
- package/src/hooks/shell.ts +1421 -194
- package/src/hooks/subagent-card.ts +2 -2
- package/src/hooks/write-commands.ts +898 -0
- package/src/init/scaffold.ts +2 -3
- package/src/local/auto-clean.ts +2 -1
- package/src/local/browser-socket.ts +33 -0
- package/src/local/clean.ts +37 -6
- package/src/local/constants.ts +15 -1
- package/src/local/index.ts +1 -0
- package/src/local/scan.ts +41 -10
- package/src/manifest/render.ts +84 -30
- package/src/owner/constants.ts +4 -5
- package/src/owner/index.ts +0 -2
- package/src/owner/profile.ts +1 -0
- package/src/owner/schema.ts +51 -27
- package/src/owner/survey.ts +0 -3
- package/src/owner/view.ts +0 -9
- package/src/router.ts +8 -132
- package/src/rules/base.ts +12 -7
- package/src/rules/index.ts +1 -0
- package/src/rules/packs.ts +44 -0
- package/src/runners/check.ts +130 -0
- package/src/skills/frontmatter.ts +1 -0
- package/src/sync/agents-block.ts +104 -0
- package/src/sync/base-rules.ts +3 -3
- package/src/sync/claude-launch.ts +12 -12
- package/src/sync/common/constants.ts +0 -2
- package/src/sync/index.ts +1 -1
- package/src/sync/local-choice.ts +32 -3
- package/src/sync/planner.ts +2 -15
- package/src/sync/settings.ts +0 -17
- package/src/theme/index.ts +1 -0
- package/src/theme/tokens.ts +410 -0
- package/src/ui/prompt.ts +1 -0
- package/src/visualize/architecture.ts +504 -0
- package/src/visualize/assets.ts +41 -30
- package/src/visualize/compare-render.ts +22 -24
- package/src/visualize/constants.ts +27 -0
- package/src/visualize/diagrams.ts +13 -121
- package/src/visualize/kinds-render.ts +2 -2
- package/src/visualize/kinds-schema.ts +49 -0
- package/src/visualize/labels-vi.ts +25 -0
- package/src/visualize/labels.ts +2 -0
- package/src/visualize/layout.ts +415 -66
- package/src/visualize/page.ts +82 -15
- package/src/visualize/render.ts +2 -1
- package/src/visualize/schema.ts +29 -1
- package/src/visualize/sections.ts +78 -9
- package/src/visualize/theme.ts +49 -18
- package/src/wiki/anchors.ts +1 -0
- package/src/wiki/command.ts +10 -3
- package/src/wiki/source-links.ts +57 -18
- package/base/ci-global.json +0 -13
- package/base/claude/remote-hosts.json +0 -15
- package/base/hooks/guard-manifest.ts +0 -27
- package/base/hooks/guard-package.ts +0 -30
- package/base/hooks/guard-remote-hosts.ts +0 -70
- package/base/hooks/guard-scripting.ts +0 -32
- package/base/hooks/post-tool.ts +0 -37
- package/base/hooks/prompt-submit.ts +0 -54
- package/base/hooks/stop.ts +0 -40
- package/base/skills/build-a-feature/evals/evals.json +0 -29
- package/base/skills/docs-update/evals/evals.json +0 -23
- package/base/skills/docs-writing/evals/evals.json +0 -17
- package/base/skills/fix-a-bug/evals/evals.json +0 -17
- package/base/skills/knowledge-sync/SKILL.md +0 -81
- package/base/skills/knowledge-sync/knowledge-sync.workflow.js +0 -291
- package/base/skills/knowledge-sync/references/workflow.md +0 -44
- package/base/skills/plan-a-change/evals/evals.json +0 -47
- package/base/skills/report-back/evals/evals.json +0 -23
- package/base/skills/research/evals/evals.json +0 -17
- package/base/skills/retro/evals/evals.json +0 -17
- package/base/skills/review-a-change/evals/evals.json +0 -17
- package/base/skills/ship/evals/evals.json +0 -23
- package/base/skills/visualize-work/evals/evals.json +0 -17
- package/base/templates/ci/github-actions.yml +0 -75
- package/base/templates/ci/gitlab-ci.yml +0 -52
- package/base/templates/trusted-hosts.local.example +0 -11
- package/src/ci/affected.ts +0 -176
- package/src/ci/command.ts +0 -166
- package/src/ci/common/constants.ts +0 -76
- package/src/ci/common/index.ts +0 -2
- package/src/ci/common/types.ts +0 -37
- package/src/ci/git.ts +0 -72
- package/src/ci/global.ts +0 -48
- package/src/ci/graph.ts +0 -43
- package/src/ci/index.ts +0 -7
- package/src/ci/workspace.ts +0 -119
- package/src/commands/ci.command.ts +0 -4
- package/src/hooks/guard-manifest.ts +0 -109
- package/src/hooks/guard-package.ts +0 -226
- package/src/hooks/guard-scripting.ts +0 -36
- package/src/hooks/host-pattern.ts +0 -17
- package/src/hooks/owner-reply.ts +0 -162
- package/src/hooks/post-tool.ts +0 -138
- package/src/hooks/remote-hosts.ts +0 -1013
- package/src/hooks/trusted-scripts.ts +0 -212
- package/src/owner/shape.ts +0 -496
- package/src/owner/violations.ts +0 -332
- package/src/signals/claims.ts +0 -73
- package/src/signals/classify.ts +0 -137
- package/src/signals/constants.ts +0 -88
- package/src/signals/index.ts +0 -5
- package/src/signals/loop.ts +0 -48
- package/src/signals/state.ts +0 -271
- package/src/sync/atlas-block.ts +0 -56
package/src/hooks/post-tool.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EntryKinds,
|
|
3
|
-
SignalClassifier,
|
|
4
|
-
SignalConstants,
|
|
5
|
-
SignalLoop,
|
|
6
|
-
SignalState,
|
|
7
|
-
WatchedKinds,
|
|
8
|
-
} from '../signals/index.ts';
|
|
9
|
-
import type { ISignalState } from '../signals/index.ts';
|
|
10
|
-
|
|
11
|
-
const FILE_TOOLS = new Set(['Write', 'Edit', 'MultiEdit', 'NotebookEdit']);
|
|
12
|
-
const FAILURE_EVENT = 'PostToolUseFailure';
|
|
13
|
-
|
|
14
|
-
const recordOf = (opts: { value: unknown }): Record<string, unknown> =>
|
|
15
|
-
typeof opts.value === 'object' && opts.value !== null && !Array.isArray(opts.value)
|
|
16
|
-
? Object.fromEntries(Object.entries(opts.value))
|
|
17
|
-
: {};
|
|
18
|
-
|
|
19
|
-
const stringOf = (opts: { value: unknown }): string =>
|
|
20
|
-
typeof opts.value === 'string' ? opts.value : '';
|
|
21
|
-
|
|
22
|
-
/** Whether the tool reported a failure in its own result: an exit code, an error flag, an interruption. */
|
|
23
|
-
const reportsFailure = (opts: { response: Record<string, unknown> }): boolean => {
|
|
24
|
-
const { response } = opts;
|
|
25
|
-
const code = response['exitCode'] ?? response['exit_code'];
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
(typeof code === 'number' && code !== 0) ||
|
|
29
|
-
response['is_error'] === true ||
|
|
30
|
-
response['isError'] === true ||
|
|
31
|
-
response['interrupted'] === true
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export class PostToolOutput {
|
|
36
|
-
/**
|
|
37
|
-
* What the model is told after a tool call, and the line it adds to the turn's notes: whether the turn
|
|
38
|
-
* asked public state, which gate commands ran and passed or failed, the calls themselves, so a loop shows.
|
|
39
|
-
* It speaks only to say that the agent seems stuck, or that a skill or rules file was just changed; it
|
|
40
|
-
* never blocks. Notes are kept per session, and a loop per agent. Input it cannot read gives no answer.
|
|
41
|
-
*/
|
|
42
|
-
static build(opts: {
|
|
43
|
-
projectRoot: string;
|
|
44
|
-
input: unknown;
|
|
45
|
-
now?: number;
|
|
46
|
-
}): Record<string, unknown> | undefined {
|
|
47
|
-
const input = recordOf({ value: opts.input });
|
|
48
|
-
const tool = stringOf({ value: input['tool_name'] });
|
|
49
|
-
|
|
50
|
-
if (tool === '') {
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const now = opts.now ?? Date.now();
|
|
55
|
-
const session = stringOf({ value: input['session_id'] });
|
|
56
|
-
const agent = stringOf({ value: input['agent_id'] });
|
|
57
|
-
const toolInput = recordOf({ value: input['tool_input'] });
|
|
58
|
-
const event = input['hook_event_name'] === FAILURE_EVENT ? FAILURE_EVENT : 'PostToolUse';
|
|
59
|
-
const isOk =
|
|
60
|
-
event !== FAILURE_EVENT &&
|
|
61
|
-
!reportsFailure({ response: recordOf({ value: input['tool_response'] }) });
|
|
62
|
-
const command = stringOf({ value: toolInput['command'] });
|
|
63
|
-
// A command sent to the background has not finished: its result is not known here.
|
|
64
|
-
const isBackground = toolInput['run_in_background'] === true;
|
|
65
|
-
const path = stringOf({ value: toolInput['file_path'] });
|
|
66
|
-
const gates = tool === 'Bash' && !isBackground ? SignalClassifier.gatesOf({ command }) : [];
|
|
67
|
-
|
|
68
|
-
try {
|
|
69
|
-
SignalState.append({
|
|
70
|
-
root: opts.projectRoot,
|
|
71
|
-
entry: {
|
|
72
|
-
kind: EntryKinds.CALL,
|
|
73
|
-
session,
|
|
74
|
-
agent,
|
|
75
|
-
at: now,
|
|
76
|
-
tool,
|
|
77
|
-
key: SignalClassifier.callKeyOf({ tool, input: toolInput }),
|
|
78
|
-
isOk,
|
|
79
|
-
isProbe: tool === 'Bash' && isOk && SignalClassifier.isPublicProbe({ command }),
|
|
80
|
-
gates,
|
|
81
|
-
isEdit: FILE_TOOLS.has(tool) && isOk,
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
} catch {
|
|
85
|
-
// The notes are advisory: a failed write costs a hint, never the call.
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const state: ISignalState = SignalState.read({ root: opts.projectRoot, session, agent });
|
|
89
|
-
const lines: string[] = [];
|
|
90
|
-
const say = (name: string, line: string): void => {
|
|
91
|
-
const last = state.notedAt[name];
|
|
92
|
-
|
|
93
|
-
if (last !== undefined && now - last < SignalConstants.DEBOUNCE_MS) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
lines.push(line);
|
|
98
|
-
|
|
99
|
-
try {
|
|
100
|
-
SignalState.append({
|
|
101
|
-
root: opts.projectRoot,
|
|
102
|
-
entry: { kind: EntryKinds.NOTE, at: now, name },
|
|
103
|
-
});
|
|
104
|
-
} catch {
|
|
105
|
-
// Without the note the advisory may repeat; nothing worse.
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
if (FILE_TOOLS.has(tool) && isOk) {
|
|
110
|
-
const watched = SignalClassifier.watchedFileOf({ path });
|
|
111
|
-
|
|
112
|
-
if (watched?.kind === WatchedKinds.SKILL) {
|
|
113
|
-
say(
|
|
114
|
-
`skill:${watched.name}`,
|
|
115
|
-
`You changed the skill ${watched.name}. Before you rely on it, run its evals (evals/evals.json) and read the transcripts: a skill change that no eval saw is a guess.`,
|
|
116
|
-
);
|
|
117
|
-
} else if (watched?.kind === WatchedKinds.RULES) {
|
|
118
|
-
say(
|
|
119
|
-
`rules:${watched.name}`,
|
|
120
|
-
'You changed a rules file. A rule needs an observed failure and a named enforcement, and a mechanical check where one is possible (the retro skill states the admission bar).',
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const loop = SignalLoop.loopOf({ events: state.events });
|
|
126
|
-
|
|
127
|
-
if (loop !== undefined) {
|
|
128
|
-
say(
|
|
129
|
-
`loop:${agent}`,
|
|
130
|
-
`Loop check: ${loop}. Stop repeating it: read the error, change the approach (the fix-a-bug skill builds the loop first), or ask the owner.`,
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return lines.length === 0
|
|
135
|
-
? undefined
|
|
136
|
-
: { hookSpecificOutput: { hookEventName: event, additionalContext: lines.join(' ') } };
|
|
137
|
-
}
|
|
138
|
-
}
|