Skip to content

fix(persona-kit): consume Linear triggers from adapter catalog - #181

Merged
khaliqgant merged 1 commit into
mainfrom
linear-trigger-catalog-consume
Jun 2, 2026
Merged

khaliqgant merged 1 commit into
mainfrom
linear-trigger-catalog-consume

Conversation

@khaliqgant

Copy link
Copy Markdown
Member

Summary

  • remove the Linear-only mergeKnownTriggers(...) consumer-side special-case from persona-kit
  • remove persona-kit's direct @relayfile/adapter-linear dependency/import; Linear agent webhook event names now come through @relayfile/adapter-core/triggers
  • simplify TriggerNameFor<'linear'> to the same KnownTriggerName<P> path as every other provider
  • bump @agentworkforce/persona-kit and @agentworkforce/runtime to 3.0.42 for follow-up publish

Adapter Source-Of-Truth Assessment

  • @relayfile/adapter-linear does not intentionally keep agent events separate from supportedEvents(); LinearAdapter.supportedEvents() already returns [...recordEvents, ...LINEAR_AGENT_WEBHOOK_EVENTS].
  • packages/core/src/triggers/catalog.generated.ts on current relayfile-adapters main already includes AgentSessionEvent.created, AgentSessionEvent.prompted, and the AppUserNotification.* events under KNOWN_TRIGGER_CATALOG.linear.
  • Published @relayfile/adapter-core@0.3.31 was verified by tarball inspection and already contains those events in dist/src/triggers/catalog.generated.{js,d.ts}.
  • Running node --import tsx packages/core/src/cli.ts triggers check after building adapter-core passes, and triggers generate produces no adapter diff. So there is no adapter code PR needed for this fast-follow; the violation was only workforce's redundant consumer-side merge.
  • I searched workforce/cloud/relayfile-adapters for analogous mergeKnownTriggers usage; Linear in workforce was the lone provider-specific consumer merge. Cloud has a separate provider-contract list that imports adapter constants directly, not this persona-kit catalog merge pattern.

Verification

  • corepack pnpm --filter @agentworkforce/persona-kit test -> tests 246, pass 246, fail 0
  • corepack pnpm --filter @agentworkforce/runtime test -> tests 38, pass 38, fail 0
  • relayfile-adapters structural check: node --import tsx packages/core/src/cli.ts triggers check -> exited 0 after npm run build --workspace @relayfile/adapter-core

Publish

blocked-pending-npm-publish: @agentworkforce/persona-kit@3.0.42, @agentworkforce/runtime@3.0.42

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@codeant-ai

codeant-ai Bot commented Jun 2, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@khaliqgant, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 23 seconds. Learn how PR review limits work.

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

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 86f7bf15-a956-4cbb-a64c-c3a5a10f88e0

📥 Commits

Reviewing files that changed from the base of the PR and between 3239375 and 80512b2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • packages/persona-kit/package.json
  • packages/persona-kit/src/define.ts
  • packages/persona-kit/src/triggers.ts
  • packages/runtime/package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch linear-trigger-catalog-consume

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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

Re-trigger cubic

@khaliqgant
khaliqgant merged commit a092202 into main Jun 2, 2026
3 checks passed
@khaliqgant
khaliqgant deleted the linear-trigger-catalog-consume branch June 2, 2026 20:50
@agent-relay-code

Copy link
Copy Markdown
Contributor

Reviewed and fixed PR #181 locally.

I added missing 3.0.42 changelog entries for:

  • packages/persona-kit/CHANGELOG.md
  • packages/runtime/CHANGELOG.md

I verified the trigger-catalog change against installed @relayfile/adapter-core@0.3.31; its Linear catalog includes the agent webhook events previously sourced from @relayfile/adapter-linear.

Local checks run:

  • corepack pnpm install --frozen-lockfile
  • corepack pnpm -r --workspace-concurrency=1 run build
  • corepack pnpm -r --workspace-concurrency=1 lint
  • corepack pnpm run typecheck
  • corepack pnpm run test

The default parallel workspace build/lint hit local exit 137 memory kills, but the same checks passed when rerun sequentially.

@agent-relay-code

Copy link
Copy Markdown
Contributor

Reviewed PR #181 locally.

I confirmed @relayfile/adapter-core@0.3.31 now includes the Linear trigger catalog entries that the removed @relayfile/adapter-linear dependency previously supplied, including AgentSessionEvent.* and AppUserNotification.*. Existing persona-kit and runtime trigger tests cover that behavior.

I fixed one blocking test failure outside the PR diff in launch-metadata.test.ts: the sustained ingest failure test now uses mocked interval ticks instead of racing real-time 1 ms timers.

Local verification passed:
corepack pnpm run check

@agent-relay-code

Copy link
Copy Markdown
Contributor

⚠️ pr-reviewer push failed (exit 128) — fixes were not applied to the PR. The notes below are advisory and were not pushed.

Reviewed PR #181 locally.

I confirmed @relayfile/adapter-core@0.3.31 now includes the Linear trigger catalog entries that the removed @relayfile/adapter-linear dependency previously supplied, including AgentSessionEvent.* and AppUserNotification.*. Existing persona-kit and runtime trigger tests cover that behavior.

I fixed one blocking test failure outside the PR diff in launch-metadata.test.ts: the sustained ingest failure test now uses mocked interval ticks instead of racing real-time 1 ms timers.

Local verification passed:
corepack pnpm run check

@agent-relay-code

Copy link
Copy Markdown
Contributor

✅ pr-reviewer applied fixes — committed and pushed f7d2809 to this PR. The notes below describe what changed.

Reviewed PR #181 against the provided diff and traced the Linear trigger catalog impact through persona-kit, runtime, deploy, and CLI consumers.

No code fixes were needed. The new @relayfile/adapter-core@0.3.31 catalog includes the Linear agent-session and notification events that were previously pulled from @relayfile/adapter-linear, so removing the Linear adapter dependency does not break trigger linting or typed trigger authoring.

Local checks run:

  • corepack pnpm install --frozen-lockfile
  • focused persona-kit, runtime, deploy, cli, and workload-router tests/lints
  • full corepack pnpm run check

The full local check completed successfully.

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