oneie 3.8.2 → 4.0.0
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/LICENSE +86 -0
- package/README.md +63 -952
- package/dist/package.json +38 -0
- package/dist/src/agent.d.ts +2 -0
- package/dist/src/agent.js +888 -0
- package/dist/src/args.d.ts +9 -0
- package/dist/src/args.js +61 -0
- package/dist/src/auth.d.ts +6 -0
- package/dist/src/auth.js +122 -0
- package/dist/src/broadcast.d.ts +6 -0
- package/dist/src/broadcast.js +150 -0
- package/dist/src/catalog.d.ts +2 -0
- package/dist/src/catalog.js +78 -0
- package/dist/src/chat.d.ts +2 -0
- package/dist/src/chat.js +92 -0
- package/dist/src/client.d.ts +5 -0
- package/dist/src/client.js +151 -0
- package/dist/src/compiler.d.ts +36 -0
- package/dist/src/compiler.js +314 -0
- package/dist/src/config.d.ts +24 -0
- package/dist/src/config.js +70 -0
- package/dist/src/connect.d.ts +2 -0
- package/dist/src/connect.js +64 -0
- package/dist/src/coordinate.d.ts +3 -0
- package/dist/src/coordinate.js +58 -0
- package/dist/src/create.d.ts +2 -0
- package/dist/src/create.js +106 -0
- package/dist/src/deploy.d.ts +2 -0
- package/dist/src/deploy.js +19 -0
- package/dist/src/dev.d.ts +2 -0
- package/dist/src/dev.js +75 -0
- package/dist/src/device-flow.d.ts +57 -0
- package/dist/src/device-flow.js +173 -0
- package/dist/src/doctor.d.ts +26 -0
- package/dist/src/doctor.js +91 -0
- package/dist/src/env.d.ts +3 -0
- package/dist/src/env.js +37 -0
- package/dist/src/eval.d.ts +2 -0
- package/dist/src/eval.js +42 -0
- package/dist/src/fn.d.ts +2 -0
- package/dist/src/fn.js +73 -0
- package/dist/src/group.d.ts +2 -0
- package/dist/src/group.js +115 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +101 -0
- package/dist/src/init.d.ts +11 -0
- package/dist/src/init.js +121 -0
- package/dist/src/lib/agent-env.d.ts +5 -0
- package/dist/src/lib/agent-env.js +25 -0
- package/dist/src/lib/api-path.d.ts +1 -0
- package/dist/src/lib/api-path.js +9 -0
- package/dist/src/lib/client.d.ts +16 -0
- package/dist/src/lib/client.js +57 -0
- package/dist/src/links.d.ts +5 -0
- package/dist/src/links.js +44 -0
- package/dist/src/onboard.d.ts +16 -0
- package/dist/src/onboard.js +146 -0
- package/dist/src/plugin.d.ts +2 -0
- package/dist/src/plugin.js +184 -0
- package/dist/src/push.d.ts +2 -0
- package/dist/src/push.js +114 -0
- package/dist/src/render.d.ts +20 -0
- package/dist/src/render.js +32 -0
- package/dist/src/setup.d.ts +6 -0
- package/dist/src/setup.js +118 -0
- package/dist/src/ship.d.ts +2 -0
- package/dist/src/ship.js +18 -0
- package/dist/src/skill-parser.d.ts +14 -0
- package/dist/src/skill-parser.js +113 -0
- package/dist/src/skill.d.ts +2 -0
- package/dist/src/skill.js +377 -0
- package/dist/src/slug.d.ts +2 -0
- package/dist/src/slug.js +6 -0
- package/dist/src/social.d.ts +2 -0
- package/dist/src/social.js +87 -0
- package/dist/src/staff.d.ts +2 -0
- package/dist/src/staff.js +93 -0
- package/dist/src/status.d.ts +2 -0
- package/dist/src/status.js +38 -0
- package/dist/src/substrate.d.ts +2 -0
- package/dist/src/substrate.js +243 -0
- package/dist/src/templates.d.ts +1 -0
- package/dist/src/templates.js +205 -0
- package/dist/src/trade.d.ts +2 -0
- package/dist/src/trade.js +95 -0
- package/dist/src/trail.d.ts +2 -0
- package/dist/src/trail.js +41 -0
- package/dist/src/validate.d.ts +13 -0
- package/dist/src/validate.js +35 -0
- package/dist/src/wallet.d.ts +9 -0
- package/dist/src/wallet.js +209 -0
- package/package.json +26 -54
- package/LICENSE.md +0 -89
- package/dist/admin/build.d.ts +0 -15
- package/dist/admin/build.d.ts.map +0 -1
- package/dist/admin/build.js +0 -295
- package/dist/admin/build.js.map +0 -1
- package/dist/admin/index.d.ts +0 -24
- package/dist/admin/index.d.ts.map +0 -1
- package/dist/admin/index.js +0 -98
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/list.d.ts +0 -14
- package/dist/admin/list.d.ts.map +0 -1
- package/dist/admin/list.js +0 -90
- package/dist/admin/list.js.map +0 -1
- package/dist/admin/manifest.d.ts +0 -86
- package/dist/admin/manifest.d.ts.map +0 -1
- package/dist/admin/manifest.js +0 -183
- package/dist/admin/manifest.js.map +0 -1
- package/dist/admin/monorepo.d.ts +0 -25
- package/dist/admin/monorepo.d.ts.map +0 -1
- package/dist/admin/monorepo.js +0 -59
- package/dist/admin/monorepo.js.map +0 -1
- package/dist/admin/release.d.ts +0 -17
- package/dist/admin/release.d.ts.map +0 -1
- package/dist/admin/release.js +0 -144
- package/dist/admin/release.js.map +0 -1
- package/dist/admin/sync.d.ts +0 -14
- package/dist/admin/sync.d.ts.map +0 -1
- package/dist/admin/sync.js +0 -104
- package/dist/admin/sync.js.map +0 -1
- package/dist/admin/validate.d.ts +0 -15
- package/dist/admin/validate.d.ts.map +0 -1
- package/dist/admin/validate.js +0 -169
- package/dist/admin/validate.js.map +0 -1
- package/dist/banner.d.ts +0 -2
- package/dist/banner.d.ts.map +0 -1
- package/dist/banner.js +0 -15
- package/dist/banner.js.map +0 -1
- package/dist/clone-docs.d.ts +0 -17
- package/dist/clone-docs.d.ts.map +0 -1
- package/dist/clone-docs.js +0 -62
- package/dist/clone-docs.js.map +0 -1
- package/dist/clone-web.d.ts +0 -12
- package/dist/clone-web.d.ts.map +0 -1
- package/dist/clone-web.js +0 -50
- package/dist/clone-web.js.map +0 -1
- package/dist/commands/agent.d.ts +0 -20
- package/dist/commands/agent.d.ts.map +0 -1
- package/dist/commands/agent.js +0 -315
- package/dist/commands/agent.js.map +0 -1
- package/dist/commands/ask.d.ts +0 -4
- package/dist/commands/ask.d.ts.map +0 -1
- package/dist/commands/ask.js +0 -8
- package/dist/commands/ask.js.map +0 -1
- package/dist/commands/bounty.d.ts +0 -4
- package/dist/commands/bounty.d.ts.map +0 -1
- package/dist/commands/bounty.js +0 -24
- package/dist/commands/bounty.js.map +0 -1
- package/dist/commands/buy.d.ts +0 -19
- package/dist/commands/buy.d.ts.map +0 -1
- package/dist/commands/buy.js +0 -63
- package/dist/commands/buy.js.map +0 -1
- package/dist/commands/capabilities.d.ts +0 -4
- package/dist/commands/capabilities.d.ts.map +0 -1
- package/dist/commands/capabilities.js +0 -18
- package/dist/commands/capabilities.js.map +0 -1
- package/dist/commands/claw.d.ts +0 -4
- package/dist/commands/claw.d.ts.map +0 -1
- package/dist/commands/claw.js +0 -14
- package/dist/commands/claw.js.map +0 -1
- package/dist/commands/commend.d.ts +0 -4
- package/dist/commands/commend.d.ts.map +0 -1
- package/dist/commands/commend.js +0 -13
- package/dist/commands/commend.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -4
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -49
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/config.d.ts +0 -4
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js +0 -78
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/deploy.d.ts +0 -4
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/deploy.js +0 -45
- package/dist/commands/deploy.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -4
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -72
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/domain.d.ts +0 -4
- package/dist/commands/domain.d.ts.map +0 -1
- package/dist/commands/domain.js +0 -19
- package/dist/commands/domain.js.map +0 -1
- package/dist/commands/export.d.ts +0 -4
- package/dist/commands/export.d.ts.map +0 -1
- package/dist/commands/export.js +0 -15
- package/dist/commands/export.js.map +0 -1
- package/dist/commands/fade.d.ts +0 -4
- package/dist/commands/fade.d.ts.map +0 -1
- package/dist/commands/fade.js +0 -15
- package/dist/commands/fade.js.map +0 -1
- package/dist/commands/flag.d.ts +0 -4
- package/dist/commands/flag.d.ts.map +0 -1
- package/dist/commands/flag.js +0 -13
- package/dist/commands/flag.js.map +0 -1
- package/dist/commands/forget.d.ts +0 -4
- package/dist/commands/forget.d.ts.map +0 -1
- package/dist/commands/forget.js +0 -16
- package/dist/commands/forget.js.map +0 -1
- package/dist/commands/frontier.d.ts +0 -4
- package/dist/commands/frontier.d.ts.map +0 -1
- package/dist/commands/frontier.js +0 -11
- package/dist/commands/frontier.js.map +0 -1
- package/dist/commands/health.d.ts +0 -4
- package/dist/commands/health.d.ts.map +0 -1
- package/dist/commands/health.js +0 -11
- package/dist/commands/health.js.map +0 -1
- package/dist/commands/highways.d.ts +0 -4
- package/dist/commands/highways.d.ts.map +0 -1
- package/dist/commands/highways.js +0 -14
- package/dist/commands/highways.js.map +0 -1
- package/dist/commands/hire.d.ts +0 -4
- package/dist/commands/hire.d.ts.map +0 -1
- package/dist/commands/hire.js +0 -16
- package/dist/commands/hire.js.map +0 -1
- package/dist/commands/init.d.ts +0 -17
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -308
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/invite.d.ts +0 -4
- package/dist/commands/invite.d.ts.map +0 -1
- package/dist/commands/invite.js +0 -37
- package/dist/commands/invite.js.map +0 -1
- package/dist/commands/know.d.ts +0 -4
- package/dist/commands/know.d.ts.map +0 -1
- package/dist/commands/know.js +0 -8
- package/dist/commands/know.js.map +0 -1
- package/dist/commands/launch.d.ts +0 -4
- package/dist/commands/launch.d.ts.map +0 -1
- package/dist/commands/launch.js +0 -16
- package/dist/commands/launch.js.map +0 -1
- package/dist/commands/mark.d.ts +0 -4
- package/dist/commands/mark.d.ts.map +0 -1
- package/dist/commands/mark.js +0 -15
- package/dist/commands/mark.js.map +0 -1
- package/dist/commands/pay.d.ts +0 -4
- package/dist/commands/pay.d.ts.map +0 -1
- package/dist/commands/pay.js +0 -21
- package/dist/commands/pay.js.map +0 -1
- package/dist/commands/pipe.d.ts +0 -4
- package/dist/commands/pipe.d.ts.map +0 -1
- package/dist/commands/pipe.js +0 -35
- package/dist/commands/pipe.js.map +0 -1
- package/dist/commands/publish.d.ts +0 -4
- package/dist/commands/publish.d.ts.map +0 -1
- package/dist/commands/publish.js +0 -23
- package/dist/commands/publish.js.map +0 -1
- package/dist/commands/recall.d.ts +0 -4
- package/dist/commands/recall.d.ts.map +0 -1
- package/dist/commands/recall.js +0 -12
- package/dist/commands/recall.js.map +0 -1
- package/dist/commands/repl.d.ts +0 -4
- package/dist/commands/repl.d.ts.map +0 -1
- package/dist/commands/repl.js +0 -56
- package/dist/commands/repl.js.map +0 -1
- package/dist/commands/reveal.d.ts +0 -4
- package/dist/commands/reveal.d.ts.map +0 -1
- package/dist/commands/reveal.js +0 -11
- package/dist/commands/reveal.js.map +0 -1
- package/dist/commands/revenue.d.ts +0 -4
- package/dist/commands/revenue.d.ts.map +0 -1
- package/dist/commands/revenue.js +0 -11
- package/dist/commands/revenue.js.map +0 -1
- package/dist/commands/select.d.ts +0 -4
- package/dist/commands/select.d.ts.map +0 -1
- package/dist/commands/select.js +0 -19
- package/dist/commands/select.js.map +0 -1
- package/dist/commands/sell.d.ts +0 -15
- package/dist/commands/sell.d.ts.map +0 -1
- package/dist/commands/sell.js +0 -49
- package/dist/commands/sell.js.map +0 -1
- package/dist/commands/signal.d.ts +0 -4
- package/dist/commands/signal.d.ts.map +0 -1
- package/dist/commands/signal.js +0 -8
- package/dist/commands/signal.js.map +0 -1
- package/dist/commands/stats.d.ts +0 -4
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/commands/stats.js +0 -11
- package/dist/commands/stats.js.map +0 -1
- package/dist/commands/status.d.ts +0 -4
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -18
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/subscribe.d.ts +0 -14
- package/dist/commands/subscribe.d.ts.map +0 -1
- package/dist/commands/subscribe.js +0 -33
- package/dist/commands/subscribe.js.map +0 -1
- package/dist/commands/sync.d.ts +0 -4
- package/dist/commands/sync.d.ts.map +0 -1
- package/dist/commands/sync.js +0 -20
- package/dist/commands/sync.js.map +0 -1
- package/dist/commands/tail.d.ts +0 -4
- package/dist/commands/tail.d.ts.map +0 -1
- package/dist/commands/tail.js +0 -51
- package/dist/commands/tail.js.map +0 -1
- package/dist/commands/warn.d.ts +0 -4
- package/dist/commands/warn.d.ts.map +0 -1
- package/dist/commands/warn.js +0 -15
- package/dist/commands/warn.js.map +0 -1
- package/dist/copy-claude-config.d.ts +0 -2
- package/dist/copy-claude-config.d.ts.map +0 -1
- package/dist/copy-claude-config.js +0 -32
- package/dist/copy-claude-config.js.map +0 -1
- package/dist/create-org-profile.d.ts +0 -10
- package/dist/create-org-profile.d.ts.map +0 -1
- package/dist/create-org-profile.js +0 -136
- package/dist/create-org-profile.js.map +0 -1
- package/dist/create-user-profile.d.ts +0 -9
- package/dist/create-user-profile.d.ts.map +0 -1
- package/dist/create-user-profile.js +0 -115
- package/dist/create-user-profile.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -365
- package/dist/index.js.map +0 -1
- package/dist/lib/agent-detection.d.ts +0 -19
- package/dist/lib/agent-detection.d.ts.map +0 -1
- package/dist/lib/agent-detection.js +0 -87
- package/dist/lib/agent-detection.js.map +0 -1
- package/dist/lib/args.d.ts +0 -11
- package/dist/lib/args.d.ts.map +0 -1
- package/dist/lib/args.js +0 -57
- package/dist/lib/args.js.map +0 -1
- package/dist/lib/config.d.ts +0 -12
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js +0 -38
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/detect.d.ts +0 -45
- package/dist/lib/detect.d.ts.map +0 -1
- package/dist/lib/detect.js +0 -221
- package/dist/lib/detect.js.map +0 -1
- package/dist/lib/http.d.ts +0 -9
- package/dist/lib/http.d.ts.map +0 -1
- package/dist/lib/http.js +0 -25
- package/dist/lib/http.js.map +0 -1
- package/dist/lib/output.d.ts +0 -5
- package/dist/lib/output.d.ts.map +0 -1
- package/dist/lib/output.js +0 -32
- package/dist/lib/output.js.map +0 -1
- package/dist/lib/sdk.d.ts +0 -10
- package/dist/lib/sdk.d.ts.map +0 -1
- package/dist/lib/sdk.js +0 -22
- package/dist/lib/sdk.js.map +0 -1
- package/dist/lib/telemetry.d.ts +0 -4
- package/dist/lib/telemetry.d.ts.map +0 -1
- package/dist/lib/telemetry.js +0 -61
- package/dist/lib/telemetry.js.map +0 -1
- package/dist/sync-agents.d.ts +0 -5
- package/dist/sync-agents.d.ts.map +0 -1
- package/dist/sync-agents.js +0 -28
- package/dist/sync-agents.js.map +0 -1
- package/dist/sync-ontology.d.ts +0 -4
- package/dist/sync-ontology.d.ts.map +0 -1
- package/dist/sync-ontology.js +0 -40
- package/dist/sync-ontology.js.map +0 -1
- package/dist/utils/file-resolver.d.ts +0 -83
- package/dist/utils/file-resolver.d.ts.map +0 -1
- package/dist/utils/file-resolver.js +0 -194
- package/dist/utils/file-resolver.js.map +0 -1
- package/dist/utils/installation-setup.d.ts +0 -88
- package/dist/utils/installation-setup.d.ts.map +0 -1
- package/dist/utils/installation-setup.js +0 -409
- package/dist/utils/installation-setup.js.map +0 -1
- package/dist/utils/launch-claude.d.ts +0 -7
- package/dist/utils/launch-claude.d.ts.map +0 -1
- package/dist/utils/launch-claude.js +0 -86
- package/dist/utils/launch-claude.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -48
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -73
- package/dist/utils/validation.js.map +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { authHeaders, out, resolveBase, resolveKey } from './lib/client.js';
|
|
3
|
+
const DEFAULT_API = resolveBase({}, 'https://one.ie');
|
|
4
|
+
const VALID_ROLES = ['owner', 'admin', 'member', 'viewer'];
|
|
5
|
+
export function staffCmd() {
|
|
6
|
+
const cmd = new Command('staff').description('Workspace staff management');
|
|
7
|
+
cmd
|
|
8
|
+
.command('invite [email]')
|
|
9
|
+
.description('Invite a human to your workspace; omit email to get an invite URL without sending mail')
|
|
10
|
+
.option('--role <role>', `Role to assign: ${VALID_ROLES.join('|')}`, 'admin')
|
|
11
|
+
.option('--workspace <slug>', 'Workspace slug (defaults to authenticated workspace)')
|
|
12
|
+
.option('--dry-run', 'Print plan without sending invite')
|
|
13
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
14
|
+
.action(async (email, opts) => {
|
|
15
|
+
const role = opts.role;
|
|
16
|
+
if (!VALID_ROLES.includes(role)) {
|
|
17
|
+
out(cmd, { ok: false, error: `--role must be one of: ${VALID_ROLES.join(', ')}` });
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (opts.dryRun) {
|
|
21
|
+
out(cmd, { ok: true, dry_run: true, email: email ?? '(url-only)', role, workspace: opts.workspace ?? '(authenticated)' });
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const key = resolveKey();
|
|
25
|
+
if (!key) {
|
|
26
|
+
out(cmd, { ok: false, error: 'no API key — set ONEIE_API_KEY or run: oneie auth login' });
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const base = opts.api.replace(/\/$/, '');
|
|
30
|
+
const body = { role };
|
|
31
|
+
if (email)
|
|
32
|
+
body.email = email;
|
|
33
|
+
if (opts.workspace)
|
|
34
|
+
body.workspace = opts.workspace;
|
|
35
|
+
const res = await fetch(`${base}/api/ask/world:invite-member`, {
|
|
36
|
+
method: 'POST',
|
|
37
|
+
headers: authHeaders({ key }),
|
|
38
|
+
body: JSON.stringify({ data: body }),
|
|
39
|
+
});
|
|
40
|
+
if (!res.ok) {
|
|
41
|
+
const text = await res.text().catch(() => '');
|
|
42
|
+
out(cmd, { ok: false, error: `${res.status}: ${text}` });
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const json = (await res.json());
|
|
46
|
+
if (json.error) {
|
|
47
|
+
out(cmd, { ok: false, error: json.error });
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const inviteUrl = json.inviteUrl ?? (json.token ? `${base}/join?token=${encodeURIComponent(json.token)}` : undefined);
|
|
51
|
+
out(cmd, { ok: true, email: email ?? '(url-only)', role, invite_url: inviteUrl ?? '(sent)' });
|
|
52
|
+
});
|
|
53
|
+
cmd
|
|
54
|
+
.command('add-agent <name>')
|
|
55
|
+
.description('Create an agent in your workspace and print its key once')
|
|
56
|
+
.option('--role <role>', `Role to assign: ${VALID_ROLES.join('|')}`, 'member')
|
|
57
|
+
.option('--workspace <slug>', 'Workspace slug (defaults to authenticated workspace)')
|
|
58
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
59
|
+
.action(async (name, opts) => {
|
|
60
|
+
const role = opts.role;
|
|
61
|
+
if (!VALID_ROLES.includes(role)) {
|
|
62
|
+
out(cmd, { ok: false, error: `--role must be one of: ${VALID_ROLES.join(', ')}` });
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const key = resolveKey();
|
|
66
|
+
if (!key) {
|
|
67
|
+
out(cmd, { ok: false, error: 'no API key — set ONEIE_API_KEY or run: oneie auth login' });
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const base = opts.api.replace(/\/$/, '');
|
|
71
|
+
const body = { name, role };
|
|
72
|
+
if (opts.workspace)
|
|
73
|
+
body.workspace = opts.workspace;
|
|
74
|
+
const res = await fetch(`${base}/api/ask/world:invite-agent`, {
|
|
75
|
+
method: 'POST',
|
|
76
|
+
headers: authHeaders({ key }),
|
|
77
|
+
body: JSON.stringify({ data: body }),
|
|
78
|
+
});
|
|
79
|
+
if (!res.ok) {
|
|
80
|
+
const text = await res.text().catch(() => '');
|
|
81
|
+
out(cmd, { ok: false, error: `${res.status}: ${text}` });
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const json = (await res.json());
|
|
85
|
+
if (json.error) {
|
|
86
|
+
out(cmd, { ok: false, error: json.error });
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const result = json.result ?? json;
|
|
90
|
+
out(cmd, { ok: true, name, role, aid: result.aid, key: result.key });
|
|
91
|
+
});
|
|
92
|
+
return cmd;
|
|
93
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { mergeEnv } from './env.js';
|
|
3
|
+
import { renderStatus } from './render.js';
|
|
4
|
+
const DEFAULT_API = process.env.ONEIE_BASE_URL ?? process.env.ONE_API_URL ?? 'https://api.one.ie';
|
|
5
|
+
export function statusCmd() {
|
|
6
|
+
return new Command('status')
|
|
7
|
+
.description('Agency P&L dashboard (pool, margin, per-client burns)')
|
|
8
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
9
|
+
.option('--key <key>', 'API key (overrides ONEIE_API_KEY env)')
|
|
10
|
+
.option('--json', 'Output raw JSON')
|
|
11
|
+
.action(async (opts) => {
|
|
12
|
+
const dir = process.cwd();
|
|
13
|
+
const env = mergeEnv(dir);
|
|
14
|
+
const key = opts.key ?? env.ONEIE_API_KEY ?? env.ONE_API_KEY ?? '';
|
|
15
|
+
if (!key || !env.AGENCY_SLUG) {
|
|
16
|
+
process.stderr.write('not set up — run `one setup` first\n');
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
const base = opts.api.replace(/\/$/, '');
|
|
20
|
+
const res = await fetch(`${base}/api/ask/${encodeURIComponent('billing:clients')}`, {
|
|
21
|
+
method: 'POST',
|
|
22
|
+
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${key}` },
|
|
23
|
+
body: JSON.stringify({ data: {} }),
|
|
24
|
+
});
|
|
25
|
+
if (!res.ok) {
|
|
26
|
+
process.stderr.write(`billing:clients → ${res.status}\n`);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
const data = await res.json();
|
|
30
|
+
if (opts.json) {
|
|
31
|
+
process.stdout.write(JSON.stringify(data, null, 2) + '\n');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const agency = (data.agency ?? { slug: env.AGENCY_SLUG, name: env.AGENCY_NAME ?? null, markup_pct: 0, pool: 0 });
|
|
35
|
+
const clients = (data.clients ?? []);
|
|
36
|
+
process.stdout.write(renderStatus(agency, clients) + '\n');
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { authHeaders, resolveBase } from './lib/client.js';
|
|
2
|
+
const DEFAULT_API = resolveBase({}, 'https://api.one.ie');
|
|
3
|
+
function base(opts) {
|
|
4
|
+
return resolveBase(opts, 'https://api.one.ie');
|
|
5
|
+
}
|
|
6
|
+
async function api(url, init) {
|
|
7
|
+
const res = await fetch(url, { headers: authHeaders(), ...init });
|
|
8
|
+
if (!res.ok) {
|
|
9
|
+
const body = await res.text().catch(() => '');
|
|
10
|
+
process.stderr.write(`${init?.method ?? 'GET'} ${url} → ${res.status}\n${body}\n`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
const ct = res.headers.get('content-type') ?? '';
|
|
14
|
+
return ct.includes('json') ? res.json() : res.text();
|
|
15
|
+
}
|
|
16
|
+
function out(data) {
|
|
17
|
+
process.stdout.write(JSON.stringify(data, null, 2) + '\n');
|
|
18
|
+
}
|
|
19
|
+
function parseJson(raw, flag) {
|
|
20
|
+
try {
|
|
21
|
+
return JSON.parse(raw);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
process.stderr.write(`error: ${flag} must be valid JSON\n`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function readStdin() {
|
|
29
|
+
return new Promise((resolve) => {
|
|
30
|
+
let buf = '';
|
|
31
|
+
process.stdin.setEncoding('utf8');
|
|
32
|
+
process.stdin.on('data', (chunk) => { buf += chunk; });
|
|
33
|
+
process.stdin.on('end', () => resolve(buf.trim()));
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export function substrateCommands(program) {
|
|
37
|
+
program
|
|
38
|
+
.command('signal <receiver>')
|
|
39
|
+
.description('Fire-and-forget signal to any receiver')
|
|
40
|
+
.option('--data <json>', 'Signal data as JSON. Use "-" to read from stdin.')
|
|
41
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
42
|
+
.action(async (receiver, opts) => {
|
|
43
|
+
let data;
|
|
44
|
+
if (opts.data === '-')
|
|
45
|
+
data = parseJson(await readStdin(), '--data');
|
|
46
|
+
else if (opts.data)
|
|
47
|
+
data = parseJson(opts.data, '--data');
|
|
48
|
+
out(await api(`${base(opts)}/api/signal/${encodeURIComponent(receiver)}`, {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
body: JSON.stringify({ data }),
|
|
51
|
+
}));
|
|
52
|
+
});
|
|
53
|
+
program
|
|
54
|
+
.command('ask <receiver>')
|
|
55
|
+
.description('Signal + wait for outcome (result | timeout | dissolved | failure)')
|
|
56
|
+
.option('--data <json>', 'Signal data as JSON. Use "-" to read from stdin.')
|
|
57
|
+
.option('--timeout <ms>', 'Timeout in milliseconds', '10000')
|
|
58
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
59
|
+
.action(async (receiver, opts) => {
|
|
60
|
+
let data;
|
|
61
|
+
if (opts.data === '-')
|
|
62
|
+
data = parseJson(await readStdin(), '--data');
|
|
63
|
+
else if (opts.data)
|
|
64
|
+
data = parseJson(opts.data, '--data');
|
|
65
|
+
out(await api(`${base(opts)}/api/ask/${encodeURIComponent(receiver)}`, {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
body: JSON.stringify({ data, timeoutMs: Number(opts.timeout) }),
|
|
68
|
+
}));
|
|
69
|
+
});
|
|
70
|
+
program
|
|
71
|
+
.command('mark <edge>')
|
|
72
|
+
.description('Strengthen a path. Edge format: source>target')
|
|
73
|
+
.option('--strength <n>', 'Strength value', '1')
|
|
74
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
75
|
+
.action(async (edge, opts) => {
|
|
76
|
+
out(await api(`${base(opts)}/api/mark/${encodeURIComponent(edge)}`, {
|
|
77
|
+
method: 'POST',
|
|
78
|
+
body: JSON.stringify({ strength: Number(opts.strength) }),
|
|
79
|
+
}));
|
|
80
|
+
});
|
|
81
|
+
program
|
|
82
|
+
.command('warn <edge>')
|
|
83
|
+
.description('Raise resistance on a path. Edge format: source>target')
|
|
84
|
+
.option('--strength <n>', 'Strength value', '1')
|
|
85
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
86
|
+
.action(async (edge, opts) => {
|
|
87
|
+
out(await api(`${base(opts)}/api/warn/${encodeURIComponent(edge)}`, {
|
|
88
|
+
method: 'POST',
|
|
89
|
+
body: JSON.stringify({ strength: Number(opts.strength) }),
|
|
90
|
+
}));
|
|
91
|
+
});
|
|
92
|
+
program
|
|
93
|
+
.command('fade')
|
|
94
|
+
.description('Asymmetric decay of all paths')
|
|
95
|
+
.option('--rate <n>', 'Decay rate 0–1')
|
|
96
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
97
|
+
.action(async (opts) => {
|
|
98
|
+
out(await api(`${base(opts)}/api/fade`, {
|
|
99
|
+
method: 'POST',
|
|
100
|
+
body: JSON.stringify({ rate: opts.rate !== undefined ? Number(opts.rate) : undefined }),
|
|
101
|
+
}));
|
|
102
|
+
});
|
|
103
|
+
program
|
|
104
|
+
.command('sub <tag> <actor>')
|
|
105
|
+
.description('Subscribe an actor to a tag')
|
|
106
|
+
.option('--scope <scope>', 'private | public', 'private')
|
|
107
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
108
|
+
.action(async (tag, actor, opts) => {
|
|
109
|
+
out(await api(`${base(opts)}/api/sub`, {
|
|
110
|
+
method: 'POST',
|
|
111
|
+
body: JSON.stringify({ receiver: actor, tags: [tag], scope: opts.scope }),
|
|
112
|
+
}));
|
|
113
|
+
});
|
|
114
|
+
program
|
|
115
|
+
.command('follow <type>')
|
|
116
|
+
.description('Deterministic path selection — strongest path for a type')
|
|
117
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
118
|
+
.action(async (type, opts) => {
|
|
119
|
+
out(await api(`${base(opts)}/api/follow?tag=${encodeURIComponent(type)}`));
|
|
120
|
+
});
|
|
121
|
+
program
|
|
122
|
+
.command('select <type>')
|
|
123
|
+
.description('Probabilistic path selection (strength-weighted)')
|
|
124
|
+
.option('--exploration <n>', 'Exploration factor 0–1')
|
|
125
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
126
|
+
.action(async (type, opts) => {
|
|
127
|
+
const q = new URLSearchParams({ type });
|
|
128
|
+
if (opts.exploration)
|
|
129
|
+
q.set('exploration', opts.exploration);
|
|
130
|
+
out(await api(`${base(opts)}/api/select?${q}`));
|
|
131
|
+
});
|
|
132
|
+
program
|
|
133
|
+
.command('groups')
|
|
134
|
+
.description('List groups (dimension 1 — containers)')
|
|
135
|
+
.option('--type <type>')
|
|
136
|
+
.option('--limit <n>', 'Max results', '20')
|
|
137
|
+
.option('--after <cursor>', 'Pagination cursor')
|
|
138
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
139
|
+
.action(async (opts) => {
|
|
140
|
+
const q = new URLSearchParams({ limit: opts.limit });
|
|
141
|
+
if (opts.type)
|
|
142
|
+
q.set('type', opts.type);
|
|
143
|
+
if (opts.after)
|
|
144
|
+
q.set('after', opts.after);
|
|
145
|
+
out(await api(`${base(opts)}/api/export/groups?${q}`));
|
|
146
|
+
});
|
|
147
|
+
program
|
|
148
|
+
.command('actors')
|
|
149
|
+
.description('List actors (dimension 2 — humans, agents, bots)')
|
|
150
|
+
.option('--type <type>')
|
|
151
|
+
.option('--tag <tag>')
|
|
152
|
+
.option('--limit <n>', 'Max results', '20')
|
|
153
|
+
.option('--after <cursor>')
|
|
154
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
155
|
+
.action(async (opts) => {
|
|
156
|
+
const q = new URLSearchParams({ limit: opts.limit });
|
|
157
|
+
if (opts.type)
|
|
158
|
+
q.set('type', opts.type);
|
|
159
|
+
if (opts.tag)
|
|
160
|
+
q.set('tag', opts.tag);
|
|
161
|
+
if (opts.after)
|
|
162
|
+
q.set('after', opts.after);
|
|
163
|
+
out(await api(`${base(opts)}/api/export/actors?${q}`));
|
|
164
|
+
});
|
|
165
|
+
program
|
|
166
|
+
.command('things')
|
|
167
|
+
.description('List things (dimension 3 — skills, tasks, tokens)')
|
|
168
|
+
.option('--type <type>')
|
|
169
|
+
.option('--tag <tag>')
|
|
170
|
+
.option('--limit <n>', 'Max results', '20')
|
|
171
|
+
.option('--after <cursor>')
|
|
172
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
173
|
+
.action(async (opts) => {
|
|
174
|
+
const q = new URLSearchParams({ limit: opts.limit });
|
|
175
|
+
if (opts.type)
|
|
176
|
+
q.set('type', opts.type);
|
|
177
|
+
if (opts.tag)
|
|
178
|
+
q.set('tag', opts.tag);
|
|
179
|
+
if (opts.after)
|
|
180
|
+
q.set('after', opts.after);
|
|
181
|
+
out(await api(`${base(opts)}/api/things?${q}`));
|
|
182
|
+
});
|
|
183
|
+
program
|
|
184
|
+
.command('paths')
|
|
185
|
+
.description('List paths (dimension 4 — weighted connections)')
|
|
186
|
+
.option('--source <source>')
|
|
187
|
+
.option('--target <target>')
|
|
188
|
+
.option('--min-strength <n>', 'Minimum strength filter')
|
|
189
|
+
.option('--limit <n>', 'Max results', '20')
|
|
190
|
+
.option('--after <cursor>')
|
|
191
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
192
|
+
.action(async (opts) => {
|
|
193
|
+
const q = new URLSearchParams({ limit: opts.limit });
|
|
194
|
+
if (opts.source)
|
|
195
|
+
q.set('source', opts.source);
|
|
196
|
+
if (opts.target)
|
|
197
|
+
q.set('target', opts.target);
|
|
198
|
+
if (opts.minStrength)
|
|
199
|
+
q.set('minStrength', opts.minStrength);
|
|
200
|
+
if (opts.after)
|
|
201
|
+
q.set('after', opts.after);
|
|
202
|
+
out(await api(`${base(opts)}/api/export/paths?${q}`));
|
|
203
|
+
});
|
|
204
|
+
program
|
|
205
|
+
.command('events')
|
|
206
|
+
.description('List events (dimension 5 — signals, payments)')
|
|
207
|
+
.option('--actor <actor>')
|
|
208
|
+
.option('--tag <tag>')
|
|
209
|
+
.option('--from <iso>', 'ISO timestamp filter from')
|
|
210
|
+
.option('--to <iso>', 'ISO timestamp filter to')
|
|
211
|
+
.option('--limit <n>', 'Max results', '20')
|
|
212
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
213
|
+
.action(async (opts) => {
|
|
214
|
+
const q = new URLSearchParams({ limit: opts.limit });
|
|
215
|
+
if (opts.actor)
|
|
216
|
+
q.set('actor', opts.actor);
|
|
217
|
+
if (opts.tag)
|
|
218
|
+
q.set('tag', opts.tag);
|
|
219
|
+
if (opts.from)
|
|
220
|
+
q.set('from', opts.from);
|
|
221
|
+
if (opts.to)
|
|
222
|
+
q.set('to', opts.to);
|
|
223
|
+
out(await api(`${base(opts)}/api/events?${q}`));
|
|
224
|
+
});
|
|
225
|
+
program
|
|
226
|
+
.command('learning')
|
|
227
|
+
.description('List hypotheses (dimension 6 — what was discovered)')
|
|
228
|
+
.option('--status <status>', 'pending | testing | confirmed | rejected')
|
|
229
|
+
.option('--actor <actor>')
|
|
230
|
+
.option('--tag <tag>')
|
|
231
|
+
.option('--limit <n>', 'Max results', '20')
|
|
232
|
+
.option('--api <url>', 'API base URL', DEFAULT_API)
|
|
233
|
+
.action(async (opts) => {
|
|
234
|
+
const q = new URLSearchParams({ limit: opts.limit });
|
|
235
|
+
if (opts.status)
|
|
236
|
+
q.set('status', opts.status);
|
|
237
|
+
if (opts.actor)
|
|
238
|
+
q.set('actor', opts.actor);
|
|
239
|
+
if (opts.tag)
|
|
240
|
+
q.set('tag', opts.tag);
|
|
241
|
+
out(await api(`${base(opts)}/api/learning?${q}`));
|
|
242
|
+
});
|
|
243
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TEMPLATES: Record<string, string>;
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
export const TEMPLATES = {
|
|
2
|
+
core: `---
|
|
3
|
+
agentmd: "0.1"
|
|
4
|
+
name: template
|
|
5
|
+
title: Template Agent
|
|
6
|
+
model: anthropic/claude-haiku-4-5
|
|
7
|
+
summary: A helpful agent.
|
|
8
|
+
description: Use when you need to accomplish tasks.
|
|
9
|
+
sensitivity: public
|
|
10
|
+
lifecycle: active
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are a helpful assistant. Complete tasks clearly and concisely.
|
|
14
|
+
`,
|
|
15
|
+
commerce: `---
|
|
16
|
+
agentmd: "0.1"
|
|
17
|
+
name: template
|
|
18
|
+
title: Template Commerce Agent
|
|
19
|
+
model: anthropic/claude-haiku-4-5
|
|
20
|
+
summary: An agent that provides paid services.
|
|
21
|
+
description: Use when you need paid skill execution with x402 payments.
|
|
22
|
+
sensitivity: public
|
|
23
|
+
lifecycle: active
|
|
24
|
+
skills: []
|
|
25
|
+
wallet: ""
|
|
26
|
+
accepts:
|
|
27
|
+
- scheme: exact
|
|
28
|
+
network: "eip155:8453"
|
|
29
|
+
asset: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
|
|
30
|
+
max: "0.05"
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
You provide services at a fee. Verify payment before executing paid skills.
|
|
34
|
+
`,
|
|
35
|
+
asi: `---
|
|
36
|
+
agentmd: "0.1"
|
|
37
|
+
name: template
|
|
38
|
+
title: Template ASI Agent
|
|
39
|
+
model: anthropic/claude-opus-4-7
|
|
40
|
+
summary: An autonomous agent registered on Fetch.ai Almanac.
|
|
41
|
+
description: Use for long-running autonomous tasks and multi-agent coordination.
|
|
42
|
+
sensitivity: restricted
|
|
43
|
+
lifecycle: active
|
|
44
|
+
mailbox: true
|
|
45
|
+
agentverse: https://agentverse.ai
|
|
46
|
+
intervals:
|
|
47
|
+
- period: 300
|
|
48
|
+
task: Check for new signals and coordinate with peer agents.
|
|
49
|
+
skills: []
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
You are an autonomous agent. Coordinate with peers, monitor signals, and act on intervals.
|
|
53
|
+
`,
|
|
54
|
+
'travel-planner': `---
|
|
55
|
+
agentmd: "0.1"
|
|
56
|
+
name: template
|
|
57
|
+
title: Travel Planner
|
|
58
|
+
model: anthropic/claude-sonnet-4-5
|
|
59
|
+
summary: Creates detailed travel itineraries with real logistics and budgets.
|
|
60
|
+
description: Use when you need personalised travel planning — itinerary, budget, packing.
|
|
61
|
+
sensitivity: public
|
|
62
|
+
lifecycle: active
|
|
63
|
+
tools:
|
|
64
|
+
- emit_card
|
|
65
|
+
- emit_chips
|
|
66
|
+
skills:
|
|
67
|
+
- name: plan
|
|
68
|
+
description: Research and create a day-by-day travel itinerary
|
|
69
|
+
price: 0.10
|
|
70
|
+
tags: [travel, planning, itinerary]
|
|
71
|
+
- name: budget
|
|
72
|
+
description: Estimate trip costs including flights, hotels, meals, activities
|
|
73
|
+
price: 0.05
|
|
74
|
+
tags: [travel, budget, finance]
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
You are a personal travel planner. You turn destinations and dates into detailed, actionable itineraries — real places, real logistics, real costs.
|
|
78
|
+
|
|
79
|
+
Ask first: where, when, how long, who's going, budget range. Then deliver a day-by-day plan with morning/afternoon/evening blocks, transport options, and booking notes.
|
|
80
|
+
`,
|
|
81
|
+
'marketing-strategist': `---
|
|
82
|
+
agentmd: "0.1"
|
|
83
|
+
name: template
|
|
84
|
+
title: Marketing Strategist
|
|
85
|
+
model: anthropic/claude-sonnet-4-5
|
|
86
|
+
summary: Audits channels, plans campaigns, writes copy, and reads metrics.
|
|
87
|
+
description: Use when you need strategic marketing thinking plus concrete deliverables.
|
|
88
|
+
sensitivity: public
|
|
89
|
+
lifecycle: active
|
|
90
|
+
tools:
|
|
91
|
+
- emit_card
|
|
92
|
+
- emit_chips
|
|
93
|
+
skills:
|
|
94
|
+
- name: audit
|
|
95
|
+
description: Audit existing marketing channels and surface quick wins
|
|
96
|
+
price: 0.08
|
|
97
|
+
tags: [marketing, audit, analysis]
|
|
98
|
+
- name: campaign
|
|
99
|
+
description: Plan a campaign from brief to launch checklist
|
|
100
|
+
price: 0.12
|
|
101
|
+
tags: [marketing, campaign, strategy]
|
|
102
|
+
- name: copy
|
|
103
|
+
description: Write headlines, CTAs, email subjects, ad copy variants
|
|
104
|
+
price: 0.06
|
|
105
|
+
tags: [marketing, copy, writing]
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
You are a senior marketing strategist. You think in funnels and ICPs, then translate that into concrete copy and launch plans any team can execute.
|
|
109
|
+
|
|
110
|
+
Start by understanding the product, the customer, and the current state of marketing. Then: audit → recommend → plan → execute.
|
|
111
|
+
`,
|
|
112
|
+
'support-tier1': `---
|
|
113
|
+
agentmd: "0.1"
|
|
114
|
+
name: template
|
|
115
|
+
title: Support — Tier 1
|
|
116
|
+
model: anthropic/claude-sonnet-4-5
|
|
117
|
+
summary: Resolves common support issues fast; escalates edge cases with full context.
|
|
118
|
+
description: Use as a first-line support agent for how-to, account, and billing questions.
|
|
119
|
+
sensitivity: public
|
|
120
|
+
lifecycle: active
|
|
121
|
+
tools:
|
|
122
|
+
- emit_card
|
|
123
|
+
- emit_chips
|
|
124
|
+
skills:
|
|
125
|
+
- name: triage
|
|
126
|
+
description: Classify the issue and route to the right resolution path
|
|
127
|
+
price: 0.02
|
|
128
|
+
tags: [support, triage, routing]
|
|
129
|
+
- name: resolve
|
|
130
|
+
description: Walk the user through a step-by-step fix
|
|
131
|
+
price: 0.03
|
|
132
|
+
tags: [support, resolution, troubleshooting]
|
|
133
|
+
- name: escalate
|
|
134
|
+
description: Prepare a structured escalation summary for Tier 2
|
|
135
|
+
price: 0.02
|
|
136
|
+
tags: [support, escalation, handoff]
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
You are a Tier 1 support agent. Your job is to resolve common issues fast, escalate edge cases with full context, and leave every user feeling heard.
|
|
140
|
+
|
|
141
|
+
1. Acknowledge — one sentence that shows you understand the problem. 2. Triage — classify: account / billing / bug / how-to / feature request. 3. Resolve — walk through it step by step. 4. Escalate — prepare a clean handoff summary.
|
|
142
|
+
`,
|
|
143
|
+
'sales-discovery': `---
|
|
144
|
+
agentmd: "0.1"
|
|
145
|
+
name: template
|
|
146
|
+
title: Sales Discovery
|
|
147
|
+
model: anthropic/claude-sonnet-4-5
|
|
148
|
+
summary: Qualifies leads, preps discovery calls, handles objections, and structures proposals.
|
|
149
|
+
description: Use to accelerate the discovery-to-proposal stage of your sales process.
|
|
150
|
+
sensitivity: restricted
|
|
151
|
+
lifecycle: active
|
|
152
|
+
tools:
|
|
153
|
+
- emit_card
|
|
154
|
+
- emit_chips
|
|
155
|
+
skills:
|
|
156
|
+
- name: qualify
|
|
157
|
+
description: Run a BANT qualification check on an inbound lead
|
|
158
|
+
price: 0.04
|
|
159
|
+
tags: [sales, qualification, lead]
|
|
160
|
+
- name: discovery
|
|
161
|
+
description: Deep-dive discovery call questions for a specific ICP
|
|
162
|
+
price: 0.06
|
|
163
|
+
tags: [sales, discovery, questions]
|
|
164
|
+
- name: proposal
|
|
165
|
+
description: Outline a custom proposal structure for a qualified account
|
|
166
|
+
price: 0.08
|
|
167
|
+
tags: [sales, proposal, closing]
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
You are a sales discovery specialist. You help sales reps qualify faster, ask sharper questions, and turn stalled conversations into momentum.
|
|
171
|
+
|
|
172
|
+
Start with the lead context: industry, size, role, how they came in. Then run the right playbook: qualify → discover → handle objections → propose.
|
|
173
|
+
`,
|
|
174
|
+
'code-reviewer': `---
|
|
175
|
+
agentmd: "0.1"
|
|
176
|
+
name: template
|
|
177
|
+
title: Code Reviewer
|
|
178
|
+
model: anthropic/claude-sonnet-4-5
|
|
179
|
+
summary: Gives concrete, severity-labelled code review findings with actionable fixes.
|
|
180
|
+
description: Use for code review, security audits, performance checks, and refactor suggestions.
|
|
181
|
+
sensitivity: restricted
|
|
182
|
+
lifecycle: active
|
|
183
|
+
tools:
|
|
184
|
+
- emit_card
|
|
185
|
+
- emit_chips
|
|
186
|
+
skills:
|
|
187
|
+
- name: review
|
|
188
|
+
description: Full code review with severity-labelled findings
|
|
189
|
+
price: 0.08
|
|
190
|
+
tags: [engineering, review, quality]
|
|
191
|
+
- name: security
|
|
192
|
+
description: Security-focused audit for OWASP Top 10 and common patterns
|
|
193
|
+
price: 0.10
|
|
194
|
+
tags: [engineering, security, audit]
|
|
195
|
+
- name: refactor
|
|
196
|
+
description: Propose a concrete refactor with before/after diffs
|
|
197
|
+
price: 0.08
|
|
198
|
+
tags: [engineering, refactor, design]
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
You are a senior code reviewer. You give concrete, actionable feedback that improves code quality without creating review theatre.
|
|
202
|
+
|
|
203
|
+
Label every finding: BLOCKER / MAJOR / MINOR / NIT. Always include the specific line reference and a concrete fix — not vague advice.
|
|
204
|
+
`,
|
|
205
|
+
};
|