@ascenda-one/claude-code-hooks 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -64
- package/dist/cli.js +69 -9
- package/dist/cli.js.map +1 -1
- package/examples/settings.local.json +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Claude Code hooks adapter for Ascenda AI workload telemetry.
|
|
4
4
|
|
|
5
|
-
Part of [ai-engineer-tools](../).
|
|
5
|
+
Part of [ai-engineer-tools](../). For what these measurements do and do not
|
|
6
|
+
establish, see [What this measures](../#what-this-measures-and-what-that-does-not-yet-prove).
|
|
7
|
+
Event mapping: [docs/CLAUDE_MAPPING.md](./docs/CLAUDE_MAPPING.md).
|
|
6
8
|
|
|
7
9
|
## Role in workload detection (Phase 1)
|
|
8
10
|
|
|
@@ -30,119 +32,134 @@ Claude Code hook adapter
|
|
|
30
32
|
|
|
31
33
|
Same loose-coupled pairing model as the VS Code and Cursor extensions. See [TOOL_PAIRING_API_REFERENCE.md](../api-docs/TOOL_PAIRING_API_REFERENCE.md).
|
|
32
34
|
|
|
33
|
-
##
|
|
35
|
+
## Install
|
|
34
36
|
|
|
35
|
-
###
|
|
37
|
+
### Recommended: the Claude Code plugin
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- A paired Ascenda `toolInstallationId` + `eventWriteToken` (from VS Code/Cursor extension or [pairing-sim `e2e`](../ascenda-pairing-sim/))
|
|
40
|
-
|
|
41
|
-
### 1. Build and install the hook CLI
|
|
39
|
+
One command installs this adapter, the work-signals skill, and the MCP server
|
|
40
|
+
together — already wired to every lifecycle event, no settings file to edit:
|
|
42
41
|
|
|
43
42
|
```bash
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
npm run build:shared
|
|
47
|
-
|
|
48
|
-
cd ascenda-claude-code-hooks
|
|
49
|
-
npm run build
|
|
50
|
-
npm link
|
|
43
|
+
claude plugin marketplace add ascendaone-com/ai-engineer-tools
|
|
44
|
+
claude plugin install ascenda@ascenda-one
|
|
51
45
|
```
|
|
52
46
|
|
|
53
|
-
|
|
47
|
+
From inside a session, use `/plugin marketplace add …` then `/plugin install …`.
|
|
48
|
+
See [ascenda-agent-skills](../ascenda-agent-skills/) for what the bundle holds.
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
./scripts/install-local.sh
|
|
57
|
-
```
|
|
50
|
+
### Alternative: this adapter on its own
|
|
58
51
|
|
|
59
|
-
|
|
52
|
+
If you want the deterministic hooks without the skill or MCP server, the
|
|
53
|
+
published package runs with no clone and no build:
|
|
60
54
|
|
|
61
55
|
```bash
|
|
62
|
-
|
|
63
|
-
ascenda-claude-hook # prints usage if no hook name is passed
|
|
56
|
+
npx @ascenda-one/claude-code-hooks --help
|
|
64
57
|
```
|
|
65
58
|
|
|
66
|
-
|
|
59
|
+
Then wire the events yourself — see [Register hooks manually](#register-hooks-manually).
|
|
67
60
|
|
|
68
|
-
|
|
61
|
+
### Pair first (both routes)
|
|
69
62
|
|
|
70
|
-
|
|
63
|
+
Neither route sends anything until this machine is paired:
|
|
71
64
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
```bash
|
|
66
|
+
npx -y @ascenda-one/claude-code-hooks pair
|
|
67
|
+
```
|
|
75
68
|
|
|
76
|
-
|
|
69
|
+
It prints a 6-digit code — confirm it in the Ascenda app under
|
|
70
|
+
**Connections → Ingest telemetry** — then saves the write token to
|
|
71
|
+
`~/.ascenda/tokens/` and prints the one line left to do by hand:
|
|
77
72
|
|
|
78
73
|
```bash
|
|
79
|
-
|
|
80
|
-
# local.devauth.env configured (gitignored DevAuth tokens)
|
|
81
|
-
npm run build
|
|
82
|
-
node dist/cli.js e2e --tool-type claude_code
|
|
74
|
+
export ASCENDA_TOOL_INSTALLATION_ID="claude_code:<uuid>" # printed by `pair`
|
|
83
75
|
```
|
|
84
76
|
|
|
85
|
-
|
|
77
|
+
Add that to your shell profile (`~/.zshrc`, `~/.bashrc`) and restart Claude
|
|
78
|
+
Code. The token itself is never copied around — every CLI tool reads it from
|
|
79
|
+
the file `pair` wrote. (The editor extension's pairing cannot be reused here:
|
|
80
|
+
its token lives in the editor's private secret storage.)
|
|
86
81
|
|
|
87
|
-
|
|
82
|
+
> **This variable is required, not optional.** Without it every hook
|
|
83
|
+
> invocation exits with `Missing ASCENDA_TOOL_INSTALLATION_ID`. The adapter
|
|
84
|
+
> refuses to guess rather than silently mint a second, unpaired identity that
|
|
85
|
+
> would fragment your telemetry across two installations.
|
|
88
86
|
|
|
89
|
-
|
|
87
|
+
On a Dev backend with no phone, [pairing-sim](../ascenda-pairing-sim/) stands in
|
|
88
|
+
for the app:
|
|
90
89
|
|
|
91
90
|
```bash
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
export ASCENDA_EVENT_WRITE_TOKEN="<eventWriteToken>"
|
|
91
|
+
cd ../ascenda-pairing-sim && npm run build
|
|
92
|
+
node dist/cli.js e2e --tool-type claude_code
|
|
95
93
|
```
|
|
96
94
|
|
|
97
|
-
Optional:
|
|
95
|
+
Optional environment:
|
|
98
96
|
|
|
99
97
|
| Variable | Purpose |
|
|
100
98
|
| --- | --- |
|
|
99
|
+
| `ASCENDA_API_BASE_URL` | Backend to send to. Defaults to `https://api.ascenda.one`; use `http://localhost:5002` or the Azure Dev host for development |
|
|
100
|
+
| `ASCENDA_EVENT_WRITE_TOKEN` | Only if you have no prior pairing to reuse — normally the token file supplies this |
|
|
101
101
|
| `ASCENDA_EVENT_WRITE_TOKEN_FILE` | Override token file path (default `~/.ascenda/tokens/<toolInstallationId>`) |
|
|
102
102
|
| `ASCENDA_SESSION_ID` | Stable session id across hooks |
|
|
103
103
|
| `ASCENDA_WORKSPACE_HASH` | Opaque workspace hash if you set one |
|
|
104
104
|
|
|
105
|
-
On first run
|
|
105
|
+
On first run the CLI seeds `~/.ascenda/tokens/<toolInstallationId>` so
|
|
106
|
+
**tool-scoped renew** can persist rotated tokens without you editing anything.
|
|
106
107
|
|
|
107
|
-
###
|
|
108
|
+
### Register hooks manually
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
The plugin does this for you — this section is only for the standalone route.
|
|
111
|
+
Merge [`examples/settings.local.json`](./examples/settings.local.json) into
|
|
112
|
+
`.claude/settings.local.json` in a project, or into Claude Code's user settings
|
|
113
|
+
for machine-wide coverage:
|
|
112
114
|
|
|
113
115
|
```json
|
|
114
116
|
{
|
|
115
117
|
"hooks": {
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
118
|
+
"SessionStart": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks SessionStart" }] }],
|
|
119
|
+
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks UserPromptSubmit" }] }],
|
|
120
|
+
"PreToolUse": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks PreToolUse" }] }],
|
|
121
|
+
"PostToolUse": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks PostToolUse" }] }],
|
|
122
|
+
"PreCompact": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks PreCompact" }] }],
|
|
123
|
+
"PostCompact": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks PostCompact" }] }],
|
|
124
|
+
"Stop": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks Stop" }] }],
|
|
125
|
+
"Notification": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks Notification" }] }]
|
|
123
126
|
}
|
|
124
127
|
}
|
|
125
128
|
```
|
|
126
129
|
|
|
127
|
-
|
|
130
|
+
### Verify
|
|
128
131
|
|
|
129
|
-
|
|
132
|
+
Start Claude Code in a project with hooks configured, submit a prompt or run a
|
|
133
|
+
tool, and confirm events reach the backend (or simply that the hook exits `0`).
|
|
130
134
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
Exit codes: `3` on auth failure (re-pair), `2` on missing consent (renew in the
|
|
136
|
+
Ascenda app). A telemetry failure never blocks your turn.
|
|
137
|
+
|
|
138
|
+
## Build from source
|
|
134
139
|
|
|
135
|
-
|
|
140
|
+
Not needed to use this — both routes above ship prebuilt. It is here because
|
|
141
|
+
"read what runs on your machine" is a fair thing to want from a telemetry tool.
|
|
136
142
|
|
|
137
143
|
```bash
|
|
138
|
-
#
|
|
139
|
-
npm
|
|
144
|
+
# from the repo root (workspace install + shared packages first)
|
|
145
|
+
npm install
|
|
146
|
+
npm run build:shared
|
|
147
|
+
|
|
148
|
+
cd ascenda-claude-code-hooks
|
|
149
|
+
npm run build
|
|
150
|
+
npm link # or ./scripts/install-local.sh
|
|
151
|
+
|
|
152
|
+
which ascenda-claude-hook
|
|
153
|
+
ascenda-claude-hook # prints usage when passed no hook name
|
|
154
|
+
|
|
155
|
+
npm run test:sample # pipes a sample PostToolUse payload through the CLI
|
|
140
156
|
npm run test:compact
|
|
141
157
|
```
|
|
142
158
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
159
|
+
A local build exposes the binary as `ascenda-claude-hook` — substitute it for
|
|
160
|
+
`npx -y @ascenda-one/claude-code-hooks` in the hook config above. If it is not
|
|
161
|
+
on Claude Code's PATH, use an absolute path such as
|
|
162
|
+
`/Users/<you>/.nvm/versions/node/<ver>/bin/ascenda-claude-hook`.
|
|
146
163
|
|
|
147
164
|
## Supported Claude hook events
|
|
148
165
|
|
|
@@ -188,4 +205,7 @@ Correction detection uses local pattern matching on prompt text in the hook proc
|
|
|
188
205
|
|
|
189
206
|
## Compliance
|
|
190
207
|
|
|
191
|
-
`consentScope: ide_telemetry` and `provenance: ai_work_telemetry` on every
|
|
208
|
+
`consentScope: ide_telemetry` and `provenance: ai_work_telemetry` on every
|
|
209
|
+
event. Australian-hosted backend. Not a medical device — workload
|
|
210
|
+
self-awareness only, no diagnosis, no clinical claim. Consent is revocable from
|
|
211
|
+
the app at any time; after revocation ingest returns `401`.
|
package/dist/cli.js
CHANGED
|
@@ -335,8 +335,8 @@ var require_http = __commonJS({
|
|
|
335
335
|
"use strict";
|
|
336
336
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
337
337
|
exports.AscendaApiError = void 0;
|
|
338
|
-
exports.createPairingSession =
|
|
339
|
-
exports.getPairingStatus =
|
|
338
|
+
exports.createPairingSession = createPairingSession2;
|
|
339
|
+
exports.getPairingStatus = getPairingStatus2;
|
|
340
340
|
exports.renewToolToken = renewToolToken;
|
|
341
341
|
exports.postToolEvent = postToolEvent;
|
|
342
342
|
exports.postToolEventsBatch = postToolEventsBatch;
|
|
@@ -352,7 +352,7 @@ var require_http = __commonJS({
|
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
354
|
exports.AscendaApiError = AscendaApiError2;
|
|
355
|
-
async function
|
|
355
|
+
async function createPairingSession2(apiBaseUrl, toolInstallationId, toolType, displayName) {
|
|
356
356
|
const response = await fetch(`${apiBaseUrl}/v1/tool-pairing-sessions`, {
|
|
357
357
|
method: "POST",
|
|
358
358
|
headers: { "Content-Type": "application/json" },
|
|
@@ -362,7 +362,7 @@ var require_http = __commonJS({
|
|
|
362
362
|
throw new AscendaApiError2(response.status, void 0, await response.text());
|
|
363
363
|
return await response.json();
|
|
364
364
|
}
|
|
365
|
-
async function
|
|
365
|
+
async function getPairingStatus2(apiBaseUrl, pairingSessionId) {
|
|
366
366
|
const response = await fetch(`${apiBaseUrl}/v1/tool-pairing-sessions/${encodeURIComponent(pairingSessionId)}/status`, {
|
|
367
367
|
method: "GET",
|
|
368
368
|
headers: { Accept: "application/json" }
|
|
@@ -463,16 +463,16 @@ var require_tokenStore = __commonJS({
|
|
|
463
463
|
};
|
|
464
464
|
}();
|
|
465
465
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
466
|
-
exports.defaultTokenFilePath =
|
|
467
|
-
exports.persistEventWriteToken =
|
|
466
|
+
exports.defaultTokenFilePath = defaultTokenFilePath3;
|
|
467
|
+
exports.persistEventWriteToken = persistEventWriteToken3;
|
|
468
468
|
exports.readTokenFile = readTokenFile2;
|
|
469
469
|
var fs = __importStar(__require("fs"));
|
|
470
470
|
var os = __importStar(__require("os"));
|
|
471
471
|
var path = __importStar(__require("path"));
|
|
472
|
-
function
|
|
472
|
+
function defaultTokenFilePath3(toolInstallationId) {
|
|
473
473
|
return path.join(os.homedir(), ".ascenda", "tokens", sanitizeFilePart(toolInstallationId));
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function persistEventWriteToken3(tokenFilePath, token) {
|
|
476
476
|
const dir = path.dirname(tokenFilePath);
|
|
477
477
|
fs.mkdirSync(dir, { recursive: true, mode: 448 });
|
|
478
478
|
fs.writeFileSync(tokenFilePath, token, { encoding: "utf8", mode: 384 });
|
|
@@ -825,6 +825,10 @@ var require_out2 = __commonJS({
|
|
|
825
825
|
}
|
|
826
826
|
});
|
|
827
827
|
|
|
828
|
+
// src/cli.ts
|
|
829
|
+
var import_tool_kit6 = __toESM(require_out2(), 1);
|
|
830
|
+
import { randomUUID } from "node:crypto";
|
|
831
|
+
|
|
828
832
|
// src/ascendaClient.ts
|
|
829
833
|
var import_tool_kit = __toESM(require_out2(), 1);
|
|
830
834
|
var import_tool_kit2 = __toESM(require_out2(), 1);
|
|
@@ -1060,9 +1064,65 @@ function sanitiseToolName(toolName) {
|
|
|
1060
1064
|
// src/cli.ts
|
|
1061
1065
|
var INTENTION_INVITE = "Ascenda tip: if it's natural, you can ask what would make this session count before diving in \u2014 one line is enough. Not a required step, and skip it entirely if the user is already mid-task.";
|
|
1062
1066
|
var MILESTONE_DEBRIEF_INVITE = "Ascenda tip: that finished a piece of work. If the moment suits, it's worth a short debrief \u2014 what moved, what's still unresolved, and what you'd do differently next time. One or two lines. Skip it if they're already onto the next thing.";
|
|
1067
|
+
async function runPair() {
|
|
1068
|
+
const apiBaseUrl = (process.env.ASCENDA_API_BASE_URL ?? "https://api.ascenda.one").replace(/\/$/, "");
|
|
1069
|
+
const flagIndex = process.argv.indexOf("--tool-type");
|
|
1070
|
+
const toolType = flagIndex !== -1 ? (process.argv[flagIndex + 1] ?? "").trim() || ASCENDA_TOOL_TYPE : ASCENDA_TOOL_TYPE;
|
|
1071
|
+
const existing = process.env.ASCENDA_TOOL_INSTALLATION_ID?.trim();
|
|
1072
|
+
const toolInstallationId = existing && existing.includes(":") ? existing : `${toolType}:${randomUUID()}`;
|
|
1073
|
+
const session = await (0, import_tool_kit6.createPairingSession)(apiBaseUrl, toolInstallationId, toolType, toolType === ASCENDA_TOOL_TYPE ? "Claude Code" : toolType);
|
|
1074
|
+
const code = session.deviceCode ?? session.code;
|
|
1075
|
+
process.stdout.write(
|
|
1076
|
+
`
|
|
1077
|
+
Pairing code: ${code}
|
|
1078
|
+
|
|
1079
|
+
In the Ascenda app: Connections -> Ingest telemetry -> paste the code -> Pair tool.
|
|
1080
|
+
Waiting for confirmation (expires ${session.expiresAt})...
|
|
1081
|
+
|
|
1082
|
+
`
|
|
1083
|
+
);
|
|
1084
|
+
const deadline = Date.now() + 11 * 60 * 1e3;
|
|
1085
|
+
while (Date.now() < deadline) {
|
|
1086
|
+
await new Promise((resolve) => setTimeout(resolve, 3e3));
|
|
1087
|
+
const status = await (0, import_tool_kit6.getPairingStatus)(apiBaseUrl, session.pairingSessionId);
|
|
1088
|
+
if (status.status === "pending") continue;
|
|
1089
|
+
if (status.status !== "paired") {
|
|
1090
|
+
process.stderr.write(`Pairing ${status.status}. Run the command again for a fresh code.
|
|
1091
|
+
`);
|
|
1092
|
+
process.exitCode = 1;
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
const pairedId = status.toolInstallationId ?? toolInstallationId;
|
|
1096
|
+
if (!status.eventWriteToken) {
|
|
1097
|
+
process.stderr.write(
|
|
1098
|
+
"Paired, but the server did not deliver a write token. Disconnect this tool in the Ascenda app and run the command again.\n"
|
|
1099
|
+
);
|
|
1100
|
+
process.exitCode = 1;
|
|
1101
|
+
return;
|
|
1102
|
+
}
|
|
1103
|
+
const tokenFilePath = (0, import_tool_kit6.defaultTokenFilePath)(pairedId);
|
|
1104
|
+
(0, import_tool_kit6.persistEventWriteToken)(tokenFilePath, status.eventWriteToken);
|
|
1105
|
+
process.stdout.write(
|
|
1106
|
+
`Paired. Write token saved to ${tokenFilePath}
|
|
1107
|
+
|
|
1108
|
+
One step left \u2014 add this to your shell profile (~/.zshrc), then restart Claude Code:
|
|
1109
|
+
|
|
1110
|
+
export ASCENDA_TOOL_INSTALLATION_ID="${pairedId}"
|
|
1111
|
+
|
|
1112
|
+
`
|
|
1113
|
+
);
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
process.stderr.write("Timed out waiting for confirmation. Run the command again for a fresh code.\n");
|
|
1117
|
+
process.exitCode = 1;
|
|
1118
|
+
}
|
|
1063
1119
|
async function main() {
|
|
1064
1120
|
const hookName = process.argv[2];
|
|
1065
|
-
if (!hookName) throw new Error("Usage: ascenda-claude-hook <ClaudeHookEventName>");
|
|
1121
|
+
if (!hookName) throw new Error("Usage: ascenda-claude-hook <ClaudeHookEventName> | pair");
|
|
1122
|
+
if (hookName === "pair") {
|
|
1123
|
+
await runPair();
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1066
1126
|
const input = await readJsonFromStdin();
|
|
1067
1127
|
if (hookName === "SessionStart" && isNewSessionStart(input) && process.env.ASCENDA_DISABLE_INTENTION_INVITE !== "true") {
|
|
1068
1128
|
process.stdout.write(JSON.stringify({
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,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,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACxC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1D,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IAEpB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,CAAC;IAC9E,OAAO,MAAyB,CAAC;AACnC,CAAC;AAED,IAAI,EAAE;KACH,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACf,yEAAyE;IACzE,0EAA0E;IAC1E,yEAAyE;IACzE,oEAAoE;IACpE,iEAAiE;IACjE,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACxE,CAAC,CAAC;KACD,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"hooks": {
|
|
3
|
-
"SessionStart": [{ "hooks": [{ "type": "command", "command": "ascenda-claude-
|
|
4
|
-
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "ascenda-claude-
|
|
5
|
-
"PreToolUse": [{ "hooks": [{ "type": "command", "command": "ascenda-claude-
|
|
6
|
-
"PostToolUse": [{ "hooks": [{ "type": "command", "command": "ascenda-claude-
|
|
7
|
-
"PreCompact": [{ "hooks": [{ "type": "command", "command": "ascenda-claude-
|
|
8
|
-
"PostCompact": [{ "hooks": [{ "type": "command", "command": "ascenda-claude-
|
|
9
|
-
"Stop": [{ "hooks": [{ "type": "command", "command": "ascenda-claude-
|
|
10
|
-
"Notification": [{ "hooks": [{ "type": "command", "command": "ascenda-claude-
|
|
3
|
+
"SessionStart": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks SessionStart" }] }],
|
|
4
|
+
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks UserPromptSubmit" }] }],
|
|
5
|
+
"PreToolUse": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks PreToolUse" }] }],
|
|
6
|
+
"PostToolUse": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks PostToolUse" }] }],
|
|
7
|
+
"PreCompact": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks PreCompact" }] }],
|
|
8
|
+
"PostCompact": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks PostCompact" }] }],
|
|
9
|
+
"Stop": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks Stop" }] }],
|
|
10
|
+
"Notification": [{ "hooks": [{ "type": "command", "command": "npx -y @ascenda-one/claude-code-hooks Notification" }] }]
|
|
11
11
|
}
|
|
12
12
|
}
|
package/package.json
CHANGED