@bakers-build/addon-claude 0.8.0 → 0.8.1-next.10
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/dist/src/index.js +2 -1
- package/measure/agent-proxy.mjs +3 -3
- package/measure/claude-measure.mjs +3 -3
- package/options.schema.json +20 -0
- package/package.json +9 -7
package/dist/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { homedir } from 'node:os';
|
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { promisify } from 'node:util';
|
|
8
|
-
import { CONDUCTOR_TOKEN_ENV, CONDUCTOR_TOOLS_SERVER, ensureHome, homeKey, homePath, installCommand, lastLine, resolveAgentCliOptions, resolveSecurityOptions, systemSandboxHost, validateOptionalBoolean, } from '@bakers-build/conductor/contract';
|
|
8
|
+
import { CONDUCTOR_TOKEN_ENV, CONDUCTOR_TOOL_TIMEOUT_MS, CONDUCTOR_TOOLS_SERVER, ensureHome, homeKey, homePath, installCommand, lastLine, resolveAgentCliOptions, resolveSecurityOptions, systemSandboxHost, validateOptionalBoolean, } from '@bakers-build/conductor/contract';
|
|
9
9
|
import { gitSandboxPaths, shellQuote, withoutGitDirs, } from '@bakers-build/core';
|
|
10
10
|
import { parseClaudeTranscript } from './footprint.js';
|
|
11
11
|
export { parseClaudeTranscript } from './footprint.js';
|
|
@@ -273,6 +273,7 @@ export class ClaudeAgent {
|
|
|
273
273
|
type: 'http',
|
|
274
274
|
url: tools.url,
|
|
275
275
|
headers: { Authorization: `Bearer \${${CONDUCTOR_TOKEN_ENV}}` },
|
|
276
|
+
timeout: CONDUCTOR_TOOL_TIMEOUT_MS,
|
|
276
277
|
},
|
|
277
278
|
}
|
|
278
279
|
: {};
|
package/measure/agent-proxy.mjs
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* request writes a readable Markdown document — led by a ranked table of what
|
|
11
11
|
* is eating your context.
|
|
12
12
|
*
|
|
13
|
-
* Run:
|
|
13
|
+
* Run: BAKERS_TICKET_IDENTIFIER=BB-569 node measure/agent-proxy.mjs
|
|
14
14
|
* Point Claude Code at it:
|
|
15
15
|
* ANTHROPIC_BASE_URL=http://127.0.0.1:8787 claude
|
|
16
16
|
*
|
|
@@ -78,10 +78,10 @@ export function resolveLogDirectory({
|
|
|
78
78
|
ticketIdentifier,
|
|
79
79
|
subdir,
|
|
80
80
|
} = {}) {
|
|
81
|
-
const id = ticketIdentifier ?? process.env.
|
|
81
|
+
const id = ticketIdentifier ?? process.env.BAKERS_TICKET_IDENTIFIER;
|
|
82
82
|
if (typeof id !== 'string' || !TICKET_ID.test(id)) {
|
|
83
83
|
throw new Error(
|
|
84
|
-
'[agent-proxy]
|
|
84
|
+
'[agent-proxy] BAKERS_TICKET_IDENTIFIER is required (ticket identifier such as BB-569, not a UUID)',
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
const root = path.resolve(cwd, 'assets-ai', id, 'node');
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* exits. The proxy therefore lives exactly as long as the agent process: no
|
|
14
14
|
* conductor state, nothing to reap after a restart.
|
|
15
15
|
*
|
|
16
|
-
* Reads `
|
|
16
|
+
* Reads `BAKERS_STATE`, `BAKERS_TICKET_IDENTIFIER` and `BAKERS_RUN_UUID` from the run
|
|
17
17
|
* env; logs go to `assets-ai/<identifier>/node/<run uuid>/`, exported to the
|
|
18
18
|
* command as `BB_PROXY_LOG_DIR`. When the
|
|
19
19
|
* proxy cannot start (no identifier, log directory not gitignored) the command
|
|
@@ -64,7 +64,7 @@ function projectPlugins() {
|
|
|
64
64
|
|
|
65
65
|
// `--settings` outranks project settings, so fold the project's enabledPlugins
|
|
66
66
|
// into the copy: the profile is a default, the project has the last word.
|
|
67
|
-
const group = GROUPS[process.env.
|
|
67
|
+
const group = GROUPS[process.env.BAKERS_STATE] ?? 'ops';
|
|
68
68
|
let profile = JSON.parse(
|
|
69
69
|
fs.readFileSync(path.join(HERE, `keytec-${group}.json`), 'utf8'),
|
|
70
70
|
);
|
|
@@ -108,7 +108,7 @@ try {
|
|
|
108
108
|
port: 0,
|
|
109
109
|
cwd: process.cwd(),
|
|
110
110
|
quiet: true,
|
|
111
|
-
logSubdir: process.env.
|
|
111
|
+
logSubdir: process.env.BAKERS_RUN_UUID || undefined,
|
|
112
112
|
});
|
|
113
113
|
env.ANTHROPIC_BASE_URL = `http://127.0.0.1:${proxy.address.port}`;
|
|
114
114
|
env.BB_PROXY_LOG_DIR = proxy.logDirectory;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://bakers.build/schema/addon-claude/options.schema.json",
|
|
4
|
+
"title": "@bakers-build/addon-claude options",
|
|
5
|
+
"$ref": "https://bakers.build/schema/harness-options.schema.json",
|
|
6
|
+
"properties": {
|
|
7
|
+
"measure": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"description": "Start the launch through the addon's measuring proxy.",
|
|
10
|
+
"default": false
|
|
11
|
+
},
|
|
12
|
+
"model": {
|
|
13
|
+
"description": "Passed as `--model`; replaces `opus`, `sonnet` and `fable` with one custom candidate."
|
|
14
|
+
},
|
|
15
|
+
"effort": {
|
|
16
|
+
"description": "Passed as `--effort`."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"unevaluatedProperties": false
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-claude",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1-next.10",
|
|
4
4
|
"description": "bakers.build agent plugin for the Claude CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dist/src/index.js",
|
|
9
|
-
"./preset": "./dist/src/preset.js"
|
|
9
|
+
"./preset": "./dist/src/preset.js",
|
|
10
|
+
"./options.schema.json": "./options.schema.json"
|
|
10
11
|
},
|
|
11
12
|
"files": [
|
|
12
13
|
"dist/src",
|
|
13
14
|
"measure/*.json",
|
|
14
15
|
"measure/agent-proxy.mjs",
|
|
15
16
|
"measure/claude-measure.mjs",
|
|
16
|
-
"trust/claude-trust.mjs"
|
|
17
|
+
"trust/claude-trust.mjs",
|
|
18
|
+
"options.schema.json"
|
|
17
19
|
],
|
|
18
20
|
"publishConfig": {
|
|
19
21
|
"access": "public"
|
|
@@ -24,11 +26,11 @@
|
|
|
24
26
|
"directory": "bakers-cli/addons/claude"
|
|
25
27
|
},
|
|
26
28
|
"peerDependencies": {
|
|
27
|
-
"@bakers-build/conductor": "^0.8.
|
|
28
|
-
"@bakers-build/core": "^0.8.
|
|
29
|
+
"@bakers-build/conductor": "^0.8.1-next.10",
|
|
30
|
+
"@bakers-build/core": "^0.8.1-next.10"
|
|
29
31
|
},
|
|
30
32
|
"bakersBuild": {
|
|
31
|
-
"commit": "
|
|
32
|
-
"channel": "
|
|
33
|
+
"commit": "ceb44a12624feaa85cb2b0c9f84345399b38bf50",
|
|
34
|
+
"channel": "next"
|
|
33
35
|
}
|
|
34
36
|
}
|