@agent-relay/harnesses 8.1.2
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/README.md +7 -0
- package/dist/broker-binding.d.ts +14 -0
- package/dist/broker-binding.d.ts.map +1 -0
- package/dist/broker-binding.js +32 -0
- package/dist/broker-binding.js.map +1 -0
- package/dist/create-human.d.ts +15 -0
- package/dist/create-human.d.ts.map +1 -0
- package/dist/create-human.js +11 -0
- package/dist/create-human.js.map +1 -0
- package/dist/define.d.ts +60 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +59 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @agent-relay/harnesses
|
|
2
|
+
|
|
3
|
+
Pre-built harness definitions for common local agent CLIs.
|
|
4
|
+
|
|
5
|
+
Use this package with `@agent-relay/harness-driver` when Agent Relay should create or
|
|
6
|
+
supervise managed sessions for tools such as Claude Code, Codex, Gemini,
|
|
7
|
+
OpenCode, Aider, Goose, Cursor, or Droid.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgentRelay } from '@agent-relay/sdk';
|
|
2
|
+
import { BrokerDriver } from '@agent-relay/harness-driver';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the shared {@link BrokerDriver} that spawns harness agents into
|
|
5
|
+
* `relay`'s workspace.
|
|
6
|
+
*
|
|
7
|
+
* The broker joins the workspace through its `RELAY_API_KEY` environment
|
|
8
|
+
* variable, so the relay must already own a workspace key.
|
|
9
|
+
*
|
|
10
|
+
* @param relay - The workspace-bound SDK client agents should join.
|
|
11
|
+
* @returns The cached driver for this relay, creating one on first use.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getHarnessDriver(relay: AgentRelay): BrokerDriver;
|
|
14
|
+
//# sourceMappingURL=broker-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"broker-binding.d.ts","sourceRoot":"","sources":["../src/broker-binding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAU3D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,YAAY,CAehE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BrokerDriver } from '@agent-relay/harness-driver';
|
|
2
|
+
/**
|
|
3
|
+
* One {@link BrokerDriver} per `AgentRelay` instance. The first
|
|
4
|
+
* `create({ relay })` call starts a broker bound to the relay's workspace; every
|
|
5
|
+
* later call for the same relay reuses it, so all harness agents share a single
|
|
6
|
+
* broker.
|
|
7
|
+
*/
|
|
8
|
+
const driversByRelay = new WeakMap();
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the shared {@link BrokerDriver} that spawns harness agents into
|
|
11
|
+
* `relay`'s workspace.
|
|
12
|
+
*
|
|
13
|
+
* The broker joins the workspace through its `RELAY_API_KEY` environment
|
|
14
|
+
* variable, so the relay must already own a workspace key.
|
|
15
|
+
*
|
|
16
|
+
* @param relay - The workspace-bound SDK client agents should join.
|
|
17
|
+
* @returns The cached driver for this relay, creating one on first use.
|
|
18
|
+
*/
|
|
19
|
+
export function getHarnessDriver(relay) {
|
|
20
|
+
const existing = driversByRelay.get(relay);
|
|
21
|
+
if (existing)
|
|
22
|
+
return existing;
|
|
23
|
+
const workspaceKey = relay.workspaceKey;
|
|
24
|
+
if (!workspaceKey) {
|
|
25
|
+
throw new Error('create({ relay }) needs a workspace. Create one with AgentRelay.createWorkspace(...) or ' +
|
|
26
|
+
'construct AgentRelay with a workspaceKey before spawning harness agents.');
|
|
27
|
+
}
|
|
28
|
+
const driver = new BrokerDriver({ env: { RELAY_API_KEY: workspaceKey } });
|
|
29
|
+
driversByRelay.set(relay, driver);
|
|
30
|
+
return driver;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=broker-binding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"broker-binding.js","sourceRoot":"","sources":["../src/broker-binding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,cAAc,GAAG,IAAI,OAAO,EAA4B,CAAC;AAE/D;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAiB;IAChD,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAE9B,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IACxC,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,0FAA0F;YACxF,0EAA0E,CAC7E,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,EAAE,GAAG,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;IAC1E,cAAc,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AgentRelay, RelayAgentClient } from '@agent-relay/sdk';
|
|
2
|
+
export interface CreateHumanInput {
|
|
3
|
+
relay: AgentRelay;
|
|
4
|
+
name: string;
|
|
5
|
+
persona?: string;
|
|
6
|
+
metadata?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Register a human participant and return their live client.
|
|
10
|
+
*
|
|
11
|
+
* A human is just a harness with no managed runtime, so `createHuman({ relay })`
|
|
12
|
+
* self-registers and returns the live client — mirroring `claude.create({ relay })`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createHuman(input: CreateHumanInput): Promise<RelayAgentClient>;
|
|
15
|
+
//# sourceMappingURL=create-human.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-human.d.ts","sourceRoot":"","sources":["../src/create-human.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAErE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAG9E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register a human participant and return their live client.
|
|
3
|
+
*
|
|
4
|
+
* A human is just a harness with no managed runtime, so `createHuman({ relay })`
|
|
5
|
+
* self-registers and returns the live client — mirroring `claude.create({ relay })`.
|
|
6
|
+
*/
|
|
7
|
+
export function createHuman(input) {
|
|
8
|
+
const { relay, name, persona, metadata } = input;
|
|
9
|
+
return relay.workspace.register({ name, type: 'human', persona, metadata });
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=create-human.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-human.js","sourceRoot":"","sources":["../src/create-human.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACjD,OAAO,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC9E,CAAC"}
|
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type AgentRelay, type HarnessFactory, type RelayHarnessAgent } from '@agent-relay/sdk';
|
|
2
|
+
import type { StaticPtyHarnessDefinition } from '@agent-relay/harness-driver';
|
|
3
|
+
/** Options accepted when creating an agent from a harness. */
|
|
4
|
+
export interface HarnessCreateInput {
|
|
5
|
+
/** Explicit agent name/handle. Defaults to `<command>-<n>`. */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Model passed through to the harness CLI (e.g. `sonnet`, `gpt-5.5`). */
|
|
8
|
+
model?: string;
|
|
9
|
+
/** Extra CLI arguments. */
|
|
10
|
+
args?: string[];
|
|
11
|
+
/** Initial task prompt for the agent. */
|
|
12
|
+
task?: string;
|
|
13
|
+
cwd?: string;
|
|
14
|
+
env?: Record<string, string>;
|
|
15
|
+
/** Channels the agent should join once registered. */
|
|
16
|
+
channels?: string[];
|
|
17
|
+
/**
|
|
18
|
+
* When provided, {@link PtyHarness.create} starts a live PTY session in this
|
|
19
|
+
* workspace: it attaches or starts the broker, spawns the agent, and returns a
|
|
20
|
+
* handle to the already-registered agent. Omit it to build a descriptor for an
|
|
21
|
+
* externally-run agent you register yourself.
|
|
22
|
+
*/
|
|
23
|
+
relay?: AgentRelay;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An agent produced by a harness factory. Carries the identity and predicate
|
|
27
|
+
* builders used with `relay.on(...)`, plus the resolved spawn details the
|
|
28
|
+
* runtime needs to actually launch the process.
|
|
29
|
+
*/
|
|
30
|
+
export interface HarnessAgent extends RelayHarnessAgent {
|
|
31
|
+
kind: 'pty';
|
|
32
|
+
cli: string;
|
|
33
|
+
/** Driver runtime tag — the harness-driver `AgentRuntime` this agent maps to. */
|
|
34
|
+
runtime: 'pty';
|
|
35
|
+
model?: string;
|
|
36
|
+
task?: string;
|
|
37
|
+
args?: string[];
|
|
38
|
+
channels?: string[];
|
|
39
|
+
cwd?: string;
|
|
40
|
+
env?: Record<string, string>;
|
|
41
|
+
definition: StaticPtyHarnessDefinition;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A harness factory. Remains structurally a {@link StaticPtyHarnessDefinition}
|
|
45
|
+
* (so the runtime can resolve it) while adding the {@link HarnessFactory}
|
|
46
|
+
* `create`/`new` methods that produce {@link HarnessAgent}s.
|
|
47
|
+
*/
|
|
48
|
+
export interface PtyHarness extends StaticPtyHarnessDefinition, HarnessFactory<HarnessCreateInput, HarnessAgent> {
|
|
49
|
+
/**
|
|
50
|
+
* With `{ relay }`, spawn a live PTY agent into that workspace and return a
|
|
51
|
+
* handle to the running, already-registered agent. Without it, build a
|
|
52
|
+
* descriptor for an externally-run agent you register yourself.
|
|
53
|
+
*/
|
|
54
|
+
create(input?: HarnessCreateInput): Promise<HarnessAgent>;
|
|
55
|
+
/** Synchronous descriptor builder — never spawns. Register it yourself. */
|
|
56
|
+
new: (input?: HarnessCreateInput) => HarnessAgent;
|
|
57
|
+
}
|
|
58
|
+
/** Wrap a static PTY harness definition in a factory with `create`/`new`. */
|
|
59
|
+
export declare function definePtyHarness(definition: StaticPtyHarnessDefinition): PtyHarness;
|
|
60
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAI9E,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,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@agent-relay/sdk';
|
|
2
|
+
import { getHarnessDriver } from './broker-binding.js';
|
|
3
|
+
/** Wrap a static PTY harness definition in a factory with `create`/`new`. */
|
|
4
|
+
export function definePtyHarness(definition) {
|
|
5
|
+
const build = (input = {}) => {
|
|
6
|
+
const name = nextHarnessName(definition.command, input.name);
|
|
7
|
+
const handle = createAgentHandle({ id: `harness:${definition.command}:${name}`, name });
|
|
8
|
+
return {
|
|
9
|
+
...handle,
|
|
10
|
+
kind: 'pty',
|
|
11
|
+
cli: definition.command,
|
|
12
|
+
runtime: 'pty',
|
|
13
|
+
model: input.model,
|
|
14
|
+
task: input.task,
|
|
15
|
+
args: input.args,
|
|
16
|
+
channels: input.channels,
|
|
17
|
+
cwd: input.cwd ?? definition.cwd,
|
|
18
|
+
env: input.env ?? definition.env,
|
|
19
|
+
definition,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const spawnLive = async (input, relay) => {
|
|
23
|
+
const driver = getHarnessDriver(relay);
|
|
24
|
+
const cwd = input.cwd ?? definition.cwd;
|
|
25
|
+
const runtime = await driver.spawn({
|
|
26
|
+
name: nextHarnessName(definition.command, input.name),
|
|
27
|
+
cli: definition.command,
|
|
28
|
+
transport: 'pty',
|
|
29
|
+
model: input.model,
|
|
30
|
+
task: input.task,
|
|
31
|
+
args: input.args,
|
|
32
|
+
channels: input.channels,
|
|
33
|
+
cwd,
|
|
34
|
+
});
|
|
35
|
+
// Key the handle by the registered agent name so `agent.status.becomes(...)`
|
|
36
|
+
// predicates match the workspace events emitted for that agent.
|
|
37
|
+
const handle = createAgentHandle({ id: runtime.agent.name, name: runtime.agent.name });
|
|
38
|
+
return {
|
|
39
|
+
...handle,
|
|
40
|
+
kind: 'pty',
|
|
41
|
+
cli: definition.command,
|
|
42
|
+
runtime: 'pty',
|
|
43
|
+
model: input.model,
|
|
44
|
+
task: input.task,
|
|
45
|
+
args: input.args,
|
|
46
|
+
channels: input.channels,
|
|
47
|
+
cwd,
|
|
48
|
+
env: input.env ?? definition.env,
|
|
49
|
+
definition,
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
...definition,
|
|
54
|
+
name: definition.command,
|
|
55
|
+
create: async (input = {}) => (input.relay ? spawnLive(input, input.relay) : build(input)),
|
|
56
|
+
new: (input) => build(input),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=define.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,GAIhB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA6DvD,6EAA6E;AAC7E,MAAM,UAAU,gBAAgB,CAAC,UAAsC;IACrE,MAAM,KAAK,GAAG,CAAC,QAA4B,EAAE,EAAgB,EAAE;QAC7D,MAAM,IAAI,GAAG,eAAe,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,EAAE,EAAE,WAAW,UAAU,CAAC,OAAO,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACxF,OAAO;YACL,GAAG,MAAM;YACT,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,UAAU,CAAC,OAAO;YACvB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,UAAU,CAAC,GAAG;YAChC,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,UAAU,CAAC,GAAG;YAChC,UAAU;SACX,CAAC;IACJ,CAAC,CAAC;IAEF,MA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E,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1F,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;KAC7B,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type PtyHarness } from './define.js';
|
|
2
|
+
export * from './define.js';
|
|
3
|
+
export * from './create-human.js';
|
|
4
|
+
export { defineHarness, normalizeAgentIdentity, MINIMAL_AGENT_SESSION_CAPABILITIES } from '@agent-relay/sdk';
|
|
5
|
+
export type { AgentSession, AgentSessionCapabilities, HarnessConfig, HarnessCreateContext, } from '@agent-relay/sdk';
|
|
6
|
+
export declare const claude: PtyHarness;
|
|
7
|
+
export declare const codex: PtyHarness;
|
|
8
|
+
export declare const gemini: PtyHarness;
|
|
9
|
+
export declare const cursor: PtyHarness;
|
|
10
|
+
export declare const droid: PtyHarness;
|
|
11
|
+
export declare const opencode: PtyHarness;
|
|
12
|
+
export declare const aider: PtyHarness;
|
|
13
|
+
export declare const goose: PtyHarness;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhE,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAIlC,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAC;AAC7G,YAAY,EACV,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAE1B,eAAO,MAAM,MAAM,EAAE,UAAoE,CAAC;AAE1F,eAAO,MAAM,KAAK,EAAE,UAAmE,CAAC;AAExF,eAAO,MAAM,MAAM,EAAE,UAAoE,CAAC;AAE1F,eAAO,MAAM,MAAM,EAAE,UAAoE,CAAC;AAE1F,eAAO,MAAM,KAAK,EAAE,UAAmE,CAAC;AAExF,eAAO,MAAM,QAAQ,EAAE,UAAsE,CAAC;AAE9F,eAAO,MAAM,KAAK,EAAE,UAAmE,CAAC;AAExF,eAAO,MAAM,KAAK,EAAE,UAAmE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { definePtyHarness } from './define.js';
|
|
2
|
+
export * from './define.js';
|
|
3
|
+
export * from './create-human.js';
|
|
4
|
+
// Custom (non-PTY) harnesses are defined with the SDK's harness contract;
|
|
5
|
+
// re-export it here so harness authors have one import surface.
|
|
6
|
+
export { defineHarness, normalizeAgentIdentity, MINIMAL_AGENT_SESSION_CAPABILITIES } from '@agent-relay/sdk';
|
|
7
|
+
export const claude = definePtyHarness({ runtime: 'pty', command: 'claude' });
|
|
8
|
+
export const codex = definePtyHarness({ runtime: 'pty', command: 'codex' });
|
|
9
|
+
export const gemini = definePtyHarness({ runtime: 'pty', command: 'gemini' });
|
|
10
|
+
export const cursor = definePtyHarness({ runtime: 'pty', command: 'cursor' });
|
|
11
|
+
export const droid = definePtyHarness({ runtime: 'pty', command: 'droid' });
|
|
12
|
+
export const opencode = definePtyHarness({ runtime: 'pty', command: 'opencode' });
|
|
13
|
+
export const aider = definePtyHarness({ runtime: 'pty', command: 'aider' });
|
|
14
|
+
export const goose = definePtyHarness({ runtime: 'pty', command: 'goose' });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,aAAa,CAAC;AAEhE,cAAc,aAAa,CAAC;AAC5B,cAAc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
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"package.json"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc -p tsconfig.json",
|
|
22
|
+
"check": "tsc -p tsconfig.json --noEmit",
|
|
23
|
+
"test": "vitest run"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@agent-relay/harness-driver": "8.1.2",
|
|
27
|
+
"@agent-relay/sdk": "8.1.2"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/AgentWorkforce/relay.git",
|
|
35
|
+
"directory": "packages/harnesses"
|
|
36
|
+
},
|
|
37
|
+
"license": "Apache-2.0"
|
|
38
|
+
}
|