@agentled/cli 0.6.7 → 0.7.2
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/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.txt +12 -1
- package/package.json +3 -3
- package/skills/agentled/SKILL.md +30 -1
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* `agentled setup` — single canonical entrypoint for new users.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Orchestrates the seven-step flow:
|
|
5
|
+
* 1. Version check (warns if outdated)
|
|
6
|
+
* 2. Browser sign-in + workspace selection
|
|
7
|
+
* 3. Workspace folder scaffold (agentled_<slug>/)
|
|
8
|
+
* 4. MCP auto-config (Claude Code, Codex, Cursor, Claude Desktop, Windsurf)
|
|
9
|
+
* 5. Skill install (writes SKILL.md to the client's skill directory)
|
|
10
|
+
* 6. Knowledge probe (knowledge.company.profile; if missing, prompt + write)
|
|
11
|
+
* 7. Restart prompt (printed at end of setup)
|
|
12
|
+
*
|
|
13
|
+
* Replaces the legacy `agentled setup` (company-profile-only) which required
|
|
14
|
+
* prior auth and only wrote workspace company info. The legacy company-profile
|
|
15
|
+
* prompt logic is preserved as `runOnboarding()` and called from step 6 —
|
|
16
|
+
* but it now writes to `knowledge.company.profile` (the same key the probe
|
|
17
|
+
* reads), so the prompt does not re-fire on the next run.
|
|
5
18
|
*/
|
|
6
19
|
import { Command } from 'commander';
|
|
7
20
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
21
|
+
* Interactive prompt to populate the workspace company profile. Called by
|
|
22
|
+
* step 6 of `agentled setup` when the workspace knowledge probe finds no
|
|
23
|
+
* existing `knowledge.company.profile`, and by `auth login` for new users.
|
|
10
24
|
*/
|
|
11
25
|
export declare function runOnboarding(): Promise<void>;
|
|
12
26
|
export declare function registerOnboardingCommands(program: Command): void;
|
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* `agentled setup` — single canonical entrypoint for new users.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Orchestrates the seven-step flow:
|
|
5
|
+
* 1. Version check (warns if outdated)
|
|
6
|
+
* 2. Browser sign-in + workspace selection
|
|
7
|
+
* 3. Workspace folder scaffold (agentled_<slug>/)
|
|
8
|
+
* 4. MCP auto-config (Claude Code, Codex, Cursor, Claude Desktop, Windsurf)
|
|
9
|
+
* 5. Skill install (writes SKILL.md to the client's skill directory)
|
|
10
|
+
* 6. Knowledge probe (knowledge.company.profile; if missing, prompt + write)
|
|
11
|
+
* 7. Restart prompt (printed at end of setup)
|
|
12
|
+
*
|
|
13
|
+
* Replaces the legacy `agentled setup` (company-profile-only) which required
|
|
14
|
+
* prior auth and only wrote workspace company info. The legacy company-profile
|
|
15
|
+
* prompt logic is preserved as `runOnboarding()` and called from step 6 —
|
|
16
|
+
* but it now writes to `knowledge.company.profile` (the same key the probe
|
|
17
|
+
* reads), so the prompt does not re-fire on the next run.
|
|
5
18
|
*/
|
|
6
|
-
import {
|
|
19
|
+
import { existsSync } from 'node:fs';
|
|
20
|
+
import { resolve } from 'node:path';
|
|
7
21
|
import * as readline from 'node:readline';
|
|
22
|
+
import { AgentledApiClient } from '@agentled/core';
|
|
23
|
+
import { AgentledClient, getBaseUrl, saveWorkspaceProfile } from '../client.js';
|
|
24
|
+
import { browserLogin } from '../utils/browser-auth.js';
|
|
25
|
+
import { installSkills, getSkillsTargetDir, getCodexInstructionsDir, summarizeForLoginBanner, } from '../utils/skills.js';
|
|
26
|
+
import { configureMcp, getClientLabel } from '../utils/mcp-config.js';
|
|
27
|
+
import { checkCliVersion, summarizeVersionCheck } from '../utils/version-check.js';
|
|
28
|
+
import { probeCompanyKnowledge, summarizeKnowledgeProbe } from '../utils/knowledge-probe.js';
|
|
29
|
+
import { bootstrapAgentledHome } from '../utils/home-bootstrap.js';
|
|
30
|
+
import { createWorkspaceFolder } from '../utils/workspace-folder.js';
|
|
8
31
|
function prompt(question) {
|
|
9
32
|
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
10
|
-
return new Promise(
|
|
11
|
-
rl.question(question,
|
|
33
|
+
return new Promise(resolve => {
|
|
34
|
+
rl.question(question, answer => {
|
|
12
35
|
rl.close();
|
|
13
36
|
resolve(answer.trim());
|
|
14
37
|
});
|
|
@@ -16,18 +39,13 @@ function prompt(question) {
|
|
|
16
39
|
}
|
|
17
40
|
function promptSelect(question, options) {
|
|
18
41
|
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
19
|
-
return new Promise(
|
|
42
|
+
return new Promise(resolve => {
|
|
20
43
|
console.error(question);
|
|
21
44
|
options.forEach((opt, i) => console.error(` ${i + 1}. ${opt}`));
|
|
22
|
-
rl.question(` Choice [1-${options.length}]: `,
|
|
45
|
+
rl.question(` Choice [1-${options.length}]: `, answer => {
|
|
23
46
|
rl.close();
|
|
24
47
|
const idx = parseInt(answer.trim(), 10) - 1;
|
|
25
|
-
|
|
26
|
-
resolve(options[idx]);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
resolve(options[options.length - 1]); // default to last (Other)
|
|
30
|
-
}
|
|
48
|
+
resolve(idx >= 0 && idx < options.length ? options[idx] : options[options.length - 1]);
|
|
31
49
|
});
|
|
32
50
|
});
|
|
33
51
|
}
|
|
@@ -41,11 +59,6 @@ const USE_CASES = [
|
|
|
41
59
|
'General process automation',
|
|
42
60
|
'Other',
|
|
43
61
|
];
|
|
44
|
-
/**
|
|
45
|
-
* Best-effort fetch of a public website's <title> and meta description to
|
|
46
|
-
* pre-populate the workspace knowledge. Failures are non-fatal — onboarding
|
|
47
|
-
* continues with whatever info was collected interactively.
|
|
48
|
-
*/
|
|
49
62
|
async function fetchSiteMetadata(rawUrl) {
|
|
50
63
|
const ac = new AbortController();
|
|
51
64
|
const timer = setTimeout(() => ac.abort(), 8000);
|
|
@@ -68,31 +81,32 @@ async function fetchSiteMetadata(rawUrl) {
|
|
|
68
81
|
return null;
|
|
69
82
|
}
|
|
70
83
|
finally {
|
|
71
|
-
// Always clear — fast network/DNS/TLS failures otherwise leave the timer
|
|
72
|
-
// pending for up to 8s and keep the Node event loop alive, making the
|
|
73
|
-
// CLI appear to hang after onboarding finishes.
|
|
74
84
|
clearTimeout(timer);
|
|
75
85
|
}
|
|
76
86
|
}
|
|
87
|
+
function buildProfileText(company) {
|
|
88
|
+
return [
|
|
89
|
+
company.name ? `Company: ${company.name}` : null,
|
|
90
|
+
company.description ? `\n${company.description}` : null,
|
|
91
|
+
company.urls?.length ? `\nWebsite: ${company.urls.join(', ')}` : null,
|
|
92
|
+
company.additionalInformation ? `\n${company.additionalInformation}` : null,
|
|
93
|
+
].filter(Boolean).join('\n').trim();
|
|
94
|
+
}
|
|
77
95
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
96
|
+
* Interactive prompt to populate the workspace company profile. Called by
|
|
97
|
+
* step 6 of `agentled setup` when the workspace knowledge probe finds no
|
|
98
|
+
* existing `knowledge.company.profile`, and by `auth login` for new users.
|
|
80
99
|
*/
|
|
81
100
|
export async function runOnboarding() {
|
|
82
101
|
console.error('\n Welcome! Let\'s finish setting up your workspace.\n');
|
|
83
102
|
const companyName = await prompt(' ? Company name: ');
|
|
84
103
|
const website = await prompt(' ? Company website (optional): ');
|
|
85
104
|
const useCase = await promptSelect(' ? Primary use case:', USE_CASES);
|
|
86
|
-
// Build profile payload
|
|
87
105
|
const company = {};
|
|
88
106
|
if (companyName)
|
|
89
107
|
company.name = companyName;
|
|
90
108
|
if (website)
|
|
91
109
|
company.urls = [website];
|
|
92
|
-
// If a website was provided, try to read it and seed the workspace
|
|
93
|
-
// knowledge with the site's title + meta description. This populates
|
|
94
|
-
// `company.profile` knowledge text so agents have context immediately
|
|
95
|
-
// without the user having to type a description by hand.
|
|
96
110
|
if (website) {
|
|
97
111
|
process.stderr.write(' Reading website to seed knowledge… ');
|
|
98
112
|
const meta = await fetchSiteMetadata(website);
|
|
@@ -114,40 +128,210 @@ export async function runOnboarding() {
|
|
|
114
128
|
company.additionalInformation = additional.join('\n');
|
|
115
129
|
if (Object.keys(company).length === 0) {
|
|
116
130
|
console.error('\n Skipped — no company info provided.');
|
|
117
|
-
console.error(' You can set this up later with "agentled
|
|
131
|
+
console.error(' You can set this up later with "agentled workspace company-profile".\n');
|
|
118
132
|
return;
|
|
119
133
|
}
|
|
134
|
+
// AgentledClient extends AgentledApiClient, so all KG / workspace / etc.
|
|
135
|
+
// methods are directly callable on this instance — no second client needed.
|
|
136
|
+
const cliClient = new AgentledClient();
|
|
120
137
|
try {
|
|
121
|
-
|
|
122
|
-
await client.updateWorkspaceCompanyProfile(company);
|
|
123
|
-
console.error('\n Workspace configured! ✓');
|
|
124
|
-
// Auto-seeded fields are minimal (title + meta description). Prompt the
|
|
125
|
-
// calling AI agent to do its own research and enrich the workspace
|
|
126
|
-
// knowledge so future workflows have richer context to work from.
|
|
127
|
-
console.error('\n Agent: please research this company further and enrich the workspace.');
|
|
128
|
-
console.error(' Suggested next actions:');
|
|
129
|
-
console.error(' • Read the company website thoroughly (about/team/blog/pricing).');
|
|
130
|
-
console.error(' • Pull LinkedIn (get-linkedin-company-from-url) and recent posts.');
|
|
131
|
-
console.error(' • Use upsert_knowledge_text to store: company.profile (long-form),');
|
|
132
|
-
console.error(' company.icp (target customers), company.products, company.tone.');
|
|
133
|
-
console.error(' • Confirm the result with the user before moving on.\n');
|
|
138
|
+
await cliClient.updateWorkspaceCompanyProfile(company);
|
|
134
139
|
}
|
|
135
140
|
catch (err) {
|
|
136
|
-
console.error(
|
|
137
|
-
|
|
141
|
+
console.error(` ⚠ Could not save workspace profile record (${err.message}).`);
|
|
142
|
+
}
|
|
143
|
+
const profileText = buildProfileText(company);
|
|
144
|
+
if (profileText) {
|
|
145
|
+
try {
|
|
146
|
+
await cliClient.upsertKnowledgeText({
|
|
147
|
+
key: 'knowledge.company.profile',
|
|
148
|
+
content: profileText,
|
|
149
|
+
title: company.name || 'Company profile',
|
|
150
|
+
});
|
|
151
|
+
console.error('\n Workspace configured! ✓ (knowledge.company.profile written)');
|
|
152
|
+
}
|
|
153
|
+
catch (err) {
|
|
154
|
+
console.error(`\n ⚠ Could not write knowledge.company.profile (${err.message}).`);
|
|
155
|
+
console.error(' The probe will re-prompt on the next \`agentled setup\` run.');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
console.error('\n Next:');
|
|
159
|
+
console.error(' • Read the company website thoroughly (about/team/blog/pricing).');
|
|
160
|
+
console.error(' • Pull LinkedIn (get-linkedin-company-from-url) and recent posts.');
|
|
161
|
+
console.error(' • Use upsert_knowledge_text to enrich knowledge.company.profile (long-form),');
|
|
162
|
+
console.error(' knowledge.company.products. Skip .icp / .tone for now — add when needed.\n');
|
|
163
|
+
}
|
|
164
|
+
// ---------------------------------------------------------------------------
|
|
165
|
+
// `agentled setup` orchestration
|
|
166
|
+
// ---------------------------------------------------------------------------
|
|
167
|
+
function printSection(label, step, total) {
|
|
168
|
+
console.error('');
|
|
169
|
+
console.error(` [${step}/${total}] ${label}`);
|
|
170
|
+
console.error('');
|
|
171
|
+
}
|
|
172
|
+
function skillTargetForClient(client) {
|
|
173
|
+
if (client === 'claude-code' || client === 'claude-desktop') {
|
|
174
|
+
return { kind: 'claude', dir: getSkillsTargetDir(true) };
|
|
175
|
+
}
|
|
176
|
+
if (client === 'codex') {
|
|
177
|
+
return { kind: 'codex', dir: getCodexInstructionsDir() };
|
|
138
178
|
}
|
|
179
|
+
return { kind: 'skip', dir: null };
|
|
180
|
+
}
|
|
181
|
+
async function runSetup() {
|
|
182
|
+
console.error('');
|
|
183
|
+
console.error(' ◆ Agentled Setup');
|
|
184
|
+
console.error(' One command: auth → workspace folder → MCP → skill → knowledge probe.');
|
|
185
|
+
console.error('');
|
|
186
|
+
const baseUrl = getBaseUrl().replace(/\/$/, '');
|
|
187
|
+
const TOTAL_STEPS = 7;
|
|
188
|
+
// Step 1
|
|
189
|
+
printSection('Version check', 1, TOTAL_STEPS);
|
|
190
|
+
const versionResult = await checkCliVersion();
|
|
191
|
+
const versionLine = summarizeVersionCheck(versionResult);
|
|
192
|
+
if (versionLine) {
|
|
193
|
+
console.error(` ⚠ ${versionLine}`);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
console.error(` ✓ @agentled/cli v${versionResult.installed}${versionResult.latest ? ' (latest)' : ''}`);
|
|
197
|
+
}
|
|
198
|
+
// Step 2
|
|
199
|
+
printSection('Sign in & select workspace', 2, TOTAL_STEPS);
|
|
200
|
+
const loginResult = await browserLogin(baseUrl);
|
|
201
|
+
saveWorkspaceProfile({
|
|
202
|
+
id: loginResult.workspaceId,
|
|
203
|
+
name: loginResult.workspaceName,
|
|
204
|
+
apiKey: loginResult.apiKey,
|
|
205
|
+
baseUrl: loginResult.baseUrl || baseUrl,
|
|
206
|
+
userId: loginResult.userId,
|
|
207
|
+
userEmail: loginResult.userEmail,
|
|
208
|
+
userName: loginResult.userName,
|
|
209
|
+
});
|
|
210
|
+
console.error(` ✓ Authenticated to workspace "${loginResult.workspaceName}"`);
|
|
211
|
+
const homeBootstrap = bootstrapAgentledHome();
|
|
212
|
+
if (homeBootstrap.refreshed) {
|
|
213
|
+
console.error(` ✓ Wrote ~/.agentled/ docs and ${homeBootstrap.scaffoldsCopied} scaffolds (content v${homeBootstrap.version})`);
|
|
214
|
+
}
|
|
215
|
+
// Step 3
|
|
216
|
+
printSection('Scaffold workspace folder', 3, TOTAL_STEPS);
|
|
217
|
+
const apiClient = new AgentledClient();
|
|
218
|
+
let folderName = null;
|
|
219
|
+
try {
|
|
220
|
+
const [workspace, appsList, modelsList] = await Promise.allSettled([
|
|
221
|
+
apiClient.getWorkspace(),
|
|
222
|
+
apiClient.listApps(),
|
|
223
|
+
apiClient.listModels(),
|
|
224
|
+
]);
|
|
225
|
+
if (workspace.status === 'fulfilled') {
|
|
226
|
+
const ws = workspace.value;
|
|
227
|
+
const slug = String(ws.slug ?? loginResult.workspaceId.replace(/^ws_/, '') ?? 'workspace');
|
|
228
|
+
folderName = `agentled_${slug}`;
|
|
229
|
+
const folderPath = resolve(process.cwd(), folderName);
|
|
230
|
+
if (existsSync(folderPath)) {
|
|
231
|
+
console.error(` • ${folderName}/ already exists — leaving as-is. Run \`agentled workspace sync\` to refresh.`);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
const meta = {
|
|
235
|
+
workspaceId: loginResult.workspaceId,
|
|
236
|
+
slug,
|
|
237
|
+
name: loginResult.workspaceName,
|
|
238
|
+
apiBase: baseUrl,
|
|
239
|
+
syncedAt: new Date().toISOString(),
|
|
240
|
+
};
|
|
241
|
+
createWorkspaceFolder(folderPath, meta, {
|
|
242
|
+
appsList: appsList.status === 'fulfilled' ? appsList.value : undefined,
|
|
243
|
+
modelsList: modelsList.status === 'fulfilled' ? modelsList.value : undefined,
|
|
244
|
+
});
|
|
245
|
+
console.error(` ✓ Created ${folderName}/ in current directory`);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
console.error(` ⚠ Could not load workspace metadata (${workspace.reason?.message ?? 'unknown'}). Run \`agentled init\` later.`);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
catch (err) {
|
|
253
|
+
console.error(` ⚠ Folder scaffold skipped (${err?.message ?? err}). Run \`agentled init\` later.`);
|
|
254
|
+
}
|
|
255
|
+
// Step 4
|
|
256
|
+
printSection('Configure MCP client', 4, TOTAL_STEPS);
|
|
257
|
+
const mcpResult = await configureMcp(loginResult.apiKey, loginResult.baseUrl || baseUrl);
|
|
258
|
+
if (mcpResult.success) {
|
|
259
|
+
console.error(` ✓ Registered "agentled" MCP server in ${getClientLabel(mcpResult.client)}${mcpResult.configPath ? ` (${mcpResult.configPath})` : ''}`);
|
|
260
|
+
}
|
|
261
|
+
else if (mcpResult.fallbackHint) {
|
|
262
|
+
console.error(` ⚠ Could not auto-configure MCP. Manual instructions:`);
|
|
263
|
+
console.error('');
|
|
264
|
+
for (const line of mcpResult.fallbackHint.split('\n'))
|
|
265
|
+
console.error(` ${line}`);
|
|
266
|
+
}
|
|
267
|
+
// Step 5
|
|
268
|
+
printSection('Install Agentled skill', 5, TOTAL_STEPS);
|
|
269
|
+
const skillTarget = skillTargetForClient(mcpResult.client);
|
|
270
|
+
if (skillTarget.kind === 'skip') {
|
|
271
|
+
console.error(` • Skill auto-install not supported for ${getClientLabel(mcpResult.client)} — skipped.`);
|
|
272
|
+
console.error(` Run \`agentled skills install\` if your client supports Claude-format skills.`);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
try {
|
|
276
|
+
const results = installSkills({ targetDir: skillTarget.dir });
|
|
277
|
+
const banner = summarizeForLoginBanner(results, skillTarget.dir);
|
|
278
|
+
if (banner) {
|
|
279
|
+
console.error(` ✓ ${banner}`);
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
console.error(` • Skill already installed in ${skillTarget.dir}`);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
catch (err) {
|
|
286
|
+
console.error(` ⚠ Skill install skipped (${err?.message ?? err}). Run \`agentled skills install\` later.`);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
// Step 6 — the probe explicitly uses loginResult.apiKey/baseUrl rather
|
|
290
|
+
// than the saved-config-resolved `apiClient`, so a stale AGENTLED_API_KEY
|
|
291
|
+
// env var pointing at a different workspace cannot mask the
|
|
292
|
+
// just-authenticated workspace's knowledge.
|
|
293
|
+
printSection('Probe workspace knowledge', 6, TOTAL_STEPS);
|
|
294
|
+
const probe = await probeCompanyKnowledge(new AgentledApiClient({
|
|
295
|
+
apiKey: loginResult.apiKey,
|
|
296
|
+
baseUrl: loginResult.baseUrl || baseUrl,
|
|
297
|
+
missingAuthMessage: 'API key is required.',
|
|
298
|
+
}));
|
|
299
|
+
console.error(` ${probe.profilePresent ? '✓' : '•'} ${summarizeKnowledgeProbe(probe)}`);
|
|
300
|
+
if (!probe.profilePresent && !probe.error) {
|
|
301
|
+
await runOnboarding();
|
|
302
|
+
}
|
|
303
|
+
// Step 7
|
|
304
|
+
printSection('Restart your MCP client', 7, TOTAL_STEPS);
|
|
305
|
+
console.error(' Your MCP client must restart to pick up the new connection:');
|
|
306
|
+
console.error(' • Claude Code: /mcp → reconnect, or restart the session');
|
|
307
|
+
console.error(' • Codex / Cursor: quit and reopen the app');
|
|
308
|
+
console.error('');
|
|
309
|
+
console.error(' ——— Setup complete ———');
|
|
310
|
+
console.error('');
|
|
311
|
+
if (folderName) {
|
|
312
|
+
console.error(` Workspace folder: ./${folderName}/`);
|
|
313
|
+
}
|
|
314
|
+
console.error(' Global home: ~/.agentled/ (config, docs, scaffolds)');
|
|
315
|
+
console.error('');
|
|
316
|
+
console.error(' Try: "agentled --help" or talk to your agent.');
|
|
317
|
+
console.error('');
|
|
139
318
|
}
|
|
140
319
|
export function registerOnboardingCommands(program) {
|
|
141
320
|
program
|
|
142
321
|
.command('setup')
|
|
143
|
-
.description('
|
|
322
|
+
.description('Connect Agentled end-to-end: auth → workspace folder → MCP → skill → knowledge probe')
|
|
144
323
|
.action(async () => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
324
|
+
try {
|
|
325
|
+
await runSetup();
|
|
326
|
+
}
|
|
327
|
+
catch (err) {
|
|
328
|
+
console.error(`\n ✗ Setup failed: ${err?.message ?? err}`);
|
|
329
|
+
console.error(' You can re-run \`agentled setup\`, or run components individually:');
|
|
330
|
+
console.error(' agentled auth login # browser auth');
|
|
331
|
+
console.error(' agentled init # workspace folder');
|
|
332
|
+
console.error(' agentled skills install # install Claude Code skill');
|
|
148
333
|
process.exit(1);
|
|
149
334
|
}
|
|
150
|
-
await runOnboarding();
|
|
151
335
|
});
|
|
152
336
|
}
|
|
153
337
|
//# sourceMappingURL=onboarding.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding.js","sourceRoot":"","sources":["../../src/commands/onboarding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,SAAS,MAAM,CAAC,QAAgB;IAC5B,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACtF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YAC7B,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,YAAY,CAAC,QAAgB,EAAE,OAAiB;IACrD,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE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,iDAAiD,CAAC,CAAC;IACjE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACvD,OAAO;SACF,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,sFAAsF,CAAC;SACnG,MAAM,CAAC,KAAK,IAAI,EAAE;QACf,IAAI,CAAC;YACD,MAAM,QAAQ,EAAE,CAAC;QACrB,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,uBAAuB,GAAG,EAAE,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC;YAC5D,OAAO,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;YACtF,OAAO,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;YAC/D,OAAO,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;YACnE,OAAO,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;YAC5E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundled docs written into `~/.agentled/docs/` on `agentled setup` runs.
|
|
3
|
+
*
|
|
4
|
+
* Embedded as string constants so they ship with the CLI release (same
|
|
5
|
+
* pattern as GOTCHAS.md in workspace-folder.ts).
|
|
6
|
+
*
|
|
7
|
+
* **`docs/` is CLI-managed.** Treat the bundled files as read-only — they
|
|
8
|
+
* are unconditionally rewritten when `HOME_CONTENT_VERSION` advances
|
|
9
|
+
* past the on-disk marker. Anyone who wants to edit local notes should
|
|
10
|
+
* put them in `~/.agentled/docs/local/` (never touched by the bootstrap)
|
|
11
|
+
* or in the per-workspace `agentled_<slug>/` folder.
|
|
12
|
+
*
|
|
13
|
+
* `HOME_CONTENT_VERSION` is intentionally **decoupled from the CLI
|
|
14
|
+
* package version** — it is an opaque integer that bumps only when one
|
|
15
|
+
* of the constants below changes. A CLI patch bump that touches no doc
|
|
16
|
+
* content does not refresh `~/.agentled/`.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Bump this every time any HOME_README_MD / WORKFLOW_SHAPE_MD /
|
|
20
|
+
* GETTING_STARTED_MD / GOTCHAS_MD / PATTERNS_MD constant changes.
|
|
21
|
+
*
|
|
22
|
+
* Do NOT pin to the CLI semver — that bumps for unrelated reasons and
|
|
23
|
+
* causes spurious doc rewrites on every patch release.
|
|
24
|
+
*/
|
|
25
|
+
export declare const HOME_CONTENT_VERSION = "3";
|
|
26
|
+
export declare const HOME_README_MD = "# AgentLed\n\nYou've installed the AgentLed CLI. Your AI agent (Claude Code, Codex, Cursor, Claude Desktop, Windsurf) can now build and run workflows for you.\n\n## Talk to your agent\n\nOnce `agentled setup` is done and you've restarted your MCP client, just describe what you want. The agent has access to AgentLed's MCP tools, your workspace's knowledge graph, and 100+ integrations.\n\nTry one:\n- \"Source fintech CTOs in Europe via search and LinkedIn, score by ICP fit, email me the top 10 daily.\"\n- \"Qualify inbound form submissions and route the high-score ones to a Slack channel.\"\n- \"Pull competitor pricing pages weekly, summarize changes, send a diff report.\"\n\n## What lives here\n\n- `config.json` \u2014 saved workspace profiles (managed by `agentled auth`).\n- `docs/` \u2014 brief design guide your agent reads on session start. **CLI-managed: treat as read-only.** Files here are rewritten when the bundled doc version advances.\n- `docs/local/` \u2014 your own notes. **Never overwritten by the CLI.** Put any edits or additions here.\n- `examples/scaffolds/` \u2014 preflight-clean pipeline templates your agent adapts to your intent. Also CLI-managed.\n\nPer-workspace artifacts (logs, dryruns, decisions, drafts) live in `agentled_<workspace-slug>/` in your project directory \u2014 one folder per workspace.\n\n## CLI commands\n\n```\nagentled --help # list commands\nagentled auth current # active workspace\nagentled workflows list # workflows in your workspace\nagentled examples # browse pattern templates\n```\n\n## Open patterns reference\n\nFor extended workflow patterns and anti-patterns beyond the bundled scaffolds, see the public agentic-ops repo: https://github.com/Agentled/agentic-ops. Optional reading \u2014 the bundled `docs/` and `examples/scaffolds/` are sufficient for first-workflow building.\n";
|
|
27
|
+
export declare const WORKFLOW_SHAPE_MD = "# Workflow shape \u2014 source \u2192 list \u2192 orchestrator \u2192 outreach\n\nThe canonical AgentLed workflow shape, optimized for re-runnable, dedup-safe pipelines.\n\n## The list is the spine\n\nA KG list (e.g. `kg.list.leads`) holds every entity your business cares about. Multiple sourcing workflows write into the same list. One orchestrator workflow reads from it, processes, and transitions row state.\n\nTwo indexes make this efficient:\n\n1. **`userKey`** \u2014 caller-supplied dedup index. Use a stable identifier per row (domain, LinkedIn URL, email hash). `kg.upsert-rows` with the same `userKey` writes to the same row, every time, forever. No table scan, no duplicate explosion.\n2. **`status`** \u2014 the queue marker. New rows start at `status: \"new\"`. The orchestrator filters by status, processes only rows in the relevant state, and transitions status as it goes (`scored`, `qualified`, `contacted`, `rejected`).\n\n## Sourcing workflows (1+)\n\nEach sourcing workflow has one job: find entities, write them with a `userKey` and `status: \"new\"`. Use `mergeStrategy: \"merge\"` so downstream-added fields (scores, notes) survive a re-source. Many sourcing workflows can write to the same list.\n\n```json\n{\n \"id\": \"save-to-list\",\n \"type\": \"appAction\",\n \"app\": { \"id\": \"kg\", \"actionId\": \"kg.upsert-rows\", \"source\": \"native\" },\n \"stepInputData\": {\n \"listKey\": \"leads\",\n \"rows\": \"{{steps.extract.items}}\",\n \"mergeStrategy\": \"merge\",\n \"status\": \"new\"\n }\n}\n```\n\n> Note: pass `rows` directly as the template variable \u2014 do NOT wrap it in `JSON.stringify` or quote-escape the array. The serializer inlines the raw value (see GOTCHAS.md #12). The `filters` field on `kg.read-list` (below) is the exception \u2014 it expects a JSON-string body, not an array, so the escaped object literal is correct there.\n\n## Orchestrator workflow (1)\n\nSchedule trigger \u2192 `kg.read-list` filtered by `status: \"new\"` \u2192 loop \u2192 score / qualify / route \u2192 `kg.update-rows` to transition status.\n\n```json\n// Step 1: read pending rows\n{\n \"id\": \"read-pending\",\n \"type\": \"appAction\",\n \"app\": { \"id\": \"kg\", \"actionId\": \"kg.read-list\", \"source\": \"native\" },\n \"stepInputData\": { \"listKey\": \"leads\", \"filters\": \"{\\\"status\\\": \\\"new\\\"}\", \"limit\": \"50\" }\n}\n\n// Step N: transition status\n{\n \"id\": \"mark-scored\",\n \"type\": \"appAction\",\n \"app\": { \"id\": \"kg\", \"actionId\": \"kg.update-rows\", \"source\": \"native\" },\n \"stepInputData\": {\n \"listKey\": \"leads\",\n \"rowIds\": \"{{steps.score.processedIds}}\",\n \"fieldUpdates\": \"{\\\"status\\\": \\\"scored\\\"}\"\n }\n}\n```\n\n## Outreach workflow (1, optional)\n\nOften folded into the orchestrator. When separate: schedule trigger \u2192 `kg.read-list` filtered by `status: \"qualified\"` \u2192 compose email (with approval gate) \u2192 `schedule-email` \u2192 mark `status: \"contacted\"`.\n\nWhy separate: outreach has different cadence (e.g. daily, batch-limited) than scoring (continuous), and you may want different approval gates per channel.\n\n## Status conventions\n\n| Value | Meaning |\n|-------|---------|\n| `new` | Sourced, not yet processed |\n| `scored` | Enriched + scored, awaiting routing |\n| `qualified` | Passes ICP / threshold, ready for outreach |\n| `rejected` | Failed scoring criteria |\n| `contacted` | Outreach sent |\n| `replied` | Reply received (set by an inbound workflow) |\n\nUse whatever values fit your domain. The pattern is: sourcing always sets one status, the orchestrator transitions through \u22651 status, reads always filter by status.\n\n## Why the spine matters\n\n- Multiple sourcing channels converge \u2014 one canonical list, no fan-out logic in each producer.\n- Re-running a source is idempotent \u2014 `userKey` dedup.\n- Re-running the orchestrator is idempotent \u2014 status filter excludes done rows.\n- Each phase has its own cadence \u2014 sourcing daily, orchestrator hourly, outreach business hours.\n- Failures are scoped \u2014 a bad source doesn't pollute scoring; a bad scorer doesn't break sourcing.\n\n## Pausing for human input \u2014 decouple via the list\n\nWhen a workflow needs human input partway through (e.g., \"meeting done, capture the outcome and transcript URL, then continue scoring\"), **don't try to pause inside one workflow**. Split it across the KG list spine \u2014 same shape as everything else.\n\n```\nWorkflow A (the producer)\n \u2026 reaches the point that needs human input \u2026\n \u2192 kg.update-rows: status = \"needs-meeting-outcome\"\n \u2192 milestone (A is done; row sits in the list)\n\nWorkflow B (user-triggered, manual)\n \u2192 trigger: manual, with input page asking for:\n - meeting_outcome (text)\n - transcript_url (url)\n \u2192 kg.update-rows: status = \"input-received\", fieldUpdates = { outcome, transcript }\n \u2192 milestone\n\nWorkflow C (the consumer, scheduled)\n \u2192 kg.read-list filtered by status = \"input-received\"\n \u2192 \u2026 continue scoring / qualifying using outcome + transcript \u2026\n \u2192 kg.update-rows: status = \"scored\"\n```\n\nWhy decouple:\n- Each workflow has its own cadence and trigger \u2014 the producer runs on schedule, the user-triggered B runs whenever the user has the data, the consumer runs on schedule. None blocks the other.\n- The KG row carries the state. If the user fills in the form a week later, it just works \u2014 nothing was hanging in memory waiting.\n- A new agent (or a teammate) can act on rows in any state at any time \u2014 the substrate is shared.\n- You can have multiple producers, multiple human-input forms (different roles, different channels), and one consumer. Or any other shape that fits.\n\nIn-workflow pause-with-input is possible in some cases via `milestone` with a configured input page, but the AgentLed-native approach for human-in-the-loop is the decoupled pattern above. Reach for it first.\n\n## Where to put what\n\n| You want to\u2026 | Use |\n|--------------|-----|\n| Capture per-execution input from a user | `context.inputPages` on the workflow |\n| Capture per-execution input from a public form / unauthed user | a workflow with a public form trigger and a public-form share configuration |\n| Reference workspace-wide context (ICP, tone, products, brand voice) | `knowledge.* text` (read via `kg.read-text`, written via `kg.upsert-text`) \u2014 shared across workflows and agents |\n| Hand a result back to the user as a viewable report | `aiAction` (structured output) \u2192 renderer config on that step \u2192 `share` step (creates URL) \u2192 email notification with the URL |\n| Pause one workflow until a human provides extra data | Split into two workflows + a status transition on the KG row (see \"Pausing for human input\" above) |\n| Track business value once a workflow is validated | `metadata.roi` + `eventSummary` per run + an `entryConditions` gate that skips the run when inputs wouldn't move the needle |\n\n### Report-and-share-back sequence\n\nThe canonical \"give me a report and email me a link\" sequence:\n\n```json\n// Step 1: aiAction with structured output the renderer can read\n{\n \"id\": \"compose-report\",\n \"type\": \"aiAction\",\n \"pipelineStepPrompt\": {\n \"template\": \"\u2026 build the report here \u2026\",\n \"responseStructure\": { \"title\": \"string\", \"sections\": [{ \"heading\": \"string\", \"body\": \"string\" }] }\n },\n \"renderer\": { \"type\": \"Config\", \"config\": { \"layout\": \"report\" } },\n \"creditCost\": 20,\n \"next\": { \"stepId\": \"make-share\" }\n}\n\n// Step 2: share step \u2192 mints a public URL pointing at compose-report's output\n{\n \"id\": \"make-share\",\n \"type\": \"share\",\n \"shareConfig\": { \"outputSteps\": [\"compose-report\"], \"visibility\": \"link\" },\n \"next\": { \"stepId\": \"notify\" }\n}\n\n// Step 3: email notification with the share URL inlined\n{\n \"id\": \"notify\",\n \"type\": \"aiAction\",\n \"pipelineStepPrompt\": {\n \"type\": \"email\",\n \"template\": \"Draft a 2-line email letting the user know their report is ready. Include the link.\",\n \"responseStructure\": {\n \"email\": {\n \"from\": \"{{context.outreachProfile.fromEmail}}\",\n \"to\": \"{{input.recipient_email}}\",\n \"subject\": \"Your report is ready\",\n \"body\": \"<p>Your report: <a href=\\\"{{steps.make-share.url}}\\\">view it here</a>.</p>\",\n \"bodyType\": \"html\"\n }\n }\n },\n \"onApproval\": { \"action\": \"schedule-email\" },\n \"next\": { \"stepId\": \"done\" }\n}\n```\n\n### Public input pattern\n\nFor workflows triggered by user-submitted forms (no auth required), use a public-form trigger and a share configuration that exposes the form at a stable slug. The form's submission payload becomes the workflow input. Same workflow shape applies; only the trigger differs.\n\n### Post-validation: ROI + business metrics\n\nOnce a workflow is validated and running:\n\n1. **ROI tracking** \u2014 add an `metadata.roi` block with hours saved per run, dollar value, conversion lift. Surfaces in the workflow header and the workspace metrics dashboard.\n2. **Per-run `eventSummary`** \u2014 emit a small structured log: count processed, count qualified, total credits, success rate. Powers the metrics dashboard and lets agents reason about workflow health from the KG.\n3. **`entryConditions` gate** \u2014 skip the run when its inputs wouldn't actually move the needle (e.g., `kg.read-list` returned 0 new rows, or upstream signal is below threshold). Avoids credit waste on no-op runs and produces cleaner ROI numbers.\n\nFull pattern reference (step types, schemas, all gotchas) is in the AgentLed skill loaded into your AI agent on session start.\n";
|
|
28
|
+
export declare const GETTING_STARTED_MD = "# Your first end-to-end workflow\n\nFive minutes from \"I have an idea\" to \"my agent built it\".\n\n## 1. Describe intent in one sentence\n\nGood prompts look like:\n\n- \"Source 50 fintech startups in Europe via search, write them to a leads list, score by ICP fit, and email me the top 10 weekly.\"\n- \"When a form is submitted, qualify against my ICP knowledge and post the high-score ones to #sales-qualified in Slack.\"\n\nBad prompts look like:\n\n- \"Build me a CRM.\" (Too broad \u2014 the agent doesn't know what to start with.)\n- \"Use aiAction with workspace_memory tool.\" (Too prescriptive \u2014 you're authoring the pipeline, not the agent.)\n\n## 2. Let the agent orient\n\nThe agent will run `workspace inspect` (or the equivalent MCP tools) to look at:\n\n- Your existing KG lists (so it can reuse rather than create duplicates).\n- Connected apps (LinkedIn, Hunter, Gmail, Slack \u2014 only what's authed will work).\n- Existing workflows (it won't recreate one you already have).\n- Existing agents and routines.\n\nThis usually triggers 1-3 short questions back. Answer them and move on.\n\n## 3. Build incrementally\n\nThe agent will start from a scaffold (one of `~/.agentled/examples/scaffolds/*.json`), adapt it to your intent, and add steps one at a time. Per-step validation catches type mismatches, bad model IDs, and template-variable typos before the full workflow is saved.\n\nDo not ask the agent to dump a 30-step JSON in one shot. The skill explains why.\n\n## 4. Validate, then run small\n\n```\nagentled workflows validate <workflowId> # graph-level checks\nagentled workflows lint <file.json> # static gotcha catches\n```\n\nFirst execution: feed it 3-5 sample inputs, not 500. Watch the credit count. If something is wrong, fix it cheap.\n\n## 5. Promote to production\n\n```\nagentled workflows publish <workflowId> --status live\n```\n\nThen schedule it (or trigger it manually, or wire it to a webhook). Iterate.\n\n## What good looks like\n\n- Sourcing on its own schedule, writing to a list with `userKey` dedup.\n- An orchestrator that filters by `status` so it never re-processes done rows.\n- Every branch terminates (`milestone` for top-level workflows, `return` for child workflows, or no `next.stepId`). `milestone` is a labeled endpoint, not a required step \u2014 a workflow with no `next` is already terminal.\n- Human-in-the-loop steps decoupled across workflows via the KG list (see WORKFLOW-SHAPE.md \"Pausing for human input\").\n- An outreach step (or workflow) gated on approval before sending.\n- ROI metadata + `eventSummary` + an `entryConditions` gate \u2014 added once the workflow is validated.\n\nFor the canonical shape and the \"where to put what\" reference, see `WORKFLOW-SHAPE.md` in this folder. For silent failure modes see `GOTCHAS.md`.\n";
|
|
29
|
+
export declare const GOTCHAS_MD = "# AgentLed \u2014 documented silent failure modes\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\n\n**Wrong:** `{ \"entryConditions\": { \"conditions\": [...] } }`\n**Correct:** `{ \"entryConditions\": { \"criteria\": [...] } }`\n\nThe executor reads `entryConditions.criteria`. The key `conditions` is silently ignored.\n\n## 2. `variable` not `field` in criteria items\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## 3. Gmail label_id must be the internal Label_XXXX ID\n\nGmail's API requires `Label_XXXXXXXXXX` IDs, not display names. Add a `GMAIL_CREATE_LABEL` step before and use `{{steps.ensure-label.id}}`.\n\n## 4. `aiActionWithTools` with no tools\n\nA step with `type: \"aiActionWithTools\"` must have at least one tool in `step.tools` or `step.agent.tools`. Valid `builtinType` values: `web_search`, `file_search`, `code_interpreter`, `fetch_website_content`, `kg_search`, `kg_traverse`, `kg_nodes`, `kg_write`, `workspace_memory`.\n\n## 5. Email steps need type + approval action + outreachProfile\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## 6. Only the first step in a loop gets `loopConfig`\n\n`loopConfig` must be on the first step in the loop chain only. Subsequent steps inside the loop iterate automatically.\n\n## 7. Don't pass raw `{{input.*}}` directly to search APIs\n\nAdd an aiAction step before the search that generates optimized queries. Raw user input makes poor search queries.\n\n## 8. Child workflows use `return`; `internal: true` is for child-only workflows\n\nIf a workflow is called via `agentled.call-workflow` (i.e., a **child workflow** invoked by another workflow rather than a user), use `type: \"return\"` instead of `milestone`. `milestone` produces no return data \u2014 the parent receives nothing.\n\nAlso set `context.executionInputConfig.internal: true` on the **child** workflow \u2014 this hides it from the user-triggered list.\n\n**Top-level workflows** triggered directly by users (manual, schedule, webhook, public form, app event) keep `milestone` and **do NOT** set `internal: true`. Setting `internal: true` on a user-facing workflow hides it from its intended caller.\n\n## 9. Model IDs are internal format, not Anthropic format\n\nWrong: `claude-sonnet-4-6`. Correct: `claude-4-6-sonnet`. Run `agentled models list` for valid internal IDs.\n\n## 10. Native app actionId must include appId prefix\n\nWrong: `{ \"id\": \"kg\", \"actionId\": \"read-list\" }`\nCorrect: `{ \"id\": \"kg\", \"actionId\": \"kg.read-list\" }`\n\n## 11. `loop_completion` criteria requires `onCriteriaFail: \"wait\"`\n\nWithout `onCriteriaFail: \"wait\"`, the step skips instead of blocking until the loop finishes. The `stepId` field is also required.\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 field and inlines the raw value. Pass `{ \"items\": \"{{steps.x.items}}\" }` directly \u2014 no stringify needed. (Note: `kg.read-list` `filters` is the exception \u2014 it expects a JSON-string body, see WORKFLOW-SHAPE.md.)\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";
|
|
30
|
+
export declare const PATTERNS_MD = "# Pattern index \u2014 `~/.agentled/examples/scaffolds/`\n\nPreflight-clean pipeline templates. Pick the closest match to your intent and adapt \u2014 don't author from scratch.\n\n| Scaffold | Shape | Use when |\n|----------|-------|----------|\n| `minimal.json` | trigger \u2192 milestone | smoke-testing the pipeline runner |\n| `email-polling-dedup.json` | schedule \u2192 fetch emails (label dedup) \u2192 loop \u2192 add label | inbound email triage / processing without double-handling |\n| `lead-scoring-kg.json` | trigger \u2192 `kg.read-list` \u2192 AI scoring loop \u2192 `knowledgeSync` | the orchestrator phase of source \u2192 list \u2192 orchestrator |\n| `list-match-email.json` | trigger \u2192 `kg.read-list` \u2192 AI match \u2192 composed email (approval gate) \u2192 `knowledgeSync` | outreach phase: pull qualified rows, draft email, gate on approval |\n| `extract-threshold-alert.json` | trigger \u2192 AI extract \u2192 threshold check \u2192 external update \u2192 conditional Slack \u2192 `knowledgeSync` | conditional routing on AI-extracted scores |\n| `ai-with-tools.json` | trigger \u2192 `aiActionWithTools` (web_search + workspace_memory) \u2192 milestone | starter for agentic steps that need to call runtime tools |\n\n## Mapping to the canonical shape\n\nThe `source \u2192 list \u2192 orchestrator \u2192 outreach` flow uses these scaffolds in combination:\n\n- **Sourcing** (1+ workflows feeding the same list): start from a scaffold that ends in `kg.upsert-rows` to your list, with `userKey` and `status: \"new\"`. The bundled `email-polling-dedup` is the closest starter; adapt the source step to your channel (search, scrape, form, webhook).\n- **Orchestrator** (reads pending status, processes, transitions): start from `lead-scoring-kg` and add a final `kg.update-rows` step that sets `status: \"scored\"` (or `qualified` / `rejected`).\n- **Outreach** (reads qualified, sends with approval): start from `list-match-email`, then add the `kg.update-rows` to mark `status: \"contacted\"`.\n- **Reports** (generate output, share, notify): see the \"Report-and-share-back sequence\" section in `WORKFLOW-SHAPE.md` \u2014 `aiAction` \u2192 `share` step \u2192 email notification.\n- **Human-in-the-loop** (workflow needs human input partway through): see \"Pausing for human input\" in `WORKFLOW-SHAPE.md` \u2014 split into producer + manual-trigger input form + consumer, all keyed on a status transition in the KG row.\n\nFor the full pattern shape and why `userKey` + `status` matter as indexes, see `WORKFLOW-SHAPE.md` in this folder.\n";
|