mirror of
https://github.com/n8n-io/n8n
synced 2026-04-21 15:47:20 +00:00
test(editor): Add comprehensive instance AI e2e tests (#28326)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1108467f44
commit
df5855d4c6
118 changed files with 7678 additions and 58 deletions
|
|
@ -2,27 +2,49 @@ import type { LanguageModel } from 'ai';
|
|||
|
||||
import { createModel } from '../runtime/model-factory';
|
||||
|
||||
type ProviderOpts = { apiKey?: string; baseURL?: string; fetch?: typeof globalThis.fetch };
|
||||
|
||||
jest.mock('@ai-sdk/anthropic', () => ({
|
||||
createAnthropic: (opts?: { apiKey?: string; baseURL?: string }) => (model: string) => ({
|
||||
createAnthropic: (opts?: ProviderOpts) => (model: string) => ({
|
||||
provider: 'anthropic',
|
||||
modelId: model,
|
||||
apiKey: opts?.apiKey,
|
||||
baseURL: opts?.baseURL,
|
||||
fetch: opts?.fetch,
|
||||
specificationVersion: 'v3',
|
||||
}),
|
||||
}));
|
||||
|
||||
jest.mock('@ai-sdk/openai', () => ({
|
||||
createOpenAI: (opts?: { apiKey?: string; baseURL?: string }) => (model: string) => ({
|
||||
createOpenAI: (opts?: ProviderOpts) => (model: string) => ({
|
||||
provider: 'openai',
|
||||
modelId: model,
|
||||
apiKey: opts?.apiKey,
|
||||
baseURL: opts?.baseURL,
|
||||
fetch: opts?.fetch,
|
||||
specificationVersion: 'v3',
|
||||
}),
|
||||
}));
|
||||
|
||||
const mockProxyAgent = jest.fn();
|
||||
jest.mock('undici', () => ({
|
||||
ProxyAgent: mockProxyAgent,
|
||||
}));
|
||||
|
||||
describe('createModel', () => {
|
||||
const originalEnv = process.env;
|
||||
|
||||
beforeEach(() => {
|
||||
process.env = { ...originalEnv };
|
||||
delete process.env.HTTPS_PROXY;
|
||||
delete process.env.HTTP_PROXY;
|
||||
mockProxyAgent.mockClear();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
process.env = originalEnv;
|
||||
});
|
||||
|
||||
it('should accept a string config', () => {
|
||||
const model = createModel('anthropic/claude-sonnet-4-5') as unknown as Record<string, unknown>;
|
||||
expect(model.provider).toBe('anthropic');
|
||||
|
|
@ -63,4 +85,30 @@ describe('createModel', () => {
|
|||
expect(model.provider).toBe('openai');
|
||||
expect(model.modelId).toBe('ft:gpt-4o:my-org:custom:abc123');
|
||||
});
|
||||
|
||||
it('should not pass fetch when no proxy env vars are set', () => {
|
||||
const model = createModel('anthropic/claude-sonnet-4-5') as unknown as Record<string, unknown>;
|
||||
expect(model.fetch).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should pass proxy-aware fetch when HTTPS_PROXY is set', () => {
|
||||
process.env.HTTPS_PROXY = 'http://proxy:8080';
|
||||
const model = createModel('anthropic/claude-sonnet-4-5') as unknown as Record<string, unknown>;
|
||||
expect(model.fetch).toBeInstanceOf(Function);
|
||||
expect(mockProxyAgent).toHaveBeenCalledWith('http://proxy:8080');
|
||||
});
|
||||
|
||||
it('should pass proxy-aware fetch when HTTP_PROXY is set', () => {
|
||||
process.env.HTTP_PROXY = 'http://proxy:9090';
|
||||
const model = createModel('openai/gpt-4o') as unknown as Record<string, unknown>;
|
||||
expect(model.fetch).toBeInstanceOf(Function);
|
||||
expect(mockProxyAgent).toHaveBeenCalledWith('http://proxy:9090');
|
||||
});
|
||||
|
||||
it('should prefer HTTPS_PROXY over HTTP_PROXY', () => {
|
||||
process.env.HTTPS_PROXY = 'http://https-proxy:8080';
|
||||
process.env.HTTP_PROXY = 'http://http-proxy:9090';
|
||||
createModel('anthropic/claude-sonnet-4-5');
|
||||
expect(mockProxyAgent).toHaveBeenCalledWith('http://https-proxy:8080');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
import type { EmbeddingModel, LanguageModel } from 'ai';
|
||||
import type * as Undici from 'undici';
|
||||
|
||||
import type { ModelConfig } from '../types/sdk/agent';
|
||||
|
||||
type FetchFn = typeof globalThis.fetch;
|
||||
type CreateProviderFn = (opts?: {
|
||||
apiKey?: string;
|
||||
baseURL?: string;
|
||||
fetch?: FetchFn;
|
||||
}) => (model: string) => LanguageModel;
|
||||
type CreateEmbeddingProviderFn = (opts?: { apiKey?: string }) => {
|
||||
embeddingModel(model: string): EmbeddingModel;
|
||||
|
|
@ -15,6 +18,26 @@ function isLanguageModel(config: unknown): config is LanguageModel {
|
|||
return typeof config === 'object' && config !== null && 'doGenerate' in config;
|
||||
}
|
||||
|
||||
/**
|
||||
* When HTTP_PROXY / HTTPS_PROXY is set (e.g. in e2e tests with MockServer),
|
||||
* return a fetch function that routes requests through the proxy. The default
|
||||
* globalThis.fetch in Node ≥18 does NOT respect these env vars, so AI SDK
|
||||
* providers would bypass the proxy without this.
|
||||
*/
|
||||
function getProxyFetch(): FetchFn | undefined {
|
||||
const proxyUrl = process.env.HTTPS_PROXY ?? process.env.HTTP_PROXY;
|
||||
if (!proxyUrl) return undefined;
|
||||
|
||||
const { ProxyAgent } = require('undici') as typeof Undici;
|
||||
const dispatcher = new ProxyAgent(proxyUrl);
|
||||
return (async (url, init) =>
|
||||
await globalThis.fetch(url, {
|
||||
...init,
|
||||
// @ts-expect-error dispatcher is a valid undici option for Node.js fetch
|
||||
dispatcher,
|
||||
})) as FetchFn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provider packages are loaded dynamically via require() so only the
|
||||
* provider needed at runtime must be installed.
|
||||
|
|
@ -40,31 +63,32 @@ export function createModel(config: ModelConfig): LanguageModel {
|
|||
|
||||
const [provider, ...rest] = modelId.split('/');
|
||||
const modelName = rest.join('/');
|
||||
const fetch = getProxyFetch();
|
||||
|
||||
switch (provider) {
|
||||
case 'anthropic': {
|
||||
const { createAnthropic } = require('@ai-sdk/anthropic') as {
|
||||
createAnthropic: CreateProviderFn;
|
||||
};
|
||||
return createAnthropic({ apiKey, baseURL })(modelName);
|
||||
return createAnthropic({ apiKey, baseURL, fetch })(modelName);
|
||||
}
|
||||
case 'openai': {
|
||||
const { createOpenAI } = require('@ai-sdk/openai') as {
|
||||
createOpenAI: CreateProviderFn;
|
||||
};
|
||||
return createOpenAI({ apiKey, baseURL })(modelName);
|
||||
return createOpenAI({ apiKey, baseURL, fetch })(modelName);
|
||||
}
|
||||
case 'google': {
|
||||
const { createGoogleGenerativeAI } = require('@ai-sdk/google') as {
|
||||
createGoogleGenerativeAI: CreateProviderFn;
|
||||
};
|
||||
return createGoogleGenerativeAI({ apiKey, baseURL })(modelName);
|
||||
return createGoogleGenerativeAI({ apiKey, baseURL, fetch })(modelName);
|
||||
}
|
||||
case 'xai': {
|
||||
const { createXai } = require('@ai-sdk/xai') as {
|
||||
createXai: CreateProviderFn;
|
||||
};
|
||||
return createXai({ apiKey, baseURL })(modelName);
|
||||
return createXai({ apiKey, baseURL, fetch })(modelName);
|
||||
}
|
||||
default:
|
||||
throw new Error(
|
||||
|
|
|
|||
397
packages/@n8n/instance-ai/docs/e2e-tests.md
Normal file
397
packages/@n8n/instance-ai/docs/e2e-tests.md
Normal file
|
|
@ -0,0 +1,397 @@
|
|||
# Instance AI E2E Tests
|
||||
|
||||
End-to-end tests for the Instance AI feature, using recorded LLM responses replayed through a MockServer proxy. Tests run without an API key in CI while producing real database state for full frontend verification.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Architecture Overview](#architecture-overview)
|
||||
- [How Recording Works](#how-recording-works)
|
||||
- [How Replay Works](#how-replay-works)
|
||||
- [The ID Problem and Tool Wrapping](#the-id-problem-and-tool-wrapping)
|
||||
- [Two-Tier Tool Strategy](#two-tier-tool-strategy)
|
||||
- [Trace Format](#trace-format)
|
||||
- [Proxy Expectations](#proxy-expectations)
|
||||
- [Test Infrastructure](#test-infrastructure)
|
||||
- [Running Tests](#running-tests)
|
||||
- [Re-Recording Tests](#re-recording-tests)
|
||||
- [Robustness and Maintenance](#robustness-and-maintenance)
|
||||
- [Adding New Tests](#adding-new-tests)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
Instance AI tests exercise a multi-agent LLM system that builds and executes n8n workflows. Each test sends a chat message, the LLM orchestrates tool calls (build-workflow, run-workflow, etc.), and the test asserts on the resulting UI state.
|
||||
|
||||
The challenge: LLM API calls are expensive, non-deterministic, and unavailable in CI. The solution is a record/replay architecture with two layers:
|
||||
|
||||
```
|
||||
Recording (local dev) Replay (CI)
|
||||
===================== ===========
|
||||
|
||||
LLM calls → Real Anthropic API → MockServer returns
|
||||
(proxied + recorded) recorded responses
|
||||
|
||||
Tool execution → Real execution → Real execution
|
||||
(input/output → trace.jsonl) with ID remapping
|
||||
|
||||
Frontend → Real DB state → Real DB state
|
||||
(preview iframe works) (preview iframe works)
|
||||
```
|
||||
|
||||
### Why Not Pure Mocking?
|
||||
|
||||
The Instance AI frontend loads workflow previews via an iframe that fetches real workflow data from the n8n API. If tools are fully mocked, the database has no workflows, and the preview shows nothing. By executing tools for real during replay, the database contains actual workflows, executions, and credentials that the frontend can render.
|
||||
|
||||
## How Recording Works
|
||||
|
||||
When running locally with a real `ANTHROPIC_API_KEY`:
|
||||
|
||||
1. **Proxy captures LLM traffic**: All HTTP from the n8n container routes through a MockServer proxy (`HTTP_PROXY`/`HTTPS_PROXY`). Anthropic API calls (`POST /v1/messages`) are intercepted and recorded.
|
||||
|
||||
2. **Tool calls are traced**: Every tool invocation is recorded to a `TraceWriter` with the tool name, agent role, input, and output. Suspend/resume events (human-in-the-loop approvals) are recorded separately.
|
||||
|
||||
3. **Fixture teardown saves both artifacts**:
|
||||
- Proxy expectations → individual JSON files per HTTP exchange
|
||||
- Tool trace → `trace.jsonl` (one JSON object per line)
|
||||
|
||||
Both are saved under `expectations/instance-ai/<test-slug>/`.
|
||||
|
||||
## How Replay Works
|
||||
|
||||
In CI (no API key):
|
||||
|
||||
1. **Fixture setup loads artifacts**: The `instanceAiProxySetup` auto-fixture reads proxy expectations and trace events from disk, uploads them to MockServer and the n8n container respectively.
|
||||
|
||||
2. **LLM calls hit MockServer**: The proxy returns pre-recorded responses in sequence. Each expectation fires once (`remainingTimes: 1`), except the last `/v1/messages` expectation which is unlimited (fallback for any extra calls).
|
||||
|
||||
3. **Tools execute for real with ID remapping**: When the LLM response triggers a tool call, the tool runs against the real database. But IDs from the recorded session won't match the current run's IDs. The `IdRemapper` translates between them.
|
||||
|
||||
4. **Frontend works normally**: Since tools produced real DB state with real IDs, the workflow preview iframe loads actual workflows.
|
||||
|
||||
## The ID Problem and Tool Wrapping
|
||||
|
||||
This is the core challenge that motivated the trace replay infrastructure.
|
||||
|
||||
### The Problem
|
||||
|
||||
Consider a test that builds and runs a workflow:
|
||||
|
||||
```
|
||||
Recording session:
|
||||
build-workflow → { workflowId: "5" }
|
||||
run-workflow({ workflowId: "5" }) → { executionId: "exec-100" }
|
||||
|
||||
Replay session:
|
||||
build-workflow → { workflowId: "12" } ← different auto-increment ID
|
||||
run-workflow({ workflowId: "5" }) → ERROR ← LLM still says "5" (from recorded response)
|
||||
```
|
||||
|
||||
The LLM response is pre-recorded and contains the old `workflowId: "5"`. But in the replay session, `build-workflow` created workflow `"12"`. When the LLM tells the agent to run workflow `"5"`, it doesn't exist.
|
||||
|
||||
### The Solution: IdRemapper
|
||||
|
||||
The `IdRemapper` maintains a bidirectional mapping of old IDs to new IDs, learned incrementally as tools execute:
|
||||
|
||||
```
|
||||
1. build-workflow executes → output: { workflowId: "12" }
|
||||
2. IdRemapper compares recorded output { workflowId: "5" } with real output { workflowId: "12" }
|
||||
3. Learns mapping: "5" → "12"
|
||||
4. Next tool call: run-workflow({ workflowId: "5" })
|
||||
5. IdRemapper translates input: run-workflow({ workflowId: "12" })
|
||||
6. Tool executes successfully with the real ID
|
||||
```
|
||||
|
||||
ID extraction is **field-name aware** — only fields named `id` or ending with `Id` (e.g., `workflowId`, `executionId`, `credentialId`) are compared. This prevents false mappings from unrelated data like execution output, web content, or file blobs.
|
||||
|
||||
### Why the Proxy Can Ignore Request Bodies
|
||||
|
||||
During recording, the fixture's `transform` callback strips LLM request bodies down to an 80-character system prompt substring. This means MockServer matches requests by path and prompt prefix only, not by the full body. Since tool results flow into LLM request bodies (as tool_result content blocks), and those results now contain different IDs, the proxy would fail to match if it compared full bodies. By ignoring bodies, the proxy stays deterministic regardless of tool output content.
|
||||
|
||||
### Shared State Across Runs
|
||||
|
||||
A single test may trigger multiple n8n "runs" — the orchestrator run, a background task follow-up, or a delegated sub-agent. The `TraceIndex` and `IdRemapper` are shared across all runs within one test (keyed by the test slug), so cursor positions and ID mappings persist correctly.
|
||||
|
||||
## Two-Tier Tool Strategy
|
||||
|
||||
Tools are categorized by whether they can execute in CI:
|
||||
|
||||
### Tier 1: Real Execution + ID Remapping (default)
|
||||
|
||||
Tools that only need the n8n database and engine. They execute for real, and the `IdRemapper` translates IDs in both directions.
|
||||
|
||||
| Tool | Why Real Execution |
|
||||
|------|-------------------|
|
||||
| `build-workflow` | Creates real workflow in DB for preview |
|
||||
| `run-workflow` | Creates real execution for status display |
|
||||
| `setup-workflow` | Configures workflow nodes |
|
||||
| `search-nodes` | Queries node catalog (local) |
|
||||
| `get-execution` | Reads execution results |
|
||||
| Credential tools | Creates real credentials |
|
||||
| Data table tools | Creates real data tables |
|
||||
| `ask-user` | May contain IDs in response |
|
||||
|
||||
The wrapping flow:
|
||||
|
||||
```typescript
|
||||
// Simplified — see langsmith-tracing.ts for full implementation
|
||||
async execute(input, context) {
|
||||
const event = traceIndex.next(agentRole, toolName); // Get recorded event
|
||||
const remappedInput = idRemapper.remapInput(input); // Translate old IDs → new
|
||||
const realOutput = await tool.execute(remappedInput); // Execute for real
|
||||
idRemapper.learn(event.output, realOutput); // Discover new mappings
|
||||
return realOutput; // Return real output
|
||||
}
|
||||
```
|
||||
|
||||
### Tier 2: Pure Replay (external dependency tools)
|
||||
|
||||
Tools that need internet access or external services. They skip real execution entirely and return the recorded output (with ID remapping applied).
|
||||
|
||||
| Tool | Why Pure Replay |
|
||||
|------|----------------|
|
||||
| `web-search` | No internet in CI |
|
||||
| `fetch-url` | No internet in CI |
|
||||
| `test-credential` | Needs external service |
|
||||
|
||||
The wrapping flow:
|
||||
|
||||
```typescript
|
||||
async execute(input, context) {
|
||||
const event = traceIndex.next(agentRole, toolName); // Validate tool sequence
|
||||
return idRemapper.remapOutput(event.output); // Return recorded output
|
||||
}
|
||||
```
|
||||
|
||||
### Not Wrapped
|
||||
|
||||
Some tools pass through without wrapping:
|
||||
|
||||
| Tool | Why |
|
||||
|------|-----|
|
||||
| `plan` | Pure text orchestration, no IDs |
|
||||
| `delegate` | Must spawn real sub-agent (which gets its own wrapping) |
|
||||
| `update-tasks` | Orchestration bookkeeping |
|
||||
|
||||
## Trace Format
|
||||
|
||||
Each test's tool calls are recorded in `trace.jsonl` (newline-delimited JSON):
|
||||
|
||||
```jsonl
|
||||
{"kind":"header","version":1,"testName":"should-approve-workflow-execution","recordedAt":"2026-04-09T12:00:00Z"}
|
||||
{"stepId":1,"kind":"tool-call","agentRole":"orchestrator","toolName":"search-nodes","input":{...},"output":{...}}
|
||||
{"stepId":2,"kind":"tool-call","agentRole":"workflow-builder","toolName":"build-workflow","input":{...},"output":{"workflowId":"5"}}
|
||||
{"stepId":3,"kind":"tool-suspend","agentRole":"orchestrator","toolName":"run-workflow","input":{"workflowId":"5"},"output":{"denied":true},"suspendPayload":{...}}
|
||||
{"stepId":4,"kind":"tool-resume","agentRole":"orchestrator","toolName":"run-workflow","input":{"workflowId":"5"},"output":{"executionId":"exec-100"}}
|
||||
```
|
||||
|
||||
### Event Types
|
||||
|
||||
- **`header`** — metadata (version, test name, timestamp)
|
||||
- **`tool-call`** — normal tool invocation with input and output
|
||||
- **`tool-suspend`** — human-in-the-loop tool paused for approval (includes suspend payload)
|
||||
- **`tool-resume`** — tool resumed after user approval/denial (includes resume data)
|
||||
|
||||
### TraceIndex
|
||||
|
||||
The `TraceIndex` groups events by `agentRole` with independent cursors per role. This handles interleaved orchestrator and sub-agent calls:
|
||||
|
||||
```
|
||||
orchestrator: [search-nodes, run-workflow-suspend, run-workflow-resume]
|
||||
^cursor=0
|
||||
workflow-builder: [build-workflow]
|
||||
^cursor=0
|
||||
```
|
||||
|
||||
When a tool is called, `traceIndex.next(role, toolName)` advances that role's cursor and validates the tool name matches. A mismatch means the agent diverged from the recorded path — the test fails with a clear error.
|
||||
|
||||
## Proxy Expectations
|
||||
|
||||
Each test's HTTP exchanges are stored as individual JSON files:
|
||||
|
||||
```
|
||||
expectations/instance-ai/should-send-message-and-receive-assistant-response/
|
||||
1775805992870-unknown-host-POST-_v1_messages-8a23f6c2.json ← Anthropic API call
|
||||
1775805993100-api-staging.n8n.io-GET-_api_community_nodes-272f77d5.json ← Node catalog
|
||||
trace.jsonl ← Tool trace
|
||||
```
|
||||
|
||||
### File Naming
|
||||
|
||||
`<timestamp>-<host>-<method>-<path_slugified>-<8char_sha256>.json`
|
||||
|
||||
- `unknown-host` = Anthropic API (CONNECT tunneling hides the real host)
|
||||
- `api-staging.n8n.io` = n8n community nodes API
|
||||
|
||||
### Sequential Loading
|
||||
|
||||
Expectations are loaded with `sequential: true`, which sets `remainingTimes: 1` on each. They fire in order, one-shot. The last `/v1/messages` expectation is made `unlimited: true` to act as a fallback for any extra LLM calls caused by tool execution divergence.
|
||||
|
||||
### Request Body Matching
|
||||
|
||||
LLM request bodies are replaced during recording with an 80-character substring of the system prompt. This is enough to distinguish between different types of calls (title generation vs. orchestrator vs. sub-agent) without being so specific that minor prompt changes break replay.
|
||||
|
||||
## Test Infrastructure
|
||||
|
||||
### Key Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `packages/testing/playwright/tests/e2e/instance-ai/fixtures.ts` | Test fixtures — proxy setup, recording/replay orchestration |
|
||||
| `packages/@n8n/instance-ai/src/tracing/trace-replay.ts` | `TraceIndex`, `IdRemapper`, `TraceWriter`, JSONL parsing |
|
||||
| `packages/@n8n/instance-ai/src/tracing/langsmith-tracing.ts` | Tool wrapping — `replayWrapTools`, `recordWrapTools` |
|
||||
| `packages/@n8n/instance-ai/src/tracing/types.ts` | `InstanceAiTraceContext`, `TraceReplayMode` |
|
||||
| `packages/cli/src/modules/instance-ai/instance-ai.service.ts` | Trace mode initialization, shared state management |
|
||||
| `packages/cli/src/modules/instance-ai/instance-ai.controller.ts` | Test-only REST endpoints for trace delivery |
|
||||
| `packages/testing/containers/services/proxy.ts` | `ProxyServer` class (MockServer client) |
|
||||
|
||||
### Test-Only Endpoints
|
||||
|
||||
Enabled by `E2E_TESTS=true` (set automatically by the Playwright fixture base):
|
||||
|
||||
| Endpoint | Purpose |
|
||||
|----------|---------|
|
||||
| `POST /rest/instance-ai/test/tool-trace` | Load trace events into n8n memory |
|
||||
| `GET /rest/instance-ai/test/tool-trace/:slug` | Retrieve recorded events |
|
||||
| `DELETE /rest/instance-ai/test/tool-trace/:slug` | Clear between tests |
|
||||
| `POST /rest/instance-ai/test/drain-background-tasks` | Cancel leftover background tasks |
|
||||
|
||||
### Page Objects
|
||||
|
||||
- **`InstanceAiPage`** — chat input, send button, message selectors, preview iframe, artifact cards, confirmation panels
|
||||
- **`InstanceAiSidebar`** — thread list, new thread button, thread-by-title lookup, rename input, action menu
|
||||
|
||||
### Test Suites
|
||||
|
||||
| Spec File | Tests | What's Covered |
|
||||
|-----------|-------|----------------|
|
||||
| `instance-ai-chat-basics.spec.ts` | 4 | Empty state, send/receive, message timeline, persistence across reload |
|
||||
| `instance-ai-sidebar.spec.ts` | 4 | Create thread, switch threads, rename, delete |
|
||||
| `instance-ai-artifacts.spec.ts` | 2 | Artifact card display, click-to-open preview |
|
||||
| `instance-ai-timeline.spec.ts` | 1 | Artifact cards after workflow build |
|
||||
| `instance-ai-workflow-preview.spec.ts` | 3 | Auto-open preview, canvas nodes, close button |
|
||||
| `instance-ai-confirmations.spec.ts` | 2 | Approve/deny workflow execution |
|
||||
|
||||
## Running Tests
|
||||
|
||||
### Replay Mode (CI / no API key)
|
||||
|
||||
```bash
|
||||
pnpm build:docker
|
||||
pnpm --filter=n8n-playwright test:container:sqlite --grep "Instance AI"
|
||||
```
|
||||
|
||||
### Record Mode (local with real API key)
|
||||
|
||||
```bash
|
||||
ANTHROPIC_API_KEY=sk-... pnpm --filter=n8n-playwright test:container:sqlite --grep "Instance AI"
|
||||
```
|
||||
|
||||
This overwrites `expectations/instance-ai/<test-slug>/` with fresh recordings.
|
||||
|
||||
## Re-Recording Tests
|
||||
|
||||
When Instance AI prompts, tools, or behavior change, recordings may need updating:
|
||||
|
||||
1. Ensure you have a valid `ANTHROPIC_API_KEY`
|
||||
2. Run the specific test(s) to re-record:
|
||||
```bash
|
||||
ANTHROPIC_API_KEY=sk-... pnpm --filter=n8n-playwright test:container:sqlite \
|
||||
--grep "should send message and receive assistant response"
|
||||
```
|
||||
3. Verify the new recordings replay correctly (without the API key):
|
||||
```bash
|
||||
pnpm --filter=n8n-playwright test:container:sqlite \
|
||||
--grep "should send message and receive assistant response"
|
||||
```
|
||||
4. Commit the updated expectation files and trace.jsonl
|
||||
|
||||
## Robustness and Maintenance
|
||||
|
||||
This section explains what the replay system is resilient to, what breaks it, and how to keep tests stable as Instance AI evolves.
|
||||
|
||||
### What Does NOT Require Re-Recording
|
||||
|
||||
The architecture is deliberately tolerant of many common changes:
|
||||
|
||||
| Change | Why It's Safe |
|
||||
|--------|---------------|
|
||||
| **Prompt wording changes** (within the same 80-char prefix) | Proxy matches on an 80-character substring of the system prompt, not the full text. Minor rewording that doesn't alter this prefix passes through unchanged. |
|
||||
| **Tool output differences** (new fields, different execution data) | Proxy ignores request bodies entirely — tool results flow into LLM request bodies as `tool_result` blocks, but the proxy matches by path and prompt prefix only. The `IdRemapper` compares by field path, so extra fields are ignored. |
|
||||
| **Database auto-increment IDs** | This is the core problem the `IdRemapper` solves. IDs like `workflowId`, `executionId`, `credentialId` are automatically remapped between the recorded session and the current run. |
|
||||
| **Frontend component changes** | Tests assert on data-testid attributes and semantic content, not CSS or layout. Frontend refactors that preserve test IDs don't affect recordings. |
|
||||
| **Node catalog changes** (new community nodes, updated descriptions) | Community node API expectations have been removed — the proxy doesn't replay these. Only Anthropic API calls are replayed. |
|
||||
| **New optional tool input fields** (with defaults) | The frozen LLM response won't include the new field, but the tool executes fine because it has a default value. Neither the proxy nor the `TraceIndex` validate input shape. |
|
||||
| **New tool output fields** | The `IdRemapper` compares recorded vs actual output by field path. Extra fields in the actual output are simply ignored — no false mappings are created. |
|
||||
| **Unrelated tool additions** | Adding tools that aren't called by existing test scenarios has no effect — the `TraceIndex` only validates tools the agent actually calls. |
|
||||
|
||||
### What DOES Require Re-Recording
|
||||
|
||||
LLM responses are frozen — the replay serves the exact same bytes regardless of runtime changes. These changes break replay because the runtime can no longer correctly execute what the frozen responses instruct:
|
||||
|
||||
| Change | Why It Breaks | Detection |
|
||||
|--------|---------------|-----------|
|
||||
| **System prompt changes** (different 80-char prefix) | The proxy's body matcher uses an 80-character substring of the system prompt. If this prefix changes, MockServer can't match the request to a recorded response and returns a 404. | Test fails with HTTP error from proxy or empty LLM response. |
|
||||
| **Tool schema changes** (renamed fields, changed types, new required inputs) | Recorded tool inputs/outputs have the old shape. Renamed ID fields (e.g. `workflowId` → `wfId`) break `IdRemapper` path matching. New **required** input fields break because the frozen LLM response can't provide them — tool Zod validation rejects the input. New **optional** input fields (with defaults) are safe — the tool executes fine without them. | Renamed IDs: `IdRemapper` fails to learn mappings → "workflow not found". New required fields: Zod validation error in tool execute. |
|
||||
| **Tool removal or renaming** | The frozen LLM response still references the old tool name. If the agent runtime can't find the tool to dispatch to, the call fails. The `TraceIndex` also expects the old name and would report a mismatch if a different tool executes in its place. | Tool dispatch error or "Tool mismatch at step N" from `TraceIndex.next()`. |
|
||||
| **Agent orchestration code changes** (tool distribution, delegation routing) | The recorded LLM responses are fixed, but the code that *acts on* them can change. For example, if a tool moves from the orchestrator to a sub-agent, or `delegate` now routes to a different role, the per-role trace cursors diverge because tools execute under different `agentRole` keys than the recording expects. | "Trace exhausted for role X" or tool mismatch. |
|
||||
|
||||
### Design Decisions That Maximize Robustness
|
||||
|
||||
1. **80-character prompt prefix matching** — Long enough to distinguish between call types (title generation vs. orchestrator vs. sub-agent) but short enough that minor prompt edits don't break replay. The prefix is extracted during recording by the fixture's `transform` callback.
|
||||
|
||||
2. **Field-name-aware ID extraction** — The `IdRemapper` only compares fields named `id` or ending with `Id` (e.g., `workflowId`, `executionId`). This prevents false mappings from execution output data, web content, or other string fields that happen to differ between runs.
|
||||
|
||||
3. **Per-role trace cursors** — The `TraceIndex` groups events by `agentRole` with independent cursors. This handles interleaved orchestrator and sub-agent calls naturally, without requiring a single global sequence that breaks when parallelism changes.
|
||||
|
||||
4. **Shared state across runs** — The `TraceIndex` and `IdRemapper` are shared across all runs within one test (orchestrator run, background task follow-up, delegated sub-agent). This means a workflowId learned in run 1 is available for remapping in run 2.
|
||||
|
||||
5. **Request body stripping** — During recording, LLM request bodies are replaced with just the prompt prefix. This means the recorded expectations don't encode tool results, conversation history, or any other dynamic content. Replay stays deterministic regardless of what tools return.
|
||||
|
||||
### Keeping Tests Stable
|
||||
|
||||
- **Prefer small, focused test scenarios.** A test that sends "build a workflow that sends an email" exercises fewer tools than "build a workflow, run it, debug the failure, and fix it". Fewer tools = fewer points of divergence.
|
||||
- **Re-record the specific test that broke**, not all tests. Each test has independent recordings.
|
||||
- **After re-recording, always verify replay** by running without the API key. A successful recording doesn't guarantee a successful replay — the `IdRemapper` needs to learn the right mappings.
|
||||
- **When changing prompts**, check if the first 80 characters of the system prompt changed. If they did, all tests using that agent type need re-recording.
|
||||
|
||||
## Adding New Tests
|
||||
|
||||
1. **Write the spec** in `tests/e2e/instance-ai/` using the existing fixtures:
|
||||
```typescript
|
||||
import { test, expect, instanceAiTestConfig } from './fixtures';
|
||||
test.use(instanceAiTestConfig);
|
||||
```
|
||||
|
||||
2. **Record** by running with `ANTHROPIC_API_KEY`. The fixture automatically saves proxy expectations and trace.jsonl.
|
||||
|
||||
3. **Verify replay** by running without the key.
|
||||
|
||||
4. **Classify any new tools**: If the test exercises tools that need external services, add them to `PURE_REPLAY_TOOLS` in `trace-replay.ts`.
|
||||
|
||||
5. **Use identity-based assertions** for thread lookups — `getThreadByTitle()` instead of positional selectors like `.last()`. Tests run in parallel and share containers; positional selectors break when other tests create threads.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "Trace exhausted for role X"
|
||||
|
||||
The agent made more tool calls than were recorded. The LLM response diverged, possibly due to a prompt change. Re-record the test.
|
||||
|
||||
### "Tool mismatch at step N"
|
||||
|
||||
The agent called a different tool than expected at this point in the sequence. The agent took a different path than the recording. Re-record the test.
|
||||
|
||||
### ECONNRESET from MockServer
|
||||
|
||||
Transient error when multiple parallel workers load expectations simultaneously. The `ProxyServer.withRetry()` handles this with exponential backoff (3 retries, 500ms/1s/2s). If persistent, check MockServer container health.
|
||||
|
||||
### Missing expectations directory
|
||||
|
||||
Tests without recorded proxy expectations (e.g., "should display empty state") have no expectations folder. The `loadExpectations` method handles `ENOENT` gracefully by skipping.
|
||||
|
||||
### Thread assertions failing in parallel
|
||||
|
||||
If using `.last()`, `.first()`, or count-based assertions on sidebar threads, they will be flaky when tests run in parallel. Always use `getThreadByTitle()` with the LLM-generated title from the recording.
|
||||
|
||||
### Preview iframe not loading
|
||||
|
||||
If Tier 1 tools aren't creating real DB state, the preview iframe will show nothing. Check that the `IdRemapper` is learning mappings correctly — look for `workflowId` in the trace.jsonl and verify the tool is executing (not pure-replaying).
|
||||
|
|
@ -48,7 +48,8 @@
|
|||
"@ai-sdk/provider-v5": "npm:@ai-sdk/provider@2.0.0",
|
||||
"zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5",
|
||||
"@n8n/agents": "workspace:*",
|
||||
"flatted": "catalog:"
|
||||
"flatted": "catalog:",
|
||||
"n8n-workflow": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ai-sdk/anthropic": "2.0.61",
|
||||
|
|
|
|||
|
|
@ -6,10 +6,25 @@ export { createDomainAccessTracker } from './domain-access';
|
|||
export type { DomainAccessTracker } from './domain-access';
|
||||
export {
|
||||
createInstanceAiTraceContext,
|
||||
createTraceReplayOnlyContext,
|
||||
continueInstanceAiTraceContext,
|
||||
releaseTraceClient,
|
||||
withCurrentTraceSpan,
|
||||
} from './tracing/langsmith-tracing';
|
||||
export {
|
||||
IdRemapper,
|
||||
TraceIndex,
|
||||
TraceWriter,
|
||||
parseTraceJsonl,
|
||||
PURE_REPLAY_TOOLS,
|
||||
} from './tracing/trace-replay';
|
||||
export type {
|
||||
TraceEvent,
|
||||
TraceHeader,
|
||||
TraceToolCall,
|
||||
TraceToolSuspend,
|
||||
TraceToolResume,
|
||||
} from './tracing/trace-replay';
|
||||
export { createInstanceAgent } from './agent/instance-agent';
|
||||
export { createAllTools, createOrchestrationTools } from './tools';
|
||||
export { startBuildWorkflowAgentTask } from './tools/orchestration/build-workflow-agent.tool';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,464 @@
|
|||
import { jsonParse } from 'n8n-workflow';
|
||||
|
||||
import { IdRemapper, TraceIndex, TraceWriter, parseTraceJsonl } from '../trace-replay';
|
||||
import type { TraceToolCall, TraceToolSuspend, TraceToolResume, TraceEvent } from '../trace-replay';
|
||||
|
||||
// ── IdRemapper ──────────────────────────────────────────────────────────────
|
||||
|
||||
describe('IdRemapper', () => {
|
||||
describe('learn', () => {
|
||||
it('should learn string ID mappings from matching paths', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn(
|
||||
{ workflowId: 'old-wf-1', name: 'Test' },
|
||||
{ workflowId: 'new-wf-9', name: 'Test' },
|
||||
);
|
||||
|
||||
expect(remapper.remapInput({ workflowId: 'old-wf-1' })).toEqual({
|
||||
workflowId: 'new-wf-9',
|
||||
});
|
||||
});
|
||||
|
||||
it('should learn numeric ID mappings', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ id: 5 }, { id: 12 });
|
||||
|
||||
expect(remapper.remapInput({ workflowId: '5' })).toEqual({ workflowId: '12' });
|
||||
});
|
||||
|
||||
it('should learn IDs nested in objects', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn(
|
||||
{ result: { workflowId: 'old-1', nested: { credentialId: 'cred-1' } } },
|
||||
{ result: { workflowId: 'new-1', nested: { credentialId: 'cred-9' } } },
|
||||
);
|
||||
|
||||
expect(remapper.remapInput({ workflowId: 'old-1', credentialId: 'cred-1' })).toEqual({
|
||||
workflowId: 'new-1',
|
||||
credentialId: 'cred-9',
|
||||
});
|
||||
});
|
||||
|
||||
it('should learn IDs nested in arrays', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn(
|
||||
{ items: [{ workflowId: 'a' }, { workflowId: 'b' }] },
|
||||
{ items: [{ workflowId: 'x' }, { workflowId: 'y' }] },
|
||||
);
|
||||
|
||||
expect(remapper.remapInput({ workflowId: 'a' })).toEqual({ workflowId: 'x' });
|
||||
expect(remapper.remapInput({ workflowId: 'b' })).toEqual({ workflowId: 'y' });
|
||||
});
|
||||
|
||||
it('should ignore non-ID fields that differ', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn(
|
||||
{ workflowId: 'old-1', name: 'Recording Name', status: 'success' },
|
||||
{ workflowId: 'new-1', name: 'Different Name', status: 'error' },
|
||||
);
|
||||
|
||||
// Only workflowId should be mapped, not name or status
|
||||
expect(remapper.remapInput({ name: 'Recording Name' })).toEqual({
|
||||
name: 'Recording Name',
|
||||
});
|
||||
});
|
||||
|
||||
it('should not create mapping when values are equal', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'same' }, { workflowId: 'same' });
|
||||
|
||||
expect(remapper.remapInput({ workflowId: 'same' })).toEqual({ workflowId: 'same' });
|
||||
});
|
||||
|
||||
it('should accumulate mappings across multiple learn calls', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'wf-old' }, { workflowId: 'wf-new' });
|
||||
remapper.learn({ executionId: 'ex-old' }, { executionId: 'ex-new' });
|
||||
|
||||
expect(remapper.remapInput({ workflowId: 'wf-old', executionId: 'ex-old' })).toEqual({
|
||||
workflowId: 'wf-new',
|
||||
executionId: 'ex-new',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('remapInput', () => {
|
||||
it('should replace IDs in string values', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'abc' }, { workflowId: 'xyz' });
|
||||
|
||||
expect(remapper.remapInput({ workflowId: 'abc' })).toEqual({ workflowId: 'xyz' });
|
||||
});
|
||||
|
||||
it('should replace IDs embedded in larger strings', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'wf-5' }, { workflowId: 'wf-12' });
|
||||
|
||||
expect(remapper.remapInput({ url: '/workflows/wf-5/edit' })).toEqual({
|
||||
url: '/workflows/wf-12/edit',
|
||||
});
|
||||
});
|
||||
|
||||
it('should replace numeric IDs', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ id: 5 }, { id: 12 });
|
||||
|
||||
expect(remapper.remapInput({ workflowId: 5 })).toEqual({ workflowId: 12 });
|
||||
});
|
||||
|
||||
it('should handle deeply nested input', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'old' }, { workflowId: 'new' });
|
||||
|
||||
expect(remapper.remapInput({ a: { b: { c: 'old' } } })).toEqual({
|
||||
a: { b: { c: 'new' } },
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle arrays in input', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'old' }, { workflowId: 'new' });
|
||||
|
||||
expect(remapper.remapInput({ ids: ['old', 'other'] })).toEqual({
|
||||
ids: ['new', 'other'],
|
||||
});
|
||||
});
|
||||
|
||||
it('should return input unchanged when no mappings exist', () => {
|
||||
const remapper = new IdRemapper();
|
||||
const input = { workflowId: 'abc', data: [1, 2, 3] };
|
||||
|
||||
expect(remapper.remapInput(input)).toEqual(input);
|
||||
});
|
||||
|
||||
it('should not mutate the original input', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'old' }, { workflowId: 'new' });
|
||||
|
||||
const input = { workflowId: 'old' };
|
||||
remapper.remapInput(input);
|
||||
|
||||
expect(input.workflowId).toBe('old');
|
||||
});
|
||||
|
||||
it('should handle null and undefined values', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'old' }, { workflowId: 'new' });
|
||||
|
||||
expect(remapper.remapInput(null)).toBeNull();
|
||||
expect(remapper.remapInput(undefined)).toBeUndefined();
|
||||
expect(remapper.remapInput({ a: null, b: undefined })).toEqual({
|
||||
a: null,
|
||||
b: undefined,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('remapOutput', () => {
|
||||
it('should remap IDs in recorded output to current-run IDs', () => {
|
||||
const remapper = new IdRemapper();
|
||||
remapper.learn({ workflowId: 'old' }, { workflowId: 'new' });
|
||||
|
||||
expect(remapper.remapOutput({ workflowId: 'old', data: 'stuff' })).toEqual({
|
||||
workflowId: 'new',
|
||||
data: 'stuff',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// ── TraceIndex ──────────────────────────────────────────────────────────────
|
||||
|
||||
describe('TraceIndex', () => {
|
||||
const makeToolCall = (stepId: number, agentRole: string, toolName: string): TraceToolCall => ({
|
||||
kind: 'tool-call',
|
||||
stepId,
|
||||
agentRole,
|
||||
toolName,
|
||||
input: {},
|
||||
output: {},
|
||||
});
|
||||
|
||||
const makeSuspend = (stepId: number, agentRole: string, toolName: string): TraceToolSuspend => ({
|
||||
kind: 'tool-suspend',
|
||||
stepId,
|
||||
agentRole,
|
||||
toolName,
|
||||
input: {},
|
||||
output: {},
|
||||
suspendPayload: {},
|
||||
});
|
||||
|
||||
const makeResume = (stepId: number, agentRole: string, toolName: string): TraceToolResume => ({
|
||||
kind: 'tool-resume',
|
||||
stepId,
|
||||
agentRole,
|
||||
toolName,
|
||||
input: {},
|
||||
output: {},
|
||||
resumeData: {},
|
||||
});
|
||||
|
||||
it('should advance cursor per agent role', () => {
|
||||
const events: TraceEvent[] = [
|
||||
{ kind: 'header', version: 1, testName: 'test', recordedAt: '' },
|
||||
makeToolCall(1, 'orchestrator', 'search-nodes'),
|
||||
makeToolCall(2, 'workflow-builder', 'build-workflow'),
|
||||
makeToolCall(3, 'orchestrator', 'run-workflow'),
|
||||
];
|
||||
|
||||
const index = new TraceIndex(events);
|
||||
|
||||
const e1 = index.next('orchestrator', 'search-nodes');
|
||||
expect(e1.stepId).toBe(1);
|
||||
|
||||
const e2 = index.next('workflow-builder', 'build-workflow');
|
||||
expect(e2.stepId).toBe(2);
|
||||
|
||||
const e3 = index.next('orchestrator', 'run-workflow');
|
||||
expect(e3.stepId).toBe(3);
|
||||
});
|
||||
|
||||
it('should throw on tool name mismatch', () => {
|
||||
const events: TraceEvent[] = [makeToolCall(1, 'orchestrator', 'search-nodes')];
|
||||
|
||||
const index = new TraceIndex(events);
|
||||
|
||||
expect(() => index.next('orchestrator', 'wrong-tool')).toThrow(
|
||||
/Tool mismatch.*expected "wrong-tool".*trace has "search-nodes"/,
|
||||
);
|
||||
});
|
||||
|
||||
it('should throw when trace is exhausted', () => {
|
||||
const events: TraceEvent[] = [makeToolCall(1, 'orchestrator', 'search-nodes')];
|
||||
|
||||
const index = new TraceIndex(events);
|
||||
index.next('orchestrator', 'search-nodes');
|
||||
|
||||
expect(() => index.next('orchestrator', 'another-tool')).toThrow(
|
||||
/Trace exhausted for role "orchestrator"/,
|
||||
);
|
||||
});
|
||||
|
||||
it('should throw for unknown agent role', () => {
|
||||
const events: TraceEvent[] = [makeToolCall(1, 'orchestrator', 'search-nodes')];
|
||||
|
||||
const index = new TraceIndex(events);
|
||||
|
||||
expect(() => index.next('unknown-role', 'search-nodes')).toThrow(
|
||||
/Trace exhausted for role "unknown-role"/,
|
||||
);
|
||||
});
|
||||
|
||||
it('should handle interleaved orchestrator and sub-agent calls', () => {
|
||||
const events: TraceEvent[] = [
|
||||
makeToolCall(1, 'orchestrator', 'tool-a'),
|
||||
makeToolCall(2, 'builder', 'tool-b'),
|
||||
makeToolCall(3, 'builder', 'tool-c'),
|
||||
makeToolCall(4, 'orchestrator', 'tool-d'),
|
||||
makeToolCall(5, 'builder', 'tool-e'),
|
||||
];
|
||||
|
||||
const index = new TraceIndex(events);
|
||||
|
||||
expect(index.next('orchestrator', 'tool-a').stepId).toBe(1);
|
||||
expect(index.next('builder', 'tool-b').stepId).toBe(2);
|
||||
expect(index.next('builder', 'tool-c').stepId).toBe(3);
|
||||
expect(index.next('orchestrator', 'tool-d').stepId).toBe(4);
|
||||
expect(index.next('builder', 'tool-e').stepId).toBe(5);
|
||||
});
|
||||
|
||||
it('should handle suspend and resume events', () => {
|
||||
const events: TraceEvent[] = [
|
||||
makeToolCall(1, 'orchestrator', 'build-workflow'),
|
||||
makeSuspend(2, 'orchestrator', 'run-workflow'),
|
||||
makeResume(3, 'orchestrator', 'run-workflow'),
|
||||
];
|
||||
|
||||
const index = new TraceIndex(events);
|
||||
|
||||
expect(index.next('orchestrator', 'build-workflow').kind).toBe('tool-call');
|
||||
expect(index.next('orchestrator', 'run-workflow').kind).toBe('tool-suspend');
|
||||
expect(index.next('orchestrator', 'run-workflow').kind).toBe('tool-resume');
|
||||
});
|
||||
|
||||
it('should filter out header events', () => {
|
||||
const events: TraceEvent[] = [
|
||||
{ kind: 'header', version: 1, testName: 'test', recordedAt: '' },
|
||||
makeToolCall(1, 'orchestrator', 'search-nodes'),
|
||||
];
|
||||
|
||||
const index = new TraceIndex(events);
|
||||
const event = index.next('orchestrator', 'search-nodes');
|
||||
expect(event.stepId).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
// ── TraceWriter ──────────────────────────────────────────────────────────────
|
||||
|
||||
describe('TraceWriter', () => {
|
||||
it('should record a header event on construction', () => {
|
||||
const writer = new TraceWriter('my-test');
|
||||
const events = writer.getEvents();
|
||||
|
||||
expect(events).toHaveLength(1);
|
||||
expect(events[0].kind).toBe('header');
|
||||
const header = events[0] as TraceEvent & { kind: 'header' };
|
||||
expect(header.version).toBe(1);
|
||||
expect(header.testName).toBe('my-test');
|
||||
expect(header.recordedAt).toBeDefined();
|
||||
});
|
||||
|
||||
it('should record tool-call events with incrementing stepIds', () => {
|
||||
const writer = new TraceWriter('test');
|
||||
writer.recordToolCall('orchestrator', 'search-nodes', { q: 'http' }, { results: [] });
|
||||
writer.recordToolCall('builder', 'build-workflow', { nodes: [] }, { workflowId: '5' });
|
||||
|
||||
const events = writer.getEvents();
|
||||
expect(events).toHaveLength(3); // header + 2 tool-calls
|
||||
|
||||
const call1 = events[1] as TraceToolCall;
|
||||
expect(call1.kind).toBe('tool-call');
|
||||
expect(call1.stepId).toBe(1);
|
||||
expect(call1.agentRole).toBe('orchestrator');
|
||||
expect(call1.toolName).toBe('search-nodes');
|
||||
expect(call1.input).toEqual({ q: 'http' });
|
||||
expect(call1.output).toEqual({ results: [] });
|
||||
|
||||
const call2 = events[2] as TraceToolCall;
|
||||
expect(call2.stepId).toBe(2);
|
||||
expect(call2.agentRole).toBe('builder');
|
||||
expect(call2.toolName).toBe('build-workflow');
|
||||
});
|
||||
|
||||
it('should record tool-suspend events', () => {
|
||||
const writer = new TraceWriter('test');
|
||||
writer.recordToolSuspend(
|
||||
'orchestrator',
|
||||
'run-workflow',
|
||||
{ workflowId: '5' },
|
||||
{ denied: true },
|
||||
{ reason: 'needs approval' },
|
||||
);
|
||||
|
||||
const events = writer.getEvents();
|
||||
const suspend = events[1] as TraceToolSuspend;
|
||||
expect(suspend.kind).toBe('tool-suspend');
|
||||
expect(suspend.stepId).toBe(1);
|
||||
expect(suspend.suspendPayload).toEqual({ reason: 'needs approval' });
|
||||
});
|
||||
|
||||
it('should record tool-resume events', () => {
|
||||
const writer = new TraceWriter('test');
|
||||
writer.recordToolResume(
|
||||
'orchestrator',
|
||||
'run-workflow',
|
||||
{ workflowId: '5' },
|
||||
{ executionId: 'exec-1' },
|
||||
{ approved: true },
|
||||
);
|
||||
|
||||
const events = writer.getEvents();
|
||||
const resume = events[1] as TraceToolResume;
|
||||
expect(resume.kind).toBe('tool-resume');
|
||||
expect(resume.stepId).toBe(1);
|
||||
expect(resume.resumeData).toEqual({ approved: true });
|
||||
});
|
||||
|
||||
it('should return a copy of events from getEvents', () => {
|
||||
const writer = new TraceWriter('test');
|
||||
writer.recordToolCall('orch', 'tool-a', {}, {});
|
||||
|
||||
const first = writer.getEvents();
|
||||
const second = writer.getEvents();
|
||||
expect(first).not.toBe(second);
|
||||
expect(first).toEqual(second);
|
||||
});
|
||||
|
||||
it('should serialize events to JSONL format', () => {
|
||||
const writer = new TraceWriter('test');
|
||||
writer.recordToolCall('orch', 'search-nodes', { q: 'http' }, { results: [] });
|
||||
|
||||
const jsonl = writer.toJsonl();
|
||||
const lines = jsonl.trim().split('\n');
|
||||
expect(lines).toHaveLength(2); // header + 1 tool-call
|
||||
|
||||
const header = jsonParse<{ kind: string }>(lines[0]);
|
||||
expect(header.kind).toBe('header');
|
||||
|
||||
const call = jsonParse<{ kind: string; toolName: string }>(lines[1]);
|
||||
expect(call.kind).toBe('tool-call');
|
||||
expect(call.toolName).toBe('search-nodes');
|
||||
});
|
||||
});
|
||||
|
||||
// ── parseTraceJsonl ──────────────────────────────────────────────────────────
|
||||
|
||||
describe('parseTraceJsonl', () => {
|
||||
it('should parse JSONL into TraceEvent array', () => {
|
||||
const jsonl = [
|
||||
JSON.stringify({ kind: 'header', version: 1, testName: 'test', recordedAt: '2026-01-01' }),
|
||||
JSON.stringify({
|
||||
kind: 'tool-call',
|
||||
stepId: 1,
|
||||
agentRole: 'orch',
|
||||
toolName: 'search',
|
||||
input: {},
|
||||
output: {},
|
||||
}),
|
||||
].join('\n');
|
||||
|
||||
const events = parseTraceJsonl(jsonl);
|
||||
expect(events).toHaveLength(2);
|
||||
expect(events[0].kind).toBe('header');
|
||||
expect(events[1].kind).toBe('tool-call');
|
||||
});
|
||||
|
||||
it('should handle trailing newline', () => {
|
||||
const jsonl =
|
||||
JSON.stringify({ kind: 'header', version: 1, testName: 'test', recordedAt: '' }) + '\n';
|
||||
const events = parseTraceJsonl(jsonl);
|
||||
expect(events).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('should handle empty string', () => {
|
||||
expect(parseTraceJsonl('')).toEqual([]);
|
||||
});
|
||||
|
||||
it('should roundtrip with TraceWriter', () => {
|
||||
const writer = new TraceWriter('roundtrip-test');
|
||||
writer.recordToolCall('orch', 'build-workflow', { nodes: [] }, { workflowId: '5' });
|
||||
writer.recordToolSuspend('orch', 'run-workflow', { workflowId: '5' }, {}, { ask: true });
|
||||
|
||||
const parsed = parseTraceJsonl(writer.toJsonl());
|
||||
expect(parsed).toHaveLength(3);
|
||||
expect(parsed[0].kind).toBe('header');
|
||||
expect(parsed[1].kind).toBe('tool-call');
|
||||
expect(parsed[2].kind).toBe('tool-suspend');
|
||||
expect((parsed[1] as TraceToolCall).output).toEqual({ workflowId: '5' });
|
||||
});
|
||||
|
||||
it('should throw when a line is not an object', () => {
|
||||
expect(() => parseTraceJsonl('42')).toThrow(/line 1/i);
|
||||
expect(() => parseTraceJsonl('null')).toThrow(/line 1/i);
|
||||
expect(() => parseTraceJsonl('"hello"')).toThrow(/line 1/i);
|
||||
});
|
||||
|
||||
it('should throw when an event is missing the kind field', () => {
|
||||
const jsonl = JSON.stringify({ stepId: 1, agentRole: 'orch' });
|
||||
expect(() => parseTraceJsonl(jsonl)).toThrow(/kind/i);
|
||||
});
|
||||
|
||||
it('should throw on unknown kind value', () => {
|
||||
const jsonl = JSON.stringify({ kind: 'mystery-event', stepId: 1 });
|
||||
expect(() => parseTraceJsonl(jsonl)).toThrow(/mystery-event/);
|
||||
});
|
||||
|
||||
it('should report the offending line number for the second invalid line', () => {
|
||||
const jsonl = [
|
||||
JSON.stringify({ kind: 'header', version: 1, testName: 't', recordedAt: '' }),
|
||||
JSON.stringify({ kind: 'banana' }),
|
||||
].join('\n');
|
||||
expect(() => parseTraceJsonl(jsonl)).toThrow(/line 2/i);
|
||||
});
|
||||
});
|
||||
|
|
@ -13,6 +13,8 @@ import type {
|
|||
InstanceAiTraceRunInit,
|
||||
ServiceProxyConfig,
|
||||
} from '../types';
|
||||
import type { IdRemapper, TraceIndex, TraceWriter } from './trace-replay';
|
||||
import { PURE_REPLAY_TOOLS } from './trace-replay';
|
||||
import { isRecord } from '../utils/stream-helpers';
|
||||
|
||||
const DEFAULT_PROJECT_NAME = 'instance-ai';
|
||||
|
|
@ -788,7 +790,7 @@ function createTraceContext(
|
|||
}
|
||||
};
|
||||
|
||||
return {
|
||||
const ctx: InstanceAiTraceContext = {
|
||||
projectName,
|
||||
traceKind,
|
||||
rootRun,
|
||||
|
|
@ -800,8 +802,19 @@ function createTraceContext(
|
|||
finishRun,
|
||||
failRun,
|
||||
toHeaders: (run) => hydrateRunTree(run).toHeaders(),
|
||||
wrapTools: (tools, traceOptions) => wrapTools(tools, traceOptions),
|
||||
wrapTools: (tools, traceOptions) => {
|
||||
if (ctx.replayMode === 'replay' && ctx.traceIndex && ctx.idRemapper) {
|
||||
return replayWrapTools(tools, ctx.traceIndex, ctx.idRemapper, traceOptions);
|
||||
}
|
||||
if (ctx.replayMode === 'record' && ctx.traceWriter) {
|
||||
return recordWrapTools(tools, ctx.traceWriter, traceOptions);
|
||||
}
|
||||
return wrapTools(tools, traceOptions);
|
||||
},
|
||||
replayMode: 'off',
|
||||
};
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
function createRunStateFromTree(tree: RunTree): InstanceAiTraceRun {
|
||||
|
|
@ -928,6 +941,236 @@ function wrapTools(tools: ToolsInput, options?: InstanceAiToolTraceOptions): Too
|
|||
return wrapped;
|
||||
}
|
||||
|
||||
// ── Replay wrappers ─────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Tier 1: Real execution + ID remapping.
|
||||
* Executes the tool for real with remapped input, then learns new ID mappings
|
||||
* by comparing the recorded output against the actual output.
|
||||
*/
|
||||
function replayWrapTool(
|
||||
tool: TraceableMastraTool,
|
||||
traceIndex: TraceIndex,
|
||||
idRemapper: IdRemapper,
|
||||
agentRole: string,
|
||||
): TraceableMastraTool {
|
||||
return createTool({
|
||||
id: tool.id,
|
||||
description: tool.description,
|
||||
inputSchema: tool.inputSchema,
|
||||
outputSchema: tool.outputSchema,
|
||||
suspendSchema: tool.suspendSchema,
|
||||
resumeSchema: tool.resumeSchema,
|
||||
requestContextSchema: tool.requestContextSchema,
|
||||
execute: async (input, context) => {
|
||||
const event = traceIndex.next(agentRole, tool.id);
|
||||
const remappedInput = idRemapper.remapInput(input);
|
||||
const realOutput = await tool.execute!(remappedInput, context);
|
||||
idRemapper.learn(event.output, realOutput as Record<string, unknown>);
|
||||
return realOutput;
|
||||
},
|
||||
mastra: tool.mastra,
|
||||
requireApproval: tool.requireApproval,
|
||||
providerOptions: tool.providerOptions,
|
||||
toModelOutput: tool.toModelOutput,
|
||||
mcp: tool.mcp,
|
||||
onInputStart: tool.onInputStart,
|
||||
onInputDelta: tool.onInputDelta,
|
||||
onInputAvailable: tool.onInputAvailable,
|
||||
onOutput: tool.onOutput,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Tier 2: Pure replay — for tools that need external services (web, MCP).
|
||||
* Returns the recorded output (with IDs remapped to current-run values).
|
||||
*/
|
||||
function pureReplayWrapTool(
|
||||
tool: TraceableMastraTool,
|
||||
traceIndex: TraceIndex,
|
||||
idRemapper: IdRemapper,
|
||||
agentRole: string,
|
||||
): TraceableMastraTool {
|
||||
return createTool({
|
||||
id: tool.id,
|
||||
description: tool.description,
|
||||
inputSchema: tool.inputSchema,
|
||||
outputSchema: tool.outputSchema,
|
||||
suspendSchema: tool.suspendSchema,
|
||||
resumeSchema: tool.resumeSchema,
|
||||
requestContextSchema: tool.requestContextSchema,
|
||||
execute: async (_input, _context) => {
|
||||
const event = traceIndex.next(agentRole, tool.id);
|
||||
return await Promise.resolve(idRemapper.remapOutput(event.output));
|
||||
},
|
||||
mastra: tool.mastra,
|
||||
requireApproval: tool.requireApproval,
|
||||
providerOptions: tool.providerOptions,
|
||||
toModelOutput: tool.toModelOutput,
|
||||
mcp: tool.mcp,
|
||||
onInputStart: tool.onInputStart,
|
||||
onInputDelta: tool.onInputDelta,
|
||||
onInputAvailable: tool.onInputAvailable,
|
||||
onOutput: tool.onOutput,
|
||||
});
|
||||
}
|
||||
|
||||
function replayWrapTools(
|
||||
tools: ToolsInput,
|
||||
traceIndex: TraceIndex,
|
||||
idRemapper: IdRemapper,
|
||||
options?: InstanceAiToolTraceOptions,
|
||||
): ToolsInput {
|
||||
const agentRole = options?.agentRole ?? 'orchestrator';
|
||||
const wrapped: ToolsInput = {};
|
||||
const entries: Array<[string, unknown]> = Object.entries(tools);
|
||||
|
||||
for (const [name, tool] of entries) {
|
||||
if (!isTraceableMastraTool(tool)) {
|
||||
wrapped[name] = tools[name];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (PURE_REPLAY_TOOLS.has(tool.id)) {
|
||||
wrapped[name] = pureReplayWrapTool(tool, traceIndex, idRemapper, agentRole);
|
||||
} else {
|
||||
wrapped[name] = replayWrapTool(tool, traceIndex, idRemapper, agentRole);
|
||||
}
|
||||
}
|
||||
|
||||
return wrapped;
|
||||
}
|
||||
|
||||
// ── Recording wrappers ──────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Wraps a tool to record its I/O to a TraceWriter while also applying
|
||||
* the normal LangSmith tracing wrapper.
|
||||
*/
|
||||
function recordWrapTool(
|
||||
tool: TraceableMastraTool,
|
||||
traceWriter: TraceWriter,
|
||||
agentRole: string,
|
||||
traceOptions: InstanceAiToolTraceOptions | undefined,
|
||||
): TraceableMastraTool {
|
||||
// First apply LangSmith tracing (preserves existing tracing behavior)
|
||||
const traced = wrapToolExecute(tool, traceOptions);
|
||||
|
||||
return createTool({
|
||||
id: traced.id,
|
||||
description: traced.description,
|
||||
inputSchema: traced.inputSchema,
|
||||
outputSchema: traced.outputSchema,
|
||||
suspendSchema: traced.suspendSchema,
|
||||
resumeSchema: traced.resumeSchema,
|
||||
requestContextSchema: traced.requestContextSchema,
|
||||
execute: async (input, context) => {
|
||||
const resumeData = context?.agent?.resumeData;
|
||||
const inputRecord = (input ?? {}) as Record<string, unknown>;
|
||||
|
||||
const result = await traced.execute!(input, context);
|
||||
const outputRecord = (result ?? {}) as Record<string, unknown>;
|
||||
|
||||
if (resumeData !== undefined && resumeData !== null) {
|
||||
traceWriter.recordToolResume(
|
||||
agentRole,
|
||||
tool.id,
|
||||
inputRecord,
|
||||
outputRecord,
|
||||
resumeData as Record<string, unknown>,
|
||||
);
|
||||
} else if (context?.agent?.suspend && outputRecord.denied === true) {
|
||||
// Tool returned {denied: true} — it suspended
|
||||
traceWriter.recordToolSuspend(
|
||||
agentRole,
|
||||
tool.id,
|
||||
inputRecord,
|
||||
outputRecord,
|
||||
{}, // suspendPayload is internal to the tool
|
||||
);
|
||||
} else {
|
||||
traceWriter.recordToolCall(agentRole, tool.id, inputRecord, outputRecord);
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
mastra: traced.mastra,
|
||||
requireApproval: traced.requireApproval,
|
||||
providerOptions: traced.providerOptions,
|
||||
toModelOutput: traced.toModelOutput,
|
||||
mcp: traced.mcp,
|
||||
onInputStart: traced.onInputStart,
|
||||
onInputDelta: traced.onInputDelta,
|
||||
onInputAvailable: traced.onInputAvailable,
|
||||
onOutput: traced.onOutput,
|
||||
});
|
||||
}
|
||||
|
||||
function recordWrapTools(
|
||||
tools: ToolsInput,
|
||||
traceWriter: TraceWriter,
|
||||
options?: InstanceAiToolTraceOptions,
|
||||
): ToolsInput {
|
||||
const agentRole = options?.agentRole ?? 'orchestrator';
|
||||
const wrapped: ToolsInput = {};
|
||||
const entries: Array<[string, unknown]> = Object.entries(tools);
|
||||
|
||||
for (const [name, tool] of entries) {
|
||||
if (!isTraceableMastraTool(tool)) {
|
||||
wrapped[name] = tools[name];
|
||||
continue;
|
||||
}
|
||||
wrapped[name] = recordWrapTool(tool, traceWriter, agentRole, options);
|
||||
}
|
||||
|
||||
return wrapped;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a minimal InstanceAiTraceContext that only supports trace replay/record
|
||||
* wrapping — no LangSmith integration. Used when E2E_TESTS is
|
||||
* set but LangSmith isn't configured.
|
||||
*/
|
||||
export function createTraceReplayOnlyContext(): InstanceAiTraceContext {
|
||||
const stubRun: InstanceAiTraceRun = {
|
||||
id: 'stub',
|
||||
name: 'stub',
|
||||
runType: 'chain',
|
||||
projectName: '',
|
||||
startTime: Date.now(),
|
||||
traceId: 'stub',
|
||||
dottedOrder: '',
|
||||
executionOrder: 0,
|
||||
childExecutionOrder: 0,
|
||||
};
|
||||
|
||||
const ctx: InstanceAiTraceContext = {
|
||||
projectName: '',
|
||||
traceKind: 'message_turn',
|
||||
rootRun: stubRun,
|
||||
actorRun: stubRun,
|
||||
messageRun: stubRun,
|
||||
orchestratorRun: stubRun,
|
||||
startChildRun: async () => await Promise.resolve(stubRun),
|
||||
withRunTree: async (_run, fn) => await fn(),
|
||||
finishRun: async () => {},
|
||||
failRun: async () => {},
|
||||
toHeaders: () => ({}),
|
||||
wrapTools: (tools, traceOptions) => {
|
||||
if (ctx.replayMode === 'replay' && ctx.traceIndex && ctx.idRemapper) {
|
||||
return replayWrapTools(tools, ctx.traceIndex, ctx.idRemapper, traceOptions);
|
||||
}
|
||||
if (ctx.replayMode === 'record' && ctx.traceWriter) {
|
||||
return recordWrapTools(tools, ctx.traceWriter, traceOptions);
|
||||
}
|
||||
return tools;
|
||||
},
|
||||
replayMode: 'off',
|
||||
};
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
async function createRun(options: {
|
||||
projectName: string;
|
||||
name: string;
|
||||
|
|
|
|||
323
packages/@n8n/instance-ai/src/tracing/trace-replay.ts
Normal file
323
packages/@n8n/instance-ai/src/tracing/trace-replay.ts
Normal file
|
|
@ -0,0 +1,323 @@
|
|||
import { jsonParse } from 'n8n-workflow';
|
||||
|
||||
// ── Trace Event Types ───────────────────────────────────────────────────────
|
||||
|
||||
export interface TraceHeader {
|
||||
kind: 'header';
|
||||
version: number;
|
||||
testName: string;
|
||||
recordedAt: string;
|
||||
}
|
||||
|
||||
export interface TraceToolCall {
|
||||
kind: 'tool-call';
|
||||
stepId: number;
|
||||
agentRole: string;
|
||||
toolName: string;
|
||||
input: Record<string, unknown>;
|
||||
output: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface TraceToolSuspend {
|
||||
kind: 'tool-suspend';
|
||||
stepId: number;
|
||||
agentRole: string;
|
||||
toolName: string;
|
||||
input: Record<string, unknown>;
|
||||
output: Record<string, unknown>;
|
||||
suspendPayload: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface TraceToolResume {
|
||||
kind: 'tool-resume';
|
||||
stepId: number;
|
||||
agentRole: string;
|
||||
toolName: string;
|
||||
input: Record<string, unknown>;
|
||||
output: Record<string, unknown>;
|
||||
resumeData: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export type TraceEvent = TraceHeader | TraceToolCall | TraceToolSuspend | TraceToolResume;
|
||||
|
||||
type ToolTraceEvent = TraceToolCall | TraceToolSuspend | TraceToolResume;
|
||||
|
||||
function isToolEvent(event: TraceEvent): event is ToolTraceEvent {
|
||||
return event.kind !== 'header';
|
||||
}
|
||||
|
||||
// ── TraceIndex ──────────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Groups trace events by agentRole with per-role cursors.
|
||||
* Advancing a cursor validates the expected tool name matches, catching
|
||||
* divergence between the recorded trace and the current replay.
|
||||
*/
|
||||
export class TraceIndex {
|
||||
private byRole: Map<string, ToolTraceEvent[]>;
|
||||
|
||||
private cursors: Map<string, number>;
|
||||
|
||||
constructor(events: TraceEvent[]) {
|
||||
this.byRole = new Map();
|
||||
this.cursors = new Map();
|
||||
|
||||
for (const event of events) {
|
||||
if (!isToolEvent(event)) continue;
|
||||
const list = this.byRole.get(event.agentRole);
|
||||
if (list) {
|
||||
list.push(event);
|
||||
} else {
|
||||
this.byRole.set(event.agentRole, [event]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
next(agentRole: string, expectedToolName: string): ToolTraceEvent {
|
||||
const events = this.byRole.get(agentRole);
|
||||
const cursor = this.cursors.get(agentRole) ?? 0;
|
||||
|
||||
if (!events || cursor >= events.length) {
|
||||
throw new Error(`Trace exhausted for role "${agentRole}" — agent diverged from recording`);
|
||||
}
|
||||
|
||||
const event = events[cursor];
|
||||
if (event.toolName !== expectedToolName) {
|
||||
throw new Error(
|
||||
`Tool mismatch at step ${event.stepId}: expected "${expectedToolName}", ` +
|
||||
`trace has "${event.toolName}" — agent took a different path`,
|
||||
);
|
||||
}
|
||||
|
||||
this.cursors.set(agentRole, cursor + 1);
|
||||
return event;
|
||||
}
|
||||
}
|
||||
|
||||
// ── IdRemapper ──────────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Bidirectional ID remapper that learns mappings from recorded vs actual tool
|
||||
* output, then applies them to tool inputs.
|
||||
*
|
||||
* Only compares fields that follow the ID naming convention:
|
||||
* - key === 'id'
|
||||
* - key ends with 'Id' (e.g. workflowId, executionId, credentialId)
|
||||
*
|
||||
* This avoids garbage mappings from diffing execution data, web content, etc.
|
||||
*/
|
||||
export class IdRemapper {
|
||||
private oldToNew = new Map<string, string>();
|
||||
|
||||
/** Compare recorded vs actual output — learn new ID mappings from matching paths. */
|
||||
learn(recordedOutput: unknown, actualOutput: unknown): void {
|
||||
const recorded = this.extractIds(recordedOutput);
|
||||
const actual = this.extractIds(actualOutput);
|
||||
|
||||
for (const [path, oldVal] of recorded) {
|
||||
const newVal = actual.get(path);
|
||||
if (newVal !== undefined && oldVal !== newVal) {
|
||||
this.oldToNew.set(oldVal, newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Replace old (recorded) IDs with new (current-run) IDs throughout an input object. */
|
||||
remapInput(input: unknown): unknown {
|
||||
if (this.oldToNew.size === 0) return input;
|
||||
return this.deepReplace(input);
|
||||
}
|
||||
|
||||
/** Replace old IDs in recorded output with current-run IDs (for Tier 2 pure-replay tools). */
|
||||
remapOutput(output: unknown): unknown {
|
||||
return this.remapInput(output);
|
||||
}
|
||||
|
||||
private extractIds(obj: unknown, path = ''): Map<string, string> {
|
||||
const ids = new Map<string, string>();
|
||||
if (!obj || typeof obj !== 'object') return ids;
|
||||
|
||||
if (Array.isArray(obj)) {
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
for (const [p, v] of this.extractIds(obj[i] as unknown, `${path}[${i}]`)) {
|
||||
ids.set(p, v);
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
for (const [key, value] of Object.entries(obj as Record<string, unknown>)) {
|
||||
const fullPath = path ? `${path}.${key}` : key;
|
||||
|
||||
if (isIdKey(key)) {
|
||||
if (typeof value === 'string') {
|
||||
ids.set(fullPath, value);
|
||||
} else if (typeof value === 'number') {
|
||||
ids.set(fullPath, String(value));
|
||||
}
|
||||
} else if (Array.isArray(value)) {
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
for (const [p, v] of this.extractIds(value[i] as unknown, `${fullPath}[${i}]`)) {
|
||||
ids.set(p, v);
|
||||
}
|
||||
}
|
||||
} else if (value !== null && typeof value === 'object') {
|
||||
for (const [p, v] of this.extractIds(value, fullPath)) {
|
||||
ids.set(p, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ids;
|
||||
}
|
||||
|
||||
private deepReplace(value: unknown): unknown {
|
||||
if (value === null || value === undefined) return value;
|
||||
|
||||
if (typeof value === 'string') {
|
||||
let result = value;
|
||||
for (const [from, to] of this.oldToNew) {
|
||||
result = result.replaceAll(from, to);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
if (typeof value === 'number') {
|
||||
const key = String(value);
|
||||
const mapped = this.oldToNew.get(key);
|
||||
if (mapped !== undefined) {
|
||||
const asNum = Number(mapped);
|
||||
return Number.isFinite(asNum) ? asNum : value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
return value.map((v) => this.deepReplace(v));
|
||||
}
|
||||
|
||||
if (typeof value === 'object') {
|
||||
return Object.fromEntries(
|
||||
Object.entries(value as Record<string, unknown>).map(([k, v]) => [k, this.deepReplace(v)]),
|
||||
);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
function isIdKey(key: string): boolean {
|
||||
return key === 'id' || key.endsWith('Id');
|
||||
}
|
||||
|
||||
// ── TraceWriter ─────────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Records tool call events during a recording session.
|
||||
* Events are stored in memory and can be serialized to JSONL.
|
||||
*/
|
||||
export class TraceWriter {
|
||||
private events: TraceEvent[] = [];
|
||||
|
||||
private stepCounter = 0;
|
||||
|
||||
constructor(testName: string) {
|
||||
this.events.push({
|
||||
kind: 'header',
|
||||
version: 1,
|
||||
testName,
|
||||
recordedAt: new Date().toISOString(),
|
||||
});
|
||||
}
|
||||
|
||||
recordToolCall(
|
||||
agentRole: string,
|
||||
toolName: string,
|
||||
input: Record<string, unknown>,
|
||||
output: Record<string, unknown>,
|
||||
): void {
|
||||
this.events.push({
|
||||
kind: 'tool-call',
|
||||
stepId: ++this.stepCounter,
|
||||
agentRole,
|
||||
toolName,
|
||||
input,
|
||||
output,
|
||||
});
|
||||
}
|
||||
|
||||
recordToolSuspend(
|
||||
agentRole: string,
|
||||
toolName: string,
|
||||
input: Record<string, unknown>,
|
||||
output: Record<string, unknown>,
|
||||
suspendPayload: Record<string, unknown>,
|
||||
): void {
|
||||
this.events.push({
|
||||
kind: 'tool-suspend',
|
||||
stepId: ++this.stepCounter,
|
||||
agentRole,
|
||||
toolName,
|
||||
input,
|
||||
output,
|
||||
suspendPayload,
|
||||
});
|
||||
}
|
||||
|
||||
recordToolResume(
|
||||
agentRole: string,
|
||||
toolName: string,
|
||||
input: Record<string, unknown>,
|
||||
output: Record<string, unknown>,
|
||||
resumeData: Record<string, unknown>,
|
||||
): void {
|
||||
this.events.push({
|
||||
kind: 'tool-resume',
|
||||
stepId: ++this.stepCounter,
|
||||
agentRole,
|
||||
toolName,
|
||||
input,
|
||||
output,
|
||||
resumeData,
|
||||
});
|
||||
}
|
||||
|
||||
getEvents(): TraceEvent[] {
|
||||
return [...this.events];
|
||||
}
|
||||
|
||||
toJsonl(): string {
|
||||
return this.events.map((e) => JSON.stringify(e)).join('\n') + '\n';
|
||||
}
|
||||
}
|
||||
|
||||
// ── JSONL helpers ───────────────────────────────────────────────────────────
|
||||
|
||||
const KNOWN_KINDS = new Set(['header', 'tool-call', 'tool-suspend', 'tool-resume']);
|
||||
|
||||
function isTraceEvent(value: unknown): value is TraceEvent {
|
||||
if (typeof value !== 'object' || value === null || Array.isArray(value)) return false;
|
||||
const kind = (value as { kind?: unknown }).kind;
|
||||
return typeof kind === 'string' && KNOWN_KINDS.has(kind);
|
||||
}
|
||||
|
||||
export function parseTraceJsonl(jsonl: string): TraceEvent[] {
|
||||
const events: TraceEvent[] = [];
|
||||
const lines = jsonl.split('\n');
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const line = lines[i];
|
||||
if (line.trim().length === 0) continue;
|
||||
const parsed: unknown = jsonParse(line);
|
||||
if (!isTraceEvent(parsed)) {
|
||||
const kind = (parsed as { kind?: unknown } | null)?.kind;
|
||||
const detail =
|
||||
typeof kind === 'string' ? `unknown kind '${kind}'` : "missing or invalid 'kind' field";
|
||||
throw new Error(`Invalid trace event on line ${i + 1}: ${detail}`);
|
||||
}
|
||||
events.push(parsed);
|
||||
}
|
||||
return events;
|
||||
}
|
||||
|
||||
/** Set of tool IDs that should use Tier 2 (pure replay) instead of real execution. */
|
||||
export const PURE_REPLAY_TOOLS = new Set(['web-search', 'fetch-url', 'test-credential']);
|
||||
|
|
@ -20,6 +20,7 @@ import type { DomainAccessTracker } from './domain-access/domain-access-tracker'
|
|||
import type { InstanceAiEventBus } from './event-bus/event-bus.interface';
|
||||
import type { Logger } from './logger';
|
||||
import type { IterationLog } from './storage/iteration-log';
|
||||
import type { IdRemapper, TraceIndex, TraceWriter } from './tracing/trace-replay';
|
||||
import type {
|
||||
VerificationResult,
|
||||
WorkflowBuildOutcome,
|
||||
|
|
@ -707,6 +708,8 @@ export interface InstanceAiToolTraceOptions {
|
|||
metadata?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export type TraceReplayMode = 'record' | 'replay' | 'off';
|
||||
|
||||
export interface InstanceAiTraceContext {
|
||||
projectName: string;
|
||||
traceKind: 'message_turn' | 'detached_subagent';
|
||||
|
|
@ -729,6 +732,14 @@ export interface InstanceAiTraceContext {
|
|||
) => Promise<void>;
|
||||
toHeaders: (run: InstanceAiTraceRun) => Record<string, string>;
|
||||
wrapTools: (tools: ToolsInput, options?: InstanceAiToolTraceOptions) => ToolsInput;
|
||||
/** Trace replay mode: 'record' captures tool I/O, 'replay' remaps IDs, 'off' disables. */
|
||||
replayMode: TraceReplayMode;
|
||||
/** Shared ID remapper instance — available in 'replay' mode. */
|
||||
idRemapper?: IdRemapper;
|
||||
/** Trace index for cursor-based replay — available in 'replay' mode. */
|
||||
traceIndex?: TraceIndex;
|
||||
/** Trace writer for recording — available in 'record' mode. */
|
||||
traceWriter?: TraceWriter;
|
||||
}
|
||||
|
||||
// ── Background task spawning ─────────────────────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -0,0 +1,129 @@
|
|||
import { z } from 'zod';
|
||||
|
||||
jest.mock('@n8n/instance-ai', () => ({
|
||||
createMemory: jest.fn(),
|
||||
workflowLoopStateSchema: z.string(),
|
||||
attemptRecordSchema: z.object({}),
|
||||
workflowBuildOutcomeSchema: z.string(),
|
||||
buildAgentTreeFromEvents: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('../eval/execution.service', () => ({
|
||||
EvalExecutionService: jest.fn(),
|
||||
}));
|
||||
|
||||
import type { Request } from 'express';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
import { ForbiddenError } from '@/errors/response-errors/forbidden.error';
|
||||
|
||||
import { InstanceAiTestController } from '../instance-ai-test.controller';
|
||||
import type { InstanceAiService } from '../instance-ai.service';
|
||||
|
||||
describe('InstanceAiTestController', () => {
|
||||
const instanceAiService = mock<InstanceAiService>();
|
||||
const controller = new InstanceAiTestController(instanceAiService);
|
||||
|
||||
const originalEnv = process.env;
|
||||
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
process.env = { ...originalEnv, E2E_TESTS: 'true' };
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
process.env = originalEnv;
|
||||
});
|
||||
|
||||
describe('loadToolTrace', () => {
|
||||
it('should load trace events and activate slug', () => {
|
||||
const events = [{ kind: 'header' }];
|
||||
const req = mock<Request>({ body: { slug: 'my-test', events } });
|
||||
|
||||
const result = controller.loadToolTrace(req);
|
||||
|
||||
expect(instanceAiService.loadTraceEvents).toHaveBeenCalledWith('my-test', events);
|
||||
expect(instanceAiService.activateTraceSlug).toHaveBeenCalledWith('my-test');
|
||||
expect(result).toEqual({ ok: true, count: 1 });
|
||||
});
|
||||
|
||||
it('should activate slug without events when none provided', () => {
|
||||
const req = mock<Request>({ body: { slug: 'my-test', events: undefined } });
|
||||
|
||||
const result = controller.loadToolTrace(req);
|
||||
|
||||
expect(instanceAiService.loadTraceEvents).not.toHaveBeenCalled();
|
||||
expect(instanceAiService.activateTraceSlug).toHaveBeenCalledWith('my-test');
|
||||
expect(result).toEqual({ ok: true, count: 0 });
|
||||
});
|
||||
|
||||
it('should throw ForbiddenError when trace replay is not enabled', () => {
|
||||
delete process.env.E2E_TESTS;
|
||||
const req = mock<Request>({ body: { slug: 'test' } });
|
||||
|
||||
expect(() => controller.loadToolTrace(req)).toThrow(ForbiddenError);
|
||||
});
|
||||
|
||||
it('should throw ForbiddenError in production even when E2E_TESTS is set', () => {
|
||||
process.env.NODE_ENV = 'production';
|
||||
const req = mock<Request>({ body: { slug: 'test' } });
|
||||
|
||||
expect(() => controller.loadToolTrace(req)).toThrow(ForbiddenError);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getToolTrace', () => {
|
||||
it('should return trace events for slug', () => {
|
||||
const events = [{ kind: 'tool-call' }];
|
||||
instanceAiService.getTraceEvents.mockReturnValue(events);
|
||||
const req = mock<Request>();
|
||||
|
||||
const result = controller.getToolTrace(req, 'my-test');
|
||||
|
||||
expect(instanceAiService.getTraceEvents).toHaveBeenCalledWith('my-test');
|
||||
expect(result).toEqual({ events });
|
||||
});
|
||||
|
||||
it('should throw ForbiddenError when trace replay is not enabled', () => {
|
||||
delete process.env.E2E_TESTS;
|
||||
const req = mock<Request>();
|
||||
|
||||
expect(() => controller.getToolTrace(req, 'my-test')).toThrow(ForbiddenError);
|
||||
});
|
||||
});
|
||||
|
||||
describe('clearToolTrace', () => {
|
||||
it('should clear trace events for slug', () => {
|
||||
const req = mock<Request>();
|
||||
|
||||
const result = controller.clearToolTrace(req, 'my-test');
|
||||
|
||||
expect(instanceAiService.clearTraceEvents).toHaveBeenCalledWith('my-test');
|
||||
expect(result).toEqual({ ok: true });
|
||||
});
|
||||
|
||||
it('should throw ForbiddenError when trace replay is not enabled', () => {
|
||||
delete process.env.E2E_TESTS;
|
||||
const req = mock<Request>();
|
||||
|
||||
expect(() => controller.clearToolTrace(req, 'my-test')).toThrow(ForbiddenError);
|
||||
});
|
||||
});
|
||||
|
||||
describe('drainBackgroundTasks', () => {
|
||||
it('should cancel all background tasks and return count', () => {
|
||||
instanceAiService.cancelAllBackgroundTasks.mockReturnValue(3);
|
||||
|
||||
const result = controller.drainBackgroundTasks();
|
||||
|
||||
expect(instanceAiService.cancelAllBackgroundTasks).toHaveBeenCalled();
|
||||
expect(result).toEqual({ ok: true, cancelled: 3 });
|
||||
});
|
||||
|
||||
it('should throw ForbiddenError when trace replay is not enabled', () => {
|
||||
delete process.env.E2E_TESTS;
|
||||
|
||||
expect(() => controller.drainBackgroundTasks()).toThrow(ForbiddenError);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,259 @@
|
|||
import { z } from 'zod';
|
||||
|
||||
jest.mock('@n8n/instance-ai', () => ({
|
||||
createMemory: jest.fn(),
|
||||
workflowLoopStateSchema: z.string(),
|
||||
attemptRecordSchema: z.object({}),
|
||||
workflowBuildOutcomeSchema: z.string(),
|
||||
buildAgentTreeFromEvents: jest.fn(),
|
||||
TraceIndex: jest.fn().mockImplementation(() => ({
|
||||
next: jest.fn(),
|
||||
})),
|
||||
IdRemapper: jest.fn().mockImplementation(() => ({
|
||||
learn: jest.fn(),
|
||||
remapInput: jest.fn(),
|
||||
remapOutput: jest.fn(),
|
||||
})),
|
||||
TraceWriter: jest.fn().mockImplementation(() => ({
|
||||
recordToolCall: jest.fn(),
|
||||
getEvents: jest.fn().mockReturnValue([]),
|
||||
toJsonl: jest.fn().mockReturnValue(''),
|
||||
})),
|
||||
}));
|
||||
|
||||
import type { InstanceAiTraceContext } from '@n8n/instance-ai';
|
||||
|
||||
import { TraceReplayState } from '../trace-replay-state';
|
||||
|
||||
describe('TraceReplayState', () => {
|
||||
const originalEnv = process.env;
|
||||
|
||||
beforeEach(() => {
|
||||
process.env = { ...originalEnv };
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
process.env = originalEnv;
|
||||
});
|
||||
|
||||
describe('loadEvents / getEvents', () => {
|
||||
it('should store and retrieve events by slug', () => {
|
||||
const state = new TraceReplayState();
|
||||
const events = [{ kind: 'header' }, { kind: 'tool-call' }];
|
||||
|
||||
state.loadEvents('test-slug', events);
|
||||
|
||||
expect(state.getEvents('test-slug')).toEqual(events);
|
||||
});
|
||||
|
||||
it('should return empty array for unknown slug', () => {
|
||||
const state = new TraceReplayState();
|
||||
|
||||
expect(state.getEvents('unknown')).toEqual([]);
|
||||
});
|
||||
|
||||
it('should set active slug when loading', () => {
|
||||
const state = new TraceReplayState();
|
||||
|
||||
state.loadEvents('test-slug', []);
|
||||
|
||||
expect(state.getActiveSlug()).toBe('test-slug');
|
||||
});
|
||||
});
|
||||
|
||||
describe('activateSlug / getActiveSlug', () => {
|
||||
it('should set and get the active slug', () => {
|
||||
const state = new TraceReplayState();
|
||||
|
||||
state.activateSlug('my-test');
|
||||
|
||||
expect(state.getActiveSlug()).toBe('my-test');
|
||||
});
|
||||
|
||||
it('should return undefined initially', () => {
|
||||
const state = new TraceReplayState();
|
||||
|
||||
expect(state.getActiveSlug()).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('clearEvents', () => {
|
||||
it('should remove events for the slug', () => {
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('test-slug', [{ kind: 'header' }]);
|
||||
|
||||
state.clearEvents('test-slug');
|
||||
|
||||
expect(state.getEvents('test-slug')).toEqual([]);
|
||||
});
|
||||
|
||||
it('should clear active slug if it matches', () => {
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('test-slug', []);
|
||||
|
||||
state.clearEvents('test-slug');
|
||||
|
||||
expect(state.getActiveSlug()).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should not clear active slug if different', () => {
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('slug-a', []);
|
||||
state.activateSlug('slug-b');
|
||||
|
||||
state.clearEvents('slug-a');
|
||||
|
||||
expect(state.getActiveSlug()).toBe('slug-b');
|
||||
});
|
||||
});
|
||||
|
||||
describe('preserveWriterEvents', () => {
|
||||
it('should append events to existing slug store', () => {
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('slug', [{ kind: 'header' }]);
|
||||
|
||||
state.preserveWriterEvents('slug', [{ kind: 'tool-call' }]);
|
||||
|
||||
expect(state.getEvents('slug')).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('should create new entry if slug has no events', () => {
|
||||
const state = new TraceReplayState();
|
||||
|
||||
state.preserveWriterEvents('new-slug', [{ kind: 'tool-call' }]);
|
||||
|
||||
expect(state.getEvents('new-slug')).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getEventsWithWriterFallback', () => {
|
||||
it('should return events from active writers if available', () => {
|
||||
const state = new TraceReplayState();
|
||||
const writerEvents = [{ kind: 'tool-call', stepId: 1 }];
|
||||
const entries = [
|
||||
{
|
||||
traceSlug: 'my-slug',
|
||||
tracing: { traceWriter: { getEvents: () => writerEvents } },
|
||||
},
|
||||
];
|
||||
|
||||
const result = state.getEventsWithWriterFallback(
|
||||
'my-slug',
|
||||
entries as Iterable<{ traceSlug?: string; tracing: InstanceAiTraceContext }>,
|
||||
);
|
||||
|
||||
expect(result).toEqual(writerEvents);
|
||||
});
|
||||
|
||||
it('should fall back to preserved events when no writers match', () => {
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('my-slug', [{ kind: 'header' }]);
|
||||
|
||||
const result = state.getEventsWithWriterFallback('my-slug', []);
|
||||
|
||||
expect(result).toEqual([{ kind: 'header' }]);
|
||||
});
|
||||
|
||||
it('should skip entries with non-matching slug', () => {
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('my-slug', [{ kind: 'header' }]);
|
||||
const entries = [
|
||||
{
|
||||
traceSlug: 'other-slug',
|
||||
tracing: { traceWriter: { getEvents: () => [{ kind: 'tool-call' }] } },
|
||||
},
|
||||
];
|
||||
|
||||
const result = state.getEventsWithWriterFallback(
|
||||
'my-slug',
|
||||
entries as Iterable<{ traceSlug?: string; tracing: InstanceAiTraceContext }>,
|
||||
);
|
||||
|
||||
expect(result).toEqual([{ kind: 'header' }]);
|
||||
});
|
||||
|
||||
it('should skip entries without traceWriter', () => {
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('my-slug', [{ kind: 'header' }]);
|
||||
const entries = [{ traceSlug: 'my-slug', tracing: {} }];
|
||||
|
||||
const result = state.getEventsWithWriterFallback(
|
||||
'my-slug',
|
||||
entries as Iterable<{ traceSlug?: string; tracing: InstanceAiTraceContext }>,
|
||||
);
|
||||
|
||||
expect(result).toEqual([{ kind: 'header' }]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('configureReplayMode', () => {
|
||||
it('should do nothing when env var is not set', async () => {
|
||||
delete process.env.E2E_TESTS;
|
||||
const state = new TraceReplayState();
|
||||
const tracing = {} as Record<string, unknown>;
|
||||
|
||||
await state.configureReplayMode(tracing as unknown as InstanceAiTraceContext);
|
||||
|
||||
expect(tracing.replayMode).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should set replay mode when events are loaded', async () => {
|
||||
process.env.E2E_TESTS = 'true';
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('test', [{ kind: 'header' }, { kind: 'tool-call' }]);
|
||||
const tracing = {} as Record<string, unknown>;
|
||||
|
||||
await state.configureReplayMode(tracing as unknown as InstanceAiTraceContext);
|
||||
|
||||
expect(tracing.replayMode).toBe('replay');
|
||||
expect(tracing.traceIndex).toBeDefined();
|
||||
expect(tracing.idRemapper).toBeDefined();
|
||||
});
|
||||
|
||||
it('should set record mode when no events are loaded', async () => {
|
||||
process.env.E2E_TESTS = 'true';
|
||||
const state = new TraceReplayState();
|
||||
state.activateSlug('test');
|
||||
const tracing = {} as Record<string, unknown>;
|
||||
|
||||
await state.configureReplayMode(tracing as unknown as InstanceAiTraceContext);
|
||||
|
||||
expect(tracing.replayMode).toBe('record');
|
||||
expect(tracing.traceWriter).toBeDefined();
|
||||
});
|
||||
|
||||
it('should reuse shared TraceIndex/IdRemapper for same slug', async () => {
|
||||
process.env.E2E_TESTS = 'true';
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('test', [{ kind: 'header' }]);
|
||||
|
||||
const tracing1 = {} as Record<string, unknown>;
|
||||
const tracing2 = {} as Record<string, unknown>;
|
||||
|
||||
await state.configureReplayMode(tracing1 as unknown as InstanceAiTraceContext);
|
||||
await state.configureReplayMode(tracing2 as unknown as InstanceAiTraceContext);
|
||||
|
||||
expect(tracing1.traceIndex).toBe(tracing2.traceIndex);
|
||||
expect(tracing1.idRemapper).toBe(tracing2.idRemapper);
|
||||
});
|
||||
|
||||
it('should clear shared state when slug changes via clearEvents', async () => {
|
||||
process.env.E2E_TESTS = 'true';
|
||||
const state = new TraceReplayState();
|
||||
state.loadEvents('test-a', [{ kind: 'header' }]);
|
||||
|
||||
const tracing1 = {} as Record<string, unknown>;
|
||||
await state.configureReplayMode(tracing1 as unknown as InstanceAiTraceContext);
|
||||
const firstIndex = tracing1.traceIndex;
|
||||
|
||||
state.clearEvents('test-a');
|
||||
state.loadEvents('test-b', [{ kind: 'header' }]);
|
||||
|
||||
const tracing2 = {} as Record<string, unknown>;
|
||||
await state.configureReplayMode(tracing2 as unknown as InstanceAiTraceContext);
|
||||
|
||||
expect(tracing2.traceIndex).not.toBe(firstIndex);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
import { RestController, Get, Post, Delete, Param } from '@n8n/decorators';
|
||||
import type { Request } from 'express';
|
||||
|
||||
import { ForbiddenError } from '@/errors/response-errors/forbidden.error';
|
||||
|
||||
import { InstanceAiService } from './instance-ai.service';
|
||||
|
||||
/**
|
||||
* Test-only endpoints for trace replay in Instance AI e2e tests.
|
||||
* Only registered when E2E_TESTS is set.
|
||||
*/
|
||||
@RestController('/instance-ai')
|
||||
export class InstanceAiTestController {
|
||||
constructor(private readonly instanceAiService: InstanceAiService) {}
|
||||
|
||||
@Post('/test/tool-trace', { skipAuth: true })
|
||||
loadToolTrace(req: Request) {
|
||||
this.assertTraceReplayEnabled();
|
||||
const { slug, events } = req.body as { slug: string; events?: unknown[] };
|
||||
if (events) {
|
||||
this.instanceAiService.loadTraceEvents(slug, events);
|
||||
}
|
||||
// Always activate the slug (marks which test is about to run)
|
||||
this.instanceAiService.activateTraceSlug(slug);
|
||||
return { ok: true, count: events?.length ?? 0 };
|
||||
}
|
||||
|
||||
@Get('/test/tool-trace/:slug', { skipAuth: true })
|
||||
getToolTrace(_req: Request, @Param('slug') slug: string) {
|
||||
this.assertTraceReplayEnabled();
|
||||
return { events: this.instanceAiService.getTraceEvents(slug) };
|
||||
}
|
||||
|
||||
@Delete('/test/tool-trace/:slug', { skipAuth: true })
|
||||
clearToolTrace(_req: Request, @Param('slug') slug: string) {
|
||||
this.assertTraceReplayEnabled();
|
||||
this.instanceAiService.clearTraceEvents(slug);
|
||||
return { ok: true };
|
||||
}
|
||||
|
||||
@Post('/test/drain-background-tasks', { skipAuth: true })
|
||||
drainBackgroundTasks() {
|
||||
this.assertTraceReplayEnabled();
|
||||
const cancelled = this.instanceAiService.cancelAllBackgroundTasks();
|
||||
return { ok: true, cancelled };
|
||||
}
|
||||
|
||||
private assertTraceReplayEnabled(): void {
|
||||
if (process.env.E2E_TESTS !== 'true' || process.env.NODE_ENV === 'production') {
|
||||
throw new ForbiddenError('Trace replay is not enabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,10 @@ export class InstanceAiModule implements ModuleInterface {
|
|||
await Container.get(InstanceAiSettingsService).loadFromDb();
|
||||
await import('./instance-ai.controller');
|
||||
|
||||
if (process.env.E2E_TESTS === 'true' && process.env.NODE_ENV !== 'production') {
|
||||
await import('./instance-ai-test.controller');
|
||||
}
|
||||
|
||||
// Fire-and-forget: clean up expired conversation threads on startup
|
||||
const { InstanceAiMemoryService } = await import('./instance-ai-memory.service');
|
||||
const { InstanceAiService } = await import('./instance-ai.service');
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ import {
|
|||
} from '@n8n/instance-ai';
|
||||
import { setSchemaBaseDirs } from '@n8n/workflow-sdk';
|
||||
import { nanoid } from 'nanoid';
|
||||
import type * as Undici from 'undici';
|
||||
|
||||
import { SourceControlPreferencesService } from '@/modules/source-control.ee/source-control-preferences.service.ee';
|
||||
import { AiService } from '@/services/ai.service';
|
||||
|
|
@ -84,6 +85,7 @@ import { DbIterationLogStorage } from './storage/db-iteration-log-storage';
|
|||
import { InstanceAiCompactionService } from './compaction.service';
|
||||
import { ProxyTokenManager } from './proxy-token-manager';
|
||||
import { InstanceAiThreadRepository } from './repositories/instance-ai-thread.repository';
|
||||
import { TraceReplayState } from './trace-replay-state';
|
||||
|
||||
function getErrorMessage(error: unknown): string {
|
||||
return error instanceof Error ? error.message : String(error);
|
||||
|
|
@ -96,6 +98,27 @@ function createInertAbortSignal(): AbortSignal {
|
|||
const ORCHESTRATOR_AGENT_ID = 'agent-001';
|
||||
const MAX_CONCURRENT_BACKGROUND_TASKS_PER_THREAD = 5;
|
||||
|
||||
/**
|
||||
* When HTTP_PROXY / HTTPS_PROXY is set (e.g. in e2e tests with MockServer),
|
||||
* return a fetch function that routes requests through the proxy. Node.js's
|
||||
* globalThis.fetch does not respect these env vars, so AI SDK providers would
|
||||
* bypass the proxy without this.
|
||||
*/
|
||||
function getProxyFetch(): typeof globalThis.fetch | undefined {
|
||||
const proxyUrl = process.env.HTTPS_PROXY || process.env.HTTP_PROXY;
|
||||
if (!proxyUrl) return undefined;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const { ProxyAgent } = require('undici') as typeof Undici;
|
||||
const dispatcher = new ProxyAgent(proxyUrl);
|
||||
return (async (url: string | URL | Request, init?: RequestInit) =>
|
||||
await globalThis.fetch(url, {
|
||||
...init,
|
||||
// @ts-expect-error dispatcher is a valid undici option for Node.js fetch
|
||||
dispatcher,
|
||||
})) as typeof globalThis.fetch;
|
||||
}
|
||||
|
||||
interface MessageTraceFinalization {
|
||||
status: 'completed' | 'cancelled' | 'error';
|
||||
outputText?: string;
|
||||
|
|
@ -125,7 +148,12 @@ export class InstanceAiService {
|
|||
/** Trace contexts keyed by the n8n run ID that started the orchestration turn. */
|
||||
private readonly traceContextsByRunId = new Map<
|
||||
string,
|
||||
{ threadId: string; messageGroupId?: string; tracing: InstanceAiTraceContext }
|
||||
{
|
||||
threadId: string;
|
||||
messageGroupId?: string;
|
||||
tracing: InstanceAiTraceContext;
|
||||
traceSlug?: string;
|
||||
}
|
||||
>();
|
||||
/** Active sandboxes keyed by thread ID — persisted across messages within a conversation. */
|
||||
private readonly sandboxes = new Map<
|
||||
|
|
@ -154,6 +182,9 @@ export class InstanceAiService {
|
|||
/** In-memory guard to prevent double credit counting within the same process. */
|
||||
private readonly creditedThreads = new Set<string>();
|
||||
|
||||
/** Test-only trace replay state (slugs, events, shared TraceIndex/IdRemapper). */
|
||||
private readonly traceReplay = new TraceReplayState();
|
||||
|
||||
/** Default IANA timezone for the instance (from GENERIC_TIMEZONE env var). */
|
||||
private readonly defaultTimeZone: string;
|
||||
|
||||
|
|
@ -400,6 +431,34 @@ export class InstanceAiService {
|
|||
return provider(modelName);
|
||||
}
|
||||
|
||||
/**
|
||||
* When HTTP_PROXY is set (e.g. e2e tests with MockServer), build the model
|
||||
* with a proxy-aware fetch so the AI SDK routes through the proxy. Mastra's
|
||||
* ModelRouter doesn't pass `fetch` to providers, so we must do it here.
|
||||
* Returns undefined if no HTTP_PROXY is set or the model isn't anthropic.
|
||||
*/
|
||||
private async resolveHttpProxyModel(user: User): Promise<ModelConfig | undefined> {
|
||||
const proxyFetch = getProxyFetch();
|
||||
if (!proxyFetch) return undefined;
|
||||
|
||||
const config = await this.settingsService.resolveModelConfig(user);
|
||||
const modelId = typeof config === 'string' ? config : 'id' in config ? config.id : null;
|
||||
if (!modelId) return undefined;
|
||||
|
||||
const [provider, ...rest] = modelId.split('/');
|
||||
const modelName = rest.join('/');
|
||||
const apiKey = typeof config === 'object' && 'apiKey' in config ? config.apiKey : undefined;
|
||||
const baseURL = typeof config === 'object' && 'url' in config ? config.url : undefined;
|
||||
if (provider !== 'anthropic') return undefined;
|
||||
|
||||
const { createAnthropic } = await import('@ai-sdk/anthropic');
|
||||
return createAnthropic({
|
||||
apiKey,
|
||||
baseURL: baseURL || undefined,
|
||||
fetch: proxyFetch,
|
||||
})(modelName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count one credit for the first completed orchestrator run in a thread.
|
||||
* Subsequent messages in the same thread are free.
|
||||
|
|
@ -481,13 +540,22 @@ export class InstanceAiService {
|
|||
tracing: InstanceAiTraceContext,
|
||||
messageGroupId?: string,
|
||||
): void {
|
||||
this.traceContextsByRunId.set(runId, { threadId, messageGroupId, tracing });
|
||||
this.traceContextsByRunId.set(runId, {
|
||||
threadId,
|
||||
messageGroupId,
|
||||
tracing,
|
||||
traceSlug: this.traceReplay.getActiveSlug(),
|
||||
});
|
||||
}
|
||||
|
||||
private getTraceContext(runId: string): InstanceAiTraceContext | undefined {
|
||||
return this.traceContextsByRunId.get(runId)?.tracing;
|
||||
}
|
||||
|
||||
private async configureTraceReplayMode(tracing: InstanceAiTraceContext): Promise<void> {
|
||||
await this.traceReplay.configureReplayMode(tracing);
|
||||
}
|
||||
|
||||
private async finalizeMessageTraceRoot(
|
||||
runId: string,
|
||||
tracing: InstanceAiTraceContext,
|
||||
|
|
@ -556,6 +624,14 @@ export class InstanceAiService {
|
|||
for (const [runId, entry] of this.traceContextsByRunId) {
|
||||
if (entry.threadId === threadId) {
|
||||
releaseTraceClient(entry.tracing.rootRun.traceId);
|
||||
// Preserve recorded trace events in the slug-scoped store
|
||||
// so the test fixture teardown can still retrieve them via GET.
|
||||
if (entry.tracing.traceWriter && entry.traceSlug) {
|
||||
this.traceReplay.preserveWriterEvents(
|
||||
entry.traceSlug,
|
||||
entry.tracing.traceWriter.getEvents(),
|
||||
);
|
||||
}
|
||||
this.traceContextsByRunId.delete(runId);
|
||||
}
|
||||
}
|
||||
|
|
@ -807,8 +883,35 @@ export class InstanceAiService {
|
|||
}
|
||||
}
|
||||
|
||||
/** Cancel all background tasks across all threads. Test-only. */
|
||||
cancelAllBackgroundTasks(): number {
|
||||
const cancelled = this.backgroundTasks.cancelAll();
|
||||
for (const task of cancelled) {
|
||||
void this.finalizeBackgroundTaskTracing(task, 'cancelled');
|
||||
}
|
||||
return cancelled.length;
|
||||
}
|
||||
|
||||
// ── Gateway lifecycle (delegated to LocalGatewayRegistry) ───────────────
|
||||
|
||||
// ── Test-only trace replay API ───────────────────────────────────────────
|
||||
|
||||
loadTraceEvents(slug: string, events: unknown[]): void {
|
||||
this.traceReplay.loadEvents(slug, events);
|
||||
}
|
||||
|
||||
getTraceEvents(slug: string): unknown[] {
|
||||
return this.traceReplay.getEventsWithWriterFallback(slug, this.traceContextsByRunId.values());
|
||||
}
|
||||
|
||||
activateTraceSlug(slug: string): void {
|
||||
this.traceReplay.activateSlug(slug);
|
||||
}
|
||||
|
||||
clearTraceEvents(slug: string): void {
|
||||
this.traceReplay.clearEvents(slug);
|
||||
}
|
||||
|
||||
getUserIdForApiKey(key: string): string | undefined {
|
||||
return this.gatewayRegistry.getUserIdForApiKey(key);
|
||||
}
|
||||
|
|
@ -1141,7 +1244,8 @@ export class InstanceAiService {
|
|||
const modelId =
|
||||
proxyBaseUrl && tokenManager
|
||||
? await this.resolveProxyModel(user, proxyBaseUrl, tokenManager)
|
||||
: await this.settingsService.resolveModelConfig(user);
|
||||
: ((await this.resolveHttpProxyModel(user)) ??
|
||||
(await this.settingsService.resolveModelConfig(user)));
|
||||
const memory = createMemory(this.createMemoryConfig());
|
||||
await this.ensureThreadExists(memory, threadId, user.id);
|
||||
|
||||
|
|
@ -1525,7 +1629,15 @@ export class InstanceAiService {
|
|||
proxyConfig: orchestrationContext.tracingProxyConfig,
|
||||
});
|
||||
|
||||
// When trace replay is enabled but LangSmith isn't configured,
|
||||
// create a minimal context that only supports replay/record wrapping.
|
||||
if (!tracing && process.env.E2E_TESTS === 'true') {
|
||||
const { createTraceReplayOnlyContext } = await import('@n8n/instance-ai');
|
||||
tracing = createTraceReplayOnlyContext();
|
||||
}
|
||||
|
||||
if (tracing) {
|
||||
await this.configureTraceReplayMode(tracing);
|
||||
orchestrationContext.tracing = tracing;
|
||||
this.runState.attachTracing(threadId, tracing);
|
||||
this.storeTraceContext(runId, threadId, tracing, messageGroupId);
|
||||
|
|
|
|||
117
packages/cli/src/modules/instance-ai/trace-replay-state.ts
Normal file
117
packages/cli/src/modules/instance-ai/trace-replay-state.ts
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
import type {
|
||||
InstanceAiTraceContext,
|
||||
TraceIndex as TraceIndexType,
|
||||
IdRemapper as IdRemapperType,
|
||||
TraceEvent,
|
||||
} from '@n8n/instance-ai';
|
||||
|
||||
/**
|
||||
* Manages test-only trace replay state for Instance AI e2e tests.
|
||||
* Encapsulates trace event storage, the active slug, and shared
|
||||
* TraceIndex/IdRemapper instances that are reused across runs
|
||||
* within the same test.
|
||||
*
|
||||
* Only active when E2E_TESTS env var is set.
|
||||
*/
|
||||
export class TraceReplayState {
|
||||
/** In-memory store for tool trace events keyed by test slug. */
|
||||
private eventsBySlug = new Map<string, unknown[]>();
|
||||
|
||||
/** Slug of the active trace recording. */
|
||||
private activeSlug: string | undefined;
|
||||
|
||||
/** Shared TraceIndex per slug — reused across all runs within one test. */
|
||||
private sharedTraceIndex?: TraceIndexType;
|
||||
|
||||
private sharedIdRemapper?: IdRemapperType;
|
||||
|
||||
private sharedTraceSlug?: string;
|
||||
|
||||
getActiveSlug(): string | undefined {
|
||||
return this.activeSlug;
|
||||
}
|
||||
|
||||
loadEvents(slug: string, events: unknown[]): void {
|
||||
this.eventsBySlug.set(slug, events);
|
||||
this.activeSlug = slug;
|
||||
}
|
||||
|
||||
getEvents(slug: string): unknown[] {
|
||||
return this.eventsBySlug.get(slug) ?? [];
|
||||
}
|
||||
|
||||
activateSlug(slug: string): void {
|
||||
this.activeSlug = slug;
|
||||
}
|
||||
|
||||
clearEvents(slug: string): void {
|
||||
this.eventsBySlug.delete(slug);
|
||||
if (this.activeSlug === slug) {
|
||||
this.activeSlug = undefined;
|
||||
}
|
||||
if (this.sharedTraceSlug === slug) {
|
||||
this.sharedTraceIndex = undefined;
|
||||
this.sharedIdRemapper = undefined;
|
||||
this.sharedTraceSlug = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Preserve recorded trace events from a writer into the slug-scoped store
|
||||
* so the test fixture teardown can still retrieve them via GET.
|
||||
*/
|
||||
preserveWriterEvents(slug: string, writerEvents: unknown[]): void {
|
||||
const existing = this.eventsBySlug.get(slug) ?? [];
|
||||
existing.push(...writerEvents);
|
||||
this.eventsBySlug.set(slug, existing);
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect events from active trace writers for a given slug.
|
||||
* Returns the events if found, or falls back to preserved events.
|
||||
*/
|
||||
getEventsWithWriterFallback(
|
||||
slug: string,
|
||||
activeWriterEntries: Iterable<{ traceSlug?: string; tracing: InstanceAiTraceContext }>,
|
||||
): unknown[] {
|
||||
const fromWriters: unknown[] = [];
|
||||
for (const entry of activeWriterEntries) {
|
||||
if (entry.traceSlug === slug && entry.tracing.traceWriter) {
|
||||
fromWriters.push(...entry.tracing.traceWriter.getEvents());
|
||||
}
|
||||
}
|
||||
if (fromWriters.length > 0) return fromWriters;
|
||||
|
||||
return this.eventsBySlug.get(slug) ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure trace replay mode on a tracing context.
|
||||
* In replay mode, reuses shared TraceIndex/IdRemapper across all runs.
|
||||
* In record mode, creates a new TraceWriter.
|
||||
*/
|
||||
async configureReplayMode(tracing: InstanceAiTraceContext): Promise<void> {
|
||||
if (process.env.E2E_TESTS !== 'true') {
|
||||
return;
|
||||
}
|
||||
|
||||
const { TraceIndex: TI, IdRemapper: IR, TraceWriter: TW } = await import('@n8n/instance-ai');
|
||||
|
||||
const slug = this.activeSlug;
|
||||
const events = slug ? this.eventsBySlug.get(slug) : undefined;
|
||||
|
||||
if (events && events.length > 0) {
|
||||
if (this.sharedTraceSlug !== slug || !this.sharedTraceIndex) {
|
||||
this.sharedTraceIndex = new TI(events as TraceEvent[]);
|
||||
this.sharedIdRemapper = new IR();
|
||||
this.sharedTraceSlug = slug;
|
||||
}
|
||||
tracing.replayMode = 'replay';
|
||||
tracing.traceIndex = this.sharedTraceIndex;
|
||||
tracing.idRemapper = this.sharedIdRemapper!;
|
||||
} else {
|
||||
tracing.replayMode = 'record';
|
||||
tracing.traceWriter = new TW('recording');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -151,6 +151,7 @@ import IconLucideLightbulb from '~icons/lucide/lightbulb';
|
|||
import IconLucideLink from '~icons/lucide/link';
|
||||
import IconLucideList from '~icons/lucide/list';
|
||||
import IconLucideListChecks from '~icons/lucide/list-checks';
|
||||
import IconLucideLoaderCircle from '~icons/lucide/loader-circle';
|
||||
import IconLucideLoader2 from '~icons/lucide/loader2';
|
||||
import IconLucideLock from '~icons/lucide/lock';
|
||||
import IconLucideLogIn from '~icons/lucide/log-in';
|
||||
|
|
@ -715,6 +716,7 @@ export const updatedIconSet = {
|
|||
'zoom-in': IconLucideZoomIn,
|
||||
'zoom-out': IconLucideZoomOut,
|
||||
loader: IconLucideLoader2,
|
||||
'loader-circle': IconLucideLoaderCircle,
|
||||
'quick-connect': IconLucideFlame,
|
||||
} as const;
|
||||
|
||||
|
|
|
|||
|
|
@ -548,6 +548,99 @@ describe('executionFinished', () => {
|
|||
|
||||
expect(runWorkflow).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should clear executing node queue even when fetchExecutionData returns undefined', async () => {
|
||||
const pinia = createTestingPinia({
|
||||
initialState: {
|
||||
workflows: {
|
||||
activeExecutionId: '123',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
setActivePinia(pinia);
|
||||
|
||||
const workflowsStore = mockedStore(useWorkflowsStore);
|
||||
const workflowsListStore = mockedStore(useWorkflowsListStore);
|
||||
|
||||
workflowsStore.activeExecutionId = '123';
|
||||
|
||||
vi.spyOn(workflowsListStore, 'getWorkflowById').mockReturnValue({
|
||||
id: '1',
|
||||
name: 'Test Workflow',
|
||||
nodes: [],
|
||||
connections: {},
|
||||
active: false,
|
||||
settings: {},
|
||||
} as unknown as ReturnType<typeof workflowsListStore.getWorkflowById>);
|
||||
|
||||
// Simulate the iframe scenario: fetch returns no data
|
||||
vi.spyOn(workflowsStore, 'fetchExecutionDataById').mockResolvedValue(null);
|
||||
|
||||
const clearNodeExecutionQueue = vi.fn();
|
||||
const workflowState = mock<WorkflowState>({
|
||||
executingNode: {
|
||||
lastAddedExecutingNode: 'LastNode',
|
||||
clearNodeExecutionQueue,
|
||||
},
|
||||
setActiveExecutionId: vi.fn(),
|
||||
});
|
||||
|
||||
await executionFinished(
|
||||
{
|
||||
type: 'executionFinished',
|
||||
data: {
|
||||
executionId: '123',
|
||||
workflowId: '1',
|
||||
status: 'success',
|
||||
},
|
||||
},
|
||||
{
|
||||
router: mock<Router>(),
|
||||
workflowState,
|
||||
},
|
||||
);
|
||||
|
||||
// The executing node queue must be cleared so nodes don't stay stuck
|
||||
// with a spinner after the execution finishes.
|
||||
expect(clearNodeExecutionQueue).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should clear executing node queue when activeExecutionId is undefined (iframe preview)', async () => {
|
||||
const pinia = createTestingPinia();
|
||||
setActivePinia(pinia);
|
||||
|
||||
const workflowsStore = mockedStore(useWorkflowsStore);
|
||||
// In iframe preview after resetWorkspace, activeExecutionId can be undefined
|
||||
workflowsStore.activeExecutionId = undefined;
|
||||
|
||||
const clearNodeExecutionQueue = vi.fn();
|
||||
const workflowState = mock<WorkflowState>({
|
||||
executingNode: {
|
||||
lastAddedExecutingNode: 'LastNode',
|
||||
clearNodeExecutionQueue,
|
||||
},
|
||||
});
|
||||
|
||||
await executionFinished(
|
||||
{
|
||||
type: 'executionFinished',
|
||||
data: {
|
||||
executionId: '123',
|
||||
workflowId: '1',
|
||||
status: 'success',
|
||||
},
|
||||
},
|
||||
{
|
||||
router: mock<Router>(),
|
||||
workflowState,
|
||||
},
|
||||
);
|
||||
|
||||
// Even when activeExecutionId is undefined (iframe early return),
|
||||
// the executing node queue must be cleared.
|
||||
expect(clearNodeExecutionQueue).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('manual execution stats tracking', () => {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ export async function executionFinished(
|
|||
const readyToRunStore = useReadyToRunStore();
|
||||
|
||||
options.workflowState.executingNode.lastAddedExecutingNode = null;
|
||||
options.workflowState.executingNode.clearNodeExecutionQueue();
|
||||
|
||||
// No workflow is actively running, therefore we ignore this event
|
||||
if (typeof workflowsStore.activeExecutionId === 'undefined') {
|
||||
|
|
@ -480,8 +481,7 @@ export function setRunExecutionData(
|
|||
const runDataExecutedErrorMessage = getRunDataExecutedErrorMessage(execution);
|
||||
const workflowExecution = workflowsStore.getWorkflowExecution;
|
||||
|
||||
// @TODO(ckolb): Should this call `clearNodeExecutionQueue` instead?
|
||||
workflowState.executingNode.executingNode.length = 0;
|
||||
workflowState.executingNode.clearNodeExecutionQueue();
|
||||
|
||||
if (workflowExecution === null) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -350,6 +350,7 @@ const eventRelay = useEventRelay({
|
|||
workflowExecutions: executionTracking.workflowExecutions,
|
||||
activeWorkflowId: preview.activeWorkflowId,
|
||||
getBufferedEvents: executionTracking.getBufferedEvents,
|
||||
clearEventLog: executionTracking.clearEventLog,
|
||||
relay: (event) => workflowPreviewRef.value?.relayPushEvent(event),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ export async function createInstanceAiHarness(): Promise<InstanceAiHarness> {
|
|||
workflowExecutions: executionTracking.workflowExecutions,
|
||||
activeWorkflowId: preview.activeWorkflowId,
|
||||
getBufferedEvents: executionTracking.getBufferedEvents,
|
||||
clearEventLog: executionTracking.clearEventLog,
|
||||
relay: (event) => relayedEvents.push(event),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -50,12 +50,14 @@ function createExecState(
|
|||
|
||||
describe('useEventRelay', () => {
|
||||
let relay: Mock;
|
||||
let clearEventLog: Mock;
|
||||
let workflowExecutions: Ref<Map<string, WorkflowExecutionState>>;
|
||||
let activeWorkflowId: Ref<string | null>;
|
||||
let bufferedEventsStore: Map<string, PushMessage[]>;
|
||||
|
||||
function setup(overrides?: { activeWfId?: string | null }) {
|
||||
relay = vi.fn();
|
||||
clearEventLog = vi.fn();
|
||||
workflowExecutions = ref(new Map<string, WorkflowExecutionState>());
|
||||
activeWorkflowId = ref(overrides?.activeWfId ?? null);
|
||||
bufferedEventsStore = new Map<string, PushMessage[]>();
|
||||
|
|
@ -64,6 +66,7 @@ describe('useEventRelay', () => {
|
|||
workflowExecutions,
|
||||
activeWorkflowId: computed(() => activeWorkflowId.value),
|
||||
getBufferedEvents: (wfId: string) => bufferedEventsStore.get(wfId) ?? [],
|
||||
clearEventLog,
|
||||
relay,
|
||||
});
|
||||
}
|
||||
|
|
@ -222,5 +225,88 @@ describe('useEventRelay', () => {
|
|||
expect(finishEvent.type).toBe('executionFinished');
|
||||
expect(finishEvent.data.status).toBe('error');
|
||||
});
|
||||
|
||||
test('calls clearEventLog on running → finished transition', async () => {
|
||||
setup({ activeWfId: 'wf-1' });
|
||||
|
||||
workflowExecutions.value = new Map([
|
||||
[
|
||||
'wf-1',
|
||||
createExecState('wf-1', 'exec-1', 'running', [nodeExecuteBeforeEvent('exec-1', 'N1')]),
|
||||
],
|
||||
]);
|
||||
await nextTick();
|
||||
expect(clearEventLog).not.toHaveBeenCalled();
|
||||
|
||||
workflowExecutions.value = new Map([
|
||||
['wf-1', createExecState('wf-1', 'exec-1', 'success', [])],
|
||||
]);
|
||||
await nextTick();
|
||||
|
||||
expect(clearEventLog).toHaveBeenCalledWith('wf-1');
|
||||
});
|
||||
|
||||
test('relays coalesced events that arrived between watcher fires', async () => {
|
||||
setup({ activeWfId: 'wf-1' });
|
||||
|
||||
// Simulate multiple events arriving in a single batch (Vue may coalesce ref updates)
|
||||
const event1 = nodeExecuteBeforeEvent('exec-1', 'Node1');
|
||||
const event2 = nodeExecuteAfterEvent('exec-1', 'Node1');
|
||||
const event3 = nodeExecuteBeforeEvent('exec-1', 'Node2');
|
||||
workflowExecutions.value = new Map([
|
||||
['wf-1', createExecState('wf-1', 'exec-1', 'running', [event1, event2, event3])],
|
||||
]);
|
||||
await nextTick();
|
||||
|
||||
// All three events should be relayed, not just the last one
|
||||
expect(relay).toHaveBeenCalledTimes(3);
|
||||
expect(relay).toHaveBeenNthCalledWith(1, event1);
|
||||
expect(relay).toHaveBeenNthCalledWith(2, event2);
|
||||
expect(relay).toHaveBeenNthCalledWith(3, event3);
|
||||
});
|
||||
|
||||
test('does not double-relay events after handleIframeReady', async () => {
|
||||
const { handleIframeReady } = setup({ activeWfId: 'wf-1' });
|
||||
|
||||
const event1 = nodeExecuteBeforeEvent('exec-1', 'Node1');
|
||||
const event2 = nodeExecuteAfterEvent('exec-1', 'Node1');
|
||||
bufferedEventsStore.set('wf-1', [event1, event2]);
|
||||
|
||||
// handleIframeReady replays buffer and sets relayedCount
|
||||
handleIframeReady();
|
||||
await nextTick();
|
||||
expect(relay).toHaveBeenCalledTimes(2);
|
||||
|
||||
// Now watcher fires with the same events — should not re-relay
|
||||
workflowExecutions.value = new Map([
|
||||
['wf-1', createExecState('wf-1', 'exec-1', 'running', [event1, event2])],
|
||||
]);
|
||||
await nextTick();
|
||||
|
||||
// Still just 2 calls — watcher did not double-relay
|
||||
expect(relay).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
test('relays pending events before sending executionFinished on transition', async () => {
|
||||
setup({ activeWfId: 'wf-1' });
|
||||
|
||||
const nodeEvent = nodeExecuteBeforeEvent('exec-1', 'Node1');
|
||||
workflowExecutions.value = new Map([
|
||||
['wf-1', createExecState('wf-1', 'exec-1', 'running', [nodeEvent])],
|
||||
]);
|
||||
await nextTick();
|
||||
|
||||
// Transition to success with pending events still in the log
|
||||
const lateEvent = nodeExecuteAfterEvent('exec-1', 'Node1');
|
||||
workflowExecutions.value = new Map([
|
||||
['wf-1', createExecState('wf-1', 'exec-1', 'success', [nodeEvent, lateEvent])],
|
||||
]);
|
||||
await nextTick();
|
||||
|
||||
// Should relay: nodeEvent (already done), lateEvent, then executionFinished
|
||||
expect(relay).toHaveBeenCalledTimes(3);
|
||||
expect(relay).toHaveBeenNthCalledWith(2, lateEvent);
|
||||
expect(relay.mock.calls[2][0].type).toBe('executionFinished');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -130,14 +130,15 @@ describe('useExecutionPushEvents', () => {
|
|||
expect(getStatus('wf-1')).toBe('error');
|
||||
});
|
||||
|
||||
test('clears eventLog on finish', () => {
|
||||
test('preserves eventLog on finish so relay can drain it', () => {
|
||||
const { getBufferedEvents } = useExecutionPushEvents();
|
||||
|
||||
simulatePushEvent(executionStartedEvent('exec-1', 'wf-1'));
|
||||
simulatePushEvent(nodeExecuteBeforeEvent('exec-1', 'Node1'));
|
||||
simulatePushEvent(executionFinishedEvent('exec-1', 'wf-1', 'success'));
|
||||
|
||||
expect(getBufferedEvents('wf-1')).toHaveLength(0);
|
||||
// eventLog is preserved — the relay clears it via clearEventLog() after processing
|
||||
expect(getBufferedEvents('wf-1')).toHaveLength(2);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -182,6 +183,66 @@ describe('useExecutionPushEvents', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('clearEventLog', () => {
|
||||
test('clears the event log for a specific workflow', () => {
|
||||
const { getBufferedEvents, clearEventLog } = useExecutionPushEvents();
|
||||
|
||||
simulatePushEvent(executionStartedEvent('exec-1', 'wf-1'));
|
||||
simulatePushEvent(nodeExecuteBeforeEvent('exec-1', 'Node1'));
|
||||
expect(getBufferedEvents('wf-1')).toHaveLength(2);
|
||||
|
||||
clearEventLog('wf-1');
|
||||
|
||||
expect(getBufferedEvents('wf-1')).toHaveLength(0);
|
||||
});
|
||||
|
||||
test('does not affect other workflows', () => {
|
||||
const { getBufferedEvents, clearEventLog } = useExecutionPushEvents();
|
||||
|
||||
simulatePushEvent(executionStartedEvent('exec-1', 'wf-1'));
|
||||
simulatePushEvent(executionStartedEvent('exec-2', 'wf-2'));
|
||||
simulatePushEvent(nodeExecuteBeforeEvent('exec-1', 'Node1'));
|
||||
|
||||
clearEventLog('wf-1');
|
||||
|
||||
expect(getBufferedEvents('wf-1')).toHaveLength(0);
|
||||
expect(getBufferedEvents('wf-2')).toHaveLength(1);
|
||||
});
|
||||
|
||||
test('is a no-op for unknown workflow', () => {
|
||||
const { clearEventLog, getBufferedEvents } = useExecutionPushEvents();
|
||||
|
||||
clearEventLog('unknown-wf');
|
||||
|
||||
expect(getBufferedEvents('unknown-wf')).toEqual([]);
|
||||
});
|
||||
|
||||
test('is a no-op when event log is already empty', () => {
|
||||
const { clearEventLog, workflowExecutions } = useExecutionPushEvents();
|
||||
|
||||
simulatePushEvent(executionStartedEvent('exec-1', 'wf-1'));
|
||||
const refBefore = workflowExecutions.value;
|
||||
|
||||
clearEventLog('wf-1'); // has 1 event — clears it
|
||||
clearEventLog('wf-1'); // already empty — should be no-op
|
||||
const refAfter = workflowExecutions.value;
|
||||
|
||||
// Second call should not have created a new Map reference
|
||||
expect(refAfter).not.toBe(refBefore); // first call did change
|
||||
});
|
||||
|
||||
test('preserves other entry fields (status, executionId)', () => {
|
||||
const { getStatus, clearEventLog } = useExecutionPushEvents();
|
||||
|
||||
simulatePushEvent(executionStartedEvent('exec-1', 'wf-1'));
|
||||
simulatePushEvent(nodeExecuteBeforeEvent('exec-1', 'Node1'));
|
||||
|
||||
clearEventLog('wf-1');
|
||||
|
||||
expect(getStatus('wf-1')).toBe('running');
|
||||
});
|
||||
});
|
||||
|
||||
describe('clearAll', () => {
|
||||
test('wipes all execution state', () => {
|
||||
const { getStatus, getBufferedEvents, clearAll } = useExecutionPushEvents();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { N8nSpinner, N8nText } from '@n8n/design-system';
|
||||
import { N8nIcon, N8nText } from '@n8n/design-system';
|
||||
import { useI18n } from '@n8n/i18n';
|
||||
import DataTableTable from '@/features/core/dataTable/components/dataGrid/DataTableTable.vue';
|
||||
import { useDataTableStore } from '@/features/core/dataTable/dataTable.store';
|
||||
|
|
@ -80,7 +80,7 @@ watch(
|
|||
|
||||
<!-- Loading overlay (shown during initial load or when no data table yet) -->
|
||||
<div v-if="isLoading && !dataTable" :class="$style.centerState">
|
||||
<N8nSpinner type="dots" />
|
||||
<N8nIcon icon="loader-circle" :size="80" spin />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { N8nIcon, N8nIconButton } from '@n8n/design-system';
|
||||
import { N8nIconButton } from '@n8n/design-system';
|
||||
import { computed, nextTick, watch } from 'vue';
|
||||
import type { ArtifactTab } from '../useCanvasPreview';
|
||||
|
||||
|
|
@ -48,7 +48,6 @@ const externalLinkHref = computed(() => {
|
|||
:class="[$style.tab, tab.id === activeTabId ? $style.activeTab : '']"
|
||||
@click="emit('update:activeTabId', tab.id)"
|
||||
>
|
||||
<N8nIcon :icon="tab.icon" size="medium" :class="$style.tabIcon" />
|
||||
<span :class="$style.tabLabel">{{ tab.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -62,7 +61,13 @@ const externalLinkHref = computed(() => {
|
|||
:href="externalLinkHref"
|
||||
target="_blank"
|
||||
/>
|
||||
<N8nIconButton icon="x" variant="ghost" size="medium" @click="emit('close')" />
|
||||
<N8nIconButton
|
||||
icon="x"
|
||||
variant="ghost"
|
||||
size="medium"
|
||||
data-test-id="instance-ai-preview-close"
|
||||
@click="emit('close')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -96,14 +101,14 @@ const externalLinkHref = computed(() => {
|
|||
.tab {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing--4xs);
|
||||
height: 100%;
|
||||
padding: 0 var(--spacing--sm);
|
||||
padding-bottom: calc(var(--spacing--2xs) + 2px);
|
||||
font-size: var(--font-size--2xs);
|
||||
font-weight: var(--font-weight--bold);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
color: var(--color--text);
|
||||
border-bottom: 2px solid transparent;
|
||||
|
||||
&:hover {
|
||||
color: var(--color--primary);
|
||||
|
|
@ -112,12 +117,7 @@ const externalLinkHref = computed(() => {
|
|||
|
||||
.activeTab {
|
||||
color: var(--color--primary);
|
||||
padding-bottom: var(--spacing--2xs);
|
||||
border-bottom: var(--color--primary) 2px solid;
|
||||
}
|
||||
|
||||
.tabIcon {
|
||||
flex-shrink: 0;
|
||||
border-bottom-color: var(--color--primary);
|
||||
}
|
||||
|
||||
.tabLabel {
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ defineExpose({ relayPushEvent });
|
|||
|
||||
<!-- Loading overlay (shown during initial load or when no workflow yet) -->
|
||||
<div v-if="isLoading && !workflow" :class="$style.centerState">
|
||||
<N8nIcon icon="spinner" color="primary" size="xxlarge" spin />
|
||||
<N8nIcon icon="loader-circle" :size="80" spin />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ interface UseEventRelayOptions {
|
|||
workflowExecutions: Ref<Map<string, WorkflowExecutionState>>;
|
||||
activeWorkflowId: ComputedRef<string | null>;
|
||||
getBufferedEvents: (wfId: string) => PushMessage[];
|
||||
clearEventLog: (wfId: string) => void;
|
||||
relay: (event: PushMessage) => void;
|
||||
}
|
||||
|
||||
|
|
@ -13,6 +14,7 @@ export function useEventRelay({
|
|||
workflowExecutions,
|
||||
activeWorkflowId,
|
||||
getBufferedEvents,
|
||||
clearEventLog,
|
||||
relay,
|
||||
}: UseEventRelayOptions) {
|
||||
function handleIframeReady() {
|
||||
|
|
@ -24,6 +26,8 @@ export function useEventRelay({
|
|||
const wfId = activeWorkflowId.value;
|
||||
if (!wfId) return;
|
||||
const buffered = getBufferedEvents(wfId);
|
||||
// Reset relay cursor so we don't double-relay events already in the buffer
|
||||
relayedCount.set(wfId, buffered.length);
|
||||
for (const event of buffered) {
|
||||
relay(event);
|
||||
}
|
||||
|
|
@ -35,33 +39,77 @@ export function useEventRelay({
|
|||
// and relay the executionFinished event (which clears the iframe's executing node queue).
|
||||
const prevStatus = new Map<string, string>();
|
||||
|
||||
// Track how many events from the eventLog have already been relayed, so that
|
||||
// if the Vue watcher coalesces multiple ref updates into a single callback we
|
||||
// still relay every event (not just the last one).
|
||||
const relayedCount = new Map<string, number>();
|
||||
|
||||
// Track the last-seen executionId per workflow so we can detect when a new
|
||||
// execution replaces the previous one (useExecutionPushEvents assigns a fresh
|
||||
// eventLog on executionStarted) and reset the relay cursor accordingly.
|
||||
const lastExecutionId = new Map<string, string>();
|
||||
|
||||
watch(
|
||||
() => workflowExecutions.value,
|
||||
(executions) => {
|
||||
const wfId = activeWorkflowId.value;
|
||||
if (!wfId) return;
|
||||
const entry = executions.get(wfId);
|
||||
if (!entry) return;
|
||||
const activeId = activeWorkflowId.value;
|
||||
|
||||
const prev = prevStatus.get(wfId);
|
||||
prevStatus.set(wfId, entry.status);
|
||||
|
||||
if (entry.status === 'running') {
|
||||
const log = entry.eventLog;
|
||||
if (log.length > 0) {
|
||||
relay(log[log.length - 1]);
|
||||
for (const [wfId, entry] of executions) {
|
||||
// Detect a re-execution on the same workflow: the new eventLog starts
|
||||
// fresh, so our relay cursor from the previous execution is stale and
|
||||
// would cause us to skip the new execution's events.
|
||||
// We only reset when we've previously seen a different executionId —
|
||||
// an initial undefined prevExecId could be a handleIframeReady that
|
||||
// already set relayedCount to the buffered length, and resetting here
|
||||
// would cause double-relay.
|
||||
const prevExecId = lastExecutionId.get(wfId);
|
||||
if (prevExecId !== undefined && prevExecId !== entry.executionId) {
|
||||
relayedCount.delete(wfId);
|
||||
}
|
||||
lastExecutionId.set(wfId, entry.executionId);
|
||||
|
||||
const isActive = wfId === activeId;
|
||||
const prev = prevStatus.get(wfId);
|
||||
prevStatus.set(wfId, entry.status);
|
||||
|
||||
if (isActive) {
|
||||
const log = entry.eventLog;
|
||||
const alreadyRelayed = relayedCount.get(wfId) ?? 0;
|
||||
|
||||
// Relay all events that haven't been relayed yet — covers the case
|
||||
// where Vue coalesced multiple ref updates into a single watcher fire.
|
||||
for (let i = alreadyRelayed; i < log.length; i++) {
|
||||
relay(log[i]);
|
||||
}
|
||||
relayedCount.set(wfId, log.length);
|
||||
}
|
||||
|
||||
const isFinished = entry.status !== 'running';
|
||||
|
||||
if (isFinished && prev === 'running' && isActive) {
|
||||
// Active workflow transitioned running → finished.
|
||||
// All pending events were relayed above. Clear the log and send a
|
||||
// synthetic executionFinished so the iframe clears its executing
|
||||
// node queue.
|
||||
relayedCount.delete(wfId);
|
||||
clearEventLog(wfId);
|
||||
|
||||
relay({
|
||||
type: 'executionFinished',
|
||||
data: {
|
||||
executionId: entry.executionId,
|
||||
workflowId: entry.workflowId,
|
||||
status: entry.status,
|
||||
},
|
||||
} as PushMessage);
|
||||
} else if (isFinished && !isActive && entry.eventLog.length > 0) {
|
||||
// Inactive workflow finished — drop its buffered events so that if
|
||||
// the user later switches to this tab and the iframe becomes ready,
|
||||
// we don't replay events from an execution that has already
|
||||
// completed.
|
||||
relayedCount.delete(wfId);
|
||||
clearEventLog(wfId);
|
||||
}
|
||||
} else if (prev === 'running') {
|
||||
// Transition from running → success/error: relay a synthetic executionFinished
|
||||
// so the iframe clears its executing node queue.
|
||||
relay({
|
||||
type: 'executionFinished',
|
||||
data: {
|
||||
executionId: entry.executionId,
|
||||
workflowId: entry.workflowId,
|
||||
status: entry.status,
|
||||
},
|
||||
} as PushMessage);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -49,10 +49,13 @@ export function useExecutionPushEvents() {
|
|||
if (!entry || entry.executionId !== executionId) return;
|
||||
|
||||
const next = new Map(workflowExecutions.value);
|
||||
// Keep the eventLog intact so the relay watcher can forward any events
|
||||
// that arrived since its last fire before sending the synthetic
|
||||
// executionFinished. The relay clears the log via clearEventLog()
|
||||
// after it has processed all pending events.
|
||||
next.set(workflowId, {
|
||||
...entry,
|
||||
status: status === 'success' ? 'success' : 'error',
|
||||
eventLog: [],
|
||||
});
|
||||
workflowExecutions.value = next;
|
||||
|
||||
|
|
@ -86,6 +89,14 @@ export function useExecutionPushEvents() {
|
|||
return workflowExecutions.value.get(workflowId)?.eventLog ?? [];
|
||||
}
|
||||
|
||||
function clearEventLog(workflowId: string) {
|
||||
const entry = workflowExecutions.value.get(workflowId);
|
||||
if (!entry || entry.eventLog.length === 0) return;
|
||||
const next = new Map(workflowExecutions.value);
|
||||
next.set(workflowId, { ...entry, eventLog: [] });
|
||||
workflowExecutions.value = next;
|
||||
}
|
||||
|
||||
function clearAll() {
|
||||
workflowExecutions.value = new Map();
|
||||
executionToWorkflow.clear();
|
||||
|
|
@ -99,6 +110,7 @@ export function useExecutionPushEvents() {
|
|||
workflowExecutions,
|
||||
getStatus,
|
||||
getBufferedEvents,
|
||||
clearEventLog,
|
||||
clearAll,
|
||||
cleanup,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -139,14 +139,51 @@ export class ProxyServer {
|
|||
this.client = mockServerClient(parsedURL.hostname, parseInt(parsedURL.port, 10));
|
||||
}
|
||||
|
||||
/** Retry an async operation with exponential backoff (handles ECONNRESET). */
|
||||
private async withRetry<T>(
|
||||
fn: () => Promise<T>,
|
||||
{ retries = 3, delayMs = 500 }: { retries?: number; delayMs?: number } = {},
|
||||
): Promise<T> {
|
||||
let lastError: unknown;
|
||||
for (let attempt = 0; attempt <= retries; attempt++) {
|
||||
try {
|
||||
return await fn();
|
||||
} catch (error) {
|
||||
lastError = error;
|
||||
if (attempt < retries) {
|
||||
const backoff = delayMs * 2 ** attempt;
|
||||
console.log(
|
||||
`Proxy request failed (attempt ${attempt + 1}/${retries + 1}), retrying in ${backoff}ms:`,
|
||||
error,
|
||||
);
|
||||
await new Promise((resolve) => setTimeout(resolve, backoff));
|
||||
}
|
||||
}
|
||||
}
|
||||
throw lastError;
|
||||
}
|
||||
|
||||
async loadExpectations(
|
||||
folderName: string,
|
||||
options: { strictBodyMatching?: boolean } = {},
|
||||
options: {
|
||||
strictBodyMatching?: boolean;
|
||||
partialBodyMatching?: boolean;
|
||||
sequential?: boolean;
|
||||
} = {},
|
||||
): Promise<void> {
|
||||
try {
|
||||
const targetDir = join(this.expectationsDir, folderName);
|
||||
const files = await fs.readdir(targetDir);
|
||||
const jsonFiles = files.filter((file) => file.endsWith('.json'));
|
||||
let files: string[];
|
||||
try {
|
||||
files = await fs.readdir(targetDir);
|
||||
} catch (error) {
|
||||
if ((error as NodeJS.ErrnoException).code === 'ENOENT') {
|
||||
console.log(`No expectations directory: ${targetDir}, skipping`);
|
||||
return;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const jsonFiles = files.filter((file) => file.endsWith('.json')).sort();
|
||||
const expectations: Expectation[] = [];
|
||||
|
||||
for (const file of jsonFiles) {
|
||||
|
|
@ -163,18 +200,45 @@ export class ProxyServer {
|
|||
(expectation.httpRequest as { body: { matchType: string } }).body.matchType = 'STRICT';
|
||||
}
|
||||
|
||||
if (
|
||||
options.partialBodyMatching &&
|
||||
expectation.httpRequest &&
|
||||
'body' in expectation.httpRequest
|
||||
) {
|
||||
(expectation.httpRequest as { body: { matchType: string } }).body.matchType =
|
||||
'ONLY_MATCHING_FIELDS';
|
||||
}
|
||||
|
||||
if (options.sequential) {
|
||||
expectation.times = { remainingTimes: 1 };
|
||||
}
|
||||
|
||||
expectations.push(expectation);
|
||||
} catch (parseError) {
|
||||
console.log(`Error parsing expectation from ${file}:`, parseError);
|
||||
}
|
||||
}
|
||||
|
||||
// In sequential mode, make the last LLM expectation unlimited so it
|
||||
// acts as a fallback — returning the same final response for any extra
|
||||
// calls caused by tool execution divergence during replay.
|
||||
if (options.sequential && expectations.length > 0) {
|
||||
for (let i = expectations.length - 1; i >= 0; i--) {
|
||||
const path = (expectations[i].httpRequest as { path?: string })?.path;
|
||||
if (path === '/v1/messages') {
|
||||
expectations[i].times = { unlimited: true };
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (expectations.length > 0) {
|
||||
console.log('Loading expectations:', expectations.length);
|
||||
await this.client.mockAnyResponse(expectations);
|
||||
await this.withRetry(async () => await this.client.mockAnyResponse(expectations));
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('Error loading expectations:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +268,7 @@ export class ProxyServer {
|
|||
|
||||
async clearAllExpectations(): Promise<void> {
|
||||
try {
|
||||
await this.client.clear('', 'ALL');
|
||||
await this.withRetry(async () => await this.client.clear('', 'ALL'));
|
||||
} catch (error) {
|
||||
throw new Error(`Failed to clear ProxyServer: ${JSON.stringify(error)}`);
|
||||
}
|
||||
|
|
@ -255,6 +319,7 @@ export class ProxyServer {
|
|||
host?: string;
|
||||
dedupe?: boolean;
|
||||
raw?: boolean;
|
||||
clearDir?: boolean;
|
||||
transform?: (expectation: Expectation) => Expectation;
|
||||
},
|
||||
): Promise<void> {
|
||||
|
|
@ -265,6 +330,14 @@ export class ProxyServer {
|
|||
|
||||
const targetDir = join(this.expectationsDir, folderName);
|
||||
|
||||
if (options?.clearDir) {
|
||||
await fs.rm(targetDir, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
if (recordedExpectations.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
await fs.mkdir(targetDir, { recursive: true });
|
||||
const seenRequests = new Set<string>();
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["2144"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=hYM2Wjb_E2XYeEiakXKYruxDi85_0iAQHotJYYL_rh4-1775805976.061354-1.0.1.1-DJQ9KbS5gpIlwRS7Bnrli3dkRhFeJe0z85aEghEjKIw; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=2145"],
|
||||
"request-id": ["req_011CZuhAap989dhULJXrTQar"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:16Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:16Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:16Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:16Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:18 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea005b66d9733a5-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "hYM2Wjb_E2XYeEiakXKYruxDi85_0iAQHotJYYL_rh4-1775805976.061354-1.0.1.1-DJQ9KbS5gpIlwRS7Bnrli3dkRhFeJe0z85aEghEjKIw"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01Brf49UhYvAGoWQ1imjuWtG\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1269,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Building\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" your \\\"preview auto-open test\\\" workflow now!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1269,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":15} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxQnJmNDlVaFl2QUdvV1ExaW1qdVd0RyIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEyNjksImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2Vuc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NvbiI6ImVuZF90dXJuIiwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsfSwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjoxMjY5LCJjYWNoZV9jcmVhdGlvbl9pbnB1dF90b2tlbnMiOjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjoxMjM2MCwib3V0cHV0X3Rva2VucyI6MTV9ICAgICAgICAgICAgICB9CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805992906-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["940"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=7.XiVbOXIR2WD60h.PEsXOTs0A5LcIFlDaLTiiq.Z8w-1775805979.34705-1.0.1.1-0ZPG4wCERfoe0f3NdOBzJiGKmhX0P2heXKMnYLvImio; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=946"],
|
||||
"request-id": ["req_011CZuhAphp8tASuZLU6522t"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:20Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["27000000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:19Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:20Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:20Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:20 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea005cae94f761f-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "7.XiVbOXIR2WD60h.PEsXOTs0A5LcIFlDaLTiiq.Z8w-1775805979.34705-1.0.1.1-0ZPG4wCERfoe0f3NdOBzJiGKmhX0P2heXKMnYLvImio"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_01WFGshA9oCcsDMq9m6f2RHk",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Preview auto-open test workflow"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 140,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 9,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDFXRkdzaEE5b0Njc0RNcTltNmYyUkhrIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiUHJldmlldyBhdXRvLW9wZW4gdGVzdCB3b3JrZmxvdyJ9XSwic3RvcF9yZWFzb24iOiJlbmRfdHVybiIsInN0b3Bfc2VxdWVuY2UiOm51bGwsInN0b3BfZGV0YWlscyI6bnVsbCwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjoxNDAsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjAsImNhY2hlX2NyZWF0aW9uIjp7ImVwaGVtZXJhbF81bV9pbnB1dF90b2tlbnMiOjAsImVwaGVtZXJhbF8xaF9pbnB1dF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjo5LCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0="
|
||||
}
|
||||
},
|
||||
"id": "1775805992921-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are an expert n8n workflow builder. You generate com",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1216"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=5wzHd0OoEqvhiaD1IzQ.YvEEyDny.Ftq2KSxzE_VaAo-1775805982.6625264-1.0.1.1-Ra0ySdbHv.EezGVWuEOOEVf7PTDAhBc6tAI9n0FTMwc; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1219"],
|
||||
"request-id": ["req_011CZuhB4yJjN1tDBne3Z4Cn"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:22Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26975000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:22Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:22Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:22Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22475000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:24 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea005dfae3c34b9-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "5wzHd0OoEqvhiaD1IzQ.YvEEyDny.Ftq2KSxzE_VaAo-1775805982.6625264-1.0.1.1-Ra0ySdbHv.EezGVWuEOOEVf7PTDAhBc6tAI9n0FTMwc"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01UdEvLW6voE1Jy1KNSBcEiH\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":691,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Done\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" — the workflow \\\"preview auto-open test\\\" is ready with a Manual Trigger connected to a Set node named exactly\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" \\\"preview auto-open test\\\".\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":691,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"output_tokens\":35} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxVWRFdkxXNnZvRTFKeTFLTlNCY0VpSCIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjY5MSwiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MTYxNzYsImNhY2hlX2NyZWF0aW9uIjp7ImVwaGVtZXJhbF81bV9pbnB1dF90b2tlbnMiOjAsImVwaGVtZXJhbF8xaF9pbnB1dF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjoxLCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0gICB9CgpldmVudDogY29udGVudF9ibG9ja19zdGFydApkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX3N0YXJ0IiwiaW5kZXgiOjAsImNvbnRlbnRfYmxvY2siOnsidHlwZSI6InRleHQiLCJ0ZXh0IjoiIn0gICAgIH0KCmV2ZW50OiBwaW5nCmRhdGE6IHsidHlwZSI6ICJwaW5n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F90b2tlbnMiOjM1fSAgfQoKZXZlbnQ6IG1lc3NhZ2Vfc3RvcApkYXRhOiB7InR5cGUiOiJtZXNzYWdlX3N0b3AiICAgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805992927-unknown-host-POST-_v1_messages-4d1c93f7.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["3410"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=yWsS2C4dRZNuHPmvx7_gFHBH96x100lgZMrEXHblC7c-1775805986.7840152-1.0.1.1-gn5xKLf_6FuPeOVlisqhzYJdeWigFNJLMzs2ou3SmTw; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=3412"],
|
||||
"request-id": ["req_011CZuhBNYjBXe9GCUEQxNg3"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:27Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:27Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:27Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:27Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:30 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea005f968a0236c-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "yWsS2C4dRZNuHPmvx7_gFHBH96x100lgZMrEXHblC7c-1775805986.7840152-1.0.1.1-gn5xKLf_6FuPeOVlisqhzYJdeWigFNJLMzs2ou3SmTw"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01BBs3FuNkjeYpZhftyTVE32\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1367,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":12360,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"The\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" workflow **\\\"preview auto-open test\\\"** is ready! It has a Manual Trigger connected to a Set node named \\\"preview auto-open test\\\".\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" Let me know if you'd like to run it or make any changes.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1367,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"output_tokens\":51}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxQkJzM0Z1TmtqZVlwWmhmdHlUVkUzMiIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEzNjcsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MTIzNjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjowLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjoxMjM2MCwiZX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ZXMuIn0gICAgICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19zdG9wCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RvcCIsImluZGV4IjowfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEzNjcsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MTIzNjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjowLCJvdXRwdXRfdG9rZW5zIjo1MX19CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgICAgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805992928-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:26:07.164Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"build-workflow-with-agent","input":{"task":"Build a simple workflow with a Manual Trigger node and a Set node called \"preview auto-open test\". The Set node doesn't need any specific fields — just the node named correctly.","conversationContext":"User wants a simple test workflow with a Manual Trigger and a Set node named \"preview auto-open test\"."},"output":{"result":"Workflow build started (task: build-o6BfZ7pF). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.","taskId":"build-o6BfZ7pF"}}
|
||||
{"kind":"tool-call","stepId":2,"agentRole":"workflow-builder","toolName":"build-workflow","input":{"code":"\nimport { workflow, node, trigger } from '@n8n/workflow-sdk';\n\nconst manualTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Manual Trigger' }\n});\n\nconst previewNode = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'preview auto-open test',\n parameters: {\n assignments: { assignments: [] },\n options: {}\n }\n }\n});\n\nexport default workflow('preview-auto-open-test', 'preview auto-open test')\n .add(manualTrigger)\n .to(previewNode);\n","name":"preview auto-open test"},"output":{"success":true,"workflowId":"ecdTLGco3Mr0yobN"}}
|
||||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:26:24.869Z"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1966"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=CW1xhCwVoEE2JFj1RXVUjlfsRlQLCdu.8Kydo2uT3zQ-1775805987.4618607-1.0.1.1-kx80xMz1ZvyKw2zCh6HfitN261bM3mzGerinpZeWGkc; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1968"],
|
||||
"request-id": ["req_011CZuhBRRs3UTthcWj1vn7V"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:27Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26951000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:27Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19995"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:27Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:27Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22451000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:29 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea005fdaa4de504-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "CW1xhCwVoEE2JFj1RXVUjlfsRlQLCdu.8Kydo2uT3zQ-1775805987.4618607-1.0.1.1-kx80xMz1ZvyKw2zCh6HfitN261bM3mzGerinpZeWGkc"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_016i5AqiWjDuHWMTU2F1cvcD\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1096,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Building\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" your \\\"close preview test\\\" workflow now!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1096,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":13} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxNmk1QXFpV2pEdUhXTVRVMkYxY3ZjRCIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEwOTYsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSw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fcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJvdXRwdXRfdG9rZW5zIjoxM30gICAgIH0KCmV2ZW50OiBtZXNzYWdlX3N0b3AKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdG9wIiB9Cgo=",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805997995-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["977"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=MgDbgjY.DRA1Fzn6kTiLY8ARog1k5cqkVunM5vdEuBI-1775805991.1848216-1.0.1.1-22QhNXvGKUOlPuwzykaoNmNZTguyJyYJ_41uXWqhSK0; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=978"],
|
||||
"request-id": ["req_011CZuhBhJM2AnW6LKZ5Efws"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:31Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["27000000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:31Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:32Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:31Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:32 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea00614ed6de567-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "MgDbgjY.DRA1Fzn6kTiLY8ARog1k5cqkVunM5vdEuBI-1775805991.1848216-1.0.1.1-22QhNXvGKUOlPuwzykaoNmNZTguyJyYJ_41uXWqhSK0"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_01PN8refCFuJaXAeyLwRxHgR",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Close preview test workflow with manual trigger"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 136,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 10,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDFQTjhyZWZDRnVKYVhBZXlMd1J4SGdSIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiQ2xvc2UgcHJldmlldyB0ZXN0IHdvcmtmbG93IHdpdGggbWFudWFsIHRyaWdnZXIifV0sInN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGwsInVzYWdlIjp7ImlucHV0X3Rva2VucyI6MTM2LCJjYWNoZV9jcmVhdGlvbl9pbnB1dF90b2tlbnMiOjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjowLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MTAsInNlcnZpY2VfdGllciI6InN0YW5kYXJkIiwiaW5mZXJlbmNlX2dlbyI6Imdsb2JhbCJ9fQ=="
|
||||
}
|
||||
},
|
||||
"id": "1775805998005-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are an expert n8n workflow builder. You generate com",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1053"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=dw9P_uK.qzY1duqeoqSO3tOze9Ow2DkxcimOq.L6ROA-1775805993.5031893-1.0.1.1-LU9wilQh25yEsVs9GaMj2izjYsVhsKFFL9Ehy.wBguY; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1056"],
|
||||
"request-id": ["req_011CZuhBsDtxa5c9VA3qe7py"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:33Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26975000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:33Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:33Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:33Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22475000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:34 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea006236f50b9de-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "dw9P_uK.qzY1duqeoqSO3tOze9Ow2DkxcimOq.L6ROA-1775805993.5031893-1.0.1.1-LU9wilQh25yEsVs9GaMj2izjYsVhsKFFL9Ehy.wBguY"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_013pcqKCFc54F8hxhAMgc8Zr\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":671,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Done\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" — the \\\"close preview test\\\" workflow is ready with a Manual Trigger connected to an\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" empty Set node.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":671,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"output_tokens\":26}}\n\nevent: message_stop\ndata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pkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX2RlbHRhIiwiaW5kZXgiOjAsImRlbHRhIjp7InR5cGUiOiJ0ZXh0X2RlbHRhIiwidGV4dCI6IiDigJQgdGhlIFwiY2xvc2UgcHJldmlldyB0ZXN0XCIgd29ya2Zsb3cgaXMgcmVhZHkgd2l0aCBhIE1hbnVhbCBUcmlnZ2VyIGNvbm5lY3RlZCB0byBhbiJ9ICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19kZWx0YQpkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX2RlbHRhIiwiaW5kZXgiOjAsImRlbHRhIjp7InR5cGUiOiJ0ZXh0X2RlbHRhIiwidGV4dCI6IiBlbXB0eSBTZXQgbm9kZS4ifSAgICAgICAgICAgIH0KCmV2ZW50OiBjb250ZW50X2Jsb2NrX3N0b3AKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19zdG9wIiwiaW5kZXgiOjAgICAgICAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjY3MSwiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MTYxNzYsIm91dHB1dF90b2tlbnMiOjI2fX0KCmV2ZW50OiBtZXNzYWdlX3N0b3AKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdG9wIiAgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805998012-unknown-host-POST-_v1_messages-4d1c93f7.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:26:21.112Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"build-workflow-with-agent","input":{"task":"Build a simple workflow with a manual trigger and a Set node. The workflow should be named \"close preview test\". The Set node can have default/empty settings.","conversationContext":"User wants a simple workflow named \"close preview test\" with a manual trigger and a Set node."},"output":{"result":"Workflow build started (task: build-oVWnvpiv). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.","taskId":"build-oVWnvpiv"}}
|
||||
{"kind":"tool-call","stepId":2,"agentRole":"workflow-builder","toolName":"build-workflow","input":{"code":"\nimport { workflow, node, trigger } from '@n8n/workflow-sdk';\n\nconst manualTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Manual Trigger' }\n});\n\nconst setNode = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Edit Fields',\n parameters: {\n assignments: { assignments: [] },\n options: {}\n }\n }\n});\n\nexport default workflow('close-preview-test', 'close preview test')\n .add(manualTrigger)\n .to(setNode);\n","name":"close preview test"},"output":{"success":true,"workflowId":"qSPq2kQaysN24Om4"}}
|
||||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:26:35.880Z"}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1524"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=Ljfy_p0rtzHT0HWbY0_tr0v1JZz4tsCFcqeaxlCqQMg-1775805923.0969608-1.0.1.1-dp4zIG7ruQ47hoJcuxTjRbkLseqzyAl5h8arXpO8IUs; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1525"],
|
||||
"request-id": ["req_011CZuh6gCizaQLpZqdNceV7"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["27000000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:23Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:24 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea0046b5a1315ec-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "Ljfy_p0rtzHT0HWbY0_tr0v1JZz4tsCFcqeaxlCqQMg-1775805923.0969608-1.0.1.1-dp4zIG7ruQ47hoJcuxTjRbkLseqzyAl5h8arXpO8IUs"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_01FEaYLc5QJf93GtJwdXhyXY",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Hello! 👋 How are you doing today?"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 110,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 15,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDFGRWFZTGM1UUpmOTNHdEp3ZFhoeVhZIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiSGVsbG8hIPCfkYsgSG93IGFyZSB5b3UgZG9pbmcgdG9kYXk/In1dLCJzdG9wX3JlYXNvbiI6ImVuZF90dXJuIiwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjExMCwiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfY3JlYXRpb24iOnsiZXBoZW1lcmFsXzVtX2lucHV0X3Rva2VucyI6MCwiZXBoZW1lcmFsXzFoX2lucHV0X3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjE1LCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0="
|
||||
}
|
||||
},
|
||||
"id": "1775805937822-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1792"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=a7OG3pnZbOSYWrZ7yFmvfmunGK8OiMnSue.0y5ZTafg-1775805931.8400593-1.0.1.1-AsKS_PkFEODZKEuDd5KiBhuEyszD9qZR2CiiXwCpcOk; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1797"],
|
||||
"request-id": ["req_011CZuh7KdW3ubMk5NztYYXM"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:31Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:31Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:31Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:32Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:33 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004a1fc5833a5-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "a7OG3pnZbOSYWrZ7yFmvfmunGK8OiMnSue.0y5ZTafg-1775805931.8400593-1.0.1.1-AsKS_PkFEODZKEuDd5KiBhuEyszD9qZR2CiiXwCpcOk"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01JRBxfTzYWaEdcmRs3WpWsK\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1006,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":12360,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"I\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"'m here and ready to help! It looks like your message came\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" through as \\\"First thread message\\\" — was there something specific you'd like to do? I can help you:\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"\\n\\n- **Build or modify workflows** — automate tasks, connect apps, schedule jobs\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"\\n- **Run or debug workflows** — test executions, diagnose errors\\n- **Manage credentials** — set up or\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" review API connections\\n- **Organize your workspace** — folders, tags, cleanup\\n\\nWhat would you like to work on?\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1006,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"output_tokens\":111} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxSlJCeGZUellXYUVkY21SczNXcFdzSyIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVs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ywgdGFncywgY2xlYW51cFxuXG5XaGF0IHdvdWxkIHlvdSBsaWtlIHRvIHdvcmsgb24/In0gICB9CgpldmVudDogY29udGVudF9ibG9ja19zdG9wCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RvcCIsImluZGV4IjowICAgICAgICAgICAgICAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEwMDYsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MTIzNjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjowLCJvdXRwdXRfdG9rZW5zIjoxMTF9ICAgICAgfQoKZXZlbnQ6IG1lc3NhZ2Vfc3RvcApkYXRhOiB7InR5cGUiOiJtZXNzYWdlX3N0b3AiICAgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805937828-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:29.123Z"}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["2705"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=43GC74cbeejltyzXfGRantZvL0_Ui9Is210pSShpwYQ-1775805941.2618995-1.0.1.1-C3.9CLPhrQannU84gMqXaOfC8S.bedlLmZJsx.A5h_s; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=2707"],
|
||||
"request-id": ["req_011CZuh81uAxXLqG7ktixe9t"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:41Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:41Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:41Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:41Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:44 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004dce95633a5-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "43GC74cbeejltyzXfGRantZvL0_Ui9Is210pSShpwYQ-1775805941.2618995-1.0.1.1-C3.9CLPhrQannU84gMqXaOfC8S.bedlLmZJsx.A5h_s"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01GZ4gK7fKzhueW9zY275Xkb\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1393,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Your\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" **\\\"artifact display test\\\"** workflow is ready! It has a Manual Trigger connected to a Set node named \\\"artifact display test\\\". You\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" can run it manually from the n8n editor whenever you're ready.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1393,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":48} }\n\nevent: message_stop\ndata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N0b3AKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdG9wIiAgICAgICAgIH0KCg==",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805968204-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["2570"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=q4GLOB4wjdUF4qF1YzavD62psRcMA76coF2ae7Pv9Ms-1775805953.7795722-1.0.1.1-RgUVdLn62SmPJq8KJc6TQhDbmr32ykobElAgl2GjHWg; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=2573"],
|
||||
"request-id": ["req_011CZuh8wRKtp9KL7urUrVmK"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:53Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:53Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:53Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:53Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:56 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea0052b1e23e532-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "q4GLOB4wjdUF4qF1YzavD62psRcMA76coF2ae7Pv9Ms-1775805953.7795722-1.0.1.1-RgUVdLn62SmPJq8KJc6TQhDbmr32ykobElAgl2GjHWg"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01CZMRZMVrDVms3HFzbqVKRu\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1003,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":12360,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"I\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" don't see any specific workflow, execution, or item\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" mentioned that you'd like to delete. Could you clarify what you'd like to delete? For example:\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"\\n\\n- A **workflow** (by name or ID)\\n- An **execution** record\\n- A **credential**\\n- A **folder\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"**\\n\\nPlease provide more details and I'll take care of it!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1003,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"output_tokens\":81} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxQ1pNUlpNVnJEVm1zM0hGemJxVktSdSIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEwMDMsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva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BtZXNzYWdlX3N0b3AKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdG9wIiAgICAgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805968299-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["702"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=whmM.WU3EvGLiQe7fvAVKOkMR7YSxoFIvy3eYL.q5f8-1775805959.6402156-1.0.1.1-jAt1haRIMdA6ddgXeAfVCMDtFNxNBAf2VCOVZPAv96k; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=703"],
|
||||
"request-id": ["req_011CZuh9NREaixSY1MZvrfkL"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:00Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["27000000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:59Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:00Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:00Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:00 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea0054fb8f24f3e-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "whmM.WU3EvGLiQe7fvAVKOkMR7YSxoFIvy3eYL.q5f8-1775805959.6402156-1.0.1.1-jAt1haRIMdA6ddgXeAfVCMDtFNxNBAf2VCOVZPAv96k"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_01HcJmnP3qukZ9ih8La5nbbS",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Thread to Delete"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 106,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 6,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDFIY0ptblAzcXVrWjlpaDhMYTVuYmJTIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiVGhyZWFkIHRvIERlbGV0ZSJ9XSwic3RvcF9yZWFzb24iOiJlbmRfdHVybiIsInN0b3Bfc2VxdWVuY2UiOm51bGwsInN0b3BfZGV0YWlscyI6bnVsbCwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjoxMDYsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjAsImNhY2hlX2NyZWF0aW9uIjp7ImVwaGVtZXJhbF81bV9pbnB1dF90b2tlbnMiOjAsImVwaGVtZXJhbF8xaF9pbnB1dF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjo2LCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0="
|
||||
}
|
||||
},
|
||||
"id": "1775805968314-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:50.341Z"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["824"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=0mPnbxXfx.PwlGh76qFSgtKZ2HkSiyYlOJIXmkZa628-1775805921.6181493-1.0.1.1-WlCEggApH_YkRQ5n90GwA_eTpcnG_P8lAh._8zSt084; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=827"],
|
||||
"request-id": ["req_011CZuh6Zvhc9hGGnyFHh958"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26959000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22459000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:22 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004621aa4207f-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "0mPnbxXfx.PwlGh76qFSgtKZ2HkSiyYlOJIXmkZa628-1775805921.6181493-1.0.1.1-WlCEggApH_YkRQ5n90GwA_eTpcnG_P8lAh._8zSt084"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01LPwhZgBuPEdeaHaDHDaBuE\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1109,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Building\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" your \\\"artifact display test\\\" workflow now!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1109,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":13}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQt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GxheSB0ZXN0XCIgd29ya2Zsb3cgbm93ISJ9ICAgICAgICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19zdG9wCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RvcCIsImluZGV4IjowICAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjExMDksImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJvdXRwdXRfdG9rZW5zIjoxM319CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgICAgICAgICAgIH0KCg==",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805936917-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are an expert n8n workflow builder. You generate com",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["871"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=hm3je2LXzJbtbns8eLURxGZNwbTng.4HIVZviFsR0w8-1775805928.071014-1.0.1.1-OuVsOIDZqTKLZOS2IVbPElX3OXuyBTx9Dcv4QAEgNWw; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=873"],
|
||||
"request-id": ["req_011CZuh73a73yLzus7gnwsdP"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26975000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22475000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:29 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea0048a7a91c637-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "hm3je2LXzJbtbns8eLURxGZNwbTng.4HIVZviFsR0w8-1775805928.071014-1.0.1.1-OuVsOIDZqTKLZOS2IVbPElX3OXuyBTx9Dcv4QAEgNWw"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_015ePShJ4M3rKBysUJEZoYG2\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":696,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Done\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" — the \\\"artifact display test\\\" workflow is ready with a Manual Trigger connected\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" to a Set node named \\\"artifact display test\\\".\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":696,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"output_tokens\":30} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF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YSIsInRleHQiOiIg4oCUIHRoZSBcImFydGlmYWN0IGRpc3BsYXkgdGVzdFwiIHdvcmtmbG93IGlzIHJlYWR5IHdpdGggYSBNYW51YWwgVHJpZ2dlciBjb25uZWN0ZWQifSAgICAgICAgfQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfZGVsdGEKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19kZWx0YSIsImluZGV4IjowLCJkZWx0YSI6eyJ0eXBlIjoidGV4dF9kZWx0YSIsInRleHQiOiIgdG8gYSBTZXQgbm9kZSBuYW1lZCBcImFydGlmYWN0IGRpc3BsYXkgdGVzdFwiLiJ9ICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19zdG9wCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RvcCIsImluZGV4IjowIH0KCmV2ZW50OiBtZXNzYWdlX2RlbHRhCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2VfZGVsdGEiLCJkZWx0YSI6eyJzdG9wX3JlYXNvbiI6ImVuZF90dXJuIiwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsfSwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjo2OTYsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjE2MTc2LCJvdXRwdXRfdG9rZW5zIjozMH0gICAgIH0KCmV2ZW50OiBtZXNzYWdlX3N0b3AKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdG9wIiAgICAgICAgICAgICAgIH0KCg==",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805936940-unknown-host-POST-_v1_messages-4d1c93f7.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["8125"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=42T7ikQZlRm.tIjSzK4xMSsIRCgTL9QfRBihgR00sDw-1775805923.4113417-1.0.1.1-X4kcafRU8.tL7EhYym2CjlFdhlAevfxV1u6MttXLkGg; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=8137"],
|
||||
"request-id": ["req_011CZuh6hc4g2PzJU47jsiCh"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26998000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:23Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:31Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4498000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:31 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea0046d583fc637-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "42T7ikQZlRm.tIjSzK4xMSsIRCgTL9QfRBihgR00sDw-1775805923.4113417-1.0.1.1-X4kcafRU8.tL7EhYym2CjlFdhlAevfxV1u6MttXLkGg"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_015BXuQ1SCTsworimEMnQxAe",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Here is a simple n8n workflow with a Manual Trigger and a Set node called \"artifact display test\":\n\n<artifact identifier=\"workflow\" type=\"application/n8n-workflow\" title=\"Artifact Display Test Workflow\">\n{\n \"name\": \"Artifact Display Test\",\n \"nodes\": [\n {\n \"parameters\": {},\n \"id\": \"1a2b3c4d-0001-0001-0001-000000000001\",\n \"name\": \"Manual Trigger\",\n \"type\": \"n8n-nodes-base.manualTrigger\",\n \"typeVersion\": 1,\n \"position\": [240, 300]\n },\n {\n \"parameters\": {\n \"assignments\": {\n \"assignments\": [\n {\n \"id\": \"field-001\",\n \"name\": \"message\",\n \"value\": \"Hello from the artifact display test!\",\n \"type\": \"string\"\n },\n {\n \"id\": \"field-002\",\n \"name\": \"timestamp\",\n \"value\": \"={{ $now }}\",\n \"type\": \"string\"\n }\n ]\n },\n \"options\": {}\n },\n \"id\": \"1a2b3c4d-0002-0002-0002-000000000002\",\n \"name\": \"artifact display test\",\n \"type\": \"n8n-nodes-base.set\",\n \"typeVersion\": 3.4,\n \"position\": [460, 300]\n }\n ],\n \"connections\": {\n \"Manual Trigger\": {\n \"main\": [\n [\n {\n \"node\": \"artifact display test\",\n \"type\": \"main\",\n \"index\": 0\n }\n ]\n ]\n }\n },\n \"pinData\": {},\n \"settings\": {\n \"executionOrder\": \"v1\"\n }\n}\n</artifact>\n\n### What this workflow does:\n1. **Manual Trigger** — Starts the workflow when you click \"Test workflow\" in n8n.\n2. **artifact display test** (Set node) — Sets two fields on the output item:\n - `message`: A static string `\"Hello from the artifact display test!\"`\n - `timestamp`: The current date/time using `$now`\n\nYou can import this directly into n8n and run it right away!"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 136,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 579,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDE1Qlh1UTFTQ1Rzd29yaW1FTW5ReEFlIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiSGVyZSBpcyBhIHNpbXBsZSBuOG4gd29ya2Zsb3cgd2l0aCBhIE1hbnVhbCBUcmlnZ2VyIGFuZCBhIFNldCBub2RlIGNhbGxlZCBcImFydGlmYWN0IGRpc3BsYXkgdGVzdFwiOlxuXG48YXJ0aWZhY3QgaWRlbnRpZmllcj1cIndvcmtmbG93XCIgdHlwZT1cImFwcGxpY2F0aW9uL244bi13b3JrZmxvd1wiIHRpdGxlPVwiQXJ0aWZhY3QgRGlzcGxheSBUZXN0IFdvcmtmbG93XCI+XG57XG4gIFwibmFtZVwiOiBcIkFydGlmYWN0IERpc3BsYXkgVGVzdFwiLFxuICBcIm5vZGVzXCI6IFtcbiAgICB7XG4gICAgICBcInBhcmFtZXRlcnNcIjoge30sXG4gICAgICBcImlkXCI6IFwiMWEyYjNjNGQtMDAwMS0wMDAxLTAwMDEtMDAwMDAwMDAwMDAxXCIsXG4gICAgICBcIm5hbWVcIjogXCJNYW51YWwgVHJpZ2dlclwiLFxuICAgICAgXCJ0eXBlXCI6IFwibjhuLW5vZGVzLWJhc2UubWFudWFsVHJpZ2dlclwiLFxuICAgICAgXCJ0eXBlVmVyc2lvblwiOiAxLFxuICAgICAgXCJwb3NpdGlvblwiOiBbMjQwLCAzMDBdXG4gICAgfSxcbiAgICB7XG4gICAgICBcInBhcmFtZXRlcnNcIjoge1xuICAgICAgICBcImFzc2lnbm1lbnRzXCI6IHtcbiAgICAgICAgICBcImFzc2lnbm1lbnRzXCI6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgXCJpZFwiOiBcImZpZWxkLTAwMVwiLFxuICAgICAgICAgICAgICBcIm5hbWVcIjogXCJtZXNzYWdlXCIsXG4gICAgICAgICAgICAgIFwidmFsdWVcIjogXCJIZWxsbyBmcm9tIHRoZSBhcnRpZmFjdCBkaXNwbGF5IHRlc3QhXCIsXG4gICAgICAgICAgICAgIFwidHlwZVwiOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBcImlkXCI6IFwiZmllbGQtMDAyXCIsXG4gICAgICAgICAgICAgIFwibmFtZVwiOiBcInRpbWVzdGFtcFwiLFxuICAgICAgICAgICAgICBcInZhbHVlXCI6IFwiPXt7ICRub3cgfX1cIixcbiAgICAgICAgICAgICAgXCJ0eXBlXCI6IFwic3RyaW5nXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICBdXG4gICAgICAgIH0sXG4gICAgICAgIFwib3B0aW9uc1wiOiB7fVxuICAgICAgfSxcbiAgICAgIFwiaWRcIjogXCIxYTJiM2M0ZC0wMDAyLTAwMDItMDAwMi0wMDAwMDAwMD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HVzaW5nIGAkbm93YFxuXG5Zb3UgY2FuIGltcG9ydCB0aGlzIGRpcmVjdGx5IGludG8gbjhuIGFuZCBydW4gaXQgcmlnaHQgYXdheSEifV0sInN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGwsInVzYWdlIjp7ImlucHV0X3Rva2VucyI6MTM2LCJjYWNoZV9jcmVhdGlvbl9pbnB1dF90b2tlbnMiOjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjowLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6NTc5LCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0="
|
||||
}
|
||||
},
|
||||
"id": "1775805936944-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:24:59.716Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"build-workflow-with-agent","input":{"task":"Build a simple workflow named \"artifact display test\" with a Manual Trigger node connected to a Set node called \"artifact display test\".","conversationContext":"User wants a simple workflow with a manual trigger and a set node. The workflow should be named \"artifact display test\" and the Set node should also be called \"artifact display test\"."},"output":{"result":"Workflow build started (task: build-e1bIDLIf). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.","taskId":"build-e1bIDLIf"}}
|
||||
{"kind":"tool-call","stepId":2,"agentRole":"workflow-builder","toolName":"build-workflow","input":{"code":"\nimport { workflow, node, trigger, newCredential, expr } from '@n8n/workflow-sdk';\n\nconst manualTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Manual Trigger' }\n});\n\nconst setNode = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'artifact display test',\n parameters: {\n assignments: {\n assignments: []\n },\n options: {}\n }\n }\n});\n\nexport default workflow('artifact-display-test', 'artifact display test')\n .add(manualTrigger)\n .to(setNode);\n","name":"artifact display test"},"output":{"success":true,"workflowId":"8wtDhVSxlbQCI0dh"}}
|
||||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:30.907Z"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1368"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=gPwNKSeyEGzFdhVAeGgQ15.CArASlpYRJn2i7319TOA-1775805980.4410543-1.0.1.1-kVP2nK0KQm_ebbSmLjIUSc8203mS9cosA03IS4Z_khw; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1370"],
|
||||
"request-id": ["req_011CZuhAuQqFQjVfFUmCLxMd"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:20Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:20Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:20Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:20Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:21 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea005d1cd1533a5-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "gPwNKSeyEGzFdhVAeGgQ15.CArASlpYRJn2i7319TOA-1775805980.4410543-1.0.1.1-kVP2nK0KQm_ebbSmLjIUSc8203mS9cosA03IS4Z_khw"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01UVQjS4mNgRFcK3CTwwpEV9\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1211,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Building\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" your \\\"canvas nodes test\\\" workflow now!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1211,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":13} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxVVZRalM0bU5nUkZjSzNDVHd3cEVWOSIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEyMTEsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MSwic2VydmljZV90aW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F90b2tlbnMiOjEzfSAgICB9CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgICAgIH0KCg==",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805998599-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1441"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=2fcFZcw4HwN2RlMAh6UPtkRSbX4egPGE6wWFDc9QXiI-1775805985.0491605-1.0.1.1-kvdxffzvLedu1AWjNxZHApL8p4TG6LxTwMLHc1CuyQ0; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1443"],
|
||||
"request-id": ["req_011CZuhBF4GuNrEDUKnXxRUV"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:26Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26977000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:25Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:26Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:26Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22477000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:26 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea005ee8d2ce519-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "2fcFZcw4HwN2RlMAh6UPtkRSbX4egPGE6wWFDc9QXiI-1775805985.0491605-1.0.1.1-kvdxffzvLedu1AWjNxZHApL8p4TG6LxTwMLHc1CuyQ0"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_01RAXLTDhbfzFAkZWBRHsj7g",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Create manual trigger workflow with Set node"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 134,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 10,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDFSQVhMVERoYmZ6RkFrWldCUkhzajdnIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiQ3JlYXRlIG1hbnVhbCB0cmlnZ2VyIHdvcmtmbG93IHdpdGggU2V0IG5vZGUifV0sInN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGwsInVzYWdlIjp7ImlucHV0X3Rva2VucyI6MTM0LCJjYWNoZV9jcmVhdGlvbl9pbnB1dF90b2tlbnMiOjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjowLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MTAsInNlcnZpY2VfdGllciI6InN0YW5kYXJkIiwiaW5mZXJlbmNlX2dlbyI6Imdsb2JhbCJ9fQ=="
|
||||
}
|
||||
},
|
||||
"id": "1775805998608-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are an expert n8n workflow builder. You generate com",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1031"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=JZJ6Y93iUcbGu0cTgh4VaWu3zQfnZIJMP76f_2jz1lc-1775805991.802121-1.0.1.1-P2BreY_iZozyaMSm12Y4SxjVbrj6JsCoZcZC.MHqN0M; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1034"],
|
||||
"request-id": ["req_011CZuhBk1oyLz75ir95gcrp"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:31Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26975000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:31Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:31Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:32Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22475000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:32 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea00618ca3ca57f-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "JZJ6Y93iUcbGu0cTgh4VaWu3zQfnZIJMP76f_2jz1lc-1775805991.802121-1.0.1.1-P2BreY_iZozyaMSm12Y4SxjVbrj6JsCoZcZC.MHqN0M"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01Vs6QDi1C7ZVjCNYJF1qGCy\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":672,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Done\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" — the workflow \\\"canvas nodes test\\\" is ready with a manual trigger connected to a Set node named \\\"canvas nodes test\\\".\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":672,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"output_tokens\":29} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIs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OiJ0ZXh0X2RlbHRhIiwidGV4dCI6IiDigJQgdGhlIHdvcmtmbG93IFwiY2FudmFzIG5vZGVzIHRlc3RcIiBpcyByZWFkeSB3aXRoIGEgbWFudWFsIHRyaWdnZXIgY29ubmVjdGVkIHRvIGEgU2V0IG5vZGUgbmFtZWQgXCJjYW52YXMgbm9kZXMgdGVzdFwiLiJ9ICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19zdG9wCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RvcCIsImluZGV4IjowICAgICAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjY3MiwiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MTYxNzYsIm91dHB1dF90b2tlbnMiOjI5fSAgICAgICB9CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgICAgICAgICAgICB9Cgo=",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805998612-unknown-host-POST-_v1_messages-4d1c93f7.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:26:13.054Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"build-workflow-with-agent","input":{"task":"Build a workflow with a manual trigger connected to a Set node named \"canvas nodes test\". The Set node should have the name \"canvas nodes test\".","conversationContext":"User wants a simple workflow: manual trigger → Set node named \"canvas nodes test\"."},"output":{"result":"Workflow build started (task: build-0QBbTIem). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.","taskId":"build-0QBbTIem"}}
|
||||
{"kind":"tool-call","stepId":2,"agentRole":"workflow-builder","toolName":"build-workflow","input":{"code":"\nimport { workflow, node, trigger } from '@n8n/workflow-sdk';\n\nconst manualTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'When clicking \"Test workflow\"' }\n});\n\nconst setNode = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'canvas nodes test',\n parameters: {\n assignments: { assignments: [] },\n options: {}\n }\n }\n});\n\nexport default workflow('canvas-nodes-test', 'canvas nodes test')\n .add(manualTrigger)\n .to(setNode);\n","name":"canvas nodes test"},"output":{"success":true,"workflowId":"lde6imYhBhHIvCy5"}}
|
||||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:26:34.931Z"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["850"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=0Xwhdh58bSTSdo36ojQnPWqABlSIaA9DRCDd3eRf8jU-1775805920.1855745-1.0.1.1-pXLBaeyXVqRgp6tl2l17dcVimlYIypYb0BOC7IjcvCs; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=852"],
|
||||
"request-id": ["req_011CZuh6Tk8V77owzf4SQCoy"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:20Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:20Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:20Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:20Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:21 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea00459295fc637-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "0Xwhdh58bSTSdo36ojQnPWqABlSIaA9DRCDd3eRf8jU-1775805920.1855745-1.0.1.1-pXLBaeyXVqRgp6tl2l17dcVimlYIypYb0BOC7IjcvCs"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01S78NNZx23evw7NUkGfhZXh\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1081,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":3,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Hello! \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"👋 Great to meet you! I'm your n8n Instance Agent —\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" here to help you build, run, debug, and manage your workflows. What\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" can I help you with today?\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1081,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":46} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxUzc4Tk5aeDIzZX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BBZ2VudCDigJQifSAgICAgICAgfQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfZGVsdGEKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19kZWx0YSIsImluZGV4IjowLCJkZWx0YSI6eyJ0eXBlIjoidGV4dF9kZWx0YSIsInRleHQiOiIgaGVyZSB0byBoZWxwIHlvdSBidWlsZCwgcnVuLCBkZWJ1ZywgYW5kIG1hbmFnZSB5b3VyIHdvcmtmbG93cy4gV2hhdCJ9fQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfZGVsdGEKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19kZWx0YSIsImluZGV4IjowLCJkZWx0YSI6eyJ0eXBlIjoidGV4dF9kZWx0YSIsInRleHQiOiIgY2FuIEkgaGVscCB5b3Ugd2l0aCB0b2RheT8ifSAgICAgICAgIH0KCmV2ZW50OiBjb250ZW50X2Jsb2NrX3N0b3AKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19zdG9wIiwiaW5kZXgiOjAgICAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEwODEsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJvdXRwdXRfdG9rZW5zIjo0Nn0gICAgICAgICAgICB9CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgICAgICAgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805923379-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:00.154Z"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1242"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=npLo.QiSpSUARn.NXFLECZExmsRpB8xPB5q1nW46s6s-1775805921.4736652-1.0.1.1-95EfV5ZB9LWTf3y2b8pmjwZpon6ho3gehjzm6cl_j2o; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1244"],
|
||||
"request-id": ["req_011CZuh6ZG1rpmLPEN4WDwMp"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:22 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004613b32e527-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "npLo.QiSpSUARn.NXFLECZExmsRpB8xPB5q1nW46s6s-1775805921.4736652-1.0.1.1-95EfV5ZB9LWTf3y2b8pmjwZpon6ho3gehjzm6cl_j2o"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_0195pi12XXNj9gzhk6HPfX9Z\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1096,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Building\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" your \\\"artifact click test\\\" workflow now!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1096,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":13} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxOTVwaTEyWFhOajlnemhrNkhQZlg5WiIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEwOTYsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MSwic2VydmljZV90aWVyIjoic3RhbmRhcmQiLCJpbmZlcmVuY2VfZ2VvIjoiZ2xvYmFsIn19ICAgfQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfc3RhcnQKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19zdGFydCIsImlu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||
}
|
||||
},
|
||||
"id": "1775805949874-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["992"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=VApID_nWlbeCpLAsPadbqzTHqNT8Otes0x7.lLub01Q-1775805924.025991-1.0.1.1-vVL8To_GI6SQnSNFkauGyNd3J5fn5fiDiWQf1UL1Lhk; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1027"],
|
||||
"request-id": ["req_011CZuh6kREGtEybpFhad7L6"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["27000000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:25Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:25 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea004712e609e00-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "VApID_nWlbeCpLAsPadbqzTHqNT8Otes0x7.lLub01Q-1775805924.025991-1.0.1.1-vVL8To_GI6SQnSNFkauGyNd3J5fn5fiDiWQf1UL1Lhk"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_01FtaPGtz3wBhwx43Tj6j2mY",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Simple workflow with manual trigger and Set node"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 136,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 11,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDFGdGFQR3R6M3dCaHd4NDNUajZqMm1ZIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiU2ltcGxlIHdvcmtmbG93IHdpdGggbWFudWFsIHRyaWdnZXIgYW5kIFNldCBub2RlIn1dLCJzdG9wX3JlYXNvbiI6ImVuZF90dXJuIiwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEzNiwiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfY3JlYXRpb24iOnsiZXBoZW1lcmFsXzVtX2lucHV0X3Rva2VucyI6MCwiZXBoZW1lcmFsXzFoX2lucHV0X3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjExLCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0="
|
||||
}
|
||||
},
|
||||
"id": "1775805949876-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are an expert n8n workflow builder. You generate com",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["782"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=ZZWtRjPmEQu9DR4YUbo4pyuIcIU1WjeHJP1vRX9L0d4-1775805928.0917044-1.0.1.1-n9dJI34I84KgsprACweehy5A3oxvgA0AVIm5QHA5FZc; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=784"],
|
||||
"request-id": ["req_011CZuh73Z7b4q9TibJFQD6B"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26975000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22475000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:28 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea0048a9d15e508-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "ZZWtRjPmEQu9DR4YUbo4pyuIcIU1WjeHJP1vRX9L0d4-1775805928.0917044-1.0.1.1-n9dJI34I84KgsprACweehy5A3oxvgA0AVIm5QHA5FZc"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_011ZXi4fnvre2gBqfSfEqbhj\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":683,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Done\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" — the workflow \\\"artifact click test\\\" is ready with a manual trigger connected to a Set node named \\\"artifact click test\\\".\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":683,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"output_tokens\":29}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxMVpYaTRmbnZyZTJnQnFmU2ZFcWJoaiIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiO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VkIFwiYXJ0aWZhY3QgY2xpY2sgdGVzdFwiLiJ9ICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19zdG9wCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RvcCIsImluZGV4IjowICAgICAgIH0KCmV2ZW50OiBtZXNzYWdlX2RlbHRhCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2VfZGVsdGEiLCJkZWx0YSI6eyJzdG9wX3JlYXNvbiI6ImVuZF90dXJuIiwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsfSwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjo2ODMsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjE2MTc2LCJvdXRwdXRfdG9rZW5zIjoyOX19CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805949891-unknown-host-POST-_v1_messages-4d1c93f7.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["4448"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=4qYQoTUCuYxVKPn_qUZsPCvtAVkrHRaP25y1MxXsWD0-1775805938.8596892-1.0.1.1-hpFm6U._DW8S7pWpkXKQXtztz5vAYP1YD1ku4rol8q8; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=4450"],
|
||||
"request-id": ["req_011CZuh7qi1BXgmyAuzoUvgi"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:39Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:39Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:39Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:39Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:43 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004cdda1f3237-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "4qYQoTUCuYxVKPn_qUZsPCvtAVkrHRaP25y1MxXsWD0-1775805938.8596892-1.0.1.1-hpFm6U._DW8S7pWpkXKQXtztz5vAYP1YD1ku4rol8q8"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_016rujCeP96cM6BdQdvJpKJq\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1419,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":3,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Your workflow **\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"\\\"artifact click test\\\"** is ready! It has a Manual Trigger connected to a Set node named \\\"artifact click test\\\". You can run it anytime using the manual trigger.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1419,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":43} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlk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saWNrIHRlc3RcIioqIGlzIHJlYWR5ISBJdCBoYXMgYSBNYW51YWwgVHJpZ2dlciBjb25uZWN0ZWQgdG8gYSBTZXQgbm9kZSBuYW1lZCBcImFydGlmYWN0IGNsaWNrIHRlc3RcIi4gWW91IGNhbiBydW4gaXQgYW55dGltZSB1c2luZyB0aGUgbWFudWFsIHRyaWdnZXIuIn0gICAgICAgICAgICAgfQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfc3RvcApkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX3N0b3AiLCJpbmRleCI6MCAgICAgICB9CgpldmVudDogbWVzc2FnZV9kZWx0YQpkYXRhOiB7InR5cGUiOiJtZXNzYWdlX2RlbHRhIiwiZGVsdGEiOnsic3RvcF9yZWFzb24iOiJlbmRfdHVybiIsInN0b3Bfc2VxdWVuY2UiOm51bGwsInN0b3BfZGV0YWlscyI6bnVsbH0sInVzYWdlIjp7ImlucHV0X3Rva2VucyI6MTQxOSwiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MTIzNjAsIm91dHB1dF90b2tlbnMiOjQzfSAgICAgfQoKZXZlbnQ6IG1lc3NhZ2Vfc3RvcApkYXRhOiB7InR5cGUiOiJtZXNzYWdlX3N0b3AiICAgICAgICAgICAgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805949917-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:24:59.762Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"build-workflow-with-agent","input":{"task":"Build a simple workflow with a manual trigger and a Set node. Name the workflow \"artifact click test\". The Set node should be named \"artifact click test\" as well.","conversationContext":"User wants a simple workflow with a manual trigger and a set node called \"artifact click test\"."},"output":{"result":"Workflow build started (task: build-K47GSKYu). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.","taskId":"build-K47GSKYu"}}
|
||||
{"kind":"tool-call","stepId":2,"agentRole":"workflow-builder","toolName":"build-workflow","input":{"code":"\nimport { workflow, node, trigger } from '@n8n/workflow-sdk';\n\nconst manualTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'When clicking \"Test workflow\"' }\n});\n\nconst setNode = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'artifact click test',\n parameters: {\n assignments: {\n assignments: []\n },\n options: {}\n }\n }\n});\n\nexport default workflow('artifact-click-test', 'artifact click test')\n .add(manualTrigger)\n .to(setNode);\n","name":"artifact click test"},"output":{"success":true,"workflowId":"LKeBTgUuPxgEvGLJ"}}
|
||||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:31.194Z"}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["2478"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=vcp1A2IQJgyuw2i8frfi0iMcp3Svjdj9cgRjckvJqDo-1775805913.0712695-1.0.1.1-LImtqSdGX3ZNH84B3DYA1wB5ddcV6e3rExQphZitBTk; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=2480"],
|
||||
"request-id": ["req_011CZuh5wLmrZKjQd5RJWSLJ"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:13Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26977000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:13Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:13Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:13Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22477000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:15 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea0042cbb004ae6-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "vcp1A2IQJgyuw2i8frfi0iMcp3Svjdj9cgRjckvJqDo-1775805913.0712695-1.0.1.1-LImtqSdGX3ZNH84B3DYA1wB5ddcV6e3rExQphZitBTk"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_017DgwYWwSCDuz8MnqU7UDeo\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":884,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":12360,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"I\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"'d be happy to remember a persistence message for you, but it seems like you may\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" have forgotten to include the actual message! Could you share what you\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"'d like me to remember?\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":884,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"output_tokens\":40} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxN0Rnd1lXd1NDRHV6O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
||||
"id": "1775805923367-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1181"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=kQVAKo_UjzMz5UXdZQh.p0WHz3Ch0sfT57LQfSJAwBY-1775805920.0200002-1.0.1.1-R10bOnOizjAuqERwvbvpC9.WEfi81LXx3W1pmLFXSAo; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1183"],
|
||||
"request-id": ["req_011CZuh6T2ih58g5JDeBYiwg"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["27000000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:20Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:21Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:21 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea004581bf1e51e-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "kQVAKo_UjzMz5UXdZQh.p0WHz3Ch0sfT57LQfSJAwBY-1775805920.0200002-1.0.1.1-R10bOnOizjAuqERwvbvpC9.WEfi81LXx3W1pmLFXSAo"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_01MZRuSphRp3UAMp6jJ9zMVJ",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Persistence message noted"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 108,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 7,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDFNWlJ1U3BoUnAzVUFNcDZqSjl6TVZKIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiUGVyc2lzdGVuY2UgbWVzc2FnZSBub3RlZCJ9XSwic3RvcF9yZWFzb24iOiJlbmRfdHVybiIsInN0b3Bfc2VxdWVuY2UiOm51bGwsInN0b3BfZGV0YWlscyI6bnVsbCwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjoxMDgsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjAsImNhY2hlX2NyZWF0aW9uIjp7ImVwaGVtZXJhbF81bV9pbnB1dF90b2tlbnMiOjAsImVwaGVtZXJhbF8xaF9pbnB1dF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjo3LCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0="
|
||||
}
|
||||
},
|
||||
"id": "1775805923368-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:00.712Z"}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1155"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=DahhePjKE.hk3RiBG0PWoZaz098BTZB0F1SSIiEoNbA-1775805949.8303816-1.0.1.1-dT2xovpRRJWvEjdgsc1.cJ4OmHIB5mJ_CQbWQvxN6eE; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1157"],
|
||||
"request-id": ["req_011CZuh8eWq4KsjQNiR3AcLT"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:49Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:49Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:49Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:49Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:51 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea005126a1af56c-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "DahhePjKE.hk3RiBG0PWoZaz098BTZB0F1SSIiEoNbA-1775805949.8303816-1.0.1.1-dT2xovpRRJWvEjdgsc1.cJ4OmHIB5mJ_CQbWQvxN6eE"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_012zn2eyZBK1jxs7SrL2ef1e\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1006,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":12360,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"I\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" see you've sent \\\"Thread to rename\\\" — could you clarify what you'd like to do? Are you looking to:\\n\\n-\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" **Rename a workflow**? If so, which workflow and what should the new name be?\\n- **Something\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" else** entirely?\\n\\nLet me know and I'll take care of it!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1006,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"output_tokens\":72} }\n\nevent: message_stop\ndata: {\"type\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ZF90dXJuIiwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsfSwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjoxMDA2LCJjYWNoZV9jcmVhdGlvbl9pbnB1dF90b2tlbnMiOjEyMzYwLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MCwib3V0cHV0X3Rva2VucyI6NzJ9ICAgfQoKZXZlbnQ6IG1lc3NhZ2Vfc3RvcApkYXRhOiB7InR5cGUiOiJtZXNzYWdlX3N0b3AiICB9Cgo=",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805953997-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:48.400Z"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:24:59.708Z"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["827"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=9Yvi7QeifE.HjWZ5JsNba1bCCYvWAPFceZ1Cj8giBoY-1775805924.0710049-1.0.1.1-XuZzsfede_jZ5fCEEJTPVOOH9c8SErbIdyW9uQFfWhU; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=828"],
|
||||
"request-id": ["req_011CZuh6kNW1Lzxm7ZoNAamQ"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:24Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:25 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004717b4533a5-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "9Yvi7QeifE.HjWZ5JsNba1bCCYvWAPFceZ1Cj8giBoY-1775805924.0710049-1.0.1.1-XuZzsfede_jZ5fCEEJTPVOOH9c8SErbIdyW9uQFfWhU"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01611zxCCcQySxG4YMXZ5fr7\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1119,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Building\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" your \\\"approval test\\\" workflow now!\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1119,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":12} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxNjExenhDQ2NReVN4RzRZTVhaNWZyNyIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJz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dG9wIiwiaW5kZXgiOjAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjExMTksImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJvdXRwdXRfdG9rZW5zIjoxMn0gICAgICAgICAgICAgICB9CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgICAgICAgICAgIH0KCg==",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805949060-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["2107"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=KZEJKJW5FmUzLsVhNb5t3NlbaFYfDJsxfntFVNheu30-1775805926.7286942-1.0.1.1-5jTvPmlQepTcvQLzkHURfNBvVpA0vDQ3m01oAsbvBC4; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=2110"],
|
||||
"request-id": ["req_011CZuh6x3DxuECCpVfJdj7i"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["27000000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:26Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:28Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:28 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea004820aa623ee-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "KZEJKJW5FmUzLsVhNb5t3NlbaFYfDJsxfntFVNheu30-1775805926.7286942-1.0.1.1-5jTvPmlQepTcvQLzkHURfNBvVpA0vDQ3m01oAsbvBC4"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_01Dp7eicZXBqmboHDG2UWuum",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Create and run approval test workflow"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 140,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 9,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDFEcDdlaWNaWEJxbWJvSERHMlVXdXVtIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiQ3JlYXRlIGFuZCBydW4gYXBwcm92YWwgdGVzdCB3b3JrZmxvdyJ9XSwic3RvcF9yZWFzb24iOiJlbmRfdHVybiIsInN0b3Bfc2VxdWVuY2UiOm51bGwsInN0b3BfZGV0YWlscyI6bnVsbCwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjoxNDAsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjAsImNhY2hlX2NyZWF0aW9uIjp7ImVwaGVtZXJhbF81bV9pbnB1dF90b2tlbnMiOjAsImVwaGVtZXJhbF8xaF9pbnB1dF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjo5LCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0="
|
||||
}
|
||||
},
|
||||
"id": "1775805949061-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are an expert n8n workflow builder. You generate com",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["881"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=YRO67EUXCuTBi52ARawYL8METKI9NGqowU7nOOkLess-1775805932.0083058-1.0.1.1-z8xt60BQW6ri_6.OakpWQbaNv7eQOWYngL6dOFxzgEo; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=884"],
|
||||
"request-id": ["req_011CZuh7LNeTJmL1p52sCbRA"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:32Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26975000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:32Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:32Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:32Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22475000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:33 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004a30af9c637-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "YRO67EUXCuTBi52ARawYL8METKI9NGqowU7nOOkLess-1775805932.0083058-1.0.1.1-z8xt60BQW6ri_6.OakpWQbaNv7eQOWYngL6dOFxzgEo"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01DY9BDA5nrGXooq7hBoosxr\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":733,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Done\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" — the workflow is ready with a Manual Trigger connected to the \\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"approval test\\\" Set node, which outputs `status: \\\"approved\\\"`. You can run it now\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" using the Test workflow button.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":733,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"output_tokens\":44} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxRFk5QkRBNW5yR1hvb3E3aEJvb3N4ciIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjczMywiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MTYxNzYsImNhY2hlX2NyZWF0aW9uIjp7ImVwaGVtZXJhbF81bV9pbnB1dF90b2tlbnMiOjAsImVwaGVtZXJhbF8xaF9pbnB1dF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjoxLCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0gICAgfQoKZXZlbnQ6IGNvbnRlbnRfYmx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mVudDogY29udGVudF9ibG9ja19zdG9wCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RvcCIsImluZGV4IjowICAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjczMywiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MTYxNzYsIm91dHB1dF90b2tlbnMiOjQ0fSAgICB9CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgIH0KCg==",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805949065-unknown-host-POST-_v1_messages-4d1c93f7.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["2089"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=NvefvtBY0wKIeMsYfjzVunb6OVUcd9TOdpdZlAeR.KM-1775805936.974061-1.0.1.1-w.76McLEC38opqhEU9pOq9gg5MkIV77d4vZzad2h3d0; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=2091"],
|
||||
"request-id": ["req_011CZuh7hc6LkQxgPhHCNwJJ"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:37Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:37Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:37Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:37Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:39 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004c21d9c6e86-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "NvefvtBY0wKIeMsYfjzVunb6OVUcd9TOdpdZlAeR.KM-1775805936.974061-1.0.1.1-w.76McLEC38opqhEU9pOq9gg5MkIV77d4vZzad2h3d0"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01M1iLBKhC2ssUoKSVbS1neG\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1222,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":12360,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Let\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" me grab the workflow ID and run it!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":1,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01PRHE2hR1g7QuZg43JPcJ7s\",\"name\":\"list-workflows\",\"input\":{},\"caller\":{\"type\":\"direct\"}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"query\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" \\\"a\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pproval tes\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"t\\\"}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":1 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1222,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"output_tokens\":65} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxTTFpTEJLaEMyc3NVb0tTVmJTMW5lRyIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEyMjIsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MTIzNjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjowLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjoxMjM2MCwiZXBoZW1lcmFsXzFoX2lucHV0X3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjEsInNlcnZpY2VfdGllciI6InN0YW5kYXJkIiwiaW5mZXJlbmNlX2dlbyI6Imdsb2JhbCJ9fSAgICAgICAgICAgICAgfQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfc3RhcnQKZGF0YTogeyJ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bH0sInVzYWdlIjp7ImlucHV0X3Rva2VucyI6MTIyMiwiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjoxMjM2MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjAsIm91dHB1dF90b2tlbnMiOjY1fSAgICAgICAgICAgICB9CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgIH0KCg==",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805949067-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1651"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=b1l.TpLhqFVdzt707QUZIyCsqvL6766tPNA_LlD3RPg-1775805941.9935741-1.0.1.1-aurrSDZEoBdhgpUdO4xXADxVm3WFujzUelgzd_vEQgY; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1653"],
|
||||
"request-id": ["req_011CZuh84zi8i2yrDZaT63Ls"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:42Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:42Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:42Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:42Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:43 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004e17f9ad81e-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "b1l.TpLhqFVdzt707QUZIyCsqvL6766tPNA_LlD3RPg-1775805941.9935741-1.0.1.1-aurrSDZEoBdhgpUdO4xXADxVm3WFujzUelgzd_vEQgY"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_011VsaCw5YtG4CyE3eAwpNi1\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1402,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":68,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01HcDDDgUxJBKkFh9ZtvmsNf\",\"name\":\"run-workflow\",\"input\":{},\"caller\":{\"type\":\"direct\"}} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"workf\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lowId\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" \\\"SRBv\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"FYRdYrreP\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Knu\\\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", \\\"workf\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"lowNa\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"me\\\": \\\"A\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"pp\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rov\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"al Test\\\"}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1402,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":90}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxMVZzYUN3NVl0RzRDeUUzZUF3cE5pMSIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjE0MDIsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6NjgsInNlcnZpY2VfdGllciI6InN0YW5kYXJkIiwiaW5mZXJlbmNlX2dlbyI6Imdsb2JhbCJ9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LCJkZWx0YSI6eyJ0eXBlIjoiaW5wdXRfanNvbl9kZWx0YSIsInBhcnRpYWxfanNvbiI6InBwIn0gICB9CgpldmVudDogY29udGVudF9ibG9ja19kZWx0YQpkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX2RlbHRhIiwiaW5kZXgiOjAsImRlbHRhIjp7InR5cGUiOiJpbnB1dF9qc29uX2RlbHRhIiwicGFydGlhbF9qc29uIjoicm92In0gICAgICAgICAgICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19kZWx0YQpkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX2RlbHRhIiwiaW5kZXgiOjAsImRlbHRhIjp7InR5cGUiOiJpbnB1dF9qc29uX2RlbHRhIiwicGFydGlhbF9qc29uIjoiYWwgVGVzdFwifSJ9ICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19zdG9wCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RvcCIsImluZGV4IjowfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoidG9vbF91c2UiLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjE0MDIsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJvdXRwdXRfdG9rZW5zIjo5MH19CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgICAgICAgIH0KCg==",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805949068-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:05.834Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"build-workflow-with-agent","input":{"task":"Build a simple workflow with:\n1. A Manual Trigger node\n2. A Set node named \"approval test\"\n\nThe Set node can have a simple example field like `status` set to `\"approved\"`. Keep it minimal.","conversationContext":"User wants a simple workflow with a manual trigger and a Set node called \"approval test\", then wants to run it."},"output":{"result":"Workflow build started (task: build-DQ8X-NCW). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.","taskId":"build-DQ8X-NCW"}}
|
||||
{"kind":"tool-call","stepId":2,"agentRole":"workflow-builder","toolName":"build-workflow","input":{"code":"\nimport { workflow, node, trigger, newCredential, expr } from '@n8n/workflow-sdk';\n\nconst manualTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Manual Trigger' }\n});\n\nconst approvalTest = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'approval test',\n parameters: {\n assignments: {\n assignments: [\n { id: '1', name: 'status', value: 'approved', type: 'string' }\n ]\n },\n options: {}\n }\n }\n});\n\nexport default workflow('approval-test', 'Approval Test')\n .add(manualTrigger)\n .to(approvalTest);\n","name":"Approval Test"},"output":{"success":true,"workflowId":"SRBvFYRdYrrePKnu"}}
|
||||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:34.805Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"list-workflows","input":{"query":"approval test"},"output":{"workflows":[{"id":"SRBvFYRdYrrePKnu","name":"Approval Test","versionId":"ddd9f448-c0d9-4358-af7c-60337af17cdc","activeVersionId":null,"createdAt":"2026-04-10T07:25:30.857Z","updatedAt":"2026-04-10T07:25:31.313Z"}]}}
|
||||
{"kind":"tool-suspend","stepId":2,"agentRole":"orchestrator","toolName":"run-workflow","input":{"workflowId":"SRBvFYRdYrrePKnu","workflowName":"Approval Test"},"output":{"executionId":"","status":"error","denied":true,"reason":"Awaiting confirmation"},"suspendPayload":{}}
|
||||
{"kind":"tool-resume","stepId":3,"agentRole":"orchestrator","toolName":"run-workflow","input":{"workflowId":"SRBvFYRdYrrePKnu","workflowName":"Approval Test"},"output":{"executionId":"1","status":"success","data":{"Manual Trigger":"<untrusted_data source=\"execution-output\" label=\"node:Manual Trigger\">\n[\n {}\n]\n</untrusted_data>","approval test":"<untrusted_data source=\"execution-output\" label=\"node:approval test\">\n[\n {\n \"status\": \"approved\"\n }\n]\n</untrusted_data>"},"startedAt":"2026-04-10T07:25:47.074Z","finishedAt":"2026-04-10T07:25:47.203Z"},"resumeData":{"approved":true}}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"Generate a concise title (max 60 chars) summarizing what",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1347"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=QIyZgN_EZbECMwkRDZxnra75UA61lP6FpejVxceTALk-1775805943.7554545-1.0.1.1-OST8K5BnITPZMa0voiPOboEJiVdfv4wDsVfJ.3ztcks; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1349"],
|
||||
"request-id": ["req_011CZuh8CWQNa9CNGfr3rc3X"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:44Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["27000000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:43Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:44Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:44Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22500000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:45 GMT"],
|
||||
"Content-Type": ["application/json"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"CF-RAY": ["9ea004ec7cc28a82-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "QIyZgN_EZbECMwkRDZxnra75UA61lP6FpejVxceTALk-1775805943.7554545-1.0.1.1-OST8K5BnITPZMa0voiPOboEJiVdfv4wDsVfJ.3ztcks"
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"type": "JSON",
|
||||
"json": {
|
||||
"model": "claude-sonnet-4-6",
|
||||
"id": "msg_011eG3tA12M5f27PVJT2PBUr",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Build workflow with manual trigger and Set node"
|
||||
}
|
||||
],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": null,
|
||||
"stop_details": null,
|
||||
"usage": {
|
||||
"input_tokens": 140,
|
||||
"cache_creation_input_tokens": 0,
|
||||
"cache_read_input_tokens": 0,
|
||||
"cache_creation": {
|
||||
"ephemeral_5m_input_tokens": 0,
|
||||
"ephemeral_1h_input_tokens": 0
|
||||
},
|
||||
"output_tokens": 11,
|
||||
"service_tier": "standard",
|
||||
"inference_geo": "global"
|
||||
}
|
||||
},
|
||||
"rawBytes": "eyJtb2RlbCI6ImNsYXVkZS1zb25uZXQtNC02IiwiaWQiOiJtc2dfMDExZUczdEExMk01ZjI3UFZKVDJQQlVyIiwidHlwZSI6Im1lc3NhZ2UiLCJyb2xlIjoiYXNzaXN0YW50IiwiY29udGVudCI6W3sidHlwZSI6InRleHQiLCJ0ZXh0IjoiQnVpbGQgd29ya2Zsb3cgd2l0aCBtYW51YWwgdHJpZ2dlciBhbmQgU2V0IG5vZGUifV0sInN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGwsInVzYWdlIjp7ImlucHV0X3Rva2VucyI6MTQwLCJjYWNoZV9jcmVhdGlvbl9pbnB1dF90b2tlbnMiOjAsImNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zIjowLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MTEsInNlcnZpY2VfdGllciI6InN0YW5kYXJkIiwiaW5mZXJlbmNlX2dlbyI6Imdsb2JhbCJ9fQ=="
|
||||
}
|
||||
},
|
||||
"id": "1775805967569-unknown-host-POST-_v1_messages-18622610.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1593"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=WglZUVnUxKoF35h2JDyhxWtKYX6jWZbq7I.uqroAAHo-1775805940.2870247-1.0.1.1-FWcieY2YOFqh1cZu3xlaeg1_edxYIW7XrzZ4Rw3CFY0; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1595"],
|
||||
"request-id": ["req_011CZuh7wiAAcGuQC6shEaaW"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:40Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:40Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:40Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:40Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:41 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea004d6ce243314-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "WglZUVnUxKoF35h2JDyhxWtKYX6jWZbq7I.uqroAAHo-1775805940.2870247-1.0.1.1-FWcieY2YOFqh1cZu3xlaeg1_edxYIW7XrzZ4Rw3CFY0"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_011bnXZprFHriD8hBnrX5JZW\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1102,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Building\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" your workflow now — a manual trigger connected to a Set node called \\\"deny test\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1102,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":22} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxMWJuWFpwckZIcmlEOGhCbnJYNUpaVyIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjExMDIsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MSwic2VydmljZV90aWVyIjoic3RhbmRhcmQiLCJpbmZlcmVuY2VfZ2VvIjoiZ2xvYmFsIn19fQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfc3RhcnQKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19zdGFydCIsImluZGV4IjowLCJjb250ZW50X2Jsb2NrIjp7InR5cGUiOiJ0ZXh0IiwidGV4dCI6IiJ9ICAgICB9CgpldmVudDogcGluZwpkYXRhOiB7InR5cGUiOiAicGluZyJ9CgpldmVudDogY29udGVudF9ibG9ja19kZWx0YQpkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb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text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805967569-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are an expert n8n workflow builder. You generate com",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["966"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=nlL3R3QbfHLaaoMkgYhbxYJmA_Iftfvw9LBdAPGcm8w-1775805948.9638395-1.0.1.1-f_muq1STlzySDOXTVVaapknORFJPbx2RFTeI_ZioI.A; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=968"],
|
||||
"request-id": ["req_011CZuh8asZGkMUxVTTcHwE8"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:49Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26975000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:49Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:49Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:49Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22475000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:50 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea0050d0a024b12-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "nlL3R3QbfHLaaoMkgYhbxYJmA_Iftfvw9LBdAPGcm8w-1775805948.9638395-1.0.1.1-f_muq1STlzySDOXTVVaapknORFJPbx2RFTeI_ZioI.A"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01GAQjHkRYStkMY5qfaidAHy\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":682,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Done\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" — the workflow is built with a Manual Trigger connected to a Set node named \\\"deny test\\\".\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":682,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"output_tokens\":24} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxR0FRakhrUllTdGtNWTVxZmFpZEFIeSIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjY4MiwiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MTYxNzYsImNhY2hlX2NyZWF0aW9uIjp7ImVwaGVtZXJhbF81bV9pbnB1dF90b2tlbnMiOjAsImVwaGVtZXJhbF8xaF9pbnB1dF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjoxLCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX0gIH0KCmV2ZW50OiBjb250ZW50X2Jsb2NrX3N0YXJ0CmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfc3RhcnQiLCJpbmRleCI6MCwiY29udGVudF9ibG9jayI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contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805967571-unknown-host-POST-_v1_messages-4d1c93f7.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1361"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=uvXPhgnEExQhLqiug2bsm9Av.6PJAji5h0PCOFEdt_I-1775805953.880136-1.0.1.1-lGUR6SA2Ao.A5qxcq7DhN4N1fgGKqW_Sjc103e_ZMI8; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1364"],
|
||||
"request-id": ["req_011CZuh8wpdiN9QpmLhW1oDV"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:54Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:54Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:54Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:54Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:55 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea0052bbae49e00-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "uvXPhgnEExQhLqiug2bsm9Av.6PJAji5h0PCOFEdt_I-1775805953.880136-1.0.1.1-lGUR6SA2Ao.A5qxcq7DhN4N1fgGKqW_Sjc103e_ZMI8"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01DTUw2QVXMtV5o567dZZ8s2\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1196,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":12360,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"The\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" workflow is ready! Let me run it now.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":1,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01K8CBan8RT9fXkcvw5KJoxz\",\"name\":\"list-workflows\",\"input\":{},\"caller\":{\"type\":\"direct\"}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"que\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ry\\\": \\\"deny \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"tes\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"t\\\"}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":1 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1196,\"cache_creation_input_tokens\":12360,\"cache_read_input_tokens\":0,\"output_tokens\":66} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxR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EiLCJpbmRleCI6MSwiZGVsdGEiOnsidHlwZSI6ImlucHV0X2pzb25fZGVsdGEiLCJwYXJ0aWFsX2pzb24iOiJ0ZXMifSAgICAgICAgICB9CgpldmVudDogY29udGVudF9ibG9ja19kZWx0YQpkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX2RlbHRhIiwiaW5kZXgiOjEsImRlbHRhIjp7InR5cGUiOiJpbnB1dF9qc29uX2RlbHRhIiwicGFydGlhbF9qc29uIjoidFwifSJ9ICAgICAgICAgfQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfc3RvcApkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX3N0b3AiLCJpbmRleCI6MSAgICAgICAgICAgICAgIH0KCmV2ZW50OiBtZXNzYWdlX2RlbHRhCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2VfZGVsdGEiLCJkZWx0YSI6eyJzdG9wX3JlYXNvbiI6InRvb2xfdXNlIiwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsfSwidXNhZ2UiOnsiaW5wdXRfdG9rZW5zIjoxMTk2LCJjYWNoZV9jcmVhdGlvbl9pbnB1dF90b2tlbnMiOjEyMzYwLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MCwib3V0cHV0X3Rva2VucyI6NjZ9ICB9CgpldmVudDogbWVzc2FnZV9zdG9wCmRhdGE6IHsidHlwZSI6Im1lc3NhZ2Vfc3RvcCIgICAgICAgfQoK",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805967573-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1782"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=I3Gv.eyFGAEiUemPv.7W5viBboJ4qruWLW2T.01dJSI-1775805958.0402555-1.0.1.1-MIyJwyGGgyJgI1eMGeXc9E53OrW6yWja_HCEcK5Sh.I; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1784"],
|
||||
"request-id": ["req_011CZuh9FcTeL17FC5Lk38us"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:25:58Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:25:58Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:25:58Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:25:58Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:25:59 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea00545bfea359e-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "I3Gv.eyFGAEiUemPv.7W5viBboJ4qruWLW2T.01dJSI-1775805958.0402555-1.0.1.1-MIyJwyGGgyJgI1eMGeXc9E53OrW6yWja_HCEcK5Sh.I"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_013N4HJTKN4PvgyboEiXF94v\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1382,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":69,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_0175TD4Zy8UEPU1sHp6bxDH3\",\"name\":\"run-workflow\",\"input\":{},\"caller\":{\"type\":\"direct\"}} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"wo\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rkf\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"low\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Id\\\": \\\"ENa\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"WAzK\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"EdI8gcs1c\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", \\\"workflo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"wName\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"Deny \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"Test Work\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"flow\\\"}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1382,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":92} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||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tfZGVsdGEKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19kZWx0YSIsImluZGV4IjowLCJkZWx0YSI6eyJ0eXBlIjoiaW5wdXRfanNvbl9kZWx0YSIsInBhcnRpYWxfanNvbiI6ImZsb3dcIn0ifSAgfQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfc3RvcApkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX3N0b3AiLCJpbmRleCI6MCAgICAgICAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoidG9vbF91c2UiLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEzODIsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJvdXRwdXRfdG9rZW5zIjo5Mn0gICAgICAgICAgICAgfQoKZXZlbnQ6IG1lc3NhZ2Vfc3RvcApkYXRhOiB7InR5cGUiOiJtZXNzYWdlX3N0b3AiICAgICB9Cgo=",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805967578-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:31.517Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"build-workflow-with-agent","input":{"task":"Build a simple workflow with a manual trigger node and a Set node named \"deny test\". The Set node doesn't need any specific fields — just the node present with that name.","conversationContext":"User wants a simple workflow with a manual trigger and a Set node called \"deny test\", then wants it run."},"output":{"result":"Workflow build started (task: build-Loc02IQs). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.","taskId":"build-Loc02IQs"}}
|
||||
{"kind":"tool-call","stepId":2,"agentRole":"workflow-builder","toolName":"build-workflow","input":{"code":"\nimport { workflow, node, trigger } from '@n8n/workflow-sdk';\n\nconst startTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Manual Trigger' }\n});\n\nconst denyTest = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'deny test',\n parameters: {\n assignments: { assignments: [] },\n options: {}\n }\n }\n});\n\nexport default workflow('deny-test-workflow', 'Deny Test Workflow')\n .add(startTrigger)\n .to(denyTest);\n","name":"Deny Test Workflow"},"output":{"success":true,"workflowId":"ENaWAzKEdI8gcs1c"}}
|
||||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:25:51.266Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"list-workflows","input":{"query":"deny test"},"output":{"workflows":[{"id":"ENaWAzKEdI8gcs1c","name":"Deny Test Workflow","versionId":"fca88be5-86e9-4ca4-b1f1-d22b659b29c6","activeVersionId":null,"createdAt":"2026-04-10T07:25:47.225Z","updatedAt":"2026-04-10T07:25:47.834Z"}]}}
|
||||
{"kind":"tool-suspend","stepId":2,"agentRole":"orchestrator","toolName":"run-workflow","input":{"workflowId":"ENaWAzKEdI8gcs1c","workflowName":"Deny Test Workflow"},"output":{"executionId":"","status":"error","denied":true,"reason":"Awaiting confirmation"},"suspendPayload":{}}
|
||||
{"kind":"tool-resume","stepId":3,"agentRole":"orchestrator","toolName":"run-workflow","input":{"workflowId":"ENaWAzKEdI8gcs1c","workflowName":"Deny Test Workflow"},"output":{"executionId":"","status":"error","denied":true,"reason":"User denied the action"},"resumeData":{"approved":false}}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are the n8n Instance Agent — an AI assistant embedde",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["1260"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=gBso42CXtUi9gozfphRUSa64ZkWep.xbrraOVPM99tg-1775805974.7363358-1.0.1.1-c3zHI5yJd2VdV7BAWA44WyD_DWb0bCPdpjGiYuZyYaU; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=1262"],
|
||||
"request-id": ["req_011CZuhAUzQ4JADULXrHdrkJ"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:14Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26976000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:14Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:14Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:14Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22476000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:16 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea005ae1c93359e-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "gBso42CXtUi9gozfphRUSa64ZkWep.xbrraOVPM99tg-1775805974.7363358-1.0.1.1-c3zHI5yJd2VdV7BAWA44WyD_DWb0bCPdpjGiYuZyYaU"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01PL9coobrTRqMbHhvTqp6Yy\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":1228,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Building\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" your **\\\"artifact card test\\\"** workflow now!\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":1228,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":12360,\"output_tokens\":15} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxUEw5Y29vYnJUUnFNYkhodlRxcDZZeSIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEyMjgsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJjYWNoZV9jcmVhdGlvbiI6eyJlcGhlbWVyYWxfNW1faW5wdXRfdG9rZW5zIjowLCJlcGhlbWVyYWxfMWhfaW5wdXRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MSwic2VydmljZV90aWVyIjoic3RhbmRhcmQiLCJpbmZlcmVuY2VfZ2VvIjoiZ2xvYmFsIn19fQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfc3RhcnQKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19zdGFydCIsImluZGV4IjowLCJjb250ZW50X2Jsb2NrIjp7InR5cGUiOiJ0ZXh0IiwidGV4dCI6IiJ9ICAgfQoKZXZlbnQ6IHBpbmcKZGF0YTogeyJ0eXBlIjogInBpbmcifQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfZGVsdGEKZGF0YTogeyJ0eXBlIjoiY29udGVudF9ibG9ja19kZWx0YSIsImluZGV4IjowLCJkZWx0YSI6eyJ0eXBlIjoidGV4dF9kZWx0YSIsInRleHQiOiJCdWlsZGluZyJ9ICAgIH0KCmV2ZW50OiBjb250ZW50X2Jsb2NrX2RlbHRhCmRhdGE6IHsidHlwZSI6ImNvbnRlbnRfYmxvY2tfZGVsdGEiLCJpbmRleCI6MCwiZGVsdGEiOnsidHlwZSI6InRleHRfZGVsdGEiLCJ0ZXh0IjoiIHlvdXIgKipcImFydGlmYWN0IGNhcmQgdGVzdFwiKiogd29ya2Zsb3cgbm93ISJ9fQoKZXZlbnQ6IGNvbnRlbnRfYmxvY2tfc3RvcApkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX3N0b3AiLCJpbmRleCI6MCAgICAgICAgICAgfQoKZXZlbnQ6IG1lc3NhZ2VfZGVsdGEKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9kZWx0YSIsImRlbHRhIjp7InN0b3BfcmVhc29uIjoiZW5kX3R1cm4iLCJzdG9wX3NlcXVlbmNlIjpudWxsLCJzdG9wX2RldGFpbHMiOm51bGx9LCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjEyMjgsImNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyI6MCwiY2FjaGVfcmVhZF9pbnB1dF90b2tlbnMiOjEyMzYwLCJvdXRwdXRfdG9rZW5zIjoxNX0gICAgICAgICAgICAgfQoKZXZlbnQ6IG1lc3NhZ2Vfc3RvcApkYXRhOiB7InR5cGUiOiJtZXNzYWdlX3N0b3AiICAgICAgICB9Cgo=",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805987813-unknown-host-POST-_v1_messages-8a23f6c2.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"httpRequest": {
|
||||
"method": "POST",
|
||||
"path": "/v1/messages",
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "[{\"type\":\"text\",\"text\":\"You are an expert n8n workflow builder. You generate com",
|
||||
"subString": true
|
||||
}
|
||||
},
|
||||
"httpResponse": {
|
||||
"statusCode": 200,
|
||||
"reasonPhrase": "OK",
|
||||
"headers": {
|
||||
"x-envoy-upstream-service-time": ["753"],
|
||||
"vary": ["Accept-Encoding"],
|
||||
"strict-transport-security": ["max-age=31536000; includeSubDomains; preload"],
|
||||
"set-cookie": [
|
||||
"_cfuvid=_Snzpv5qV4Ilw98wX.j2dns4AJgdJnLRe29d1Nxtvow-1775805982.2807345-1.0.1.1-dcpccdK3eycLUSPyFq4rgLsnUnfMkhfGoih3j7YvyaI; HttpOnly; SameSite=None; Secure; Path=/; Domain=api.anthropic.com"
|
||||
],
|
||||
"server-timing": ["x-originResponse;dur=756"],
|
||||
"request-id": ["req_011CZuhB3EsT1RDnbyyaqnKk"],
|
||||
"cf-cache-status": ["DYNAMIC"],
|
||||
"anthropic-ratelimit-tokens-reset": ["2026-04-10T07:26:22Z"],
|
||||
"anthropic-ratelimit-tokens-remaining": ["26975000"],
|
||||
"anthropic-ratelimit-tokens-limit": ["27000000"],
|
||||
"anthropic-ratelimit-requests-reset": ["2026-04-10T07:26:22Z"],
|
||||
"anthropic-ratelimit-requests-remaining": ["19998"],
|
||||
"anthropic-ratelimit-requests-limit": ["20000"],
|
||||
"anthropic-ratelimit-output-tokens-reset": ["2026-04-10T07:26:22Z"],
|
||||
"anthropic-ratelimit-output-tokens-remaining": ["4500000"],
|
||||
"anthropic-ratelimit-output-tokens-limit": ["4500000"],
|
||||
"anthropic-ratelimit-input-tokens-reset": ["2026-04-10T07:26:22Z"],
|
||||
"anthropic-ratelimit-input-tokens-remaining": ["22475000"],
|
||||
"anthropic-ratelimit-input-tokens-limit": ["22500000"],
|
||||
"X-Robots-Tag": ["none"],
|
||||
"Server": ["cloudflare"],
|
||||
"Date": ["Fri, 10 Apr 2026 07:26:23 GMT"],
|
||||
"Content-Type": ["text/event-stream; charset=utf-8"],
|
||||
"Content-Security-Policy": ["default-src 'none'; frame-ancestors 'none'"],
|
||||
"Cache-Control": ["no-cache"],
|
||||
"CF-RAY": ["9ea005dd3d29b6ae-TXL"]
|
||||
},
|
||||
"cookies": {
|
||||
"_cfuvid": "_Snzpv5qV4Ilw98wX.j2dns4AJgdJnLRe29d1Nxtvow-1775805982.2807345-1.0.1.1-dcpccdK3eycLUSPyFq4rgLsnUnfMkhfGoih3j7YvyaI"
|
||||
},
|
||||
"body": {
|
||||
"type": "STRING",
|
||||
"string": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-sonnet-4-6\",\"id\":\"msg_01KKQpB1QtCWtRD8rnmHU1Gp\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"stop_details\":null,\"usage\":{\"input_tokens\":717,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":1,\"service_tier\":\"standard\",\"inference_geo\":\"global\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Done\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" — the \\\"artifact card test\\\" workflow is ready with a Manual Trigger connected\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" to a Set node that outputs `message: \\\"Hello World\\\"`.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"stop_details\":null},\"usage\":{\"input_tokens\":717,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":16176,\"output_tokens\":34} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n",
|
||||
"rawBytes": "ZXZlbnQ6IG1lc3NhZ2Vfc3RhcnQKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdGFydCIsIm1lc3NhZ2UiOnsibW9kZWwiOiJjbGF1ZGUtc29ubmV0LTQtNiIsImlkIjoibXNnXzAxS0tRcEIxUXRDV3RSRDhybm1IVTFHcCIsInR5cGUiOiJtZXNzYWdlIiwicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOltdLCJzdG9wX3JlYXNvbiI6bnVsbCwic3RvcF9zZXF1ZW5jZSI6bnVsbCwic3RvcF9kZXRhaWxzIjpudWxsLCJ1c2FnZSI6eyJpbnB1dF90b2tlbnMiOjcxNywiY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zIjowLCJjYWNoZV9yZWFkX2lucHV0X3Rva2VucyI6MTYxNzYsImNhY2hlX2NyZWF0aW9uIjp7ImVwaGVtZXJhbF81bV9pbnB1dF90b2tlbnMiOjAsImVwaGVtZXJhbF8xaF9pbnB1dF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjoxLCJzZXJ2aWNlX3RpZXIiOiJzdGFuZGFyZCIsImluZmVyZW5jZV9nZW8iOiJnbG9iYWwifX19CgpldmVudDogY29udGVudF9ibG9ja19zdGFydApkYXRhOiB7InR5cGUiOiJjb250ZW50X2Jsb2NrX3N0YXJ0IiwiaW5kZXgiOjAsImNvbnRlbnRfYmxvY2siOnsidHlwZSI6InRleHQiLCJ0ZXh0IjoiIn0gICAgIH0KCmV2ZW50OiBwaW5nCmRhdGE6IHsidHlwZSI6ICJwaW5nIn0KCmV2ZW50OiBjb250ZW50X2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ucyI6MzR9IH0KCmV2ZW50OiBtZXNzYWdlX3N0b3AKZGF0YTogeyJ0eXBlIjoibWVzc2FnZV9zdG9wIiAgICAgICAgICB9Cgo=",
|
||||
"contentType": "text/event-stream; charset=utf-8"
|
||||
}
|
||||
},
|
||||
"id": "1775805987818-unknown-host-POST-_v1_messages-4d1c93f7.json",
|
||||
"priority": 0,
|
||||
"timeToLive": {
|
||||
"unlimited": true
|
||||
},
|
||||
"times": {
|
||||
"unlimited": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:26:05.433Z"}
|
||||
{"kind":"tool-call","stepId":1,"agentRole":"orchestrator","toolName":"build-workflow-with-agent","input":{"task":"Build a simple workflow named \"artifact card test\" with a Manual Trigger node and a Set node. The Set node can have a simple example field like \"message\" set to \"Hello World\".","conversationContext":"User wants a simple workflow with a manual trigger and a Set node, named \"artifact card test\"."},"output":{"result":"Workflow build started (task: build-yLsNTeGY). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.","taskId":"build-yLsNTeGY"}}
|
||||
{"kind":"tool-call","stepId":2,"agentRole":"workflow-builder","toolName":"build-workflow","input":{"code":"\nimport { workflow, node, trigger, expr } from '@n8n/workflow-sdk';\n\nconst manualTrigger = trigger({\n type: 'n8n-nodes-base.manualTrigger',\n version: 1,\n config: { name: 'Manual Trigger' }\n});\n\nconst setNode = node({\n type: 'n8n-nodes-base.set',\n version: 3.4,\n config: {\n name: 'Set Fields',\n parameters: {\n assignments: {\n assignments: [\n { id: '1', name: 'message', value: 'Hello World', type: 'string' }\n ]\n },\n options: {}\n }\n }\n});\n\nexport default workflow('artifact-card-test', 'artifact card test')\n .add(manualTrigger)\n .to(setNode);\n","name":"artifact card test"},"output":{"success":true,"workflowId":"uFOhF3ExaTFiOwUz"}}
|
||||
{"kind":"header","version":1,"testName":"recording","recordedAt":"2026-04-10T07:26:25.310Z"}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue