Skip to content

feat(persona-kit): add adapter config passthrough#239

Merged
khaliqgant merged 2 commits into
mainfrom
feat/persona-kit-adapter-config-passthrough
Jun 16, 2026
Merged

feat(persona-kit): add adapter config passthrough#239
khaliqgant merged 2 commits into
mainfrom
feat/persona-kit-adapter-config-passthrough

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

  • add a generic integrations.<provider>.config adapter passthrough to persona-kit specs
  • add typed GitHub and GitLab materialization config authoring for definePersona, using canonical lazy / eager modes
  • preserve adapter config during parse and expose it in the generated persona schema
  • bump persona-kit to @relayfile/adapter-core@^0.3.50 so typed scope keys include GitLab projectPath

This supports AgentWorkforce/relayfile-adapters PR #193 and PR #194 so typed personas can declare GitHub/GitLab materialization policy, including eager issue/PR/MR resources for selected repos/projects.

Validation

  • git diff --check
  • corepack pnpm --filter @agentworkforce/persona-kit test (283 pass, 0 fail)

No persona-kit package version was changed.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 580ccf49-1d2e-4d36-badf-ae0b87bfc414

📥 Commits

Reviewing files that changed from the base of the PR and between 3995aec and 0028595.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • packages/persona-kit/package.json
  • packages/persona-kit/schemas/persona.schema.json
  • packages/persona-kit/src/__fixtures__/personas/full.json
  • packages/persona-kit/src/define.test.ts
  • packages/persona-kit/src/define.ts
  • packages/persona-kit/src/emit-schema.test.ts
  • packages/persona-kit/src/index.ts
  • packages/persona-kit/src/parse.test.ts
  • packages/persona-kit/src/parse.ts
  • packages/persona-kit/src/scope-keys.test.ts
  • packages/persona-kit/src/types.ts

📝 Walkthrough

Walkthrough

Adds an optional config passthrough field to PersonaIntegrationConfig (TypeScript type, JSON schema, and parse layer), defines typed GitHub and GitLab materialization policy hierarchies in define.ts, validates the field as a plain object at parse time via a new isPlainObject guard, and exposes all new types from the public index. Fixture and test coverage is extended accordingly.

Changes

Adapter config passthrough and materialization typing

Layer / File(s) Summary
PersonaIntegrationConfig config field contract
packages/persona-kit/src/types.ts, packages/persona-kit/schemas/persona.schema.json, packages/persona-kit/package.json
Adds config?: Record<string, unknown> to the PersonaIntegrationConfig interface and JSON schema definition as a forward-compatible adapter passthrough. Bumps @relayfile/adapter-core to ^0.3.50 to expose AdapterMaterializationMode.
Typed materialization policy types and public exports
packages/persona-kit/src/define.ts, packages/persona-kit/src/index.ts
Imports AdapterMaterializationMode from adapter-core, defines generic TypedAdapterMaterializationFilter/Rule/Policy types, adds provider-specific GitHub and GitLab materialization aliases and AdapterConfig interfaces, extends TypedIntegrationConfig with config?: AdapterConfigFor<P>, and re-exports all new types plus isPlainObject from the public index.
isPlainObject guard and config validation in parse.ts
packages/persona-kit/src/parse.ts
Exports an isPlainObject type guard rejecting arrays and non-plain prototypes, destructures config in parseIntegrationConfig, and throws when config is present but not a plain object; otherwise assigns it to the parsed output.
Fixtures and tests
packages/persona-kit/src/__fixtures__/personas/full.json, packages/persona-kit/src/define.test.ts, packages/persona-kit/src/parse.test.ts, packages/persona-kit/src/emit-schema.test.ts, packages/persona-kit/src/scope-keys.test.ts
Expands the full.json fixture with materialization config for both GitHub and GitLab. Updates define.test.ts to author and assert typed materialization policies including @ts-expect-error cases for invalid modes/states. Adds parse.test.ts coverage for materialization structure preservation and plain-object rejection. Verifies the emitted JSON schema config shape and extends scope-key tests to cover GitLab.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 A new config field hops into the mix,
With lazy defaults and materialization tricks.
GitHub and GitLab, typed to the core,
isPlainObject guards what slips through the door.
No arrays, no nulls — only objects allowed,
The adapter config bunny hops proud! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(persona-kit): add adapter config passthrough' clearly and concisely summarizes the main feature addition—introducing adapter config passthrough functionality to persona-kit.
Description check ✅ Passed The description provides a clear summary of changes including the adapter config passthrough, typed materialization authoring, and dependency updates, directly matching the changeset.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/persona-kit-adapter-config-passthrough

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.

@agent-relay-code

Copy link
Copy Markdown
Contributor

pr-reviewer could not complete review for #239 in AgentWorkforce/workforce.
The review harness exited with code 1.
No review was posted; this needs operator attention.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces a forward-compatible config field to the integration connection configuration in persona-kit, allowing provider-specific configurations (such as GitHub materialization policies) to be defined and validated. The changes include JSON schema updates, TypeScript type definitions for GitHub materialization policies, parsing logic to ensure config is a plain object, and comprehensive test coverage. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@agent-relay-code

Copy link
Copy Markdown
Contributor

ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed.

pr-reviewer could not complete review for #239 in AgentWorkforce/workforce.
The review harness exited with code 1.
No review was posted; this needs operator attention.

@agent-relay-code

Copy link
Copy Markdown
Contributor

pr-reviewer could not complete review for #239 in AgentWorkforce/workforce.
The review harness exited with code 1.
No review was posted; this needs operator attention.

3 similar comments
@agent-relay-code

Copy link
Copy Markdown
Contributor

pr-reviewer could not complete review for #239 in AgentWorkforce/workforce.
The review harness exited with code 1.
No review was posted; this needs operator attention.

@agent-relay-code

Copy link
Copy Markdown
Contributor

pr-reviewer could not complete review for #239 in AgentWorkforce/workforce.
The review harness exited with code 1.
No review was posted; this needs operator attention.

@agent-relay-code

Copy link
Copy Markdown
Contributor

pr-reviewer could not complete review for #239 in AgentWorkforce/workforce.
The review harness exited with code 1.
No review was posted; this needs operator attention.

@khaliqgant khaliqgant force-pushed the feat/persona-kit-adapter-config-passthrough branch from 92275c2 to 0028595 Compare June 16, 2026 12:40
@agent-relay-code

Copy link
Copy Markdown
Contributor

ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed.

pr-reviewer could not complete review for #239 in AgentWorkforce/workforce.
The review harness exited with code 1.
No review was posted; this needs operator attention.

@khaliqgant khaliqgant merged commit 41c6723 into main Jun 16, 2026
2 checks passed
@khaliqgant khaliqgant deleted the feat/persona-kit-adapter-config-passthrough branch June 16, 2026 12:53
@agent-relay-code

Copy link
Copy Markdown
Contributor

ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed.

pr-reviewer could not complete review for #239 in AgentWorkforce/workforce.
The review harness exited with code 1.
No review was posted; this needs operator attention.

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