aimeat 1.33.2 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales/en.json +388 -14
- package/dist/locales/fi.json +388 -14
- package/dist/public/cortex-bundled/aimeat-charts.js +3 -3
- package/dist/public/cortex-bundled/aimeat-charts.yaml +3 -3
- package/dist/public/cortex-bundled/aimeat-i18n.js +123 -0
- package/dist/public/cortex-bundled/aimeat-i18n.yaml +64 -0
- package/dist/public/css/views/landing.css +2 -0
- package/dist/public/css/views/secretary.css +412 -2
- package/dist/public/js/services/apps.js +4 -2
- package/dist/public/js/services/memory.js +9 -3
- package/dist/public/js/services/offers.js +1 -1
- package/dist/public/js/services/organisms.js +49 -17
- package/dist/public/js/services/secretary-helpers.js +262 -17
- package/dist/public/js/services/secretary-policy.js +1 -0
- package/dist/public/js/services/secretary-rules.js +70 -0
- package/dist/public/js/theme.js +20 -0
- package/dist/public/lib/VENDORED-STYLING.md +31 -0
- package/dist/public/lib/aimeat-daisyui-bridge.css +48 -0
- package/dist/public/lib/chartjs@4.js +14 -0
- package/dist/public/lib/daisyui@5.css +7 -0
- package/dist/public/lib/tailwindcss@4.js +8 -0
- package/dist/public/llms-template.txt +9 -6
- package/dist/public/showroom.html +104 -0
- package/dist/public/showroom.js +247 -0
- package/dist/public/spa.html +18 -16
- package/dist/public/views/aimeat-os.js +3 -2
- package/dist/public/views/landing.js +50 -6
- package/dist/public/views/profile/agents/agent-card.js +7 -0
- package/dist/public/views/profile/agents/state-detector.js +6 -0
- package/dist/public/views/profile/agents/tab-integration.js +6 -0
- package/dist/public/views/profile/apps-tab.js +46 -0
- package/dist/public/views/profile/extensions-tab.js +4 -0
- package/dist/public/views/profile/inbox-tab.js +1 -1
- package/dist/public/views/profile/landing-page.js +8 -3
- package/dist/public/views/profile/memory-tab.js +37 -6
- package/dist/public/views/profile/organisms/home.js +32 -0
- package/dist/public/views/profile/organisms/workspace-list.js +36 -5
- package/dist/public/views/profile/organisms/workspace.js +29 -4
- package/dist/public/views/profile/organisms-tab.js +61 -8
- package/dist/public/views/secretary/calendar.js +327 -0
- package/dist/public/views/secretary/cards-reach.js +16 -17
- package/dist/public/views/secretary/cards.js +173 -66
- package/dist/public/views/secretary/dashboard.js +551 -0
- package/dist/public/views/secretary/quality.js +156 -0
- package/dist/public/views/secretary/use-autonomy.js +17 -2
- package/dist/public/views/secretary/use-freshness.js +50 -0
- package/dist/public/views/secretary/use-intake.js +23 -4
- package/dist/public/views/secretary/use-layout.js +122 -0
- package/dist/public/views/secretary/use-quick-actions.js +98 -0
- package/dist/public/views/secretary/use-specialists.js +103 -0
- package/dist/public/views/secretary/use-triggers.js +159 -0
- package/dist/public/views/secretary/use-whats-next.js +340 -0
- package/dist/public/views/secretary/workflow-design.js +112 -0
- package/dist/public/views/secretary.js +663 -39
- package/dist/scripts/check-no-max-tokens.d.ts +2 -0
- package/dist/scripts/check-no-max-tokens.d.ts.map +1 -0
- package/dist/scripts/check-no-max-tokens.js +71 -0
- package/dist/scripts/check-no-max-tokens.js.map +1 -0
- package/dist/src/data/aimeat-iam-package.d.ts +25 -0
- package/dist/src/data/aimeat-iam-package.d.ts.map +1 -0
- package/dist/src/data/aimeat-iam-package.js +312 -0
- package/dist/src/data/aimeat-iam-package.js.map +1 -0
- package/dist/src/data/aimeat-marketplace-package.d.ts +25 -0
- package/dist/src/data/aimeat-marketplace-package.d.ts.map +1 -0
- package/dist/src/data/aimeat-marketplace-package.js +231 -0
- package/dist/src/data/aimeat-marketplace-package.js.map +1 -0
- package/dist/src/data/app-templates.d.ts +48 -0
- package/dist/src/data/app-templates.d.ts.map +1 -0
- package/dist/src/data/app-templates.js +856 -0
- package/dist/src/data/app-templates.js.map +1 -0
- package/dist/src/data/example-packages.d.ts.map +1 -1
- package/dist/src/data/example-packages.js +3 -1
- package/dist/src/data/example-packages.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +380 -5
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/generated/prisma-postgres/edge.js +10 -3
- package/dist/src/generated/prisma-postgres/index-browser.js +7 -0
- package/dist/src/generated/prisma-postgres/index.d.ts +205 -2
- package/dist/src/generated/prisma-postgres/index.js +10 -3
- package/dist/src/generated/prisma-postgres/package.json +1 -1
- package/dist/src/generated/prisma-postgres/schema.prisma +23 -13
- package/dist/src/generated/prisma-postgres/wasm.js +10 -3
- package/dist/src/mcp/annotations.d.ts.map +1 -1
- package/dist/src/mcp/annotations.js +1 -0
- package/dist/src/mcp/annotations.js.map +1 -1
- package/dist/src/mcp/catalog/definitions.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions.js +16 -1
- package/dist/src/mcp/catalog/definitions.js.map +1 -1
- package/dist/src/mcp/catalog/surfaces.js +3 -3
- package/dist/src/mcp/catalog/surfaces.js.map +1 -1
- package/dist/src/mcp/index.d.ts +3 -0
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +11 -0
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/organisms.d.ts.map +1 -1
- package/dist/src/mcp/organisms.js +48 -8
- package/dist/src/mcp/organisms.js.map +1 -1
- package/dist/src/mcp/workspaces.d.ts.map +1 -1
- package/dist/src/mcp/workspaces.js +6 -4
- package/dist/src/mcp/workspaces.js.map +1 -1
- package/dist/src/models/offer-schemas.d.ts +8 -8
- package/dist/src/routes/ai.d.ts +8 -4
- package/dist/src/routes/ai.d.ts.map +1 -1
- package/dist/src/routes/ai.js +38 -14
- package/dist/src/routes/ai.js.map +1 -1
- package/dist/src/routes/app-grants.d.ts +2 -0
- package/dist/src/routes/app-grants.d.ts.map +1 -1
- package/dist/src/routes/app-grants.js +7 -1
- package/dist/src/routes/app-grants.js.map +1 -1
- package/dist/src/routes/app-templates.d.ts +16 -0
- package/dist/src/routes/app-templates.d.ts.map +1 -0
- package/dist/src/routes/app-templates.js +40 -0
- package/dist/src/routes/app-templates.js.map +1 -0
- package/dist/src/routes/apps.d.ts.map +1 -1
- package/dist/src/routes/apps.js +55 -5
- package/dist/src/routes/apps.js.map +1 -1
- package/dist/src/routes/auth.d.ts +3 -0
- package/dist/src/routes/auth.d.ts.map +1 -1
- package/dist/src/routes/auth.js +9 -4
- package/dist/src/routes/auth.js.map +1 -1
- package/dist/src/routes/bootstrap.d.ts.map +1 -1
- package/dist/src/routes/bootstrap.js +1 -0
- package/dist/src/routes/bootstrap.js.map +1 -1
- package/dist/src/routes/generator.d.ts.map +1 -1
- package/dist/src/routes/generator.js +3 -2
- package/dist/src/routes/generator.js.map +1 -1
- package/dist/src/routes/lib-ai.d.ts +0 -1
- package/dist/src/routes/lib-ai.d.ts.map +1 -1
- package/dist/src/routes/lib-ai.js +13 -6
- package/dist/src/routes/lib-ai.js.map +1 -1
- package/dist/src/routes/lib-header.d.ts +2 -0
- package/dist/src/routes/lib-header.d.ts.map +1 -1
- package/dist/src/routes/lib-header.js +7 -16
- package/dist/src/routes/lib-header.js.map +1 -1
- package/dist/src/routes/lib-markdown.d.ts +18 -0
- package/dist/src/routes/lib-markdown.d.ts.map +1 -0
- package/dist/src/routes/lib-markdown.js +236 -0
- package/dist/src/routes/lib-markdown.js.map +1 -0
- package/dist/src/routes/libs.d.ts +22 -0
- package/dist/src/routes/libs.d.ts.map +1 -1
- package/dist/src/routes/libs.js +133 -10
- package/dist/src/routes/libs.js.map +1 -1
- package/dist/src/routes/memory.d.ts.map +1 -1
- package/dist/src/routes/memory.js +21 -2
- package/dist/src/routes/memory.js.map +1 -1
- package/dist/src/routes/openrouter.d.ts +4 -0
- package/dist/src/routes/openrouter.d.ts.map +1 -1
- package/dist/src/routes/openrouter.js +17 -0
- package/dist/src/routes/openrouter.js.map +1 -1
- package/dist/src/routes/organisms.d.ts.map +1 -1
- package/dist/src/routes/organisms.js +107 -7
- package/dist/src/routes/organisms.js.map +1 -1
- package/dist/src/routes/portal.d.ts +9 -0
- package/dist/src/routes/portal.d.ts.map +1 -1
- package/dist/src/routes/portal.js +1 -1
- package/dist/src/routes/portal.js.map +1 -1
- package/dist/src/routes/public-stats.d.ts +3 -0
- package/dist/src/routes/public-stats.d.ts.map +1 -1
- package/dist/src/routes/public-stats.js +9 -2
- package/dist/src/routes/public-stats.js.map +1 -1
- package/dist/src/routes/secretary.d.ts +29 -0
- package/dist/src/routes/secretary.d.ts.map +1 -0
- package/dist/src/routes/secretary.js +220 -0
- package/dist/src/routes/secretary.js.map +1 -0
- package/dist/src/routes/specialists.d.ts.map +1 -1
- package/dist/src/routes/specialists.js +21 -0
- package/dist/src/routes/specialists.js.map +1 -1
- package/dist/src/routes/subdomains.js +1 -1
- package/dist/src/routes/subdomains.js.map +1 -1
- package/dist/src/routes/workflows.d.ts +9 -3
- package/dist/src/routes/workflows.d.ts.map +1 -1
- package/dist/src/routes/workflows.js +9 -3
- package/dist/src/routes/workflows.js.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.js +4 -0
- package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
- package/dist/src/server-bootstrap/service-init.d.ts.map +1 -1
- package/dist/src/server-bootstrap/service-init.js +7 -0
- package/dist/src/server-bootstrap/service-init.js.map +1 -1
- package/dist/src/server-bootstrap/static-files.d.ts +4 -0
- package/dist/src/server-bootstrap/static-files.d.ts.map +1 -1
- package/dist/src/server-bootstrap/static-files.js +18 -0
- package/dist/src/server-bootstrap/static-files.js.map +1 -1
- package/dist/src/services/archive.d.ts +74 -0
- package/dist/src/services/archive.d.ts.map +1 -0
- package/dist/src/services/archive.js +132 -0
- package/dist/src/services/archive.js.map +1 -0
- package/dist/src/services/cortex-seeder.d.ts +4 -1
- package/dist/src/services/cortex-seeder.d.ts.map +1 -1
- package/dist/src/services/cortex-seeder.js +25 -6
- package/dist/src/services/cortex-seeder.js.map +1 -1
- package/dist/src/services/directory.d.ts.map +1 -1
- package/dist/src/services/directory.js +3 -2
- package/dist/src/services/directory.js.map +1 -1
- package/dist/src/services/generator-prompt-seeds.d.ts.map +1 -1
- package/dist/src/services/generator-prompt-seeds.js +5 -4
- package/dist/src/services/generator-prompt-seeds.js.map +1 -1
- package/dist/src/services/message-send.d.ts.map +1 -1
- package/dist/src/services/message-send.js +14 -0
- package/dist/src/services/message-send.js.map +1 -1
- package/dist/src/services/organism-search.d.ts +6 -2
- package/dist/src/services/organism-search.d.ts.map +1 -1
- package/dist/src/services/organism-search.js +2 -2
- package/dist/src/services/organism-search.js.map +1 -1
- package/dist/src/services/owner-memory.d.ts +1 -0
- package/dist/src/services/owner-memory.d.ts.map +1 -1
- package/dist/src/services/owner-memory.js.map +1 -1
- package/dist/src/services/owner-session.d.ts +1 -0
- package/dist/src/services/owner-session.d.ts.map +1 -1
- package/dist/src/services/owner-session.js +10 -2
- package/dist/src/services/owner-session.js.map +1 -1
- package/dist/src/services/package-seeder.d.ts +22 -0
- package/dist/src/services/package-seeder.d.ts.map +1 -0
- package/dist/src/services/package-seeder.js +30 -0
- package/dist/src/services/package-seeder.js.map +1 -0
- package/dist/src/services/presence.d.ts +3 -0
- package/dist/src/services/presence.d.ts.map +1 -1
- package/dist/src/services/presence.js +10 -0
- package/dist/src/services/presence.js.map +1 -1
- package/dist/src/services/prompt-defaults.d.ts.map +1 -1
- package/dist/src/services/prompt-defaults.js +8 -3
- package/dist/src/services/prompt-defaults.js.map +1 -1
- package/dist/src/services/scheduler.d.ts +41 -2
- package/dist/src/services/scheduler.d.ts.map +1 -1
- package/dist/src/services/scheduler.js +429 -26
- package/dist/src/services/scheduler.js.map +1 -1
- package/dist/src/services/secretary-authoring.d.ts +71 -0
- package/dist/src/services/secretary-authoring.d.ts.map +1 -0
- package/dist/src/services/secretary-authoring.js +336 -0
- package/dist/src/services/secretary-authoring.js.map +1 -0
- package/dist/src/services/secretary-clarify.d.ts +57 -0
- package/dist/src/services/secretary-clarify.d.ts.map +1 -0
- package/dist/src/services/secretary-clarify.js +104 -0
- package/dist/src/services/secretary-clarify.js.map +1 -0
- package/dist/src/services/secretary-feed.d.ts +11 -0
- package/dist/src/services/secretary-feed.d.ts.map +1 -0
- package/dist/src/services/secretary-feed.js +28 -0
- package/dist/src/services/secretary-feed.js.map +1 -0
- package/dist/src/services/secretary-tick.d.ts +243 -3
- package/dist/src/services/secretary-tick.d.ts.map +1 -1
- package/dist/src/services/secretary-tick.js +273 -3
- package/dist/src/services/secretary-tick.js.map +1 -1
- package/dist/src/services/specialist-runner.d.ts +36 -0
- package/dist/src/services/specialist-runner.d.ts.map +1 -0
- package/dist/src/services/specialist-runner.js +91 -0
- package/dist/src/services/specialist-runner.js.map +1 -0
- package/dist/src/services/specialist.d.ts +9 -0
- package/dist/src/services/specialist.d.ts.map +1 -1
- package/dist/src/services/specialist.js +42 -0
- package/dist/src/services/specialist.js.map +1 -1
- package/dist/src/services/structure-overview.d.ts +13 -0
- package/dist/src/services/structure-overview.d.ts.map +1 -1
- package/dist/src/services/structure-overview.js +34 -11
- package/dist/src/services/structure-overview.js.map +1 -1
- package/dist/src/services/system-agent-responder.d.ts +36 -0
- package/dist/src/services/system-agent-responder.d.ts.map +1 -0
- package/dist/src/services/system-agent-responder.js +107 -0
- package/dist/src/services/system-agent-responder.js.map +1 -0
- package/dist/src/services/system-agent.d.ts +34 -1
- package/dist/src/services/system-agent.d.ts.map +1 -1
- package/dist/src/services/system-agent.js +73 -0
- package/dist/src/services/system-agent.js.map +1 -1
- package/dist/src/storage/interface.d.ts +33 -0
- package/dist/src/storage/interface.d.ts.map +1 -1
- package/dist/src/storage/interface.js.map +1 -1
- package/dist/src/storage/providers/mongodb/index.d.ts +37 -0
- package/dist/src/storage/providers/mongodb/index.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/index.js +132 -12
- package/dist/src/storage/providers/mongodb/index.js.map +1 -1
- package/dist/src/storage/providers/sqlite/index.d.ts +23 -1
- package/dist/src/storage/providers/sqlite/index.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/index.js +60 -8
- package/dist/src/storage/providers/sqlite/index.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/memory.d.ts +29 -1
- package/dist/src/storage/providers/sqlite/repos/memory.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/memory.js +109 -10
- package/dist/src/storage/providers/sqlite/repos/memory.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts +3 -0
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +64 -9
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/dist/src/storage/repositories/app.repository.d.ts +15 -0
- package/dist/src/storage/repositories/app.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/memory.repository.d.ts +41 -1
- package/dist/src/storage/repositories/memory.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/organism.repository.d.ts +2 -1
- package/dist/src/storage/repositories/organism.repository.d.ts.map +1 -1
- package/dist/static/app-catalog.html +469 -122
- package/package.json +2 -1
- package/prisma/schema.postgres.prisma +10 -0
- package/prisma/schema.prisma +12 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
export function aimeatMarkdownLib(config) {
|
|
2
|
+
return `// aimeat-markdown.js — AIMEAT Markdown renderer (safe GFM subset, no dependencies)
|
|
3
|
+
// Node: ${config.nodeId} | Generated: ${new Date().toISOString()}
|
|
4
|
+
// Usage: AIMEAT.md.render(markdownString, '#target') -> renders into #target (and returns the node)
|
|
5
|
+
(function (global) {
|
|
6
|
+
'use strict';
|
|
7
|
+
var BT = String.fromCharCode(96); // backtick, kept out of this template literal
|
|
8
|
+
var SAFE = /^(https?:|mailto:)/i;
|
|
9
|
+
var SAFE_IMG = /^(https?:|blob:)/i;
|
|
10
|
+
|
|
11
|
+
function sanitizeHref(url) {
|
|
12
|
+
if (typeof url !== 'string') return null;
|
|
13
|
+
var t = url.trim();
|
|
14
|
+
if (!/^[a-z][a-z0-9+.-]*:/i.test(t)) return t; // relative / fragment links are safe
|
|
15
|
+
return SAFE.test(t) ? t : null;
|
|
16
|
+
}
|
|
17
|
+
function sanitizeImgSrc(url) {
|
|
18
|
+
if (typeof url !== 'string') return null;
|
|
19
|
+
var t = url.trim();
|
|
20
|
+
if (!/^[a-z][a-z0-9+.-]*:/i.test(t)) return t; // relative (e.g. /v1/pub/…)
|
|
21
|
+
return SAFE_IMG.test(t) ? t : null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function txt(s) { return document.createTextNode(s == null ? '' : String(s)); }
|
|
25
|
+
function append(node, kids) {
|
|
26
|
+
if (kids == null) return;
|
|
27
|
+
if (!Array.isArray(kids)) kids = [kids];
|
|
28
|
+
for (var i = 0; i < kids.length; i++) {
|
|
29
|
+
var c = kids[i];
|
|
30
|
+
if (c == null) continue;
|
|
31
|
+
node.appendChild(typeof c === 'string' ? txt(c) : c);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function el(tag, attrs, kids) {
|
|
35
|
+
var n = document.createElement(tag);
|
|
36
|
+
if (attrs) for (var k in attrs) { if (attrs[k] != null) n.setAttribute(k, attrs[k]); }
|
|
37
|
+
append(n, kids);
|
|
38
|
+
return n;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ── Inline parsing: image, code, link, bold, italic. Returns an array of (string | Node).
|
|
42
|
+
function parseInline(text) {
|
|
43
|
+
var out = [], i = 0, buf = '';
|
|
44
|
+
function flush() { if (buf) { out.push(buf); buf = ''; } }
|
|
45
|
+
while (i < text.length) {
|
|
46
|
+
var c = text[i];
|
|
47
|
+
// Image 
|
|
48
|
+
if (c === '!' && text[i + 1] === '[') {
|
|
49
|
+
var close = text.indexOf(']', i + 2);
|
|
50
|
+
if (close > i && text[close + 1] === '(') {
|
|
51
|
+
var paren = text.indexOf(')', close + 2);
|
|
52
|
+
if (paren > close) {
|
|
53
|
+
var src = sanitizeImgSrc(text.slice(close + 2, paren));
|
|
54
|
+
flush();
|
|
55
|
+
if (src) out.push(el('img', { src: src, alt: text.slice(i + 2, close), 'class': 'md-img', loading: 'lazy' }));
|
|
56
|
+
i = paren + 1; continue;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Inline code
|
|
61
|
+
if (c === BT) {
|
|
62
|
+
var endc = text.indexOf(BT, i + 1);
|
|
63
|
+
if (endc > i) { flush(); out.push(el('code', { 'class': 'md-code' }, text.slice(i + 1, endc))); i = endc + 1; continue; }
|
|
64
|
+
}
|
|
65
|
+
// Link [label](url)
|
|
66
|
+
if (c === '[') {
|
|
67
|
+
var lc = text.indexOf(']', i + 1);
|
|
68
|
+
if (lc > i && text[lc + 1] === '(') {
|
|
69
|
+
var lp = text.indexOf(')', lc + 2);
|
|
70
|
+
if (lp > lc) {
|
|
71
|
+
var href = sanitizeHref(text.slice(lc + 2, lp));
|
|
72
|
+
var label = parseInline(text.slice(i + 1, lc));
|
|
73
|
+
flush();
|
|
74
|
+
out.push(href
|
|
75
|
+
? el('a', { href: href, target: '_blank', rel: 'noopener noreferrer nofollow' }, label)
|
|
76
|
+
: el('span', null, label));
|
|
77
|
+
i = lp + 1; continue;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// Bold **...**
|
|
82
|
+
if (c === '*' && text[i + 1] === '*') {
|
|
83
|
+
var be = text.indexOf('**', i + 2);
|
|
84
|
+
if (be > i) { flush(); out.push(el('strong', null, parseInline(text.slice(i + 2, be)))); i = be + 2; continue; }
|
|
85
|
+
}
|
|
86
|
+
// Italic *...*
|
|
87
|
+
if (c === '*') {
|
|
88
|
+
var ie = text.indexOf('*', i + 1);
|
|
89
|
+
if (ie > i) { flush(); out.push(el('em', null, parseInline(text.slice(i + 1, ie)))); i = ie + 1; continue; }
|
|
90
|
+
}
|
|
91
|
+
// Italic _..._ at word boundaries (so snake_case stays literal)
|
|
92
|
+
if (c === '_' && (i === 0 || !/\\w/.test(text[i - 1])) && text[i + 1] && text[i + 1] !== ' ') {
|
|
93
|
+
var j = i + 1;
|
|
94
|
+
while ((j = text.indexOf('_', j)) >= 0) {
|
|
95
|
+
var after = text[j + 1];
|
|
96
|
+
if (text[j - 1] !== ' ' && (after === undefined || !/\\w/.test(after))) break;
|
|
97
|
+
j++;
|
|
98
|
+
}
|
|
99
|
+
if (j >= 0) { flush(); out.push(el('em', null, parseInline(text.slice(i + 1, j)))); i = j + 1; continue; }
|
|
100
|
+
}
|
|
101
|
+
buf += c; i++;
|
|
102
|
+
}
|
|
103
|
+
flush();
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function tableRow(line) {
|
|
108
|
+
var cells = line.trim().split('|');
|
|
109
|
+
if (cells.length && cells[0] === '') cells = cells.slice(1);
|
|
110
|
+
if (cells.length && cells[cells.length - 1] === '') cells = cells.slice(0, -1);
|
|
111
|
+
return cells.map(function (c) { return c.trim(); });
|
|
112
|
+
}
|
|
113
|
+
function isDivider(line) { return /^\\s*\\|?\\s*:?-{3,}:?\\s*(\\|\\s*:?-{3,}:?\\s*)*\\|?\\s*$/.test(line); }
|
|
114
|
+
function fenceInfo(line) {
|
|
115
|
+
var t = line.replace(/^\\s+/, ''), ch = t.charAt(0);
|
|
116
|
+
if ((ch === BT || ch === '~') && t.slice(0, 3) === ch + ch + ch) return { marker: ch, lang: t.slice(3).trim().toLowerCase() };
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
function isFenceLine(line) { return fenceInfo(line) !== null; }
|
|
120
|
+
function isHeading(line) { return /^#{1,6}\\s/.test(line); }
|
|
121
|
+
function isQuote(line) { return /^\\s*>/.test(line); }
|
|
122
|
+
function isHr(line) { return /^\\s*([-*_])\\1{2,}\\s*$/.test(line); }
|
|
123
|
+
function isUl(line) { return /^(\\s*)([-*+])\\s+/.test(line); }
|
|
124
|
+
function isOl(line) { return /^(\\s*)(\\d+)\\.\\s+/.test(line); }
|
|
125
|
+
function isBlockStart(line) { return isFenceLine(line) || isHeading(line) || isQuote(line) || isUl(line) || isOl(line); }
|
|
126
|
+
|
|
127
|
+
function parseBlocks(src) {
|
|
128
|
+
var lines = src.replace(/\\r\\n?/g, '\\n').split('\\n');
|
|
129
|
+
var blocks = [], i = 0;
|
|
130
|
+
while (i < lines.length) {
|
|
131
|
+
var line = lines[i];
|
|
132
|
+
if (line.trim() === '') { i++; continue; }
|
|
133
|
+
|
|
134
|
+
var fence = fenceInfo(line);
|
|
135
|
+
if (fence) {
|
|
136
|
+
var code = []; i++;
|
|
137
|
+
while (i < lines.length && lines[i].trim().split('').join('') !== '' &&
|
|
138
|
+
!(lines[i].trim().length >= 3 && lines[i].trim().split('').every(function (x) { return x === fence.marker; }))) {
|
|
139
|
+
code.push(lines[i]); i++;
|
|
140
|
+
}
|
|
141
|
+
i++; // consume closing fence (or EOF)
|
|
142
|
+
blocks.push(el('pre', { 'class': 'md-pre' }, el('code', { 'class': 'md-code' }, code.join('\\n'))));
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
var h = line.match(/^(#{1,6})\\s+(.*)$/);
|
|
147
|
+
if (h) { blocks.push(el('h' + h[1].length, null, parseInline(h[2].trim()))); i++; continue; }
|
|
148
|
+
|
|
149
|
+
if (isQuote(line)) {
|
|
150
|
+
var quoted = [];
|
|
151
|
+
while (i < lines.length && isQuote(lines[i])) { quoted.push(lines[i].replace(/^\\s*>\\s?/, '')); i++; }
|
|
152
|
+
blocks.push(el('blockquote', null, parseBlocks(quoted.join('\\n'))));
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (line.indexOf('|') !== -1 && i + 1 < lines.length && isDivider(lines[i + 1])) {
|
|
157
|
+
var header = tableRow(line); i += 2;
|
|
158
|
+
var rows = [];
|
|
159
|
+
while (i < lines.length && lines[i].indexOf('|') !== -1 && lines[i].trim() !== '') { rows.push(tableRow(lines[i])); i++; }
|
|
160
|
+
var thead = el('thead', null, el('tr', null, header.map(function (c) { return el('th', null, parseInline(c)); })));
|
|
161
|
+
var tbody = el('tbody', null, rows.map(function (r) {
|
|
162
|
+
return el('tr', null, r.map(function (c) { return el('td', null, parseInline(c)); }));
|
|
163
|
+
}));
|
|
164
|
+
blocks.push(el('table', null, [thead, tbody]));
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (isHr(line)) { blocks.push(el('hr', { 'class': 'md-hr' })); i++; continue; }
|
|
169
|
+
|
|
170
|
+
if (isUl(line) || isOl(line)) {
|
|
171
|
+
var ordered = isOl(line), items = [];
|
|
172
|
+
while (i < lines.length && (ordered ? isOl(lines[i]) : isUl(lines[i]))) {
|
|
173
|
+
var m = lines[i].match(ordered ? /^(\\s*)(\\d+)\\.\\s+(.*)$/ : /^(\\s*)([-*+])\\s+(.*)$/);
|
|
174
|
+
var parts = [m[3]]; i++;
|
|
175
|
+
while (i < lines.length && lines[i].trim() !== '' && !isUl(lines[i]) && !isOl(lines[i]) &&
|
|
176
|
+
!isHeading(lines[i]) && !isFenceLine(lines[i]) && !isQuote(lines[i]) && !isHr(lines[i])) {
|
|
177
|
+
parts.push(lines[i].trim()); i++;
|
|
178
|
+
}
|
|
179
|
+
items.push(el('li', null, parseInline(parts.join(' '))));
|
|
180
|
+
}
|
|
181
|
+
blocks.push(el(ordered ? 'ol' : 'ul', null, items));
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
var para = [];
|
|
186
|
+
while (i < lines.length && lines[i].trim() !== '' && !isBlockStart(lines[i])) { para.push(lines[i]); i++; }
|
|
187
|
+
blocks.push(el('p', null, parseInline(para.join(' '))));
|
|
188
|
+
}
|
|
189
|
+
return blocks;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function render(text, target) {
|
|
193
|
+
var div = el('div', { 'class': 'md-body' }, parseBlocks(typeof text === 'string' ? text : ''));
|
|
194
|
+
if (target) {
|
|
195
|
+
var t = typeof target === 'string' ? document.querySelector(target) : target;
|
|
196
|
+
if (t) { t.innerHTML = ''; t.appendChild(div); } // div content is built with createElement — safe
|
|
197
|
+
}
|
|
198
|
+
return div;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
var CSS = '.md-body{line-height:1.6;color:var(--color-base-content,#e6e6e6);word-wrap:break-word;}' +
|
|
202
|
+
'.md-body>:first-child{margin-top:0;}.md-body>:last-child{margin-bottom:0;}' +
|
|
203
|
+
'.md-body h1,.md-body h2,.md-body h3,.md-body h4,.md-body h5,.md-body h6{font-weight:700;line-height:1.3;margin:1.8em 0 .6em;}' +
|
|
204
|
+
'.md-body h1{font-size:1.7rem;padding-bottom:.3em;border-bottom:2px solid var(--color-base-300,#3a3a3a);margin-top:.2em;}' +
|
|
205
|
+
'.md-body h2{font-size:1.32rem;padding-bottom:.25em;border-bottom:1px solid var(--color-base-300,#3a3a3a);}' +
|
|
206
|
+
'.md-body h3{font-size:1.13rem;}.md-body h4{font-size:1rem;}.md-body h5{font-size:.9rem;}.md-body h6{font-size:.85rem;opacity:.7;}' +
|
|
207
|
+
'.md-body p{margin:.85em 0;}.md-body ul,.md-body ol{margin:.7em 0;padding-left:1.7em;}' +
|
|
208
|
+
'.md-body ul{list-style:disc;}.md-body ol{list-style:decimal;}.md-body li{margin:.32em 0;padding-left:.2em;}' +
|
|
209
|
+
'.md-body a{color:var(--color-primary,#4f9eff);text-decoration:none;}.md-body a:hover{text-decoration:underline;}' +
|
|
210
|
+
'.md-body strong{font-weight:700;}.md-body em{font-style:italic;}' +
|
|
211
|
+
'.md-body .md-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.85em;background:var(--color-base-200,#1c1c1c);padding:.12em .42em;border-radius:4px;border:1px solid var(--color-base-300,#3a3a3a);}' +
|
|
212
|
+
'.md-body .md-pre{background:var(--color-base-200,#1c1c1c);border:1px solid var(--color-base-300,#3a3a3a);border-radius:8px;padding:.9em 1.1em;overflow-x:auto;margin:1em 0;line-height:1.5;}' +
|
|
213
|
+
'.md-body .md-pre .md-code{background:none;border:none;padding:0;font-size:.84rem;white-space:pre;}' +
|
|
214
|
+
'.md-body blockquote{margin:1em 0;padding:.3em 1.1em;border-left:3px solid var(--color-primary,#4f9eff);background:var(--color-base-200,#1c1c1c);border-radius:0 6px 6px 0;opacity:.85;}' +
|
|
215
|
+
'.md-body blockquote p{margin:.4em 0;}' +
|
|
216
|
+
'.md-body table{border-collapse:collapse;margin:1em 0;width:100%;font-size:.9rem;display:block;overflow-x:auto;}' +
|
|
217
|
+
'.md-body th,.md-body td{border:1px solid var(--color-base-300,#3a3a3a);padding:.45em .75em;text-align:left;vertical-align:top;}' +
|
|
218
|
+
'.md-body th{background:var(--color-base-200,#1c1c1c);font-weight:600;}.md-body tbody tr:nth-child(even){background:var(--color-base-200,#1c1c1c);}' +
|
|
219
|
+
'.md-body .md-img{max-width:100%;height:auto;border-radius:6px;margin:.6em 0;}' +
|
|
220
|
+
'.md-body hr,.md-body .md-hr{border:none;border-top:1px solid var(--color-base-300,#3a3a3a);margin:1.6em 0;}';
|
|
221
|
+
|
|
222
|
+
function injectCss() {
|
|
223
|
+
if (document.getElementById('aimeat-md-styles')) return;
|
|
224
|
+
var s = document.createElement('style');
|
|
225
|
+
s.id = 'aimeat-md-styles';
|
|
226
|
+
s.textContent = CSS;
|
|
227
|
+
(document.head || document.documentElement).appendChild(s);
|
|
228
|
+
}
|
|
229
|
+
injectCss();
|
|
230
|
+
|
|
231
|
+
global.AIMEAT = global.AIMEAT || {};
|
|
232
|
+
global.AIMEAT.md = { render: render, sanitizeHref: sanitizeHref, sanitizeImgSrc: sanitizeImgSrc };
|
|
233
|
+
})(window);
|
|
234
|
+
`;
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=lib-markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib-markdown.js","sourceRoot":"","sources":["../../../src/routes/lib-markdown.ts"],"names":[],"mappings":"AAiBA,MAAM,UAAU,iBAAiB,CAAC,MAAoB;IACpD,OAAO;WACE,MAAM,CAAC,MAAM,iBAAiB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuOhE,CAAC;AACF,CAAC"}
|
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
* @structure libsRouter route registration; aimeatAuthLib browser auth/session helper; individual library imports delegated to lib-* modules.
|
|
5
5
|
* @usage app.use(libsRouter(config, storage)) from the server setup.
|
|
6
6
|
* @version-history
|
|
7
|
+
* v1.25.0 - 2026-06-29 - aimeat-auth.js createSession() also coerces `ghii` to a string (or null) at the
|
|
8
|
+
* session boundary — some writers persisted the server's whole ghii object ({ghii,username,display_name})
|
|
9
|
+
* instead of the canonical string, which re-hydrated on every boot and broke ghii.split('@') (workspace
|
|
10
|
+
* createdBy → "request access to your own workspace"). Same one-funnel fix as the owner coercion.
|
|
11
|
+
* v1.24.0 - 2026-06-29 - aimeat-auth.js createSession() coerces `owner` to a string (or null) at the
|
|
12
|
+
* session boundary — a non-string owner (from an object login payload / stored value) crashed views
|
|
13
|
+
* that call owner.split (the identicon avatar). Defense-in-depth with the per-call minidenticon guard.
|
|
14
|
+
* v1.23.0 - 2026-06-28 - aimeat-auth.js: (1) owner session refresh() adopts the display_name the
|
|
15
|
+
* server now returns from /v1/auth/refresh, so the apex login pill picks up profile edits without a
|
|
16
|
+
* re-login. (2) new auth.updateSessionMeta(patch) + a 'session-updated' event re-render the pill
|
|
17
|
+
* live after a profile save. (3) the light/dark THEME TOGGLE now lives inside the pill (both
|
|
18
|
+
* signed-in and signed-out states) so every embedding app inherits it for free; self-contained
|
|
19
|
+
* (data-theme + 'aimeat-theme' localStorage) and fires 'aimeat-theme-change' to sync the SPA.
|
|
20
|
+
* New pill i18n keys: themeToDark/themeToLight.
|
|
21
|
+
* v1.22.0 - 2026-06-26 - aimeat-auth.js login pill shows the owner's DISPLAY NAME, falling back to
|
|
22
|
+
* the GHII when none is set. The H-2 silent bridge now returns display_name, threaded through
|
|
23
|
+
* restoreSessionFromAppOrigin → _buildAppSession so an app-origin pill (e.g. Pesupossu) reads a
|
|
24
|
+
* human label instead of the raw "owner@node-id".
|
|
25
|
+
* v1.21.0 - 2026-06-25 - aimeat-auth.js: apps can declare the scopes they need via
|
|
26
|
+
* <meta name="aimeat-scopes" content="…">. The H-2 silent bridge + consent popup now request the
|
|
27
|
+
* declared set (falling back to APP_DEFAULT_SCOPES), so e.g. an AI app adds "ai:use" to spend the
|
|
28
|
+
* owner's AI budget while non-declaring apps are unchanged. authorize still validates every scope.
|
|
7
29
|
* v1.20.0 - 2026-06-25 - aimeat-auth.js: one-time username choice for first-time Google users. A
|
|
8
30
|
* brand-new Google account is no longer auto-created from the email local-part; the callback bounces
|
|
9
31
|
* back with ?aimeat_signup=1 and showGoogleSignupModal() prompts for a username (suggested, editable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libs.d.ts","sourceRoot":"","sources":["../../../src/routes/libs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"libs.d.ts","sourceRoot":"","sources":["../../../src/routes/libs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,OAAO,EAAE,MAAM,EAAiB,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAqBvD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CA0N1E"}
|
package/dist/src/routes/libs.js
CHANGED
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
* @structure libsRouter route registration; aimeatAuthLib browser auth/session helper; individual library imports delegated to lib-* modules.
|
|
5
5
|
* @usage app.use(libsRouter(config, storage)) from the server setup.
|
|
6
6
|
* @version-history
|
|
7
|
+
* v1.25.0 - 2026-06-29 - aimeat-auth.js createSession() also coerces `ghii` to a string (or null) at the
|
|
8
|
+
* session boundary — some writers persisted the server's whole ghii object ({ghii,username,display_name})
|
|
9
|
+
* instead of the canonical string, which re-hydrated on every boot and broke ghii.split('@') (workspace
|
|
10
|
+
* createdBy → "request access to your own workspace"). Same one-funnel fix as the owner coercion.
|
|
11
|
+
* v1.24.0 - 2026-06-29 - aimeat-auth.js createSession() coerces `owner` to a string (or null) at the
|
|
12
|
+
* session boundary — a non-string owner (from an object login payload / stored value) crashed views
|
|
13
|
+
* that call owner.split (the identicon avatar). Defense-in-depth with the per-call minidenticon guard.
|
|
14
|
+
* v1.23.0 - 2026-06-28 - aimeat-auth.js: (1) owner session refresh() adopts the display_name the
|
|
15
|
+
* server now returns from /v1/auth/refresh, so the apex login pill picks up profile edits without a
|
|
16
|
+
* re-login. (2) new auth.updateSessionMeta(patch) + a 'session-updated' event re-render the pill
|
|
17
|
+
* live after a profile save. (3) the light/dark THEME TOGGLE now lives inside the pill (both
|
|
18
|
+
* signed-in and signed-out states) so every embedding app inherits it for free; self-contained
|
|
19
|
+
* (data-theme + 'aimeat-theme' localStorage) and fires 'aimeat-theme-change' to sync the SPA.
|
|
20
|
+
* New pill i18n keys: themeToDark/themeToLight.
|
|
21
|
+
* v1.22.0 - 2026-06-26 - aimeat-auth.js login pill shows the owner's DISPLAY NAME, falling back to
|
|
22
|
+
* the GHII when none is set. The H-2 silent bridge now returns display_name, threaded through
|
|
23
|
+
* restoreSessionFromAppOrigin → _buildAppSession so an app-origin pill (e.g. Pesupossu) reads a
|
|
24
|
+
* human label instead of the raw "owner@node-id".
|
|
25
|
+
* v1.21.0 - 2026-06-25 - aimeat-auth.js: apps can declare the scopes they need via
|
|
26
|
+
* <meta name="aimeat-scopes" content="…">. The H-2 silent bridge + consent popup now request the
|
|
27
|
+
* declared set (falling back to APP_DEFAULT_SCOPES), so e.g. an AI app adds "ai:use" to spend the
|
|
28
|
+
* owner's AI budget while non-declaring apps are unchanged. authorize still validates every scope.
|
|
7
29
|
* v1.20.0 - 2026-06-25 - aimeat-auth.js: one-time username choice for first-time Google users. A
|
|
8
30
|
* brand-new Google account is no longer auto-created from the email local-part; the callback bounces
|
|
9
31
|
* back with ?aimeat_signup=1 and showGoogleSignupModal() prompts for a username (suggested, editable,
|
|
@@ -58,6 +80,7 @@
|
|
|
58
80
|
import { Router } from 'express';
|
|
59
81
|
import { aimeatDataLib } from './lib-data.js';
|
|
60
82
|
import { aimeatStorageLib } from './lib-storage.js';
|
|
83
|
+
import { aimeatMarkdownLib } from './lib-markdown.js';
|
|
61
84
|
import { aimeatSocialLib } from './lib-social.js';
|
|
62
85
|
import { aimeatWalletLib } from './lib-wallet.js';
|
|
63
86
|
import { aimeatWorkLib } from './lib-work.js';
|
|
@@ -97,6 +120,10 @@ export function libsRouter(config, _storage) {
|
|
|
97
120
|
router.get('/v1/libs/aimeat-storage.js', (_req, res) => {
|
|
98
121
|
sendJavascriptLibrary(res, aimeatStorageLib(config));
|
|
99
122
|
});
|
|
123
|
+
// GET /v1/libs/aimeat-markdown.js — safe GFM markdown renderer (AIMEAT.md.render)
|
|
124
|
+
router.get('/v1/libs/aimeat-markdown.js', (_req, res) => {
|
|
125
|
+
sendJavascriptLibrary(res, aimeatMarkdownLib(config));
|
|
126
|
+
});
|
|
100
127
|
// GET /v1/libs/aimeat-social.js — Boards & social library
|
|
101
128
|
router.get('/v1/libs/aimeat-social.js', (_req, res) => {
|
|
102
129
|
sendJavascriptLibrary(res, aimeatSocialLib(config));
|
|
@@ -316,6 +343,20 @@ const APEX_URL = '${config.baseUrl}';
|
|
|
316
343
|
// SEPARATE scope domain from memory — saving an image goes to /v1/storage, not /v1/memory.)
|
|
317
344
|
const APP_DEFAULT_SCOPES = 'memory:read memory:write storage:read storage:write';
|
|
318
345
|
|
|
346
|
+
// An app declares the scopes it needs with <meta name="aimeat-scopes" content="scope scope …">.
|
|
347
|
+
// Only declared apps deviate from the default set — e.g. an AI app adds "ai:use" so its grant
|
|
348
|
+
// can spend the owner's AI budget. Falls back to APP_DEFAULT_SCOPES when undeclared, so existing
|
|
349
|
+
// apps are unaffected. The authorize endpoint still validates every scope against the node's
|
|
350
|
+
// grantable vocabulary, so a bogus meta value can only ever request LESS than the node allows.
|
|
351
|
+
function appDeclaredScopes() {
|
|
352
|
+
try {
|
|
353
|
+
var m = document.querySelector('meta[name="aimeat-scopes"]');
|
|
354
|
+
var c = m && m.getAttribute('content');
|
|
355
|
+
if (c && c.trim()) return c.trim().replace(/\\s+/g, ' ');
|
|
356
|
+
} catch (e) { /* no document / detached */ }
|
|
357
|
+
return APP_DEFAULT_SCOPES;
|
|
358
|
+
}
|
|
359
|
+
|
|
319
360
|
const NODE_ID = '${config.nodeId}';
|
|
320
361
|
|
|
321
362
|
// Social login availability (baked in server-side from node config).
|
|
@@ -581,7 +622,7 @@ function silentAppToken() {
|
|
|
581
622
|
iframe = document.createElement('iframe');
|
|
582
623
|
iframe.style.display = 'none';
|
|
583
624
|
iframe.setAttribute('aria-hidden', 'true');
|
|
584
|
-
iframe.src = apexOrigin + '/app-silent.html?scope=' + encodeURIComponent(
|
|
625
|
+
iframe.src = apexOrigin + '/app-silent.html?scope=' + encodeURIComponent(appDeclaredScopes());
|
|
585
626
|
(document.body || document.documentElement).appendChild(iframe);
|
|
586
627
|
timer = setTimeout(function () { finish(null); }, 8000);
|
|
587
628
|
});
|
|
@@ -613,7 +654,7 @@ async function requestConsentPopup(app, scopeStr, manage) {
|
|
|
613
654
|
var p = await _pkce();
|
|
614
655
|
var state = _b64url(crypto.getRandomValues(new Uint8Array(16)).buffer);
|
|
615
656
|
var redirectUri = location.origin + '/'; // app origin; never navigated in web_message mode (origin binding only)
|
|
616
|
-
var scope = scopeStr ||
|
|
657
|
+
var scope = scopeStr || appDeclaredScopes();
|
|
617
658
|
// manage=1 → the consent page always shows the management screen (the gear). Without it, an app the
|
|
618
659
|
// user already granted just passes straight through (auto-approve) instead of prompting again.
|
|
619
660
|
var url = apexOrigin + '/v1/app-grants/authorize?response_type=code&response_mode=web_message'
|
|
@@ -656,14 +697,14 @@ async function requestConsentPopup(app, scopeStr, manage) {
|
|
|
656
697
|
// Build + install an app-origin session from a freshly issued grant access token (shared by the
|
|
657
698
|
// silent/consent login and the in-app "manage grant" re-issue). appId = owner/filename, own = the
|
|
658
699
|
// user's own app (no consent gear needed).
|
|
659
|
-
function _buildAppSession(accessToken, appId, own) {
|
|
700
|
+
function _buildAppSession(accessToken, appId, own, displayName) {
|
|
660
701
|
var payload = parseJwt(accessToken) || {};
|
|
661
702
|
var ownerName = payload.owner || payload.sub;
|
|
662
703
|
if (!ownerName) return null;
|
|
663
704
|
var session = createSession({
|
|
664
705
|
owner: ownerName,
|
|
665
706
|
ghii: String(ownerName).indexOf('@') >= 0 ? ownerName : (ownerName + '@' + NODE_ID),
|
|
666
|
-
gaii: null, jwt: accessToken, roles: payload.roles || [], displayName: '',
|
|
707
|
+
gaii: null, jwt: accessToken, roles: payload.roles || [], displayName: displayName || '',
|
|
667
708
|
});
|
|
668
709
|
session._appOrigin = true;
|
|
669
710
|
session._app = appId || null;
|
|
@@ -695,7 +736,7 @@ function restoreSessionFromAppOrigin(interactive) {
|
|
|
695
736
|
own = false; // the consent flow only runs for apps the user does NOT own
|
|
696
737
|
}
|
|
697
738
|
if (!grant || !grant.access_token) return null;
|
|
698
|
-
return _buildAppSession(grant.access_token, appId, own);
|
|
739
|
+
return _buildAppSession(grant.access_token, appId, own, grant.display_name);
|
|
699
740
|
})();
|
|
700
741
|
_appOriginLoginInFlight.finally(function () { _appOriginLoginInFlight = null; });
|
|
701
742
|
return _appOriginLoginInFlight;
|
|
@@ -726,11 +767,26 @@ function scheduleAutoRefresh(session) {
|
|
|
726
767
|
function createSession(data) {
|
|
727
768
|
// Extract roles from JWT payload so UI can check owner/operator status
|
|
728
769
|
const jwtPayload = data.jwt ? parseJwt(data.jwt) : null;
|
|
770
|
+
// owner MUST be a string (or null). Login paths feed it differently (a JWT claim, an object's
|
|
771
|
+
// .name, a stored value), and downstream code calls owner.split (e.g. the identicon avatar), so a
|
|
772
|
+
// non-string owner would crash the whole view. Coerce it here, at the one place every path goes through.
|
|
773
|
+
let ownerVal = data.owner;
|
|
774
|
+
if (ownerVal != null && typeof ownerVal !== 'string') {
|
|
775
|
+
ownerVal = (typeof ownerVal === 'object' && typeof ownerVal.name === 'string') ? ownerVal.name : String(ownerVal);
|
|
776
|
+
}
|
|
777
|
+
// ghii MUST be a string (or null) for the same reason: downstream code calls ghii.split('@')
|
|
778
|
+
// (workspace createdBy, identity routing) and stores data keyed by it. Some writers persisted the
|
|
779
|
+
// server's WHOLE ghii object ({ ghii, username, display_name }) instead of the canonical string —
|
|
780
|
+
// that re-hydrates here on every boot. Extract the string at the one funnel every path goes through.
|
|
781
|
+
let ghiiVal = data.ghii;
|
|
782
|
+
if (ghiiVal != null && typeof ghiiVal !== 'string') {
|
|
783
|
+
ghiiVal = (typeof ghiiVal === 'object' && typeof ghiiVal.ghii === 'string') ? ghiiVal.ghii : String(ghiiVal);
|
|
784
|
+
}
|
|
729
785
|
const session = {
|
|
730
|
-
ghii:
|
|
731
|
-
owner:
|
|
786
|
+
ghii: ghiiVal || null,
|
|
787
|
+
owner: ownerVal,
|
|
732
788
|
gaii: data.gaii || null,
|
|
733
|
-
identity: data.gaii ||
|
|
789
|
+
identity: data.gaii || ghiiVal || null,
|
|
734
790
|
jwt: data.jwt,
|
|
735
791
|
roles: jwtPayload?.roles || data.roles || [],
|
|
736
792
|
displayName: data.displayName || '',
|
|
@@ -807,6 +863,9 @@ function createSession(data) {
|
|
|
807
863
|
}
|
|
808
864
|
session.jwt = data.data.token;
|
|
809
865
|
session.roles = (parseJwt(session.jwt) || {}).roles || session.roles || [];
|
|
866
|
+
// The owner may have edited their profile since login — adopt the fresh display
|
|
867
|
+
// name the server returns so the login pill stays current without a re-login.
|
|
868
|
+
if (typeof data.data.display_name === 'string') session.displayName = data.data.display_name;
|
|
810
869
|
persistSession(session);
|
|
811
870
|
scheduleAutoRefresh(session);
|
|
812
871
|
return session;
|
|
@@ -1010,6 +1069,18 @@ const auth = {
|
|
|
1010
1069
|
return currentSession;
|
|
1011
1070
|
},
|
|
1012
1071
|
|
|
1072
|
+
/**
|
|
1073
|
+
* Patch mutable, non-secret session metadata in place (e.g. displayName after a profile
|
|
1074
|
+
* edit), persist it, and notify the login pill so it re-renders live — no page reload.
|
|
1075
|
+
* Ignored when there is no active session.
|
|
1076
|
+
*/
|
|
1077
|
+
updateSessionMeta(patch) {
|
|
1078
|
+
if (!currentSession || !patch) return;
|
|
1079
|
+
Object.assign(currentSession, patch);
|
|
1080
|
+
persistSession(currentSession);
|
|
1081
|
+
emit('session-updated', currentSession);
|
|
1082
|
+
},
|
|
1083
|
+
|
|
1013
1084
|
/** Logout — clear stored credentials from localStorage and IndexedDB */
|
|
1014
1085
|
async logout() {
|
|
1015
1086
|
if (refreshTimer) { clearTimeout(refreshTimer); refreshTimer = null; }
|
|
@@ -1175,7 +1246,7 @@ const auth = {
|
|
|
1175
1246
|
+ '<span class="aimeat-auth-ghii" style="color:rgba(90,65,20,.7);font-weight:700;letter-spacing:.5px;font-size:13px;'
|
|
1176
1247
|
+ 'text-shadow:0 1px 0 rgba(245,230,163,.6),0 -1px 0 rgba(50,35,10,.3);'
|
|
1177
1248
|
+ '-webkit-text-stroke:.2px rgba(120,85,20,.3)">'
|
|
1178
|
-
+ escHtml(stored.ghii || stored.owner) + '</span>'
|
|
1249
|
+
+ escHtml(stored.displayName || stored.ghii || stored.owner) + '</span>'
|
|
1179
1250
|
+ (stored.federated ? '<span style="display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:700;letter-spacing:.5px;color:#7dd3fc;'
|
|
1180
1251
|
+ 'background:rgba(56,189,248,.15);padding:2px 6px;border-radius:4px;border:1px solid rgba(56,189,248,.3)">'
|
|
1181
1252
|
+ '\\u{1F310} ' + escHtml(i.federated || 'Federated') + '</span>' : '')
|
|
@@ -1187,6 +1258,8 @@ const auth = {
|
|
|
1187
1258
|
+ 'background:rgba(90,65,20,.18);color:#5a4114;border:1px solid rgba(120,85,20,.35);'
|
|
1188
1259
|
+ 'border-radius:6px;padding:3px 8px;cursor:pointer;font-size:13px;line-height:1">\\u2699\\uFE0F</button>'
|
|
1189
1260
|
: '')
|
|
1261
|
+
// Light/dark toggle — lives inside the pill so embedding apps inherit it for free.
|
|
1262
|
+
+ themeToggleHtml(i)
|
|
1190
1263
|
+ '<button id="aimeat-logout-btn" class="aimeat-auth-logout" style="'
|
|
1191
1264
|
+ 'background:radial-gradient(ellipse at 50% 30%,#ff6b6b 0%,#dc2626 35%,#991b1b 70%,#7f1d1d 100%);'
|
|
1192
1265
|
+ 'color:#ffd7d7;border:1px solid rgba(220,38,38,.6);border-top-color:rgba(255,130,130,.4);border-bottom-color:rgba(100,20,20,.8);'
|
|
@@ -1217,8 +1290,12 @@ const auth = {
|
|
|
1217
1290
|
+ 'transition:transform .15s,box-shadow .15s}'
|
|
1218
1291
|
+ '.aimeat-sign-btn:hover{transform:translateY(-1px);box-shadow:0 1px 0 rgba(245,230,163,.3) inset,0 -1px 0 rgba(75,53,32,.5) inset,0 5px 16px rgba(0,0,0,.5),0 0 30px rgba(201,168,76,.3)}'
|
|
1219
1292
|
+ '</style>'
|
|
1293
|
+
// Keep the light/dark toggle reachable even when signed out.
|
|
1294
|
+
+ '<span style="display:inline-flex;align-items:center;gap:10px">'
|
|
1295
|
+
+ themeToggleHtml(i)
|
|
1220
1296
|
+ '<button id="aimeat-login-btn" class="aimeat-sign-btn">'
|
|
1221
|
-
+ (opts.buttonText || i.signInBtn || '\\u2764\\ufe0f Sign In') + '</button>'
|
|
1297
|
+
+ (opts.buttonText || i.signInBtn || '\\u2764\\ufe0f Sign In') + '</button>'
|
|
1298
|
+
+ '</span>';
|
|
1222
1299
|
document.getElementById('aimeat-login-btn').addEventListener('click', () => {
|
|
1223
1300
|
// On an app origin, the Sign In click is the user gesture that opens the consent popup
|
|
1224
1301
|
// for a non-owned app (interactive). On the apex it's the normal owner login modal.
|
|
@@ -1226,6 +1303,7 @@ const auth = {
|
|
|
1226
1303
|
else { showLoginModal(opts, render); }
|
|
1227
1304
|
});
|
|
1228
1305
|
}
|
|
1306
|
+
wireThemeToggle(container, i); // present in both signed-in and signed-out markup
|
|
1229
1307
|
}
|
|
1230
1308
|
render();
|
|
1231
1309
|
// Re-render when the session changes out-of-band — e.g. the H-2 silent SSO on an app origin
|
|
@@ -1234,6 +1312,7 @@ const auth = {
|
|
|
1234
1312
|
// location.reload(), which would loop with the auto silent login).
|
|
1235
1313
|
auth.on('login', render);
|
|
1236
1314
|
auth.on('logout', render);
|
|
1315
|
+
auth.on('session-updated', render); // live display-name (etc.) edits
|
|
1237
1316
|
// Seamless SSO: on an app origin (*.apps.<domain>) with no session yet, attempt the silent
|
|
1238
1317
|
// bridge ourselves so the owner's own app is logged in even if it never calls auth.login()
|
|
1239
1318
|
// explicitly. Best-effort + idempotent: if the bridge yields a session it fires 'login' (→ the
|
|
@@ -1252,6 +1331,50 @@ const auth = {
|
|
|
1252
1331
|
|
|
1253
1332
|
function escHtml(s) { const d = document.createElement('div'); d.textContent = s; return d.innerHTML; }
|
|
1254
1333
|
|
|
1334
|
+
// ── Theme toggle (travels with the login pill) ───────────────────────────────────────────────
|
|
1335
|
+
// The light/dark switch lives INSIDE the login pill so every app that embeds the pill gets the
|
|
1336
|
+
// toggle for free — no per-app theming code. Self-contained: it reads/writes the same
|
|
1337
|
+
// 'aimeat-theme' localStorage key + <html data-theme> attribute the SPA uses, and dispatches an
|
|
1338
|
+
// 'aimeat-theme-change' window event so the SPA's theme system (and any chart subscribers) stay
|
|
1339
|
+
// in sync. In a standalone app (no SPA theme module) the data-theme + theme.css alone repaint.
|
|
1340
|
+
var AIMEAT_THEME_KEY = 'aimeat-theme';
|
|
1341
|
+
|
|
1342
|
+
function aimeatReadTheme() {
|
|
1343
|
+
try { var s = localStorage.getItem(AIMEAT_THEME_KEY); if (s === 'light' || s === 'dark') return s; } catch (e) {}
|
|
1344
|
+
var attr = document.documentElement.dataset.theme;
|
|
1345
|
+
if (attr === 'light' || attr === 'dark') return attr;
|
|
1346
|
+
return (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light';
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
function aimeatApplyTheme(t) {
|
|
1350
|
+
document.documentElement.dataset.theme = t;
|
|
1351
|
+
try { localStorage.setItem(AIMEAT_THEME_KEY, t); } catch (e) {}
|
|
1352
|
+
try { window.dispatchEvent(new CustomEvent('aimeat-theme-change', { detail: { theme: t } })); } catch (e) {}
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
function themeToggleHtml(i) {
|
|
1356
|
+
var dark = aimeatReadTheme() === 'dark';
|
|
1357
|
+
var title = dark ? (i.themeToLight || 'Switch to light mode') : (i.themeToDark || 'Switch to dark mode');
|
|
1358
|
+
return '<button id="aimeat-theme-toggle" class="aimeat-theme-toggle" title="' + escHtml(title) + '" '
|
|
1359
|
+
+ 'aria-label="' + escHtml(title) + '" style="display:inline-flex;align-items:center;justify-content:center;'
|
|
1360
|
+
+ 'width:30px;height:30px;flex:0 0 auto;background:transparent;border:1px solid rgba(127,127,127,.4);'
|
|
1361
|
+
+ 'border-radius:8px;cursor:pointer;font-size:15px;line-height:1;padding:0;color:currentColor">'
|
|
1362
|
+
+ (dark ? '\\u2600' : '\\u263E') + '</button>';
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
function wireThemeToggle(container, i) {
|
|
1366
|
+
var btn = container.querySelector('#aimeat-theme-toggle');
|
|
1367
|
+
if (!btn) return;
|
|
1368
|
+
btn.addEventListener('click', function () {
|
|
1369
|
+
var next = aimeatReadTheme() === 'dark' ? 'light' : 'dark';
|
|
1370
|
+
aimeatApplyTheme(next);
|
|
1371
|
+
var dark = next === 'dark';
|
|
1372
|
+
btn.textContent = dark ? '\\u2600' : '\\u263E';
|
|
1373
|
+
var title = dark ? (i.themeToLight || 'Switch to light mode') : (i.themeToDark || 'Switch to dark mode');
|
|
1374
|
+
btn.title = title; btn.setAttribute('aria-label', title);
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1255
1378
|
// ── Sign-in modal language helpers ──
|
|
1256
1379
|
// The modal can be shown standalone (e.g. a custom portal page) where the
|
|
1257
1380
|
// canonical header — and its language switcher — is not present. So the modal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libs.js","sourceRoot":"","sources":["../../../src/routes/libs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"libs.js","sourceRoot":"","sources":["../../../src/routes/libs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,OAAO,EAAE,MAAM,EAAiB,MAAM,SAAS,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmnD1E,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/routes/memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,yBAAyB,CAAC;AAmBrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/routes/memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,yBAAyB,CAAC;AAmBrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAqB3D,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,EAAE,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,2BAA2B,EAAE,QAAQ,CAAC,GAAG,MAAM,CAsrDtM"}
|