cognova 0.2.10 → 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.
Files changed (114) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/builds/latest.json +1 -1
  3. package/.output/public/_nuxt/builds/meta/a892969f-e07d-4f44-8d7e-57a4b7f33d94.json +1 -0
  4. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +1 -1
  5. package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
  6. package/.output/server/chunks/build/EditorToolbar-DIfb5arC.mjs +1 -1
  7. package/.output/server/chunks/build/Img-CWLmvN1t.mjs +1 -1
  8. package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
  9. package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
  10. package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
  11. package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
  12. package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
  13. package/.output/server/chunks/build/Tree-DUhXKd8y.mjs +1 -1
  14. package/.output/server/chunks/build/_uuid_-DfJaumTE.mjs +1 -1
  15. package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
  16. package/.output/server/chunks/build/dashboard-CiVTAZuF.mjs +1 -1
  17. package/.output/server/chunks/build/docs-ChGwOPg5.mjs +1 -1
  18. package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
  19. package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
  20. package/.output/server/chunks/build/server.mjs +1 -1
  21. package/.output/server/chunks/build/settings-B2KXoGcz.mjs +1 -1
  22. package/.output/server/chunks/build/styles.mjs +2 -2
  23. package/.output/server/chunks/build/useNotificationBus-BG5JNQf1.mjs +1 -1
  24. package/.output/server/chunks/build/view-n2sYa4Zh.mjs +1 -1
  25. package/.output/server/chunks/nitro/nitro.mjs +238 -217
  26. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  27. package/.output/server/chunks/routes/_ws/chat.mjs +1 -1
  28. package/.output/server/chunks/routes/api/bridges/_id/contacts.get.mjs +84 -0
  29. package/.output/server/chunks/routes/api/bridges/_id/contacts.get.mjs.map +1 -0
  30. package/.output/server/chunks/routes/api/bridges/_id/send.post.mjs +70 -0
  31. package/.output/server/chunks/routes/api/bridges/_id/send.post.mjs.map +1 -0
  32. package/.output/server/chunks/routes/api/bridges/context.get.mjs +19 -18
  33. package/.output/server/chunks/routes/api/bridges/context.get.mjs.map +1 -1
  34. package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +1 -1
  35. package/.output/server/chunks/routes/api/conversations/_id_.get.mjs +1 -1
  36. package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +1 -1
  37. package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -1
  38. package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -1
  39. package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -1
  40. package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -1
  41. package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -1
  42. package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -1
  43. package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -1
  44. package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -1
  45. package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -1
  46. package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -1
  47. package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -1
  48. package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -1
  49. package/.output/server/chunks/routes/api/health.get.mjs +1 -1
  50. package/.output/server/chunks/routes/api/home.get.mjs +1 -1
  51. package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -1
  52. package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -1
  53. package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -1
  54. package/.output/server/chunks/routes/api/index.get10.mjs +1 -1
  55. package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
  56. package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
  57. package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
  58. package/.output/server/chunks/routes/api/index.get6.mjs +1 -1
  59. package/.output/server/chunks/routes/api/index.get7.mjs +1 -1
  60. package/.output/server/chunks/routes/api/index.get8.mjs +1 -1
  61. package/.output/server/chunks/routes/api/index.get9.mjs +1 -1
  62. package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
  63. package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
  64. package/.output/server/chunks/routes/api/index.post5.mjs +1 -1
  65. package/.output/server/chunks/routes/api/index.put.mjs +1 -1
  66. package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -1
  67. package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -1
  68. package/.output/server/chunks/routes/api/memory/extract.post.mjs +1 -1
  69. package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -1
  70. package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -1
  71. package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -1
  72. package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -1
  73. package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -1
  74. package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -1
  75. package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -1
  76. package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -1
  77. package/.output/server/chunks/routes/api/skills/_name/delete.post.mjs +1 -1
  78. package/.output/server/chunks/routes/api/skills/_name/export.get.mjs +1 -1
  79. package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs +1 -1
  80. package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs +1 -1
  81. package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs +1 -1
  82. package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs +1 -1
  83. package/.output/server/chunks/routes/api/skills/_name/index.get.mjs +1 -1
  84. package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs +1 -1
  85. package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs +1 -1
  86. package/.output/server/chunks/routes/api/skills/create.post.mjs +1 -1
  87. package/.output/server/chunks/routes/api/skills/generate.post.mjs +1 -1
  88. package/.output/server/chunks/routes/api/skills/import.post.mjs +1 -1
  89. package/.output/server/chunks/routes/api/skills/index.get.mjs +1 -1
  90. package/.output/server/chunks/routes/api/skills/index.get2.mjs +1 -1
  91. package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs +1 -1
  92. package/.output/server/chunks/routes/api/skills/library/install.post.mjs +1 -1
  93. package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -1
  94. package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -1
  95. package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -1
  96. package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -1
  97. package/.output/server/chunks/routes/api/usage/stats.get.mjs +1 -1
  98. package/.output/server/chunks/routes/api/user/email.patch.mjs +1 -1
  99. package/.output/server/chunks/routes/api/webhooks/bluebubbles.post.mjs +1 -1
  100. package/.output/server/chunks/routes/api/webhooks/telegram.post.mjs +1 -1
  101. package/.output/server/chunks/routes/notifications.mjs +1 -1
  102. package/.output/server/chunks/routes/renderer.mjs +1 -1
  103. package/.output/server/chunks/routes/terminal.mjs +1 -1
  104. package/.output/server/index.mjs +1 -1
  105. package/.output/server/package.json +1 -1
  106. package/Claude/hooks/session-start.py +23 -0
  107. package/Claude/skills/bridge/SKILL.md +25 -1
  108. package/Claude/skills/bridge/bridge.py +64 -0
  109. package/package.json +1 -1
  110. package/server/api/bridges/[id]/contacts.get.ts +57 -0
  111. package/server/api/bridges/[id]/send.post.ts +40 -0
  112. package/server/api/bridges/context.get.ts +19 -18
  113. package/server/bridge/responder.ts +32 -4
  114. package/.output/public/_nuxt/builds/meta/def74b99-d70c-4f30-aa29-70248cbeac7d.json +0 -1
@@ -1,4 +1,4 @@
1
- import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, a as getDb, O as memoryChunks, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, a as getDb, Q as memoryChunks, 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, i as getQuery, a as getDb, O as memoryChunks } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, r as requireDb, i as getQuery, a as getDb, Q as memoryChunks } from '../../../nitro/nitro.mjs';
2
2
  import { eq, desc, sql } from 'drizzle-orm';
3
3
  import '@anthropic-ai/claude-agent-sdk';
4
4
  import 'module';
@@ -1,4 +1,4 @@
1
- import { a0 as logTokenUsage, d as defineEventHandler, r as requireDb, e as readBody, a as getDb, c as createError, O as memoryChunks } from '../../../nitro/nitro.mjs';
1
+ import { a2 as logTokenUsage, d as defineEventHandler, r as requireDb, e as readBody, a as getDb, c as createError, Q as memoryChunks } from '../../../nitro/nitro.mjs';
2
2
  import { query } from '@anthropic-ai/claude-agent-sdk';
3
3
  import 'module';
4
4
  import 'path';
@@ -1,4 +1,4 @@
1
- import { d as defineEventHandler, r as requireDb, i as getQuery, a as getDb, O as memoryChunks } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, r as requireDb, i as getQuery, a as getDb, Q as memoryChunks } from '../../../nitro/nitro.mjs';
2
2
  import { eq, gte, or, ilike, and, desc, sql } 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, e as readBody, a as getDb, c as createError, O as memoryChunks, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, r as requireDb, e as readBody, a as getDb, c as createError, Q as memoryChunks, n as notifyResourceChange } 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, r as requireDb, g as getRouterParam, c as createError, a as getDb, y as projects, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, a as getDb, A as projects, 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, y as projects } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, a as getDb, A as projects } 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, y as projects, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, r as requireDb, g as getRouterParam, c as createError, e as readBody, a as getDb, A as projects, 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, a as getDb, P as secrets, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, g as getRouterParam, c as createError, a as getDb, 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, a as getDb, Q as decryptSecret } from '../../../nitro/nitro.mjs';
1
+ import { d as defineEventHandler, g as getRouterParam, c as createError, a as getDb, S as decryptSecret } 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, g as getRouterParam, c as createError, e as readBody, a as getDb, R as encryptSecret, P as secrets, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
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, U as validateSkillName, V as isCoreSkill, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../../nitro/nitro.mjs';
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, U as validateSkillName, W as getSkillsDir, X as getInactiveSkillsDir, Y as setResponseHeaders, Z as send } from '../../../../nitro/nitro.mjs';
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, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../../../nitro/nitro.mjs';
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, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../../../nitro/nitro.mjs';
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, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../../../nitro/nitro.mjs';
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, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../../../nitro/nitro.mjs';
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, _ as buildSkillFileTree, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../../nitro/nitro.mjs';
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, V as isCoreSkill, e as readBody, U as validateSkillName, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../../nitro/nitro.mjs';
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, V as isCoreSkill, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../../nitro/nitro.mjs';
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, U as validateSkillName, W as getSkillsDir } from '../../../nitro/nitro.mjs';
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, U as validateSkillName, X as getInactiveSkillsDir, a0 as logTokenUsage } from '../../../nitro/nitro.mjs';
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, a1 as readMultipartFormData, c as createError, U as validateSkillName, W as getSkillsDir, X as getInactiveSkillsDir } from '../../../nitro/nitro.mjs';
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, W as getSkillsDir, X as getInactiveSkillsDir, $ as parseSkillFrontmatter, _ as buildSkillFileTree, V as isCoreSkill } from '../../../nitro/nitro.mjs';
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, W as getSkillsDir, X as getInactiveSkillsDir, $ as parseSkillFrontmatter } from '../../../nitro/nitro.mjs';
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, W as getSkillsDir, X as getInactiveSkillsDir, $ as parseSkillFrontmatter } from '../../../../nitro/nitro.mjs';
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, a2 as skillsCatalog, W as getSkillsDir } from '../../../../nitro/nitro.mjs';
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, x as tasks, n as notifyResourceChange } from '../../../../nitro/nitro.mjs';
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, x as tasks, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
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, x as tasks, n as notifyResourceChange } from '../../../nitro/nitro.mjs';
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, x as tasks } from '../../../nitro/nitro.mjs';
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, A as tokenUsage } from '../../../nitro/nitro.mjs';
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, a3 as user } from '../../../nitro/nitro.mjs';
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, a4 as getAdapterByPlatform, c as createError, e as readBody } from '../../../nitro/nitro.mjs';
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, a4 as getAdapterByPlatform, c as createError, a5 as getHeader, e as readBody } from '../../../nitro/nitro.mjs';
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,4 +1,4 @@
1
- import { a6 as defineWebSocketHandler, a8 as notificationBus } from '../nitro/nitro.mjs';
1
+ import { a8 as defineWebSocketHandler, aa as notificationBus } 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 { aN as buildAssetsURL, J as useRuntimeConfig, aO as getResponseStatusText, aP as getResponseStatus, aQ as defineRenderHandler, aR as publicAssetsURL, i as getQuery, c as createError, ag as destr, aS as getRouteRules, aT as useNitroApp } from '../nitro/nitro.mjs';
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 { a6 as defineWebSocketHandler, a9 as resizePty, aa as writeToPty, ab as getOrCreatePtySession, ac as getOutputBuffer, ad as getPtySession } from '../nitro/nitro.mjs';
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';
@@ -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 { aU as default } from './chunks/nitro/nitro.mjs';
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": "cognova-prod",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
@@ -7,6 +7,7 @@ Memory context from previous conversations is printed to stdout,
7
7
  which Claude receives as additional context.
8
8
  """
9
9
 
10
+ import os
10
11
  import sys
11
12
  from pathlib import Path
12
13
 
@@ -16,6 +17,21 @@ sys.path.insert(0, str(Path(__file__).parent / 'lib'))
16
17
  from hook_client import log_event, read_stdin_json, get_memory_context, get_bridge_context
17
18
 
18
19
 
20
+ def is_onboarded() -> bool:
21
+ """Check if CLAUDE.md already has a User Profile section (onboarding completed)."""
22
+ possible_paths = [
23
+ Path(os.environ.get('COGNOVA_PROJECT_DIR', '')) / 'CLAUDE.md',
24
+ Path.cwd() / 'CLAUDE.md',
25
+ ]
26
+ for p in possible_paths:
27
+ try:
28
+ if p.exists() and '## User Profile' in p.read_text():
29
+ return True
30
+ except Exception:
31
+ pass
32
+ return False
33
+
34
+
19
35
  def main():
20
36
  hook_input = read_stdin_json()
21
37
 
@@ -43,6 +59,13 @@ def main():
43
59
  print("If the user tells you something about themselves, store it IMMEDIATELY.")
44
60
  print("")
45
61
  print(context)
62
+ elif is_onboarded():
63
+ # Onboarding already completed but memories couldn't be loaded (API unreachable, etc.)
64
+ print("## Session Memory")
65
+ print("")
66
+ print("No memories were loaded this session (API may be unreachable).")
67
+ print("User profile is available in CLAUDE.md. Proceed normally.")
68
+ print("As you work, store new insights with `/memory store` when the API is available.")
46
69
  else:
47
70
  print("## Session Memory — ONBOARDING REQUIRED")
48
71
  print("")
@@ -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 configure platform connections.
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cognova",
3
3
  "type": "module",
4
- "version": "0.2.10",
4
+ "version": "0.2.12",
5
5
  "description": "Personal knowledge management system with Claude Code integration",
6
6
  "repository": {
7
7
  "type": "git",
@@ -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
+ })