@senticor/hive 1.35.1 → 1.36.1
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/hive.cjs +117 -10
- package/package.json +1 -1
package/hive.cjs
CHANGED
|
@@ -7972,6 +7972,113 @@ function parsePastedCallback(input, expectedState) {
|
|
|
7972
7972
|
}
|
|
7973
7973
|
return trimmed2;
|
|
7974
7974
|
}
|
|
7975
|
+
var HIVE_MARK = `<svg class="mark" viewBox="3 4.3 26 23.4" width="56" height="50" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
|
7976
|
+
<defs>
|
|
7977
|
+
<linearGradient id="g" gradientUnits="userSpaceOnUse" x1="4" y1="4" x2="28" y2="28">
|
|
7978
|
+
<stop offset="0%" stop-color="#A78BFA"/><stop offset="30%" stop-color="#22D3EE"/>
|
|
7979
|
+
<stop offset="60%" stop-color="#8B5CF6"/><stop offset="100%" stop-color="#C084FC"/>
|
|
7980
|
+
</linearGradient>
|
|
7981
|
+
<radialGradient id="f" cx="50%" cy="50%" r="50%">
|
|
7982
|
+
<stop offset="0%" stop-color="#A78BFA" stop-opacity="0.08"/>
|
|
7983
|
+
<stop offset="70%" stop-color="#22D3EE" stop-opacity="0.04"/>
|
|
7984
|
+
<stop offset="100%" stop-color="#8B5CF6" stop-opacity="0.15"/>
|
|
7985
|
+
</radialGradient>
|
|
7986
|
+
<radialGradient id="c" cx="50%" cy="50%" r="50%">
|
|
7987
|
+
<stop offset="0%" stop-color="#fff" stop-opacity="0.9"/>
|
|
7988
|
+
<stop offset="40%" stop-color="#C084FC" stop-opacity="0.6"/>
|
|
7989
|
+
<stop offset="100%" stop-color="#22D3EE" stop-opacity="0"/>
|
|
7990
|
+
</radialGradient>
|
|
7991
|
+
</defs>
|
|
7992
|
+
<polygon points="26,16 21,24.7 11,24.7 6,16 11,7.3 21,7.3" fill="url(#f)"/>
|
|
7993
|
+
<polygon points="26,16 21,24.7 11,24.7 6,16 11,7.3 21,7.3" fill="none" stroke="url(#g)" stroke-width="1.5"/>
|
|
7994
|
+
<polygon points="16,11 20.5,13.5 20.5,18.5 16,21 11.5,18.5 11.5,13.5" fill="none" stroke="url(#g)" stroke-width="0.7" stroke-linejoin="round" opacity="0.5"/>
|
|
7995
|
+
<line x1="16" y1="16" x2="20.5" y2="13.5" stroke="url(#g)" stroke-width="0.6" stroke-linecap="round" stroke-dasharray="1.3 1" opacity="0.65"/>
|
|
7996
|
+
<line x1="16" y1="16" x2="16" y2="21" stroke="url(#g)" stroke-width="0.6" stroke-linecap="round" stroke-dasharray="1.3 1" opacity="0.65"/>
|
|
7997
|
+
<line x1="16" y1="16" x2="11.5" y2="13.5" stroke="url(#g)" stroke-width="0.6" stroke-linecap="round" stroke-dasharray="1.3 1" opacity="0.65"/>
|
|
7998
|
+
<circle cx="20.5" cy="13.5" r="1" fill="url(#g)" opacity="0.85"/>
|
|
7999
|
+
<circle cx="16" cy="21" r="1" fill="url(#g)" opacity="0.85"/>
|
|
8000
|
+
<circle cx="11.5" cy="13.5" r="1" fill="url(#g)" opacity="0.85"/>
|
|
8001
|
+
<circle cx="16" cy="16" r="2" fill="url(#c)" opacity="0.8"/>
|
|
8002
|
+
<circle cx="16" cy="16" r="1" fill="url(#c)"/>
|
|
8003
|
+
</svg>`;
|
|
8004
|
+
function callbackPage(msg, kind) {
|
|
8005
|
+
const ok = kind === "success";
|
|
8006
|
+
return `<!doctype html>
|
|
8007
|
+
<html lang="en">
|
|
8008
|
+
<head>
|
|
8009
|
+
<meta charset="utf-8">
|
|
8010
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
8011
|
+
<title>Cognitive Hive OS \u2014 ${ok ? "Signed in" : "Sign-in failed"}</title>
|
|
8012
|
+
<style>
|
|
8013
|
+
:root { color-scheme: dark; }
|
|
8014
|
+
* { box-sizing: border-box; }
|
|
8015
|
+
body {
|
|
8016
|
+
margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
|
|
8017
|
+
padding: 24px 16px; position: relative; overflow: hidden;
|
|
8018
|
+
background: linear-gradient(to bottom right, #020617, #0f172a, #020617);
|
|
8019
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
8020
|
+
"Helvetica Neue", Arial, sans-serif;
|
|
8021
|
+
color: #f1f5f9;
|
|
8022
|
+
}
|
|
8023
|
+
/* Ambient wash + dot grid, both pure CSS \u2014 see App.tsx LoginScreen. */
|
|
8024
|
+
.blob { position: absolute; width: 24rem; height: 24rem; border-radius: 50%; filter: blur(64px); pointer-events: none; }
|
|
8025
|
+
.blob-a { top: -10rem; right: -10rem; background: rgba(34, 211, 238, 0.06); }
|
|
8026
|
+
.blob-b { bottom: -10rem; left: -10rem; background: rgba(96, 165, 250, 0.06); }
|
|
8027
|
+
.grid {
|
|
8028
|
+
position: absolute; inset: 0; opacity: 0.025; pointer-events: none;
|
|
8029
|
+
background-image: radial-gradient(circle, rgba(255,255,255,0.9) 1px, transparent 1px);
|
|
8030
|
+
background-size: 40px 40px;
|
|
8031
|
+
}
|
|
8032
|
+
.card {
|
|
8033
|
+
position: relative; z-index: 1; width: 100%; max-width: 28rem; text-align: center;
|
|
8034
|
+
padding: 2.5rem 2rem;
|
|
8035
|
+
background: rgba(255, 255, 255, 0.04);
|
|
8036
|
+
-webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
|
|
8037
|
+
border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 1rem;
|
|
8038
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
|
|
8039
|
+
}
|
|
8040
|
+
.mark { display: block; margin: 0 auto 0.75rem; opacity: 0.9; }
|
|
8041
|
+
.wordmark { margin: 0 0 1.75rem; font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
|
|
8042
|
+
.wordmark span {
|
|
8043
|
+
background: linear-gradient(to right, #cbd5e1, #93c5fd, #67e8f9);
|
|
8044
|
+
-webkit-background-clip: text; background-clip: text; color: transparent;
|
|
8045
|
+
}
|
|
8046
|
+
h1 { margin: 0 0 0.5rem; font-size: 1.5rem; font-weight: 700; line-height: 1.25; color: #fff; }
|
|
8047
|
+
p { margin: 0; font-size: 0.875rem; line-height: 1.6; color: #94a3b8; }
|
|
8048
|
+
/* Error states borrow the Workbench alert treatment (App.tsx:251). */
|
|
8049
|
+
.alert {
|
|
8050
|
+
padding: 1rem; border-radius: 0.75rem;
|
|
8051
|
+
background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2);
|
|
8052
|
+
}
|
|
8053
|
+
.alert h1 { font-size: 1.125rem; color: #f87171; }
|
|
8054
|
+
code {
|
|
8055
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
8056
|
+
"Courier New", monospace;
|
|
8057
|
+
font-size: 0.8125rem; color: #cbd5e1;
|
|
8058
|
+
}
|
|
8059
|
+
.footer {
|
|
8060
|
+
margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.05);
|
|
8061
|
+
font-size: 0.75rem; color: #475569;
|
|
8062
|
+
}
|
|
8063
|
+
@media (max-width: 400px) { .card { padding: 2rem 1.25rem; } h1 { font-size: 1.25rem; } }
|
|
8064
|
+
</style>
|
|
8065
|
+
</head>
|
|
8066
|
+
<body>
|
|
8067
|
+
<div class="blob blob-a"></div>
|
|
8068
|
+
<div class="blob blob-b"></div>
|
|
8069
|
+
<div class="grid"></div>
|
|
8070
|
+
<main class="card">
|
|
8071
|
+
${HIVE_MARK}
|
|
8072
|
+
<div class="wordmark">Cognitive <span>Hive OS</span></div>
|
|
8073
|
+
<div${ok ? "" : ' class="alert"'}>
|
|
8074
|
+
<h1>${msg}</h1>
|
|
8075
|
+
<p>${ok ? "You can close this window and return to your terminal." : "You can close this window and run <code>hive login</code> again."}</p>
|
|
8076
|
+
</div>
|
|
8077
|
+
<p class="footer">© ${(/* @__PURE__ */ new Date()).getFullYear()} Senticor GmbH</p>
|
|
8078
|
+
</main>
|
|
8079
|
+
</body>
|
|
8080
|
+
</html>`;
|
|
8081
|
+
}
|
|
7975
8082
|
async function loginWithBrowser(issuerUrl, opts = {}) {
|
|
7976
8083
|
const issuer = issuerUrl || process.env.HIVE_OIDC_ISSUER_URL || DEFAULT_ISSUER;
|
|
7977
8084
|
const disco = await getDiscovery(issuer);
|
|
@@ -8016,14 +8123,14 @@ async function loginWithBrowser(issuerUrl, opts = {}) {
|
|
|
8016
8123
|
const u = new import_node_url.URL(req2.url || "/", "http://127.0.0.1");
|
|
8017
8124
|
if (u.pathname !== "/callback") {
|
|
8018
8125
|
res2.statusCode = 404;
|
|
8126
|
+
res2.setHeader("content-type", "text/plain; charset=utf-8");
|
|
8019
8127
|
res2.end("Not found");
|
|
8020
8128
|
return;
|
|
8021
8129
|
}
|
|
8022
|
-
const page = (msg) => `<html><body style="font-family:system-ui;padding:2rem"><h2>${msg}</h2><p>You can close this window.</p></body></html>`;
|
|
8023
8130
|
const fail = (m, e) => {
|
|
8024
8131
|
res2.statusCode = 400;
|
|
8025
|
-
res2.setHeader("content-type", "text/html");
|
|
8026
|
-
res2.end(
|
|
8132
|
+
res2.setHeader("content-type", "text/html; charset=utf-8");
|
|
8133
|
+
res2.end(callbackPage(m, "error"));
|
|
8027
8134
|
abort(e);
|
|
8028
8135
|
};
|
|
8029
8136
|
const err = u.searchParams.get("error");
|
|
@@ -8032,8 +8139,8 @@ async function loginWithBrowser(issuerUrl, opts = {}) {
|
|
|
8032
8139
|
const gotCode = u.searchParams.get("code");
|
|
8033
8140
|
if (!gotCode) return fail("No code received.", new Error("No authorization code in callback"));
|
|
8034
8141
|
res2.statusCode = 200;
|
|
8035
|
-
res2.setHeader("content-type", "text/html");
|
|
8036
|
-
res2.end(
|
|
8142
|
+
res2.setHeader("content-type", "text/html; charset=utf-8");
|
|
8143
|
+
res2.end(callbackPage("Signed in successfully.", "success"));
|
|
8037
8144
|
succeed(gotCode);
|
|
8038
8145
|
});
|
|
8039
8146
|
server.on("error", (e) => abort(e));
|
|
@@ -9014,22 +9121,22 @@ var artifactName = injectedString(
|
|
|
9014
9121
|
true ? "hive-cli" : void 0
|
|
9015
9122
|
) || String(process.env.HIVE_CLI_ARTIFACT_NAME || "hive-cli").trim() || "hive-cli";
|
|
9016
9123
|
var packageVersion = injectedString(
|
|
9017
|
-
true ? "1.
|
|
9124
|
+
true ? "1.36.1" : void 0
|
|
9018
9125
|
) || String(process.env.HIVE_CLI_PACKAGE_VERSION || "").trim() || readPackageVersion();
|
|
9019
9126
|
var releaseVersion = injectedString(
|
|
9020
|
-
true ? "1.
|
|
9127
|
+
true ? "1.36.1" : void 0
|
|
9021
9128
|
) || String(process.env.HIVE_CLI_RELEASE_VERSION || "").trim() || packageVersion || "dev";
|
|
9022
9129
|
var releaseChannel = injectedString(
|
|
9023
9130
|
true ? "final" : void 0
|
|
9024
9131
|
) || String(process.env.HIVE_CLI_RELEASE_CHANNEL || "").trim() || (releaseVersion.includes("-rc.") ? "rc" : releaseVersion === "dev" ? "dev" : "final");
|
|
9025
9132
|
var buildCommit = injectedString(
|
|
9026
|
-
true ? "
|
|
9133
|
+
true ? "d83bd85e0b6142369cb62854a36048bcb2a015ac" : void 0
|
|
9027
9134
|
) || String(process.env.HIVE_CLI_BUILD_COMMIT || "").trim() || "unknown";
|
|
9028
9135
|
var buildTimestamp = injectedString(
|
|
9029
|
-
true ? "2026-09-
|
|
9136
|
+
true ? "2026-09-13T16:42:54Z" : void 0
|
|
9030
9137
|
) || String(process.env.HIVE_CLI_BUILD_TIMESTAMP || "").trim() || "unknown";
|
|
9031
9138
|
var ociRef = injectedString(
|
|
9032
|
-
true ? "registry.onstackit.cloud/senticor/hive-cli:1.
|
|
9139
|
+
true ? "registry.onstackit.cloud/senticor/hive-cli:1.36.1" : void 0
|
|
9033
9140
|
) || String(process.env.HIVE_CLI_OCI_REF || "").trim() || `registry.onstackit.cloud/senticor/${artifactName}:${releaseVersion}`;
|
|
9034
9141
|
var RELEASE_INFO = Object.freeze({
|
|
9035
9142
|
packageVersion,
|