failproofai 0.0.12-beta.0 → 0.0.13-beta.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/.next/standalone/.cursor/hooks.json +6 -6
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/reminder/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dwpg-h._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0lnenda._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__13i_sva._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1_mqemn._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0808sha._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1ex6lhp._.js → [root-of-the-server]__0bbpv2d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e4-6d8._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ehe24g._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g253ve._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vxf0_g._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12e2gos._.js → [root-of-the-server]__1-m1rhq._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12mcauo._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1mt35_w._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pcxxwg._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1uvfwgr._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_0jg3fuk.js → node_modules_html-to-image_es_index_1u91ynr.js} +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +10 -10
- package/.next/standalone/.next/static/chunks/{04y44gpe0698_.js → 03zg3ms7uaoq3.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0jtj8f7njt8w3.js → 0azkpcy8eb1gr.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2611bbf4e_1cs.js → 0byua6ng1f_ka.js} +1 -1
- package/.next/standalone/.next/static/chunks/{21cumi0uqy4mk.js → 1h569gia53ant.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2hc_0--4nm0at.js → 1zxtyef-iqede.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1xjrv35s71etn.js → 2ks4pzu5b-l_q.js} +2 -2
- package/.next/standalone/.next/static/chunks/{2l78594jx17e1.js → 39rn602wszcbd.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0_75be6zseuxl.js → 3jka0hvhqouyv.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0mdiwb8ozs8j5.js → 41mhnhfkmglpp.js} +1 -1
- package/.next/standalone/docker-hook-sync/Dockerfile +75 -0
- package/.next/standalone/docker-hook-sync/entrypoint.sh +109 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/dist/cli.mjs +22 -8
- package/package.json +1 -1
- package/scripts/sync-agent-cli-harnesses-prompt.md +222 -0
- package/src/hooks/integrations.ts +12 -5
- package/src/hooks/types.ts +40 -0
- package/scripts/sync-hook-events-prompt.md +0 -179
- /package/.next/standalone/.next/static/{DUw2FaxT-IF_URNqcba-m → W6ELw5VwHTFy2amS2px6e}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{DUw2FaxT-IF_URNqcba-m → W6ELw5VwHTFy2amS2px6e}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{DUw2FaxT-IF_URNqcba-m → W6ELw5VwHTFy2amS2px6e}/_ssgManifest.js +0 -0
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
You are an automated agent running in GitHub Actions to keep failproofai's hook
|
|
2
|
-
event types in sync with the upstream documentation for **every** agent CLI we
|
|
3
|
-
integrate with.
|
|
4
|
-
|
|
5
|
-
failproofai integrates with seven agent CLIs. Each one has its own hook event
|
|
6
|
-
surface, tracked as a separate `as const` array in `src/hooks/types.ts`:
|
|
7
|
-
|
|
8
|
-
| CLI | Array constant | Casing convention | Has `*EVENT_MAP`? |
|
|
9
|
-
|----------------|-----------------------------|-------------------|--------------------|
|
|
10
|
-
| Claude Code | `HOOK_EVENT_TYPES` | PascalCase | no (canonical) |
|
|
11
|
-
| OpenAI Codex | `CODEX_HOOK_EVENT_TYPES` | snake_case | yes (`CODEX_EVENT_MAP`) |
|
|
12
|
-
| GitHub Copilot | `COPILOT_HOOK_EVENT_TYPES` | PascalCase | no |
|
|
13
|
-
| Cursor Agent | `CURSOR_HOOK_EVENT_TYPES` | camelCase | yes (`CURSOR_EVENT_MAP`) |
|
|
14
|
-
| OpenCode | `OPENCODE_HOOK_EVENT_TYPES` | dot.namespaced | yes (`OPENCODE_EVENT_MAP`) |
|
|
15
|
-
| Pi | `PI_HOOK_EVENT_TYPES` | snake_case | yes (`PI_EVENT_MAP`) |
|
|
16
|
-
| Gemini CLI | `GEMINI_HOOK_EVENT_TYPES` | PascalCase | yes (`GEMINI_EVENT_MAP`) |
|
|
17
|
-
|
|
18
|
-
## Your task
|
|
19
|
-
|
|
20
|
-
### 1. Fetch upstream docs and extract the canonical event-name list per CLI
|
|
21
|
-
|
|
22
|
-
| CLI | Docs URL(s) |
|
|
23
|
-
|-----------|------------------------------------------------------------------------------------|
|
|
24
|
-
| Claude | https://code.claude.com/docs/en/hooks (primary, full reference table) |
|
|
25
|
-
| | https://code.claude.com/docs/en/hooks-guide (secondary, summary table) |
|
|
26
|
-
| Codex | https://developers.openai.com/codex/hooks |
|
|
27
|
-
| Copilot | https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/use-hooks |
|
|
28
|
-
| Cursor | https://cursor.com/docs/hooks |
|
|
29
|
-
| OpenCode | https://opencode.ai/docs/plugins/ |
|
|
30
|
-
| Pi | https://www.npmjs.com/package/@mariozechner/pi-coding-agent |
|
|
31
|
-
| Gemini | https://geminicli.com/docs/hooks/ |
|
|
32
|
-
|
|
33
|
-
For each CLI, use `WebFetch` on its docs URL(s) and extract the complete list of
|
|
34
|
-
hook event-type names from the lifecycle / triggers / "Available events" table
|
|
35
|
-
or section. Where two URLs are listed (Claude only), union the results and
|
|
36
|
-
prefer the reference page if they disagree.
|
|
37
|
-
|
|
38
|
-
**Use the upstream casing exactly as it appears in the docs.** Do not normalize:
|
|
39
|
-
- Codex really is snake_case (`pre_tool_use`, `permission_request`, …).
|
|
40
|
-
- Cursor really is camelCase (`preToolUse`, `beforeSubmitPrompt`, …).
|
|
41
|
-
- OpenCode really is dot-namespaced (`tool.execute.before`, `session.idle`, …).
|
|
42
|
-
- Pi really is snake_case (`tool_call`, `user_bash`, `session_shutdown`, …).
|
|
43
|
-
|
|
44
|
-
If a docs URL returns 404, redirects to a stub, or the page does not expose a
|
|
45
|
-
parseable event list, mark that CLI as `unverified` for this run and skip its
|
|
46
|
-
diff. **Do not invent events. Do not guess from prior knowledge.** Pi is the
|
|
47
|
-
most likely `unverified` candidate because its event surface is documented
|
|
48
|
-
primarily in the package source (`@mariozechner/pi-coding-agent` on npm), and
|
|
49
|
-
the README may not include a clean enumeration.
|
|
50
|
-
|
|
51
|
-
### 2. Read the current array values
|
|
52
|
-
|
|
53
|
-
Read `src/hooks/types.ts` and extract the current value of each
|
|
54
|
-
`*HOOK_EVENT_TYPES` array.
|
|
55
|
-
|
|
56
|
-
### 3. Diff each verified CLI
|
|
57
|
-
|
|
58
|
-
For every verified CLI, compute:
|
|
59
|
-
- **added**: events in upstream docs but NOT in the array
|
|
60
|
-
- **removed**: events in the array but NOT in upstream docs
|
|
61
|
-
|
|
62
|
-
### 4. If no verified CLI has drift
|
|
63
|
-
|
|
64
|
-
Write the following JSON to `.sync-hook-events-output.json` in the repo root:
|
|
65
|
-
```json
|
|
66
|
-
{ "changed": false }
|
|
67
|
-
```
|
|
68
|
-
Then stop. (`unverified` alone is NOT drift — the docs may simply be unreachable
|
|
69
|
-
today.)
|
|
70
|
-
|
|
71
|
-
### 5. If one or more verified CLIs have drift
|
|
72
|
-
|
|
73
|
-
#### a. Update arrays in `src/hooks/types.ts`
|
|
74
|
-
|
|
75
|
-
For each CLI with drift:
|
|
76
|
-
- **Append additions** just before `] as const`, preserving casing.
|
|
77
|
-
- **Delete removals** from the array. If the CLI has an `*EVENT_MAP` (see the
|
|
78
|
-
table at the top), also delete the same key from that map block — TypeScript's
|
|
79
|
-
`Record<XxxHookEventType, HookEventType>` is exhaustive, and a stale key would
|
|
80
|
-
fail the build.
|
|
81
|
-
|
|
82
|
-
#### b. Update hardcoded test counts (only two CLIs need this)
|
|
83
|
-
|
|
84
|
-
Other CLIs reference `*HOOK_EVENT_TYPES.length` directly in tests, so no
|
|
85
|
-
hardcoded-count fixup is needed for them.
|
|
86
|
-
|
|
87
|
-
- If `HOOK_EVENT_TYPES` (Claude) changed: in `__tests__/hooks/manager.test.ts`,
|
|
88
|
-
update the test description string `installs hooks for all <N> event types`
|
|
89
|
-
AND both `expect(Object.keys(written.hooks)).toHaveLength(<N>)` assertions to
|
|
90
|
-
the new total.
|
|
91
|
-
- If `GEMINI_HOOK_EVENT_TYPES` changed: in `__tests__/hooks/integrations.test.ts`,
|
|
92
|
-
update the `expect(gemini.eventTypes).toHaveLength(<N>)` assertion AND the test
|
|
93
|
-
description string `writeHookEntries writes the matcher-wrapper schema for all
|
|
94
|
-
<N> events with matcher='*'`.
|
|
95
|
-
|
|
96
|
-
Locate these by searching for the current count number.
|
|
97
|
-
|
|
98
|
-
#### c. Do NOT add `*EVENT_MAP` entries for newly-added events
|
|
99
|
-
|
|
100
|
-
Each new agent-side event needs a canonical Claude PascalCase mapping that
|
|
101
|
-
requires human judgement (e.g. "is this a `PreToolUse`-class event? a
|
|
102
|
-
`SessionStart`? a passthrough no-op?"). For Codex, Cursor, OpenCode, Pi, and
|
|
103
|
-
Gemini drift, **leave the corresponding `*EVENT_MAP` untouched**. The
|
|
104
|
-
TypeScript build will fail with `Property '<event>' is missing in type
|
|
105
|
-
Record<...>` and the `<MAP> keys exactly match` test will fail — both are
|
|
106
|
-
intentional and surfaced in the PR body. The reviewer adds the map entries,
|
|
107
|
-
pushes a fixup commit, and CI goes green before merge.
|
|
108
|
-
|
|
109
|
-
For Claude and Copilot drift only, no event map exists — the build stays green
|
|
110
|
-
on the auto-commit alone.
|
|
111
|
-
|
|
112
|
-
#### d. Do NOT touch `GEMINI_TOOL_MAP`
|
|
113
|
-
|
|
114
|
-
That table maps Gemini's tool names (not event names) and is updated through
|
|
115
|
-
a different process. New tools surfaced by Gemini docs are out of scope for
|
|
116
|
-
this prompt.
|
|
117
|
-
|
|
118
|
-
### 6. Write the structured output
|
|
119
|
-
|
|
120
|
-
Write to `.sync-hook-events-output.json` in the repo root:
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"changed": true,
|
|
124
|
-
"diffs": {
|
|
125
|
-
"claude": { "added": ["..."], "removed": ["..."] },
|
|
126
|
-
"codex": { "added": [], "removed": [] },
|
|
127
|
-
"copilot": { "added": [], "removed": [] },
|
|
128
|
-
"cursor": { "added": ["..."], "removed": [] },
|
|
129
|
-
"opencode": { "added": [], "removed": [] },
|
|
130
|
-
"pi": { "unverified": true },
|
|
131
|
-
"gemini": { "added": [], "removed": [] }
|
|
132
|
-
},
|
|
133
|
-
"prTitle": "[auto] sync hook event types with upstream agent CLI docs",
|
|
134
|
-
"prBody": "<markdown — see below>"
|
|
135
|
-
}
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Include a key for every CLI that was checked. Use `{"unverified": true}` (and
|
|
139
|
-
omit `added`/`removed`) for any CLI whose docs could not be parsed.
|
|
140
|
-
|
|
141
|
-
The `prBody` MUST be a Markdown string containing, in order:
|
|
142
|
-
|
|
143
|
-
1. **Summary table** — one row per CLI:
|
|
144
|
-
`| CLI | status | added | removed |` where status is one of
|
|
145
|
-
`up to date`, `drift`, or `unverified`.
|
|
146
|
-
2. **Per-CLI sections** — one section per CLI with non-empty drift, listing
|
|
147
|
-
added and removed events as bullet lists.
|
|
148
|
-
3. **Reviewer checklist** — for every newly-added event in a CLI that has an
|
|
149
|
-
`*EVENT_MAP`, an unchecked checkbox reminding the reviewer to add the
|
|
150
|
-
mapping. Use `"???"` as the canonical value placeholder; **do not guess**:
|
|
151
|
-
```text
|
|
152
|
-
- [ ] Add `<event>: "???"` to `<MAP_NAME>` in `src/hooks/types.ts`
|
|
153
|
-
(canonical Claude `HookEventType` chosen by reviewer)
|
|
154
|
-
```
|
|
155
|
-
4. **Sources** — a list of the docs URL(s) consulted per CLI.
|
|
156
|
-
5. **Unverified notes** — for each `unverified` CLI, one short line explaining
|
|
157
|
-
why (404, page lacked a parseable event list, etc.).
|
|
158
|
-
6. **Final note** (verbatim):
|
|
159
|
-
> **CI is expected to fail on this PR if a CLI with an `*EVENT_MAP` gained
|
|
160
|
-
> new events. A reviewer must add the missing map entries before merging.
|
|
161
|
-
> For drift in Claude or Copilot only (no event map), CI should pass on
|
|
162
|
-
> this commit alone. CI must pass and this PR must be reviewed before
|
|
163
|
-
> merging.**
|
|
164
|
-
|
|
165
|
-
## Constraints
|
|
166
|
-
|
|
167
|
-
- **Only edit these files**:
|
|
168
|
-
- `src/hooks/types.ts`
|
|
169
|
-
- `__tests__/hooks/manager.test.ts`
|
|
170
|
-
- `__tests__/hooks/integrations.test.ts`
|
|
171
|
-
- `.sync-hook-events-output.json`
|
|
172
|
-
- Do NOT run any shell commands (no git, no gh, no bun, no curl).
|
|
173
|
-
- Do NOT modify `src/hooks/integrations.ts`, `src/hooks/policy-evaluator.ts`,
|
|
174
|
-
`src/hooks/manager.ts`, `src/hooks/handler.ts`, or any other source file.
|
|
175
|
-
- Do NOT add entries to any `*EVENT_MAP` or to `GEMINI_TOOL_MAP` for
|
|
176
|
-
newly-added events. Removing keys from a map when their array entry is
|
|
177
|
-
removed IS allowed (and required to keep the build green).
|
|
178
|
-
- Do NOT invent events. If WebFetch fails or the docs don't expose a clean
|
|
179
|
-
event list, mark the CLI `unverified` and move on.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|