shieldcortex 3.0.4 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dashboard/.next/standalone/dashboard/.next/BUILD_ID +1 -1
- package/dashboard/.next/standalone/dashboard/.next/build-manifest.json +2 -2
- package/dashboard/.next/standalone/dashboard/.next/prerender-manifest.json +3 -3
- package/dashboard/.next/standalone/dashboard/.next/required-server-files.json +4 -4
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.rsc +3 -3
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_3051539d._.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/pages/404.html +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/pages/500.html +2 -2
- package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/0a69eb25d08447ee.js +1 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/9232a2d99b47b21f.js +3 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/97537d3db46c8467.css +3 -0
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/aa6e9b8a52353969.js +9 -0
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- package/dashboard/.next/standalone/{node_modules/@img/sharp-linux-x64 → dashboard/node_modules/@img/sharp-darwin-arm64}/package.json +7 -13
- package/dashboard/.next/standalone/dashboard/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/README.md +2 -2
- package/dashboard/.next/standalone/dashboard/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/glib-2.0/include/glibconfig.h +8 -9
- package/dashboard/.next/standalone/dashboard/node_modules/@img/{sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 → sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib} +0 -0
- package/dashboard/.next/standalone/dashboard/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/package.json +5 -11
- package/dashboard/.next/standalone/dashboard/server.js +1 -1
- package/dashboard/.next/standalone/{dashboard/node_modules/@img/sharp-linux-x64 → node_modules/@img/sharp-darwin-arm64}/package.json +7 -13
- package/dashboard/.next/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/package.json +5 -11
- package/dist/api/routes/system.js +67 -2
- package/dist/cloud/cli.d.ts +1 -0
- package/dist/cloud/cli.js +40 -0
- package/dist/cloud/config.d.ts +10 -0
- package/dist/cloud/config.js +54 -0
- package/dist/cloud/graph-sync.d.ts +45 -0
- package/dist/cloud/graph-sync.js +257 -0
- package/dist/cloud/memory-sync.d.ts +36 -0
- package/dist/cloud/memory-sync.js +183 -0
- package/dist/cloud/sync-queue.d.ts +24 -0
- package/dist/cloud/sync-queue.js +126 -7
- package/dist/database/init.js +24 -0
- package/dist/graph/backfill.js +3 -5
- package/dist/graph/resolve.d.ts +10 -0
- package/dist/graph/resolve.js +63 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +61 -4
- package/dist/memory/store.js +45 -5
- package/dist/memory/types.d.ts +2 -0
- package/dist/service/install.d.ts +1 -0
- package/dist/service/install.js +43 -1
- package/dist/tools/forget.d.ts +2 -2
- package/dist/tools/recall.d.ts +3 -3
- package/package.json +1 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/313c0d327bbf244a.js +0 -9
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/49c1cec591af1460.js +0 -3
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/ca21f348cb163905.js +0 -1
- package/dashboard/.next/standalone/dashboard/.next/static/chunks/f4ca424319f58dc7.css +0 -3
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
- package/dashboard/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
- package/dashboard/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
- /package/dashboard/.next/standalone/dashboard/.next/static/{BEvyMAX62LQMyt5iSb-F9 → RnvqrTXo_jN8SuMdaNcIj}/_buildManifest.js +0 -0
- /package/dashboard/.next/standalone/dashboard/.next/static/{BEvyMAX62LQMyt5iSb-F9 → RnvqrTXo_jN8SuMdaNcIj}/_clientMiddlewareManifest.json +0 -0
- /package/dashboard/.next/standalone/dashboard/.next/static/{BEvyMAX62LQMyt5iSb-F9 → RnvqrTXo_jN8SuMdaNcIj}/_ssgManifest.js +0 -0
- /package/dashboard/.next/standalone/dashboard/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/index.js +0 -0
- /package/dashboard/.next/standalone/dashboard/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/versions.json +0 -0
|
Binary file
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@img/sharp-
|
|
2
|
+
"name": "@img/sharp-darwin-arm64",
|
|
3
3
|
"version": "0.34.5",
|
|
4
|
-
"description": "Prebuilt sharp for use with
|
|
4
|
+
"description": "Prebuilt sharp for use with macOS 64-bit ARM",
|
|
5
5
|
"author": "Lovell Fuller <npm@lovell.info>",
|
|
6
6
|
"homepage": "https://sharp.pixelplumbing.com",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/lovell/sharp.git",
|
|
10
|
-
"directory": "npm/
|
|
10
|
+
"directory": "npm/darwin-arm64"
|
|
11
11
|
},
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"funding": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"preferUnplugged": true,
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@img/sharp-libvips-
|
|
18
|
+
"@img/sharp-libvips-darwin-arm64": "1.2.4"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"lib"
|
|
@@ -25,22 +25,16 @@
|
|
|
25
25
|
},
|
|
26
26
|
"type": "commonjs",
|
|
27
27
|
"exports": {
|
|
28
|
-
"./sharp.node": "./lib/sharp-
|
|
28
|
+
"./sharp.node": "./lib/sharp-darwin-arm64.node",
|
|
29
29
|
"./package": "./package.json"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
|
33
33
|
},
|
|
34
|
-
"config": {
|
|
35
|
-
"glibc": ">=2.26"
|
|
36
|
-
},
|
|
37
34
|
"os": [
|
|
38
|
-
"
|
|
39
|
-
],
|
|
40
|
-
"libc": [
|
|
41
|
-
"glibc"
|
|
35
|
+
"darwin"
|
|
42
36
|
],
|
|
43
37
|
"cpu": [
|
|
44
|
-
"
|
|
38
|
+
"arm64"
|
|
45
39
|
]
|
|
46
40
|
}
|
|
@@ -63,15 +63,15 @@ typedef unsigned int guint32;
|
|
|
63
63
|
|
|
64
64
|
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
|
65
65
|
|
|
66
|
-
typedef signed long gint64;
|
|
67
|
-
typedef unsigned long guint64;
|
|
66
|
+
G_GNUC_EXTENSION typedef signed long long gint64;
|
|
67
|
+
G_GNUC_EXTENSION typedef unsigned long long guint64;
|
|
68
68
|
|
|
69
|
-
#define G_GINT64_CONSTANT(val) (val##
|
|
70
|
-
#define G_GUINT64_CONSTANT(val) (val##
|
|
69
|
+
#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL))
|
|
70
|
+
#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
|
|
71
71
|
|
|
72
|
-
#define G_GINT64_MODIFIER "
|
|
73
|
-
#define G_GINT64_FORMAT "
|
|
74
|
-
#define G_GUINT64_FORMAT "
|
|
72
|
+
#define G_GINT64_MODIFIER "ll"
|
|
73
|
+
#define G_GINT64_FORMAT "lli"
|
|
74
|
+
#define G_GUINT64_FORMAT "llu"
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
#define GLIB_SIZEOF_VOID_P 8
|
|
@@ -121,7 +121,6 @@ typedef unsigned long guintptr;
|
|
|
121
121
|
|
|
122
122
|
#define G_VA_COPY va_copy
|
|
123
123
|
|
|
124
|
-
#define G_VA_COPY_AS_ARRAY 1
|
|
125
124
|
|
|
126
125
|
#define G_HAVE_ISO_VARARGS 1
|
|
127
126
|
|
|
@@ -203,7 +202,7 @@ typedef int GPid;
|
|
|
203
202
|
|
|
204
203
|
#define GLIB_SYSDEF_AF_UNIX 1
|
|
205
204
|
#define GLIB_SYSDEF_AF_INET 2
|
|
206
|
-
#define GLIB_SYSDEF_AF_INET6
|
|
205
|
+
#define GLIB_SYSDEF_AF_INET6 30
|
|
207
206
|
|
|
208
207
|
#define GLIB_SYSDEF_MSG_OOB 1
|
|
209
208
|
#define GLIB_SYSDEF_MSG_PEEK 2
|
|
Binary file
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@img/sharp-libvips-
|
|
2
|
+
"name": "@img/sharp-libvips-darwin-arm64",
|
|
3
3
|
"version": "1.2.4",
|
|
4
|
-
"description": "Prebuilt libvips and dependencies for use with sharp on
|
|
4
|
+
"description": "Prebuilt libvips and dependencies for use with sharp on macOS 64-bit ARM",
|
|
5
5
|
"author": "Lovell Fuller <npm@lovell.info>",
|
|
6
6
|
"homepage": "https://sharp.pixelplumbing.com",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/lovell/sharp-libvips.git",
|
|
10
|
-
"directory": "npm/
|
|
10
|
+
"directory": "npm/darwin-arm64"
|
|
11
11
|
},
|
|
12
12
|
"license": "LGPL-3.0-or-later",
|
|
13
13
|
"funding": {
|
|
@@ -27,16 +27,10 @@
|
|
|
27
27
|
"./package": "./package.json",
|
|
28
28
|
"./versions": "./versions.json"
|
|
29
29
|
},
|
|
30
|
-
"config": {
|
|
31
|
-
"glibc": ">=2.26"
|
|
32
|
-
},
|
|
33
30
|
"os": [
|
|
34
|
-
"
|
|
35
|
-
],
|
|
36
|
-
"libc": [
|
|
37
|
-
"glibc"
|
|
31
|
+
"darwin"
|
|
38
32
|
],
|
|
39
33
|
"cpu": [
|
|
40
|
-
"
|
|
34
|
+
"arm64"
|
|
41
35
|
]
|
|
42
36
|
}
|
|
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
9
9
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
10
10
|
|
|
11
11
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
12
|
-
const nextConfig = {"env":{},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/
|
|
12
|
+
const nextConfig = {"env":{},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/Users/michael/Development/ShieldCortex-Project/ShieldCortex","cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"dynamicOnHover":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":9,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":false,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":false,"lockDistDir":true,"isolatedDevBuild":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":false,"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","turbopack":{"root":"/Users/michael/Development/ShieldCortex-Project/ShieldCortex"},"distDirRoot":".next"}
|
|
13
13
|
|
|
14
14
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
15
15
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@img/sharp-
|
|
2
|
+
"name": "@img/sharp-darwin-arm64",
|
|
3
3
|
"version": "0.34.5",
|
|
4
|
-
"description": "Prebuilt sharp for use with
|
|
4
|
+
"description": "Prebuilt sharp for use with macOS 64-bit ARM",
|
|
5
5
|
"author": "Lovell Fuller <npm@lovell.info>",
|
|
6
6
|
"homepage": "https://sharp.pixelplumbing.com",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/lovell/sharp.git",
|
|
10
|
-
"directory": "npm/
|
|
10
|
+
"directory": "npm/darwin-arm64"
|
|
11
11
|
},
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"funding": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"preferUnplugged": true,
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@img/sharp-libvips-
|
|
18
|
+
"@img/sharp-libvips-darwin-arm64": "1.2.4"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"lib"
|
|
@@ -25,22 +25,16 @@
|
|
|
25
25
|
},
|
|
26
26
|
"type": "commonjs",
|
|
27
27
|
"exports": {
|
|
28
|
-
"./sharp.node": "./lib/sharp-
|
|
28
|
+
"./sharp.node": "./lib/sharp-darwin-arm64.node",
|
|
29
29
|
"./package": "./package.json"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
|
33
33
|
},
|
|
34
|
-
"config": {
|
|
35
|
-
"glibc": ">=2.26"
|
|
36
|
-
},
|
|
37
34
|
"os": [
|
|
38
|
-
"
|
|
39
|
-
],
|
|
40
|
-
"libc": [
|
|
41
|
-
"glibc"
|
|
35
|
+
"darwin"
|
|
42
36
|
],
|
|
43
37
|
"cpu": [
|
|
44
|
-
"
|
|
38
|
+
"arm64"
|
|
45
39
|
]
|
|
46
40
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@img/sharp-libvips-
|
|
2
|
+
"name": "@img/sharp-libvips-darwin-arm64",
|
|
3
3
|
"version": "1.2.4",
|
|
4
|
-
"description": "Prebuilt libvips and dependencies for use with sharp on
|
|
4
|
+
"description": "Prebuilt libvips and dependencies for use with sharp on macOS 64-bit ARM",
|
|
5
5
|
"author": "Lovell Fuller <npm@lovell.info>",
|
|
6
6
|
"homepage": "https://sharp.pixelplumbing.com",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/lovell/sharp-libvips.git",
|
|
10
|
-
"directory": "npm/
|
|
10
|
+
"directory": "npm/darwin-arm64"
|
|
11
11
|
},
|
|
12
12
|
"license": "LGPL-3.0-or-later",
|
|
13
13
|
"funding": {
|
|
@@ -27,16 +27,10 @@
|
|
|
27
27
|
"./package": "./package.json",
|
|
28
28
|
"./versions": "./versions.json"
|
|
29
29
|
},
|
|
30
|
-
"config": {
|
|
31
|
-
"glibc": ">=2.26"
|
|
32
|
-
},
|
|
33
30
|
"os": [
|
|
34
|
-
"
|
|
35
|
-
],
|
|
36
|
-
"libc": [
|
|
37
|
-
"glibc"
|
|
31
|
+
"darwin"
|
|
38
32
|
],
|
|
39
33
|
"cpu": [
|
|
40
|
-
"
|
|
34
|
+
"arm64"
|
|
41
35
|
]
|
|
42
36
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { WebSocket } from 'ws';
|
|
2
|
-
import { getCloudConfig, getDefenceMode, getOpenClawMemoryConfig, isConfigTampered, readRawConfig, setCloudConfig, setDefenceMode, setOpenClawMemoryConfig, } from '../../cloud/config.js';
|
|
2
|
+
import { getCloudConfig, getCloudSyncControls, getDeviceId, getDeviceName, getDefenceMode, getOpenClawMemoryConfig, isConfigTampered, readRawConfig, setCloudConfig, setCloudSyncControls, setDefenceMode, setOpenClawMemoryConfig, } from '../../cloud/config.js';
|
|
3
3
|
import { getQueueStats } from '../../cloud/sync-queue.js';
|
|
4
|
+
import { getDatabase } from '../../database/init.js';
|
|
5
|
+
import { getRequiredTier, isFeatureEnabled } from '../../license/gate.js';
|
|
4
6
|
import { getControlStatus, isKillSwitchActive, pause, resume } from '../control.js';
|
|
5
7
|
import { checkForUpdates, getCurrentVersion, getRunningVersion, performUpdate, scheduleRestart, } from '../version.js';
|
|
6
8
|
export function registerSystemRoutes(app, deps) {
|
|
@@ -44,6 +46,7 @@ export function registerSystemRoutes(app, deps) {
|
|
|
44
46
|
enabled: config.cloudEnabled,
|
|
45
47
|
apiKeySet: !!config.cloudApiKey,
|
|
46
48
|
baseUrl: config.cloudBaseUrl,
|
|
49
|
+
syncControls: getCloudSyncControls(),
|
|
47
50
|
openclawMemory: getOpenClawMemoryConfig(),
|
|
48
51
|
});
|
|
49
52
|
}
|
|
@@ -53,7 +56,7 @@ export function registerSystemRoutes(app, deps) {
|
|
|
53
56
|
});
|
|
54
57
|
app.post('/api/cloud/config', (req, res) => {
|
|
55
58
|
try {
|
|
56
|
-
const { cloudApiKey, cloudEnabled, cloudBaseUrl, openclawAutoMemory, openclawAutoMemoryDedupe, openclawAutoMemoryNoveltyThreshold, openclawAutoMemoryMaxRecent, } = req.body;
|
|
59
|
+
const { cloudApiKey, cloudEnabled, cloudBaseUrl, cloudSyncProjectMode, cloudSyncProjects, cloudSyncContentMode, cloudSyncExcludeSensitive, openclawAutoMemory, openclawAutoMemoryDedupe, openclawAutoMemoryNoveltyThreshold, openclawAutoMemoryMaxRecent, } = req.body;
|
|
57
60
|
if (openclawAutoMemory !== undefined && typeof openclawAutoMemory !== 'boolean') {
|
|
58
61
|
return res.status(400).json({ error: 'openclawAutoMemory must be a boolean' });
|
|
59
62
|
}
|
|
@@ -68,11 +71,36 @@ export function registerSystemRoutes(app, deps) {
|
|
|
68
71
|
(typeof openclawAutoMemoryMaxRecent !== 'number' || Number.isNaN(openclawAutoMemoryMaxRecent))) {
|
|
69
72
|
return res.status(400).json({ error: 'openclawAutoMemoryMaxRecent must be a number' });
|
|
70
73
|
}
|
|
74
|
+
if (cloudSyncProjectMode !== undefined &&
|
|
75
|
+
cloudSyncProjectMode !== 'all' &&
|
|
76
|
+
cloudSyncProjectMode !== 'include' &&
|
|
77
|
+
cloudSyncProjectMode !== 'exclude') {
|
|
78
|
+
return res.status(400).json({ error: 'cloudSyncProjectMode must be all, include, or exclude' });
|
|
79
|
+
}
|
|
80
|
+
if (cloudSyncContentMode !== undefined &&
|
|
81
|
+
cloudSyncContentMode !== 'full' &&
|
|
82
|
+
cloudSyncContentMode !== 'metadata') {
|
|
83
|
+
return res.status(400).json({ error: 'cloudSyncContentMode must be full or metadata' });
|
|
84
|
+
}
|
|
85
|
+
if (cloudSyncExcludeSensitive !== undefined &&
|
|
86
|
+
typeof cloudSyncExcludeSensitive !== 'boolean') {
|
|
87
|
+
return res.status(400).json({ error: 'cloudSyncExcludeSensitive must be a boolean' });
|
|
88
|
+
}
|
|
89
|
+
if (cloudSyncProjects !== undefined &&
|
|
90
|
+
(!Array.isArray(cloudSyncProjects) || cloudSyncProjects.some((value) => typeof value !== 'string'))) {
|
|
91
|
+
return res.status(400).json({ error: 'cloudSyncProjects must be an array of strings' });
|
|
92
|
+
}
|
|
71
93
|
setCloudConfig({
|
|
72
94
|
...(cloudApiKey !== undefined && { cloudApiKey }),
|
|
73
95
|
...(cloudEnabled !== undefined && { cloudEnabled }),
|
|
74
96
|
...(cloudBaseUrl !== undefined && { cloudBaseUrl }),
|
|
75
97
|
});
|
|
98
|
+
setCloudSyncControls({
|
|
99
|
+
...(cloudSyncProjectMode !== undefined && { projectMode: cloudSyncProjectMode }),
|
|
100
|
+
...(cloudSyncProjects !== undefined && { projects: cloudSyncProjects }),
|
|
101
|
+
...(cloudSyncContentMode !== undefined && { contentMode: cloudSyncContentMode }),
|
|
102
|
+
...(cloudSyncExcludeSensitive !== undefined && { excludeSensitive: cloudSyncExcludeSensitive }),
|
|
103
|
+
});
|
|
76
104
|
setOpenClawMemoryConfig({
|
|
77
105
|
...(openclawAutoMemory !== undefined && { autoMemory: openclawAutoMemory }),
|
|
78
106
|
...(openclawAutoMemoryDedupe !== undefined && { dedupe: openclawAutoMemoryDedupe }),
|
|
@@ -85,6 +113,7 @@ export function registerSystemRoutes(app, deps) {
|
|
|
85
113
|
enabled: updated.cloudEnabled,
|
|
86
114
|
apiKeySet: !!updated.cloudApiKey,
|
|
87
115
|
baseUrl: updated.cloudBaseUrl,
|
|
116
|
+
syncControls: getCloudSyncControls(),
|
|
88
117
|
openclawMemory: getOpenClawMemoryConfig(),
|
|
89
118
|
});
|
|
90
119
|
}
|
|
@@ -122,10 +151,25 @@ export function registerSystemRoutes(app, deps) {
|
|
|
122
151
|
res.json({
|
|
123
152
|
enabled: config.cloudEnabled,
|
|
124
153
|
apiKeySet: !!config.cloudApiKey,
|
|
154
|
+
baseUrl: config.cloudBaseUrl,
|
|
155
|
+
featureEnabled: isFeatureEnabled('cloud_sync'),
|
|
156
|
+
requiredTier: getRequiredTier('cloud_sync'),
|
|
157
|
+
controls: getCloudSyncControls(),
|
|
125
158
|
lastSyncAt: (typeof raw.lastSyncAt === 'string' ? raw.lastSyncAt : null),
|
|
159
|
+
device: {
|
|
160
|
+
id: getDeviceId(),
|
|
161
|
+
name: getDeviceName(),
|
|
162
|
+
platform: `${process.platform}/${process.arch}`,
|
|
163
|
+
},
|
|
126
164
|
queue: {
|
|
127
165
|
pending: queue.pending,
|
|
128
166
|
failed: queue.failed,
|
|
167
|
+
synced: queue.synced,
|
|
168
|
+
byKind: queue.byKind,
|
|
169
|
+
oldestPendingAt: queue.oldestPendingAt,
|
|
170
|
+
nextRetryAt: queue.nextRetryAt,
|
|
171
|
+
lastError: queue.lastError,
|
|
172
|
+
lastErrorKind: queue.lastErrorKind,
|
|
129
173
|
},
|
|
130
174
|
});
|
|
131
175
|
}
|
|
@@ -133,6 +177,27 @@ export function registerSystemRoutes(app, deps) {
|
|
|
133
177
|
res.status(500).json({ error: error.message });
|
|
134
178
|
}
|
|
135
179
|
});
|
|
180
|
+
app.get('/api/cloud/projects', (_req, res) => {
|
|
181
|
+
try {
|
|
182
|
+
const db = getDatabase();
|
|
183
|
+
const rows = db.prepare(`
|
|
184
|
+
SELECT project, COUNT(*) as count
|
|
185
|
+
FROM memories
|
|
186
|
+
WHERE project IS NOT NULL AND TRIM(project) != ''
|
|
187
|
+
GROUP BY project
|
|
188
|
+
ORDER BY count DESC, project ASC
|
|
189
|
+
`).all();
|
|
190
|
+
res.json({
|
|
191
|
+
projects: rows.map((row) => ({
|
|
192
|
+
project: row.project,
|
|
193
|
+
count: Number(row.count ?? 0),
|
|
194
|
+
})),
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
res.status(500).json({ error: error.message });
|
|
199
|
+
}
|
|
200
|
+
});
|
|
136
201
|
app.get('/api/version', (_req, res) => {
|
|
137
202
|
try {
|
|
138
203
|
const version = getCurrentVersion();
|
package/dist/cloud/cli.d.ts
CHANGED
package/dist/cloud/cli.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { getCloudConfig, setCloudConfig, getDefenceMode, setDefenceMode, getVerifyConfig, setVerifyConfig, getOpenClawAutoMemory, setOpenClawAutoMemory, } from './config.js';
|
|
2
|
+
import { syncAllGraphToCloud } from './graph-sync.js';
|
|
3
|
+
import { syncAllMemoriesToCloud } from './memory-sync.js';
|
|
4
|
+
import { isFeatureEnabled } from '../license/gate.js';
|
|
5
|
+
import { initDatabase } from '../database/init.js';
|
|
6
|
+
import { reconcileSyncQueue } from './sync-queue.js';
|
|
2
7
|
const VALID_MODES = ['strict', 'balanced', 'permissive'];
|
|
3
8
|
const VALID_VERIFY_MODES = ['advisory', 'enforce'];
|
|
4
9
|
export function handleCloudConfig(args) {
|
|
@@ -128,3 +133,38 @@ export function handleCloudConfig(args) {
|
|
|
128
133
|
console.log(' --verify-timeout <ms> Set verify timeout in ms (1000-30000)');
|
|
129
134
|
}
|
|
130
135
|
}
|
|
136
|
+
export async function handleCloudCommand(args) {
|
|
137
|
+
const action = args[0];
|
|
138
|
+
if (action === 'sync' && args.includes('--full')) {
|
|
139
|
+
const config = getCloudConfig();
|
|
140
|
+
if (!config.cloudEnabled || !config.cloudApiKey) {
|
|
141
|
+
console.error('Cloud sync is not configured. Set an API key and enable cloud sync first.');
|
|
142
|
+
process.exit(1);
|
|
143
|
+
}
|
|
144
|
+
if (!isFeatureEnabled('cloud_sync')) {
|
|
145
|
+
console.error('Cloud memory sync requires a Team or higher licence.');
|
|
146
|
+
process.exit(1);
|
|
147
|
+
}
|
|
148
|
+
initDatabase();
|
|
149
|
+
console.log('Syncing local memories and graph to ShieldCortex Cloud...');
|
|
150
|
+
const memoryResult = await syncAllMemoriesToCloud();
|
|
151
|
+
const graphResult = await syncAllGraphToCloud();
|
|
152
|
+
let reconciled = 0;
|
|
153
|
+
if (memoryResult.failed === 0 && graphResult.failedBatches === 0) {
|
|
154
|
+
reconciled = reconcileSyncQueue({
|
|
155
|
+
kinds: ['memory', 'graph'],
|
|
156
|
+
statuses: ['pending', 'failed'],
|
|
157
|
+
maxCreatedAt: new Date().toISOString(),
|
|
158
|
+
}).removed;
|
|
159
|
+
}
|
|
160
|
+
console.log(`Finished. ${memoryResult.synced}/${memoryResult.total} memories synced` +
|
|
161
|
+
`${memoryResult.failed > 0 ? `, ${memoryResult.failed} queued for retry` : ''}.`);
|
|
162
|
+
console.log(`Graph replica: ${graphResult.entities} entities, ${graphResult.triples} relationships, ${graphResult.memoryEntities} memory links` +
|
|
163
|
+
`${graphResult.failedBatches > 0 ? `, ${graphResult.failedBatches} batch${graphResult.failedBatches === 1 ? '' : 'es'} queued for retry` : ''}.`);
|
|
164
|
+
if (reconciled > 0) {
|
|
165
|
+
console.log(`Reconciled ${reconciled} stale sync queue entr${reconciled === 1 ? 'y' : 'ies'}.`);
|
|
166
|
+
}
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
console.log('Usage: shieldcortex cloud sync --full');
|
|
170
|
+
}
|
package/dist/cloud/config.d.ts
CHANGED
|
@@ -3,12 +3,22 @@ export interface CloudConfig {
|
|
|
3
3
|
cloudBaseUrl: string;
|
|
4
4
|
cloudEnabled: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface CloudSyncControls {
|
|
7
|
+
projectMode: 'all' | 'include' | 'exclude';
|
|
8
|
+
projects: string[];
|
|
9
|
+
contentMode: 'full' | 'metadata';
|
|
10
|
+
excludeSensitive: boolean;
|
|
11
|
+
}
|
|
6
12
|
/** Returns true if config file tampering was detected. */
|
|
7
13
|
export declare function isConfigTampered(): boolean;
|
|
8
14
|
export declare function getCloudConfig(): CloudConfig;
|
|
9
15
|
export declare function setCloudConfig(updates: Partial<CloudConfig>): void;
|
|
10
16
|
/** Reset the in-memory cache (useful for testing) */
|
|
11
17
|
export declare function clearCloudConfigCache(): void;
|
|
18
|
+
export declare function getCloudSyncControls(): CloudSyncControls;
|
|
19
|
+
export declare function setCloudSyncControls(updates: Partial<CloudSyncControls>): void;
|
|
20
|
+
export declare function shouldSyncProject(project: string | null | undefined, controls?: CloudSyncControls): boolean;
|
|
21
|
+
export declare function isSensitiveLevel(level: string | null | undefined): boolean;
|
|
12
22
|
export declare function readRawConfig(): Record<string, unknown>;
|
|
13
23
|
export declare function getTrustedSkills(): string[];
|
|
14
24
|
export declare function addTrustedSkill(path: string): void;
|
package/dist/cloud/config.js
CHANGED
|
@@ -7,6 +7,12 @@ const CONFIG_FILE = join(CONFIG_DIR, 'config.json');
|
|
|
7
7
|
const SIG_FILE = join(CONFIG_DIR, '.config-sig');
|
|
8
8
|
const INTEGRITY_KEY_FILE = join(CONFIG_DIR, '.integrity-key');
|
|
9
9
|
const DEFAULT_BASE_URL = 'https://api.shieldcortex.ai';
|
|
10
|
+
const DEFAULT_SYNC_CONTROLS = {
|
|
11
|
+
projectMode: 'all',
|
|
12
|
+
projects: [],
|
|
13
|
+
contentMode: 'full',
|
|
14
|
+
excludeSensitive: false,
|
|
15
|
+
};
|
|
10
16
|
// Cache to avoid repeated file reads
|
|
11
17
|
let cachedConfig = null;
|
|
12
18
|
// ── Config Integrity (HMAC) ──────────────────────────────
|
|
@@ -114,6 +120,54 @@ export function setCloudConfig(updates) {
|
|
|
114
120
|
export function clearCloudConfigCache() {
|
|
115
121
|
cachedConfig = null;
|
|
116
122
|
}
|
|
123
|
+
function normalizeProjectList(value) {
|
|
124
|
+
if (!Array.isArray(value))
|
|
125
|
+
return [];
|
|
126
|
+
return [...new Set(value
|
|
127
|
+
.filter((entry) => typeof entry === 'string')
|
|
128
|
+
.map((entry) => entry.trim())
|
|
129
|
+
.filter(Boolean))].sort((a, b) => a.localeCompare(b));
|
|
130
|
+
}
|
|
131
|
+
export function getCloudSyncControls() {
|
|
132
|
+
const raw = readRawConfig();
|
|
133
|
+
const projectMode = raw.cloudSyncProjectMode;
|
|
134
|
+
const contentMode = raw.cloudSyncContentMode;
|
|
135
|
+
return {
|
|
136
|
+
projectMode: projectMode === 'include' || projectMode === 'exclude'
|
|
137
|
+
? projectMode
|
|
138
|
+
: DEFAULT_SYNC_CONTROLS.projectMode,
|
|
139
|
+
projects: normalizeProjectList(raw.cloudSyncProjects),
|
|
140
|
+
contentMode: contentMode === 'metadata' ? 'metadata' : DEFAULT_SYNC_CONTROLS.contentMode,
|
|
141
|
+
excludeSensitive: typeof raw.cloudSyncExcludeSensitive === 'boolean'
|
|
142
|
+
? raw.cloudSyncExcludeSensitive
|
|
143
|
+
: DEFAULT_SYNC_CONTROLS.excludeSensitive,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export function setCloudSyncControls(updates) {
|
|
147
|
+
const raw = readRawConfig();
|
|
148
|
+
if (updates.projectMode !== undefined)
|
|
149
|
+
raw.cloudSyncProjectMode = updates.projectMode;
|
|
150
|
+
if (updates.projects !== undefined)
|
|
151
|
+
raw.cloudSyncProjects = normalizeProjectList(updates.projects);
|
|
152
|
+
if (updates.contentMode !== undefined)
|
|
153
|
+
raw.cloudSyncContentMode = updates.contentMode;
|
|
154
|
+
if (updates.excludeSensitive !== undefined)
|
|
155
|
+
raw.cloudSyncExcludeSensitive = updates.excludeSensitive;
|
|
156
|
+
writeRawConfig(raw);
|
|
157
|
+
}
|
|
158
|
+
export function shouldSyncProject(project, controls = getCloudSyncControls()) {
|
|
159
|
+
const normalized = (project ?? '').trim();
|
|
160
|
+
if (controls.projectMode === 'all')
|
|
161
|
+
return true;
|
|
162
|
+
const included = controls.projects.includes(normalized);
|
|
163
|
+
return controls.projectMode === 'include' ? included : !included;
|
|
164
|
+
}
|
|
165
|
+
export function isSensitiveLevel(level) {
|
|
166
|
+
if (!level)
|
|
167
|
+
return false;
|
|
168
|
+
const normalized = level.trim().toUpperCase();
|
|
169
|
+
return normalized.length > 0 && normalized !== 'PUBLIC' && normalized !== 'INTERNAL';
|
|
170
|
+
}
|
|
117
171
|
// ── Trusted Skills ──────────────────────────────────────
|
|
118
172
|
export function readRawConfig() {
|
|
119
173
|
try {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Memory } from '../memory/types.js';
|
|
2
|
+
export interface SyncedGraphEntityRecord {
|
|
3
|
+
external_id: string;
|
|
4
|
+
local_id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
aliases: string[];
|
|
8
|
+
first_seen: string | null;
|
|
9
|
+
memory_count: number;
|
|
10
|
+
}
|
|
11
|
+
export interface SyncedGraphTripleRecord {
|
|
12
|
+
external_id: string;
|
|
13
|
+
local_id: number;
|
|
14
|
+
subject_external_id: string;
|
|
15
|
+
predicate: string;
|
|
16
|
+
object_external_id: string;
|
|
17
|
+
source_memory_external_id: string | null;
|
|
18
|
+
confidence: number | null;
|
|
19
|
+
created_at: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface SyncedGraphMemoryEntityRecord {
|
|
22
|
+
memory_external_id: string;
|
|
23
|
+
entity_external_id: string;
|
|
24
|
+
role: string;
|
|
25
|
+
}
|
|
26
|
+
export interface GraphSyncEnvelope {
|
|
27
|
+
device: {
|
|
28
|
+
device_id: string;
|
|
29
|
+
device_name: string;
|
|
30
|
+
platform: string;
|
|
31
|
+
};
|
|
32
|
+
entities: SyncedGraphEntityRecord[];
|
|
33
|
+
triples: SyncedGraphTripleRecord[];
|
|
34
|
+
memory_entities: SyncedGraphMemoryEntityRecord[];
|
|
35
|
+
prune_memory_external_ids?: string[];
|
|
36
|
+
}
|
|
37
|
+
export declare function syncGraphForMemoryToCloud(memoryId: number): void;
|
|
38
|
+
export declare function syncGraphDeleteForMemoryToCloud(memory: Memory): void;
|
|
39
|
+
export declare function syncAllGraphToCloud(): Promise<{
|
|
40
|
+
entities: number;
|
|
41
|
+
triples: number;
|
|
42
|
+
memoryEntities: number;
|
|
43
|
+
syncedBatches: number;
|
|
44
|
+
failedBatches: number;
|
|
45
|
+
}>;
|