@muxoai/platform 1.3.2 → 1.3.3
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 +1 -1
- package/dist/clerk.d.ts +2 -0
- package/dist/clerk.js +3 -0
- package/dist/cli.js +35 -14
- package/dist/sdk.d.ts +3 -1
- package/dist/sdk.js +2 -2
- package/dist/server.js +2 -1
- package/dist/ui/console-html.d.ts +7 -0
- package/dist/ui/console-html.js +50 -37
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Muxo (`@muxoai/platform` / `@muxoai/cli` / `@muxoai/sdk`)
|
|
2
2
|
|
|
3
|
-
Muxo (`v1.3.
|
|
3
|
+
Muxo (`v1.3.3`) is the unified execution, cloud infrastructure provisioning, contextual memory, and cryptographic governance platform for AI agents and applications. Customers and their agents interact exclusively with **Muxo** — either via structured tool slugs or free-form **Natural Language** (`muxo do`, `POST /api/v1/do`, `client.do()`, and MCP `plan_action`).
|
|
4
4
|
|
|
5
5
|
See [`ARCHITECTURE.md`](./ARCHITECTURE.md) for the complete internal engineering blueprint, open-source ecosystem Keep/Adopt/Drop matrix, and 4-pillar architecture.
|
|
6
6
|
|
package/dist/clerk.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export interface ClerkProfile {
|
|
|
15
15
|
email: string | null;
|
|
16
16
|
emailVerified: boolean;
|
|
17
17
|
name: string | null;
|
|
18
|
+
/** Every verified address on the account, lowercased, primary included. */
|
|
19
|
+
verifiedEmails: string[];
|
|
18
20
|
}
|
|
19
21
|
export interface ClerkEnv {
|
|
20
22
|
CLERK_PUBLISHABLE_KEY?: string;
|
package/dist/clerk.js
CHANGED
|
@@ -187,6 +187,9 @@ export async function fetchClerkProfile(userId, secretKey) {
|
|
|
187
187
|
email: primary?.email_address ? primary.email_address.toLowerCase() : null,
|
|
188
188
|
emailVerified: primary?.verification?.status === "verified",
|
|
189
189
|
name,
|
|
190
|
+
verifiedEmails: addresses
|
|
191
|
+
.filter((e) => e.email_address && e.verification?.status === "verified")
|
|
192
|
+
.map((e) => e.email_address.toLowerCase()),
|
|
190
193
|
};
|
|
191
194
|
}
|
|
192
195
|
catch {
|
package/dist/cli.js
CHANGED
|
@@ -110,6 +110,9 @@ async function runCli() {
|
|
|
110
110
|
body: opts?.body !== undefined ? JSON.stringify(opts.body) : undefined,
|
|
111
111
|
});
|
|
112
112
|
const data = (await res.json().catch(() => ({})));
|
|
113
|
+
if (opts?.acceptPaymentRequired && res.status === 402 && data.checkoutUrl) {
|
|
114
|
+
return data;
|
|
115
|
+
}
|
|
113
116
|
if (!res.ok && data.error) {
|
|
114
117
|
throw new Error(String(data.error));
|
|
115
118
|
}
|
|
@@ -171,6 +174,23 @@ async function runCli() {
|
|
|
171
174
|
};
|
|
172
175
|
return { store, engine: getEngine(), ctx, tokenAuth };
|
|
173
176
|
};
|
|
177
|
+
const maskKey = (key) => `${key.slice(0, 14)}…`;
|
|
178
|
+
// Hosted Muxo answers purchases with 402 + a Stripe Checkout URL; a self-hosted dev server may grant credits directly.
|
|
179
|
+
const printBillingResult = (data) => {
|
|
180
|
+
if (!data.checkoutUrl) {
|
|
181
|
+
console.log(JSON.stringify(data, null, 2));
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
console.log(JSON.stringify({
|
|
185
|
+
ok: true,
|
|
186
|
+
paymentRequired: true,
|
|
187
|
+
kind: data.kind,
|
|
188
|
+
credits: data.credits,
|
|
189
|
+
checkoutUrl: data.checkoutUrl,
|
|
190
|
+
sessionId: data.sessionId,
|
|
191
|
+
next: `Open checkoutUrl to pay with Stripe. Muxo adds the credits once Stripe confirms the payment. Check with: muxo billing verify ${data.sessionId}`,
|
|
192
|
+
}, null, 2));
|
|
193
|
+
};
|
|
174
194
|
// CLI Login / Autonomous External Signup (`muxo login`)
|
|
175
195
|
if (cmd === "login" || cmd === "signup") {
|
|
176
196
|
const explicitKey = typeof flags["api-key"] === "string"
|
|
@@ -203,6 +223,7 @@ async function runCli() {
|
|
|
203
223
|
configPath: cfgPath,
|
|
204
224
|
workspace: ws,
|
|
205
225
|
...authPayload,
|
|
226
|
+
apiKey: maskKey(explicitKey),
|
|
206
227
|
}, null, 2));
|
|
207
228
|
return;
|
|
208
229
|
}
|
|
@@ -227,6 +248,7 @@ async function runCli() {
|
|
|
227
248
|
mode: "api_key",
|
|
228
249
|
configPath: cfgPath,
|
|
229
250
|
...authPayload,
|
|
251
|
+
apiKey: maskKey(explicitKey),
|
|
230
252
|
}, null, 2));
|
|
231
253
|
return;
|
|
232
254
|
}
|
|
@@ -402,7 +424,7 @@ async function runCli() {
|
|
|
402
424
|
else {
|
|
403
425
|
console.log(`\n✓ Muxo is ready!`);
|
|
404
426
|
console.log(` Workspace : ${ensuredConfig.workspaceName} (${ensuredConfig.workspaceId})`);
|
|
405
|
-
console.log(` API Key : ${ensuredConfig.apiKey}`);
|
|
427
|
+
console.log(` API Key : ${maskKey(ensuredConfig.apiKey)} (saved in ${getCliConfigPath()})`);
|
|
406
428
|
console.log(` MCP URL : ${mcpServerUrl}`);
|
|
407
429
|
console.log(` MCP Config: ${writtenFiles.join(", ")}`);
|
|
408
430
|
console.log(`\nTry it now:`);
|
|
@@ -1183,8 +1205,9 @@ async function runCli() {
|
|
|
1183
1205
|
const data = await remoteFetch("/api/v1/billing/topup", {
|
|
1184
1206
|
method: "POST",
|
|
1185
1207
|
body: { credits },
|
|
1208
|
+
acceptPaymentRequired: true,
|
|
1186
1209
|
});
|
|
1187
|
-
|
|
1210
|
+
printBillingResult(data);
|
|
1188
1211
|
return;
|
|
1189
1212
|
}
|
|
1190
1213
|
const { store, ctx } = getLocalContext();
|
|
@@ -1211,8 +1234,9 @@ async function runCli() {
|
|
|
1211
1234
|
const data = await remoteFetch("/api/v1/billing/upgrade", {
|
|
1212
1235
|
method: "POST",
|
|
1213
1236
|
body: { tier: "starter", bonusCredits: 1000 },
|
|
1237
|
+
acceptPaymentRequired: true,
|
|
1214
1238
|
});
|
|
1215
|
-
|
|
1239
|
+
printBillingResult(data);
|
|
1216
1240
|
return;
|
|
1217
1241
|
}
|
|
1218
1242
|
const { store, ctx } = getLocalContext();
|
|
@@ -1483,21 +1507,18 @@ async function runCli() {
|
|
|
1483
1507
|
}
|
|
1484
1508
|
if (choice === "3") {
|
|
1485
1509
|
const action = (await promptUserLine("Type 'upgrade' for Starter Plan or credit amount (default 1000): ")).toLowerCase();
|
|
1486
|
-
|
|
1487
|
-
|
|
1510
|
+
const up = action === "upgrade"
|
|
1511
|
+
? await remoteFetch("/api/v1/billing/upgrade", {
|
|
1488
1512
|
method: "POST",
|
|
1489
1513
|
body: { tier: "starter", bonusCredits: 1000 },
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
else {
|
|
1494
|
-
const cr = Math.max(100, Number(action) || 1000);
|
|
1495
|
-
const up = await remoteFetch("/api/v1/billing/topup", {
|
|
1514
|
+
acceptPaymentRequired: true,
|
|
1515
|
+
})
|
|
1516
|
+
: await remoteFetch("/api/v1/billing/topup", {
|
|
1496
1517
|
method: "POST",
|
|
1497
|
-
body: { credits:
|
|
1518
|
+
body: { credits: Math.max(100, Number(action) || 1000) },
|
|
1519
|
+
acceptPaymentRequired: true,
|
|
1498
1520
|
});
|
|
1499
|
-
|
|
1500
|
-
}
|
|
1521
|
+
printBillingResult(up);
|
|
1501
1522
|
return;
|
|
1502
1523
|
}
|
|
1503
1524
|
if (choice === "4") {
|
package/dist/sdk.d.ts
CHANGED
|
@@ -404,11 +404,13 @@ export declare class MuxoClient {
|
|
|
404
404
|
workspace: Workspace;
|
|
405
405
|
settlementSummary: SupplierSettlementSummary;
|
|
406
406
|
}>;
|
|
407
|
-
createCheckoutSession(kind?: "starter_subscription" | "credit_topup"): Promise<{
|
|
407
|
+
createCheckoutSession(kind?: "starter_subscription" | "credit_topup", credits?: number): Promise<{
|
|
408
408
|
ok: true;
|
|
409
409
|
sessionId: string;
|
|
410
410
|
url: string;
|
|
411
411
|
mode?: string;
|
|
412
|
+
kind?: string;
|
|
413
|
+
credits?: number;
|
|
412
414
|
}>;
|
|
413
415
|
verifyCheckoutSession(sessionId: string): Promise<{
|
|
414
416
|
ok: true;
|
package/dist/sdk.js
CHANGED
|
@@ -366,10 +366,10 @@ export class MuxoClient {
|
|
|
366
366
|
body: {},
|
|
367
367
|
});
|
|
368
368
|
}
|
|
369
|
-
async createCheckoutSession(kind = "credit_topup") {
|
|
369
|
+
async createCheckoutSession(kind = "credit_topup", credits) {
|
|
370
370
|
return this.request("/api/v1/billing/checkout", {
|
|
371
371
|
method: "POST",
|
|
372
|
-
body: { kind },
|
|
372
|
+
body: credits === undefined ? { kind } : { kind, credits },
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
async verifyCheckoutSession(sessionId) {
|
package/dist/server.js
CHANGED
|
@@ -693,7 +693,8 @@ Users purchase Muxo Credits (\`POST /api/v1/billing/topup\` or \`muxo billing to
|
|
|
693
693
|
<div class="badge">Ownership Bound</div>
|
|
694
694
|
<h1>Workspace Claimed</h1>
|
|
695
695
|
<p>Workspace <code>${redeemed.workspace.name}</code> (${redeemed.workspace.id}) claimed by <strong>${redeemed.targetEmail}</strong>.</p>
|
|
696
|
-
<
|
|
696
|
+
<p>Console key: <code>${claimConsoleKey}</code><br />Choose “Use an API key instead” in the console and paste it.</p>
|
|
697
|
+
<a class="btn" href="/?claimed=${encodeURIComponent(redeemed.workspace.slug)}">Open Muxo Console →</a>
|
|
697
698
|
</div>
|
|
698
699
|
</body>
|
|
699
700
|
</html>`);
|
|
@@ -13,6 +13,13 @@ export interface OAuthConsentOptions {
|
|
|
13
13
|
frontendApi: string;
|
|
14
14
|
} | null;
|
|
15
15
|
request?: Record<string, string>;
|
|
16
|
+
/** Renders the workspace-claim variant, which posts to `action` instead of /oauth/authorize. */
|
|
17
|
+
claim?: {
|
|
18
|
+
workspaceName: string;
|
|
19
|
+
targetEmail: string;
|
|
20
|
+
action: string;
|
|
21
|
+
cancelUrl: string;
|
|
22
|
+
};
|
|
16
23
|
}
|
|
17
24
|
/** Consent screen for MCP clients (ChatGPT, Claude, CLIs) asking to use a Muxo workspace. */
|
|
18
25
|
export declare function renderOAuthConsentHtml(opts: OAuthConsentOptions): string;
|
package/dist/ui/console-html.js
CHANGED
|
@@ -238,6 +238,10 @@ body:has(dialog[open]){overflow:hidden}
|
|
|
238
238
|
.auth-alt{margin-top:12px}
|
|
239
239
|
.row-actions{display:inline-flex;align-items:center;gap:8px;flex:none}
|
|
240
240
|
.clerk-auth{display:flex;justify-content:center;min-height:120px;margin-top:20px;text-align:left}
|
|
241
|
+
.clerk-loading{display:flex;align-items:center;gap:10px;align-self:center;margin:0;color:var(--color-muted);font-size:15px}
|
|
242
|
+
.spinner{flex:none;width:18px;height:18px;border:2px solid var(--color-border);border-top-color:var(--color-text);border-radius:50%;animation:muxo-spin .8s linear infinite}
|
|
243
|
+
@keyframes muxo-spin{to{transform:rotate(360deg)}}
|
|
244
|
+
@media (prefers-reduced-motion:reduce){.spinner{animation:none}}
|
|
241
245
|
.auth-switch{margin-top:4px}
|
|
242
246
|
.auth-switch:has([hidden]){display:none}
|
|
243
247
|
.auth-foot{margin-top:16px;color:var(--color-muted);font-size:12px}
|
|
@@ -535,14 +539,20 @@ async function loadAuth() {
|
|
|
535
539
|
});
|
|
536
540
|
} catch (err) {
|
|
537
541
|
clerk = null;
|
|
542
|
+
removeClerkLoading();
|
|
538
543
|
setText('auth-error', err.message);
|
|
539
544
|
}
|
|
540
545
|
}
|
|
546
|
+
function removeClerkLoading() {
|
|
547
|
+
var loading = byId('clerk-loading');
|
|
548
|
+
if (loading) loading.remove();
|
|
549
|
+
}
|
|
541
550
|
function mountClerkAuth(view) {
|
|
542
551
|
if (!clerk || !clerk.loaded || clerkSignedIn()) return;
|
|
543
552
|
var key = view === 'signup' ? 'signup' : 'login';
|
|
544
553
|
if (clerkMounted === key) return;
|
|
545
554
|
unmountClerkAuth();
|
|
555
|
+
removeClerkLoading();
|
|
546
556
|
var target = location.origin + '/';
|
|
547
557
|
var opts = { routing: 'hash', forceRedirectUrl: target, signInForceRedirectUrl: target, signUpForceRedirectUrl: target, appearance: clerkAppearance() };
|
|
548
558
|
if (key === 'signup') clerk.mountSignUp(byId('clerk-auth'), opts); else clerk.mountSignIn(byId('clerk-auth'), opts);
|
|
@@ -1409,19 +1419,6 @@ async function runNaturalLanguagePrompt() {
|
|
|
1409
1419
|
throw err;
|
|
1410
1420
|
}
|
|
1411
1421
|
}
|
|
1412
|
-
async function instantUpgradeStarter() {
|
|
1413
|
-
var res = await post('/api/v1/billing/upgrade', { tier: 'starter' });
|
|
1414
|
-
showToast(res.message || 'Upgraded to the Starter plan');
|
|
1415
|
-
await refreshOverview();
|
|
1416
|
-
await loadLedger();
|
|
1417
|
-
}
|
|
1418
|
-
async function instantTopupCustom() {
|
|
1419
|
-
var credits = Math.max(1, Number(byId('topup-credits-input').value || 1000));
|
|
1420
|
-
var res = await post('/api/v1/billing/topup', { credits: credits });
|
|
1421
|
-
showToast('Added ' + fmt(res.creditsAdded) + ' credits' + (res.usdPaid != null ? ' ($' + Number(res.usdPaid).toFixed(2) + ')' : ''));
|
|
1422
|
-
await refreshOverview();
|
|
1423
|
-
await loadLedger();
|
|
1424
|
-
}
|
|
1425
1422
|
async function startCheckout(kind) {
|
|
1426
1423
|
showToast('Opening Stripe Checkout…');
|
|
1427
1424
|
var credits = Math.max(100, Number(byId('topup-credits-input').value || 1000));
|
|
@@ -1435,13 +1432,19 @@ async function checkCheckoutReturn() {
|
|
|
1435
1432
|
var sessionId = params.get('session_id');
|
|
1436
1433
|
if (params.get('checkout') === 'success' && sessionId) {
|
|
1437
1434
|
clean = true;
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1435
|
+
if (isSignedIn()) {
|
|
1436
|
+
try {
|
|
1437
|
+
var res = await post('/api/v1/billing/verify-session', { sessionId: sessionId });
|
|
1438
|
+
showToast(res.fulfilled ? 'Payment confirmed. Your workspace has been updated.' : 'Payment is processing. Credits appear as soon as Stripe confirms it.');
|
|
1439
|
+
} catch (err) { showToast(err.message, 'danger'); }
|
|
1440
|
+
} else {
|
|
1441
|
+
showToast('Payment received. Sign in to see your updated balance.');
|
|
1442
|
+
}
|
|
1442
1443
|
}
|
|
1444
|
+
if (params.get('checkout') === 'cancelled') { clean = true; showToast('Checkout cancelled. You were not charged.'); }
|
|
1443
1445
|
if (params.get('connected')) { clean = true; showToast(params.get('connected') + ' is connected'); }
|
|
1444
|
-
|
|
1446
|
+
// Keys are never accepted from the URL: a crafted link could sign a person into someone else's workspace.
|
|
1447
|
+
if (params.get('api_key')) clean = true;
|
|
1445
1448
|
if (params.get('claimed')) { clean = true; showToast('You now own this workspace (' + params.get('claimed') + ')'); }
|
|
1446
1449
|
if (clean) window.history.replaceState({}, '', window.location.pathname);
|
|
1447
1450
|
}
|
|
@@ -1479,8 +1482,6 @@ var ACTIONS = {
|
|
|
1479
1482
|
'refresh-runs': loadRuns,
|
|
1480
1483
|
'inspect-receipt': function (el) { return inspectReceipt(el.dataset.id); },
|
|
1481
1484
|
'checkout': function (el) { return startCheckout(el.dataset.kind); },
|
|
1482
|
-
'instant-upgrade': instantUpgradeStarter,
|
|
1483
|
-
'instant-topup': instantTopupCustom,
|
|
1484
1485
|
'delete-byok': function (el) { return deleteByokKeyFromUi(el.dataset.provider); },
|
|
1485
1486
|
'plan-only': submitPlanOnly,
|
|
1486
1487
|
'plan-run': submitPlanAndExecute,
|
|
@@ -2067,7 +2068,6 @@ export function renderConsoleHtml() {
|
|
|
2067
2068
|
</ul>
|
|
2068
2069
|
<div class="page-actions">
|
|
2069
2070
|
<button class="btn btn-primary" type="button" data-action="checkout" data-kind="starter_subscription">Upgrade with Stripe</button>
|
|
2070
|
-
<button class="btn" type="button" data-action="instant-upgrade">Upgrade now (test mode)</button>
|
|
2071
2071
|
</div>
|
|
2072
2072
|
</div>
|
|
2073
2073
|
<div class="panel">
|
|
@@ -2075,7 +2075,6 @@ export function renderConsoleHtml() {
|
|
|
2075
2075
|
<label class="field"><span>Credits</span><input id="topup-credits-input" type="number" value="1000" min="100" step="100" inputmode="numeric" /><small class="field-help">1,000 credits cost $10.</small></label>
|
|
2076
2076
|
<div class="page-actions" style="margin-top:16px">
|
|
2077
2077
|
<button class="btn btn-primary" type="button" data-action="checkout" data-kind="credit_topup">Pay with Stripe</button>
|
|
2078
|
-
<button class="btn" type="button" data-action="instant-topup">Add now (test mode)</button>
|
|
2079
2078
|
</div>
|
|
2080
2079
|
</div>
|
|
2081
2080
|
</div>
|
|
@@ -2139,7 +2138,7 @@ export function renderConsoleHtml() {
|
|
|
2139
2138
|
<p id="auth-error" class="field-error" role="alert"></p>
|
|
2140
2139
|
<button id="auth-submit" class="btn btn-primary btn-lg btn-block" type="submit">Sign in</button>
|
|
2141
2140
|
</form>
|
|
2142
|
-
<div id="clerk-auth" class="clerk-auth" hidden></div>
|
|
2141
|
+
<div id="clerk-auth" class="clerk-auth" hidden><p id="clerk-loading" class="clerk-loading" role="status"><span class="spinner" aria-hidden="true"></span>Loading sign-in…</p></div>
|
|
2143
2142
|
<p class="auth-switch"><button id="auth-switch-link" class="btn btn-quiet btn-sm" type="button" data-action="auth-mode" data-mode="signup" hidden>New to Muxo? Create an account</button></p>
|
|
2144
2143
|
<div class="auth-alt"><button class="btn btn-quiet" type="button" data-action="switch-workspace">${uiIcon("key")}Use an API key instead</button></div>
|
|
2145
2144
|
<p class="auth-foot">Setting up an agent? Run <code>npx -y @muxoai/cli@latest login --signup</code></p>
|
|
@@ -2450,20 +2449,21 @@ const consentScript = String.raw `
|
|
|
2450
2449
|
}
|
|
2451
2450
|
async function decide(decision) {
|
|
2452
2451
|
if (busy) return;
|
|
2452
|
+
if (decision === 'deny' && C.cancelUrl) { location.assign(C.cancelUrl); return; }
|
|
2453
2453
|
busy = true;
|
|
2454
2454
|
fail('');
|
|
2455
2455
|
byId('consent-allow').disabled = true;
|
|
2456
2456
|
byId('consent-deny').disabled = true;
|
|
2457
2457
|
try {
|
|
2458
2458
|
var token = await clerk.session.getToken();
|
|
2459
|
-
var res = await fetch('/oauth/authorize', {
|
|
2459
|
+
var res = await fetch(C.action || '/oauth/authorize', {
|
|
2460
2460
|
method: 'POST',
|
|
2461
2461
|
headers: { 'Content-Type': 'application/json', Authorization: 'Bearer ' + token },
|
|
2462
2462
|
body: JSON.stringify(Object.assign({}, C.request, { decision: decision }))
|
|
2463
2463
|
});
|
|
2464
2464
|
var data = await res.json().catch(function () { return {}; });
|
|
2465
2465
|
if (!res.ok || !data.redirect) throw new Error(data.error || 'Muxo could not finish this request. Try again.');
|
|
2466
|
-
byId(decision === 'allow' ? 'consent-allow' : 'consent-deny').textContent = decision === 'allow' ? 'Returning…' : 'Cancelling…';
|
|
2466
|
+
byId(decision === 'allow' ? 'consent-allow' : 'consent-deny').textContent = decision === 'allow' ? (C.action ? 'Opening…' : 'Returning…') : 'Cancelling…';
|
|
2467
2467
|
location.assign(data.redirect);
|
|
2468
2468
|
} catch (err) {
|
|
2469
2469
|
fail(err.message);
|
|
@@ -2501,7 +2501,7 @@ export function renderOAuthConsentHtml(opts) {
|
|
|
2501
2501
|
<head>
|
|
2502
2502
|
<meta charset="utf-8" />
|
|
2503
2503
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
2504
|
-
<title>${opts.error ? "Connection problem" : `Connect ${clientNameMidSentence}`} · Muxo</title>
|
|
2504
|
+
<title>${opts.error ? (opts.claim ? "Claim problem" : "Connection problem") : opts.claim ? `Claim ${escapeHtml(opts.claim.workspaceName)}` : `Connect ${clientNameMidSentence}`} · Muxo</title>
|
|
2505
2505
|
<meta name="theme-color" content="${muxoThemes.light.bg}" />
|
|
2506
2506
|
<meta name="color-scheme" content="light dark" />
|
|
2507
2507
|
<meta name="robots" content="noindex" />
|
|
@@ -2515,30 +2515,43 @@ export function renderOAuthConsentHtml(opts) {
|
|
|
2515
2515
|
<main class="auth-view">
|
|
2516
2516
|
<div class="auth-card">
|
|
2517
2517
|
<div class="auth-mark">${muxoMark}</div>
|
|
2518
|
-
<h1
|
|
2518
|
+
<h1>${opts.claim ? "This claim link isn't valid" : "This connection link isn't valid"}</h1>
|
|
2519
2519
|
<p class="lede">${escapeHtml(opts.error)}</p>
|
|
2520
|
-
<p class="auth-foot"
|
|
2520
|
+
<p class="auth-foot">${opts.claim ? "Ask the agent for a new claim link" : "Start the connection again from your app"}, or <a href="${DOCS_URL}">read the setup guide</a>.</p>
|
|
2521
2521
|
</div>
|
|
2522
2522
|
</main>
|
|
2523
2523
|
</body>
|
|
2524
2524
|
</html>`;
|
|
2525
2525
|
}
|
|
2526
|
+
const claim = opts.claim;
|
|
2526
2527
|
const config = {
|
|
2527
2528
|
clerk: opts.clerk || null,
|
|
2528
2529
|
request: opts.request || {},
|
|
2530
|
+
action: claim?.action,
|
|
2531
|
+
cancelUrl: claim?.cancelUrl,
|
|
2529
2532
|
};
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
<
|
|
2534
|
-
|
|
2533
|
+
const intro = claim
|
|
2534
|
+
? `<h1>Claim ${escapeHtml(claim.workspaceName)}</h1>
|
|
2535
|
+
<p class="lede">An agent created this Muxo workspace and invited you to own it.</p>
|
|
2536
|
+
<ul class="consent-list">
|
|
2537
|
+
<li>You become the owner of this workspace and its credits</li>
|
|
2538
|
+
<li>You manage its keys, safety rules, memory, and billing</li>
|
|
2539
|
+
<li>The agent keeps working with its key until you revoke it</li>
|
|
2540
|
+
</ul>
|
|
2541
|
+
<p class="consent-redirect">Sign in as <strong>${escapeHtml(claim.targetEmail)}</strong> to accept.</p>`
|
|
2542
|
+
: `<h1>Connect ${clientNameMidSentence} to Muxo</h1>
|
|
2535
2543
|
<p class="lede">${clientName} wants to use your Muxo workspace.</p>
|
|
2536
2544
|
<ul class="consent-list">
|
|
2537
2545
|
<li>Find tools and plan actions in your workspace</li>
|
|
2538
2546
|
<li>Run tools under your workspace's safety rules and approvals</li>
|
|
2539
2547
|
<li>Read the status of connections, plans, and runs</li>
|
|
2540
2548
|
</ul>
|
|
2541
|
-
<p class="consent-redirect">After you decide, you'll return to <strong>${escapeHtml(opts.redirectOrigin || "")}</strong></p
|
|
2549
|
+
<p class="consent-redirect">After you decide, you'll return to <strong>${escapeHtml(opts.redirectOrigin || "")}</strong></p>`;
|
|
2550
|
+
return `${head}
|
|
2551
|
+
<main class="auth-view">
|
|
2552
|
+
<div class="auth-card">
|
|
2553
|
+
<div class="auth-mark">${muxoMark}</div>
|
|
2554
|
+
${intro}
|
|
2542
2555
|
<div class="consent-state">
|
|
2543
2556
|
<p id="consent-loading" class="muted">Checking your sign-in…</p>
|
|
2544
2557
|
<div id="consent-signin" hidden>
|
|
@@ -2548,14 +2561,14 @@ export function renderOAuthConsentHtml(opts) {
|
|
|
2548
2561
|
<div id="consent-approve" hidden>
|
|
2549
2562
|
<p class="consent-account">Signed in as <strong id="consent-email"></strong></p>
|
|
2550
2563
|
<div class="consent-actions">
|
|
2551
|
-
<button id="consent-deny" class="btn btn-lg" type="button"
|
|
2552
|
-
<button id="consent-allow" class="btn btn-primary btn-lg" type="button"
|
|
2564
|
+
<button id="consent-deny" class="btn btn-lg" type="button">${claim ? "Not now" : "Cancel"}</button>
|
|
2565
|
+
<button id="consent-allow" class="btn btn-primary btn-lg" type="button">${claim ? "Claim workspace" : "Allow"}</button>
|
|
2553
2566
|
</div>
|
|
2554
2567
|
<p class="consent-switch"><button id="consent-switch" class="btn btn-quiet btn-sm" type="button">Use a different account</button></p>
|
|
2555
2568
|
</div>
|
|
2556
2569
|
<p id="consent-error" class="field-error" role="alert"></p>
|
|
2557
2570
|
</div>
|
|
2558
|
-
<p class="auth-foot"
|
|
2571
|
+
<p class="auth-foot">${claim ? "Only the invited email can claim this workspace, and the link works once." : "You can remove this connection anytime by deleting its key in the Muxo console."}</p>
|
|
2559
2572
|
</div>
|
|
2560
2573
|
</main>
|
|
2561
2574
|
<script>window.MUXO_CONSENT = ${inlineJson(config)};${consentScript}</script>
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MUXO_VERSION = "1.3.
|
|
1
|
+
export declare const MUXO_VERSION = "1.3.3";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MUXO_VERSION = "1.3.
|
|
1
|
+
export const MUXO_VERSION = "1.3.3";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muxoai/platform",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Muxo — Unified Execution, Provisioning & Governance Platform over Composio, Stripe Projects, Microsoft Agent Governance & Supermemory",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|