@fml-inc/fml 0.8.0-rc.2 → 0.8.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/.claude-plugin/plugin.json +1 -1
- package/README.md +12 -10
- package/dist/{chunk-WZLLO563.js → chunk-7DWFJENY.js} +1 -1
- package/dist/{chunk-56TPYMNK.js → chunk-KBT5RMAU.js} +19 -3
- package/dist/cli.js +414 -209
- package/dist/hook-handler.js +10 -3
- package/dist/observer-server.js +3 -3
- package/dist/pi/extension.js +350 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -28,15 +28,16 @@ fml setup
|
|
|
28
28
|
Run `fml update` to upgrade the global package with npm. Stable releases stay
|
|
29
29
|
on npm's `latest` channel; prerelease versions stay on `next`.
|
|
30
30
|
|
|
31
|
-
Installing the package does not change agent configuration. Run `fml
|
|
32
|
-
to register
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
Installing the package does not change agent configuration. Run `fml install`
|
|
32
|
+
to register the FML Claude Code plugin, install the agent-native FML skill,
|
|
33
|
+
configure the FML MCP server, register capture-only lifecycle hooks for
|
|
34
|
+
supported agents, and install the FML extension for Pi. `fml setup` performs
|
|
35
|
+
this installation, signs in when needed, and restarts the observer. Invoke the
|
|
36
|
+
skill as `/fml review` in Claude, Gemini, or Grok, and as `$fml review` in
|
|
37
|
+
Codex. Review runs inside the agent from the packaged skill; it is not an
|
|
38
|
+
`fml review` CLI command. Start a new agent session after installing so it
|
|
39
|
+
picks up the integration. FML pre-approves only the isolated command hooks it
|
|
40
|
+
installs for Codex; use `/hooks` to review or disable them.
|
|
40
41
|
|
|
41
42
|
The Claude plugin is MCP-only. FML installs the workflow through each host's
|
|
42
43
|
native skill directory so it keeps the bare `fml` name without a second,
|
|
@@ -67,7 +68,8 @@ Windows: `%APPDATA%\panopticon`), and remove any leftover `panopticon` entries
|
|
|
67
68
|
from the Claude plugin registration (`~/.claude/settings.json` and
|
|
68
69
|
`~/.claude/plugins/`), agent hook configs (`~/.codex/config.toml`,
|
|
69
70
|
`~/.codex/hooks.json`, `~/.gemini/settings.json`, `~/.grok/hooks/`), and MCP
|
|
70
|
-
server registrations in those same agent config files.
|
|
71
|
+
server registrations in those same agent config files. Also remove the legacy
|
|
72
|
+
Pi extension at `~/.pi/agent/extensions/panopticon.js`.
|
|
71
73
|
|
|
72
74
|
## Raw artifact sync
|
|
73
75
|
|
|
@@ -71,7 +71,8 @@ var HOOK_TARGETS = Object.freeze([
|
|
|
71
71
|
"claude",
|
|
72
72
|
"codex",
|
|
73
73
|
"gemini",
|
|
74
|
-
"grok"
|
|
74
|
+
"grok",
|
|
75
|
+
"pi"
|
|
75
76
|
]);
|
|
76
77
|
function isHookTarget(value) {
|
|
77
78
|
return typeof value === "string" && HOOK_TARGETS.some((targetId) => targetId === value);
|
|
@@ -137,6 +138,20 @@ var hook_events_default = {
|
|
|
137
138
|
"PreCompact",
|
|
138
139
|
"PostCompact",
|
|
139
140
|
"SessionEnd"
|
|
141
|
+
],
|
|
142
|
+
pi: [
|
|
143
|
+
"SessionStart",
|
|
144
|
+
"UserPromptSubmit",
|
|
145
|
+
"TurnStart",
|
|
146
|
+
"PreToolUse",
|
|
147
|
+
"PostToolUse",
|
|
148
|
+
"PostToolUseFailure",
|
|
149
|
+
"Stop",
|
|
150
|
+
"Notification",
|
|
151
|
+
"ConfigChange",
|
|
152
|
+
"PreCompact",
|
|
153
|
+
"PostCompact",
|
|
154
|
+
"SessionEnd"
|
|
140
155
|
]
|
|
141
156
|
};
|
|
142
157
|
|
|
@@ -153,6 +168,7 @@ var GEMINI_HOOK_EVENTS = Object.freeze([
|
|
|
153
168
|
var GROK_HOOK_EVENTS = Object.freeze([
|
|
154
169
|
...hook_events_default.grok
|
|
155
170
|
]);
|
|
171
|
+
var PI_HOOK_EVENTS = Object.freeze([...hook_events_default.pi]);
|
|
156
172
|
|
|
157
173
|
// ../../packages/agent-targets/src/hooks/read-command.ts
|
|
158
174
|
import path2 from "path";
|
|
@@ -585,7 +601,8 @@ var HOOK_NORMALIZATION_CAPABILITIES = Object.freeze([
|
|
|
585
601
|
capability("claude", CLAUDE_HOOK_EVENTS),
|
|
586
602
|
capability("codex", CODEX_HOOK_EVENTS),
|
|
587
603
|
capability("gemini", GEMINI_HOOK_EVENTS),
|
|
588
|
-
capability("grok", GROK_HOOK_EVENTS)
|
|
604
|
+
capability("grok", GROK_HOOK_EVENTS),
|
|
605
|
+
capability("pi", PI_HOOK_EVENTS)
|
|
589
606
|
]);
|
|
590
607
|
function parseHookCaptureRequest(value) {
|
|
591
608
|
if (!isRecord(value) || !isHookTarget(value.target)) return null;
|
|
@@ -4632,7 +4649,6 @@ async function drainHookInbox(capture, inboxDir = FML_HOOK_INBOX_DIR) {
|
|
|
4632
4649
|
export {
|
|
4633
4650
|
readObserverAuthToken,
|
|
4634
4651
|
getOrCreateObserverAuthToken,
|
|
4635
|
-
HOOK_TARGETS,
|
|
4636
4652
|
CODEX_HOOK_EVENTS,
|
|
4637
4653
|
GEMINI_HOOK_EVENTS,
|
|
4638
4654
|
GROK_HOOK_EVENTS,
|