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
@jsonbailey jsonbailey force-pushed the jb/aic-2388/js-runner-protocol branch from 94452a7 to 635cf16 Compare April 28, 2026 23:18
@jsonbailey jsonbailey force-pushed the jb/aic-2388/js-managed-graph-result branch from 2ab8546 to 262ea0d Compare May 1, 2026 14:07
… (AIC-2388)

Adds RunnerProtocol.test.ts to verify that the Runner and AgentGraphRunner
interfaces can be implemented as plain objects. The Runner, AgentGraphRunner
interfaces, AIProvider deprecation, and providers/index.ts re-exports landed
in the parent PR (#1332).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jsonbailey jsonbailey force-pushed the jb/aic-2388/js-runner-protocol branch from 635cf16 to 2286917 Compare May 1, 2026 14:07
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