dlw-machine-setup 0.8.2 → 0.8.3
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/bin/installer.js +24 -4
- package/package.json +1 -1
package/bin/installer.js
CHANGED
|
@@ -4358,9 +4358,25 @@ var HOOKS_TAG_PREFIX = "hooks-v";
|
|
|
4358
4358
|
var HOOKS_ROOT_FOLDER = "hooks";
|
|
4359
4359
|
var BUNDLE_NAME = "abap-mcp-hooks";
|
|
4360
4360
|
var HOOK_DEFINITIONS = [
|
|
4361
|
-
{
|
|
4362
|
-
|
|
4363
|
-
|
|
4361
|
+
{
|
|
4362
|
+
event: "PreToolUse",
|
|
4363
|
+
script: "sap-safety-gate.mjs",
|
|
4364
|
+
/* Fires on lifecycle/preview tools regardless of which MCP
|
|
4365
|
+
* server exposes them — the safety gate's job is to block
|
|
4366
|
+
* delete + transport release operations wherever they originate. */
|
|
4367
|
+
matcher: "mcp__.*__sap_(object_lifecycle|transport_lifecycle|data_preview)"
|
|
4368
|
+
},
|
|
4369
|
+
{
|
|
4370
|
+
event: "PostToolUse",
|
|
4371
|
+
script: "telemetry-post-tool.mjs",
|
|
4372
|
+
/* Telemetry only meaningful for the SAP ABAP MCP server itself. */
|
|
4373
|
+
matcher: "mcp__sap-abap-mcp__.*"
|
|
4374
|
+
},
|
|
4375
|
+
{
|
|
4376
|
+
event: "PostToolUseFailure",
|
|
4377
|
+
script: "telemetry-post-tool-failure.mjs",
|
|
4378
|
+
matcher: "mcp__sap-abap-mcp__.*"
|
|
4379
|
+
},
|
|
4364
4380
|
{ event: "SessionStart", script: "telemetry-session-start.mjs" },
|
|
4365
4381
|
{ event: "SessionEnd", script: "telemetry-session-end.mjs" }
|
|
4366
4382
|
];
|
|
@@ -4449,7 +4465,11 @@ async function fetchAbapHooks(token, repo, targetDir, agent) {
|
|
|
4449
4465
|
* resulting command is exactly `node .claude/hooks/<script>`,
|
|
4450
4466
|
* matching the form Claude Code already uses for Factory hooks. */
|
|
4451
4467
|
command: `node {hookDir}/${d.script}`,
|
|
4452
|
-
script: d.script
|
|
4468
|
+
script: d.script,
|
|
4469
|
+
/* The runner copies the matcher straight into the merged JSON
|
|
4470
|
+
* entry. Omitted when undefined so session-level hooks don't
|
|
4471
|
+
* carry a useless `matcher` field. */
|
|
4472
|
+
...d.matcher ? { matcher: d.matcher } : {}
|
|
4453
4473
|
})),
|
|
4454
4474
|
{ type: "instructions-snippet", content: INSTRUCTIONS_SNIPPET }
|
|
4455
4475
|
];
|