@useavalon/caelence-agent 0.1.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.
Files changed (161) hide show
  1. package/README.md +201 -0
  2. package/bin/harness.ts +10 -0
  3. package/package.json +75 -0
  4. package/skills/copy-editor/SKILL.md +74 -0
  5. package/skills/copy-editor/references/anti-slop.md +62 -0
  6. package/skills/copy-editor/references/ui-states.md +46 -0
  7. package/skills/copy-editor/scripts/lint-copy.py +78 -0
  8. package/skills/copy-harry-dry/SKILL.md +120 -0
  9. package/skills/copy-rmbc/SKILL.md +97 -0
  10. package/skills/copywriting/SKILL.md +73 -0
  11. package/skills/impeccable/SKILL.md +133 -0
  12. package/skills/impeccable/references/visual-slop.md +36 -0
  13. package/src/cli/main.test.ts +36 -0
  14. package/src/cli/main.ts +384 -0
  15. package/src/cli/media-models.ts +82 -0
  16. package/src/cli/models.ts +43 -0
  17. package/src/cli/openrouter-live.test.ts +35 -0
  18. package/src/cli/openrouter-live.ts +72 -0
  19. package/src/cli/openrouter-modality.test.ts +25 -0
  20. package/src/cli/openrouter-modality.ts +83 -0
  21. package/src/cli/picker.test.ts +53 -0
  22. package/src/cli/picker.ts +48 -0
  23. package/src/cli/plain-text.ts +15 -0
  24. package/src/cli/slash-dispatch.test.ts +213 -0
  25. package/src/cli/slash-dispatch.ts +298 -0
  26. package/src/cli/slash.test.ts +113 -0
  27. package/src/cli/slash.ts +119 -0
  28. package/src/cli/theme.test.ts +10 -0
  29. package/src/cli/theme.ts +44 -0
  30. package/src/cli/tui-layout.test.ts +33 -0
  31. package/src/cli/tui-layout.ts +33 -0
  32. package/src/cli/tui-screen.test.ts +33 -0
  33. package/src/cli/tui-screen.ts +13 -0
  34. package/src/cli/tui.tsx +735 -0
  35. package/src/config.ts +86 -0
  36. package/src/core/approval.test.ts +60 -0
  37. package/src/core/approval.ts +83 -0
  38. package/src/core/auto-router.test.ts +31 -0
  39. package/src/core/auto-router.ts +66 -0
  40. package/src/core/errors.ts +67 -0
  41. package/src/core/events.ts +85 -0
  42. package/src/core/hooks.test.ts +66 -0
  43. package/src/core/hooks.ts +94 -0
  44. package/src/core/ids.ts +6 -0
  45. package/src/core/instructions.test.ts +49 -0
  46. package/src/core/instructions.ts +44 -0
  47. package/src/core/logger.ts +45 -0
  48. package/src/core/mcp.ts +191 -0
  49. package/src/core/mode.test.ts +63 -0
  50. package/src/core/mode.ts +60 -0
  51. package/src/core/run-turn.test.ts +339 -0
  52. package/src/core/run-turn.ts +487 -0
  53. package/src/core/session.test.ts +203 -0
  54. package/src/core/session.ts +349 -0
  55. package/src/core/stdio-mcp.ts +143 -0
  56. package/src/core/strands.ts +262 -0
  57. package/src/core/usage.test.ts +69 -0
  58. package/src/core/usage.ts +171 -0
  59. package/src/desktop/bridge.test.ts +331 -0
  60. package/src/desktop/bridge.ts +729 -0
  61. package/src/desktop/open-local.test.ts +40 -0
  62. package/src/desktop/open-local.ts +52 -0
  63. package/src/desktop/preview-cache.test.ts +36 -0
  64. package/src/desktop/preview-cache.ts +63 -0
  65. package/src/desktop/secrets.test.ts +44 -0
  66. package/src/desktop/secrets.ts +60 -0
  67. package/src/evals/runner.test.ts +43 -0
  68. package/src/evals/runner.ts +225 -0
  69. package/src/index.ts +132 -0
  70. package/src/init.test.ts +54 -0
  71. package/src/init.ts +117 -0
  72. package/src/integrations/catalog-data.json +424 -0
  73. package/src/integrations/catalog.ts +81 -0
  74. package/src/integrations/connect.ts +231 -0
  75. package/src/integrations/integrations.test.ts +329 -0
  76. package/src/integrations/marks/airtable.svg +1 -0
  77. package/src/integrations/marks/algolia-mcp.svg +1 -0
  78. package/src/integrations/marks/canva.jpg +0 -0
  79. package/src/integrations/marks/cloudflare-mcp.svg +1 -0
  80. package/src/integrations/marks/contentful-mcp.svg +1 -0
  81. package/src/integrations/marks/craft.png +0 -0
  82. package/src/integrations/marks/dinero.png +0 -0
  83. package/src/integrations/marks/figma.svg +1 -0
  84. package/src/integrations/marks/gitlab.svg +1 -0
  85. package/src/integrations/marks/google-calendar.svg +1 -0
  86. package/src/integrations/marks/google-docs.svg +1 -0
  87. package/src/integrations/marks/google-drive.svg +1 -0
  88. package/src/integrations/marks/google-gmail.svg +1 -0
  89. package/src/integrations/marks/google-sheets.svg +1 -0
  90. package/src/integrations/marks/google-slides.svg +1 -0
  91. package/src/integrations/marks/granola.png +0 -0
  92. package/src/integrations/marks/jira.svg +1 -0
  93. package/src/integrations/marks/linear.svg +1 -0
  94. package/src/integrations/marks/microsoft-365.svg +7 -0
  95. package/src/integrations/marks/miro.svg +1 -0
  96. package/src/integrations/marks/mixpanel-mcp.svg +1 -0
  97. package/src/integrations/marks/monday.png +0 -0
  98. package/src/integrations/marks/mux-mcp.png +0 -0
  99. package/src/integrations/marks/neon-mcp.svg +1 -0
  100. package/src/integrations/marks/notion.svg +1 -0
  101. package/src/integrations/marks/paddle-mcp.svg +1 -0
  102. package/src/integrations/marks/posthog-mcp.svg +1 -0
  103. package/src/integrations/marks/prismic-mcp.svg +1 -0
  104. package/src/integrations/marks/replicate-mcp.svg +1 -0
  105. package/src/integrations/marks/resend-mcp.svg +1 -0
  106. package/src/integrations/marks/sanity-mcp.svg +1 -0
  107. package/src/integrations/marks/sceneplane.png +0 -0
  108. package/src/integrations/marks/sentry-mcp.svg +1 -0
  109. package/src/integrations/marks/stripe-mcp.svg +1 -0
  110. package/src/integrations/marks/supabase-mcp.svg +1 -0
  111. package/src/integrations/marks/upstash-mcp.svg +1 -0
  112. package/src/integrations/marks/vercel.svg +1 -0
  113. package/src/integrations/marks/webflow.svg +1 -0
  114. package/src/integrations/mcp-oauth.test.ts +39 -0
  115. package/src/integrations/mcp-oauth.ts +330 -0
  116. package/src/integrations/oauth-clients.test.ts +77 -0
  117. package/src/integrations/oauth-clients.ts +127 -0
  118. package/src/integrations/oauth.ts +145 -0
  119. package/src/integrations/remote-mcp.ts +307 -0
  120. package/src/integrations/store.ts +149 -0
  121. package/src/media/openrouter-generate.test.ts +80 -0
  122. package/src/media/openrouter-generate.ts +178 -0
  123. package/src/media/prefs.ts +54 -0
  124. package/src/observability/categories.ts +41 -0
  125. package/src/observability/create.test.ts +56 -0
  126. package/src/observability/create.ts +45 -0
  127. package/src/observability/experiments.ts +113 -0
  128. package/src/observability/fake.ts +191 -0
  129. package/src/observability/index.ts +57 -0
  130. package/src/observability/judges.ts +91 -0
  131. package/src/observability/langfuse.ts +275 -0
  132. package/src/observability/noop.ts +33 -0
  133. package/src/observability/observability.test.ts +113 -0
  134. package/src/observability/prompts.ts +98 -0
  135. package/src/observability/regression-items.ts +158 -0
  136. package/src/observability/sanitize.test.ts +26 -0
  137. package/src/observability/sanitize.ts +57 -0
  138. package/src/observability/types.ts +122 -0
  139. package/src/observability/version.ts +41 -0
  140. package/src/product.ts +2 -0
  141. package/src/runtime.test.ts +98 -0
  142. package/src/runtime.ts +438 -0
  143. package/src/skills/author-skill.ts +49 -0
  144. package/src/skills/create-skill.test.ts +108 -0
  145. package/src/skills/create-skill.ts +70 -0
  146. package/src/skills/loader.test.ts +122 -0
  147. package/src/skills/loader.ts +162 -0
  148. package/src/skills/registry.test.ts +190 -0
  149. package/src/skills/registry.ts +402 -0
  150. package/src/skills/skill-command.ts +53 -0
  151. package/src/skills/user-dir.ts +8 -0
  152. package/src/tools/git.test.ts +71 -0
  153. package/src/tools/git.ts +126 -0
  154. package/src/tools/local.ts +258 -0
  155. package/src/tools/paths.test.ts +24 -0
  156. package/src/tools/paths.ts +39 -0
  157. package/src/tools/read-skill.ts +43 -0
  158. package/src/tools/subagent.test.ts +77 -0
  159. package/src/tools/subagent.ts +74 -0
  160. package/src/tools/todo.test.ts +25 -0
  161. package/src/tools/todo.ts +70 -0
@@ -0,0 +1,54 @@
1
+ import { describe, expect, test } from "bun:test";
2
+ import { mkdtemp, readFile, rm } from "node:fs/promises";
3
+ import { tmpdir } from "node:os";
4
+ import { join } from "node:path";
5
+ import { initHost } from "./init.ts";
6
+ import { createLocalTools } from "./tools/local.ts";
7
+
8
+ describe("initHost", () => {
9
+ test("writes config, skill, eval, and gitignore", async () => {
10
+ const cwd = await mkdtemp(join(tmpdir(), "harness-init-"));
11
+ try {
12
+ const first = initHost({ cwd, name: "demo" });
13
+ expect(first.created).toContain("harness.config.ts");
14
+ expect(first.created).toContain("AGENTS.md");
15
+ const config = await readFile(join(cwd, "harness.config.ts"), "utf8");
16
+ expect(config).toContain('name: "demo"');
17
+ expect(config).toContain('mode: "agent"');
18
+ const second = initHost({ cwd, name: "demo" });
19
+ expect(second.skipped).toContain("harness.config.ts");
20
+ } finally {
21
+ await rm(cwd, { recursive: true, force: true });
22
+ }
23
+ });
24
+ });
25
+
26
+ describe("local tools", () => {
27
+ test("write, read, edit, glob, grep stay under cwd", async () => {
28
+ const cwd = await mkdtemp(join(tmpdir(), "harness-tools-"));
29
+ try {
30
+ const mcp = createLocalTools({ cwd });
31
+ const written = await mcp.callTool("write_file", {
32
+ path: "src/a.ts",
33
+ content: " cons t x = 1;\n",
34
+ });
35
+ expect(written.isError).toBeFalsy();
36
+ const edited = await mcp.callTool("edit_file", {
37
+ path: "src/a.ts",
38
+ old_str: " cons t x = 1;\n",
39
+ new_str: "const x = 1;\n",
40
+ });
41
+ expect(edited.isError).toBeFalsy();
42
+ const read = await mcp.callTool("read_file", { path: "src/a.ts" });
43
+ expect(read.content[0]?.text).toBe("const x = 1;\n");
44
+ const glob = await mcp.callTool("glob", { pattern: "**/*.ts" });
45
+ expect(JSON.stringify(glob.structuredContent)).toContain("src/a.ts");
46
+ const grep = await mcp.callTool("grep", { pattern: "const x" });
47
+ expect(JSON.stringify(grep.structuredContent)).toContain("src/a.ts");
48
+ const denied = await mcp.callTool("read_file", { path: "../secret" });
49
+ expect(denied.isError).toBe(true);
50
+ } finally {
51
+ await rm(cwd, { recursive: true, force: true });
52
+ }
53
+ });
54
+ });
package/src/init.ts ADDED
@@ -0,0 +1,117 @@
1
+ import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+
4
+ export interface InitOptions {
5
+ cwd: string;
6
+ name?: string;
7
+ }
8
+
9
+ const AGENTS = `# Agent instructions
10
+
11
+ You are a coding agent in this repository. Prefer small, targeted edits.
12
+ Do not invent metrics, testimonials, or sample numbers.
13
+
14
+ Copy and visual-QA skills are optional. If copywriting or impeccable is in the
15
+ skill catalog, read it with read_skill when the task matches. Do not assume
16
+ they are loaded.
17
+ `;
18
+
19
+ const SKILL = `---
20
+ name: hello
21
+ description: >-
22
+ A sample skill. Replace this with project-specific instructions the agent
23
+ should load when the task matches.
24
+ ---
25
+
26
+ # Hello
27
+
28
+ Read this skill when the user asks for a sample skill.
29
+ `;
30
+
31
+ const EVAL = `import type { EvalSuite } from "@useavalon/caelence-agent";
32
+
33
+ const suite: EvalSuite = {
34
+ name: "smoke",
35
+ steps: [
36
+ {
37
+ id: "echo",
38
+ system: "Reply with exactly: ok",
39
+ user: "ping",
40
+ artifact: "echo.txt",
41
+ scan: (text) => ({ ok: text.trim().toLowerCase().includes("ok") }),
42
+ },
43
+ ],
44
+ };
45
+
46
+ export default suite;
47
+ `;
48
+
49
+ function configSource(name: string): string {
50
+ return `import type { HarnessConfig } from "@useavalon/caelence-agent";
51
+
52
+ export default {
53
+ name: ${JSON.stringify(name)},
54
+ model: "~x-ai/grok-latest",
55
+ instructionsFile: "AGENTS.md",
56
+ skillsDir: "skills",
57
+ evalsDir: "evals",
58
+ theme: "caelence",
59
+ mode: "agent",
60
+ tools: { exec: { approval: "prompt" } },
61
+ mcp: [],
62
+ } satisfies HarnessConfig;
63
+ `;
64
+ }
65
+
66
+ function writeNew(
67
+ path: string,
68
+ contents: string,
69
+ created: string[],
70
+ skipped: string[],
71
+ rel: string,
72
+ ): void {
73
+ if (existsSync(path)) {
74
+ skipped.push(rel);
75
+ return;
76
+ }
77
+ writeFileSync(path, contents, "utf8");
78
+ created.push(rel);
79
+ }
80
+
81
+ /** Write host-project files. Existing files are left untouched. */
82
+ export function initHost(options: InitOptions): { created: string[]; skipped: string[] } {
83
+ const cwd = options.cwd;
84
+ const name = options.name ?? "caelence";
85
+ const created: string[] = [];
86
+ const skipped: string[] = [];
87
+
88
+ mkdirSync(join(cwd, "skills", "hello"), { recursive: true });
89
+ mkdirSync(join(cwd, "evals", "smoke"), { recursive: true });
90
+
91
+ writeNew(
92
+ join(cwd, "harness.config.ts"),
93
+ configSource(name),
94
+ created,
95
+ skipped,
96
+ "harness.config.ts",
97
+ );
98
+ writeNew(join(cwd, "AGENTS.md"), AGENTS, created, skipped, "AGENTS.md");
99
+ writeNew(join(cwd, "skills/hello/SKILL.md"), SKILL, created, skipped, "skills/hello/SKILL.md");
100
+ writeNew(join(cwd, "evals/smoke/eval.ts"), EVAL, created, skipped, "evals/smoke/eval.ts");
101
+
102
+ const gitignorePath = join(cwd, ".gitignore");
103
+ if (existsSync(gitignorePath)) {
104
+ const current = readFileSync(gitignorePath, "utf8");
105
+ if (!current.split("\n").some((line) => line.trim() === ".harness/")) {
106
+ appendFileSync(gitignorePath, current.endsWith("\n") ? ".harness/\n" : "\n.harness/\n");
107
+ created.push(".gitignore (append .harness/)");
108
+ } else {
109
+ skipped.push(".gitignore");
110
+ }
111
+ } else {
112
+ writeFileSync(gitignorePath, ".harness/\n", "utf8");
113
+ created.push(".gitignore");
114
+ }
115
+
116
+ return { created, skipped };
117
+ }
@@ -0,0 +1,424 @@
1
+ [
2
+ {
3
+ "id": "figma",
4
+ "label": "Figma",
5
+ "description": "Reads the open Figma file through the desktop Dev Mode MCP.",
6
+ "mcpUrl": "https://mcp.figma.com/mcp",
7
+ "docsUrl": "https://developers.figma.com/docs/figma-mcp-server/local-server-installation/",
8
+ "glyph": "Fi",
9
+ "auth": "desktop",
10
+ "scopes": [
11
+ "mcp:connect"
12
+ ]
13
+ },
14
+ {
15
+ "id": "canva",
16
+ "label": "Canva",
17
+ "description": "Pull brand kits, templates, and assets into the builder.",
18
+ "mcpUrl": "https://mcp.canva.com/mcp",
19
+ "docsUrl": "https://www.canva.dev/docs/connect/mcp-server/",
20
+ "glyph": "Ca",
21
+ "scopes": [
22
+ "profile:read",
23
+ "design:meta:read",
24
+ "design:content:read",
25
+ "asset:read"
26
+ ]
27
+ },
28
+ {
29
+ "id": "google-sheets",
30
+ "label": "Google Sheets",
31
+ "description": "Read and edit spreadsheets the signed-in account can access.",
32
+ "mcpUrl": "https://sheetsmcp.googleapis.com/mcp/v1",
33
+ "docsUrl": "https://developers.google.com/workspace/sheets/api/guides/configure-mcp-server",
34
+ "glyph": "Gs",
35
+ "auth": "google",
36
+ "scopes": [
37
+ "https://www.googleapis.com/auth/spreadsheets",
38
+ "https://www.googleapis.com/auth/drive.file"
39
+ ]
40
+ },
41
+ {
42
+ "id": "google-drive",
43
+ "label": "Google Drive",
44
+ "description": "List and read files in Drive.",
45
+ "mcpUrl": "https://drivemcp.googleapis.com/mcp/v1",
46
+ "docsUrl": "https://developers.google.com/workspace/guides/configure-mcp-servers",
47
+ "glyph": "Gd",
48
+ "auth": "google",
49
+ "scopes": [
50
+ "https://www.googleapis.com/auth/drive.readonly",
51
+ "https://www.googleapis.com/auth/drive.file"
52
+ ]
53
+ },
54
+ {
55
+ "id": "google-docs",
56
+ "label": "Google Docs",
57
+ "description": "Read and edit documents the signed-in account can access.",
58
+ "mcpUrl": "https://docsmcp.googleapis.com/mcp/v1",
59
+ "docsUrl": "https://developers.google.com/workspace/guides/configure-mcp-servers",
60
+ "glyph": "Go",
61
+ "auth": "google",
62
+ "scopes": [
63
+ "https://www.googleapis.com/auth/documents",
64
+ "https://www.googleapis.com/auth/drive.file"
65
+ ]
66
+ },
67
+ {
68
+ "id": "google-gmail",
69
+ "label": "Gmail",
70
+ "description": "Read and send mail for the signed-in account.",
71
+ "mcpUrl": "https://gmailmcp.googleapis.com/mcp/v1",
72
+ "docsUrl": "https://developers.google.com/workspace/guides/configure-mcp-servers",
73
+ "glyph": "Gm",
74
+ "auth": "google",
75
+ "scopes": [
76
+ "https://www.googleapis.com/auth/gmail.modify",
77
+ "https://www.googleapis.com/auth/gmail.send"
78
+ ]
79
+ },
80
+ {
81
+ "id": "google-calendar",
82
+ "label": "Google Calendar",
83
+ "description": "Read and create events on the signed-in calendars.",
84
+ "mcpUrl": "https://calendarmcp.googleapis.com/mcp/v1",
85
+ "docsUrl": "https://developers.google.com/workspace/guides/configure-mcp-servers",
86
+ "glyph": "Gc",
87
+ "auth": "google",
88
+ "scopes": [
89
+ "https://www.googleapis.com/auth/calendar"
90
+ ]
91
+ },
92
+ {
93
+ "id": "google-slides",
94
+ "label": "Google Slides",
95
+ "description": "Read and edit presentations the signed-in account can access.",
96
+ "mcpUrl": "https://slidesmcp.googleapis.com/mcp/v1",
97
+ "docsUrl": "https://developers.google.com/workspace/guides/configure-mcp-servers",
98
+ "glyph": "Sl",
99
+ "auth": "google",
100
+ "scopes": [
101
+ "https://www.googleapis.com/auth/presentations",
102
+ "https://www.googleapis.com/auth/drive.file"
103
+ ]
104
+ },
105
+ {
106
+ "id": "microsoft-365",
107
+ "label": "Microsoft 365",
108
+ "description": "Read Entra users, groups, and apps through Graph. Excel, Outlook, and OneDrive are not on this server.",
109
+ "mcpUrl": "https://mcp.svc.cloud.microsoft/enterprise",
110
+ "docsUrl": "https://learn.microsoft.com/en-us/graph/mcp-server/overview",
111
+ "glyph": "Ms",
112
+ "auth": "microsoft",
113
+ "scopes": [
114
+ "api://e8c77dc2-69b3-43f4-bc51-3213c9d915b4/.default"
115
+ ]
116
+ },
117
+ {
118
+ "id": "notion",
119
+ "label": "Notion",
120
+ "description": "Read specs, docs, and content databases while planning.",
121
+ "mcpUrl": "https://mcp.notion.com/mcp",
122
+ "docsUrl": "https://developers.notion.com/docs/mcp",
123
+ "glyph": "No",
124
+ "scopes": []
125
+ },
126
+ {
127
+ "id": "linear",
128
+ "label": "Linear",
129
+ "description": "Sync issues and project status into tickets.",
130
+ "mcpUrl": "https://mcp.linear.app/mcp",
131
+ "docsUrl": "https://linear.app/docs/mcp",
132
+ "glyph": "Li",
133
+ "scopes": [
134
+ "read",
135
+ "write"
136
+ ]
137
+ },
138
+ {
139
+ "id": "craft",
140
+ "label": "Craft",
141
+ "description": "Read docs, daily notes, and space content while planning.",
142
+ "mcpUrl": "https://mcp.craft.do/my/mcp",
143
+ "docsUrl": "https://support.craft.do/en/integrate/mcp",
144
+ "glyph": "Cr",
145
+ "scopes": []
146
+ },
147
+ {
148
+ "id": "granola",
149
+ "label": "Granola",
150
+ "description": "Search meeting notes and transcripts while planning.",
151
+ "mcpUrl": "https://mcp.granola.ai/mcp",
152
+ "docsUrl": "https://www.granola.ai/blog/granola-mcp-claude-chatgpt-cursor",
153
+ "glyph": "Gr",
154
+ "scopes": [
155
+ "mcp"
156
+ ]
157
+ },
158
+ {
159
+ "id": "sanity-mcp",
160
+ "label": "Sanity",
161
+ "description": "Query projects, schemas, and documents while building.",
162
+ "mcpUrl": "https://mcp.sanity.io",
163
+ "docsUrl": "https://www.sanity.io/docs/ai/mcp-server",
164
+ "glyph": "Sa",
165
+ "scopes": []
166
+ },
167
+ {
168
+ "id": "stripe-mcp",
169
+ "label": "Stripe",
170
+ "description": "Inspect customers, payments, and subscriptions from the agent.",
171
+ "mcpUrl": "https://mcp.stripe.com",
172
+ "docsUrl": "https://docs.stripe.com/mcp",
173
+ "glyph": "S",
174
+ "scopes": []
175
+ },
176
+ {
177
+ "id": "supabase-mcp",
178
+ "label": "Supabase",
179
+ "description": "Inspect projects, schema, and data while building.",
180
+ "mcpUrl": "https://mcp.supabase.com/mcp",
181
+ "docsUrl": "https://supabase.com/docs/guides/getting-started/mcp",
182
+ "glyph": "Sb",
183
+ "scopes": [
184
+ "organizations:read",
185
+ "projects:read",
186
+ "database:read"
187
+ ]
188
+ },
189
+ {
190
+ "id": "neon-mcp",
191
+ "label": "Neon",
192
+ "description": "Query branches, schema, and SQL from the agent.",
193
+ "mcpUrl": "https://mcp.neon.tech/mcp",
194
+ "docsUrl": "https://neon.com/docs/ai/neon-mcp-server",
195
+ "glyph": "Ne",
196
+ "scopes": []
197
+ },
198
+ {
199
+ "id": "sentry-mcp",
200
+ "label": "Sentry",
201
+ "description": "Browse errors, issues, and releases from the agent.",
202
+ "mcpUrl": "https://mcp.sentry.dev/mcp",
203
+ "docsUrl": "https://docs.sentry.io/product/sentry-mcp/",
204
+ "glyph": "Se",
205
+ "scopes": [
206
+ "org:read",
207
+ "event:write"
208
+ ]
209
+ },
210
+ {
211
+ "id": "posthog-mcp",
212
+ "label": "PostHog",
213
+ "description": "Query analytics, flags, and HogQL from the agent.",
214
+ "mcpUrl": "https://mcp.posthog.com/mcp",
215
+ "docsUrl": "https://posthog.com/docs/model-context-protocol",
216
+ "glyph": "Ph",
217
+ "scopes": []
218
+ },
219
+ {
220
+ "id": "paddle-mcp",
221
+ "label": "Paddle",
222
+ "description": "Inspect products, prices, and subscriptions from the agent.",
223
+ "mcpUrl": "https://mcp.paddle.com/mcp",
224
+ "docsUrl": "https://developer.paddle.com/sdks/ai/paddle-mcp",
225
+ "glyph": "Pd",
226
+ "scopes": [
227
+ "openid",
228
+ "profile",
229
+ "email"
230
+ ]
231
+ },
232
+ {
233
+ "id": "prismic-mcp",
234
+ "label": "Prismic",
235
+ "description": "Search and draft repository content from the agent.",
236
+ "mcpUrl": "https://mcp.prismic.io/mcp",
237
+ "docsUrl": "https://prismic.io/docs/mcp",
238
+ "glyph": "Pr",
239
+ "scopes": []
240
+ },
241
+ {
242
+ "id": "replicate-mcp",
243
+ "label": "Replicate",
244
+ "description": "Run and inspect models from the agent.",
245
+ "mcpUrl": "https://mcp.replicate.com/mcp",
246
+ "docsUrl": "https://replicate.com/docs",
247
+ "glyph": "Rp",
248
+ "scopes": []
249
+ },
250
+ {
251
+ "id": "mixpanel-mcp",
252
+ "label": "Mixpanel",
253
+ "description": "Query product analytics from the agent.",
254
+ "mcpUrl": "https://mcp.mixpanel.com/mcp",
255
+ "docsUrl": "https://docs.mixpanel.com/",
256
+ "glyph": "Mx",
257
+ "scopes": []
258
+ },
259
+ {
260
+ "id": "algolia-mcp",
261
+ "label": "Algolia",
262
+ "description": "Search indexes and records from the agent.",
263
+ "mcpUrl": "https://mcp.algolia.com/mcp",
264
+ "docsUrl": "https://www.algolia.com/doc/",
265
+ "glyph": "Al",
266
+ "scopes": []
267
+ },
268
+ {
269
+ "id": "contentful-mcp",
270
+ "label": "Contentful",
271
+ "description": "Browse spaces and entries from the agent.",
272
+ "mcpUrl": "https://mcp.contentful.com/mcp",
273
+ "docsUrl": "https://www.contentful.com/developers/docs/",
274
+ "glyph": "Cf",
275
+ "scopes": []
276
+ },
277
+ {
278
+ "id": "mux-mcp",
279
+ "label": "Mux",
280
+ "description": "Inspect assets and streams from the agent.",
281
+ "mcpUrl": "https://mcp.mux.com",
282
+ "docsUrl": "https://www.mux.com/docs",
283
+ "glyph": "Mx",
284
+ "scopes": [
285
+ "openid",
286
+ "profile"
287
+ ]
288
+ },
289
+ {
290
+ "id": "resend-mcp",
291
+ "label": "Resend",
292
+ "description": "Inspect domains and email activity from the agent.",
293
+ "mcpUrl": "https://mcp.resend.com",
294
+ "docsUrl": "https://resend.com/docs",
295
+ "glyph": "Re",
296
+ "scopes": [
297
+ "full_access"
298
+ ]
299
+ },
300
+ {
301
+ "id": "upstash-mcp",
302
+ "label": "Upstash",
303
+ "description": "Inspect Redis and vector indexes from the agent.",
304
+ "mcpUrl": "https://mcp.upstash.com/mcp",
305
+ "docsUrl": "https://upstash.com/docs",
306
+ "glyph": "Up",
307
+ "scopes": [
308
+ "openid",
309
+ "profile",
310
+ "email"
311
+ ]
312
+ },
313
+ {
314
+ "id": "cloudflare-mcp",
315
+ "label": "Cloudflare",
316
+ "description": "Inspect Workers, KV, and account resources from the agent.",
317
+ "mcpUrl": "https://mcp.cloudflare.com/mcp",
318
+ "docsUrl": "https://developers.cloudflare.com/agents/model-context-protocol/",
319
+ "glyph": "Cf",
320
+ "scopes": []
321
+ },
322
+ {
323
+ "id": "dinero",
324
+ "label": "Dinero",
325
+ "description": "Read books, invoices, and entries from Danish accounting.",
326
+ "mcpUrl": "https://mcp.dinero.dk/mcp",
327
+ "docsUrl": "https://dinero.dk/funktioner/mcp/",
328
+ "glyph": "Di",
329
+ "scopes": [
330
+ "dineropublicapi:read",
331
+ "dineropublicapi:write",
332
+ "offline_access"
333
+ ]
334
+ },
335
+ {
336
+ "id": "sceneplane",
337
+ "label": "Sceneplane",
338
+ "description": "Cloud Blender: scenes, renders, and exports from the agent.",
339
+ "mcpUrl": "https://mcp.sceneplane.online/v1",
340
+ "docsUrl": "https://sceneplane.online",
341
+ "glyph": "Sp",
342
+ "scopes": [
343
+ "mcp:discover",
344
+ "projects:read",
345
+ "projects:write",
346
+ "renders:run",
347
+ "exports:run",
348
+ "jobs:read"
349
+ ]
350
+ },
351
+ {
352
+ "id": "jira",
353
+ "label": "Jira",
354
+ "description": "Read and update Jira issues from the builder agent.",
355
+ "mcpUrl": "https://mcp.atlassian.com/v1/mcp",
356
+ "docsUrl": "https://support.atlassian.com/atlassian-rovo/docs/getting-started-with-the-atlassian-remote-mcp-server/",
357
+ "glyph": "Ji",
358
+ "scopes": []
359
+ },
360
+ {
361
+ "id": "airtable",
362
+ "label": "Airtable",
363
+ "description": "Query bases as structured content for the agent.",
364
+ "mcpUrl": "https://mcp.airtable.com",
365
+ "docsUrl": "https://airtable.com/developers/web/api/mcp",
366
+ "glyph": "At",
367
+ "scopes": [
368
+ "data.records:read",
369
+ "schema.bases:read"
370
+ ]
371
+ },
372
+ {
373
+ "id": "miro",
374
+ "label": "Miro",
375
+ "description": "Boards and sticky notes for moodboards and IA.",
376
+ "mcpUrl": "https://mcp.miro.com/",
377
+ "docsUrl": "https://developers.miro.com/docs/miro-mcp",
378
+ "glyph": "Mi",
379
+ "scopes": [
380
+ "boards:read",
381
+ "boards:write"
382
+ ]
383
+ },
384
+ {
385
+ "id": "webflow",
386
+ "label": "Webflow",
387
+ "description": "CMS collections and site structure for migrations.",
388
+ "mcpUrl": "https://mcp.webflow.com",
389
+ "docsUrl": "https://developers.webflow.com/data/v2.0.0/docs/mcp-server",
390
+ "glyph": "Wf",
391
+ "scopes": []
392
+ },
393
+ {
394
+ "id": "vercel",
395
+ "label": "Vercel",
396
+ "description": "Projects, deployments, and env inspection for the agent.",
397
+ "mcpUrl": "https://mcp.vercel.com/",
398
+ "docsUrl": "https://vercel.com/docs/mcp/vercel-mcp",
399
+ "glyph": "▲",
400
+ "scopes": [
401
+ "openid"
402
+ ]
403
+ },
404
+ {
405
+ "id": "gitlab",
406
+ "label": "GitLab",
407
+ "description": "Issues, merge requests, and repo search.",
408
+ "mcpUrl": "https://gitlab.com/api/v4/mcp",
409
+ "docsUrl": "https://docs.gitlab.com/user/gitlab_duo/model_context_protocol/mcp_server/",
410
+ "glyph": "Gl",
411
+ "scopes": [
412
+ "mcp"
413
+ ]
414
+ },
415
+ {
416
+ "id": "monday",
417
+ "label": "monday.com",
418
+ "description": "Boards and items as a planning source.",
419
+ "mcpUrl": "https://mcp.monday.com/mcp",
420
+ "docsUrl": "https://developer.monday.com/api-reference/docs/mcp",
421
+ "glyph": "Mo",
422
+ "scopes": []
423
+ }
424
+ ]
@@ -0,0 +1,81 @@
1
+ /** One-click MCP catalog. Same hosted servers as the Caelence builder. */
2
+
3
+ import { existsSync, readFileSync } from "node:fs";
4
+ import { join } from "node:path";
5
+
6
+ export type McpAuthKind = "dcr" | "google" | "microsoft" | "desktop";
7
+
8
+ export interface McpCatalogEntry {
9
+ id: string;
10
+ label: string;
11
+ description: string;
12
+ mcpUrl: string;
13
+ docsUrl: string;
14
+ glyph: string;
15
+ scopes: readonly string[];
16
+ auth?: McpAuthKind;
17
+ }
18
+
19
+ export type IntegrationLogoKind = "mask" | "image";
20
+
21
+ export const MCP_CATALOG: readonly McpCatalogEntry[] = JSON.parse(
22
+ readFileSync(join(import.meta.dir, "catalog-data.json"), "utf8"),
23
+ ) as McpCatalogEntry[];
24
+
25
+ export function findMcpCatalog(id: string): McpCatalogEntry | undefined {
26
+ return MCP_CATALOG.find((item) => item.id === id);
27
+ }
28
+
29
+ /** One-click DCR first, then desktop MCP, then user-owned OAuth clients. */
30
+ export function listedMcpCatalog(): McpCatalogEntry[] {
31
+ return [...MCP_CATALOG].sort((a, b) => listRank(a) - listRank(b));
32
+ }
33
+
34
+ export function needsDesktopMcp(item: { auth?: McpAuthKind }): boolean {
35
+ return item.auth === "desktop";
36
+ }
37
+
38
+ export function needsUserOAuth(item: { auth?: McpAuthKind }): boolean {
39
+ return item.auth === "google" || item.auth === "microsoft";
40
+ }
41
+
42
+ function listRank(item: { auth?: McpAuthKind }): number {
43
+ if (needsUserOAuth(item)) return 2;
44
+ if (needsDesktopMcp(item)) return 1;
45
+ return 0;
46
+ }
47
+
48
+ const MARKS_DIR = join(import.meta.dir, "marks");
49
+ const MIME_BY_EXT = {
50
+ svg: "image/svg+xml",
51
+ png: "image/png",
52
+ jpg: "image/jpeg",
53
+ } as const;
54
+
55
+ function localMark(id: string): { file: string; mime: string } | undefined {
56
+ for (const ext of ["svg", "png", "jpg"] as const) {
57
+ const file = `${id}.${ext}`;
58
+ if (existsSync(join(MARKS_DIR, file))) {
59
+ return { file, mime: MIME_BY_EXT[ext] };
60
+ }
61
+ }
62
+ return undefined;
63
+ }
64
+
65
+ function markDataUrl(file: string, mime: string): string {
66
+ const buf = readFileSync(join(MARKS_DIR, file));
67
+ if (mime === "image/svg+xml") {
68
+ return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(buf.toString("utf8"))}`;
69
+ }
70
+ return `data:${mime};base64,${buf.toString("base64")}`;
71
+ }
72
+
73
+ export function integrationLogoUrl(id: string): string {
74
+ const local = localMark(id);
75
+ if (!local) throw new Error(`Missing integration mark for ${id}.`);
76
+ return markDataUrl(local.file, local.mime);
77
+ }
78
+
79
+ export function integrationLogoKind(_id: string): IntegrationLogoKind {
80
+ return "image";
81
+ }