Skip to content

feat: add Runner and AgentGraphRunner protocols; deprecate AIProvider#1336

Draft
jsonbailey wants to merge 1 commit intojb/aic-2388/js-managed-graph-resultfrom
jb/aic-2388/js-runner-protocol
Draft

feat: add Runner and AgentGraphRunner protocols; deprecate AIProvider#1336
jsonbailey wants to merge 1 commit intojb/aic-2388/js-managed-graph-resultfrom
jb/aic-2388/js-runner-protocol

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

Summary

  • Adds Runner interface: run(input: LDMessage[], outputType?: Record<string, unknown>): Promise<RunnerResult> — the new provider protocol for both model and agent use cases
  • Adds AgentGraphRunner interface: run(input: string): Promise<AgentGraphRunnerResult> — for graph-level providers
  • Confirms RunnerResult shape: content, metrics (LDAIMetrics), raw?, parsed? — NO evaluations (consistent with PR 2)
  • Deprecates AIProvider abstract class with JSDoc directing implementors to Runner interface
  • Exports Runner and AgentGraphRunner from the public package API
  • This PR unblocks the js-providers agent (PR 7–9)

Test plan

  • 210 tests pass
  • RunnerProtocol.test.ts verifies Runner and AgentGraphRunner can be implemented as plain objects (no class extension required)
  • RunnerResult does not include evaluations field

🤖 Generated with Claude Code

@jsonbailey jsonbailey force-pushed the jb/aic-2388/js-managed-graph-result branch from 6583620 to 2ab8546 Compare April 28, 2026 23:17
… (AIC-2388)

Introduces Runner interface (run(input, outputType?) => Promise<RunnerResult>)
as the new provider protocol replacing the AIProvider abstract class. Introduces
AgentGraphRunner interface (run(input) => Promise<AgentGraphRunnerResult>) for
graph-level providers. Confirms RunnerResult shape (content, metrics, raw?, parsed?
— no evaluations). Deprecates AIProvider abstract class with JSDoc notice directing
implementors to the Runner interface. Exports Runner and AgentGraphRunner from
public API. This unblocks the js-providers agent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jsonbailey jsonbailey force-pushed the jb/aic-2388/js-runner-protocol branch from 94452a7 to 635cf16 Compare April 28, 2026 23:18
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