@damian87/omp 0.9.2 → 0.10.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 (48) hide show
  1. package/.github/skills/create-skill/SKILL.md +3 -3
  2. package/.github/skills/daily-log/SKILL.md +1 -1
  3. package/.github/skills/jira-ticket/SKILL.md +6 -3
  4. package/.github/skills/omp-autopilot/SKILL.md +1 -1
  5. package/.github/skills/ralph/SKILL.md +6 -4
  6. package/.github/skills/research-codebase/SKILL.md +6 -6
  7. package/.github/skills/research-codebase/reference/agent-prompts.md +8 -8
  8. package/.github/skills/slack/SKILL.md +1 -0
  9. package/.github/skills/team/SKILL.md +5 -3
  10. package/.github/skills/team/scripts/team-launch.sh +11 -5
  11. package/.github/skills/ultraqa/SKILL.md +5 -2
  12. package/.github/skills/ultrawork/SKILL.md +5 -5
  13. package/.github/skills/weighted-consensus/SKILL.md +4 -3
  14. package/dist/src/comms/index.d.ts +13 -6
  15. package/dist/src/comms/index.js +65 -10
  16. package/dist/src/comms/index.js.map +1 -1
  17. package/dist/src/copilot/doctor.js +40 -5
  18. package/dist/src/copilot/doctor.js.map +1 -1
  19. package/dist/src/copilot/env-passthrough.d.ts +16 -0
  20. package/dist/src/copilot/env-passthrough.js +28 -0
  21. package/dist/src/copilot/env-passthrough.js.map +1 -0
  22. package/dist/src/copilot/launch.js +9 -1
  23. package/dist/src/copilot/launch.js.map +1 -1
  24. package/dist/src/copilot/trust.d.ts +22 -0
  25. package/dist/src/copilot/trust.js +62 -0
  26. package/dist/src/copilot/trust.js.map +1 -0
  27. package/dist/src/gateway/notify.d.ts +1 -1
  28. package/dist/src/gateway/notify.js +1 -1
  29. package/dist/src/gateway/notify.js.map +1 -1
  30. package/dist/src/instructions-memory.js +6 -5
  31. package/dist/src/instructions-memory.js.map +1 -1
  32. package/dist/src/team/tmux.d.ts +1 -1
  33. package/dist/src/team/tmux.js +41 -10
  34. package/dist/src/team/tmux.js.map +1 -1
  35. package/docs/plans/copilot-native-hooks.md +119 -0
  36. package/docs/plans/verification-plan.md +104 -0
  37. package/hooks/hooks.json +52 -72
  38. package/package.json +1 -1
  39. package/plugin.json +1 -1
  40. package/scripts/agent-stop.mjs +87 -0
  41. package/scripts/error.mjs +1 -1
  42. package/scripts/lib/hook-output.mjs +32 -3
  43. package/scripts/lib/loop-driver.mjs +44 -0
  44. package/scripts/post-tool-use.mjs +1 -1
  45. package/scripts/pre-tool-use.mjs +1 -1
  46. package/scripts/prompt-submit.mjs +4 -6
  47. package/scripts/session-end.mjs +1 -1
  48. package/scripts/session-start.mjs +5 -9
@@ -25,13 +25,13 @@ Skills are modular, self-contained packages that extend agent capabilities by pr
25
25
  ### Three-Level Loading System
26
26
 
27
27
  1. **Metadata (name + description)** - Always in context (~100 words)
28
- 2. **SKILL.md body** - When skill triggers (<200 lines, ideally <500 lines for optimal performance)
28
+ 2. **SKILL.md body** - When skill triggers (under 200 lines; split overflow into `references/`)
29
29
  3. **Bundled resources** - As needed by agent (unlimited)
30
30
 
31
31
  ### Why Progressive Disclosure Matters
32
32
 
33
- - 85% reduction in initial context load
34
- - Activation times drop from 500ms+ to under 100ms
33
+ - Smaller initial context load
34
+ - Faster activation the agent loads the body only when the skill triggers
35
35
  - Agent loads only what's needed, when it's needed
36
36
  - Skills remain maintainable and focused
37
37
 
@@ -23,7 +23,7 @@ The SessionStart hook injects a one-line breadcrumb, e.g.:
23
23
 
24
24
  ```
25
25
  [DAILY LOG] Goal: <today's goal>
26
- N entries logged in the last 7 days — run `omp daily-log read` to load if relevant.
26
+ N entries logged in the last 7 days — run `omp daily-log read --days 7` to load if relevant.
27
27
  ```
28
28
 
29
29
  If the breadcrumb looks relevant to what the user is asking for — same feature, an open
@@ -16,21 +16,24 @@ Use `/jira-ticket` when work tracking is requested.
16
16
  ## Operations
17
17
 
18
18
  ### Create
19
- - Build from an approved plan or implementation slice
19
+ - Build from an approved plan or implementation slice (a plan file or markdown)
20
20
  - Include: Summary, Description, Acceptance Criteria
21
- - If Jira config is available, create via API; otherwise output a dry-run payload
21
+ - Render the payload with `omp jira render <plan-file>` — this **never** writes to Jira. To create/comment/update, run `omp jira apply <plan-file-or-ticket-key>`, which defaults to **dry-run** and only writes when Jira is configured with `JIRA_MODE=live` and the user has explicitly confirmed.
22
22
 
23
23
  ### Comment
24
24
  - Add implementation evidence, verification results, or status updates
25
25
  - Format for readability (use Jira wiki markup, not Markdown)
26
+ - Apply with `omp jira apply <ticket-key> --comment` (dry-run by default; preview before confirming)
26
27
 
27
28
  ### Safe update
28
29
  - Only update known simple fields (summary, description, labels)
30
+ - Apply with `omp jira apply <ticket-key> --update` (dry-run by default)
29
31
  - Do not guess transitions, issue links, project keys, or secrets
30
32
 
31
33
  ## Rules
32
34
 
33
- - If Jira config is missing, always output a **dry-run payload** never fail silently
35
+ - Always preview with `omp jira render` or `omp jira apply … --dry-run` (the default) before any live write
36
+ - If Jira config is missing, the commands stay in dry-run and print the payload — never fail silently
34
37
  - Do not guess project keys, transitions, or credentials
35
38
  - Keep acceptance criteria testable and specific
36
39
  - Include file paths and evidence when commenting with implementation details
@@ -32,7 +32,7 @@ Run `/research-codebase` to understand current state. Skip if you already have f
32
32
 
33
33
  ### Phase 2 — Plan
34
34
 
35
- Run `/ralplan` to produce an implementation plan with acceptance criteria. If a consensus plan already exists from a prior `/ralplan`, skip this phase.
35
+ Run `/ralplan` to produce an implementation plan with acceptance criteria. If a plan already exists from a prior `/ralplan`, skip this phase.
36
36
 
37
37
  ### Phase 3 — Execute
38
38
 
@@ -21,16 +21,18 @@ Use `/ralph` when one owner should complete one clear task end-to-end.
21
21
 
22
22
  ## Input
23
23
 
24
- Accept a plan from `/ralplan`, a ticket, or a concrete task description. If a `/ralplan` consensus plan exists, use its acceptance criteria as your definition of done.
24
+ Accept a plan from `/ralplan`, a ticket, or a concrete task description. If a `/ralplan` plan exists, use its acceptance criteria as your definition of done.
25
25
 
26
26
  ## Steps
27
27
 
28
- 1. **Start** from the plan or task. State what "done" looks like before writing code.
28
+ 1. **Register the loop** run `omp ralph start "<task>" --max-iterations 10`. This tracks the loop so `omp ralph status` and `/team` nudges can see it and the iteration cap is enforced. State what "done" looks like before writing code.
29
29
  2. **Implement** one slice at a time, in plan order.
30
30
  3. **Verify after each slice** — run tests, lint, type-check. Do not batch verification to the end.
31
31
  4. **Fix** any failures immediately before moving to the next slice.
32
- 5. **Repeat** until all slices complete with evidence, or a blocker is hit.
33
- 6. **Final verification** run the full test suite one last time after all slices.
32
+ 5. **Tick the loop** run `omp ralph tick` after each slice. If it reports the iteration cap is reached, stop and report.
33
+ 6. **Repeat** until all slices complete with evidence, or a blocker is hit.
34
+ 7. **Final verification** — run the full test suite one last time after all slices.
35
+ 8. **End the loop** — run `omp ralph cancel` once done or blocked, so the tracked state is cleared.
34
36
 
35
37
  ## Circuit breaker
36
38
 
@@ -22,7 +22,7 @@ Respond: "I'm ready to research the codebase. What area or question should I inv
22
22
 
23
23
  ### 1. Read mentioned files
24
24
 
25
- If the user references specific files, read them with `view` in the **main context** before anything else.
25
+ If the user references specific files, read them directly in the **main context** before anything else.
26
26
 
27
27
  ### 2. Scope the tech stack
28
28
 
@@ -32,14 +32,14 @@ Detect from `package.json`, config files, directory structure, and project conve
32
32
 
33
33
  | Tier | When | Agent strategy |
34
34
  |------|------|----------------|
35
- | **Small** | Single file/component, narrow question | Main agent reads directly. No subagents. |
36
- | **Medium** | Cross-file, single area (e.g. "how does auth work") | 1–2 `explore` agents for locate + analyse |
37
- | **Large** | Cross-cutting, multi-area (e.g. "map the entire API layer") | Parallel locatoranalyserpattern-finder (see `reference/agent-prompts.md`) |
35
+ | **Small** | Single file/component, narrow question | Read and search directly (glob/grep/read). No delegation. |
36
+ | **Medium** | Cross-file, single area (e.g. "how does auth work") | Locate with glob/grep, then read and analyse the hits directly. |
37
+ | **Large** | Cross-cutting, multi-area (e.g. "map the entire API layer") | Sweep area-by-area (locate analysefind patterns), or delegate areas to parallel `omp team` workers (see `reference/agent-prompts.md`). |
38
38
 
39
39
  ### 4. Research
40
40
 
41
- - Track subtasks via SQL `todos` table
42
- - For medium/large: read `reference/agent-prompts.md` for subagent prompt templates
41
+ - Track subtasks in a markdown checklist as you go
42
+ - For large: read `reference/agent-prompts.md` for `omp team` worker prompt templates
43
43
  - **MUST GATE**: Before writing findings, show file:line evidence for every claim
44
44
 
45
45
  ### 5. Synthesise & write document
@@ -1,8 +1,8 @@
1
- # Subagent Prompt Templates
1
+ # Worker Prompt Templates
2
2
 
3
- Use these templates when spawning `explore` agents via the `task` tool. Only used for **medium** and **large** research tasks.
3
+ Use these templates when delegating research areas to parallel `omp team` workers. Only needed for **large** research tasks; for small/medium, run these roles directly in the main agent with glob/grep/read.
4
4
 
5
- ## Agent roles
5
+ ## Worker roles
6
6
 
7
7
  ### Locator — find WHERE files and components live
8
8
 
@@ -31,8 +31,8 @@ Do not evaluate consistency or suggest changes — only document occurrences.
31
31
 
32
32
  ## Guidelines
33
33
 
34
- - Each agent is stateless — provide complete context in the prompt
35
- - Remind every agent: "You are documenting, not evaluating"
36
- - Run independent explorations in parallel
37
- - For web research (only if user explicitly asks), use a `research` agent instead of `explore`
38
- - **Wait for ALL agents to complete before synthesising**
34
+ - Each worker is stateless — provide complete context in the prompt
35
+ - Remind every worker: "You are documenting, not evaluating"
36
+ - Run independent explorations in parallel across team panes
37
+ - For web research (only if user explicitly asks), do it in the main agent
38
+ - **Collect all worker outputs before synthesising**
@@ -57,6 +57,7 @@ The CLI returns a structured result:
57
57
  - Success: `posted to <channel> (ts=<ts>[, opened IM])` — relay that.
58
58
  - Failure: `notify failed [<CODE>]: <reason>` — surface the code + reason so the user
59
59
  can act. Common codes:
60
+ - `MISSING_TEXT` — the message body was empty; pass a non-empty `--text`.
60
61
  - `MISSING_TOKEN` — run `omp env init` to set `SLACK_BOT_TOKEN`.
61
62
  - `MISSING_TARGET` — pass `--target` or run `omp env init` to set `SLACK_HOME_CHANNEL`.
62
63
  - `BAD_TARGET` / `BAD_HOME_CHANNEL` — the ID is malformed; show the user the expected shape.
@@ -48,6 +48,8 @@ Write a temporary file at `/tmp/team-lanes-<timestamp>.json`:
48
48
  ### Step 2 — Launch
49
49
 
50
50
  ```bash
51
+ # Installed-plugin path (in a dev checkout the script is at the repo-relative
52
+ # .github/skills/team/scripts/team-launch.sh instead):
51
53
  bash ~/.copilot/installed-plugins/oh-my-copilot/oh-my-copilot/.github/skills/team/scripts/team-launch.sh \
52
54
  --session "team-<name>" --lanes <lanes-file>
53
55
  ```
@@ -76,7 +78,7 @@ Choose this only when the user explicitly wants the team to run in the backgroun
76
78
  ### Launch
77
79
 
78
80
  ```bash
79
- omp team <N>:copilot "<task description>"
81
+ omp team <N>:copilot "<task description>" --name <name>
80
82
  ```
81
83
 
82
84
  The runtime automatically:
@@ -89,9 +91,9 @@ The runtime automatically:
89
91
  ### Monitor and cleanup
90
92
 
91
93
  ```bash
92
- omp team status <team-name> # check progress
94
+ omp team status <name> # check progress (same <name> passed to --name)
93
95
  tmux attach -t omp-team-<name> # watch panes live
94
- omp team shutdown <team-name> # kill when done
96
+ omp team shutdown <name> # kill when done
95
97
  ```
96
98
 
97
99
  ## Prerequisites
@@ -45,7 +45,9 @@ fi
45
45
  if command -v omp &>/dev/null; then
46
46
  AGENT_CMD="omp --madmax"
47
47
  elif command -v copilot &>/dev/null; then
48
- AGENT_CMD="copilot"
48
+ # --yolo = all permissions (tools+paths+urls) so worker panes never block on a
49
+ # trust/permission dialog. Matches the bypass `omp --madmax` grants.
50
+ AGENT_CMD="copilot --yolo"
49
51
  else
50
52
  echo "Neither omp nor copilot CLI found" >&2; exit 1
51
53
  fi
@@ -78,9 +80,11 @@ wait_for_ready() {
78
80
  return 0
79
81
  fi
80
82
 
81
- # Auto-accept folder trust dialog
83
+ # Auto-accept folder trust dialog. Use the `Enter` key NAME, not C-m:
84
+ # Copilot CLI >=1.0.61 ignores a literal carriage return (C-m) for TUI
85
+ # selection/submit, so C-m left the trust dialog open and the agent hung.
82
86
  if (( accepted == 0 )) && echo "$txt" | grep -q 'Do you trust'; then
83
- tmux send-keys -t "$pane" C-m
87
+ tmux send-keys -t "$pane" Enter
84
88
  accepted=1
85
89
  echo " ↳ Auto-accepted folder trust for $pane"
86
90
  fi
@@ -142,10 +146,12 @@ for i in $(seq 0 $((LANE_COUNT - 1))); do
142
146
  LANE_NAME=$(jq -r ".[$i].name" "$LANES_FILE")
143
147
  PANE_ID="${PANE_IDS[$i]}"
144
148
 
145
- # -l = literal (no key interpretation), then C-m = Enter as a separate call
149
+ # -l = literal (no key interpretation), then submit. Use the `Enter` key NAME,
150
+ # not C-m: Copilot CLI >=1.0.61 ignores a literal carriage return, so C-m left
151
+ # the prompt sitting unsent in the input buffer and the agent never started.
146
152
  tmux send-keys -t "$PANE_ID" -l "$LANE_PROMPT"
147
153
  sleep 0.3
148
- tmux send-keys -t "$PANE_ID" C-m
154
+ tmux send-keys -t "$PANE_ID" Enter
149
155
 
150
156
  echo " 📨 Sent to $PANE_ID ($LANE_NAME)"
151
157
  done
@@ -20,6 +20,8 @@ Use `/ultraqa` after implementation when shallow checks are not enough.
20
20
 
21
21
  ## Steps
22
22
 
23
+ Register the QA run first: `omp ultraqa start "<goal>" --max-cycles 5`. This tracks the cycle count and enforces the cap, and lets `omp ultraqa status`/`cancel` see the run.
24
+
23
25
  ### Cycle 1 (and each subsequent cycle)
24
26
 
25
27
  Number every cycle explicitly: "Cycle 1", "Cycle 2", etc.
@@ -33,13 +35,14 @@ Number every cycle explicitly: "Cycle 1", "Cycle 2", etc.
33
35
 
34
36
  ### After each cycle
35
37
 
38
+ - Record the outcome: `omp ultraqa cycle fail` (issues found) or `omp ultraqa cycle pass` (clean). This increments the counter and reports when the cap is reached.
36
39
  - If issues found → fix and start next cycle
37
- - If clean → report PASS and stop
40
+ - If clean → report PASS and run `omp ultraqa cancel` to clear the run
38
41
  - Track which issues were found and fixed per cycle
39
42
 
40
43
  ## Early exit conditions
41
44
 
42
- - **5 cycles reached** — stop, report remaining issues as known gaps
45
+ - **5 cycles reached** (enforced by `omp ultraqa cycle`) — stop, report remaining issues as known gaps
43
46
  - **Same failure 3 consecutive cycles** — stop, this is a design issue not a bug. Report it for `/ralplan`
44
47
  - **Critical regression found** — stop immediately, report before fixing anything else
45
48
 
@@ -21,17 +21,17 @@ Use `/ultrawork` when there are many independent, low-conflict work items that c
21
21
 
22
22
  ## Composition
23
23
 
24
- Ultrawork is the **parallelism primitive** in the skill stack:
24
+ Ultrawork is the **batch-execution** branch of `/omp-autopilot` Phase 3 — a sibling of `/ralph` (single linear task) and `/team` (parallel panes), not nested inside them:
25
25
  ```
26
- /omp-autopilot → /ralph (persistence) → /ultrawork (parallelism)
26
+ /omp-autopilot → /ralph OR /team OR /ultrawork
27
27
  ```
28
- Ralph wraps ultrawork when a persistent verify loop is needed around batched work.
28
+ Pick `/ultrawork` when the work is many independent mechanical items. It can also be invoked directly.
29
29
 
30
30
  ## Steps
31
31
 
32
32
  ### 1. Inventory
33
33
 
34
- List all tasks. For each, note the files it touches. Flag any collisions.
34
+ Register the batch so the run is tracked and `/team` nudges can see it: `omp ultrawork start "<objective>" --task-count <n>`. Then list all tasks. For each, note the files it touches. Flag any collisions.
35
35
 
36
36
  ### 2. Dependency check
37
37
 
@@ -51,7 +51,7 @@ Process each wave. For each task in the wave:
51
51
 
52
52
  ### 4. Report
53
53
 
54
- Summarise: completed, failed, blocked.
54
+ Summarise: completed, failed, blocked. Then clear the tracked state with `omp ultrawork cancel`.
55
55
 
56
56
  ## Stop conditions
57
57
 
@@ -70,9 +70,10 @@ omp council "<question>" [--models a,b,c | model:role:weight,...] \
70
70
  - Timed-out members that produced valid JSON before the kill signal are
71
71
  automatically recovered as survivors — they are not dropped.
72
72
 
73
- If `omp council` is not found (the published `omp` predates this feature), fall
74
- back to the local build from the repo root: `node dist/src/cli.js council "<question>" ...`
75
- (run `npm run build` first if `dist/` is stale).
73
+ If `omp council` is not found (the published `omp` predates this feature),
74
+ update the global CLI: `npm i -g @damian87/omp@latest`, then re-run `omp council`.
75
+ (The `node dist/src/cli.js council` build only resolves from inside the
76
+ oh-my-copilot repo, so it is not a portable fallback for an arbitrary project.)
76
77
 
77
78
  ### Step 3 — Present the result
78
79
 
@@ -51,6 +51,8 @@ export interface SendResult {
51
51
  session?: string;
52
52
  /** true if the text was observed in the pane before Enter was pressed. */
53
53
  confirmed?: boolean;
54
+ /** true if the prompt was observed to leave the input buffer (actually submitted). */
55
+ submitted?: boolean;
54
56
  error?: string;
55
57
  }
56
58
  export interface SendOptions {
@@ -59,13 +61,18 @@ export interface SendOptions {
59
61
  }
60
62
  /**
61
63
  * Send a prompt into the Copilot pane. Refuses unless the session exists AND
62
- * the host is online. Sends the text literally, then a single Enter (C-m).
64
+ * the host is online. Sends the text literally, then presses Enter and
65
+ * verifies the prompt actually left the input buffer (returns ok:false if it
66
+ * could not be submitted).
63
67
  *
64
- * Before pressing Enter it tries to confirm the text actually landed in the
65
- * input buffer by comparing pane captures before/after the keystrokes (a
66
- * delta check, so prompt text already present in scrollback can't false-
67
- * confirm). Enter is sent exactly once regardless, so a slow render never
68
- * causes a double-submit.
68
+ * Before pressing Enter it confirms the text landed in the input buffer by
69
+ * comparing pane captures (a delta check, so prompt text already present in
70
+ * scrollback can't false-confirm). Copilot CLI (>=1.0.61) can absorb a C-m
71
+ * that arrives immediately after a bracketed paste, leaving the prompt
72
+ * buffered and unsent; so after Enter we verify the input line cleared and
73
+ * re-send Enter up to twice if it did not. Submission is detected by the input
74
+ * line emptying or the host going busy, so a successful send is never
75
+ * double-submitted.
69
76
  */
70
77
  export declare function commsSend(session: string, text: string, deps?: CommsDeps, opts?: SendOptions): Promise<SendResult>;
71
78
  export interface RecvOptions {
@@ -92,15 +92,43 @@ export async function commsStatus(session, deps = {}) {
92
92
  }
93
93
  return { ok: true, session, exists, online, ready, busy, ...(error ? { error } : {}) };
94
94
  }
95
+ /**
96
+ * True if the active input line (the last prompt line) still holds `probe`.
97
+ * Distinguishes a buffered-but-unsent prompt from a submitted one: after submit
98
+ * the trailing prompt line is empty and `probe` only survives in scrollback.
99
+ */
100
+ function inputLineHasProbe(pane, probe) {
101
+ const lines = pane.split(/\r?\n/);
102
+ // Find the active input line (last line bearing Copilot's prompt glyph).
103
+ let idx = -1;
104
+ for (let i = lines.length - 1; i >= 0; i--) {
105
+ if (lines[i].includes("❯")) {
106
+ idx = i;
107
+ break;
108
+ }
109
+ }
110
+ if (idx === -1)
111
+ return false;
112
+ // Include any wrapped continuation rows below the glyph so a long buffered
113
+ // prompt (whose suffix wrapped onto the next row) is still detected. After
114
+ // submit the glyph line is empty and the probe only survives in scrollback
115
+ // above it, so this region no longer contains it.
116
+ return lines.slice(idx).join("\n").includes(probe);
117
+ }
95
118
  /**
96
119
  * Send a prompt into the Copilot pane. Refuses unless the session exists AND
97
- * the host is online. Sends the text literally, then a single Enter (C-m).
120
+ * the host is online. Sends the text literally, then presses Enter and
121
+ * verifies the prompt actually left the input buffer (returns ok:false if it
122
+ * could not be submitted).
98
123
  *
99
- * Before pressing Enter it tries to confirm the text actually landed in the
100
- * input buffer by comparing pane captures before/after the keystrokes (a
101
- * delta check, so prompt text already present in scrollback can't false-
102
- * confirm). Enter is sent exactly once regardless, so a slow render never
103
- * causes a double-submit.
124
+ * Before pressing Enter it confirms the text landed in the input buffer by
125
+ * comparing pane captures (a delta check, so prompt text already present in
126
+ * scrollback can't false-confirm). Copilot CLI (>=1.0.61) can absorb a C-m
127
+ * that arrives immediately after a bracketed paste, leaving the prompt
128
+ * buffered and unsent; so after Enter we verify the input line cleared and
129
+ * re-send Enter up to twice if it did not. Submission is detected by the input
130
+ * line emptying or the host going busy, so a successful send is never
131
+ * double-submitted.
104
132
  */
105
133
  export async function commsSend(session, text, deps = {}, opts = {}) {
106
134
  if (!text || !text.trim()) {
@@ -150,11 +178,38 @@ export async function commsSend(session, text, deps = {}, opts = {}) {
150
178
  }
151
179
  await sleep(50);
152
180
  }
153
- const enter = tmux.sendKeys(session, "C-m");
154
- if (enter.status !== 0) {
155
- return { ok: false, error: `tmux send-keys C-m failed (exit ${enter.status})` };
181
+ // Press Enter, then verify the prompt actually left the input buffer.
182
+ // Copilot CLI (>=1.0.61) ignores a literal `C-m` carriage return but honors
183
+ // the tmux `Enter` key name; sending `C-m` leaves the prompt buffered and
184
+ // unsent. Settle first, then re-send if the input line still holds the text.
185
+ let submitted = false;
186
+ for (let attempt = 0; attempt < 3 && !submitted; attempt++) {
187
+ await sleep(attempt === 0 ? 250 : 400);
188
+ const enter = tmux.sendKeys(session, "Enter");
189
+ if (enter.status !== 0) {
190
+ return { ok: false, error: `tmux send-keys Enter failed (exit ${enter.status})` };
191
+ }
192
+ for (let i = 0; i < 6; i++) {
193
+ const cap = stripAnsi(tmux.capturePane(session, 5).stdout);
194
+ // Submitted if the host started working or the input line no longer holds the prompt.
195
+ if (paneHasActiveTask(cap) || !inputLineHasProbe(cap, probe)) {
196
+ submitted = true;
197
+ break;
198
+ }
199
+ await sleep(100);
200
+ }
201
+ }
202
+ if (!submitted) {
203
+ // No silent success: the prompt was typed but never left the input buffer.
204
+ return {
205
+ ok: false,
206
+ session,
207
+ confirmed,
208
+ submitted,
209
+ error: "prompt typed but did not submit (input buffer still held it after retries)",
210
+ };
156
211
  }
157
- return { ok: true, session, confirmed };
212
+ return { ok: true, session, confirmed, submitted };
158
213
  }
159
214
  /** Read Copilot's latest pane output back (ANSI-stripped). */
160
215
  export async function commsRecv(session, deps = {}, opts = {}) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/comms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EACL,QAAQ,EACR,cAAc,EACd,iBAAiB,GAElB,MAAM,iBAAiB,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,qEAAqE;IACrE,4CAA4C;IAC5C,MAAM,GAAG,GAAG,sBAAsB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AAE,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IACzE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACvD,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE;QAC1C,IAAI,EAAE,IAAI;QACV,KAAK;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC,CAAC;IACH,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACtD,CAAC;IACD,OAAO;QACL,EAAE,EAAE,IAAI;QACR,OAAO;QACP,IAAI,EAAE,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,IAAI,EAAE,IAAI;KACX,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { existsSync } from "node:fs";
1
+ import { existsSync, readFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { spawnSync } from "node:child_process";
4
4
  import { resolveCopilotPaths } from "./paths.js";
@@ -36,14 +36,49 @@ function checkSkillsDiscovery(paths) {
36
36
  detail: `no skills directory: ${paths.projectScopeSkills}`,
37
37
  };
38
38
  }
39
+ // Recognized Copilot CLI hook events. `agentStop` powers the omp loop driver.
40
+ const COPILOT_HOOK_EVENTS = [
41
+ "sessionStart",
42
+ "sessionEnd",
43
+ "userPromptSubmitted",
44
+ "preToolUse",
45
+ "postToolUse",
46
+ "errorOccurred",
47
+ "agentStop",
48
+ ];
39
49
  function checkHooksManifest(paths) {
40
- if (existsSync(paths.hooksManifest)) {
41
- return { name: "hooks-manifest", status: "pass", detail: paths.hooksManifest };
50
+ if (!existsSync(paths.hooksManifest)) {
51
+ return { name: "hooks-manifest", status: "warn", detail: `not present: ${paths.hooksManifest}` };
42
52
  }
53
+ let parsed;
54
+ try {
55
+ parsed = JSON.parse(readFileSync(paths.hooksManifest, "utf8"));
56
+ }
57
+ catch {
58
+ return { name: "hooks-manifest", status: "fail", detail: `invalid JSON: ${paths.hooksManifest}` };
59
+ }
60
+ const manifest = parsed;
61
+ if (manifest.version !== 1 || typeof manifest.hooks !== "object" || manifest.hooks === null) {
62
+ return {
63
+ name: "hooks-manifest",
64
+ status: "fail",
65
+ detail: `not Copilot v1 format (need {"version":1,"hooks":{…}}): ${paths.hooksManifest}`,
66
+ };
67
+ }
68
+ const events = Object.keys(manifest.hooks);
69
+ const unknown = events.filter((e) => !COPILOT_HOOK_EVENTS.includes(e));
70
+ if (unknown.length > 0) {
71
+ return {
72
+ name: "hooks-manifest",
73
+ status: "warn",
74
+ detail: `unrecognized hook events ${unknown.join(", ")} (Claude-format?): ${paths.hooksManifest}`,
75
+ };
76
+ }
77
+ const hasLoop = events.includes("agentStop");
43
78
  return {
44
79
  name: "hooks-manifest",
45
- status: "warn",
46
- detail: `not present: ${paths.hooksManifest}`,
80
+ status: "pass",
81
+ detail: `Copilot v1, ${events.length} events${hasLoop ? " (agentStop loop driver present)" : ""}`,
47
82
  };
48
83
  }
49
84
  function checkCopilotCli(bin) {
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/copilot/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,E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,MAAM,GAAkB;QAC5B,gBAAgB,EAAE;QAClB,mBAAmB,CAAC,KAAK,CAAC;QAC1B,iBAAiB,CAAC,KAAK,CAAC;QACxB,oBAAoB,CAAC,KAAK,CAAC;QAC3B,kBAAkB,CAAC,KAAK,CAAC;KAC1B,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,IAAI,SAAS,CAAC,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;IACpD,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAoB;IAC/C,MAAM,KAAK,GAAG,CAAC,cAAc,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1D,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACjF,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Build `tmux -e KEY=VALUE` arguments that forward the caller's Copilot
3
+ * environment into a pane created by `new-session` / `split-window`.
4
+ *
5
+ * Why this is needed: when a tmux server is already running, `new-session` and
6
+ * `split-window` populate a new pane from the *server's* global environment, not
7
+ * from the environment of the process that invoked tmux. So BYOK vars
8
+ * (`COPILOT_PROVIDER_*`, `COPILOT_MODEL`, …) set only in the launching shell are
9
+ * dropped, and Copilot silently falls back to GitHub-hosted models — exactly the
10
+ * failure observed when `omp` is run from a plain terminal or `omp team` spawns
11
+ * worker panes. Forwarding them explicitly with `-e` is reliable regardless of
12
+ * tmux server state. Requires tmux >= 3.2 (the `-e` flag).
13
+ *
14
+ * Keys are emitted sorted so callers/tests get deterministic output.
15
+ */
16
+ export declare function copilotEnvPassthroughArgs(env?: NodeJS.ProcessEnv): string[];
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Build `tmux -e KEY=VALUE` arguments that forward the caller's Copilot
3
+ * environment into a pane created by `new-session` / `split-window`.
4
+ *
5
+ * Why this is needed: when a tmux server is already running, `new-session` and
6
+ * `split-window` populate a new pane from the *server's* global environment, not
7
+ * from the environment of the process that invoked tmux. So BYOK vars
8
+ * (`COPILOT_PROVIDER_*`, `COPILOT_MODEL`, …) set only in the launching shell are
9
+ * dropped, and Copilot silently falls back to GitHub-hosted models — exactly the
10
+ * failure observed when `omp` is run from a plain terminal or `omp team` spawns
11
+ * worker panes. Forwarding them explicitly with `-e` is reliable regardless of
12
+ * tmux server state. Requires tmux >= 3.2 (the `-e` flag).
13
+ *
14
+ * Keys are emitted sorted so callers/tests get deterministic output.
15
+ */
16
+ export function copilotEnvPassthroughArgs(env = process.env) {
17
+ const args = [];
18
+ for (const key of Object.keys(env).sort()) {
19
+ if (!key.startsWith("COPILOT_"))
20
+ continue;
21
+ const value = env[key];
22
+ if (value === undefined)
23
+ continue;
24
+ args.push("-e", `${key}=${value}`);
25
+ }
26
+ return args;
27
+ }
28
+ //# sourceMappingURL=env-passthrough.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-passthrough.js","sourceRoot":"","sources":["../../../src/copilot/env-passthrough.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC5E,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAC1C,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,SAAS;QAC1C,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}