Skip to content

feat(persona, dispatch): Phase 0 — full §6 schema + dispatch envelope contracts#95

Merged
kjgbot merged 1 commit into
mainfrom
ricky/proactive-unify-phase-0-followup
May 23, 2026
Merged

feat(persona, dispatch): Phase 0 — full §6 schema + dispatch envelope contracts#95
kjgbot merged 1 commit into
mainfrom
ricky/proactive-unify-phase-0-followup

Conversation

@kjgbot
Copy link
Copy Markdown
Contributor

@kjgbot kjgbot commented May 23, 2026

Summary

Phase 0 substrate for the proactive-unification effort. Driven by canonical spec sage/specs/proactive-unification.md §16.5 PR-0.1 + PR-0.2.

  • @agent-assistant/persona@0.5.0 — full canonical-spec §6 PersonaDefinition (16 fields with schedules[], inbox[], integrations, watch[], mount). Breaking from the published 0.4.35 stub, which had a reduced triggers[] union that downstream consumers (sage's dispatcher, cloud's persona-register endpoint) cannot route against. Migration table: packages/persona/MIGRATION-0.4.35.md.
  • @agent-assistant/dispatch@0.1.0 (new) — DispatchEnvelope + DispatchResponse + callback types from canonical spec §7.2 + §7.5.
  • publish.yml — prepend persona + dispatch to the runtime-core matrix so a workflow_dispatch publishes them alongside the rest.
  • package.json + package-lock.json — register the two new workspaces. The lockfile diff also normalizes ~1180 lines of pre-existing stale entries (npm install ran on a workspace that drifted prior to this PR); the net change for THIS PR is the two new workspace links.

Why this was shipped manually

This was generated by the proactive-unification orchestrator (sage/scripts/run-proactive-unification.mjs). Ricky completed lead-plan → implement → reviewer-claude + reviewer-codex → fix loops → final-hard-validation → final-signoff successfully, but the generated workflow omitted the GitHub primitive shipping steps (createGitHubStep / gh pr create). The orchestrator caught this as publish-failed: no open ricky/* PRs found in this repo. Manual commit + push + PR to unblock downstream sage / workforce / cloud work.

What this unblocks

  • workforce#130 follow-up: persona-kit migrates to @agent-assistant/persona@^0.5.0.
  • sage PR #214 follow-up (PR-3.4): drops local mirrors in src/proactive-dispatch/{contracts,persona-types}.ts; imports from the published packages instead.
  • cloud PR-1.1: /api/v1/personas/register endpoint validates against @agent-assistant/persona@^0.5.0.

Verification

$ npm run build -w @agent-assistant/persona   # exits 0
$ npm test  -w @agent-assistant/persona        # 9 tests pass (2 files)
$ npm run build -w @agent-assistant/dispatch  # exits 0
$ npm test  -w @agent-assistant/dispatch       # 7 tests pass

packages/persona/src/consumer-fixture.test.ts constructs sage's four canonical personas (morning-briefing, follow-up-sweep, pr-matcher, stale-threads) using the new types — no TS errors.

Publish flow

After merge, trigger:

gh workflow run publish.yml -f package_group=runtime-core -f version=minor -f tag=latest

This will publish @agent-assistant/persona@0.5.0 and @agent-assistant/dispatch@0.1.0 (alongside a minor bump of all other runtime-core packages). If publishing only the new packages is preferred, use -f custom_version= per-package or split the matrix into a new package_group=phase0-substrate value.

Test plan

  • Reviewer runs npm run build -w @agent-assistant/persona && npm test -w @agent-assistant/persona
  • Reviewer runs npm run build -w @agent-assistant/dispatch && npm test -w @agent-assistant/dispatch
  • Reviewer confirms MIGRATION-0.4.35.md accurately describes the breaking change
  • publish.yml matrix change is acceptable, or operator prefers a separate package_group
  • Lockfile diff is acceptable (or operator wants a fresh-checkout npm install regenerate as a follow-up commit)

Ricky run metadata

  • Workflow run id: 276d85ac4c495632707a3b6e (in agent-assistant .agent-relay/workflow-runs.jsonl)
  • Trajectory dir: agent-assistant/.trajectories/active/
  • Orchestrator summary: sage/.agent-relay/run-proactive-unification.json

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

Review Change Stack

Warning

Review limit reached

@kjgbot, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 51 minutes and 52 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, 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 trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a40f8bd-62c9-4429-b36c-3a69a47ac5fe

📥 Commits

Reviewing files that changed from the base of the PR and between 8b45c11 and 108ba54.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (19)
  • .github/workflows/publish.yml
  • package.json
  • packages/dispatch/CHANGELOG.md
  • packages/dispatch/README.md
  • packages/dispatch/package.json
  • packages/dispatch/src/index.ts
  • packages/dispatch/src/types.test.ts
  • packages/dispatch/src/types.ts
  • packages/dispatch/tsconfig.json
  • packages/persona/CHANGELOG.md
  • packages/persona/MIGRATION-0.4.35.md
  • packages/persona/README.md
  • packages/persona/package.json
  • packages/persona/src/consumer-fixture.test.ts
  • packages/persona/src/index.ts
  • packages/persona/src/types.test.ts
  • packages/persona/src/types.ts
  • packages/persona/tsconfig.build.json
  • packages/persona/tsconfig.json
📝 Walkthrough

Walkthrough

This PR introduces two new TypeScript contract packages to the monorepo: @agent-assistant/dispatch for modeling proactive event dispatch requests and responses, and @agent-assistant/persona for defining proactive assistant configurations. Both packages include complete type definitions, validation tests, documentation, and build configuration, integrated into the monorepo workspace and CI publishing pipeline.

Changes

Dispatch and Persona Contract Packages

Layer / File(s) Summary
Monorepo workspace and CI configuration
package.json, .github/workflows/publish.yml
Root workspace is extended with dispatch and persona packages; CI publish workflow adds both packages to the runtime-core group with persona as the version baseline.
Dispatch envelope and response type contracts
packages/dispatch/package.json, packages/dispatch/tsconfig.json, packages/dispatch/src/types.ts, packages/dispatch/src/index.ts
DispatchEnvelope<TPayload> models incoming proactive events with optional integration metadata; DispatchResponse is a discriminated union for done/borrow-sandbox/async/error outcomes; supporting types define delivery hints, logs, sandbox task commands, and post-task callbacks.
Dispatch type tests and documentation
packages/dispatch/src/types.test.ts, packages/dispatch/CHANGELOG.md, packages/dispatch/README.md
Vitest tests validate envelope and response construction across cron/GitHub/Slack event types and compile-time type safety; changelog and README document the dispatch contracts with usage examples.
Persona definition schema and executor configuration
packages/persona/package.json, packages/persona/tsconfig.json, packages/persona/tsconfig.build.json, packages/persona/src/types.ts, packages/persona/src/index.ts
PersonaDefinition serves as the root schema; PersonaExecutor variants include router/sandbox borrowing configuration; supporting types define schedules, inbox/integration triggers, watch rules, mounts, memory/delivery channels, harness settings, and declarative inputs; schema URL constant references canonical specification.
Persona type tests, fixtures, and migration guide
packages/persona/src/types.test.ts, packages/persona/src/consumer-fixture.test.ts, packages/persona/CHANGELOG.md, packages/persona/README.md, packages/persona/MIGRATION-0.4.35.md
Vitest tests validate PersonaDefinition across executor kinds with compile-time negative tests; four canonical persona fixtures demonstrate full schema usage; migration guide documents breaking 0.5.0 schema changes from 0.4.35 with field maps, trigger rewrites, worked examples, and downstream migration notes; README and CHANGELOG describe the contract and breaking version bump.

🎯 3 (Moderate) | ⏱️ ~25 minutes

A dispatch arrives, personas bloom,
Two contracts written in a room,
Sandbox tasks and routers too,
Schema truth in TypeScript true. 📦✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: adding full §6 schema for persona (0.5.0) and dispatch envelope contracts (0.1.0) as Phase 0 substrate.
Description check ✅ Passed The description comprehensively explains the changeset, including the breaking changes to persona, new dispatch package, workflow updates, reasoning for manual ship, and verification steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ricky/proactive-unify-phase-0-followup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
packages/persona/src/consumer-fixture.test.ts (1)

8-8: ⚡ Quick win

Use PERSONA_SCHEMA_URL instead of repeating the schema literal.

This prevents fixture drift when the schema URL/version changes.

Suggested update
-import type { PersonaDefinition } from "./index.js";
+import { PERSONA_SCHEMA_URL, type PersonaDefinition } from "./index.js";
@@
-      $schema: "https://schemas.agent-assistant.dev/persona/0.1.0/persona.schema.json",
+      $schema: PERSONA_SCHEMA_URL,
@@
-      $schema: "https://schemas.agent-assistant.dev/persona/0.1.0/persona.schema.json",
+      $schema: PERSONA_SCHEMA_URL,
@@
-      $schema: "https://schemas.agent-assistant.dev/persona/0.1.0/persona.schema.json",
+      $schema: PERSONA_SCHEMA_URL,
@@
-      $schema: "https://schemas.agent-assistant.dev/persona/0.1.0/persona.schema.json",
+      $schema: PERSONA_SCHEMA_URL,

Also applies to: 65-65, 120-120, 176-176

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/persona/src/consumer-fixture.test.ts` at line 8, Replace the
hard-coded schema string
("https://schemas.agent-assistant.dev/persona/0.1.0/persona.schema.json") in the
test fixtures with the shared constant PERSONA_SCHEMA_URL: import or reference
PERSONA_SCHEMA_URL and use it wherever the $schema literal appears (the
occurrences noted around the file), ensuring all fixtures ($schema keys at each
occurrence) use PERSONA_SCHEMA_URL to avoid repeating the literal and prevent
drift when the schema URL/version changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish.yml:
- Around line 93-94: The PACKAGES array was updated to include "persona" and
"dispatch" but the build ORDER array (used by the build loop and later
copy/publish steps referencing packages/$pkg/dist) was not updated, so add
"persona" and "dispatch" to the ORDER array in the workflow OR remove them from
PACKAGES if they should not be built/published; update the ORDER definition (the
variable named ORDER) to include the same package names in the correct sequence
so the build loop and subsequent copy/publish steps operate on the same set of
packages.

In `@packages/persona/MIGRATION-0.4.35.md`:
- Around line 64-77: Add a single blank line after the Markdown nested table
(the table containing rows like `router.endpoint` → `router.url`,
`sandbox.lifecycle?` → `sandbox.lifecycle`, and `sandbox.maxConcurrentBorrows?`
→ `sandbox.maxConcurrentBorrows`) so the following list item starting with "-
**`inbox` entries require `pattern`.**" is separated from the table for proper
markdown parsing.

---

Nitpick comments:
In `@packages/persona/src/consumer-fixture.test.ts`:
- Line 8: Replace the hard-coded schema string
("https://schemas.agent-assistant.dev/persona/0.1.0/persona.schema.json") in the
test fixtures with the shared constant PERSONA_SCHEMA_URL: import or reference
PERSONA_SCHEMA_URL and use it wherever the $schema literal appears (the
occurrences noted around the file), ensuring all fixtures ($schema keys at each
occurrence) use PERSONA_SCHEMA_URL to avoid repeating the literal and prevent
drift when the schema URL/version changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 455c2f2e-0310-408a-be2c-218b8c7e59ab

📥 Commits

Reviewing files that changed from the base of the PR and between 05e4423 and 8b45c11.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (19)
  • .github/workflows/publish.yml
  • package.json
  • packages/dispatch/CHANGELOG.md
  • packages/dispatch/README.md
  • packages/dispatch/package.json
  • packages/dispatch/src/index.ts
  • packages/dispatch/src/types.test.ts
  • packages/dispatch/src/types.ts
  • packages/dispatch/tsconfig.json
  • packages/persona/CHANGELOG.md
  • packages/persona/MIGRATION-0.4.35.md
  • packages/persona/README.md
  • packages/persona/package.json
  • packages/persona/src/consumer-fixture.test.ts
  • packages/persona/src/index.ts
  • packages/persona/src/types.test.ts
  • packages/persona/src/types.ts
  • packages/persona/tsconfig.build.json
  • packages/persona/tsconfig.json

Comment thread .github/workflows/publish.yml Outdated
Comment on lines +93 to +94
PACKAGES='["persona","dispatch","traits","connectivity","coordination","core","sessions","surfaces","policy","proactive","harness","telemetry","memory","turn-context","inbox","continuation","sdk","vfs","specialists","webhook-runtime"]'
FIRST='persona'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Matrix now includes packages that the build loop never builds.

After adding persona and dispatch to PACKAGES (Line 93), they are still missing from the build ORDER array (Line 170). That means this workflow can skip building them, then fail when copying packages/$pkg/dist (Line 275) or publish stale artifacts.

Suggested fix
-          ORDER=(traits connectivity coordination core sessions surfaces policy proactive harness telemetry memory turn-context inbox continuation sdk vfs specialists webhook-runtime)
+          ORDER=(persona dispatch traits connectivity coordination core sessions surfaces policy proactive harness telemetry memory turn-context inbox continuation sdk vfs specialists webhook-runtime)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/publish.yml around lines 93 - 94, The PACKAGES array was
updated to include "persona" and "dispatch" but the build ORDER array (used by
the build loop and later copy/publish steps referencing packages/$pkg/dist) was
not updated, so add "persona" and "dispatch" to the ORDER array in the workflow
OR remove them from PACKAGES if they should not be built/published; update the
ORDER definition (the variable named ORDER) to include the same package names in
the correct sequence so the build loop and subsequent copy/publish steps operate
on the same set of packages.

Comment on lines +64 to +77
| 0.4.35 nested field | 0.5.0 nested field |
| --- | --- |
| `router.endpoint` | `router.url` |
| `router.timeoutMs` | `router.timeoutSeconds` (convert milliseconds to seconds) |
| `router.method` | Removed; 0.5.0 does not model an HTTP method here. |
| `router.headers` | Use `router.auth` for shared-secret auth or move provider-specific headers into integration config. |
| — | Add required `router.kind` (for example, `"workerd-service"`). |
| — | Add required `router.auth` with `kind: "shared-secret"` and `envVar`. |
| `sandbox.lifecycle?` | `sandbox.lifecycle` is now required (`"warm-pool"` or `"ephemeral"`). |
| `sandbox.ttlSeconds` | Use `sandbox.idleStopMinutes` when modeling warm-pool idle shutdown. |
| `sandbox.capabilities` | Removed from `SandboxBorrowConfig`; model capabilities outside persona schema if still needed. |
| — | Add required `sandbox.borrowProtocol: "v1"`. |
| `sandbox.maxConcurrentBorrows?` | `sandbox.maxConcurrentBorrows` is now required. |
- **`inbox` entries require `pattern`.** Convert old channel/event filters into a
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add blank line after nested table.

Markdown tables should be surrounded by blank lines for proper rendering and parser compatibility. The nested table at lines 64-76 needs a blank line before the next list item.

📝 Proposed fix
   | `sandbox.capabilities` | Removed from `SandboxBorrowConfig`; model capabilities outside persona schema if still needed. |
   | — | Add required `sandbox.borrowProtocol: "v1"`. |
   | `sandbox.maxConcurrentBorrows?` | `sandbox.maxConcurrentBorrows` is now required. |
+
 - **`inbox` entries require `pattern`.** Convert old channel/event filters into a
   single canonical pattern such as `"`#sage`"`, `"`@self`"`, a channel id, or a user id.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| 0.4.35 nested field | 0.5.0 nested field |
| --- | --- |
| `router.endpoint` | `router.url` |
| `router.timeoutMs` | `router.timeoutSeconds` (convert milliseconds to seconds) |
| `router.method` | Removed; 0.5.0 does not model an HTTP method here. |
| `router.headers` | Use `router.auth` for shared-secret auth or move provider-specific headers into integration config. |
|| Add required `router.kind` (for example, `"workerd-service"`). |
|| Add required `router.auth` with `kind: "shared-secret"` and `envVar`. |
| `sandbox.lifecycle?` | `sandbox.lifecycle` is now required (`"warm-pool"` or `"ephemeral"`). |
| `sandbox.ttlSeconds` | Use `sandbox.idleStopMinutes` when modeling warm-pool idle shutdown. |
| `sandbox.capabilities` | Removed from `SandboxBorrowConfig`; model capabilities outside persona schema if still needed. |
|| Add required `sandbox.borrowProtocol: "v1"`. |
| `sandbox.maxConcurrentBorrows?` | `sandbox.maxConcurrentBorrows` is now required. |
- **`inbox` entries require `pattern`.** Convert old channel/event filters into a
| 0.4.35 nested field | 0.5.0 nested field |
| --- | --- |
| `router.endpoint` | `router.url` |
| `router.timeoutMs` | `router.timeoutSeconds` (convert milliseconds to seconds) |
| `router.method` | Removed; 0.5.0 does not model an HTTP method here. |
| `router.headers` | Use `router.auth` for shared-secret auth or move provider-specific headers into integration config. |
|| Add required `router.kind` (for example, `"workerd-service"`). |
|| Add required `router.auth` with `kind: "shared-secret"` and `envVar`. |
| `sandbox.lifecycle?` | `sandbox.lifecycle` is now required (`"warm-pool"` or `"ephemeral"`). |
| `sandbox.ttlSeconds` | Use `sandbox.idleStopMinutes` when modeling warm-pool idle shutdown. |
| `sandbox.capabilities` | Removed from `SandboxBorrowConfig`; model capabilities outside persona schema if still needed. |
|| Add required `sandbox.borrowProtocol: "v1"`. |
| `sandbox.maxConcurrentBorrows?` | `sandbox.maxConcurrentBorrows` is now required. |
- **`inbox` entries require `pattern`.** Convert old channel/event filters into a
single canonical pattern such as `"`#sage`"`, `"`@self`"`, a channel id, or a user id.
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 76-76: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/persona/MIGRATION-0.4.35.md` around lines 64 - 77, Add a single
blank line after the Markdown nested table (the table containing rows like
`router.endpoint` → `router.url`, `sandbox.lifecycle?` → `sandbox.lifecycle`,
and `sandbox.maxConcurrentBorrows?` → `sandbox.maxConcurrentBorrows`) so the
following list item starting with "- **`inbox` entries require `pattern`.**" is
separated from the table for proper markdown parsing.

Comment on lines +15 to +37
export interface PersonaDefinition {
$schema?: typeof PERSONA_SCHEMA_URL | string;
id: string;
intent: string;
description: string;
tags?: string[];
cloud?: boolean;
useSubscription?: boolean;
ownerService?: string;
schedules?: PersonaSchedule[];
inbox?: InboxTrigger[];
integrations?: Record<string, IntegrationDecl>;
watch?: WatchRule[];
mount?: PersonaMount;
executor: PersonaExecutor;
memory?: MemoryConfig;
delivery?: DeliveryChannel[];
onEvent?: string;
harness?: "claude" | "codex" | "opencode";
model?: string;
systemPrompt?: string;
harnessSettings?: HarnessSettings;
inputs?: Record<string, InputDecl>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Encode executor-specific fields as a discriminated union.

The current PersonaDefinition allows ephemeral-only fields for non-ephemeral executors, so invalid persona documents can still type-check.

Suggested contract hardening
-export interface PersonaDefinition {
+interface PersonaDefinitionBase {
   $schema?: typeof PERSONA_SCHEMA_URL | string;
   id: string;
   intent: string;
   description: string;
   tags?: string[];
   cloud?: boolean;
   useSubscription?: boolean;
   ownerService?: string;
   schedules?: PersonaSchedule[];
   inbox?: InboxTrigger[];
   integrations?: Record<string, IntegrationDecl>;
   watch?: WatchRule[];
   mount?: PersonaMount;
-  executor: PersonaExecutor;
   memory?: MemoryConfig;
   delivery?: DeliveryChannel[];
+}
+
+interface EphemeralPersonaDefinition extends PersonaDefinitionBase {
+  executor: { kind: "ephemeral-sandbox" };
   onEvent?: string;
   harness?: "claude" | "codex" | "opencode";
   model?: string;
   systemPrompt?: string;
   harnessSettings?: HarnessSettings;
   inputs?: Record<string, InputDecl>;
 }
+
+interface RoutedPersonaDefinition extends PersonaDefinitionBase {
+  executor:
+    | { kind: "http-delegate"; router: RouterConfig }
+    | { kind: "hybrid"; router: RouterConfig; sandbox: SandboxBorrowConfig };
+  onEvent?: never;
+  harness?: never;
+  model?: never;
+  systemPrompt?: never;
+  harnessSettings?: never;
+  inputs?: never;
+}
+
+export type PersonaDefinition = EphemeralPersonaDefinition | RoutedPersonaDefinition;

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 20 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="package.json">

<violation number="1" location="package.json:31">
P2: Root `typecheck` script only covers 2 of 13+ packages that have typecheck scripts. The generic name implies full project coverage, but it will miss TypeScript errors in the other 11+ packages (traits, core, routing, sdk, etc.). Consider using `npm run typecheck --workspaces --if-present` so all workspaces with typecheck scripts are covered, or rename this to something specific like `typecheck:dispatch-persona` if it's intentionally scoped.</violation>
</file>

<file name=".github/workflows/publish.yml">

<violation number="1" location=".github/workflows/publish.yml:93">
P1: The publish matrix includes `persona`/`dispatch`, but the dependency-aware build order does not build them before artifacts are collected.</violation>
</file>

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread .github/workflows/publish.yml Outdated
FIRST='traits'
# persona + dispatch (Phase 0 of proactive-unification) are types-only
# packages with zero runtime deps — added at the head of the matrix.
PACKAGES='["persona","dispatch","traits","connectivity","coordination","core","sessions","surfaces","policy","proactive","harness","telemetry","memory","turn-context","inbox","continuation","sdk","vfs","specialists","webhook-runtime"]'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: The publish matrix includes persona/dispatch, but the dependency-aware build order does not build them before artifacts are collected.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/publish.yml, line 93:

<comment>The publish matrix includes `persona`/`dispatch`, but the dependency-aware build order does not build them before artifacts are collected.</comment>

<file context>
@@ -88,8 +88,10 @@ jobs:
-              FIRST='traits'
+              # persona + dispatch (Phase 0 of proactive-unification) are types-only
+              # packages with zero runtime deps — added at the head of the matrix.
+              PACKAGES='["persona","dispatch","traits","connectivity","coordination","core","sessions","surfaces","policy","proactive","harness","telemetry","memory","turn-context","inbox","continuation","sdk","vfs","specialists","webhook-runtime"]'
+              FIRST='persona'
               ;;
</file context>

Comment thread package.json
"packages/webhook-runtime"
],
"scripts": {
"typecheck": "npm run typecheck -w @agent-assistant/dispatch && npm run typecheck -w @agent-assistant/persona",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Root typecheck script only covers 2 of 13+ packages that have typecheck scripts. The generic name implies full project coverage, but it will miss TypeScript errors in the other 11+ packages (traits, core, routing, sdk, etc.). Consider using npm run typecheck --workspaces --if-present so all workspaces with typecheck scripts are covered, or rename this to something specific like typecheck:dispatch-persona if it's intentionally scoped.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At package.json, line 31:

<comment>Root `typecheck` script only covers 2 of 13+ packages that have typecheck scripts. The generic name implies full project coverage, but it will miss TypeScript errors in the other 11+ packages (traits, core, routing, sdk, etc.). Consider using `npm run typecheck --workspaces --if-present` so all workspaces with typecheck scripts are covered, or rename this to something specific like `typecheck:dispatch-persona` if it's intentionally scoped.</comment>

<file context>
@@ -16,16 +16,19 @@
     "packages/webhook-runtime"
   ],
   "scripts": {
+    "typecheck": "npm run typecheck -w @agent-assistant/dispatch && npm run typecheck -w @agent-assistant/persona",
     "build:sdk": "npm run build -w @agent-assistant/sdk",
     "agent": "RELAY_AUTO_SPAWN=false RELAY_CHANNEL=specialists RELAY_WORKER=specialist-worker RELAY_CLI=claude RELAY_MODEL=claude-sonnet-4-6 npm run cli -w @agent-assistant/webhook-runtime",
</file context>
Suggested change
"typecheck": "npm run typecheck -w @agent-assistant/dispatch && npm run typecheck -w @agent-assistant/persona",
"typecheck": "npm run typecheck --workspaces --if-present",

… contracts

Lands the substrate for the proactive-unification effort
(sage/specs/proactive-unification.md §16.5 PR-0.1 + PR-0.2):

- packages/persona@0.5.0: full canonical-spec §6 PersonaDefinition.
  Replaces the reduced 0.4.35 schema with the 16-field shape Sage's
  dispatcher actually routes against (schedules[]/inbox[]/integrations/
  watch[]/mount). Breaking from 0.4.35 — see MIGRATION-0.4.35.md.
- packages/dispatch@0.1.0: NEW. DispatchEnvelope + DispatchResponse +
  callback types from canonical spec §7.2 + §7.5.
- publish.yml runtime-core matrix: prepend persona + dispatch.
- package.json + package-lock.json: register the two new workspaces.

Build + test green for both packages (9 + 7 tests). Downstream sage
keeps its local mirrors until 0.5.0 / 0.1.0 publish to npm; see
sage/specs/proactive-unification/by-repo/sage.md PR-3.3 fallback.

Generated by the proactive-unification orchestrator
(sage/scripts/run-proactive-unification.mjs); manually shipped because
the generated workflow omitted GitHub primitive shipping steps.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kjgbot kjgbot force-pushed the ricky/proactive-unify-phase-0-followup branch from 8b45c11 to 108ba54 Compare May 23, 2026 07:57
@kjgbot kjgbot merged commit 38c3dcf into main May 23, 2026
2 checks passed
@kjgbot kjgbot deleted the ricky/proactive-unify-phase-0-followup branch May 23, 2026 08:11
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