@symerian/symi 2.6.5 → 2.6.7
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/dist/{audio-preflight-DHTaS5U1.js → audio-preflight-BVaaZWkg.js} +4 -4
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +6 -6
- package/dist/bundled/session-memory/handler.js +6 -6
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{chrome-DYZwl5Gv.js → chrome-DkaXoP36.js} +7 -7
- package/dist/{command-registry-DeOD2MdC.js → command-registry-DJbyskBr.js} +4 -4
- package/dist/{completion-cli-B6IpFueu.js → completion-cli-Dfw9JhkN.js} +2 -2
- package/dist/{completion-cli-D9rF4Hsw.js → completion-cli-DosOadUD.js} +1 -1
- package/dist/control-ui/js/app.js +8 -0
- package/dist/{deliver-dODxSv3b.js → deliver-C46-vyqg.js} +1 -1
- package/dist/{doctor-completion-DIKftJUc.js → doctor-completion-DRucwWSo.js} +1 -1
- package/dist/{doctor-completion-CmxVAo2o.js → doctor-completion-Xx92Sz9s.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{gateway-cli-DEPCdrmX.js → gateway-cli-D3kGHw5M.js} +165 -30
- package/dist/{gateway-cli-CSOiySht.js → gateway-cli-SlbXm0f7.js} +165 -30
- package/dist/{image-CXu8W39c.js → image-CuzFLQWC.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/llm-slug-generator.js +6 -6
- package/dist/{onboard-z3fzzRA3.js → onboard-DFkXqe5P.js} +1 -1
- package/dist/{onboard-DZRuFOui.js → onboard-DlY7trcj.js} +1 -1
- package/dist/{onboarding-C-CKVquN.js → onboarding-BEDqTyYQ.js} +1 -1
- package/dist/{onboarding-Dt44Sq16.js → onboarding-mXPGwLNG.js} +1 -1
- package/dist/{onboarding.finalize-BS2mkyHV.js → onboarding.finalize-Ca-aQ6eE.js} +4 -4
- package/dist/{onboarding.finalize-Brx3PR8v.js → onboarding.finalize-DmeEphAd.js} +3 -3
- package/dist/{pi-embedded-helpers-pubKo8HQ.js → pi-embedded-helpers-CfqDGQ9J.js} +4 -4
- package/dist/{program-CLUzfgIi.js → program-T144qFaw.js} +2 -2
- package/dist/{program-context-Dy0GIFHq.js → program-context-xpDrT9eG.js} +6 -6
- package/dist/{prompt-select-styled-qBayGUev.js → prompt-select-styled-BN0aOmtR.js} +1 -1
- package/dist/{prompt-select-styled-u4kisg-4.js → prompt-select-styled-Bn4zyJmn.js} +1 -1
- package/dist/{pw-ai-B5asscAD.js → pw-ai-m0mj2KWK.js} +1 -1
- package/dist/{register.maintenance-CdLPllzi.js → register.maintenance-C9K829tk.js} +4 -4
- package/dist/{register.maintenance-Bo0Biy_N.js → register.maintenance-Ck1jwY_N.js} +5 -5
- package/dist/{register.onboard-ChIcWJCu.js → register.onboard-BHUh0Xk1.js} +2 -2
- package/dist/{register.onboard-C7dTjfHL.js → register.onboard-Byt2S-D0.js} +2 -2
- package/dist/{register.setup-CBpAYN-J.js → register.setup-BvB9oNh3.js} +2 -2
- package/dist/{register.setup-BtALSMOO.js → register.setup-DCG9bst7.js} +2 -2
- package/dist/{register.subclis-ffG-1Diq.js → register.subclis-DnWR9l5V.js} +3 -3
- package/dist/{run-main-D1Qgb9_t.js → run-main-B1aB8I5W.js} +3 -3
- package/dist/{runner-WAG0M5s9.js → runner-CU9l0uJh.js} +1 -1
- package/dist/{unified-runner-DpWGASP3.js → unified-runner-CxscxYKm.js} +16 -16
- package/dist/{update-cli-Kauib3Oa.js → update-cli-Bgrhor0g.js} +5 -5
- package/dist/{update-cli-BrS9rZHi.js → update-cli-D5QWigS0.js} +4 -4
- package/dist/{web-DhofKbBh.js → web-DShKO-0L.js} +6 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as expandHomePrefix, g as resolveStateDir, i as isNixMode, l as resolveGatewayLockDir, o as resolveConfigPath, r as STATE_DIR, t as CONFIG_PATH, u as resolveGatewayPort } from "./paths-Cqn-zk3M.js";
|
|
2
2
|
import { B as theme, E as truncateUtf16Safe, H as getLogger, P as setVerbose, R as colorize, S as shortenHomePath, U as getResolvedLoggerSettings, V as getChildLogger, c as ensureDir, t as CONFIG_DIR, y as resolveUserPath, z as isRich } from "./utils-B-0b9bGM.js";
|
|
3
3
|
import { d as supportsXHighThinking, l as normalizeVerboseLevel, s as normalizeThinkLevel } from "./thinking-EAliFiVK.js";
|
|
4
|
-
import { $ as buildDeliveryFromLegacyPayload, A as emitGatewayRestart, An as initSubagentRegistry, Ar as extractImageContentFromSource, B as summarizeRestartSentinel, Bn as registerAgentRunContext, Ct as requestBodyErrorToText, Dr as DEFAULT_INPUT_MAX_REDIRECTS, E as resetDirectoryCache, Er as DEFAULT_INPUT_IMAGE_MIMES, Et as agentCommand, F as setPreRestartDeferralCheck, Fn as readLatestAssistantReply, Gt as getCliSessionId, I as consumeRestartSentinel, In as clearAgentRunContext, J as normalizeOptionalSessionKey, K as inferLegacyName, Kt as setCliSessionId, Ln as emitAgentEvent, Lt as createDefaultDeps, M as markGatewaySigusr1RestartHandled, Mr as resolveInputFileLimits, Mt as resolveOutboundTarget, Nt as resolveSessionDeliveryTarget, O as consumeGatewaySigusr1RestartAuthorization, On as countActiveDescendantRuns, Or as DEFAULT_INPUT_TIMEOUT_MS, P as setGatewaySigusr1RestartPolicy, Pn as runSubagentAnnounceFlow, Pr as resolveAgentTimeoutMs, Pt as createOutboundSendDeps, Q as migrateLegacyCronPayload, R as formatRestartSentinelMessage, Rn as getAgentRunContext, St as readJsonBodyWithLimit, Tr as DEFAULT_INPUT_IMAGE_MAX_BYTES, Tt as sleepWithAbort, U as normalizeHttpWebhookUrl, Ut as resolveModelProfile, Vt as getActiveEmbeddedRunCount, Wt as runWithModelFallback, X as normalizePayloadToSystemText, Xt as resolveAgentAvatar, Y as normalizeOptionalText, Z as normalizeRequiredName, ar as setCommandLaneConcurrency, cn as buildHistoryContextFromEntries, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, d as createSymiTools, en as buildSafeExternalPrompt, et as hasLegacyDeliveryHints, f as resolveAnnounceTargetFromKey, fr as stripHeartbeatToken, ft as loadSymiPlugins, hn as getTotalPendingReplies, i as resolveCronStyleNow, ir as resetAllLanes, j as isGatewaySigusr1RestartExternallyAllowed, jn as listDescendantRunsForRequester, jr as normalizeMimeList, k as deferGatewayRestartUntilIdle, kn as countActiveRunsForSession, kr as extractFileContentFromSource, l as applyToolPolicyPipeline, nn as getHookType, or as waitForActiveTasks, pr as lookupContextTokens, q as normalizeOptionalAgentId, qt as runCliAgent, rn as isExternalHookSession, rr as getTotalQueueSize, sr as CommandLane, st as requestHeartbeatNow, tn as detectSuspiciousPatterns, tr as getActiveTaskCount, tt as stripLegacyDeliveryFields, u as buildDefaultToolPolicyPipelineSteps, ut as getPluginToolMeta, v as loadSessionEntry, w as resolveOutboundSessionRoute, wt as computeBackoff, xr as enqueueSystemEvent, xt as handleSlackHttpRequest, zn as onAgentEvent, zt as runAgentTurn } from "./reply-DcyKvFor.js";
|
|
4
|
+
import { $ as buildDeliveryFromLegacyPayload, A as emitGatewayRestart, An as initSubagentRegistry, Ar as extractImageContentFromSource, B as summarizeRestartSentinel, Bn as registerAgentRunContext, Ct as requestBodyErrorToText, Dr as DEFAULT_INPUT_MAX_REDIRECTS, E as resetDirectoryCache, Er as DEFAULT_INPUT_IMAGE_MIMES, Et as agentCommand, F as setPreRestartDeferralCheck, Fn as readLatestAssistantReply, Gt as getCliSessionId, I as consumeRestartSentinel, In as clearAgentRunContext, J as normalizeOptionalSessionKey, K as inferLegacyName, Kt as setCliSessionId, Ln as emitAgentEvent, Lt as createDefaultDeps, M as markGatewaySigusr1RestartHandled, Mr as resolveInputFileLimits, Mt as resolveOutboundTarget, Nt as resolveSessionDeliveryTarget, O as consumeGatewaySigusr1RestartAuthorization, On as countActiveDescendantRuns, Or as DEFAULT_INPUT_TIMEOUT_MS, P as setGatewaySigusr1RestartPolicy, Pn as runSubagentAnnounceFlow, Pr as resolveAgentTimeoutMs, Pt as createOutboundSendDeps, Q as migrateLegacyCronPayload, R as formatRestartSentinelMessage, Rn as getAgentRunContext, St as readJsonBodyWithLimit, Tr as DEFAULT_INPUT_IMAGE_MAX_BYTES, Tt as sleepWithAbort, U as normalizeHttpWebhookUrl, Ut as resolveModelProfile, Vt as getActiveEmbeddedRunCount, Wt as runWithModelFallback, X as normalizePayloadToSystemText, Xt as resolveAgentAvatar, Y as normalizeOptionalText, Z as normalizeRequiredName, _ as loadCombinedSessionStoreForGateway, ar as setCommandLaneConcurrency, cn as buildHistoryContextFromEntries, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, d as createSymiTools, en as buildSafeExternalPrompt, et as hasLegacyDeliveryHints, f as resolveAnnounceTargetFromKey, fr as stripHeartbeatToken, ft as loadSymiPlugins, g as listSessionsFromStore, hn as getTotalPendingReplies, i as resolveCronStyleNow, ir as resetAllLanes, j as isGatewaySigusr1RestartExternallyAllowed, jn as listDescendantRunsForRequester, jr as normalizeMimeList, k as deferGatewayRestartUntilIdle, kn as countActiveRunsForSession, kr as extractFileContentFromSource, l as applyToolPolicyPipeline, nn as getHookType, or as waitForActiveTasks, pr as lookupContextTokens, q as normalizeOptionalAgentId, qt as runCliAgent, rn as isExternalHookSession, rr as getTotalQueueSize, sr as CommandLane, st as requestHeartbeatNow, tn as detectSuspiciousPatterns, tr as getActiveTaskCount, tt as stripLegacyDeliveryFields, u as buildDefaultToolPolicyPipelineSteps, ut as getPluginToolMeta, v as loadSessionEntry, w as resolveOutboundSessionRoute, wt as computeBackoff, xr as enqueueSystemEvent, xt as handleSlackHttpRequest, zn as onAgentEvent, zt as runAgentTurn } from "./reply-DcyKvFor.js";
|
|
5
5
|
import { S as parseAgentSessionKey, c as normalizeMainKey, f as toAgentRequestSessionKey, l as resolveAgentIdFromSessionKey, m as DEFAULT_ACCOUNT_ID, p as toAgentStoreSessionKey, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, x as isSubagentSessionKey, y as isCronRunSessionKey } from "./session-key-DCt45XZa.js";
|
|
6
6
|
import { r as matchesSkillFilter, t as resolveSymiPackageRoot } from "./symi-root-CrGJbkzf.js";
|
|
7
7
|
import { C as createInternalHookEvent, S as clearInternalHooks, T as triggerInternalHook, m as createEmptyPluginRegistry, r as DEFAULT_CHAT_CHANNEL, w as registerInternalHook } from "./registry-Cja8eT7G.js";
|
|
@@ -52,7 +52,7 @@ import "./accounts-DyJN4_vR.js";
|
|
|
52
52
|
import { t as buildChannelAccountBindings } from "./bindings-DFaVVCsf.js";
|
|
53
53
|
import "./logging-w5jq5901.js";
|
|
54
54
|
import "./send-CPF8hSFp.js";
|
|
55
|
-
import { c as resolveStorePath, i as resolveSessionTranscriptPath } from "./paths-CyhzMxFA.js";
|
|
55
|
+
import { c as resolveStorePath, i as resolveSessionTranscriptPath, s as resolveSessionTranscriptsDirForAgent } from "./paths-CyhzMxFA.js";
|
|
56
56
|
import "./tool-images-DvUBlqjX.js";
|
|
57
57
|
import "./tool-display-D8N3rsYt.js";
|
|
58
58
|
import { t as fetchWithSsrFGuard } from "./fetch-guard-DOPkVbh3.js";
|
|
@@ -139,7 +139,7 @@ import { r as pickGatewaySelfPresence } from "./status-BY4CnB2O.js";
|
|
|
139
139
|
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-BPOuBmYt.js";
|
|
140
140
|
import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-Z947tKLt.js";
|
|
141
141
|
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-CtckACbb.js";
|
|
142
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
142
|
+
import { t as runOnboardingWizard } from "./onboarding-BEDqTyYQ.js";
|
|
143
143
|
import { _ as getHandshakeTimeoutMs, a as DEFAULT_ASSISTANT_IDENTITY, b as resolveCronRunLogPath, c as upsertPresence, d as DEDUPE_MAX, f as DEDUPE_TTL_MS, g as TICK_INTERVAL_MS, h as MAX_PAYLOAD_BYTES, i as safeParseJson, l as formatError, m as MAX_BUFFERED_BYTES, n as handleGatewayRequest, o as resolveAssistantIdentity, p as HEALTH_REFRESH_INTERVAL_MS, r as broadcastPresenceSnapshot, s as listSystemPresence, t as coreGatewayHandlers, u as loadVoiceWakeConfig, v as abortChatRunById, x as startGatewayConfigReloader, y as appendCronRunLog } from "./server-methods-BdXCfO_O.js";
|
|
144
144
|
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-CHIVwHRD.js";
|
|
145
145
|
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-Bv0M7ka7.js";
|
|
@@ -2135,10 +2135,12 @@ function createAgentEventHandler({ broadcast, broadcastToConnIds, nodeSendToSess
|
|
|
2135
2135
|
runId: eventRunId
|
|
2136
2136
|
} : evt;
|
|
2137
2137
|
const isAborted = chatRunState.abortedRuns.has(clientRunId) || chatRunState.abortedRuns.has(evt.runId);
|
|
2138
|
-
const
|
|
2138
|
+
const heartbeatAgentCtx = resolveHeartbeatContext(clientRunId, evt.runId);
|
|
2139
|
+
const agentPayload = {
|
|
2139
2140
|
...eventForClients,
|
|
2140
|
-
sessionKey
|
|
2141
|
-
|
|
2141
|
+
...sessionKey ? { sessionKey } : {},
|
|
2142
|
+
...heartbeatAgentCtx?.isHeartbeat ? { isHeartbeat: true } : {}
|
|
2143
|
+
};
|
|
2142
2144
|
const last = agentRunSeq.get(evt.runId) ?? 0;
|
|
2143
2145
|
const isToolEvent = evt.stream === "tool";
|
|
2144
2146
|
const toolVerbose = isToolEvent ? resolveToolVerboseLevel(evt.runId, sessionKey) : "off";
|
|
@@ -7323,7 +7325,7 @@ function applyControlUiSecurityHeaders(res) {
|
|
|
7323
7325
|
res.setHeader("X-Content-Type-Options", "nosniff");
|
|
7324
7326
|
res.setHeader("Referrer-Policy", "no-referrer");
|
|
7325
7327
|
}
|
|
7326
|
-
function sendJson$
|
|
7328
|
+
function sendJson$3(res, status, body) {
|
|
7327
7329
|
res.statusCode = status;
|
|
7328
7330
|
res.setHeader("Content-Type", "application/json; charset=utf-8");
|
|
7329
7331
|
res.setHeader("Cache-Control", "no-cache");
|
|
@@ -7350,7 +7352,7 @@ function handleControlUiAvatarRequest(req, res, opts) {
|
|
|
7350
7352
|
}
|
|
7351
7353
|
if (url.searchParams.get("meta") === "1") {
|
|
7352
7354
|
const resolved = opts.resolveAvatar(agentId);
|
|
7353
|
-
sendJson$
|
|
7355
|
+
sendJson$3(res, 200, { avatarUrl: resolved.kind === "local" ? buildControlUiAvatarUrl(basePath, agentId) : resolved.kind === "remote" || resolved.kind === "data" ? resolved.url : null });
|
|
7354
7356
|
return true;
|
|
7355
7357
|
}
|
|
7356
7358
|
const resolved = opts.resolveAvatar(agentId);
|
|
@@ -7446,7 +7448,7 @@ function handleControlUiHttpRequest(req, res, opts) {
|
|
|
7446
7448
|
assistantAgentId: identity.agentId
|
|
7447
7449
|
};
|
|
7448
7450
|
if (opts?.isLocalClient && opts?.gatewayToken) bootstrapConfig.gatewayToken = opts.gatewayToken;
|
|
7449
|
-
sendJson$
|
|
7451
|
+
sendJson$3(res, 200, bootstrapConfig);
|
|
7450
7452
|
return true;
|
|
7451
7453
|
}
|
|
7452
7454
|
const rootState = opts?.root;
|
|
@@ -7523,7 +7525,7 @@ function setDefaultSecurityHeaders(res) {
|
|
|
7523
7525
|
res.setHeader("X-Content-Type-Options", "nosniff");
|
|
7524
7526
|
res.setHeader("Referrer-Policy", "no-referrer");
|
|
7525
7527
|
}
|
|
7526
|
-
function sendJson$
|
|
7528
|
+
function sendJson$2(res, status, body) {
|
|
7527
7529
|
res.statusCode = status;
|
|
7528
7530
|
res.setHeader("Content-Type", "application/json; charset=utf-8");
|
|
7529
7531
|
res.end(JSON.stringify(body));
|
|
@@ -7538,14 +7540,14 @@ function sendMethodNotAllowed(res, allow = "POST") {
|
|
|
7538
7540
|
sendText(res, 405, "Method Not Allowed");
|
|
7539
7541
|
}
|
|
7540
7542
|
function sendUnauthorized(res) {
|
|
7541
|
-
sendJson$
|
|
7543
|
+
sendJson$2(res, 401, { error: {
|
|
7542
7544
|
message: "Unauthorized",
|
|
7543
7545
|
type: "unauthorized"
|
|
7544
7546
|
} });
|
|
7545
7547
|
}
|
|
7546
7548
|
function sendRateLimited(res, retryAfterMs) {
|
|
7547
7549
|
if (retryAfterMs && retryAfterMs > 0) res.setHeader("Retry-After", String(Math.ceil(retryAfterMs / 1e3)));
|
|
7548
|
-
sendJson$
|
|
7550
|
+
sendJson$2(res, 429, { error: {
|
|
7549
7551
|
message: "Too many failed authentication attempts. Please try again later.",
|
|
7550
7552
|
type: "rate_limited"
|
|
7551
7553
|
} });
|
|
@@ -7558,7 +7560,7 @@ function sendGatewayAuthFailure(res, authResult) {
|
|
|
7558
7560
|
sendUnauthorized(res);
|
|
7559
7561
|
}
|
|
7560
7562
|
function sendInvalidRequest(res, message) {
|
|
7561
|
-
sendJson$
|
|
7563
|
+
sendJson$2(res, 400, { error: {
|
|
7562
7564
|
message,
|
|
7563
7565
|
type: "invalid_request_error"
|
|
7564
7566
|
} });
|
|
@@ -7567,14 +7569,14 @@ async function readJsonBodyOrError(req, res, maxBytes) {
|
|
|
7567
7569
|
const body = await readJsonBody(req, maxBytes);
|
|
7568
7570
|
if (!body.ok) {
|
|
7569
7571
|
if (body.error === "payload too large") {
|
|
7570
|
-
sendJson$
|
|
7572
|
+
sendJson$2(res, 413, { error: {
|
|
7571
7573
|
message: "Payload too large",
|
|
7572
7574
|
type: "invalid_request_error"
|
|
7573
7575
|
} });
|
|
7574
7576
|
return;
|
|
7575
7577
|
}
|
|
7576
7578
|
if (body.error === "request body timeout") {
|
|
7577
|
-
sendJson$
|
|
7579
|
+
sendJson$2(res, 408, { error: {
|
|
7578
7580
|
message: "Request body timeout",
|
|
7579
7581
|
type: "invalid_request_error"
|
|
7580
7582
|
} });
|
|
@@ -7804,7 +7806,7 @@ async function handleOpenAiHttpRequest(req, res, opts) {
|
|
|
7804
7806
|
});
|
|
7805
7807
|
const prompt = buildAgentPrompt$1(payload.messages);
|
|
7806
7808
|
if (!prompt.message) {
|
|
7807
|
-
sendJson$
|
|
7809
|
+
sendJson$2(res, 400, { error: {
|
|
7808
7810
|
message: "Missing user message in `messages`.",
|
|
7809
7811
|
type: "invalid_request_error"
|
|
7810
7812
|
} });
|
|
@@ -7823,7 +7825,7 @@ async function handleOpenAiHttpRequest(req, res, opts) {
|
|
|
7823
7825
|
messageChannel: "webchat",
|
|
7824
7826
|
bestEffortDeliver: false
|
|
7825
7827
|
}, defaultRuntime, deps));
|
|
7826
|
-
sendJson$
|
|
7828
|
+
sendJson$2(res, 200, {
|
|
7827
7829
|
id: runId,
|
|
7828
7830
|
object: "chat.completion",
|
|
7829
7831
|
created: Math.floor(Date.now() / 1e3),
|
|
@@ -7844,7 +7846,7 @@ async function handleOpenAiHttpRequest(req, res, opts) {
|
|
|
7844
7846
|
});
|
|
7845
7847
|
} catch (err) {
|
|
7846
7848
|
logWarn(`openai-compat: chat completion failed: ${String(err)}`);
|
|
7847
|
-
sendJson$
|
|
7849
|
+
sendJson$2(res, 500, { error: {
|
|
7848
7850
|
message: "internal error",
|
|
7849
7851
|
type: "api_error"
|
|
7850
7852
|
} });
|
|
@@ -8408,7 +8410,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8408
8410
|
const parseResult = CreateResponseBodySchema.safeParse(handled.body);
|
|
8409
8411
|
if (!parseResult.success) {
|
|
8410
8412
|
const issue = parseResult.error.issues[0];
|
|
8411
|
-
sendJson$
|
|
8413
|
+
sendJson$2(res, 400, { error: {
|
|
8412
8414
|
message: issue ? `${issue.path.join(".")}: ${issue.message}` : "Invalid request body",
|
|
8413
8415
|
type: "invalid_request_error"
|
|
8414
8416
|
} });
|
|
@@ -8465,7 +8467,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8465
8467
|
}
|
|
8466
8468
|
} catch (err) {
|
|
8467
8469
|
logWarn(`openresponses: request parsing failed: ${String(err)}`);
|
|
8468
|
-
sendJson$
|
|
8470
|
+
sendJson$2(res, 400, { error: {
|
|
8469
8471
|
message: "invalid request",
|
|
8470
8472
|
type: "invalid_request_error"
|
|
8471
8473
|
} });
|
|
@@ -8483,7 +8485,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8483
8485
|
toolChoicePrompt = toolChoiceResult.extraSystemPrompt;
|
|
8484
8486
|
} catch (err) {
|
|
8485
8487
|
logWarn(`openresponses: tool configuration failed: ${String(err)}`);
|
|
8486
|
-
sendJson$
|
|
8488
|
+
sendJson$2(res, 400, { error: {
|
|
8487
8489
|
message: "invalid tool configuration",
|
|
8488
8490
|
type: "invalid_request_error"
|
|
8489
8491
|
} });
|
|
@@ -8507,7 +8509,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8507
8509
|
fileContext
|
|
8508
8510
|
].filter(Boolean).join("\n\n");
|
|
8509
8511
|
if (!prompt.message) {
|
|
8510
|
-
sendJson$
|
|
8512
|
+
sendJson$2(res, 400, { error: {
|
|
8511
8513
|
message: "Missing user message in `input`.",
|
|
8512
8514
|
type: "invalid_request_error"
|
|
8513
8515
|
} });
|
|
@@ -8536,7 +8538,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8536
8538
|
const pendingToolCalls = meta && typeof meta === "object" ? meta.pendingToolCalls : void 0;
|
|
8537
8539
|
if (stopReason === "tool_calls" && pendingToolCalls && pendingToolCalls.length > 0) {
|
|
8538
8540
|
const functionCall = pendingToolCalls[0];
|
|
8539
|
-
sendJson$
|
|
8541
|
+
sendJson$2(res, 200, createResponseResource({
|
|
8540
8542
|
id: responseId,
|
|
8541
8543
|
model,
|
|
8542
8544
|
status: "incomplete",
|
|
@@ -8551,7 +8553,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8551
8553
|
}));
|
|
8552
8554
|
return true;
|
|
8553
8555
|
}
|
|
8554
|
-
sendJson$
|
|
8556
|
+
sendJson$2(res, 200, createResponseResource({
|
|
8555
8557
|
id: responseId,
|
|
8556
8558
|
model,
|
|
8557
8559
|
status: "completed",
|
|
@@ -8564,7 +8566,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8564
8566
|
}));
|
|
8565
8567
|
} catch (err) {
|
|
8566
8568
|
logWarn(`openresponses: non-stream response failed: ${String(err)}`);
|
|
8567
|
-
sendJson$
|
|
8569
|
+
sendJson$2(res, 500, createResponseResource({
|
|
8568
8570
|
id: responseId,
|
|
8569
8571
|
model,
|
|
8570
8572
|
status: "failed",
|
|
@@ -8831,6 +8833,138 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8831
8833
|
return true;
|
|
8832
8834
|
}
|
|
8833
8835
|
|
|
8836
|
+
//#endregion
|
|
8837
|
+
//#region src/gateway/server-sessions-api.ts
|
|
8838
|
+
/**
|
|
8839
|
+
* HTTP API for session history — serves the Glass UI History drawer.
|
|
8840
|
+
*
|
|
8841
|
+
* GET /api/sessions — List all sessions with metadata
|
|
8842
|
+
* GET /api/transcript?file=<filename> — Read a session transcript
|
|
8843
|
+
*
|
|
8844
|
+
* Both endpoints are read-only and serve data from the existing session
|
|
8845
|
+
* store and .jsonl transcript files.
|
|
8846
|
+
*
|
|
8847
|
+
* @module
|
|
8848
|
+
*/
|
|
8849
|
+
/**
|
|
8850
|
+
* Handle /api/sessions and /api/transcript HTTP requests.
|
|
8851
|
+
* Returns true if the request was handled, false otherwise.
|
|
8852
|
+
*/
|
|
8853
|
+
function handleSessionsApiRequest(req, res, cfg) {
|
|
8854
|
+
const url = new URL(req.url ?? "/", "http://localhost");
|
|
8855
|
+
if (url.pathname === "/api/sessions" && req.method === "GET") {
|
|
8856
|
+
handleListSessions(res, cfg);
|
|
8857
|
+
return true;
|
|
8858
|
+
}
|
|
8859
|
+
if (url.pathname === "/api/transcript" && req.method === "GET") {
|
|
8860
|
+
handleTranscript(res, cfg, url.searchParams.get("file"));
|
|
8861
|
+
return true;
|
|
8862
|
+
}
|
|
8863
|
+
return false;
|
|
8864
|
+
}
|
|
8865
|
+
function sendJson$1(res, data, status = 200) {
|
|
8866
|
+
res.writeHead(status, { "Content-Type": "application/json" });
|
|
8867
|
+
res.end(JSON.stringify(data));
|
|
8868
|
+
}
|
|
8869
|
+
function handleListSessions(res, cfg) {
|
|
8870
|
+
try {
|
|
8871
|
+
const sessionsDir = resolveSessionTranscriptsDirForAgent(resolveDefaultAgentId(cfg));
|
|
8872
|
+
const { storePath, store } = loadCombinedSessionStoreForGateway(cfg);
|
|
8873
|
+
const storeSessions = listSessionsFromStore({
|
|
8874
|
+
cfg,
|
|
8875
|
+
storePath,
|
|
8876
|
+
store,
|
|
8877
|
+
opts: {
|
|
8878
|
+
includeDerivedTitles: true,
|
|
8879
|
+
includeLastMessage: true
|
|
8880
|
+
}
|
|
8881
|
+
}).sessions.map((s) => ({
|
|
8882
|
+
file: s.sessionId ? `${s.sessionId}.jsonl` : void 0,
|
|
8883
|
+
sessionId: s.sessionId,
|
|
8884
|
+
sessionKey: s.key,
|
|
8885
|
+
isArchived: false,
|
|
8886
|
+
mtime: s.updatedAt ? new Date(s.updatedAt).toISOString() : void 0,
|
|
8887
|
+
preview: s.lastMessagePreview || s.derivedTitle || s.displayName || s.label || void 0,
|
|
8888
|
+
msgCount: (s.inputTokens ?? 0) > 0 || (s.outputTokens ?? 0) > 0 ? void 0 : void 0,
|
|
8889
|
+
size: void 0,
|
|
8890
|
+
model: s.model,
|
|
8891
|
+
modelProvider: s.modelProvider
|
|
8892
|
+
}));
|
|
8893
|
+
const archivedSessions = [];
|
|
8894
|
+
if (fs.existsSync(sessionsDir)) {
|
|
8895
|
+
const files = fs.readdirSync(sessionsDir);
|
|
8896
|
+
for (const file of files) {
|
|
8897
|
+
if (!file.includes(".jsonl.")) continue;
|
|
8898
|
+
const parts = file.split(".jsonl.");
|
|
8899
|
+
if (parts.length < 2 || !parts[1]) continue;
|
|
8900
|
+
const filePath = path.join(sessionsDir, file);
|
|
8901
|
+
try {
|
|
8902
|
+
const stat = fs.statSync(filePath);
|
|
8903
|
+
const lines = fs.readFileSync(filePath, "utf-8").split(/\r?\n/).filter((l) => l.trim());
|
|
8904
|
+
let preview;
|
|
8905
|
+
let msgCount = 0;
|
|
8906
|
+
for (const line of lines) try {
|
|
8907
|
+
const parsed = JSON.parse(line);
|
|
8908
|
+
if (parsed?.message?.role === "user" || parsed?.message?.role === "assistant") msgCount++;
|
|
8909
|
+
if (!preview && parsed?.message?.role === "user") preview = (typeof parsed.message.content === "string" ? parsed.message.content : Array.isArray(parsed.message.content) ? parsed.message.content.filter((b) => b.type === "text").map((b) => b.text ?? "").join(" ") : "").trim().slice(0, 80) || void 0;
|
|
8910
|
+
} catch {}
|
|
8911
|
+
const suffix = parts[1];
|
|
8912
|
+
const dotIdx = suffix.indexOf(".");
|
|
8913
|
+
const archivedAt = dotIdx >= 0 ? suffix.slice(dotIdx + 1).replace(/-(?=\d{2}[T:-])/g, ":") : void 0;
|
|
8914
|
+
archivedSessions.push({
|
|
8915
|
+
file,
|
|
8916
|
+
sessionId: parts[0],
|
|
8917
|
+
isArchived: true,
|
|
8918
|
+
archivedAt: archivedAt || stat.mtime.toISOString(),
|
|
8919
|
+
mtime: stat.mtime.toISOString(),
|
|
8920
|
+
preview,
|
|
8921
|
+
msgCount,
|
|
8922
|
+
size: stat.size
|
|
8923
|
+
});
|
|
8924
|
+
} catch {}
|
|
8925
|
+
}
|
|
8926
|
+
}
|
|
8927
|
+
sendJson$1(res, [...storeSessions.filter((s) => s.sessionId), ...archivedSessions].toSorted((a, b) => {
|
|
8928
|
+
const aArchived = Boolean(a.isArchived);
|
|
8929
|
+
const bArchived = Boolean(b.isArchived);
|
|
8930
|
+
if (!aArchived && bArchived) return -1;
|
|
8931
|
+
if (aArchived && !bArchived) return 1;
|
|
8932
|
+
const aDate = typeof a.mtime === "string" ? a.mtime : typeof a.archivedAt === "string" ? a.archivedAt : "";
|
|
8933
|
+
return (typeof b.mtime === "string" ? b.mtime : typeof b.archivedAt === "string" ? b.archivedAt : "").localeCompare(aDate);
|
|
8934
|
+
}));
|
|
8935
|
+
} catch (err) {
|
|
8936
|
+
sendJson$1(res, { error: String(err) }, 500);
|
|
8937
|
+
}
|
|
8938
|
+
}
|
|
8939
|
+
function handleTranscript(res, cfg, file) {
|
|
8940
|
+
if (!file) {
|
|
8941
|
+
sendJson$1(res, { error: "Missing file parameter" }, 400);
|
|
8942
|
+
return;
|
|
8943
|
+
}
|
|
8944
|
+
const basename = path.basename(file);
|
|
8945
|
+
if (basename !== file || file.includes("..")) {
|
|
8946
|
+
sendJson$1(res, { error: "Invalid file parameter" }, 400);
|
|
8947
|
+
return;
|
|
8948
|
+
}
|
|
8949
|
+
try {
|
|
8950
|
+
const sessionsDir = resolveSessionTranscriptsDirForAgent(resolveDefaultAgentId(cfg));
|
|
8951
|
+
const filePath = path.join(sessionsDir, basename);
|
|
8952
|
+
if (!fs.existsSync(filePath)) {
|
|
8953
|
+
sendJson$1(res, { error: "Session file not found" }, 404);
|
|
8954
|
+
return;
|
|
8955
|
+
}
|
|
8956
|
+
const lines = fs.readFileSync(filePath, "utf-8").split(/\r?\n/).filter((l) => l.trim());
|
|
8957
|
+
const messages = [];
|
|
8958
|
+
for (const line of lines) try {
|
|
8959
|
+
const parsed = JSON.parse(line);
|
|
8960
|
+
if (parsed?.message?.role) messages.push(parsed.message);
|
|
8961
|
+
} catch {}
|
|
8962
|
+
sendJson$1(res, { messages });
|
|
8963
|
+
} catch (err) {
|
|
8964
|
+
sendJson$1(res, { error: String(err) }, 500);
|
|
8965
|
+
}
|
|
8966
|
+
}
|
|
8967
|
+
|
|
8834
8968
|
//#endregion
|
|
8835
8969
|
//#region src/gateway/tools-invoke-http.ts
|
|
8836
8970
|
const DEFAULT_BODY_BYTES = 2 * 1024 * 1024;
|
|
@@ -8913,7 +9047,7 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
|
|
|
8913
9047
|
if (process.env.VITEST && MEMORY_TOOL_NAMES.has(toolName)) {
|
|
8914
9048
|
const reasons = resolveMemoryToolDisableReasons(cfg);
|
|
8915
9049
|
if (reasons.length > 0) {
|
|
8916
|
-
sendJson$
|
|
9050
|
+
sendJson$2(res, 400, {
|
|
8917
9051
|
ok: false,
|
|
8918
9052
|
error: {
|
|
8919
9053
|
type: "invalid_request",
|
|
@@ -8985,7 +9119,7 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
|
|
|
8985
9119
|
const gatewayDenySet = new Set(gatewayDenyNames);
|
|
8986
9120
|
const tool = subagentFiltered.filter((t) => !gatewayDenySet.has(t.name)).find((t) => t.name === toolName);
|
|
8987
9121
|
if (!tool) {
|
|
8988
|
-
sendJson$
|
|
9122
|
+
sendJson$2(res, 404, {
|
|
8989
9123
|
ok: false,
|
|
8990
9124
|
error: {
|
|
8991
9125
|
type: "not_found",
|
|
@@ -9000,14 +9134,14 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
|
|
|
9000
9134
|
action,
|
|
9001
9135
|
args
|
|
9002
9136
|
});
|
|
9003
|
-
sendJson$
|
|
9137
|
+
sendJson$2(res, 200, {
|
|
9004
9138
|
ok: true,
|
|
9005
9139
|
result: await tool.execute?.(`http-${Date.now()}`, toolArgs)
|
|
9006
9140
|
});
|
|
9007
9141
|
} catch (err) {
|
|
9008
9142
|
const inputStatus = resolveToolInputErrorStatus(err);
|
|
9009
9143
|
if (inputStatus !== null) {
|
|
9010
|
-
sendJson$
|
|
9144
|
+
sendJson$2(res, inputStatus, {
|
|
9011
9145
|
ok: false,
|
|
9012
9146
|
error: {
|
|
9013
9147
|
type: "tool_error",
|
|
@@ -9017,7 +9151,7 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
|
|
|
9017
9151
|
return true;
|
|
9018
9152
|
}
|
|
9019
9153
|
logWarn(`tools-invoke: tool execution failed: ${String(err)}`);
|
|
9020
|
-
sendJson$
|
|
9154
|
+
sendJson$2(res, 500, {
|
|
9021
9155
|
ok: false,
|
|
9022
9156
|
error: {
|
|
9023
9157
|
type: "tool_error",
|
|
@@ -9437,6 +9571,7 @@ function createGatewayHttpServer(opts) {
|
|
|
9437
9571
|
if (await handleA2uiHttpRequest(req, res)) return;
|
|
9438
9572
|
if (await canvasHost.handleHttpRequest(req, res)) return;
|
|
9439
9573
|
}
|
|
9574
|
+
if (controlUiEnabled && handleSessionsApiRequest(req, res, configSnapshot)) return;
|
|
9440
9575
|
if (controlUiEnabled) {
|
|
9441
9576
|
if (handleControlUiAvatarRequest(req, res, {
|
|
9442
9577
|
basePath: controlUiBasePath,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { R as shortenHomeInString, k as isRecord } from "./registry-DYq1AYOv.js";
|
|
3
3
|
import { $ as resolveSymiAgentDir, L as getApiKeyForModel, M as resolveImplicitBedrockProvider, N as resolveImplicitCopilotProvider, P as resolveImplicitProviders, U as normalizeSecretInput, j as normalizeProviders, z as requireApiKey } from "./auth-profiles-DdK1Hxaa.js";
|
|
4
|
-
import { N as sanitizeUserFacingText } from "./pi-embedded-helpers-
|
|
4
|
+
import { N as sanitizeUserFacingText } from "./pi-embedded-helpers-CfqDGQ9J.js";
|
|
5
5
|
import { n as loadConfig } from "./config-5SdHIcHU.js";
|
|
6
6
|
import { n as redactToolDetail } from "./redact-BDMXB06K.js";
|
|
7
7
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-Bv5YDJc8.js";
|
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ import { t as ensureSymiCliOnPath } from "./path-env-MnzRq6nD.js";
|
|
|
112
112
|
import { t as assertSupportedRuntime } from "./runtime-guard-B37eizu-.js";
|
|
113
113
|
import "./ports-BX0kKI0g.js";
|
|
114
114
|
import { a as hasFlag, i as getVerboseFlag, n as getCommandPath, o as hasHelpOrVersion, s as hasRootVersionAlias } from "./argv-C6ovOie2.js";
|
|
115
|
-
import { i as getCoreCliCommandsWithSubcommands, n as setProgramContext, o as registerProgramCommands, s as getSubCliCommandsWithSubcommands } from "./program-context-
|
|
115
|
+
import { i as getCoreCliCommandsWithSubcommands, n as setProgramContext, o as registerProgramCommands, s as getSubCliCommandsWithSubcommands } from "./program-context-xpDrT9eG.js";
|
|
116
116
|
import "./catalog-RiADx7MA.js";
|
|
117
117
|
import "./plugin-registry-CDIOKK_i.js";
|
|
118
118
|
import { n as resolveCliChannelOptions } from "./channel-options-BqnokE7_.js";
|
|
@@ -3,16 +3,16 @@ import "./registry-DYq1AYOv.js";
|
|
|
3
3
|
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-CpEJ0B88.js";
|
|
4
4
|
import "./subsystem-BjyjJF-d.js";
|
|
5
5
|
import "./workspace-DscDraUb.js";
|
|
6
|
-
import { t as runAgentTurn } from "./unified-runner-
|
|
6
|
+
import { t as runAgentTurn } from "./unified-runner-CxscxYKm.js";
|
|
7
7
|
import "./paths-CbQV9WEg.js";
|
|
8
8
|
import "./auth-profiles-DdK1Hxaa.js";
|
|
9
9
|
import "./env-BDXYbTKj.js";
|
|
10
10
|
import "./github-copilot-token-cCYzSU9h.js";
|
|
11
11
|
import "./boolean-CE7i9tBR.js";
|
|
12
|
-
import "./pi-embedded-helpers-
|
|
12
|
+
import "./pi-embedded-helpers-CfqDGQ9J.js";
|
|
13
13
|
import "./config-5SdHIcHU.js";
|
|
14
14
|
import "./manifest-registry-yb7sAlu4.js";
|
|
15
|
-
import "./chrome-
|
|
15
|
+
import "./chrome-DkaXoP36.js";
|
|
16
16
|
import "./frontmatter-CTR5f_Ez.js";
|
|
17
17
|
import "./skills-Bs0AW1g3.js";
|
|
18
18
|
import "./redact-BDMXB06K.js";
|
|
@@ -30,10 +30,10 @@ import "./bindings-BsHoBLIE.js";
|
|
|
30
30
|
import "./send-CVMyYPQw.js";
|
|
31
31
|
import "./send-CvhXrdgS.js";
|
|
32
32
|
import "./tool-images-SqqWIT22.js";
|
|
33
|
-
import "./deliver-
|
|
33
|
+
import "./deliver-C46-vyqg.js";
|
|
34
34
|
import "./diagnostic-rPhsBoZz.js";
|
|
35
35
|
import "./diagnostic-session-state-Zw87xFym.js";
|
|
36
|
-
import "./image-
|
|
36
|
+
import "./image-CuzFLQWC.js";
|
|
37
37
|
import "./tokens-Bux9Y_xD.js";
|
|
38
38
|
import "./send-DYj_o4_F.js";
|
|
39
39
|
import "./pi-model-discovery-Bv5YDJc8.js";
|
|
@@ -49,7 +49,7 @@ import "./local-roots-DhZz0Ybs.js";
|
|
|
49
49
|
import "./ir-CTiz95Vb.js";
|
|
50
50
|
import "./render-CDCvpfhh.js";
|
|
51
51
|
import "./commands-registry-Bfc7Uz0o.js";
|
|
52
|
-
import "./runner-
|
|
52
|
+
import "./runner-CU9l0uJh.js";
|
|
53
53
|
import "./skill-commands-DcVwOafC.js";
|
|
54
54
|
import "./fetch-Bso4i15F.js";
|
|
55
55
|
import "./channel-activity-B6G1jnQT.js";
|
|
@@ -10,7 +10,7 @@ import { t as assertSupportedRuntime } from "./runtime-guard-D7waq_Ho.js";
|
|
|
10
10
|
import { r as isSystemdUserServiceAvailable } from "./systemd-DlMdyFDY.js";
|
|
11
11
|
import { t as resolveGatewayService } from "./service-Cm9j9WzQ.js";
|
|
12
12
|
import { r as healthCommand } from "./health-DUKLANXu.js";
|
|
13
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
13
|
+
import { t as runOnboardingWizard } from "./onboarding-mXPGwLNG.js";
|
|
14
14
|
import { $ as setHuggingfaceApiKey, A as applyXaiConfig, B as applyVercelAiGatewayConfig, E as applyTogetherConfig, I as applyLitellmConfig, M as applyXiaomiConfig, O as applyVeniceConfig, P as applyZaiConfig, Q as setGeminiApiKey, R as applyCloudflareAiGatewayConfig, S as applyQianfanConfig, X as setAnthropicApiKey, Z as setCloudflareAiGatewayConfig, _ as applyMoonshotConfigCn, a as applyMinimaxApiConfig, at as setOpenrouterApiKey, b as applyOpenrouterConfig, ct as setTogetherApiKey, d as applyAuthProfileConfig, dt as setXaiApiKey, et as setKimiCodingApiKey, f as applyHuggingfaceConfig, ft as setXiaomiApiKey, g as applyMoonshotConfig, it as setOpencodeZenApiKey, l as applyMinimaxConfig, lt as setVeniceApiKey, m as applyKimiCodeConfig, n as validateAnthropicSetupToken, nt as setMinimaxApiKey, o as applyMinimaxApiConfigCn, ot as setQianfanApiKey, pt as setZaiApiKey, r as applyOpencodeZenConfig, rt as setMoonshotApiKey, st as setSyntheticApiKey, t as buildTokenProfileId, tt as setLitellmApiKey, ut as setVercelAiGatewayApiKey, w as applySyntheticConfig } from "./auth-token-Cmrk2TPo.js";
|
|
15
15
|
import { n as logConfigUpdated } from "./logging-BGewRZy0.js";
|
|
16
16
|
import { n as isDeprecatedAuthChoice, r as normalizeLegacyOnboardAuthChoice } from "./auth-choice-legacy-BKXTgyr4.js";
|
|
@@ -12,7 +12,7 @@ import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, r as isGate
|
|
|
12
12
|
import { r as isSystemdUserServiceAvailable } from "./systemd-riq8uNJQ.js";
|
|
13
13
|
import { t as resolveGatewayService } from "./service-Cl74hx8J.js";
|
|
14
14
|
import { r as healthCommand } from "./health-BPOuBmYt.js";
|
|
15
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
15
|
+
import { t as runOnboardingWizard } from "./onboarding-BEDqTyYQ.js";
|
|
16
16
|
import { $ as setHuggingfaceApiKey, A as applyXaiConfig, B as applyVercelAiGatewayConfig, E as applyTogetherConfig, I as applyLitellmConfig, M as applyXiaomiConfig, O as applyVeniceConfig, P as applyZaiConfig, Q as setGeminiApiKey, R as applyCloudflareAiGatewayConfig, S as applyQianfanConfig, X as setAnthropicApiKey, Z as setCloudflareAiGatewayConfig, _ as applyMoonshotConfigCn, a as applyMinimaxApiConfig, at as setOpenrouterApiKey, b as applyOpenrouterConfig, ct as setTogetherApiKey, d as applyAuthProfileConfig, dt as setXaiApiKey, et as setKimiCodingApiKey, f as applyHuggingfaceConfig, ft as setXiaomiApiKey, g as applyMoonshotConfig, it as setOpencodeZenApiKey, l as applyMinimaxConfig, lt as setVeniceApiKey, m as applyKimiCodeConfig, n as validateAnthropicSetupToken, nt as setMinimaxApiKey, o as applyMinimaxApiConfigCn, ot as setQianfanApiKey, pt as setZaiApiKey, r as applyOpencodeZenConfig, rt as setMoonshotApiKey, st as setSyntheticApiKey, t as buildTokenProfileId, tt as setLitellmApiKey, ut as setVercelAiGatewayApiKey, w as applySyntheticConfig } from "./auth-token-BnOynwk4.js";
|
|
17
17
|
import { n as logConfigUpdated } from "./logging-BzzwiKjv.js";
|
|
18
18
|
import { n as isDeprecatedAuthChoice, r as normalizeLegacyOnboardAuthChoice } from "./auth-choice-legacy-Ch38-Kbr.js";
|
|
@@ -304,7 +304,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
304
304
|
mode
|
|
305
305
|
});
|
|
306
306
|
await writeConfigFile(nextConfig);
|
|
307
|
-
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-
|
|
307
|
+
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-DmeEphAd.js");
|
|
308
308
|
const { launchedTui } = await finalizeOnboardingWizard({
|
|
309
309
|
flow,
|
|
310
310
|
opts,
|
|
@@ -302,7 +302,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
302
302
|
mode
|
|
303
303
|
});
|
|
304
304
|
await writeConfigFile(nextConfig);
|
|
305
|
-
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-
|
|
305
|
+
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-Ca-aQ6eE.js");
|
|
306
306
|
const { launchedTui } = await finalizeOnboardingWizard({
|
|
307
307
|
flow,
|
|
308
308
|
opts,
|
|
@@ -99,10 +99,10 @@ import "./prompt-style-DwCXob2h.js";
|
|
|
99
99
|
import "./pairing-labels-D1HDboV2.js";
|
|
100
100
|
import "./pi-tools.policy-De00gPXt.js";
|
|
101
101
|
import "./note-DDecZomM.js";
|
|
102
|
-
import "./register.subclis-
|
|
103
|
-
import "./command-registry-
|
|
102
|
+
import "./register.subclis-DnWR9l5V.js";
|
|
103
|
+
import "./command-registry-DJbyskBr.js";
|
|
104
104
|
import "./program-context-CqzR_m-7.js";
|
|
105
|
-
import { r as installCompletion } from "./completion-cli-
|
|
105
|
+
import { r as installCompletion } from "./completion-cli-Dfw9JhkN.js";
|
|
106
106
|
import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-CfRwa6qh.js";
|
|
107
107
|
import "./runtime-guard-D7waq_Ho.js";
|
|
108
108
|
import { r as isSystemdUserServiceAvailable } from "./systemd-DlMdyFDY.js";
|
|
@@ -110,7 +110,7 @@ import { t as resolveGatewayService } from "./service-Cm9j9WzQ.js";
|
|
|
110
110
|
import { r as healthCommand } from "./health-DUKLANXu.js";
|
|
111
111
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-BseSWee1.js";
|
|
112
112
|
import { t as formatHealthCheckFailure } from "./health-format-CzgUHmmX.js";
|
|
113
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
113
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-Xx92Sz9s.js";
|
|
114
114
|
import { t as runTui } from "./tui-BJB80muc.js";
|
|
115
115
|
import os from "node:os";
|
|
116
116
|
import path from "node:path";
|
|
@@ -103,16 +103,16 @@ import "./control-service-Bz7rxLWq.js";
|
|
|
103
103
|
import "./stagger-BUClb97_.js";
|
|
104
104
|
import "./channel-selection-DuWs0Aak.js";
|
|
105
105
|
import "./runtime-guard-B37eizu-.js";
|
|
106
|
-
import "./program-context-
|
|
106
|
+
import "./program-context-xpDrT9eG.js";
|
|
107
107
|
import "./note-DeHoW7xO.js";
|
|
108
|
-
import { r as installCompletion } from "./completion-cli-
|
|
108
|
+
import { r as installCompletion } from "./completion-cli-DosOadUD.js";
|
|
109
109
|
import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-2mwX-jqj.js";
|
|
110
110
|
import { r as isSystemdUserServiceAvailable } from "./systemd-riq8uNJQ.js";
|
|
111
111
|
import { t as resolveGatewayService } from "./service-Cl74hx8J.js";
|
|
112
112
|
import { r as healthCommand } from "./health-BPOuBmYt.js";
|
|
113
113
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-Z947tKLt.js";
|
|
114
114
|
import { t as formatHealthCheckFailure } from "./health-format-DSwnXZPU.js";
|
|
115
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
115
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-DRucwWSo.js";
|
|
116
116
|
import { t as runTui } from "./tui-CriznorL.js";
|
|
117
117
|
import os from "node:os";
|
|
118
118
|
import path from "node:path";
|
|
@@ -9,7 +9,7 @@ import { h as isPidAlive, m as resolveProcessScopedMap } from "./auth-profiles-D
|
|
|
9
9
|
import { n as formatCliCommand } from "./env-BDXYbTKj.js";
|
|
10
10
|
import { t as parseBooleanValue } from "./boolean-CE7i9tBR.js";
|
|
11
11
|
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-5SdHIcHU.js";
|
|
12
|
-
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
12
|
+
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_SYMI_BROWSER_ENABLED, N as DEFAULT_SYMI_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveSymiUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchSymiChrome, j as DEFAULT_SYMI_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopSymiChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-DkaXoP36.js";
|
|
13
13
|
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-Bs0AW1g3.js";
|
|
14
14
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-XIsvXeC-.js";
|
|
15
15
|
import { b as openFileWithinRoot, i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS, y as SafeOpenError } from "./image-ops-C7CauEK8.js";
|
|
@@ -933,7 +933,7 @@ function isModuleNotFoundError(err) {
|
|
|
933
933
|
}
|
|
934
934
|
async function loadPwAiModule(mode) {
|
|
935
935
|
try {
|
|
936
|
-
return await import("./pw-ai-
|
|
936
|
+
return await import("./pw-ai-m0mj2KWK.js");
|
|
937
937
|
} catch (err) {
|
|
938
938
|
if (mode === "soft") return null;
|
|
939
939
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -3473,11 +3473,11 @@ function createProfileContext(opts, profile) {
|
|
|
3473
3473
|
const userDataDir = resolveSymiUserDataDir(profile.name);
|
|
3474
3474
|
const profileState = getProfileState();
|
|
3475
3475
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3476
|
-
await (await import("./pw-ai-
|
|
3476
|
+
await (await import("./pw-ai-m0mj2KWK.js")).closePlaywrightBrowserConnection();
|
|
3477
3477
|
} catch {}
|
|
3478
3478
|
if (profileState.running) await stopRunningBrowser();
|
|
3479
3479
|
try {
|
|
3480
|
-
await (await import("./pw-ai-
|
|
3480
|
+
await (await import("./pw-ai-m0mj2KWK.js")).closePlaywrightBrowserConnection();
|
|
3481
3481
|
} catch {}
|
|
3482
3482
|
if (!fs.existsSync(userDataDir)) return {
|
|
3483
3483
|
moved: false,
|
|
@@ -101,8 +101,8 @@ import "./pi-tools.policy-De00gPXt.js";
|
|
|
101
101
|
import "./catalog-DLQFKucJ.js";
|
|
102
102
|
import "./plugin-registry-C1ghjhOE.js";
|
|
103
103
|
import { n as resolveCliChannelOptions } from "./channel-options-Cb1PgfNV.js";
|
|
104
|
-
import { t as getSubCliCommandsWithSubcommands } from "./register.subclis-
|
|
105
|
-
import { a as registerProgramCommands, r as getCoreCliCommandsWithSubcommands } from "./command-registry-
|
|
104
|
+
import { t as getSubCliCommandsWithSubcommands } from "./register.subclis-DnWR9l5V.js";
|
|
105
|
+
import { a as registerProgramCommands, r as getCoreCliCommandsWithSubcommands } from "./command-registry-DJbyskBr.js";
|
|
106
106
|
import { r as setProgramContext } from "./program-context-CqzR_m-7.js";
|
|
107
107
|
import { t as forceFreePort } from "./ports-Dn122MUd.js";
|
|
108
108
|
import { n as formatCliBannerLine, r as hasEmittedCliBanner, t as emitCliBanner } from "./banner-om7BRUIc.js";
|