- packages/sdk-ts: BatchTransport, TraceBuilder, models, decision helpers Zero external deps, native fetch, ESM+CJS output - packages/opencode-plugin: OpenCode plugin with hooks for: - Session lifecycle (create/idle/error/delete/diff) - Tool execution capture (before/after -> TOOL_CALL spans + TOOL_SELECTION decisions) - LLM call tracking (chat.message -> LLM_CALL spans with model/provider) - Permission flow (permission.ask -> ESCALATION decisions) - File edit events - Model cost estimation (Claude, GPT-4o, o3-mini pricing)
12 lines
283 B
TypeScript
12 lines
283 B
TypeScript
import type { BatchTransport } from "./transport.js";
|
|
|
|
let _transport: BatchTransport | null = null;
|
|
|
|
export function _setTransport(transport: BatchTransport | null): void {
|
|
_transport = transport;
|
|
}
|
|
|
|
export function _getTransport(): BatchTransport | null {
|
|
return _transport;
|
|
}
|