myaiforone 1.0.2 → 1.0.4
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 +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -5
- package/dist/config.js.map +1 -1
- package/docs/CLAUDE-AI-SETUP.md +50 -92
- package/docs/SharedAgentBuildPlan.md +75 -9
- package/docs/SuperAgentBuildPlan.md +93 -11
- package/package.json +1 -1
- package/src/config.ts +12 -6
package/README.md
CHANGED
|
@@ -108,6 +108,12 @@ npm start # Run directly
|
|
|
108
108
|
# Or install as auto-start service — see /setup
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
+
## Licensing
|
|
112
|
+
|
|
113
|
+
MyAIforOne requires a license key to activate agents. When you first open the web UI, a license activation popup will appear. Enter your key (`MA1-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`) to activate. You can also enter it later in Admin → Settings → License.
|
|
114
|
+
|
|
115
|
+
Without a license key, you can browse the web UI but agents won't execute.
|
|
116
|
+
|
|
111
117
|
## License
|
|
112
118
|
|
|
113
119
|
MIT
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,iBAAiB,GAAG,YAAY,GAAG,KAAK,CAAC;IACzE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,g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G,MAAM,CAKjE"}
|
package/dist/config.js
CHANGED
|
@@ -43,15 +43,23 @@ export function loadConfig(configPath) {
|
|
|
43
43
|
if (!agent.agentHome) {
|
|
44
44
|
agent.agentHome = resolve(resolveTilde(agent.memoryDir), "..");
|
|
45
45
|
}
|
|
46
|
-
// Validate MCP references
|
|
46
|
+
// Validate MCP references — warn and strip missing MCPs instead of crashing
|
|
47
47
|
if (agent.mcps && agent.mcps.length > 0) {
|
|
48
48
|
if (!config.mcps || Object.keys(config.mcps).length === 0) {
|
|
49
|
-
|
|
49
|
+
console.warn(`[config] Agent "${id}" references MCPs but no "mcps" registry is defined — stripping MCP list`);
|
|
50
|
+
agent.mcps = [];
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
else {
|
|
53
|
+
const valid = [];
|
|
54
|
+
for (const mcpName of agent.mcps) {
|
|
55
|
+
if (config.mcps[mcpName]) {
|
|
56
|
+
valid.push(mcpName);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
console.warn(`[config] Agent "${id}" references MCP "${mcpName}" which is not defined in config.mcps — skipping`);
|
|
60
|
+
}
|
|
54
61
|
}
|
|
62
|
+
agent.mcps = valid;
|
|
55
63
|
}
|
|
56
64
|
}
|
|
57
65
|
// Set defaults
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAyJ1C,MAAM,UAAU,UAAU,CAAC,UAAkB;IAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,C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,CAAC,cAAsB,CAAC,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC;IAC/F,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,mGAAmG;AACnG,IAAI,kBAAkB,GAAkB,IAAI,CAAC;AAC7C,sFAAsF;AACtF,IAAI,oBAAoB,GAAkB,IAAI,CAAC;AAE/C,kHAAkH;AAClH,MAAM,UAAU,oBAAoB,CAAC,MAAkB;IACrD,IAAI,kBAAkB;QAAE,OAAO,kBAAkB,CAAC;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;IACpE,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC,iBAAiB,IAAI,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAC5F,OAAO,OAAO,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;AAC9C,CAAC;AAED,sHAAsH;AACtH,MAAM,UAAU,sBAAsB,CAAC,MAAkB;IACvD,IAAI,oBAAoB;QAAE,OAAO,oBAAoB,CAAC;IACtD,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;IACpE,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC,mBAAmB,IAAI,OAAO,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAChG,OAAO,OAAO,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;AAChD,CAAC"}
|
package/docs/CLAUDE-AI-SETUP.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MyAIforOne — Setup Guide
|
|
2
2
|
|
|
3
3
|
This document is for Claude.ai to read. If a user shares this with you, walk them through it step by step.
|
|
4
4
|
|
|
@@ -6,161 +6,119 @@ This document is for Claude.ai to read. If a user shares this with you, walk the
|
|
|
6
6
|
|
|
7
7
|
## Instructions for Claude
|
|
8
8
|
|
|
9
|
-
The user wants to install
|
|
9
|
+
The user wants to install MyAIforOne. The installation is a single command (`npx myaiforone`) that handles everything automatically. Your job is to get them to that command and explain what it does.
|
|
10
10
|
|
|
11
11
|
### Start Here
|
|
12
12
|
|
|
13
13
|
Ask the user: **"Are you on Mac, Windows, or Linux?"**
|
|
14
14
|
|
|
15
|
-
Then show them
|
|
15
|
+
Then show them:
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
Here's
|
|
18
|
+
Here's the plan:
|
|
19
19
|
|
|
20
|
-
□ 1.
|
|
21
|
-
□ 2.
|
|
22
|
-
□ 3.
|
|
23
|
-
□ 4. Download MyAgent
|
|
24
|
-
□ 5. Hand off to the setup wizard
|
|
20
|
+
□ 1. Make sure Node.js is installed
|
|
21
|
+
□ 2. Run the installer
|
|
22
|
+
□ 3. Activate your license
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
Step 1 is a quick check. Step 2 does everything — installs Claude Code,
|
|
25
|
+
sets up the app, builds it, and opens it in your browser.
|
|
26
|
+
|
|
27
|
+
Let's start.
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
---
|
|
30
31
|
|
|
31
|
-
### Step 1:
|
|
32
|
+
### Step 1: Check Node.js
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
Ask them to paste this in their terminal:
|
|
34
35
|
|
|
35
|
-
**Mac:**
|
|
36
36
|
```
|
|
37
|
-
|
|
37
|
+
node --version
|
|
38
|
+
```
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
**If it shows v22 or higher** — skip to Step 2.
|
|
40
41
|
|
|
41
|
-
If
|
|
42
|
+
**If it's not installed or too old:**
|
|
42
43
|
|
|
44
|
+
**Mac:**
|
|
45
|
+
```
|
|
46
|
+
brew install node
|
|
47
|
+
```
|
|
48
|
+
If "brew not found":
|
|
49
|
+
```
|
|
43
50
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
44
51
|
```
|
|
52
|
+
Then retry `brew install node`.
|
|
45
53
|
|
|
46
54
|
**Windows:**
|
|
47
55
|
```
|
|
48
|
-
Open PowerShell (press Win+R, type "powershell", press Enter), then paste this:
|
|
49
|
-
|
|
50
56
|
winget install OpenJS.NodeJS.LTS
|
|
51
57
|
```
|
|
52
58
|
|
|
53
59
|
**Linux:**
|
|
54
60
|
```
|
|
55
|
-
Open your terminal, then paste this:
|
|
56
|
-
|
|
57
61
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs
|
|
58
62
|
```
|
|
59
63
|
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
node --version
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
If it shows v22 or higher, move on. If not, troubleshoot.
|
|
64
|
+
Confirm with `node --version` before moving on.
|
|
66
65
|
|
|
67
66
|
---
|
|
68
67
|
|
|
69
|
-
### Step 2:
|
|
68
|
+
### Step 2: Run the Installer
|
|
70
69
|
|
|
71
70
|
Tell the user:
|
|
72
71
|
|
|
73
72
|
```
|
|
74
73
|
Paste this into your terminal:
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
npx myaiforone
|
|
77
76
|
```
|
|
78
77
|
|
|
79
78
|
If they get a permissions error on Mac/Linux:
|
|
80
79
|
```
|
|
81
|
-
sudo
|
|
80
|
+
sudo npx myaiforone
|
|
82
81
|
```
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
claude --version
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
If it shows a version number, move on.
|
|
83
|
+
**That's it.** The installer handles everything:
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
1. Checks prerequisites (Node.js, Claude Code CLI)
|
|
86
|
+
2. Installs Claude Code if missing
|
|
87
|
+
3. Logs into Claude Code (opens browser for auth)
|
|
88
|
+
4. Downloads MyAIforOne from npm
|
|
89
|
+
5. Runs `npm install` for dependencies
|
|
90
|
+
6. Opens Claude Code in the project directory
|
|
91
|
+
7. Runs `/setup` which generates config, builds, and launches the web UI
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Tell the user:
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
Paste this:
|
|
99
|
-
|
|
100
|
-
claude auth login
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
A browser window will open. Sign in with your Anthropic account.
|
|
104
|
-
|
|
105
|
-
You need one of these:
|
|
106
|
-
- Claude Pro subscription ($20/mo)
|
|
107
|
-
- Claude Max subscription ($100/mo)
|
|
108
|
-
- Anthropic API key with credits
|
|
109
|
-
|
|
110
|
-
Then say: **"Now paste this and tell me what it says:"**
|
|
111
|
-
```
|
|
112
|
-
claude auth status
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
If it says "authenticated" or shows an account, move on.
|
|
93
|
+
The user just follows the prompts. When the browser opens with the MyAIforOne dashboard, they're done with installation.
|
|
116
94
|
|
|
117
95
|
---
|
|
118
96
|
|
|
119
|
-
### Step
|
|
97
|
+
### Step 3: Activate Your License
|
|
120
98
|
|
|
121
99
|
Tell the user:
|
|
122
100
|
|
|
123
101
|
```
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
git clone https://github.com/agenticledgerclient/myAIforOne.git
|
|
127
|
-
|
|
128
|
-
cd myAIforOne
|
|
129
|
-
|
|
130
|
-
npm install
|
|
131
|
-
```
|
|
102
|
+
You should see a license activation popup in the browser.
|
|
132
103
|
|
|
133
|
-
|
|
134
|
-
- **Mac:** `xcode-select --install` — then retry
|
|
135
|
-
- **Windows:** `winget install Git.Git` — close and reopen PowerShell, then retry
|
|
136
|
-
- **Linux:** `sudo apt-get install git` — then retry
|
|
104
|
+
Enter the license key you received. It looks like:
|
|
137
105
|
|
|
138
|
-
|
|
106
|
+
MA1-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
139
107
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
### Step 5: Hand Off
|
|
143
|
-
|
|
144
|
-
Tell the user:
|
|
108
|
+
Click "Activate" and you're all set.
|
|
145
109
|
|
|
110
|
+
If you don't have a key yet, you can enter it later at
|
|
111
|
+
Admin → Settings → License.
|
|
146
112
|
```
|
|
147
|
-
You're ready! Now paste this:
|
|
148
|
-
|
|
149
|
-
claude
|
|
150
|
-
|
|
151
|
-
Once Claude Code loads, type:
|
|
152
113
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
The setup wizard handles everything from here — config, build, and
|
|
156
|
-
launching the app in your browser.
|
|
157
|
-
```
|
|
114
|
+
If they don't have a key, they can still browse the web UI — agents won't execute until a valid key is entered.
|
|
158
115
|
|
|
159
116
|
---
|
|
160
117
|
|
|
161
118
|
### If Something Goes Wrong
|
|
162
119
|
|
|
163
|
-
-
|
|
164
|
-
- If
|
|
165
|
-
- If
|
|
166
|
-
-
|
|
120
|
+
- If `npx myaiforone` fails, ask them to paste the exact error.
|
|
121
|
+
- If Claude Code auth fails, have them run `claude auth login` manually.
|
|
122
|
+
- If the build fails, have them run `npm run build` in the project directory.
|
|
123
|
+
- If the web UI doesn't open, have them run `npm start` and go to `http://localhost:4888`.
|
|
124
|
+
- Keep it simple — fix one thing at a time, confirm before moving on.
|
|
@@ -3,6 +3,66 @@
|
|
|
3
3
|
> **Status:** Ready to Build
|
|
4
4
|
> **Architecture:** [SharedAgentArchitecture.md](SharedAgentArchitecture.md)
|
|
5
5
|
> **Date:** 2026-04-11
|
|
6
|
+
> **License Feature Flag:** `sharedAgents` (default: off)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Phase 0 — Feature Gating — License Integration
|
|
11
|
+
|
|
12
|
+
Shared agents are a licensed feature gated behind `sharedAgents: boolean` in the license. By default this is **off** — users must have a license with `sharedAgents: true` to use this feature. The code must be organized so that every entry point checks the flag before proceeding.
|
|
13
|
+
|
|
14
|
+
### 0.1 Service-level config flag
|
|
15
|
+
**File:** `src/config.ts`
|
|
16
|
+
|
|
17
|
+
- [ ] **0.1.1** Add `sharedAgentsEnabled?: boolean` to `ServiceConfig` — default `false`. This is the local kill switch. The platform checks BOTH this flag AND the license feature.
|
|
18
|
+
- [ ] **0.1.2** In `loadConfig()`, default `sharedAgentsEnabled` to `false`
|
|
19
|
+
|
|
20
|
+
### 0.2 Gate check utility
|
|
21
|
+
**File:** `src/license.ts`
|
|
22
|
+
|
|
23
|
+
The `isFeatureEnabled("sharedAgents")` function already exists. Use it at every gate point below. The pattern:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { isFeatureEnabled } from "./license.js";
|
|
27
|
+
|
|
28
|
+
function isSharedAgentsAllowed(config: AppConfig): boolean {
|
|
29
|
+
return (config.service as any).sharedAgentsEnabled !== false && isFeatureEnabled("sharedAgents");
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 0.3 Gate points (where to check)
|
|
34
|
+
|
|
35
|
+
Every place the shared agent feature is exposed must check the gate. If the gate is closed, the feature is invisible — not errored, just hidden/absent.
|
|
36
|
+
|
|
37
|
+
| Gate Point | File | Behavior When Off |
|
|
38
|
+
|------------|------|-------------------|
|
|
39
|
+
| **Agent creation API** | `src/web-ui.ts` (`POST /api/agents`) | Reject with 403 if `storage: "drive"` or `conversationLogMode: "per-user"` and feature is off |
|
|
40
|
+
| **Agent update API** | `src/web-ui.ts` (`PUT /api/agents/:id`) | Reject changes to `storage`/`conversationLogMode` if feature is off |
|
|
41
|
+
| **Org page UI** | `public/org.html` | Hide storage/drive config, conversation log mode selector |
|
|
42
|
+
| **Agent dashboard UI** | `public/agent-dashboard.html` | Hide storage info panel, per-user log viewer |
|
|
43
|
+
| **MCP tools** | `server/mcp-server/` | `get_storage_info`, `update_storage_config`, `get_conversation_senders` return error if feature is off |
|
|
44
|
+
| **Auth system** | `src/web-ui.ts` | Auth middleware only activates if `service.auth.enabled` AND `sharedAgentsEnabled` (auth is a shared-agent concern) |
|
|
45
|
+
|
|
46
|
+
### 0.4 Capabilities endpoint
|
|
47
|
+
**File:** `src/web-ui.ts`
|
|
48
|
+
|
|
49
|
+
- [ ] **0.4.1** Update `GET /api/capabilities` to include `sharedAgents: boolean` in the response. Frontend reads this to show/hide shared-agent UI elements.
|
|
50
|
+
|
|
51
|
+
### 0.5 Frontend feature detection
|
|
52
|
+
**Files:** All frontend pages that reference shared agent features
|
|
53
|
+
|
|
54
|
+
- [ ] **0.5.1** On page load, call `GET /api/capabilities` (same call as super agents — one endpoint, all flags)
|
|
55
|
+
- [ ] **0.5.2** Conditionally show/hide shared agent UI elements (storage config, conversation log mode, auth) based on `capabilities.sharedAgents`
|
|
56
|
+
|
|
57
|
+
### 0.6 Admin settings toggle
|
|
58
|
+
**File:** `public/admin.html` (Settings tab, Feature Modules section)
|
|
59
|
+
|
|
60
|
+
- [ ] **0.6.1** Add "Shared Agents" toggle to the Feature Modules section (same pattern as AI Gym / Super Agents toggles)
|
|
61
|
+
- [ ] **0.6.2** Toggle saves `sharedAgentsEnabled` via `PUT /api/config/service`
|
|
62
|
+
- [ ] **0.6.3** If the license doesn't have `sharedAgents: true`, show the toggle as disabled with a "Requires license" note
|
|
63
|
+
|
|
64
|
+
### Build order note
|
|
65
|
+
Phase 0 must be built **first** (before Phases 1-16). Every subsequent phase wraps its code in the gate check. This ensures the feature can be built, tested, and merged without being visible to users who don't have it licensed.
|
|
6
66
|
|
|
7
67
|
---
|
|
8
68
|
|
|
@@ -385,16 +445,17 @@ The conversation log is written at two locations (sync executor ~line 1394-1404,
|
|
|
385
445
|
The agent should execute phases in this order to avoid dependency issues:
|
|
386
446
|
|
|
387
447
|
```
|
|
448
|
+
0. Phase 0 — Feature Gating (gate check utility, capabilities endpoint, admin toggle). MUST BE FIRST.
|
|
388
449
|
1. Phase 1 — Config & Types (foundation — everything depends on this)
|
|
389
|
-
2. Phase 2 — Auth backend (middleware before other API changes)
|
|
390
|
-
3. Phase 3 — Per-user conversation logging (executor changes)
|
|
391
|
-
4. Phase 4 — Agent creation/update API changes
|
|
392
|
-
5. Phase 9 — MCP tools (depends on API being done)
|
|
393
|
-
6. Phase 7 — Web UI auth integration (depends on auth backend)
|
|
394
|
-
7. Phase 5 — Frontend creation modal (depends on API accepting new fields)
|
|
395
|
-
8. Phase 6 — Frontend dashboard updates
|
|
450
|
+
2. Phase 2 — Auth backend (middleware before other API changes — wrap in gate check)
|
|
451
|
+
3. Phase 3 — Per-user conversation logging (executor changes — wrap in gate check)
|
|
452
|
+
4. Phase 4 — Agent creation/update API changes (wrap in gate check)
|
|
453
|
+
5. Phase 9 — MCP tools (depends on API being done — wrap in gate check)
|
|
454
|
+
6. Phase 7 — Web UI auth integration (depends on auth backend — conditional on capabilities.sharedAgents)
|
|
455
|
+
7. Phase 5 — Frontend creation modal (depends on API accepting new fields — conditional on capabilities.sharedAgents)
|
|
456
|
+
8. Phase 6 — Frontend dashboard updates (conditional on capabilities.sharedAgents)
|
|
396
457
|
9. Phase 8 — Verify all API endpoints (integration check)
|
|
397
|
-
10. Phase 15 — Tests (validate everything)
|
|
458
|
+
10. Phase 15 — Tests (validate everything INCLUDING feature gate on/off behavior)
|
|
398
459
|
11. Phase 10 — API docs
|
|
399
460
|
12. Phase 11 — MCP docs
|
|
400
461
|
13. Phase 12 — User guide
|
|
@@ -404,9 +465,14 @@ The agent should execute phases in this order to avoid dependency issues:
|
|
|
404
465
|
```
|
|
405
466
|
|
|
406
467
|
### Critical path notes for the building agent:
|
|
468
|
+
- **Feature is OFF by default.** `sharedAgentsEnabled: false` in config, `sharedAgents: false` in license. Both must be true for the feature to be visible.
|
|
469
|
+
- **When the feature is off**, all shared agent UI elements are hidden (storage config, conversation log mode, auth), all shared-agent-specific API fields return 403, the auth system doesn't activate. The feature is invisible to unlicensed users.
|
|
470
|
+
- **When the feature is on**, everything works as described in Phases 1-16.
|
|
407
471
|
- **Do NOT modify existing personal agent behavior.** All changes must be backward-compatible. When `storage` is undefined, everything works exactly as before.
|
|
408
472
|
- **`conversationLogMode` defaults to `"shared"`** — which is identical to current behavior (single log file).
|
|
409
473
|
- **`auth.enabled` defaults to `false`** — personal gateways are unaffected.
|
|
410
|
-
- **
|
|
474
|
+
- **The capabilities endpoint** (`GET /api/capabilities`) is the single source of truth for the frontend. All feature visibility decisions flow from this endpoint.
|
|
475
|
+
- **Test both states** — every test file should have cases for feature-on and feature-off behavior.
|
|
476
|
+
- **Test after each phase** before moving to the next. Run `node "Comprehensive Test Suite/run-all-tests.js"` after Phases 0-4 and again after Phase 15.
|
|
411
477
|
- **Theme compliance:** All new UI elements must use CSS variables (`var(--bg-primary)`, `var(--text-primary)`, etc.) — never hardcode colors.
|
|
412
478
|
- **After all code changes:** Run `/opappbuild_agentready_trueup` and `/opappbuild_testsuite_trueup` per CLAUDE.md standing orders.
|
|
@@ -3,6 +3,80 @@
|
|
|
3
3
|
> **Status:** Ready to Build
|
|
4
4
|
> **Architecture:** [CrossAgentObserverArchitecture.md](CrossAgentObserverArchitecture.md)
|
|
5
5
|
> **Date:** 2026-04-11
|
|
6
|
+
> **License Feature Flag:** `superAgents` (default: off)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 0. Feature Gating — License Integration
|
|
11
|
+
|
|
12
|
+
Super agents are a licensed feature gated behind `superAgents: boolean` in the license. By default this is **off** — users must have a license with `superAgents: true` to use this feature. The code must be organized so that every entry point checks the flag before proceeding.
|
|
13
|
+
|
|
14
|
+
### 0.1 Service-level config flag
|
|
15
|
+
**File:** `src/config.ts`
|
|
16
|
+
|
|
17
|
+
- [ ] **0.1.1** Add `superAgentsEnabled?: boolean` to `ServiceConfig` — default `false`. This is the local kill switch. The platform checks BOTH this flag AND the license feature.
|
|
18
|
+
- [ ] **0.1.2** In `loadConfig()`, default `superAgentsEnabled` to `false`
|
|
19
|
+
|
|
20
|
+
### 0.2 Gate check utility
|
|
21
|
+
**File:** `src/license.ts`
|
|
22
|
+
|
|
23
|
+
The `isFeatureEnabled("superAgents")` function already exists. Use it at every gate point below. The pattern:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { isFeatureEnabled } from "./license.js";
|
|
27
|
+
|
|
28
|
+
function isSuperAgentsAllowed(config: AppConfig): boolean {
|
|
29
|
+
// Both the local config flag AND the license feature must be true
|
|
30
|
+
return (config.service as any).superAgentsEnabled !== false && isFeatureEnabled("superAgents");
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 0.3 Gate points (where to check)
|
|
35
|
+
|
|
36
|
+
Every place the super agent feature is exposed must check the gate. If the gate is closed, the feature is invisible — not errored, just hidden/absent.
|
|
37
|
+
|
|
38
|
+
| Gate Point | File | Behavior When Off |
|
|
39
|
+
|------------|------|-------------------|
|
|
40
|
+
| **Agent creation API** | `src/web-ui.ts` (`POST /api/agents`) | Reject with 403 if `agentClass: "super"` and feature is off |
|
|
41
|
+
| **Agent update API** | `src/web-ui.ts` (`PUT /api/agents/:id`) | Reject changes to `observes`/`observeScope` if feature is off |
|
|
42
|
+
| **Executor** | `src/executor.ts` | If agent has `agentClass: "super"` but feature is off, return "Super agents are not enabled on this platform" |
|
|
43
|
+
| **Org page UI** | `public/org.html` | Hide "Super Agent" option from class selector |
|
|
44
|
+
| **Agent dashboard UI** | `public/agent-dashboard.html` | Hide observer config / soul sections if feature is off |
|
|
45
|
+
| **MCP tools** | `server/mcp-server/` | `get_observed_agents`, `read_agent_file`, `search_across_agents`, etc. return error if feature is off |
|
|
46
|
+
| **API: observed-agents** | `src/web-ui.ts` (`GET /api/agents/:id/observed-agents`) | Return 403 if feature is off |
|
|
47
|
+
| **API: soul** | `src/web-ui.ts` (`GET/PUT /api/agents/:id/soul`) | Return 403 if feature is off |
|
|
48
|
+
|
|
49
|
+
### 0.4 Capabilities endpoint
|
|
50
|
+
**File:** `src/web-ui.ts`
|
|
51
|
+
|
|
52
|
+
- [ ] **0.4.1** Update `GET /api/capabilities` (or create if it doesn't exist) to include `superAgents: boolean` in the response. The frontend reads this to show/hide UI elements.
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
app.get("/api/capabilities", (_req, res) => {
|
|
56
|
+
res.json({
|
|
57
|
+
superAgents: isSuperAgentsAllowed(opts.config),
|
|
58
|
+
sharedAgents: isSharedAgentsAllowed(opts.config),
|
|
59
|
+
// ... other feature flags
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 0.5 Frontend feature detection
|
|
65
|
+
**Files:** All frontend pages that reference super agents
|
|
66
|
+
|
|
67
|
+
- [ ] **0.5.1** On page load, call `GET /api/capabilities`. Cache the result.
|
|
68
|
+
- [ ] **0.5.2** Conditionally show/hide super agent UI elements based on `capabilities.superAgents`
|
|
69
|
+
- [ ] **0.5.3** The class selector in org.html only shows "Super Agent" option if `capabilities.superAgents === true`
|
|
70
|
+
|
|
71
|
+
### 0.6 Admin settings toggle
|
|
72
|
+
**File:** `public/admin.html` (Settings tab, Feature Modules section)
|
|
73
|
+
|
|
74
|
+
- [ ] **0.6.1** Add "Super Agents" toggle to the Feature Modules section (same pattern as AI Gym toggle)
|
|
75
|
+
- [ ] **0.6.2** Toggle saves `superAgentsEnabled` via `PUT /api/config/service`
|
|
76
|
+
- [ ] **0.6.3** If the license doesn't have `superAgents: true`, show the toggle as disabled with a "Requires license" note
|
|
77
|
+
|
|
78
|
+
### Build order note
|
|
79
|
+
Phase 0 must be built **first** (before Sections 1-16). Every subsequent section wraps its code in the gate check. This ensures the feature can be built, tested, and merged without being visible to users who don't have it licensed.
|
|
6
80
|
|
|
7
81
|
---
|
|
8
82
|
|
|
@@ -161,14 +235,22 @@ New tools to add to the `myaiforone` MCP server:
|
|
|
161
235
|
|
|
162
236
|
## Build Order (Recommended)
|
|
163
237
|
|
|
164
|
-
1. **
|
|
165
|
-
2. **
|
|
166
|
-
3. **
|
|
167
|
-
4. **
|
|
168
|
-
5. **
|
|
169
|
-
6. **
|
|
170
|
-
7. **Frontend —
|
|
171
|
-
8. **Frontend —
|
|
172
|
-
9. **
|
|
173
|
-
10. **
|
|
174
|
-
11. **
|
|
238
|
+
1. **Feature gating** (Section 0) — gate check utility, capabilities endpoint, admin toggle. MUST BE FIRST.
|
|
239
|
+
2. **Config & types** (Section 1) — foundation everything else depends on
|
|
240
|
+
3. **Drive folder setup** (Section 3) — needed before executor can resolve paths
|
|
241
|
+
4. **Executor** (Section 2) — soul.md + observed-agents system prompt (wrap in gate check)
|
|
242
|
+
5. **API endpoints** (Sections 4, 8) — backend routes for create/update/read (wrap in gate check)
|
|
243
|
+
6. **MCP tools** (Section 9) — cross-agent query tools (wrap in gate check)
|
|
244
|
+
7. **Frontend — Org page** (Section 5) — creation UI (conditional on capabilities.superAgents)
|
|
245
|
+
8. **Frontend — Dashboard** (Section 6) — management UI (conditional on capabilities.superAgents)
|
|
246
|
+
9. **Frontend — Home** (Section 7) — verify chat works
|
|
247
|
+
10. **Tests** (Section 16) — validate everything INCLUDING feature gate on/off behavior
|
|
248
|
+
11. **Docs** (Sections 10–14) — API docs, MCP docs, user guide, agent CLAUDE.md updates
|
|
249
|
+
12. **MCP mapping** (Section 15) — verify MCP auto-attachment
|
|
250
|
+
|
|
251
|
+
### Critical path notes for the building agent:
|
|
252
|
+
- **Feature is OFF by default.** `superAgentsEnabled: false` in config, `superAgents: false` in license. Both must be true for the feature to be visible.
|
|
253
|
+
- **When the feature is off**, all super agent UI elements are hidden, all super agent API endpoints return 403, executor rejects super agent execution. The feature is invisible to unlicensed users.
|
|
254
|
+
- **When the feature is on**, everything works as described in Sections 1-16.
|
|
255
|
+
- **The capabilities endpoint** (`GET /api/capabilities`) is the single source of truth for the frontend. All feature visibility decisions flow from this endpoint.
|
|
256
|
+
- **Test both states** — every test file should have cases for feature-on and feature-off behavior.
|
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -197,15 +197,21 @@ export function loadConfig(configPath: string): AppConfig {
|
|
|
197
197
|
agent.agentHome = resolve(resolveTilde(agent.memoryDir), "..");
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
// Validate MCP references
|
|
200
|
+
// Validate MCP references — warn and strip missing MCPs instead of crashing
|
|
201
201
|
if (agent.mcps && agent.mcps.length > 0) {
|
|
202
202
|
if (!config.mcps || Object.keys(config.mcps).length === 0) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
203
|
+
console.warn(`[config] Agent "${id}" references MCPs but no "mcps" registry is defined — stripping MCP list`);
|
|
204
|
+
agent.mcps = [];
|
|
205
|
+
} else {
|
|
206
|
+
const valid: string[] = [];
|
|
207
|
+
for (const mcpName of agent.mcps) {
|
|
208
|
+
if (config.mcps[mcpName]) {
|
|
209
|
+
valid.push(mcpName);
|
|
210
|
+
} else {
|
|
211
|
+
console.warn(`[config] Agent "${id}" references MCP "${mcpName}" which is not defined in config.mcps — skipping`);
|
|
212
|
+
}
|
|
208
213
|
}
|
|
214
|
+
agent.mcps = valid;
|
|
209
215
|
}
|
|
210
216
|
}
|
|
211
217
|
|