Skip to content

feat(proactive-agents): vendored runtime types + Monaco + smoke test (spec 03)#14

Closed
khaliqgant wants to merge 5 commits into
mainfrom
ricky/wave-pear-cloud-agents/03-proactive-agents
Closed

feat(proactive-agents): vendored runtime types + Monaco + smoke test (spec 03)#14
khaliqgant wants to merge 5 commits into
mainfrom
ricky/wave-pear-cloud-agents/03-proactive-agents

Conversation

@khaliqgant

Copy link
Copy Markdown
Member

Summary

Spec 03 (proactive agents in pear) — partial follow-up to merged PR #10. Adds the unentangled portion of the remaining work: build-time vendored types, the Monaco dep, the smoke test. The branch was caught up to origin/main first so the PR diff is clean.

Three other spec-03 changes (UI mounting in App.tsx, ui-store.ts, ProjectSettings.tsx) are deliberately deferred to a follow-up — those files contain edits from specs 01/02/05 mixed in on the working tree and need surgical hunk-picking to isolate.

  • scripts/sync-runtime-types.mjs — generates vendor/agentworkforce-runtime-types.d.ts from @agentworkforce/persona-kit, wired via prebuild.
  • vendor/agentworkforce-runtime-types.d.ts — vendored types the persona editor type-checks user handler source against.
  • package.json / package-lock.json@monaco-editor/react ^4.7.0 + prebuild / sync:runtime-types scripts.
  • test/proactive-agent.smoke.ts — vitest smoke covering create → deploy → simulated change event → run row `succeeded` per acceptance gate feat(cloud-agents): pear-side cloud-agent feature (manager + UI scaffolding) #8.

Acceptance gates covered

  • ✅ Gate 4: `@monaco-editor/react` in package.json
  • ✅ Gate 5: `node scripts/sync-runtime-types.mjs` runs; `vendor/agentworkforce-runtime-types.d.ts` non-empty
  • ✅ Gate 8: smoke test present

Deferred to follow-up PR: gates 1–3 (UI mounting), since they touch multi-spec files.

Test plan

  • `npm install` resolves cleanly with the new monaco dep
  • `npm run build` exits 0 (gate 1)
  • `node scripts/sync-runtime-types.mjs` exits 0
  • Vitest smoke runs under 30s and passes

🤖 Generated with Claude Code

khaliqgant and others added 4 commits May 21, 2026 16:09
…UI files)

Spec 03 main-process + renderer scaffolding:
- src/main/proactive-agent.ts + .bundle.ts + .types.ts: ProactiveAgentManager
  (list/create/update/deploy/pause/resume/undeploy + run-transcript), bundle
  stager for handler source, route through resolveCloudAuth.
- components/proactive/: ProactiveAgentsSection, ProactiveAgentCard,
  ProactiveAgentEditor.
- hooks/use-proactive-agent.ts.

Builds on shared scaffolding (#7). NOTE: the UI is not wired yet —
ProactiveAgentsSection is defined but never rendered, the AppTabKind union does
not include 'proactive-agent-editor', App.tsx does not render the editor, and
@monaco-editor/react is not in package.json. Those gaps, plus vendored runtime
types and the cloud proactive-personas backend (routes/schema/runtime), are
tracked in specs/03-proactive-agents.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CloudRunHandleStatus includes 'cancelled' but mapDeployStatus had no branch
for it, so a cancelled deployment fell through to the default 'active' and
was reported as a successful one (or produced a contradictory
{ status: 'active', error: '…' } pair).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Spec 03 remaining work — the unentangled portion. Adds the standalone
artifacts; UI mounting (App.tsx/ui-store.ts/ProjectSettings.tsx) is
deliberately left for a follow-up PR because those files have edits
from other specs mixed in on the working branch.

- scripts/sync-runtime-types.mjs: writes vendor/agentworkforce-runtime-types.d.ts
  from @agentworkforce/persona-kit at build time; wired via prebuild script.
- vendor/agentworkforce-runtime-types.d.ts: vendored persona/runtime types
  that the editor type-checks the user's handler source against.
- package.json: + @monaco-editor/react ^4.7.0, + prebuild + sync:runtime-types
  scripts.
- test/proactive-agent.smoke.ts: vitest smoke that mocks @agentworkforce/deploy
  + cloud HTTP and walks create → deploy → simulated change event → run row
  succeeded, per spec acceptance gate #8.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@khaliqgant has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 25 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 36abf940-ae23-4a6f-9c65-9aeddb11782d

📥 Commits

Reviewing files that changed from the base of the PR and between edf88e9 and c61a667.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json
  • scripts/sync-runtime-types.mjs
  • vendor/agentworkforce-runtime-types.d.ts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Per the v1 consolidation discussion on AgentWorkforce/cloud#912AgentWorkforce/cloud#919 (draft), the parallel cloud proactive-runtime
modules the smoke test imported (proactive-trigger-router,
proactive-runner) have been dropped in favour of reusing the existing
agents + deployments + integration-watch-dispatcher pipeline.

The smoke test was tightly coupled to those modules (relative imports
from ../../cloud/packages/core/src/runtime/*) and to the
/proactive-personas/* route surface that no longer exists. Retargeting
it to the v1 surface would require a different test harness (the v1
dispatcher imports from cloud's web package, which pulls in Daytona +
relayauth infrastructure not easily smoke-testable from pear).

Pear's part of spec-03 acceptance gate #8 (deploy → trigger →
succeeded) is more honestly covered by an end-to-end test in workforce
(packages/deploy/src/modes/cloud.test.ts now asserts proactive personas
flow through /deployments correctly) plus cloud's existing
integration-watch-dispatcher tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@khaliqgant khaliqgant closed this Jun 5, 2026
miyaontherelay added a commit that referenced this pull request Jun 8, 2026
Fix #11: WebGL doesn't repaint while the host is display:none. When the
visible effect runs after a hidden→visible transition, call the new
runtime.refreshOnShow() so the canvas redraws.

Fix #10: the runtime captures opts.getInputSrtt once at first acquire.
Rebind on each effect run via setInputSrttGetter so a remount with a
fresh inputSrttRef can't leave the predictor reading a stale ref.

Fix #14 (detach guard) was implemented inside the runtime in the prior
commit by tracking lastMountedContainer — no use-terminal change
needed.
miyaontherelay added a commit that referenced this pull request Jun 8, 2026
…+ #14)

Replace Fix #12's second-mount refusal guard and Fix #14's lastMountedContainer detach guard with a single token ownership model. Each mount receives a symbol token, stale detach calls no-op, and the latest mount can silently reparent the terminal host during React cross-tree handoff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant