@alessandroraffa/tangyr 0.21.2 → 0.21.4
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/dist/index.js +574 -495
- package/mappings/hook-events.yaml +44 -34
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ notes:
|
|
|
12
12
|
- Source events below are the events the canonical agent-coding kit registers, plus SessionStart.
|
|
13
13
|
- An event a kit registers but this file does not list is not silently dropped — the compilers report it as unmapped and name this file. Keeping the two in step is the point of that report.
|
|
14
14
|
- SessionStart, UserPromptSubmit and PostToolUseFailure were added on 2026-09-04. UserPromptSubmit and PostToolUseFailure were already registered by the kit and were being dropped for every non-claude-code target with no reason attached, because an event absent from this file was indistinguishable from one deliberately dropped.
|
|
15
|
-
- Copilot event coverage
|
|
15
|
+
- Copilot event coverage was settled on 2026-09-07 and no longer needs a probe: the CLI ships a JSON schema (schemas/api.schema.json, definition HookType) enumerating seventeen hook events with descriptions, and one live session confirmed the file is loaded and fires. The note this replaces said no stable denominator was published; the vendor ships one inside the tool.
|
|
16
16
|
- Codex hook support is currently a macOS/Linux baseline; Windows remains unsupported unless vendor documentation changes.
|
|
17
17
|
|
|
18
18
|
source_events:
|
|
@@ -42,53 +42,63 @@ targets:
|
|
|
42
42
|
|
|
43
43
|
copilot:
|
|
44
44
|
delivery: mapped
|
|
45
|
-
|
|
45
|
+
# Measured on 2026-09-07 against GitHub Copilot CLI 1.0.83, which ships a
|
|
46
|
+
# JSON schema documenting its hook contract — schemas/api.schema.json,
|
|
47
|
+
# definition HookType — and which was probed live in a real agent turn.
|
|
48
|
+
# These are results, not a reading of a binary.
|
|
49
|
+
#
|
|
50
|
+
# The event enum has seventeen values, all camelCase, each with a written
|
|
51
|
+
# description: preToolUse, preMcpToolCall, postToolUse, postToolUseFailure,
|
|
52
|
+
# userPromptSubmitted, userPromptTransformed, sessionStart, sessionEnd,
|
|
53
|
+
# postResult, prePRDescription, errorOccurred, agentStop, subagentStart,
|
|
54
|
+
# subagentStop, preCompact, permissionRequest, notification.
|
|
55
|
+
#
|
|
56
|
+
# Every source event below has an equivalent. The entries this replaces
|
|
57
|
+
# said otherwise: six were marked `probe` with the reason "not probeable on
|
|
58
|
+
# the machine this mapping was last measured on", and PreCompact was a
|
|
59
|
+
# `drop` claiming "no documented user-level equivalent" for an event the
|
|
60
|
+
# vendor's own schema documents. `Stop` pointed at sessionEnd — the session
|
|
61
|
+
# ending — where agentStop is the agent stopping, which is what it means.
|
|
62
|
+
#
|
|
63
|
+
# The file shape was already right and is unchanged: Copilot accepts Claude
|
|
64
|
+
# Code's nested matcher/hooks structure under a top-level `hooks` object,
|
|
65
|
+
# and its log says so when it does not. What made a kit's hooks reach
|
|
66
|
+
# Copilot and do nothing is the matcher: Copilot matches on its own tool
|
|
67
|
+
# names — measured bash, view, create, edit, grep — with a full,
|
|
68
|
+
# case-sensitive regex, so `Bash` never matched `bash`. Translation lives
|
|
69
|
+
# in COPILOT_TOOL_NAMES in compiler/hooks.ts.
|
|
70
|
+
#
|
|
71
|
+
# One limit worth recording: in prompt mode (-p) repository hooks under
|
|
72
|
+
# .github/hooks/ load only once the folder is trusted. User-level hooks in
|
|
73
|
+
# ~/.copilot/hooks/ have no such gate, which is how this was probed.
|
|
46
74
|
source_to_target:
|
|
47
75
|
SessionStart:
|
|
48
|
-
status:
|
|
49
|
-
|
|
50
|
-
Not probed, and not probeable on the machine this mapping was last measured on
|
|
51
|
-
(2026-09-04): no Copilot CLI is installed there, and ~/.copilot/hooks is empty, so no
|
|
52
|
-
hook can be made to fire from a terminal. To settle it: install the Copilot CLI, register
|
|
53
|
-
a hook per event that appends its payload to a file, and drive one session that submits a
|
|
54
|
-
prompt, runs a tool, fails a tool and ends.
|
|
76
|
+
status: mapped
|
|
77
|
+
target_event: sessionStart
|
|
55
78
|
UserPromptSubmit:
|
|
56
|
-
status:
|
|
57
|
-
|
|
58
|
-
Not probed, and not probeable on the machine this mapping was last measured on
|
|
59
|
-
(2026-09-04): no Copilot CLI is installed there, and ~/.copilot/hooks is empty, so no
|
|
60
|
-
hook can be made to fire from a terminal. To settle it: install the Copilot CLI, register
|
|
61
|
-
a hook per event that appends its payload to a file, and drive one session that submits a
|
|
62
|
-
prompt, runs a tool, fails a tool and ends.
|
|
63
|
-
PostToolUseFailure:
|
|
64
|
-
status: probe
|
|
65
|
-
reason: >-
|
|
66
|
-
Not probed, and not probeable on the machine this mapping was last measured on
|
|
67
|
-
(2026-09-04): no Copilot CLI is installed there, and ~/.copilot/hooks is empty, so no
|
|
68
|
-
hook can be made to fire from a terminal. To settle it: install the Copilot CLI, register
|
|
69
|
-
a hook per event that appends its payload to a file, and drive one session that submits a
|
|
70
|
-
prompt, runs a tool, fails a tool and ends.
|
|
79
|
+
status: mapped
|
|
80
|
+
target_event: userPromptSubmitted
|
|
71
81
|
PreToolUse:
|
|
72
82
|
status: mapped
|
|
73
83
|
target_event: preToolUse
|
|
74
84
|
PostToolUse:
|
|
75
85
|
status: mapped
|
|
76
86
|
target_event: postToolUse
|
|
87
|
+
PostToolUseFailure:
|
|
88
|
+
status: mapped
|
|
89
|
+
target_event: postToolUseFailure
|
|
77
90
|
PreCompact:
|
|
78
|
-
status:
|
|
79
|
-
|
|
80
|
-
reason: No documented user-level equivalent in the active baseline.
|
|
91
|
+
status: mapped
|
|
92
|
+
target_event: preCompact
|
|
81
93
|
SubagentStart:
|
|
82
|
-
status:
|
|
83
|
-
|
|
94
|
+
status: mapped
|
|
95
|
+
target_event: subagentStart
|
|
84
96
|
SubagentStop:
|
|
85
|
-
status:
|
|
86
|
-
|
|
97
|
+
status: mapped
|
|
98
|
+
target_event: subagentStop
|
|
87
99
|
Stop:
|
|
88
100
|
status: mapped
|
|
89
|
-
target_event:
|
|
90
|
-
severity: warning
|
|
91
|
-
reason: Closest documented session-end lifecycle event, not a one-to-one semantic equivalent.
|
|
101
|
+
target_event: agentStop
|
|
92
102
|
|
|
93
103
|
codex:
|
|
94
104
|
delivery: partial
|