Repository navigation
Plugin dev emit reaches panels; trim the plugin authoring skill - #37026
Conversation
|
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
Actionable comments posted: 4

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3ca97ee2-800b-4165-adb8-fa6f68845c23
Files selected for processing: 15-
config/scripts/generate-bundled-skill-guides.test.mjsconfig/scripts/generate-plugin-authoring-skill-references.test.mjsdocs/reference/plugin-authoring.mdskill-guides/orca-cli/references/plugins.mdskill-guides/orca-plugin-authoring.mdskill-guides/orca-plugin-authoring/references/cli.mdskill-guides/orca-plugin-authoring/references/recipes.mdskill-guides/orca-plugin-authoring/references/workflow.mdsrc/cli/bundled-skill-guides.tssrc/cli/specs/plugin.tssrc/main/plugins/panels/plugin-panel-bridge.test.tssrc/main/plugins/panels/plugin-panel-bridge.tssrc/main/plugins/plugin-dev-event-emit.test.tssrc/main/plugins/plugin-dev-event-emit.tssrc/main/runtime/rpc/methods/plugin-dev-emit.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
-
| 3. Edit and save. Each save prints `reloaded`, a `check` of what each panel drew or threw, and a | ||
| `shot` whose `path` is a PNG of the panel exactly as Orca draws it: read the image and fix | ||
| what looks wrong. Fix every `log` error (`[frame] <file>:<line>`) and `check` issue. | ||
| 4. `ORCA plugin test <dir> --json` after changes, and `ORCA plugin check <dir> --json` before you |
There was a problem hiding this comment.
Restore the unsandboxed execution warning.
plugin test, plugin check, and the watch's --check run plugin code with the local user's access. The main guide now directs agents to run them without the prior trust warning. Restore that warning before these commands, including for existing plugin folders. (raw.githubusercontent.com)
| the user's machine: show them that list, and re-run with `--approve` only when they asked for | ||
| exactly this plugin and this access. Never approve on their behalf otherwise, and never pass a | ||
| fingerprint Orca did not give you. New capabilities or changed commands print a new approval. | ||
| `plugin_system_disabled`: ask the user to click "Turn on plugins" in Settings → Plugins. |
There was a problem hiding this comment.
Restore the windowless-host recovery.
An orca serve host has no Settings window. Users cannot follow this instruction there. Restore the plugin system on alternative for that case. (raw.githubusercontent.com)
| - `update(atom, fn)` takes an updater only; `set(atom, value)` stores a value. Both throw while | ||
| rendering. Components panels have no hooks and no DOM: state lives in atoms. | ||
| - Keyed atoms (`atom('draft', '')`) survive a hot reload; unkeyed ones and module variables reset. | ||
| `persist` values must be plain JSON; bump `version` (with `migrate`) when the shape changes. |
There was a problem hiding this comment.
Exclude storage-backed atoms from this migration advice.
persist: 'storage' does not apply version or migrate. Following this instruction for a changed storage-backed shape leaves existing values in the old shape, which can break the upgraded plugin. Specify that authors must migrate those values explicitly. (raw.githubusercontent.com)
| - Keyed atoms (`atom('draft', '')`) survive a hot reload; unkeyed ones and module variables reset. | ||
| `persist` values must be plain JSON; bump `version` (with `migrate`) when the shape changes. | ||
| - A save that fails to load keeps the last good render with an inline `file:line:col` error. | ||
| - No network: requests outside the plugin's files fail. Ship assets and load them relatively. |
There was a problem hiding this comment.
Limit the network restriction to panels and frames.
Trusted workers run in Node and can use Node networking. This instruction can cause an agent to reject a plugin that needs a remote API, even though a worker can implement it. Restore the surface qualifier. (raw.githubusercontent.com)
orca plugin dev emit now publishes through the panel bridge to that dev plugin's open panels that subscribed with orca.on, under the same approval and capability rules as the worker, and reports delivered.panels. The bridge's publishEvent takes an optional pluginKey filter and returns how many panels heard it. A panel-only plugin no longer needs a worker; an event nothing listens for is refused.
…nces The main guide drops from 299 to 121 lines: the decision table, build-less rules, core loop (create → dev watch --check --shot → read the PNG → test → check → release-entry), approval and top gotchas. Test/check and orca/testing (panels and workers), dev watch events, shot, open and dev emit move to a hand-written references/workflow.md; the panel/worker/data and agent status recipes to references/recipes.md, each with a read-when row. The guide test now also scans hand-written references for commands and caps the main guide at 150 lines.
93f166e to
c3c7b5d
Compare
ELI5
orca plugin dev emitlets a plugin author fire a test event at their plugin. It used to reach only the background worker; now it also reaches the plugin's open panels. The plugin authoring skill also gets shorter, so agents load less of it each time and read the details only when they need them.What Changed
dev emitreaches panelsPluginPanelBridge.publishEventtakes an optional{ pluginKey }filter and returns how many panels heard the event. Existing callers ignore the count.dev emit:delivered: { worker, panels }counts;Authoring skill, trimmed with progressive disclosure
orca-plugin-authoringguide goes from 299 to 121 lines. It keeps:dev watch --check --shot→ read the PNG → test → check → release-entry;references/workflow.md: dev watch events, shot options, test and check output, andorca/testingfor panels and workers;references/recipes.md: panel plus worker, storage and settings, live agent status, worker events.mountWorker,worker.request,posts,emitanddev emit.Why
dev emit: the panel bridge (Plugin panels talk to their worker; panel storage, settings and agent events #37013) lets panels receive events, so the test tool should reach them too.Linked Issue
N/A (maintainer change).
Visual Proof
N/A: a CLI and docs change.
dev emitreplies{ pluginKey, event, delivered: { worker, panels } }.Testing
Unit:
{ worker: true, panels: 2 }, with the publish filtered to the plugin;Skill: guide, bundling and skills tests.
Gates:
pnpm tcand the fullpnpm lintpass. The plugin e2e set passes, 26/26 (macOS).I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
Notes
mountWorkerfrom Components catalog 2 and worker tests: forms, tabs, table, tree, markdown, code, images #36997. Merge after it.dev emitalready answersmethod_not_foundon older hosts.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)