@crewx/cli 0.9.0-rc.100 → 0.9.0-rc.102

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.
@@ -5,6 +5,7 @@ const fs_1 = require("fs");
5
5
  const path_1 = require("path");
6
6
  const os_1 = require("os");
7
7
  const sdk_1 = require("@crewx/sdk");
8
+ const list_1 = require("@crewx/workflow/list");
8
9
  const plugins_1 = require("@crewx/sdk/plugins");
9
10
  const repository_1 = require("@crewx/sdk/repository");
10
11
  const register_builtin_tools_1 = require("../register-builtin-tools");
@@ -58,6 +59,8 @@ async function createCliCrewx(configPath = process.env.CREWX_CONFIG ?? 'crewx.ya
58
59
  additionalArgsProvider: (0, codex_writable_roots_1.composeAdditionalArgsProviders)((0, codex_writable_roots_1.createCodexWritableRootsProvider)(), (0, codex_writable_roots_1.createCodexSkipGitRepoCheckProvider)(skipRoot)),
59
60
  });
60
61
  (0, register_builtin_tools_1.registerBuiltinToolsIfNeeded)(crewx);
62
+ crewx.registerPromptListProvider(sdk_1.Crewx.createAgentListPromptResolver(yamlPath));
63
+ crewx.registerPromptListProvider((0, list_1.createWorkflowListPromptResolver)(yamlPath));
61
64
  await crewx.use(new plugins_1.ConversationPlugin());
62
65
  await crewx.use(new plugins_1.FileLoggerPlugin({ version: version_1.CLI_VERSION, workspaceRoot }));
63
66
  await crewx.use(new plugins_1.SqliteTracingPlugin({
@@ -25,56 +25,8 @@ function parseFlag(args, flag) {
25
25
  }
26
26
  return undefined;
27
27
  }
28
- /**
29
- * Format provider field for display.
30
- */
31
- function formatProvider(provider) {
32
- return Array.isArray(provider) ? provider.join(', ') : provider;
33
- }
34
- /**
35
- * Print the agent list.
36
- */
37
28
  function printAgentList(agents, total, isFiltered) {
38
- const configPath = process.env.CREWX_CONFIG ?? null;
39
- if (agents.length === 0) {
40
- console.log('WARNING: No agents configured.');
41
- if (!configPath) {
42
- console.log('Set CREWX_CONFIG to point to your crewx.yaml configuration file.');
43
- }
44
- return;
45
- }
46
- const headerCount = isFiltered ? `${agents.length} / ${total}` : `${total}`;
47
- console.log(`Available Agents (${headerCount})\n`);
48
- agents.forEach((agent, index) => {
49
- const headerParts = [`@${agent.id}`];
50
- if (agent.name && agent.name !== agent.id) {
51
- headerParts.push(agent.name);
52
- }
53
- console.log(`${index + 1}. ${headerParts.join(' - ')}`);
54
- console.log(` Provider: ${formatProvider(agent.provider)}`);
55
- const workDir = agent.working_directory ?? agent.workingDirectory ?? '.';
56
- console.log(` Working Dir: ${workDir}`);
57
- if (agent.role) {
58
- console.log(` Role: ${agent.role}`);
59
- }
60
- if (agent.team) {
61
- console.log(` Team: ${agent.team}`);
62
- }
63
- if (agent.description) {
64
- console.log(` Description: ${agent.description}`);
65
- }
66
- if (index < agents.length - 1) {
67
- console.log('');
68
- }
69
- });
70
- const configSource = configPath ? 'External YAML file' : 'Default hardcoded values';
71
- console.log(`\nConfiguration Source: ${configSource}`);
72
- if (configPath) {
73
- console.log(`Config Path: ${configPath}`);
74
- }
75
- else {
76
- console.log('Tip: Set CREWX_CONFIG to point to your crewx.yaml file to customize agents.');
77
- }
29
+ console.log((0, sdk_1.formatAgentList)({ agents, total, isFiltered, configPath: process.env.CREWX_CONFIG ?? null }));
78
30
  }
79
31
  /**
80
32
  * Handle `crewx agent ls` — list agents with optional filters.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/cli",
3
- "version": "0.9.0-rc.100",
3
+ "version": "0.9.0-rc.102",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"
@@ -25,19 +25,19 @@
25
25
  "better-sqlite3": "*",
26
26
  "dotenv": "17.2.3",
27
27
  "isomorphic-git": "1.37.1",
28
- "@crewx/sdk": "0.9.0-rc.100",
29
- "@crewx/memory": "0.1.23-rc.117",
30
- "@crewx/search": "0.1.10-rc.96",
31
- "@crewx/doc": "0.1.9-rc.93",
32
- "@crewx/knowledge-core": "0.1.17-rc.110",
33
- "@crewx/wbs": "0.1.10-rc.126",
34
- "@crewx/workflow": "0.3.22-rc.146",
35
- "@crewx/wi": "0.1.10-rc.120",
36
- "@crewx/cron": "0.1.10-rc.135",
37
- "@crewx/skill": "0.1.20",
28
+ "@crewx/sdk": "0.9.0-rc.102",
29
+ "@crewx/knowledge-core": "0.1.17-rc.112",
30
+ "@crewx/memory": "0.1.23-rc.119",
31
+ "@crewx/search": "0.1.10-rc.98",
32
+ "@crewx/doc": "0.1.9-rc.95",
33
+ "@crewx/wbs": "0.1.10-rc.128",
34
+ "@crewx/cron": "0.1.10-rc.137",
35
+ "@crewx/workflow": "0.3.22-rc.148",
36
+ "@crewx/notify": "0.1.0-rc.73",
37
+ "@crewx/chromex": "0.1.0-rc.135",
38
38
  "@crewx/shared": "0.0.6",
39
- "@crewx/notify": "0.1.0-rc.71",
40
- "@crewx/chromex": "0.1.0-rc.133"
39
+ "@crewx/wi": "0.1.10-rc.122",
40
+ "@crewx/skill": "0.1.20"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/better-sqlite3": "*",