You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'main' into martzoukos/ai-445-pending-mappings-on-pr
Conflict in the confirmation protocol docs: #1410 landed a paragraph on
defaults being omitted from the confirmCommand, in the same spot as this
branch's pinned-target section. Both are wanted — kept the general note
first, then the pinning section.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1. When exit code is 2 and output contains `"status": "confirmation_required"`, **always present the `changes` array to the user** and ask for confirmation.
23
-
2.**Never auto-append `--force`** — only run the `confirmCommand`after the user explicitly approves.
23
+
2.**Run the `confirmCommand` verbatim, and only after the user explicitly approves.** It is normally the command you just ran, plus `--force` to skip the second prompt. Don't append `--force` to anything yourself, and don't edit the `confirmCommand`— changing its flags changes what you were authorized to do.
24
24
3. This applies to **every** write command, not just the first one. Incident updates and resolutions also require confirmation.
25
25
4. Use `--dry-run` to preview what a command will do without executing or prompting.
The `confirmCommand` omits flags left at their default, so a bare `npx checkly deploy` confirms as `checkly deploy --force` rather than echoing back every boolean the parser filled in. Treat every flag you see there as deliberate.
29
+
28
30
### Commands that pin a resolved target
29
31
30
32
A command that picks its own target before confirming writes that target back into the `confirmCommand`. `import commit` and `import cancel` do this: run without `--plan-id` they select the only candidate plan themselves, and confirm as `checkly import commit --plan-id="<resolved-id>" --force` — carrying a flag you never passed. That is deliberate: the pinned ID guarantees the approved run acts on the plan whose `changes` you showed the user, not on whatever happens to be pending by then. Run the `confirmCommand` exactly as returned; do not strip the flag or fall back to the bare command.
Copy file name to clipboardExpand all lines: packages/cli/src/ai-context/references/configure-traceroute-monitors.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
- Use `request.maxHops` (default: 30) and `request.maxUnknownHops` (default: 15) to control trace depth.
9
9
- Use `degradedResponseTime` and `maxResponseTime` (milliseconds) to configure response time thresholds.
10
10
- Traceroute assertions support `RESPONSE_TIME`, `HOP_COUNT`, and `PACKET_LOSS` sources.
11
+
-`TracerouteAssertionBuilder.responseTime()` takes an optional property — `'avg'` (default), `'min'`, `'max'`, or `'stdDev'`. `hopCount()` and `packetLoss()` take no property.
11
12
-**Plan-gated properties:**`retryStrategy`, `runParallel`, and higher frequencies are not available on all plans. Check entitlements matching `UPTIME_CHECKS_*` before using these. Omit any property whose entitlement is disabled. See `npx checkly skills manage` for details.
Copy file name to clipboardExpand all lines: packages/cli/src/ai-context/references/configure.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,3 +75,26 @@ Run `npx checkly skills manage plan` for the full reference.
75
75
## Deploying
76
76
77
77
- Deploy checks using the `npx checkly deploy` command. Use `--output` to see the created, updated, and deleted resources. Use `--verbose` to also include each resource's name and physical ID (UUID), which is useful for programmatically referencing deployed resources (e.g. `npx checkly checks get <id>`).
78
+
- Use `--preview` to see what a deploy would change without applying it.
79
+
80
+
### Deleted resources
81
+
82
+
A deploy makes the account match the code. **Any resource that was deployed before and is no longer in the code gets deleted, along with its run history.** Pass `--preserve-resources` to keep those resources and their history in the Checkly account instead, where the user can manage them from the web app.
83
+
84
+
This matters when the local project isn't the whole picture — a partial checkout, or a project whose checks were also edited elsewhere. If you're not sure the code is the complete source of truth, say so before deploying.
85
+
86
+
### Confirmation
87
+
88
+
`deploy` is a write command: without `--force` it returns exit code 2 and a `confirmation_required` envelope. Present its `changes` to the user and run the `confirmCommand` verbatim only after they approve.
89
+
90
+
That confirmation happens **before the project is parsed**, so it cannot tell you which resources would be deleted — its `changes` only warn that deletion is possible. There is a second, itemised guard that lists each doomed resource by name, but it is skipped by `--force`, and `--force` is exactly what the `confirmCommand` carries. **An agent following the confirmation protocol never sees that list.** It is a prompt for humans deploying by hand.
91
+
92
+
So when resources may have been removed from the code, don't rely on the confirmation to surface it — preview first:
93
+
94
+
```bash
95
+
npx checkly deploy --preview
96
+
```
97
+
98
+
This is a dry run: nothing is applied and nothing is confirmed. It prints the resources that would be created, updated, and deleted (add `--verbose` for names and IDs). Show the user what would be deleted, and only then deploy.
99
+
100
+
Run `npx checkly skills communicate` for the full protocol.
Copy file name to clipboardExpand all lines: packages/cli/src/ai-context/skill.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,11 @@ Run `npx checkly skills manage` for the full reference.
34
34
35
35
## Confirmation Protocol
36
36
37
-
Write commands (e.g. `incidents create`, `deploy`, `destroy`) return exit code 2 with a `confirmation_required` JSON envelope instead of executing. **Always present the `changes` to the user and wait for approval before running the `confirmCommand`.**Never auto-append `--force`. This applies to every write command individually — updates and resolutions need confirmation too, not just the initial create.
37
+
Write commands (e.g. `incidents create`, `deploy`, `destroy`) return exit code 2 with a `confirmation_required` JSON envelope instead of executing. **Always present the `changes` to the user and wait for approval before running the `confirmCommand`.** This applies to every write command individually — updates and resolutions need confirmation too, not just the initial create.
38
38
39
-
Run `npx checkly skills communicate` for the full protocol details.
39
+
The `confirmCommand` is the approved command, ready to run verbatim: it repeats the flags you passed and already ends in `--force`. Run it as-is once the user approves — don't add `--force` to a command yourself, and don't add flags the user didn't ask for.
40
+
41
+
Run `npx checkly skills communicate` for the full protocol details, or `npx checkly skills configure` for what `deploy` confirms.
0 commit comments