@fabric-harness/sdk 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/connector-spec/data.md +163 -0
- package/connector-spec/mcp.md +146 -0
- package/connector-spec/sandbox.md +245 -0
- package/dist/agent-definition.d.ts +8 -0
- package/dist/agent-definition.d.ts.map +1 -1
- package/dist/agent-definition.js.map +1 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +3 -0
- package/dist/agent.js.map +1 -1
- package/dist/ai-gateway.d.ts +48 -0
- package/dist/ai-gateway.d.ts.map +1 -0
- package/dist/ai-gateway.js +44 -0
- package/dist/ai-gateway.js.map +1 -0
- package/dist/cost-budget.d.ts +59 -0
- package/dist/cost-budget.d.ts.map +1 -0
- package/dist/cost-budget.js +51 -0
- package/dist/cost-budget.js.map +1 -0
- package/dist/error.d.ts +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/events.d.ts +15 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/loop.d.ts +9 -0
- package/dist/loop.d.ts.map +1 -1
- package/dist/loop.js +24 -0
- package/dist/loop.js.map +1 -1
- package/dist/model.d.ts +7 -0
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +6 -0
- package/dist/model.js.map +1 -1
- package/dist/policy.d.ts +25 -0
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +18 -0
- package/dist/policy.js.map +1 -1
- package/dist/session.d.ts +2 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +21 -0
- package/dist/session.js.map +1 -1
- package/dist/strict.d.ts +6 -0
- package/dist/strict.d.ts.map +1 -1
- package/dist/strict.js +3 -0
- package/dist/strict.js.map +1 -1
- package/dist/types.d.ts +19 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/webhook-subscription.d.ts +54 -0
- package/dist/webhook-subscription.d.ts.map +1 -0
- package/dist/webhook-subscription.js +30 -0
- package/dist/webhook-subscription.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Canonical spec for fabric-harness data-source connectors.
|
|
3
|
+
Shipped with @fabric-harness/sdk.
|
|
4
|
+
|
|
5
|
+
Raw GitHub URL:
|
|
6
|
+
https://raw.githubusercontent.com/Fabric-Pro/fabric-harness/main/packages/sdk/connector-spec/data.md
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# fabric-harness Data Connector Spec
|
|
10
|
+
|
|
11
|
+
This document is the contract for building a fabric-harness data connector. A data connector exposes content from an external system (Notion, Postgres, Confluence, S3, Google Drive, your internal CMS) so a fabric-harness agent can mount it as filesystem-shaped context (`FilesystemSource`) or use it as a custom data adapter.
|
|
12
|
+
|
|
13
|
+
If you are an AI coding agent reading this to build a connector for a user, follow this document literally and produce a single TypeScript file that exports a factory function returning a `FilesystemSource`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## When to use which shape
|
|
18
|
+
|
|
19
|
+
- **`FilesystemSource`** (preferred) — the source maps cleanly to a tree of files (Notion pages, Confluence pages, GitHub markdown, S3 keys). Files become mountable into the agent's context with the existing `withFilesystemSources` helper.
|
|
20
|
+
- **Custom data adapter** — the source is row-oriented (Postgres, BigQuery) or graph-shaped (Linear issue graph). Build a tool-shaped connector instead and follow the MCP spec.
|
|
21
|
+
|
|
22
|
+
This document covers the `FilesystemSource` shape. For row/graph data, return tools and follow `mcp.md`.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## High-Level Shape
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
// .fabricharness/connectors/<provider>.ts
|
|
30
|
+
import type { FilesystemSource, FilesystemEntry, MountedSource } from '@fabric-harness/sdk';
|
|
31
|
+
|
|
32
|
+
export interface ProviderDataOptions {
|
|
33
|
+
apiKey: string;
|
|
34
|
+
/** Restrict to a subset of the provider tree (e.g. Notion database id). */
|
|
35
|
+
rootId?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function provider(options: ProviderDataOptions): FilesystemSource {
|
|
39
|
+
return {
|
|
40
|
+
name: 'provider',
|
|
41
|
+
async list(prefix?: string): Promise<FilesystemEntry[]> {
|
|
42
|
+
// Return entries with absolute virtual paths (e.g. `/notion/page-1.md`)
|
|
43
|
+
// and `kind: 'file' | 'directory'`.
|
|
44
|
+
},
|
|
45
|
+
async read(path: string): Promise<string> {
|
|
46
|
+
// Fetch the file content; return UTF-8 text.
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Mount it on the agent:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import { withFilesystemSources } from '@fabric-harness/sdk';
|
|
56
|
+
import { provider } from './connectors/provider.js';
|
|
57
|
+
|
|
58
|
+
const fabric = await init();
|
|
59
|
+
await withFilesystemSources(fabric, [provider({ apiKey: process.env.PROVIDER_API_KEY! })]);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Imports You Will Use
|
|
65
|
+
|
|
66
|
+
All from `@fabric-harness/sdk`:
|
|
67
|
+
|
|
68
|
+
- `FilesystemSource` — the interface you implement.
|
|
69
|
+
- `FilesystemEntry` — `{ path: string; kind: 'file' | 'directory'; size?: number; mtimeMs?: number }`.
|
|
70
|
+
- `MountedSource` — what the host gets after mounting (for diagnostics).
|
|
71
|
+
- `withFilesystemSources(fabric, sources)` — host-side helper for mounting.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Required Methods
|
|
76
|
+
|
|
77
|
+
| Method | Signature | Notes |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| `list` | `(prefix?: string) => Promise<FilesystemEntry[]>` | Return entries under `prefix` (or root when undefined). Paths are absolute virtual paths starting with the source name (`/notion/...`). |
|
|
80
|
+
| `read` | `(path: string) => Promise<string>` | UTF-8 text of the file. Throw on missing/binary. |
|
|
81
|
+
|
|
82
|
+
### Optional Methods
|
|
83
|
+
|
|
84
|
+
- `name` (string) — display name for `fh inspect`. Defaults to the factory function name.
|
|
85
|
+
- `stat(path)` — return `{ size, mtimeMs }` without fetching content. Used for change detection.
|
|
86
|
+
- `watch(callback)` — push notifications when content changes. If absent, fabric polls on a schedule.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Pagination and Caching
|
|
91
|
+
|
|
92
|
+
External systems often paginate. Inside `list()`:
|
|
93
|
+
|
|
94
|
+
- Fetch all pages internally if the source is bounded (< ~1000 entries).
|
|
95
|
+
- Throw with a clear "source too large; restrict via options.rootId" if the call would download more than ~10 MB.
|
|
96
|
+
- Cache results in memory for the lifetime of the connector (one factory call = one cache).
|
|
97
|
+
|
|
98
|
+
`read()` should be idempotent and cheap to retry.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Auth
|
|
103
|
+
|
|
104
|
+
- API keys, OAuth tokens, DSN strings — all flow through `options`. No global env reads inside the connector.
|
|
105
|
+
- Sensitive data must NEVER appear in `FilesystemEntry.path` (paths land in session history). If a path includes a secret-bearing id, hash or truncate it.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Worked Example (Notion)
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
// .fabricharness/connectors/notion.ts
|
|
113
|
+
import type { FilesystemSource, FilesystemEntry } from '@fabric-harness/sdk';
|
|
114
|
+
import { Client } from '@notionhq/client';
|
|
115
|
+
|
|
116
|
+
export interface NotionSourceOptions {
|
|
117
|
+
apiKey: string;
|
|
118
|
+
databaseId: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function notion(options: NotionSourceOptions): FilesystemSource {
|
|
122
|
+
const client = new Client({ auth: options.apiKey });
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
name: 'notion',
|
|
126
|
+
|
|
127
|
+
async list(prefix?: string): Promise<FilesystemEntry[]> {
|
|
128
|
+
const pages = await client.databases.query({ database_id: options.databaseId });
|
|
129
|
+
return pages.results.map((page) => ({
|
|
130
|
+
path: `/notion/${page.id}.md`,
|
|
131
|
+
kind: 'file' as const,
|
|
132
|
+
mtimeMs: new Date((page as { last_edited_time?: string }).last_edited_time ?? 0).getTime(),
|
|
133
|
+
}));
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
async read(path: string): Promise<string> {
|
|
137
|
+
const id = path.replace(/^\/notion\//, '').replace(/\.md$/, '');
|
|
138
|
+
const blocks = await client.blocks.children.list({ block_id: id });
|
|
139
|
+
return blocks.results.map(blockToMarkdown).join('\n\n');
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function blockToMarkdown(block: unknown): string {
|
|
145
|
+
// Provider-specific formatting...
|
|
146
|
+
return '';
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Checklist Before Submitting
|
|
153
|
+
|
|
154
|
+
- [ ] Single TypeScript file exporting the factory function.
|
|
155
|
+
- [ ] Returns a `FilesystemSource` (not a class).
|
|
156
|
+
- [ ] All paths returned by `list()` are absolute and start with `/<source-name>/`.
|
|
157
|
+
- [ ] No secrets in returned paths.
|
|
158
|
+
- [ ] `read()` returns UTF-8 text (not binary).
|
|
159
|
+
- [ ] Pagination is handled inside the connector.
|
|
160
|
+
- [ ] No hardcoded API keys.
|
|
161
|
+
- [ ] Imports only from `@fabric-harness/sdk` and the provider's official SDK.
|
|
162
|
+
|
|
163
|
+
If the provider's content is truly binary (PDFs, images), document this in a top-of-file comment and direct the user toward the artifact-store pattern (`packages/connectors/src/s3.ts`) instead.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Canonical spec for fabric-harness MCP connectors.
|
|
3
|
+
Shipped with @fabric-harness/sdk.
|
|
4
|
+
|
|
5
|
+
Raw GitHub URL:
|
|
6
|
+
https://raw.githubusercontent.com/Fabric-Pro/fabric-harness/main/packages/sdk/connector-spec/mcp.md
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# fabric-harness MCP Connector Spec
|
|
10
|
+
|
|
11
|
+
This document is the contract for building a fabric-harness MCP connector. An MCP connector wraps an external Model Context Protocol server (Linear, GitHub, Slack, Notion, custom) so its tools become callable from a fabric-harness agent.
|
|
12
|
+
|
|
13
|
+
If you are an AI coding agent reading this to build a connector for a user, follow this document literally and produce a single TypeScript file that exports a factory function returning a registry of `ToolDef` objects (or a `connect` function that lazy-initializes them).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Choosing a Transport
|
|
18
|
+
|
|
19
|
+
MCP servers run over one of:
|
|
20
|
+
|
|
21
|
+
- **stdio** — local subprocess. Use `createStdioMcpClient` from `@fabric-harness/sdk`. This is the right choice for `npx @org/mcp-server` style usage.
|
|
22
|
+
- **HTTP / SSE** — networked server. Use `connectMcpServer({ transport: 'http', url })` from `@fabric-harness/sdk`.
|
|
23
|
+
|
|
24
|
+
Pick stdio when the provider ships an npm package; pick HTTP when they expose a hosted endpoint.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## High-Level Shape
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// .fabricharness/connectors/<provider>.ts
|
|
32
|
+
import { connectMcpServer, createStdioMcpClient, createMcpTools } from '@fabric-harness/sdk';
|
|
33
|
+
import type { ToolDef } from '@fabric-harness/sdk';
|
|
34
|
+
|
|
35
|
+
export interface ProviderMcpOptions {
|
|
36
|
+
/** API token / OAuth bearer / etc. */
|
|
37
|
+
apiKey: string;
|
|
38
|
+
/** Optional model-side description override. */
|
|
39
|
+
description?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export async function providerMcp(options: ProviderMcpOptions): Promise<ToolDef[]> {
|
|
43
|
+
const client = await createStdioMcpClient({
|
|
44
|
+
command: 'npx',
|
|
45
|
+
args: ['-y', '@provider/mcp-server'],
|
|
46
|
+
env: { PROVIDER_API_KEY: options.apiKey },
|
|
47
|
+
});
|
|
48
|
+
return createMcpTools(client, {
|
|
49
|
+
namePrefix: 'provider',
|
|
50
|
+
description: options.description,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The agent then registers these tools at session creation:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
const fabric = await init({ tools: await providerMcp({ apiKey: process.env.PROVIDER_API_KEY! }) });
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Naming and Namespacing
|
|
64
|
+
|
|
65
|
+
- Prefix every tool name with the provider's canonical short name (`linear_`, `github_`, `slack_`, etc.) using the `namePrefix` option on `createMcpTools`. This avoids collisions when multiple MCP connectors are loaded into the same agent.
|
|
66
|
+
- Keep the user's tool name unchanged (e.g. `create_issue`). The prefix is the connector's job.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Auth
|
|
71
|
+
|
|
72
|
+
- API keys go through `options`, never hardcoded. Read from env in the user's app, not in the connector.
|
|
73
|
+
- OAuth tokens that need refresh must be wrapped in a getter. `createStdioMcpClient` accepts a function for `env` to re-read tokens before each call.
|
|
74
|
+
- Never log the key. Connectors must not mention secrets in error messages.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Lifecycle
|
|
79
|
+
|
|
80
|
+
If the MCP server is stateful (long-running stdio process, persistent SSE connection), expose a `close` returned alongside the tools:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
export async function providerMcp(options: ProviderMcpOptions) {
|
|
84
|
+
const client = await createStdioMcpClient({ /* ... */ });
|
|
85
|
+
const tools = await createMcpTools(client, { namePrefix: 'provider' });
|
|
86
|
+
return { tools, close: () => client.close() };
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The user's app calls `close()` on shutdown.
|
|
91
|
+
|
|
92
|
+
For one-shot agents (CI, webhook handlers), prefer the simple form returning `ToolDef[]` directly — no cleanup hook needed.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Error Contract
|
|
97
|
+
|
|
98
|
+
- Connection failures during init → throw with a clear "could not start MCP server" message including the missing dep / wrong env var hint.
|
|
99
|
+
- Per-tool errors propagate from the MCP server through `createMcpTools` automatically. Don't wrap.
|
|
100
|
+
- Schema mismatches are surfaced by `fh doctor --tools`. Don't try to fix them in the connector.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Worked Example (Linear)
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
// .fabricharness/connectors/linear.ts
|
|
108
|
+
import { createStdioMcpClient, createMcpTools } from '@fabric-harness/sdk';
|
|
109
|
+
import type { ToolDef } from '@fabric-harness/sdk';
|
|
110
|
+
|
|
111
|
+
export interface LinearMcpOptions {
|
|
112
|
+
apiKey: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export async function linear(options: LinearMcpOptions): Promise<ToolDef[]> {
|
|
116
|
+
const client = await createStdioMcpClient({
|
|
117
|
+
command: 'npx',
|
|
118
|
+
args: ['-y', '@modelcontextprotocol/server-linear'],
|
|
119
|
+
env: { LINEAR_API_KEY: options.apiKey },
|
|
120
|
+
});
|
|
121
|
+
return createMcpTools(client, { namePrefix: 'linear' });
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Use:
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
import { linear } from './connectors/linear.js';
|
|
129
|
+
|
|
130
|
+
const tools = await linear({ apiKey: process.env.LINEAR_API_KEY! });
|
|
131
|
+
const fabric = await init({ tools });
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Checklist Before Submitting
|
|
137
|
+
|
|
138
|
+
- [ ] Single TypeScript file exporting the factory function.
|
|
139
|
+
- [ ] Returns `ToolDef[]` (or `{ tools, close }` for stateful servers).
|
|
140
|
+
- [ ] Every tool is namespaced via `namePrefix`.
|
|
141
|
+
- [ ] No hardcoded secrets; all auth flows through options.
|
|
142
|
+
- [ ] Imports only from `@fabric-harness/sdk` and the MCP server's npm package.
|
|
143
|
+
- [ ] The factory throws a friendly error if the MCP server fails to start (mention the missing dep / env var).
|
|
144
|
+
- [ ] If the provider needs OAuth refresh, the example shows the refresh pattern.
|
|
145
|
+
|
|
146
|
+
If the provider doesn't have a published MCP server yet, leave a `// TODO` linking the upstream tracking issue rather than rolling your own protocol.
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Canonical spec for fabric-harness sandbox connectors.
|
|
3
|
+
Shipped with @fabric-harness/sdk so it's available offline.
|
|
4
|
+
|
|
5
|
+
Mirrored at the docs site:
|
|
6
|
+
https://harness.fabric.pro/docs/building/sandbox-connectors
|
|
7
|
+
|
|
8
|
+
Raw GitHub URL (must remain valid):
|
|
9
|
+
https://raw.githubusercontent.com/Fabric-Pro/fabric-harness/main/packages/sdk/connector-spec/sandbox.md
|
|
10
|
+
|
|
11
|
+
If you move this file, update `packages/cli/bin/fabric-harness.ts` (`fh add`)
|
|
12
|
+
and `apps/docs/content/docs/building/sandbox-connectors.mdx` to match.
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
# fabric-harness Sandbox Connector Spec
|
|
16
|
+
|
|
17
|
+
This document is the contract for building a fabric-harness sandbox connector. A sandbox connector adapts a third-party sandbox provider's SDK (Daytona, E2B, Modal, Vercel Sandbox, Cloudflare Containers, your in-house infra, etc.) into fabric-harness's `RemoteSandboxApi` interface so that agents can run shell commands and read/write files inside that sandbox.
|
|
18
|
+
|
|
19
|
+
If you are an AI coding agent reading this to build a connector for a user, follow this document literally and produce a single TypeScript file that exports a factory function returning a `SandboxEnv`.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## High-Level Shape
|
|
24
|
+
|
|
25
|
+
A connector is one TypeScript file. It exports a factory function that takes an already-initialized provider sandbox plus options, and returns a `SandboxEnv` via `createRemoteSandboxEnv`.
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// .fabricharness/connectors/<provider>.ts (or ./connectors/<provider>.ts)
|
|
29
|
+
import { createRemoteSandboxEnv } from '@fabric-harness/sdk';
|
|
30
|
+
import type {
|
|
31
|
+
RemoteSandboxApi,
|
|
32
|
+
RemoteSandboxOptions,
|
|
33
|
+
SandboxEnv,
|
|
34
|
+
SandboxExecOptions,
|
|
35
|
+
FileStat,
|
|
36
|
+
ShellResult,
|
|
37
|
+
} from '@fabric-harness/sdk';
|
|
38
|
+
import type { Sandbox as ProviderSandbox } from '<provider-sdk>';
|
|
39
|
+
|
|
40
|
+
class ProviderSandboxApi implements RemoteSandboxApi {
|
|
41
|
+
constructor(private sandbox: ProviderSandbox) {}
|
|
42
|
+
// ... implement every required method (see "Required RemoteSandboxApi Methods" below)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ProviderSandboxOptions extends RemoteSandboxOptions {
|
|
46
|
+
// Provider-specific knobs (regions, image tags, etc.) go here.
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function provider(
|
|
50
|
+
sandbox: ProviderSandbox,
|
|
51
|
+
options: ProviderSandboxOptions = {},
|
|
52
|
+
): SandboxEnv {
|
|
53
|
+
const api = new ProviderSandboxApi(sandbox);
|
|
54
|
+
return createRemoteSandboxEnv(api, options);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Connectors are pure adapters. They map a provider sandbox to a `SandboxEnv` and stop there. They do not manage the sandbox's lifetime — the user owns what they create. If the provider exposes a teardown call, surface it via the `cleanup` option (see below).
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Imports You Will Use
|
|
63
|
+
|
|
64
|
+
All from `@fabric-harness/sdk`:
|
|
65
|
+
|
|
66
|
+
- `createRemoteSandboxEnv(api, options)` — wraps your `RemoteSandboxApi` into a `SandboxEnv` that fabric-harness can drive.
|
|
67
|
+
- `RemoteSandboxApi` — the interface you implement.
|
|
68
|
+
- `RemoteSandboxOptions` — options accepted by `createRemoteSandboxEnv`.
|
|
69
|
+
- `SandboxEnv` — what `createRemoteSandboxEnv` returns. You don't construct this yourself.
|
|
70
|
+
- `SandboxExecOptions`, `FileStat`, `ShellResult` — types used in method signatures.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Required `RemoteSandboxApi` Methods
|
|
75
|
+
|
|
76
|
+
Every method below MUST be implemented unless explicitly marked optional.
|
|
77
|
+
|
|
78
|
+
| Method | Signature | Notes |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `exec` | `(command: string, options?: SandboxExecOptions) => Promise<ShellResult>` | Run a shell command. Honor `options.cwd`, `options.timeoutMs`, `options.env`, `options.signal`. Return `{ command, exitCode, stdout, stderr, durationMs?, signal? }`. |
|
|
81
|
+
| `readFile` | `(path: string) => Promise<string>` | UTF-8 text. Throw if the file is binary or missing. |
|
|
82
|
+
| `readFileBuffer` | `(path: string) => Promise<Uint8Array>` | Binary read. Required for artifact handling. |
|
|
83
|
+
| `writeFile` | `(path: string, content: string \| Uint8Array) => Promise<void>` | Create parent dirs as needed. |
|
|
84
|
+
| `stat` | `(path: string) => Promise<FileStat>` | `{ size, isDirectory, isFile, mtimeMs }`. Throw on missing. |
|
|
85
|
+
| `readdir` | `(path: string) => Promise<string[]>` | Names only (not full paths). |
|
|
86
|
+
| `exists` | `(path: string) => Promise<boolean>` | Cheap probe. |
|
|
87
|
+
| `mkdir` | `(path: string, options?: { recursive?: boolean }) => Promise<void>` | Default `recursive: false`. |
|
|
88
|
+
| `rm` | `(path: string, options?: { recursive?: boolean; force?: boolean }) => Promise<void>` | Default both flags `false`. |
|
|
89
|
+
|
|
90
|
+
### Optional Methods (snapshot / fork / suspend / resume)
|
|
91
|
+
|
|
92
|
+
Implement these only if the provider supports them natively. Fabric will gracefully no-op when absent.
|
|
93
|
+
|
|
94
|
+
- `snapshot()` — capture provider-native state (e.g. E2B persistent sandbox, Daytona snapshot). Return a `SandboxSnapshot` (`{ provider, providerData }`).
|
|
95
|
+
- `restore(snapshot)` — restore in-place.
|
|
96
|
+
- `fork(snapshot)` — return a *new* `RemoteSandboxApi` initialized from the snapshot. Origin unaffected.
|
|
97
|
+
- `suspend()` / `resume()` — pause/start the sandbox to save cost while preserving filesystem state.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Path Resolution
|
|
102
|
+
|
|
103
|
+
- Default `cwd` is whatever the provider's "home" is (e.g. `/workspace`, `/home/user`). Pick a sensible default in your factory and pass it via `options.cwd`.
|
|
104
|
+
- All paths in `RemoteSandboxApi` calls are POSIX. Don't accept Windows-style paths.
|
|
105
|
+
- Relative paths in tool calls are resolved against the session `cwd`. Your `exec` MUST honor `options.cwd`.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Cleanup
|
|
110
|
+
|
|
111
|
+
If the provider has a teardown (e.g. `sandbox.kill()`, `sandbox.destroy()`), accept a `cleanup` option:
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
export function provider(
|
|
115
|
+
sandbox: ProviderSandbox,
|
|
116
|
+
options: ProviderSandboxOptions & { cleanup?: boolean | (() => Promise<void>) } = {},
|
|
117
|
+
): SandboxEnv {
|
|
118
|
+
const api = new ProviderSandboxApi(sandbox);
|
|
119
|
+
return createRemoteSandboxEnv(api, {
|
|
120
|
+
...options,
|
|
121
|
+
...(options.cleanup === true
|
|
122
|
+
? { cleanup: () => sandbox.destroy() }
|
|
123
|
+
: typeof options.cleanup === 'function'
|
|
124
|
+
? { cleanup: options.cleanup }
|
|
125
|
+
: {}),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
When `cleanup` runs, the user's session is ending — release resources but don't throw.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Error Contract
|
|
135
|
+
|
|
136
|
+
- Network/transient errors → throw a regular `Error` with a clear message. Fabric retries based on its own policy.
|
|
137
|
+
- Path-not-found, permission-denied → throw `Error` whose `message` includes the path. Don't wrap in custom error classes (they don't survive cross-process boundaries).
|
|
138
|
+
- `exec` non-zero exit codes are NOT errors — they're returned as `{ exitCode: 1, stdout, stderr }`. Only throw if the call itself fails.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Cross-Process Refs (advanced)
|
|
143
|
+
|
|
144
|
+
If this sandbox might outlive the agent process (durable sandbox, long task, replay), pass `encodeRef` so Fabric can serialize the sandbox identity:
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
return createRemoteSandboxEnv(api, {
|
|
148
|
+
encodeRef: () => ({
|
|
149
|
+
provider: '<provider-name>',
|
|
150
|
+
providerData: { sandboxId: sandbox.id, region: sandbox.region },
|
|
151
|
+
}),
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The matching decoder is registered separately via `registerSandboxRefDecoder` in the host process. See `apps/docs/content/docs/building/sandbox-connectors.mdx` for a full example.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Worked Example (Daytona)
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
import { createRemoteSandboxEnv } from '@fabric-harness/sdk';
|
|
163
|
+
import type {
|
|
164
|
+
RemoteSandboxApi,
|
|
165
|
+
RemoteSandboxOptions,
|
|
166
|
+
SandboxEnv,
|
|
167
|
+
SandboxExecOptions,
|
|
168
|
+
FileStat,
|
|
169
|
+
ShellResult,
|
|
170
|
+
} from '@fabric-harness/sdk';
|
|
171
|
+
import type { Workspace } from '@daytonaio/sdk';
|
|
172
|
+
|
|
173
|
+
class DaytonaSandboxApi implements RemoteSandboxApi {
|
|
174
|
+
constructor(private workspace: Workspace) {}
|
|
175
|
+
|
|
176
|
+
async exec(command: string, options?: SandboxExecOptions): Promise<ShellResult> {
|
|
177
|
+
const start = Date.now();
|
|
178
|
+
const result = await this.workspace.exec(command, {
|
|
179
|
+
cwd: options?.cwd,
|
|
180
|
+
env: options?.env,
|
|
181
|
+
timeout: options?.timeoutMs,
|
|
182
|
+
});
|
|
183
|
+
return {
|
|
184
|
+
command,
|
|
185
|
+
exitCode: result.exitCode,
|
|
186
|
+
stdout: result.stdout,
|
|
187
|
+
stderr: result.stderr,
|
|
188
|
+
durationMs: Date.now() - start,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
async readFile(path: string): Promise<string> {
|
|
193
|
+
return this.workspace.fs.readFile(path, 'utf8');
|
|
194
|
+
}
|
|
195
|
+
async readFileBuffer(path: string): Promise<Uint8Array> {
|
|
196
|
+
return this.workspace.fs.readFile(path);
|
|
197
|
+
}
|
|
198
|
+
async writeFile(path: string, content: string | Uint8Array): Promise<void> {
|
|
199
|
+
await this.workspace.fs.writeFile(path, content);
|
|
200
|
+
}
|
|
201
|
+
async stat(path: string): Promise<FileStat> {
|
|
202
|
+
const s = await this.workspace.fs.stat(path);
|
|
203
|
+
return { size: s.size, isDirectory: s.isDir, isFile: !s.isDir, mtimeMs: s.mtimeMs };
|
|
204
|
+
}
|
|
205
|
+
async readdir(path: string): Promise<string[]> {
|
|
206
|
+
return this.workspace.fs.readdir(path);
|
|
207
|
+
}
|
|
208
|
+
async exists(path: string): Promise<boolean> {
|
|
209
|
+
return this.workspace.fs.exists(path);
|
|
210
|
+
}
|
|
211
|
+
async mkdir(path: string, options?: { recursive?: boolean }): Promise<void> {
|
|
212
|
+
await this.workspace.fs.mkdir(path, options);
|
|
213
|
+
}
|
|
214
|
+
async rm(path: string, options?: { recursive?: boolean; force?: boolean }): Promise<void> {
|
|
215
|
+
await this.workspace.fs.rm(path, options);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface DaytonaSandboxOptions extends RemoteSandboxOptions {}
|
|
220
|
+
|
|
221
|
+
export function daytona(workspace: Workspace, options: DaytonaSandboxOptions = {}): SandboxEnv {
|
|
222
|
+
return createRemoteSandboxEnv(new DaytonaSandboxApi(workspace), {
|
|
223
|
+
cwd: '/workspace',
|
|
224
|
+
...options,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Checklist Before Submitting
|
|
232
|
+
|
|
233
|
+
Before handing the file back to the user, verify:
|
|
234
|
+
|
|
235
|
+
- [ ] Single TypeScript file, no inline test code, exports the factory function.
|
|
236
|
+
- [ ] All 9 required `RemoteSandboxApi` methods are implemented.
|
|
237
|
+
- [ ] `exec` honors `cwd`, `env`, `timeoutMs`, and returns `{ command, exitCode, stdout, stderr, durationMs }`.
|
|
238
|
+
- [ ] Path arguments are POSIX.
|
|
239
|
+
- [ ] No new runtime dependencies beyond the provider's official SDK and `@fabric-harness/sdk`.
|
|
240
|
+
- [ ] Cleanup is wired only if requested via options.
|
|
241
|
+
- [ ] Imports use the package's public entry: `@fabric-harness/sdk` (NOT subpaths like `/dist/...`).
|
|
242
|
+
- [ ] Function and type names follow the provider's casing convention (e.g. `daytona`, `e2b`, `modal`, `vercelSandbox`).
|
|
243
|
+
- [ ] At the top of the file, leave a one-line comment naming the provider and the SDK version targeted.
|
|
244
|
+
|
|
245
|
+
If the provider's docs are unclear on any method, leave a `// TODO` comment with a specific question rather than guessing.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FabricContext, JsonObject, Skill } from './types.js';
|
|
2
2
|
import type { Schema } from './schema.js';
|
|
3
|
+
import type { WebhookSubscriptionDefinition } from './webhook-subscription.js';
|
|
3
4
|
export interface AgentTriggers {
|
|
4
5
|
webhook?: boolean;
|
|
5
6
|
schedule?: string | string[];
|
|
@@ -15,6 +16,13 @@ export interface AgentDefinition<TInput = JsonObject, TOutput = unknown> {
|
|
|
15
16
|
target?: 'node' | 'temporal-worker';
|
|
16
17
|
skills?: Skill[];
|
|
17
18
|
triggers?: AgentTriggers;
|
|
19
|
+
/**
|
|
20
|
+
* Webhook subscription definitions. Each subscription gets its own HTTP
|
|
21
|
+
* route (`/agents/<name>/subscriptions/<id>`) on `fh server` and wakes the
|
|
22
|
+
* agent on inbound events. The host event system decides what payloads
|
|
23
|
+
* land here — fabric-harness has no opinion on the upstream taxonomy.
|
|
24
|
+
*/
|
|
25
|
+
subscriptions?: WebhookSubscriptionDefinition<unknown>[];
|
|
18
26
|
run: (context: FabricContext<TInput> & {
|
|
19
27
|
input: TInput;
|
|
20
28
|
}) => Promise<TOutput> | TOutput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-definition.d.ts","sourceRoot":"","sources":["../src/agent-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-definition.d.ts","sourceRoot":"","sources":["../src/agent-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AA4B/E,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,C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AAO,EAAE,UAAU,EAAE,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAoBzI;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS,CAIhG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,GAAG,UAAU,EAAE,OAAO,GAAG,OAAO,EACtE,UAAU,EAAE,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3C,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAkB/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-definition.js","sourceRoot":"","sources":["../src/agent-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-definition.js","sourceRoot":"","sources":["../src/agent-definition.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;;GAIG;AACH,IAAI,mBAA4E,CAAC;AACjF,SAAS,qBAAqB;IAC5B,IAAI,CAAC,mBAAmB;QAAE,mBAAmB,GAAG,wBAAwB,EAAE,CAAC;IAC3E,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,gFAAgF;AAChF,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAClC,SAAS,kBAAkB;IACzB,IAAI,qBAAqB;QAAE,OAAO;IAClC,qBAAqB,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,CAAC,IAAI,CACd,+EAA+E;QAC7E,iGAAiG;QACjG,iGAAiG;QACjG,8EAA8E,CACjF,CAAC;AACJ,CAAC;AA4BD,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;AAOvE;;;;;GAKG;AACH,MAAM,UAAU,KA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,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC,CAAC;IACF,OAAO,KAAK,CAAkB,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
package/dist/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAa9F,qBAAa,eAAgB,YAAW,WAAW;IAMrC,OAAO,CAAC,QAAQ,CAAC,OAAO;IALpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;gBAEH,OAAO,GAAE,SAAc;IAsB9C,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAa9F,qBAAa,eAAgB,YAAW,WAAW;IAMrC,OAAO,CAAC,QAAQ,CAAC,OAAO;IALpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;gBAEH,OAAO,GAAE,SAAc;IAsB9C,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAsErF;AAED,wBAAsB,IAAI,CAAC,OAAO,GAAE,SAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAExE"}
|
package/dist/agent.js
CHANGED
|
@@ -104,6 +104,9 @@ export class StubFabricAgent {
|
|
|
104
104
|
if (sessionOptions.bypassPolicyEnforcement === undefined && this.options.bypassPolicyEnforcement !== undefined) {
|
|
105
105
|
sessionOptions.bypassPolicyEnforcement = this.options.bypassPolicyEnforcement;
|
|
106
106
|
}
|
|
107
|
+
if (sessionOptions.costLimit === undefined && this.options.costLimit !== undefined) {
|
|
108
|
+
sessionOptions.costLimit = this.options.costLimit;
|
|
109
|
+
}
|
|
107
110
|
return new StubFabricSession(this, sessionId, sessionOptions);
|
|
108
111
|
}
|
|
109
112
|
}
|
package/dist/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,SAAS,UAAU;IACjB,IAAI,OAAO,UAAU,KAAK,WAAW,IAAI,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC;QACvE,OAAO,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC;IACD,sDAAsD;IACtD,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,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