@parall/claude-agent 1.21.0 → 1.23.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/dist/index.js +1 -1
- package/dist/workspace.d.ts +2 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +8 -12
- package/package.json +4 -4
- package/src/index.ts +1 -1
- package/src/workspace.ts +9 -12
package/dist/index.js
CHANGED
|
@@ -16,7 +16,6 @@ function createLogger(prefix) {
|
|
|
16
16
|
async function main() {
|
|
17
17
|
const config = resolveClaudeAgentConfig(process.env);
|
|
18
18
|
const log = createLogger("claude-agent");
|
|
19
|
-
ensureClaudeWorkspace(config.workspaceDir, log);
|
|
20
19
|
if (config.allowApiKey &&
|
|
21
20
|
(process.env.ANTHROPIC_API_KEY || process.env.ANTHROPIC_AUTH_TOKEN)) {
|
|
22
21
|
// Surface the billing path: default is OAuth (Claude.ai subscription); this
|
|
@@ -31,6 +30,7 @@ async function main() {
|
|
|
31
30
|
});
|
|
32
31
|
const me = await client.getMe();
|
|
33
32
|
const agentUserId = me.id;
|
|
33
|
+
ensureClaudeWorkspace(config.workspaceDir, log, { userId: agentUserId, displayName: me.display_name });
|
|
34
34
|
const runtimeKey = config.runtimeKey || buildClaudeRuntimeKey(agentUserId);
|
|
35
35
|
const sessionStateFilePath = sessionStateFilePathForRuntime(config.stateDir, runtimeKey);
|
|
36
36
|
const sessionManager = new ClaudeSessionManager(runtimeKey, sessionStateFilePath, log);
|
package/dist/workspace.d.ts
CHANGED
package/dist/workspace.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,EACrC,aAAa,CAAC,EAAE,aAAa,QAgC9B"}
|
package/dist/workspace.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
-
import { BRIDGE_WORKSPACE_INSTRUCTIONS, PRLL_BEHAVIOR,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
PRLL_BEHAVIOR,
|
|
12
|
-
PRLL_REFERENCE_GUIDE,
|
|
13
|
-
].join("\n\n");
|
|
14
|
-
export function ensureClaudeWorkspace(workspaceDir, log) {
|
|
3
|
+
import { BRIDGE_WORKSPACE_INSTRUCTIONS, PRLL_BEHAVIOR, PRLL_REFERENCE_GUIDE, buildIdentity, } from "@parall/agent-core";
|
|
4
|
+
export function ensureClaudeWorkspace(workspaceDir, log, agentIdentity) {
|
|
5
|
+
const CLAUDE_MD = [
|
|
6
|
+
buildIdentity(agentIdentity),
|
|
7
|
+
BRIDGE_WORKSPACE_INSTRUCTIONS,
|
|
8
|
+
PRLL_BEHAVIOR,
|
|
9
|
+
PRLL_REFERENCE_GUIDE,
|
|
10
|
+
].join("\n\n");
|
|
15
11
|
fs.mkdirSync(workspaceDir, { recursive: true });
|
|
16
12
|
fs.mkdirSync(path.join(workspaceDir, ".claude"), { recursive: true });
|
|
17
13
|
// CLAUDE.md is bridge-managed: always overwrite so a hosted PVC keeps the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/claude-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"description": "Claude Code bridge runtime for self-hosted Parall agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"src"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@parall/agent-core": "1.
|
|
29
|
-
"@parall/cli": "1.
|
|
30
|
-
"@parall/sdk": "1.
|
|
28
|
+
"@parall/agent-core": "1.23.0",
|
|
29
|
+
"@parall/cli": "1.23.0",
|
|
30
|
+
"@parall/sdk": "1.23.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^22.0.0",
|
package/src/index.ts
CHANGED
|
@@ -25,7 +25,6 @@ function createLogger(prefix: string) {
|
|
|
25
25
|
async function main() {
|
|
26
26
|
const config = resolveClaudeAgentConfig(process.env);
|
|
27
27
|
const log = createLogger("claude-agent");
|
|
28
|
-
ensureClaudeWorkspace(config.workspaceDir, log);
|
|
29
28
|
|
|
30
29
|
if (
|
|
31
30
|
config.allowApiKey &&
|
|
@@ -47,6 +46,7 @@ async function main() {
|
|
|
47
46
|
|
|
48
47
|
const me = await client.getMe();
|
|
49
48
|
const agentUserId = me.id;
|
|
49
|
+
ensureClaudeWorkspace(config.workspaceDir, log, { userId: agentUserId, displayName: me.display_name });
|
|
50
50
|
const runtimeKey = config.runtimeKey || buildClaudeRuntimeKey(agentUserId);
|
|
51
51
|
const sessionStateFilePath = sessionStateFilePathForRuntime(config.stateDir, runtimeKey);
|
|
52
52
|
const sessionManager = new ClaudeSessionManager(
|
package/src/workspace.ts
CHANGED
|
@@ -3,25 +3,22 @@ import * as path from "node:path";
|
|
|
3
3
|
import {
|
|
4
4
|
BRIDGE_WORKSPACE_INSTRUCTIONS,
|
|
5
5
|
PRLL_BEHAVIOR,
|
|
6
|
-
PRLL_IDENTITY,
|
|
7
6
|
PRLL_REFERENCE_GUIDE,
|
|
7
|
+
buildIdentity,
|
|
8
8
|
} from "@parall/agent-core";
|
|
9
|
-
|
|
10
|
-
// Same slot order as OpenClaw / Hermes: identity → channel-context
|
|
11
|
-
// (BRIDGE_WORKSPACE_INSTRUCTIONS plays that role for bridge runtimes) →
|
|
12
|
-
// behavior → reference guide. Keeps the agent-facing prompt schema strictly
|
|
13
|
-
// unified across runtimes.
|
|
14
|
-
const CLAUDE_MD = [
|
|
15
|
-
PRLL_IDENTITY,
|
|
16
|
-
BRIDGE_WORKSPACE_INSTRUCTIONS,
|
|
17
|
-
PRLL_BEHAVIOR,
|
|
18
|
-
PRLL_REFERENCE_GUIDE,
|
|
19
|
-
].join("\n\n");
|
|
9
|
+
import type { AgentIdentity } from "@parall/agent-core";
|
|
20
10
|
|
|
21
11
|
export function ensureClaudeWorkspace(
|
|
22
12
|
workspaceDir: string,
|
|
23
13
|
log?: { warn: (msg: string) => void },
|
|
14
|
+
agentIdentity?: AgentIdentity,
|
|
24
15
|
) {
|
|
16
|
+
const CLAUDE_MD = [
|
|
17
|
+
buildIdentity(agentIdentity),
|
|
18
|
+
BRIDGE_WORKSPACE_INSTRUCTIONS,
|
|
19
|
+
PRLL_BEHAVIOR,
|
|
20
|
+
PRLL_REFERENCE_GUIDE,
|
|
21
|
+
].join("\n\n");
|
|
25
22
|
fs.mkdirSync(workspaceDir, { recursive: true });
|
|
26
23
|
fs.mkdirSync(path.join(workspaceDir, ".claude"), { recursive: true });
|
|
27
24
|
|