@konstantdotcloud/boombox 0.1.1 → 0.1.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/README.md +1 -1
- package/dist/boombox.js +28 -8
- package/dist/index.js +19 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ For MCP clients, add `boombox serve --mcp` after `boombox login` succeeds.
|
|
|
57
57
|
[konstant]
|
|
58
58
|
tenant_id = "example"
|
|
59
59
|
api_key = "kn_example_***"
|
|
60
|
-
gateway_url = "https://boombox.
|
|
60
|
+
gateway_url = "https://boombox-example.exe.xyz"
|
|
61
61
|
|
|
62
62
|
[runtime]
|
|
63
63
|
default_kind = "vm"
|
package/dist/boombox.js
CHANGED
|
@@ -36148,7 +36148,7 @@ var init_ask_gary = __esm({
|
|
|
36148
36148
|
thread_id: external_exports2.string().optional().describe("Concrete thread_id to use instead of resolving a named alias. Useful when continuing an artifact discussion thread."),
|
|
36149
36149
|
artifact_ref: external_exports2.string().optional().describe("Artifact id to pin as Gary context. Gary loads the artifact body and tags the resulting thread with artifact_ref."),
|
|
36150
36150
|
fresh: external_exports2.boolean().optional().describe("If true, rotate the thread alias to a brand-new conversation, discarding prior history under that alias."),
|
|
36151
|
-
model_tier: external_exports2.enum(["auto", "fast", "nano", "mini", "reason", "mid", "explore", "premium", "opus"]).optional().describe("Model tier override. Default 'explore' (Sonnet 4.6). Use 'premium' for
|
|
36151
|
+
model_tier: external_exports2.enum(["auto", "fast", "nano", "mini", "reason", "mid", "explore", "premium", "opus"]).optional().describe("Model tier override. Default 'explore' (Sonnet 4.6). Use 'premium' for Opus 4.8 at max thinking, 'opus' for Opus 4.8 standard."),
|
|
36152
36152
|
thinking_level: external_exports2.enum(["off", "minimal", "low", "medium", "high", "xhigh"]).optional().describe("Reasoning effort override. Default 'medium'."),
|
|
36153
36153
|
intent: external_exports2.enum(["cassette_author"]).optional().describe("Set to cassette_author to load Gary cassette-authoring mode prompt/doctrine.")
|
|
36154
36154
|
};
|
|
@@ -37480,7 +37480,10 @@ function normalizeProfile(value) {
|
|
|
37480
37480
|
}
|
|
37481
37481
|
function guessPathPrefix(baseUrl) {
|
|
37482
37482
|
if (!baseUrl) return "/api";
|
|
37483
|
-
if (/\.
|
|
37483
|
+
if (/\.exe\.(xyz|dev)/i.test(baseUrl)) {
|
|
37484
|
+
return /\/v2\/?$/.test(baseUrl) ? "/api" : "/v2/api";
|
|
37485
|
+
}
|
|
37486
|
+
if (/\.fly\.dev/i.test(baseUrl)) return "/api";
|
|
37484
37487
|
if (/\.konstant\.cloud/i.test(baseUrl)) return "/api";
|
|
37485
37488
|
if (/\.vercel\.app/i.test(baseUrl)) return "/api";
|
|
37486
37489
|
return "";
|
|
@@ -37606,7 +37609,7 @@ var {
|
|
|
37606
37609
|
init_esm_shims();
|
|
37607
37610
|
|
|
37608
37611
|
// package.json
|
|
37609
|
-
var version = "0.1.
|
|
37612
|
+
var version = "0.1.2";
|
|
37610
37613
|
|
|
37611
37614
|
// src/lib/version.ts
|
|
37612
37615
|
var BOOMBOX_VERSION = version;
|
|
@@ -42579,10 +42582,21 @@ function resolveGatewayTarget(config2) {
|
|
|
42579
42582
|
function normalizeUrl(url) {
|
|
42580
42583
|
return url.replace(/\/+$/, "");
|
|
42581
42584
|
}
|
|
42585
|
+
function gatewayApiPrefix(baseUrl) {
|
|
42586
|
+
if (!baseUrl) return "/api";
|
|
42587
|
+
if (/\.exe\.(xyz|dev)/i.test(baseUrl)) {
|
|
42588
|
+
return /\/v2\/?$/.test(baseUrl) ? "/api" : "/v2/api";
|
|
42589
|
+
}
|
|
42590
|
+
return "/api";
|
|
42591
|
+
}
|
|
42592
|
+
function resolveGatewayApiBase(config2) {
|
|
42593
|
+
const origin = resolveGatewayTarget(config2).url;
|
|
42594
|
+
return `${origin}${gatewayApiPrefix(origin)}`;
|
|
42595
|
+
}
|
|
42582
42596
|
|
|
42583
42597
|
// src/cli/_verify.ts
|
|
42584
42598
|
async function verifyAuth(config2, fetchImpl = fetch) {
|
|
42585
|
-
const url = `${
|
|
42599
|
+
const url = `${resolveGatewayApiBase(config2)}/gateway/rack/list`;
|
|
42586
42600
|
let res;
|
|
42587
42601
|
try {
|
|
42588
42602
|
res = await fetchImpl(url, {
|
|
@@ -42634,7 +42648,7 @@ async function runInit(options = {}) {
|
|
|
42634
42648
|
const preset = {
|
|
42635
42649
|
tenant_id: options.tenantId ?? enrollPayload?.tenant_id ?? existing?.konstant.tenant_id ?? "",
|
|
42636
42650
|
api_key: options.tenantApiKey ?? options.apiKey ?? enrollPayload?.tenant_api_key ?? enrollPayload?.api_key ?? existing?.konstant.api_key ?? "",
|
|
42637
|
-
gateway_url: options.gatewayUrl ?? enrollPayload?.gateway_url ?? existing?.konstant.gateway_url ??
|
|
42651
|
+
gateway_url: options.gatewayUrl ?? enrollPayload?.gateway_url ?? existing?.konstant.gateway_url ?? options.vmUrl ?? enrollPayload?.vm_url ?? existing?.runtime.vm_url ?? "",
|
|
42638
42652
|
vm_url: options.vmUrl ?? enrollPayload?.vm_url ?? existing?.runtime.vm_url ?? ""
|
|
42639
42653
|
};
|
|
42640
42654
|
log("Welcome to Konstant Boombox.");
|
|
@@ -43299,7 +43313,6 @@ var open_default = open;
|
|
|
43299
43313
|
|
|
43300
43314
|
// src/cli/enroll.ts
|
|
43301
43315
|
var DEFAULT_AUTH_BASE = "https://boombox.konstant.cloud";
|
|
43302
|
-
var DEFAULT_GATEWAY_BASE = "https://boombox.konstant.cloud/v2";
|
|
43303
43316
|
var DEFAULT_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
43304
43317
|
async function runEnroll(options = {}) {
|
|
43305
43318
|
const log = options.log ?? ((m) => console.log(m));
|
|
@@ -43325,8 +43338,13 @@ async function runEnroll(options = {}) {
|
|
|
43325
43338
|
log,
|
|
43326
43339
|
openBrowser: options.openBrowser
|
|
43327
43340
|
});
|
|
43328
|
-
const gatewayUrl = (options.gatewayUrl ?? payload.gateway_url ?? DEFAULT_GATEWAY_BASE).replace(/\/+$/, "");
|
|
43329
43341
|
const vmUrl = (options.vmUrl ?? payload.vm_url)?.replace(/\/+$/, "");
|
|
43342
|
+
const gatewayUrl = (options.gatewayUrl ?? payload.gateway_url ?? vmUrl ?? "").replace(/\/+$/, "");
|
|
43343
|
+
if (!gatewayUrl) {
|
|
43344
|
+
throw new Error(
|
|
43345
|
+
"Enrollment returned no gateway: neither gateway_url nor vm_url present. Provision a tenant VM (Mode 2) \u2014 the shared cloud gateway (Mode 1) is retired."
|
|
43346
|
+
);
|
|
43347
|
+
}
|
|
43330
43348
|
const apiKey = payload.tenant_api_key ?? payload.api_key;
|
|
43331
43349
|
const httpPort = existing?.boombox.http_port ?? DEFAULT_HTTP_PORT;
|
|
43332
43350
|
const config2 = BoomboxConfigSchema.parse({
|
|
@@ -48246,6 +48264,7 @@ function createOpsContext(options = {}) {
|
|
|
48246
48264
|
return {
|
|
48247
48265
|
config: config2,
|
|
48248
48266
|
gateway: resolveGateway(config2),
|
|
48267
|
+
gatewayApi: resolveGatewayApiBase(config2),
|
|
48249
48268
|
apiKey: config2.konstant.api_key,
|
|
48250
48269
|
tenant_id: config2.konstant.tenant_id,
|
|
48251
48270
|
fetchImpl: options.fetchImpl ?? fetch,
|
|
@@ -48265,7 +48284,8 @@ function joinUrl(base, path4) {
|
|
|
48265
48284
|
return `${cleanBase}${cleanPath}`;
|
|
48266
48285
|
}
|
|
48267
48286
|
async function fetchText(ctx, path4, options = {}) {
|
|
48268
|
-
const
|
|
48287
|
+
const base = path4.startsWith("/gateway") ? ctx.gatewayApi : ctx.gateway;
|
|
48288
|
+
const url = joinUrl(base, path4);
|
|
48269
48289
|
const headers = {
|
|
48270
48290
|
...options.auth === false ? {} : authHeaders(ctx, options.accept ?? "application/json"),
|
|
48271
48291
|
...options.headers ?? {}
|
package/dist/index.js
CHANGED
|
@@ -28219,7 +28219,7 @@ var init_ask_gary = __esm({
|
|
|
28219
28219
|
thread_id: external_exports2.string().optional().describe("Concrete thread_id to use instead of resolving a named alias. Useful when continuing an artifact discussion thread."),
|
|
28220
28220
|
artifact_ref: external_exports2.string().optional().describe("Artifact id to pin as Gary context. Gary loads the artifact body and tags the resulting thread with artifact_ref."),
|
|
28221
28221
|
fresh: external_exports2.boolean().optional().describe("If true, rotate the thread alias to a brand-new conversation, discarding prior history under that alias."),
|
|
28222
|
-
model_tier: external_exports2.enum(["auto", "fast", "nano", "mini", "reason", "mid", "explore", "premium", "opus"]).optional().describe("Model tier override. Default 'explore' (Sonnet 4.6). Use 'premium' for
|
|
28222
|
+
model_tier: external_exports2.enum(["auto", "fast", "nano", "mini", "reason", "mid", "explore", "premium", "opus"]).optional().describe("Model tier override. Default 'explore' (Sonnet 4.6). Use 'premium' for Opus 4.8 at max thinking, 'opus' for Opus 4.8 standard."),
|
|
28223
28223
|
thinking_level: external_exports2.enum(["off", "minimal", "low", "medium", "high", "xhigh"]).optional().describe("Reasoning effort override. Default 'medium'."),
|
|
28224
28224
|
intent: external_exports2.enum(["cassette_author"]).optional().describe("Set to cassette_author to load Gary cassette-authoring mode prompt/doctrine.")
|
|
28225
28225
|
};
|
|
@@ -29551,7 +29551,10 @@ function normalizeProfile(value) {
|
|
|
29551
29551
|
}
|
|
29552
29552
|
function guessPathPrefix(baseUrl) {
|
|
29553
29553
|
if (!baseUrl) return "/api";
|
|
29554
|
-
if (/\.
|
|
29554
|
+
if (/\.exe\.(xyz|dev)/i.test(baseUrl)) {
|
|
29555
|
+
return /\/v2\/?$/.test(baseUrl) ? "/api" : "/v2/api";
|
|
29556
|
+
}
|
|
29557
|
+
if (/\.fly\.dev/i.test(baseUrl)) return "/api";
|
|
29555
29558
|
if (/\.konstant\.cloud/i.test(baseUrl)) return "/api";
|
|
29556
29559
|
if (/\.vercel\.app/i.test(baseUrl)) return "/api";
|
|
29557
29560
|
return "";
|
|
@@ -34581,7 +34584,7 @@ init_esm_shims();
|
|
|
34581
34584
|
init_esm_shims();
|
|
34582
34585
|
|
|
34583
34586
|
// package.json
|
|
34584
|
-
var version = "0.1.
|
|
34587
|
+
var version = "0.1.2";
|
|
34585
34588
|
|
|
34586
34589
|
// src/lib/version.ts
|
|
34587
34590
|
var BOOMBOX_VERSION = version;
|
|
@@ -42608,6 +42611,17 @@ function resolveGatewayTarget(config2) {
|
|
|
42608
42611
|
function normalizeUrl(url) {
|
|
42609
42612
|
return url.replace(/\/+$/, "");
|
|
42610
42613
|
}
|
|
42614
|
+
function gatewayApiPrefix(baseUrl) {
|
|
42615
|
+
if (!baseUrl) return "/api";
|
|
42616
|
+
if (/\.exe\.(xyz|dev)/i.test(baseUrl)) {
|
|
42617
|
+
return /\/v2\/?$/.test(baseUrl) ? "/api" : "/v2/api";
|
|
42618
|
+
}
|
|
42619
|
+
return "/api";
|
|
42620
|
+
}
|
|
42621
|
+
function resolveGatewayApiBase(config2) {
|
|
42622
|
+
const origin = resolveGatewayTarget(config2).url;
|
|
42623
|
+
return `${origin}${gatewayApiPrefix(origin)}`;
|
|
42624
|
+
}
|
|
42611
42625
|
|
|
42612
42626
|
// src/server/proxy.ts
|
|
42613
42627
|
init_esm_shims();
|
|
@@ -42925,7 +42939,7 @@ import { readFileSync as readFileSync3 } from "fs";
|
|
|
42925
42939
|
// src/cli/_verify.ts
|
|
42926
42940
|
init_esm_shims();
|
|
42927
42941
|
async function verifyAuth(config2, fetchImpl = fetch) {
|
|
42928
|
-
const url = `${
|
|
42942
|
+
const url = `${resolveGatewayApiBase(config2)}/gateway/rack/list`;
|
|
42929
42943
|
let res;
|
|
42930
42944
|
try {
|
|
42931
42945
|
res = await fetchImpl(url, {
|
|
@@ -42977,7 +42991,7 @@ async function runInit(options = {}) {
|
|
|
42977
42991
|
const preset = {
|
|
42978
42992
|
tenant_id: options.tenantId ?? enrollPayload?.tenant_id ?? existing?.konstant.tenant_id ?? "",
|
|
42979
42993
|
api_key: options.tenantApiKey ?? options.apiKey ?? enrollPayload?.tenant_api_key ?? enrollPayload?.api_key ?? existing?.konstant.api_key ?? "",
|
|
42980
|
-
gateway_url: options.gatewayUrl ?? enrollPayload?.gateway_url ?? existing?.konstant.gateway_url ??
|
|
42994
|
+
gateway_url: options.gatewayUrl ?? enrollPayload?.gateway_url ?? existing?.konstant.gateway_url ?? options.vmUrl ?? enrollPayload?.vm_url ?? existing?.runtime.vm_url ?? "",
|
|
42981
42995
|
vm_url: options.vmUrl ?? enrollPayload?.vm_url ?? existing?.runtime.vm_url ?? ""
|
|
42982
42996
|
};
|
|
42983
42997
|
log("Welcome to Konstant Boombox.");
|
package/package.json
CHANGED