failproofai 0.0.12 → 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.
Files changed (107) hide show
  1. package/.next/standalone/.cursor/hooks.json +6 -6
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/required-server-files.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  11. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  12. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  13. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  14. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  15. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  20. package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
  21. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  22. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  23. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
  24. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  25. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  26. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  27. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/auth/reminder/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  36. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/.next/server/app/index.html +1 -1
  39. package/.next/standalone/.next/server/app/index.rsc +14 -14
  40. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  41. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
  42. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  43. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +9 -9
  44. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  45. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  46. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
  49. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  52. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  55. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  56. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  59. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dwpg-h._.js +1 -1
  62. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0lnenda._.js +1 -1
  63. package/.next/standalone/.next/server/chunks/[root-of-the-server]__13i_sva._.js +1 -1
  64. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1_mqemn._.js +1 -1
  65. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  66. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0808sha._.js +2 -2
  67. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vh88nr._.js → [root-of-the-server]__0bbpv2d._.js} +2 -2
  68. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e4-6d8._.js +2 -2
  69. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ehe24g._.js +2 -2
  70. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g253ve._.js +2 -2
  71. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vxf0_g._.js +2 -2
  72. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ntd0fz._.js → [root-of-the-server]__1-m1rhq._.js} +2 -2
  73. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12mcauo._.js +2 -2
  74. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1mt35_w._.js +2 -2
  75. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pcxxwg._.js +2 -2
  76. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1uvfwgr._.js +2 -2
  77. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
  78. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  79. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
  80. package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_0bppeyf.js → node_modules_html-to-image_es_index_1u91ynr.js} +1 -1
  81. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  82. package/.next/standalone/.next/server/pages/404.html +1 -1
  83. package/.next/standalone/.next/server/pages/500.html +1 -1
  84. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/server-reference-manifest.json +10 -10
  86. package/.next/standalone/.next/static/chunks/{3-veva26100-4.js → 03zg3ms7uaoq3.js} +1 -1
  87. package/.next/standalone/.next/static/chunks/{3jk5y-qgnnti_.js → 0azkpcy8eb1gr.js} +1 -1
  88. package/.next/standalone/.next/static/chunks/{3pb3m-89k7ts2.js → 0byua6ng1f_ka.js} +1 -1
  89. package/.next/standalone/.next/static/chunks/{0ys-mwok1j9kp.js → 1h569gia53ant.js} +1 -1
  90. package/.next/standalone/.next/static/chunks/{09l7dfsd4xapi.js → 1zxtyef-iqede.js} +1 -1
  91. package/.next/standalone/.next/static/chunks/{2ey-m4-p9z7e0.js → 2ks4pzu5b-l_q.js} +2 -2
  92. package/.next/standalone/.next/static/chunks/{00_ypuitb29l0.js → 39rn602wszcbd.js} +1 -1
  93. package/.next/standalone/.next/static/chunks/{0qw65r3wfs089.js → 3jka0hvhqouyv.js} +1 -1
  94. package/.next/standalone/.next/static/chunks/{36yb_gsfgfga4.js → 41mhnhfkmglpp.js} +1 -1
  95. package/.next/standalone/docker-hook-sync/Dockerfile +75 -0
  96. package/.next/standalone/docker-hook-sync/entrypoint.sh +109 -0
  97. package/.next/standalone/package.json +1 -1
  98. package/.next/standalone/server.js +1 -1
  99. package/dist/cli.mjs +22 -8
  100. package/package.json +1 -1
  101. package/scripts/sync-agent-cli-harnesses-prompt.md +222 -0
  102. package/src/hooks/integrations.ts +12 -5
  103. package/src/hooks/types.ts +40 -0
  104. package/scripts/sync-hook-events-prompt.md +0 -179
  105. /package/.next/standalone/.next/static/{PdZTBvCBXzDRLe-duL9yC → W6ELw5VwHTFy2amS2px6e}/_buildManifest.js +0 -0
  106. /package/.next/standalone/.next/static/{PdZTBvCBXzDRLe-duL9yC → W6ELw5VwHTFy2amS2px6e}/_clientMiddlewareManifest.js +0 -0
  107. /package/.next/standalone/.next/static/{PdZTBvCBXzDRLe-duL9yC → 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.