@mandible-ai/mandible 0.2.0 → 0.3.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/README.md +80 -34
- package/dist/examples/code-pipeline/with-providers.js +1 -2
- package/dist/examples/code-pipeline/with-providers.js.map +1 -1
- package/dist/src/cloud/client.d.ts +1 -1
- package/dist/src/cloud/client.d.ts.map +1 -1
- package/dist/src/cloud/client.js +1 -1
- package/dist/src/cloud/client.js.map +1 -1
- package/dist/src/cloud/index.d.ts +1 -3
- package/dist/src/cloud/index.d.ts.map +1 -1
- package/dist/src/cloud/index.js +0 -1
- package/dist/src/cloud/index.js.map +1 -1
- package/dist/src/cloud/types.d.ts +5 -9
- package/dist/src/cloud/types.d.ts.map +1 -1
- package/dist/src/core/types.d.ts +43 -0
- package/dist/src/core/types.d.ts.map +1 -1
- package/dist/src/core/types.js +10 -0
- package/dist/src/core/types.js.map +1 -1
- package/dist/src/dsl/index.d.ts +1 -0
- package/dist/src/dsl/index.d.ts.map +1 -1
- package/dist/src/dsl/index.js +1 -0
- package/dist/src/dsl/index.js.map +1 -1
- package/dist/src/dsl/mandible.d.ts +62 -0
- package/dist/src/dsl/mandible.d.ts.map +1 -0
- package/dist/src/dsl/mandible.js +140 -0
- package/dist/src/dsl/mandible.js.map +1 -0
- package/dist/src/environments/filesystem/adapter.d.ts.map +1 -1
- package/dist/src/environments/filesystem/adapter.js.map +1 -1
- package/dist/src/hosts/docker.d.ts +67 -0
- package/dist/src/hosts/docker.d.ts.map +1 -0
- package/dist/src/hosts/docker.js +135 -0
- package/dist/src/hosts/docker.js.map +1 -0
- package/dist/src/hosts/index.d.ts +5 -0
- package/dist/src/hosts/index.d.ts.map +1 -0
- package/dist/src/hosts/index.js +3 -0
- package/dist/src/hosts/index.js.map +1 -0
- package/dist/src/hosts/local.d.ts +41 -0
- package/dist/src/hosts/local.d.ts.map +1 -0
- package/dist/src/hosts/local.js +84 -0
- package/dist/src/hosts/local.js.map +1 -0
- package/dist/src/index.d.ts +8 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/providers/claude-code.d.ts.map +1 -1
- package/dist/src/providers/claude-code.js +3 -5
- package/dist/src/providers/claude-code.js.map +1 -1
- package/dist/src/providers/types.d.ts +0 -9
- package/dist/src/providers/types.d.ts.map +1 -1
- package/package.json +12 -2
- package/dist/examples/docker-pipeline/index.d.ts +0 -3
- package/dist/examples/docker-pipeline/index.d.ts.map +0 -1
- package/dist/examples/docker-pipeline/index.js +0 -235
- package/dist/examples/docker-pipeline/index.js.map +0 -1
- package/dist/examples/remote-pipeline/index.d.ts +0 -3
- package/dist/examples/remote-pipeline/index.d.ts.map +0 -1
- package/dist/examples/remote-pipeline/index.js +0 -154
- package/dist/examples/remote-pipeline/index.js.map +0 -1
- package/dist/src/environments/remote/adapter.d.ts +0 -61
- package/dist/src/environments/remote/adapter.d.ts.map +0 -1
- package/dist/src/environments/remote/adapter.js +0 -392
- package/dist/src/environments/remote/adapter.js.map +0 -1
- package/dist/src/environments/remote/index.d.ts +0 -5
- package/dist/src/environments/remote/index.d.ts.map +0 -1
- package/dist/src/environments/remote/index.js +0 -3
- package/dist/src/environments/remote/index.js.map +0 -1
- package/dist/src/environments/remote/protocol.d.ts +0 -124
- package/dist/src/environments/remote/protocol.d.ts.map +0 -1
- package/dist/src/environments/remote/protocol.js +0 -24
- package/dist/src/environments/remote/protocol.js.map +0 -1
- package/dist/src/providers/agent.d.ts +0 -23
- package/dist/src/providers/agent.d.ts.map +0 -1
- package/dist/src/providers/agent.js +0 -184
- package/dist/src/providers/agent.js.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { AgentProviderConfig, ActionHandler, BedrockConfig } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Creates an action handler powered by the Claude Agent SDK.
|
|
4
|
-
*
|
|
5
|
-
* The SDK must be installed separately:
|
|
6
|
-
* npm install @anthropic-ai/claude-agent-sdk
|
|
7
|
-
*
|
|
8
|
-
* The handler:
|
|
9
|
-
* 1. Builds a prompt from the signal
|
|
10
|
-
* 2. Spawns a Claude agent session via the SDK's query() AsyncGenerator
|
|
11
|
-
* 3. Consumes all messages, calling onMessage for observability
|
|
12
|
-
* 4. Extracts the final result (text, cost, duration, usage)
|
|
13
|
-
* 5. Maps the agent's output to signal deposits
|
|
14
|
-
* 6. Optionally withdraws the triggering signal
|
|
15
|
-
*/
|
|
16
|
-
export declare function withAgent<T = Record<string, unknown>>(config: AgentProviderConfig<T>): ActionHandler<T>;
|
|
17
|
-
/**
|
|
18
|
-
* Builds env vars for routing the Claude Agent SDK through AWS Bedrock.
|
|
19
|
-
* Exported for testing.
|
|
20
|
-
*/
|
|
21
|
-
export declare function buildBedrockEnv(config: BedrockConfig): Record<string, string>;
|
|
22
|
-
export declare function buildDefaultSystemPrompt(colonyName: string): string;
|
|
23
|
-
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/providers/agent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAe,aAAa,EAAiB,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnD,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC7B,aAAa,CAAC,CAAC,CAAC,CA6FlB;AAuDD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuB7E;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAOnE"}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
// PURPOSE: withAgent — Claude Agent SDK provider for full agentic colony actions.
|
|
2
|
-
// Wraps the Claude Agent SDK AsyncGenerator to give colonies coding capabilities.
|
|
3
|
-
/**
|
|
4
|
-
* Creates an action handler powered by the Claude Agent SDK.
|
|
5
|
-
*
|
|
6
|
-
* The SDK must be installed separately:
|
|
7
|
-
* npm install @anthropic-ai/claude-agent-sdk
|
|
8
|
-
*
|
|
9
|
-
* The handler:
|
|
10
|
-
* 1. Builds a prompt from the signal
|
|
11
|
-
* 2. Spawns a Claude agent session via the SDK's query() AsyncGenerator
|
|
12
|
-
* 3. Consumes all messages, calling onMessage for observability
|
|
13
|
-
* 4. Extracts the final result (text, cost, duration, usage)
|
|
14
|
-
* 5. Maps the agent's output to signal deposits
|
|
15
|
-
* 6. Optionally withdraws the triggering signal
|
|
16
|
-
*/
|
|
17
|
-
export function withAgent(config) {
|
|
18
|
-
const { model = 'claude-sonnet-4-5-20250929', prompt, systemPrompt, allowedTools, tools, disallowedTools, workingDirectory, maxTurns, maxBudgetUsd = 1.0, permissionMode = 'bypassPermissions', onMessage, env, bedrock, output, autoWithdraw = true, } = config;
|
|
19
|
-
// Resolve allowedTools with backward compat for deprecated `tools`
|
|
20
|
-
const resolvedAllowedTools = allowedTools ?? tools;
|
|
21
|
-
return async (signal, ctx) => {
|
|
22
|
-
// 1. Resolve the prompt
|
|
23
|
-
const resolvedPrompt = typeof prompt === 'function'
|
|
24
|
-
? await prompt(signal)
|
|
25
|
-
: prompt;
|
|
26
|
-
// 2. Resolve working directory
|
|
27
|
-
const cwd = typeof workingDirectory === 'function'
|
|
28
|
-
? workingDirectory(signal)
|
|
29
|
-
: workingDirectory;
|
|
30
|
-
// 3. Call Claude Agent SDK
|
|
31
|
-
let agentResult;
|
|
32
|
-
try {
|
|
33
|
-
// Dynamic import — SDK is an optional peer dependency
|
|
34
|
-
const sdk = await import('@anthropic-ai/claude-agent-sdk');
|
|
35
|
-
const queryOptions = {
|
|
36
|
-
model,
|
|
37
|
-
systemPrompt: systemPrompt ?? buildDefaultSystemPrompt(ctx.colony),
|
|
38
|
-
cwd: cwd ?? process.cwd(),
|
|
39
|
-
permissionMode,
|
|
40
|
-
allowDangerouslySkipPermissions: permissionMode === 'bypassPermissions',
|
|
41
|
-
maxBudgetUsd,
|
|
42
|
-
};
|
|
43
|
-
if (resolvedAllowedTools)
|
|
44
|
-
queryOptions.allowedTools = resolvedAllowedTools;
|
|
45
|
-
if (disallowedTools)
|
|
46
|
-
queryOptions.disallowedTools = disallowedTools;
|
|
47
|
-
if (maxTurns !== undefined)
|
|
48
|
-
queryOptions.maxTurns = maxTurns;
|
|
49
|
-
// Merge Bedrock env vars with user-provided env (user takes precedence)
|
|
50
|
-
const bedrockEnv = bedrock ? buildBedrockEnv(bedrock) : undefined;
|
|
51
|
-
const mergedEnv = bedrockEnv || env
|
|
52
|
-
? { ...bedrockEnv, ...env }
|
|
53
|
-
: undefined;
|
|
54
|
-
if (mergedEnv)
|
|
55
|
-
queryOptions.env = mergedEnv;
|
|
56
|
-
const generator = sdk.query({
|
|
57
|
-
prompt: resolvedPrompt,
|
|
58
|
-
options: queryOptions,
|
|
59
|
-
});
|
|
60
|
-
agentResult = await consumeGenerator(generator, onMessage);
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
if (err.code === 'ERR_MODULE_NOT_FOUND' || err.code === 'MODULE_NOT_FOUND') {
|
|
64
|
-
throw new Error('withAgent requires @anthropic-ai/claude-agent-sdk. Install it:\n' +
|
|
65
|
-
' npm install @anthropic-ai/claude-agent-sdk');
|
|
66
|
-
}
|
|
67
|
-
throw err;
|
|
68
|
-
}
|
|
69
|
-
// 4. Deposit output signals
|
|
70
|
-
const deposits = resolveOutput(output, agentResult, signal);
|
|
71
|
-
for (const deposit of deposits) {
|
|
72
|
-
await ctx.deposit(deposit.type, deposit.payload ?? { ...agentResult }, {
|
|
73
|
-
causedBy: [signal.id],
|
|
74
|
-
tags: deposit.tags,
|
|
75
|
-
ttl: deposit.ttl,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
// 5. Withdraw the triggering signal
|
|
79
|
-
if (autoWithdraw) {
|
|
80
|
-
await ctx.withdraw(signal.id);
|
|
81
|
-
}
|
|
82
|
-
ctx.log(`Agent completed (${agentResult.subtype}). Cost: $${agentResult.costUsd.toFixed(4)}, Duration: ${agentResult.durationMs}ms. Deposited ${deposits.length} signal(s).`);
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
// ----------------------------------------------------------
|
|
86
|
-
// Helpers
|
|
87
|
-
// ----------------------------------------------------------
|
|
88
|
-
/**
|
|
89
|
-
* Consumes the SDK's AsyncGenerator, collecting all messages and
|
|
90
|
-
* extracting the final result from the SDKResultMessage.
|
|
91
|
-
*/
|
|
92
|
-
async function consumeGenerator(generator, onMessage) {
|
|
93
|
-
const messages = [];
|
|
94
|
-
let resultMessage = null;
|
|
95
|
-
for await (const message of generator) {
|
|
96
|
-
messages.push(message);
|
|
97
|
-
// Call observability callback (errors must not crash the agent)
|
|
98
|
-
if (onMessage) {
|
|
99
|
-
try {
|
|
100
|
-
onMessage(message);
|
|
101
|
-
}
|
|
102
|
-
catch { /* swallow */ }
|
|
103
|
-
}
|
|
104
|
-
// Capture the result message when it arrives
|
|
105
|
-
if (message.type === 'result') {
|
|
106
|
-
resultMessage = message;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (!resultMessage) {
|
|
110
|
-
return {
|
|
111
|
-
text: '',
|
|
112
|
-
costUsd: 0,
|
|
113
|
-
durationMs: 0,
|
|
114
|
-
usage: { input_tokens: 0, output_tokens: 0 },
|
|
115
|
-
subtype: 'error_during_execution',
|
|
116
|
-
messages,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
return {
|
|
120
|
-
text: resultMessage.result ?? resultMessage.errors?.join('\n') ?? '',
|
|
121
|
-
costUsd: resultMessage.total_cost_usd ?? 0,
|
|
122
|
-
durationMs: resultMessage.duration_ms ?? 0,
|
|
123
|
-
usage: {
|
|
124
|
-
input_tokens: resultMessage.usage?.input_tokens ?? 0,
|
|
125
|
-
output_tokens: resultMessage.usage?.output_tokens ?? 0,
|
|
126
|
-
},
|
|
127
|
-
subtype: resultMessage.subtype ?? 'success',
|
|
128
|
-
messages,
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Builds env vars for routing the Claude Agent SDK through AWS Bedrock.
|
|
133
|
-
* Exported for testing.
|
|
134
|
-
*/
|
|
135
|
-
export function buildBedrockEnv(config) {
|
|
136
|
-
const env = {
|
|
137
|
-
CLAUDE_CODE_USE_BEDROCK: '1',
|
|
138
|
-
AWS_REGION: config.region,
|
|
139
|
-
};
|
|
140
|
-
if (config.model)
|
|
141
|
-
env.ANTHROPIC_MODEL = config.model;
|
|
142
|
-
if (config.accessKeyId)
|
|
143
|
-
env.AWS_ACCESS_KEY_ID = config.accessKeyId;
|
|
144
|
-
if (config.secretAccessKey)
|
|
145
|
-
env.AWS_SECRET_ACCESS_KEY = config.secretAccessKey;
|
|
146
|
-
if (config.sessionToken)
|
|
147
|
-
env.AWS_SESSION_TOKEN = config.sessionToken;
|
|
148
|
-
if (config.profile)
|
|
149
|
-
env.AWS_PROFILE = config.profile;
|
|
150
|
-
if (config.guardrailId) {
|
|
151
|
-
const headers = {
|
|
152
|
-
'x-amzn-bedrock-guardrail-identifier': config.guardrailId,
|
|
153
|
-
};
|
|
154
|
-
if (config.guardrailVersion) {
|
|
155
|
-
headers['x-amzn-bedrock-guardrail-version'] = config.guardrailVersion;
|
|
156
|
-
}
|
|
157
|
-
env.ANTHROPIC_CUSTOM_HEADERS = JSON.stringify(headers);
|
|
158
|
-
}
|
|
159
|
-
return env;
|
|
160
|
-
}
|
|
161
|
-
export function buildDefaultSystemPrompt(colonyName) {
|
|
162
|
-
return [
|
|
163
|
-
`You are an agent in the "${colonyName}" colony.`,
|
|
164
|
-
'Complete the task described in the prompt.',
|
|
165
|
-
'Be thorough but concise. Focus on the specific task at hand.',
|
|
166
|
-
'If you create or modify files, ensure they compile/pass tests.',
|
|
167
|
-
].join('\n');
|
|
168
|
-
}
|
|
169
|
-
function resolveOutput(output, result, signal) {
|
|
170
|
-
if (!output) {
|
|
171
|
-
return [{ type: `${signal.type}:completed`, payload: result }];
|
|
172
|
-
}
|
|
173
|
-
if (typeof output === 'function') {
|
|
174
|
-
const mapped = output(result, signal);
|
|
175
|
-
return Array.isArray(mapped) ? mapped : [mapped];
|
|
176
|
-
}
|
|
177
|
-
return [{
|
|
178
|
-
type: output.type,
|
|
179
|
-
payload: result,
|
|
180
|
-
tags: output.tags,
|
|
181
|
-
ttl: output.ttl,
|
|
182
|
-
}];
|
|
183
|
-
}
|
|
184
|
-
//# sourceMappingURL=agent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/providers/agent.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,kFAAkF;AAKlF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,SAAS,CACvB,MAA8B;IAE9B,MAAM,EACJ,KAAK,GAAG,4BAA4B,EACpC,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,YAAY,GAAG,GAAG,EAClB,cAAc,GAAG,mBAAmB,EACpC,SAAS,EACT,GAAG,EACH,OAAO,EACP,MAAM,EACN,YAAY,GAAG,IAAI,GACpB,GAAG,MAAM,CAAC;IAEX,mEAAmE;IACnE,MAAM,oBAAoB,GAAG,YAAY,IAAI,KAAK,CAAC;IAEnD,OAAO,KAAK,EAAE,MAAiB,EAAE,GAAkB,EAAE,EAAE;QACrD,wBAAwB;QACxB,MAAM,cAAc,GAAG,OAAO,MAAM,KAAK,UAAU;YACjD,CAAC,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC;YACtB,CAAC,CAAC,MAAM,CAAC;QAEX,+BAA+B;QAC/B,MAAM,GAAG,GAAG,OAAO,gBAAgB,KAAK,UAAU;YAChD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