Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pnpm add @tangle-network/agent-runtime @tangle-network/agent-eval
| `startRuntimeRun` | Canonical production-run row + cost ledger |
| `defineAgent` | Declarative per-vertical agent manifest — surfaces, knowledge, rubric, run fn |
| `resolveChatModel` / `validateChatModelId` / `getModels` | Router catalog fetch + fail-closed admission + precedence resolver |
| `createTraceBridge` | Map `RuntimeStreamEvent` → `agent-eval` `TraceEvent` |
| `decideKnowledgeReadiness` | `ready` / `blocked` / `caveat` branch for routes / UI |
| `createOpenAICompatibleBackend` | OpenAI-compatible streaming backend (TCloud / cli-bridge) |
| `createSandboxPromptBackend` | Sandbox / sidecar `streamPrompt` clients |
Expand Down Expand Up @@ -174,22 +173,6 @@ await run.persist({ runtimeEvents: telemetry.events })

Full runnable: [`examples/runtime-run/`](./examples/runtime-run/).

## agent-eval trace bridge

If you persist traces in agent-eval's `TraceStore`, the bridge maps
runtime stream events to `TraceEvent` so consumer repos don't hand-roll
the adapter.

```ts
import { createTraceBridge } from '@tangle-network/agent-runtime'

const bridge = createTraceBridge({ runId, spanId })
for await (const event of runAgentTaskStream({ task, backend, input })) {
const trace = bridge.toTraceEvent(event)
if (trace) await traceStore.appendEvent(trace)
}
```

## Error taxonomy

| Error | When |
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ answers wrong (or differently). Substrate primitive:
rejects malformed ids and ids absent from both the caller's
`allowlist` and the live router catalog. **Fails closed**: when the
catalog can't be fetched, an unverifiable id is rejected.
- **`getModels` / `resolveRouterBaseUrl` / `withConfiguredModels`** —
the catalog fetch + base-URL + injection helpers.
- **`getModels` / `resolveRouterBaseUrl`** —
the catalog fetch + base-URL helpers.

This module has **no React, no `process.env` assumption** — it runs
unchanged in Node and in Cloudflare Workers.
Expand Down
2 changes: 0 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ which needs an `OPENAI_API_KEY`.
| [`sandbox-stream-backend/`](./sandbox-stream-backend/) | `runAgentTaskStream` with `createSandboxPromptBackend` (synthetic sandbox client) |
| [`openai-stream-backend/`](./openai-stream-backend/) | `runAgentTaskStream` with `createOpenAICompatibleBackend` (real endpoint required) |
| [`runtime-run/`](./runtime-run/) | `startRuntimeRun` + cost ledger + persistence adapter |
| [`model-resolution/`](./model-resolution/) | `resolveChatModel` + `validateChatModelId` (fail-closed) + `getModels` |
| [`agent-into-reviewer/`](./agent-into-reviewer/) | Pipe one runtime's stream into a reviewer agent (the "2-runtime" pattern) |
| [`chat-handler/`](./chat-handler/) | `handleChatTurn` — the centerpiece production chat handler |
| [`production-trace-sink/`](./production-trace-sink/) | `createProductionTraceSink` — production data capture (RunRecord + OTLP + feedback) |
Expand Down Expand Up @@ -43,7 +42,6 @@ pnpm tsx examples/sanitized-telemetry-streaming/sanitized-telemetry-streaming.ts
pnpm tsx examples/sse-stream/sse-stream.ts
pnpm tsx examples/sandbox-stream-backend/sandbox-stream-backend.ts
pnpm tsx examples/runtime-run/runtime-run.ts
pnpm tsx examples/model-resolution/model-resolution.ts
pnpm tsx examples/agent-into-reviewer/agent-into-reviewer.ts
pnpm tsx examples/chat-handler/chat-handler.ts
pnpm tsx examples/production-trace-sink/production-trace-sink.ts
Expand Down
20 changes: 0 additions & 20 deletions examples/model-resolution/README.md

This file was deleted.

68 changes: 0 additions & 68 deletions examples/model-resolution/model-resolution.ts

This file was deleted.

1 change: 0 additions & 1 deletion examples/sanitized-telemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ pnpm tsx examples/sanitized-telemetry/sanitized-telemetry.ts
## What it shows

- `createRuntimeEventCollector()` capturing every lifecycle event safely
- `summarizeAgentTaskRun` producing a one-line summary for logs
- The `RuntimeTelemetryOptions` flags (`includeInputs`, `includeUserAnswers`,
`includeControlPayloads`, etc.) and what each enables
10 changes: 3 additions & 7 deletions examples/sanitized-telemetry/sanitized-telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
*/

import type { AgentAdapter } from '@tangle-network/agent-runtime'
import {
createRuntimeEventCollector,
runAgentTask,
summarizeAgentTaskRun,
} from '@tangle-network/agent-runtime'
import { createRuntimeEventCollector, runAgentTask } from '@tangle-network/agent-runtime'

const adapter: AgentAdapter<{ ready: boolean }, void, void> = {
async observe() {
Expand Down Expand Up @@ -74,8 +70,8 @@ async function main() {
console.log(JSON.stringify(e))
}

console.log('\n--- summary (always safe) ---')
console.log(summarizeAgentTaskRun(result))
console.log('\n--- final result ---')
console.log(`status=${result.status} pass=${result.control.pass}`)
}

main().catch((err) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tangle-network/agent-runtime",
"version": "0.16.1",
"version": "0.17.0",
"description": "Reusable runtime lifecycle for domain-specific agents.",
"homepage": "https://github.com/tangle-network/agent-runtime#readme",
"repository": {
Expand Down
179 changes: 0 additions & 179 deletions src/chat-turn.test.ts

This file was deleted.

Loading
Loading