@aryaminus/controlkeel-opencode 0.2.46 → 0.2.49

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.
@@ -22,6 +22,7 @@ and validate them against the project's security, budget, and compliance policie
22
22
 
23
23
  - `ck_context` — Load mission, findings, budget, and proof context
24
24
  - `ck_validate` — Run full governance validation
25
+ - `ck_execute_code` — Run generated code only through CK's guarded Docker sandbox; use `dry_run` first and do not request network/secrets/shell/deploy
25
26
  - `ck_finding` — Record a governed finding when you detect a missed issue
26
27
  - `ck_review_submit` — Submit review material for human approval
27
28
  - `ck_review_status` — Check review status before execution
@@ -360,24 +360,27 @@ export const ControlKeelGovernance: Plugin = async ({ project, client, $, direct
360
360
  const openError = typeof openPayload?.open_error === "string" ? openPayload.open_error.trim() : ""
361
361
  const openFailure = typeof openPayload?.error === "string" ? openPayload.error.trim() : ""
362
362
  const browserNotOpened = openPayload?.opened !== true
363
+ const serverUnavailable = openPayload?.server_serving === false
363
364
 
364
365
  const remoteLocalhostMismatch =
365
366
  typeof browserUrl === "string" &&
366
367
  browserUrl.includes("localhost") &&
367
368
  openPayload?.remote === true
368
369
 
369
- if (!browserUrl || openError || openFailure || remoteLocalhostMismatch || browserNotOpened) {
370
+ if (!browserUrl || serverUnavailable || openError || openFailure || remoteLocalhostMismatch || browserNotOpened) {
370
371
  return buildPlanResult({
371
372
  waitSkipped: true,
372
373
  manualApprovalRequired: true,
373
374
  reason:
374
375
  !browserUrl
375
376
  ? "browser_url_unavailable"
376
- : browserNotOpened
377
- ? "browser_not_opened"
378
- : "browser_unreachable",
377
+ : serverUnavailable
378
+ ? "review_server_unavailable"
379
+ : browserNotOpened
380
+ ? "browser_not_opened"
381
+ : "browser_unreachable",
379
382
  guidance:
380
- "Browser review is unavailable from this environment or did not actually open. Ask the user for explicit approval in chat, then record it with `controlkeel review plan respond --id <review_id> --decision approved --feedback-notes \"User approved in chat; browser unavailable\" --json` or `ck_review_feedback`.",
383
+ "Browser review is unavailable, the CK review server is not reachable, or the browser did not actually open. Ask the user for explicit approval in chat, then record it with `controlkeel review plan respond --id <review_id> --decision approved --feedback-notes \"User approved in chat; browser/review server unavailable\" --json` or `ck_review_feedback`.",
381
384
  })
382
385
  }
383
386
 
@@ -13,6 +13,7 @@ compatibility:
13
13
  - open-standard
14
14
  allowed-tools:
15
15
  - ck_validate
16
+ - ck_execute_code
16
17
  - ck_context
17
18
  - ck_finding
18
19
  - ck_memory_search
@@ -32,6 +33,7 @@ metadata:
32
33
  category: governance
33
34
  ck_mcp_tools:
34
35
  - ck_validate
36
+ - ck_execute_code
35
37
  - ck_context
36
38
  - ck_finding
37
39
  - ck_memory_search
@@ -53,16 +55,17 @@ You are operating inside a **ControlKeel-governed session**. Start here whenever
53
55
 
54
56
  1. Call `ck_context` at task start to load mission, risk, budget, proof, active findings, workspace context, context reacquisition, instruction hierarchy, and recent transcript state.
55
57
  2. Call `ck_validate` before writing code, config, shell, or deploy text, and pass trust-boundary metadata when the source content came from the web, tools, skills, or mixed provenance.
56
- 3. If you discover a problem the scanner did not raise, call `ck_finding`.
57
- 4. Use `ck_memory_search` when you need explicit recall of prior decisions, checkpoints, or findings rather than relying only on the default context packet.
58
- 5. Use `ck_memory_record` to persist important decisions, assumptions, and operator guidance that future agents should recover.
59
- 6. Use `ck_memory_archive` to retire stale or superseded guidance before it keeps contaminating retrieval.
60
- 7. Call `ck_budget` and `ck_cost_optimizer` before expensive model or bulk operations.
61
- 8. Call `ck_route` before delegating sub-work to another agent.
62
- 9. Use `ck_deployment_advisor` to analyze stack and generate deployment templates when checking ship readiness.
63
- 10. Use `ck_regression_result` to record external browser or QA evidence before claiming deploy readiness.
64
- 11. Use `ck_outcome_tracker` to track success/failure outcomes for continuous learning.
65
- 12. Use `ck_skill_list` and `ck_skill_load` to activate more specific CK workflows.
58
+ 3. Use `ck_execute_code` only for generated code that should run inside CK's guarded Docker sandbox; prefer `dry_run` first, and never treat it as local shell access or a network/secrets grant.
59
+ 4. If you discover a problem the scanner did not raise, call `ck_finding`.
60
+ 5. Use `ck_memory_search` when you need explicit recall of prior decisions, checkpoints, or findings rather than relying only on the default context packet.
61
+ 6. Use `ck_memory_record` to persist important decisions, assumptions, and operator guidance that future agents should recover.
62
+ 7. Use `ck_memory_archive` to retire stale or superseded guidance before it keeps contaminating retrieval.
63
+ 8. Call `ck_budget` and `ck_cost_optimizer` before expensive model or bulk operations.
64
+ 9. Call `ck_route` before delegating sub-work to another agent.
65
+ 10. Use `ck_deployment_advisor` to analyze stack and generate deployment templates when checking ship readiness.
66
+ 11. Use `ck_regression_result` to record external browser or QA evidence before claiming deploy readiness.
67
+ 12. Use `ck_outcome_tracker` to track success/failure outcomes for continuous learning.
68
+ 13. Use `ck_skill_list` and `ck_skill_load` to activate more specific CK workflows.
66
69
 
67
70
  ## Non-negotiable rules
68
71
 
@@ -81,6 +84,7 @@ You are operating inside a **ControlKeel-governed session**. Start here whenever
81
84
 
82
85
  - `ck_context` — mission, task, budget, proof, memory, workspace snapshot, transcript summary, resume context
83
86
  - `ck_validate` — governed preflight scan with trust-boundary checks
87
+ - `ck_execute_code` — guarded generated-code execution; Docker sandbox only, local/network/secrets/shell/deploy denied, `dry_run` recommended first
84
88
  - `ck_finding` — persist manual findings
85
89
  - `ck_memory_search`, `ck_memory_record`, `ck_memory_archive` — explicit typed-memory retrieval and hygiene
86
90
  - `ck_regression_result` — import external regression evidence into proof state
package/AGENTS.md CHANGED
@@ -11,8 +11,9 @@ Required workflow:
11
11
  2. Call `ck_validate` before writing code, config, shell, or deploy content.
12
12
  3. Submit plans or approval packets with `ck_review_submit` and check `ck_review_status` before execution.
13
13
  4. Record any human-review issue with `ck_finding`.
14
- 5. Check `ck_budget` before expensive model or multi-agent work.
15
- 6. Use `ck_route`, `ck_skill_list`, and `ck_skill_load` to delegate or activate specialized CK workflows.
14
+ 5. Check `ck_budget` before expensive model or multi-agent work, and keep `ck_context` compact unless full raw context is needed.
15
+ 6. Before AFK or delegated implementation, split large work into human-approved vertical slices with explicit dependencies; prefer durable behavior-first issues, stable deep-module interfaces, and branch-level automated review plus human QA before merge.
16
+ 7. Use `ck_route`, `ck_skill_list`, and `ck_skill_load` to delegate or activate specialized CK workflows.
16
17
 
17
18
  Install ControlKeel:
18
19
  - Homebrew: `brew tap aryaminus/controlkeel && brew install controlkeel`
package/index.js CHANGED
@@ -343,24 +343,27 @@ export const ControlKeelGovernance = async ({ $, directory }) => {
343
343
  const openError = typeof openPayload?.open_error === "string" ? openPayload.open_error.trim() : ""
344
344
  const openFailure = typeof openPayload?.error === "string" ? openPayload.error.trim() : ""
345
345
  const browserNotOpened = openPayload?.opened !== true
346
+ const serverUnavailable = openPayload?.server_serving === false
346
347
 
347
348
  const remoteLocalhostMismatch =
348
349
  typeof browserUrl === "string" &&
349
350
  browserUrl.includes("localhost") &&
350
351
  openPayload?.remote === true
351
352
 
352
- if (!browserUrl || openError || openFailure || remoteLocalhostMismatch || browserNotOpened) {
353
+ if (!browserUrl || serverUnavailable || openError || openFailure || remoteLocalhostMismatch || browserNotOpened) {
353
354
  return buildPlanResult({
354
355
  waitSkipped: true,
355
356
  manualApprovalRequired: true,
356
357
  reason:
357
358
  !browserUrl
358
359
  ? "browser_url_unavailable"
359
- : browserNotOpened
360
- ? "browser_not_opened"
361
- : "browser_unreachable",
360
+ : serverUnavailable
361
+ ? "review_server_unavailable"
362
+ : browserNotOpened
363
+ ? "browser_not_opened"
364
+ : "browser_unreachable",
362
365
  guidance:
363
- "Browser review is unavailable from this environment or did not actually open. Ask the user for explicit approval in chat, then record it with `controlkeel review plan respond --id <review_id> --decision approved --feedback-notes \"User approved in chat; browser unavailable\" --json` or `ck_review_feedback`.",
366
+ "Browser review is unavailable, the CK review server is not reachable, or the browser did not actually open. Ask the user for explicit approval in chat, then record it with `controlkeel review plan respond --id <review_id> --decision approved --feedback-notes \"User approved in chat; browser/review server unavailable\" --json` or `ck_review_feedback`.",
364
367
  })
365
368
  }
366
369
 
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "url": "git+https://github.com/aryaminus/controlkeel.git"
36
36
  },
37
37
  "type": "module",
38
- "version": "0.2.46"
38
+ "version": "0.2.49"
39
39
  }