myaiforone 1.1.36 → 1.1.37
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/bin/cli.js +19 -4
- package/docs/user-guide.md +15 -0
- package/package.json +1 -1
- package/public/api-docs.html +15 -0
- package/public/mcp-docs.html +5 -0
package/bin/cli.js
CHANGED
|
@@ -199,12 +199,27 @@ async function runClaudeAuth(version) {
|
|
|
199
199
|
console.log('');
|
|
200
200
|
console.log(' This will either:');
|
|
201
201
|
console.log(' A) Open a browser window automatically — just sign in and come back');
|
|
202
|
-
console.log(' B) Show a URL +
|
|
203
|
-
console.log(' 1. Copy the URL and open it in your browser');
|
|
204
|
-
console.log(' 2. Sign in and approve access');
|
|
205
|
-
console.log(' 3. Copy the short code shown and paste it back here');
|
|
202
|
+
console.log(' B) Show a URL + code — copy the URL, open it, sign in, paste the code back');
|
|
206
203
|
console.log('');
|
|
207
204
|
|
|
205
|
+
if (IS_WINDOWS) {
|
|
206
|
+
// On Windows, the code-paste prompt can get stuck. Give it 60 seconds —
|
|
207
|
+
// enough for the browser auto-open flow to complete. If stuck, times out
|
|
208
|
+
// and setup continues. User can run "claude auth login" later in a fresh terminal.
|
|
209
|
+
console.log(' (Windows: 60 second time limit — setup will continue automatically if not done)');
|
|
210
|
+
console.log('');
|
|
211
|
+
try {
|
|
212
|
+
execSync('claude auth login', { stdio: 'inherit', timeout: 60_000 });
|
|
213
|
+
stepDone(`Claude Code CLI ${version} (authenticated)`);
|
|
214
|
+
} catch {
|
|
215
|
+
console.log('');
|
|
216
|
+
console.log(' Authentication did not complete. You can run "claude auth login" in a new terminal later.');
|
|
217
|
+
console.log('');
|
|
218
|
+
stepDone('Claude Code CLI (skipped auth — run "claude auth login" later)');
|
|
219
|
+
}
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
|
|
208
223
|
let authenticated = false;
|
|
209
224
|
while (!authenticated) {
|
|
210
225
|
try {
|
package/docs/user-guide.md
CHANGED
|
@@ -1181,6 +1181,8 @@ One card per messaging channel (Telegram, Slack, iMessage, WhatsApp, Discord). E
|
|
|
1181
1181
|
| | **Body:** `{ agentId, chatId?, requireMention? }` | **Params:** `channelName`, `body` (object) |
|
|
1182
1182
|
| Remove agent route | `DELETE /api/channels/:channelName/agents/:agentId` | `remove_agent_route` |
|
|
1183
1183
|
| | | **Params:** `channelName`, `agentId` |
|
|
1184
|
+
| Set channel credentials | `POST /api/channels/:channelName/credentials` | `set_channel_credentials` |
|
|
1185
|
+
| | **Body:** `{ token?, apiKey?, ... }` | **Params:** `channelName`, credential fields |
|
|
1184
1186
|
| Get sticky routing | `GET /api/sticky-routing` | `get_sticky_routing` |
|
|
1185
1187
|
| | | *(no params)* |
|
|
1186
1188
|
|
|
@@ -1893,6 +1895,16 @@ Guides have two forms: human-readable (browsable in gym) and agent-executable (a
|
|
|
1893
1895
|
| | Returns array of programs with source=coach | *(no params)* |
|
|
1894
1896
|
| Create coach guide | `POST /api/gym/guides` | `create_gym_guide` |
|
|
1895
1897
|
| | **Body:** `{ title, description?, difficulty?, dimensions?, estimatedTime?, modules?, content? }` | **Params:** `title`, `description?`, `difficulty?`, `dimensions?`, `estimatedTime?`, `modules?`, `content?` |
|
|
1898
|
+
| Get AI insights | `GET /api/gym/insights` | `get_gym_insights` |
|
|
1899
|
+
| | Returns pre-computed AI insights generated by the weekly-insight goal | *(no params)* |
|
|
1900
|
+
| Save AI insights | `POST /api/gym/insights` | `save_gym_insights` |
|
|
1901
|
+
| | **Body:** `{ insights, topRecommendation?, summary? }` | **Params:** `insights` (array), `topRecommendation?`, `summary?` |
|
|
1902
|
+
| Dismiss an insight | `POST /api/gym/insights/:id/dismiss` | — |
|
|
1903
|
+
| | | **Params:** `id` (insight ID) |
|
|
1904
|
+
| Reset dismissed insights | `POST /api/gym/insights/reset-dismissed` | — |
|
|
1905
|
+
| | Restores all dismissed insights to visible | *(no params)* |
|
|
1906
|
+
| Generate insights on-demand | `POST /api/gym/insights/generate` | — |
|
|
1907
|
+
| | Triggers AI analysis and produces fresh insights immediately | *(no params)* |
|
|
1896
1908
|
|
|
1897
1909
|
---
|
|
1898
1910
|
|
|
@@ -2065,6 +2077,7 @@ Quick reference — all MCP tools alphabetically:
|
|
|
2065
2077
|
| -- | `snapshot_dimensions` | AI Gym |
|
|
2066
2078
|
| 84 | `send_webhook` | Webhook |
|
|
2067
2079
|
| 85 | `set_model` | Model |
|
|
2080
|
+
| -- | `set_channel_credentials` | Channels |
|
|
2068
2081
|
| 86 | `set_platform_default` | Marketplace |
|
|
2069
2082
|
| 87 | `set_prompt_trigger` | Marketplace |
|
|
2070
2083
|
| 88 | `start_account_login` | Accounts |
|
|
@@ -2095,3 +2108,5 @@ Quick reference — all MCP tools alphabetically:
|
|
|
2095
2108
|
| 105 | `update_task` | Tasks |
|
|
2096
2109
|
| 106 | `upload_file` | Files |
|
|
2097
2110
|
| 107 | `whoami` | Accounts |
|
|
2111
|
+
| -- | `get_gym_insights` | AI Gym |
|
|
2112
|
+
| -- | `save_gym_insights` | AI Gym |
|
package/package.json
CHANGED
package/public/api-docs.html
CHANGED
|
@@ -334,6 +334,7 @@ const CATALOG = [
|
|
|
334
334
|
{ cat: "Channels", method: "DELETE", path: "/api/channels/:channelName/agents/:agentId", summary: "Remove agent route from channel", params: [{ name: "channelName", in: "path", type: "string", required: true }, { name: "agentId", in: "path", type: "string", required: true }] },
|
|
335
335
|
{ cat: "Channels", method: "POST", path: "/api/channels/:channelName/monitored", summary: "Add monitored chat to channel", params: [{ name: "channelName", in: "path", type: "string", required: true }], body: { chatId: { type: "string", required: true } } },
|
|
336
336
|
{ cat: "Channels", method: "DELETE", path: "/api/channels/:channelName/monitored", summary: "Remove monitored chat", params: [{ name: "channelName", in: "path", type: "string", required: true }], body: { chatId: { type: "string", required: true } } },
|
|
337
|
+
{ cat: "Channels", method: "POST", path: "/api/channels/:channelName/credentials", summary: "Set channel authentication credentials (tokens, keys). Auto-enables the channel.", params: [{ name: "channelName", in: "path", type: "string", required: true }], body: { token: { type: "string", desc: "Bot token (Telegram, Slack, Discord)" }, apiKey: { type: "string", desc: "API key if applicable" } } },
|
|
337
338
|
{ cat: "Channels", method: "GET", path: "/api/sticky-routing", summary: "Get sticky routing config for all channels" },
|
|
338
339
|
|
|
339
340
|
// -- Marketplace / Registry --
|
|
@@ -428,6 +429,10 @@ const CATALOG = [
|
|
|
428
429
|
{ cat: "AI Gym", method: "POST", path: "/api/gym/guides", summary: "Create a coach-generated guide from a training session", body: { title: { type: "string", required: true }, description: { type: "string" }, difficulty: { type: "string" }, dimensions: { type: "array" }, estimatedTime: { type: "string" }, modules: { type: "array" }, content: { type: "string" } } },
|
|
429
430
|
{ cat: "AI Gym", method: "GET", path: "/api/gym/insights", summary: "Get pre-computed AI insights (generated weekly by the gym goal). Used by 'You tell me' mode." },
|
|
430
431
|
{ cat: "AI Gym", method: "POST", path: "/api/gym/insights", summary: "Save AI-generated insights from weekly analysis", body: { insights: { type: "array", required: true, desc: "Array of { title, description, dimension?, agentId? }" }, topRecommendation: { type: "string", desc: "Single best recommendation" }, summary: { type: "string", desc: "Brief summary of observations" } } },
|
|
432
|
+
{ cat: "AI Gym", method: "POST", path: "/api/gym/insights/:id/dismiss", summary: "Dismiss a specific AI insight by ID", params: [{ name: "id", in: "path", type: "string", required: true }] },
|
|
433
|
+
{ cat: "AI Gym", method: "POST", path: "/api/gym/insights/reset-dismissed", summary: "Reset all dismissed insights (make them visible again)" },
|
|
434
|
+
{ cat: "AI Gym", method: "POST", path: "/api/gym/insights/generate", summary: "Trigger on-demand AI insights generation (analyzes agent activity and produces insights)" },
|
|
435
|
+
{ cat: "AI Gym", method: "POST", path: "/api/gym/cards/:id/dismiss", summary: "Dismiss a gym card by ID (alias for DELETE /api/gym/cards/:id)", params: [{ name: "id", in: "path", type: "string", required: true }] },
|
|
431
436
|
|
|
432
437
|
// -- Session Tabs --
|
|
433
438
|
{ cat: "Sessions", method: "GET", path: "/api/agents/:agentId/session-tabs", summary: "List all named session tabs (includes closed, with last message preview)", params: [{ name: "agentId", in: "path", type: "string", required: true }] },
|
|
@@ -456,6 +461,11 @@ const CATALOG = [
|
|
|
456
461
|
// -- Config (continued) --
|
|
457
462
|
{ cat: "Config", method: "POST", path: "/api/config/provider-test", summary: "Test an API key for a cloud provider", body: { provider: { type: "string", required: true, desc: "openai | grok | gemini | groq | together | mistral" } } },
|
|
458
463
|
{ cat: "Config", method: "POST", path: "/api/restart", summary: "Restart the MyAgent gateway service" },
|
|
464
|
+
{ cat: "Config", method: "POST", path: "/api/shutdown", summary: "Shut down the MyAgent gateway service" },
|
|
465
|
+
{ cat: "Config", method: "GET", path: "/api/version", summary: "Get current platform version and check if an update is available", response: "{ version, latestVersion, updateAvailable }" },
|
|
466
|
+
{ cat: "Config", method: "POST", path: "/api/update", summary: "Pull and apply the latest platform update (runs git pull + npm install + rebuild)" },
|
|
467
|
+
{ cat: "Config", method: "GET", path: "/api/license", summary: "Get current license status (key, org, expiry, valid flag)", response: "{ valid, key, org, expiry }" },
|
|
468
|
+
{ cat: "Config", method: "POST", path: "/api/license/check", summary: "Verify a license key against the licensing server", body: { licenseKey: { type: "string", required: true, desc: "License key in format MA1-xxxxxxxx-..." } } },
|
|
459
469
|
|
|
460
470
|
// -- Utility --
|
|
461
471
|
{ cat: "Utility", method: "POST", path: "/api/open-folder", summary: "Open a folder in Finder (macOS), Explorer (Windows), or xdg-open (Linux)", body: { path: { type: "string", required: true, desc: "Absolute or ~ path to open" } } },
|
|
@@ -543,6 +553,7 @@ const TOOLS = [
|
|
|
543
553
|
// Channels
|
|
544
554
|
{cat:"Channels",name:"list_channels",desc:"List all messaging channels with config and routes",params:[]},
|
|
545
555
|
{cat:"Channels",name:"update_channel",desc:"Update channel settings (sticky routing, enabled)",params:[{n:"channelName",t:"string",r:true},{n:"enabled",t:"boolean",r:false},{n:"stickyRouting",t:"enum",r:false,d:"none | sticky | prefix"},{n:"stickyPrefix",t:"string",r:false},{n:"stickyTimeoutMs",t:"number",r:false}]},
|
|
556
|
+
{cat:"Channels",name:"set_channel_credentials",desc:"Set channel authentication credentials (tokens, keys). Auto-enables the channel. After calling, tell the user to go to Admin → Settings and click Restart.",params:[{n:"channelName",t:"string",r:true,d:"Channel name (telegram, slack, discord, whatsapp, imessage)"},{n:"token",t:"string",r:false,d:"Bot token (Telegram, Slack, Discord)"},{n:"apiKey",t:"string",r:false,d:"API key if applicable"}]},
|
|
546
557
|
{cat:"Channels",name:"add_agent_route",desc:"Add an agent route to a channel",params:[{n:"channelName",t:"string",r:true},{n:"agentId",t:"string",r:true},{n:"chatId",t:"string",r:true},{n:"requireMention",t:"boolean",r:false},{n:"allowFrom",t:"string[]",r:false}]},
|
|
547
558
|
{cat:"Channels",name:"remove_agent_route",desc:"Remove an agent's route from a channel",params:[{n:"channelName",t:"string",r:true},{n:"agentId",t:"string",r:true}]},
|
|
548
559
|
{cat:"Channels",name:"add_monitored_chat",desc:"Add a monitored chat ID",params:[{n:"channelName",t:"string",r:true},{n:"chatId",t:"string",r:true}]},
|
|
@@ -706,6 +717,10 @@ const TOOLS = [
|
|
|
706
717
|
// AI Gym — Digest
|
|
707
718
|
{cat:"AI Gym",name:"run_gym_digest",desc:"Manually trigger the activity digest (analyzes all activity, scores dimensions, generates cards)",params:[]},
|
|
708
719
|
|
|
720
|
+
// AI Gym — Insights
|
|
721
|
+
{cat:"AI Gym",name:"get_gym_insights",desc:"Get pre-computed AI insights (generated weekly by the gym goal). Used by 'You tell me' mode.",params:[]},
|
|
722
|
+
{cat:"AI Gym",name:"save_gym_insights",desc:"Save AI-generated insights from weekly analysis. Called by the weekly-insight goal after analyzing activity.",params:[{n:"insights",t:"array",r:true,d:"Array of { title, description, dimension?, agentId? }"},{n:"topRecommendation",t:"string",r:false,d:"Single best recommendation"},{n:"summary",t:"string",r:false,d:"Brief summary of observations"}]},
|
|
723
|
+
|
|
709
724
|
// Computer Use (aiforone_computeruse MCP)
|
|
710
725
|
{cat:"Computer",name:"computer_screenshot",desc:"Capture the screen and return a base64 PNG image the agent can see inline. Use this to orient before clicking.",params:[]},
|
|
711
726
|
{cat:"Computer",name:"computer_get_info",desc:"Get screen width, height, and platform. Call before clicking to understand coordinate space.",params:[]},
|
package/public/mcp-docs.html
CHANGED
|
@@ -194,6 +194,7 @@ const TOOLS = [
|
|
|
194
194
|
// Channels
|
|
195
195
|
{cat:"Channels",name:"list_channels",desc:"List all messaging channels with config and routes",params:[]},
|
|
196
196
|
{cat:"Channels",name:"update_channel",desc:"Update channel settings (sticky routing, enabled)",params:[{n:"channelName",t:"string",r:true},{n:"enabled",t:"boolean",r:false},{n:"stickyRouting",t:"enum",r:false,d:"none | sticky | prefix"},{n:"stickyPrefix",t:"string",r:false},{n:"stickyTimeoutMs",t:"number",r:false}]},
|
|
197
|
+
{cat:"Channels",name:"set_channel_credentials",desc:"Set channel authentication credentials (tokens, keys). Auto-enables the channel. After calling, tell the user to go to Admin → Settings and click Restart.",params:[{n:"channelName",t:"string",r:true,d:"Channel name (telegram, slack, discord, whatsapp, imessage)"},{n:"token",t:"string",r:false,d:"Bot token (Telegram, Slack, Discord)"},{n:"apiKey",t:"string",r:false,d:"API key if applicable"}]},
|
|
197
198
|
{cat:"Channels",name:"add_agent_route",desc:"Add an agent route to a channel",params:[{n:"channelName",t:"string",r:true},{n:"agentId",t:"string",r:true},{n:"chatId",t:"string",r:true},{n:"requireMention",t:"boolean",r:false},{n:"allowFrom",t:"string[]",r:false}]},
|
|
198
199
|
{cat:"Channels",name:"remove_agent_route",desc:"Remove an agent's route from a channel",params:[{n:"channelName",t:"string",r:true},{n:"agentId",t:"string",r:true}]},
|
|
199
200
|
{cat:"Channels",name:"add_monitored_chat",desc:"Add a monitored chat ID",params:[{n:"channelName",t:"string",r:true},{n:"chatId",t:"string",r:true}]},
|
|
@@ -327,6 +328,10 @@ const TOOLS = [
|
|
|
327
328
|
// AI Gym — Digest
|
|
328
329
|
{cat:"AI Gym",name:"run_gym_digest",desc:"Manually trigger the activity digest (analyzes all activity, scores dimensions, generates cards)",params:[]},
|
|
329
330
|
|
|
331
|
+
// AI Gym — Insights
|
|
332
|
+
{cat:"AI Gym",name:"get_gym_insights",desc:"Get pre-computed AI insights (generated weekly by the gym goal). Used by 'You tell me' mode.",params:[]},
|
|
333
|
+
{cat:"AI Gym",name:"save_gym_insights",desc:"Save AI-generated insights from weekly analysis. Called by the weekly-insight goal after analyzing activity.",params:[{n:"insights",t:"array",r:true,d:"Array of { title, description, dimension?, agentId? }"},{n:"topRecommendation",t:"string",r:false,d:"Single best recommendation"},{n:"summary",t:"string",r:false,d:"Brief summary of observations"}]},
|
|
334
|
+
|
|
330
335
|
// AI Gym — Feed & Config
|
|
331
336
|
{cat:"AI Gym",name:"get_gym_feed",desc:"Get the aggregated gym feed — tips/nudges from gym cards, platform updates from changelog, and AI briefing",params:[]},
|
|
332
337
|
{cat:"AI Gym",name:"get_gym_config",desc:"Get public gym configuration flags (gymEnabled, gymOnlyMode, aibriefingEnabled)",params:[]},
|