@event4u/agent-config 14.18.0 → 14.20.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/.augment-plugin/marketplace.json +3 -3
- package/.augment-plugin/plugin.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +120 -129
- package/README.md +71 -149
- package/dist/agent-src/README.md +1 -1
- package/dist/agent-src/commands/agent-handoff.md +44 -43
- package/dist/agent-src/commands/review/changes.md +19 -19
- package/dist/agent-src/commands/review.md +2 -2
- package/dist/agent-src/contexts/execution/host-capability-manifest.md +37 -4
- package/dist/agent-src/rules/autonomous-execution.md +1 -1
- package/dist/agent-src/rules/git-history-discipline.md +2 -2
- package/dist/agent-src/rules/guidelines.md +1 -1
- package/dist/agent-src/rules/session-canary.md +2 -2
- package/dist/agent-src/rules/token-efficiency.md +1 -1
- package/dist/agent-src/rules/untrusted-input-defense.md +0 -2
- package/dist/agent-src/skills/adversarial-review/SKILL.md +0 -8
- package/dist/agent-src/skills/canvas-design/SKILL.md +1 -1
- package/dist/agent-src/skills/design-intelligence/SKILL.md +1 -1
- package/dist/agent-src/skills/design-intelligence/data/app-interface.csv +1 -1
- package/dist/agent-src/skills/design-intelligence/data/motion.csv +17 -17
- package/dist/agent-src/skills/design-intelligence/data/ux-guidelines.csv +2 -2
- package/dist/agent-src/skills/design-intelligence/references/context-and-registers.md +17 -0
- package/dist/agent-src/skills/design-intelligence/references/design-rules-checklist.md +4 -4
- package/dist/agent-src/skills/design-review/SKILL.md +1 -1
- package/dist/agent-src/skills/design-variations/SKILL.md +1 -1
- package/dist/agent-src/skills/evaluate-llm-feature/SKILL.md +1 -1
- package/dist/agent-src/skills/existing-ui-audit/SKILL.md +1 -1
- package/dist/agent-src/skills/fe-design/SKILL.md +32 -5
- package/dist/agent-src/skills/fe-design/references/craft-floor.md +7 -0
- package/dist/agent-src/skills/fe-design/references/design-patterns.md +47 -2
- package/dist/agent-src/skills/laravel-scheduling/SKILL.md +3 -1
- package/dist/agent-src/skills/markitdown/SKILL.md +1 -1
- package/dist/agent-src/skills/project-analyzer/SKILL.md +0 -6
- package/dist/agent-src/skills/react-native-setup/SKILL.md +3 -3
- package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +1 -1
- package/dist/agent-src/skills/sequential-thinking/SKILL.md +18 -8
- package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +28 -6
- package/dist/agent-src/skills/tailwind-engineer/SKILL.md +1 -1
- package/dist/agent-src/skills/test-driven-development/SKILL.md +1 -3
- package/dist/agent-src/skills/ui-apply-generic/SKILL.md +1 -1
- package/dist/agent-src/skills/ui-component-architect/SKILL.md +1 -1
- package/dist/agent-src/skills/using-git-worktrees/SKILL.md +17 -2
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/roadmaps.md +14 -1
- package/dist/agent-src/templates/scripts/telemetry/mcp_lite.ts +213 -0
- package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +16 -0
- package/dist/agent-src/templates/scripts/telemetry_report.ts +22 -2
- package/dist/cli/commands/recordTriggerEval.js +2 -2
- package/dist/cli/main.js +1 -1
- package/dist/cli/mcp/dispatch.js +10 -0
- package/dist/cli/mcp/stdio.js +33 -2
- package/dist/cli/mcp/telemetry.js +227 -0
- package/dist/cli-delegate/{chunk-AKJGUQNO.js → chunk-C6IPZRDA.js} +484 -353
- package/dist/cli-delegate/{chunk-CYH5SP6M.js → chunk-I6RHFQEG.js} +151 -16
- package/dist/cli-delegate/{chunk-7RXIKF62.js → chunk-NUMQHLS5.js} +304 -136
- package/dist/cli-delegate/{chunk-PMEKGDED.js → chunk-PI2GU3DP.js} +163 -1
- package/dist/cli-delegate/{chunk-7PRE6ZV2.js → chunk-YS6XTLEK.js} +199 -4
- package/dist/cli-delegate/chunk-ZVBOHSVF.js +1109 -0
- package/dist/cli-delegate/cmd_adr_effective.js +318 -81
- package/dist/cli-delegate/cmd_conformance.js +489 -121
- package/dist/cli-delegate/cmd_doctor.js +2 -2
- package/dist/cli-delegate/cmd_export.js +2 -2
- package/dist/cli-delegate/cmd_handoff.js +42 -12
- package/dist/cli-delegate/cmd_memory_get.js +1 -1
- package/dist/cli-delegate/cmd_prune.js +2 -2
- package/dist/cli-delegate/cmd_route_audit.js +2 -2
- package/dist/cli-delegate/cmd_session_recycle.js +59 -902
- package/dist/cli-delegate/cmd_settings_migrate.js +2 -2
- package/dist/cli-delegate/cmd_sync.js +2 -2
- package/dist/cli-delegate/cmd_uninstall.js +2 -2
- package/dist/cli-delegate/cmd_validate.js +2 -2
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +34 -33
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +1 -1
- package/dist/discovery/dormancy-report.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +2 -2
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +2 -2
- package/dist/hooks/dispatch.js +4455 -3025
- package/dist/install/install.mjs +975 -689
- package/dist/mcp/registry-manifest.json +2 -2
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +2087 -1134
- package/dist/scripts/_lib/model_tier.js +1 -1
- package/dist/scripts/mcp_server/telemetry.js +148 -0
- package/docs/guidelines/agent-infra/evaluator-independence-mechanics.md +1 -1
- package/docs/guidelines/agent-infra/naming.md +1 -1
- package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +1 -1
- package/docs/guidelines/agent-infra/security-lint-containment.md +46 -6
- package/docs/guidelines/agent-infra/self-improvement-pipeline.md +4 -4
- package/docs/guidelines/agent-infra/untrusted-input-spotlighting.md +1 -1
- package/docs/guidelines/design-antipatterns.md +87 -64
- package/docs/guidelines/redundancy-taxonomy.md +28 -0
- package/package.json +1 -1
- package/src/agent-src/README.md +1 -1
- package/src/agent-src/templates/scripts/telemetry/mcp_lite.ts +213 -0
- package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +16 -0
- package/src/agent-src/templates/scripts/telemetry_report.ts +22 -2
- package/src/config/assurance-capability-registry.json +9 -0
- package/src/config/ci-local-parity.yml +6 -0
- package/src/config/gate-coverage.yml +225 -0
- package/src/config/gate-violation-baselines.json +18 -6
- package/src/config/release-gate-locality.yml +12 -0
- package/src/scripts/_cli/cmd_doctor.ts +2 -2
- package/src/scripts/_cli/cmd_handoff.ts +1 -1
- package/src/scripts/_cli/cmd_session_recycle.ts +51 -3
- package/src/scripts/_cli/cmd_update.ts +1 -1
- package/src/scripts/_cli/cmd_versions.ts +1 -1
- package/src/scripts/_lib/adr_frontmatter.ts +44 -0
- package/src/scripts/_lib/audit_field_provenance.ts +44 -3
- package/src/scripts/_lib/consequence_objects.ts +152 -0
- package/src/scripts/_lib/exec_evidence.ts +7 -0
- package/src/scripts/_lib/global_deploy_inventory.ts +2 -2
- package/src/scripts/_lib/host_capability.ts +38 -0
- package/src/scripts/_lib/host_permission_checks.ts +251 -0
- package/src/scripts/_lib/install_reach_checks.ts +33 -1
- package/src/scripts/_lib/mcp_bridge.ts +222 -10
- package/src/scripts/_lib/mcp_consent_residual.ts +173 -0
- package/src/scripts/_lib/model_tier.ts +1 -1
- package/src/scripts/_lib/obligation_frequency.ts +2 -2
- package/src/scripts/_lib/orchestration_record.ts +23 -1
- package/src/scripts/_lib/recycle_envelope_paths.ts +190 -0
- package/src/scripts/_lib/release_highlights.ts +93 -0
- package/src/scripts/_lib/release_material.ts +64 -1
- package/src/scripts/_lib/release_position.ts +96 -0
- package/src/scripts/_lib/review_skipped_record.ts +17 -1
- package/src/scripts/_lib/runtime_journal.ts +26 -3
- package/src/scripts/_lib/runtime_wiring_checks.ts +12 -1
- package/src/scripts/_lib/security_lint.ts +179 -7
- package/src/scripts/_lib/self_repair.ts +141 -6
- package/src/scripts/_lib/self_repair_store.ts +273 -7
- package/src/scripts/_lib/session_register.ts +11 -6
- package/src/scripts/_lib/sqlite_schema.ts +22 -0
- package/src/scripts/_lib/subagent_capsule.ts +155 -3
- package/src/scripts/_lib/surface.ts +86 -0
- package/src/scripts/_lib/ui_authority.ts +116 -0
- package/src/scripts/adr/regenerate_index.ts +54 -1
- package/src/scripts/adr_cite_check.ts +71 -15
- package/src/scripts/ai_council/clients.ts +1 -1
- package/src/scripts/autonomy_friction_corpus.ts +229 -0
- package/src/scripts/build_proof.ts +15 -2
- package/src/scripts/build_rule_trigger_matrix.ts +5 -0
- package/src/scripts/check_beta_review_markers.ts +141 -17
- package/src/scripts/check_enforcement_coverage.ts +1 -1
- package/src/scripts/check_enforcement_denominator.ts +121 -11
- package/src/scripts/check_finding_dispositions.ts +66 -9
- package/src/scripts/check_gate_coverage.ts +96 -0
- package/src/scripts/check_mcp_doc_drift.ts +217 -0
- package/src/scripts/check_pack_size.ts +321 -3
- package/src/scripts/check_release_highlights.ts +74 -1
- package/src/scripts/check_skill_activation_claim.ts +179 -0
- package/src/scripts/check_trigger_evals.ts +1 -1
- package/src/scripts/conformance_scan.ts +44 -3
- package/src/scripts/explain_run.ts +1 -1
- package/src/scripts/generate_capability_matrix.ts +1 -1
- package/src/scripts/git_authorization_hook.ts +75 -1
- package/src/scripts/handoff_context_hook.ts +54 -7
- package/src/scripts/hook_manifest.json +1 -1
- package/src/scripts/hook_manifest.yaml +14 -11
- package/src/scripts/hooks/augment-dispatcher.sh +1 -1
- package/src/scripts/hooks/category_a.ts +291 -0
- package/src/scripts/hooks/cline-dispatcher.sh +1 -1
- package/src/scripts/hooks/cursor-dispatcher.sh +11 -5
- package/src/scripts/hooks/dispatch_hook.ts +17 -22
- package/src/scripts/hooks/git_command_classifier.ts +156 -1
- package/src/scripts/hooks/host_lowering.ts +215 -0
- package/src/scripts/hooks/host_lowering.yaml +185 -0
- package/src/scripts/hooks/host_semantics.ts +105 -37
- package/src/scripts/hooks/journal_record_hook.ts +10 -0
- package/src/scripts/hooks/permission_gate.ts +117 -0
- package/src/scripts/hooks/session_eol_hook.ts +18 -7
- package/src/scripts/hooks_status.ts +12 -10
- package/src/scripts/install.ts +57 -86
- package/src/scripts/install_anthropic_key.sh +2 -2
- package/src/scripts/lint_agent_security.ts +316 -25
- package/src/scripts/lint_confusables.ts +42 -6
- package/src/scripts/lint_design_antipattern_parity.ts +80 -0
- package/src/scripts/lint_evidence_artifacts.ts +45 -1
- package/src/scripts/lint_handoffs.ts +0 -132
- package/src/scripts/lint_hidden_unicode.ts +49 -7
- package/src/scripts/lint_hook_manifest.ts +87 -3
- package/src/scripts/lint_instruction_smuggling.ts +42 -6
- package/src/scripts/lint_mcp_config_security.ts +42 -6
- package/src/scripts/lint_motion_authority_drift.ts +731 -0
- package/src/scripts/lint_readme_size.ts +158 -12
- package/src/scripts/lint_reasoning_fixtures.ts +216 -0
- package/src/scripts/lint_roadmap_later_disposition.ts +217 -27
- package/src/scripts/lint_skill_frontmatter_safety.ts +43 -7
- package/src/scripts/lint_skill_trigger_contradiction.ts +161 -0
- package/src/scripts/mcp_server/resources.ts +41 -0
- package/src/scripts/mcp_server/telemetry.ts +19 -4
- package/src/scripts/measure_sibling_naming.ts +150 -0
- package/src/scripts/orchestration_record.ts +12 -1
- package/src/scripts/redact_hook_capture.ts +1 -1
- package/src/scripts/release.ts +24 -24
- package/src/scripts/release_publication.ts +6 -2
- package/src/scripts/report_skill_activation.ts +319 -7
- package/src/scripts/schemas/review-findings.schema.json +5 -0
- package/src/scripts/schemas/skill.schema.json +2 -2
- package/src/scripts/self_repair_cli.ts +31 -1
- package/src/scripts/session_canary_hook.ts +1 -1
- package/src/scripts/session_register_hook.ts +4 -3
- package/src/scripts/skill_scout.ts +69 -0
- package/src/scripts/trigger_eval_grandfather.json +5 -1
- package/src/scripts/validate_agent_settings.ts +1 -1
- package/dist/cli-delegate/chunk-2GNWGMAL.js +0 -172
- package/dist/cli-delegate/chunk-LPPWO5CE.js +0 -161
|
@@ -53,8 +53,13 @@ import { entryText, isSidechain } from "./_lib/transcript_entry.js";
|
|
|
53
53
|
|
|
54
54
|
import { classify } from "./language_mirror_hook.js";
|
|
55
55
|
import { isSyntheticPrompt } from "./_lib/prompt_shape.js";
|
|
56
|
-
import {
|
|
57
|
-
|
|
56
|
+
import {
|
|
57
|
+
classifyAuthorization,
|
|
58
|
+
extractObjects,
|
|
59
|
+
OBJECT_REQUIRED_OPS,
|
|
60
|
+
type GitOp,
|
|
61
|
+
} from "./git_authorization_hook.js";
|
|
62
|
+
import { BLOCK_OPS, commandObject, commandOp } from "./hooks/git_command_classifier.js";
|
|
58
63
|
import { isVacuousOutput, isCiPoll, pendingCount } from "./before_complete_hook.js";
|
|
59
64
|
// Round 7 § 1.5 — the SAME predicate `turn-end-gate` refuses on, imported rather
|
|
60
65
|
// than reimplemented, so the measured rate and the gate cannot disagree.
|
|
@@ -579,6 +584,8 @@ export function scanSession(sessionId: string, lines: string[]): SessionReport {
|
|
|
579
584
|
let pinned: "de" | "en" | null = null;
|
|
580
585
|
let pendingPoll: { at: string; cmd: string } | null = null;
|
|
581
586
|
let authorized = new Set<GitOp>();
|
|
587
|
+
// Per-op objects the current turn's prompt named. Reset with `authorized`.
|
|
588
|
+
let authorizedObjects = new Map<GitOp, Set<string>>();
|
|
582
589
|
let sawPending = false;
|
|
583
590
|
let evaluationsThisTurn = 0;
|
|
584
591
|
// Round-5 provenance for language violations. The round-5 audit could only
|
|
@@ -723,7 +730,15 @@ export function scanSession(sessionId: string, lines: string[]): SessionReport {
|
|
|
723
730
|
if (c.language !== "und") {
|
|
724
731
|
pinned = c.language;
|
|
725
732
|
}
|
|
726
|
-
|
|
733
|
+
const classified = classifyAuthorization(ut);
|
|
734
|
+
authorized = new Set(classified.authorized);
|
|
735
|
+
// Step 2.2 — the objects the turn NAMED, per operation. Rebuilt on every
|
|
736
|
+
// counted user turn for the same reason `authorized` is: an authorization
|
|
737
|
+
// for one table does not carry into the next prompt any more than the
|
|
738
|
+
// operation does.
|
|
739
|
+
authorizedObjects = new Map(
|
|
740
|
+
classified.authorized.map((op) => [op, new Set(extractObjects(op, ut))]),
|
|
741
|
+
);
|
|
727
742
|
sawPending = false;
|
|
728
743
|
evaluationsThisTurn = 0;
|
|
729
744
|
pendingPoll = null;
|
|
@@ -811,6 +826,32 @@ export function scanSession(sessionId: string, lines: string[]): SessionReport {
|
|
|
811
826
|
at,
|
|
812
827
|
detail: `irreversible \`${op}\` with no authorization in the turn's prompt: ${cmd.slice(0, 110)}`,
|
|
813
828
|
});
|
|
829
|
+
} else if (op !== null && authorized.has(op) && OBJECT_REQUIRED_OPS.has(op)) {
|
|
830
|
+
// Step 2.2 — the operation WAS authorized and ran against something
|
|
831
|
+
// the turn never named. An authorization for one table is not an
|
|
832
|
+
// authorization for another, and until the ledger could carry an
|
|
833
|
+
// object this was indistinguishable from a clean turn.
|
|
834
|
+
//
|
|
835
|
+
// This REPORTS and refuses nothing — ADR-254 removed the enforcing
|
|
836
|
+
// reader, and the shape it preserved is a count after the fact.
|
|
837
|
+
//
|
|
838
|
+
// A command naming NO object produces no finding: `commandObject`
|
|
839
|
+
// returns null there, and a guessed object would manufacture a
|
|
840
|
+
// violation out of a parse failure. Under-reporting is the safe
|
|
841
|
+
// direction for a measurement.
|
|
842
|
+
const object = commandObject(op, cmd);
|
|
843
|
+
const named = authorizedObjects.get(op);
|
|
844
|
+
if (object !== null && !(named?.has(object) ?? false)) {
|
|
845
|
+
report.violations.push({
|
|
846
|
+
check: "git-authorization",
|
|
847
|
+
session: sessionId,
|
|
848
|
+
at,
|
|
849
|
+
detail:
|
|
850
|
+
`\`${op}\` authorized, but its object \`${object}\` is not one the ` +
|
|
851
|
+
`turn's prompt named (${named && named.size > 0 ? [...named].join(", ") : "no object named"}): ` +
|
|
852
|
+
cmd.slice(0, 110),
|
|
853
|
+
});
|
|
854
|
+
}
|
|
814
855
|
}
|
|
815
856
|
if (isCiPoll(cmd)) {
|
|
816
857
|
// The RESULT of this call arrives on the NEXT entry, and that entry is
|
|
@@ -690,7 +690,7 @@ function renderHygieneSection(hygiene: HygieneReadResult): string[] {
|
|
|
690
690
|
out.push(`_Source: tried ${hygiene.checkedPaths.map((p) => `\`${p}\``).join(', then ')}_`);
|
|
691
691
|
out.push('');
|
|
692
692
|
if (hygiene.state === null) {
|
|
693
|
-
out.push('no data — none of the candidate paths exist yet (no PostToolUse hook has run this session, or
|
|
693
|
+
out.push('no data — none of the candidate paths exist yet (no PostToolUse hook has run this session, or no PostToolUse hook is bound on this host)');
|
|
694
694
|
return out;
|
|
695
695
|
}
|
|
696
696
|
const s = hygiene.state;
|
|
@@ -136,7 +136,7 @@ const _FN_SPEC: Record<string, FnSpec> = {
|
|
|
136
136
|
// Surfaces the INSTALLER provides outside generate_tools() (so the derivation
|
|
137
137
|
// guard stays pure). Marked with a † footnote in the rendered matrix.
|
|
138
138
|
const _INSTALL_TIME_CELLS: Record<string, Record<string, string>> = {
|
|
139
|
-
rules: { copilot: 'adapter' }, // .github/copilot-instructions.md (aggregated,
|
|
139
|
+
rules: { copilot: 'adapter' }, // .github/copilot-instructions.md (aggregated, the installer)
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
// Python: re.compile(r"\b(generate_[A-Za-z0-9_]+)\s*\(").
|
|
@@ -61,6 +61,10 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
61
61
|
|
|
62
62
|
import { humanTypedThisTurn as _humanTypedThisTurn } from "./_lib/machine_wake.js";
|
|
63
63
|
|
|
64
|
+
import {
|
|
65
|
+
CONSEQUENCE_PHRASES,
|
|
66
|
+
extractObjects,
|
|
67
|
+
} from "./_lib/consequence_objects.js";
|
|
64
68
|
import { atomic_write_json } from "./hooks/state_io.js";
|
|
65
69
|
import { readHookStdin } from "./hooks/hook_stdin.js";
|
|
66
70
|
|
|
@@ -235,7 +239,36 @@ export type GitOp =
|
|
|
235
239
|
/** Deleting a branch, locally or on the remote. */
|
|
236
240
|
| "branch-delete"
|
|
237
241
|
/** Closing a pull request or an issue. */
|
|
238
|
-
| "close"
|
|
242
|
+
| "close"
|
|
243
|
+
|
|
244
|
+
// ── Consequence operations, added 2026-09-06
|
|
245
|
+
// (`road-to-authorization-that-reaches-further` 2.1).
|
|
246
|
+
//
|
|
247
|
+
// The boundaries the owner named had NO vocabulary at all, so an
|
|
248
|
+
// authorization the user gave in plain words was invisible to the record and
|
|
249
|
+
// the matching operation was invisible to the count. These seven are NOT git
|
|
250
|
+
// operations, and the union's name is now narrower than its contents — a
|
|
251
|
+
// rename touches every consumer and buys nothing the doc comments do not.
|
|
252
|
+
//
|
|
253
|
+
// RECORDING AN AUTHORIZATION IS NOT GRANTING ONE. After ADR-254 there is no
|
|
254
|
+
// grantor left in this package: the ledger concern is advisory by manifest
|
|
255
|
+
// and the only consumer that acts on this vocabulary is the after-the-fact
|
|
256
|
+
// count in `conformance_scan`. Nothing here refuses, and nothing here may be
|
|
257
|
+
// read as a step toward refusing.
|
|
258
|
+
/** Deploying to a production environment. */
|
|
259
|
+
| "prod-deploy"
|
|
260
|
+
/** Destroying production data — a table, a bucket, a collection, rows. */
|
|
261
|
+
| "prod-data-destroy"
|
|
262
|
+
/** Changing production infrastructure — cluster, IAM, DNS, network. */
|
|
263
|
+
| "prod-infra-change"
|
|
264
|
+
/** Sending something outward that a third party receives. */
|
|
265
|
+
| "external-send"
|
|
266
|
+
/** Moving money — a charge, a refund, a payout, a transfer. */
|
|
267
|
+
| "money-movement"
|
|
268
|
+
/** Force-pushing a shared trunk, as distinct from a feature branch. */
|
|
269
|
+
| "trunk-force-push"
|
|
270
|
+
/** Destroying work outside the task's own scope. */
|
|
271
|
+
| "out-of-scope-destruction";
|
|
239
272
|
|
|
240
273
|
export const ALL_OPS: readonly GitOp[] = [
|
|
241
274
|
"commit",
|
|
@@ -264,6 +297,13 @@ export const ALL_OPS: readonly GitOp[] = [
|
|
|
264
297
|
"stash-drop",
|
|
265
298
|
"branch-delete",
|
|
266
299
|
"close",
|
|
300
|
+
"prod-deploy",
|
|
301
|
+
"prod-data-destroy",
|
|
302
|
+
"prod-infra-change",
|
|
303
|
+
"external-send",
|
|
304
|
+
"money-movement",
|
|
305
|
+
"trunk-force-push",
|
|
306
|
+
"out-of-scope-destruction",
|
|
267
307
|
];
|
|
268
308
|
|
|
269
309
|
/**
|
|
@@ -432,6 +472,8 @@ const PHRASES: ReadonlyArray<{ op: GitOp; re: RegExp }> = [
|
|
|
432
472
|
op: "pr-merge-auto",
|
|
433
473
|
re: /\bauto[-\s]?merge\b|\bmerge\b[^.\n]{0,20}\bautomatisch\b|\bautomatisch\b[^.\n]{0,20}\bmerg(e|en)\b/i,
|
|
434
474
|
},
|
|
475
|
+
|
|
476
|
+
...CONSEQUENCE_PHRASES,
|
|
435
477
|
];
|
|
436
478
|
|
|
437
479
|
/**
|
|
@@ -615,6 +657,25 @@ export interface Ledger extends JsonObject {
|
|
|
615
657
|
* as "no grants", which is the pre-ADR-252 behaviour exactly.
|
|
616
658
|
*/
|
|
617
659
|
grants?: MergeGrant[];
|
|
660
|
+
/**
|
|
661
|
+
* The objects a consequence authorization named, per operation.
|
|
662
|
+
*
|
|
663
|
+
* An authorization for one table, one environment or one recipient class is
|
|
664
|
+
* not an authorization for another, and until now the record could not
|
|
665
|
+
* express the difference for anything but pull-request numbers
|
|
666
|
+
* (`MergeGrant.targets`). This is that distinction generalised to the
|
|
667
|
+
* consequence vocabulary.
|
|
668
|
+
*
|
|
669
|
+
* IT IS A RECORDED FIELD, NOT A MATCHING CONDITION. Nothing consults it to
|
|
670
|
+
* refuse anything; the one consumer is `conformance_scan`, which counts
|
|
671
|
+
* after the fact when an executed operation's object is absent here. Making
|
|
672
|
+
* it a matching condition is the ledger item ADR-254 left to the owner, and
|
|
673
|
+
* it is deliberately not taken here.
|
|
674
|
+
*
|
|
675
|
+
* Optional, so a ledger written by an older build still parses. Absent reads
|
|
676
|
+
* as "no objects named", which is exactly the pre-2.2 behaviour.
|
|
677
|
+
*/
|
|
678
|
+
objects?: { [op: string]: string[] };
|
|
618
679
|
}
|
|
619
680
|
|
|
620
681
|
/**
|
|
@@ -1281,6 +1342,7 @@ export function takePending(
|
|
|
1281
1342
|
* file for the discriminator and the captured evidence behind it.
|
|
1282
1343
|
*/
|
|
1283
1344
|
export { humanTypedThisTurn } from "./_lib/machine_wake.js";
|
|
1345
|
+
export { extractObjects, OBJECT_REQUIRED_OPS } from "./_lib/consequence_objects.js";
|
|
1284
1346
|
|
|
1285
1347
|
export function run(stdin_text: string, options: { consumer_root: string }): number {
|
|
1286
1348
|
let envelope: JsonObject = {};
|
|
@@ -1332,6 +1394,17 @@ export function run(stdin_text: string, options: { consumer_root: string }): num
|
|
|
1332
1394
|
`"${prompt.trim().slice(0, 40)}"`;
|
|
1333
1395
|
}
|
|
1334
1396
|
|
|
1397
|
+
// The objects the prose named, per authorized operation. Recorded for every
|
|
1398
|
+
// consequence op that names one; `OBJECT_REQUIRED_OPS` is the subset whose
|
|
1399
|
+
// ABSENCE the conformance count reads as a finding, and that reading lives in
|
|
1400
|
+
// the scan rather than here — this side records what was said, and never
|
|
1401
|
+
// decides what it permits.
|
|
1402
|
+
const objects: { [op: string]: string[] } = {};
|
|
1403
|
+
for (const op of authorized) {
|
|
1404
|
+
const named = extractObjects(op, prompt);
|
|
1405
|
+
if (named.length > 0) objects[op] = named;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1335
1408
|
const now = new Date();
|
|
1336
1409
|
const ledger: Ledger = {
|
|
1337
1410
|
session_id: typeof envelope["session_id"] === "string" ? envelope["session_id"] : "",
|
|
@@ -1339,6 +1412,7 @@ export function run(stdin_text: string, options: { consumer_root: string }): num
|
|
|
1339
1412
|
authorized,
|
|
1340
1413
|
evidence,
|
|
1341
1414
|
prompt_chars: prompt.length,
|
|
1415
|
+
objects,
|
|
1342
1416
|
// Grants survive this write; `authorized` does not. That asymmetry IS the
|
|
1343
1417
|
// decision. A bare operation name stays one-shot exactly as `commit-policy`
|
|
1344
1418
|
// requires, and only an authorization that also froze its objects earns a
|
|
@@ -37,10 +37,12 @@ import { fileURLToPath } from 'node:url';
|
|
|
37
37
|
import { collectRepoAnchor, describeDrift } from './_lib/envelope_grounding.js';
|
|
38
38
|
import { readHookStdin } from './hooks/hook_stdin.js';
|
|
39
39
|
import {
|
|
40
|
-
RECYCLE_CONSUMED_REL,
|
|
41
|
-
RECYCLE_ENVELOPE_REL,
|
|
42
40
|
RECYCLE_MAX_AGE_HOURS,
|
|
41
|
+
predecessorTracePresent,
|
|
42
|
+
recycle_consumed_rel,
|
|
43
|
+
resolveContinuityRecord,
|
|
43
44
|
} from './_lib/recycle_envelope_paths.js';
|
|
45
|
+
import { env_session_id } from './sessions_cli.js';
|
|
44
46
|
import {
|
|
45
47
|
hasBoundaryMarker,
|
|
46
48
|
scanEnvelopeDirectives,
|
|
@@ -153,8 +155,33 @@ export function consume_handoff_context(root: string, now: Date = new Date()): C
|
|
|
153
155
|
* - focus (Phase 3.4): `AGENT_RESUME_FOCUS` narrows what the successor
|
|
154
156
|
* attacks first — the consumer-side mirror of `next_task`.
|
|
155
157
|
*/
|
|
156
|
-
export function consume_recycle_envelope(
|
|
157
|
-
|
|
158
|
+
export function consume_recycle_envelope(
|
|
159
|
+
root: string,
|
|
160
|
+
now: Date = new Date(),
|
|
161
|
+
session_id: string | null | undefined = undefined,
|
|
162
|
+
): ConsumeDecision {
|
|
163
|
+
// Phase 2.1: which record belongs to THIS session is a resolution, not a
|
|
164
|
+
// path constant. `resolveContinuityRecord` returns `null` with a reason
|
|
165
|
+
// when it cannot tell — the reader then starts clean and says the reason
|
|
166
|
+
// out loud rather than resuming from whichever file is newest.
|
|
167
|
+
//
|
|
168
|
+
// The id is a PARAMETER with an env fallback, not an env read. The
|
|
169
|
+
// dispatcher already carries `session_id` in the envelope, and reading the
|
|
170
|
+
// ambient variable instead means any process that inherits a host's
|
|
171
|
+
// `CLAUDE_CODE_SESSION_ID` — a test runner in an agent session, most
|
|
172
|
+
// obviously — resolves a foreign identity and reports the record absent.
|
|
173
|
+
const sessionId = session_id === undefined ? env_session_id() : session_id;
|
|
174
|
+
const override = process.env.AGENT_RECYCLE_ENVELOPE_FILE;
|
|
175
|
+
let target: string;
|
|
176
|
+
if (override !== undefined && override !== '') {
|
|
177
|
+
target = override;
|
|
178
|
+
} else {
|
|
179
|
+
const resolved = resolveContinuityRecord(root, sessionId);
|
|
180
|
+
if (resolved.file === null) {
|
|
181
|
+
return { action: 'absent', reason: resolved.reason };
|
|
182
|
+
}
|
|
183
|
+
target = resolved.file;
|
|
184
|
+
}
|
|
158
185
|
let text: string;
|
|
159
186
|
try {
|
|
160
187
|
text = fs.readFileSync(target, 'utf-8');
|
|
@@ -164,7 +191,10 @@ export function consume_recycle_envelope(root: string, now: Date = new Date()):
|
|
|
164
191
|
|
|
165
192
|
const consume = (): void => {
|
|
166
193
|
try {
|
|
167
|
-
fs.renameSync(
|
|
194
|
+
fs.renameSync(
|
|
195
|
+
target,
|
|
196
|
+
path.join(path.dirname(target), path.basename(recycle_consumed_rel(sessionId))),
|
|
197
|
+
);
|
|
168
198
|
} catch {
|
|
169
199
|
try {
|
|
170
200
|
fs.unlinkSync(target); // fallback — never let it survive
|
|
@@ -212,6 +242,19 @@ export function consume_recycle_envelope(root: string, now: Date = new Date()):
|
|
|
212
242
|
return { action: 'discard', reason: 'recycle envelope workspace does not resolve' };
|
|
213
243
|
}
|
|
214
244
|
|
|
245
|
+
// Lineage (Phase 2.3): a record that NAMES a predecessor is claiming a
|
|
246
|
+
// chain. If nothing in this workspace corroborates that session, the claim
|
|
247
|
+
// is unverifiable and the record is refused — never resolved to whatever
|
|
248
|
+
// else is lying about.
|
|
249
|
+
const predecessor = String(envelope['predecessor'] ?? '').trim();
|
|
250
|
+
if (predecessor !== '' && !predecessorTracePresent(root, predecessor)) {
|
|
251
|
+
consume();
|
|
252
|
+
return {
|
|
253
|
+
action: 'discard',
|
|
254
|
+
reason: `recycle envelope names predecessor "${predecessor}", which has no trace in this workspace`,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
215
258
|
// Drift first: a stale resume against the wrong tree is the failure the
|
|
216
259
|
// reader must see before anything else in the block.
|
|
217
260
|
const drift = describeDrift(envelope, collectRepoAnchor(root));
|
|
@@ -221,7 +264,7 @@ export function consume_recycle_envelope(root: string, now: Date = new Date()):
|
|
|
221
264
|
const focus = (process.env.AGENT_RESUME_FOCUS ?? '').trim();
|
|
222
265
|
const block = wrapAsPriorSessionData(JSON.stringify(envelope, null, 2), {
|
|
223
266
|
kind: 'recycle-envelope',
|
|
224
|
-
source:
|
|
267
|
+
source: path.relative(root, target) || path.basename(target),
|
|
225
268
|
warnings: [
|
|
226
269
|
...drift,
|
|
227
270
|
...(focus ? [`FOCUS: attack "${focus}" first — the rest of this envelope is context.`] : []),
|
|
@@ -265,7 +308,11 @@ export function main(): number {
|
|
|
265
308
|
}
|
|
266
309
|
if (event === 'session_start') {
|
|
267
310
|
const handoff = consume_handoff_context(root);
|
|
268
|
-
const recycle = consume_recycle_envelope(
|
|
311
|
+
const recycle = consume_recycle_envelope(
|
|
312
|
+
root,
|
|
313
|
+
new Date(),
|
|
314
|
+
String(envelope['session_id'] ?? '').trim() || env_session_id(),
|
|
315
|
+
);
|
|
269
316
|
const blocks: string[] = [];
|
|
270
317
|
const reasons: string[] = [];
|
|
271
318
|
// Recycle envelope first — it is the task-state restore the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fingerprint":"40918412:83446","manifest":{"schema_version":1,"concerns":{"chat-history":{"script":"src/scripts/chat_history.ts","args":["hook-dispatch"],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["result"]},"hot-context":{"script":"src/scripts/hot_context_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"handoff-context":{"script":"src/scripts/handoff_context_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"roadmap-progress":{"script":"src/scripts/roadmap_progress_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"onboarding-gate":{"script":"src/scripts/onboarding_gate_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"context-hygiene":{"script":"src/scripts/context_hygiene_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"verify-before-complete":{"script":"src/scripts/before_complete_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input","result"]},"ship-diff-volume":{"script":"src/scripts/hooks/ship_diff_volume_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"minimal-safe-diff":{"script":"src/scripts/minimal_safe_diff_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"injection-scan":{"script":"src/scripts/injection_scan_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input","result"]},"block-no-verify":{"script":"src/scripts/hooks/block_no_verify.ts","args":[],"fail_closed":true,"severity":"blocking","needs_payload_bodies":["input"]},"block-kernel-rule-writes":{"script":"src/scripts/hooks/block_kernel_rule_writes.ts","args":[],"fail_closed":true,"severity":"blocking","needs_payload_bodies":["input"]},"block-speaking-inbox-dir":{"script":"src/scripts/hooks/block_speaking_inbox_dir.ts","args":[],"fail_closed":false,"severity":"blocking","needs_payload_bodies":["input"]},"block-config-weakening":{"script":"src/scripts/hooks/block_config_weakening.ts","args":[],"fail_closed":false,"severity":"blocking","needs_payload_bodies":["input"]},"rtk-wrap":{"script":"src/scripts/hooks/rtk_wrap_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"design-slop":{"script":"src/scripts/hooks/design_slop_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"design-pass":{"script":"src/scripts/hooks/design_pass_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"design-pass-stop":{"script":"src/scripts/hooks/design_pass_hook.ts","args":["--slot","stop"],"fail_closed":false,"severity":"advisory"},"ui-route-nudge":{"script":"src/scripts/hooks/ui_route_nudge_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"suggestion-capture":{"script":"src/scripts/hooks/suggestion_capture_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"code-graph-nudge":{"script":"src/scripts/hooks/code_graph_nudge_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Grep","Glob","Read"],"needs_payload_bodies":["input"]},"memory-learn":{"script":"src/scripts/memory_learn_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"first-run-gate":{"script":"src/scripts/first_run_gate_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"profile-staleness":{"script":"src/scripts/profile_staleness_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"wrapper-freshness":{"script":"src/scripts/wrapper_freshness_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"surface-probe":{"script":"src/scripts/surface_probe_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"team-review-gate":{"script":"src/scripts/team_review_gate_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"pr-url-reminder":{"script":"src/scripts/pr_url_reminder_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input","result"]},"push-settle":{"script":"src/scripts/hooks/push_settle_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input","result"]},"language-mirror":{"script":"src/scripts/language_mirror_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"git-authorization":{"script":"src/scripts/git_authorization_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"evidence-independence":{"script":"src/scripts/hooks/evidence_independence.ts","args":[],"fail_closed":false,"severity":"blocking","needs_payload_bodies":["input"]},"session-canary":{"script":"src/scripts/session_canary_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"council-availability":{"script":"src/scripts/council_availability_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"telemetry-disclosure":{"script":"src/scripts/telemetry_disclosure_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"telemetry-flush":{"script":"src/scripts/hooks/telemetry_flush_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"self-repair":{"script":"src/scripts/self_repair_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"session-register":{"script":"src/scripts/session_register_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"orchestration-record":{"script":"src/scripts/hooks/orchestration_record_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Agent","Task"],"needs_payload_bodies":["input","result"]},"telemetry-usage":{"script":"src/scripts/hooks/telemetry_usage_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Skill"],"needs_payload_bodies":["input"]},"delegation-nudge":{"script":"src/scripts/hooks/delegation_nudge_hook.ts","args":[],"fail_closed":false,"severity":"advisory","nudge_rank":1},"skill-route":{"script":"src/scripts/hooks/skill_route_hook.ts","args":[],"fail_closed":false,"severity":"advisory","nudge_rank":2},"rule-inject":{"script":"src/scripts/hooks/rule_inject_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"end-review-nudge":{"script":"src/scripts/hooks/end_review_nudge_hook.ts","args":[],"fail_closed":false,"severity":"advisory","skip_on_refusal_retry":true},"turn-end-gate":{"script":"src/scripts/hooks/turn_end_gate_hook.ts","args":[],"fail_closed":false,"severity":"blocking"},"comment-discipline":{"script":"src/scripts/hooks/comment_discipline_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Write","Edit"],"needs_payload_bodies":["input"]},"edit-shape":{"script":"src/scripts/hooks/edit_shape_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Write"],"needs_payload_bodies":["input"]},"reread-guard":{"script":"src/scripts/hooks/reread_guard_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Read","Edit","Write"],"needs_payload_bodies":["input"]},"session-eol":{"script":"src/scripts/hooks/session_eol_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"run-continuation":{"script":"src/scripts/hooks/run_continuation_hook.ts","args":[],"fail_closed":false,"severity":"blocking"},"interruption-ledger":{"script":"src/scripts/hooks/interruption_ledger_hook.ts","args":[],"fail_closed":false,"severity":"advisory","skip_on_refusal_retry":true},"subagent-ledger":{"script":"src/scripts/hooks/subagent_ledger_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"tool-result-bytes":{"script":"src/scripts/hooks/tool_result_bytes_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"spawn-guard-shadow":{"script":"src/scripts/hooks/spawn_guard_shadow_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Agent","Task"]},"source-first-gate":{"script":"src/scripts/hooks/source_first_gate_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"journal-record":{"script":"src/scripts/hooks/journal_record_hook.ts","args":[],"fail_closed":false,"severity":"advisory"}},"roles":{"worker":{"drop":["delegation-nudge","skill-route","end-review-nudge","council-availability","team-review-gate","self-repair","session-eol","interruption-ledger"]}},"platforms":{"augment":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"pre_tool_use":["block-no-verify","evidence-independence","block-kernel-rule-writes","block-config-weakening","block-speaking-inbox-dir","rtk-wrap","design-slop","ui-route-nudge","code-graph-nudge","ship-diff-volume","reread-guard"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"]},"claude":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register","journal-record"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush","journal-record"],"stop":["chat-history","hot-context","verify-before-complete","team-review-gate","end-review-nudge","turn-end-gate","self-repair","session-register","session-eol","interruption-ledger","roadmap-progress","design-pass-stop","suggestion-capture","journal-record","run-continuation"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","delegation-nudge","skill-route","git-authorization","session-canary","self-repair","session-register","rule-inject","suggestion-capture","journal-record"],"pre_tool_use":["block-no-verify","evidence-independence","block-kernel-rule-writes","block-config-weakening","block-speaking-inbox-dir","rtk-wrap","design-slop","ui-route-nudge","code-graph-nudge","ship-diff-volume","reread-guard","spawn-guard-shadow","source-first-gate","rule-inject"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","language-mirror","design-pass","journal-record"],"pre_compact":["language-mirror","hot-context","rule-inject","journal-record"],"subagent_start":["subagent-ledger","journal-record"],"subagent_stop":["subagent-ledger","journal-record"]},"cowork":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","git-authorization","session-canary","self-repair","session-register"],"pre_tool_use":["block-no-verify","evidence-independence","block-kernel-rule-writes","block-config-weakening","block-speaking-inbox-dir","rtk-wrap","design-slop","ui-route-nudge","code-graph-nudge","ship-diff-volume","reread-guard","spawn-guard-shadow","source-first-gate"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"],"subagent_start":["subagent-ledger"],"subagent_stop":["subagent-ledger"]},"cursor":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","git-authorization","session-canary","self-repair","session-register"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"]},"cline":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","git-authorization","session-canary","self-repair","session-register"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"]},"windsurf":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","profile-staleness","wrapper-freshness","surface-probe","session-register"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","language-mirror","git-authorization","session-canary","self-repair","session-register"]},"gemini":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","git-authorization","session-canary","self-repair","session-register"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"]},"copilot":{"fallback_only":true}},"native_event_aliases":{"augment":{"SessionStart":"session_start","SessionEnd":"session_end","Stop":"stop","PostToolUse":"post_tool_use","PreToolUse":"pre_tool_use"},"claude":{"SessionStart":"session_start","SessionEnd":"session_end","Stop":"stop","UserPromptSubmit":"user_prompt_submit","PostToolUse":"post_tool_use","PreToolUse":"pre_tool_use","PreCompact":"pre_compact","SubagentStart":"subagent_start","SubagentStop":"subagent_stop"},"cowork":{"SessionStart":"session_start","SessionEnd":"session_end","Stop":"stop","UserPromptSubmit":"user_prompt_submit","PostToolUse":"post_tool_use","PreToolUse":"pre_tool_use","PreCompact":"pre_compact","SubagentStart":"subagent_start","SubagentStop":"subagent_stop"},"cursor":{"sessionStart":"session_start","sessionEnd":"session_end","stop":"stop","beforeSubmitPrompt":"user_prompt_submit","postToolUse":"post_tool_use","preToolUse":"pre_tool_use","preCompact":"pre_compact"},"cline":{"TaskStart":"session_start","TaskResume":"session_start","TaskComplete":"session_end","TaskCancel":"stop","UserPromptSubmit":"user_prompt_submit","PostToolUse":"post_tool_use","PreToolUse":"pre_tool_use","PreCompact":"pre_compact"},"windsurf":{"pre_user_prompt":"user_prompt_submit","post_cascade_response":"stop","post_setup_worktree":"session_start"},"gemini":{"SessionStart":"session_start","SessionEnd":"session_end","BeforeAgent":"user_prompt_submit","AfterAgent":"stop","BeforeTool":"pre_tool_use","AfterTool":"post_tool_use"}}}}
|
|
1
|
+
{"fingerprint":"8ca65564:83643","manifest":{"schema_version":1,"concerns":{"chat-history":{"script":"src/scripts/chat_history.ts","args":["hook-dispatch"],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["result"]},"hot-context":{"script":"src/scripts/hot_context_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"handoff-context":{"script":"src/scripts/handoff_context_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"roadmap-progress":{"script":"src/scripts/roadmap_progress_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"onboarding-gate":{"script":"src/scripts/onboarding_gate_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"context-hygiene":{"script":"src/scripts/context_hygiene_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"verify-before-complete":{"script":"src/scripts/before_complete_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input","result"]},"ship-diff-volume":{"script":"src/scripts/hooks/ship_diff_volume_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"minimal-safe-diff":{"script":"src/scripts/minimal_safe_diff_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"injection-scan":{"script":"src/scripts/injection_scan_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input","result"]},"block-no-verify":{"script":"src/scripts/hooks/block_no_verify.ts","args":[],"fail_closed":true,"severity":"blocking","needs_payload_bodies":["input"]},"block-kernel-rule-writes":{"script":"src/scripts/hooks/block_kernel_rule_writes.ts","args":[],"fail_closed":true,"severity":"blocking","needs_payload_bodies":["input"]},"block-speaking-inbox-dir":{"script":"src/scripts/hooks/block_speaking_inbox_dir.ts","args":[],"fail_closed":false,"severity":"blocking","needs_payload_bodies":["input"]},"block-config-weakening":{"script":"src/scripts/hooks/block_config_weakening.ts","args":[],"fail_closed":false,"severity":"blocking","needs_payload_bodies":["input"]},"rtk-wrap":{"script":"src/scripts/hooks/rtk_wrap_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"design-slop":{"script":"src/scripts/hooks/design_slop_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"design-pass":{"script":"src/scripts/hooks/design_pass_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"design-pass-stop":{"script":"src/scripts/hooks/design_pass_hook.ts","args":["--slot","stop"],"fail_closed":false,"severity":"advisory"},"ui-route-nudge":{"script":"src/scripts/hooks/ui_route_nudge_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"suggestion-capture":{"script":"src/scripts/hooks/suggestion_capture_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"code-graph-nudge":{"script":"src/scripts/hooks/code_graph_nudge_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Grep","Glob","Read"],"needs_payload_bodies":["input"]},"memory-learn":{"script":"src/scripts/memory_learn_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"first-run-gate":{"script":"src/scripts/first_run_gate_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"profile-staleness":{"script":"src/scripts/profile_staleness_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"wrapper-freshness":{"script":"src/scripts/wrapper_freshness_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"surface-probe":{"script":"src/scripts/surface_probe_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"team-review-gate":{"script":"src/scripts/team_review_gate_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"pr-url-reminder":{"script":"src/scripts/pr_url_reminder_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input","result"]},"push-settle":{"script":"src/scripts/hooks/push_settle_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input","result"]},"language-mirror":{"script":"src/scripts/language_mirror_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"git-authorization":{"script":"src/scripts/git_authorization_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"evidence-independence":{"script":"src/scripts/hooks/evidence_independence.ts","args":[],"fail_closed":false,"severity":"blocking","needs_payload_bodies":["input"]},"session-canary":{"script":"src/scripts/session_canary_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"council-availability":{"script":"src/scripts/council_availability_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"telemetry-disclosure":{"script":"src/scripts/telemetry_disclosure_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"telemetry-flush":{"script":"src/scripts/hooks/telemetry_flush_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"self-repair":{"script":"src/scripts/self_repair_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"session-register":{"script":"src/scripts/session_register_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"orchestration-record":{"script":"src/scripts/hooks/orchestration_record_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Agent","Task"],"needs_payload_bodies":["input","result"]},"telemetry-usage":{"script":"src/scripts/hooks/telemetry_usage_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Skill"],"needs_payload_bodies":["input"]},"delegation-nudge":{"script":"src/scripts/hooks/delegation_nudge_hook.ts","args":[],"fail_closed":false,"severity":"advisory","nudge_rank":1},"skill-route":{"script":"src/scripts/hooks/skill_route_hook.ts","args":[],"fail_closed":false,"severity":"advisory","nudge_rank":2},"rule-inject":{"script":"src/scripts/hooks/rule_inject_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"end-review-nudge":{"script":"src/scripts/hooks/end_review_nudge_hook.ts","args":[],"fail_closed":false,"severity":"advisory","skip_on_refusal_retry":true},"turn-end-gate":{"script":"src/scripts/hooks/turn_end_gate_hook.ts","args":[],"fail_closed":false,"severity":"blocking"},"comment-discipline":{"script":"src/scripts/hooks/comment_discipline_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Write","Edit"],"needs_payload_bodies":["input"]},"edit-shape":{"script":"src/scripts/hooks/edit_shape_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Write"],"needs_payload_bodies":["input"]},"reread-guard":{"script":"src/scripts/hooks/reread_guard_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Read","Edit","Write"],"needs_payload_bodies":["input"]},"session-eol":{"script":"src/scripts/hooks/session_eol_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"run-continuation":{"script":"src/scripts/hooks/run_continuation_hook.ts","args":[],"fail_closed":false,"severity":"blocking"},"interruption-ledger":{"script":"src/scripts/hooks/interruption_ledger_hook.ts","args":[],"fail_closed":false,"severity":"advisory","skip_on_refusal_retry":true},"subagent-ledger":{"script":"src/scripts/hooks/subagent_ledger_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"tool-result-bytes":{"script":"src/scripts/hooks/tool_result_bytes_hook.ts","args":[],"fail_closed":false,"severity":"advisory"},"spawn-guard-shadow":{"script":"src/scripts/hooks/spawn_guard_shadow_hook.ts","args":[],"fail_closed":false,"severity":"advisory","tools":["Agent","Task"]},"source-first-gate":{"script":"src/scripts/hooks/source_first_gate_hook.ts","args":[],"fail_closed":false,"severity":"advisory","needs_payload_bodies":["input"]},"journal-record":{"script":"src/scripts/hooks/journal_record_hook.ts","args":[],"fail_closed":false,"severity":"advisory"}},"roles":{"worker":{"drop":["delegation-nudge","skill-route","end-review-nudge","council-availability","team-review-gate","self-repair","session-eol","interruption-ledger"]}},"platforms":{"augment":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"pre_tool_use":["block-no-verify","evidence-independence","block-kernel-rule-writes","block-config-weakening","block-speaking-inbox-dir","rtk-wrap","design-slop","ui-route-nudge","code-graph-nudge","ship-diff-volume","reread-guard"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"]},"claude":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register","journal-record"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush","journal-record"],"stop":["chat-history","hot-context","verify-before-complete","team-review-gate","end-review-nudge","turn-end-gate","self-repair","session-register","session-eol","interruption-ledger","roadmap-progress","design-pass-stop","suggestion-capture","journal-record","run-continuation"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","delegation-nudge","skill-route","git-authorization","session-canary","self-repair","session-register","rule-inject","suggestion-capture","journal-record"],"pre_tool_use":["block-no-verify","evidence-independence","block-kernel-rule-writes","block-config-weakening","block-speaking-inbox-dir","rtk-wrap","design-slop","ui-route-nudge","code-graph-nudge","ship-diff-volume","reread-guard","spawn-guard-shadow","source-first-gate","rule-inject"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","language-mirror","design-pass","journal-record"],"pre_compact":["language-mirror","hot-context","rule-inject","journal-record"],"subagent_start":["subagent-ledger","journal-record"],"subagent_stop":["subagent-ledger","journal-record"]},"cowork":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","git-authorization","session-canary","self-repair","session-register"],"pre_tool_use":["block-no-verify","evidence-independence","block-kernel-rule-writes","block-config-weakening","block-speaking-inbox-dir","rtk-wrap","design-slop","ui-route-nudge","code-graph-nudge","ship-diff-volume","reread-guard","spawn-guard-shadow","source-first-gate"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"],"subagent_start":["subagent-ledger"],"subagent_stop":["subagent-ledger"]},"cursor":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","git-authorization","session-canary","self-repair","session-register"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"]},"cline":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","git-authorization","session-canary","self-repair","session-register"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"]},"windsurf":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","profile-staleness","wrapper-freshness","surface-probe","session-register"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","language-mirror","git-authorization","session-canary","self-repair","session-register"]},"gemini":{"session_start":["chat-history","hot-context","handoff-context","session-canary","council-availability","telemetry-disclosure","first-run-gate","onboarding-gate","verify-before-complete","minimal-safe-diff","profile-staleness","wrapper-freshness","surface-probe","session-register"],"session_end":["chat-history","memory-learn","session-register","roadmap-progress","telemetry-flush"],"stop":["chat-history","hot-context","verify-before-complete","self-repair","session-register","roadmap-progress","design-pass-stop"],"user_prompt_submit":["chat-history","verify-before-complete","minimal-safe-diff","language-mirror","git-authorization","session-canary","self-repair","session-register"],"post_tool_use":["chat-history","roadmap-progress","context-hygiene","verify-before-complete","minimal-safe-diff","injection-scan","pr-url-reminder","push-settle","orchestration-record","telemetry-usage","tool-result-bytes","edit-shape","comment-discipline","design-pass"]},"copilot":{"fallback_only":true}},"native_event_aliases":{"augment":{"SessionStart":"session_start","SessionEnd":"session_end","Stop":"stop","PostToolUse":"post_tool_use","PreToolUse":"pre_tool_use"},"claude":{"SessionStart":"session_start","SessionEnd":"session_end","Stop":"stop","UserPromptSubmit":"user_prompt_submit","PostToolUse":"post_tool_use","PreToolUse":"pre_tool_use","PreCompact":"pre_compact","SubagentStart":"subagent_start","SubagentStop":"subagent_stop"},"cowork":{"SessionStart":"session_start","SessionEnd":"session_end","Stop":"stop","UserPromptSubmit":"user_prompt_submit","PostToolUse":"post_tool_use","PreToolUse":"pre_tool_use","PreCompact":"pre_compact","SubagentStart":"subagent_start","SubagentStop":"subagent_stop"},"cursor":{"sessionStart":"session_start","sessionEnd":"session_end","stop":"stop","beforeSubmitPrompt":"user_prompt_submit","postToolUse":"post_tool_use","preToolUse":"pre_tool_use","preCompact":"pre_compact"},"cline":{"TaskStart":"session_start","TaskResume":"session_start","TaskComplete":"session_end","TaskCancel":"stop","UserPromptSubmit":"user_prompt_submit","PostToolUse":"post_tool_use","PreToolUse":"pre_tool_use","PreCompact":"pre_compact"},"windsurf":{"pre_user_prompt":"user_prompt_submit","post_cascade_response":"stop","post_setup_worktree":"session_start"},"gemini":{"SessionStart":"session_start","SessionEnd":"session_end","BeforeAgent":"user_prompt_submit","AfterAgent":"stop","BeforeTool":"pre_tool_use","AfterTool":"post_tool_use"}}}}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Hook manifest — single source of truth for which concerns fire on which
|
|
2
2
|
# (platform, event) tuples. Consumed by:
|
|
3
|
-
# - scripts/hooks/dispatch_hook.
|
|
4
|
-
# - scripts/lint_hook_manifest.
|
|
5
|
-
# - scripts/install.
|
|
3
|
+
# - src/scripts/hooks/dispatch_hook.ts (runtime resolver)
|
|
4
|
+
# - src/scripts/lint_hook_manifest.ts (CI gate; Phase 7.10)
|
|
5
|
+
# - src/scripts/install.ts (per-platform config writer)
|
|
6
6
|
#
|
|
7
7
|
# Schema and event vocabulary: docs/contracts/hook-architecture-v1.md.
|
|
8
8
|
# Per-platform event-name mapping: agents/settings/contexts/chat-history-platform-hooks.md.
|
|
@@ -626,8 +626,9 @@ concerns:
|
|
|
626
626
|
#
|
|
627
627
|
# Correctness rests on heartbeat + TTL alone; deregistration only frees a claim
|
|
628
628
|
# sooner. So Windsurf's missing session_end costs latency, not correctness.
|
|
629
|
-
# Declared non-carriers: copilot (
|
|
630
|
-
#
|
|
629
|
+
# Declared non-carriers: copilot (this package binds nothing there and has
|
|
630
|
+
# measured nothing there), cursor (per-turn reachability unestablished), cowork
|
|
631
|
+
# (slots wired, lifecycle events inert) — a session there
|
|
631
632
|
# registers but expires by TTL rather than heartbeating, and the concern says so
|
|
632
633
|
# on stderr rather than letting the coverage join read green.
|
|
633
634
|
# Never blocks. fail_closed: false.
|
|
@@ -1256,11 +1257,12 @@ platforms:
|
|
|
1256
1257
|
|
|
1257
1258
|
# Phase 7.5 — Cursor. `.cursor/hooks.json` (project) is read by the
|
|
1258
1259
|
# IDE and CLI; `~/.cursor/hooks.json` (user) is opt-in via
|
|
1259
|
-
# `install
|
|
1260
|
+
# `agent-config install --cursor-user-hooks` and uses scripts/hooks/cursor-dispatcher.sh
|
|
1260
1261
|
# to route into the active workspace. UserPromptSubmit maps to
|
|
1261
|
-
# `beforeSubmitPrompt` (Cursor third-party-hooks table).
|
|
1262
|
-
#
|
|
1263
|
-
#
|
|
1262
|
+
# `beforeSubmitPrompt` (Cursor third-party-hooks table). Whether the CLI
|
|
1263
|
+
# surface fires `stop` is not established here; the /checkpoint fallback
|
|
1264
|
+
# covers a session where it does not. See
|
|
1265
|
+
# agents/settings/contexts/chat-history-platform-hooks.md § Cursor.
|
|
1264
1266
|
cursor:
|
|
1265
1267
|
session_start: [chat-history, hot-context, handoff-context, session-canary, council-availability, telemetry-disclosure, first-run-gate, onboarding-gate, verify-before-complete, minimal-safe-diff, profile-staleness, wrapper-freshness, surface-probe, session-register]
|
|
1266
1268
|
session_end: [chat-history, memory-learn, session-register, roadmap-progress, telemetry-flush]
|
|
@@ -1319,8 +1321,9 @@ platforms:
|
|
|
1319
1321
|
user_prompt_submit: [chat-history, verify-before-complete, minimal-safe-diff, language-mirror, git-authorization, session-canary, self-repair, session-register]
|
|
1320
1322
|
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff, injection-scan, pr-url-reminder, push-settle, orchestration-record, telemetry-usage, tool-result-bytes, edit-shape, comment-discipline, design-pass]
|
|
1321
1323
|
|
|
1322
|
-
# Phase 7.9 —
|
|
1323
|
-
# rule-only fallback; the dispatcher silently
|
|
1324
|
+
# Phase 7.9 — this package binds no hook on Copilot and has measured none
|
|
1325
|
+
# there. Concerns route through rule-only fallback; the dispatcher silently
|
|
1326
|
+
# no-ops on --platform copilot.
|
|
1324
1327
|
copilot:
|
|
1325
1328
|
fallback_only: true
|
|
1326
1329
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Replaces the four per-concern trampolines (augment-chat-history.sh,
|
|
5
5
|
# augment-roadmap-progress.sh, augment-onboarding-gate.sh,
|
|
6
6
|
# augment-context-hygiene.sh). One script, dispatched per (platform, event)
|
|
7
|
-
# tuple via scripts/hooks/dispatch_hook.
|
|
7
|
+
# tuple via src/scripts/hooks/dispatch_hook.ts reading src/scripts/hook_manifest.yaml.
|
|
8
8
|
#
|
|
9
9
|
# Augment requires hook scripts to use the .sh extension and live at user
|
|
10
10
|
# scope (~/.augment/hooks/) — same constraint as the legacy trampolines.
|