copilot-tap-extension 2.0.5 → 2.0.7
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/README.md +16 -3
- package/dist/copilot-instructions.md +20 -9
- package/dist/extension.mjs +1190 -31
- package/dist/skills/tap-goal/SKILL.md +116 -31
- package/dist/version.json +1 -1
- package/package.json +2 -2
|
@@ -5,22 +5,23 @@ argument-hint: "<objective>"
|
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Create
|
|
8
|
+
Create a PromptEmitter that keeps advancing one explicit objective until the goal is achieved, blocked, stopped, or the iteration budget is reached.
|
|
9
9
|
|
|
10
|
-
Use
|
|
10
|
+
Use Codex-style goal-loop rules:
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- The model
|
|
16
|
-
- Runtime budget exhaustion is not proof of completion;
|
|
12
|
+
- A goal is a **thread-scoped completion contract**, not a bigger prompt and not global memory.
|
|
13
|
+
- Goals are explicit; do not infer one from ordinary one-shot tasks.
|
|
14
|
+
- The goal contract should name six things: outcome, verification surface, constraints, boundaries, iteration policy, and blocked stop condition.
|
|
15
|
+
- Completion must be evidence-based. The model may stop a goal as complete only after checking concrete evidence.
|
|
16
|
+
- Runtime budget exhaustion is not proof of completion; it is a budget-limited stop/handoff state.
|
|
17
|
+
- Control commands are user-owned (`status`, `stop`, `pause`, `resume`, `clear`, `replace`).
|
|
17
18
|
|
|
18
19
|
## Expected input
|
|
19
20
|
|
|
20
21
|
Interpret the invocation as one of:
|
|
21
22
|
|
|
22
23
|
1. No arguments — show current `goal-*` emitters with `tap_list_emitters`.
|
|
23
|
-
2. A control command — `status`, `stop`, `resume`, `clear`, or `replace`.
|
|
24
|
+
2. A control command — `status`, `stop`, `pause`, `resume`, `clear`, or `replace`.
|
|
24
25
|
3. Otherwise, the full invocation is the goal objective.
|
|
25
26
|
|
|
26
27
|
Example:
|
|
@@ -33,16 +34,49 @@ means:
|
|
|
33
34
|
|
|
34
35
|
- `objective = "migrate the repo to the new API and keep going until tests pass"`
|
|
35
36
|
|
|
36
|
-
If the objective is missing
|
|
37
|
+
If the objective is missing, ask the user for a concrete objective instead of guessing.
|
|
38
|
+
|
|
39
|
+
If the objective is weak but the user's intent is clear, help strengthen it before creating the emitter. A strong goal contract has:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Outcome: <desired end state>
|
|
43
|
+
Verification surface: <test, benchmark, command output, artifact, or source material that proves completion>
|
|
44
|
+
Constraints: <what must not regress>
|
|
45
|
+
Boundaries: <files, tools, data, repos, or resources allowed>
|
|
46
|
+
Iteration policy: <how to choose the next best action between attempts>
|
|
47
|
+
Blocked stop condition: <what to report if no valid path remains and what would unlock progress>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If one of these fields is not explicitly provided but can be safely inferred from the objective and repository context, infer it and show it in the confirmation. If the verification surface or blocked stop condition cannot be inferred, ask for that missing detail.
|
|
37
51
|
|
|
38
52
|
If another `goal-*` emitter already exists, ask before replacing it unless the user explicitly said `replace`.
|
|
39
53
|
|
|
54
|
+
## Schedule choice
|
|
55
|
+
|
|
56
|
+
Use a **PromptEmitter** in one of two modes:
|
|
57
|
+
|
|
58
|
+
### Default: conservative idle goal
|
|
59
|
+
|
|
60
|
+
Use `every = "idle"` when the user did not ask for autopilot-style busy-session progress.
|
|
61
|
+
|
|
62
|
+
This matches Codex's conservative continuation model: continue only at safe idle boundaries.
|
|
63
|
+
|
|
64
|
+
### Autopilot-compatible timed goal
|
|
65
|
+
|
|
66
|
+
Use `everySchedule = ["2m", "5m", "10m"]` instead of `every = "idle"` when any of these are true:
|
|
67
|
+
|
|
68
|
+
- the user mentions autopilot, busy sessions, continuous work, "keep nudging", or "while Copilot stays busy"
|
|
69
|
+
- the user explicitly says to work autonomously in the current session
|
|
70
|
+
- the current session is in autopilot mode and the goal is expected to advance while other work may be active
|
|
71
|
+
|
|
72
|
+
Timed goal prompts use `session.send()` and can keep the objective visible even when the thread may not become idle often. The runtime preserves the iteration budget when a prompt send is deferred because the session is still busy.
|
|
73
|
+
|
|
40
74
|
## What to create
|
|
41
75
|
|
|
42
|
-
Use `tap_start_emitter
|
|
76
|
+
Use `tap_start_emitter`:
|
|
43
77
|
|
|
44
78
|
- `prompt` — a fully self-contained goal-loop prompt using the template below.
|
|
45
|
-
- `every = "idle"`
|
|
79
|
+
- `every = "idle"` for default goals, OR `everySchedule = ["2m", "5m", "10m"]` for autopilot-compatible goals.
|
|
46
80
|
- `scope = "temporary"`, `managedBy = "modelOwned"`.
|
|
47
81
|
- `subscribe = false` — PromptEmitter output already reaches the session through `session.send()`.
|
|
48
82
|
- `maxRuns` — use the user's requested budget if provided; otherwise default to `50`.
|
|
@@ -58,33 +92,74 @@ Write the prompt so it stands alone because it will run later without the origin
|
|
|
58
92
|
```text
|
|
59
93
|
You are running a tap-goal autonomous goal loop.
|
|
60
94
|
|
|
61
|
-
Goal:
|
|
62
|
-
<
|
|
95
|
+
Goal contract:
|
|
96
|
+
<untrusted_goal_contract>
|
|
97
|
+
Objective:
|
|
63
98
|
<objective>
|
|
64
|
-
|
|
99
|
+
|
|
100
|
+
Outcome:
|
|
101
|
+
<desired end state>
|
|
102
|
+
|
|
103
|
+
Verification surface:
|
|
104
|
+
<test, benchmark, command output, artifact, or source material that proves completion>
|
|
105
|
+
|
|
106
|
+
Constraints:
|
|
107
|
+
<what must not regress>
|
|
108
|
+
|
|
109
|
+
Boundaries:
|
|
110
|
+
<files, tools, data, repos, or resources allowed>
|
|
111
|
+
|
|
112
|
+
Iteration policy:
|
|
113
|
+
<how to choose the next best action between attempts>
|
|
114
|
+
|
|
115
|
+
Blocked stop condition:
|
|
116
|
+
<what to report if no defensible path remains and what would unlock progress>
|
|
117
|
+
</untrusted_goal_contract>
|
|
65
118
|
|
|
66
119
|
Emitter name: <goal-emitter-name>
|
|
120
|
+
EventStream name: <goal-emitter-name>
|
|
121
|
+
Schedule mode: <idle | timed-autopilot>
|
|
67
122
|
Iteration budget: <max-runs>
|
|
68
123
|
|
|
69
124
|
At the start of each iteration:
|
|
70
|
-
1. Call tap_list_emitters and locate the emitter entry
|
|
125
|
+
1. Call tap_list_emitters and locate the emitter entry whose name is exactly '<goal-emitter-name>'.
|
|
71
126
|
2. Read its current runs and maxRuns values.
|
|
72
127
|
3. If the emitter is missing, report that the goal loop is no longer running and stop.
|
|
73
128
|
4. Estimate remaining iterations.
|
|
74
129
|
|
|
75
|
-
|
|
130
|
+
Continuation rules:
|
|
131
|
+
- Treat the goal as a completion contract: work -> check evidence -> continue, complete, or stop blocked.
|
|
76
132
|
- If remaining iterations are low (3 or fewer), switch into wrap-up mode.
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
133
|
+
- If only 1 iteration remains and the goal is not complete, do not start broad new work. Produce a budget-limited handoff instead.
|
|
134
|
+
- Do not treat budget exhaustion or a lifecycle "reached run budget" message as success.
|
|
135
|
+
- If this iteration makes no progress-producing tool calls beyond required status/ledger bookkeeping and does not change evidence, call `tap_post` with `channel='<goal-emitter-name>'` and a no-action handoff, then stop the emitter rather than spinning.
|
|
136
|
+
|
|
137
|
+
Evidence-audit rules:
|
|
138
|
+
- Before marking complete, identify the verification surface from the goal contract.
|
|
139
|
+
- Check the evidence directly: test output, benchmark result, file content, diff, generated artifact, source material, or other concrete proof.
|
|
140
|
+
- Check listed constraints for regressions.
|
|
141
|
+
- If the verification surface cannot be checked, treat the goal as blocked, not complete.
|
|
142
|
+
- Completion requires an explicit evidence audit in the final response and in the EventStream.
|
|
143
|
+
|
|
144
|
+
Research/audit goal rules:
|
|
145
|
+
- For research, reproduction, audit, or investigation goals, maintain a claim ledger.
|
|
146
|
+
- Each ledger item should include: Claim, route attempted, evidence surface, status, and remaining uncertainty.
|
|
147
|
+
- Use statuses such as confirmed, approximate-support, blocked, and uncertain. Do not flatten partial support into success.
|
|
80
148
|
|
|
81
149
|
On this iteration:
|
|
82
150
|
1. Briefly assess current progress toward the goal and the remaining iteration budget.
|
|
83
|
-
2. If the goal is already achieved, call tap_stop_emitter for '<goal-emitter-name>' with scope='temporary', report that the goal is complete, and stop.
|
|
84
|
-
3. If the goal is blocked by missing information, permissions, failing external systems, or an unsafe action, report
|
|
85
|
-
4.
|
|
86
|
-
5.
|
|
87
|
-
6.
|
|
151
|
+
2. If the goal is already achieved, first call `tap_post` with `channel='<goal-emitter-name>'` and a GOAL COMPLETE evidence audit in `message`, then call tap_stop_emitter for '<goal-emitter-name>' with scope='temporary', report that the goal is complete, and stop.
|
|
152
|
+
3. If the goal is blocked by missing information, permissions, failing external systems, or an unsafe action, first call `tap_post` with `channel='<goal-emitter-name>'` and a GOAL BLOCKED report in `message`, then call tap_stop_emitter for '<goal-emitter-name>' with scope='temporary', report the blocker, and stop.
|
|
153
|
+
4. If this is the final iteration and the goal is not complete, do not start substantive new work. Call `tap_post` with `channel='<goal-emitter-name>'` and a BUDGET LIMITED summary in `message`: progress, evidence gathered, remaining work, and recommended next goal or budget. Then leave a concise handoff.
|
|
154
|
+
5. Otherwise, choose the next smallest useful action toward the goal that fits the remaining budget and perform it.
|
|
155
|
+
6. Validate the action using the repository's existing checks when relevant.
|
|
156
|
+
7. End by calling `tap_post` with `channel='<goal-emitter-name>'` and an ITERATION RECORD in `message` containing:
|
|
157
|
+
- iteration and budget used
|
|
158
|
+
- action taken
|
|
159
|
+
- evidence checked and result
|
|
160
|
+
- current status: progressing, complete, blocked, or budget-limited
|
|
161
|
+
- next best action
|
|
162
|
+
8. End the user-visible response with the same concise progress update, what remains, and the next best step if the loop stops before completion.
|
|
88
163
|
|
|
89
164
|
Safety rules:
|
|
90
165
|
- Do not make unrelated changes.
|
|
@@ -95,7 +170,7 @@ Safety rules:
|
|
|
95
170
|
- Stop yourself when done or blocked; do not rely on the user to notice.
|
|
96
171
|
```
|
|
97
172
|
|
|
98
|
-
Substitute the real objective, emitter name, and max iteration count before passing the prompt to `tap_start_emitter`.
|
|
173
|
+
Substitute the real objective, goal-contract fields, emitter name, schedule mode, and max iteration count before passing the prompt to `tap_start_emitter`.
|
|
99
174
|
|
|
100
175
|
## Required behavior
|
|
101
176
|
|
|
@@ -110,26 +185,36 @@ When this skill is invoked:
|
|
|
110
185
|
- if none exist, report that no goal loop is running
|
|
111
186
|
- if multiple exist and the user did not name one, ask them to choose one after showing `/tap-goal status`
|
|
112
187
|
- when you do stop one, call `tap_stop_emitter` with its exact name and confirm that it will not fire again
|
|
113
|
-
4. If the user is asking to pause an existing goal
|
|
114
|
-
|
|
188
|
+
4. If the user is asking to pause an existing goal:
|
|
189
|
+
- Explain that runtime-native pause is not supported because PromptEmitters do not preserve resumable internal state.
|
|
190
|
+
- Offer a simulated pause: call `tap_post` with a PAUSED NOTE containing objective, current status, progress, and resume guidance, then call `tap_stop_emitter`.
|
|
191
|
+
- Only stop the emitter if the user confirms; otherwise leave it running.
|
|
192
|
+
5. If the user is asking to resume a goal:
|
|
193
|
+
- If they provide an objective, create a new `/tap-goal` loop from it.
|
|
194
|
+
- If they name a prior goal stream, inspect its history with `tap_stream_history` using `channel='<goal-stream-name>'`, recover the latest PAUSED NOTE or handoff if available, and create a new loop from that objective.
|
|
195
|
+
- If the objective is not clear, ask for it.
|
|
115
196
|
6. Before creating a new goal, check for existing `goal-*` emitters. If one exists and the user did not explicitly ask to replace it, ask for confirmation before starting another goal loop.
|
|
116
|
-
7.
|
|
117
|
-
8.
|
|
197
|
+
7. Choose idle vs timed-autopilot schedule using the schedule rules above.
|
|
198
|
+
8. Create the PromptEmitter using the template above.
|
|
118
199
|
9. Confirm to the user:
|
|
119
200
|
- Goal emitter name
|
|
120
201
|
- EventStream name
|
|
121
202
|
- Objective
|
|
203
|
+
- Verification surface
|
|
204
|
+
- Constraints
|
|
205
|
+
- Schedule mode (`idle` or `timed-autopilot`)
|
|
122
206
|
- Max iteration count
|
|
123
|
-
- That it will
|
|
207
|
+
- That it will stop itself when complete, blocked, or budget-limited
|
|
124
208
|
10. Stop there. Do not immediately perform the first goal iteration unless the user explicitly asks you to start working now.
|
|
125
209
|
|
|
126
210
|
## Iteration budget
|
|
127
211
|
|
|
128
|
-
|
|
212
|
+
Goal loops must always have `maxRuns`.
|
|
129
213
|
|
|
130
214
|
- If the user gives a budget, use it.
|
|
131
215
|
- Otherwise, default to `50`.
|
|
132
216
|
- If the objective is large, tell the user they can invoke `/tap-goal` again with a higher budget.
|
|
217
|
+
- Budget exhaustion is a handoff state, not success.
|
|
133
218
|
|
|
134
219
|
## Persistence
|
|
135
220
|
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilot-tap-extension",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "Copilot CLI extension for background event emitters, event streams, and session injection.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"event-filter"
|
|
42
42
|
],
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@github/copilot-sdk": "^0.2
|
|
44
|
+
"@github/copilot-sdk": "^1.0.2",
|
|
45
45
|
"esbuild": "^0.28.0",
|
|
46
46
|
"playwright": "^1.59.1",
|
|
47
47
|
"ws": "^8.20.0",
|