@crewx/cli 0.9.0-rc.173 → 0.9.0-rc.175
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/commands/agent.js +2 -27
- package/dist/commands/command-help.d.ts +26 -0
- package/dist/commands/command-help.js +52 -0
- package/dist/commands/db.js +2 -2
- package/dist/commands/init.js +1 -1
- package/dist/commands/ps.js +1 -1
- package/dist/commands/result.js +1 -1
- package/dist/main.js +5 -5
- package/package.json +15 -15
package/dist/commands/agent.js
CHANGED
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.handleAgent=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.handleAgent=y;const f=require("fs");const u=require("../bootstrap/crewx-cli");const g=require("@crewx/sdk");const h=require("./command-help");function a(o,n){const t=`--${n}=`;for(let e=0;e<o.length;e++){if(o[e].startsWith(t)){return o[e].slice(t.length)}if(o[e]===`--${n}`&&e+1<o.length){return o[e+1]}}return void 0}function m(o,n,t){console.log((0,g.formatAgentList)({agents:o,total:n,isFiltered:t,configPath:process.env.CREWX_CONFIG??null}))}async function p(o,n){const t=a(n,"role");const e=a(n,"team");const r=a(n,"provider");const c=!!(t||e||r);const d=o.agents.size;const l=o.filterAgents({role:t,team:e,provider:r});m(l,d,c)}async function x(o,n){const t=n.find(e=>!e.startsWith("--"));if(!t){console.error("Missing agent ID. Usage: crewx agent prompt @agent_name");process.exit(1)}try{const e=await o.renderAgentPromptFull(t,{env:process.env,session:{mode:"query",platform:"cli"}});const r=t.startsWith("@")?t.slice(1):t;console.log(`
|
|
2
2
|
\u{1F916} **Rendered Prompt for Agent: ${r}**
|
|
3
|
-
`);console.log("--- BEGIN PROMPT ---");console.log(e);console.log("--- END PROMPT ---")}catch(e){const r=e instanceof Error?e.message:String(e);console.error(`Failed to get agent prompt: ${r}`);process.exit(1)}}function w(
|
|
4
|
-
CrewX Agent Management
|
|
5
|
-
|
|
6
|
-
Usage:
|
|
7
|
-
crewx agent # List configured agents (default)
|
|
8
|
-
crewx agent ls # List configured agents
|
|
9
|
-
crewx agent list # Alias for ls
|
|
10
|
-
crewx agent prompt <id> # Inspect rendered agent prompt
|
|
11
|
-
crewx agent interceptor test <id> --phase request|response --text "<text>" [--json]
|
|
12
|
-
# Dry-run an agent's interceptor chain on a text (no agent start)
|
|
13
|
-
|
|
14
|
-
Filter Options (for agent ls):
|
|
15
|
-
--role <value> Filter by agent role (comma-separated for multiple: PM,Dev)
|
|
16
|
-
--team <value> Filter by agent team (comma-separated for multiple)
|
|
17
|
-
--provider <value> Filter by provider (comma-separated, partial match: claude)
|
|
18
|
-
|
|
19
|
-
Examples:
|
|
20
|
-
crewx agent
|
|
21
|
-
crewx agent ls
|
|
22
|
-
crewx agent ls --role=PM
|
|
23
|
-
crewx agent ls --team="CrewX Core Team"
|
|
24
|
-
crewx agent ls --provider=claude
|
|
25
|
-
crewx agent ls --role=PM --provider=claude
|
|
26
|
-
crewx agent ls --role=PM,general
|
|
27
|
-
CREWX_CONFIG=./crewx.yaml crewx agent list
|
|
28
|
-
`.trim())}
|
|
3
|
+
`);console.log("--- BEGIN PROMPT ---");console.log(e);console.log("--- END PROMPT ---")}catch(e){const r=e instanceof Error?e.message:String(e);console.error(`Failed to get agent prompt: ${r}`);process.exit(1)}}function w(o){const n=[];for(let t=0;t<o.length;t++){const e=o[t];if(e==="--json")continue;if(e.startsWith("--")){if(!e.includes("="))t++;continue}n.push(e)}return n}async function $(o,n){if((n[0]??"").toLowerCase()!=="test"){console.error('Usage: crewx agent interceptor test <agentId> --phase request|response --text "<text>" [--json]');process.exit(1)}const t=n.slice(1);const e=w(t)[0];const r=a(t,"phase");const c=a(t,"text");const d=t.includes("--json");if(!e||r!=="request"&&r!=="response"||c===void 0){console.error('Usage: crewx agent interceptor test <agentId> --phase request|response --text "<text>" [--json]');process.exit(1)}const l=e.startsWith("@")?e.slice(1):e;let i;try{i=await o.testAgentInterceptors(l,r,c)}catch(s){if(s instanceof g.AgentInterceptorConfigError){console.error(`${s.code}: ${s.message}`);process.exit(1)}throw s}if(!i){if(d){console.log(JSON.stringify({agentId:l,phase:r,status:"passed",text:c,changed:false,steps:[]},null,2))}else{console.log(`@${l} has no enabled ${r} interceptors; the text passes unchanged.`)}return}if(d){console.log(JSON.stringify({agentId:l,...i},null,2))}else{console.log(`Interceptor test: @${l} ${r} lane`);for(const s of i.steps){console.log(` [${s.outcome}] ${s.name} (${s.type}, ${s.mode}, failOpen=${s.failOpen}) ${s.durationMs}ms`);if(s.error)console.log(` error ${s.error.code}: ${s.error.message}`);if(s.verdict)console.log(` verdict valid=${s.verdict.valid}${s.verdict.severity?` severity=${s.verdict.severity}`:""}`)}if(i.status==="passed"){console.log(`Final text${i.changed?" (changed)":""}:`);console.log(i.text)}else{console.log(`INTERCEPTOR_BLOCKED: ${i.blocked?.message??"blocked"}`)}}if(i.status==="blocked")process.exit(1)}async function y(o){const n=process.env.CREWX_CONFIG??"crewx.yaml";let t;try{t=await(0,u.createCliCrewx)(n)}catch(r){if(r instanceof g.ConfigLoadError&&!(0,f.existsSync)(n)){const c=(o[0]??"").toLowerCase();if(!c||c==="ls"||c==="list"){console.log("WARNING: No agents configured.");console.log(`No crewx.yaml found. Run 'crewx init' to create one.`);return}}throw r}const e=(o[0]??"").toLowerCase();switch(e){case"ls":case"list":await p(t,o.slice(1));return;case"":await p(t,o.slice(1));return;case"prompt":case"p":await x(t,o.slice(1));return;case"interceptor":await $(t,o.slice(1));return;default:console.error(`Unknown agent subcommand: ${e}`);v();process.exit(1)}}function v(){console.log(h.AGENT_USAGE)}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--help` / `-h` routing for commands that change state.
|
|
3
|
+
*
|
|
4
|
+
* `crewx init --help` used to run init: git init, files, and a workspace row.
|
|
5
|
+
* main.ts asks this module before any handler runs, so a help request prints
|
|
6
|
+
* usage and nothing else.
|
|
7
|
+
*/
|
|
8
|
+
export declare const INIT_USAGE = "Usage: crewx init [--force] [--provider cli/claude|cli/codex]\n\nCreate crewx.yaml, support folders, and a git repository in the current folder.\n\n --force Overwrite the existing configuration\n --provider cli/claude|cli/codex Provider for the generated agents\n (detected from PATH when omitted)";
|
|
9
|
+
export declare const STOP_USAGE = "Usage:\n crewx stop <task-id> [--grace=<ms>] Stop a running task\n crewx stop --all Stop all running tasks\n crewx kill <task-id> Alias for stop";
|
|
10
|
+
export declare const RESTART_USAGE = "Usage: crewx restart <task-id>\n\nRestart a failed task as a new task, reusing its thread, agent, and provider.";
|
|
11
|
+
export declare const HOOK_USAGE = "Usage: crewx hook install|uninstall|status [options]\n\n install [--yes] [--provider claude|codex] Install the PreToolUse hook in .claude/settings.json\n uninstall [--provider claude|codex] Remove the crewx hook\n status Show hook installation status and plugins";
|
|
12
|
+
export declare const HOOK_DISPATCH_USAGE = "Usage: crewx hook-dispatch --provider <claude|codex>\n\nInternal IPC router: reads one hook payload from stdin and writes the decision to stdout.\nAgent CLI hooks call it; people do not need to run it.";
|
|
13
|
+
export declare const SLACK_USAGE = "Usage: crewx slack:files --thread <thread_ts> [--list | --clean]\n crewx slack --mode <query|execute> --agent <agent-id>\n\nExample:\n crewx slack:files --thread 1234567890.123456";
|
|
14
|
+
export declare const AGENT_USAGE = "Usage: crewx agent [subcommand] [options]\n\n crewx agent # List configured agents (default)\n crewx agent ls # List configured agents\n crewx agent list # Alias for ls\n crewx agent prompt <id> # Inspect rendered agent prompt\n crewx agent interceptor test <id> --phase request|response --text \"<text>\" [--json]\n # Dry-run an agent's interceptor chain on a text (no agent start)\n\nFilter Options (for agent ls):\n --role <value> Filter by agent role (comma-separated for multiple: PM,Dev)\n --team <value> Filter by agent team (comma-separated for multiple)\n --provider <value> Filter by provider (comma-separated, partial match: claude)\n\nExamples:\n crewx agent\n crewx agent ls\n crewx agent ls --role=PM\n crewx agent ls --team=\"CrewX Core Team\"\n crewx agent ls --provider=claude\n crewx agent ls --role=PM --provider=claude\n crewx agent ls --role=PM,general\n CREWX_CONFIG=./crewx.yaml crewx agent list";
|
|
15
|
+
export declare const AGENT_LS_USAGE = "Usage: crewx agent ls [--role <value>] [--team <value>] [--provider <value>]\n\nList configured agents. Filters take comma-separated values; --provider also matches part of a name (claude).";
|
|
16
|
+
export declare const AGENT_PROMPT_USAGE = "Usage: crewx agent prompt <id>\n\nPrint the fully rendered system prompt of one agent.";
|
|
17
|
+
export declare const AGENT_INTERCEPTOR_USAGE = "Usage: crewx agent interceptor test <id> --phase request|response --text \"<text>\" [--json]\n\nRun an agent's interceptor chain once on a text without starting the agent.\nExit 0 when the lane passes; exit 1 when it is blocked or the chain configuration is invalid.";
|
|
18
|
+
/** True when the arguments ask for help. Use only for commands with no free-text message. */
|
|
19
|
+
export declare function isHelpRequest(args: readonly string[]): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Usage text for `crewx agent … --help`, or undefined when the subcommand should run.
|
|
22
|
+
* The subcommand is `rest[0]`, the same word the agent handler dispatches on.
|
|
23
|
+
*/
|
|
24
|
+
export declare function agentHelpUsage(rest: readonly string[]): string | undefined;
|
|
25
|
+
/** Usage text to print instead of running `command`, or undefined when the command should run. */
|
|
26
|
+
export declare function helpUsageFor(command: string, rest: readonly string[]): string | undefined;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.AGENT_INTERCEPTOR_USAGE=exports.AGENT_PROMPT_USAGE=exports.AGENT_LS_USAGE=exports.AGENT_USAGE=exports.SLACK_USAGE=exports.HOOK_DISPATCH_USAGE=exports.HOOK_USAGE=exports.RESTART_USAGE=exports.STOP_USAGE=exports.INIT_USAGE=void 0;exports.isHelpRequest=a;exports.agentHelpUsage=r;exports.helpUsageFor=n;exports.INIT_USAGE=`Usage: crewx init [--force] [--provider cli/claude|cli/codex]
|
|
2
|
+
|
|
3
|
+
Create crewx.yaml, support folders, and a git repository in the current folder.
|
|
4
|
+
|
|
5
|
+
--force Overwrite the existing configuration
|
|
6
|
+
--provider cli/claude|cli/codex Provider for the generated agents
|
|
7
|
+
(detected from PATH when omitted)`;exports.STOP_USAGE=`Usage:
|
|
8
|
+
crewx stop <task-id> [--grace=<ms>] Stop a running task
|
|
9
|
+
crewx stop --all Stop all running tasks
|
|
10
|
+
crewx kill <task-id> Alias for stop`;exports.RESTART_USAGE=`Usage: crewx restart <task-id>
|
|
11
|
+
|
|
12
|
+
Restart a failed task as a new task, reusing its thread, agent, and provider.`;exports.HOOK_USAGE=`Usage: crewx hook install|uninstall|status [options]
|
|
13
|
+
|
|
14
|
+
install [--yes] [--provider claude|codex] Install the PreToolUse hook in .claude/settings.json
|
|
15
|
+
uninstall [--provider claude|codex] Remove the crewx hook
|
|
16
|
+
status Show hook installation status and plugins`;exports.HOOK_DISPATCH_USAGE=`Usage: crewx hook-dispatch --provider <claude|codex>
|
|
17
|
+
|
|
18
|
+
Internal IPC router: reads one hook payload from stdin and writes the decision to stdout.
|
|
19
|
+
Agent CLI hooks call it; people do not need to run it.`;exports.SLACK_USAGE=`Usage: crewx slack:files --thread <thread_ts> [--list | --clean]
|
|
20
|
+
crewx slack --mode <query|execute> --agent <agent-id>
|
|
21
|
+
|
|
22
|
+
Example:
|
|
23
|
+
crewx slack:files --thread 1234567890.123456`;exports.AGENT_USAGE=`Usage: crewx agent [subcommand] [options]
|
|
24
|
+
|
|
25
|
+
crewx agent # List configured agents (default)
|
|
26
|
+
crewx agent ls # List configured agents
|
|
27
|
+
crewx agent list # Alias for ls
|
|
28
|
+
crewx agent prompt <id> # Inspect rendered agent prompt
|
|
29
|
+
crewx agent interceptor test <id> --phase request|response --text "<text>" [--json]
|
|
30
|
+
# Dry-run an agent's interceptor chain on a text (no agent start)
|
|
31
|
+
|
|
32
|
+
Filter Options (for agent ls):
|
|
33
|
+
--role <value> Filter by agent role (comma-separated for multiple: PM,Dev)
|
|
34
|
+
--team <value> Filter by agent team (comma-separated for multiple)
|
|
35
|
+
--provider <value> Filter by provider (comma-separated, partial match: claude)
|
|
36
|
+
|
|
37
|
+
Examples:
|
|
38
|
+
crewx agent
|
|
39
|
+
crewx agent ls
|
|
40
|
+
crewx agent ls --role=PM
|
|
41
|
+
crewx agent ls --team="CrewX Core Team"
|
|
42
|
+
crewx agent ls --provider=claude
|
|
43
|
+
crewx agent ls --role=PM --provider=claude
|
|
44
|
+
crewx agent ls --role=PM,general
|
|
45
|
+
CREWX_CONFIG=./crewx.yaml crewx agent list`;exports.AGENT_LS_USAGE=`Usage: crewx agent ls [--role <value>] [--team <value>] [--provider <value>]
|
|
46
|
+
|
|
47
|
+
List configured agents. Filters take comma-separated values; --provider also matches part of a name (claude).`;exports.AGENT_PROMPT_USAGE=`Usage: crewx agent prompt <id>
|
|
48
|
+
|
|
49
|
+
Print the fully rendered system prompt of one agent.`;exports.AGENT_INTERCEPTOR_USAGE=`Usage: crewx agent interceptor test <id> --phase request|response --text "<text>" [--json]
|
|
50
|
+
|
|
51
|
+
Run an agent's interceptor chain once on a text without starting the agent.
|
|
52
|
+
Exit 0 when the lane passes; exit 1 when it is blocked or the chain configuration is invalid.`;function a(e){return e.includes("--help")||e.includes("-h")}function r(e){const t=e.filter((o,s)=>e[s-1]!=="--text");if(!a(t))return void 0;switch((e[0]??"").toLowerCase()){case"ls":case"list":return exports.AGENT_LS_USAGE;case"prompt":case"p":return exports.AGENT_PROMPT_USAGE;case"interceptor":return exports.AGENT_INTERCEPTOR_USAGE;default:return exports.AGENT_USAGE}}function n(e,t){if(!a(t))return void 0;switch(e){case"agent":return r(t);case"init":return exports.INIT_USAGE;case"stop":case"kill":return exports.STOP_USAGE;case"restart":return exports.RESTART_USAGE;case"hook":return exports.HOOK_USAGE;case"hook-dispatch":return exports.HOOK_DISPATCH_USAGE;case"slack":case"slack:files":return exports.SLACK_USAGE;default:return void 0}}
|
package/dist/commands/db.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var g=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(exports,"__esModule",{value:true});exports.USAGE_BACKFILL_HELP=exports.REQUEST_LOG_MIGRATION_HELP=exports.TASK_LOG_MIGRATION_HELP=void 0;exports.handleDb=
|
|
1
|
+
"use strict";var g=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(exports,"__esModule",{value:true});exports.USAGE_BACKFILL_HELP=exports.REQUEST_LOG_MIGRATION_HELP=exports.TASK_LOG_MIGRATION_HELP=void 0;exports.handleDb=C;const v=g(require("path"));const R=g(require("os"));const T=g(require("readline"));const x=require("./command-help");const _=require("@crewx/sdk/repository");const m=require("@crewx/sdk/repository");const E=require("@crewx/sdk/repository");const p=require("@crewx/sdk/repository");const S=require("@crewx/sdk/repository");exports.TASK_LOG_MIGRATION_HELP=`Usage:
|
|
2
2
|
crewx db migrate-task-logs --dry-run [--db PATH]
|
|
3
3
|
crewx db migrate-task-logs --apply [--db PATH] [--batch-tasks N]
|
|
4
4
|
crewx db migrate-task-logs --verify [--db PATH]
|
|
@@ -56,4 +56,4 @@ Apply policy:
|
|
|
56
56
|
Exit codes:
|
|
57
57
|
0 Completed successfully.
|
|
58
58
|
1 Apply was blocked or one or more task updates failed.
|
|
59
|
-
2 Invalid command-line arguments.`;function E(){return $.default.join(v.default.homedir(),".crewx","crewx.db")}function S(e,o){const s=[];s.push(`[crewx] Database push \u2014 comparing schema vs ${o}`);s.push("");if(e.created.length>0){s.push(` Tables to create:`);for(const n of e.created){s.push(` \u2192 ${n}`)}}else{s.push(" Tables to create: (none)")}if(e.altered.length>0){s.push(" Columns to add:");for(const{table:n,column:r}of e.altered){s.push(` \u2192 ${n}.${r}`)}}else{s.push(" Columns to add: (none)")}if(e.warnings.length>0){s.push(" Warnings:");for(const n of e.warnings){s.push(` \u26A0 ${n}`)}}if(e.backupPath){s.push("");s.push(` Backup: ${e.backupPath}`)}return s.join("\n")}function L(e){return e.created.length>0||e.altered.length>0}function y(e){const o=Object.entries(e??{});return o.length>0?o.map(([s,n])=>`${s}=${n}`).join(", "):"(none)"}function A(e){const o=R.default.createInterface({input:process.stdin,output:process.stdout});return new Promise(s=>{o.question(e,n=>{o.close();s(n)})})}async function P(e){const o=e[0];if(o==="migrate-task-logs"){await B(e.slice(1));return}if(o==="migrate-request-logs"){await G(e.slice(1));return}if(o==="backfill-usage"){await N(e.slice(1));return}if(o==="--help"||o==="-h"){console.log("Usage: crewx db push [--force] [--dry-run]");console.log(exports.TASK_LOG_MIGRATION_HELP);console.log(exports.REQUEST_LOG_MIGRATION_HELP);return}if(!o||o==="push"){await H(e.slice(o==="push"?1:0));return}console.error(`Unknown db subcommand: ${o}`);console.error("Usage: crewx db push [--force] [--dry-run]");console.error(exports.TASK_LOG_MIGRATION_HELP);process.exitCode=2}class d extends Error{}class u extends Error{}function M(e){let o;let s;let n;const r=a=>{if(o)throw new d("Choose exactly one of --dry-run, --apply, or --verify.");o=a};const t=(a,c,l)=>{const i=a[c+1];if(!i||i.startsWith("--"))throw new d(`${l} requires a value.`);return i};for(let a=0;a<e.length;a+=1){const c=e[a];if(c==="--help"||c==="-h"){throw new d(exports.TASK_LOG_MIGRATION_HELP)}if(c==="--dry-run"){r("dry-run");continue}if(c==="--apply"){r("apply");continue}if(c==="--verify"){r("verify");continue}if(c==="--db"){s=t(e,a,"--db");a+=1;continue}if(c.startsWith("--db=")){s=c.slice("--db=".length);if(!s)throw new d("--db requires a value.");continue}if(c==="--batch-tasks"){const l=t(e,a,"--batch-tasks");const i=Number(l);if(!Number.isSafeInteger(i)||i<1){throw new d("--batch-tasks must be a positive integer.")}n=i;a+=1;continue}if(c.startsWith("--batch-tasks=")){const l=c.slice("--batch-tasks=".length);const i=Number(l);if(!Number.isSafeInteger(i)||i<1){throw new d("--batch-tasks must be a positive integer.")}n=i;continue}throw new d(`Unknown option: ${c}`)}if(!o)throw new d("Choose one of --dry-run, --apply, or --verify.");if(n!==void 0&&o!=="apply"){throw new d("--batch-tasks is only valid with --apply.")}return{mode:o,dbPath:s,batchTasks:n}}function C(e){const o=e.mode==="dry-run"?"Dry-run":e.mode==="apply"?"Apply":"Verify";const s=[`[crewx] Task-log migration \u2014 ${o}`,` Database: ${e.dbPath}`,` Tasks scanned: ${e.taskCount}`,` Blob candidates: ${e.candidateTaskCount}`,` Eligible terminal blobs: ${e.eligibleTaskCount}`,` Status counts: ${y(e.statusCounts)}`,` Deferred blob tasks: ${e.deferredTaskCount}`,` Deferred statuses: ${y(e.deferredStatusCounts)}`,` Entries: ${e.entryCount}`,` Source bytes: ${e.sourceBytes}`,` Estimated free-space need: ${e.estimatedFreeSpaceBytes}`,` Required free space (with reserve): ${e.requiredFreeSpaceBytes}`,` Available free space: ${e.availableFreeSpaceBytes}`,` Free-space gate: ${e.freeSpaceGatePassed?"PASS":"FAIL"}`,` Migrated: ${e.migratedTasks} task(s), ${e.migratedEntries} entr${e.migratedEntries===1?"y":"ies"}`,` Skipped event-source tasks: ${e.skippedTasks}`,` Failed tasks: ${e.failedTasks}`,` Logical source bytes removed: ${e.logicalSourceBytesRemoved}`];if(e.remainingTaskCount!==void 0)s.push(` Remaining blob tasks: ${e.remainingTaskCount}`);if(e.backupPath){s.push(` Backup: ${e.backupPath}`);if(e.backupMethod)s.push(` Backup method: ${e.backupMethod}`)}if(e.verification){s.push(` Event rows checked: ${e.verification.eventCount}`);s.push(` Verification issues: ${e.verification.issues.length}`)}if(e.blockedReason)s.push(` Blocked: ${e.blockedReason}`);for(const n of e.warnings??[])s.push(` Warning: ${n}`);return s.join("\n")}async function B(e){let o;try{o=M(e)}catch(s){const n=s instanceof Error?s.message:String(s);if(n===exports.TASK_LOG_MIGRATION_HELP){console.log(n)}else{console.error(n);console.error(exports.TASK_LOG_MIGRATION_HELP);process.exitCode=2}return}try{const s=await(0,x.runTaskLogMigration)(o);console.log(C(s));if(!s.ok){if(s.blockedReason)console.error(s.blockedReason);const n=s.failures??s.malformedRows??[];for(const r of n){console.error(` ${r.taskId}: ${r.reason}`)}process.exitCode=1}else{process.exitCode=0}}catch(s){console.error(s instanceof Error?s.message:String(s));process.exitCode=1}}class b extends Error{}function I(e){let o;let s=false;const n=r=>{const t=Number(r);if(!r||!Number.isSafeInteger(t)||t<1){throw new b("--batch must be a positive integer.")}return t};for(let r=0;r<e.length;r+=1){const t=e[r];if(t==="--help"||t==="-h")throw new b(exports.REQUEST_LOG_MIGRATION_HELP);if(t==="--dry-run"){s=true;continue}if(t==="--batch"){o=n(e[r+1]);r+=1;continue}if(t.startsWith("--batch=")){o=n(t.slice("--batch=".length));continue}throw new b(`Unknown option: ${t}`)}return{batchRows:o,dryRun:s}}function h(e){if(e<1024)return`${e} B`;const o=["KiB","MiB","GiB","TiB"];let s=e;let n=-1;while(s>=1024&&n<o.length-1){s/=1024;n+=1}return`${s.toFixed(s>=100?0:1)} ${o[n]} (${e} bytes)`}function k(e,o){const s=[...e].sort((n,r)=>n-r);return s[Math.min(s.length-1,Math.floor(o/100*s.length))]}function w(e){return`${(e/1e3).toFixed(1)}s`}const q=1e4;function O(e,o){if(e.dryRun){const s=e.scan;console.log("[crewx] Dry run finished \u2014 nothing was written.");console.log(` Rows scanned: ${s?.rows??0}`);console.log(` Bodies: ${s?.bodies??0} (${h(s?.bodyBytes??0)})`);console.log(` Distinct bodies: ${s?.distinctBodies??0} (${h(s?.distinctBodyBytes??0)}) \u2014 what logs.db would store`);console.log(` Elapsed: ${w(e.elapsedMs)}`);return}console.log("[crewx] Request-log move finished.");console.log(` Moved rows: ${e.movedRows}`);console.log(` Remaining rows in crewx.db: ${o.crewxRows}`);console.log(` logs.db request_logs: ${o.logsRows??0}`);console.log(` logs.db request_log_bodies: ${o.logsBodies??0}`);console.log(` logs.db size: ${h(o.logsFileBytes)} (+ wal ${h(o.logsWalBytes)})`);console.log(` crewx.db freelist pages: ${o.crewxFreelistPages}`);console.log(` Batches: ${e.batches}, bodies added: ${e.bodiesAdded}`);if(e.deleteTxMs.length>0){console.log(` crewx.db delete transaction per batch: p50 ${k(e.deleteTxMs,50).toFixed(1)} ms, p90 ${k(e.deleteTxMs,90).toFixed(1)} ms, max ${e.maxDeleteTxMs.toFixed(1)} ms`);console.log(` Largest crewx.db -wal seen after a batch: ${h(e.maxWalBytes)}`)}console.log(` Elapsed: ${w(e.elapsedMs)}`);if(o.crewxRows>0){console.log(` ${o.crewxRows} row(s) are still in crewx.db (new rows arrived or the run stopped early). Run it again.`)}}async function G(e){let o;try{o=I(e)}catch(s){const n=s instanceof Error?s.message:String(s);if(n===exports.REQUEST_LOG_MIGRATION_HELP){console.log(n)}else{console.error(n);console.error(exports.REQUEST_LOG_MIGRATION_HELP);process.exitCode=2}return}try{const s=(0,p.inspectRequestLogsMove)();console.log(`[crewx] Request logs \u2192 logs.db${o.dryRun?" (dry run)":""}`);console.log(` crewx.db: ${s.crewxDbPath}`);console.log(` logs.db: ${s.logsDbPath}`);console.log(` Rows to move: ${s.crewxRows}`);let n=Date.now();const r=a=>{const c=Date.now();if(c-n<q)return;n=c;const l=o.dryRun?a.scannedRows:a.movedRows;const i=Math.max(0,s.crewxRows-l);console.log(` ${o.dryRun?"scanned":"moved"} ${l} | remaining ~${i} | elapsed ${w(a.elapsedMs)}`)};const t=(0,p.moveRequestLogsToLogsDb)({batchRows:o.batchRows,dryRun:o.dryRun,onProgress:r});O(t,(0,p.inspectRequestLogsMove)());process.exitCode=o.dryRun||t.remainingRows===0?0:1}catch(s){console.error(s instanceof Error?s.message:String(s));process.exitCode=1}}function U(e){let o;let s;let n;let r;const t=l=>{if(o)throw new u("Choose exactly one of --dry-run, --apply, --verify, or --restore.");o=l};const a=(l,i)=>{const f=e[l+1];if(!f||f.startsWith("--"))throw new u(`${i} requires a value.`);return f};for(let l=0;l<e.length;l+=1){const i=e[l];if(i==="--help"||i==="-h")throw new u(exports.USAGE_BACKFILL_HELP);if(i==="--dry-run"){t("dry-run");continue}if(i==="--apply"){t("apply");continue}if(i==="--verify"){t("verify");continue}if(i==="--restore"){t("restore");r=a(l,"--restore");l+=1;continue}if(i.startsWith("--restore=")){t("restore");r=i.slice("--restore=".length);if(!r)throw new u("--restore requires a value.");continue}if(i==="--db"){s=a(l,"--db");l+=1;continue}if(i.startsWith("--db=")){s=i.slice("--db=".length);if(!s)throw new u("--db requires a value.");continue}if(i==="--backup"){n=a(l,"--backup");l+=1;continue}if(i.startsWith("--backup=")){n=i.slice("--backup=".length);if(!n)throw new u("--backup requires a value.");continue}throw new u(`Unknown option: ${i}`)}const c=o??"dry-run";if(n&&c!=="apply"){throw new u("--backup is only valid with --apply.")}if(r&&c!=="restore"){throw new u("--restore is only valid with restore mode.")}return{mode:c,dbPath:s,backupPath:n,restorePath:r}}function D(e){const o=e.mode==="dry-run"?"Dry-run":e.mode==="apply"?"Apply":e.mode==="restore"?"Restore":"Verify";const s=[`[crewx] Usage backfill \u2014 ${o}`,` Database: ${e.dbPath}`,` Tasks scanned: ${e.scannedTasks}`,` Terminal tasks: ${e.terminalTasks}`,` Raw target tasks: ${e.rawTargetTasks}`,` Candidate tasks: ${e.candidateTasks}`,` Recovered: ${e.recoveredTasks}`,` Unavailable: ${e.unavailableTasks}`,` Deferred (within 24h): ${e.deferredTasks}`,` Changed: ${e.changedTasks}`,` Would change: ${e.wouldChangeTasks}`,` Restored: ${e.restored}`,` Skipped conflicts: ${e.skippedConflict}`,` Remaining target tasks: ${e.remainingTargetTasks}`,` Tasks with usageAccounting: ${e.accountingTasks}`," Provider distribution:"];const n=Object.entries(e.providerDistribution);if(n.length===0){s.push(" (none)")}else{for(const[t,a]of n){s.push(` ${t}: candidates=${a.candidates}, recovered=${a.recovered}, unavailable=${a.unavailable}, deferred=${a.deferred}`)}}s.push(" Reason counts:");for(const[t,a]of Object.entries(e.reasonCounts))s.push(` ${t}: ${a}`);s.push(` Estimated free-space need: ${e.estimatedFreeSpaceBytes}`);s.push(` Required free space (with reserve): ${e.requiredFreeSpaceBytes}`);s.push(` Available free space: ${e.availableFreeSpaceBytes}`);s.push(` Free-space gate: ${e.freeSpaceGatePassed?"PASS":"FAIL"}`);const r=e.snapshotPath??e.backupPath;if(r){s.push(` Undo snapshot: ${r}`);if(e.backupMethod)s.push(` Snapshot method: ${e.backupMethod}`)}if(e.blockedReason)s.push(` Blocked: ${e.blockedReason}`);for(const t of e.conflictSamples){s.push(` Conflict sample: ${t.taskId}: ${t.fields.join(", ")}`)}for(const t of e.failures)s.push(` Failure: ${t.taskId}: ${t.reason}`);for(const t of e.warnings)s.push(` Warning: ${t}`);return s.join("\n")}async function N(e){let o;try{o=U(e)}catch(s){const n=s instanceof Error?s.message:String(s);if(n===exports.USAGE_BACKFILL_HELP){console.log(n)}else{console.error(n);console.error(exports.USAGE_BACKFILL_HELP);process.exitCode=2}return}try{const s=await(0,_.runUsageBackfill)(o);console.log(D(s));process.exitCode=s.ok?0:1}catch(s){console.error(s instanceof Error?s.message:String(s));process.exitCode=1}}async function H(e){const o=e.includes("--force");const s=e.includes("--dry-run");const n=E();const r=(0,T.openDrizzleDb)(n);try{const t=(0,m.pushSchema)(r.db,{force:o,dbPath:n,dryRun:true});console.log(S(t,n));console.log("");if(s){console.log("[crewx] Dry-run mode \u2014 no changes applied.");return}if(!L(t)){console.log("[crewx] No changes needed. Database is up to date.");return}if(!o){const c=await A("Apply changes? (y/N): ");if(c.trim().toLowerCase()!=="y"){console.log("[crewx] Aborted.");return}}const a=(0,m.pushSchema)(r.db,{force:o,dbPath:n});console.log("");console.log("[crewx] Push complete.");if(a.created.length>0){console.log(` Tables created: ${a.created.join(", ")}`)}if(a.altered.length>0){console.log(` Columns added: ${a.altered.map(c=>`${c.table}.${c.column}`).join(", ")}`)}if(a.backupPath){console.log(` Backup: ${a.backupPath}`)}if(a.created.length===0&&a.altered.length===0){console.log(" No changes applied.")}}finally{r.close()}}
|
|
59
|
+
2 Invalid command-line arguments.`;function A(){return v.default.join(R.default.homedir(),".crewx","crewx.db")}function L(e,o){const s=[];s.push(`[crewx] Database push \u2014 comparing schema vs ${o}`);s.push("");if(e.created.length>0){s.push(` Tables to create:`);for(const n of e.created){s.push(` \u2192 ${n}`)}}else{s.push(" Tables to create: (none)")}if(e.altered.length>0){s.push(" Columns to add:");for(const{table:n,column:r}of e.altered){s.push(` \u2192 ${n}.${r}`)}}else{s.push(" Columns to add: (none)")}if(e.warnings.length>0){s.push(" Warnings:");for(const n of e.warnings){s.push(` \u26A0 ${n}`)}}if(e.backupPath){s.push("");s.push(` Backup: ${e.backupPath}`)}return s.join("\n")}function P(e){return e.created.length>0||e.altered.length>0}function y(e){const o=Object.entries(e??{});return o.length>0?o.map(([s,n])=>`${s}=${n}`).join(", "):"(none)"}function M(e){const o=T.default.createInterface({input:process.stdin,output:process.stdout});return new Promise(s=>{o.question(e,n=>{o.close();s(n)})})}function k(){console.log("Usage: crewx db push [--force] [--dry-run]");console.log(exports.TASK_LOG_MIGRATION_HELP);console.log(exports.REQUEST_LOG_MIGRATION_HELP)}async function C(e){const o=e[0];if(o==="migrate-task-logs"){await q(e.slice(1));return}if(o==="migrate-request-logs"){await D(e.slice(1));return}if(o==="backfill-usage"){await F(e.slice(1));return}if(o==="--help"||o==="-h"){k();return}if(!o||o==="push"){const s=e.slice(o==="push"?1:0);if((0,x.isHelpRequest)(s)){k();return}await W(s);return}console.error(`Unknown db subcommand: ${o}`);console.error("Usage: crewx db push [--force] [--dry-run]");console.error(exports.TASK_LOG_MIGRATION_HELP);process.exitCode=2}class d extends Error{}class u extends Error{}function B(e){let o;let s;let n;const r=a=>{if(o)throw new d("Choose exactly one of --dry-run, --apply, or --verify.");o=a};const t=(a,c,l)=>{const i=a[c+1];if(!i||i.startsWith("--"))throw new d(`${l} requires a value.`);return i};for(let a=0;a<e.length;a+=1){const c=e[a];if(c==="--help"||c==="-h"){throw new d(exports.TASK_LOG_MIGRATION_HELP)}if(c==="--dry-run"){r("dry-run");continue}if(c==="--apply"){r("apply");continue}if(c==="--verify"){r("verify");continue}if(c==="--db"){s=t(e,a,"--db");a+=1;continue}if(c.startsWith("--db=")){s=c.slice("--db=".length);if(!s)throw new d("--db requires a value.");continue}if(c==="--batch-tasks"){const l=t(e,a,"--batch-tasks");const i=Number(l);if(!Number.isSafeInteger(i)||i<1){throw new d("--batch-tasks must be a positive integer.")}n=i;a+=1;continue}if(c.startsWith("--batch-tasks=")){const l=c.slice("--batch-tasks=".length);const i=Number(l);if(!Number.isSafeInteger(i)||i<1){throw new d("--batch-tasks must be a positive integer.")}n=i;continue}throw new d(`Unknown option: ${c}`)}if(!o)throw new d("Choose one of --dry-run, --apply, or --verify.");if(n!==void 0&&o!=="apply"){throw new d("--batch-tasks is only valid with --apply.")}return{mode:o,dbPath:s,batchTasks:n}}function I(e){const o=e.mode==="dry-run"?"Dry-run":e.mode==="apply"?"Apply":"Verify";const s=[`[crewx] Task-log migration \u2014 ${o}`,` Database: ${e.dbPath}`,` Tasks scanned: ${e.taskCount}`,` Blob candidates: ${e.candidateTaskCount}`,` Eligible terminal blobs: ${e.eligibleTaskCount}`,` Status counts: ${y(e.statusCounts)}`,` Deferred blob tasks: ${e.deferredTaskCount}`,` Deferred statuses: ${y(e.deferredStatusCounts)}`,` Entries: ${e.entryCount}`,` Source bytes: ${e.sourceBytes}`,` Estimated free-space need: ${e.estimatedFreeSpaceBytes}`,` Required free space (with reserve): ${e.requiredFreeSpaceBytes}`,` Available free space: ${e.availableFreeSpaceBytes}`,` Free-space gate: ${e.freeSpaceGatePassed?"PASS":"FAIL"}`,` Migrated: ${e.migratedTasks} task(s), ${e.migratedEntries} entr${e.migratedEntries===1?"y":"ies"}`,` Skipped event-source tasks: ${e.skippedTasks}`,` Failed tasks: ${e.failedTasks}`,` Logical source bytes removed: ${e.logicalSourceBytesRemoved}`];if(e.remainingTaskCount!==void 0)s.push(` Remaining blob tasks: ${e.remainingTaskCount}`);if(e.backupPath){s.push(` Backup: ${e.backupPath}`);if(e.backupMethod)s.push(` Backup method: ${e.backupMethod}`)}if(e.verification){s.push(` Event rows checked: ${e.verification.eventCount}`);s.push(` Verification issues: ${e.verification.issues.length}`)}if(e.blockedReason)s.push(` Blocked: ${e.blockedReason}`);for(const n of e.warnings??[])s.push(` Warning: ${n}`);return s.join("\n")}async function q(e){let o;try{o=B(e)}catch(s){const n=s instanceof Error?s.message:String(s);if(n===exports.TASK_LOG_MIGRATION_HELP){console.log(n)}else{console.error(n);console.error(exports.TASK_LOG_MIGRATION_HELP);process.exitCode=2}return}try{const s=await(0,E.runTaskLogMigration)(o);console.log(I(s));if(!s.ok){if(s.blockedReason)console.error(s.blockedReason);const n=s.failures??s.malformedRows??[];for(const r of n){console.error(` ${r.taskId}: ${r.reason}`)}process.exitCode=1}else{process.exitCode=0}}catch(s){console.error(s instanceof Error?s.message:String(s));process.exitCode=1}}class b extends Error{}function O(e){let o;let s=false;const n=r=>{const t=Number(r);if(!r||!Number.isSafeInteger(t)||t<1){throw new b("--batch must be a positive integer.")}return t};for(let r=0;r<e.length;r+=1){const t=e[r];if(t==="--help"||t==="-h")throw new b(exports.REQUEST_LOG_MIGRATION_HELP);if(t==="--dry-run"){s=true;continue}if(t==="--batch"){o=n(e[r+1]);r+=1;continue}if(t.startsWith("--batch=")){o=n(t.slice("--batch=".length));continue}throw new b(`Unknown option: ${t}`)}return{batchRows:o,dryRun:s}}function h(e){if(e<1024)return`${e} B`;const o=["KiB","MiB","GiB","TiB"];let s=e;let n=-1;while(s>=1024&&n<o.length-1){s/=1024;n+=1}return`${s.toFixed(s>=100?0:1)} ${o[n]} (${e} bytes)`}function $(e,o){const s=[...e].sort((n,r)=>n-r);return s[Math.min(s.length-1,Math.floor(o/100*s.length))]}function w(e){return`${(e/1e3).toFixed(1)}s`}const G=1e4;function U(e,o){if(e.dryRun){const s=e.scan;console.log("[crewx] Dry run finished \u2014 nothing was written.");console.log(` Rows scanned: ${s?.rows??0}`);console.log(` Bodies: ${s?.bodies??0} (${h(s?.bodyBytes??0)})`);console.log(` Distinct bodies: ${s?.distinctBodies??0} (${h(s?.distinctBodyBytes??0)}) \u2014 what logs.db would store`);console.log(` Elapsed: ${w(e.elapsedMs)}`);return}console.log("[crewx] Request-log move finished.");console.log(` Moved rows: ${e.movedRows}`);console.log(` Remaining rows in crewx.db: ${o.crewxRows}`);console.log(` logs.db request_logs: ${o.logsRows??0}`);console.log(` logs.db request_log_bodies: ${o.logsBodies??0}`);console.log(` logs.db size: ${h(o.logsFileBytes)} (+ wal ${h(o.logsWalBytes)})`);console.log(` crewx.db freelist pages: ${o.crewxFreelistPages}`);console.log(` Batches: ${e.batches}, bodies added: ${e.bodiesAdded}`);if(e.deleteTxMs.length>0){console.log(` crewx.db delete transaction per batch: p50 ${$(e.deleteTxMs,50).toFixed(1)} ms, p90 ${$(e.deleteTxMs,90).toFixed(1)} ms, max ${e.maxDeleteTxMs.toFixed(1)} ms`);console.log(` Largest crewx.db -wal seen after a batch: ${h(e.maxWalBytes)}`)}console.log(` Elapsed: ${w(e.elapsedMs)}`);if(o.crewxRows>0){console.log(` ${o.crewxRows} row(s) are still in crewx.db (new rows arrived or the run stopped early). Run it again.`)}}async function D(e){let o;try{o=O(e)}catch(s){const n=s instanceof Error?s.message:String(s);if(n===exports.REQUEST_LOG_MIGRATION_HELP){console.log(n)}else{console.error(n);console.error(exports.REQUEST_LOG_MIGRATION_HELP);process.exitCode=2}return}try{const s=(0,p.inspectRequestLogsMove)();console.log(`[crewx] Request logs \u2192 logs.db${o.dryRun?" (dry run)":""}`);console.log(` crewx.db: ${s.crewxDbPath}`);console.log(` logs.db: ${s.logsDbPath}`);console.log(` Rows to move: ${s.crewxRows}`);let n=Date.now();const r=a=>{const c=Date.now();if(c-n<G)return;n=c;const l=o.dryRun?a.scannedRows:a.movedRows;const i=Math.max(0,s.crewxRows-l);console.log(` ${o.dryRun?"scanned":"moved"} ${l} | remaining ~${i} | elapsed ${w(a.elapsedMs)}`)};const t=(0,p.moveRequestLogsToLogsDb)({batchRows:o.batchRows,dryRun:o.dryRun,onProgress:r});U(t,(0,p.inspectRequestLogsMove)());process.exitCode=o.dryRun||t.remainingRows===0?0:1}catch(s){console.error(s instanceof Error?s.message:String(s));process.exitCode=1}}function H(e){let o;let s;let n;let r;const t=l=>{if(o)throw new u("Choose exactly one of --dry-run, --apply, --verify, or --restore.");o=l};const a=(l,i)=>{const f=e[l+1];if(!f||f.startsWith("--"))throw new u(`${i} requires a value.`);return f};for(let l=0;l<e.length;l+=1){const i=e[l];if(i==="--help"||i==="-h")throw new u(exports.USAGE_BACKFILL_HELP);if(i==="--dry-run"){t("dry-run");continue}if(i==="--apply"){t("apply");continue}if(i==="--verify"){t("verify");continue}if(i==="--restore"){t("restore");r=a(l,"--restore");l+=1;continue}if(i.startsWith("--restore=")){t("restore");r=i.slice("--restore=".length);if(!r)throw new u("--restore requires a value.");continue}if(i==="--db"){s=a(l,"--db");l+=1;continue}if(i.startsWith("--db=")){s=i.slice("--db=".length);if(!s)throw new u("--db requires a value.");continue}if(i==="--backup"){n=a(l,"--backup");l+=1;continue}if(i.startsWith("--backup=")){n=i.slice("--backup=".length);if(!n)throw new u("--backup requires a value.");continue}throw new u(`Unknown option: ${i}`)}const c=o??"dry-run";if(n&&c!=="apply"){throw new u("--backup is only valid with --apply.")}if(r&&c!=="restore"){throw new u("--restore is only valid with restore mode.")}return{mode:c,dbPath:s,backupPath:n,restorePath:r}}function N(e){const o=e.mode==="dry-run"?"Dry-run":e.mode==="apply"?"Apply":e.mode==="restore"?"Restore":"Verify";const s=[`[crewx] Usage backfill \u2014 ${o}`,` Database: ${e.dbPath}`,` Tasks scanned: ${e.scannedTasks}`,` Terminal tasks: ${e.terminalTasks}`,` Raw target tasks: ${e.rawTargetTasks}`,` Candidate tasks: ${e.candidateTasks}`,` Recovered: ${e.recoveredTasks}`,` Unavailable: ${e.unavailableTasks}`,` Deferred (within 24h): ${e.deferredTasks}`,` Changed: ${e.changedTasks}`,` Would change: ${e.wouldChangeTasks}`,` Restored: ${e.restored}`,` Skipped conflicts: ${e.skippedConflict}`,` Remaining target tasks: ${e.remainingTargetTasks}`,` Tasks with usageAccounting: ${e.accountingTasks}`," Provider distribution:"];const n=Object.entries(e.providerDistribution);if(n.length===0){s.push(" (none)")}else{for(const[t,a]of n){s.push(` ${t}: candidates=${a.candidates}, recovered=${a.recovered}, unavailable=${a.unavailable}, deferred=${a.deferred}`)}}s.push(" Reason counts:");for(const[t,a]of Object.entries(e.reasonCounts))s.push(` ${t}: ${a}`);s.push(` Estimated free-space need: ${e.estimatedFreeSpaceBytes}`);s.push(` Required free space (with reserve): ${e.requiredFreeSpaceBytes}`);s.push(` Available free space: ${e.availableFreeSpaceBytes}`);s.push(` Free-space gate: ${e.freeSpaceGatePassed?"PASS":"FAIL"}`);const r=e.snapshotPath??e.backupPath;if(r){s.push(` Undo snapshot: ${r}`);if(e.backupMethod)s.push(` Snapshot method: ${e.backupMethod}`)}if(e.blockedReason)s.push(` Blocked: ${e.blockedReason}`);for(const t of e.conflictSamples){s.push(` Conflict sample: ${t.taskId}: ${t.fields.join(", ")}`)}for(const t of e.failures)s.push(` Failure: ${t.taskId}: ${t.reason}`);for(const t of e.warnings)s.push(` Warning: ${t}`);return s.join("\n")}async function F(e){let o;try{o=H(e)}catch(s){const n=s instanceof Error?s.message:String(s);if(n===exports.USAGE_BACKFILL_HELP){console.log(n)}else{console.error(n);console.error(exports.USAGE_BACKFILL_HELP);process.exitCode=2}return}try{const s=await(0,S.runUsageBackfill)(o);console.log(N(s));process.exitCode=s.ok?0:1}catch(s){console.error(s instanceof Error?s.message:String(s));process.exitCode=1}}async function W(e){const o=e.includes("--force");const s=e.includes("--dry-run");const n=A();const r=(0,_.openDrizzleDb)(n);try{const t=(0,m.pushSchema)(r.db,{force:o,dbPath:n,dryRun:true});console.log(L(t,n));console.log("");if(s){console.log("[crewx] Dry-run mode \u2014 no changes applied.");return}if(!P(t)){console.log("[crewx] No changes needed. Database is up to date.");return}if(!o){const c=await M("Apply changes? (y/N): ");if(c.trim().toLowerCase()!=="y"){console.log("[crewx] Aborted.");return}}const a=(0,m.pushSchema)(r.db,{force:o,dbPath:n});console.log("");console.log("[crewx] Push complete.");if(a.created.length>0){console.log(` Tables created: ${a.created.join(", ")}`)}if(a.altered.length>0){console.log(` Columns added: ${a.altered.map(c=>`${c.table}.${c.column}`).join(", ")}`)}if(a.backupPath){console.log(` Backup: ${a.backupPath}`)}if(a.created.length===0&&a.altered.length===0){console.log(" No changes applied.")}}finally{r.close()}}
|
package/dist/commands/init.js
CHANGED
package/dist/commands/ps.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.handlePs=h;const d=require("@crewx/sdk/repository");const m=require("./cal");function c(t){const n=Math.floor(t/1e3);if(n<60)return`${n}s`;const e=Math.floor(n/60);const o=n%60;if(e<60)return`${e}m ${o}s`;const r=Math.floor(e/60);return`${r}h ${e%60}m`}function u(t){const n=(t??"").trim();if(!n)return false;const e=n.split(/\s+/)[0]??"";const o=e.split("/").pop()??e;return o.startsWith("agy")}function p(t,n){try{const e=n.readLogsTail(t.id,1)?.entries??[];if(Array.isArray(e)&&e.length>0){const o=e[e.length-1];const r=o?.timestamp;const s=r?new Date(r).getTime():NaN;if(r&&!Number.isNaN(s)){const a=Math.max(0,Date.now()-s);return{display:`${c(a)} ago`,isoTimestamp:r,logCapable:true}}}}catch{}if(u(t.coding_agent_command)){return{display:"n/a",isoTimestamp:null,logCapable:false}}return{display:"\u2014",isoTimestamp:null,logCapable:true}}function g(t,n){const e=c(Date.now()-new Date(t.started_at).getTime());const o=p(t,n);return[t.id,t.agent_id??"\u2014",t.status,t.pid!==null&&t.pid!==void 0?String(t.pid):"\u2014",e,t.mode??"\u2014",o.display]}function f(t,n){const e=t.map((s,a)=>Math.max(s.length,...n.map(i=>(i[a]??"").length)));const o=e.map(s=>"-".repeat(s)).join(" ");const r=t.map((s,a)=>s.padEnd(e[a]??s.length)).join(" ");console.log(r);console.log(o);for(const s of n){console.log(s.map((a,i)=>a.padEnd(e[i]??a.length)).join(" "))}}async function h(t){const n=new d.TaskRepository;const e=n.reapOrphanedTasks();if(e>0)console.error(`Reaped ${e} orphaned task(s)`);n.reapRunningWorkflowTasks();const o=n.getActiveTasks();if(t.includes("--json")){const a=o.map(i=>{const l=p(i,n);return{...i,last_active_at:l.isoTimestamp,log_capable:l.logCapable}});console.log(JSON.stringify(a,null,2));return}if(o.length===0){console.log("No active tasks.");return}const r=["TASK ID","AGENT","STATUS","PID","ELAPSED","MODE","LAST ACTIVE"];const s=o.map(a=>g(a,n));f(r,s);console.log(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.handlePs=h;const d=require("@crewx/sdk/repository");const m=require("./cal");function c(t){const n=Math.floor(t/1e3);if(n<60)return`${n}s`;const e=Math.floor(n/60);const o=n%60;if(e<60)return`${e}m ${o}s`;const r=Math.floor(e/60);return`${r}h ${e%60}m`}function u(t){const n=(t??"").trim();if(!n)return false;const e=n.split(/\s+/)[0]??"";const o=e.split("/").pop()??e;return o.startsWith("agy")}function p(t,n){try{const e=n.readLogsTail(t.id,1)?.entries??[];if(Array.isArray(e)&&e.length>0){const o=e[e.length-1];const r=o?.timestamp;const s=r?new Date(r).getTime():NaN;if(r&&!Number.isNaN(s)){const a=Math.max(0,Date.now()-s);return{display:`${c(a)} ago`,isoTimestamp:r,logCapable:true}}}}catch{}if(u(t.coding_agent_command)){return{display:"n/a",isoTimestamp:null,logCapable:false}}return{display:"\u2014",isoTimestamp:null,logCapable:true}}function g(t,n){const e=c(Date.now()-new Date(t.started_at).getTime());const o=p(t,n);return[t.id,t.agent_id??"\u2014",t.status,t.pid!==null&&t.pid!==void 0?String(t.pid):"\u2014",e,t.mode??"\u2014",o.display]}function f(t,n){const e=t.map((s,a)=>Math.max(s.length,...n.map(i=>(i[a]??"").length)));const o=e.map(s=>"-".repeat(s)).join(" ");const r=t.map((s,a)=>s.padEnd(e[a]??s.length)).join(" ");console.log(r);console.log(o);for(const s of n){console.log(s.map((a,i)=>a.padEnd(e[i]??a.length)).join(" "))}}async function h(t){const n=new d.TaskRepository;const e=await n.reapOrphanedTasks();if(e>0)console.error(`Reaped ${e} orphaned task(s)`);n.reapRunningWorkflowTasks();const o=n.getActiveTasks();if(t.includes("--json")){const a=o.map(i=>{const l=p(i,n);return{...i,last_active_at:l.isoTimestamp,log_capable:l.logCapable}});console.log(JSON.stringify(a,null,2));return}if(o.length===0){console.log("No active tasks.");return}const r=["TASK ID","AGENT","STATUS","PID","ELAPSED","MODE","LAST ACTIVE"];const s=o.map(a=>g(a,n));f(r,s);console.log(`
|
|
2
2
|
${o.length} active task(s)`);(0,m.writeCalFooter)({commandId:"crewx.ps",params:{taskId:o[0].id}})}
|
package/dist/commands/result.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.handleResult=M;const g=require("@crewx/sdk");const w=require("@crewx/sdk/repository");const d=require("./cal");const x=1e3;const f=1e4;function $(t){return t.status==="failed"&&(0,w.readTaskTerminalReason)(t)==="runner_lost"}function T(t){if($(t))return"\u26A0\uFE0F";switch(t.status){case"pending":return"\u{1F553}";case"running":return"\u23F3";case"success":return"\u2705";case"failed":return"\u274C";case"stopped":return"\u23F9";default:return"\u2753"}}function p(t){return t==="pending"||t==="running"}function _(t){return new Promise(s=>setTimeout(s,t))}function R(t){switch(t){case"pending":return"crewx.result-pending";case"running":return"crewx.result-running";case"success":return"crewx.result-done";case"failed":case"stopped":return"crewx.result-terminal-abnormal";default:return"crewx.result"}}function c(t,s){const r={taskId:t.id};if(t.agent_id)r.agent=t.agent_id;if(t.thread_id)r.thread=t.thread_id;if(p(t.status)){r.wait=String((0,d.suggestWaitSeconds)({startedAt:t.started_at,lastWaitSeconds:s}))}(0,d.writeCalFooter)({commandId:R(t.status),params:r})}function S(t,s=Date.now()){const r=Date.parse(t);const n=Number.isFinite(r)?Math.max(0,Math.floor((s-r)/1e3)):0;const i=Math.floor(n/3600);const u=Math.floor(n%3600/60);const e=n%60;if(i>0)return`${i}h ${u}m ${e}s`;if(u>0)return`${u}m ${e}s`;return`${e}s`}function k(t){const s=t.find(n=>n.startsWith("--wait="));if(s===void 0)return void 0;const r=Number(s.slice("--wait=".length));return Number.isFinite(r)&&r>=0?r:0}async function M(t){const s=t.includes("--json");const r=k(t);const n=t.find(o=>!o.startsWith("--"));const i=new w.TaskRepository;const u=i.reapOrphanedTasks({tickIntervalMs:f});if(u>0)console.error(`Reaped ${u} orphaned task(s)`);if(!n){const o=i.getAllTasks();const l=o.slice(0,10);if(l.length===0){console.log("No tasks found.");console.log("Tip: Run `crewx query` or `crewx execute` to start a task.");return}console.log("Recent Tasks (latest 10)\n");l.forEach((a,m)=>{const h=T(a);console.log(`${m+1}. ${h} ${a.id}`);console.log(` Agent: ${a.agent_id??"\u2014"} Mode: ${a.mode??"\u2014"}`);console.log(` Started: ${(0,g.formatDisplayTimestamp)(new Date(a.started_at))}`);if(a.completed_at){console.log(` Completed: ${(0,g.formatDisplayTimestamp)(new Date(a.completed_at))}`)}console.log("")});console.log("Tip: Run `crewx result <task-id>` to see full output.");if(!s)c(l[0]);return}let e=i.getTask(n);if(!e){console.error(`Error: Task not found: ${n}`);process.exit(1);return}if(r!==void 0&&r>0&&p(e.status)){const o=Date.now()+r*1e3;let l=Date.now();while(e&&p(e.status)){if(Date.now()>=o){console.error(`Task ${n} is still ${e.status} (waited ${r}s; running for ${S(e.started_at)}). Not stalled \u2014 check again with a longer wait.`);c(e,r);process.exit(124);return}await _(Math.min(x,Math.max(0,o-Date.now())));if(Date.now()-l>=f){const a=i.reapOrphanedTasks({tickIntervalMs:f});if(a>0)console.error(`Reaped ${a} orphaned task(s)`);l=Date.now()}e=i.getTask(n);if(!e){console.error(`Error: Task not found: ${n}`);process.exit(1);return}}}if(s){console.log(JSON.stringify(e,null,2));return}if(e.status==="pending"){console.error(`\u{1F553} Task ${n} is pending (waiting to start \u2014 runner has not adopted the task yet).`);const o=(0,d.suggestWaitSeconds)({startedAt:e.started_at,lastWaitSeconds:r});console.error(`Use \`crewx result ${n} --wait=${o}\` to wait for completion.`);c(e,r);process.exit(1);return}if(e.status==="running"){console.error(`Task ${n} is still running.`);const o=(0,d.suggestWaitSeconds)({startedAt:e.started_at,lastWaitSeconds:r});console.error(`Use \`crewx result ${n} --wait=${o}\` to wait longer or \`crewx log ${n}\` to inspect progress.`);c(e,r);process.exit(1);return}if(e.status==="stopped"){if(e.result!==null&&e.result!==void 0){console.log(e.result)}console.error(`\u23F9 Task ${n} was stopped by user: ${e.error??"no further details"}.`);c(e);process.exit(1);return}if($(e)){console.error(`\u26A0\uFE0F Task ${n} runner lost before completion: ${e.error??"no further details"}.`);c(e);process.exit(1);return}if(e.status==="failed"){console.error(`Task ${n} failed: ${e.error??"unknown error"}`);c(e);process.exit(1);return}console.log(e.result??"");c(e)}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.handleResult=M;const g=require("@crewx/sdk");const w=require("@crewx/sdk/repository");const d=require("./cal");const x=1e3;const f=1e4;function $(t){return t.status==="failed"&&(0,w.readTaskTerminalReason)(t)==="runner_lost"}function T(t){if($(t))return"\u26A0\uFE0F";switch(t.status){case"pending":return"\u{1F553}";case"running":return"\u23F3";case"success":return"\u2705";case"failed":return"\u274C";case"stopped":return"\u23F9";default:return"\u2753"}}function p(t){return t==="pending"||t==="running"}function _(t){return new Promise(s=>setTimeout(s,t))}function R(t){switch(t){case"pending":return"crewx.result-pending";case"running":return"crewx.result-running";case"success":return"crewx.result-done";case"failed":case"stopped":return"crewx.result-terminal-abnormal";default:return"crewx.result"}}function c(t,s){const r={taskId:t.id};if(t.agent_id)r.agent=t.agent_id;if(t.thread_id)r.thread=t.thread_id;if(p(t.status)){r.wait=String((0,d.suggestWaitSeconds)({startedAt:t.started_at,lastWaitSeconds:s}))}(0,d.writeCalFooter)({commandId:R(t.status),params:r})}function S(t,s=Date.now()){const r=Date.parse(t);const n=Number.isFinite(r)?Math.max(0,Math.floor((s-r)/1e3)):0;const i=Math.floor(n/3600);const u=Math.floor(n%3600/60);const e=n%60;if(i>0)return`${i}h ${u}m ${e}s`;if(u>0)return`${u}m ${e}s`;return`${e}s`}function k(t){const s=t.find(n=>n.startsWith("--wait="));if(s===void 0)return void 0;const r=Number(s.slice("--wait=".length));return Number.isFinite(r)&&r>=0?r:0}async function M(t){const s=t.includes("--json");const r=k(t);const n=t.find(o=>!o.startsWith("--"));const i=new w.TaskRepository;const u=await i.reapOrphanedTasks({tickIntervalMs:f});if(u>0)console.error(`Reaped ${u} orphaned task(s)`);if(!n){const o=i.getAllTasks();const l=o.slice(0,10);if(l.length===0){console.log("No tasks found.");console.log("Tip: Run `crewx query` or `crewx execute` to start a task.");return}console.log("Recent Tasks (latest 10)\n");l.forEach((a,m)=>{const h=T(a);console.log(`${m+1}. ${h} ${a.id}`);console.log(` Agent: ${a.agent_id??"\u2014"} Mode: ${a.mode??"\u2014"}`);console.log(` Started: ${(0,g.formatDisplayTimestamp)(new Date(a.started_at))}`);if(a.completed_at){console.log(` Completed: ${(0,g.formatDisplayTimestamp)(new Date(a.completed_at))}`)}console.log("")});console.log("Tip: Run `crewx result <task-id>` to see full output.");if(!s)c(l[0]);return}let e=i.getTask(n);if(!e){console.error(`Error: Task not found: ${n}`);process.exit(1);return}if(r!==void 0&&r>0&&p(e.status)){const o=Date.now()+r*1e3;let l=Date.now();while(e&&p(e.status)){if(Date.now()>=o){console.error(`Task ${n} is still ${e.status} (waited ${r}s; running for ${S(e.started_at)}). Not stalled \u2014 check again with a longer wait.`);c(e,r);process.exit(124);return}await _(Math.min(x,Math.max(0,o-Date.now())));if(Date.now()-l>=f){const a=await i.reapOrphanedTasks({tickIntervalMs:f});if(a>0)console.error(`Reaped ${a} orphaned task(s)`);l=Date.now()}e=i.getTask(n);if(!e){console.error(`Error: Task not found: ${n}`);process.exit(1);return}}}if(s){console.log(JSON.stringify(e,null,2));return}if(e.status==="pending"){console.error(`\u{1F553} Task ${n} is pending (waiting to start \u2014 runner has not adopted the task yet).`);const o=(0,d.suggestWaitSeconds)({startedAt:e.started_at,lastWaitSeconds:r});console.error(`Use \`crewx result ${n} --wait=${o}\` to wait for completion.`);c(e,r);process.exit(1);return}if(e.status==="running"){console.error(`Task ${n} is still running.`);const o=(0,d.suggestWaitSeconds)({startedAt:e.started_at,lastWaitSeconds:r});console.error(`Use \`crewx result ${n} --wait=${o}\` to wait longer or \`crewx log ${n}\` to inspect progress.`);c(e,r);process.exit(1);return}if(e.status==="stopped"){if(e.result!==null&&e.result!==void 0){console.log(e.result)}console.error(`\u23F9 Task ${n} was stopped by user: ${e.error??"no further details"}.`);c(e);process.exit(1);return}if($(e)){console.error(`\u26A0\uFE0F Task ${n} runner lost before completion: ${e.error??"no further details"}.`);c(e);process.exit(1);return}if(e.status==="failed"){console.error(`Task ${n} failed: ${e.error??"unknown error"}`);c(e);process.exit(1);return}console.log(e.result??"");c(e)}
|
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var w=exports&&exports.__createBinding||(Object.create?(function(
|
|
3
|
-
`+(
|
|
4
|
-
`:"")+(
|
|
5
|
-
CrewX CLI v${
|
|
2
|
+
"use strict";var w=exports&&exports.__createBinding||(Object.create?(function(r,e,t,s){if(s===void 0)s=t;var o=Object.getOwnPropertyDescriptor(e,t);if(!o||("get"in o?!e.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return e[t]}}}Object.defineProperty(r,s,o)}):(function(r,e,t,s){if(s===void 0)s=t;r[s]=e[t]}));var v=exports&&exports.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:true,value:e})}):function(r,e){r["default"]=e});var k=exports&&exports.__importStar||(function(){var r=function(e){r=Object.getOwnPropertyNames||function(t){var s=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))s[s.length]=o;return s};return r(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var s=r(e),o=0;o<s.length;o++)if(s[o]!=="default")w(t,e,s[o])}v(t,e);return t}})();Object.defineProperty(exports,"__esModule",{value:true});const u=require("./utils/sdk-compat");const _=require("@crewx/sdk/account");const y=require("@crewx/sdk");const b=require("./utils/inherited-trace");process.env.CREWX_CLI??=u.sdkCompat.resolveCrewxCli();process.env.CREWX_WORKSPACE??=u.sdkCompat.resolveCrewxWorkspace();(0,_.loadCrewxEnvFiles)();(0,b.consumeInheritedRunnerIdentity)();u.sdkCompat.initPricingRemote();const x=require("./commands/query");const q=require("./commands/execute");const S=require("./commands/agent");const C=require("./commands/ps");const d=require("./commands/stop");const O=require("./commands/result");const P=require("./commands/restart");const I=require("./commands/log");const D=require("./commands/doctor");const h=require("./commands/init");const E=require("./commands/shortcut");const R=require("./commands/ai-account");const M=require("./commands/publish");const p=require("./builtin");const j=require("./commands/slack");const N=require("./commands/hook/install");const A=require("./commands/hook/uninstall");const U=require("./commands/hook/status");const L=require("./commands/hook-dispatch");const T=require("./commands/db");const B=require("./commands/command-help");const W=require("./commands/parse-common-flags");const l=require("./commands/registry");const $=require("./utils/version");const F=require("./utils/product-package-root");const g=require("./commands/emit-trailer");async function H(){const{join:r}=await Promise.resolve().then(()=>k(require("path")));const{createRequire:e}=require("module");const t=e(__filename);const s=r(__dirname,"../../../bin/cli-commands.js");const{CLI_SUBCOMMANDS:o}=t(s);const n=new Set([...l.KNOWN_COMMANDS,...l.BUILTIN_COMMAND_NAMES,...l.NOT_YET_MIGRATED]);const i=[...n].filter(c=>!o.has(c));const a=[...o].filter(c=>!n.has(c));if(i.length>0||a.length>0){throw new Error(`[crewx dev] SSOT drift detected!
|
|
3
|
+
`+(i.length?` registry has, CLI_SUBCOMMANDS missing: ${i.join(", ")}
|
|
4
|
+
`:"")+(a.length?` CLI_SUBCOMMANDS has, registry missing: ${a.join(", ")}`:""))}}async function G(r){if(process.env["NODE_ENV"]==="development"){await H()}const e=process.argv.slice(2);const t=e[0];if(!t){f();process.exit(0)}if(p.BUILTIN_COMMANDS.has(t)){const o=t==="skill"?(0,F.resolveProductRootFromCliEntry)(process.argv[1]):void 0;await(0,p.handleBuiltin)(t,e.slice(1),o);return}const s=(0,B.helpUsageFor)(t,e.slice(1));if(s!==void 0){console.log(s);return}switch(t){case"q":case"query":await(0,x.handleQuery)(e.slice(1),t,r);return;case"x":case"execute":await(0,q.handleExecute)(e.slice(1),t,r);return;case"agent":await(0,S.handleAgent)(e.slice(1));return;case"ps":await(0,C.handlePs)(e.slice(1));return;case"stop":await(0,d.handleStop)(e.slice(1),"stop");return;case"kill":await(0,d.handleStop)(e.slice(1),"kill");return;case"result":await(0,O.handleResult)(e.slice(1));return;case"restart":await(0,P.handleRestart)(e.slice(1));return;case"log":await(0,I.handleLog)(e.slice(1));return;case"doctor":await(0,D.handleDoctor)(e.slice(1));return;case"init":{const o=e.slice(1);const n=o.includes("--force")||o.includes("-f");try{const i=(0,h.parseInitProvider)(o);const a=await(0,h.handleInit)({path:process.cwd(),force:n,provider:i});if(a.skippedReason==="yaml-exists"){console.log("\u2713 crewx.yaml already exists (use --force to overwrite)")}else{console.log(a.yamlCreated?"\u2713 crewx.yaml created":"\u2713 yaml skipped");console.log(a.hookInstalled?"\u2713 hook installed":"\u26A0 hook skipped");if(a.errors.length>0)console.warn("Warnings:",a.errors.join("; "))}const c=(0,y.getDefaultAgentProfile)(a.provider);if(c){console.log(`\u2713 default agents: ${a.provider} (${c.planner.model} / ${c.worker.model})`)}if(a.workspaceId)console.log(`\u2713 workspace registered (id=${a.workspaceId}, slug=${a.slug})`);console.log("\u2713 done")}catch(i){console.error("\u2717 init failed:",i.message);process.exit(1)}return}case"db":await(0,T.handleDb)(e.slice(1));return;case"shortcut":await(0,E.handleShortcut)(e.slice(1));return;case"ai-account":await(0,R.handleAiAccount)(e.slice(1));return;case"publish":await(0,M.handlePublish)(e.slice(1));return;case"slack":case"slack:files":await(0,j.handleSlack)(e.slice(1));return;case"hook-dispatch":await(0,L.handleHookDispatch)(e.slice(1));return;case"help":case"--help":case"-h":f();return;case"--version":case"-v":{const o=require("../package.json");console.log(o.version);return}}if(l.NOT_YET_MIGRATED.has(t)){console.error(`Command '${t}' is not yet migrated in SDK refactor round. See packages/cli-bak for reference.`);process.exit(1)}if(t==="hook"){const o=e[1];const n=e.slice(2);switch(o){case"install":await(0,N.handleHookInstall)(n);return;case"uninstall":await(0,A.handleHookUninstall)(n);return;case"status":await(0,U.handleHookStatus)(n);return;default:console.error(`Unknown hook subcommand: ${o??"(none)"}`);console.error("Usage: crewx hook install|uninstall|status");process.exit(1)}}console.error(`Unknown command: ${t}`);console.error("Run `crewx --help` for usage.");process.exit(1)}function f(){console.log(`
|
|
5
|
+
CrewX CLI v${$.CLI_VERSION}
|
|
6
6
|
|
|
7
7
|
Usage:
|
|
8
8
|
crewx Launch web dashboard + open browser (default)
|
|
@@ -112,4 +112,4 @@ Hook Platform:
|
|
|
112
112
|
Global Options:
|
|
113
113
|
--help, -h Show this help
|
|
114
114
|
--version, -v Show version
|
|
115
|
-
`.trim())}function
|
|
115
|
+
`.trim())}function K(r){if(r instanceof W.UnknownOptionError)return 2;if(typeof r==="object"&&r!==null&&"exitCode"in r){const e=r.exitCode;if(typeof e==="number")return e}return 1}const m=(0,g.createDelegationEmitState)();G(m).catch(r=>{console.error(r instanceof Error?r.message:String(r));(0,g.emitDelegationResult)({command:process.argv[2],isError:true,state:m});process.exit(K(r))});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewx/cli",
|
|
3
|
-
"version": "0.9.0-rc.
|
|
3
|
+
"version": "0.9.0-rc.175",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.19.0"
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"better-sqlite3": "*",
|
|
26
26
|
"dotenv": "17.2.3",
|
|
27
27
|
"isomorphic-git": "1.37.1",
|
|
28
|
-
"@crewx/sdk": "0.9.0-rc.
|
|
29
|
-
"@crewx/knowledge-core": "0.1.17-rc.
|
|
30
|
-
"@crewx/
|
|
31
|
-
"@crewx/memory": "0.1.23-rc.
|
|
32
|
-
"@crewx/
|
|
33
|
-
"@crewx/
|
|
34
|
-
"@crewx/cron": "0.1.10-rc.
|
|
35
|
-
"@crewx/workflow": "0.3.22-rc.
|
|
36
|
-
"@crewx/
|
|
37
|
-
"@crewx/
|
|
38
|
-
"@crewx/
|
|
39
|
-
"@crewx/
|
|
40
|
-
"@crewx/
|
|
41
|
-
"@crewx/
|
|
28
|
+
"@crewx/sdk": "0.9.0-rc.175",
|
|
29
|
+
"@crewx/knowledge-core": "0.1.17-rc.185",
|
|
30
|
+
"@crewx/wbs": "0.1.10-rc.201",
|
|
31
|
+
"@crewx/memory": "0.1.23-rc.192",
|
|
32
|
+
"@crewx/search": "0.1.10-rc.171",
|
|
33
|
+
"@crewx/doc": "0.1.9-rc.168",
|
|
34
|
+
"@crewx/cron": "0.1.10-rc.210",
|
|
35
|
+
"@crewx/workflow": "0.3.22-rc.221",
|
|
36
|
+
"@crewx/skill": "0.1.20-rc.69",
|
|
37
|
+
"@crewx/chromex": "0.1.0-rc.208",
|
|
38
|
+
"@crewx/wi": "0.1.10-rc.195",
|
|
39
|
+
"@crewx/notify": "0.1.0-rc.146",
|
|
40
|
+
"@crewx/app": "0.1.0-rc.56",
|
|
41
|
+
"@crewx/shared": "0.0.6-rc.90"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/better-sqlite3": "*",
|