@skrr-ai/cli 0.1.146 → 0.1.148
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/base-command.js +38 -21
- package/dist/commands/agent/message/send.d.ts +11 -0
- package/dist/commands/agent/message/send.js +34 -8
- package/dist/commands/agent-worker.js +2 -1
- package/dist/commands/agents/activity.js +2 -1
- package/dist/commands/agents/badge.js +10 -5
- package/dist/commands/agents/categories/index.js +2 -1
- package/dist/commands/agents/chat.d.ts +1 -0
- package/dist/commands/agents/chat.js +29 -1
- package/dist/commands/agents/create.js +4 -1
- package/dist/commands/agents/overview.js +2 -1
- package/dist/commands/agents/releases/create.js +2 -1
- package/dist/commands/agents/schedule-overview.js +3 -1
- package/dist/commands/agents/schedule.js +2 -1
- package/dist/commands/agents/spawn.js +9 -6
- package/dist/commands/agents/tools/auth.js +2 -1
- package/dist/commands/agents/tools/calls.js +2 -1
- package/dist/commands/agents/triggers/policy.js +11 -1
- package/dist/commands/agents/visibility.js +2 -1
- package/dist/commands/balance/show.js +28 -5
- package/dist/commands/balance/statement.js +2 -1
- package/dist/commands/commands.js +2 -1
- package/dist/commands/commitments/create.js +2 -1
- package/dist/commands/commitments/delivery.js +2 -1
- package/dist/commands/commitments/doctor.js +2 -1
- package/dist/commands/commitments/observations.js +2 -2
- package/dist/commands/commitments/operating-review.js +2 -1
- package/dist/commands/commitments/pack/preflight.js +2 -1
- package/dist/commands/commitments/preflight.js +5 -1
- package/dist/commands/commitments/trigger-status.js +2 -1
- package/dist/commands/commitments/wake-capabilities.d.ts +2 -0
- package/dist/commands/commitments/wake-capabilities.js +16 -0
- package/dist/commands/convos/messages.js +2 -1
- package/dist/commands/daemon/logs.js +18 -9
- package/dist/commands/daemon/usage.js +2 -1
- package/dist/commands/dm/messages.js +2 -1
- package/dist/commands/dm/thread/messages.js +2 -1
- package/dist/commands/dm/threads.js +2 -1
- package/dist/commands/doctor.js +2 -1
- package/dist/commands/goals/key-results/assess.js +2 -1
- package/dist/commands/goals/key-results/history.js +2 -1
- package/dist/commands/harnesses/forget.js +2 -1
- package/dist/commands/harnesses/show.js +12 -6
- package/dist/commands/inbox/index.js +4 -3
- package/dist/commands/initiatives/decide.js +2 -1
- package/dist/commands/instructions/diff.js +2 -1
- package/dist/commands/instructions/show.js +2 -1
- package/dist/commands/login.js +4 -2
- package/dist/commands/machines/dedicated/cp.js +2 -1
- package/dist/commands/machines/dedicated/power/set.js +2 -1
- package/dist/commands/machines/show.js +2 -1
- package/dist/commands/memory/maintain.js +2 -1
- package/dist/commands/memory/read.js +2 -1
- package/dist/commands/memory/rebuild-index.js +2 -1
- package/dist/commands/memory/rebuild.js +2 -1
- package/dist/commands/memory/search.js +2 -1
- package/dist/commands/messages/list.js +2 -1
- package/dist/commands/revoke-daemon.js +2 -1
- package/dist/commands/revoke-token.js +2 -1
- package/dist/commands/search/all.js +14 -7
- package/dist/commands/search/workspace.js +2 -1
- package/dist/commands/set-capabilities.js +2 -1
- package/dist/commands/skills/browse.js +8 -2
- package/dist/commands/spaces/auto-executor/preview.js +3 -2
- package/dist/commands/spaces/auto-executor/runs.js +4 -1
- package/dist/commands/spaces/workflow-templates/extract.d.ts +1 -0
- package/dist/commands/spaces/workflow-templates/extract.js +9 -1
- package/dist/commands/spaces/workflows/events.js +6 -3
- package/dist/commands/spaces/workflows/run.js +5 -3
- package/dist/commands/spaces/workflows/update.js +2 -1
- package/dist/commands/store/gallery-admissions/preview.js +2 -1
- package/dist/commands/store/publishers/profile/handle.js +2 -1
- package/dist/commands/tasks/comments/anchor.js +23 -9
- package/dist/commands/tasks/complete.js +4 -2
- package/dist/commands/tasks/create-tree.js +7 -3
- package/dist/commands/tasks/create.js +2 -1
- package/dist/commands/tasks/deliverable/add.js +2 -1
- package/dist/commands/tasks/deliverable/archive.js +2 -1
- package/dist/commands/tasks/deliverable/list.js +2 -1
- package/dist/commands/tasks/expectations/assess.js +2 -1
- package/dist/commands/tasks/labels/create.js +2 -1
- package/dist/commands/tasks/preflight.js +4 -2
- package/dist/commands/tasks/ready.js +2 -1
- package/dist/commands/tasks/result/submit.js +2 -1
- package/dist/commands/tasks/updates/add.js +2 -1
- package/dist/commands/tasks/wait.js +2 -1
- package/dist/commands/token/list.js +2 -1
- package/dist/commands/token/mint.js +2 -1
- package/dist/commands/wiki/write.js +14 -7
- package/dist/hooks/command-not-found.js +2 -1
- package/dist/lib/agent-chat-start.d.ts +77 -0
- package/dist/lib/agent-chat-start.js +169 -0
- package/dist/lib/agent-config.js +2 -1
- package/dist/lib/agent-endpoints.js +4 -2
- package/dist/lib/agent-evals.js +2 -1
- package/dist/lib/agent-guide-reference-gate.js +22 -11
- package/dist/lib/agent-guides.js +4 -1
- package/dist/lib/agent-instructions.js +5 -1
- package/dist/lib/agent-ref.js +8 -4
- package/dist/lib/agent-trigger-listing.js +2 -1
- package/dist/lib/agentic-stream.js +8 -5
- package/dist/lib/api-error-reason.js +2 -1
- package/dist/lib/api-fetch.js +5 -3
- package/dist/lib/appData.js +6 -6
- package/dist/lib/appInstallations.js +10 -5
- package/dist/lib/appsCheck.js +2 -1
- package/dist/lib/auth-failure.js +2 -1
- package/dist/lib/auth-storage.js +2 -1
- package/dist/lib/balance.d.ts +33 -3
- package/dist/lib/balance.js +39 -7
- package/dist/lib/capability-matrix.js +4 -2
- package/dist/lib/cli-runtime.js +2 -1
- package/dist/lib/code-handover.js +8 -3
- package/dist/lib/command-hygiene.js +28 -12
- package/dist/lib/command-manifest.js +6 -3
- package/dist/lib/commitment-attention-copy.js +2 -1
- package/dist/lib/commitment-event-wakes.js +9 -0
- package/dist/lib/commitment-product.js +5 -3
- package/dist/lib/commitment-terms.js +2 -1
- package/dist/lib/commitments.d.ts +13 -0
- package/dist/lib/commitments.js +24 -9
- package/dist/lib/compasses.js +2 -1
- package/dist/lib/completion-index.js +2 -1
- package/dist/lib/computer-files.js +8 -6
- package/dist/lib/config.js +11 -5
- package/dist/lib/conversation-search.js +4 -2
- package/dist/lib/daemon-installer.js +6 -2
- package/dist/lib/daemon-maintenance.js +2 -1
- package/dist/lib/daemon-ref.js +2 -1
- package/dist/lib/daemonBroker.js +6 -3
- package/dist/lib/daemonBrokerRefusal.js +4 -2
- package/dist/lib/daemonHandoff.js +14 -7
- package/dist/lib/daemonIslandProfile.js +2 -1
- package/dist/lib/dedicated-copy.js +9 -3
- package/dist/lib/dedicated-exec.js +2 -1
- package/dist/lib/dedicated-keep-awake.js +2 -1
- package/dist/lib/dedicated-machines.js +9 -5
- package/dist/lib/dedicated-service.js +2 -1
- package/dist/lib/dedicated-ssh.js +5 -3
- package/dist/lib/deployed-build.js +2 -1
- package/dist/lib/device-code.js +4 -3
- package/dist/lib/dpop-auth.js +2 -1
- package/dist/lib/earnings.js +2 -1
- package/dist/lib/exec-runtime-binary.js +5 -3
- package/dist/lib/first-party-harness-broker.js +4 -3
- package/dist/lib/first-party-harness-managed.js +2 -1
- package/dist/lib/first-party-harness-startup-update.js +8 -4
- package/dist/lib/first-party-harness-update.js +2 -1
- package/dist/lib/first-party-harness.js +2 -1
- package/dist/lib/format.js +8 -4
- package/dist/lib/git-task.js +10 -5
- package/dist/lib/github-tools.js +6 -3
- package/dist/lib/harnesses.js +4 -2
- package/dist/lib/hosted-machines.js +2 -1
- package/dist/lib/html-text.js +33 -16
- package/dist/lib/ingress.js +2 -1
- package/dist/lib/instruction-blocks.js +2 -1
- package/dist/lib/iso-instant.js +5 -3
- package/dist/lib/keychain.js +15 -5
- package/dist/lib/label-scope.js +2 -1
- package/dist/lib/live-runtime-binary.js +10 -7
- package/dist/lib/local-skills.js +10 -6
- package/dist/lib/login.js +3 -2
- package/dist/lib/machine-audit.js +2 -1
- package/dist/lib/machine-daemon-log.js +2 -1
- package/dist/lib/machine-services.js +2 -1
- package/dist/lib/memory-history-session.js +2 -1
- package/dist/lib/memory-sync.js +6 -2
- package/dist/lib/message-intent.d.ts +10 -0
- package/dist/lib/node-adapter.js +4 -2
- package/dist/lib/northstars.js +4 -2
- package/dist/lib/oauthLogin.js +16 -7
- package/dist/lib/open-target.js +8 -4
- package/dist/lib/option-hint.js +2 -4
- package/dist/lib/outbox.js +2 -1
- package/dist/lib/planOutcome.d.ts +5 -3
- package/dist/lib/planOutcome.js +7 -4
- package/dist/lib/platform-update-local.js +2 -3
- package/dist/lib/preflight-copy.js +31 -0
- package/dist/lib/rate-limit-retry.js +2 -1
- package/dist/lib/reflection.js +2 -1
- package/dist/lib/request-field-flags.js +2 -1
- package/dist/lib/runtime-start-verification.js +2 -1
- package/dist/lib/schedule.js +2 -1
- package/dist/lib/scoped-memory-command.js +7 -3
- package/dist/lib/search-display.js +11 -4
- package/dist/lib/skill-store-pagination.js +2 -1
- package/dist/lib/space-notebook.js +5 -3
- package/dist/lib/store-listing.js +2 -1
- package/dist/lib/task-agent-context-capabilities.js +2 -1
- package/dist/lib/task-asset-upload.js +7 -3
- package/dist/lib/task-closure.js +2 -1
- package/dist/lib/task-economics.js +2 -1
- package/dist/lib/task-execution.js +16 -8
- package/dist/lib/task-extras.js +4 -2
- package/dist/lib/task-operation-watch.js +2 -1
- package/dist/lib/task-preflight.js +3 -2
- package/dist/lib/task-recurrence-summary.js +4 -2
- package/dist/lib/task-runtime-headers.js +10 -5
- package/dist/lib/task-transcript.js +3 -2
- package/dist/lib/task-transfer.js +9 -5
- package/dist/lib/tasks.js +2 -1
- package/dist/lib/triggers.d.ts +21 -0
- package/dist/lib/triggers.js +41 -3
- package/dist/lib/update-check.js +12 -7
- package/dist/lib/usage-discovery.js +2 -1
- package/dist/lib/usd-micros.js +2 -1
- package/dist/lib/web-url.js +2 -1
- package/dist/lib/widgetCheck.js +15 -9
- package/dist/lib/widgetStaticScan.js +26 -14
- package/dist/lib/workflow-run-view.js +5 -3
- package/dist/lib/workflow-templates.d.ts +10 -0
- package/dist/lib/workflow-templates.js +47 -0
- package/dist/lib/write-target.js +4 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/authHelper.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.js +22 -12
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerUse.js +4 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelope.js +7 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.js +6 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonConsentProof.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonPair.js +16 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +4 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopDaemonProof.js +4 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopWire.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.js +11 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceKey.js +7 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/dpop.js +8 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.js +4 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessUpdater.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/githubPushRefusal.js +4 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineReservation.js +8 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/kek/macos.js +4 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/liveState.js +4 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/loginWithLocalhost.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/loopbackHttp.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.js +4 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/profileStateDir.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/recoveryCode.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +3 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releasePolicy.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releaseVersions.js +6 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/restartArtifact.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.js +7 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/authHelper.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.js +27 -18
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerUse.js +6 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelope.js +11 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.js +6 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonConsentProof.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonPair.js +20 -8
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +5 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopDaemonProof.js +4 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopWire.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.js +11 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceKey.js +11 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/dpop.js +12 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.js +4 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessUpdater.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/githubPushRefusal.js +4 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.js +5 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineReservation.js +10 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/kek/macos.js +4 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/liveState.js +4 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/loginWithLocalhost.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/loopbackHttp.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.js +4 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/profileStateDir.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/recoveryCode.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +3 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releasePolicy.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releaseVersions.js +6 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/restartArtifact.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.js +11 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +20519 -20130
- package/dist/node_modules/@skrr-ai/inference-broker/dist/cjs/loopback-server.js +4 -2
- package/dist/node_modules/@skrr-ai/inference-broker/dist/cjs/managed-inference-broker.js +10 -6
- package/dist/node_modules/@skrr-ai/inference-broker/dist/esm/loopback-server.js +4 -2
- package/dist/node_modules/@skrr-ai/inference-broker/dist/esm/managed-inference-broker.js +10 -6
- package/dist/node_modules/@skrr-ai/inference-broker/package.json +1 -1
- package/oclif.manifest.json +17 -2
- package/package.json +1 -1
|
@@ -25,6 +25,8 @@ var import_node_http = require("node:http");
|
|
|
25
25
|
var import_node_crypto = require("node:crypto");
|
|
26
26
|
var import_node_fs = require("node:fs");
|
|
27
27
|
var import_contract = require("./contract.js");
|
|
28
|
+
const AUTHORIZE_RE = /^Bearer\s+/i;
|
|
29
|
+
const ORIGIN_FORM_PATH_RE = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
28
30
|
class RequestBodyTooLargeError extends Error {
|
|
29
31
|
maxBodyBytes;
|
|
30
32
|
constructor(maxBodyBytes) {
|
|
@@ -157,7 +159,7 @@ class ModelProxyLoopbackServer {
|
|
|
157
159
|
const presented = Array.isArray(header) ? header[0] : header;
|
|
158
160
|
if (!presented)
|
|
159
161
|
return false;
|
|
160
|
-
const token = presented.replace(
|
|
162
|
+
const token = presented.replace(AUTHORIZE_RE, "");
|
|
161
163
|
return constantTimeEqual(token, this.opts.relayToken);
|
|
162
164
|
}
|
|
163
165
|
}
|
|
@@ -169,7 +171,7 @@ function constantTimeEqual(a, b) {
|
|
|
169
171
|
return (0, import_node_crypto.timingSafeEqual)(bufA, bufB);
|
|
170
172
|
}
|
|
171
173
|
function originFormPath(rawTarget, ownOrigin) {
|
|
172
|
-
if (
|
|
174
|
+
if (!ORIGIN_FORM_PATH_RE.test(rawTarget))
|
|
173
175
|
return rawTarget;
|
|
174
176
|
let target;
|
|
175
177
|
try {
|
|
@@ -39,6 +39,10 @@ var import_node_path = require("node:path");
|
|
|
39
39
|
var import_loopback_server = require("./loopback-server.js");
|
|
40
40
|
var import_contract = require("./contract.js");
|
|
41
41
|
var import_managed_inference_renewal = require("./managed-inference-renewal.js");
|
|
42
|
+
const WITH_INFERENCE_BROKER_HOST_RE = /[\s,]+$/;
|
|
43
|
+
const BUILD_MANAGED_INFERENCE_RELAY_CREDENTIAL_RE = /\/$/;
|
|
44
|
+
const START_MANAGED_INFERENCE_BROKER_RE = /\/+$/;
|
|
45
|
+
const SUPPORTS_MANAGED_PROMPT_CACHING_RE = /^openai\//;
|
|
42
46
|
const MANAGED_STATUS_PATH = "/oversky/managed-status";
|
|
43
47
|
const INFERENCE_BROKER_ORIGIN = "http://oversky-inference-broker.invalid";
|
|
44
48
|
const INFERENCE_BROKER_HOST = new URL(INFERENCE_BROKER_ORIGIN).hostname;
|
|
@@ -55,7 +59,7 @@ function withInferenceBrokerHost(list) {
|
|
|
55
59
|
const entries = list.split(",").map((entry) => entry.trim().toLowerCase());
|
|
56
60
|
if (entries.includes("*") || entries.includes(INFERENCE_BROKER_HOST))
|
|
57
61
|
return list;
|
|
58
|
-
const kept = list.replace(
|
|
62
|
+
const kept = list.replace(WITH_INFERENCE_BROKER_HOST_RE, "");
|
|
59
63
|
return kept ? `${kept},${INFERENCE_BROKER_HOST}` : INFERENCE_BROKER_HOST;
|
|
60
64
|
}
|
|
61
65
|
const MANAGED_SESSION_ENV = "OVERSKY_MANAGED_SESSION";
|
|
@@ -131,7 +135,7 @@ function buildManagedInferenceRelayCredential(credential, options) {
|
|
|
131
135
|
return {
|
|
132
136
|
source: "gateway-relay",
|
|
133
137
|
...credential.modelScope ? { modelScope: credential.modelScope } : {},
|
|
134
|
-
baseUrl: base.toString().replace(
|
|
138
|
+
baseUrl: base.toString().replace(BUILD_MANAGED_INFERENCE_RELAY_CREDENTIAL_RE, ""),
|
|
135
139
|
authToken: sessionToken
|
|
136
140
|
};
|
|
137
141
|
}
|
|
@@ -283,7 +287,7 @@ async function startManagedInferenceBroker(options) {
|
|
|
283
287
|
}
|
|
284
288
|
let stopped = false;
|
|
285
289
|
if (options.leaseExpiresInMs && options.leaseExpiresInMs > 0) {
|
|
286
|
-
const renewUrl = `${gatewayBase.replace(
|
|
290
|
+
const renewUrl = `${gatewayBase.replace(START_MANAGED_INFERENCE_BROKER_RE, "")}/renew`;
|
|
287
291
|
const renewModel = modelScope?.gatewayModelAlias ?? legacyModel;
|
|
288
292
|
const refreshCapability = options.refreshCapability;
|
|
289
293
|
renewal = (0, import_managed_inference_renewal.startRenewalLoop)({
|
|
@@ -434,7 +438,7 @@ function resolveGatewayUrl(base, allowedOrigin, path) {
|
|
|
434
438
|
try {
|
|
435
439
|
const parsedBase = new URL(base);
|
|
436
440
|
const canonicalPath = path.startsWith("/v1/") ? path : `/v1${path}`;
|
|
437
|
-
const basePath = parsedBase.pathname.replace(
|
|
441
|
+
const basePath = parsedBase.pathname.replace(BUILD_MANAGED_INFERENCE_RELAY_CREDENTIAL_RE, "");
|
|
438
442
|
const suffix = basePath.endsWith("/v1") ? canonicalPath.slice(3) : canonicalPath;
|
|
439
443
|
parsedBase.pathname = `${basePath}${suffix}`;
|
|
440
444
|
parsedBase.search = "";
|
|
@@ -616,11 +620,11 @@ function isPlainObject(value) {
|
|
|
616
620
|
}
|
|
617
621
|
const MAX_OPENAI_CACHE_BREAKPOINTS = 50;
|
|
618
622
|
function supportsManagedPromptCaching(modelScope) {
|
|
619
|
-
const model = nonEmpty(modelScope.wireModel)?.replace(
|
|
623
|
+
const model = nonEmpty(modelScope.wireModel)?.replace(SUPPORTS_MANAGED_PROMPT_CACHING_RE, "").toLowerCase();
|
|
620
624
|
return modelScope.upstreamProvider === "openai" && Boolean(model?.startsWith("gpt-5.6"));
|
|
621
625
|
}
|
|
622
626
|
function enforcePromptCacheEnvelope(payload, envelope, modelScope) {
|
|
623
|
-
const model = nonEmpty(modelScope.wireModel)?.replace(
|
|
627
|
+
const model = nonEmpty(modelScope.wireModel)?.replace(SUPPORTS_MANAGED_PROMPT_CACHING_RE, "").toLowerCase();
|
|
624
628
|
const claudeCacheControlFamily = ["anthropic", "openrouter", "bedrock"].includes(modelScope.upstreamProvider) && model?.includes("claude");
|
|
625
629
|
if (claudeCacheControlFamily) {
|
|
626
630
|
if (envelope.allowPromptCaching) {
|
|
@@ -17,6 +17,8 @@ import { createServer } from 'node:http';
|
|
|
17
17
|
import { timingSafeEqual } from 'node:crypto';
|
|
18
18
|
import { chmodSync, chownSync, unlinkSync } from 'node:fs';
|
|
19
19
|
import { MODEL_PROXY_ERROR, MODEL_PROXY_MAX_BODY_BYTES, ModelProxyError, } from './contract.js';
|
|
20
|
+
const AUTHORIZE_RE = /^Bearer\s+/i;
|
|
21
|
+
const ORIGIN_FORM_PATH_RE = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
20
22
|
class RequestBodyTooLargeError extends Error {
|
|
21
23
|
maxBodyBytes;
|
|
22
24
|
constructor(maxBodyBytes) {
|
|
@@ -174,7 +176,7 @@ export class ModelProxyLoopbackServer {
|
|
|
174
176
|
const presented = Array.isArray(header) ? header[0] : header;
|
|
175
177
|
if (!presented)
|
|
176
178
|
return false;
|
|
177
|
-
const token = presented.replace(
|
|
179
|
+
const token = presented.replace(AUTHORIZE_RE, '');
|
|
178
180
|
return constantTimeEqual(token, this.opts.relayToken);
|
|
179
181
|
}
|
|
180
182
|
}
|
|
@@ -222,7 +224,7 @@ function constantTimeEqual(a, b) {
|
|
|
222
224
|
* untouched, exactly as before, for the forwarder to judge.
|
|
223
225
|
*/
|
|
224
226
|
function originFormPath(rawTarget, ownOrigin) {
|
|
225
|
-
if (
|
|
227
|
+
if (!ORIGIN_FORM_PATH_RE.test(rawTarget))
|
|
226
228
|
return rawTarget;
|
|
227
229
|
let target;
|
|
228
230
|
try {
|
|
@@ -15,6 +15,10 @@ import { join } from 'node:path';
|
|
|
15
15
|
import { ModelProxyLoopbackServer } from './loopback-server.js';
|
|
16
16
|
import { MODEL_PROXY_ERROR, ModelProxyError } from './contract.js';
|
|
17
17
|
import { startRenewalLoop, } from './managed-inference-renewal.js';
|
|
18
|
+
const WITH_INFERENCE_BROKER_HOST_RE = /[\s,]+$/;
|
|
19
|
+
const BUILD_MANAGED_INFERENCE_RELAY_CREDENTIAL_RE = /\/$/;
|
|
20
|
+
const START_MANAGED_INFERENCE_BROKER_RE = /\/+$/;
|
|
21
|
+
const SUPPORTS_MANAGED_PROMPT_CACHING_RE = /^openai\//;
|
|
18
22
|
// A synthetic origin is required by URL-oriented provider SDKs. skrr Code pairs
|
|
19
23
|
// it with OVERSKY_INFERENCE_BROKER_SOCKET and Bun's `fetch({ unix })`; it is
|
|
20
24
|
// never resolved through DNS or connected over TCP.
|
|
@@ -67,7 +71,7 @@ function withInferenceBrokerHost(list) {
|
|
|
67
71
|
const entries = list.split(',').map((entry) => entry.trim().toLowerCase());
|
|
68
72
|
if (entries.includes('*') || entries.includes(INFERENCE_BROKER_HOST))
|
|
69
73
|
return list;
|
|
70
|
-
const kept = list.replace(
|
|
74
|
+
const kept = list.replace(WITH_INFERENCE_BROKER_HOST_RE, '');
|
|
71
75
|
return kept ? `${kept},${INFERENCE_BROKER_HOST}` : INFERENCE_BROKER_HOST;
|
|
72
76
|
}
|
|
73
77
|
export const MANAGED_SESSION_ENV = 'OVERSKY_MANAGED_SESSION';
|
|
@@ -171,7 +175,7 @@ export function buildManagedInferenceRelayCredential(credential, options) {
|
|
|
171
175
|
return {
|
|
172
176
|
source: 'gateway-relay',
|
|
173
177
|
...(credential.modelScope ? { modelScope: credential.modelScope } : {}),
|
|
174
|
-
baseUrl: base.toString().replace(
|
|
178
|
+
baseUrl: base.toString().replace(BUILD_MANAGED_INFERENCE_RELAY_CREDENTIAL_RE, ''),
|
|
175
179
|
authToken: sessionToken,
|
|
176
180
|
};
|
|
177
181
|
}
|
|
@@ -400,7 +404,7 @@ export async function startManagedInferenceBroker(options) {
|
|
|
400
404
|
// uses (`upstreamKey`, an `agst_` token) against `<relay base>/renew` — so no
|
|
401
405
|
// second credential and no new daemon-to-worker message are involved.
|
|
402
406
|
if (options.leaseExpiresInMs && options.leaseExpiresInMs > 0) {
|
|
403
|
-
const renewUrl = `${gatewayBase.replace(
|
|
407
|
+
const renewUrl = `${gatewayBase.replace(START_MANAGED_INFERENCE_BROKER_RE, '')}/renew`;
|
|
404
408
|
const renewModel = modelScope?.gatewayModelAlias ?? legacyModel;
|
|
405
409
|
const refreshCapability = options.refreshCapability;
|
|
406
410
|
renewal = startRenewalLoop({
|
|
@@ -654,7 +658,7 @@ function resolveGatewayUrl(base, allowedOrigin, path) {
|
|
|
654
658
|
try {
|
|
655
659
|
const parsedBase = new URL(base);
|
|
656
660
|
const canonicalPath = path.startsWith('/v1/') ? path : `/v1${path}`;
|
|
657
|
-
const basePath = parsedBase.pathname.replace(
|
|
661
|
+
const basePath = parsedBase.pathname.replace(BUILD_MANAGED_INFERENCE_RELAY_CREDENTIAL_RE, '');
|
|
658
662
|
const suffix = basePath.endsWith('/v1') ? canonicalPath.slice(3) : canonicalPath;
|
|
659
663
|
parsedBase.pathname = `${basePath}${suffix}`;
|
|
660
664
|
parsedBase.search = '';
|
|
@@ -927,7 +931,7 @@ function isPlainObject(value) {
|
|
|
927
931
|
const MAX_OPENAI_CACHE_BREAKPOINTS = 50;
|
|
928
932
|
function supportsManagedPromptCaching(modelScope) {
|
|
929
933
|
const model = nonEmpty(modelScope.wireModel)
|
|
930
|
-
?.replace(
|
|
934
|
+
?.replace(SUPPORTS_MANAGED_PROMPT_CACHING_RE, '')
|
|
931
935
|
.toLowerCase();
|
|
932
936
|
return modelScope.upstreamProvider === 'openai' && Boolean(model?.startsWith('gpt-5.6'));
|
|
933
937
|
}
|
|
@@ -941,7 +945,7 @@ function supportsManagedPromptCaching(modelScope) {
|
|
|
941
945
|
*/
|
|
942
946
|
function enforcePromptCacheEnvelope(payload, envelope, modelScope) {
|
|
943
947
|
const model = nonEmpty(modelScope.wireModel)
|
|
944
|
-
?.replace(
|
|
948
|
+
?.replace(SUPPORTS_MANAGED_PROMPT_CACHING_RE, '')
|
|
945
949
|
.toLowerCase();
|
|
946
950
|
const claudeCacheControlFamily = ['anthropic', 'openrouter', 'bedrock'].includes(modelScope.upstreamProvider) &&
|
|
947
951
|
model?.includes('claude');
|
package/oclif.manifest.json
CHANGED
|
@@ -7498,6 +7498,13 @@
|
|
|
7498
7498
|
"allowNo": false,
|
|
7499
7499
|
"type": "boolean"
|
|
7500
7500
|
},
|
|
7501
|
+
"idempotency-key": {
|
|
7502
|
+
"description": "Name this start (1-128 characters: letters, numbers, dot, underscore, colon, hyphen). The CLI already names every start and, when the server does not confirm one (a 502, 503 or 504, or a dropped connection), sends the same request again so the server returns the turn it accepted instead of starting a second one. Pass your own key to re-attach to a start from another process: the same key and prompt return the original turn; a different prompt under it is refused.",
|
|
7503
|
+
"name": "idempotency-key",
|
|
7504
|
+
"hasDynamicHelp": false,
|
|
7505
|
+
"multiple": false,
|
|
7506
|
+
"type": "option"
|
|
7507
|
+
},
|
|
7501
7508
|
"repair-wait": {
|
|
7502
7509
|
"description": "Seconds to keep waiting when a platform update restarts the server relaying a turn your machine is still running. The server repairs the reply onto the conversation when the machine finishes, and the CLI prints it and exits 0; if the wait runs out the original failure is reported. 0 ends at the failure immediately. At most the server's own hold for such a turn (2100s).",
|
|
7503
7510
|
"name": "repair-wait",
|
|
@@ -102760,7 +102767,8 @@
|
|
|
102760
102767
|
"examples": [
|
|
102761
102768
|
"<%= config.bin %> spaces workflow-templates extract <space-id> <workflow-id> --nodes task_1,approval_1 --title \"Task with review\"",
|
|
102762
102769
|
"<%= config.bin %> spaces workflow-templates extract <space-id> <workflow-id> --nodes task_1,approval_1 --title Review --scope space --json",
|
|
102763
|
-
"<%= config.bin %> spaces workflow-templates extract <space-id> <workflow-id> --nodes task_1 --title Draft --no-publish"
|
|
102770
|
+
"<%= config.bin %> spaces workflow-templates extract <space-id> <workflow-id> --nodes task_1 --title Draft --no-publish",
|
|
102771
|
+
"<%= config.bin %> spaces workflow-templates extract <space-id> <workflow-id> --nodes call_1 --title \"Nightly sync\" --keep-concrete call_1.definitionId"
|
|
102764
102772
|
],
|
|
102765
102773
|
"flags": {
|
|
102766
102774
|
"bare": {
|
|
@@ -102839,6 +102847,13 @@
|
|
|
102839
102847
|
"multiple": false,
|
|
102840
102848
|
"type": "option"
|
|
102841
102849
|
},
|
|
102850
|
+
"keep-concrete": {
|
|
102851
|
+
"description": "Keep one value concrete instead of turning it into a slot: nodeKey.configPath (for example call_1.definitionId). Repeat for more. The node must be in --nodes. The template then only works where that value resolves, and publishing it checks that a workflow_call target is published in this space.",
|
|
102852
|
+
"name": "keep-concrete",
|
|
102853
|
+
"hasDynamicHelp": false,
|
|
102854
|
+
"multiple": true,
|
|
102855
|
+
"type": "option"
|
|
102856
|
+
},
|
|
102842
102857
|
"publish": {
|
|
102843
102858
|
"description": "Publish v1 immediately (default: true; --no-publish leaves it a draft)",
|
|
102844
102859
|
"name": "publish",
|
|
@@ -144366,5 +144381,5 @@
|
|
|
144366
144381
|
]
|
|
144367
144382
|
}
|
|
144368
144383
|
},
|
|
144369
|
-
"version": "0.1.
|
|
144384
|
+
"version": "0.1.148"
|
|
144370
144385
|
}
|