feat: add reusable multi-turn agent kit#299
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughIntroduces ChangesTurn Kit
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Relaycast
participant TurnAgent
participant createTurnRunner
participant Memory
participant Model
participant RelaycastDelivery
Relaycast->>TurnAgent: message event
TurnAgent->>createTurnRunner: run conversation turn
createTurnRunner->>Memory: recall history
createTurnRunner->>Model: respond with history and input
createTurnRunner->>RelaycastDelivery: deliver reply
RelaycastDelivery-->>createTurnRunner: receipt.ok
createTurnRunner->>Memory: save confirmed turn
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 641e6b78db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c68a82337
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@packages/turn-kit/src/memory.ts`:
- Around line 11-15: Update conversationKey to encode each non-empty identity
component before joining them, matching conversationTag’s collision-safe
behavior. Preserve requiredIdentityPart validation and the base return for an
absent thread, while ensuring distinct root/thread combinations cannot produce
the same key.
🪄 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: 9d13dea9-e262-4288-aa88-dfed8f300544
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (21)
.github/workflows/publish.yml.github/workflows/verify-publish.ymlREADME.mdexamples/tsconfig.jsonexamples/turn-agent/README.mdexamples/turn-agent/agent.tsexamples/turn-agent/persona.tspackages/turn-kit/CHANGELOG.mdpackages/turn-kit/README.mdpackages/turn-kit/package.jsonpackages/turn-kit/src/actions.tspackages/turn-kit/src/assistant.test.tspackages/turn-kit/src/assistant.tspackages/turn-kit/src/context.tspackages/turn-kit/src/index.tspackages/turn-kit/src/memory.tspackages/turn-kit/src/persona.tspackages/turn-kit/src/runner.tspackages/turn-kit/src/turn-kit.test.tspackages/turn-kit/src/types.tspackages/turn-kit/tsconfig.json
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
7a1f3c0 to
f51104a
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
@agentworkforce/turn-kit, a transport-neutral lifecycle for multi-turn agents@agent-assistant/turn-contextthrough the optional@agentworkforce/turn-kit/assistantsubpath for canonical identity/context assembly, guardrails, provenance, and harness projectionThe abstraction is based on the shared lifecycle in life-agent and joke-bot, while preserving hn-monitor's important boundary: exact digest/thread grounding belongs in deterministic state/context providers, not semantic conversation memory. Agent Assistant sessions, memory stores, and continuations remain explicit opt-ins because they are richer contracts than Workforce's current managed
ctx.memoryand callback responder surfaces.Validation
pnpm --filter @agentworkforce/turn-kit test(13 tests)pnpm run typecheck:examplespnpm -r buildAGENT_WORKFORCE_HOME=<empty temp dir> pnpm check(full monorepo lint, typecheck, release tests, and package tests; 331 CLI tests)4.1.34The unisolated CLI test run can pick up the developer machine's personal Workforce source config; the full validation above used an isolated temporary
AGENT_WORKFORCE_HOME.