@projectarachne/cli 0.1.0-beta.1
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/LICENSE +75 -0
- package/README.md +40 -0
- package/bin/arachne +2 -0
- package/bin/arachne.js +2 -0
- package/dist/arachne.d.ts +3 -0
- package/dist/arachne.d.ts.map +1 -0
- package/dist/arachne.js +4 -0
- package/dist/arachne.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +145 -0
- package/dist/index.js.map +1 -0
- package/dist/serve.d.ts +6 -0
- package/dist/serve.d.ts.map +1 -0
- package/dist/serve.js +83 -0
- package/dist/serve.js.map +1 -0
- package/dist/templates.d.ts +3 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +22 -0
- package/dist/templates.js.map +1 -0
- package/dist/tui/App.d.ts +2 -0
- package/dist/tui/App.d.ts.map +1 -0
- package/dist/tui/App.js +1078 -0
- package/dist/tui/App.js.map +1 -0
- package/dist/tui/components/Box.d.ts +19 -0
- package/dist/tui/components/Box.d.ts.map +1 -0
- package/dist/tui/components/Box.js +9 -0
- package/dist/tui/components/Box.js.map +1 -0
- package/dist/tui/components/ChatInput.d.ts +12 -0
- package/dist/tui/components/ChatInput.d.ts.map +1 -0
- package/dist/tui/components/ChatInput.js +10 -0
- package/dist/tui/components/ChatInput.js.map +1 -0
- package/dist/tui/components/CommandInput.d.ts +15 -0
- package/dist/tui/components/CommandInput.d.ts.map +1 -0
- package/dist/tui/components/CommandInput.js +92 -0
- package/dist/tui/components/CommandInput.js.map +1 -0
- package/dist/tui/components/Content.d.ts +18 -0
- package/dist/tui/components/Content.d.ts.map +1 -0
- package/dist/tui/components/Content.js +22 -0
- package/dist/tui/components/Content.js.map +1 -0
- package/dist/tui/components/DagView.d.ts +8 -0
- package/dist/tui/components/DagView.d.ts.map +1 -0
- package/dist/tui/components/DagView.js +49 -0
- package/dist/tui/components/DagView.js.map +1 -0
- package/dist/tui/components/Footer.d.ts +9 -0
- package/dist/tui/components/Footer.d.ts.map +1 -0
- package/dist/tui/components/Footer.js +6 -0
- package/dist/tui/components/Footer.js.map +1 -0
- package/dist/tui/components/Frame.d.ts +6 -0
- package/dist/tui/components/Frame.d.ts.map +1 -0
- package/dist/tui/components/Frame.js +10 -0
- package/dist/tui/components/Frame.js.map +1 -0
- package/dist/tui/components/GoalInput.d.ts +10 -0
- package/dist/tui/components/GoalInput.d.ts.map +1 -0
- package/dist/tui/components/GoalInput.js +8 -0
- package/dist/tui/components/GoalInput.js.map +1 -0
- package/dist/tui/components/Header.d.ts +8 -0
- package/dist/tui/components/Header.d.ts.map +1 -0
- package/dist/tui/components/Header.js +8 -0
- package/dist/tui/components/Header.js.map +1 -0
- package/dist/tui/components/Help.d.ts +6 -0
- package/dist/tui/components/Help.d.ts.map +1 -0
- package/dist/tui/components/Help.js +8 -0
- package/dist/tui/components/Help.js.map +1 -0
- package/dist/tui/components/HomeView.d.ts +2 -0
- package/dist/tui/components/HomeView.d.ts.map +1 -0
- package/dist/tui/components/HomeView.js +8 -0
- package/dist/tui/components/HomeView.js.map +1 -0
- package/dist/tui/components/OutputView.d.ts +9 -0
- package/dist/tui/components/OutputView.d.ts.map +1 -0
- package/dist/tui/components/OutputView.js +40 -0
- package/dist/tui/components/OutputView.js.map +1 -0
- package/dist/tui/components/PlannerView.d.ts +17 -0
- package/dist/tui/components/PlannerView.d.ts.map +1 -0
- package/dist/tui/components/PlannerView.js +62 -0
- package/dist/tui/components/PlannerView.js.map +1 -0
- package/dist/tui/components/Settings.d.ts +6 -0
- package/dist/tui/components/Settings.d.ts.map +1 -0
- package/dist/tui/components/Settings.js +210 -0
- package/dist/tui/components/Settings.js.map +1 -0
- package/dist/tui/components/Sidebar.d.ts +12 -0
- package/dist/tui/components/Sidebar.d.ts.map +1 -0
- package/dist/tui/components/Sidebar.js +9 -0
- package/dist/tui/components/Sidebar.js.map +1 -0
- package/dist/tui/components/Splash.d.ts +7 -0
- package/dist/tui/components/Splash.d.ts.map +1 -0
- package/dist/tui/components/Splash.js +56 -0
- package/dist/tui/components/Splash.js.map +1 -0
- package/dist/tui/components/StepEditor.d.ts +13 -0
- package/dist/tui/components/StepEditor.d.ts.map +1 -0
- package/dist/tui/components/StepEditor.js +33 -0
- package/dist/tui/components/StepEditor.js.map +1 -0
- package/dist/tui/components/ThemeDesigner.d.ts +9 -0
- package/dist/tui/components/ThemeDesigner.d.ts.map +1 -0
- package/dist/tui/components/ThemeDesigner.js +45 -0
- package/dist/tui/components/ThemeDesigner.js.map +1 -0
- package/dist/tui/components/WorkflowPicker.d.ts +8 -0
- package/dist/tui/components/WorkflowPicker.d.ts.map +1 -0
- package/dist/tui/components/WorkflowPicker.js +11 -0
- package/dist/tui/components/WorkflowPicker.js.map +1 -0
- package/dist/tui/components/index.d.ts +20 -0
- package/dist/tui/components/index.d.ts.map +1 -0
- package/dist/tui/components/index.js +20 -0
- package/dist/tui/components/index.js.map +1 -0
- package/dist/tui/index.d.ts +2 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +7 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/services/context.d.ts +11 -0
- package/dist/tui/services/context.d.ts.map +1 -0
- package/dist/tui/services/context.js +134 -0
- package/dist/tui/services/context.js.map +1 -0
- package/dist/tui/services/executor.d.ts +13 -0
- package/dist/tui/services/executor.d.ts.map +1 -0
- package/dist/tui/services/executor.js +186 -0
- package/dist/tui/services/executor.js.map +1 -0
- package/dist/tui/services/generateSteps.d.ts +7 -0
- package/dist/tui/services/generateSteps.d.ts.map +1 -0
- package/dist/tui/services/generateSteps.js +238 -0
- package/dist/tui/services/generateSteps.js.map +1 -0
- package/dist/tui/services/providers.d.ts +16 -0
- package/dist/tui/services/providers.d.ts.map +1 -0
- package/dist/tui/services/providers.js +246 -0
- package/dist/tui/services/providers.js.map +1 -0
- package/dist/tui/services/settings.d.ts +29 -0
- package/dist/tui/services/settings.d.ts.map +1 -0
- package/dist/tui/services/settings.js +107 -0
- package/dist/tui/services/settings.js.map +1 -0
- package/dist/tui/services/theme.d.ts +45 -0
- package/dist/tui/services/theme.d.ts.map +1 -0
- package/dist/tui/services/theme.js +205 -0
- package/dist/tui/services/theme.js.map +1 -0
- package/dist/tui/services/themeGenerator.d.ts +4 -0
- package/dist/tui/services/themeGenerator.d.ts.map +1 -0
- package/dist/tui/services/themeGenerator.js +93 -0
- package/dist/tui/services/themeGenerator.js.map +1 -0
- package/dist/tui/services/user.d.ts +3 -0
- package/dist/tui/services/user.d.ts.map +1 -0
- package/dist/tui/services/user.js +40 -0
- package/dist/tui/services/user.js.map +1 -0
- package/dist/tui/theme-context.d.ts +4 -0
- package/dist/tui/theme-context.d.ts.map +1 -0
- package/dist/tui/theme-context.js +6 -0
- package/dist/tui/theme-context.js.map +1 -0
- package/dist/tui/types.d.ts +81 -0
- package/dist/tui/types.d.ts.map +1 -0
- package/dist/tui/types.js +3 -0
- package/dist/tui/types.js.map +1 -0
- package/dist/tui.d.ts +2 -0
- package/dist/tui.d.ts.map +1 -0
- package/dist/tui.js +241 -0
- package/dist/tui.js.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
12
|
+
|
|
13
|
+
## Distribution License
|
|
14
|
+
|
|
15
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
16
|
+
|
|
17
|
+
## Notices
|
|
18
|
+
|
|
19
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
20
|
+
|
|
21
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
22
|
+
|
|
23
|
+
## Changes and New Works License
|
|
24
|
+
|
|
25
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
26
|
+
|
|
27
|
+
## Patent License
|
|
28
|
+
|
|
29
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
30
|
+
|
|
31
|
+
## Noncommercial Purposes
|
|
32
|
+
|
|
33
|
+
Any noncommercial purpose is a permitted purpose.
|
|
34
|
+
|
|
35
|
+
## Personal Uses
|
|
36
|
+
|
|
37
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
38
|
+
|
|
39
|
+
## Noncommercial Organizations
|
|
40
|
+
|
|
41
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
42
|
+
|
|
43
|
+
## Fair Use
|
|
44
|
+
|
|
45
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
46
|
+
|
|
47
|
+
## No Other Rights
|
|
48
|
+
|
|
49
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
50
|
+
|
|
51
|
+
## Patent Defense
|
|
52
|
+
|
|
53
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
54
|
+
|
|
55
|
+
## Violations
|
|
56
|
+
|
|
57
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
58
|
+
|
|
59
|
+
## No Liability
|
|
60
|
+
|
|
61
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
62
|
+
|
|
63
|
+
## Definitions
|
|
64
|
+
|
|
65
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
66
|
+
|
|
67
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
68
|
+
|
|
69
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
70
|
+
|
|
71
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
72
|
+
|
|
73
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
|
74
|
+
|
|
75
|
+
Required Notice: Copyright (c) 2026 Data Tower LLC (https://datatower.com)
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @projectarachne/cli (Beta)
|
|
2
|
+
|
|
3
|
+
Run Arachne workflows locally from your terminal with full filesystem access.
|
|
4
|
+
|
|
5
|
+
Status: **Beta**
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @projectarachne/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
arachne --help
|
|
17
|
+
arachne init
|
|
18
|
+
arachne init --example
|
|
19
|
+
arachne run workflow.yaml
|
|
20
|
+
arachne serve
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### TUI mode
|
|
24
|
+
|
|
25
|
+
Run without a subcommand to open the interactive TUI and select a workflow file:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
arachne
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Notes
|
|
32
|
+
|
|
33
|
+
- `arachne run` executes YAML workflows locally using @arachne/core.
|
|
34
|
+
- `arachne serve` starts the web UI and local API server.
|
|
35
|
+
- The CLI uses your existing local AI credentials (claude/codex/gemini CLIs).
|
|
36
|
+
- License: PolyForm Noncommercial 1.0.0 (see `LICENSE`).
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- Node.js 18+
|
package/bin/arachne
ADDED
package/bin/arachne.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arachne.d.ts","sourceRoot":"","sources":["../src/arachne.ts"],"names":[],"mappings":""}
|
package/dist/arachne.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arachne.js","sourceRoot":"","sources":["../src/arachne.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,EAAE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2BpC,eAAO,MAAM,aAAa,eA0HzB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAU,OAAM,MAAM,EAAiB,kBAUzD,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { access, writeFile } from "node:fs/promises";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { createSqliteStorage, loadWorkflowYaml, resolveDefaultSqlitePath, runWorkflow, } from "@arachne/core";
|
|
5
|
+
import { BASIC_WORKFLOW_TEMPLATE, EXAMPLE_WORKFLOW_TEMPLATE } from "./templates.js";
|
|
6
|
+
import { serveArachne } from "./serve.js";
|
|
7
|
+
// TUI is dynamically imported to avoid React version conflicts
|
|
8
|
+
const CLI_VERSION = "0.0.0";
|
|
9
|
+
const createStorage = () => {
|
|
10
|
+
try {
|
|
11
|
+
return createSqliteStorage();
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
15
|
+
console.error(`Warning: could not open local history database (${resolveDefaultSqlitePath()}): ${message}`);
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const createProgram = () => {
|
|
20
|
+
const program = new Command();
|
|
21
|
+
program
|
|
22
|
+
.name("arachne")
|
|
23
|
+
.description("Arachne CLI for local workflow execution")
|
|
24
|
+
.version(CLI_VERSION);
|
|
25
|
+
program
|
|
26
|
+
.command("init")
|
|
27
|
+
.description("Create a workflow.yaml template in the current directory")
|
|
28
|
+
.option("--example", "Create a multi-step example workflow")
|
|
29
|
+
.action(async (options) => {
|
|
30
|
+
const resolvedPath = resolve(process.cwd(), "workflow.yaml");
|
|
31
|
+
const template = options.example ? EXAMPLE_WORKFLOW_TEMPLATE : BASIC_WORKFLOW_TEMPLATE;
|
|
32
|
+
try {
|
|
33
|
+
await writeFile(resolvedPath, template, { flag: "wx" });
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
if (error && typeof error === "object" && "code" in error && error.code === "EEXIST") {
|
|
37
|
+
console.error(`workflow.yaml already exists: ${resolvedPath}`);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
41
|
+
console.error(`Failed to create workflow.yaml: ${message}`);
|
|
42
|
+
}
|
|
43
|
+
process.exitCode = 1;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
console.log(`Created workflow.yaml at ${resolvedPath}`);
|
|
47
|
+
});
|
|
48
|
+
program
|
|
49
|
+
.command("run")
|
|
50
|
+
.argument("<workflow>", "Path to workflow YAML file")
|
|
51
|
+
.option("-a, --agent <agent>", "Override agent (claude, codex, gemini)")
|
|
52
|
+
.option("-m, --model <model>", "Override model for selected agent")
|
|
53
|
+
.action(async (workflowPath, options) => {
|
|
54
|
+
const resolvedPath = resolve(process.cwd(), workflowPath);
|
|
55
|
+
try {
|
|
56
|
+
await access(resolvedPath);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
console.error(`Workflow file not found: ${resolvedPath}`);
|
|
60
|
+
process.exitCode = 1;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
let workflow;
|
|
64
|
+
try {
|
|
65
|
+
workflow = await loadWorkflowYaml(resolvedPath);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
69
|
+
console.error(message);
|
|
70
|
+
process.exitCode = 1;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const stepsCount = Array.isArray(workflow.steps) && workflow.steps.length > 0
|
|
74
|
+
? workflow.steps.length
|
|
75
|
+
: Array.isArray(workflow.nodes)
|
|
76
|
+
? workflow.nodes.length
|
|
77
|
+
: 0;
|
|
78
|
+
console.log(`Running ${stepsCount} step${stepsCount === 1 ? "" : "s"} from ${resolvedPath}`);
|
|
79
|
+
const storage = createStorage();
|
|
80
|
+
const runRecord = storage?.createRun({ workflowPath: resolvedPath, stepsTotal: stepsCount }) ?? null;
|
|
81
|
+
try {
|
|
82
|
+
await runWorkflow(workflow, {
|
|
83
|
+
agentOverride: options.agent,
|
|
84
|
+
modelOverride: options.model,
|
|
85
|
+
onStepStart: (step, info) => {
|
|
86
|
+
console.log(`→ [${info.index + 1}/${info.total}] ${step.id}`);
|
|
87
|
+
if (storage && runRecord) {
|
|
88
|
+
storage.recordStepStart(runRecord.id, step.id, info.index);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
onStepComplete: (step, info) => {
|
|
92
|
+
console.log(`✓ [${info.index + 1}/${info.total}] ${step.id}`);
|
|
93
|
+
if (storage && runRecord) {
|
|
94
|
+
storage.recordStepResult(step.id, runRecord.id, { status: "success", output: info.output });
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
onStepFailed: (step, info) => {
|
|
98
|
+
console.error(`✗ [${info.index + 1}/${info.total}] ${step.id}: ${info.error.message}`);
|
|
99
|
+
if (storage && runRecord) {
|
|
100
|
+
storage.recordStepResult(step.id, runRecord.id, {
|
|
101
|
+
status: "failed",
|
|
102
|
+
errorMessage: info.error.message,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
if (storage && runRecord) {
|
|
108
|
+
storage.completeRun(runRecord.id, { status: "success" });
|
|
109
|
+
}
|
|
110
|
+
process.exitCode = 0;
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
114
|
+
if (!options.agent) {
|
|
115
|
+
console.error(message);
|
|
116
|
+
}
|
|
117
|
+
if (storage && runRecord) {
|
|
118
|
+
storage.completeRun(runRecord.id, { status: "failed", errorMessage: message });
|
|
119
|
+
}
|
|
120
|
+
process.exitCode = 1;
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
storage?.close();
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
program
|
|
127
|
+
.command("serve")
|
|
128
|
+
.description("Start the local web UI and API server")
|
|
129
|
+
.option("--no-open", "Do not open the browser automatically")
|
|
130
|
+
.action(async (options) => {
|
|
131
|
+
serveArachne({ open: options.open });
|
|
132
|
+
});
|
|
133
|
+
return program;
|
|
134
|
+
};
|
|
135
|
+
export const runCli = async (argv = process.argv) => {
|
|
136
|
+
const program = createProgram();
|
|
137
|
+
if (argv.length <= 2) {
|
|
138
|
+
// Dynamic import to avoid React version conflicts at load time
|
|
139
|
+
const { runTui } = await import("./tui/index.js");
|
|
140
|
+
runTui();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
await program.parseAsync(argv);
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,+DAA+D;AAE/D,MAAM,WAAW,GAAG,OAAO,CAAC;AAE5B,MAAM,aAAa,GAAG,GAAyB,EAAE;IAC/C,IAAI,CAAC;QACH,OAAO,mBAAmB,EAAE,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO,CAAC,KAAK,CAAC,mDAAmD,wBAAwB,EAAE,MAAM,OAAO,EAAE,CAAC,CAAC;QAC5G,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO;SACJ,IAAI,C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,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,WAAW,EAAE,uCAAuC,CAAC;SAC5D,MAAM,CAAC,KAAK,EAAE,OAA2B,EAAE,EAAE;QAC5C,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,EAAE,OAAiB,OAAO,CAAC,IAAI,EAAE,EAAE;IAC5D,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACrB,+DAA+D;QAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAClD,MAAM,EAAE,CAAC;QACT,OAAO;IACT,CAAC;IAED,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC,CAAC"}
|
package/dist/serve.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAIA,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAuCF,eAAO,MAAM,YAAY,GAAI,UAAS,YAAiB,SAkDtD,CAAC"}
|
package/dist/serve.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { resolve, dirname } from "node:path";
|
|
4
|
+
const DEFAULT_API_PORT = 3001;
|
|
5
|
+
const DEFAULT_WEB_PORT = 3000;
|
|
6
|
+
const findRepoRoot = (startDir) => {
|
|
7
|
+
let current = resolve(startDir);
|
|
8
|
+
while (true) {
|
|
9
|
+
const webPkg = resolve(current, "apps/web/package.json");
|
|
10
|
+
const serverPkg = resolve(current, "apps/server/package.json");
|
|
11
|
+
if (existsSync(webPkg) && existsSync(serverPkg)) {
|
|
12
|
+
return current;
|
|
13
|
+
}
|
|
14
|
+
const parent = dirname(current);
|
|
15
|
+
if (parent === current)
|
|
16
|
+
break;
|
|
17
|
+
current = parent;
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
const openBrowser = (url) => {
|
|
22
|
+
try {
|
|
23
|
+
if (process.platform === "win32") {
|
|
24
|
+
const child = spawn("cmd", ["/c", "start", "", url], {
|
|
25
|
+
stdio: "ignore",
|
|
26
|
+
detached: true,
|
|
27
|
+
});
|
|
28
|
+
child.unref();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const command = process.platform === "darwin" ? "open" : "xdg-open";
|
|
32
|
+
const child = spawn(command, [url], { stdio: "ignore", detached: true });
|
|
33
|
+
child.unref();
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
37
|
+
console.warn(`Failed to open browser: ${message}`);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export const serveArachne = (options = {}) => {
|
|
41
|
+
const repoRoot = findRepoRoot(process.cwd());
|
|
42
|
+
if (!repoRoot) {
|
|
43
|
+
console.error("Unable to locate apps/web and apps/server from current directory.");
|
|
44
|
+
process.exitCode = 1;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const apiPort = Number(process.env.ARACHNE_API_PORT || DEFAULT_API_PORT);
|
|
48
|
+
const webPort = Number(process.env.ARACHNE_WEB_PORT || DEFAULT_WEB_PORT);
|
|
49
|
+
const serverProcess = spawn("npm", ["run", "dev"], {
|
|
50
|
+
cwd: resolve(repoRoot, "apps/server"),
|
|
51
|
+
stdio: "inherit",
|
|
52
|
+
env: {
|
|
53
|
+
...process.env,
|
|
54
|
+
PORT: String(apiPort),
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
const webProcess = spawn("npm", ["run", "dev", "--", "--port", String(webPort)], {
|
|
58
|
+
cwd: resolve(repoRoot, "apps/web"),
|
|
59
|
+
stdio: "inherit",
|
|
60
|
+
env: {
|
|
61
|
+
...process.env,
|
|
62
|
+
VITE_API_PROXY: `http://localhost:${apiPort}`,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
if (options.open !== false) {
|
|
66
|
+
openBrowser(`http://localhost:${webPort}`);
|
|
67
|
+
}
|
|
68
|
+
const shutdown = (signal) => {
|
|
69
|
+
serverProcess.kill(signal);
|
|
70
|
+
webProcess.kill(signal);
|
|
71
|
+
};
|
|
72
|
+
process.on("SIGINT", () => shutdown("SIGINT"));
|
|
73
|
+
process.on("SIGTERM", () => shutdown("SIGTERM"));
|
|
74
|
+
const handleExit = (label, code) => {
|
|
75
|
+
if (code && code !== 0) {
|
|
76
|
+
console.error(`${label} exited with code ${code}`);
|
|
77
|
+
process.exitCode = code;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
serverProcess.on("exit", (code) => handleExit("API server", code));
|
|
81
|
+
webProcess.on("exit", (code) => handleExit("Web UI", code));
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=serve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAM7C,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;IACxC,IAAI,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,C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OAAO,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QAC3B,WAAW,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,MAAsB,EAAE,EAAE;QAC1C,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAEjD,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,IAAmB,EAAE,EAAE;QACxD,IAAI,IAAI,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,qBAAqB,IAAI,EAAE,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC1B,CAAC;IACH,CAAC,CAAC;IAEF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const BASIC_WORKFLOW_TEMPLATE = "version: \"1\"\nname: \"Arachne Workflow\"\ndescription: \"Describe your workflow.\"\nsteps:\n - id: step_one\n agent: claude\n prompt: \"Describe the task you want to run.\"\n";
|
|
2
|
+
export declare const EXAMPLE_WORKFLOW_TEMPLATE = "version: \"1\"\nname: \"Linear Workflow Example\"\ndescription: \"Simple two-step linear workflow.\"\nvariables:\n topic: \"Project Arachne\"\nsteps:\n - id: summarize\n agent: claude\n prompt: \"Summarize {{variables.topic}} in one sentence.\"\n - id: expand\n agent: claude\n promptTemplate: \"Expand on: {{steps.summarize.output}}\"\n";
|
|
3
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,4LAOnC,CAAC;AAEF,eAAO,MAAM,yBAAyB,qWAYrC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const BASIC_WORKFLOW_TEMPLATE = `version: "1"
|
|
2
|
+
name: "Arachne Workflow"
|
|
3
|
+
description: "Describe your workflow."
|
|
4
|
+
steps:
|
|
5
|
+
- id: step_one
|
|
6
|
+
agent: claude
|
|
7
|
+
prompt: "Describe the task you want to run."
|
|
8
|
+
`;
|
|
9
|
+
export const EXAMPLE_WORKFLOW_TEMPLATE = `version: "1"
|
|
10
|
+
name: "Linear Workflow Example"
|
|
11
|
+
description: "Simple two-step linear workflow."
|
|
12
|
+
variables:
|
|
13
|
+
topic: "Project Arachne"
|
|
14
|
+
steps:
|
|
15
|
+
- id: summarize
|
|
16
|
+
agent: claude
|
|
17
|
+
prompt: "Summarize {{variables.topic}} in one sentence."
|
|
18
|
+
- id: expand
|
|
19
|
+
agent: claude
|
|
20
|
+
promptTemplate: "Expand on: {{steps.summarize.output}}"
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;CAOtC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;CAYxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAmJA,eAAO,MAAM,GAAG,+CAstCf,CAAC"}
|