@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.
Files changed (52) hide show
  1. package/README.md +44 -1
  2. package/dist/commands/do.js +1 -1
  3. package/dist/commands/do.js.map +1 -1
  4. package/dist/commands/examples.d.ts +5 -5
  5. package/dist/commands/examples.js +8 -2
  6. package/dist/commands/examples.js.map +1 -1
  7. package/dist/commands/executions.js +56 -0
  8. package/dist/commands/executions.js.map +1 -1
  9. package/dist/commands/onboarding.js +45 -17
  10. package/dist/commands/onboarding.js.map +1 -1
  11. package/dist/commands/skills.js +67 -2
  12. package/dist/commands/skills.js.map +1 -1
  13. package/dist/commands/workspace.js +41 -0
  14. package/dist/commands/workspace.js.map +1 -1
  15. package/dist/utils/agentled-home-content.d.ts +1 -1
  16. package/dist/utils/agentled-home-content.js +6 -3
  17. package/dist/utils/agentled-home-content.js.map +1 -1
  18. package/dist/utils/browser-auth.d.ts +1 -0
  19. package/dist/utils/browser-auth.js +3 -3
  20. package/dist/utils/browser-auth.js.map +1 -1
  21. package/dist/utils/pipeline-lint.js +3 -1
  22. package/dist/utils/pipeline-lint.js.map +1 -1
  23. package/dist/utils/skills.d.ts +65 -4
  24. package/dist/utils/skills.js +147 -5
  25. package/dist/utils/skills.js.map +1 -1
  26. package/dist/utils/workspace-folder.d.ts +2 -0
  27. package/dist/utils/workspace-folder.js +26 -3
  28. package/dist/utils/workspace-folder.js.map +1 -1
  29. package/dist/utils/workspace-meta.d.ts +7 -5
  30. package/dist/utils/workspace-meta.js +30 -7
  31. package/dist/utils/workspace-meta.js.map +1 -1
  32. package/llms-full.txt +9 -2
  33. package/llms.txt +18 -0
  34. package/package.json +2 -2
  35. package/patterns/v1/00-design-principles.md +161 -0
  36. package/patterns/v1/13-entity-pipeline-lifecycle.md +319 -0
  37. package/scaffolds/README.md +7 -1
  38. package/scaffolds/child-with-return.json +71 -0
  39. package/scaffolds/funnel-orchestrator.json +134 -0
  40. package/scaffolds/kg-process-update.json +88 -0
  41. package/scaffolds/orchestrator-kg-loop.json +96 -0
  42. package/scaffolds/source-from-platform.json +78 -0
  43. package/scaffolds/source-to-kg.json +88 -0
  44. package/skills/agentled/SKILL.md +66 -737
  45. package/skills/agentled/references/credits-apps-and-errors.md +40 -0
  46. package/skills/agentled/references/editing-workflows.md +109 -0
  47. package/skills/agentled/references/email-workflows.md +122 -0
  48. package/skills/agentled/references/entity-pipeline.md +106 -0
  49. package/skills/agentled/references/outreach-and-scale.md +43 -0
  50. package/skills/agentled/references/persistent-memory.md +106 -0
  51. package/skills/agentled/references/step-schemas.md +148 -0
  52. package/skills/agentled/references/workspace-folder.md +74 -0
@@ -0,0 +1,148 @@
1
+ # Step Schemas & Template Variables
2
+
3
+ > Loaded on demand from the Agentled skill. `get_step_schema` (MCP) and
4
+ > `agentled schema --step-type <type>` (CLI) are the **authoritative** sources —
5
+ > this file is a fast reference for the common shapes.
6
+
7
+ ## Pipeline Structure
8
+
9
+ Every workflow needs at minimum: a trigger step, one or more action steps, and a milestone (terminal) step. Steps are connected via `next: { stepId: "..." }`.
10
+
11
+ ```json
12
+ {
13
+ "name": "My Workflow",
14
+ "goal": "What this workflow achieves",
15
+ "steps": [
16
+ { "id": "trigger", "type": "trigger", "name": "Start", "pipelineStepStartConditions": { "trigger": { "type": "manual" } }, "next": { "stepId": "action" } },
17
+ { "id": "action", "type": "aiAction", "name": "Analyze", "pipelineStepPrompt": { "template": "...", "responseStructure": {} }, "creditCost": 10, "next": { "stepId": "done" } },
18
+ { "id": "done", "type": "milestone", "name": "Complete" }
19
+ ],
20
+ "context": {
21
+ "executionInputConfig": {
22
+ "title": "Run Workflow",
23
+ "fields": [{ "name": "input_field", "label": "Input", "type": "text", "required": true }]
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Step Types
30
+
31
+ ### Trigger
32
+ ```json
33
+ { "id": "trigger", "type": "trigger", "name": "Start", "pipelineStepStartConditions": { "trigger": { "type": "manual" } }, "next": { "stepId": "next-step" } }
34
+ ```
35
+
36
+ `pipelineStepStartConditions.trigger.type` is one of: `manual`, `schedule`, `webhook`, `event`, `delay`, `app_event`. For `schedule` add `config: { frequency: "daily", time: "07:00" }` (or a cron expression). For `app_event` add `config: { appId, triggerSlug, connectionSource }`. **Do not put `triggerType` at the step root** — it is not in the step schema and is silently dropped on save.
37
+
38
+ ### App Action
39
+ ```json
40
+ {
41
+ "id": "enrich",
42
+ "type": "appAction",
43
+ "name": "Enrich Company",
44
+ "app": { "id": "agentled", "actionId": "agentled.get-linkedin-company-from-url", "source": "native" },
45
+ "stepInputData": { "profileUrls": "{{input.company_url}}" },
46
+ "next": { "stepId": "next-step" }
47
+ }
48
+ ```
49
+
50
+ ### AI Action
51
+ ```json
52
+ {
53
+ "id": "analyze",
54
+ "type": "aiAction",
55
+ "name": "Analyze",
56
+ "pipelineStepPrompt": {
57
+ "template": "Analyze this company: {{steps.enrich.company}}",
58
+ "responseStructure": { "score": "number 0-100", "summary": "string" }
59
+ },
60
+ "creditCost": 10,
61
+ "next": { "stepId": "next-step" }
62
+ }
63
+ ```
64
+
65
+ ### AI Step Model & Provider Configuration
66
+
67
+ AI steps can optionally specify a model and provider via the `agent` field:
68
+
69
+ ```json
70
+ {
71
+ "id": "analyze",
72
+ "type": "aiAction",
73
+ "agent": { "model": "claude-4-6-sonnet", "provider": "anthropic" },
74
+ "pipelineStepPrompt": { "template": "...", "responseStructure": {} },
75
+ "creditCost": 10,
76
+ "next": { "stepId": "next-step" }
77
+ }
78
+ ```
79
+
80
+ **Supported Providers:** `openai`, `anthropic`, `google`, `mistral`, `deepseek`, `kimi`, `minimax`, `bytedance`, `perplexity`, `xai`
81
+
82
+ **Supported Models by Provider:**
83
+
84
+ | Provider | Models |
85
+ |----------|--------|
86
+ | `openai` | `gpt-5-nano`, `gpt-5-mini`, `gpt-5.4`, `o4-mini`, `o3`, `o3-pro`, `o3-deep-research` |
87
+ | `anthropic` | `claude-4-6-sonnet`, `claude-4-5-haiku`, `claude-4-6-opus` |
88
+ | `google` | `gemini-3-pro`, `gemini-3-flash`, `gemini-2.5-pro`, `gemini-2.5-flash` |
89
+ | `mistral` | `mistral-large-latest`, `mistral-small-latest`, `codestral-latest` |
90
+ | `deepseek` | `deepseek-chat`, `deepseek-reasoner` |
91
+ | `kimi` | `kimi-k2.5` |
92
+ | `minimax` | `minimax-m2.5` |
93
+ | `bytedance` | `doubao-seed-1.6-flash`, `seed-2.0-mini`, `doubao-seed-1.8-beta` |
94
+ | `perplexity` | `sonar-pro`, `sonar`, `sonar-reasoning-pro`, `sonar-reasoning` |
95
+ | `xai` | `grok-4.3`, `grok-3-mini` |
96
+
97
+ > **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.
98
+
99
+ ### Code Step
100
+ ```json
101
+ {
102
+ "id": "transform",
103
+ "type": "code",
104
+ "name": "Transform Data",
105
+ "codeConfig": { "language": "javascript", "code": "const data = {{steps.prev.output}};\nreturn data.map(x => x.name);" },
106
+ "next": { "stepId": "next-step" }
107
+ }
108
+ ```
109
+
110
+ ### Milestone (terminal)
111
+ ```json
112
+ { "id": "done", "type": "milestone", "name": "Complete" }
113
+ ```
114
+
115
+ ## Template Variables
116
+
117
+ | Pattern | Description |
118
+ |---------|-------------|
119
+ | `{{input.fieldName}}` | Input page field value |
120
+ | `{{steps.stepId.field}}` | Previous step output |
121
+ | `{{currentItem}}` | Current item in a loop |
122
+ | `{{currentItem.field}}` | Nested field in loop item |
123
+
124
+ ## Loop Configuration
125
+
126
+ To iterate over a list from a previous step:
127
+ ```json
128
+ {
129
+ "loopConfig": { "enabled": true, "field": "{{steps.prev.items}}", "ItemAlias": "currentItem" }
130
+ }
131
+ ```
132
+
133
+ ## Entry Conditions
134
+
135
+ Skip or stop a step based on prior output:
136
+ ```json
137
+ {
138
+ "entryConditions": {
139
+ "onCriteriaFail": "skip",
140
+ "conditionText": "Skip if no URL",
141
+ "criteria": [{ "variable": "{{input.url}}", "operator": "isNotNull" }]
142
+ }
143
+ }
144
+ ```
145
+
146
+ Operators: `==`, `!=`, `>`, `<`, `isNull`, `isNotNull`, `contains`.
147
+
148
+ **Important**: Use `criteria` (not `conditions`) and `variable` (not `field`).
@@ -0,0 +1,74 @@
1
+ # Local Workspace Folder & Workspace Surfaces
2
+
3
+ > Loaded on demand from the Agentled skill. Read this when a task spans more
4
+ > than a single tool call and produces local artifacts (drafts, decisions,
5
+ > debug bundles), or when seeding a templated workspace's sidebar/home.
6
+
7
+ ## Local Workspace Folder — `agentled_<workspace-slug>/`
8
+
9
+ When working on Agentled tasks for a user (sourcing kits, workflow design, debugging executions, anything that spans more than a single tool call), **organize all local artifacts under a per-workspace folder named `agentled_<workspace-slug>/`** in the user's current working directory. The slug comes from the active workspace alias (e.g. `agentled_acme/`, `agentled_my-company/`) so a user with multiple workspaces never mixes their data. Resolve the slug from `agentled auth current` (use the alias if set, otherwise the workspace ID). Create the folder on first use; never scatter notes, JSON drafts, or transcripts at the repo root or under a generic `agentled_workspace/` name.
10
+
11
+ **Required structure (replace `<slug>` with the actual workspace slug):**
12
+
13
+ ```
14
+ agentled_<slug>/
15
+ README.md # what this folder is, current active workspace, last sync to KG
16
+ decisions/ # one file per non-trivial decision (theme, schema, source list, etc.)
17
+ YYYY-MM-DD-<slug>.md # context · options considered · decision · rationale · revisit-when
18
+ workflows/ # local drafts and copies of pipeline JSON before push
19
+ <workflow-id>.json # snapshot of the live workflow (use get_workflow → write file)
20
+ <slug>.draft.json # work-in-progress before create_workflow
21
+ groups/ # WorkflowGroup specs (see WG-001) — one file per group
22
+ <group-slug>.kit.json
23
+ kg/ # local mirrors / drafts of KG content
24
+ lists/<listKey>.schema.json
25
+ text/<key>.md # workspace company profile, theme docs, etc., before upserting
26
+ executions/ # debug bundles for failed runs
27
+ <executionId>/timeline.json, step-outputs/, notes.md
28
+ worklog.md # append-only chronological log of what was done, in 1-2 lines per entry
29
+ ```
30
+
31
+ **Why a local folder at all when the KG already stores state?**
32
+ - KG is *workspace truth* — durable, structured, queryable. The local folder is *agent scratch* — drafts, decision rationale, raw debug data, transcripts. Mixing them pollutes the KG and loses local iteration history.
33
+ - Decisions ("we chose theme X for next edition", "we picked OpenVC + Crunchbase as initial sources") need a paper trail with reasoning. KG entries should carry the *outcome*, not the deliberation.
34
+ - Workflow drafts often go through 3-5 iterations before push — keep them local until ready.
35
+
36
+ **Sync rule:** at the end of any meaningful working session — and explicitly when the user says "save", "wrap up", "we're done for now" — summarize what's *durable and reusable* (final decisions, current themes, active sources, workflow purpose statements) and write it to the workspace KG via `upsert_knowledge_text` (for narrative docs) or `upsert_knowledge_rows` (for structured data). Use stable, predictable keys: `decisions.current-theme`, `groups.<slug>.spec`, `workflows.<id>.purpose`. For any group of workflows that forms a client-facing workspace pipeline, also create or update a client-readable KG text guide such as `<workspace-or-pipeline>.design`, `groups.<slug>.guide`, or `pipelines.<slug>.design`. Put the client explanation first (what it does, how it works, where data comes from, how approvals/sync/reporting work), then put workflow IDs, caveats, and debug details under "Operator Notes." Append a one-line entry to `worklog.md` recording what was synced and when.
37
+
38
+ **Worksession feedback:** in the final user-facing wrap-up for each meaningful working session, include a concise retrospective: what worked, what did not work or blocked progress, concrete improvements for the next session, and any follow-up risks. 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>"`.
39
+
40
+ **Don't sync:** raw debug bundles, full execution timelines, abandoned drafts, transcripts. Those stay local. Sync only what a future session — or another agent — will actually need to pick up the work.
41
+
42
+ **On session start:** if `agentled_<slug>/` for the active workspace already exists, read `README.md` and the most recent `decisions/` and `worklog.md` entries before proposing anything new. If it doesn't exist, ask the user once whether they want you to create it for this project, then proceed. If the user has multiple workspaces, only act on the folder matching the currently active workspace from `agentled auth current` — never operate on a sibling folder.
43
+
44
+ ## Workspace Surfaces
45
+
46
+ The workspace home and sidebar carry workspace-level UI state on `Workspace.metadata`. These surfaces are read-only via the MCP today (most tooling does not need to write them), but agents authoring templated workspaces should know they exist:
47
+
48
+ ### Pinned outputs (sidebar shortcuts)
49
+
50
+ `Workspace.metadata.pinnedOutputs[]` lists output pages that appear in the sidebar **after Knowledge & Data**, always visible regardless of which workflow is currently open. Operators set these manually from each output page's configuration sheet (toggle: *"Pin to workspace home"*). Pin sparingly: only pin output pages that are useful as direct workspace-level destinations, such as a recurring report, scoring dashboard, or canonical results list. Do not pin every output page, implementation detail, approval surface, or one-off execution artifact; normal workflow output pages remain accessible from the workflow itself. Each entry:
51
+
52
+ ```json
53
+ {
54
+ "pipelineId": "wfl_abc123",
55
+ "pipelinePathname": "deal-flow",
56
+ "outputPagePathname": "weekly-report",
57
+ "label": "Weekly Investor Report",
58
+ "iconName": "FileText",
59
+ "pipelineName": "Deal Sourcing",
60
+ "colorTextClass": "text-emerald-700 dark:text-emerald-400",
61
+ "pinnedAt": "2026-05-09T10:00:00Z"
62
+ }
63
+ ```
64
+
65
+ All snapshot fields capture the source values at pin time and do not auto-update if the workflow or page is later renamed or restyled. To refresh, the operator unpins and re-pins.
66
+
67
+ Sidebar rendering uses each field directly:
68
+ - `label` is the primary line.
69
+ - `pipelineName` renders in small muted text below the label, so two pins with the same `label` from different workflows are distinguishable.
70
+ - `iconName` resolves to a lucide icon (defaults to `Pin` if missing or unknown).
71
+ - `colorTextClass` is applied as a Tailwind class on the icon, mirroring the source workflow's accent. Use the same shape produced by the workflow style picker (e.g. `text-emerald-700 dark:text-emerald-400`).
72
+ - The pin row renders as **active** when the operator's current URL matches the pin's target.
73
+
74
+ When seeding a workspace via templates, pre-populate `pinnedOutputs[]` only for the curated artifacts the operator should access directly from the workspace sidebar on day one. Supply `pipelineName` and `colorTextClass` for the proper rendering (otherwise they fall back to the muted default, which still works but loses the visual cue). Pin entries reference output pages that exist on workflows in the same workspace; entries pointing at deleted or renamed pipelines still render — the URL just resolves to a 404 page until the pin is removed.