@agentled/cli 0.7.6 → 0.7.8
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 +44 -1
- package/dist/commands/do.js +1 -1
- package/dist/commands/do.js.map +1 -1
- package/dist/commands/examples.d.ts +5 -5
- package/dist/commands/examples.js +8 -2
- package/dist/commands/examples.js.map +1 -1
- package/dist/commands/executions.js +56 -0
- package/dist/commands/executions.js.map +1 -1
- package/dist/commands/onboarding.js +45 -17
- package/dist/commands/onboarding.js.map +1 -1
- package/dist/commands/skills.js +67 -2
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/workspace.js +41 -0
- package/dist/commands/workspace.js.map +1 -1
- package/dist/utils/agentled-home-content.d.ts +1 -1
- package/dist/utils/agentled-home-content.js +6 -3
- package/dist/utils/agentled-home-content.js.map +1 -1
- package/dist/utils/browser-auth.d.ts +1 -0
- package/dist/utils/browser-auth.js +3 -3
- package/dist/utils/browser-auth.js.map +1 -1
- package/dist/utils/pipeline-lint.js +3 -1
- package/dist/utils/pipeline-lint.js.map +1 -1
- package/dist/utils/skills.d.ts +65 -4
- package/dist/utils/skills.js +147 -5
- package/dist/utils/skills.js.map +1 -1
- package/dist/utils/workspace-folder.d.ts +2 -0
- package/dist/utils/workspace-folder.js +26 -3
- package/dist/utils/workspace-folder.js.map +1 -1
- package/dist/utils/workspace-meta.d.ts +7 -5
- package/dist/utils/workspace-meta.js +30 -7
- package/dist/utils/workspace-meta.js.map +1 -1
- package/llms-full.txt +9 -2
- package/llms.txt +18 -0
- package/package.json +2 -2
- package/patterns/v1/00-design-principles.md +161 -0
- package/patterns/v1/13-entity-pipeline-lifecycle.md +319 -0
- package/scaffolds/README.md +7 -1
- package/scaffolds/child-with-return.json +71 -0
- package/scaffolds/funnel-orchestrator.json +134 -0
- package/scaffolds/kg-process-update.json +88 -0
- package/scaffolds/orchestrator-kg-loop.json +96 -0
- package/scaffolds/source-from-platform.json +78 -0
- package/scaffolds/source-to-kg.json +88 -0
- package/skills/agentled/SKILL.md +66 -737
- package/skills/agentled/references/credits-apps-and-errors.md +40 -0
- package/skills/agentled/references/editing-workflows.md +109 -0
- package/skills/agentled/references/email-workflows.md +122 -0
- package/skills/agentled/references/entity-pipeline.md +106 -0
- package/skills/agentled/references/outreach-and-scale.md +43 -0
- package/skills/agentled/references/persistent-memory.md +106 -0
- package/skills/agentled/references/step-schemas.md +148 -0
- package/skills/agentled/references/workspace-folder.md +74 -0
package/dist/utils/skills.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/utils/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAiB,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA+BlC,MAAM,UAAU,uBAAuB;IACnC,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACnD,OAAO,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,MAAe;IAC9C,OAAO,MAAM;QACT,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;QACtC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;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AAE,IAAI,EAAE,CAAC,CAAC;IAE1F,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -31,6 +31,8 @@ export declare function readWorkspaceMeta(wsDir: string): WorkspaceMeta;
|
|
|
31
31
|
export declare function writeWorkspaceMeta(wsDir: string, meta: WorkspaceMeta): void;
|
|
32
32
|
export declare function bundledScaffoldsDir(): string;
|
|
33
33
|
export declare function bundledSkillMd(): string;
|
|
34
|
+
/** Progressive-disclosure reference docs that SKILL.md links to. */
|
|
35
|
+
export declare function bundledSkillReferencesDir(): string;
|
|
34
36
|
export declare const GOTCHAS_MD = "# Agentled \u2014 Documented Failure Modes (GOTCHAS)\n\nThese pass JSON syntax validation but silently misbehave at runtime.\nRun `agentled workflows lint <file>` to catch them statically before deploying.\n\n---\n\n## 1. `criteria` not `conditions` in entryConditions [CRITERIA_NOT_CONDITIONS]\n\n**Wrong:** `{ \"entryConditions\": { \"conditions\": [...] } }`\n**Correct:** `{ \"entryConditions\": { \"criteria\": [...] } }`\n\nThe executor reads `entryConditions.criteria`. The key `conditions` is silently ignored.\n\n---\n\n## 2. `variable` not `field` in criteria items [VARIABLE_NOT_FIELD]\n\n**Wrong:** `{ \"field\": \"{{steps.x.score}}\", \"operator\": \">\", \"value\": 70 }`\n**Correct:** `{ \"variable\": \"{{steps.x.score}}\", \"operator\": \">\", \"value\": 70 }`\n\nUsing `field` causes the criterion to be silently skipped.\n\n---\n\n## 3. Gmail label_id must be the internal Label_XXXX ID [GMAIL_LABEL_DISPLAY_NAME]\n\nGmail's API requires `Label_XXXXXXXXXX` IDs, not display names.\nAdd a `GMAIL_CREATE_LABEL` step before and use `{{steps.ensure-label.id}}`.\n\n---\n\n## 4. `aiActionWithTools` with no tools [AI_STEP_TOOLS_REQUIRED]\n\nA step with `type: \"aiActionWithTools\"` must have at least one tool in\n`step.tools` or `step.agent.tools`.\n\nValid `builtinType` values: `web_search`, `file_search`, `code_interpreter`,\n`fetch_website_content`, `kg_search`, `kg_traverse`, `kg_nodes`, `kg_write`,\n`workspace_memory`.\n\n---\n\n## 5. Email steps need type + approval action + outreachProfile [EMAIL_MISSING_*]\n\nThree required pieces:\n- `pipelineStepPrompt.type: \"email\"`\n- `onApproval.action: \"schedule-email\"`\n- `outreachProfile` input page in `context.inputPages`\n\nMissing the schedule-email action means the email is drafted but never sent.\n\n---\n\n## 6. Only the first step in a loop gets `loopConfig` [LOOP_CONFIG_MULTIPLE_STEPS]\n\n`loopConfig` must be on the first step in the loop chain only. Subsequent\nsteps inside the loop iterate automatically.\n\n---\n\n## 7. Don't pass raw `{{input.*}}` directly to search APIs [RAW_INPUT_TO_SEARCH]\n\nAdd an aiAction step before the search that generates optimized queries.\nRaw user input makes poor search queries.\n\n---\n\n## 8. Child workflows must use `return` step, not `milestone` [CHILD_WORKFLOW_NO_RETURN]\n\nIf a workflow is called via `agentled.call-workflow`, use `type: \"return\"`.\n`milestone` produces no return data. Also set `context.executionInputConfig.internal: true`.\n\n---\n\n## 9. Model IDs are internal format, not Anthropic format [MODEL_ID_FORMAT]\n\nWrong: `claude-sonnet-4-6`. Correct: `claude-4-6-sonnet`.\nRun `agentled models list` for valid internal IDs.\n\n---\n\n## 10. Native app actionId must include appId prefix [ACTION_ID_MISSING_PREFIX]\n\nWrong: `{ \"id\": \"kg\", \"actionId\": \"read-list\" }`\nCorrect: `{ \"id\": \"kg\", \"actionId\": \"kg.read-list\" }`\n\n---\n\n## 11. `loop_completion` criteria requires `onCriteriaFail: \"wait\"` [LOOP_COMPLETION_NOT_WAIT]\n\nWithout `onCriteriaFail: \"wait\"`, the step skips instead of blocking until\nthe loop finishes. The `stepId` field is also required.\n\n---\n\n## 12. Arrays in JSON template strings \u2014 don't JSON.stringify\n\nThe serializer detects when a template variable is the sole content of a JSON\nfield and inlines the raw value. Pass `{ \"items\": \"{{steps.x.items}}\" }`\ndirectly \u2014 no stringify needed.\n\n---\n\n## 13. `kg.upsert-rows` needs `userKey` for dedup; `kg.add-rows` always inserts\n\n`kg.upsert-rows` with `userKey`: same key = same row, cross-run dedup O(1).\n`kg.add-rows`: always inserts a new row, duplicates accumulate.\nUse `mergeStrategy: \"merge\"` to preserve downstream-added fields.\n";
|
|
35
37
|
export declare const TASKS_README_MD = "# Tasks\n\nUse this folder for local FDE execution work for this client workspace:\n\n- active tasks and follow-ups\n- implementation notes\n- blockers and open questions\n- done logs and handoff notes\n\nKeep task-level details local. They are operational, may be noisy or provisional, and should not be synced wholesale into workspace knowledge.\n\nPromote only client-facing milestone recaps and alignment memory to workspace `kg.text`:\n\n- delivered milestones\n- agreed decisions\n- important blockers or risks\n- next client-facing follow-ups\n- context the client or future agent sessions need to stay aligned\n\nDo not store secrets or connector credentials in this folder.\n";
|
|
36
38
|
export declare function makeAgentsMd(meta: WorkspaceMeta): string;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* ├── tasks/ # local FDE task tracking, not workspace KG
|
|
25
25
|
* └── drafts/ # in-progress pipeline JSON files
|
|
26
26
|
*/
|
|
27
|
-
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, copyFileSync } from 'node:fs';
|
|
27
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, copyFileSync, cpSync } from 'node:fs';
|
|
28
28
|
import { dirname, join, resolve } from 'node:path';
|
|
29
29
|
import { fileURLToPath } from 'node:url';
|
|
30
30
|
export { resolveWorkspaceMeta, slugifyWorkspaceRef } from './workspace-meta.js';
|
|
@@ -82,6 +82,17 @@ export function bundledScaffoldsDir() {
|
|
|
82
82
|
export function bundledSkillMd() {
|
|
83
83
|
return join(pkgRoot(), 'skills', 'agentled', 'SKILL.md');
|
|
84
84
|
}
|
|
85
|
+
/** Progressive-disclosure reference docs that SKILL.md links to. */
|
|
86
|
+
export function bundledSkillReferencesDir() {
|
|
87
|
+
return join(pkgRoot(), 'skills', 'agentled', 'references');
|
|
88
|
+
}
|
|
89
|
+
/** Copy SKILL.md's `references/` folder into a docs dir so the local copy stays a full reference. */
|
|
90
|
+
function copySkillReferences(docsDir) {
|
|
91
|
+
const refsSrc = bundledSkillReferencesDir();
|
|
92
|
+
if (existsSync(refsSrc)) {
|
|
93
|
+
cpSync(refsSrc, join(docsDir, 'references'), { recursive: true, force: true });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
85
96
|
// ---------------------------------------------------------------------------
|
|
86
97
|
// GOTCHAS.md — embedded so it stays in sync with the CLI release
|
|
87
98
|
// ---------------------------------------------------------------------------
|
|
@@ -243,6 +254,15 @@ Use workspace \`kg.text\` only for client-facing milestone recaps and alignment
|
|
|
243
254
|
- next client-facing follow-ups
|
|
244
255
|
- context the client or future agent sessions need to stay aligned
|
|
245
256
|
|
|
257
|
+
At the end of each meaningful working session, include a concise user-facing retrospective:
|
|
258
|
+
|
|
259
|
+
- what worked
|
|
260
|
+
- what did not work or blocked progress
|
|
261
|
+
- concrete improvements for the next session
|
|
262
|
+
- follow-up risks
|
|
263
|
+
|
|
264
|
+
If the feedback is about Agentled itself — CLI behavior, MCP tools, workflow validation, app integrations, docs, missing capabilities, confusing errors, or platform behavior — send it to the Agentled team with the \`submit_feedback_to_agentled\` MCP tool when available. From the CLI, use \`agentled feedback submit --type <bug|feature_request|escalation|ask> --title "<title>" --description "<details>"\`.
|
|
265
|
+
|
|
246
266
|
## Connectors And Plugins
|
|
247
267
|
|
|
248
268
|
Email, calendar, Drive, CRM, and other external integrations are configured by the user in their Codex or Agentled environment. Do not store connector credentials, OAuth tokens, or API keys in this folder.
|
|
@@ -380,10 +400,11 @@ export function createWorkspaceFolder(folderPath, meta, opts = {}) {
|
|
|
380
400
|
if (opts.modelsList) {
|
|
381
401
|
writeFileSync(join(folderPath, '.agentled', 'cache', 'models.json'), JSON.stringify(opts.modelsList, null, 2) + '\n');
|
|
382
402
|
}
|
|
383
|
-
// Copy SKILL.md from bundled package
|
|
403
|
+
// Copy SKILL.md (+ its references/) from bundled package
|
|
384
404
|
const skillSrc = bundledSkillMd();
|
|
385
405
|
if (existsSync(skillSrc)) {
|
|
386
406
|
copyFileSync(skillSrc, join(folderPath, 'docs', 'SKILL.md'));
|
|
407
|
+
copySkillReferences(join(folderPath, 'docs'));
|
|
387
408
|
}
|
|
388
409
|
else {
|
|
389
410
|
writeFileSync(join(folderPath, 'docs', 'SKILL.md'), '# SKILL.md\n\nRun `agentled workspace sync` to refresh.\n');
|
|
@@ -410,8 +431,10 @@ export function refreshWorkspaceFolder(wsDir, opts) {
|
|
|
410
431
|
if (opts.modelsList)
|
|
411
432
|
writeFileSync(join(cacheDir, 'models.json'), JSON.stringify(opts.modelsList, null, 2) + '\n');
|
|
412
433
|
const skillSrc = bundledSkillMd();
|
|
413
|
-
if (existsSync(skillSrc))
|
|
434
|
+
if (existsSync(skillSrc)) {
|
|
414
435
|
copyFileSync(skillSrc, join(wsDir, 'docs', 'SKILL.md'));
|
|
436
|
+
copySkillReferences(join(wsDir, 'docs'));
|
|
437
|
+
}
|
|
415
438
|
writeFileSync(join(wsDir, 'docs', 'GOTCHAS.md'), GOTCHAS_MD);
|
|
416
439
|
const meta = readWorkspaceMeta(wsDir);
|
|
417
440
|
meta.syncedAt = new Date().toISOString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-folder.js","sourceRoot":"","sources":["../../src/utils/workspace-folder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace-folder.js","sourceRoot":"","sources":["../../src/utils/workspace-folder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAChH,O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BAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -7,11 +7,13 @@ export interface WorkspaceMeta {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function slugifyWorkspaceRef(value: string): string;
|
|
9
9
|
/**
|
|
10
|
-
* The external workspace endpoint returns
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* The external workspace endpoint returns
|
|
11
|
+
* `{ workspace: { id, name }, company, team, knowledgeLists }`, while
|
|
12
|
+
* older/internal callers may still hand us a top-level workspace object.
|
|
13
|
+
* Normalize both shapes and fall back to the active auth profile. Workspace ids
|
|
14
|
+
* are valid identities, but never valid local folder slugs: if no slug, alias, or
|
|
15
|
+
* name can be resolved, fail instead of creating an `agentled_<workspaceId>/`
|
|
16
|
+
* folder.
|
|
15
17
|
*/
|
|
16
18
|
export declare function resolveWorkspaceMeta(input: {
|
|
17
19
|
response?: unknown;
|
|
@@ -20,12 +20,29 @@ export function slugifyWorkspaceRef(value) {
|
|
|
20
20
|
.replace(/^-+|-+$/g, '');
|
|
21
21
|
return slug || 'workspace';
|
|
22
22
|
}
|
|
23
|
+
function isWorkspaceIdRef(value, workspaceId) {
|
|
24
|
+
if (!value)
|
|
25
|
+
return false;
|
|
26
|
+
return value.trim() === workspaceId.trim()
|
|
27
|
+
|| slugifyWorkspaceRef(value) === slugifyWorkspaceRef(workspaceId);
|
|
28
|
+
}
|
|
29
|
+
function firstNonWorkspaceIdString(workspaceId, ...values) {
|
|
30
|
+
for (const value of values) {
|
|
31
|
+
const candidate = firstString(value);
|
|
32
|
+
if (!candidate || isWorkspaceIdRef(candidate, workspaceId))
|
|
33
|
+
continue;
|
|
34
|
+
return candidate;
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
23
38
|
/**
|
|
24
|
-
* The external workspace endpoint returns
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
39
|
+
* The external workspace endpoint returns
|
|
40
|
+
* `{ workspace: { id, name }, company, team, knowledgeLists }`, while
|
|
41
|
+
* older/internal callers may still hand us a top-level workspace object.
|
|
42
|
+
* Normalize both shapes and fall back to the active auth profile. Workspace ids
|
|
43
|
+
* are valid identities, but never valid local folder slugs: if no slug, alias, or
|
|
44
|
+
* name can be resolved, fail instead of creating an `agentled_<workspaceId>/`
|
|
45
|
+
* folder.
|
|
29
46
|
*/
|
|
30
47
|
export function resolveWorkspaceMeta(input) {
|
|
31
48
|
const root = isRecord(input.response) ? input.response : {};
|
|
@@ -36,8 +53,14 @@ export function resolveWorkspaceMeta(input) {
|
|
|
36
53
|
if (!workspaceId) {
|
|
37
54
|
throw new Error('Authenticated, but no workspace id was found in the workspace response or active auth profile.');
|
|
38
55
|
}
|
|
39
|
-
const name = firstString(responseWorkspace.name, root.name, company.name, auth.name
|
|
40
|
-
|
|
56
|
+
const name = firstString(responseWorkspace.name, root.name, company.name, auth.name);
|
|
57
|
+
if (!name) {
|
|
58
|
+
throw new Error('Authenticated, but no workspace name or slug was found. Refusing to create an agentled_<workspaceId> folder.');
|
|
59
|
+
}
|
|
60
|
+
const slugSource = firstNonWorkspaceIdString(workspaceId, input.slugOverride, responseWorkspace.slug, root.slug, auth.alias, name);
|
|
61
|
+
if (!slugSource) {
|
|
62
|
+
throw new Error('Authenticated, but no workspace slug, alias, or name was found. Refusing to create an agentled_<workspaceId> folder.');
|
|
63
|
+
}
|
|
41
64
|
return {
|
|
42
65
|
workspaceId,
|
|
43
66
|
slug: slugifyWorkspaceRef(slugSource),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-meta.js","sourceRoot":"","sources":["../../src/utils/workspace-meta.ts"],"names":[],"mappings":"AAQA,SAAS,QAAQ,CAAC,KAAc;IAC5B,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK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C,MAAM,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,EAAE,EAAE,iBAAiB,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAChH,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,gGAAgG,CAAC,CAAC;IACtH,CAAC;IAED,MAAM,IAAI,GAAG,WAAW,CACpB,iBAAiB,CAAC,IAAI,EACtB,IAAI,CAAC,IAAI,EACT,OAAO,CAAC,IAAI,EACZ,IAAI,CAAC,IAAI,CACZ,CAAC;IACF,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,8GAA8G,CAAC,CAAC;IACpI,CAAC;IAED,MAAM,UAAU,GAAG,yBAAyB,CACxC,WAAW,EACX,KAAK,CAAC,YAAY,EAClB,iBAAiB,CAAC,IAAI,EACtB,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,KAAK,EACV,IAAI,CACP,CAAC;IACF,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,sHAAsH,CAAC,CAAC;IAC5I,CAAC;IAED,OAAO;QACH,WAAW;QACX,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC;QACrC,IAAI;QACJ,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACvD,CAAC;AACN,CAAC"}
|
package/llms-full.txt
CHANGED
|
@@ -93,6 +93,8 @@ agentled workflows publish <id> --status paused
|
|
|
93
93
|
agentled workflows start <id> --input '{"company_url":"https://linkedin.com/company/acme"}'
|
|
94
94
|
agentled workflows start <id> --input-file input.json
|
|
95
95
|
|
|
96
|
+
`workflows start` always returns `executionInputId` (the submitted input/run record). It may also return `executionId` if the async execution row is already available. Use only `executionId` with `executions get`. If `executionId` is absent, run `agentled executions list <workflow-id> --limit 5` and find the row whose `pipelineExecutionInputId` matches the `executionInputId`; that row's `id` is the execution ID.
|
|
97
|
+
|
|
96
98
|
# Export / Import (cross-environment transfer)
|
|
97
99
|
agentled workflows export <id> --output workflow-export.json
|
|
98
100
|
agentled workflows import --file workflow-export.json
|
|
@@ -220,6 +222,11 @@ agentled workspace company-profile
|
|
|
220
222
|
# Update company profile fields
|
|
221
223
|
agentled workspace update-company-profile --input '{"name":"Acme","urls":["https://acme.com"]}'
|
|
222
224
|
|
|
225
|
+
# Pin/list/unpin workflow output pages on workspace home/sidebar
|
|
226
|
+
agentled workspace set-output-pin <workflow-id> <output-page-pathname> --label "Weekly Investor Report" --icon-name FileText
|
|
227
|
+
agentled workspace pinned-outputs
|
|
228
|
+
agentled workspace set-output-pin <workflow-id> <output-page-pathname> --unpin
|
|
229
|
+
|
|
223
230
|
# Update branding
|
|
224
231
|
agentled workspace update-branding --display-name "Acme" --primary-color "#ff0000"
|
|
225
232
|
agentled workspace update-branding --logo-url "https://..." --favicon-url "https://..." --hide-badge
|
|
@@ -396,7 +403,7 @@ agentled workflows publish <id> --status live
|
|
|
396
403
|
agentled workflows start <id> --input '{"url":"https://linkedin.com/company/acme"}'
|
|
397
404
|
|
|
398
405
|
# Check results
|
|
399
|
-
agentled executions list <id> --limit
|
|
406
|
+
agentled executions list <id> --limit 5 # match pipelineExecutionInputId if start returned only executionInputId
|
|
400
407
|
agentled executions get <id> <exec-id>
|
|
401
408
|
```
|
|
402
409
|
|
|
@@ -495,7 +502,7 @@ agentled workflows start <workflow-id> --input '{"company_url": "$ARGUMENTS"}'
|
|
|
495
502
|
|
|
496
503
|
Check results with:
|
|
497
504
|
\`\`\`bash
|
|
498
|
-
agentled executions list <workflow-id> --limit
|
|
505
|
+
agentled executions list <workflow-id> --limit 5 # match pipelineExecutionInputId from workflows start
|
|
499
506
|
agentled executions get <workflow-id> <exec-id>
|
|
500
507
|
\`\`\`
|
|
501
508
|
```
|
package/llms.txt
CHANGED
|
@@ -20,6 +20,7 @@ agentled auth login # browser auth + workspace selection + skill inst
|
|
|
20
20
|
agentled init # scaffold agentled_<slug>/
|
|
21
21
|
agentled auth current
|
|
22
22
|
agentled workflows list
|
|
23
|
+
agentled workspace set-output-pin <workflow-id> <output-page-pathname> --label "Report"
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
The CLI can store multiple workspace profiles. Use `agentled auth list`,
|
|
@@ -29,3 +30,20 @@ to switch targets.
|
|
|
29
30
|
## Docs
|
|
30
31
|
|
|
31
32
|
- [Full Reference](llms-full.txt): Complete single-file reference for LLM consumption — all CLI commands, workflow schema, app actions, and examples
|
|
33
|
+
- [Design Principles](patterns/v1/00-design-principles.md): The four-pillar authoring contract — idempotency, small scope, KG-list-as-connector, design-as-data — read this **before authoring any workflow**.
|
|
34
|
+
|
|
35
|
+
## Scaffolds (zero-iteration starters)
|
|
36
|
+
|
|
37
|
+
Every scaffold is preflight-clean. List them with `agentled workflows scaffold --list`; copy one with `agentled workflows scaffold <slug> --out my.json`.
|
|
38
|
+
|
|
39
|
+
Idempotent sourcing + processing (Pattern 15 — the user's default for "find leads then process on a schedule"):
|
|
40
|
+
|
|
41
|
+
- `source-to-kg` — schedule → generate queries → extract → `kg.upsert-rows` with `userKey` + `status:new`. Re-runs dedup via userKey.
|
|
42
|
+
- `kg-process-update` — schedule → `kg.read-list(status:new)` → loop → `kg.update-rows(status:processed)`. Pair with `source-to-kg`.
|
|
43
|
+
|
|
44
|
+
Composition:
|
|
45
|
+
|
|
46
|
+
- `child-with-return` — child workflow with `internal:true` + `return` step. Called via `agentled.call-workflow`.
|
|
47
|
+
- `orchestrator-kg-loop` — orchestrator that loops `call-workflow` over a KG list, waits for `loop_completion`, persists results.
|
|
48
|
+
|
|
49
|
+
See `scaffolds/README.md` for the full catalog.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentled/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
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",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"prepublishOnly": "npm run build"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@agentled/core": "^0.2.
|
|
19
|
+
"@agentled/core": "^0.2.4",
|
|
20
20
|
"commander": "^12.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# 00 — Design Principles
|
|
2
|
+
|
|
3
|
+
> The four-pillar contract every Agentled workflow follows. Read this **before authoring any step.**
|
|
4
|
+
|
|
5
|
+
The other docs in this folder (`01-trigger-design`, `02-dedup-gates`, …) are tactical playbooks for specific shapes. This one is the contract underneath them: the four invariants every workflow you author has to satisfy, and the questions to answer before you write a single step.
|
|
6
|
+
|
|
7
|
+
If you remember nothing else from this folder, remember the four pillars and the three questions.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## The four pillars
|
|
12
|
+
|
|
13
|
+
### 1. Idempotency — re-running is safe
|
|
14
|
+
|
|
15
|
+
Every workflow you author must be re-runnable on the same input without producing duplicates, double-charges, or partial state. This is a property of the *workflow*, not the platform.
|
|
16
|
+
|
|
17
|
+
The two implementations:
|
|
18
|
+
|
|
19
|
+
- **Polling intake** — every trigger that reads from an external source (Gmail, Slack, a feed, a webhook replay) starts with a **dedup gate**. The default for email is a Gmail label gate (`-label:processed`) plus `GMAIL_ADD_LABEL` at the end of the loop. See [02-dedup-gates](02-dedup-gates.md).
|
|
20
|
+
- **KG writes** — use `kg.upsert-rows` with an explicit `userKey` (the LinkedIn URL, the domain, the order id — whatever is stable). Same `userKey` = same row across runs, O(1), no table scan. Reach for `kg.add-rows` only when duplicates are *acceptable*. See [12-event-driven-workflow-groups](12-event-driven-workflow-groups.md) §"Status is the API".
|
|
21
|
+
|
|
22
|
+
> **Test:** if you ran your workflow twice with the same input, would the world look the same as if you ran it once? If no, you have a missing dedup gate.
|
|
23
|
+
|
|
24
|
+
### 2. Small scope — one workflow owns one stage
|
|
25
|
+
|
|
26
|
+
A workflow that "sources leads, enriches them, scores them, drafts outreach, sends email, and updates the CRM" is not a workflow — it's a system that needs five. Symptoms of an over-scoped workflow:
|
|
27
|
+
|
|
28
|
+
- A failed step at minute 20 forces re-running steps 1–4 to retry step 5.
|
|
29
|
+
- The execution log spans 200+ rows and you can't tell which stage failed.
|
|
30
|
+
- Two upstream sources both want to feed in, but they can't share infrastructure.
|
|
31
|
+
- The "outreach" step needs different scheduling than the "sourcing" step.
|
|
32
|
+
|
|
33
|
+
The default decomposition rule: **one workflow per stage in the business process.** Stages are the things a human would describe with a different verb — *source*, *enrich*, *score*, *outreach*, *follow up*, *report*. Each stage gets its own workflow, its own trigger, its own retry semantics. See [05-child-workflow-contracts](05-child-workflow-contracts.md) for child workflows and [12-event-driven-workflow-groups](12-event-driven-workflow-groups.md) for multi-workflow systems.
|
|
34
|
+
|
|
35
|
+
> **Test:** can a human point at your workflow and say in one sentence what it does, without saying "and" twice? If not, split it.
|
|
36
|
+
|
|
37
|
+
### 3. KG list is the connector between workflows
|
|
38
|
+
|
|
39
|
+
When one workflow finishes and another begins, **the handoff is a Knowledge Graph list row, not a direct call**. The producing workflow writes (`kg.upsert-rows` with `status: "new"`); the consuming workflow reads (`kg.read-list` with `filters: { status: "new" }`) and updates (`kg.update-rows` to set `status: "processed"`).
|
|
40
|
+
|
|
41
|
+
Why a KG list and not `call-workflow`?
|
|
42
|
+
|
|
43
|
+
| KG-list handoff | Direct call |
|
|
44
|
+
|---|---|
|
|
45
|
+
| Producer doesn't know which consumers exist | Producer hardcodes consumer ID |
|
|
46
|
+
| Consumer can be paused, replaced, or duplicated freely | Pausing the consumer breaks the producer |
|
|
47
|
+
| Backfill = widen the status filter | Backfill = re-run the producer |
|
|
48
|
+
| State is durable and inspectable in the UI | State exists only in the execution log |
|
|
49
|
+
| Multiple producers can write to one list | Each producer wires up its own caller chain |
|
|
50
|
+
|
|
51
|
+
Use `call-workflow` (Pattern 11/12) when a child workflow is a **pure function** — same input always yields the same output, and the parent immediately consumes the return value. Use the KG list as connector for everything else.
|
|
52
|
+
|
|
53
|
+
> **Test:** if you swap one of your workflows for a different implementation tomorrow, do the others keep working without code changes? If no, you have a brittle direct-call dependency.
|
|
54
|
+
|
|
55
|
+
### 4. Design as data — persist decisions in KG text
|
|
56
|
+
|
|
57
|
+
The workflow JSON tells you *what* the workflow does. It does not tell you *why* it does it that way. Why this trigger? Why this scoring rubric? Why a dedup label and not a userKey? Without those answers, the next agent session — or the next human — rebuilds your reasoning from scratch every time.
|
|
58
|
+
|
|
59
|
+
Save the rationale **in the platform**, not in your local scratch folder. Two places, two purposes:
|
|
60
|
+
|
|
61
|
+
**Working memory (local, per-group)** — `workflow-groups/<group-slug>/design.md`, `decisions/`, `worklog.md`. The agent's scratch space while building. See [12-event-driven-workflow-groups](12-event-driven-workflow-groups.md) §"Folder layout".
|
|
62
|
+
|
|
63
|
+
**Durable memory (KG text, per-workspace)** — call the `upsert_knowledge_text` MCP tool when you reach a non-trivial decision. The decision survives across agent sessions, users, and CLI reinstalls. Example:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
upsert_knowledge_text({
|
|
67
|
+
key: "design.<group-slug>.scoring-rubric",
|
|
68
|
+
value: "Scoring rubric for the <group> funnel.\n\nDimensions: team (40), traction (30), market (30).\nThreshold: score >= 70 → outreach; 50-69 → nurture; <50 → reject.\nWhy: validated against 200 hand-scored seed-stage rows. See decisions/0003.\nLast review: 2026-04."
|
|
69
|
+
})
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Use the `design.<group-slug>.<topic>` key convention so a later agent can `recall_memory({ key: "design.<group-slug>.scoring-rubric" })` or `search_memories({ query: "scoring rubric", scope: "workspace" })` without guessing.
|
|
73
|
+
|
|
74
|
+
What to upsert as `design.*` text:
|
|
75
|
+
|
|
76
|
+
| Topic | Key suffix | What to capture |
|
|
77
|
+
|-------|-----------|-----------------|
|
|
78
|
+
| Group goal & operating principles | `.charter` | The 1-paragraph goal and the 3–5 operating principles |
|
|
79
|
+
| ICP / scoring rubric | `.scoring-rubric` | Dimensions, weights, thresholds, the data the thresholds were calibrated on |
|
|
80
|
+
| KG list shapes | `.kg-lists` | List keys, `userKeyField`, state machines, who reads/writes |
|
|
81
|
+
| Approval gate policies | `.approvals` | Which steps gate, who approves, escalation rules |
|
|
82
|
+
| Channel / outreach voice | `.outreach-voice` | Tone, forbidden phrases, brand rules |
|
|
83
|
+
| Rejected alternatives | `.tradeoffs` | What you considered and didn't ship, and why |
|
|
84
|
+
|
|
85
|
+
> **Test:** if a new agent picks up this group tomorrow with no chat history, can it answer "what is the rubric and why does it look like this?" by reading what's in KG text? If no, you owe a `design.*` upsert.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## The three questions before you author
|
|
90
|
+
|
|
91
|
+
Answer all three out loud (or in `design.md`) before the first `add_step`. If you can't answer, you don't have enough context — orient the workspace first (`agentled workspace inspect`, `list_workflows`, `list_knowledge_lists`).
|
|
92
|
+
|
|
93
|
+
1. **What is the unit of work?** One company? One lead? One inbound email? One edition? The unit determines the loop scope, the KG row, the `userKey`, and the retry granularity.
|
|
94
|
+
2. **What is the completion signal?** A KG row status flip? A downstream trigger firing? A human approval? A milestone with no successor? "Completion" must be a thing the platform can observe — not an intent in the agent's head.
|
|
95
|
+
3. **Is this workflow part of a group?** If the user describes more than one verb ("source *and* enrich", "enrich *and* outreach"), the answer is yes and you owe a group manifest before you write step 1. See [12-event-driven-workflow-groups](12-event-driven-workflow-groups.md).
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Decision tree: which shape do I author?
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Is the user describing one verb, one input, one output?
|
|
103
|
+
├─ YES, and it's truly one-shot → Single workflow, milestone end.
|
|
104
|
+
│ Scaffolds: minimal, ai-with-tools, list-match-email.
|
|
105
|
+
│
|
|
106
|
+
├─ YES, but the same logic will be reused by other workflows → Child workflow.
|
|
107
|
+
│ Terminal step is `return`, not `milestone`.
|
|
108
|
+
│ Scaffold: child-with-return.
|
|
109
|
+
│ Pattern: 05.
|
|
110
|
+
│
|
|
111
|
+
└─ NO, the user is describing a process with multiple stages →
|
|
112
|
+
│
|
|
113
|
+
├─ Stages share state and run on different cadences → Two (or more) workflows
|
|
114
|
+
│ connected by a KG list. Producer upserts with status: "new"; consumer
|
|
115
|
+
│ reads by status, processes, updates status.
|
|
116
|
+
│ Scaffolds: source-to-kg + kg-process-update.
|
|
117
|
+
│ Pattern: 12, 15.
|
|
118
|
+
│
|
|
119
|
+
└─ One workflow needs to fan out the same operation per item with deterministic
|
|
120
|
+
results → Orchestrator + child via call-workflow inside a loop.
|
|
121
|
+
Scaffold: orchestrator-kg-loop.
|
|
122
|
+
Pattern: 11.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## The 30-second sanity check
|
|
128
|
+
|
|
129
|
+
Before you publish, walk this checklist. Each "no" is a blocker.
|
|
130
|
+
|
|
131
|
+
- [ ] If this workflow is re-run on the same input, does it produce the same state? (Pillar 1)
|
|
132
|
+
- [ ] Can I describe what this workflow does in one short sentence without "and"? (Pillar 2)
|
|
133
|
+
- [ ] If the next workflow in the chain is paused or replaced, does this one still do its job? (Pillar 3)
|
|
134
|
+
- [ ] Are the design rationale, ICP/rubric, and list shapes saved as `design.<group>.*` in KG text? (Pillar 4)
|
|
135
|
+
- [ ] Did I answer the three questions before writing step 1?
|
|
136
|
+
- [ ] Did I pick the shape from the decision tree, not invent a new one?
|
|
137
|
+
- [ ] Does the workflow pass `agentled workflows validate <wfId>` with zero errors and zero warnings?
|
|
138
|
+
- [ ] Did I run the [Dry-Run Protocol](../../../CLAUDE.md) (`validate_workflow` → `test_*_action` per key step → check `{{steps.X.field}}` refs against captured payloads) before any `start_workflow`?
|
|
139
|
+
|
|
140
|
+
If all eight pass, ship it. If not, fix before publish — the platform won't catch a missing rationale or a misnamed list key for you.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Where to go next
|
|
145
|
+
|
|
146
|
+
| If you're doing… | Read |
|
|
147
|
+
|---|---|
|
|
148
|
+
| Choosing a trigger | [01-trigger-design](01-trigger-design.md) |
|
|
149
|
+
| Building a polling intake | [02-dedup-gates](02-dedup-gates.md) |
|
|
150
|
+
| Iterating without burning credits | [03-credit-efficiency](03-credit-efficiency.md) |
|
|
151
|
+
| Looping over a KG list | [04-loop-patterns](04-loop-patterns.md) |
|
|
152
|
+
| Building a child workflow | [05-child-workflow-contracts](05-child-workflow-contracts.md) |
|
|
153
|
+
| Conditional routing | [06-conditional-routing](06-conditional-routing.md) |
|
|
154
|
+
| Handling errors / skips / waits | [07-error-handling](07-error-handling.md) |
|
|
155
|
+
| Sending email with approval | [08-composed-email-approval](08-composed-email-approval.md) |
|
|
156
|
+
| Rendering reports + KG storage | [09-reports-and-knowledge-storage](09-reports-and-knowledge-storage.md) |
|
|
157
|
+
| Researching a person | [10-person-research-ladder](10-person-research-ladder.md) |
|
|
158
|
+
| Researching a company | [11-company-research-ladder](11-company-research-ladder.md) |
|
|
159
|
+
| Designing a multi-workflow group | [12-event-driven-workflow-groups](12-event-driven-workflow-groups.md) |
|
|
160
|
+
|
|
161
|
+
And before you start: `agentled workflows scaffold --list` to see every starter shape, then `agentled workflows scaffold <slug> --out my-pipeline.json` to bootstrap.
|