fraim-hub 2.0.204
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +467 -0
- package/bin/fraim-hub.js +17 -0
- package/dist/src/ai-hub/brand-store.js +17 -0
- package/dist/src/ai-hub/catalog.js +412 -0
- package/dist/src/ai-hub/cert-store.js +70 -0
- package/dist/src/ai-hub/cli.js +212 -0
- package/dist/src/ai-hub/configured-agents.js +283 -0
- package/dist/src/ai-hub/conversation-store.js +428 -0
- package/dist/src/ai-hub/desktop-main.js +449 -0
- package/dist/src/ai-hub/hosts.js +1669 -0
- package/dist/src/ai-hub/hub-latest-version.js +52 -0
- package/dist/src/ai-hub/hub-launch-decision.js +57 -0
- package/dist/src/ai-hub/hub-runtime-file.js +43 -0
- package/dist/src/ai-hub/managed-browser.js +269 -0
- package/dist/src/ai-hub/manager-turns.js +64 -0
- package/dist/src/ai-hub/office-sideload.js +156 -0
- package/dist/src/ai-hub/openclaw-bridge.js +250 -0
- package/dist/src/ai-hub/preferences.js +201 -0
- package/dist/src/ai-hub/remote-hub-gateway.js +88 -0
- package/dist/src/ai-hub/server.js +4013 -0
- package/dist/src/ai-hub/types.js +2 -0
- package/dist/src/ai-hub/url-safety.js +19 -0
- package/dist/src/api/admin/payments.js +33 -0
- package/dist/src/api/admin/sales-leads.js +21 -0
- package/dist/src/api/payment/create-session.js +338 -0
- package/dist/src/api/payment/dashboard-link.js +149 -0
- package/dist/src/api/payment/session-details.js +31 -0
- package/dist/src/api/payment/webhook.js +587 -0
- package/dist/src/api/sales/contact.js +44 -0
- package/dist/src/cli/api/get-provider-client.js +41 -0
- package/dist/src/cli/api/provider-client.js +107 -0
- package/dist/src/cli/commands/add-ide.js +462 -0
- package/dist/src/cli/fraim-hub.js +50 -0
- package/dist/src/cli/internal/device-flow-service.js +83 -0
- package/dist/src/cli/mcp/command-resolution.js +81 -0
- package/dist/src/cli/mcp/fraim-mcp-latest-launcher.js +136 -0
- package/dist/src/cli/mcp/ide-formats.js +317 -0
- package/dist/src/cli/mcp/mcp-server-builder.js +48 -0
- package/dist/src/cli/mcp/mcp-server-registry.js +173 -0
- package/dist/src/cli/providers/local-provider-registry.js +165 -0
- package/dist/src/cli/providers/provider-registry.js +230 -0
- package/dist/src/cli/setup/claude-code-telemetry.js +59 -0
- package/dist/src/cli/setup/codex-local-config.js +37 -0
- package/dist/src/cli/setup/ide-detector.js +383 -0
- package/dist/src/cli/setup/ide-global-integration.js +100 -0
- package/dist/src/cli/setup/ide-invocation-surfaces.js +160 -0
- package/dist/src/cli/setup/mcp-config-generator.js +225 -0
- package/dist/src/cli/setup/provider-prompts.js +339 -0
- package/dist/src/cli/utils/managed-agent-paths.js +118 -0
- package/dist/src/cli/utils/script-sync-utils.js +221 -0
- package/dist/src/cli/utils/user-config.js +100 -0
- package/dist/src/cli/utils/version-utils.js +35 -0
- package/dist/src/config/ai-manager-hiring.js +121 -0
- package/dist/src/config/feature-flags.js +25 -0
- package/dist/src/config/persona-capability-bundles.js +277 -0
- package/dist/src/config/persona-hiring.js +270 -0
- package/dist/src/config/portfolio-slug-overrides.js +17 -0
- package/dist/src/config/pricing.js +37 -0
- package/dist/src/config/stripe.js +43 -0
- package/dist/src/core/brand-store.js +232 -0
- package/dist/src/core/quality-evidence.js +331 -0
- package/dist/src/core/utils/git-utils.js +194 -0
- package/dist/src/core/utils/ports.js +32 -0
- package/dist/src/core/utils/project-fraim-paths.js +220 -0
- package/dist/src/db/payment-repository.js +61 -0
- package/dist/src/first-run/types.js +93 -0
- package/dist/src/fraim/db-service.js +2409 -0
- package/dist/src/local-mcp-server/agent-token-prices.js +167 -0
- package/dist/src/local-mcp-server/learning-context-builder.js +975 -0
- package/dist/src/middleware/rate-limit.js +110 -0
- package/dist/src/models/payment.js +2 -0
- package/dist/src/routes/payment-routes.js +186 -0
- package/dist/src/routes/persona-catalog-routes.js +84 -0
- package/dist/src/services/dashboard-access.js +27 -0
- package/dist/src/services/email-service.js +951 -0
- package/dist/src/services/persona-entitlement-service.js +352 -0
- package/dist/src/services/workspace-identity.js +21 -0
- package/dist/src/types/analytics.js +2 -0
- package/dist/src/utils/payment-calculator.js +52 -0
- package/extensions/office-word/favicon.ico +0 -0
- package/extensions/office-word/icon-64.png +0 -0
- package/extensions/office-word/manifest.xml +33 -0
- package/extensions/office-word/taskpane.html +242 -0
- package/index.js +85 -0
- package/package.json +106 -0
- package/public/ai-hub/index.html +910 -0
- package/public/ai-hub/powerpoint-taskpane/icon-64.png +0 -0
- package/public/ai-hub/powerpoint-taskpane/index.html +236 -0
- package/public/ai-hub/powerpoint-taskpane/manifest.xml +30 -0
- package/public/ai-hub/review.css +444 -0
- package/public/ai-hub/script.js +11737 -0
- package/public/ai-hub/styles.css +5102 -0
- package/public/first-run/error-frame.js +100 -0
- package/public/first-run/index.html +35 -0
- package/public/first-run/script.js +739 -0
- package/public/first-run/styles.css +929 -0
- package/public/portfolio/ashley.html +523 -0
- package/public/portfolio/auditya.html +83 -0
- package/public/portfolio/banke.html +83 -0
- package/public/portfolio/beza.html +659 -0
- package/public/portfolio/careena.html +632 -0
- package/public/portfolio/casey.html +568 -0
- package/public/portfolio/celia.html +490 -0
- package/public/portfolio/deidre.html +642 -0
- package/public/portfolio/gautam.html +597 -0
- package/public/portfolio/hari.html +469 -0
- package/public/portfolio/huxley.html +1354 -0
- package/public/portfolio/index.html +741 -0
- package/public/portfolio/maestro.html +518 -0
- package/public/portfolio/mandy.html +590 -0
- package/public/portfolio/mona.html +597 -0
- package/public/portfolio/pam.html +887 -0
- package/public/portfolio/procella.html +107 -0
- package/public/portfolio/qasm.html +569 -0
- package/public/portfolio/ricardo.html +489 -0
- package/public/portfolio/sade.html +560 -0
- package/public/portfolio/sam.html +654 -0
- package/public/portfolio/sechar.html +580 -0
- package/public/portfolio/sreya.html +599 -0
- package/public/portfolio/swen.html +601 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* R6.1 — unified error-frame renderer.
|
|
3
|
+
*
|
|
4
|
+
* Exposes a single function `renderErrorFrame(frame, onAction)` which returns
|
|
5
|
+
* a DOM Node containing exactly:
|
|
6
|
+
* - "What we tried" sentence
|
|
7
|
+
* - "What happened" verbatim stderr (last 12 lines, with a Show-full toggle
|
|
8
|
+
* that surfaces the rest on demand)
|
|
9
|
+
* - Up to three actions in fixed order (Retry / Try alternative / Skip and continue)
|
|
10
|
+
*
|
|
11
|
+
* The same renderer must be lifted into public/ai-hub/ in the v2 follow-up
|
|
12
|
+
* (issue #355, "Hub-side error-frame adoption") so bootstrap and Hub share
|
|
13
|
+
* one frame across surfaces.
|
|
14
|
+
*/
|
|
15
|
+
(function () {
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
function escapeText(text) {
|
|
19
|
+
if (typeof text !== 'string') return '';
|
|
20
|
+
return text;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function truncateToLastLines(text, lineCount) {
|
|
24
|
+
if (typeof text !== 'string') return { visible: '', hidden: '' };
|
|
25
|
+
const lines = text.split(/\r?\n/);
|
|
26
|
+
if (lines.length <= lineCount) {
|
|
27
|
+
return { visible: text, hidden: '' };
|
|
28
|
+
}
|
|
29
|
+
const visible = lines.slice(-lineCount).join('\n');
|
|
30
|
+
const hidden = lines.slice(0, -lineCount).join('\n');
|
|
31
|
+
return { visible, hidden };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function renderErrorFrame(frame, onAction) {
|
|
35
|
+
const root = document.createElement('div');
|
|
36
|
+
root.className = 'error-frame';
|
|
37
|
+
root.setAttribute('data-testid', 'error-frame');
|
|
38
|
+
root.setAttribute('role', 'alert');
|
|
39
|
+
|
|
40
|
+
const whatTried = document.createElement('div');
|
|
41
|
+
whatTried.className = 'what-tried';
|
|
42
|
+
whatTried.setAttribute('data-testid', 'error-what-tried');
|
|
43
|
+
whatTried.textContent = escapeText(frame.whatTried || '');
|
|
44
|
+
root.appendChild(whatTried);
|
|
45
|
+
|
|
46
|
+
// Optional plain-language hint rendered ABOVE the verbatim stderr so
|
|
47
|
+
// a non-tech user reads "your install key was rejected — get a new
|
|
48
|
+
// one" before they parse `Request failed with status code 401`.
|
|
49
|
+
if (frame.hint) {
|
|
50
|
+
const hint = document.createElement('div');
|
|
51
|
+
hint.className = 'error-hint';
|
|
52
|
+
hint.setAttribute('data-testid', 'error-hint');
|
|
53
|
+
hint.textContent = escapeText(frame.hint);
|
|
54
|
+
root.appendChild(hint);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const { visible, hidden } = truncateToLastLines(frame.whatHappened || '', 12);
|
|
58
|
+
const whatHappened = document.createElement('pre');
|
|
59
|
+
whatHappened.className = 'what-happened';
|
|
60
|
+
whatHappened.setAttribute('data-testid', 'error-what-happened');
|
|
61
|
+
whatHappened.textContent = visible;
|
|
62
|
+
root.appendChild(whatHappened);
|
|
63
|
+
|
|
64
|
+
if (hidden) {
|
|
65
|
+
const showFull = document.createElement('button');
|
|
66
|
+
showFull.type = 'button';
|
|
67
|
+
showFull.className = 'show-full';
|
|
68
|
+
showFull.setAttribute('data-testid', 'error-show-full');
|
|
69
|
+
showFull.textContent = 'Show full output';
|
|
70
|
+
showFull.addEventListener('click', () => {
|
|
71
|
+
whatHappened.textContent = (hidden + '\n' + visible).trimEnd();
|
|
72
|
+
showFull.remove();
|
|
73
|
+
});
|
|
74
|
+
root.appendChild(showFull);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const actions = Array.isArray(frame.actions) ? frame.actions.slice(0, 3) : [];
|
|
78
|
+
const actionRow = document.createElement('div');
|
|
79
|
+
actionRow.className = 'actions';
|
|
80
|
+
for (const action of actions) {
|
|
81
|
+
const btn = document.createElement('button');
|
|
82
|
+
btn.type = 'button';
|
|
83
|
+
btn.className = 'action';
|
|
84
|
+
btn.setAttribute('data-testid', 'error-action');
|
|
85
|
+
btn.setAttribute('data-action-id', action.id);
|
|
86
|
+
btn.setAttribute('data-variant', action.variant || 'secondary');
|
|
87
|
+
btn.textContent = action.label || action.id;
|
|
88
|
+
btn.addEventListener('click', () => {
|
|
89
|
+
if (typeof onAction === 'function') {
|
|
90
|
+
onAction(action);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
actionRow.appendChild(btn);
|
|
94
|
+
}
|
|
95
|
+
root.appendChild(actionRow);
|
|
96
|
+
return root;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
window.FraimErrorFrame = { render: renderErrorFrame };
|
|
100
|
+
})();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>FRAIM Setup</title>
|
|
7
|
+
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect width='48' height='48' rx='10' fill='%230f2540'/%3E%3Ctext x='24' y='31' text-anchor='middle' font-family='Helvetica,Arial,sans-serif' font-size='22' font-weight='700' fill='%23f6efe4'%3EF%3C/text%3E%3C/svg%3E">
|
|
8
|
+
<link rel="stylesheet" href="/first-run/styles.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<main class="page">
|
|
12
|
+
<header class="page-header">
|
|
13
|
+
<h1>Set up FRAIM</h1>
|
|
14
|
+
<p class="lede" id="lede">We are getting your machine ready for FRAIM.</p>
|
|
15
|
+
</header>
|
|
16
|
+
|
|
17
|
+
<section class="card">
|
|
18
|
+
<ul class="checklist" id="checklist" data-testid="setup-checklist" aria-label="FRAIM setup checklist">
|
|
19
|
+
<!-- Skeleton rows shown until the async session-load completes.
|
|
20
|
+
Replaced wholesale by script.js once /api/first-run/session returns. -->
|
|
21
|
+
<li class="row skeleton-row" data-row-id="node" data-row-status="pending"><span class="icon" aria-hidden="true">.</span><span class="label">Node.js</span><span class="verb" data-testid="row-verb">checking...</span></li>
|
|
22
|
+
<li class="row skeleton-row" data-row-id="git" data-row-status="pending"><span class="icon" aria-hidden="true">.</span><span class="label">git</span><span class="verb" data-testid="row-verb">checking...</span></li>
|
|
23
|
+
<li class="row skeleton-row" data-row-id="agent" data-row-status="pending"><span class="icon" aria-hidden="true">.</span><span class="label">Locally installed AI agents</span><span class="verb" data-testid="row-verb">checking...</span></li>
|
|
24
|
+
<li class="row skeleton-row" data-row-id="fraim" data-row-status="pending"><span class="icon" aria-hidden="true">.</span><span class="label">FRAIM</span><span class="verb" data-testid="row-verb">checking...</span></li>
|
|
25
|
+
</ul>
|
|
26
|
+
<div class="actions">
|
|
27
|
+
<button id="primary-button" class="primary-button" data-testid="primary-button">Set up FRAIM</button>
|
|
28
|
+
</div>
|
|
29
|
+
<p class="status" id="status" role="status" aria-live="polite"></p>
|
|
30
|
+
</section>
|
|
31
|
+
</main>
|
|
32
|
+
<script src="/first-run/error-frame.js"></script>
|
|
33
|
+
<script src="/first-run/script.js"></script>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|