cognova 0.2.11 → 0.2.12
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/a892969f-e07d-4f44-8d7e-57a4b7f33d94.json +1 -0
- package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
- package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
- package/.output/server/chunks/build/EditorToolbar-DIfb5arC.mjs +1 -1
- package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
- package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
- package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
- package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
- package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
- package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
- package/.output/server/chunks/build/Tree-DUhXKd8y.mjs +1 -1
- package/.output/server/chunks/build/_uuid_-DfJaumTE.mjs +1 -1
- package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
- package/.output/server/chunks/build/dashboard-CiVTAZuF.mjs +1 -1
- package/.output/server/chunks/build/docs-ChGwOPg5.mjs +1 -1
- package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
- package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +1 -1
- package/.output/server/chunks/build/settings-B2KXoGcz.mjs +1 -1
- package/.output/server/chunks/build/styles.mjs +4 -4
- package/.output/server/chunks/build/useNotificationBus-BG5JNQf1.mjs +1 -1
- package/.output/server/chunks/build/view-n2sYa4Zh.mjs +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +220 -216
- package/.output/server/chunks/routes/_ws/chat.mjs +1 -1
- package/.output/server/chunks/routes/api/bridges/_id/contacts.get.mjs +84 -0
- package/.output/server/chunks/routes/api/bridges/_id/contacts.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/bridges/_id/send.post.mjs +70 -0
- package/.output/server/chunks/routes/api/bridges/_id/send.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/bridges/context.get.mjs +19 -18
- package/.output/server/chunks/routes/api/bridges/context.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/home.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get10.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get6.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get7.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get8.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get9.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/export.get.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/create.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/generate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/import.post.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/index.get2.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs +1 -1
- package/.output/server/chunks/routes/api/skills/library/install.post.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/api/user/email.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/webhooks/bluebubbles.post.mjs +1 -1
- package/.output/server/chunks/routes/api/webhooks/telegram.post.mjs +1 -1
- package/.output/server/chunks/routes/notifications.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/chunks/routes/terminal.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/Claude/skills/bridge/SKILL.md +25 -1
- package/Claude/skills/bridge/bridge.py +64 -0
- package/package.json +1 -1
- package/server/api/bridges/[id]/contacts.get.ts +57 -0
- package/server/api/bridges/[id]/send.post.ts +40 -0
- package/server/api/bridges/context.get.ts +19 -18
- package/server/bridge/responder.ts +3 -3
- package/.output/public/_nuxt/builds/meta/515be38f-7222-4e4b-80cb-cef7594b1834.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody, a as getDb, T as encryptSecret, R as secrets, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { eq } from 'drizzle-orm';
|
|
3
3
|
import '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import 'module';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, W as validateSkillName, X as isCoreSkill, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, rm } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, W as validateSkillName, Y as getSkillsDir, Z as getInactiveSkillsDir, _ as setResponseHeaders, $ as send } from '../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import AdmZip from 'adm-zip';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, mkdir, writeFile } from 'fs/promises';
|
|
3
3
|
import { normalize, join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, rm } from 'fs/promises';
|
|
3
3
|
import { normalize, join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, readFile } from 'fs/promises';
|
|
3
3
|
import { normalize, join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, e as readBody, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../../../nitro/nitro.mjs';
|
|
2
2
|
import { mkdir, writeFile, stat } from 'fs/promises';
|
|
3
3
|
import { normalize, join, dirname } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, a0 as buildSkillFileTree, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, X as isCoreSkill, e as readBody, W as validateSkillName, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, rename, readFile, writeFile } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, X as isCoreSkill, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, mkdir, rename } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, e as readBody, c as createError,
|
|
1
|
+
import { d as defineEventHandler, e as readBody, c as createError, W as validateSkillName, Y as getSkillsDir } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, mkdir, writeFile } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, e as readBody, c as createError,
|
|
1
|
+
import { d as defineEventHandler, e as readBody, c as createError, W as validateSkillName, Z as getInactiveSkillsDir, a2 as logTokenUsage } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, mkdir, rm, readdir } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler,
|
|
1
|
+
import { d as defineEventHandler, a3 as readMultipartFormData, c as createError, W as validateSkillName, Y as getSkillsDir, Z as getInactiveSkillsDir } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, mkdir, writeFile } from 'fs/promises';
|
|
3
3
|
import { join, normalize } from 'path';
|
|
4
4
|
import AdmZip from 'adm-zip';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, g as getRouterParam, c as createError,
|
|
1
|
+
import { d as defineEventHandler, g as getRouterParam, c as createError, Y as getSkillsDir, Z as getInactiveSkillsDir, a1 as parseSkillFrontmatter, a0 as buildSkillFileTree, X as isCoreSkill } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, readFile } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, a as getDb, Y as getSkillsDir, Z as getInactiveSkillsDir, a1 as parseSkillFrontmatter } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, readFile } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, a as getDb, Y as getSkillsDir, Z as getInactiveSkillsDir, a1 as parseSkillFrontmatter } from '../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, readdir, readFile } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, e as readBody, c as createError, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, e as readBody, c as createError, a as getDb, a4 as skillsCatalog, Y as getSkillsDir } from '../../../../nitro/nitro.mjs';
|
|
2
2
|
import { stat, rm, mkdir, writeFile } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { eq } from 'drizzle-orm';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, a as getDb, z as tasks, n as notifyResourceChange } from '../../../../nitro/nitro.mjs';
|
|
2
2
|
import { eq } from 'drizzle-orm';
|
|
3
3
|
import '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import 'module';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, a as getDb, z as tasks, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { eq } from 'drizzle-orm';
|
|
3
3
|
import '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import 'module';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, e as readBody, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, e as readBody, a as getDb, z as tasks, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { eq } from 'drizzle-orm';
|
|
3
3
|
import '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import 'module';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, r as requireDb, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, r as requireDb, a as getDb, z as tasks } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { isNull } from 'drizzle-orm';
|
|
3
3
|
import '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import 'module';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, r as requireDb, i as getQuery, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, r as requireDb, i as getQuery, a as getDb, C as tokenUsage } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { gte } from 'drizzle-orm';
|
|
3
3
|
import '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import 'module';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, k as auth, c as createError, e as readBody, a as getDb,
|
|
1
|
+
import { d as defineEventHandler, k as auth, c as createError, e as readBody, a as getDb, a5 as user } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { eq } from 'drizzle-orm';
|
|
3
3
|
import '@anthropic-ai/claude-agent-sdk';
|
|
4
4
|
import 'module';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler,
|
|
1
|
+
import { d as defineEventHandler, a6 as getAdapterByPlatform, c as createError, e as readBody } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import '@anthropic-ai/claude-agent-sdk';
|
|
3
3
|
import 'module';
|
|
4
4
|
import 'path';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler,
|
|
1
|
+
import { d as defineEventHandler, a6 as getAdapterByPlatform, c as createError, a7 as getHeader, e as readBody } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import '@anthropic-ai/claude-agent-sdk';
|
|
3
3
|
import 'module';
|
|
4
4
|
import 'path';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'vue-bundle-renderer/runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { aP as buildAssetsURL, L as useRuntimeConfig, aQ as getResponseStatusText, aR as getResponseStatus, aS as defineRenderHandler, aT as publicAssetsURL, i as getQuery, c as createError, ai as destr, aU as getRouteRules, aV as useNitroApp } from '../nitro/nitro.mjs';
|
|
3
3
|
import { renderToString } from 'vue/server-renderer';
|
|
4
4
|
import { createHead as createHead$1, propsToString, renderSSRHead } from 'unhead/server';
|
|
5
5
|
import { stringify, uneval } from 'devalue';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a8 as defineWebSocketHandler, ab as resizePty, ac as writeToPty, ad as getOrCreatePtySession, ae as getOutputBuffer, af as getPtySession } from '../nitro/nitro.mjs';
|
|
2
2
|
import '@anthropic-ai/claude-agent-sdk';
|
|
3
3
|
import 'module';
|
|
4
4
|
import 'path';
|
package/.output/server/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};import 'node:http';
|
|
2
2
|
import 'node:https';
|
|
3
|
-
export {
|
|
3
|
+
export { aW as default } from './chunks/nitro/nitro.mjs';
|
|
4
4
|
import '@anthropic-ai/claude-agent-sdk';
|
|
5
5
|
import 'module';
|
|
6
6
|
import 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bridge
|
|
3
|
-
description: Manage message bridge integrations (Telegram, Discord, iMessage, Google Suite, Email). List, enable, disable, and
|
|
3
|
+
description: Manage message bridge integrations (Telegram, Discord, iMessage, Google Suite, Email). List, enable, disable, configure, send messages, and look up contacts.
|
|
4
4
|
allowed-tools: Bash, Read
|
|
5
5
|
metadata:
|
|
6
6
|
version: "1.0.0"
|
|
@@ -63,6 +63,27 @@ python3 ~/.claude/skills/bridge/bridge.py delete <BRIDGE_ID>
|
|
|
63
63
|
|
|
64
64
|
Permanently removes a bridge and all its message history.
|
|
65
65
|
|
|
66
|
+
### List contacts for a bridge
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
python3 ~/.claude/skills/bridge/bridge.py contacts <BRIDGE_ID> [--query "search"] [--limit 50]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Lists people who have messaged through this bridge. Returns name, platform ID (needed for sending), message count, and last message time. Use `--query` to filter by name or ID.
|
|
73
|
+
|
|
74
|
+
### Send a message through a bridge
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
python3 ~/.claude/skills/bridge/bridge.py send <BRIDGE_ID> --recipient <RECIPIENT_ID> --text "Hello!"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Sends a message to a specific recipient. The `--recipient` is the platform-specific ID (e.g., Telegram chat_id, Discord user_id). Use `contacts` to look up recipient IDs first.
|
|
81
|
+
|
|
82
|
+
**Workflow for sending a message to someone:**
|
|
83
|
+
1. `list` → find the bridge ID for the platform
|
|
84
|
+
2. `contacts <BRIDGE_ID> --query "name"` → find the recipient's platform ID
|
|
85
|
+
3. `send <BRIDGE_ID> --recipient <ID> --text "message"` → send the message
|
|
86
|
+
|
|
66
87
|
### Show integration context
|
|
67
88
|
|
|
68
89
|
```bash
|
|
@@ -80,6 +101,9 @@ Shows the current integration context that gets injected into sessions.
|
|
|
80
101
|
- "What integrations do I have?" → Use `list`
|
|
81
102
|
- "Disable Discord" → Use `disable`
|
|
82
103
|
- "Check bridge status" → Use `list` (shows health)
|
|
104
|
+
- "Send a message to X on Telegram" → `list` → `contacts` → `send`
|
|
105
|
+
- "Who has messaged me on Telegram?" → `list` → `contacts`
|
|
106
|
+
- "Message @username on Discord" → `list` → `contacts --query username` → `send`
|
|
83
107
|
|
|
84
108
|
## Setup Guides
|
|
85
109
|
|
|
@@ -160,6 +160,56 @@ def cmd_delete(args):
|
|
|
160
160
|
print(f"Bridge '{data.get('name')}' deleted.")
|
|
161
161
|
|
|
162
162
|
|
|
163
|
+
def cmd_contacts(args):
|
|
164
|
+
"""List known contacts for a bridge."""
|
|
165
|
+
params = {}
|
|
166
|
+
if args.query:
|
|
167
|
+
params["q"] = args.query
|
|
168
|
+
if args.limit:
|
|
169
|
+
params["limit"] = str(args.limit)
|
|
170
|
+
|
|
171
|
+
success, data = get(f"/bridges/{args.id}/contacts", params=params if params else None)
|
|
172
|
+
if not success:
|
|
173
|
+
print(f"Error: {data}")
|
|
174
|
+
sys.exit(1)
|
|
175
|
+
|
|
176
|
+
contacts = data if isinstance(data, list) else []
|
|
177
|
+
if not contacts:
|
|
178
|
+
print("No contacts found for this bridge.")
|
|
179
|
+
return
|
|
180
|
+
|
|
181
|
+
name_width = max(len(c.get("senderName") or c.get("sender") or "") for c in contacts)
|
|
182
|
+
name_width = max(name_width, 4)
|
|
183
|
+
|
|
184
|
+
print(f"{'Name':<{name_width}} {'ID':<20} {'Messages':<9} {'Last message'}")
|
|
185
|
+
print(f"{'-' * name_width} {'-' * 20} {'-' * 9} {'-' * 20}")
|
|
186
|
+
|
|
187
|
+
for c in contacts:
|
|
188
|
+
name = c.get("senderName") or "(unknown)"
|
|
189
|
+
sender = c.get("sender") or ""
|
|
190
|
+
count = c.get("messageCount", 0)
|
|
191
|
+
last = (c.get("lastMessageAt") or "")[:19]
|
|
192
|
+
print(f"{name:<{name_width}} {sender:<20} {count:<9} {last}")
|
|
193
|
+
|
|
194
|
+
print(f"\n{len(contacts)} contact(s).")
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def cmd_send(args):
|
|
198
|
+
"""Send a message through a bridge."""
|
|
199
|
+
body = {
|
|
200
|
+
"recipient": args.recipient,
|
|
201
|
+
"text": args.text
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
success, data = post(f"/bridges/{args.id}/send", body)
|
|
205
|
+
if not success:
|
|
206
|
+
print(f"Error: {data}")
|
|
207
|
+
sys.exit(1)
|
|
208
|
+
|
|
209
|
+
msg_id = data.get("platformMessageId", "")
|
|
210
|
+
print(f"Message sent successfully." + (f" (ID: {msg_id})" if msg_id else ""))
|
|
211
|
+
|
|
212
|
+
|
|
163
213
|
def cmd_context(args):
|
|
164
214
|
"""Show current bridge context."""
|
|
165
215
|
success, data = get("/bridges/context")
|
|
@@ -208,6 +258,18 @@ def main():
|
|
|
208
258
|
p_delete = sub.add_parser("delete", help="Delete a bridge")
|
|
209
259
|
p_delete.add_argument("id", help="Bridge ID")
|
|
210
260
|
|
|
261
|
+
# contacts
|
|
262
|
+
p_contacts = sub.add_parser("contacts", help="List known contacts for a bridge")
|
|
263
|
+
p_contacts.add_argument("id", help="Bridge ID")
|
|
264
|
+
p_contacts.add_argument("--query", "-q", help="Search filter on name or ID")
|
|
265
|
+
p_contacts.add_argument("--limit", type=int, help="Max results (default 50)")
|
|
266
|
+
|
|
267
|
+
# send
|
|
268
|
+
p_send = sub.add_parser("send", help="Send a message through a bridge")
|
|
269
|
+
p_send.add_argument("id", help="Bridge ID")
|
|
270
|
+
p_send.add_argument("--recipient", "-r", required=True, help="Recipient ID (chat_id, user_id, etc.)")
|
|
271
|
+
p_send.add_argument("--text", "-t", required=True, help="Message text")
|
|
272
|
+
|
|
211
273
|
# context
|
|
212
274
|
sub.add_parser("context", help="Show integration context")
|
|
213
275
|
|
|
@@ -221,6 +283,8 @@ def main():
|
|
|
221
283
|
"disable": cmd_disable,
|
|
222
284
|
"configure": cmd_configure,
|
|
223
285
|
"delete": cmd_delete,
|
|
286
|
+
"contacts": cmd_contacts,
|
|
287
|
+
"send": cmd_send,
|
|
224
288
|
"context": cmd_context
|
|
225
289
|
}
|
|
226
290
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { and, count, desc, eq, isNotNull, max, or, sql } from 'drizzle-orm'
|
|
2
|
+
import { getDb, schema } from '~~/server/db'
|
|
3
|
+
import { requireDb } from '~~/server/utils/db-guard'
|
|
4
|
+
|
|
5
|
+
export default defineEventHandler(async (event) => {
|
|
6
|
+
requireDb(event)
|
|
7
|
+
|
|
8
|
+
const id = getRouterParam(event, 'id')
|
|
9
|
+
if (!id)
|
|
10
|
+
throw createError({ statusCode: 400, message: 'Bridge ID is required' })
|
|
11
|
+
|
|
12
|
+
const db = getDb()
|
|
13
|
+
const bridge = await db.query.bridges.findFirst({
|
|
14
|
+
where: eq(schema.bridges.id, id)
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
if (!bridge)
|
|
18
|
+
throw createError({ statusCode: 404, message: 'Bridge not found' })
|
|
19
|
+
|
|
20
|
+
const query = getQuery(event)
|
|
21
|
+
const q = (query.q as string)?.trim()
|
|
22
|
+
const limit = Math.min(parseInt(query.limit as string) || 50, 200)
|
|
23
|
+
|
|
24
|
+
const conditions = [
|
|
25
|
+
eq(schema.bridgeMessages.bridgeId, id),
|
|
26
|
+
eq(schema.bridgeMessages.direction, 'inbound'),
|
|
27
|
+
isNotNull(schema.bridgeMessages.sender)
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
if (q) {
|
|
31
|
+
conditions.push(
|
|
32
|
+
or(
|
|
33
|
+
sql`${schema.bridgeMessages.sender} ILIKE ${`%${q}%`}`,
|
|
34
|
+
sql`${schema.bridgeMessages.senderName} ILIKE ${`%${q}%`}`
|
|
35
|
+
)!
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const contacts = await db.select({
|
|
40
|
+
sender: schema.bridgeMessages.sender,
|
|
41
|
+
senderName: schema.bridgeMessages.senderName,
|
|
42
|
+
platform: schema.bridgeMessages.platform,
|
|
43
|
+
messageCount: count(),
|
|
44
|
+
lastMessageAt: max(schema.bridgeMessages.createdAt)
|
|
45
|
+
})
|
|
46
|
+
.from(schema.bridgeMessages)
|
|
47
|
+
.where(and(...conditions))
|
|
48
|
+
.groupBy(
|
|
49
|
+
schema.bridgeMessages.sender,
|
|
50
|
+
schema.bridgeMessages.senderName,
|
|
51
|
+
schema.bridgeMessages.platform
|
|
52
|
+
)
|
|
53
|
+
.orderBy(desc(max(schema.bridgeMessages.createdAt)))
|
|
54
|
+
.limit(limit)
|
|
55
|
+
|
|
56
|
+
return { data: contacts }
|
|
57
|
+
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { eq } from 'drizzle-orm'
|
|
2
|
+
import { getDb, schema } from '~~/server/db'
|
|
3
|
+
import { requireDb } from '~~/server/utils/db-guard'
|
|
4
|
+
import { sendOutboundMessage } from '~~/server/bridge/router'
|
|
5
|
+
|
|
6
|
+
export default defineEventHandler(async (event) => {
|
|
7
|
+
requireDb(event)
|
|
8
|
+
|
|
9
|
+
const id = getRouterParam(event, 'id')
|
|
10
|
+
if (!id)
|
|
11
|
+
throw createError({ statusCode: 400, message: 'Bridge ID is required' })
|
|
12
|
+
|
|
13
|
+
const db = getDb()
|
|
14
|
+
const bridge = await db.query.bridges.findFirst({
|
|
15
|
+
where: eq(schema.bridges.id, id)
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
if (!bridge)
|
|
19
|
+
throw createError({ statusCode: 404, message: 'Bridge not found' })
|
|
20
|
+
if (!bridge.enabled)
|
|
21
|
+
throw createError({ statusCode: 400, message: 'Bridge is not enabled' })
|
|
22
|
+
|
|
23
|
+
const body = await readBody<{ recipient?: string, text?: string, replyToMessageId?: string }>(event)
|
|
24
|
+
|
|
25
|
+
if (!body?.recipient || !body?.text)
|
|
26
|
+
throw createError({ statusCode: 400, message: 'recipient and text are required' })
|
|
27
|
+
|
|
28
|
+
const result = await sendOutboundMessage({
|
|
29
|
+
bridgeId: id,
|
|
30
|
+
platform: bridge.platform,
|
|
31
|
+
recipient: body.recipient,
|
|
32
|
+
text: body.text,
|
|
33
|
+
replyToMessageId: body.replyToMessageId
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
if (!result.success)
|
|
37
|
+
throw createError({ statusCode: 502, message: result.error || 'Failed to send message' })
|
|
38
|
+
|
|
39
|
+
return { data: result }
|
|
40
|
+
})
|
|
@@ -19,20 +19,22 @@ const platformLabels: Record<BridgePlatform, string> = {
|
|
|
19
19
|
|
|
20
20
|
const allPlatforms: BridgePlatform[] = ['telegram', 'discord', 'imessage', 'google', 'email']
|
|
21
21
|
|
|
22
|
-
function formatTelegramContext(config: TelegramBridgeConfig | null): string {
|
|
22
|
+
function formatTelegramContext(config: TelegramBridgeConfig | null, bridgeId: string): string {
|
|
23
23
|
const lines = [
|
|
24
24
|
'You can send and receive Telegram messages.',
|
|
25
|
-
'- Incoming messages
|
|
26
|
-
|
|
25
|
+
'- Incoming messages are routed to you automatically.',
|
|
26
|
+
`- To send a message: use \`/bridge\` skill → \`contacts ${bridgeId}\` to find the recipient, then \`send ${bridgeId} -r <ID> -t "message"\``,
|
|
27
|
+
`- To list contacts: \`/bridge\` skill → \`contacts ${bridgeId}\``
|
|
27
28
|
]
|
|
28
29
|
if (config?.botUsername)
|
|
29
30
|
lines.push(`- Bot username: @${config.botUsername}`)
|
|
30
31
|
return lines.join('\n')
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
function formatDiscordContext(config: DiscordBridgeConfig | null): string {
|
|
34
|
+
function formatDiscordContext(config: DiscordBridgeConfig | null, bridgeId: string): string {
|
|
34
35
|
const lines = [
|
|
35
|
-
'You can send and receive Discord messages.'
|
|
36
|
+
'You can send and receive Discord messages.',
|
|
37
|
+
`- To send: \`/bridge\` skill → \`contacts ${bridgeId}\` to find recipient, then \`send ${bridgeId} -r <ID> -t "message"\``
|
|
36
38
|
]
|
|
37
39
|
const mode = config?.listenMode || 'mentions'
|
|
38
40
|
if (mode === 'dm')
|
|
@@ -44,17 +46,16 @@ function formatDiscordContext(config: DiscordBridgeConfig | null): string {
|
|
|
44
46
|
return lines.join('\n')
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
function formatIMessageContext(config: IMessageBridgeConfig | null): string {
|
|
49
|
+
function formatIMessageContext(config: IMessageBridgeConfig | null, bridgeId: string): string {
|
|
48
50
|
const strategy = config?.strategy || 'imsg'
|
|
49
51
|
const lines = [
|
|
50
52
|
`You can send and receive iMessages (via ${strategy === 'imsg' ? 'local imsg CLI' : 'remote BlueBubbles'}).`,
|
|
51
|
-
'- Incoming iMessages are routed to you
|
|
53
|
+
'- Incoming iMessages are routed to you automatically.'
|
|
52
54
|
]
|
|
53
|
-
if (strategy === 'imsg')
|
|
55
|
+
if (strategy === 'imsg')
|
|
54
56
|
lines.push('- Send via: `imsg send "<number>" "<message>"`')
|
|
55
|
-
|
|
56
|
-
lines.push(
|
|
57
|
-
}
|
|
57
|
+
else
|
|
58
|
+
lines.push(`- To send: \`/bridge\` skill → \`contacts ${bridgeId}\` to find recipient, then \`send ${bridgeId} -r <ID> -t "message"\``)
|
|
58
59
|
return lines.join('\n')
|
|
59
60
|
}
|
|
60
61
|
|
|
@@ -84,11 +85,11 @@ function formatGoogleContext(config: GoogleBridgeConfig | null): string {
|
|
|
84
85
|
return lines.join('\n')
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
function formatEmailContext(): string {
|
|
88
|
+
function formatEmailContext(bridgeId: string): string {
|
|
88
89
|
return [
|
|
89
90
|
'You can send and receive email via IMAP/SMTP.',
|
|
90
|
-
'- Incoming emails are routed to you
|
|
91
|
-
|
|
91
|
+
'- Incoming emails are routed to you automatically.',
|
|
92
|
+
`- To send: \`/bridge\` skill → \`contacts ${bridgeId}\` to find recipient, then \`send ${bridgeId} -r <ID> -t "message"\``
|
|
92
93
|
].join('\n')
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -114,19 +115,19 @@ export default defineEventHandler(async (event) => {
|
|
|
114
115
|
|
|
115
116
|
switch (bridge.platform) {
|
|
116
117
|
case 'telegram':
|
|
117
|
-
details = formatTelegramContext(config)
|
|
118
|
+
details = formatTelegramContext(config, bridge.id)
|
|
118
119
|
break
|
|
119
120
|
case 'discord':
|
|
120
|
-
details = formatDiscordContext(config)
|
|
121
|
+
details = formatDiscordContext(config, bridge.id)
|
|
121
122
|
break
|
|
122
123
|
case 'imessage':
|
|
123
|
-
details = formatIMessageContext(config)
|
|
124
|
+
details = formatIMessageContext(config, bridge.id)
|
|
124
125
|
break
|
|
125
126
|
case 'google':
|
|
126
127
|
details = formatGoogleContext(config)
|
|
127
128
|
break
|
|
128
129
|
case 'email':
|
|
129
|
-
details = formatEmailContext()
|
|
130
|
+
details = formatEmailContext(bridge.id)
|
|
130
131
|
break
|
|
131
132
|
}
|
|
132
133
|
|
|
@@ -111,12 +111,12 @@ export async function generateBridgeResponse(
|
|
|
111
111
|
source: message.platform
|
|
112
112
|
})
|
|
113
113
|
|
|
114
|
-
// Build the prompt
|
|
114
|
+
// Build the prompt — frame as direct conversation, not a notification
|
|
115
115
|
const memoryContext = await loadMemoryContext()
|
|
116
|
-
const senderLabel = message.senderName || message.sender
|
|
117
116
|
const parts: string[] = []
|
|
118
117
|
if (memoryContext) parts.push(memoryContext)
|
|
119
|
-
parts.push(`
|
|
118
|
+
parts.push(`The user is messaging you via ${message.platform}. Respond directly to them. Keep responses concise (suitable for chat/messaging). Do not ask what to reply — you ARE the one replying.`)
|
|
119
|
+
parts.push(message.text)
|
|
120
120
|
const prompt = parts.join('\n\n')
|
|
121
121
|
|
|
122
122
|
// Update status
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"515be38f-7222-4e4b-80cb-cef7594b1834","timestamp":1771738148484,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|