@parall/codex-agent 1.21.0 → 1.22.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 CHANGED
@@ -16,7 +16,6 @@ function createLogger(prefix) {
16
16
  async function main() {
17
17
  const config = resolveCodexAgentConfig(process.env);
18
18
  const log = createLogger("codex-agent");
19
- ensureCodexWorkspace(config.workspaceDir, log);
20
19
  const client = new ParallClient({
21
20
  baseUrl: config.apiUrl,
22
21
  token: config.apiKey,
@@ -24,6 +23,7 @@ async function main() {
24
23
  });
25
24
  const me = await client.getMe();
26
25
  const agentUserId = me.id;
26
+ ensureCodexWorkspace(config.workspaceDir, log, { userId: agentUserId, displayName: me.display_name });
27
27
  const runtimeKey = config.runtimeKey || buildCodexRuntimeKey(agentUserId);
28
28
  const sessionStateFilePath = sessionStateFilePathForRuntime(config.stateDir, runtimeKey);
29
29
  const sessionManager = new CodexSessionManager(runtimeKey, sessionStateFilePath, log);
@@ -1,4 +1,5 @@
1
+ import type { AgentIdentity } from "@parall/agent-core";
1
2
  export declare function ensureCodexWorkspace(workspaceDir: string, log?: {
2
3
  warn: (msg: string) => void;
3
- }): void;
4
+ }, agentIdentity?: AgentIdentity): void;
4
5
  //# sourceMappingURL=workspace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAoBA,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,QAyBtC"}
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,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,EACrC,aAAa,CAAC,EAAE,aAAa,QA+B9B"}
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, PRLL_IDENTITY, PRLL_REFERENCE_GUIDE, } from "@parall/agent-core";
4
- // Same slot order as OpenClaw / Hermes: identity → channel-context
5
- // (BRIDGE_WORKSPACE_INSTRUCTIONS plays that role for bridge runtimes) →
6
- // behavior → reference guide. Keeps the agent-facing prompt schema strictly
7
- // unified across runtimes.
8
- const AGENTS_MD = [
9
- PRLL_IDENTITY,
10
- BRIDGE_WORKSPACE_INSTRUCTIONS,
11
- PRLL_BEHAVIOR,
12
- PRLL_REFERENCE_GUIDE,
13
- ].join("\n\n");
14
- export function ensureCodexWorkspace(workspaceDir, log) {
3
+ import { BRIDGE_WORKSPACE_INSTRUCTIONS, PRLL_BEHAVIOR, PRLL_REFERENCE_GUIDE, buildIdentity, } from "@parall/agent-core";
4
+ export function ensureCodexWorkspace(workspaceDir, log, agentIdentity) {
5
+ const AGENTS_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
  // AGENTS.md is bridge-managed: always overwrite so the workspace picks up
17
13
  // updated guardrails / command templates on upgrade. Operators must not
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/codex-agent",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "description": "Codex CLI 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.21.0",
29
- "@parall/cli": "1.21.0",
30
- "@parall/sdk": "1.21.0"
28
+ "@parall/agent-core": "1.22.0",
29
+ "@parall/cli": "1.22.0",
30
+ "@parall/sdk": "1.22.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 = resolveCodexAgentConfig(process.env);
27
27
  const log = createLogger("codex-agent");
28
- ensureCodexWorkspace(config.workspaceDir, log);
29
28
 
30
29
  const client = new ParallClient({
31
30
  baseUrl: config.apiUrl,
@@ -35,6 +34,7 @@ async function main() {
35
34
 
36
35
  const me = await client.getMe();
37
36
  const agentUserId = me.id;
37
+ ensureCodexWorkspace(config.workspaceDir, log, { userId: agentUserId, displayName: me.display_name });
38
38
  const runtimeKey = config.runtimeKey || buildCodexRuntimeKey(agentUserId);
39
39
  const sessionStateFilePath = sessionStateFilePathForRuntime(config.stateDir, runtimeKey);
40
40
  const sessionManager = new CodexSessionManager(
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 AGENTS_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 ensureCodexWorkspace(
22
12
  workspaceDir: string,
23
13
  log?: { warn: (msg: string) => void },
14
+ agentIdentity?: AgentIdentity,
24
15
  ) {
16
+ const AGENTS_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
 
27
24
  // AGENTS.md is bridge-managed: always overwrite so the workspace picks up