cognova 0.2.10 → 0.2.11
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/515be38f-7222-4e4b-80cb-cef7594b1834.json +1 -0
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/nitro/nitro.mjs +232 -215
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/Claude/hooks/session-start.py +23 -0
- package/package.json +1 -1
- package/server/bridge/responder.ts +31 -3
- package/.output/public/_nuxt/builds/meta/def74b99-d70c-4f30-aa29-70248cbeac7d.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nitro.mjs","sources":["../../../../node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.node.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.DfCzGthR.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.D9ehKjSh.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.By9qWDAI.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.CipVM6lf.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/adapters/node.mjs","../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.mjs","../../../../node_modules/.pnpm/cookie-es@1.2.2/node_modules/cookie-es/dist/index.mjs","../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs","../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../node_modules/.pnpm/h3@1.15.4/node_modules/h3/dist/index.mjs","../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/dist/index.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/drivers/utils/index.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/drivers/fs-lite.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs","../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../node_modules/.pnpm/@nuxt+nitro-server@4.2.2_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___d_a6b79d18884e342815abf8a85cd13f2d/node_modules/@nuxt/nitro-server/dist/runtime/utils/config.js","../../../../app/app.config.ts","../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../node_modules/.pnpm/@nuxt+nitro-server@4.2.2_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___d_a6b79d18884e342815abf8a85cd13f2d/node_modules/@nuxt/nitro-server/dist/runtime/utils/error.js","../../../../node_modules/.pnpm/@nuxt+nitro-server@4.2.2_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___d_a6b79d18884e342815abf8a85cd13f2d/node_modules/@nuxt/nitro-server/dist/runtime/handlers/error.js","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../node_modules/.pnpm/@nuxtjs+color-mode@3.5.2_magicast@0.5.1/node_modules/@nuxtjs/color-mode/dist/runtime/nitro-plugin.js","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/plugins/00.env-validate.ts","../../../../server/plugins/01.api-token.ts","../../../../server/db/schema.ts","../../../../server/utils/db-state.ts","../../../../server/db/index.ts","../../../../server/db/migrate.ts","../../../../server/utils/auth.ts","../../../../server/db/seed.ts","../../../../server/plugins/02.database.ts","../../../../server/utils/path-validator.ts","../../../../server/utils/frontmatter.ts","../../../../server/utils/document-sync.ts","../../../../server/plugins/03.file-watcher.ts","../../../../server/utils/agent-registry.ts","../../../../server/utils/notification-bus.ts","../../../../server/utils/notify-resource.ts","../../../../server/utils/log-token-usage.ts","../../../../server/services/agent-executor.ts","../../../../server/services/cron-scheduler.ts","../../../../server/utils/agent-cleanup.ts","../../../../server/plugins/04.cron-agents.ts","../../../../server/plugins/05.skills-catalog.ts","../../../../server/bridge/registry.ts","../../../../server/utils/crypto.ts","../../../../server/utils/get-secret.ts","../../../../server/bridge/responder.ts","../../../../server/bridge/router.ts","../../../../server/bridge/adapters/telegram.ts","../../../../server/bridge/adapters/discord.ts","../../../../server/bridge/adapters/imessage.ts","../../../../server/bridge/adapters/google.ts","../../../../server/bridge/adapters/email.ts","../../../../server/bridge/lifecycle.ts","../../../../server/plugins/06.message-bridge.ts","../../../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/static.mjs","../../../../server/middleware/auth.ts","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/renderer.mjs","../../../../node_modules/.pnpm/@nuxt+nitro-server@4.2.2_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___d_a6b79d18884e342815abf8a85cd13f2d/node_modules/@nuxt/nitro-server/dist/runtime/utils/paths.js","../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../shared/utils/language-detection.ts","../../../../shared/utils/notification-defaults.ts","../../../../server/utils/chat-session-manager.ts","../../../../server/utils/db-guard.ts","../../../../server/utils/pty-manager.ts","../../../../server/utils/skills-path.ts","../../../../node_modules/.cache/nuxt/.nuxt/nuxt-icon-server-bundle.mjs","../../../../node_modules/.pnpm/@nuxt+icon@2.1.1_magicast@0.5.1_vite@7.3.0_@types+node@25.0.8_jiti@2.6.1_lightningcss@1_01287b657f4a2f684624a151274b0e62/node_modules/@nuxt/icon/dist/runtime/server/api.js","../../../../node_modules/.pnpm/@nuxtjs+mdc@0.20.0_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/highlighter/event-handler.js","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../node_modules/.pnpm/cookie-es@2.0.0/node_modules/cookie-es/dist/index.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["isPlainObject","decode","JOIN_LEADING_SLASH_RE","withTrailingSlash","hasLeadingSlash","withLeadingSlash","joinURL","getQuery","isNonEmptyURL","parse","tryDecode","serialize","createRouter","f","h","c","i","l","createError","process","parse$1","mergeHeaders","s","nodeFetch","fetch","Headers","Headers$1","AbortController","AbortController$1","$fetch","normalizeKey","defineDriver","DRIVER_NAME","dirname","fsPromises","resolve","fsp","hash","_inlineAppConfig","createRadixRouter","join","schema.user","schema.session","schema.account","schema.verification","existsSync","createHash","basename","readFile","schema.documents","writeFile","readdir","watch","__publicField","EventEmitter","schema.tokenUsage","schema.cronAgentRuns","schema.cronAgents","schema.skillsCatalog","schema.conversations","randomUUID","schema.bridgeMessages","schema.conversationMessages","_a","_b","_c","_d","normalized","schema.bridges","session","pty","colonIdx","key","val","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer","wsAdapter"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,78,79,81,82,83,90,91,92,93,94,95,96,97]}
|
|
1
|
+
{"version":3,"file":"nitro.mjs","sources":["../../../../node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.node.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.DfCzGthR.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.D9ehKjSh.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.By9qWDAI.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.CipVM6lf.mjs","../../../../node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/adapters/node.mjs","../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.mjs","../../../../node_modules/.pnpm/cookie-es@1.2.2/node_modules/cookie-es/dist/index.mjs","../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs","../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../node_modules/.pnpm/h3@1.15.4/node_modules/h3/dist/index.mjs","../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/dist/index.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/drivers/utils/index.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../node_modules/.pnpm/unstorage@1.17.3_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___ioredis@5.8.2/node_modules/unstorage/drivers/fs-lite.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs","../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../node_modules/.pnpm/@nuxt+nitro-server@4.2.2_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___d_a6b79d18884e342815abf8a85cd13f2d/node_modules/@nuxt/nitro-server/dist/runtime/utils/config.js","../../../../app/app.config.ts","../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../node_modules/.pnpm/@nuxt+nitro-server@4.2.2_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___d_a6b79d18884e342815abf8a85cd13f2d/node_modules/@nuxt/nitro-server/dist/runtime/utils/error.js","../../../../node_modules/.pnpm/@nuxt+nitro-server@4.2.2_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___d_a6b79d18884e342815abf8a85cd13f2d/node_modules/@nuxt/nitro-server/dist/runtime/handlers/error.js","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../node_modules/.pnpm/@nuxtjs+color-mode@3.5.2_magicast@0.5.1/node_modules/@nuxtjs/color-mode/dist/runtime/nitro-plugin.js","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/plugins/00.env-validate.ts","../../../../server/plugins/01.api-token.ts","../../../../server/db/schema.ts","../../../../server/utils/db-state.ts","../../../../server/db/index.ts","../../../../server/db/migrate.ts","../../../../server/utils/auth.ts","../../../../server/db/seed.ts","../../../../server/plugins/02.database.ts","../../../../server/utils/path-validator.ts","../../../../server/utils/frontmatter.ts","../../../../server/utils/document-sync.ts","../../../../server/plugins/03.file-watcher.ts","../../../../server/utils/agent-registry.ts","../../../../server/utils/notification-bus.ts","../../../../server/utils/notify-resource.ts","../../../../server/utils/log-token-usage.ts","../../../../server/services/agent-executor.ts","../../../../server/services/cron-scheduler.ts","../../../../server/utils/agent-cleanup.ts","../../../../server/plugins/04.cron-agents.ts","../../../../server/plugins/05.skills-catalog.ts","../../../../server/bridge/registry.ts","../../../../server/utils/crypto.ts","../../../../server/utils/get-secret.ts","../../../../server/bridge/responder.ts","../../../../server/bridge/router.ts","../../../../server/bridge/adapters/telegram.ts","../../../../server/bridge/adapters/discord.ts","../../../../server/bridge/adapters/imessage.ts","../../../../server/bridge/adapters/google.ts","../../../../server/bridge/adapters/email.ts","../../../../server/bridge/lifecycle.ts","../../../../server/plugins/06.message-bridge.ts","../../../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/static.mjs","../../../../server/middleware/auth.ts","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/renderer.mjs","../../../../node_modules/.pnpm/@nuxt+nitro-server@4.2.2_db0@0.3.4_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8___d_a6b79d18884e342815abf8a85cd13f2d/node_modules/@nuxt/nitro-server/dist/runtime/utils/paths.js","../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../shared/utils/language-detection.ts","../../../../shared/utils/notification-defaults.ts","../../../../server/utils/chat-session-manager.ts","../../../../server/utils/db-guard.ts","../../../../server/utils/pty-manager.ts","../../../../server/utils/skills-path.ts","../../../../node_modules/.cache/nuxt/.nuxt/nuxt-icon-server-bundle.mjs","../../../../node_modules/.pnpm/@nuxt+icon@2.1.1_magicast@0.5.1_vite@7.3.0_@types+node@25.0.8_jiti@2.6.1_lightningcss@1_01287b657f4a2f684624a151274b0e62/node_modules/@nuxt/icon/dist/runtime/server/api.js","../../../../node_modules/.pnpm/@nuxtjs+mdc@0.20.0_magicast@0.5.1/node_modules/@nuxtjs/mdc/dist/runtime/highlighter/event-handler.js","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../node_modules/.pnpm/cookie-es@2.0.0/node_modules/cookie-es/dist/index.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../node_modules/.pnpm/nitropack@2.12.9_drizzle-orm@0.45.1_kysely@0.28.10_postgres@3.4.8_/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["isPlainObject","decode","JOIN_LEADING_SLASH_RE","withTrailingSlash","hasLeadingSlash","withLeadingSlash","joinURL","getQuery","isNonEmptyURL","parse","tryDecode","serialize","createRouter","f","h","c","i","l","createError","process","parse$1","mergeHeaders","s","nodeFetch","fetch","Headers","Headers$1","AbortController","AbortController$1","$fetch","normalizeKey","defineDriver","DRIVER_NAME","dirname","fsPromises","resolve","fsp","hash","_inlineAppConfig","createRadixRouter","join","schema.user","schema.session","schema.account","schema.verification","existsSync","createHash","basename","readFile","schema.documents","writeFile","readdir","watch","__publicField","EventEmitter","schema.tokenUsage","schema.cronAgentRuns","schema.cronAgents","schema.skillsCatalog","schema.conversations","randomUUID","schema.memoryChunks","schema.bridgeMessages","schema.conversationMessages","_a","_b","_c","_d","normalized","schema.bridges","session","pty","colonIdx","key","val","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer","wsAdapter"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,78,79,81,82,83,90,91,92,93,94,95,96,97]}
|
|
@@ -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("")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'crypto'
|
|
2
2
|
import { query } from '@anthropic-ai/claude-agent-sdk'
|
|
3
|
-
import { eq } from 'drizzle-orm'
|
|
3
|
+
import { desc, eq } from 'drizzle-orm'
|
|
4
4
|
import { getDb, schema } from '~~/server/db'
|
|
5
5
|
import { logTokenUsage } from '~~/server/utils/log-token-usage'
|
|
6
6
|
import { sendOutboundMessage } from './router'
|
|
@@ -35,6 +35,30 @@ async function getOrCreateMainChat() {
|
|
|
35
35
|
return created!
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Load memory context directly from DB so the bridge prompt
|
|
40
|
+
* includes user preferences/facts even if the session-start hook
|
|
41
|
+
* can't reach the API (avoids false onboarding).
|
|
42
|
+
*/
|
|
43
|
+
async function loadMemoryContext(): Promise<string> {
|
|
44
|
+
try {
|
|
45
|
+
const db = getDb()
|
|
46
|
+
const memories = await db.select()
|
|
47
|
+
.from(schema.memoryChunks)
|
|
48
|
+
.orderBy(desc(schema.memoryChunks.relevanceScore), desc(schema.memoryChunks.createdAt))
|
|
49
|
+
.limit(10)
|
|
50
|
+
|
|
51
|
+
if (memories.length === 0) return ''
|
|
52
|
+
|
|
53
|
+
const lines = ['[Memory context from previous sessions]']
|
|
54
|
+
for (const m of memories)
|
|
55
|
+
lines.push(`- ${m.content}`)
|
|
56
|
+
return lines.join('\n')
|
|
57
|
+
} catch {
|
|
58
|
+
return ''
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
38
62
|
// SDK result shape (same as agent-executor.ts)
|
|
39
63
|
interface SDKResult {
|
|
40
64
|
subtype: string
|
|
@@ -87,9 +111,13 @@ export async function generateBridgeResponse(
|
|
|
87
111
|
source: message.platform
|
|
88
112
|
})
|
|
89
113
|
|
|
90
|
-
// Build the prompt with platform context
|
|
114
|
+
// Build the prompt with memory context + platform context
|
|
115
|
+
const memoryContext = await loadMemoryContext()
|
|
91
116
|
const senderLabel = message.senderName || message.sender
|
|
92
|
-
const
|
|
117
|
+
const parts: string[] = []
|
|
118
|
+
if (memoryContext) parts.push(memoryContext)
|
|
119
|
+
parts.push(`[${message.platform} message from ${senderLabel}]: ${message.text}`)
|
|
120
|
+
const prompt = parts.join('\n\n')
|
|
93
121
|
|
|
94
122
|
// Update status
|
|
95
123
|
await db.update(schema.conversations)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"def74b99-d70c-4f30-aa29-70248cbeac7d","timestamp":1771737065743,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|