@agentled/cli 0.6.6 → 0.7.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/README.md +25 -0
- package/dist/commands/agents.js +7 -2
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/executions.js +67 -0
- package/dist/commands/executions.js.map +1 -1
- package/dist/commands/onboarding.d.ts +18 -4
- package/dist/commands/onboarding.js +233 -49
- package/dist/commands/onboarding.js.map +1 -1
- package/dist/utils/agentled-home-content.d.ts +30 -0
- package/dist/utils/agentled-home-content.js +414 -0
- package/dist/utils/agentled-home-content.js.map +1 -0
- package/dist/utils/home-bootstrap.d.ts +44 -0
- package/dist/utils/home-bootstrap.js +133 -0
- package/dist/utils/home-bootstrap.js.map +1 -0
- package/dist/utils/knowledge-probe.d.ts +23 -0
- package/dist/utils/knowledge-probe.js +57 -0
- package/dist/utils/knowledge-probe.js.map +1 -0
- package/dist/utils/mcp-config.d.ts +27 -0
- package/dist/utils/mcp-config.js +190 -0
- package/dist/utils/mcp-config.js.map +1 -0
- package/dist/utils/skills.d.ts +16 -8
- package/dist/utils/skills.js +14 -28
- package/dist/utils/skills.js.map +1 -1
- package/dist/utils/version-check.d.ts +24 -0
- package/dist/utils/version-check.js +77 -0
- package/dist/utils/version-check.js.map +1 -0
- package/llms-full.txt +13 -0
- package/llms.txt +12 -1
- package/package.json +3 -3
- package/skills/agentled/SKILL.md +17 -2
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort "new version available" check against the npm registry.
|
|
3
|
+
*
|
|
4
|
+
* Compares the locally-installed @agentled/cli version (from package.json)
|
|
5
|
+
* against the latest published on npm and prints a one-line warning if the
|
|
6
|
+
* user is behind. Never blocks setup on failure — a flaky network or
|
|
7
|
+
* registry should not prevent first-time onboarding.
|
|
8
|
+
*/
|
|
9
|
+
import { readFileSync } from 'node:fs';
|
|
10
|
+
import { dirname, resolve } from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
const REGISTRY_URL = 'https://registry.npmjs.org/@agentled/cli/latest';
|
|
13
|
+
const TIMEOUT_MS = 3000;
|
|
14
|
+
/**
|
|
15
|
+
* Read the version field from this package's own package.json. Returns
|
|
16
|
+
* '0.0.0-dev' as a fallback so a missing/unreadable file doesn't crash setup.
|
|
17
|
+
*/
|
|
18
|
+
export function getInstalledCliVersion() {
|
|
19
|
+
try {
|
|
20
|
+
const here = fileURLToPath(import.meta.url);
|
|
21
|
+
// dist/utils/version-check.js → package root is two levels up
|
|
22
|
+
const pkgRoot = resolve(dirname(here), '..', '..');
|
|
23
|
+
const pkg = JSON.parse(readFileSync(resolve(pkgRoot, 'package.json'), 'utf-8'));
|
|
24
|
+
return typeof pkg.version === 'string' ? pkg.version : '0.0.0-dev';
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return '0.0.0-dev';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Compare two semver-ish strings: -1, 0, 1. Prerelease suffixes are ignored. */
|
|
31
|
+
function compareVersions(a, b) {
|
|
32
|
+
const parse = (v) => v.replace(/^v/, '').split('-')[0].split('.').map(n => parseInt(n, 10) || 0);
|
|
33
|
+
const [a1, a2 = 0, a3 = 0] = parse(a);
|
|
34
|
+
const [b1, b2 = 0, b3 = 0] = parse(b);
|
|
35
|
+
if (a1 !== b1)
|
|
36
|
+
return a1 < b1 ? -1 : 1;
|
|
37
|
+
if (a2 !== b2)
|
|
38
|
+
return a2 < b2 ? -1 : 1;
|
|
39
|
+
if (a3 !== b3)
|
|
40
|
+
return a3 < b3 ? -1 : 1;
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
export async function checkCliVersion() {
|
|
44
|
+
const installed = getInstalledCliVersion();
|
|
45
|
+
const ac = new AbortController();
|
|
46
|
+
const timer = setTimeout(() => ac.abort(), TIMEOUT_MS);
|
|
47
|
+
try {
|
|
48
|
+
const res = await fetch(REGISTRY_URL, { signal: ac.signal });
|
|
49
|
+
if (!res.ok) {
|
|
50
|
+
return { installed, latest: null, outdated: false, error: `HTTP ${res.status}` };
|
|
51
|
+
}
|
|
52
|
+
const data = (await res.json());
|
|
53
|
+
const latest = typeof data.version === 'string' ? data.version : null;
|
|
54
|
+
if (!latest) {
|
|
55
|
+
return { installed, latest: null, outdated: false, error: 'No version field in registry response' };
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
installed,
|
|
59
|
+
latest,
|
|
60
|
+
outdated: compareVersions(installed, latest) < 0,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
return { installed, latest: null, outdated: false, error: err?.message ?? String(err) };
|
|
65
|
+
}
|
|
66
|
+
finally {
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** One-line summary suitable for the setup banner. Returns null if there is nothing to say. */
|
|
71
|
+
export function summarizeVersionCheck(r) {
|
|
72
|
+
if (r.outdated && r.latest) {
|
|
73
|
+
return `New @agentled/cli version available: v${r.installed} → v${r.latest}. Update with: npm install -g @agentled/cli@latest`;
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=version-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-check.js","sourceRoot":"","sources":["../../src/utils/version-check.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,YAAY,GAAG,iDAAiD,CAAC;AACvE,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB;;;GAGG;AACH,MAAM,UAAU,sBAAsB;IAClC,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,aAAa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;IACN,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAChB,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5F,CAAC;YAAS,CAAC;QACP,YAAY,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;AACL,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,qBAAqB,CAAC,CAAqB;IACvD,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;QACzB,OAAO,yCAAyC,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,MAAM,oDAAoD,CAAC;IACnI,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
package/llms-full.txt
CHANGED
|
@@ -117,6 +117,18 @@ agentled executions stop <workflow-id> <execution-id>
|
|
|
117
117
|
# Pause / Resume an execution
|
|
118
118
|
agentled executions pause <workflow-id> <execution-id>
|
|
119
119
|
agentled executions resume <workflow-id> <execution-id>
|
|
120
|
+
|
|
121
|
+
# Admin-only surgical patch commands (require API key with admin:patch scope)
|
|
122
|
+
agentled executions patch-timeline-fields <workflow-id> <execution-id> <timeline-id> \
|
|
123
|
+
--reason "Fix malformed pending email subject" \
|
|
124
|
+
--expected-updated-at "2026-05-05T10:00:00.000Z" \
|
|
125
|
+
--patches '[{"op":"replace","path":"eventContent.email.subject","value":"Updated subject"}]' \
|
|
126
|
+
--dry-run
|
|
127
|
+
|
|
128
|
+
agentled executions patch-execution-fields <workflow-id> <execution-id> \
|
|
129
|
+
--reason "Clarify execution name during incident review" \
|
|
130
|
+
--expected-updated-at "2026-05-05T10:00:00.000Z" \
|
|
131
|
+
--patches '[{"op":"replace","path":"metadata.executionName","value":"Recovered test run"}]'
|
|
120
132
|
```
|
|
121
133
|
|
|
122
134
|
### Apps & Actions
|
|
@@ -444,6 +456,7 @@ External API endpoints for programmatic approve/reject are planned.
|
|
|
444
456
|
In the meantime, agents can:
|
|
445
457
|
- Check execution status: `agentled executions get <wf-id> <exec-id>` — look for `status: "pending"` timelines
|
|
446
458
|
- Pause/resume: `agentled executions pause/resume <wf-id> <exec-id>`
|
|
459
|
+
- For exceptional admin recovery only, use `agentled executions patch-timeline-fields` or `agentled executions patch-execution-fields` with an `admin:patch` API key, a fresh `updatedAt` value, and either `--patches` or `--patches-file`.
|
|
447
460
|
|
|
448
461
|
---
|
|
449
462
|
|
package/llms.txt
CHANGED
|
@@ -4,9 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
|
+
One command: browser sign-in → workspace folder → MCP auto-config → skill install → knowledge probe.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @agentled/cli setup
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Global home is `~/.agentled/` (config + on-demand examples). Per-workspace artifacts live in `agentled_<slug>/` in the current directory. Best-practice patterns: https://github.com/Agentled/agentic-ops.
|
|
14
|
+
|
|
15
|
+
## Components (à-la-carte)
|
|
16
|
+
|
|
7
17
|
```bash
|
|
8
18
|
npm i -g @agentled/cli
|
|
9
|
-
agentled auth login
|
|
19
|
+
agentled auth login # browser auth + workspace selection + skill install
|
|
20
|
+
agentled init # scaffold agentled_<slug>/
|
|
10
21
|
agentled auth current
|
|
11
22
|
agentled workflows list
|
|
12
23
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentled/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "CLI for Agentled — manage workflows, apps, and knowledge from the command line. Zero context-window cost for AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"homepage": "https://www.agentled.app",
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
|
50
|
-
"url": "https://github.com/agentled/
|
|
50
|
+
"url": "https://github.com/agentled/mcp-server"
|
|
51
51
|
},
|
|
52
52
|
"bugs": {
|
|
53
|
-
"url": "https://
|
|
53
|
+
"url": "https://www.agentled.ai/en/contact-us"
|
|
54
54
|
},
|
|
55
55
|
"license": "MIT"
|
|
56
56
|
}
|
package/skills/agentled/SKILL.md
CHANGED
|
@@ -54,7 +54,7 @@ Every pipeline step **must** set `type` to one of these values. Any other value
|
|
|
54
54
|
| `aiAction` | LLM prompt → structured JSON output | `{ id, type: "aiAction", name, pipelineStepPrompt: { template, responseStructure }, creditCost, next: { stepId } }` |
|
|
55
55
|
| `aiActionWithTools` | LLM agent that can invoke runtime tools (web_search, workspace_memory, app actions) | `{ id, type: "aiActionWithTools", name, tools: [{ builtinType }], pipelineStepPrompt: {…}, next: { stepId } }` |
|
|
56
56
|
| `toolAction` | Direct tool/webhook invocation (no LLM) | `{ id, type: "toolAction", name, tool: {…}, next: { stepId } }` |
|
|
57
|
-
| `code` | Run JS/Python in a sandbox | `{ id, type: "code", name, codeConfig: { language: "javascript", code: "…" }, next: { stepId } }` |
|
|
57
|
+
| `code` | Run JS/Python in a sandbox | `{ id, type: "code", name, codeConfig: { language: "javascript", code: "…", responseStructure?: { field: "type" } }, next: { stepId } }` |
|
|
58
58
|
| `setVariables` | Deterministic expression → named output mapping (branch convergence, no LLM/credits) | `{ id, type: "setVariables", name, setVariablesConfig: { variables: [{ name, expression }] }, next: { stepId } }` |
|
|
59
59
|
| `knowledgeSync` | Deterministic KG field mapping & link writing | `{ id, type: "knowledgeSync", name, knowledgeSync: { source, listKey, fieldMapping }, next: { stepId } }` |
|
|
60
60
|
| `return` | Terminal step for **child** workflows — returns data to the caller | `{ id, type: "return", name, returnConfig: { fields: [{ name, stepId, field }] } }` |
|
|
@@ -114,6 +114,21 @@ agentled best-practices # summary + link to agentic-
|
|
|
114
114
|
|
|
115
115
|
Full patterns are maintained publicly at https://github.com/agentled/agentic-ops — the CLI ships a mirrored copy, see `agentled examples`. Scaffolds are preflight-clean pipeline JSON skeletons; start from one instead of writing from scratch.
|
|
116
116
|
|
|
117
|
+
## Business metrics vs ROI (must not be conflated)
|
|
118
|
+
|
|
119
|
+
Treat these as **two separate surfaces**:
|
|
120
|
+
|
|
121
|
+
- **Business metrics (`pipeline.analyticsConfig`)** = customer/workflow outcome stats extracted from step outputs (volume, conversions, approvals, rates, SLA-ish KPIs), aggregated into dashboard business-metric snapshots.
|
|
122
|
+
- **ROI (`pipeline.metadata.roi`)** = economic assumptions + rollups (minutes saved per unit, hourly rate, benchmark units/week, measured vs benchmark mode) used for ROI/time-saved reporting.
|
|
123
|
+
|
|
124
|
+
### Required wording for agent outputs
|
|
125
|
+
|
|
126
|
+
- If only `analyticsConfig` changes: say **"business metrics configured"**.
|
|
127
|
+
- If only `metadata.roi` changes: say **"ROI assumptions configured"**.
|
|
128
|
+
- If both change: report each section separately; never label analytics metrics as ROI metrics.
|
|
129
|
+
|
|
130
|
+
This distinction applies to MCP and CLI users equally because both surfaces call the same external workflow API and return the same pipeline shape.
|
|
131
|
+
|
|
117
132
|
## Common invalid patterns to avoid
|
|
118
133
|
|
|
119
134
|
Agents routinely invent step types that sound plausible. The API **silently strips unknown top-level fields** and stores the step, so you get a 201 Created on a workflow that will never execute. Watch for these:
|
|
@@ -453,7 +468,7 @@ AI steps can optionally specify a model and provider via the `agent` field:
|
|
|
453
468
|
| `minimax` | `minimax-m2.5` |
|
|
454
469
|
| `bytedance` | `doubao-seed-1.6-flash`, `seed-2.0-mini`, `doubao-seed-1.8-beta` |
|
|
455
470
|
| `perplexity` | `sonar-pro`, `sonar`, `sonar-reasoning-pro`, `sonar-reasoning` |
|
|
456
|
-
| `xai` | `grok-4
|
|
471
|
+
| `xai` | `grok-4.3`, `grok-3-mini` |
|
|
457
472
|
|
|
458
473
|
> **Tip:** Use `list_models` to get the full up-to-date list of supported model IDs. Use the internal model IDs (e.g., `claude-4-6-sonnet`), NOT the raw API model IDs (e.g., `claude-sonnet-4-6`). Using unsupported model IDs will result in a validation error.
|
|
459
474
|
|