overlord-cli 0.2607151113.0 → 0.2607161024.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/dist/connectors/VERSION +1 -1
- package/dist/connectors/adapters/antigravity/plugin.json +1 -1
- package/dist/connectors/adapters/antigravity/scripts/overlord-mcp.mjs +1 -1
- package/dist/connectors/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/dist/connectors/adapters/claude/prompt-wrapper.md +2 -2
- package/dist/connectors/adapters/codex/.codex-plugin/plugin.json +1 -1
- package/dist/connectors/adapters/codex/prompt-wrapper.md +2 -2
- package/dist/connectors/adapters/codex/scripts/overlord-mcp.mjs +1 -1
- package/dist/connectors/adapters/cursor/.cursor-plugin/plugin.json +1 -1
- package/dist/connectors/adapters/cursor/README.md +6 -1
- package/dist/connectors/adapters/cursor/conformance-manifest.yaml +9 -0
- package/dist/connectors/adapters/cursor/hooks/overlord-permission-request.sh +25 -0
- package/dist/connectors/adapters/cursor/hooks/overlord-post-tool-use.sh +23 -0
- package/dist/connectors/adapters/cursor/hooks/overlord-stop.sh +73 -0
- package/dist/connectors/adapters/cursor/scripts/overlord-mcp.mjs +1 -1
- package/dist/connectors/adapters/cursor/skills/overlord-mission/SKILL.md +3 -0
- package/dist/connectors/adapters/pi/prompt-wrapper.md +2 -1
- package/dist/connectors/core/overlord-mission/SKILL.md +5 -2
- package/dist/connectors/docs/05-connectors-and-agent-plugins.md +3 -0
- package/dist/connectors/docs/testing.md +2 -2
- package/dist/contract/conformance-manifest.schema.yaml +2 -0
- package/dist/index.js +75 -17
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/connectors/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.3
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://antigravity.google/schemas/v1/plugin.json",
|
|
3
3
|
"name": "overlord",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.3",
|
|
5
5
|
"description": "Chat-driven access to Overlord mission protocol workflows with hook-driven activity capture.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Cooperativ",
|
|
@@ -328,7 +328,7 @@ process.stdin.on('data', async chunk => {
|
|
|
328
328
|
result: {
|
|
329
329
|
protocolVersion: PROTOCOL_VERSION,
|
|
330
330
|
capabilities: { tools: { listChanged: false } },
|
|
331
|
-
serverInfo: { name: 'overlord-antigravity', version: '0.3.
|
|
331
|
+
serverInfo: { name: 'overlord-antigravity', version: '0.3.3' }
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
continue;
|
|
@@ -5,13 +5,13 @@ Claude launch prompts should keep the mission objective compact and place large
|
|
|
5
5
|
Recommended launch shape:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
claude --append-system-prompt-file <context-file> --model <model> --effort <level> "
|
|
8
|
+
claude --append-system-prompt-file <context-file> --model <model> --effort <level> "Attach, then immediately execute this mission's current objective."
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Rules:
|
|
12
12
|
|
|
13
13
|
- The context file should contain the Overlord mission prompt, objective metadata, history, artifacts, attachments, and shared context assembled by the protocol layer.
|
|
14
|
-
- The visible user prompt should point Claude at the context file
|
|
14
|
+
- The visible user prompt should point Claude at the context file, name the active mission ID, and explicitly direct execution without waiting for confirmation.
|
|
15
15
|
- `--model` is passed only when the execution target has a model configured.
|
|
16
16
|
- `--effort` is passed only when the installed Claude binary supports it and the execution target has an effort level configured.
|
|
17
17
|
- Do not embed secrets in the prompt wrapper. Authentication comes from shared `ovld auth` credentials, Overlord-launched environment variables, `Overlord_USER_TOKEN` / `OVLD_USER_TOKEN`, or the Claude plugin `user_token` config passed to `ovld protocol` as `Overlord_USER_TOKEN`.
|
|
@@ -5,13 +5,13 @@ Codex launch prompts should keep the mission objective compact and pass model an
|
|
|
5
5
|
Recommended launch shape:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
codex [--model <model>] [-c model_reasoning_effort="<level>"] "
|
|
8
|
+
codex [--model <model>] [-c model_reasoning_effort="<level>"] "Attach, then immediately execute this mission's current objective."
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Rules:
|
|
12
12
|
|
|
13
13
|
- The assembled Overlord mission prompt, objective metadata, history, artifacts, attachments, and shared context should be injected as the initial session prompt by the protocol layer.
|
|
14
|
-
- The visible user prompt should name the active mission ID
|
|
14
|
+
- The visible user prompt should name the active mission ID and explicitly direct execution without waiting for confirmation.
|
|
15
15
|
- `--model` is passed only when the execution target has a model configured.
|
|
16
16
|
- `-c model_reasoning_effort="<level>"` is passed only when the execution target has an effort level configured.
|
|
17
17
|
- For large context, write a context file and pass a short prompt that points Codex at it.
|
|
@@ -328,7 +328,7 @@ process.stdin.on('data', async chunk => {
|
|
|
328
328
|
result: {
|
|
329
329
|
protocolVersion: PROTOCOL_VERSION,
|
|
330
330
|
capabilities: { tools: { listChanged: false } },
|
|
331
|
-
serverInfo: { name: 'overlord-codex', version: '0.3.
|
|
331
|
+
serverInfo: { name: 'overlord-codex', version: '0.3.3' }
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
continue;
|
|
@@ -29,7 +29,7 @@ From an OpenOverlord checkout:
|
|
|
29
29
|
ovld agent-setup cursor
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
This copies managed plugin files to `~/.cursor/plugins/local/overlord`, merges
|
|
32
|
+
This copies managed plugin files to `~/.cursor/plugins/local/overlord`, merges Overlord's prompt, permission, tool-result, and stop hooks into `~/.cursor/hooks.json`, and adds a `Shell(ovld protocol:*)` permission allow rule to `~/.cursor/settings.json` when missing. Existing hooks and settings are preserved.
|
|
33
33
|
|
|
34
34
|
Re-run safely any time the connector contract version changes:
|
|
35
35
|
|
|
@@ -76,9 +76,14 @@ This connector is intentionally reviewable against the four connector layers in
|
|
|
76
76
|
- `skills/overlord-mission/SKILL.md` — Cursor adapter template with a `<!-- @connector-core -->` marker; setup interpolates shared core content at install time.
|
|
77
77
|
- `commands/*.md` — slash commands for session routing, objective discussion, mission creation, and work recording.
|
|
78
78
|
- `hooks/overlord-user-prompt-submit.sh` — `beforeSubmitPrompt` follow-up capture through `ovld protocol hook-event`.
|
|
79
|
+
- `hooks/overlord-permission-request.sh` — observes `beforeShellExecution` and `beforeMCPExecution` through `ovld protocol permission-request`. It returns no allow/deny decision, leaving Cursor and user-installed hooks authoritative.
|
|
80
|
+
- `hooks/overlord-post-tool-use.sh` — records `postToolUse` file edits and shell-mediated changes for exact per-session delivery attribution.
|
|
81
|
+
- `hooks/overlord-stop.sh` — checks pending delivery through `ovld protocol hook-event`; when needed, it asks Cursor to continue once so the agent can finish delivery.
|
|
79
82
|
- `rules/overlord-local.mdc` — always-on workflow rules for Cursor sessions.
|
|
80
83
|
- `mcp.json` + `scripts/overlord-mcp.mjs` — MCP bridge to common `ovld protocol` operations.
|
|
81
84
|
- `conformance-manifest.yaml` — connector conformance declaration for the Overlord contract.
|
|
82
85
|
- `prompt-wrapper.md` — Cursor launch guidance.
|
|
83
86
|
|
|
84
87
|
The shared Connector Core source lives at `connectors/core/overlord-mission`. `ovld agent-setup cursor` interpolates that core into the adapter skill template and installs core reference files so the runtime package is self-contained.
|
|
88
|
+
|
|
89
|
+
Cursor's generic `preToolUse` hook is intentionally not used for permission capture. Cursor currently documents that `ask` is not enforced for `preToolUse`; the narrower shell and MCP hooks expose the native permission-decision schema without changing the user's policy. Cursor also documents hook execution as fail-open by default, so Overlord telemetry failures do not strand the agent.
|
|
@@ -8,11 +8,17 @@ connector:
|
|
|
8
8
|
agentIdentifier: cursor
|
|
9
9
|
capabilities:
|
|
10
10
|
- followUpHook
|
|
11
|
+
- permissionHook
|
|
12
|
+
- stopHook
|
|
13
|
+
- editHook
|
|
11
14
|
- modelFlag
|
|
12
15
|
- permissionRules
|
|
13
16
|
- slashCommands
|
|
14
17
|
hookTypes:
|
|
15
18
|
- UserPromptSubmit
|
|
19
|
+
- PermissionRequest
|
|
20
|
+
- PostToolUse
|
|
21
|
+
- Stop
|
|
16
22
|
installPath: "~/.cursor/plugins/local/overlord"
|
|
17
23
|
managedFiles:
|
|
18
24
|
- ".cursor-plugin/plugin.json"
|
|
@@ -27,6 +33,9 @@ connector:
|
|
|
27
33
|
- "commands/record-work.md"
|
|
28
34
|
- "commands/spawn.md"
|
|
29
35
|
- "hooks/overlord-user-prompt-submit.sh"
|
|
36
|
+
- "hooks/overlord-permission-request.sh"
|
|
37
|
+
- "hooks/overlord-post-tool-use.sh"
|
|
38
|
+
- "hooks/overlord-stop.sh"
|
|
30
39
|
- "mcp.json"
|
|
31
40
|
- "prompt-wrapper.md"
|
|
32
41
|
- "rules/overlord-local.mdc"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Overlord Cursor permission observation hook.
|
|
3
|
+
#
|
|
4
|
+
# Cursor invokes this script from beforeShellExecution and beforeMCPExecution,
|
|
5
|
+
# its native permission-decision points. The hook records the request through
|
|
6
|
+
# the Connector -> Protocol surface but intentionally returns no decision, so
|
|
7
|
+
# Cursor's own permissions and any other user hooks remain authoritative.
|
|
8
|
+
|
|
9
|
+
BODY=$(cat -)
|
|
10
|
+
|
|
11
|
+
if [ -n "${MISSION_ID:-}" ] && command -v ovld >/dev/null 2>&1; then
|
|
12
|
+
(
|
|
13
|
+
USER_TOKEN="${Overlord_USER_TOKEN:-${OVLD_USER_TOKEN:-}}"
|
|
14
|
+
if [ -n "$USER_TOKEN" ]; then
|
|
15
|
+
export Overlord_USER_TOKEN="$USER_TOKEN"
|
|
16
|
+
fi
|
|
17
|
+
printf '%s' "$BODY" | ovld protocol permission-request \
|
|
18
|
+
--mission-id "$MISSION_ID" \
|
|
19
|
+
--payload-file - \
|
|
20
|
+
>/dev/null 2>&1
|
|
21
|
+
) &
|
|
22
|
+
disown
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
exit 0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Overlord Cursor postToolUse hook.
|
|
3
|
+
# Records Cursor Write/Edit and Shell effects in the per-session touched-files
|
|
4
|
+
# log used by `ovld protocol deliver` for concurrent-work attribution.
|
|
5
|
+
|
|
6
|
+
BODY=$(cat -)
|
|
7
|
+
LOG_DIR="${HOME:-}/.ovld/logs"
|
|
8
|
+
LOG_FILE="${LOG_DIR}/cursor-post-tool-use-hook.log"
|
|
9
|
+
|
|
10
|
+
log_hook() {
|
|
11
|
+
mkdir -p "$LOG_DIR" 2>/dev/null || return 0
|
|
12
|
+
printf '%s [cursor-post-tool-use] %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$1" >>"$LOG_FILE" 2>/dev/null || true
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if ! command -v ovld >/dev/null 2>&1; then
|
|
16
|
+
log_hook "ovld not on PATH; skipping"
|
|
17
|
+
exit 0
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
RESULT=$(printf '%s' "$BODY" | ovld protocol record-touched 2>>"$LOG_FILE")
|
|
21
|
+
log_hook "record-touched: ${RESULT:-<no output>}"
|
|
22
|
+
|
|
23
|
+
exit 0
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Overlord Cursor stop hook.
|
|
3
|
+
# Checks whether the attached mission still needs delivery and, at most once,
|
|
4
|
+
# asks Cursor to continue so the agent can deliver. It never delivers itself.
|
|
5
|
+
|
|
6
|
+
BODY=$(cat -)
|
|
7
|
+
LOG_DIR="${HOME:-}/.ovld/logs"
|
|
8
|
+
LOG_FILE="${LOG_DIR}/cursor-stop-hook.log"
|
|
9
|
+
|
|
10
|
+
log_hook() {
|
|
11
|
+
mkdir -p "$LOG_DIR" 2>/dev/null || return 0
|
|
12
|
+
printf '%s [cursor-stop] %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$1" >>"$LOG_FILE" 2>/dev/null || true
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if [ -z "${MISSION_ID:-}" ] || ! command -v ovld >/dev/null 2>&1; then
|
|
16
|
+
log_hook "missing required mission or ovld, skipping"
|
|
17
|
+
printf '{}'
|
|
18
|
+
exit 0
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
LOOP_COUNT=$(printf '%s' "$BODY" | python3 -c '
|
|
22
|
+
import json, sys
|
|
23
|
+
try:
|
|
24
|
+
value = json.load(sys.stdin).get("loop_count", 0)
|
|
25
|
+
print(value if isinstance(value, int) else 0)
|
|
26
|
+
except Exception:
|
|
27
|
+
print(0)
|
|
28
|
+
' 2>/dev/null)
|
|
29
|
+
|
|
30
|
+
if [ "${LOOP_COUNT:-0}" -gt 0 ]; then
|
|
31
|
+
log_hook "automatic follow-up already used, skipping"
|
|
32
|
+
printf '{}'
|
|
33
|
+
exit 0
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
RESPONSE_FILE=$(mktemp "${TMPDIR:-/tmp}/overlord-cursor-stop.XXXXXX")
|
|
37
|
+
USER_TOKEN="${Overlord_USER_TOKEN:-${OVLD_USER_TOKEN:-}}"
|
|
38
|
+
if [ -n "$USER_TOKEN" ]; then
|
|
39
|
+
export Overlord_USER_TOKEN="$USER_TOKEN"
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
ovld protocol hook-event \
|
|
43
|
+
--hook-type Stop \
|
|
44
|
+
--mission-id "$MISSION_ID" \
|
|
45
|
+
>"$RESPONSE_FILE" 2>/dev/null
|
|
46
|
+
OVLD_EXIT=$?
|
|
47
|
+
|
|
48
|
+
if [ "$OVLD_EXIT" -eq 0 ]; then
|
|
49
|
+
python3 - "$RESPONSE_FILE" <<'PY'
|
|
50
|
+
import json, sys
|
|
51
|
+
|
|
52
|
+
response = {}
|
|
53
|
+
try:
|
|
54
|
+
with open(sys.argv[1]) as handle:
|
|
55
|
+
data = json.load(handle)
|
|
56
|
+
status = data.get("deliveryStatus") or {}
|
|
57
|
+
if status.get("needed"):
|
|
58
|
+
reason = status.get("reason") or "Pending Overlord delivery work detected."
|
|
59
|
+
response["followup_message"] = (
|
|
60
|
+
f"[Overlord] {reason} Complete the required verification and deliver the attached mission now."
|
|
61
|
+
)
|
|
62
|
+
except Exception:
|
|
63
|
+
pass
|
|
64
|
+
|
|
65
|
+
print(json.dumps(response, separators=(",", ":")))
|
|
66
|
+
PY
|
|
67
|
+
else
|
|
68
|
+
log_hook "hook-event failed exit=$OVLD_EXIT"
|
|
69
|
+
printf '{}'
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
rm -f "$RESPONSE_FILE"
|
|
73
|
+
exit 0
|
|
@@ -328,7 +328,7 @@ process.stdin.on('data', async chunk => {
|
|
|
328
328
|
result: {
|
|
329
329
|
protocolVersion: PROTOCOL_VERSION,
|
|
330
330
|
capabilities: { tools: { listChanged: false } },
|
|
331
|
-
serverInfo: { name: 'overlord-cursor', version: '0.3.
|
|
331
|
+
serverInfo: { name: 'overlord-cursor', version: '0.3.3' }
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
continue;
|
|
@@ -10,6 +10,9 @@ description: Cursor adapter for the shared Overlord mission workflow.
|
|
|
10
10
|
- Agent identifier: `cursor` for `ovld protocol create` and `ovld protocol prompt`.
|
|
11
11
|
- Native commands: `/attach`, `/connect`, `/load`, `/create`, `/prompt`, `/discuss-objective`, `/add-objectives`, `/record-work`.
|
|
12
12
|
- Follow-up capture: the installed `beforeSubmitPrompt` hook records ordinary post-delivery user messages. Do not manually publish `user_follow_up` unless the hook is unavailable.
|
|
13
|
+
- Permission capture: installed `beforeShellExecution` and `beforeMCPExecution` hooks publish permission activity through `ovld protocol` without overriding Cursor's own decision.
|
|
14
|
+
- Edit capture: the installed `postToolUse` hook records Cursor file and shell effects for exact delivery attribution.
|
|
15
|
+
- Stop hook: the installed `stop` hook may auto-submit one pending-delivery reminder but does not deliver for you.
|
|
13
16
|
- MCP bridge: the installed `overlord` MCP server exposes the hosted-compatible `overlord_*` mission tool catalog backed by `ovld protocol`.
|
|
14
17
|
- Authentication: use shared `ovld auth` credentials, Overlord-launched environment variables, or `Overlord_USER_TOKEN` / `OVLD_USER_TOKEN`.
|
|
15
18
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
PI receives Overlord's generated mission context as a native file input and a short visible launch message:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
pi --model <provider/id> --thinking <level> @<context-file> "
|
|
6
|
+
pi --model <provider/id> --thinking <level> @<context-file> "Attach, then immediately execute <mission>'s current objective."
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Rules:
|
|
@@ -12,3 +12,4 @@ Rules:
|
|
|
12
12
|
- Pass thinking separately with `--thinking` only when the selected launch configuration specifies it.
|
|
13
13
|
- Place user-configured launch flags before the `@<context-file>` and visible message arguments.
|
|
14
14
|
- The context file contains the mission, objectives, history, artifacts, attachments, and lifecycle instructions. Do not put credentials in it.
|
|
15
|
+
- The visible message must explicitly direct execution without waiting for confirmation.
|
|
@@ -15,7 +15,7 @@ Use this mode when the prompt already contains a mission ID or explicitly says t
|
|
|
15
15
|
|
|
16
16
|
1. Attach first with `ovld protocol attach --mission-id <mission_id>`.
|
|
17
17
|
2. The attach response prints JSON to stdout containing `session.sessionKey`. The CLI also persists this key automatically so subsequent `ovld protocol` commands in the same working directory resolve it without `--session-key`. If auto-resolution fails, pass `--session-key <sessionKey>` explicitly on every subsequent call.
|
|
18
|
-
3. Treat the Overlord mission prompt as authoritative for the objective, constraints, and delivery target. Begin
|
|
18
|
+
3. Treat the Overlord mission prompt as authoritative for the objective, constraints, and delivery target. Begin executing the current objective immediately after attach; do not wait for more instructions or ask for confirmation. This differs from `connect` or `load-context`, which only retrieve mission context and never imply the agent should act.
|
|
19
19
|
4. Post updates while working: `ovld protocol update --session-key <sessionKey> --mission-id <mission_id> --summary "..." --phase execute`.
|
|
20
20
|
During long mechanical stretches with nothing meaningful to post, send `ovld protocol heartbeat --session-key <sessionKey> --mission-id <mission_id> [--phase execute] [--percent <0-100>] [--note "..."]` instead of an empty update.
|
|
21
21
|
5. Follow-up messages after the initial mission are captured automatically by the installed `UserPromptSubmit` hook and stay in discussion intent while the mission is in review. Do not post `user_follow_up` manually unless the hook is unavailable.
|
|
@@ -29,6 +29,7 @@ For full command syntax, flags, phase values, and event types see **CLI Command
|
|
|
29
29
|
**Missions** represent whole features or goals. **Objectives** are the individual steps to implement that goal — one objective equals one agent prompt.
|
|
30
30
|
|
|
31
31
|
Example:
|
|
32
|
+
|
|
32
33
|
```
|
|
33
34
|
Mission: add CLI command for editing user profile
|
|
34
35
|
- Objective 1: draft plan for this command
|
|
@@ -38,10 +39,12 @@ Mission: add CLI command for editing user profile
|
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
When to create a mission vs an objective:
|
|
42
|
+
|
|
41
43
|
- **Create a new mission** when the user describes a distinct feature, bug, or goal that stands on its own.
|
|
42
44
|
- **Add objectives to an existing mission** when the work is a sequential step toward the same feature or goal already tracked in a mission.
|
|
43
45
|
|
|
44
46
|
To add further objectives to an existing mission (Mode 2):
|
|
47
|
+
|
|
45
48
|
```
|
|
46
49
|
ovld protocol add-objectives --mission-id <mission_id> --objectives-json '[{"objective":"..."},{"objective":"..."}]'
|
|
47
50
|
```
|
|
@@ -343,7 +346,7 @@ If `.overlord/project.json` contains more than one project, show the user the pr
|
|
|
343
346
|
|
|
344
347
|
## Change Rationales
|
|
345
348
|
|
|
346
|
-
Always include `changeRationales` when delivering; optionally on updates during long-running work. Your job is rationale for
|
|
349
|
+
Always include `changeRationales` when delivering; optionally on updates during long-running work. Your job is rationale for _what_ changed and why — the CLI captures _which_ files changed (see **Deliver** above).
|
|
347
350
|
|
|
348
351
|
- Rationales only for meaningful behavioral changes you made for this mission; skip formatting-only noise. Do not send `file_changes` as an artifact.
|
|
349
352
|
- Do not include unrelated worktree changes in the delivery report, payload, artifacts, or rationales — even to label them pre-existing.
|
|
@@ -99,6 +99,9 @@ Requirements:
|
|
|
99
99
|
|
|
100
100
|
- Install local Cursor plugin/rules/commands.
|
|
101
101
|
- Add `beforeSubmitPrompt` hook to record follow-ups.
|
|
102
|
+
- Map `beforeShellExecution` and `beforeMCPExecution` onto the canonical observational `PermissionRequest` hook without overriding Cursor's permission decision.
|
|
103
|
+
- Add `postToolUse` edit capture for file tools and shell-mediated changes.
|
|
104
|
+
- Add a bounded `stop` hook for pending-delivery reminders.
|
|
102
105
|
- Add permission allow rules for protocol commands.
|
|
103
106
|
- Launch with model flag where supported.
|
|
104
107
|
- No thinking/effort flag required initially.
|
|
@@ -27,10 +27,10 @@ For each connector's `conformance-manifest.yaml`
|
|
|
27
27
|
`componentType: connector`, valid `componentKey`, required `connector` block with
|
|
28
28
|
`agentIdentifier` + `capabilities`.
|
|
29
29
|
- Every `capabilities` value is in `approvedConnectorCapabilities`
|
|
30
|
-
(`followUpHook`, `permissionHook`, `stopHook`, `nativeResume`, `modelFlag`,
|
|
30
|
+
(`followUpHook`, `permissionHook`, `stopHook`, `editHook`, `nativeResume`, `modelFlag`,
|
|
31
31
|
`effortFlag`, `contextFilePrompt`, `permissionRules`, `slashCommands`).
|
|
32
32
|
- Every `hookTypes` value is in `approvedHookTypes`
|
|
33
|
-
(`UserPromptSubmit`, `PermissionRequest`, `Stop`).
|
|
33
|
+
(`UserPromptSubmit`, `PermissionRequest`, `PostToolUse`, `Stop`).
|
|
34
34
|
- `contractVersion` is a known contract version.
|
|
35
35
|
- `agentIdentifier` is a documented or namespaced connector identifier (open vocab).
|
|
36
36
|
|
|
@@ -80,6 +80,7 @@ properties:
|
|
|
80
80
|
- followUpHook
|
|
81
81
|
- permissionHook
|
|
82
82
|
- stopHook
|
|
83
|
+
- editHook
|
|
83
84
|
- nativeResume
|
|
84
85
|
- modelFlag
|
|
85
86
|
- effortFlag
|
|
@@ -95,6 +96,7 @@ properties:
|
|
|
95
96
|
enum:
|
|
96
97
|
- UserPromptSubmit
|
|
97
98
|
- PermissionRequest
|
|
99
|
+
- PostToolUse
|
|
98
100
|
- Stop
|
|
99
101
|
uniqueItems: true
|
|
100
102
|
managedFiles:
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
const require = createRequire(import.meta.url);
|
|
1
3
|
// Overlord CLI bundle — generated by cli/scripts/build.mjs. Do not edit.
|
|
2
4
|
var __create = Object.create;
|
|
3
5
|
var __defProp = Object.defineProperty;
|
|
@@ -2421,18 +2423,56 @@ function configureCursorHarness({
|
|
|
2421
2423
|
};
|
|
2422
2424
|
const hookRoot = hooks.hooks;
|
|
2423
2425
|
const hookEntries = hookRoot && typeof hookRoot === "object" && !Array.isArray(hookRoot) ? hookRoot : {};
|
|
2424
|
-
const
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
})
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2426
|
+
const mergeHook = ({
|
|
2427
|
+
event,
|
|
2428
|
+
command,
|
|
2429
|
+
marker,
|
|
2430
|
+
extra = {}
|
|
2431
|
+
}) => {
|
|
2432
|
+
const entries = Array.isArray(hookEntries[event]) ? [...hookEntries[event]] : [];
|
|
2433
|
+
const alreadyInstalled = entries.some((entry) => {
|
|
2434
|
+
if (!entry || typeof entry !== "object") return false;
|
|
2435
|
+
const installedCommand = entry.command;
|
|
2436
|
+
return typeof installedCommand === "string" && installedCommand.includes(marker);
|
|
2437
|
+
});
|
|
2438
|
+
if (alreadyInstalled) return false;
|
|
2439
|
+
entries.push({ command, ...extra });
|
|
2440
|
+
hookEntries[event] = entries;
|
|
2441
|
+
return true;
|
|
2442
|
+
};
|
|
2443
|
+
const installedHookEvents = [
|
|
2444
|
+
mergeHook({
|
|
2445
|
+
event: "beforeSubmitPrompt",
|
|
2446
|
+
command: CURSOR_HOOK_COMMANDS.beforeSubmitPrompt,
|
|
2447
|
+
marker: "overlord-user-prompt-submit"
|
|
2448
|
+
}) && "beforeSubmitPrompt",
|
|
2449
|
+
mergeHook({
|
|
2450
|
+
event: "beforeShellExecution",
|
|
2451
|
+
command: CURSOR_HOOK_COMMANDS.beforePermission,
|
|
2452
|
+
marker: "overlord-permission-request"
|
|
2453
|
+
}) && "beforeShellExecution",
|
|
2454
|
+
mergeHook({
|
|
2455
|
+
event: "beforeMCPExecution",
|
|
2456
|
+
command: CURSOR_HOOK_COMMANDS.beforePermission,
|
|
2457
|
+
marker: "overlord-permission-request"
|
|
2458
|
+
}) && "beforeMCPExecution",
|
|
2459
|
+
mergeHook({
|
|
2460
|
+
event: "postToolUse",
|
|
2461
|
+
command: CURSOR_HOOK_COMMANDS.postToolUse,
|
|
2462
|
+
marker: "overlord-post-tool-use",
|
|
2463
|
+
extra: { matcher: "Shell|Write|Edit|MultiEdit|NotebookEdit" }
|
|
2464
|
+
}) && "postToolUse",
|
|
2465
|
+
mergeHook({
|
|
2466
|
+
event: "stop",
|
|
2467
|
+
command: CURSOR_HOOK_COMMANDS.stop,
|
|
2468
|
+
marker: "overlord-stop",
|
|
2469
|
+
extra: { loop_limit: 1 }
|
|
2470
|
+
}) && "stop"
|
|
2471
|
+
].filter((event) => Boolean(event));
|
|
2472
|
+
if (installedHookEvents.length > 0) {
|
|
2433
2473
|
hooks.hooks = hookEntries;
|
|
2434
2474
|
if (dryRun) {
|
|
2435
|
-
warnings.push(`Would merge
|
|
2475
|
+
warnings.push(`Would merge ${installedHookEvents.join(", ")} hooks into ${hooksPath}.`);
|
|
2436
2476
|
} else {
|
|
2437
2477
|
mkdirSync3(cursorDir, { recursive: true });
|
|
2438
2478
|
writeFileSync3(hooksPath, `${JSON.stringify(hooks, null, 2)}
|
|
@@ -2863,7 +2903,7 @@ function inspectConnector({
|
|
|
2863
2903
|
problems
|
|
2864
2904
|
};
|
|
2865
2905
|
}
|
|
2866
|
-
var
|
|
2906
|
+
var CURSOR_HOOK_COMMANDS, CURSOR_PROTOCOL_PERMISSION, CODEX_PLUGIN_KEY, CODEX_RULES_START, CODEX_RULES_END, CLAUDE_MARKETPLACE_NAME, CLAUDE_PLUGIN_KEY;
|
|
2867
2907
|
var init_connectors = __esm({
|
|
2868
2908
|
"src/connectors.ts"() {
|
|
2869
2909
|
"use strict";
|
|
@@ -2871,7 +2911,12 @@ var init_connectors = __esm({
|
|
|
2871
2911
|
init_config();
|
|
2872
2912
|
init_connector_core_render();
|
|
2873
2913
|
init_errors();
|
|
2874
|
-
|
|
2914
|
+
CURSOR_HOOK_COMMANDS = {
|
|
2915
|
+
beforeSubmitPrompt: "plugins/local/overlord/hooks/overlord-user-prompt-submit.sh",
|
|
2916
|
+
beforePermission: "plugins/local/overlord/hooks/overlord-permission-request.sh",
|
|
2917
|
+
postToolUse: "plugins/local/overlord/hooks/overlord-post-tool-use.sh",
|
|
2918
|
+
stop: "plugins/local/overlord/hooks/overlord-stop.sh"
|
|
2919
|
+
};
|
|
2875
2920
|
CURSOR_PROTOCOL_PERMISSION = "Shell(ovld protocol:*)";
|
|
2876
2921
|
CODEX_PLUGIN_KEY = "overlord@overlord-local";
|
|
2877
2922
|
CODEX_RULES_START = "# overlord:permissions:start";
|
|
@@ -13820,6 +13865,7 @@ async function loadMissionContext({
|
|
|
13820
13865
|
"",
|
|
13821
13866
|
"## Instructions",
|
|
13822
13867
|
"Use the Overlord skill. Follow the required protocol workflow.",
|
|
13868
|
+
EXECUTION_DIRECTIVE,
|
|
13823
13869
|
"",
|
|
13824
13870
|
"## Objectives",
|
|
13825
13871
|
...objectives.map((objective, index) => {
|
|
@@ -13938,7 +13984,7 @@ Execution request: ${options.executionRequestId}` : context.launchContext;
|
|
|
13938
13984
|
executionRequestId: options.executionRequestId,
|
|
13939
13985
|
projectResources
|
|
13940
13986
|
});
|
|
13941
|
-
const prompt = launchContext.length > 4e3 ? `
|
|
13987
|
+
const prompt = launchContext.length > 4e3 ? `Read the Overlord context file at ${contextFile}, attach to mission ${context.displayId}, then immediately execute its current objective. Do not wait for more instructions.` : launchContext;
|
|
13942
13988
|
const command = buildAgentCommand({
|
|
13943
13989
|
agent: options.agent,
|
|
13944
13990
|
model: options.model,
|
|
@@ -13946,7 +13992,7 @@ Execution request: ${options.executionRequestId}` : context.launchContext;
|
|
|
13946
13992
|
flags: options.flags,
|
|
13947
13993
|
prompt,
|
|
13948
13994
|
contextFile,
|
|
13949
|
-
launchMessage: `
|
|
13995
|
+
launchMessage: `Attach to ovld mission ${context.displayId}, then immediately execute ${context.title}. Do not wait for more instructions.`
|
|
13950
13996
|
});
|
|
13951
13997
|
const terminalScriptPath = options.terminalLauncher?.trim() ? launchScriptPath({
|
|
13952
13998
|
tmpDir,
|
|
@@ -14012,7 +14058,7 @@ async function launchAgent({
|
|
|
14012
14058
|
});
|
|
14013
14059
|
return { plan, status: result.status, signal: result.signal };
|
|
14014
14060
|
}
|
|
14015
|
-
var AGENT_HISTORY_EXCLUDED_EVENT_TYPES;
|
|
14061
|
+
var AGENT_HISTORY_EXCLUDED_EVENT_TYPES, EXECUTION_DIRECTIVE;
|
|
14016
14062
|
var init_launch = __esm({
|
|
14017
14063
|
"src/launch.ts"() {
|
|
14018
14064
|
"use strict";
|
|
@@ -14024,6 +14070,7 @@ var init_launch = __esm({
|
|
|
14024
14070
|
"execution_requested",
|
|
14025
14071
|
"awaiting_approval"
|
|
14026
14072
|
]);
|
|
14073
|
+
EXECUTION_DIRECTIVE = "This is an execution session. After attaching, immediately execute the current objective. Do not wait for more instructions or ask for confirmation; only stop to ask a question when blocked.";
|
|
14027
14074
|
}
|
|
14028
14075
|
});
|
|
14029
14076
|
|
|
@@ -15485,7 +15532,7 @@ function recordTouchedFromPayload({
|
|
|
15485
15532
|
missionId = resolved.missionId;
|
|
15486
15533
|
ambiguous = resolved.ambiguous;
|
|
15487
15534
|
}
|
|
15488
|
-
if (toolName === "Bash") {
|
|
15535
|
+
if (toolName === "Bash" || toolName === "Shell") {
|
|
15489
15536
|
const { addedCount } = recordBashObservedChanges({ workingDirectory, missionId });
|
|
15490
15537
|
return { recorded: true, missionId, ambiguous, files: addedCount };
|
|
15491
15538
|
}
|
|
@@ -16616,7 +16663,17 @@ async function runProtocolCommand({
|
|
|
16616
16663
|
if (subcommand === "deliver" && missionId) {
|
|
16617
16664
|
clearCachedSessionKey({ missionId, workingDirectory });
|
|
16618
16665
|
removeActiveSession({ workingDirectory, missionId });
|
|
16619
|
-
const connectorInstallsEditHook = existsSync22(path26.join(os5.homedir(), ".claude"))
|
|
16666
|
+
const connectorInstallsEditHook = existsSync22(path26.join(os5.homedir(), ".claude")) || existsSync22(
|
|
16667
|
+
path26.join(
|
|
16668
|
+
os5.homedir(),
|
|
16669
|
+
".cursor",
|
|
16670
|
+
"plugins",
|
|
16671
|
+
"local",
|
|
16672
|
+
"overlord",
|
|
16673
|
+
"hooks",
|
|
16674
|
+
"overlord-post-tool-use.sh"
|
|
16675
|
+
)
|
|
16676
|
+
);
|
|
16620
16677
|
if (connectorInstallsEditHook && !hasTouchedFilesLog({ workingDirectory, missionId }) && readChangedFiles(workingDirectory).length > 0) {
|
|
16621
16678
|
const warning = `[overlord] warning: no touched-files log found at deliver for mission ${missionId} in ${workingDirectory}, even though this connector installs a PostToolUse edit hook. Deliver is falling back to baseline-only attribution, which can misattribute concurrent sessions' edits. Check ~/.ovld/logs/post-tool-use-hook.log for why the hook did not record any touched files.`;
|
|
16622
16679
|
console.error(warning);
|
|
@@ -17330,6 +17387,7 @@ var init_commands = __esm({
|
|
|
17330
17387
|
"heartbeat",
|
|
17331
17388
|
"ask",
|
|
17332
17389
|
"deliver",
|
|
17390
|
+
"hook-event",
|
|
17333
17391
|
"record-change-rationales"
|
|
17334
17392
|
]);
|
|
17335
17393
|
}
|