apteva 0.4.56 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +216 -54
- package/cli.js +35 -0
- package/install.js +92 -0
- package/package.json +12 -79
- package/LICENSE +0 -63
- package/bin/apteva.js +0 -196
- package/dist/ActivityPage.kxzzb4yc.js +0 -3
- package/dist/ApiDocsPage.zq998hbm.js +0 -4
- package/dist/App.55rea8mn.js +0 -61
- package/dist/App.5ywb23z4.js +0 -53
- package/dist/App.6thds120.js +0 -4
- package/dist/App.9tctxzqm.js +0 -8
- package/dist/App.a8r8ttaz.js +0 -4
- package/dist/App.agsv5bje.js +0 -4
- package/dist/App.cepapqmx.js +0 -4
- package/dist/App.dp041gb3.js +0 -221
- package/dist/App.fds72zb5.js +0 -4
- package/dist/App.fg9qj2dq.js +0 -4
- package/dist/App.ndfejbm9.js +0 -4
- package/dist/App.nxmfmq1h.js +0 -13
- package/dist/App.qdfyt8ba.js +0 -4
- package/dist/App.x2d0ygt6.js +0 -4
- package/dist/App.yt9p4nr3.js +0 -20
- package/dist/App.zn4mw16t.js +0 -1
- package/dist/ConnectionsPage.8r96ryw7.js +0 -3
- package/dist/McpPage.3cwh0gnd.js +0 -3
- package/dist/SettingsPage.ykgdh5ev.js +0 -3
- package/dist/SkillsPage.4np1s65b.js +0 -3
- package/dist/TasksPage.4g08t7p6.js +0 -3
- package/dist/TelemetryPage.72w9pwcp.js +0 -3
- package/dist/TestsPage.z4fk3r7r.js +0 -3
- package/dist/ThreadsPage.63tcajeh.js +0 -3
- package/dist/apteva-kit.css +0 -1
- package/dist/icon.png +0 -0
- package/dist/index.html +0 -16
- package/dist/styles.css +0 -1
- package/scripts/postinstall.mjs +0 -102
- package/src/auth/index.ts +0 -394
- package/src/auth/middleware.ts +0 -213
- package/src/binary.ts +0 -536
- package/src/channels/index.ts +0 -40
- package/src/channels/telegram.ts +0 -311
- package/src/crypto.ts +0 -301
- package/src/db-tests.ts +0 -174
- package/src/db.ts +0 -3133
- package/src/integrations/agentdojo.ts +0 -559
- package/src/integrations/composio.ts +0 -437
- package/src/integrations/index.ts +0 -87
- package/src/integrations/skillsmp.ts +0 -318
- package/src/mcp-client.ts +0 -605
- package/src/mcp-handler.ts +0 -394
- package/src/mcp-platform.ts +0 -2370
- package/src/openapi.ts +0 -2410
- package/src/providers.ts +0 -597
- package/src/routes/api/agent-utils.ts +0 -890
- package/src/routes/api/agents.ts +0 -916
- package/src/routes/api/api-keys.ts +0 -95
- package/src/routes/api/channels.ts +0 -182
- package/src/routes/api/helpers.ts +0 -12
- package/src/routes/api/integrations.ts +0 -639
- package/src/routes/api/mcp.ts +0 -574
- package/src/routes/api/meta-agent.ts +0 -195
- package/src/routes/api/projects.ts +0 -112
- package/src/routes/api/providers.ts +0 -424
- package/src/routes/api/skills.ts +0 -537
- package/src/routes/api/system.ts +0 -333
- package/src/routes/api/telemetry.ts +0 -203
- package/src/routes/api/tests.ts +0 -148
- package/src/routes/api/triggers.ts +0 -518
- package/src/routes/api/users.ts +0 -148
- package/src/routes/api/webhooks.ts +0 -171
- package/src/routes/api.ts +0 -53
- package/src/routes/auth.ts +0 -251
- package/src/routes/share.ts +0 -86
- package/src/routes/static.ts +0 -131
- package/src/server.ts +0 -642
- package/src/test-runner.ts +0 -598
- package/src/triggers/agentdojo.ts +0 -253
- package/src/triggers/composio.ts +0 -264
- package/src/triggers/index.ts +0 -71
- package/src/tui/AgentList.tsx +0 -145
- package/src/tui/App.tsx +0 -102
- package/src/tui/Login.tsx +0 -104
- package/src/tui/api.ts +0 -72
- package/src/tui/index.tsx +0 -7
- package/src/web/App.tsx +0 -455
- package/src/web/components/activity/ActivityPage.tsx +0 -314
- package/src/web/components/activity/index.ts +0 -1
- package/src/web/components/agents/AgentCard.tsx +0 -189
- package/src/web/components/agents/AgentPanel.tsx +0 -2244
- package/src/web/components/agents/AgentsView.tsx +0 -180
- package/src/web/components/agents/CreateAgentModal.tsx +0 -475
- package/src/web/components/agents/index.ts +0 -4
- package/src/web/components/api/ApiDocsPage.tsx +0 -842
- package/src/web/components/auth/CreateAccountStep.tsx +0 -176
- package/src/web/components/auth/LoginPage.tsx +0 -91
- package/src/web/components/auth/index.ts +0 -2
- package/src/web/components/common/Icons.tsx +0 -250
- package/src/web/components/common/LoadingSpinner.tsx +0 -44
- package/src/web/components/common/Modal.tsx +0 -199
- package/src/web/components/common/Select.tsx +0 -97
- package/src/web/components/common/index.ts +0 -20
- package/src/web/components/connections/ConnectionsPage.tsx +0 -54
- package/src/web/components/connections/IntegrationsTab.tsx +0 -170
- package/src/web/components/connections/OverviewTab.tsx +0 -137
- package/src/web/components/connections/TriggersTab.tsx +0 -1346
- package/src/web/components/dashboard/Dashboard.tsx +0 -572
- package/src/web/components/dashboard/index.ts +0 -1
- package/src/web/components/index.ts +0 -21
- package/src/web/components/layout/ErrorBanner.tsx +0 -18
- package/src/web/components/layout/Header.tsx +0 -332
- package/src/web/components/layout/Sidebar.tsx +0 -231
- package/src/web/components/layout/index.ts +0 -3
- package/src/web/components/mcp/IntegrationsPanel.tsx +0 -857
- package/src/web/components/mcp/McpPage.tsx +0 -2515
- package/src/web/components/mcp/index.ts +0 -1
- package/src/web/components/meta-agent/MetaAgent.tsx +0 -245
- package/src/web/components/onboarding/OnboardingWizard.tsx +0 -404
- package/src/web/components/onboarding/index.ts +0 -1
- package/src/web/components/settings/SettingsPage.tsx +0 -2776
- package/src/web/components/settings/index.ts +0 -1
- package/src/web/components/skills/SkillsPage.tsx +0 -1200
- package/src/web/components/tasks/TasksPage.tsx +0 -1116
- package/src/web/components/tasks/index.ts +0 -1
- package/src/web/components/telemetry/TelemetryPage.tsx +0 -1129
- package/src/web/components/tests/TestsPage.tsx +0 -594
- package/src/web/components/threads/ThreadsPage.tsx +0 -315
- package/src/web/context/AuthContext.tsx +0 -242
- package/src/web/context/ProjectContext.tsx +0 -214
- package/src/web/context/TelemetryContext.tsx +0 -299
- package/src/web/context/ThemeContext.tsx +0 -90
- package/src/web/context/UIModeContext.tsx +0 -49
- package/src/web/context/index.ts +0 -12
- package/src/web/hooks/index.ts +0 -3
- package/src/web/hooks/useAgents.ts +0 -115
- package/src/web/hooks/useOnboarding.ts +0 -20
- package/src/web/hooks/useProviders.ts +0 -75
- package/src/web/icon.png +0 -0
- package/src/web/index.html +0 -16
- package/src/web/styles.css +0 -118
- package/src/web/themes.ts +0 -162
- package/src/web/types.ts +0 -298
package/README.md
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://apteva.ai/icon.png" width="60" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">Apteva</h1>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>An AI that never stops thinking.</strong>
|
|
9
|
+
</p>
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
Apteva is a continuous thinking engine. It doesn't wait for prompts —<br>
|
|
13
|
+
it observes, reasons, decides, and acts on its own initiative. Around the clock.
|
|
14
|
+
</p>
|
|
9
15
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://apteva.ai">Website</a> ·
|
|
18
|
+
<a href="https://apteva.ai/features">Features</a> ·
|
|
19
|
+
<a href="https://apteva.ai/cloud">Cloud</a> ·
|
|
20
|
+
<a href="https://github.com/apteva/core">Core Engine</a> ·
|
|
21
|
+
<a href="https://github.com/apteva/server">Server</a> ·
|
|
22
|
+
<a href="https://github.com/apteva/computer">Computer</a> ·
|
|
23
|
+
<a href="https://github.com/apteva/integrations">Integrations</a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
---
|
|
14
27
|
|
|
15
28
|
## Quick Start
|
|
16
29
|
|
|
@@ -18,67 +31,216 @@ Run AI agents locally on your machine.
|
|
|
18
31
|
npx apteva
|
|
19
32
|
```
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
A setup wizard guides you through provider selection, API key, and capabilities. Then the agent starts thinking.
|
|
22
35
|
|
|
23
|
-
|
|
36
|
+
Or from source:
|
|
24
37
|
|
|
25
38
|
```bash
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
bun add -g apteva
|
|
39
|
+
cd core && go build -o apteva-core .
|
|
40
|
+
cd ../server && go build -o apteva-server .
|
|
41
|
+
cd ../apteva && go build -o apteva .
|
|
42
|
+
./apteva
|
|
31
43
|
```
|
|
32
44
|
|
|
33
|
-
|
|
45
|
+
Or with Docker:
|
|
34
46
|
|
|
35
47
|
```bash
|
|
36
|
-
|
|
37
|
-
|
|
48
|
+
docker run -p 5280:5280 -v apteva-data:/data apteva
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## What is Apteva?
|
|
52
|
+
|
|
53
|
+
Every AI you use is reactive — you type, it responds, then it stops. Apteva is different. It runs a **continuous thinking loop**: observe → reason → act → sleep → repeat. It wakes when events arrive, sleeps when nothing happens, and thinks proactively in between.
|
|
38
54
|
|
|
39
|
-
|
|
40
|
-
apteva --port 8080
|
|
55
|
+
It's not a chatbot. It's not an agent framework. It's **artificial consciousness** — a machine that is always aware, always ready, whether anyone is watching or not.
|
|
41
56
|
|
|
42
|
-
|
|
43
|
-
|
|
57
|
+
### What it does between prompts
|
|
58
|
+
|
|
59
|
+
- Notices a pattern in your support tickets before you ask
|
|
60
|
+
- Follows up on a cold lead because three days passed and it remembers
|
|
61
|
+
- Reorganizes inventory because it spotted a trend in last week's orders
|
|
62
|
+
- Spawns a worker thread to handle a customer email at 3am
|
|
63
|
+
- Evolves its own directives as it discovers better approaches
|
|
64
|
+
- Browses the web, takes screenshots, clicks through pages
|
|
65
|
+
- Connects to GitHub, Stripe, Slack — 263+ integrations
|
|
66
|
+
|
|
67
|
+
## Architecture
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
┌──────────────────────────────────────────────────────┐
|
|
71
|
+
│ ./apteva │
|
|
72
|
+
│ Setup wizard → TUI terminal interface │
|
|
73
|
+
│ Channels: CLI, Telegram, Discord │
|
|
74
|
+
└──────────────────┬───────────────────────────────────┘
|
|
75
|
+
│
|
|
76
|
+
┌──────────────────▼───────────────────────────────────┐
|
|
77
|
+
│ apteva-server (:5280) │
|
|
78
|
+
│ Auth · Instances · Integrations · Webhooks │
|
|
79
|
+
│ │
|
|
80
|
+
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
81
|
+
│ │ core-1 │ │ core-2 │ │ core-3 │ ... │
|
|
82
|
+
│ │ default │ │ support │ │ monitor │ │
|
|
83
|
+
│ └────┬────┘ └────┬────┘ └────┬────┘ │
|
|
84
|
+
│ │ │ │ │
|
|
85
|
+
│ ▼ ▼ ▼ │
|
|
86
|
+
│ ┌──────────────────────────────────────────────┐ │
|
|
87
|
+
│ │ MCP Tools │ │
|
|
88
|
+
│ │ channels · exec · web · browser │ │
|
|
89
|
+
│ │ github · stripe · slack · 263+ more │ │
|
|
90
|
+
│ └──────────────────────────────────────────────┘ │
|
|
91
|
+
│ │
|
|
92
|
+
│ memory · self-pacing · evolve · persistent history │
|
|
93
|
+
└──────────────────────────────────────────────────────┘
|
|
44
94
|
```
|
|
45
95
|
|
|
46
|
-
|
|
96
|
+
One command (`./apteva`) starts everything. The CLI spawns the server, the server spawns core instances, and the agent begins thinking.
|
|
97
|
+
|
|
98
|
+
## Key Features
|
|
99
|
+
|
|
100
|
+
| Feature | Description |
|
|
101
|
+
|---------|-------------|
|
|
102
|
+
| **Continuous Thinking** | Infinite loop — observe, reason, act, sleep. Not request-response. |
|
|
103
|
+
| **Multi-Threaded** | Spawns worker threads for parallel tasks. Each has its own tools, pace, and directive. |
|
|
104
|
+
| **Self-Evolving** | Persistent memory. Refines its own directives over time. Gets sharper the longer it runs. |
|
|
105
|
+
| **Self-Pacing** | Sets its own sleep duration — 2 seconds when busy, hours when idle. Events wake it instantly. |
|
|
106
|
+
| **Session Persistence** | Conversation history survives restarts. JSONL per thread, auto-compaction, never loses context. |
|
|
107
|
+
| **Agent-Driven Safety** | No forced approval gates. The agent decides, learns from feedback, asks when unsure. Three modes: autonomous, cautious, learn. |
|
|
108
|
+
| **263+ Integrations** | GitHub, Slack, Stripe, Shopify, and more. Each runs as its own MCP server. Credentials encrypted. |
|
|
109
|
+
| **Browser Control** | Local Chrome or Browserbase. Navigate, click, type, screenshot. Claude gets native computer use protocol. |
|
|
110
|
+
| **Multi-Channel** | CLI terminal, Telegram, Discord. Agent routes responses to the right channel. |
|
|
111
|
+
| **Multi-Instance** | Run multiple agents in parallel. Each has its own directive, tools, and history. Projects for isolation. |
|
|
112
|
+
| **Terminal UI** | Two-panel TUI with live status, thread thoughts, streaming responses, modal commands. |
|
|
113
|
+
| **Embeddable** | The core is a standalone Go binary. Run it headless, connect via API, embed anywhere. |
|
|
114
|
+
|
|
115
|
+
## Use Cases
|
|
116
|
+
|
|
117
|
+
- **Run a business** — Support, sales, content, billing — fully autonomous, 24/7
|
|
118
|
+
- **Content pipeline** — Research, write, publish, distribute, track — zero human input
|
|
119
|
+
- **Ad operations** — Monitor ROAS, adjust budgets, generate creatives, A/B test
|
|
120
|
+
- **DevOps** — Monitor deploys, triage alerts, write patches, coordinate incidents
|
|
121
|
+
- **Personal assistant** — Email triage, calendar management, reminders, research
|
|
122
|
+
- **Web automation** — Browse sites, fill forms, take screenshots, extract data
|
|
123
|
+
|
|
124
|
+
## CLI Commands
|
|
125
|
+
|
|
126
|
+
| Command | Description |
|
|
127
|
+
|---------|-------------|
|
|
128
|
+
| `/status` | Core status |
|
|
129
|
+
| `/config` | Full config |
|
|
130
|
+
| `/directive [text]` | Show or set directive |
|
|
131
|
+
| `/mode` | Switch mode: autonomous, cautious, learn |
|
|
132
|
+
| `/threads` | List/kill threads |
|
|
133
|
+
| `/computer` | Browser: local, browserbase, off |
|
|
134
|
+
| `/integrate <app>` | Connect an integration (263+ apps) |
|
|
135
|
+
| `/connect telegram` | Connect Telegram bot |
|
|
136
|
+
| `/channels` | List connected channels |
|
|
137
|
+
| `/mcp` | Manage MCP servers |
|
|
138
|
+
| `/help` | All commands |
|
|
139
|
+
|
|
140
|
+
Everything else you type is sent to the agent.
|
|
141
|
+
|
|
142
|
+
## Modes
|
|
143
|
+
|
|
144
|
+
| Mode | Behavior |
|
|
145
|
+
|------|----------|
|
|
146
|
+
| **autonomous** | Agent acts freely. Learns from feedback. Trusted. |
|
|
147
|
+
| **cautious** | Asks before destructive or external actions. Learns from answers. |
|
|
148
|
+
| **learn** | Asks about every new tool type. Builds a safety profile over time. |
|
|
149
|
+
|
|
150
|
+
All modes use `[[remember]]` for persistent learning. The agent gets smarter the longer it runs.
|
|
151
|
+
|
|
152
|
+
## Providers
|
|
47
153
|
|
|
48
154
|
| Provider | Models |
|
|
49
155
|
|----------|--------|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
|
63
|
-
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
156
|
+
| **Fireworks** | Kimi K2.5 |
|
|
157
|
+
| **Anthropic** | Claude Sonnet 4, Claude Haiku 4.5 |
|
|
158
|
+
| **OpenAI** | GPT-4.1, GPT-4.1-mini |
|
|
159
|
+
| **Google** | Gemini 2.5 Pro, Gemini 2.5 Flash |
|
|
160
|
+
|
|
161
|
+
Select during setup. Switch anytime with `/mode` or the API.
|
|
162
|
+
|
|
163
|
+
## Repositories
|
|
164
|
+
|
|
165
|
+
| Repo | Description |
|
|
166
|
+
|------|-------------|
|
|
167
|
+
| [`apteva/apteva`](https://github.com/apteva/apteva) | This repo — CLI, setup wizard, TUI, npm launcher |
|
|
168
|
+
| [`apteva/core`](https://github.com/apteva/core) | The thinking engine (Go) |
|
|
169
|
+
| [`apteva/server`](https://github.com/apteva/server) | Management server — auth, instances, integrations, dashboard (Go) |
|
|
170
|
+
| [`apteva/computer`](https://github.com/apteva/computer) | Browser control — local Chrome, Browserbase (Go) |
|
|
171
|
+
| [`apteva/integrations`](https://github.com/apteva/integrations) | 263 app connectors + webhook registrar (TypeScript) |
|
|
172
|
+
|
|
173
|
+
## Configuration
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Data stored in
|
|
177
|
+
~/.apteva/apteva.json # CLI config (capabilities, API key, instance ID)
|
|
178
|
+
~/.apteva/apteva.db # Server database (auth, connections, providers)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## From Source
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Build all three binaries
|
|
185
|
+
cd core && go build -o apteva-core .
|
|
186
|
+
cd ../server && go build -o apteva-server .
|
|
187
|
+
cd ../apteva && go build -o apteva .
|
|
188
|
+
|
|
189
|
+
# Run (starts server + core + TUI)
|
|
190
|
+
cd apteva && ./apteva
|
|
191
|
+
|
|
192
|
+
# Or run core standalone (headless)
|
|
193
|
+
cd core && ./apteva-core --headless
|
|
194
|
+
|
|
195
|
+
# Or connect CLI to a remote server
|
|
196
|
+
./apteva --no-spawn --server <host>:5280
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Docker
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# Build
|
|
203
|
+
docker build -t apteva .
|
|
204
|
+
|
|
205
|
+
# Run
|
|
206
|
+
docker run -p 5280:5280 -v apteva-data:/data apteva
|
|
207
|
+
|
|
208
|
+
# Connect CLI to it
|
|
209
|
+
./apteva --no-spawn --server <host>:5280
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Migrating from OpenClaw
|
|
213
|
+
|
|
214
|
+
Already running OpenClaw agents? Here's how to switch.
|
|
215
|
+
|
|
216
|
+
| OpenClaw | Apteva | Notes |
|
|
217
|
+
|----------|--------|-------|
|
|
218
|
+
| `claw.run(prompt)` | `config.json` → directive | Apteva doesn't need prompts. It runs continuously. |
|
|
219
|
+
| `claw.tool(...)` | MCP server | Any MCP server works. 263+ built-in. |
|
|
220
|
+
| `claw.memory` | `[[remember]]` | Persistent across restarts. Embedding-based recall. |
|
|
221
|
+
| `claw.agent(name)` | `[[spawn id="name"]]` | Threads are cheaper. They share memory and tools. |
|
|
222
|
+
| Webhook handlers | Subscriptions | Events route directly to threads. |
|
|
223
|
+
| `OPENCLAW_API_KEY` | `FIREWORKS_API_KEY` | Or Anthropic, OpenAI, Google. Your choice. |
|
|
224
|
+
| Cron jobs | Self-pacing | No cron needed. `[[pace sleep="5m"]]` and it wakes on events. |
|
|
225
|
+
| Agent state files | Evolving directives | The agent rewrites its own config. It improves itself. |
|
|
226
|
+
| Session files | JSONL history | Persistent per thread, auto-compaction, survives restarts. |
|
|
227
|
+
|
|
228
|
+
### Why switch?
|
|
229
|
+
|
|
230
|
+
- **OpenClaw agents sleep between requests.** Apteva agents think between requests.
|
|
231
|
+
- **OpenClaw needs orchestration.** Apteva orchestrates itself.
|
|
232
|
+
- **OpenClaw bills per call.** Apteva self-paces to minimize cost — sleeps long when idle, thinks fast when busy.
|
|
233
|
+
- **OpenClaw agents forget.** Apteva agents remember, learn, and evolve their own directives.
|
|
234
|
+
|
|
235
|
+
The fundamental difference: OpenClaw agents are **functions you call**. Apteva agents are **processes that run**. One waits. The other works.
|
|
76
236
|
|
|
77
237
|
## License
|
|
78
238
|
|
|
79
|
-
[
|
|
239
|
+
[MIT](LICENSE)
|
|
80
240
|
|
|
81
|
-
|
|
241
|
+
---
|
|
82
242
|
|
|
83
|
-
|
|
84
|
-
|
|
243
|
+
<p align="center">
|
|
244
|
+
<strong>Artificial consciousness for machines that work.</strong><br>
|
|
245
|
+
<a href="https://apteva.ai">apteva.ai</a>
|
|
246
|
+
</p>
|
package/cli.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const { spawnSync } = require("child_process");
|
|
8
|
+
|
|
9
|
+
const ext = os.platform() === "win32" ? ".exe" : "";
|
|
10
|
+
const DIR = __dirname;
|
|
11
|
+
|
|
12
|
+
const aptevaBin = path.join(DIR, `apteva${ext}`);
|
|
13
|
+
const serverBin = path.join(DIR, `apteva-server${ext}`);
|
|
14
|
+
const coreBin = path.join(DIR, `apteva-core${ext}`);
|
|
15
|
+
|
|
16
|
+
if (!fs.existsSync(aptevaBin)) {
|
|
17
|
+
console.error("apteva: binary not found. Try reinstalling: npm install -g apteva");
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const result = spawnSync(aptevaBin, process.argv.slice(2), {
|
|
22
|
+
stdio: "inherit",
|
|
23
|
+
env: {
|
|
24
|
+
...process.env,
|
|
25
|
+
APTEVA_SERVER_BIN: serverBin,
|
|
26
|
+
APTEVA_CORE_BIN: coreBin,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (result.error) {
|
|
31
|
+
console.error(`apteva: ${result.error.message}`);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
process.exit(result.status || 0);
|
package/install.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const https = require("https");
|
|
8
|
+
const http = require("http");
|
|
9
|
+
const { execSync } = require("child_process");
|
|
10
|
+
|
|
11
|
+
const VERSION = require("./package.json").version;
|
|
12
|
+
const REPO = "apteva/apteva";
|
|
13
|
+
const DIR = __dirname;
|
|
14
|
+
|
|
15
|
+
const PLATFORM_MAP = { linux: "linux", darwin: "darwin", win32: "windows" };
|
|
16
|
+
const ARCH_MAP = { x64: "amd64", arm64: "arm64" };
|
|
17
|
+
|
|
18
|
+
function download(url) {
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
const follow = (url, redirects) => {
|
|
21
|
+
if (redirects > 5) return reject(new Error("Too many redirects"));
|
|
22
|
+
const mod = url.startsWith("https") ? https : http;
|
|
23
|
+
mod
|
|
24
|
+
.get(url, { headers: { "User-Agent": "apteva-npm" } }, (res) => {
|
|
25
|
+
if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
|
|
26
|
+
return follow(res.headers.location, redirects + 1);
|
|
27
|
+
}
|
|
28
|
+
if (res.statusCode !== 200) {
|
|
29
|
+
return reject(new Error(`HTTP ${res.statusCode} from ${url}`));
|
|
30
|
+
}
|
|
31
|
+
const chunks = [];
|
|
32
|
+
res.on("data", (c) => chunks.push(c));
|
|
33
|
+
res.on("end", () => resolve(Buffer.concat(chunks)));
|
|
34
|
+
res.on("error", reject);
|
|
35
|
+
})
|
|
36
|
+
.on("error", reject);
|
|
37
|
+
};
|
|
38
|
+
follow(url, 0);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function main() {
|
|
43
|
+
const platform = PLATFORM_MAP[os.platform()];
|
|
44
|
+
const arch = ARCH_MAP[os.arch()];
|
|
45
|
+
if (!platform || !arch) {
|
|
46
|
+
console.error(`apteva: unsupported platform ${os.platform()}-${os.arch()}`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const tarName = `apteva-${VERSION}-${platform}-${arch}.tar.gz`;
|
|
51
|
+
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${tarName}`;
|
|
52
|
+
|
|
53
|
+
console.log(`apteva: downloading ${platform}-${arch} binaries...`);
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
const buffer = await download(url);
|
|
57
|
+
const tmpFile = path.join(DIR, "_download.tar.gz");
|
|
58
|
+
fs.writeFileSync(tmpFile, buffer);
|
|
59
|
+
|
|
60
|
+
console.log(`apteva: extracting (${(buffer.length / 1024 / 1024).toFixed(1)} MB)...`);
|
|
61
|
+
execSync(`tar -xzf "${tmpFile}" -C "${DIR}"`, { stdio: "pipe" });
|
|
62
|
+
fs.unlinkSync(tmpFile);
|
|
63
|
+
|
|
64
|
+
// Make binaries executable
|
|
65
|
+
if (platform !== "windows") {
|
|
66
|
+
for (const name of ["apteva", "apteva-server", "apteva-core"]) {
|
|
67
|
+
const bin = path.join(DIR, name);
|
|
68
|
+
if (fs.existsSync(bin)) fs.chmodSync(bin, 0o755);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
console.log("apteva: installed successfully.");
|
|
73
|
+
} catch (err) {
|
|
74
|
+
console.error(`apteva: binary download failed: ${err.message}`);
|
|
75
|
+
console.error("");
|
|
76
|
+
console.error("Falling back to local Go build...");
|
|
77
|
+
|
|
78
|
+
// Fallback: build from source if Go is available
|
|
79
|
+
try {
|
|
80
|
+
execSync("go version", { stdio: "pipe" });
|
|
81
|
+
console.log("apteva: building from source...");
|
|
82
|
+
execSync("go build -o apteva .", { cwd: DIR, stdio: "inherit" });
|
|
83
|
+
console.log("apteva: built from source.");
|
|
84
|
+
} catch {
|
|
85
|
+
console.error("apteva: no pre-built binary and Go not installed.");
|
|
86
|
+
console.error(`Download manually: https://github.com/${REPO}/releases/tag/v${VERSION}`);
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,91 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apteva",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "AI agent platform with multi-thread orchestration, MCP integrations, and dashboard",
|
|
8
5
|
"bin": {
|
|
9
|
-
"apteva": "./
|
|
6
|
+
"apteva": "./cli.js"
|
|
10
7
|
},
|
|
11
8
|
"scripts": {
|
|
12
|
-
"
|
|
13
|
-
"build": "bun run build.ts",
|
|
14
|
-
"build:cli": "bun build ./src/cli.ts --outdir ./dist --target node",
|
|
15
|
-
"compile": "bun run build && bun run scripts/compile.ts",
|
|
16
|
-
"compile:single": "bun run build && bun run scripts/compile.ts --single",
|
|
17
|
-
"start": "bun run src/server.ts",
|
|
18
|
-
"tui": "bun run src/tui/index.tsx",
|
|
19
|
-
"postinstall": "node scripts/postinstall.mjs",
|
|
20
|
-
"prepublishOnly": "bun run build"
|
|
9
|
+
"postinstall": "node install.js"
|
|
21
10
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"scripts/postinstall.mjs",
|
|
25
|
-
"dist/*.js",
|
|
26
|
-
"dist/*.css",
|
|
27
|
-
"dist/*.html",
|
|
28
|
-
"dist/*.png",
|
|
29
|
-
"src",
|
|
30
|
-
"LICENSE",
|
|
31
|
-
"README.md"
|
|
32
|
-
],
|
|
33
|
-
"keywords": [
|
|
34
|
-
"apteva",
|
|
35
|
-
"ai",
|
|
36
|
-
"agents",
|
|
37
|
-
"llm",
|
|
38
|
-
"claude",
|
|
39
|
-
"anthropic",
|
|
40
|
-
"openai",
|
|
41
|
-
"gpt",
|
|
42
|
-
"gemini",
|
|
43
|
-
"llama",
|
|
44
|
-
"groq",
|
|
45
|
-
"local",
|
|
46
|
-
"cli"
|
|
47
|
-
],
|
|
48
|
-
"author": "Apteva <hello@apteva.com>",
|
|
49
|
-
"license": "Elastic-2.0",
|
|
11
|
+
"keywords": ["ai", "agent", "mcp", "orchestration", "llm"],
|
|
12
|
+
"license": "MIT",
|
|
50
13
|
"repository": {
|
|
51
14
|
"type": "git",
|
|
52
|
-
"url": "
|
|
53
|
-
},
|
|
54
|
-
"homepage": "https://github.com/apteva/apteva",
|
|
55
|
-
"bugs": {
|
|
56
|
-
"url": "https://github.com/apteva/apteva/issues"
|
|
15
|
+
"url": "https://github.com/apteva/apteva"
|
|
57
16
|
},
|
|
58
17
|
"engines": {
|
|
59
|
-
"node": ">=18
|
|
60
|
-
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@types/bun": "latest",
|
|
63
|
-
"@types/react": "^19.0.0",
|
|
64
|
-
"@types/react-dom": "^19.0.0",
|
|
65
|
-
"playwright": "^1.58.2",
|
|
66
|
-
"tailwindcss": "^3.4.0",
|
|
67
|
-
"typescript": "^5.0.0"
|
|
18
|
+
"node": ">=18"
|
|
68
19
|
},
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
"ink-spinner": "^5.0.0",
|
|
74
|
-
"ink-text-input": "^6.0.0",
|
|
75
|
-
"react": "19",
|
|
76
|
-
"react-dom": "19",
|
|
77
|
-
"recharts": "^3.7.0"
|
|
78
|
-
},
|
|
79
|
-
"optionalDependencies": {
|
|
80
|
-
"@apteva/agent-darwin-arm64": "^1.44.9",
|
|
81
|
-
"@apteva/agent-darwin-x64": "^1.44.9",
|
|
82
|
-
"@apteva/agent-linux-arm64": "^1.44.9",
|
|
83
|
-
"@apteva/agent-linux-x64": "^1.44.9",
|
|
84
|
-
"@apteva/agent-win32-x64": "^1.44.9",
|
|
85
|
-
"@apteva/apteva-darwin-arm64": "0.4.33",
|
|
86
|
-
"@apteva/apteva-darwin-x64": "0.4.33",
|
|
87
|
-
"@apteva/apteva-linux-arm64": "0.4.33",
|
|
88
|
-
"@apteva/apteva-linux-x64": "0.4.33",
|
|
89
|
-
"@apteva/apteva-win32-x64": "0.4.33"
|
|
90
|
-
}
|
|
20
|
+
"files": [
|
|
21
|
+
"cli.js",
|
|
22
|
+
"install.js"
|
|
23
|
+
]
|
|
91
24
|
}
|
package/LICENSE
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
Elastic License 2.0 (ELv2)
|
|
2
|
-
|
|
3
|
-
## Acceptance
|
|
4
|
-
|
|
5
|
-
By using the software, you agree to all of the terms and conditions below.
|
|
6
|
-
|
|
7
|
-
## Copyright License
|
|
8
|
-
|
|
9
|
-
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below.
|
|
10
|
-
|
|
11
|
-
## Limitations
|
|
12
|
-
|
|
13
|
-
You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
|
|
14
|
-
|
|
15
|
-
You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
|
|
16
|
-
|
|
17
|
-
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor's trademarks is subject to applicable law.
|
|
18
|
-
|
|
19
|
-
## Patents
|
|
20
|
-
|
|
21
|
-
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company 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.
|
|
22
|
-
|
|
23
|
-
## Notices
|
|
24
|
-
|
|
25
|
-
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
26
|
-
|
|
27
|
-
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
28
|
-
|
|
29
|
-
## No Other Rights
|
|
30
|
-
|
|
31
|
-
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
32
|
-
|
|
33
|
-
## Termination
|
|
34
|
-
|
|
35
|
-
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
36
|
-
|
|
37
|
-
## No Liability
|
|
38
|
-
|
|
39
|
-
*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.*
|
|
40
|
-
|
|
41
|
-
## Definitions
|
|
42
|
-
|
|
43
|
-
The **licensor** is the entity offering these terms, and the **software** is the software the licensor makes available under these terms, including any portion of it.
|
|
44
|
-
|
|
45
|
-
**you** refers to the individual or entity agreeing to these terms.
|
|
46
|
-
|
|
47
|
-
**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.
|
|
48
|
-
|
|
49
|
-
**your licenses** are all the licenses granted to you for the software under these terms.
|
|
50
|
-
|
|
51
|
-
**use** means anything you do with the software requiring one of your licenses.
|
|
52
|
-
|
|
53
|
-
**trademark** means trademarks, service marks, and similar rights.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
Copyright 2025 Apteva
|
|
58
|
-
|
|
59
|
-
Licensed under the Elastic License 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
|
60
|
-
|
|
61
|
-
https://www.elastic.co/licensing/elastic-license
|
|
62
|
-
|
|
63
|
-
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|