feat: Vestige v2.0.0 "Cognitive Leap" — 3D dashboard, HyDE search, WebSocket events

The biggest release in Vestige history. Complete visual and cognitive overhaul.

Dashboard:
- SvelteKit 2 + Three.js 3D neural visualization at localhost:3927/dashboard
- 7 interactive pages: Graph, Memories, Timeline, Feed, Explore, Intentions, Stats
- WebSocket event bus with 16 event types, real-time 3D animations
- Bloom post-processing, GPU instanced rendering, force-directed layout
- Dream visualization mode, FSRS retention curves, command palette (Cmd+K)
- Keyboard shortcuts, responsive mobile layout, PWA installable
- Single binary deployment via include_dir! (22MB)

Engine:
- HyDE query expansion (intent classification + 3-5 semantic variants + centroid)
- fastembed 5.11 with optional Nomic v2 MoE + Qwen3 reranker + Metal GPU
- Emotional memory module (#29)
- Criterion benchmark suite

Backend:
- Axum WebSocket at /ws with heartbeat + event broadcast
- 7 new REST endpoints for cognitive operations
- Event emission from MCP tools via shared broadcast channel
- CORS for SvelteKit dev mode

Distribution:
- GitHub issue templates (bug report, feature request)
- CHANGELOG with comprehensive v2.0 release notes
- README updated with dashboard docs, architecture diagram, comparison table

734 tests passing, zero warnings, 22MB release binary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sam Valladares 2026-02-22 03:07:25 -06:00
parent 26cee040a5
commit c2d28f3433
321 changed files with 32695 additions and 4727 deletions

225
apps/dashboard/.svelte-kit/ambient.d.ts vendored Normal file
View file

@ -0,0 +1,225 @@
// this file is generated — do not edit it
/// <reference types="@sveltejs/kit" />
/**
* Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured).
*
* _Unlike_ [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination.
*
* ```ts
* import { API_KEY } from '$env/static/private';
* ```
*
* Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
*
* ```
* MY_FEATURE_FLAG=""
* ```
*
* You can override `.env` values from the command line like so:
*
* ```sh
* MY_FEATURE_FLAG="enabled" npm run dev
* ```
*/
declare module '$env/static/private' {
export const NVM_INC: string;
export const COREPACK_ROOT: string;
export const NoDefaultCurrentDirectoryInExePath: string;
export const TERM_PROGRAM: string;
export const VSCODE_GIT_IPC_AUTH_TOKEN: string;
export const CLAUDE_CODE_ENTRYPOINT: string;
export const NODE: string;
export const NVM_CD_FLAGS: string;
export const INIT_CWD: string;
export const SHELL: string;
export const TERM: string;
export const TMPDIR: string;
export const HOMEBREW_REPOSITORY: string;
export const TERM_PROGRAM_VERSION: string;
export const npm_config_npm_globalconfig: string;
export const MallocNanoZone: string;
export const CURSOR_TRACE_ID: string;
export const ZDOTDIR: string;
export const npm_config_registry: string;
export const GIT_EDITOR: string;
export const USER: string;
export const NVM_DIR: string;
export const COMMAND_MODE: string;
export const npm_config_globalconfig: string;
export const PNPM_SCRIPT_SRC_DIR: string;
export const SSH_AUTH_SOCK: string;
export const CLAUDE_CODE_SSE_PORT: string;
export const __CF_USER_TEXT_ENCODING: string;
export const VSCODE_PROFILE_INITIALIZED: string;
export const npm_execpath: string;
export const npm_config_frozen_lockfile: string;
export const npm_config_verify_deps_before_run: string;
export const PATH: string;
export const npm_package_json: string;
export const __CFBundleIdentifier: string;
export const USER_ZDOTDIR: string;
export const COREPACK_ENABLE_DOWNLOAD_PROMPT: string;
export const PWD: string;
export const npm_command: string;
export const JAVA_HOME: string;
export const OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: string;
export const npm_config__jsr_registry: string;
export const npm_lifecycle_event: string;
export const LANG: string;
export const npm_package_name: string;
export const NODE_PATH: string;
export const XPC_FLAGS: string;
export const VSCODE_GIT_ASKPASS_EXTRA_ARGS: string;
export const OPENROUTER_E2E_KEY: string;
export const npm_config_node_gyp: string;
export const XPC_SERVICE_NAME: string;
export const npm_package_version: string;
export const pnpm_config_verify_deps_before_run: string;
export const VSCODE_INJECTION: string;
export const HOME: string;
export const SHLVL: string;
export const VSCODE_GIT_ASKPASS_MAIN: string;
export const HOMEBREW_PREFIX: string;
export const CN_API_KEY: string;
export const LOGNAME: string;
export const npm_lifecycle_script: string;
export const VSCODE_GIT_IPC_HANDLE: string;
export const COREPACK_ENABLE_AUTO_PIN: string;
export const NVM_BIN: string;
export const npm_config_user_agent: string;
export const HOMEBREW_CELLAR: string;
export const INFOPATH: string;
export const GIT_ASKPASS: string;
export const VSCODE_GIT_ASKPASS_NODE: string;
export const OSLogRateLimit: string;
export const CLAUDECODE: string;
export const COLORTERM: string;
export const npm_node_execpath: string;
export const NODE_ENV: string;
}
/**
* Similar to [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
*
* Values are replaced statically at build time.
*
* ```ts
* import { PUBLIC_BASE_URL } from '$env/static/public';
* ```
*/
declare module '$env/static/public' {
}
/**
* This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured).
*
* This module cannot be imported into client-side code.
*
* ```ts
* import { env } from '$env/dynamic/private';
* console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE);
* ```
*
* > [!NOTE] In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
*/
declare module '$env/dynamic/private' {
export const env: {
NVM_INC: string;
COREPACK_ROOT: string;
NoDefaultCurrentDirectoryInExePath: string;
TERM_PROGRAM: string;
VSCODE_GIT_IPC_AUTH_TOKEN: string;
CLAUDE_CODE_ENTRYPOINT: string;
NODE: string;
NVM_CD_FLAGS: string;
INIT_CWD: string;
SHELL: string;
TERM: string;
TMPDIR: string;
HOMEBREW_REPOSITORY: string;
TERM_PROGRAM_VERSION: string;
npm_config_npm_globalconfig: string;
MallocNanoZone: string;
CURSOR_TRACE_ID: string;
ZDOTDIR: string;
npm_config_registry: string;
GIT_EDITOR: string;
USER: string;
NVM_DIR: string;
COMMAND_MODE: string;
npm_config_globalconfig: string;
PNPM_SCRIPT_SRC_DIR: string;
SSH_AUTH_SOCK: string;
CLAUDE_CODE_SSE_PORT: string;
__CF_USER_TEXT_ENCODING: string;
VSCODE_PROFILE_INITIALIZED: string;
npm_execpath: string;
npm_config_frozen_lockfile: string;
npm_config_verify_deps_before_run: string;
PATH: string;
npm_package_json: string;
__CFBundleIdentifier: string;
USER_ZDOTDIR: string;
COREPACK_ENABLE_DOWNLOAD_PROMPT: string;
PWD: string;
npm_command: string;
JAVA_HOME: string;
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: string;
npm_config__jsr_registry: string;
npm_lifecycle_event: string;
LANG: string;
npm_package_name: string;
NODE_PATH: string;
XPC_FLAGS: string;
VSCODE_GIT_ASKPASS_EXTRA_ARGS: string;
OPENROUTER_E2E_KEY: string;
npm_config_node_gyp: string;
XPC_SERVICE_NAME: string;
npm_package_version: string;
pnpm_config_verify_deps_before_run: string;
VSCODE_INJECTION: string;
HOME: string;
SHLVL: string;
VSCODE_GIT_ASKPASS_MAIN: string;
HOMEBREW_PREFIX: string;
CN_API_KEY: string;
LOGNAME: string;
npm_lifecycle_script: string;
VSCODE_GIT_IPC_HANDLE: string;
COREPACK_ENABLE_AUTO_PIN: string;
NVM_BIN: string;
npm_config_user_agent: string;
HOMEBREW_CELLAR: string;
INFOPATH: string;
GIT_ASKPASS: string;
VSCODE_GIT_ASKPASS_NODE: string;
OSLogRateLimit: string;
CLAUDECODE: string;
COLORTERM: string;
npm_node_execpath: string;
NODE_ENV: string;
[key: `PUBLIC_${string}`]: undefined;
[key: `${string}`]: string | undefined;
}
}
/**
* Similar to [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
*
* Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests when possible, use `$env/static/public` instead.
*
* ```ts
* import { env } from '$env/dynamic/public';
* console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE);
* ```
*/
declare module '$env/dynamic/public' {
export const env: {
[key: `PUBLIC_${string}`]: string | undefined;
}
}

View file

@ -0,0 +1,46 @@
export { matchers } from './matchers.js';
export const nodes = [
() => import('./nodes/0'),
() => import('./nodes/1'),
() => import('./nodes/2'),
() => import('./nodes/3'),
() => import('./nodes/4'),
() => import('./nodes/5'),
() => import('./nodes/6'),
() => import('./nodes/7'),
() => import('./nodes/8'),
() => import('./nodes/9'),
() => import('./nodes/10'),
() => import('./nodes/11')
];
export const server_loads = [];
export const dictionary = {
"/": [3],
"/(app)/explore": [4,[2]],
"/(app)/feed": [5,[2]],
"/(app)/graph": [6,[2]],
"/(app)/intentions": [7,[2]],
"/(app)/memories": [8,[2]],
"/(app)/settings": [9,[2]],
"/(app)/stats": [10,[2]],
"/(app)/timeline": [11,[2]]
};
export const hooks = {
handleError: (({ error }) => { console.error(error) }),
reroute: (() => {}),
transport: {}
};
export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));
export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode]));
export const hash = false;
export const decode = (type, value) => decoders[type](value);
export { default as root } from '../root.js';

View file

@ -0,0 +1 @@
export const matchers = {};

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/+layout.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/stats/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/timeline/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/+layout.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/explore/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/feed/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/graph/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/intentions/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/memories/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/settings/+page.svelte";

View file

@ -0,0 +1,46 @@
export { matchers } from './matchers.js';
export const nodes = [
() => import('./nodes/0'),
() => import('./nodes/1'),
() => import('./nodes/2'),
() => import('./nodes/3'),
() => import('./nodes/4'),
() => import('./nodes/5'),
() => import('./nodes/6'),
() => import('./nodes/7'),
() => import('./nodes/8'),
() => import('./nodes/9'),
() => import('./nodes/10'),
() => import('./nodes/11')
];
export const server_loads = [];
export const dictionary = {
"/": [3],
"/(app)/explore": [4,[2]],
"/(app)/feed": [5,[2]],
"/(app)/graph": [6,[2]],
"/(app)/intentions": [7,[2]],
"/(app)/memories": [8,[2]],
"/(app)/settings": [9,[2]],
"/(app)/stats": [10,[2]],
"/(app)/timeline": [11,[2]]
};
export const hooks = {
handleError: (({ error }) => { console.error(error) }),
reroute: (() => {}),
transport: {}
};
export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));
export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode]));
export const hash = false;
export const decode = (type, value) => decoders[type](value);
export { default as root } from '../root.js';

View file

@ -0,0 +1 @@
export const matchers = {};

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/+layout.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/stats/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/timeline/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/+layout.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/explore/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/feed/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/graph/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/intentions/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/memories/+page.svelte";

View file

@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/(app)/settings/+page.svelte";

View file

@ -0,0 +1,3 @@
import { asClassComponent } from 'svelte/legacy';
import Root from './root.svelte';
export default asClassComponent(Root);

View file

@ -0,0 +1,80 @@
<!-- This file is generated by @sveltejs/kit — do not edit it! -->
<svelte:options runes={true} />
<script>
import { setContext, onMount, tick } from 'svelte';
import { browser } from '$app/environment';
// stores
let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null, data_2 = null } = $props();
if (!browser) {
// svelte-ignore state_referenced_locally
setContext('__svelte__', stores);
}
if (browser) {
$effect.pre(() => stores.page.set(page));
} else {
// svelte-ignore state_referenced_locally
stores.page.set(page);
}
$effect(() => {
stores;page;constructors;components;form;data_0;data_1;data_2;
stores.page.notify();
});
let mounted = $state(false);
let navigated = $state(false);
let title = $state(null);
onMount(() => {
const unsubscribe = stores.page.subscribe(() => {
if (mounted) {
navigated = true;
tick().then(() => {
title = document.title || 'untitled page';
});
}
});
mounted = true;
return unsubscribe;
});
const Pyramid_2=$derived(constructors[2])
</script>
{#if constructors[1]}
{@const Pyramid_0 = constructors[0]}
<!-- svelte-ignore binding_property_non_reactive -->
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params}>
{#if constructors[2]}
{@const Pyramid_1 = constructors[1]}
<!-- svelte-ignore binding_property_non_reactive -->
<Pyramid_1 bind:this={components[1]} data={data_1} {form} params={page.params}>
<!-- svelte-ignore binding_property_non_reactive -->
<Pyramid_2 bind:this={components[2]} data={data_2} {form} params={page.params} />
</Pyramid_1>
{:else}
{@const Pyramid_1 = constructors[1]}
<!-- svelte-ignore binding_property_non_reactive -->
<Pyramid_1 bind:this={components[1]} data={data_1} {form} params={page.params} />
{/if}
</Pyramid_0>
{:else}
{@const Pyramid_0 = constructors[0]}
<!-- svelte-ignore binding_property_non_reactive -->
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params} />
{/if}
{#if mounted}
<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px">
{#if navigated}
{title}
{/if}
</div>
{/if}

View file

@ -0,0 +1,53 @@
import root from '../root.js';
import { set_building, set_prerendering } from '__sveltekit/environment';
import { set_assets } from '$app/paths/internal/server';
import { set_manifest, set_read_implementation } from '__sveltekit/server';
import { set_private_env, set_public_env } from '../../../../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/shared-server.js';
export const options = {
app_template_contains_nonce: false,
async: false,
csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}},
csrf_check_origin: true,
csrf_trusted_origins: [],
embedded: false,
env_public_prefix: 'PUBLIC_',
env_private_prefix: '',
hash_routing: false,
hooks: null, // added lazily, via `get_hooks`
preload_strategy: "modulepreload",
root,
service_worker: false,
service_worker_options: undefined,
templates: {
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, viewport-fit=cover\" />\n\t\t<meta name=\"theme-color\" content=\"#050510\" />\n\t\t<meta name=\"description\" content=\"Vestige — Cognitive Memory Dashboard. 3D visualization of your AI's long-term memory.\" />\n\t\t<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n\t\t<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\n\t\t<meta name=\"apple-mobile-web-app-title\" content=\"Vestige\" />\n\t\t<link rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon.svg\" />\n\t\t<link rel=\"apple-touch-icon\" href=\"/favicon.svg\" />\n\t\t<link rel=\"manifest\" href=\"/manifest.json\" />\n\t\t" + head + "\n\t\t<title>Vestige</title>\n\t</head>\n\t<body data-sveltekit-preload-data=\"hover\">\n\t\t<div style=\"display: contents\">" + body + "</div>\n\t</body>\n</html>\n",
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
},
version_hash: "1m0l582"
};
export async function get_hooks() {
let handle;
let handleFetch;
let handleError;
let handleValidationError;
let init;
let reroute;
let transport;
return {
handle,
handleFetch,
handleError,
handleValidationError,
init,
reroute,
transport
};
}
export { set_assets, set_building, set_manifest, set_prerendering, set_private_env, set_public_env, set_read_implementation };

View file

@ -0,0 +1,50 @@
// this file is generated — do not edit it
declare module "svelte/elements" {
export interface HTMLAttributes<T> {
'data-sveltekit-keepfocus'?: true | '' | 'off' | undefined | null;
'data-sveltekit-noscroll'?: true | '' | 'off' | undefined | null;
'data-sveltekit-preload-code'?:
| true
| ''
| 'eager'
| 'viewport'
| 'hover'
| 'tap'
| 'off'
| undefined
| null;
'data-sveltekit-preload-data'?: true | '' | 'hover' | 'tap' | 'off' | undefined | null;
'data-sveltekit-reload'?: true | '' | 'off' | undefined | null;
'data-sveltekit-replacestate'?: true | '' | 'off' | undefined | null;
}
}
export {};
declare module "$app/types" {
export interface AppTypes {
RouteId(): "/(app)" | "/" | "/(app)/explore" | "/(app)/feed" | "/(app)/graph" | "/(app)/intentions" | "/(app)/memories" | "/(app)/settings" | "/(app)/stats" | "/(app)/timeline";
RouteParams(): {
};
LayoutParams(): {
"/(app)": Record<string, never>;
"/": Record<string, never>;
"/(app)/explore": Record<string, never>;
"/(app)/feed": Record<string, never>;
"/(app)/graph": Record<string, never>;
"/(app)/intentions": Record<string, never>;
"/(app)/memories": Record<string, never>;
"/(app)/settings": Record<string, never>;
"/(app)/stats": Record<string, never>;
"/(app)/timeline": Record<string, never>
};
Pathname(): "/" | "/explore" | "/feed" | "/graph" | "/intentions" | "/memories" | "/settings" | "/stats" | "/timeline";
ResolvedPathname(): `${"" | `/${string}`}${ReturnType<AppTypes['Pathname']>}`;
Asset(): "/favicon.svg" | "/manifest.json" | string & {};
}
}

View file

@ -0,0 +1,426 @@
{
"../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/client/entry.js": {
"file": "_app/immutable/entry/start.BdzkYIOY.js",
"name": "entry/start",
"src": "../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/client/entry.js",
"isEntry": true,
"imports": [
"_rHGvVkdq.js"
]
},
".svelte-kit/generated/client-optimized/app.js": {
"file": "_app/immutable/entry/app.BBPt9AEJ.js",
"name": "entry/app",
"src": ".svelte-kit/generated/client-optimized/app.js",
"isEntry": true,
"imports": [
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_wmwKEafM.js",
"_DZf5toYK.js",
"_BHs8FnOA.js",
"_BolYP48w.js",
"_D6XtQ4nY.js",
"_D-x7U94i.js"
],
"dynamicImports": [
".svelte-kit/generated/client-optimized/nodes/0.js",
".svelte-kit/generated/client-optimized/nodes/1.js",
".svelte-kit/generated/client-optimized/nodes/2.js",
".svelte-kit/generated/client-optimized/nodes/3.js",
".svelte-kit/generated/client-optimized/nodes/4.js",
".svelte-kit/generated/client-optimized/nodes/5.js",
".svelte-kit/generated/client-optimized/nodes/6.js",
".svelte-kit/generated/client-optimized/nodes/7.js",
".svelte-kit/generated/client-optimized/nodes/8.js",
".svelte-kit/generated/client-optimized/nodes/9.js",
".svelte-kit/generated/client-optimized/nodes/10.js",
".svelte-kit/generated/client-optimized/nodes/11.js"
]
},
".svelte-kit/generated/client-optimized/nodes/0.js": {
"file": "_app/immutable/nodes/0.CVv5sZN_.js",
"name": "nodes/0",
"src": ".svelte-kit/generated/client-optimized/nodes/0.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DZf5toYK.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_CVDMn5X_.js",
"_ChQRIhGP.js",
"_BK028jHP.js",
"_D6XtQ4nY.js",
"_M1z6VHZC.js",
"_rHGvVkdq.js",
"_kVvujbiQ.js"
],
"css": [
"_app/immutable/assets/0.T9JGZ_uB.css"
]
},
".svelte-kit/generated/client-optimized/nodes/1.js": {
"file": "_app/immutable/nodes/1.wR9SFDr_.js",
"name": "nodes/1",
"src": ".svelte-kit/generated/client-optimized/nodes/1.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_CtRgAcWZ.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_rHGvVkdq.js"
]
},
".svelte-kit/generated/client-optimized/nodes/10.js": {
"file": "_app/immutable/nodes/10.MRR5NpnA.js",
"name": "nodes/10",
"src": ".svelte-kit/generated/client-optimized/nodes/10.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DZf5toYK.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_D6n3ggvw.js",
"_BcuCGYSa.js"
]
},
".svelte-kit/generated/client-optimized/nodes/11.js": {
"file": "_app/immutable/nodes/11.DwFmilUf.js",
"name": "nodes/11",
"src": ".svelte-kit/generated/client-optimized/nodes/11.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DZf5toYK.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_D6n3ggvw.js",
"_DYdHPHRa.js",
"_BcuCGYSa.js",
"_CHfZNXj4.js"
]
},
".svelte-kit/generated/client-optimized/nodes/2.js": {
"file": "_app/immutable/nodes/2.VW3Ep--L.js",
"name": "nodes/2",
"src": ".svelte-kit/generated/client-optimized/nodes/2.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DleE0ac1.js",
"_CVDMn5X_.js"
]
},
".svelte-kit/generated/client-optimized/nodes/3.js": {
"file": "_app/immutable/nodes/3.DlJxvrxN.js",
"name": "nodes/3",
"src": ".svelte-kit/generated/client-optimized/nodes/3.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DZf5toYK.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_BK028jHP.js",
"_D6n3ggvw.js",
"_M1z6VHZC.js",
"_CVZIBdRK.js",
"_BcuCGYSa.js",
"_kVvujbiQ.js"
]
},
".svelte-kit/generated/client-optimized/nodes/4.js": {
"file": "_app/immutable/nodes/4.JZRJcAXm.js",
"name": "nodes/4",
"src": ".svelte-kit/generated/client-optimized/nodes/4.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_ChQRIhGP.js",
"_BK028jHP.js",
"_D6n3ggvw.js",
"_BcuCGYSa.js"
]
},
".svelte-kit/generated/client-optimized/nodes/5.js": {
"file": "_app/immutable/nodes/5.CJ3qOnwc.js",
"name": "nodes/5",
"src": ".svelte-kit/generated/client-optimized/nodes/5.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_CtRgAcWZ.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_D6n3ggvw.js",
"_M1z6VHZC.js",
"_kVvujbiQ.js",
"_CHfZNXj4.js"
]
},
".svelte-kit/generated/client-optimized/nodes/6.js": {
"file": "_app/immutable/nodes/6.BbuG7uIt.js",
"name": "nodes/6",
"src": ".svelte-kit/generated/client-optimized/nodes/6.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DZf5toYK.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_ChQRIhGP.js",
"_BK028jHP.js",
"_D6n3ggvw.js",
"_DYdHPHRa.js",
"_M1z6VHZC.js",
"_CVZIBdRK.js",
"_D-x7U94i.js",
"_BcuCGYSa.js",
"_kVvujbiQ.js"
]
},
".svelte-kit/generated/client-optimized/nodes/7.js": {
"file": "_app/immutable/nodes/7.CenRva5o.js",
"name": "nodes/7",
"src": ".svelte-kit/generated/client-optimized/nodes/7.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DZf5toYK.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_BK028jHP.js",
"_BcuCGYSa.js"
]
},
".svelte-kit/generated/client-optimized/nodes/8.js": {
"file": "_app/immutable/nodes/8.Dd_gKrfw.js",
"name": "nodes/8",
"src": ".svelte-kit/generated/client-optimized/nodes/8.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DZf5toYK.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_ChQRIhGP.js",
"_BK028jHP.js",
"_D6n3ggvw.js",
"_DYdHPHRa.js",
"_BcuCGYSa.js",
"_CHfZNXj4.js"
]
},
".svelte-kit/generated/client-optimized/nodes/9.js": {
"file": "_app/immutable/nodes/9.CFdF6F7Z.js",
"name": "nodes/9",
"src": ".svelte-kit/generated/client-optimized/nodes/9.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_wmwKEafM.js",
"_DleE0ac1.js",
"_8PSwG_AU.js",
"_BHs8FnOA.js",
"_BsRos8Kb.js",
"_BK028jHP.js",
"_D6n3ggvw.js",
"_M1z6VHZC.js",
"_BcuCGYSa.js",
"_kVvujbiQ.js"
]
},
"_8PSwG_AU.js": {
"file": "_app/immutable/chunks/8PSwG_AU.js",
"name": "render",
"imports": [
"_DleE0ac1.js",
"_wmwKEafM.js"
]
},
"_BHs8FnOA.js": {
"file": "_app/immutable/chunks/BHs8FnOA.js",
"name": "if",
"imports": [
"_DleE0ac1.js",
"_BolYP48w.js"
]
},
"_BK028jHP.js": {
"file": "_app/immutable/chunks/BK028jHP.js",
"name": "class",
"imports": [
"_BsRos8Kb.js",
"_DleE0ac1.js"
]
},
"_BcuCGYSa.js": {
"file": "_app/immutable/chunks/BcuCGYSa.js",
"name": "api"
},
"_BolYP48w.js": {
"file": "_app/immutable/chunks/BolYP48w.js",
"name": "branches",
"imports": [
"_DleE0ac1.js"
]
},
"_BsRos8Kb.js": {
"file": "_app/immutable/chunks/BsRos8Kb.js",
"name": "attributes",
"imports": [
"_DleE0ac1.js"
]
},
"_CHfZNXj4.js": {
"file": "_app/immutable/chunks/CHfZNXj4.js",
"name": "index"
},
"_CVDMn5X_.js": {
"file": "_app/immutable/chunks/CVDMn5X_.js",
"name": "snippet",
"imports": [
"_DleE0ac1.js",
"_BolYP48w.js"
]
},
"_CVZIBdRK.js": {
"file": "_app/immutable/chunks/CVZIBdRK.js",
"name": "Graph3D",
"imports": [
"_wmwKEafM.js",
"_DZf5toYK.js",
"_DleE0ac1.js",
"_D6XtQ4nY.js",
"_D-x7U94i.js",
"_CHfZNXj4.js"
]
},
"_ChQRIhGP.js": {
"file": "_app/immutable/chunks/ChQRIhGP.js",
"name": "input",
"imports": [
"_DleE0ac1.js"
]
},
"_CtRgAcWZ.js": {
"file": "_app/immutable/chunks/CtRgAcWZ.js",
"name": "legacy",
"imports": [
"_DleE0ac1.js"
]
},
"_D-x7U94i.js": {
"file": "_app/immutable/chunks/D-x7U94i.js",
"name": "props",
"imports": [
"_DleE0ac1.js",
"_M1z6VHZC.js"
]
},
"_D6XtQ4nY.js": {
"file": "_app/immutable/chunks/D6XtQ4nY.js",
"name": "this",
"imports": [
"_DleE0ac1.js"
]
},
"_D6n3ggvw.js": {
"file": "_app/immutable/chunks/D6n3ggvw.js",
"name": "style",
"imports": [
"_BsRos8Kb.js",
"_DleE0ac1.js"
]
},
"_DYdHPHRa.js": {
"file": "_app/immutable/chunks/DYdHPHRa.js",
"name": "select",
"imports": [
"_DleE0ac1.js"
]
},
"_DZf5toYK.js": {
"file": "_app/immutable/chunks/DZf5toYK.js",
"name": "index-client",
"imports": [
"_DleE0ac1.js"
]
},
"_DleE0ac1.js": {
"file": "_app/immutable/chunks/DleE0ac1.js",
"name": "runtime"
},
"_DrTsYth1.js": {
"file": "_app/immutable/chunks/DrTsYth1.js",
"name": "index",
"imports": [
"_DleE0ac1.js"
]
},
"_M1z6VHZC.js": {
"file": "_app/immutable/chunks/M1z6VHZC.js",
"name": "store",
"imports": [
"_DrTsYth1.js",
"_DleE0ac1.js"
]
},
"_kVvujbiQ.js": {
"file": "_app/immutable/chunks/kVvujbiQ.js",
"name": "websocket",
"imports": [
"_DrTsYth1.js"
]
},
"_rHGvVkdq.js": {
"file": "_app/immutable/chunks/rHGvVkdq.js",
"name": "entry",
"imports": [
"_DleE0ac1.js",
"_DrTsYth1.js",
"_DZf5toYK.js"
]
},
"_wmwKEafM.js": {
"file": "_app/immutable/chunks/wmwKEafM.js",
"name": "disclose-version",
"imports": [
"_DleE0ac1.js"
]
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{b as T,N as o,W as b,E as h,X as p,Y as A,Z as E,_ as R,$ as g,a0 as l}from"./DleE0ac1.js";import{B as v}from"./BolYP48w.js";function S(t,_,u=!1){o&&b();var n=new v(t),c=u?h:0;function i(a,r){if(o){const e=p(t);var s;if(e===A?s=0:e===E?s=!1:s=parseInt(e.substring(1)),a!==s){var f=R();g(f),n.anchor=f,l(!1),n.ensure(a,r),l(!0);return}}n.ensure(a,r)}T(()=>{var a=!1;_((r,s=0)=>{a=!0,i(s,r)}),a||i(!1,null)},c)}export{S as i};

View file

@ -0,0 +1 @@
import{t as l}from"./BsRos8Kb.js";import{N as e}from"./DleE0ac1.js";function u(s,c,r,f,p,i){var a=s.__className;if(e||a!==r||a===void 0){var t=l(r);(!e||t!==s.getAttribute("class"))&&(t==null?s.removeAttribute("class"):s.className=t),s.__className=r}return i}export{u as s};

View file

@ -0,0 +1 @@
const n="/api";async function t(e,o){const i=await fetch(`${n}${e}`,{headers:{"Content-Type":"application/json"},...o});if(!i.ok)throw new Error(`API ${i.status}: ${i.statusText}`);return i.json()}const s={memories:{list:e=>{const o=e?"?"+new URLSearchParams(e).toString():"";return t(`/memories${o}`)},get:e=>t(`/memories/${e}`),delete:e=>t(`/memories/${e}`,{method:"DELETE"}),promote:e=>t(`/memories/${e}/promote`,{method:"POST"}),demote:e=>t(`/memories/${e}/demote`,{method:"POST"})},search:(e,o=20)=>t(`/search?q=${encodeURIComponent(e)}&limit=${o}`),stats:()=>t("/stats"),health:()=>t("/health"),timeline:(e=7,o=200)=>t(`/timeline?days=${e}&limit=${o}`),graph:e=>{const o=e?"?"+new URLSearchParams(Object.entries(e).filter(([,i])=>i!==void 0).map(([i,r])=>[i,String(r)])).toString():"";return t(`/graph${o}`)},dream:()=>t("/dream",{method:"POST"}),explore:(e,o="associations",i,r=10)=>t("/explore",{method:"POST",body:JSON.stringify({from_id:e,action:o,to_id:i,limit:r})}),predict:()=>t("/predict",{method:"POST"}),importance:e=>t("/importance",{method:"POST",body:JSON.stringify({content:e})}),consolidate:()=>t("/consolidate",{method:"POST"}),retentionDistribution:()=>t("/retention-distribution"),intentions:(e="active")=>t(`/intentions?status=${e}`)};export{s as a};

View file

@ -0,0 +1 @@
var D=Object.defineProperty;var g=a=>{throw TypeError(a)};var F=(a,e,s)=>e in a?D(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var w=(a,e,s)=>F(a,typeof e!="symbol"?e+"":e,s),y=(a,e,s)=>e.has(a)||g("Cannot "+s);var t=(a,e,s)=>(y(a,e,"read from private field"),s?s.call(a):e.get(a)),l=(a,e,s)=>e.has(a)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,s),M=(a,e,s,i)=>(y(a,e,"write to private field"),i?i.call(a,s):e.set(a,s),s);import{U as x,a1 as C,a2 as k,a3 as N,a4 as A,a5 as B,N as S,a6 as U,a7 as j,a8 as q}from"./DleE0ac1.js";var r,n,h,u,p,_,v;class G{constructor(e,s=!0){w(this,"anchor");l(this,r,new Map);l(this,n,new Map);l(this,h,new Map);l(this,u,new Set);l(this,p,!0);l(this,_,()=>{var e=x;if(t(this,r).has(e)){var s=t(this,r).get(e),i=t(this,n).get(s);if(i)C(i),t(this,u).delete(s);else{var c=t(this,h).get(s);c&&(t(this,n).set(s,c.effect),t(this,h).delete(s),c.fragment.lastChild.remove(),this.anchor.before(c.fragment),i=c.effect)}for(const[f,o]of t(this,r)){if(t(this,r).delete(f),f===e)break;const d=t(this,h).get(o);d&&(k(d.effect),t(this,h).delete(o))}for(const[f,o]of t(this,n)){if(f===s||t(this,u).has(f))continue;const d=()=>{if(Array.from(t(this,r).values()).includes(f)){var b=document.createDocumentFragment();j(o,b),b.append(A()),t(this,h).set(f,{effect:o,fragment:b})}else k(o);t(this,u).delete(f),t(this,n).delete(f)};t(this,p)||!i?(t(this,u).add(f),N(o,d,!1)):d()}}});l(this,v,e=>{t(this,r).delete(e);const s=Array.from(t(this,r).values());for(const[i,c]of t(this,h))s.includes(i)||(k(c.effect),t(this,h).delete(i))});this.anchor=e,M(this,p,s)}ensure(e,s){var i=x,c=q();if(s&&!t(this,n).has(e)&&!t(this,h).has(e))if(c){var f=document.createDocumentFragment(),o=A();f.append(o),t(this,h).set(e,{effect:B(()=>s(o)),fragment:f})}else t(this,n).set(e,B(()=>s(this.anchor)));if(t(this,r).set(i,e),c){for(const[d,m]of t(this,n))d===e?i.unskip_effect(m):i.skip_effect(m);for(const[d,m]of t(this,h))d===e?i.unskip_effect(m.effect):i.skip_effect(m.effect);i.oncommit(t(this,_)),i.ondiscard(t(this,v))}else S&&(this.anchor=U),t(this,_).call(this)}}r=new WeakMap,n=new WeakMap,h=new WeakMap,u=new WeakMap,p=new WeakMap,_=new WeakMap,v=new WeakMap;export{G as B};

View file

@ -0,0 +1 @@
import{a4 as O,b as fe,an as ne,N as D,$ as L,ao as ie,W as le,g as G,X as ue,Z as se,_ as J,a0 as q,a6 as F,ap as oe,aq as te,ar as P,U as ve,as as T,a5 as y,at as de,a8 as ce,z as pe,Q as _e,au as V,av as he,aw as ge,K as Ee,ax as j,ay as me,a1 as re,a3 as ae,az as B,F as Te,aA as Ae,aB as Ce,aC as we,a2 as Ne,aD as Se}from"./DleE0ac1.js";function De(e,r){return r}function Ie(e,r,l){for(var t=[],g=r.length,s,u=r.length,c=0;c<g;c++){let E=r[c];ae(E,()=>{if(s){if(s.pending.delete(E),s.done.add(E),s.pending.size===0){var o=e.outrogroups;U(V(s.done)),o.delete(s),o.size===0&&(e.outrogroups=null)}}else u-=1},!1)}if(u===0){var i=t.length===0&&l!==null;if(i){var v=l,a=v.parentNode;we(a),a.append(v),e.items.clear()}U(r,!i)}else s={pending:new Set(r),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function U(e,r=!0){for(var l=0;l<e.length;l++)Ne(e[l],r)}var ee;function He(e,r,l,t,g,s=null){var u=e,c=new Map,i=(r&ne)!==0;if(i){var v=e;u=D?L(ie(v)):v.appendChild(O())}D&&le();var a=null,E=pe(()=>{var f=l();return _e(f)?f:f==null?[]:V(f)}),o,d=!0;function C(){n.fallback=a,xe(n,o,u,r,t),a!==null&&(o.length===0?(a.f&T)===0?re(a):(a.f^=T,M(a,null,u)):ae(a,()=>{a=null}))}var S=fe(()=>{o=G(E);var f=o.length;let I=!1;if(D){var x=ue(u)===se;x!==(f===0)&&(u=J(),L(u),q(!1),I=!0)}for(var _=new Set,w=ve,R=ce(),p=0;p<f;p+=1){D&&F.nodeType===oe&&F.data===te&&(u=F,I=!0,q(!1));var N=o[p],b=t(N,p),h=d?null:c.get(b);h?(h.v&&P(h.v,N),h.i&&P(h.i,p),R&&w.unskip_effect(h.e)):(h=Re(c,d?u:ee??(ee=O()),N,b,p,g,r,l),d||(h.e.f|=T),c.set(b,h)),_.add(b)}if(f===0&&s&&!a&&(d?a=y(()=>s(u)):(a=y(()=>s(ee??(ee=O()))),a.f|=T)),f>_.size&&de(),D&&f>0&&L(J()),!d)if(R){for(const[k,z]of c)_.has(k)||w.skip_effect(z.e);w.oncommit(C),w.ondiscard(()=>{})}else C();I&&q(!0),G(E)}),n={effect:S,items:c,outrogroups:null,fallback:a};d=!1,D&&(u=F)}function H(e){for(;e!==null&&(e.f&Ae)===0;)e=e.next;return e}function xe(e,r,l,t,g){var h,k,z,X,Y,K,Q,W,Z;var s=(t&Ce)!==0,u=r.length,c=e.items,i=H(e.effect.first),v,a=null,E,o=[],d=[],C,S,n,f;if(s)for(f=0;f<u;f+=1)C=r[f],S=g(C,f),n=c.get(S).e,(n.f&T)===0&&((k=(h=n.nodes)==null?void 0:h.a)==null||k.measure(),(E??(E=new Set)).add(n));for(f=0;f<u;f+=1){if(C=r[f],S=g(C,f),n=c.get(S).e,e.outrogroups!==null)for(const m of e.outrogroups)m.pending.delete(n),m.done.delete(n);if((n.f&T)!==0)if(n.f^=T,n===i)M(n,null,l);else{var I=a?a.next:i;n===e.effect.last&&(e.effect.last=n.prev),n.prev&&(n.prev.next=n.next),n.next&&(n.next.prev=n.prev),A(e,a,n),A(e,n,I),M(n,I,l),a=n,o=[],d=[],i=H(a.next);continue}if((n.f&B)!==0&&(re(n),s&&((X=(z=n.nodes)==null?void 0:z.a)==null||X.unfix(),(E??(E=new Set)).delete(n))),n!==i){if(v!==void 0&&v.has(n)){if(o.length<d.length){var x=d[0],_;a=x.prev;var w=o[0],R=o[o.length-1];for(_=0;_<o.length;_+=1)M(o[_],x,l);for(_=0;_<d.length;_+=1)v.delete(d[_]);A(e,w.prev,R.next),A(e,a,w),A(e,R,x),i=x,a=R,f-=1,o=[],d=[]}else v.delete(n),M(n,i,l),A(e,n.prev,n.next),A(e,n,a===null?e.effect.first:a.next),A(e,a,n),a=n;continue}for(o=[],d=[];i!==null&&i!==n;)(v??(v=new Set)).add(i),d.push(i),i=H(i.next);if(i===null)continue}(n.f&T)===0&&o.push(n),a=n,i=H(n.next)}if(e.outrogroups!==null){for(const m of e.outrogroups)m.pending.size===0&&(U(V(m.done)),(Y=e.outrogroups)==null||Y.delete(m));e.outrogroups.size===0&&(e.outrogroups=null)}if(i!==null||v!==void 0){var p=[];if(v!==void 0)for(n of v)(n.f&B)===0&&p.push(n);for(;i!==null;)(i.f&B)===0&&i!==e.fallback&&p.push(i),i=H(i.next);var N=p.length;if(N>0){var b=(t&ne)!==0&&u===0?l:null;if(s){for(f=0;f<N;f+=1)(Q=(K=p[f].nodes)==null?void 0:K.a)==null||Q.measure();for(f=0;f<N;f+=1)(Z=(W=p[f].nodes)==null?void 0:W.a)==null||Z.fix()}Ie(e,p,b)}}s&&Te(()=>{var m,$;if(E!==void 0)for(n of E)($=(m=n.nodes)==null?void 0:m.a)==null||$.apply()})}function Re(e,r,l,t,g,s,u,c){var i=(u&he)!==0?(u&ge)===0?Ee(l,!1,!1):j(l):null,v=(u&me)!==0?j(g):null;return{v:i,i:v,e:y(()=>(s(r,i??l,v??g,c),()=>{e.delete(t)}))}}function M(e,r,l){if(e.nodes)for(var t=e.nodes.start,g=e.nodes.end,s=r&&(r.f&T)===0?r.nodes.start:l;t!==null;){var u=Se(t);if(s.before(t),t===g)return;t=u}}function A(e,r,l){r===null?e.effect.first=l:r.next=l,l===null?e.effect.last=r:l.prev=r}function Me(e,r,l){var t=e==null?"":""+e;return t===""?null:t}function ke(e,r){return e==null?null:String(e)}export{ke as a,He as e,De as i,Me as t};

View file

@ -0,0 +1 @@
const e={fact:"#3b82f6",concept:"#8b5cf6",event:"#f59e0b",person:"#10b981",place:"#06b6d4",note:"#6b7280",pattern:"#ec4899",decision:"#ef4444"},o={MemoryCreated:"#10b981",MemoryUpdated:"#3b82f6",MemoryDeleted:"#ef4444",SearchPerformed:"#6366f1",DreamStarted:"#8b5cf6",DreamCompleted:"#a855f7",ConsolidationStarted:"#f59e0b",ConsolidationCompleted:"#f97316",ConnectionDiscovered:"#06b6d4",ImportanceScored:"#ec4899",Heartbeat:"#6b7280"};export{o as E,e as N};

View file

@ -0,0 +1 @@
import{b as p,E as t}from"./DleE0ac1.js";import{B as c}from"./BolYP48w.js";function E(r,s,...a){var e=new c(r);p(()=>{const n=s()??null;e.ensure(n,n&&(o=>n(o,...a)))},t)}export{E as s};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{N as d,F as k,af as S,ag as y,ah as A,ai as m,aj as E,ak as b,O as M,al as N,q as g,C as L,U as t,V as T}from"./DleE0ac1.js";const I=Symbol("is custom element"),O=Symbol("is html"),C=m?"link":"LINK";function q(a){if(d){var e=!1,r=()=>{if(!e){if(e=!0,a.hasAttribute("value")){var c=a.value;u(a,"value",null),a.value=c}if(a.hasAttribute("checked")){var s=a.checked;u(a,"checked",null),a.checked=s}}};a.__on_r=r,k(r),S()}}function u(a,e,r,c){var s=H(a);d&&(s[e]=a.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&a.nodeName===C)||s[e]!==(s[e]=r)&&(e==="loading"&&(a[y]=r),r==null?a.removeAttribute(e):typeof r!="string"&&U(a).includes(e)?a[e]=r:a.setAttribute(e,r))}function H(a){return a.__attributes??(a.__attributes={[I]:a.nodeName.includes("-"),[O]:a.namespaceURI===A})}var h=new Map;function U(a){var e=a.getAttribute("is")||a.nodeName,r=h.get(e);if(r)return r;h.set(e,r=[]);for(var c,s=a,o=Element.prototype;o!==s;){c=b(s);for(var l in c)c[l].set&&r.push(l);s=E(s)}return r}function w(a,e,r=e){var c=new WeakSet;M(a,"input",async s=>{var o=s?a.defaultValue:a.value;if(o=_(a)?i(o):o,r(o),t!==null&&c.add(t),await N(),o!==(o=e())){var l=a.selectionStart,f=a.selectionEnd,n=a.value.length;if(a.value=o??"",f!==null){var v=a.value.length;l===f&&f===n&&v>n?(a.selectionStart=v,a.selectionEnd=v):(a.selectionStart=l,a.selectionEnd=Math.min(f,v))}}}),(d&&a.defaultValue!==a.value||g(e)==null&&a.value)&&(r(_(a)?i(a.value):a.value),t!==null&&c.add(t)),L(()=>{var s=e();if(a===document.activeElement){var o=T??t;if(c.has(o))return}_(a)&&s===i(a.value)||a.type==="date"&&!s&&!a.value||s!==a.value&&(a.value=s??"")})}function _(a){var e=a.type;return e==="number"||e==="range"}function i(a){return a===""?null:+a}export{w as b,q as r,u as s};

View file

@ -0,0 +1 @@
import{a9 as d,aa as g,H as l,q as b,ab as i,ac as m,g as p,ad as v,y,ae as h}from"./DleE0ac1.js";function x(t=!1){const a=d,e=a.l.u;if(!e)return;let f=()=>v(a.s);if(t){let n=0,s={};const _=y(()=>{let c=!1;const r=a.s;for(const o in r)r[o]!==s[o]&&(s[o]=r[o],c=!0);return c&&n++,n});f=()=>p(_)}e.b.length&&g(()=>{u(a,f),i(e.b)}),l(()=>{const n=b(()=>e.m.map(m));return()=>{for(const s of n)typeof s=="function"&&s()}}),e.a.length&&l(()=>{u(a,f),i(e.a)})}function u(t,a){if(t.l.s)for(const e of t.l.s)p(e);a()}h();export{x as i};

View file

@ -0,0 +1 @@
import{k as L,l as D,P as T,g as P,h as b,s as B,m as Y,n as h,D as x,o as M,q as N,v as U,w as q,x as w,y as z,z as $,A as y,S as C,L as G}from"./DleE0ac1.js";import{c as Z}from"./M1z6VHZC.js";function H(r,a,t,d){var o;var f=!U||(t&q)!==0,v=(t&M)!==0,E=(t&y)!==0,n=d,S=!0,g=()=>(S&&(S=!1,n=E?N(d):d),n),u;if(v){var O=C in r||G in r;u=((o=L(r,a))==null?void 0:o.set)??(O&&a in r?e=>r[a]=e:void 0)}var _,I=!1;v?[_,I]=Z(()=>r[a]):_=r[a],_===void 0&&d!==void 0&&(_=g(),u&&(f&&D(),u(_)));var i;if(f?i=()=>{var e=r[a];return e===void 0?g():(S=!0,e)}:i=()=>{var e=r[a];return e!==void 0&&(n=void 0),e===void 0?n:e},f&&(t&T)===0)return i;if(u){var R=r.$$legacy;return(function(e,l){return arguments.length>0?((!f||!l||R||I)&&u(l?i():e),e):i()})}var c=!1,s=((t&w)!==0?z:$)(()=>(c=!1,i()));v&&P(s);var m=h;return(function(e,l){if(arguments.length>0){const A=l?P(s):f&&v?b(e):e;return B(s,A),c=!0,n!==void 0&&(n=A),e}return Y&&c||(m.f&x)!==0?s.v:P(s)})}export{H as p};

View file

@ -0,0 +1 @@
import{B as S,C as h,q as k,F as q,S as B}from"./DleE0ac1.js";function t(r,i){return r===i||(r==null?void 0:r[B])===i}function x(r={},i,a,T){return S(()=>{var f,s;return h(()=>{f=s,s=[],k(()=>{r!==a(...s)&&(i(r,...s),f&&t(a(...f),r)&&i(null,...f))})}),()=>{q(()=>{s&&t(a(...s),r)&&i(null,...s)})}}),r}export{x as b};

View file

@ -0,0 +1 @@
import{a as y}from"./BsRos8Kb.js";import{N as r}from"./DleE0ac1.js";function a(t,e,f,i){var l=t.__style;if(r||l!==e){var s=y(e);(!r||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}return i}export{a as s};

View file

@ -0,0 +1 @@
import{O as s,B as o,I as c,Q as b,R as m,T as h,U as v,V as y}from"./DleE0ac1.js";function _(e,r,f=!1){if(e.multiple){if(r==null)return;if(!b(r))return m();for(var a of e.options)a.selected=r.includes(i(a));return}for(a of e.options){var t=i(a);if(h(t,r)){a.selected=!0;return}}(!f||r!==void 0)&&(e.selectedIndex=-1)}function q(e){var r=new MutationObserver(()=>{_(e,e.__value)});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),c(()=>{r.disconnect()})}function p(e,r,f=r){var a=new WeakSet,t=!0;s(e,"change",u=>{var l=u?"[selected]":":checked",n;if(e.multiple)n=[].map.call(e.querySelectorAll(l),i);else{var d=e.querySelector(l)??e.querySelector("option:not([disabled])");n=d&&i(d)}f(n),v!==null&&a.add(v)}),o(()=>{var u=r();if(e===document.activeElement){var l=y??v;if(a.has(l))return}if(_(e,u,t),t&&u===void 0){var n=e.querySelector(":checked");n!==null&&(u=i(n),f(u))}e.__value=u,t=!1}),q(e)}function i(e){return"__value"in e?e.__value:e.value}export{p as b};

View file

@ -0,0 +1 @@
import{H as u,a9 as t,v as a,q as o}from"./DleE0ac1.js";function c(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function l(e){t===null&&c(),a&&t.l!==null?i(t).m.push(e):u(()=>{const n=o(e);if(typeof n=="function")return n})}function f(e){t===null&&c(),l(()=>()=>o(e))}function i(e){var n=e.l;return n.u??(n.u={a:[],b:[],m:[]})}export{f as a,l as o};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{J as b,q,am as w,ab as x}from"./DleE0ac1.js";function _(e,t,n){if(e==null)return t(void 0),n&&n(void 0),b;const r=q(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const f=[];function z(e,t){return{subscribe:A(e,t).subscribe}}function A(e,t=b){let n=null;const r=new Set;function i(u){if(w(e,u)&&(e=u,n)){const o=!f.length;for(const s of r)s[1](),f.push(s,e);if(o){for(let s=0;s<f.length;s+=2)f[s][0](f[s+1]);f.length=0}}}function a(u){i(u(e))}function l(u,o=b){const s=[u,o];return r.add(s),r.size===1&&(n=t(i,a)||b),u(e),()=>{r.delete(s),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:l}}function B(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=t.length<2;return z(n,(l,u)=>{let o=!1;const s=[];let d=0,p=b;const y=()=>{if(d)return;p();const c=t(r?s[0]:s,l,u);a?l(c):p=typeof c=="function"?c:b},h=i.map((c,g)=>_(c,m=>{s[g]=m,d&=~(1<<g),o&&y()},()=>{d|=1<<g}));return o=!0,y(),function(){x(h),p(),o=!1}})}function E(e){let t;return _(e,n=>t=n)(),t}export{B as d,E as g,_ as s,A as w};

View file

@ -0,0 +1 @@
import{s as c,g as l}from"./DrTsYth1.js";import{I as o,J as a,K as b,g as p,s as d,M as g}from"./DleE0ac1.js";let s=!1,i=Symbol();function y(e,n,r){const u=r[n]??(r[n]={store:null,source:b(void 0),unsubscribe:a});if(u.store!==e&&!(i in r))if(u.unsubscribe(),u.store=e??null,e==null)u.source.v=void 0,u.unsubscribe=a;else{var t=!0;u.unsubscribe=c(e,f=>{t?u.source.v=f:d(u.source,f)}),t=!1}return e&&i in r?l(e):p(u.source)}function m(){const e={};function n(){o(()=>{for(var r in e)e[r].unsubscribe();g(e,i,{enumerable:!1,value:!0})})}return[e,n]}function I(e){var n=s;try{return s=!1,[e(),s]}finally{s=n}}export{y as a,I as c,m as s};

View file

@ -0,0 +1 @@
import{d as l,w as S}from"./DrTsYth1.js";const y=200;function H(){const{subscribe:n,set:c,update:e}=S({connected:!1,events:[],lastHeartbeat:null,error:null});let t=null,a=null,d=0;function m(r){const u=r||(window.location.port==="5173"?`ws://${window.location.hostname}:3927/ws`:`ws://${window.location.host}/ws`);if((t==null?void 0:t.readyState)!==WebSocket.OPEN)try{t=new WebSocket(u),t.onopen=()=>{d=0,e(o=>({...o,connected:!0,error:null}))},t.onmessage=o=>{try{const s=JSON.parse(o.data);e(b=>{if(s.type==="Heartbeat")return{...b,lastHeartbeat:s};const p=[s,...b.events].slice(0,y);return{...b,events:p}})}catch{}},t.onclose=()=>{e(o=>({...o,connected:!1})),f(u)},t.onerror=()=>{e(o=>({...o,error:"WebSocket connection failed"}))}}catch(o){e(s=>({...s,error:String(o)}))}}function f(r){a&&clearTimeout(a);const u=Math.min(1e3*2**d,3e4);d++,a=setTimeout(()=>m(r),u)}function w(){a&&clearTimeout(a),t==null||t.close(),t=null,c({connected:!1,events:[],lastHeartbeat:null,error:null})}function v(){e(r=>({...r,events:[]}))}return{subscribe:n,connect:m,disconnect:w,clearEvents:v}}const i=H(),k=l(i,n=>n.connected),T=l(i,n=>n.events);l(i,n=>n.lastHeartbeat);const g=l(i,n=>{var c,e;return((e=(c=n.lastHeartbeat)==null?void 0:c.data)==null?void 0:e.memory_count)??0}),E=l(i,n=>{var c,e;return((e=(c=n.lastHeartbeat)==null?void 0:c.data)==null?void 0:e.avg_retention)??0});export{E as a,T as e,k as i,g as m,i as w};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{aE as p,a4 as u,ao as l,aF as E,n as c,aG as g,aH as w,N as d,a6 as s,aI as N,W as y,aJ as M,$ as x,aK as A}from"./DleE0ac1.js";var f;const i=((f=globalThis==null?void 0:globalThis.window)==null?void 0:f.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function L(t){return(i==null?void 0:i.createHTML(t))??t}function b(t){var r=p("template");return r.innerHTML=L(t.replaceAll("<!>","<!---->")),r.content}function a(t,r){var e=c;e.nodes===null&&(e.nodes={start:t,end:r,a:null,t:null})}function P(t,r){var e=(r&g)!==0,m=(r&w)!==0,n,v=!t.startsWith("<!>");return()=>{if(d)return a(s,null),s;n===void 0&&(n=b(v?t:"<!>"+t),e||(n=l(n)));var o=m||E?document.importNode(n,!0):n.cloneNode(!0);if(e){var T=l(o),h=o.lastChild;a(T,h)}else a(o,o);return o}}function R(t=""){if(!d){var r=u(t+"");return a(r,r),r}var e=s;return e.nodeType!==M?(e.before(e=u()),x(e)):A(e),a(e,e),e}function C(){if(d)return a(s,null),s;var t=document.createDocumentFragment(),r=document.createComment(""),e=u();return t.append(r,e),a(r,e),t}function H(t,r){if(d){var e=c;((e.f&N)===0||e.nodes.end===null)&&(e.nodes.end=s),y();return}t!==null&&t.before(r)}const I="5";var _;typeof window<"u"&&((_=window.__svelte??(window.__svelte={})).v??(_.v=new Set)).add(I);export{H as a,a as b,C as c,P as f,R as t};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{l as o,a as r}from"../chunks/rHGvVkdq.js";export{o as load_css,r as start};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{a as h,f as g}from"../chunks/wmwKEafM.js";import{i as l}from"../chunks/CtRgAcWZ.js";import{p as v,f as d,t as _,a as x,c as s,r as o,e as $}from"../chunks/DleE0ac1.js";import{s as p}from"../chunks/8PSwG_AU.js";import{s as k,p as m}from"../chunks/rHGvVkdq.js";const b={get error(){return m.error},get status(){return m.status}};k.updated.check;const f=b;var E=g("<h1> </h1> <p> </p>",1);function A(i,c){v(c,!1),l();var t=E(),r=d(t),n=s(r,!0);o(r);var a=$(r,2),u=s(a,!0);o(a),_(()=>{var e;p(n,f.status),p(u,(e=f.error)==null?void 0:e.message)}),h(i,t),x()}export{A as component};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{a as l,f as v}from"../chunks/wmwKEafM.js";import{o as pe}from"../chunks/DZf5toYK.js";import{p as ce,d as b,h as me,g as e,a as ue,e as r,c as a,s as c,r as t,t as g}from"../chunks/DleE0ac1.js";import{d as _e,a as K,s as m}from"../chunks/8PSwG_AU.js";import{i as P}from"../chunks/BHs8FnOA.js";import{e as h,i as R}from"../chunks/BsRos8Kb.js";import{s as Q}from"../chunks/D6n3ggvw.js";import{b as fe}from"../chunks/DYdHPHRa.js";import{a as xe}from"../chunks/BcuCGYSa.js";import{N as U}from"../chunks/CHfZNXj4.js";var be=v('<div class="h-16 bg-surface/50 rounded-lg animate-pulse"></div>'),ge=v('<div class="space-y-4"></div>'),he=v('<div class="text-center py-20 text-dim"><p>No memories in the selected time range.</p></div>'),ye=v('<div class="w-2 h-2 rounded-full"></div>'),we=v('<span class="text-xs text-muted"> </span>'),ke=v('<div class="flex items-start gap-2 text-sm"><div class="w-2 h-2 mt-1.5 rounded-full flex-shrink-0"></div> <div class="flex-1 min-w-0"><span class="text-dim line-clamp-1"> </span></div> <span class="text-xs text-muted flex-shrink-0"> </span></div>'),Te=v('<div class="mt-3 pt-3 border-t border-subtle/20 space-y-2"></div>'),je=v('<div class="relative pl-14"><div class="absolute left-4 top-3 w-5 h-5 rounded-full border-2 border-synapse bg-abyss flex items-center justify-center"><div class="w-2 h-2 rounded-full bg-synapse"></div></div> <button class="w-full text-left p-4 bg-surface/40 border border-subtle/20 rounded-lg hover:border-synapse/30 transition-all"><div class="flex items-center justify-between"><div><span class="text-sm text-bright font-medium"> </span> <span class="text-xs text-dim ml-2"> </span></div> <div class="flex gap-1"><!> <!></div></div> <!></button></div>'),Ne=v('<div class="relative"><div class="absolute left-6 top-0 bottom-0 w-px bg-subtle/30"></div> <div class="space-y-4"></div></div>'),Oe=v('<div class="p-6 max-w-4xl mx-auto space-y-6"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Timeline</h1> <select class="px-3 py-2 bg-surface border border-subtle/40 rounded-lg text-dim text-sm"><option>7 days</option><option>14 days</option><option>30 days</option><option>90 days</option></select></div> <!></div>');function Re(V,W){ce(W,!0);let u=b(me([])),y=b(!0),w=b(14),k=b(null);pe(()=>Y());async function Y(){c(y,!0);try{const s=await xe.timeline(e(w),500);c(u,s.timeline,!0)}catch{c(u,[],!0)}finally{c(y,!1)}}var T=Oe(),j=a(T),_=r(a(j),2),N=a(_);N.value=N.__value=7;var O=r(N);O.value=O.__value=14;var S=r(O);S.value=S.__value=30;var q=r(S);q.value=q.__value=90,t(_),t(j);var X=r(j,2);{var Z=s=>{var d=ge();h(d,20,()=>Array(7),R,(f,x)=>{var i=be();l(f,i)}),t(d),l(s,d)},ee=s=>{var d=he();l(s,d)},te=s=>{var d=Ne(),f=r(a(d),2);h(f,21,()=>e(u),x=>x.date,(x,i)=>{var D=je(),E=r(a(D),2),$=a(E),A=a($),C=a(A),ae=a(C,!0);t(C);var z=r(C,2),se=a(z);t(z),t(A);var B=r(A,2),G=a(B);h(G,17,()=>e(i).memories.slice(0,10),R,(n,o)=>{var p=ye();g(()=>Q(p,`background: ${(U[e(o).nodeType]||"#6b7280")??""}; opacity: ${.3+e(o).retentionStrength*.7}`)),l(n,p)});var re=r(G,2);{var ie=n=>{var o=we(),p=a(o);t(o),g(()=>m(p,`+${e(i).memories.length-10}`)),l(n,o)};P(re,n=>{e(i).memories.length>10&&n(ie)})}t(B),t($);var oe=r($,2);{var le=n=>{var o=Te();h(o,21,()=>e(i).memories,R,(p,F)=>{var L=ke(),H=a(L),M=r(H,2),I=a(M),ve=a(I,!0);t(I),t(M);var J=r(M,2),de=a(J);t(J),t(L),g(ne=>{Q(H,`background: ${(U[e(F).nodeType]||"#6b7280")??""}`),m(ve,e(F).content),m(de,`${ne??""}%`)},[()=>(e(F).retentionStrength*100).toFixed(0)]),l(p,L)}),t(o),l(n,o)};P(oe,n=>{e(k)===e(i).date&&n(le)})}t(E),t(D),g(()=>{m(ae,e(i).date),m(se,`${e(i).count??""} memories`)}),K("click",E,()=>c(k,e(k)===e(i).date?null:e(i).date,!0)),l(x,D)}),t(f),t(d),l(s,d)};P(X,s=>{e(y)?s(Z):e(u).length===0?s(ee,1):s(te,!1)})}t(T),K("change",_,Y),fe(_,()=>e(w),s=>c(w,s)),l(V,T),ue()}_e(["change","click"]);export{Re as component};

View file

@ -0,0 +1 @@
import{c as m,a as n}from"../chunks/wmwKEafM.js";import{f as p}from"../chunks/DleE0ac1.js";import{s as e}from"../chunks/CVDMn5X_.js";function c(r,a){var o=m(),t=p(o);e(t,()=>a.children),n(r,o)}export{c as component};

View file

@ -0,0 +1,3 @@
import{a as u,f as m}from"../chunks/wmwKEafM.js";import{o as xe}from"../chunks/DZf5toYK.js";import{p as ge,t as g,a as fe,s as n,c as t,d as h,g as e,e as i,r as a}from"../chunks/DleE0ac1.js";import{d as be,a as D,s as d}from"../chunks/8PSwG_AU.js";import{i as $}from"../chunks/BHs8FnOA.js";import{e as _e,i as he}from"../chunks/BsRos8Kb.js";import{s as ye}from"../chunks/BK028jHP.js";import{s as we}from"../chunks/D6n3ggvw.js";import{s as De,a as $e}from"../chunks/M1z6VHZC.js";import{G as ke}from"../chunks/CVZIBdRK.js";import{a as f}from"../chunks/BcuCGYSa.js";import{e as Se}from"../chunks/kVvujbiQ.js";var je=m('<div class="h-full flex items-center justify-center"><div class="text-center space-y-4"><div class="w-16 h-16 mx-auto rounded-full border-2 border-synapse/30 border-t-synapse animate-spin"></div> <p class="text-dim text-sm">Loading memory graph...</p></div></div>'),Ce=m('<div class="h-full flex items-center justify-center"><div class="text-center space-y-4 max-w-md px-8"><div class="text-4xl">◎</div> <h2 class="text-xl text-bright">Your Mind Awaits</h2> <p class="text-dim text-sm"> </p></div></div>'),Fe=m("<div> </div>"),Me=m('<span class="px-2 py-0.5 rounded text-xs bg-surface text-dim"> </span>'),ze=m("<div> </div>"),Ae=m('<div class="absolute right-0 top-0 h-full w-96 bg-abyss/95 backdrop-blur-xl border-l border-subtle/30 p-6 overflow-y-auto z-20"><div class="flex justify-between items-start mb-4"><h3 class="text-bright text-sm font-semibold">Memory Detail</h3> <button class="text-dim hover:text-text text-lg">×</button></div> <div class="space-y-4"><div class="flex gap-2"><span class="px-2 py-0.5 rounded text-xs bg-synapse/20 text-synapse-glow"> </span> <!></div> <div class="text-sm text-text leading-relaxed whitespace-pre-wrap"> </div> <div><div class="flex justify-between text-xs text-dim mb-1"><span>Retention</span> <span> </span></div> <div class="h-2 bg-surface rounded-full overflow-hidden"><div class="h-full rounded-full transition-all duration-500"></div></div></div> <div class="text-xs text-dim space-y-1"><div> </div> <div> </div> <!></div> <div class="flex gap-2"><button class="flex-1 px-3 py-2 rounded bg-recall/20 text-recall text-xs hover:bg-recall/30 transition">Promote</button> <button class="flex-1 px-3 py-2 rounded bg-decay/20 text-decay text-xs hover:bg-decay/30 transition">Demote</button></div></div></div>'),Ge=m('<div class="h-full relative"><!> <div class="absolute top-4 left-4 flex gap-2 z-10"><button> </button></div> <div class="absolute top-4 right-4 z-10 text-xs text-dim backdrop-blur-sm bg-abyss/60 rounded-lg px-3 py-2 border border-subtle/20"><!></div> <!></div>');function Je(B,E){ge(E,!0);const H=()=>$e(Se,"$eventFeed",J),[J,K]=De();let v=h(null),s=h(null),I=h(!0),k=h(""),x=h(!1);xe(async()=>{try{n(v,await f.graph({max_nodes:150,depth:3}),!0)}catch{n(k,"No memories yet. Start using Vestige to see your memory graph.")}finally{n(I,!1)}});async function O(){n(x,!0);try{const r=await f.dream();n(v,await f.graph({max_nodes:150,depth:3}),!0)}catch{}finally{n(x,!1)}}async function Q(r){try{n(s,await f.memories.get(r),!0)}catch{n(s,null)}}var S=Ge(),P=t(S);{var U=r=>{var o=je();u(r,o)},W=r=>{var o=Ce(),l=t(o),y=i(t(l),4),w=t(y,!0);a(y),a(l),a(o),g(()=>d(w,e(k))),u(r,o)},X=r=>{ke(r,{get nodes(){return e(v).nodes},get edges(){return e(v).edges},get centerId(){return e(v).center_id},get events(){return H()},get isDreaming(){return e(x)},onSelect:Q})};$(P,r=>{e(I)?r(U):e(k)?r(W,1):e(v)&&r(X,2)})}var j=i(P,2),b=t(j),Z=t(b,!0);a(b),a(j);var C=i(j,2),ee=t(C);{var te=r=>{var o=Fe(),l=t(o);a(o),g(()=>d(l,`${e(v).nodeCount??""} nodes / ${e(v).edgeCount??""} edges`)),u(r,o)};$(ee,r=>{e(v)&&r(te)})}a(C);var ae=i(C,2);{var re=r=>{var o=Ae(),l=t(o),y=i(t(l),2);a(l);var w=i(l,2),F=t(w),M=t(F),se=t(M,!0);a(M);var ie=i(M,2);_e(ie,17,()=>e(s).tags,he,(c,p)=>{var _=Me(),me=t(_,!0);a(_),g(()=>d(me,e(p))),u(c,_)}),a(F);var z=i(F,2),oe=t(z,!0);a(z);var A=i(z,2),G=t(A),T=i(t(G),2),de=t(T);a(T),a(G);var V=i(G,2),ve=t(V);a(V),a(A);var L=i(A,2),N=t(L),ne=t(N);a(N);var R=i(N,2),le=t(R);a(R);var ce=i(R,2);{var pe=c=>{var p=ze(),_=t(p);a(p),g(()=>d(_,`Source: ${e(s).source??""}`)),u(c,p)};$(ce,c=>{e(s).source&&c(pe)})}a(L);var Y=i(L,2),q=t(Y),ue=i(q,2);a(Y),a(w),a(o),g((c,p)=>{d(se,e(s).nodeType),d(oe,e(s).content),d(de,`${c??""}%`),we(ve,`width: ${e(s).retentionStrength*100}%; background: ${e(s).retentionStrength>.7?"#10b981":e(s).retentionStrength>.4?"#f59e0b":"#ef4444"}`),d(ne,`Created: ${p??""}`),d(le,`Reviews: ${e(s).reviewCount??0??""}`)},[()=>(e(s).retentionStrength*100).toFixed(1),()=>new Date(e(s).createdAt).toLocaleDateString()]),D("click",y,()=>n(s,null)),D("click",q,()=>e(s)&&f.memories.promote(e(s).id)),D("click",ue,()=>e(s)&&f.memories.demote(e(s).id)),u(r,o)};$(ae,r=>{e(s)&&r(re)})}a(S),g(()=>{b.disabled=e(x),ye(b,1,`px-4 py-2 rounded-lg bg-dream/20 border border-dream/40 text-dream-glow text-sm
hover:bg-dream/30 transition-all disabled:opacity-50 backdrop-blur-sm
${e(x)?"glow-dream animate-pulse-glow":""}`),d(Z,e(x)?"◎ Dreaming...":"◎ Dream")}),D("click",b,O),u(B,S),fe(),K()}be(["click"]);export{Je as component};

View file

@ -0,0 +1,6 @@
import{a as p,f as u,c as ze}from"../chunks/wmwKEafM.js";import{p as Ae,d as I,h as Pe,g as e,a as Qe,c as r,e as a,s as f,r as t,i as qe,t as y,f as ge,u as se,j as Be}from"../chunks/DleE0ac1.js";import{d as De,a as q,s as n}from"../chunks/8PSwG_AU.js";import{i as S}from"../chunks/BHs8FnOA.js";import{e as oe,i as ie}from"../chunks/BsRos8Kb.js";import{b as ne,r as ye}from"../chunks/ChQRIhGP.js";import{s as de}from"../chunks/BK028jHP.js";import{s as Ke}from"../chunks/D6n3ggvw.js";import{a as X}from"../chunks/BcuCGYSa.js";var Re=u('<button><span class="text-xl"> </span> <span class="font-medium"> </span> <span class="text-[10px] text-muted text-center"> </span></button>'),Ue=u('<div class="p-3 bg-synapse/10 border border-synapse/30 rounded-lg"><div class="text-[10px] text-synapse-glow mb-1 uppercase tracking-wider">Source</div> <p class="text-sm text-text"> </p> <div class="flex gap-2 mt-1.5 text-[10px] text-muted"><span> </span> <span> </span></div></div>'),Ve=u('<div class="p-3 bg-dream/10 border border-dream/30 rounded-lg"><div class="text-[10px] text-dream-glow mb-1 uppercase tracking-wider">Target</div> <p class="text-sm text-text"> </p> <div class="flex gap-2 mt-1.5 text-[10px] text-muted"><span> </span> <span> </span></div></div>'),Ge=u(`<div class="space-y-3"><label class="text-xs text-dim font-medium">Target Memory <span class="text-muted"> </span></label> <div class="flex gap-2"><input type="text" placeholder="Search for the target memory..." class="flex-1 px-4 py-2.5 bg-surface border border-subtle/40 rounded-lg text-text text-sm
placeholder:text-muted focus:outline-none focus:border-dream/60 transition"/> <button class="px-4 py-2.5 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-lg hover:bg-dream/30 transition">Find</button></div></div> <!>`,1),He=u('<div class="text-center py-8 text-dim"><div class="text-lg animate-pulse mb-2">◎</div> <p> </p></div>'),Je=u('<span class="px-1.5 py-0.5 bg-deep rounded"> </span>'),Le=u("<span> </span>"),We=u("<span> </span>"),Xe=u("<span> </span>"),Ye=u('<span class="text-synapse-glow"> </span>'),Ze=u('<div class="p-3 bg-surface/40 border border-subtle/20 rounded-lg flex items-start gap-3 hover:border-subtle/40 transition"><div class="w-6 h-6 rounded-full bg-synapse/15 text-synapse-glow text-xs flex items-center justify-center flex-shrink-0 mt-0.5"></div> <div class="flex-1 min-w-0"><p class="text-sm text-text line-clamp-2"> </p> <div class="flex flex-wrap gap-3 mt-1.5 text-xs text-muted"><!> <!> <!> <!> <!></div></div></div>'),et=u('<div class="space-y-4"><div class="flex items-center justify-between"><h2 class="text-sm text-bright font-semibold"> </h2></div> <div class="space-y-2"></div></div>'),tt=u('<div class="text-center py-8 text-dim"><div class="text-3xl mb-3 opacity-20"></div> <p>No connections found for this query.</p></div>'),rt=u('<div><div class="text-xs text-dim mb-1.5 capitalize"> </div> <div class="h-2 bg-deep rounded-full overflow-hidden"><div></div></div> <div class="text-xs text-muted mt-1"> </div></div>'),at=u('<div class="grid grid-cols-4 gap-3"></div>'),st=u('<div class="mt-4 p-4 bg-surface/30 border border-subtle/20 rounded-lg"><div class="flex items-center gap-3 mb-4"><span class="text-3xl text-bright font-bold"> </span> <span> </span></div> <!></div>'),ot=u(`<div class="p-6 max-w-5xl mx-auto space-y-8"><h1 class="text-xl text-bright font-semibold">Explore Connections</h1> <div class="grid grid-cols-3 gap-2"></div> <div class="space-y-3"><label class="text-xs text-dim font-medium">Source Memory</label> <div class="flex gap-2"><input type="text" placeholder="Search for a memory to explore from..." class="flex-1 px-4 py-2.5 bg-surface border border-subtle/40 rounded-lg text-text text-sm
placeholder:text-muted focus:outline-none focus:border-synapse/60 transition"/> <button class="px-4 py-2.5 bg-synapse/20 border border-synapse/40 text-synapse-glow text-sm rounded-lg hover:bg-synapse/30 transition">Find</button></div></div> <!> <!> <!> <div class="pt-8 border-t border-subtle/20"><h2 class="text-lg text-bright font-semibold mb-4">Importance Scorer</h2> <p class="text-xs text-muted mb-3">4-channel neuroscience scoring: novelty, arousal, reward, attention</p> <textarea placeholder="Paste any text to score its importance..." class="w-full h-24 px-4 py-3 bg-surface border border-subtle/40 rounded-lg text-text text-sm
placeholder:text-muted resize-none focus:outline-none focus:border-synapse/60 transition"></textarea> <button class="mt-2 px-4 py-2 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-lg hover:bg-dream/30 transition">Score</button> <!></div></div>`);function mt(he,we){Ae(we,!0);let V=I(""),G=I(""),F=I(null),C=I(null),B=I(Pe([])),$=I("associations"),O=I(!1),H=I(""),D=I(null);const le={associations:{icon:"",desc:"Spreading activation find related memories via graph traversal"},chains:{icon:"",desc:"Build reasoning path from source to target memory"},bridges:{icon:"",desc:"Find connecting memories between two concepts"}};async function ve(){if(e(V).trim()){f(O,!0);try{const s=await X.search(e(V),1);s.results.length>0&&(f(F,s.results[0],!0),await Y())}catch{}finally{f(O,!1)}}}async function ce(){if(e(G).trim()){f(O,!0);try{const s=await X.search(e(G),1);s.results.length>0&&(f(C,s.results[0],!0),e(F)&&await Y())}catch{}finally{f(O,!1)}}}async function Y(){if(e(F)){f(O,!0);try{const s=(e($)==="chains"||e($)==="bridges")&&e(C)?e(C).id:void 0,o=await X.explore(e(F).id,e($),s);f(B,o.results||o.nodes||o.chain||o.bridges||[],!0)}catch{f(B,[],!0)}finally{f(O,!1)}}}async function Se(){e(H).trim()&&f(D,await X.importance(e(H)),!0)}function ke(s){f($,s,!0),e(F)&&Y()}var Z=ot(),ee=a(r(Z),2);oe(ee,20,()=>["associations","chains","bridges"],ie,(s,o)=>{var d=Re(),b=r(d),h=r(b,!0);t(b);var _=a(b,2),c=r(_,!0);t(_);var i=a(_,2),g=r(i,!0);t(i),t(d),y(w=>{de(d,1,`flex flex-col items-center gap-1 p-3 rounded-lg text-sm transition
${e($)===o?"bg-synapse/15 text-synapse-glow border border-synapse/40":"bg-surface/30 text-dim border border-subtle/20 hover:border-subtle/40"}`),n(h,le[o].icon),n(c,w),n(g,le[o].desc)},[()=>o.charAt(0).toUpperCase()+o.slice(1)]),q("click",d,()=>ke(o)),p(s,d)}),t(ee);var te=a(ee,2),pe=a(r(te),2),J=r(pe);ye(J);var Fe=a(J,2);t(pe),t(te);var xe=a(te,2);{var Te=s=>{var o=Ue(),d=a(r(o),2),b=r(d,!0);t(d);var h=a(d,2),_=r(h),c=r(_,!0);t(_);var i=a(_,2),g=r(i);t(i),t(h),t(o),y((w,z)=>{n(b,w),n(c,e(F).nodeType),n(g,`${z??""}% retention`)},[()=>e(F).content.slice(0,200),()=>(e(F).retentionStrength*100).toFixed(0)]),p(s,o)};S(xe,s=>{e(F)&&s(Te)})}var ue=a(xe,2);{var $e=s=>{var o=Ge(),d=ge(o),b=r(d),h=a(r(b)),_=r(h);t(h),t(b);var c=a(b,2),i=r(c);ye(i);var g=a(i,2);t(c),t(d);var w=a(d,2);{var z=m=>{var E=Ve(),x=a(r(E),2),K=r(x,!0);t(x);var M=a(x,2),k=r(M),A=r(k,!0);t(k);var T=a(k,2),P=r(T);t(T),t(M),t(E),y((Q,j)=>{n(K,Q),n(A,e(C).nodeType),n(P,`${j??""}% retention`)},[()=>e(C).content.slice(0,200),()=>(e(C).retentionStrength*100).toFixed(0)]),p(m,E)};S(w,m=>{e(C)&&m(z)})}y(()=>n(_,`(for ${e($)??""})`)),q("keydown",i,m=>m.key==="Enter"&&ce()),ne(i,()=>e(G),m=>f(G,m)),q("click",g,ce),p(s,o)};S(ue,s=>{(e($)==="chains"||e($)==="bridges")&&s($e)})}var me=a(ue,2);{var Ee=s=>{var o=ze(),d=ge(o);{var b=c=>{var i=He(),g=a(r(i),2),w=r(g);t(g),t(i),y(()=>n(w,`Exploring ${e($)??""}...`)),p(c,i)},h=c=>{var i=et(),g=r(i),w=r(g),z=r(w);t(w),t(g);var m=a(g,2);oe(m,21,()=>e(B),ie,(E,x,K)=>{var M=Ze(),k=r(M);k.textContent=K+1;var A=a(k,2),T=r(A),P=r(T,!0);t(T);var Q=a(T,2),j=r(Q);{var L=l=>{var v=Je(),N=r(v,!0);t(v),y(()=>n(N,e(x).nodeType)),p(l,v)};S(j,l=>{e(x).nodeType&&l(L)})}var R=a(j,2);{var ae=l=>{var v=Le(),N=r(v);t(v),y(U=>n(N,`Score: ${U??""}`),[()=>Number(e(x).score).toFixed(3)]),p(l,v)};S(R,l=>{e(x).score&&l(ae)})}var W=a(R,2);{var Ie=l=>{var v=We(),N=r(v);t(v),y(U=>n(N,`Similarity: ${U??""}`),[()=>Number(e(x).similarity).toFixed(3)]),p(l,v)};S(W,l=>{e(x).similarity&&l(Ie)})}var fe=a(W,2);{var je=l=>{var v=Xe(),N=r(v);t(v),y(U=>n(N,`${U??""}% retention`),[()=>(Number(e(x).retention)*100).toFixed(0)]),p(l,v)};S(fe,l=>{e(x).retention&&l(je)})}var Ce=a(fe,2);{var Oe=l=>{var v=Ye(),N=r(v,!0);t(v),y(()=>n(N,e(x).connectionType)),p(l,v)};S(Ce,l=>{e(x).connectionType&&l(Oe)})}t(Q),t(A),t(M),y(()=>n(P,e(x).content)),p(E,M)}),t(m),t(i),y(()=>n(z,`${e(B).length??""} Connections Found`)),p(c,i)},_=c=>{var i=tt();p(c,i)};S(d,c=>{e(O)?c(b):e(B).length>0?c(h,1):c(_,!1)})}p(s,o)};S(me,s=>{e(F)&&s(Ee)})}var be=a(me,2),re=a(r(be),4);qe(re);var _e=a(re,2),Me=a(_e,2);{var Ne=s=>{const o=se(()=>e(D).channels),d=se(()=>Number(e(D).composite||e(D).compositeScore||0));var b=st(),h=r(b),_=r(h),c=r(_,!0);t(_);var i=a(_,2),g=r(i,!0);t(i),t(h);var w=a(h,2);{var z=m=>{var E=at();oe(E,21,()=>Object.entries(e(o)),ie,(x,K)=>{var M=se(()=>Be(e(K),2));let k=()=>e(M)[0],A=()=>e(M)[1];var T=rt(),P=r(T),Q=r(P,!0);t(P);var j=a(P,2),L=r(j);t(j);var R=a(j,2),ae=r(R,!0);t(R),t(T),y(W=>{n(Q,k()),de(L,1,`h-full rounded-full transition-all duration-500
${k()==="novelty"?"bg-synapse":k()==="arousal"?"bg-dream":k()==="reward"?"bg-recall":"bg-amber-400"}`),Ke(L,`width: ${A()*100}%`),n(ae,W)},[()=>A().toFixed(2)]),p(x,T)}),t(E),p(m,E)};S(w,m=>{e(o)&&m(z)})}t(b),y(m=>{n(c,m),de(i,1,`px-2 py-1 rounded text-xs ${e(d)>.6?"bg-recall/20 text-recall border border-recall/30":"bg-surface text-dim border border-subtle/30"}`),n(g,e(d)>.6?"SAVE":"SKIP")},[()=>e(d).toFixed(2)]),p(s,b)};S(Me,s=>{e(D)&&s(Ne)})}t(be),t(Z),q("keydown",J,s=>s.key==="Enter"&&ve()),ne(J,()=>e(V),s=>f(V,s)),q("click",Fe,ve),ne(re,()=>e(H),s=>f(H,s)),q("click",_e,Se),p(he,Z),Qe()}De(["click","keydown"]);export{mt as component};

View file

@ -0,0 +1,2 @@
import{a as c,f as l}from"../chunks/wmwKEafM.js";import{i as z}from"../chunks/CtRgAcWZ.js";import{p as B,t as $,a as G,e as i,c as a,r,g as o}from"../chunks/DleE0ac1.js";import{d as K,a as Q,s as m}from"../chunks/8PSwG_AU.js";import{i as D}from"../chunks/BHs8FnOA.js";import{e as X,i as Z}from"../chunks/BsRos8Kb.js";import{s as h}from"../chunks/D6n3ggvw.js";import{s as ee,a as te}from"../chunks/M1z6VHZC.js";import{w as re,e as ae}from"../chunks/kVvujbiQ.js";import{E as x}from"../chunks/CHfZNXj4.js";var se=l('<div class="text-center py-20 text-dim"><div class="text-4xl mb-4">◉</div> <p>Waiting for cognitive events...</p> <p class="text-sm text-muted mt-2">Events appear here in real-time as Vestige thinks.</p></div>'),oe=l('<span class="text-xs text-muted"> </span>'),ie=l(`<div class="flex items-start gap-3 p-3 bg-surface/40 border border-subtle/15 rounded-lg
hover:border-subtle/30 transition-all duration-200"><div class="w-6 h-6 rounded flex items-center justify-center text-xs flex-shrink-0"> </div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-0.5"><span class="text-xs font-medium"> </span> <!></div> <p class="text-sm text-dim"> </p></div></div>`),ne=l('<div class="space-y-2"></div>'),de=l('<div class="p-6 max-w-4xl mx-auto space-y-6"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Live Feed</h1> <div class="flex gap-3"><span class="text-dim text-sm"> </span> <button class="text-xs text-muted hover:text-text transition">Clear</button></div></div> <!></div>');function ye(F,M){B(M,!1);const _=()=>te(ae,"$eventFeed",k),[k,N]=ee();function P(t){return new Date(t).toLocaleTimeString()}function E(t){return{MemoryCreated:"+",MemoryUpdated:"~",MemoryDeleted:"×",MemoryPromoted:"",MemoryDemoted:"",SearchPerformed:"",DreamStarted:"",DreamProgress:"",DreamCompleted:"",ConsolidationStarted:"",ConsolidationCompleted:"",RetentionDecayed:"",ConnectionDiscovered:"",ActivationSpread:"",ImportanceScored:"",Heartbeat:""}[t]||"·"}function T(t){const e=t.data;switch(t.type){case"MemoryCreated":return`New ${e.node_type}: "${String(e.content_preview).slice(0,60)}..."`;case"SearchPerformed":return`Searched "${e.query}" → ${e.result_count} results (${e.duration_ms}ms)`;case"DreamStarted":return`Dream started with ${e.memory_count} memories`;case"DreamCompleted":return`Dream complete: ${e.connections_found} connections, ${e.insights_generated} insights (${e.duration_ms}ms)`;case"ConsolidationStarted":return"Consolidation cycle started";case"ConsolidationCompleted":return`Consolidated ${e.nodes_processed} nodes, ${e.decay_applied} decayed (${e.duration_ms}ms)`;case"ConnectionDiscovered":return`Connection: ${String(e.connection_type)} (weight: ${Number(e.weight).toFixed(2)})`;case"ImportanceScored":return`Scored ${Number(e.composite_score).toFixed(2)}: "${String(e.content_preview).slice(0,50)}..."`;case"MemoryPromoted":return`Promoted → ${(Number(e.new_retention)*100).toFixed(0)}% retention`;case"MemoryDemoted":return`Demoted → ${(Number(e.new_retention)*100).toFixed(0)}% retention`;default:return JSON.stringify(e).slice(0,100)}}z();var f=de(),g=a(f),S=i(a(g),2),y=a(S),I=a(y);r(y);var L=i(y,2);r(S),r(g);var O=i(g,2);{var j=t=>{var e=se();c(t,e)},R=t=>{var e=ne();X(e,5,_,Z,(V,s)=>{var p=ie(),v=a(p),q=a(v,!0);r(v);var C=i(v,2),b=a(C),u=a(b),A=a(u,!0);r(u);var H=i(u,2);{var J=n=>{var d=oe(),W=a(d,!0);r(d),$(Y=>m(W,Y),[()=>P(String(o(s).data.timestamp))]),c(n,d)};D(H,n=>{o(s).data.timestamp&&n(J)})}r(b);var w=i(b,2),U=a(w,!0);r(w),r(C),r(p),$((n,d)=>{h(p,`border-left: 3px solid ${(x[o(s).type]||"#6b7280")??""}`),h(v,`background: ${(x[o(s).type]||"#6b7280")??""}20; color: ${(x[o(s).type]||"#6b7280")??""}`),m(q,n),h(u,`color: ${(x[o(s).type]||"#6b7280")??""}`),m(A,o(s).type),m(U,d)},[()=>E(o(s).type),()=>T(o(s))]),c(V,p)}),r(e),c(t,e)};D(O,t=>{_().length===0?t(j):t(R,!1)})}r(f),$(()=>m(I,`${_().length??""} events`)),Q("click",L,()=>re.clearEvents()),c(F,f),G(),N()}K(["click"]);export{ye as component};

View file

@ -0,0 +1,5 @@
import{a as h,f as w}from"../chunks/wmwKEafM.js";import{o as Ue}from"../chunks/DZf5toYK.js";import{p as we,c as a,e as r,G as ke,r as t,t as S,g as e,a as De,u as ce,s as b,d as z,f as Ve}from"../chunks/DleE0ac1.js";import{s as i,d as Ye,a as M}from"../chunks/8PSwG_AU.js";import{i as O}from"../chunks/BHs8FnOA.js";import{e as pe,i as ue}from"../chunks/BsRos8Kb.js";import{s as p,b as Ze,r as He}from"../chunks/ChQRIhGP.js";import{s as Je}from"../chunks/BK028jHP.js";import{s as Se}from"../chunks/D6n3ggvw.js";import{b as Ke}from"../chunks/DYdHPHRa.js";import{s as Oe,a as We}from"../chunks/M1z6VHZC.js";import{G as Xe}from"../chunks/CVZIBdRK.js";import{p as he}from"../chunks/D-x7U94i.js";import{a as Z}from"../chunks/BcuCGYSa.js";import{e as et}from"../chunks/kVvujbiQ.js";var tt=w('<div class="flex items-center gap-1 text-[10px]"><span class="text-muted"> </span> <span> </span></div>'),at=w('<div class="space-y-2"><svg class="w-full"><line x1="4" stroke="#2a2a5e" stroke-width="0.5" stroke-dasharray="2,4"></line><line x1="4" stroke="#ef444430" stroke-width="0.5" stroke-dasharray="2,4"></line><path fill="none" stroke="#6366f1" stroke-width="2" stroke-linecap="round"></path><path fill="url(#curveGrad)" opacity="0.15"></path><circle cx="4" r="3"></circle><defs><linearGradient id="curveGrad" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#6366f1"></stop><stop offset="100%" stop-color="#6366f100"></stop></linearGradient></defs></svg> <div class="flex gap-2 flex-wrap"></div></div>');function rt(W,f){we(f,!0);let $=he(f,"width",3,240),u=he(f,"height",3,80);function E(n){return f.stability<=0?0:Math.exp(-n/f.stability)}let x=ce(()=>()=>{const n=[],_=Math.max(f.stability*3,30),m=4,j=$()-m*2,T=u()-m*2;for(let v=0;v<=50;v++){const R=v/50*_,C=E(R),U=m+v/50*j,K=m+(1-C)*T;n.push(`${v===0?"M":"L"}${U.toFixed(1)},${K.toFixed(1)}`)}return n.join(" ")}),o=ce(()=>[{label:"Now",days:0,value:f.retention},{label:"1d",days:1,value:E(1)},{label:"7d",days:7,value:E(7)},{label:"30d",days:30,value:E(30)}]);function P(n){return n>.7?"#10b981":n>.4?"#f59e0b":"#ef4444"}var A=at(),l=a(A),k=a(l),F=r(k),G=r(F),H=r(G),J=r(H);ke(),t(l);var Q=r(l,2);pe(Q,21,()=>e(o),ue,(n,_)=>{var m=tt(),j=a(m),T=a(j);t(j);var v=r(j,2),R=a(v);t(v),t(m),S((C,U)=>{i(T,`${e(_).label??""}:`),Se(v,`color: ${C??""}`),i(R,`${U??""}%`)},[()=>P(e(_).value),()=>(e(_).value*100).toFixed(0)]),h(n,m)}),t(Q),t(A),S((n,_,m)=>{p(l,"width",$()),p(l,"height",u()),p(l,"viewBox",`0 0 ${$()??""} ${u()??""}`),p(k,"y1",4+(u()-8)*.5),p(k,"x2",$()-4),p(k,"y2",4+(u()-8)*.5),p(F,"y1",4+(u()-8)*.8),p(F,"x2",$()-4),p(F,"y2",4+(u()-8)*.8),p(G,"d",n),p(H,"d",`${_??""} L${$()-4},${u()-4} L4,${u()-4} Z`),p(J,"cy",4+(1-f.retention)*(u()-8)),p(J,"fill",m)},[()=>e(x)(),()=>e(x)(),()=>P(f.retention)]),h(W,A),De()}var st=w('<div class="h-full flex items-center justify-center"><div class="text-center space-y-4"><div class="w-16 h-16 mx-auto rounded-full border-2 border-synapse/30 border-t-synapse animate-spin"></div> <p class="text-dim text-sm">Loading memory graph...</p></div></div>'),ot=w('<div class="h-full flex items-center justify-center"><div class="text-center space-y-4 max-w-md px-8"><div class="text-5xl opacity-30">◎</div> <h2 class="text-xl text-bright">Your Mind Awaits</h2> <p class="text-dim text-sm"> </p></div></div>'),it=w('<span> </span> <span class="mx-2 text-subtle">·</span> <span> </span> <span class="mx-2 text-subtle">·</span> <span> </span>',1),nt=w('<span class="px-2 py-0.5 rounded text-xs bg-surface text-dim"> </span>'),dt=w('<div><div class="flex justify-between text-xs text-dim mb-0.5"><span> </span> <span> </span></div> <div class="h-1.5 bg-surface rounded-full overflow-hidden"><div class="h-full rounded-full transition-all duration-500"></div></div></div>'),lt=w("<div> </div>"),vt=w(`<div class="absolute right-0 top-0 h-full w-96 bg-abyss/95 backdrop-blur-xl border-l border-subtle/30 p-6 overflow-y-auto z-20
transition-transform duration-300"><div class="flex justify-between items-start mb-4"><h3 class="text-bright text-sm font-semibold">Memory Detail</h3> <button class="text-dim hover:text-text text-lg leading-none">×</button></div> <div class="space-y-4"><div class="flex gap-2 flex-wrap"><span class="px-2 py-0.5 rounded text-xs bg-synapse/20 text-synapse-glow"> </span> <!></div> <div class="text-sm text-text leading-relaxed whitespace-pre-wrap max-h-64 overflow-y-auto"> </div> <div class="space-y-2"></div> <div><div class="text-xs text-dim mb-1 font-medium">Retention Forecast</div> <!></div> <div class="text-xs text-muted space-y-1"><div> </div> <div> </div> <!> <div> </div></div> <div class="flex gap-2 pt-2"><button class="flex-1 px-3 py-2 rounded bg-recall/20 text-recall text-xs hover:bg-recall/30 transition">↑ Promote</button> <button class="flex-1 px-3 py-2 rounded bg-decay/20 text-decay text-xs hover:bg-decay/30 transition">↓ Demote</button></div> <a href="/explore" class="block text-center px-3 py-2 rounded bg-dream/10 text-dream-glow text-xs hover:bg-dream/20 transition border border-dream/20">◬ Explore Connections</a></div></div>`),ct=w(`<div class="h-full relative"><!> <div class="absolute top-4 left-4 right-4 z-10 flex items-center gap-3"><div class="flex gap-2 flex-1 max-w-md"><input type="text" placeholder="Center graph on..." class="flex-1 px-3 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-text text-sm
placeholder:text-muted focus:outline-none focus:border-synapse/50 transition"/> <button class="px-3 py-2 bg-synapse/20 border border-synapse/40 text-synapse-glow text-sm rounded-lg hover:bg-synapse/30 transition backdrop-blur-sm">Focus</button></div> <div class="flex gap-2 ml-auto"><select class="px-2 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-dim text-xs"><option>50 nodes</option><option>100 nodes</option><option>150 nodes</option><option>200 nodes</option></select> <button> </button> <button class="px-3 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-dim text-sm hover:text-text transition">↻</button></div></div> <div class="absolute bottom-4 left-4 z-10 text-xs text-dim backdrop-blur-sm bg-abyss/60 rounded-lg px-3 py-2 border border-subtle/20"><!></div> <!></div>`);function At(W,f){we(f,!0);const $=()=>We(et,"$eventFeed",u),[u,E]=Oe();let x=z(null),o=z(null),P=z(!0),A=z(""),l=z(!1),k=z(""),F=z(150);Ue(()=>G());async function G(s,d){b(P,!0),b(A,"");try{b(x,await Z.graph({max_nodes:e(F),depth:3,query:s||void 0,center_id:d||void 0}),!0)}catch{b(A,"No memories yet. Start using Vestige to populate your graph.")}finally{b(P,!1)}}async function H(){b(l,!0);try{await Z.dream(),await G()}catch{}finally{b(l,!1)}}async function J(s){try{b(o,await Z.memories.get(s),!0)}catch{b(o,null)}}function Q(){e(k).trim()&&G(e(k))}var n=ct(),_=a(n);{var m=s=>{var d=st();h(s,d)},j=s=>{var d=ot(),y=a(d),B=r(a(y),4),L=a(B,!0);t(B),t(y),t(d),S(()=>i(L,e(A))),h(s,d)},T=s=>{Xe(s,{get nodes(){return e(x).nodes},get edges(){return e(x).edges},get centerId(){return e(x).center_id},get events(){return $()},get isDreaming(){return e(l)},onSelect:J})};O(_,s=>{e(P)?s(m):e(A)?s(j,1):e(x)&&s(T,2)})}var v=r(_,2),R=a(v),C=a(R);He(C);var U=r(C,2);t(R);var K=r(R,2),V=a(K),X=a(V);X.value=X.__value=50;var ee=r(X);ee.value=ee.__value=100;var te=r(ee);te.value=te.__value=150;var xe=r(te);xe.value=xe.__value=200,t(V);var q=r(V,2),$e=a(q,!0);t(q);var Ae=r(q,2);t(K),t(v);var ae=r(v,2),Fe=a(ae);{var Ge=s=>{var d=it(),y=Ve(d),B=a(y);t(y);var L=r(y,4),Y=a(L);t(L);var I=r(L,4),re=a(I);t(I),S(()=>{i(B,`${e(x).nodeCount??""} nodes`),i(Y,`${e(x).edgeCount??""} edges`),i(re,`depth ${e(x).depth??""}`)}),h(s,d)};O(Fe,s=>{e(x)&&s(Ge)})}t(ae);var Ce=r(ae,2);{var Le=s=>{var d=vt(),y=a(d),B=r(a(y),2);t(y);var L=r(y,2),Y=a(L),I=a(Y),re=a(I,!0);t(I);var Me=r(I,2);pe(Me,17,()=>e(o).tags,ue,(g,c)=>{var D=nt(),N=a(D,!0);t(D),S(()=>i(N,e(c))),h(g,D)}),t(Y);var se=r(Y,2),je=a(se,!0);t(se);var oe=r(se,2);pe(oe,21,()=>[{label:"Retention",value:e(o).retentionStrength},{label:"Storage",value:e(o).storageStrength},{label:"Retrieval",value:e(o).retrievalStrength}],ue,(g,c)=>{var D=dt(),N=a(D),ve=a(N),Be=a(ve,!0);t(ve);var _e=r(ve,2),Ie=a(_e);t(_e),t(N);var ye=r(N,2),Qe=a(ye);t(ye),t(D),S(Te=>{i(Be,e(c).label),i(Ie,`${Te??""}%`),Se(Qe,`width: ${e(c).value*100}%; background: ${e(c).value>.7?"#10b981":e(c).value>.4?"#f59e0b":"#ef4444"}`)},[()=>(e(c).value*100).toFixed(1)]),h(g,D)}),t(oe);var ie=r(oe,2),Re=r(a(ie),2);{let g=ce(()=>e(o).storageStrength*30);rt(Re,{get retention(){return e(o).retentionStrength},get stability(){return e(g)}})}t(ie);var ne=r(ie,2),de=a(ne),Ne=a(de);t(de);var le=r(de,2),ze=a(le);t(le);var me=r(le,2);{var Ee=g=>{var c=lt(),D=a(c);t(c),S(N=>i(D,`Accessed: ${N??""}`),[()=>new Date(e(o).lastAccessedAt).toLocaleString()]),h(g,c)};O(me,g=>{e(o).lastAccessedAt&&g(Ee)})}var be=r(me,2),Pe=a(be);t(be),t(ne);var fe=r(ne,2),ge=a(fe),qe=r(ge,2);t(fe),ke(2),t(L),t(d),S((g,c)=>{i(re,e(o).nodeType),i(je,e(o).content),i(Ne,`Created: ${g??""}`),i(ze,`Updated: ${c??""}`),i(Pe,`Reviews: ${e(o).reviewCount??0??""}`)},[()=>new Date(e(o).createdAt).toLocaleString(),()=>new Date(e(o).updatedAt).toLocaleString()]),M("click",B,()=>b(o,null)),M("click",ge,()=>{e(o)&&Z.memories.promote(e(o).id)}),M("click",qe,()=>{e(o)&&Z.memories.demote(e(o).id)}),h(s,d)};O(Ce,s=>{e(o)&&s(Le)})}t(n),S(()=>{q.disabled=e(l),Je(q,1,`px-4 py-2 rounded-lg bg-dream/20 border border-dream/40 text-dream-glow text-sm
hover:bg-dream/30 transition-all backdrop-blur-sm disabled:opacity-50
${e(l)?"glow-dream animate-pulse-glow":""}`),i($e,e(l)?"◈ Dreaming...":"◈ Dream")}),M("keydown",C,s=>s.key==="Enter"&&Q()),Ze(C,()=>e(k),s=>b(k,s)),M("click",U,Q),M("change",V,()=>G()),Ke(V,()=>e(F),s=>b(F,s)),M("click",q,H),M("click",Ae,()=>G()),h(W,n),De(),E()}Ye(["keydown","click","change"]);export{At as component};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,4 @@
import{a as _,f}from"../chunks/wmwKEafM.js";import{o as qe}from"../chunks/DZf5toYK.js";import{p as Qe,d as g,h as Ye,t as D,g as e,a as ze,c as r,e as t,s as p,r as a}from"../chunks/DleE0ac1.js";import{d as Be,a as x,s as l}from"../chunks/8PSwG_AU.js";import{i as pe}from"../chunks/BHs8FnOA.js";import{e as W,i as ce}from"../chunks/BsRos8Kb.js";import{b as ue,r as _e}from"../chunks/ChQRIhGP.js";import{s as Ge}from"../chunks/BK028jHP.js";import{s as xe}from"../chunks/D6n3ggvw.js";import{b as He}from"../chunks/DYdHPHRa.js";import{a as F}from"../chunks/BcuCGYSa.js";import{N as Ie}from"../chunks/CHfZNXj4.js";var Je=f('<div class="h-24 bg-surface/50 rounded-lg animate-pulse"></div>'),Ke=f('<div class="grid gap-3"></div>'),Ue=f('<span class="text-xs px-1.5 py-0.5 bg-deep rounded text-muted"> </span>'),Ve=f('<div class="mt-4 pt-4 border-t border-subtle/20 space-y-3"><p class="text-sm text-text whitespace-pre-wrap"> </p> <div class="grid grid-cols-3 gap-3 text-xs text-dim"><div> </div> <div> </div> <div> </div></div> <div class="flex gap-2"><button class="px-3 py-1.5 bg-recall/20 text-recall text-xs rounded hover:bg-recall/30">Promote</button> <button class="px-3 py-1.5 bg-decay/20 text-decay text-xs rounded hover:bg-decay/30">Demote</button> <button class="px-3 py-1.5 bg-decay/10 text-decay/60 text-xs rounded hover:bg-decay/20 ml-auto">Delete</button></div></div>'),We=f('<button><div class="flex items-start justify-between gap-4"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-2"><span class="w-2 h-2 rounded-full"></span> <span class="text-xs text-dim"> </span> <!></div> <p class="text-sm text-text leading-relaxed line-clamp-2"> </p></div> <div class="flex flex-col items-end gap-1 flex-shrink-0"><div class="w-12 h-1.5 bg-deep rounded-full overflow-hidden"><div class="h-full rounded-full"></div></div> <span class="text-xs text-muted"> </span></div></div> <!></button>'),Xe=f('<div class="grid gap-3"></div>'),Ze=f(`<div class="p-6 max-w-6xl mx-auto space-y-6"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Memories</h1> <span class="text-dim text-sm"> </span></div> <div class="flex gap-3 flex-wrap"><input type="text" placeholder="Search memories..." class="flex-1 min-w-64 px-4 py-2.5 bg-surface border border-subtle/40 rounded-lg text-text text-sm
placeholder:text-muted focus:outline-none focus:border-synapse/60 focus:ring-1 focus:ring-synapse/30 transition"/> <select class="px-3 py-2.5 bg-surface border border-subtle/40 rounded-lg text-dim text-sm focus:outline-none"><option>All types</option><option>Fact</option><option>Concept</option><option>Event</option><option>Person</option><option>Place</option><option>Note</option><option>Pattern</option><option>Decision</option></select> <div class="flex items-center gap-2 text-xs text-dim"><span>Min retention:</span> <input type="range" min="0" max="1" step="0.1" class="w-24 accent-synapse"/> <span> </span></div></div> <!></div>`);function ct(fe,ge){Qe(ge,!0);let w=g(Ye([])),S=g(""),k=g(""),be="",b=g(0),M=g(!0),P=g(null),X;qe(()=>m());async function m(){p(M,!0);try{const o={};e(S)&&(o.q=e(S)),e(k)&&(o.node_type=e(k)),e(b)>0&&(o.min_retention=String(e(b)));const v=await F.memories.list(o);p(w,v.memories,!0)}catch{p(w,[],!0)}finally{p(M,!1)}}function me(){clearTimeout(X),X=setTimeout(m,300)}function he(o){return o>.7?"#10b981":o>.4?"#f59e0b":"#ef4444"}var C=Ze(),A=r(C),Z=t(r(A),2),ye=r(Z);a(Z),a(A);var E=t(A,2),T=r(E);_e(T);var h=t(T,2),N=r(h);N.value=N.__value="";var O=t(N);O.value=O.__value="fact";var R=t(O);R.value=R.__value="concept";var j=t(R);j.value=j.__value="event";var L=t(j);L.value=L.__value="person";var q=t(L);q.value=q.__value="place";var Q=t(q);Q.value=Q.__value="note";var Y=t(Q);Y.value=Y.__value="pattern";var ee=t(Y);ee.value=ee.__value="decision",a(h);var te=t(h,2),$=t(r(te),2);_e($);var ae=t($,2),we=r(ae);a(ae),a(te),a(E);var Se=t(E,2);{var ke=o=>{var v=Ke();W(v,20,()=>Array(8),ce,(y,s)=>{var c=Je();_(y,c)}),a(v),_(o,v)},Pe=o=>{var v=Xe();W(v,21,()=>e(w),y=>y.id,(y,s)=>{var c=We(),z=r(c),B=r(z),G=r(B),re=r(G),H=t(re,2),Te=r(H,!0);a(H);var $e=t(H,2);W($e,17,()=>e(s).tags.slice(0,3),ce,(i,n)=>{var d=Ue(),J=r(d,!0);a(d),D(()=>l(J,e(n))),_(i,d)}),a(G);var oe=t(G,2),De=r(oe,!0);a(oe),a(B);var se=t(B,2),I=r(se),Fe=r(I);a(I);var ie=t(I,2),Me=r(ie);a(ie),a(se),a(z);var Ce=t(z,2);{var Ae=i=>{var n=Ve(),d=r(n),J=r(d,!0);a(d);var K=t(d,2),U=r(K),Ee=r(U);a(U);var V=t(U,2),Ne=r(V);a(V);var ne=t(V,2),Oe=r(ne);a(ne),a(K);var de=t(K,2),le=r(de),ve=t(le,2),Re=t(ve,2);a(de),a(n),D((u,je,Le)=>{l(J,e(s).content),l(Ee,`Storage: ${u??""}%`),l(Ne,`Retrieval: ${je??""}%`),l(Oe,`Created: ${Le??""}`)},[()=>(e(s).storageStrength*100).toFixed(1),()=>(e(s).retrievalStrength*100).toFixed(1),()=>new Date(e(s).createdAt).toLocaleDateString()]),x("click",le,u=>{u.stopPropagation(),F.memories.promote(e(s).id)}),x("click",ve,u=>{u.stopPropagation(),F.memories.demote(e(s).id)}),x("click",Re,u=>{u.stopPropagation(),F.memories.delete(e(s).id),m()}),_(i,n)};pe(Ce,i=>{var n;((n=e(P))==null?void 0:n.id)===e(s).id&&i(Ae)})}a(c),D((i,n)=>{var d;Ge(c,1,`text-left p-4 bg-surface/50 border border-subtle/20 rounded-lg hover:border-synapse/30
hover:bg-surface transition-all duration-200 group
${((d=e(P))==null?void 0:d.id)===e(s).id?"border-synapse/50 glow-synapse":""}`),xe(re,`background: ${(Ie[e(s).nodeType]||"#6b7280")??""}`),l(Te,e(s).nodeType),l(De,e(s).content),xe(Fe,`width: ${e(s).retentionStrength*100}%; background: ${i??""}`),l(Me,`${n??""}%`)},[()=>he(e(s).retentionStrength),()=>(e(s).retentionStrength*100).toFixed(0)]),x("click",c,()=>{var i;return p(P,((i=e(P))==null?void 0:i.id)===e(s).id?null:e(s),!0)}),_(y,c)}),a(v),_(o,v)};pe(Se,o=>{e(M)?o(ke):o(Pe,!1)})}a(C),D(o=>{l(ye,`${e(w).length??""} results`),l(we,`${o??""}%`)},[()=>(e(b)*100).toFixed(0)]),x("input",T,me),ue(T,()=>e(S),o=>p(S,o)),x("change",h,m),He(h,()=>e(k),o=>p(k,o)),x("change",$,m),ue($,()=>e(b),o=>p(b,o)),_(fe,C),ze()}Be(["input","change","click"]);export{ct as component};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"version":"1771750550252"}

View file

@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs>
<radialGradient id="g" cx="50%" cy="50%" r="50%">
<stop offset="0%" stop-color="#a855f7"/>
<stop offset="100%" stop-color="#6366f1"/>
</radialGradient>
</defs>
<circle cx="16" cy="16" r="14" fill="#0a0a1a" stroke="url(#g)" stroke-width="1.5"/>
<!-- Neural nodes -->
<circle cx="16" cy="10" r="2.5" fill="#a855f7" opacity="0.9"/>
<circle cx="10" cy="18" r="2" fill="#6366f1" opacity="0.8"/>
<circle cx="22" cy="18" r="2" fill="#3b82f6" opacity="0.8"/>
<circle cx="16" cy="23" r="1.8" fill="#10b981" opacity="0.7"/>
<circle cx="8" cy="12" r="1.5" fill="#ec4899" opacity="0.6"/>
<circle cx="24" cy="12" r="1.5" fill="#f59e0b" opacity="0.6"/>
<!-- Connections -->
<line x1="16" y1="10" x2="10" y2="18" stroke="#6366f1" stroke-width="0.8" opacity="0.5"/>
<line x1="16" y1="10" x2="22" y2="18" stroke="#3b82f6" stroke-width="0.8" opacity="0.5"/>
<line x1="10" y1="18" x2="16" y2="23" stroke="#10b981" stroke-width="0.6" opacity="0.4"/>
<line x1="22" y1="18" x2="16" y2="23" stroke="#10b981" stroke-width="0.6" opacity="0.4"/>
<line x1="8" y1="12" x2="16" y2="10" stroke="#ec4899" stroke-width="0.5" opacity="0.3"/>
<line x1="24" y1="12" x2="16" y2="10" stroke="#f59e0b" stroke-width="0.5" opacity="0.3"/>
<line x1="10" y1="18" x2="22" y2="18" stroke="#818cf8" stroke-width="0.5" opacity="0.3"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,19 @@
{
"name": "Vestige Memory Dashboard",
"short_name": "Vestige",
"description": "Cognitive memory visualization for AI agents",
"start_url": "/",
"display": "standalone",
"background_color": "#050510",
"theme_color": "#050510",
"icons": [
{
"src": "/favicon.svg",
"sizes": "any",
"type": "image/svg+xml",
"purpose": "any maskable"
}
],
"categories": ["developer", "utilities"],
"orientation": "any"
}

View file

@ -0,0 +1 @@
export const env={}

View file

@ -0,0 +1,253 @@
{
"../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/app/server/remote/index.js": {
"file": "remote-entry.js",
"name": "remote-entry",
"src": "../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/app/server/remote/index.js",
"isEntry": true,
"imports": [
"_shared.js",
"_utils.js",
"_server.js",
"_environment.js"
]
},
"../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte": {
"file": "entries/fallbacks/error.svelte.js",
"name": "entries/fallbacks/error.svelte",
"src": "../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte",
"isEntry": true,
"imports": [
"_index.js",
"_state.svelte.js",
"_exports.js",
"_utils2.js",
"_index2.js",
"_root.js"
]
},
"../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/server/index.js": {
"file": "index.js",
"name": "index",
"src": "../../node_modules/.pnpm/@sveltejs+kit@2.53.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte@5.53.2_vite@6.4.1_@types_da6f945e4bdc5861c12f795ef3b5ca26/node_modules/@sveltejs/kit/src/runtime/server/index.js",
"isEntry": true,
"imports": [
"_utils.js",
"_server.js",
"_shared.js",
"_index.js",
"_exports.js",
"_utils2.js",
"_index2.js",
"_internal.js"
]
},
".svelte-kit/generated/server/internal.js": {
"file": "internal.js",
"name": "internal",
"src": ".svelte-kit/generated/server/internal.js",
"isEntry": true,
"imports": [
"_root.js",
"_environment.js",
"_server.js",
"_internal.js"
]
},
"_api.js": {
"file": "chunks/api.js",
"name": "api"
},
"_environment.js": {
"file": "chunks/environment.js",
"name": "environment"
},
"_exports.js": {
"file": "chunks/exports.js",
"name": "exports"
},
"_index.js": {
"file": "chunks/index.js",
"name": "index",
"imports": [
"_utils.js"
]
},
"_index2.js": {
"file": "chunks/index2.js",
"name": "index",
"imports": [
"_index.js"
]
},
"_index3.js": {
"file": "chunks/index3.js",
"name": "index"
},
"_internal.js": {
"file": "chunks/internal.js",
"name": "internal",
"imports": [
"_root.js",
"_environment.js",
"_server.js"
]
},
"_root.js": {
"file": "chunks/root.js",
"name": "root",
"imports": [
"_index.js"
]
},
"_server.js": {
"file": "chunks/server.js",
"name": "server"
},
"_shared.js": {
"file": "chunks/shared.js",
"name": "shared",
"imports": [
"_utils2.js",
"_utils.js"
]
},
"_state.svelte.js": {
"file": "chunks/state.svelte.js",
"name": "state.svelte",
"imports": [
"_index.js",
"_exports.js",
"_root.js"
]
},
"_utils.js": {
"file": "chunks/utils.js",
"name": "utils"
},
"_utils2.js": {
"file": "chunks/utils2.js",
"name": "utils"
},
"_websocket.js": {
"file": "chunks/websocket.js",
"name": "websocket",
"imports": [
"_index2.js"
]
},
"src/routes/(app)/+layout.svelte": {
"file": "entries/pages/(app)/_layout.svelte.js",
"name": "entries/pages/(app)/_layout.svelte",
"src": "src/routes/(app)/+layout.svelte",
"isEntry": true
},
"src/routes/(app)/explore/+page.svelte": {
"file": "entries/pages/(app)/explore/_page.svelte.js",
"name": "entries/pages/(app)/explore/_page.svelte",
"src": "src/routes/(app)/explore/+page.svelte",
"isEntry": true,
"imports": [
"_index.js"
]
},
"src/routes/(app)/feed/+page.svelte": {
"file": "entries/pages/(app)/feed/_page.svelte.js",
"name": "entries/pages/(app)/feed/_page.svelte",
"src": "src/routes/(app)/feed/+page.svelte",
"isEntry": true,
"imports": [
"_index.js",
"_websocket.js",
"_index3.js"
]
},
"src/routes/(app)/graph/+page.svelte": {
"file": "entries/pages/(app)/graph/_page.svelte.js",
"name": "entries/pages/(app)/graph/_page.svelte",
"src": "src/routes/(app)/graph/+page.svelte",
"isEntry": true,
"imports": [
"_index.js",
"_api.js",
"_websocket.js"
]
},
"src/routes/(app)/intentions/+page.svelte": {
"file": "entries/pages/(app)/intentions/_page.svelte.js",
"name": "entries/pages/(app)/intentions/_page.svelte",
"src": "src/routes/(app)/intentions/+page.svelte",
"isEntry": true,
"imports": [
"_index.js"
]
},
"src/routes/(app)/memories/+page.svelte": {
"file": "entries/pages/(app)/memories/_page.svelte.js",
"name": "entries/pages/(app)/memories/_page.svelte",
"src": "src/routes/(app)/memories/+page.svelte",
"isEntry": true,
"imports": [
"_index.js",
"_api.js",
"_index3.js"
]
},
"src/routes/(app)/settings/+page.svelte": {
"file": "entries/pages/(app)/settings/_page.svelte.js",
"name": "entries/pages/(app)/settings/_page.svelte",
"src": "src/routes/(app)/settings/+page.svelte",
"isEntry": true,
"imports": [
"_index.js",
"_websocket.js"
]
},
"src/routes/(app)/stats/+page.svelte": {
"file": "entries/pages/(app)/stats/_page.svelte.js",
"name": "entries/pages/(app)/stats/_page.svelte",
"src": "src/routes/(app)/stats/+page.svelte",
"isEntry": true,
"imports": [
"_index.js"
]
},
"src/routes/(app)/timeline/+page.svelte": {
"file": "entries/pages/(app)/timeline/_page.svelte.js",
"name": "entries/pages/(app)/timeline/_page.svelte",
"src": "src/routes/(app)/timeline/+page.svelte",
"isEntry": true,
"imports": [
"_index.js",
"_api.js",
"_index3.js"
]
},
"src/routes/+layout.svelte": {
"file": "entries/pages/_layout.svelte.js",
"name": "entries/pages/_layout.svelte",
"src": "src/routes/+layout.svelte",
"isEntry": true,
"imports": [
"_index.js",
"_exports.js",
"_utils2.js",
"_root.js",
"_state.svelte.js",
"_server.js",
"_websocket.js"
],
"css": [
"_app/immutable/assets/_layout.CWCL9vmt.css"
]
},
"src/routes/+page.svelte": {
"file": "entries/pages/_page.svelte.js",
"name": "entries/pages/_page.svelte",
"src": "src/routes/+page.svelte",
"isEntry": true,
"imports": [
"_index.js",
"_websocket.js"
]
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,54 @@
const BASE = "/api";
async function fetcher(path, options) {
const res = await fetch(`${BASE}${path}`, {
headers: { "Content-Type": "application/json" },
...options
});
if (!res.ok) throw new Error(`API ${res.status}: ${res.statusText}`);
return res.json();
}
const api = {
// Memories
memories: {
list: (params) => {
const qs = params ? "?" + new URLSearchParams(params).toString() : "";
return fetcher(`/memories${qs}`);
},
get: (id) => fetcher(`/memories/${id}`),
delete: (id) => fetcher(`/memories/${id}`, { method: "DELETE" }),
promote: (id) => fetcher(`/memories/${id}/promote`, { method: "POST" }),
demote: (id) => fetcher(`/memories/${id}/demote`, { method: "POST" })
},
// Search
search: (q, limit = 20) => fetcher(`/search?q=${encodeURIComponent(q)}&limit=${limit}`),
// Stats & Health
stats: () => fetcher("/stats"),
health: () => fetcher("/health"),
// Timeline
timeline: (days = 7, limit = 200) => fetcher(`/timeline?days=${days}&limit=${limit}`),
// Graph
graph: (params) => {
const qs = params ? "?" + new URLSearchParams(
Object.entries(params).filter(([, v]) => v !== void 0).map(([k, v]) => [k, String(v)])
).toString() : "";
return fetcher(`/graph${qs}`);
},
// Cognitive operations
dream: () => fetcher("/dream", { method: "POST" }),
explore: (fromId, action = "associations", toId, limit = 10) => fetcher("/explore", {
method: "POST",
body: JSON.stringify({ from_id: fromId, action, to_id: toId, limit })
}),
predict: () => fetcher("/predict", { method: "POST" }),
importance: (content) => fetcher("/importance", {
method: "POST",
body: JSON.stringify({ content })
}),
consolidate: () => fetcher("/consolidate", { method: "POST" }),
retentionDistribution: () => fetcher("/retention-distribution"),
// Intentions
intentions: (status = "active") => fetcher(`/intentions?status=${status}`)
};
export {
api as a
};

View file

@ -0,0 +1,11 @@
let prerendering = false;
function set_building() {
}
function set_prerendering() {
prerendering = true;
}
export {
set_prerendering as a,
prerendering as p,
set_building as s
};

View file

@ -0,0 +1,174 @@
const SCHEME = /^[a-z][a-z\d+\-.]+:/i;
const internal = new URL("sveltekit-internal://");
function resolve(base, path) {
if (path[0] === "/" && path[1] === "/") return path;
let url = new URL(base, internal);
url = new URL(path, url);
return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
}
function normalize_path(path, trailing_slash) {
if (path === "/" || trailing_slash === "ignore") return path;
if (trailing_slash === "never") {
return path.endsWith("/") ? path.slice(0, -1) : path;
} else if (trailing_slash === "always" && !path.endsWith("/")) {
return path + "/";
}
return path;
}
function decode_pathname(pathname) {
return pathname.split("%25").map(decodeURI).join("%25");
}
function decode_params(params) {
for (const key in params) {
params[key] = decodeURIComponent(params[key]);
}
return params;
}
function make_trackable(url, callback, search_params_callback, allow_hash = false) {
const tracked = new URL(url);
Object.defineProperty(tracked, "searchParams", {
value: new Proxy(tracked.searchParams, {
get(obj, key) {
if (key === "get" || key === "getAll" || key === "has") {
return (param, ...rest) => {
search_params_callback(param);
return obj[key](param, ...rest);
};
}
callback();
const value = Reflect.get(obj, key);
return typeof value === "function" ? value.bind(obj) : value;
}
}),
enumerable: true,
configurable: true
});
const tracked_url_properties = ["href", "pathname", "search", "toString", "toJSON"];
if (allow_hash) tracked_url_properties.push("hash");
for (const property of tracked_url_properties) {
Object.defineProperty(tracked, property, {
get() {
callback();
return url[property];
},
enumerable: true,
configurable: true
});
}
{
tracked[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(url, opts);
};
tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(url.searchParams, opts);
};
}
if (!allow_hash) {
disable_hash(tracked);
}
return tracked;
}
function disable_hash(url) {
allow_nodejs_console_log(url);
Object.defineProperty(url, "hash", {
get() {
throw new Error(
"Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead"
);
}
});
}
function disable_search(url) {
allow_nodejs_console_log(url);
for (const property of ["search", "searchParams"]) {
Object.defineProperty(url, property, {
get() {
throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
}
});
}
}
function allow_nodejs_console_log(url) {
{
url[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(new URL(url), opts);
};
}
}
function validator(expected) {
function validate(module, file) {
if (!module) return;
for (const key in module) {
if (key[0] === "_" || expected.has(key)) continue;
const values = [...expected.values()];
const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
}
}
return validate;
}
function hint_for_supported_files(key, ext = ".js") {
const supported_files = [];
if (valid_layout_exports.has(key)) {
supported_files.push(`+layout${ext}`);
}
if (valid_page_exports.has(key)) {
supported_files.push(`+page${ext}`);
}
if (valid_layout_server_exports.has(key)) {
supported_files.push(`+layout.server${ext}`);
}
if (valid_page_server_exports.has(key)) {
supported_files.push(`+page.server${ext}`);
}
if (valid_server_exports.has(key)) {
supported_files.push(`+server${ext}`);
}
if (supported_files.length > 0) {
return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
}
}
const valid_layout_exports = /* @__PURE__ */ new Set([
"load",
"prerender",
"csr",
"ssr",
"trailingSlash",
"config"
]);
const valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
const valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
const valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, "actions", "entries"]);
const valid_server_exports = /* @__PURE__ */ new Set([
"GET",
"POST",
"PATCH",
"PUT",
"DELETE",
"OPTIONS",
"HEAD",
"fallback",
"prerender",
"trailingSlash",
"config",
"entries"
]);
const validate_layout_exports = validator(valid_layout_exports);
const validate_page_exports = validator(valid_page_exports);
const validate_layout_server_exports = validator(valid_layout_server_exports);
const validate_page_server_exports = validator(valid_page_server_exports);
const validate_server_exports = validator(valid_server_exports);
export {
SCHEME as S,
decode_params as a,
validate_layout_exports as b,
validate_page_server_exports as c,
disable_search as d,
validate_page_exports as e,
decode_pathname as f,
validate_server_exports as g,
make_trackable as m,
normalize_path as n,
resolve as r,
validate_layout_server_exports as v
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,107 @@
import { n as noop, ae as safe_not_equal, af as subscribe_to_store, ag as run_all } from "./index.js";
const subscriber_queue = [];
function readable(value, start) {
return {
subscribe: writable(value, start).subscribe
};
}
function writable(value, start = noop) {
let stop = null;
const subscribers = /* @__PURE__ */ new Set();
function set(new_value) {
if (safe_not_equal(value, new_value)) {
value = new_value;
if (stop) {
const run_queue = !subscriber_queue.length;
for (const subscriber of subscribers) {
subscriber[1]();
subscriber_queue.push(subscriber, value);
}
if (run_queue) {
for (let i = 0; i < subscriber_queue.length; i += 2) {
subscriber_queue[i][0](subscriber_queue[i + 1]);
}
subscriber_queue.length = 0;
}
}
}
}
function update(fn) {
set(fn(
/** @type {T} */
value
));
}
function subscribe(run, invalidate = noop) {
const subscriber = [run, invalidate];
subscribers.add(subscriber);
if (subscribers.size === 1) {
stop = start(set, update) || noop;
}
run(
/** @type {T} */
value
);
return () => {
subscribers.delete(subscriber);
if (subscribers.size === 0 && stop) {
stop();
stop = null;
}
};
}
return { set, update, subscribe };
}
function derived(stores, fn, initial_value) {
const single = !Array.isArray(stores);
const stores_array = single ? [stores] : stores;
if (!stores_array.every(Boolean)) {
throw new Error("derived() expects stores as input, got a falsy value");
}
const auto = fn.length < 2;
return readable(initial_value, (set, update) => {
let started = false;
const values = [];
let pending = 0;
let cleanup = noop;
const sync = () => {
if (pending) {
return;
}
cleanup();
const result = fn(single ? values[0] : values, set, update);
if (auto) {
set(result);
} else {
cleanup = typeof result === "function" ? result : noop;
}
};
const unsubscribers = stores_array.map(
(store, i) => subscribe_to_store(
store,
(value) => {
values[i] = value;
pending &= ~(1 << i);
if (started) {
sync();
}
},
() => {
pending |= 1 << i;
}
)
);
started = true;
sync();
return function stop() {
run_all(unsubscribers);
cleanup();
started = false;
};
});
}
export {
derived as d,
readable as r,
writable as w
};

View file

@ -0,0 +1,35 @@
const NODE_TYPE_COLORS = {
fact: "#3b82f6",
// blue
concept: "#8b5cf6",
// purple
event: "#f59e0b",
// amber
person: "#10b981",
// emerald
place: "#06b6d4",
// cyan
note: "#6b7280",
// gray
pattern: "#ec4899",
// pink
decision: "#ef4444"
// red
};
const EVENT_TYPE_COLORS = {
MemoryCreated: "#10b981",
MemoryUpdated: "#3b82f6",
MemoryDeleted: "#ef4444",
SearchPerformed: "#6366f1",
DreamStarted: "#8b5cf6",
DreamCompleted: "#a855f7",
ConsolidationStarted: "#f59e0b",
ConsolidationCompleted: "#f97316",
ConnectionDiscovered: "#06b6d4",
ImportanceScored: "#ec4899",
Heartbeat: "#6b7280"
};
export {
EVENT_TYPE_COLORS as E,
NODE_TYPE_COLORS as N
};

View file

@ -0,0 +1,147 @@
import { r as root } from "./root.js";
import "./environment.js";
import "./server.js";
let public_env = {};
function set_private_env(environment) {
}
function set_public_env(environment) {
public_env = environment;
}
let read_implementation = null;
function set_read_implementation(fn) {
read_implementation = fn;
}
function set_manifest(_) {
}
const options = {
app_template_contains_nonce: false,
async: false,
csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } },
csrf_check_origin: true,
csrf_trusted_origins: [],
embedded: false,
env_public_prefix: "PUBLIC_",
env_private_prefix: "",
hash_routing: false,
hooks: null,
// added lazily, via `get_hooks`
preload_strategy: "modulepreload",
root,
service_worker: false,
service_worker_options: void 0,
templates: {
app: ({ head, body, assets, nonce, env }) => `<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="theme-color" content="#050510" />
<meta name="description" content="Vestige — Cognitive Memory Dashboard. 3D visualization of your AI's long-term memory." />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Vestige" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="apple-touch-icon" href="/favicon.svg" />
<link rel="manifest" href="/manifest.json" />
` + head + '\n <title>Vestige</title>\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
error: ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
<style>
body {
--bg: white;
--fg: #222;
--divider: #ccc;
background: var(--bg);
color: var(--fg);
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Open Sans',
'Helvetica Neue',
sans-serif;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
.error {
display: flex;
align-items: center;
max-width: 32rem;
margin: 0 1rem;
}
.status {
font-weight: 200;
font-size: 3rem;
line-height: 1;
position: relative;
top: -0.05rem;
}
.message {
border-left: 1px solid var(--divider);
padding: 0 0 0 1rem;
margin: 0 0 0 1rem;
min-height: 2.5rem;
display: flex;
align-items: center;
}
.message h1 {
font-weight: 400;
font-size: 1em;
margin: 0;
}
@media (prefers-color-scheme: dark) {
body {
--bg: #222;
--fg: #ddd;
--divider: #666;
}
}
</style>
</head>
<body>
<div class="error">
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
},
version_hash: "1m0l582"
};
async function get_hooks() {
let handle;
let handleFetch;
let handleError;
let handleValidationError;
let init;
let reroute;
let transport;
return {
handle,
handleFetch,
handleError,
handleValidationError,
init,
reroute,
transport
};
}
export {
set_public_env as a,
set_read_implementation as b,
set_manifest as c,
get_hooks as g,
options as o,
public_env as p,
read_implementation as r,
set_private_env as s
};

View file

@ -0,0 +1,966 @@
import { H as HYDRATION_ERROR, C as COMMENT_NODE, h as HYDRATION_END, i as HYDRATION_START, j as HYDRATION_START_ELSE, k as get_next_sibling, l as effect_tracking, m as get, r as render_effect, o as source, p as untrack, q as increment, t as queue_micro_task, v as active_effect, B as BOUNDARY_EFFECT, w as block, x as branch, y as create_text, z as Batch, A as pause_effect, D as move_effect, E as set_signal_status, F as DIRTY, G as schedule_effect, M as MAYBE_DIRTY, I as defer_effect, J as set_active_effect, K as set_active_reaction, L as set_component_context, N as handle_error, O as active_reaction, P as component_context, Q as internal_set, R as destroy_effect, S as invoke_error_boundary, T as svelte_boundary_reset_onerror, U as HYDRATION_START_FAILED, V as EFFECT_TRANSPARENT, W as EFFECT_PRESERVED, X as define_property, Y as init_operations, Z as get_first_child, _ as hydration_failed, $ as clear_text_content, a0 as component_root, a1 as array_from, a2 as is_passive_event, a3 as push, a4 as pop, a5 as set, a6 as LEGACY_PROPS, a7 as flushSync, a8 as mutable_source, a9 as render, aa as setContext, ab as derived } from "./index.js";
function hydration_mismatch(location) {
{
console.warn(`https://svelte.dev/e/hydration_mismatch`);
}
}
function svelte_boundary_reset_noop() {
{
console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
}
}
let hydrating = false;
function set_hydrating(value) {
hydrating = value;
}
let hydrate_node;
function set_hydrate_node(node) {
if (node === null) {
hydration_mismatch();
throw HYDRATION_ERROR;
}
return hydrate_node = node;
}
function hydrate_next() {
return set_hydrate_node(get_next_sibling(hydrate_node));
}
function next(count = 1) {
if (hydrating) {
var i = count;
var node = hydrate_node;
while (i--) {
node = /** @type {TemplateNode} */
get_next_sibling(node);
}
hydrate_node = node;
}
}
function skip_nodes(remove = true) {
var depth = 0;
var node = hydrate_node;
while (true) {
if (node.nodeType === COMMENT_NODE) {
var data = (
/** @type {Comment} */
node.data
);
if (data === HYDRATION_END) {
if (depth === 0) return node;
depth -= 1;
} else if (data === HYDRATION_START || data === HYDRATION_START_ELSE || // "[1", "[2", etc. for if blocks
data[0] === "[" && !isNaN(Number(data.slice(1)))) {
depth += 1;
}
}
var next2 = (
/** @type {TemplateNode} */
get_next_sibling(node)
);
if (remove) node.remove();
node = next2;
}
}
function createSubscriber(start) {
let subscribers = 0;
let version = source(0);
let stop;
return () => {
if (effect_tracking()) {
get(version);
render_effect(() => {
if (subscribers === 0) {
stop = untrack(() => start(() => increment(version)));
}
subscribers += 1;
return () => {
queue_micro_task(() => {
subscribers -= 1;
if (subscribers === 0) {
stop?.();
stop = void 0;
increment(version);
}
});
};
});
}
};
}
var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
function boundary(node, props, children, transform_error) {
new Boundary(node, props, children, transform_error);
}
class Boundary {
/** @type {Boundary | null} */
parent;
is_pending = false;
/**
* API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
* Inherited from parent boundary, or defaults to identity.
* @type {(error: unknown) => unknown}
*/
transform_error;
/** @type {TemplateNode} */
#anchor;
/** @type {TemplateNode | null} */
#hydrate_open = hydrating ? hydrate_node : null;
/** @type {BoundaryProps} */
#props;
/** @type {((anchor: Node) => void)} */
#children;
/** @type {Effect} */
#effect;
/** @type {Effect | null} */
#main_effect = null;
/** @type {Effect | null} */
#pending_effect = null;
/** @type {Effect | null} */
#failed_effect = null;
/** @type {DocumentFragment | null} */
#offscreen_fragment = null;
#local_pending_count = 0;
#pending_count = 0;
#pending_count_update_queued = false;
/** @type {Set<Effect>} */
#dirty_effects = /* @__PURE__ */ new Set();
/** @type {Set<Effect>} */
#maybe_dirty_effects = /* @__PURE__ */ new Set();
/**
* A source containing the number of pending async deriveds/expressions.
* Only created if `$effect.pending()` is used inside the boundary,
* otherwise updating the source results in needless `Batch.ensure()`
* calls followed by no-op flushes
* @type {Source<number> | null}
*/
#effect_pending = null;
#effect_pending_subscriber = createSubscriber(() => {
this.#effect_pending = source(this.#local_pending_count);
return () => {
this.#effect_pending = null;
};
});
/**
* @param {TemplateNode} node
* @param {BoundaryProps} props
* @param {((anchor: Node) => void)} children
* @param {((error: unknown) => unknown) | undefined} [transform_error]
*/
constructor(node, props, children, transform_error) {
this.#anchor = node;
this.#props = props;
this.#children = (anchor) => {
var effect = (
/** @type {Effect} */
active_effect
);
effect.b = this;
effect.f |= BOUNDARY_EFFECT;
children(anchor);
};
this.parent = /** @type {Effect} */
active_effect.b;
this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
this.#effect = block(() => {
if (hydrating) {
const comment = (
/** @type {Comment} */
this.#hydrate_open
);
hydrate_next();
const server_rendered_pending = comment.data === HYDRATION_START_ELSE;
const server_rendered_failed = comment.data.startsWith(HYDRATION_START_FAILED);
if (server_rendered_failed) {
const serialized_error = JSON.parse(comment.data.slice(HYDRATION_START_FAILED.length));
this.#hydrate_failed_content(serialized_error);
} else if (server_rendered_pending) {
this.#hydrate_pending_content();
} else {
this.#hydrate_resolved_content();
}
} else {
this.#render();
}
}, flags);
if (hydrating) {
this.#anchor = hydrate_node;
}
}
#hydrate_resolved_content() {
try {
this.#main_effect = branch(() => this.#children(this.#anchor));
} catch (error) {
this.error(error);
}
}
/**
* @param {unknown} error The deserialized error from the server's hydration comment
*/
#hydrate_failed_content(error) {
const failed = this.#props.failed;
if (!failed) return;
this.#failed_effect = branch(() => {
failed(
this.#anchor,
() => error,
() => () => {
}
);
});
}
#hydrate_pending_content() {
const pending = this.#props.pending;
if (!pending) return;
this.is_pending = true;
this.#pending_effect = branch(() => pending(this.#anchor));
queue_micro_task(() => {
var fragment = this.#offscreen_fragment = document.createDocumentFragment();
var anchor = create_text();
fragment.append(anchor);
this.#main_effect = this.#run(() => {
Batch.ensure();
return branch(() => this.#children(anchor));
});
if (this.#pending_count === 0) {
this.#anchor.before(fragment);
this.#offscreen_fragment = null;
pause_effect(
/** @type {Effect} */
this.#pending_effect,
() => {
this.#pending_effect = null;
}
);
this.#resolve();
}
});
}
#render() {
try {
this.is_pending = this.has_pending_snippet();
this.#pending_count = 0;
this.#local_pending_count = 0;
this.#main_effect = branch(() => {
this.#children(this.#anchor);
});
if (this.#pending_count > 0) {
var fragment = this.#offscreen_fragment = document.createDocumentFragment();
move_effect(this.#main_effect, fragment);
const pending = (
/** @type {(anchor: Node) => void} */
this.#props.pending
);
this.#pending_effect = branch(() => pending(this.#anchor));
} else {
this.#resolve();
}
} catch (error) {
this.error(error);
}
}
#resolve() {
this.is_pending = false;
for (const e of this.#dirty_effects) {
set_signal_status(e, DIRTY);
schedule_effect(e);
}
for (const e of this.#maybe_dirty_effects) {
set_signal_status(e, MAYBE_DIRTY);
schedule_effect(e);
}
this.#dirty_effects.clear();
this.#maybe_dirty_effects.clear();
}
/**
* Defer an effect inside a pending boundary until the boundary resolves
* @param {Effect} effect
*/
defer_effect(effect) {
defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
}
/**
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
* @returns {boolean}
*/
is_rendered() {
return !this.is_pending && (!this.parent || this.parent.is_rendered());
}
has_pending_snippet() {
return !!this.#props.pending;
}
/**
* @template T
* @param {() => T} fn
*/
#run(fn) {
var previous_effect = active_effect;
var previous_reaction = active_reaction;
var previous_ctx = component_context;
set_active_effect(this.#effect);
set_active_reaction(this.#effect);
set_component_context(this.#effect.ctx);
try {
return fn();
} catch (e) {
handle_error(e);
return null;
} finally {
set_active_effect(previous_effect);
set_active_reaction(previous_reaction);
set_component_context(previous_ctx);
}
}
/**
* Updates the pending count associated with the currently visible pending snippet,
* if any, such that we can replace the snippet with content once work is done
* @param {1 | -1} d
*/
#update_pending_count(d) {
if (!this.has_pending_snippet()) {
if (this.parent) {
this.parent.#update_pending_count(d);
}
return;
}
this.#pending_count += d;
if (this.#pending_count === 0) {
this.#resolve();
if (this.#pending_effect) {
pause_effect(this.#pending_effect, () => {
this.#pending_effect = null;
});
}
if (this.#offscreen_fragment) {
this.#anchor.before(this.#offscreen_fragment);
this.#offscreen_fragment = null;
}
}
}
/**
* Update the source that powers `$effect.pending()` inside this boundary,
* and controls when the current `pending` snippet (if any) is removed.
* Do not call from inside the class
* @param {1 | -1} d
*/
update_pending_count(d) {
this.#update_pending_count(d);
this.#local_pending_count += d;
if (!this.#effect_pending || this.#pending_count_update_queued) return;
this.#pending_count_update_queued = true;
queue_micro_task(() => {
this.#pending_count_update_queued = false;
if (this.#effect_pending) {
internal_set(this.#effect_pending, this.#local_pending_count);
}
});
}
get_effect_pending() {
this.#effect_pending_subscriber();
return get(
/** @type {Source<number>} */
this.#effect_pending
);
}
/** @param {unknown} error */
error(error) {
var onerror = this.#props.onerror;
let failed = this.#props.failed;
if (!onerror && !failed) {
throw error;
}
if (this.#main_effect) {
destroy_effect(this.#main_effect);
this.#main_effect = null;
}
if (this.#pending_effect) {
destroy_effect(this.#pending_effect);
this.#pending_effect = null;
}
if (this.#failed_effect) {
destroy_effect(this.#failed_effect);
this.#failed_effect = null;
}
if (hydrating) {
set_hydrate_node(
/** @type {TemplateNode} */
this.#hydrate_open
);
next();
set_hydrate_node(skip_nodes());
}
var did_reset = false;
var calling_on_error = false;
const reset = () => {
if (did_reset) {
svelte_boundary_reset_noop();
return;
}
did_reset = true;
if (calling_on_error) {
svelte_boundary_reset_onerror();
}
if (this.#failed_effect !== null) {
pause_effect(this.#failed_effect, () => {
this.#failed_effect = null;
});
}
this.#run(() => {
Batch.ensure();
this.#render();
});
};
const handle_error_result = (transformed_error) => {
try {
calling_on_error = true;
onerror?.(transformed_error, reset);
calling_on_error = false;
} catch (error2) {
invoke_error_boundary(error2, this.#effect && this.#effect.parent);
}
if (failed) {
this.#failed_effect = this.#run(() => {
Batch.ensure();
try {
return branch(() => {
var effect = (
/** @type {Effect} */
active_effect
);
effect.b = this;
effect.f |= BOUNDARY_EFFECT;
failed(
this.#anchor,
() => transformed_error,
() => reset
);
});
} catch (error2) {
invoke_error_boundary(
error2,
/** @type {Effect} */
this.#effect.parent
);
return null;
}
});
}
};
queue_micro_task(() => {
var result;
try {
result = this.transform_error(error);
} catch (e) {
invoke_error_boundary(e, this.#effect && this.#effect.parent);
return;
}
if (result !== null && typeof result === "object" && typeof /** @type {any} */
result.then === "function") {
result.then(
handle_error_result,
/** @param {unknown} e */
(e) => invoke_error_boundary(e, this.#effect && this.#effect.parent)
);
} else {
handle_error_result(result);
}
});
}
}
const event_symbol = Symbol("events");
const all_registered_events = /* @__PURE__ */ new Set();
const root_event_handles = /* @__PURE__ */ new Set();
let last_propagated_event = null;
function handle_event_propagation(event) {
var handler_element = this;
var owner_document = (
/** @type {Node} */
handler_element.ownerDocument
);
var event_name = event.type;
var path = event.composedPath?.() || [];
var current_target = (
/** @type {null | Element} */
path[0] || event.target
);
last_propagated_event = event;
var path_idx = 0;
var handled_at = last_propagated_event === event && event[event_symbol];
if (handled_at) {
var at_idx = path.indexOf(handled_at);
if (at_idx !== -1 && (handler_element === document || handler_element === /** @type {any} */
window)) {
event[event_symbol] = handler_element;
return;
}
var handler_idx = path.indexOf(handler_element);
if (handler_idx === -1) {
return;
}
if (at_idx <= handler_idx) {
path_idx = at_idx;
}
}
current_target = /** @type {Element} */
path[path_idx] || event.target;
if (current_target === handler_element) return;
define_property(event, "currentTarget", {
configurable: true,
get() {
return current_target || owner_document;
}
});
var previous_reaction = active_reaction;
var previous_effect = active_effect;
set_active_reaction(null);
set_active_effect(null);
try {
var throw_error;
var other_errors = [];
while (current_target !== null) {
var parent_element = current_target.assignedSlot || current_target.parentNode || /** @type {any} */
current_target.host || null;
try {
var delegated = current_target[event_symbol]?.[event_name];
if (delegated != null && (!/** @type {any} */
current_target.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
// -> the target could not have been disabled because it emits the event in the first place
event.target === current_target)) {
delegated.call(current_target, event);
}
} catch (error) {
if (throw_error) {
other_errors.push(error);
} else {
throw_error = error;
}
}
if (event.cancelBubble || parent_element === handler_element || parent_element === null) {
break;
}
current_target = parent_element;
}
if (throw_error) {
for (let error of other_errors) {
queueMicrotask(() => {
throw error;
});
}
throw throw_error;
}
} finally {
event[event_symbol] = handler_element;
delete event.currentTarget;
set_active_reaction(previous_reaction);
set_active_effect(previous_effect);
}
}
function assign_nodes(start, end) {
var effect = (
/** @type {Effect} */
active_effect
);
if (effect.nodes === null) {
effect.nodes = { start, end, a: null, t: null };
}
}
function mount(component, options) {
return _mount(component, options);
}
function hydrate(component, options) {
init_operations();
options.intro = options.intro ?? false;
const target = options.target;
const was_hydrating = hydrating;
const previous_hydrate_node = hydrate_node;
try {
var anchor = get_first_child(target);
while (anchor && (anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */
anchor.data !== HYDRATION_START)) {
anchor = get_next_sibling(anchor);
}
if (!anchor) {
throw HYDRATION_ERROR;
}
set_hydrating(true);
set_hydrate_node(
/** @type {Comment} */
anchor
);
const instance = _mount(component, { ...options, anchor });
set_hydrating(false);
return (
/** @type {Exports} */
instance
);
} catch (error) {
if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) {
throw error;
}
if (error !== HYDRATION_ERROR) {
console.warn("Failed to hydrate: ", error);
}
if (options.recover === false) {
hydration_failed();
}
init_operations();
clear_text_content(target);
set_hydrating(false);
return mount(component, options);
} finally {
set_hydrating(was_hydrating);
set_hydrate_node(previous_hydrate_node);
}
}
const listeners = /* @__PURE__ */ new Map();
function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) {
init_operations();
var component = void 0;
var unmount2 = component_root(() => {
var anchor_node = anchor ?? target.appendChild(create_text());
boundary(
/** @type {TemplateNode} */
anchor_node,
{
pending: () => {
}
},
(anchor_node2) => {
push({});
var ctx = (
/** @type {ComponentContext} */
component_context
);
if (context) ctx.c = context;
if (events) {
props.$$events = events;
}
if (hydrating) {
assign_nodes(
/** @type {TemplateNode} */
anchor_node2,
null
);
}
component = Component(anchor_node2, props) || {};
if (hydrating) {
active_effect.nodes.end = hydrate_node;
if (hydrate_node === null || hydrate_node.nodeType !== COMMENT_NODE || /** @type {Comment} */
hydrate_node.data !== HYDRATION_END) {
hydration_mismatch();
throw HYDRATION_ERROR;
}
}
pop();
},
transformError
);
var registered_events = /* @__PURE__ */ new Set();
var event_handle = (events2) => {
for (var i = 0; i < events2.length; i++) {
var event_name = events2[i];
if (registered_events.has(event_name)) continue;
registered_events.add(event_name);
var passive = is_passive_event(event_name);
for (const node of [target, document]) {
var counts = listeners.get(node);
if (counts === void 0) {
counts = /* @__PURE__ */ new Map();
listeners.set(node, counts);
}
var count = counts.get(event_name);
if (count === void 0) {
node.addEventListener(event_name, handle_event_propagation, { passive });
counts.set(event_name, 1);
} else {
counts.set(event_name, count + 1);
}
}
}
};
event_handle(array_from(all_registered_events));
root_event_handles.add(event_handle);
return () => {
for (var event_name of registered_events) {
for (const node of [target, document]) {
var counts = (
/** @type {Map<string, number>} */
listeners.get(node)
);
var count = (
/** @type {number} */
counts.get(event_name)
);
if (--count == 0) {
node.removeEventListener(event_name, handle_event_propagation);
counts.delete(event_name);
if (counts.size === 0) {
listeners.delete(node);
}
} else {
counts.set(event_name, count);
}
}
}
root_event_handles.delete(event_handle);
if (anchor_node !== anchor) {
anchor_node.parentNode?.removeChild(anchor_node);
}
};
});
mounted_components.set(component, unmount2);
return component;
}
let mounted_components = /* @__PURE__ */ new WeakMap();
function unmount(component, options) {
const fn = mounted_components.get(component);
if (fn) {
mounted_components.delete(component);
return fn(options);
}
return Promise.resolve();
}
function asClassComponent$1(component) {
return class extends Svelte4Component {
/** @param {any} options */
constructor(options) {
super({
component,
...options
});
}
};
}
class Svelte4Component {
/** @type {any} */
#events;
/** @type {Record<string, any>} */
#instance;
/**
* @param {ComponentConstructorOptions & {
* component: any;
* }} options
*/
constructor(options) {
var sources = /* @__PURE__ */ new Map();
var add_source = (key, value) => {
var s = mutable_source(value, false, false);
sources.set(key, s);
return s;
};
const props = new Proxy(
{ ...options.props || {}, $$events: {} },
{
get(target, prop) {
return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
},
has(target, prop) {
if (prop === LEGACY_PROPS) return true;
get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
return Reflect.has(target, prop);
},
set(target, prop, value) {
set(sources.get(prop) ?? add_source(prop, value), value);
return Reflect.set(target, prop, value);
}
}
);
this.#instance = (options.hydrate ? hydrate : mount)(options.component, {
target: options.target,
anchor: options.anchor,
props,
context: options.context,
intro: options.intro ?? false,
recover: options.recover,
transformError: options.transformError
});
if (!options?.props?.$$host || options.sync === false) {
flushSync();
}
this.#events = props.$$events;
for (const key of Object.keys(this.#instance)) {
if (key === "$set" || key === "$destroy" || key === "$on") continue;
define_property(this, key, {
get() {
return this.#instance[key];
},
/** @param {any} value */
set(value) {
this.#instance[key] = value;
},
enumerable: true
});
}
this.#instance.$set = /** @param {Record<string, any>} next */
(next2) => {
Object.assign(props, next2);
};
this.#instance.$destroy = () => {
unmount(this.#instance);
};
}
/** @param {Record<string, any>} props */
$set(props) {
this.#instance.$set(props);
}
/**
* @param {string} event
* @param {(...args: any[]) => any} callback
* @returns {any}
*/
$on(event, callback) {
this.#events[event] = this.#events[event] || [];
const cb = (...args) => callback.call(this, ...args);
this.#events[event].push(cb);
return () => {
this.#events[event] = this.#events[event].filter(
/** @param {any} fn */
(fn) => fn !== cb
);
};
}
$destroy() {
this.#instance.$destroy();
}
}
function asClassComponent(component) {
const component_constructor = asClassComponent$1(component);
const _render = (props, { context, csp, transformError } = {}) => {
const result = render(component, { props, context, csp, transformError });
const munged = Object.defineProperties(
/** @type {LegacyRenderResult & PromiseLike<LegacyRenderResult>} */
{},
{
css: {
value: { code: "", map: null }
},
head: {
get: () => result.head
},
html: {
get: () => result.body
},
then: {
/**
* this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
*
* @template TResult1
* @template [TResult2=never]
* @param { (value: LegacyRenderResult) => TResult1 } onfulfilled
* @param { (reason: unknown) => TResult2 } onrejected
*/
value: (onfulfilled, onrejected) => {
{
const user_result = onfulfilled({
css: munged.css,
head: munged.head,
html: munged.html
});
return Promise.resolve(user_result);
}
}
}
}
);
return munged;
};
component_constructor.render = _render;
return component_constructor;
}
function Root($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
stores,
page,
constructors,
components = [],
form,
data_0 = null,
data_1 = null,
data_2 = null
} = $$props;
{
setContext("__svelte__", stores);
}
{
stores.page.set(page);
}
const Pyramid_2 = derived(() => constructors[2]);
if (constructors[1]) {
$$renderer2.push("<!--[-->");
const Pyramid_0 = constructors[0];
if (Pyramid_0) {
$$renderer2.push("<!--[-->");
Pyramid_0($$renderer2, {
data: data_0,
form,
params: page.params,
children: ($$renderer3) => {
if (constructors[2]) {
$$renderer3.push("<!--[-->");
const Pyramid_1 = constructors[1];
if (Pyramid_1) {
$$renderer3.push("<!--[-->");
Pyramid_1($$renderer3, {
data: data_1,
form,
params: page.params,
children: ($$renderer4) => {
if (Pyramid_2()) {
$$renderer4.push("<!--[-->");
Pyramid_2()($$renderer4, { data: data_2, form, params: page.params });
$$renderer4.push("<!--]-->");
} else {
$$renderer4.push("<!--[!-->");
$$renderer4.push("<!--]-->");
}
},
$$slots: { default: true }
});
$$renderer3.push("<!--]-->");
} else {
$$renderer3.push("<!--[!-->");
$$renderer3.push("<!--]-->");
}
} else {
$$renderer3.push("<!--[!-->");
const Pyramid_1 = constructors[1];
if (Pyramid_1) {
$$renderer3.push("<!--[-->");
Pyramid_1($$renderer3, { data: data_1, form, params: page.params });
$$renderer3.push("<!--]-->");
} else {
$$renderer3.push("<!--[!-->");
$$renderer3.push("<!--]-->");
}
}
$$renderer3.push(`<!--]-->`);
},
$$slots: { default: true }
});
$$renderer2.push("<!--]-->");
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push("<!--]-->");
}
} else {
$$renderer2.push("<!--[!-->");
const Pyramid_0 = constructors[0];
if (Pyramid_0) {
$$renderer2.push("<!--[-->");
Pyramid_0($$renderer2, { data: data_0, form, params: page.params });
$$renderer2.push("<!--]-->");
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push("<!--]-->");
}
}
$$renderer2.push(`<!--]--> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]-->`);
});
}
const root = asClassComponent(Root);
export {
root as r
};

View file

@ -0,0 +1,25 @@
let base = "/dashboard";
let assets = base;
const app_dir = "_app";
const relative = true;
const initial = { base, assets };
function override(paths) {
base = paths.base;
assets = paths.assets;
}
function reset() {
base = initial.base;
assets = initial.assets;
}
function set_assets(path) {
assets = initial.assets = path;
}
export {
assets as a,
base as b,
app_dir as c,
reset as d,
override as o,
relative as r,
set_assets as s
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,17 @@
import { n as noop } from "./index.js";
import "./exports.js";
import "@sveltejs/kit/internal/server";
import "./root.js";
const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
if (is_legacy) {
({
data: {},
form: null,
error: null,
params: {},
route: { id: null },
state: {},
status: -1,
url: new URL("https://example.com")
});
}

View file

@ -0,0 +1,123 @@
const BROWSER = false;
const escaped = {
"<": "\\u003C",
"\\": "\\\\",
"\b": "\\b",
"\f": "\\f",
"\n": "\\n",
"\r": "\\r",
" ": "\\t",
"\u2028": "\\u2028",
"\u2029": "\\u2029"
};
class DevalueError extends Error {
/**
* @param {string} message
* @param {string[]} keys
* @param {any} [value] - The value that failed to be serialized
* @param {any} [root] - The root value being serialized
*/
constructor(message, keys, value, root) {
super(message);
this.name = "DevalueError";
this.path = keys.join("");
this.value = value;
this.root = root;
}
}
function is_primitive(thing) {
return Object(thing) !== thing;
}
const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(
Object.prototype
).sort().join("\0");
function is_plain_object(thing) {
const proto = Object.getPrototypeOf(thing);
return proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names;
}
function get_type(thing) {
return Object.prototype.toString.call(thing).slice(8, -1);
}
function get_escaped_char(char) {
switch (char) {
case '"':
return '\\"';
case "<":
return "\\u003C";
case "\\":
return "\\\\";
case "\n":
return "\\n";
case "\r":
return "\\r";
case " ":
return "\\t";
case "\b":
return "\\b";
case "\f":
return "\\f";
case "\u2028":
return "\\u2028";
case "\u2029":
return "\\u2029";
default:
return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
}
}
function stringify_string(str) {
let result = "";
let last_pos = 0;
const len = str.length;
for (let i = 0; i < len; i += 1) {
const char = str[i];
const replacement = get_escaped_char(char);
if (replacement) {
result += str.slice(last_pos, i) + replacement;
last_pos = i + 1;
}
}
return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`;
}
function enumerable_symbols(object) {
return Object.getOwnPropertySymbols(object).filter(
(symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable
);
}
const is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
function stringify_key(key) {
return is_identifier.test(key) ? "." + key : "[" + JSON.stringify(key) + "]";
}
function is_valid_array_index(s) {
if (s.length === 0) return false;
if (s.length > 1 && s.charCodeAt(0) === 48) return false;
for (let i = 0; i < s.length; i++) {
const c = s.charCodeAt(i);
if (c < 48 || c > 57) return false;
}
const n = +s;
if (n >= 2 ** 32 - 1) return false;
if (n < 0) return false;
return true;
}
function valid_array_indices(array) {
const keys = Object.keys(array);
for (var i = keys.length - 1; i >= 0; i--) {
if (is_valid_array_index(keys[i])) {
break;
}
}
keys.length = i + 1;
return keys;
}
export {
BROWSER as B,
DevalueError as D,
is_plain_object as a,
stringify_string as b,
escaped as c,
enumerable_symbols as e,
get_type as g,
is_primitive as i,
stringify_key as s,
valid_array_indices as v
};

View file

@ -0,0 +1,43 @@
const text_encoder = new TextEncoder();
const text_decoder = new TextDecoder();
function get_relative_path(from, to) {
const from_parts = from.split(/[/\\]/);
const to_parts = to.split(/[/\\]/);
from_parts.pop();
while (from_parts[0] === to_parts[0]) {
from_parts.shift();
to_parts.shift();
}
let i = from_parts.length;
while (i--) from_parts[i] = "..";
return from_parts.concat(to_parts).join("/");
}
function base64_encode(bytes) {
if (globalThis.Buffer) {
return globalThis.Buffer.from(bytes).toString("base64");
}
let binary = "";
for (let i = 0; i < bytes.length; i++) {
binary += String.fromCharCode(bytes[i]);
}
return btoa(binary);
}
function base64_decode(encoded) {
if (globalThis.Buffer) {
const buffer = globalThis.Buffer.from(encoded, "base64");
return new Uint8Array(buffer);
}
const binary = atob(encoded);
const bytes = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return bytes;
}
export {
text_encoder as a,
base64_encode as b,
base64_decode as c,
get_relative_path as g,
text_decoder as t
};

View file

@ -0,0 +1,85 @@
import { d as derived, w as writable } from "./index2.js";
const MAX_EVENTS = 200;
function createWebSocketStore() {
const { subscribe, set, update } = writable({
connected: false,
events: [],
lastHeartbeat: null,
error: null
});
let ws = null;
let reconnectTimer = null;
let reconnectAttempts = 0;
function connect(url) {
const wsUrl = url || (window.location.port === "5173" ? `ws://${window.location.hostname}:3927/ws` : `ws://${window.location.host}/ws`);
if (ws?.readyState === WebSocket.OPEN) return;
try {
ws = new WebSocket(wsUrl);
ws.onopen = () => {
reconnectAttempts = 0;
update((s) => ({ ...s, connected: true, error: null }));
};
ws.onmessage = (event) => {
try {
const parsed = JSON.parse(event.data);
update((s) => {
if (parsed.type === "Heartbeat") {
return { ...s, lastHeartbeat: parsed };
}
const events = [parsed, ...s.events].slice(0, MAX_EVENTS);
return { ...s, events };
});
} catch {
}
};
ws.onclose = () => {
update((s) => ({ ...s, connected: false }));
scheduleReconnect(wsUrl);
};
ws.onerror = () => {
update((s) => ({ ...s, error: "WebSocket connection failed" }));
};
} catch (e) {
update((s) => ({ ...s, error: String(e) }));
}
}
function scheduleReconnect(url) {
if (reconnectTimer) clearTimeout(reconnectTimer);
const delay = Math.min(1e3 * 2 ** reconnectAttempts, 3e4);
reconnectAttempts++;
reconnectTimer = setTimeout(() => connect(url), delay);
}
function disconnect() {
if (reconnectTimer) clearTimeout(reconnectTimer);
ws?.close();
ws = null;
set({ connected: false, events: [], lastHeartbeat: null, error: null });
}
function clearEvents() {
update((s) => ({ ...s, events: [] }));
}
return {
subscribe,
connect,
disconnect,
clearEvents
};
}
const websocket = createWebSocketStore();
const isConnected = derived(websocket, ($ws) => $ws.connected);
const eventFeed = derived(websocket, ($ws) => $ws.events);
derived(websocket, ($ws) => $ws.lastHeartbeat);
const memoryCount = derived(
websocket,
($ws) => $ws.lastHeartbeat?.data?.memory_count ?? 0
);
const avgRetention = derived(
websocket,
($ws) => $ws.lastHeartbeat?.data?.avg_retention ?? 0
);
export {
avgRetention as a,
eventFeed as e,
isConnected as i,
memoryCount as m
};

View file

@ -0,0 +1,44 @@
import { g as getContext, c as escape_html } from "../../chunks/index.js";
import "../../chunks/state.svelte.js";
import "@sveltejs/kit/internal";
import "../../chunks/exports.js";
import "../../chunks/utils2.js";
import { w as writable } from "../../chunks/index2.js";
import "@sveltejs/kit/internal/server";
import "../../chunks/root.js";
function create_updated_store() {
const { set, subscribe } = writable(false);
{
return {
subscribe,
// eslint-disable-next-line @typescript-eslint/require-await
check: async () => false
};
}
}
const stores = {
updated: /* @__PURE__ */ create_updated_store()
};
({
check: stores.updated.check
});
function context() {
return getContext("__request__");
}
const page$1 = {
get error() {
return context().page.error;
},
get status() {
return context().page.status;
}
};
const page = page$1;
function Error$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
$$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
});
}
export {
Error$1 as default
};

View file

@ -0,0 +1,8 @@
function _layout($$renderer, $$props) {
let { children } = $$props;
children($$renderer);
$$renderer.push(`<!---->`);
}
export {
_layout as default
};

View file

@ -0,0 +1,53 @@
import { e as ensure_array_like, b as attr_class, c as escape_html, a as attr, d as stringify } from "../../../../chunks/index.js";
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let searchQuery = "";
let mode = "associations";
let importanceText = "";
const MODE_INFO = {
associations: {
icon: "◎",
desc: "Spreading activation — find related memories via graph traversal"
},
chains: {
icon: "⟿",
desc: "Build reasoning path from source to target memory"
},
bridges: {
icon: "⬡",
desc: "Find connecting memories between two concepts"
}
};
$$renderer2.push(`<div class="p-6 max-w-5xl mx-auto space-y-8"><h1 class="text-xl text-bright font-semibold">Explore Connections</h1> <div class="grid grid-cols-3 gap-2"><!--[-->`);
const each_array = ensure_array_like(["associations", "chains", "bridges"]);
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
let m = each_array[$$index];
$$renderer2.push(`<button${attr_class(`flex flex-col items-center gap-1 p-3 rounded-lg text-sm transition ${stringify(mode === m ? "bg-synapse/15 text-synapse-glow border border-synapse/40" : "bg-surface/30 text-dim border border-subtle/20 hover:border-subtle/40")}`)}><span class="text-xl">${escape_html(MODE_INFO[m].icon)}</span> <span class="font-medium">${escape_html(m.charAt(0).toUpperCase() + m.slice(1))}</span> <span class="text-[10px] text-muted text-center">${escape_html(MODE_INFO[m].desc)}</span></button>`);
}
$$renderer2.push(`<!--]--></div> <div class="space-y-3"><label class="text-xs text-dim font-medium">Source Memory</label> <div class="flex gap-2"><input type="text" placeholder="Search for a memory to explore from..."${attr("value", searchQuery)} class="flex-1 px-4 py-2.5 bg-surface border border-subtle/40 rounded-lg text-text text-sm placeholder:text-muted focus:outline-none focus:border-synapse/60 transition"/> <button class="px-4 py-2.5 bg-synapse/20 border border-synapse/40 text-synapse-glow text-sm rounded-lg hover:bg-synapse/30 transition">Find</button></div></div> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--> <div class="pt-8 border-t border-subtle/20"><h2 class="text-lg text-bright font-semibold mb-4">Importance Scorer</h2> <p class="text-xs text-muted mb-3">4-channel neuroscience scoring: novelty, arousal, reward, attention</p> <textarea placeholder="Paste any text to score its importance..." class="w-full h-24 px-4 py-3 bg-surface border border-subtle/40 rounded-lg text-text text-sm placeholder:text-muted resize-none focus:outline-none focus:border-synapse/60 transition">`);
const $$body = escape_html(importanceText);
if ($$body) {
$$renderer2.push(`${$$body}`);
}
$$renderer2.push(`</textarea> <button class="mt-2 px-4 py-2 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-lg hover:bg-dream/30 transition">Score</button> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--></div></div>`);
});
}
export {
_page as default
};

View file

@ -0,0 +1,85 @@
import { c as escape_html, s as store_get, e as ensure_array_like, ac as attr_style, d as stringify, f as unsubscribe_stores } from "../../../../chunks/index.js";
import { e as eventFeed } from "../../../../chunks/websocket.js";
import { E as EVENT_TYPE_COLORS } from "../../../../chunks/index3.js";
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
var $$store_subs;
function formatTime(ts) {
return new Date(ts).toLocaleTimeString();
}
function eventIcon(type) {
const icons = {
MemoryCreated: "+",
MemoryUpdated: "~",
MemoryDeleted: "×",
MemoryPromoted: "↑",
MemoryDemoted: "↓",
SearchPerformed: "◎",
DreamStarted: "◈",
DreamProgress: "◈",
DreamCompleted: "◈",
ConsolidationStarted: "◉",
ConsolidationCompleted: "◉",
RetentionDecayed: "↘",
ConnectionDiscovered: "━",
ActivationSpread: "◬",
ImportanceScored: "◫",
Heartbeat: "♡"
};
return icons[type] || "·";
}
function eventSummary(event) {
const d = event.data;
switch (event.type) {
case "MemoryCreated":
return `New ${d.node_type}: "${String(d.content_preview).slice(0, 60)}..."`;
case "SearchPerformed":
return `Searched "${d.query}" → ${d.result_count} results (${d.duration_ms}ms)`;
case "DreamStarted":
return `Dream started with ${d.memory_count} memories`;
case "DreamCompleted":
return `Dream complete: ${d.connections_found} connections, ${d.insights_generated} insights (${d.duration_ms}ms)`;
case "ConsolidationStarted":
return "Consolidation cycle started";
case "ConsolidationCompleted":
return `Consolidated ${d.nodes_processed} nodes, ${d.decay_applied} decayed (${d.duration_ms}ms)`;
case "ConnectionDiscovered":
return `Connection: ${String(d.connection_type)} (weight: ${Number(d.weight).toFixed(2)})`;
case "ImportanceScored":
return `Scored ${Number(d.composite_score).toFixed(2)}: "${String(d.content_preview).slice(0, 50)}..."`;
case "MemoryPromoted":
return `Promoted → ${(Number(d.new_retention) * 100).toFixed(0)}% retention`;
case "MemoryDemoted":
return `Demoted → ${(Number(d.new_retention) * 100).toFixed(0)}% retention`;
default:
return JSON.stringify(d).slice(0, 100);
}
}
$$renderer2.push(`<div class="p-6 max-w-4xl mx-auto space-y-6"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Live Feed</h1> <div class="flex gap-3"><span class="text-dim text-sm">${escape_html(store_get($$store_subs ??= {}, "$eventFeed", eventFeed).length)} events</span> <button class="text-xs text-muted hover:text-text transition">Clear</button></div></div> `);
if (store_get($$store_subs ??= {}, "$eventFeed", eventFeed).length === 0) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<div class="text-center py-20 text-dim"><div class="text-4xl mb-4">◉</div> <p>Waiting for cognitive events...</p> <p class="text-sm text-muted mt-2">Events appear here in real-time as Vestige thinks.</p></div>`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<div class="space-y-2"><!--[-->`);
const each_array = ensure_array_like(store_get($$store_subs ??= {}, "$eventFeed", eventFeed));
for (let i = 0, $$length = each_array.length; i < $$length; i++) {
let event = each_array[i];
$$renderer2.push(`<div class="flex items-start gap-3 p-3 bg-surface/40 border border-subtle/15 rounded-lg hover:border-subtle/30 transition-all duration-200"${attr_style(`border-left: 3px solid ${stringify(EVENT_TYPE_COLORS[event.type] || "#6b7280")}`)}><div class="w-6 h-6 rounded flex items-center justify-center text-xs flex-shrink-0"${attr_style(`background: ${stringify(EVENT_TYPE_COLORS[event.type] || "#6b7280")}20; color: ${stringify(EVENT_TYPE_COLORS[event.type] || "#6b7280")}`)}>${escape_html(eventIcon(event.type))}</div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-0.5"><span class="text-xs font-medium"${attr_style(`color: ${stringify(EVENT_TYPE_COLORS[event.type] || "#6b7280")}`)}>${escape_html(event.type)}</span> `);
if (event.data.timestamp) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<span class="text-xs text-muted">${escape_html(formatTime(String(event.data.timestamp)))}</span>`);
} else {
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--></div> <p class="text-sm text-dim">${escape_html(eventSummary(event))}</p></div></div>`);
}
$$renderer2.push(`<!--]--></div>`);
}
$$renderer2.push(`<!--]--></div>`);
if ($$store_subs) unsubscribe_stores($$store_subs);
});
}
export {
_page as default
};

View file

@ -0,0 +1,103 @@
import { ad as ssr_context, a as attr, b as attr_class, c as escape_html, s as store_get, f as unsubscribe_stores, d as stringify } from "../../../../chunks/index.js";
import { a as api } from "../../../../chunks/api.js";
import { e as eventFeed } from "../../../../chunks/websocket.js";
function onDestroy(fn) {
/** @type {SSRContext} */
ssr_context.r.on_destroy(fn);
}
function Graph3D($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let animationId;
onDestroy(() => {
cancelAnimationFrame(animationId);
window.removeEventListener("resize", onResize);
});
function onResize() {
return;
}
$$renderer2.push(`<div class="w-full h-full"></div>`);
});
}
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
var $$store_subs;
let graphData = null;
let loading = true;
let error = "";
let isDreaming = false;
let searchQuery = "";
let maxNodes = 150;
async function loadGraph(query, centerId) {
loading = true;
error = "";
try {
graphData = await api.graph({
max_nodes: maxNodes,
depth: 3,
query: query || void 0,
center_id: centerId || void 0
});
} catch {
error = "No memories yet. Start using Vestige to populate your graph.";
} finally {
loading = false;
}
}
$$renderer2.push(`<div class="h-full relative">`);
if (loading) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<div class="h-full flex items-center justify-center"><div class="text-center space-y-4"><div class="w-16 h-16 mx-auto rounded-full border-2 border-synapse/30 border-t-synapse animate-spin"></div> <p class="text-dim text-sm">Loading memory graph...</p></div></div>`);
} else if (error) {
$$renderer2.push("<!--[1-->");
$$renderer2.push(`<div class="h-full flex items-center justify-center"><div class="text-center space-y-4 max-w-md px-8"><div class="text-5xl opacity-30">◎</div> <h2 class="text-xl text-bright">Your Mind Awaits</h2> <p class="text-dim text-sm">${escape_html(error)}</p></div></div>`);
} else if (graphData) {
$$renderer2.push("<!--[2-->");
Graph3D($$renderer2, {
nodes: graphData.nodes,
edges: graphData.edges,
centerId: graphData.center_id,
events: store_get($$store_subs ??= {}, "$eventFeed", eventFeed)
});
} else {
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--> <div class="absolute top-4 left-4 right-4 z-10 flex items-center gap-3"><div class="flex gap-2 flex-1 max-w-md"><input type="text" placeholder="Center graph on..."${attr("value", searchQuery)} class="flex-1 px-3 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-text text-sm placeholder:text-muted focus:outline-none focus:border-synapse/50 transition"/> <button class="px-3 py-2 bg-synapse/20 border border-synapse/40 text-synapse-glow text-sm rounded-lg hover:bg-synapse/30 transition backdrop-blur-sm">Focus</button></div> <div class="flex gap-2 ml-auto">`);
$$renderer2.select(
{
value: maxNodes,
onchange: () => loadGraph(),
class: "px-2 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-dim text-xs"
},
($$renderer3) => {
$$renderer3.option({ value: 50 }, ($$renderer4) => {
$$renderer4.push(`50 nodes`);
});
$$renderer3.option({ value: 100 }, ($$renderer4) => {
$$renderer4.push(`100 nodes`);
});
$$renderer3.option({ value: 150 }, ($$renderer4) => {
$$renderer4.push(`150 nodes`);
});
$$renderer3.option({ value: 200 }, ($$renderer4) => {
$$renderer4.push(`200 nodes`);
});
}
);
$$renderer2.push(` <button${attr("disabled", isDreaming, true)}${attr_class(`px-4 py-2 rounded-lg bg-dream/20 border border-dream/40 text-dream-glow text-sm hover:bg-dream/30 transition-all backdrop-blur-sm disabled:opacity-50 ${stringify("")}`)}>${escape_html("◈ Dream")}</button> <button class="px-3 py-2 bg-abyss/80 backdrop-blur-sm border border-subtle/30 rounded-lg text-dim text-sm hover:text-text transition">↻</button></div></div> <div class="absolute bottom-4 left-4 z-10 text-xs text-dim backdrop-blur-sm bg-abyss/60 rounded-lg px-3 py-2 border border-subtle/20">`);
if (graphData) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<span>${escape_html(graphData.nodeCount)} nodes</span> <span class="mx-2 text-subtle">·</span> <span>${escape_html(graphData.edgeCount)} edges</span> <span class="mx-2 text-subtle">·</span> <span>depth ${escape_html(graphData.depth)}</span>`);
} else {
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--></div> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--></div>`);
if ($$store_subs) unsubscribe_stores($$store_subs);
});
}
export {
_page as default
};

View file

@ -0,0 +1,57 @@
import { c as escape_html, e as ensure_array_like, b as attr_class, d as stringify } from "../../../../chunks/index.js";
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let intentions = [];
let predictions = [];
let statusFilter = "active";
$$renderer2.push(`<div class="p-6 max-w-5xl mx-auto space-y-8"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Intentions &amp; Predictions</h1> <span class="text-xs text-muted">${escape_html(intentions.length)} intentions</span></div> <div class="space-y-4"><div class="flex items-center gap-2"><h2 class="text-sm text-bright font-semibold">Prospective Memory</h2> <span class="text-xs text-muted">"Remember to do X when Y happens"</span></div> <div class="flex gap-1.5"><!--[-->`);
const each_array = ensure_array_like(["active", "fulfilled", "snoozed", "cancelled", "all"]);
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
let status = each_array[$$index];
$$renderer2.push(`<button${attr_class(`px-3 py-1.5 rounded-lg text-xs transition ${stringify(statusFilter === status ? "bg-synapse/20 text-synapse-glow border border-synapse/40" : "bg-surface/40 text-dim border border-subtle/20 hover:border-subtle/40")}`)}>${escape_html(status.charAt(0).toUpperCase() + status.slice(1))}</button>`);
}
$$renderer2.push(`<!--]--></div> `);
{
$$renderer2.push("<!--[-->");
$$renderer2.push(`<div class="space-y-2"><!--[-->`);
const each_array_1 = ensure_array_like(Array(4));
for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
each_array_1[$$index_1];
$$renderer2.push(`<div class="h-16 bg-surface/50 rounded-lg animate-pulse"></div>`);
}
$$renderer2.push(`<!--]--></div>`);
}
$$renderer2.push(`<!--]--></div> <div class="pt-6 border-t border-subtle/20 space-y-4"><div class="flex items-center gap-2"><h2 class="text-sm text-bright font-semibold">Predicted Needs</h2> <span class="text-xs text-muted">What you might need next</span></div> `);
if (predictions.length === 0) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<div class="text-center py-8 text-dim"><div class="text-3xl mb-3 opacity-20">◬</div> <p class="text-sm">No predictions yet. Use Vestige more to train the predictive model.</p></div>`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<div class="space-y-2"><!--[-->`);
const each_array_3 = ensure_array_like(predictions);
for (let i = 0, $$length = each_array_3.length; i < $$length; i++) {
let pred = each_array_3[i];
$$renderer2.push(`<div class="p-3 bg-surface/40 border border-subtle/20 rounded-lg flex items-start gap-3"><div class="w-6 h-6 rounded-full bg-dream/20 text-dream-glow text-xs flex items-center justify-center flex-shrink-0 mt-0.5">${escape_html(i + 1)}</div> <div class="flex-1 min-w-0"><p class="text-sm text-text line-clamp-2">${escape_html(pred.content)}</p> <div class="flex gap-3 mt-1 text-xs text-muted"><span>${escape_html(pred.nodeType)}</span> `);
if (pred.retention) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<span>${escape_html((Number(pred.retention) * 100).toFixed(0))}% retention</span>`);
} else {
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--> `);
if (pred.predictedNeed) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<span class="text-dream-glow">${escape_html(pred.predictedNeed)} need</span>`);
} else {
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--></div></div></div>`);
}
$$renderer2.push(`<!--]--></div>`);
}
$$renderer2.push(`<!--]--></div></div>`);
});
}
export {
_page as default
};

View file

@ -0,0 +1,109 @@
import { c as escape_html, a as attr, e as ensure_array_like, b as attr_class, d as stringify, ac as attr_style } from "../../../../chunks/index.js";
import { a as api } from "../../../../chunks/api.js";
import { N as NODE_TYPE_COLORS } from "../../../../chunks/index3.js";
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let memories = [];
let searchQuery = "";
let selectedType = "";
let selectedTag = "";
let minRetention = 0;
let loading = true;
let selectedMemory = null;
async function loadMemories() {
loading = true;
try {
const params = {};
if (searchQuery) ;
if (selectedType) ;
if (selectedTag) ;
if (minRetention > 0) ;
const res = await api.memories.list(params);
memories = res.memories;
} catch {
memories = [];
} finally {
loading = false;
}
}
function retentionColor(r) {
if (r > 0.7) return "#10b981";
if (r > 0.4) return "#f59e0b";
return "#ef4444";
}
$$renderer2.push(`<div class="p-6 max-w-6xl mx-auto space-y-6"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Memories</h1> <span class="text-dim text-sm">${escape_html(memories.length)} results</span></div> <div class="flex gap-3 flex-wrap"><input type="text" placeholder="Search memories..."${attr("value", searchQuery)} class="flex-1 min-w-64 px-4 py-2.5 bg-surface border border-subtle/40 rounded-lg text-text text-sm placeholder:text-muted focus:outline-none focus:border-synapse/60 focus:ring-1 focus:ring-synapse/30 transition"/> `);
$$renderer2.select(
{
value: selectedType,
onchange: loadMemories,
class: "px-3 py-2.5 bg-surface border border-subtle/40 rounded-lg text-dim text-sm focus:outline-none"
},
($$renderer3) => {
$$renderer3.option({ value: "" }, ($$renderer4) => {
$$renderer4.push(`All types`);
});
$$renderer3.option({ value: "fact" }, ($$renderer4) => {
$$renderer4.push(`Fact`);
});
$$renderer3.option({ value: "concept" }, ($$renderer4) => {
$$renderer4.push(`Concept`);
});
$$renderer3.option({ value: "event" }, ($$renderer4) => {
$$renderer4.push(`Event`);
});
$$renderer3.option({ value: "person" }, ($$renderer4) => {
$$renderer4.push(`Person`);
});
$$renderer3.option({ value: "place" }, ($$renderer4) => {
$$renderer4.push(`Place`);
});
$$renderer3.option({ value: "note" }, ($$renderer4) => {
$$renderer4.push(`Note`);
});
$$renderer3.option({ value: "pattern" }, ($$renderer4) => {
$$renderer4.push(`Pattern`);
});
$$renderer3.option({ value: "decision" }, ($$renderer4) => {
$$renderer4.push(`Decision`);
});
}
);
$$renderer2.push(` <div class="flex items-center gap-2 text-xs text-dim"><span>Min retention:</span> <input type="range" min="0" max="1" step="0.1"${attr("value", minRetention)} class="w-24 accent-synapse"/> <span>${escape_html((minRetention * 100).toFixed(0))}%</span></div></div> `);
if (loading) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<div class="grid gap-3"><!--[-->`);
const each_array = ensure_array_like(Array(8));
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
each_array[$$index];
$$renderer2.push(`<div class="h-24 bg-surface/50 rounded-lg animate-pulse"></div>`);
}
$$renderer2.push(`<!--]--></div>`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<div class="grid gap-3"><!--[-->`);
const each_array_1 = ensure_array_like(memories);
for (let $$index_2 = 0, $$length = each_array_1.length; $$index_2 < $$length; $$index_2++) {
let memory = each_array_1[$$index_2];
$$renderer2.push(`<button${attr_class(`text-left p-4 bg-surface/50 border border-subtle/20 rounded-lg hover:border-synapse/30 hover:bg-surface transition-all duration-200 group ${stringify(selectedMemory?.id === memory.id ? "border-synapse/50 glow-synapse" : "")}`)}><div class="flex items-start justify-between gap-4"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-2"><span class="w-2 h-2 rounded-full"${attr_style(`background: ${stringify(NODE_TYPE_COLORS[memory.nodeType] || "#6b7280")}`)}></span> <span class="text-xs text-dim">${escape_html(memory.nodeType)}</span> <!--[-->`);
const each_array_2 = ensure_array_like(memory.tags.slice(0, 3));
for (let $$index_1 = 0, $$length2 = each_array_2.length; $$index_1 < $$length2; $$index_1++) {
let tag = each_array_2[$$index_1];
$$renderer2.push(`<span class="text-xs px-1.5 py-0.5 bg-deep rounded text-muted">${escape_html(tag)}</span>`);
}
$$renderer2.push(`<!--]--></div> <p class="text-sm text-text leading-relaxed line-clamp-2">${escape_html(memory.content)}</p></div> <div class="flex flex-col items-end gap-1 flex-shrink-0"><div class="w-12 h-1.5 bg-deep rounded-full overflow-hidden"><div class="h-full rounded-full"${attr_style(`width: ${stringify(memory.retentionStrength * 100)}%; background: ${stringify(retentionColor(memory.retentionStrength))}`)}></div></div> <span class="text-xs text-muted">${escape_html((memory.retentionStrength * 100).toFixed(0))}%</span></div></div> `);
if (selectedMemory?.id === memory.id) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<div class="mt-4 pt-4 border-t border-subtle/20 space-y-3"><p class="text-sm text-text whitespace-pre-wrap">${escape_html(memory.content)}</p> <div class="grid grid-cols-3 gap-3 text-xs text-dim"><div>Storage: ${escape_html((memory.storageStrength * 100).toFixed(1))}%</div> <div>Retrieval: ${escape_html((memory.retrievalStrength * 100).toFixed(1))}%</div> <div>Created: ${escape_html(new Date(memory.createdAt).toLocaleDateString())}</div></div> <div class="flex gap-2"><button class="px-3 py-1.5 bg-recall/20 text-recall text-xs rounded hover:bg-recall/30">Promote</button> <button class="px-3 py-1.5 bg-decay/20 text-decay text-xs rounded hover:bg-decay/30">Demote</button> <button class="px-3 py-1.5 bg-decay/10 text-decay/60 text-xs rounded hover:bg-decay/20 ml-auto">Delete</button></div></div>`);
} else {
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--></button>`);
}
$$renderer2.push(`<!--]--></div>`);
}
$$renderer2.push(`<!--]--></div>`);
});
}
export {
_page as default
};

View file

@ -0,0 +1,51 @@
import { c as escape_html, s as store_get, ac as attr_style, d as stringify, b as attr_class, a as attr, e as ensure_array_like, f as unsubscribe_stores } from "../../../../chunks/index.js";
import { m as memoryCount, a as avgRetention, i as isConnected } from "../../../../chunks/websocket.js";
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
var $$store_subs;
let consolidating = false;
let dreaming = false;
$$renderer2.push(`<div class="p-6 max-w-4xl mx-auto space-y-8"><div class="flex items-center justify-between"><h1 class="text-xl text-bright font-semibold">Settings &amp; System</h1> <button class="text-xs text-dim hover:text-text transition">Refresh</button></div> <div class="grid grid-cols-2 md:grid-cols-4 gap-3"><div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg text-center"><div class="text-2xl text-bright font-bold">${escape_html(store_get($$store_subs ??= {}, "$memoryCount", memoryCount))}</div> <div class="text-xs text-dim mt-1">Memories</div></div> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg text-center"><div class="text-2xl font-bold"${attr_style(`color: ${stringify(store_get($$store_subs ??= {}, "$avgRetention", avgRetention) > 0.7 ? "#10b981" : store_get($$store_subs ??= {}, "$avgRetention", avgRetention) > 0.4 ? "#f59e0b" : "#ef4444")}`)}>${escape_html((store_get($$store_subs ??= {}, "$avgRetention", avgRetention) * 100).toFixed(1))}%</div> <div class="text-xs text-dim mt-1">Avg Retention</div></div> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg text-center"><div class="text-2xl text-bright font-bold flex items-center justify-center gap-2"><div${attr_class(`w-2.5 h-2.5 rounded-full ${stringify(store_get($$store_subs ??= {}, "$isConnected", isConnected) ? "bg-recall animate-pulse-glow" : "bg-decay")}`)}></div> <span class="text-sm">${escape_html(store_get($$store_subs ??= {}, "$isConnected", isConnected) ? "Online" : "Offline")}</span></div> <div class="text-xs text-dim mt-1">WebSocket</div></div> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg text-center"><div class="text-2xl text-synapse-glow font-bold">v2.0</div> <div class="text-xs text-dim mt-1">Vestige</div></div></div> <section class="space-y-4"><h2 class="text-sm text-bright font-semibold flex items-center gap-2"><span class="text-dream">◈</span> Cognitive Operations</h2> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg space-y-3"><div class="flex items-center justify-between"><div><div class="text-sm text-text font-medium">FSRS-6 Consolidation</div> <div class="text-xs text-dim">Apply spaced-repetition decay, regenerate embeddings, run maintenance</div></div> <button${attr("disabled", consolidating, true)} class="px-4 py-2 bg-warning/20 border border-warning/40 text-warning text-sm rounded-lg hover:bg-warning/30 transition disabled:opacity-50 flex items-center gap-2">`);
{
$$renderer2.push("<!--[!-->");
$$renderer2.push(`Consolidate`);
}
$$renderer2.push(`<!--]--></button></div> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--></div> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg space-y-3"><div class="flex items-center justify-between"><div><div class="text-sm text-text font-medium">Memory Dream Cycle</div> <div class="text-xs text-dim">Replay memories, discover hidden connections, synthesize insights</div></div> <button${attr("disabled", dreaming, true)}${attr_class(`px-4 py-2 bg-dream/20 border border-dream/40 text-dream-glow text-sm rounded-lg hover:bg-dream/30 transition disabled:opacity-50 flex items-center gap-2 ${stringify("")}`)}>`);
{
$$renderer2.push("<!--[!-->");
$$renderer2.push(`Dream`);
}
$$renderer2.push(`<!--]--></button></div> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--></div></section> `);
{
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--> <section class="space-y-4"><h2 class="text-sm text-bright font-semibold flex items-center gap-2"><span class="text-synapse">⌨</span> Keyboard Shortcuts</h2> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg"><div class="grid grid-cols-2 gap-2 text-xs"><!--[-->`);
const each_array_2 = ensure_array_like([
{ key: "⌘ K", desc: "Command palette" },
{ key: "/", desc: "Focus search" },
{ key: "G", desc: "Go to Graph" },
{ key: "M", desc: "Go to Memories" },
{ key: "T", desc: "Go to Timeline" },
{ key: "F", desc: "Go to Feed" },
{ key: "E", desc: "Go to Explore" },
{ key: "S", desc: "Go to Stats" }
]);
for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
let shortcut = each_array_2[$$index_2];
$$renderer2.push(`<div class="flex items-center gap-2 py-1"><kbd class="px-1.5 py-0.5 bg-deep rounded text-[10px] font-mono text-muted min-w-[2rem] text-center">${escape_html(shortcut.key)}</kbd> <span class="text-dim">${escape_html(shortcut.desc)}</span></div>`);
}
$$renderer2.push(`<!--]--></div></div></section> <section class="space-y-4"><h2 class="text-sm text-bright font-semibold flex items-center gap-2"><span class="text-memory">◎</span> About</h2> <div class="p-4 bg-surface/30 border border-subtle/20 rounded-lg space-y-3"><div class="flex items-center gap-4"><div class="w-12 h-12 rounded-xl bg-gradient-to-br from-dream to-synapse flex items-center justify-center text-bright text-xl font-bold shadow-lg shadow-synapse/20">V</div> <div><div class="text-sm text-bright font-semibold">Vestige v2.0 "Cognitive Leap"</div> <div class="text-xs text-dim">Your AI's long-term memory system</div></div></div> <div class="grid grid-cols-2 gap-2 text-xs text-dim pt-2 border-t border-subtle/10"><div>29 cognitive modules</div> <div>FSRS-6 spaced repetition</div> <div>Nomic Embed v1.5 (256d)</div> <div>Jina Reranker v1 Turbo</div> <div>USearch HNSW (20x FAISS)</div> <div>Local-first, zero cloud</div></div> <div class="text-[10px] text-muted pt-1">Built with Rust + Axum + SvelteKit 2 + Svelte 5 + Three.js + Tailwind CSS 4</div></div></section></div>`);
if ($$store_subs) unsubscribe_stores($$store_subs);
});
}
export {
_page as default
};

View file

@ -0,0 +1,20 @@
import { e as ensure_array_like } from "../../../../chunks/index.js";
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
$$renderer2.push(`<div class="p-6 max-w-5xl mx-auto space-y-6"><h1 class="text-xl text-bright font-semibold">System Stats</h1> `);
{
$$renderer2.push("<!--[-->");
$$renderer2.push(`<div class="grid grid-cols-2 lg:grid-cols-4 gap-4"><!--[-->`);
const each_array = ensure_array_like(Array(8));
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
each_array[$$index];
$$renderer2.push(`<div class="h-24 bg-surface/50 rounded-lg animate-pulse"></div>`);
}
$$renderer2.push(`<!--]--></div>`);
}
$$renderer2.push(`<!--]--></div>`);
});
}
export {
_page as default
};

Some files were not shown because too many files have changed in this diff Show more