@crewx/cli 0.8.8-rc.9 → 0.8.8

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/builtin.js CHANGED
@@ -52,6 +52,7 @@ const BUILTIN_MAP = {
52
52
  cron: () => Promise.resolve().then(() => __importStar(require('@crewx/cron/cli'))),
53
53
  workflow: () => Promise.resolve().then(() => __importStar(require('@crewx/workflow/cli'))),
54
54
  skill: () => Promise.resolve().then(() => __importStar(require('@crewx/skill/cli'))),
55
+ dreaming: () => Promise.resolve().then(() => __importStar(require('@crewx/dreaming/cli'))),
55
56
  wi: () => Promise.resolve().then(() => __importStar(require('@crewx/wi/cli'))),
56
57
  chromex: () => Promise.resolve().then(() => __importStar(require('@crewx/chromex/cli'))),
57
58
  };
@@ -26,6 +26,7 @@ const parse_agent_message_1 = require("./parse-agent-message");
26
26
  const parse_common_flags_1 = require("./parse-common-flags");
27
27
  const resolve_prompt_1 = require("./resolve-prompt");
28
28
  const crewx_cli_1 = require("../bootstrap/crewx-cli");
29
+ const inherited_trace_1 = require("../utils/inherited-trace");
29
30
  /**
30
31
  * Handle `crewx execute <agentRef> <message>` command.
31
32
  *
@@ -101,6 +102,7 @@ async function handleExecute(args) {
101
102
  threadId: thread,
102
103
  metadata: Object.keys(parsedMetadata).length > 0 ? parsedMetadata : undefined,
103
104
  vars: Object.keys(vars).length > 0 ? vars : undefined,
105
+ trace: (0, inherited_trace_1.readInheritedTrace)(),
104
106
  });
105
107
  if (!result.ok) {
106
108
  const errMsg = result.error?.message ?? 'Execute failed';
@@ -45,7 +45,7 @@ const DEFAULT_AGENTS = [
45
45
  },
46
46
  inline: {
47
47
  model: 'claude-opus-4-7',
48
- system_prompt: `You are a planner. Break down user goals into concrete,\ntestable steps. Challenge assumptions. Never write code directly.`,
48
+ prompt: `You are a planner. Break down user goals into concrete,\ntestable steps. Challenge assumptions. Never write code directly.`,
49
49
  },
50
50
  },
51
51
  {
@@ -62,7 +62,7 @@ const DEFAULT_AGENTS = [
62
62
  },
63
63
  inline: {
64
64
  model: 'claude-sonnet-4-6',
65
- system_prompt: `Implement what the planner specifies. Prefer editing\nexisting files. Run tests before reporting done.`,
65
+ prompt: `Implement what the planner specifies. Prefer editing\nexisting files. Run tests before reporting done.`,
66
66
  },
67
67
  },
68
68
  {
@@ -79,7 +79,7 @@ const DEFAULT_AGENTS = [
79
79
  },
80
80
  inline: {
81
81
  model: 'claude-sonnet-4-6',
82
- system_prompt: `Review diffs for correctness, security, readability.\nCite file:line. Be blunt, not polite.`,
82
+ prompt: `Review diffs for correctness, security, readability.\nCite file:line. Be blunt, not polite.`,
83
83
  },
84
84
  },
85
85
  ];
@@ -303,8 +303,8 @@ function generateDefaultYaml(agents) {
303
303
  mode: "bypassPermissions"
304
304
  inline:
305
305
  model: "${a.inline.model}"
306
- system_prompt: |
307
- ${indentBlock(a.inline.system_prompt, 8)}`)
306
+ prompt: |
307
+ ${indentBlock(a.inline.prompt, 8)}`)
308
308
  .join('\n\n');
309
309
  return `# CrewX Agents Configuration
310
310
  # Generated by 'crewx init'
@@ -26,6 +26,7 @@ const parse_agent_message_1 = require("./parse-agent-message");
26
26
  const parse_common_flags_1 = require("./parse-common-flags");
27
27
  const resolve_prompt_1 = require("./resolve-prompt");
28
28
  const crewx_cli_1 = require("../bootstrap/crewx-cli");
29
+ const inherited_trace_1 = require("../utils/inherited-trace");
29
30
  /**
30
31
  * Handle `crewx query <agentRef> <message>` command.
31
32
  *
@@ -101,6 +102,7 @@ async function handleQuery(args) {
101
102
  threadId: thread,
102
103
  metadata: Object.keys(parsedMetadata).length > 0 ? parsedMetadata : undefined,
103
104
  vars: Object.keys(vars).length > 0 ? vars : undefined,
105
+ trace: (0, inherited_trace_1.readInheritedTrace)(),
104
106
  });
105
107
  if (!result.ok) {
106
108
  const errMsg = result.error?.message ?? 'Query failed';
@@ -22,7 +22,8 @@ exports.KNOWN_COMMANDS = new Set([
22
22
  ]);
23
23
  /** Built-in tool commands routed via handleBuiltin(). */
24
24
  exports.BUILTIN_COMMAND_NAMES = new Set([
25
- 'memory', 'search', 'doc', 'wbs', 'cron', 'workflow', 'skill',
25
+ 'memory', 'search', 'doc', 'wbs', 'cron', 'workflow', 'skill', 'dreaming',
26
+ 'wi', 'chromex',
26
27
  ]);
27
28
  /** Commands not yet migrated from cli-bak — show a migration message. */
28
29
  exports.NOT_YET_MIGRATED = new Set([
@@ -0,0 +1,12 @@
1
+ import type { TraceContext } from '@crewx/sdk';
2
+ /**
3
+ * Read cross-process trace context from inherited environment variables.
4
+ *
5
+ * This is the ONLY place in the CLI that reads CREWX_PARENT_TASK_ID /
6
+ * CREWX_TRACE_ID / CREWX_CALLER_AGENT_ID. The values are passed as
7
+ * options.trace into crewx.query/execute so the SDK's ALS takes over
8
+ * from there — no direct env reads inside SDK code.
9
+ *
10
+ * Returns undefined when none of the three vars are set (root invocation).
11
+ */
12
+ export declare function readInheritedTrace(): TraceContext | undefined;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readInheritedTrace = readInheritedTrace;
4
+ /**
5
+ * Read cross-process trace context from inherited environment variables.
6
+ *
7
+ * This is the ONLY place in the CLI that reads CREWX_PARENT_TASK_ID /
8
+ * CREWX_TRACE_ID / CREWX_CALLER_AGENT_ID. The values are passed as
9
+ * options.trace into crewx.query/execute so the SDK's ALS takes over
10
+ * from there — no direct env reads inside SDK code.
11
+ *
12
+ * Returns undefined when none of the three vars are set (root invocation).
13
+ */
14
+ function readInheritedTrace() {
15
+ const parentTaskId = process.env['CREWX_PARENT_TASK_ID'] || null;
16
+ const rootTraceId = process.env['CREWX_TRACE_ID'] || null;
17
+ const callerAgentId = process.env['CREWX_CALLER_AGENT_ID'] || null;
18
+ if (!parentTaskId && !rootTraceId && !callerAgentId)
19
+ return undefined;
20
+ return {
21
+ parentTaskId,
22
+ rootTraceId: rootTraceId ?? (parentTaskId ?? ''),
23
+ callerAgentId,
24
+ };
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/cli",
3
- "version": "0.8.8-rc.9",
3
+ "version": "0.8.8",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"
@@ -23,17 +23,17 @@
23
23
  "dependencies": {
24
24
  "@crewx/adapter-slack": "0.1.4",
25
25
  "better-sqlite3": "*",
26
- "@crewx/sdk": "0.8.8-rc.9",
27
- "@crewx/memory": "0.1.22-rc.4",
28
- "@crewx/search": "0.1.9",
29
- "@crewx/wbs": "0.1.10-rc.2",
26
+ "@crewx/sdk": "0.8.8",
27
+ "@crewx/memory": "0.1.23",
28
+ "@crewx/search": "0.1.10",
29
+ "@crewx/wbs": "0.1.10",
30
30
  "@crewx/doc": "0.1.8",
31
- "@crewx/cron": "0.1.10-rc.7",
32
- "@crewx/workflow": "0.3.21-rc.4",
31
+ "@crewx/cron": "0.1.10",
32
+ "@crewx/workflow": "0.3.22",
33
33
  "@crewx/skill": "0.1.20",
34
34
  "@crewx/wi": "0.1.10",
35
35
  "@crewx/shared": "0.0.5",
36
- "@crewx/chromex": "0.1.0-rc.9"
36
+ "@crewx/chromex": "0.1.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/better-sqlite3": "*",