@runcore-sh/runcore 0.2.1 → 0.2.2
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/brain-template/knowledge/notes/tier-gated-ui-spec.md +187 -0
- package/brain-template/settings.json +3 -49
- package/dictionary.json +2 -2
- package/dist/instance.d.ts.map +1 -1
- package/dist/instance.js +3 -2
- package/dist/instance.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12 -1
- package/dist/server.js.map +1 -1
- package/dist/tier/types.d.ts +3 -0
- package/dist/tier/types.d.ts.map +1 -1
- package/dist/tier/types.js +12 -0
- package/dist/tier/types.js.map +1 -1
- package/package.json +1 -1
- package/public/index.html +62 -7
package/dist/tier/types.d.ts
CHANGED
|
@@ -18,6 +18,9 @@ export interface TierCapabilities {
|
|
|
18
18
|
alerting: boolean;
|
|
19
19
|
spawning: boolean;
|
|
20
20
|
governance: boolean;
|
|
21
|
+
vault: boolean;
|
|
22
|
+
voice: boolean;
|
|
23
|
+
integrations: boolean;
|
|
21
24
|
}
|
|
22
25
|
export declare const TIER_CAPS: Record<TierName, TierCapabilities>;
|
|
23
26
|
export interface ActivationToken {
|
package/dist/tier/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tier/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7D,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAK/C,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,E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B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/tier/types.js
CHANGED
|
@@ -23,6 +23,9 @@ export const TIER_CAPS = {
|
|
|
23
23
|
alerting: false,
|
|
24
24
|
spawning: false,
|
|
25
25
|
governance: false,
|
|
26
|
+
vault: false,
|
|
27
|
+
voice: false,
|
|
28
|
+
integrations: false,
|
|
26
29
|
},
|
|
27
30
|
byok: {
|
|
28
31
|
brain: true,
|
|
@@ -34,6 +37,9 @@ export const TIER_CAPS = {
|
|
|
34
37
|
alerting: true,
|
|
35
38
|
spawning: false,
|
|
36
39
|
governance: false,
|
|
40
|
+
vault: true,
|
|
41
|
+
voice: true,
|
|
42
|
+
integrations: true,
|
|
37
43
|
},
|
|
38
44
|
spawn: {
|
|
39
45
|
brain: true,
|
|
@@ -45,6 +51,9 @@ export const TIER_CAPS = {
|
|
|
45
51
|
alerting: true,
|
|
46
52
|
spawning: true,
|
|
47
53
|
governance: true,
|
|
54
|
+
vault: true,
|
|
55
|
+
voice: true,
|
|
56
|
+
integrations: true,
|
|
48
57
|
},
|
|
49
58
|
hosted: {
|
|
50
59
|
brain: true,
|
|
@@ -56,6 +65,9 @@ export const TIER_CAPS = {
|
|
|
56
65
|
alerting: true,
|
|
57
66
|
spawning: true,
|
|
58
67
|
governance: true,
|
|
68
|
+
vault: true,
|
|
69
|
+
voice: true,
|
|
70
|
+
integrations: true,
|
|
59
71
|
},
|
|
60
72
|
};
|
|
61
73
|
//# sourceMappingURL=types.js.map
|
package/dist/tier/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tier/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,CAAC,MAAM,UAAU,GAA6B;IAClD,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAA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EAAE,IAAI;KACnB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC"}
|
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -1896,7 +1896,7 @@
|
|
|
1896
1896
|
</div>
|
|
1897
1897
|
<div class="vault-body" id="vault-body">
|
|
1898
1898
|
<div style="text-align:center;margin-bottom:12px;">
|
|
1899
|
-
<a href="/registry" style="color:var(--accent);font-size:13px;text-decoration:none;">Manage Services & Capabilities →</a>
|
|
1899
|
+
<a href="/registry" style="color:var(--accent);font-size:13px;text-decoration:none;" data-requires="integrations">Manage Services & Capabilities →</a>
|
|
1900
1900
|
</div>
|
|
1901
1901
|
<!-- Identity section -->
|
|
1902
1902
|
<div class="settings-section">
|
|
@@ -1987,7 +1987,7 @@
|
|
|
1987
1987
|
</div>
|
|
1988
1988
|
</div>
|
|
1989
1989
|
<!-- Network / Mesh section -->
|
|
1990
|
-
<div class="settings-section" id="mesh-settings-section">
|
|
1990
|
+
<div class="settings-section" id="mesh-settings-section" data-requires="mesh">
|
|
1991
1991
|
<h3 class="settings-section-title">Network</h3>
|
|
1992
1992
|
<div class="toggle-row">
|
|
1993
1993
|
<div>
|
|
@@ -2015,7 +2015,7 @@
|
|
|
2015
2015
|
</div>
|
|
2016
2016
|
</div>
|
|
2017
2017
|
<!-- LLM Provider section -->
|
|
2018
|
-
<div class="settings-section" id="llm-settings-section">
|
|
2018
|
+
<div class="settings-section" id="llm-settings-section" data-requires="vault">
|
|
2019
2019
|
<h3 class="settings-section-title">LLM Provider</h3>
|
|
2020
2020
|
<div class="toggle-row">
|
|
2021
2021
|
<div>
|
|
@@ -2041,7 +2041,7 @@
|
|
|
2041
2041
|
</div>
|
|
2042
2042
|
</div>
|
|
2043
2043
|
<!-- Voice section -->
|
|
2044
|
-
<div class="settings-section" id="voice-settings-section">
|
|
2044
|
+
<div class="settings-section" id="voice-settings-section" data-requires="voice">
|
|
2045
2045
|
<h3 class="settings-section-title">Voice</h3>
|
|
2046
2046
|
<div class="toggle-row">
|
|
2047
2047
|
<div>
|
|
@@ -2079,7 +2079,7 @@
|
|
|
2079
2079
|
</div>
|
|
2080
2080
|
</div>
|
|
2081
2081
|
<!-- Google Workspace section -->
|
|
2082
|
-
<div class="settings-section" id="google-settings-section">
|
|
2082
|
+
<div class="settings-section" id="google-settings-section" data-requires="integrations">
|
|
2083
2083
|
<h3 class="settings-section-title">Google Workspace</h3>
|
|
2084
2084
|
<div class="toggle-row">
|
|
2085
2085
|
<div>
|
|
@@ -2093,7 +2093,7 @@
|
|
|
2093
2093
|
</div>
|
|
2094
2094
|
|
|
2095
2095
|
<!-- Task Board section -->
|
|
2096
|
-
<div class="settings-section" id="board-settings-section">
|
|
2096
|
+
<div class="settings-section" id="board-settings-section" data-requires="integrations">
|
|
2097
2097
|
<h3 class="settings-section-title">Task Board</h3>
|
|
2098
2098
|
<div class="toggle-row">
|
|
2099
2099
|
<div>
|
|
@@ -2105,7 +2105,7 @@
|
|
|
2105
2105
|
<p class="settings-hint" id="board-hint">Add <code>LINEAR_API_KEY</code> in the vault below to connect your Linear workspace. Use <code>issues</code> or <code>todo <title></code> in chat.</p>
|
|
2106
2106
|
</div>
|
|
2107
2107
|
<!-- Key Vault section -->
|
|
2108
|
-
<div class="settings-section">
|
|
2108
|
+
<div class="settings-section" data-requires="vault">
|
|
2109
2109
|
<h3 class="settings-section-title">Key Vault</h3>
|
|
2110
2110
|
<div class="vault-empty" id="vault-empty">No keys stored yet.</div>
|
|
2111
2111
|
<div id="vault-list"></div>
|
|
@@ -2855,6 +2855,58 @@
|
|
|
2855
2855
|
if (e.key === "Enter") document.getElementById("recover-btn").click();
|
|
2856
2856
|
});
|
|
2857
2857
|
|
|
2858
|
+
// --- Tier gating ---
|
|
2859
|
+
|
|
2860
|
+
// Remove UI sections the current tier can't support
|
|
2861
|
+
async function applyTierGating() {
|
|
2862
|
+
try {
|
|
2863
|
+
const { tier, capabilities } = await api('/api/tier');
|
|
2864
|
+
window.__TIER__ = tier;
|
|
2865
|
+
window.__CAPS__ = capabilities;
|
|
2866
|
+
|
|
2867
|
+
// Remove settings sections that require unavailable capabilities
|
|
2868
|
+
document.querySelectorAll('[data-requires]').forEach(el => {
|
|
2869
|
+
const cap = el.dataset.requires;
|
|
2870
|
+
if (!capabilities[cap]) el.remove();
|
|
2871
|
+
});
|
|
2872
|
+
|
|
2873
|
+
// Gate navigation links by tier
|
|
2874
|
+
const NAV_TIERS = {
|
|
2875
|
+
library: 'vault',
|
|
2876
|
+
personal: 'spawning',
|
|
2877
|
+
life: 'vault',
|
|
2878
|
+
registry: 'integrations',
|
|
2879
|
+
observatory: 'spawning',
|
|
2880
|
+
ops: 'spawning',
|
|
2881
|
+
board: 'integrations',
|
|
2882
|
+
roadmap: 'spawning',
|
|
2883
|
+
};
|
|
2884
|
+
|
|
2885
|
+
document.querySelectorAll('.header-nav a, nav a').forEach(link => {
|
|
2886
|
+
const href = link.getAttribute('href') || '';
|
|
2887
|
+
for (const [page, cap] of Object.entries(NAV_TIERS)) {
|
|
2888
|
+
if (href.includes(page) && !capabilities[cap]) {
|
|
2889
|
+
link.remove();
|
|
2890
|
+
break;
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
});
|
|
2894
|
+
|
|
2895
|
+
// Show upgrade hint for local tier
|
|
2896
|
+
if (tier === 'local') {
|
|
2897
|
+
const settingsPanel = document.querySelector('.vault-body');
|
|
2898
|
+
if (settingsPanel) {
|
|
2899
|
+
const hint = document.createElement('p');
|
|
2900
|
+
hint.style.cssText = 'font-size:13px;color:var(--text-dim,#666);margin-top:20px;text-align:center;';
|
|
2901
|
+
hint.innerHTML = 'Unlock cloud models, voice, and integrations → <code>runcore register</code>';
|
|
2902
|
+
settingsPanel.appendChild(hint);
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
} catch (e) {
|
|
2906
|
+
// Tier check failed — show everything (graceful degradation)
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2858
2910
|
// --- Chat ---
|
|
2859
2911
|
|
|
2860
2912
|
async function enterChat() {
|
|
@@ -2880,6 +2932,9 @@
|
|
|
2880
2932
|
showScreen("chat-screen");
|
|
2881
2933
|
chatInput.focus();
|
|
2882
2934
|
|
|
2935
|
+
// Apply tier-based UI gating (non-blocking)
|
|
2936
|
+
applyTierGating();
|
|
2937
|
+
|
|
2883
2938
|
// Load stored conversation history
|
|
2884
2939
|
try {
|
|
2885
2940
|
const data = await api("/api/history?sessionId=" + encodeURIComponent(sessionId));
|