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
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ Background commands and agent prompts produce output line by line. An EventFilte
|
|
|
30
30
|
- You poll an API or dashboard and want the agent to react when something changes.
|
|
31
31
|
- You re-ask the same prompt periodically and want it on a timer or running whenever idle.
|
|
32
32
|
- You build external tools in any language and want them available inside Copilot without touching the SDK.
|
|
33
|
+
- You want a live visual flight recorder for tap streams, emitters, provider state, logs, and session events.
|
|
33
34
|
|
|
34
35
|
## Get started
|
|
35
36
|
|
|
@@ -115,6 +116,8 @@ Once inside the session, describe what you want in natural language. You can als
|
|
|
115
116
|
|
|
116
117
|
> _"Tail the API logs, inject errors, drop health checks"_
|
|
117
118
|
|
|
119
|
+
> _"Open the tap diagnostics canvas"_
|
|
120
|
+
|
|
118
121
|
The agent translates these into emitter and filter configurations behind the scenes.
|
|
119
122
|
|
|
120
123
|
## How it works
|
|
@@ -209,13 +212,15 @@ The prompt fires immediately, then re-fires after each idle period. It stops aft
|
|
|
209
212
|
|
|
210
213
|
**Work toward a goal autonomously**
|
|
211
214
|
|
|
212
|
-
Use `/tap-goal` to create
|
|
215
|
+
Use `/tap-goal` to create a goal loop that keeps advancing a concrete objective until it finishes, hits a blocker, or reaches its iteration budget. Goals are explicit completion contracts, control commands are user-owned, and the loop should stop itself only when the objective is actually complete, blocked, or budget-limited.
|
|
213
216
|
|
|
214
217
|
```
|
|
215
218
|
/tap-goal migrate the repo to the new API and keep going until tests pass
|
|
216
219
|
```
|
|
217
220
|
|
|
218
|
-
The skill creates a temporary
|
|
221
|
+
The skill creates a temporary PromptEmitter with a self-contained goal prompt. Conservative goals use an idle schedule; autopilot-style goals use a timed backoff schedule so the objective can keep nudging the session even when Copilot stays busy. Each iteration inspects its own emitter state, works against a six-part goal contract, records structured progress to its EventStream, validates when relevant, and stops the emitter when the goal is complete, blocked, or budget-limited.
|
|
222
|
+
|
|
223
|
+
A strong goal names the outcome, verification surface, constraints, boundaries, iteration policy, and blocked stop condition. Completion requires an evidence audit against concrete files, tests, logs, benchmark output, generated artifacts, or research evidence.
|
|
219
224
|
|
|
220
225
|
Goal loops default to 50 iterations unless you specify another budget.
|
|
221
226
|
|
|
@@ -225,7 +230,7 @@ Use `/tap-goal stop <name>` or `/tap-goal clear <name>` to stop a specific goal
|
|
|
225
230
|
|
|
226
231
|
Use `/tap-goal resume <objective>` to start a new loop from an objective. Stopped goal loops do not preserve resumable internal state; resuming creates a new emitter from the supplied objective.
|
|
227
232
|
|
|
228
|
-
Because `/tap-goal`
|
|
233
|
+
Because `/tap-goal` can use either idle or timed PromptEmitters, choose idle for conservative continuation and timed-autopilot mode for always-busy flows. Timed prompt deferrals do not consume the run budget; budget exhaustion still means "handoff needed," not success.
|
|
229
234
|
|
|
230
235
|
**Tune the filter live**
|
|
231
236
|
|
|
@@ -239,6 +244,12 @@ The recommended approach is a **keep-all bootstrap**: start with no EventFilter
|
|
|
239
244
|
|
|
240
245
|
Rules can be added or changed while the emitter is running. You never need to restart it to adjust filtering.
|
|
241
246
|
|
|
247
|
+
**Inspect tap with a live diagnostics canvas**
|
|
248
|
+
|
|
249
|
+
Use the `tap_open_diagnostics_canvas` tool to open a local canvas that shows tap's retained EventStreams, emitter state, provider gateway state, injection queue, runtime logs, and recent session events in one place.
|
|
250
|
+
|
|
251
|
+
The canvas is bounded and redacted: it keeps recent diagnostic evidence without exposing provider auth tokens or unbounded transcript payloads.
|
|
252
|
+
|
|
242
253
|
## Repo layout
|
|
243
254
|
|
|
244
255
|
```text
|
|
@@ -276,6 +287,8 @@ PLAN.md # ubiquitous language and design decisions
|
|
|
276
287
|
| [Reference](./docs/reference.md) | Look up tool parameters, config fields, or the event pipeline |
|
|
277
288
|
| [Provider guide](./docs/providers.md) | Add external tools to Copilot via the WebSocket provider interface |
|
|
278
289
|
| [Use cases and patterns](./docs/use-cases.md) | Recipes for deploy watchers, PR monitors, log tailers, and more |
|
|
290
|
+
| [Copilot SDK canvas surfaces](./docs/recipes/copilot-sdk-canvas.md) | Local SDK findings for extension-owned canvas UI surfaces |
|
|
291
|
+
| [Codex Goals lessons for tap-goal](./docs/recipes/codex-goals-for-tap-goal.md) | Goal-loop contract, evidence audit, and autopilot scheduling guidance |
|
|
279
292
|
| [Evals](./docs/evals.md) | Run or extend the automated test suite |
|
|
280
293
|
| [Copilot instructions](./src/copilot-instructions.md) | Understand or customize how the agent uses this extension |
|
|
281
294
|
| [Implementation plan](./PLAN.md) | Ubiquitous language and naming conventions for contributors |
|
|
@@ -145,20 +145,26 @@ If the work is mostly reasoning rather than data collection, prefer a PromptEmit
|
|
|
145
145
|
|
|
146
146
|
- prompt once for a background check (oneTime)
|
|
147
147
|
- prompt + `every="<interval>"` for a fixed maintenance loop (timed)
|
|
148
|
-
- prompt + `every="idle"` + `maxRuns` for autonomous goal loops with explicit iteration budgets (`/tap-goal`)
|
|
148
|
+
- prompt + `every="idle"` + `maxRuns` for conservative autonomous goal loops with explicit iteration budgets (`/tap-goal`)
|
|
149
|
+
- prompt + `everySchedule=[...]` + `maxRuns` for autopilot-compatible goals that need timed nudges while the session may stay busy
|
|
149
150
|
|
|
150
151
|
This is the closest analogue to Claude's session-scoped `/tap-loop` behavior in this extension.
|
|
151
152
|
|
|
152
153
|
For "keep working until done" requests, prefer `/tap-goal`: create an
|
|
153
|
-
|
|
154
|
-
budget
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
PromptEmitter with a self-contained goal prompt and an explicit `maxRuns`
|
|
155
|
+
budget. A strong goal is a six-part completion contract: outcome, verification
|
|
156
|
+
surface, constraints, boundaries, iteration policy, and blocked stop condition.
|
|
157
|
+
Goals must be explicit user requests; do not infer them from ordinary one-shot
|
|
158
|
+
tasks, and do not treat budget exhaustion as successful completion. Goal prompts
|
|
159
|
+
should self-steer by reading their own emitter state with `tap_list_emitters`,
|
|
160
|
+
switching into wrap-up mode when the remaining iteration budget is low, posting
|
|
161
|
+
structured iteration records to their EventStream with `tap_post`, and stopping
|
|
162
|
+
themselves when complete or blocked. Completion requires an evidence audit
|
|
163
|
+
against concrete files, tests, logs, benchmark output, or generated artifacts.
|
|
159
164
|
If the session may stay continuously busy (for example in autopilot-heavy
|
|
160
|
-
flows),
|
|
161
|
-
instead of relying on idle to trigger the next
|
|
165
|
+
flows), use a timed PromptEmitter with a backoff schedule such as
|
|
166
|
+
`everySchedule=["2m","5m","10m"]` instead of relying on idle to trigger the next
|
|
167
|
+
goal step.
|
|
162
168
|
|
|
163
169
|
## Borrow from the official SDK examples
|
|
164
170
|
|
|
@@ -170,6 +176,10 @@ When working on the extension itself, not just using its emitter tools, prefer t
|
|
|
170
176
|
- use `session.send()` for asynchronous follow-up prompts and `session.sendAndWait()` only when the extension must wait for an answer
|
|
171
177
|
- use `onPermissionRequest` and `onUserInputRequest` for guarded flows instead of custom ad hoc prompting
|
|
172
178
|
- use `fs.watch` or `watchFile` when the extension should react to manual file edits or workspace artifacts such as `plan.md`
|
|
179
|
+
- use `createCanvas` with `joinSession({ canvases: [...] })` for extension-owned UI panels when text-only EventStreams are not enough; `open()` returns `title`, `status`, and a renderer `url`, actions power `invoke_canvas_action`, and per-instance state should be keyed by `instanceId`
|
|
180
|
+
- treat canvas support as experimental: action names must not start with `canvas.`, guard optional host canvas capabilities, prefer loopback HTTP renderers on ephemeral ports, and clean them up in `onClose`
|
|
181
|
+
- remember that external tap providers cannot declare Copilot SDK canvases over the current WebSocket protocol; implement canvases in the extension layer or explicitly extend the gateway protocol first
|
|
182
|
+
- open the built-in `tap-diagnostics` canvas with `tap_open_diagnostics_canvas` when users ask to inspect tap internals, diagnostics, logs, stream history, provider state, or "everything tap is doing"
|
|
173
183
|
|
|
174
184
|
Good non-emitter examples to adapt into this repo:
|
|
175
185
|
|
|
@@ -177,6 +187,7 @@ Good non-emitter examples to adapt into this repo:
|
|
|
177
187
|
- watch a config file and refresh the corresponding emitter when the user edits it
|
|
178
188
|
- add a helper tool that fetches one-shot data from an API while emitters continue to watch background streams
|
|
179
189
|
- log EventFilter updates and emitter lifecycle events to the timeline for observability
|
|
190
|
+
- add a canvas dashboard for stream/emitter inspection when a workflow benefits from a persistent visual surface
|
|
180
191
|
|
|
181
192
|
## What not to do
|
|
182
193
|
|