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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions docs/api/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

### AgentManifestError

Defined in: [agent/define-agent.ts:308](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L308)
Defined in: [agent/define-agent.ts:309](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L309)

Thrown when `defineAgent` finds a required surface missing on disk.

#### Extends

Expand All @@ -22,7 +24,7 @@ Defined in: [agent/define-agent.ts:308](https://github.com/tangle-network/agent-

> **new AgentManifestError**(`message`, `agentId`, `issues?`): [`AgentManifestError`](#agentmanifesterror)

Defined in: [agent/define-agent.ts:309](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L309)
Defined in: [agent/define-agent.ts:310](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L310)

###### Parameters

Expand Down Expand Up @@ -52,13 +54,13 @@ readonly `unknown`[] = `[]`

> `readonly` **agentId**: `string`

Defined in: [agent/define-agent.ts:311](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L311)
Defined in: [agent/define-agent.ts:312](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L312)

##### issues

> `readonly` **issues**: readonly `unknown`[] = `[]`

Defined in: [agent/define-agent.ts:312](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L312)
Defined in: [agent/define-agent.ts:313](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L313)

## Interfaces

Expand Down Expand Up @@ -1528,7 +1530,7 @@ directly in the chat surface.

> **defineAgent**\<`TPersona`, `TRunOutput`\>(`manifest`): [`AgentManifest`](#agentmanifest)\<`TPersona`, `TRunOutput`\>

Defined in: [agent/define-agent.ts:332](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L332)
Defined in: [agent/define-agent.ts:333](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/define-agent.ts#L333)

Construct a validated agent manifest. Throws `AgentManifestError`
if any required surface is missing on disk.
Expand Down Expand Up @@ -1588,7 +1590,9 @@ The substrate-default `ImprovementAdapter`: resolve each finding's subject to a

> **createSurfaceKnowledgeAdapter**\<`TProposal`\>(`opts`, `deps`): [`KnowledgeAdapter`](analyst-loop.md#knowledgeadapter)\<`TProposal`\>

Defined in: [agent/knowledge-adapter.ts:58](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/knowledge-adapter.ts#L58)
Defined in: [agent/knowledge-adapter.ts:59](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/knowledge-adapter.ts#L59)

Wire a surface-based `KnowledgeAdapter` that writes analyst proposals to agent surface files.

#### Type Parameters

Expand Down Expand Up @@ -1755,7 +1759,9 @@ readonly [`SurfaceValidationIssue`](#surfacevalidationissue)[]

> **renderSurfaceIssues**(`issues`, `repoRoot`): `string`

Defined in: [agent/surfaces.ts:246](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/surfaces.ts#L246)
Defined in: [agent/surfaces.ts:247](https://github.com/tangle-network/agent-runtime/blob/main/src/agent/surfaces.ts#L247)

Format a list of surface validation issues into a human-readable error string.

#### Parameters

Expand Down
118 changes: 78 additions & 40 deletions docs/api/index.md

Large diffs are not rendered by default.

64 changes: 63 additions & 1 deletion docs/api/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ Defined in: [mcp/delegation-store.ts:76](https://github.com/tangle-network/agent

**`Experimental`**

In-memory `DelegationStore` — suitable for single-process use and tests.

#### Implements

- [`DelegationStore`](#delegationstore)
Expand Down Expand Up @@ -372,6 +374,8 @@ Defined in: [mcp/feedback-store.ts:42](https://github.com/tangle-network/agent-r

**`Experimental`**

In-memory `FeedbackStore` — suitable for single-process use and tests.

#### Implements

- [`FeedbackStore`](#feedbackstore)
Expand Down Expand Up @@ -453,6 +457,8 @@ Defined in: [mcp/task-queue.ts:243](https://github.com/tangle-network/agent-runt

**`Experimental`**

In-process queue for async delegation tasks — submit, cancel, poll status, and read history.

#### Constructors

##### Constructor
Expand Down Expand Up @@ -5930,6 +5936,8 @@ Defined in: [mcp/tools/delegate-feedback.ts:25](https://github.com/tangle-networ

**`Experimental`**

MCP tool name for the `delegate_feedback` feedback-recording tool.

***

### DELEGATE\_FEEDBACK\_DESCRIPTION
Expand All @@ -5940,6 +5948,8 @@ Defined in: [mcp/tools/delegate-feedback.ts:28](https://github.com/tangle-networ

**`Experimental`**

Human-readable description of the `delegate_feedback` MCP tool, injected into the tool manifest.

***

### DELEGATE\_FEEDBACK\_INPUT\_SCHEMA
Expand All @@ -5950,6 +5960,8 @@ Defined in: [mcp/tools/delegate-feedback.ts:52](https://github.com/tangle-networ

**`Experimental`**

JSON Schema for `delegate_feedback` tool arguments (`refersTo`, `rating`, `by`, optional fields).

#### Type Declaration

##### type
Expand Down Expand Up @@ -6102,6 +6114,8 @@ Defined in: [mcp/tools/delegate-ui-audit.ts:30](https://github.com/tangle-networ

**`Experimental`**

MCP tool name for the `delegate_ui_audit` async kickoff tool.

***

### DELEGATE\_UI\_AUDIT\_DESCRIPTION
Expand All @@ -6112,6 +6126,8 @@ Defined in: [mcp/tools/delegate-ui-audit.ts:33](https://github.com/tangle-networ

**`Experimental`**

Human-readable description of the `delegate_ui_audit` MCP tool, injected into the tool manifest.

***

### DELEGATE\_UI\_AUDIT\_INPUT\_SCHEMA
Expand All @@ -6122,6 +6138,8 @@ Defined in: [mcp/tools/delegate-ui-audit.ts:86](https://github.com/tangle-networ

**`Experimental`**

JSON Schema for `delegate_ui_audit` tool arguments (`workspaceDir`, `routes`, optional config).

#### Type Declaration

##### type
Expand Down Expand Up @@ -6378,6 +6396,8 @@ Defined in: [mcp/tools/delegate.ts:26](https://github.com/tangle-network/agent-r

**`Experimental`**

MCP tool name for the `delegate` generic-delegation tool.

***

### DELEGATE\_DESCRIPTION
Expand All @@ -6388,6 +6408,8 @@ Defined in: [mcp/tools/delegate.ts:29](https://github.com/tangle-network/agent-r

**`Experimental`**

Human-readable description of the `delegate` MCP tool, injected into the tool manifest.

***

### DELEGATE\_INPUT\_SCHEMA
Expand All @@ -6398,6 +6420,8 @@ Defined in: [mcp/tools/delegate.ts:47](https://github.com/tangle-network/agent-r

**`Experimental`**

JSON Schema for `delegate` tool arguments (`intent` + optional `model` and `runId`).

#### Type Declaration

##### type
Expand Down Expand Up @@ -6462,6 +6486,8 @@ Defined in: [mcp/tools/delegation-history.ts:18](https://github.com/tangle-netwo

**`Experimental`**

MCP tool name for the `delegation_history` read-past-delegations tool.

***

### DELEGATION\_HISTORY\_DESCRIPTION
Expand All @@ -6472,6 +6498,8 @@ Defined in: [mcp/tools/delegation-history.ts:21](https://github.com/tangle-netwo

**`Experimental`**

Human-readable description of the `delegation_history` MCP tool, injected into the tool manifest.

***

### DELEGATION\_HISTORY\_INPUT\_SCHEMA
Expand All @@ -6482,6 +6510,8 @@ Defined in: [mcp/tools/delegation-history.ts:42](https://github.com/tangle-netwo

**`Experimental`**

JSON Schema for `delegation_history` tool arguments (optional `namespace`, `profile`, `since`, `limit`).

#### Type Declaration

##### type
Expand Down Expand Up @@ -6554,6 +6584,8 @@ Defined in: [mcp/tools/delegation-status.ts:17](https://github.com/tangle-networ

**`Experimental`**

MCP tool name for the `delegation_status` synchronous-poll tool.

***

### DELEGATION\_STATUS\_DESCRIPTION
Expand All @@ -6564,6 +6596,8 @@ Defined in: [mcp/tools/delegation-status.ts:20](https://github.com/tangle-networ

**`Experimental`**

Human-readable description of the `delegation_status` MCP tool, injected into the tool manifest.

***

### DELEGATION\_STATUS\_INPUT\_SCHEMA
Expand All @@ -6574,6 +6608,8 @@ Defined in: [mcp/tools/delegation-status.ts:42](https://github.com/tangle-networ

**`Experimental`**

JSON Schema for `delegation_status` tool arguments (`taskId` + optional `includeTrace`).

#### Type Declaration

##### type
Expand Down Expand Up @@ -6807,6 +6843,8 @@ Defined in: [mcp/delegation-trace.ts:131](https://github.com/tangle-network/agen

**`Experimental`**

Build a `DelegationTraceCollector` that buffers loop-trace events and converts them to spans on settle.

#### Parameters

##### onSpans
Expand Down Expand Up @@ -6876,7 +6914,7 @@ Defined in: [mcp/detached-turn.ts:104](https://github.com/tangle-network/agent-r

**`Experimental`**

Inverse of [formatDetachedSessionRef](#formatdetachedsessionref); throws `ValidationError` on malformed input.
Parse a `detachedSessionRef` string back to parts; throws `ValidationError` on malformed input.

#### Parameters

Expand Down Expand Up @@ -7377,6 +7415,8 @@ Defined in: [mcp/tools/delegate-feedback.ts:83](https://github.com/tangle-networ

**`Experimental`**

Parse and validate raw MCP tool input into typed `DelegateFeedbackArgs`; throws `TypeError` on bad input.

#### Parameters

##### raw
Expand All @@ -7397,6 +7437,8 @@ Defined in: [mcp/tools/delegate-feedback.ts:160](https://github.com/tangle-netwo

**`Experimental`**

Build the MCP tool handler that persists feedback events and attaches them to delegation records.

#### Parameters

##### options
Expand All @@ -7417,6 +7459,8 @@ Defined in: [mcp/tools/delegate-ui-audit.ts:114](https://github.com/tangle-netwo

**`Experimental`**

Parse and validate raw MCP tool input into typed `DelegateUiAuditArgs`; throws `TypeError` on bad input.

#### Parameters

##### raw
Expand All @@ -7437,6 +7481,8 @@ Defined in: [mcp/tools/delegate-ui-audit.ts:300](https://github.com/tangle-netwo

**`Experimental`**

Build the MCP tool handler that validates input, deduplicates via idempotency key, and enqueues a UI audit.

#### Parameters

##### options
Expand All @@ -7457,6 +7503,8 @@ Defined in: [mcp/tools/delegate.ts:75](https://github.com/tangle-network/agent-r

**`Experimental`**

Parse and validate raw MCP tool input into typed `DelegateArgs`; throws `TypeError` on bad input.

#### Parameters

##### raw
Expand Down Expand Up @@ -7499,6 +7547,8 @@ Defined in: [mcp/tools/delegation-history.ts:54](https://github.com/tangle-netwo

**`Experimental`**

Parse and validate raw MCP tool input into typed `DelegationHistoryArgs`; throws `TypeError` on bad input.

#### Parameters

##### raw
Expand All @@ -7519,6 +7569,8 @@ Defined in: [mcp/tools/delegation-history.ts:95](https://github.com/tangle-netwo

**`Experimental`**

Build the MCP tool handler that reads filtered past delegations from a `DelegationTaskQueue`.

#### Parameters

##### options
Expand All @@ -7539,6 +7591,8 @@ Defined in: [mcp/tools/delegation-status.ts:57](https://github.com/tangle-networ

**`Experimental`**

Parse and validate raw MCP tool input into typed `DelegationStatusArgs`; throws `TypeError` on bad input.

#### Parameters

##### raw
Expand All @@ -7559,6 +7613,8 @@ Defined in: [mcp/tools/delegation-status.ts:82](https://github.com/tangle-networ

**`Experimental`**

Build the MCP tool handler that polls a `DelegationTaskQueue` for task status.

#### Parameters

##### options
Expand Down Expand Up @@ -7651,6 +7707,8 @@ Defined in: [mcp/worktree.ts:114](https://github.com/tangle-network/agent-runtim

**`Experimental`**

Checkout a fresh git worktree for a delegation run on a new branch under `variantsDir`.

#### Parameters

##### options
Expand All @@ -7671,6 +7729,8 @@ Defined in: [mcp/worktree.ts:134](https://github.com/tangle-network/agent-runtim

**`Experimental`**

Stage all changes in a worktree and return the diff patch + shortstat against the base ref.

#### Parameters

##### options
Expand All @@ -7691,6 +7751,8 @@ Defined in: [mcp/worktree.ts:174](https://github.com/tangle-network/agent-runtim

**`Experimental`**

Remove a git worktree and delete its branch; tolerates already-removed paths.

#### Parameters

##### options
Expand Down
Loading
Loading