maka-agent 0.2.0-dev.43.20260919 → 0.2.0-dev.45.20260921
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/LICENSE +12 -6
- package/dist/mcp-capability-provider.js +7 -0
- package/dist/runtime-host-service-manager.js +1 -6
- package/dist/runtime-host-tui-command.js +1 -1
- package/dist/runtime-host-update-command.js +39 -27
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@maka/core/dist/artifacts.js +1 -0
- package/node_modules/@maka/core/dist/chat-model-choice.js +3 -0
- package/node_modules/@maka/core/dist/llm-connections.js +3 -21
- package/node_modules/@maka/core/dist/model-catalog.js +8 -20
- package/node_modules/@maka/core/dist/model-metadata.generated.js +304 -304
- package/node_modules/@maka/core/dist/model-metadata.js +1 -2
- package/node_modules/@maka/core/dist/model-thinking.js +16 -1
- package/node_modules/@maka/core/dist/models-dev-projection.js +0 -1
- package/node_modules/@maka/core/dist/provider-auth.js +1 -7
- package/node_modules/@maka/core/dist/provider-registry.js +20 -58
- package/node_modules/@maka/core/dist/recall.js +5 -1
- package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +7 -0
- package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +14 -1
- package/node_modules/@maka/core/dist/session-start-mode.js +2 -5
- package/node_modules/@maka/core/dist/session.js +0 -1
- package/node_modules/@maka/core/dist/settings.js +19 -3
- package/node_modules/@maka/core/dist/tool-quiet-preview.js +2 -16
- package/node_modules/@maka/core/dist/transcript-search.js +46 -0
- package/node_modules/@maka/core/package.json +1 -4
- package/node_modules/@maka/mcp/dist/index.js +22 -0
- package/node_modules/@maka/mcp/dist/oauth.js +4 -2
- package/node_modules/@maka/mcp/dist/tool-progress.js +45 -0
- package/node_modules/@maka/runtime/dist/model-factory.js +0 -16
- package/node_modules/@maka/runtime/dist/model-fetcher.js +1 -4
- package/node_modules/@maka/runtime/dist/model-runtime.js +0 -8
- package/node_modules/@maka/runtime/dist/opencode-session-header.js +2 -3
- package/node_modules/@maka/runtime/dist/recall-tools.js +4 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +5 -57
- package/node_modules/@maka/runtime/dist/subagent-tools.js +69 -11
- package/node_modules/@maka/runtime/dist/test-connection.js +4 -114
- package/node_modules/@maka/runtime/package.json +0 -1
- package/node_modules/@maka/runtime-host/dist/client/client-capability-channel.js +44 -9
- package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +25 -18
- package/node_modules/@maka/runtime-host/dist/client/host-handoff.js +3 -1
- package/node_modules/@maka/runtime-host/dist/client/index.js +1 -1
- package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +33 -3
- package/node_modules/@maka/runtime-host/dist/protocol/connection-effects.js +0 -108
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +12 -1
- package/node_modules/@maka/runtime-host/dist/protocol/message.js +10 -0
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +4 -6
- package/node_modules/@maka/runtime-host/dist/protocol/recall.js +270 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-catalog.js +1 -1
- package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +1 -7
- package/node_modules/@maka/runtime-host/dist/protocol/turn.js +0 -33
- package/node_modules/@maka/runtime-host/dist/protocol/usage-screen.js +12 -4
- package/node_modules/@maka/runtime-host/dist/server/access-credential-store.js +6 -0
- package/node_modules/@maka/runtime-host/dist/server/bootstrap-runtime-policy.js +31 -104
- package/node_modules/@maka/runtime-host/dist/server/connection-effect-coordinator.js +1 -57
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +11 -35
- package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +3 -20
- package/node_modules/@maka/runtime-host/dist/server/interactive-turn-coordinator.js +1 -16
- package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +46 -28
- package/node_modules/@maka/runtime-host/dist/server/recall-coordinator.js +117 -0
- package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +5 -16
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +21 -12
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +0 -4
- package/node_modules/@maka/runtime-host/dist/server/session-turn-access-request-coordinator.js +7 -17
- package/node_modules/@maka/storage/dist/artifact-metadata-codec.js +4 -3
- package/node_modules/@maka/storage/dist/artifact-store.js +1 -11
- package/node_modules/@maka/storage/dist/process-lifetime-file-update-lock.js +0 -41
- package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +0 -62
- package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +0 -31
- package/node_modules/@maka/storage/dist/runtime-policy-stores.js +0 -3
- package/node_modules/@maka/storage/dist/sqlite-usage-schema.js +29 -5
- package/node_modules/@maka/storage/dist/sqlite-workflow-schema.js +2 -0
- package/node_modules/@maka/storage/dist/storage-writer-composition.js +0 -3
- package/node_modules/@maka/storage/dist/telemetry-file-schema.js +5 -3
- package/node_modules/@maka/storage/dist/usage-screen.js +5 -6
- package/node_modules/@maka/storage/dist/usage-stores.js +14 -4
- package/node_modules/@maka/storage/package.json +0 -2
- package/package.json +1 -1
- package/node_modules/@maka/core/dist/connection-usage.js +0 -27
- package/node_modules/@maka/core/dist/deep-research-client-progress.js +0 -132
- package/node_modules/@maka/core/dist/deep-research-run.js +0 -625
- package/node_modules/@maka/core/dist/deep-research.js +0 -208
- package/node_modules/@maka/core/dist/thread-search.js +0 -498
- package/node_modules/@maka/runtime/dist/commandcode-cli-language-model.js +0 -837
- package/node_modules/@maka/runtime/dist/connection-usage.js +0 -232
- package/node_modules/@maka/runtime/dist/deep-research-tools.js +0 -732
- package/node_modules/@maka/runtime-host/dist/protocol/deep-research.js +0 -233
- package/node_modules/@maka/runtime-host/dist/server/deep-research-coordinator.js +0 -116
- package/node_modules/@maka/storage/dist/deep-research-authority.js +0 -129
- package/node_modules/@maka/storage/dist/deep-research-store.js +0 -343
package/LICENSE
CHANGED
|
@@ -251,9 +251,11 @@ Theme revision: ea888ef33283ea44e37817d36bc8e84a0568bc30
|
|
|
251
251
|
Copyright (c) 2026 Meta Platforms, Inc.
|
|
252
252
|
License: MIT
|
|
253
253
|
|
|
254
|
-
Maka includes an ejected adaptation of Astryx ChatReasoning v0.1.9
|
|
255
|
-
|
|
256
|
-
`
|
|
254
|
+
Maka includes an ejected adaptation of Astryx ChatReasoning v0.1.9 in
|
|
255
|
+
`packages/ui/src/astryx-chat-reasoning.tsx` and generated theme artifacts in
|
|
256
|
+
`apps/desktop/src/renderer/astryx-theme/`, based on Astryx theme-neutral v0.6.2.
|
|
257
|
+
Maka also redistributes
|
|
258
|
+
`patches/@astryxdesign+core+0.6.2.patch`, which modifies the MIT-licensed Astryx
|
|
257
259
|
core package. The following MIT License applies to that material:
|
|
258
260
|
|
|
259
261
|
MIT License
|
|
@@ -579,7 +581,9 @@ Revision: 8c921b2b3bf13494724ead4f0a814d80c56a7e8b
|
|
|
579
581
|
Copyright (c) 2025 Cua AI, Inc.
|
|
580
582
|
License: MIT
|
|
581
583
|
|
|
582
|
-
|
|
584
|
+
`apps/desktop/src/renderer/computer-use-overlay/engine/cursor-engine.ts` and
|
|
585
|
+
`apps/desktop/src/renderer/computer-use-overlay/engine/palette.ts` include
|
|
586
|
+
adaptations of this component.
|
|
583
587
|
The following MIT License applies to that material:
|
|
584
588
|
|
|
585
589
|
MIT License
|
|
@@ -767,8 +771,10 @@ SOFTWARE.
|
|
|
767
771
|
|
|
768
772
|
Desktop renderer vendored source assets
|
|
769
773
|
|
|
770
|
-
The source archive includes third-party SVG paths and source assets
|
|
771
|
-
|
|
774
|
+
The source archive includes third-party SVG paths and source assets from
|
|
775
|
+
Lobe Icons (MIT), LocalAI (MIT), Simple Icons (CC0-1.0), TDesign Icons (MIT),
|
|
776
|
+
MingCute (Apache-2.0), Allogo (MIT), Ant Design Icons (MIT), and Semi Design
|
|
777
|
+
(MIT), used by the desktop renderer. Their file-by-file inventory, immutable upstream revisions,
|
|
772
778
|
copyright notices, and license texts are in:
|
|
773
779
|
|
|
774
780
|
apps/desktop/src/renderer/public/THIRD_PARTY_LICENSES.txt
|
|
@@ -76,6 +76,13 @@ export function createMcpCapabilityProvider(manager) {
|
|
|
76
76
|
return projectMcpResult(await manager.callTool(binding, frame.arguments, {
|
|
77
77
|
signal: options.signal,
|
|
78
78
|
requestInteraction: options.requestInteraction,
|
|
79
|
+
...(options.progress
|
|
80
|
+
? {
|
|
81
|
+
onProgress: (current, total) => {
|
|
82
|
+
options.progress?.(current, total);
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
: {}),
|
|
79
86
|
}));
|
|
80
87
|
},
|
|
81
88
|
};
|
|
@@ -27,7 +27,7 @@ import { truncateUtf8 } from '@maka/core/diagnostic-log';
|
|
|
27
27
|
import { canonicalProjectDirectoryRootSpec, isCanonicalRuntimeHostWebSocketPath, PROJECT_DIRECTORY_MAX_ROOTS, projectDirectoryRootSpecValid, RUNTIME_HOST_PROTOCOL_VERSION, } from '@maka/runtime-host/protocol';
|
|
28
28
|
import { connectExistingRuntimeHost, prepareConnectedRuntimeHostRetirement, } from '@maka/runtime-host/client';
|
|
29
29
|
import { resolveRuntimeHostManagedServiceId, RUNTIME_HOST_SERVICE_LOG_MAX_BYTES, } from '@maka/runtime-host/operator';
|
|
30
|
-
import {
|
|
30
|
+
import { withProcessLifetimeFileUpdateLock } from '@maka/storage/process-lifetime-file-update-lock';
|
|
31
31
|
import { discoverMarkedStorageRoot, resolveExistingStorageRoot, tryAcquireInteractiveRootOwner, } from '@maka/storage/root-authority';
|
|
32
32
|
import { isRuntimeHostManagedDeploymentCli, removeRuntimeHostManagedDeployment, resolveExistingRuntimeHostManagedDeploymentRoot, resolveRuntimeHostManagedDeploymentForCli, resolveRuntimeHostManagedDeploymentRoot, } from './runtime-host-managed-deployment.js';
|
|
33
33
|
import { writeRuntimeHostManagedUpdatePolicy } from './runtime-host-update-policy-store.js';
|
|
@@ -79,11 +79,6 @@ export async function withRuntimeHostManagedServiceDeploymentLock(clientDataRoot
|
|
|
79
79
|
await mkdir(clientDataRoot, { recursive: true, mode: 0o700 });
|
|
80
80
|
return withProcessLifetimeFileUpdateLock(join(clientDataRoot, SERVICE_DEPLOYMENT_LOCK_FILE), operation, timeoutMs);
|
|
81
81
|
}
|
|
82
|
-
export async function withRuntimeHostManagedServiceLegacyOperatorLeases(clientDataRoot, operation, timeoutMs = SERVICE_OPERATION_LOCK_TIMEOUT_MS) {
|
|
83
|
-
const configPath = resolveRuntimeHostManagedServiceConfigPath(clientDataRoot);
|
|
84
|
-
await mkdir(dirname(configPath), { recursive: true, mode: 0o700 });
|
|
85
|
-
return withLegacyFileUpdateLockLease(join(clientDataRoot, SERVICE_LIFECYCLE_LOCK_FILE), (lifecycleFd) => withLegacyFileUpdateLockLease(configPath, (configFd) => operation([lifecycleFd, configFd]), timeoutMs), timeoutMs);
|
|
86
|
-
}
|
|
87
82
|
export async function replaceRuntimeHostManagedService(input, backend, overrides = {}) {
|
|
88
83
|
const deps = runtimeHostServiceManagerDeps(overrides);
|
|
89
84
|
const configPath = resolveRuntimeHostManagedServiceConfigPath(input.clientDataRoot);
|
|
@@ -50,7 +50,7 @@ export async function runRuntimeHostTui(input) {
|
|
|
50
50
|
throw error;
|
|
51
51
|
const configured = await runFirstRunOnboarding(input.clientDataRoot, input.workspaceRoot, input.cwd, input.locale, input.hostProfileId);
|
|
52
52
|
if (!configured)
|
|
53
|
-
|
|
53
|
+
return 0;
|
|
54
54
|
context = await createRuntimeHostTuiContext(contextInput);
|
|
55
55
|
}
|
|
56
56
|
let ownerAction;
|
|
@@ -22,7 +22,7 @@ import { truncateUtf8 } from '@maka/core/diagnostic-log';
|
|
|
22
22
|
import { activateRuntimeHostManagedDeployment } from '@maka/runtime-host/client';
|
|
23
23
|
import { compareProductReleaseVersions, createRuntimeHostLegacyPosixOperatorCommand, decodeRuntimeHostServiceManagementFrame, encodeRuntimeHostServiceManagementFrame, RUNTIME_HOST_SERVICE_ERROR_CODE_MAX_BYTES, RUNTIME_HOST_SERVICE_ERROR_MESSAGE_MAX_BYTES, RUNTIME_HOST_OPERATOR_ACCESS_MANAGEMENT_CAPABILITY, RUNTIME_HOST_OPERATOR_CAPABILITY_REQUEST_ENV, RUNTIME_HOST_OPERATOR_PROCESS_LIFETIME_LOCK_CAPABILITY, runtimeHostOperatorInvocation, RuntimeHostManagedDeploymentError as RuntimeHostDeploymentAuthorityError, } from '@maka/runtime-host/operator';
|
|
24
24
|
import { isRuntimeHostDevelopmentPackageVersion, assertRuntimeHostManagedOperatorConfig, assertRuntimeHostManagedOperatorDeployment, convergeRuntimeHostManagedOperator, verifyRuntimeHostManagedOperator, openRuntimeHostManagedPackageDeployment, prepareRuntimeHostManagedPackageDeployment, pruneRuntimeHostManagedPackages, resolveRuntimeHostManagedControlRoot, resolveRuntimeHostManagedPackageCliPath, RuntimeHostManagedDeploymentError, } from './runtime-host-managed-deployment.js';
|
|
25
|
-
import { runtimeHostManagedServiceConfigFingerprint, manageRuntimeHostService, replaceRuntimeHostManagedService, resolveRuntimeHostManagedServiceId, RuntimeHostServiceManagerError, verifyRuntimeHostManagedServiceReady, withRuntimeHostManagedServiceDeploymentLock,
|
|
25
|
+
import { runtimeHostManagedServiceConfigFingerprint, manageRuntimeHostService, replaceRuntimeHostManagedService, resolveRuntimeHostManagedServiceId, RuntimeHostServiceManagerError, verifyRuntimeHostManagedServiceReady, withRuntimeHostManagedServiceDeploymentLock, withRuntimeHostManagedServiceLifecycleLock, } from './runtime-host-service-manager.js';
|
|
26
26
|
import { createPlatformRuntimeHostServiceBackend, resolveRuntimeHostLifecycleProvider, runtimeHostServiceSummary, } from './runtime-host-service-management-command.js';
|
|
27
27
|
import { resolveManagedRuntimeHostUpdateSelection, RuntimeHostUpdateDiscoveryError, } from './runtime-host-update-discovery.js';
|
|
28
28
|
import { RuntimeHostUpdatePackageError, withRuntimeHostRegistryUpdatePackage, } from './runtime-host-update-package.js';
|
|
@@ -60,7 +60,6 @@ export async function runManagedRuntimeHostUpdateCli(options, overrides = {}, fr
|
|
|
60
60
|
}),
|
|
61
61
|
withLifecycleLock: withRuntimeHostManagedServiceLifecycleLock,
|
|
62
62
|
withDeploymentLock: withRuntimeHostManagedServiceDeploymentLock,
|
|
63
|
-
withLegacyOperatorLeases: withRuntimeHostManagedServiceLegacyOperatorLeases,
|
|
64
63
|
createBackend: createPlatformRuntimeHostServiceBackend,
|
|
65
64
|
verifyReady: verifyRuntimeHostManagedServiceReady,
|
|
66
65
|
runOperator: runManagedRuntimeHostOperator,
|
|
@@ -170,19 +169,48 @@ export async function runManagedRuntimeHostUpdateCli(options, overrides = {}, fr
|
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
const currentOperator = createRuntimeHostLegacyPosixOperatorCommand(join(serviceConfig.managedDeploymentRoot, 'operator'));
|
|
173
|
-
let currentOperatorUsesProcessLifetimeLock = false;
|
|
174
172
|
let currentOperatorUnavailable = false;
|
|
175
173
|
if (status.service.active) {
|
|
174
|
+
let probeSupportsLifetimeLock = false;
|
|
176
175
|
try {
|
|
177
|
-
|
|
176
|
+
const probe = await deps.runOperator(currentOperator, ['status', '--framed', ...expectedTargetArgs(options.expectedTarget)], {
|
|
178
177
|
capabilityRequest: RUNTIME_HOST_OPERATOR_PROCESS_LIFETIME_LOCK_CAPABILITY,
|
|
179
|
-
})
|
|
178
|
+
});
|
|
179
|
+
if (probe.kind === 'error') {
|
|
180
|
+
throw new RuntimeHostServiceManagerError('service_manager_operation_failed', `The current Runtime Host operator could not report its status: ${probe.error.message}`);
|
|
181
|
+
}
|
|
182
|
+
if (probe.action !== 'status') {
|
|
183
|
+
throw new Error('The current Runtime Host operator returned an invalid status result');
|
|
184
|
+
}
|
|
185
|
+
probeSupportsLifetimeLock =
|
|
186
|
+
probe.operatorCapabilities?.includes(RUNTIME_HOST_OPERATOR_PROCESS_LIFETIME_LOCK_CAPABILITY) ?? false;
|
|
180
187
|
}
|
|
181
188
|
catch (error) {
|
|
182
189
|
if (!activeTargetNeedsRepair)
|
|
183
190
|
throw error;
|
|
184
191
|
currentOperatorUnavailable = true;
|
|
185
192
|
}
|
|
193
|
+
// An operator that answered but cannot echo the requested
|
|
194
|
+
// capability predates the lifetime-lock protocol; retiring it would
|
|
195
|
+
// race unmanaged service state, so it must be removed before
|
|
196
|
+
// updating. This verdict is not a probe failure: it must refuse
|
|
197
|
+
// even when the target needs repair (where the catch above would
|
|
198
|
+
// degrade it to an unavailable operator), and nothing has been
|
|
199
|
+
// mutated yet — emitting directly keeps the instruction visible
|
|
200
|
+
// instead of folding it into the post-mutation "update_incomplete"
|
|
201
|
+
// remap.
|
|
202
|
+
if (!currentOperatorUnavailable && !probeSupportsLifetimeLock) {
|
|
203
|
+
emit({
|
|
204
|
+
schemaVersion: 1,
|
|
205
|
+
kind: 'error',
|
|
206
|
+
action: 'update',
|
|
207
|
+
error: {
|
|
208
|
+
code: 'service_manager_operation_failed',
|
|
209
|
+
message: 'The active Runtime Host operator predates capability reporting and cannot be safely retired; uninstall it before updating',
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
return 1;
|
|
213
|
+
}
|
|
186
214
|
}
|
|
187
215
|
emit(progress('staging', currentVersion, options.version));
|
|
188
216
|
deployment = await deps.withLifecycleLock(options.clientDataRoot, () => targetDeploymentIsCurrent
|
|
@@ -212,11 +240,6 @@ export async function runManagedRuntimeHostUpdateCli(options, overrides = {}, fr
|
|
|
212
240
|
}
|
|
213
241
|
if (status.service.active) {
|
|
214
242
|
emit(progress('retiring', currentVersion, options.version));
|
|
215
|
-
const runCurrentOperator = (args) => currentOperatorUsesProcessLifetimeLock
|
|
216
|
-
? deps.runOperator(currentOperator, args)
|
|
217
|
-
: deps.withLegacyOperatorLeases(options.clientDataRoot, (inheritedFds) => deps.runOperator(currentOperator, args, {
|
|
218
|
-
inheritedFds,
|
|
219
|
-
}));
|
|
220
243
|
let retirement = currentOperatorUnavailable
|
|
221
244
|
? {
|
|
222
245
|
schemaVersion: 1,
|
|
@@ -227,7 +250,7 @@ export async function runManagedRuntimeHostUpdateCli(options, overrides = {}, fr
|
|
|
227
250
|
message: 'The active Runtime Host operator is unavailable',
|
|
228
251
|
},
|
|
229
252
|
}
|
|
230
|
-
: await
|
|
253
|
+
: await deps.runOperator(currentOperator, [
|
|
231
254
|
'retire',
|
|
232
255
|
'--framed',
|
|
233
256
|
...expectedTargetArgs(options.expectedTarget),
|
|
@@ -772,16 +795,6 @@ function activeTasksRetirementFrame(status) {
|
|
|
772
795
|
retirement: { kind: 'active_tasks' },
|
|
773
796
|
};
|
|
774
797
|
}
|
|
775
|
-
function operatorUsesProcessLifetimeLock(frame) {
|
|
776
|
-
if (frame.kind === 'error') {
|
|
777
|
-
throw new RuntimeHostServiceManagerError('service_manager_operation_failed', `The current Runtime Host operator could not report its lock protocol: ${frame.error.message}`);
|
|
778
|
-
}
|
|
779
|
-
if (frame.action !== 'status') {
|
|
780
|
-
throw new Error('The current Runtime Host operator returned an invalid capability result');
|
|
781
|
-
}
|
|
782
|
-
return (frame.operatorCapabilities?.includes(RUNTIME_HOST_OPERATOR_PROCESS_LIFETIME_LOCK_CAPABILITY) ===
|
|
783
|
-
true);
|
|
784
|
-
}
|
|
785
798
|
function operatorCapabilities() {
|
|
786
799
|
return process.env[RUNTIME_HOST_OPERATOR_CAPABILITY_REQUEST_ENV] ===
|
|
787
800
|
RUNTIME_HOST_OPERATOR_ACCESS_MANAGEMENT_CAPABILITY
|
|
@@ -790,21 +803,20 @@ function operatorCapabilities() {
|
|
|
790
803
|
}
|
|
791
804
|
: {};
|
|
792
805
|
}
|
|
793
|
-
async function runManagedRuntimeHostOperator(operator, args, invocation
|
|
806
|
+
async function runManagedRuntimeHostOperator(operator, args, invocation) {
|
|
794
807
|
return new Promise((resolve, reject) => {
|
|
795
|
-
const inheritedFds = invocation.inheritedFds ?? [];
|
|
796
808
|
const command = runtimeHostOperatorInvocation(operator, args);
|
|
797
809
|
const child = spawn(command.executable, [...command.args], {
|
|
798
|
-
// A detached
|
|
799
|
-
// this updater
|
|
810
|
+
// A detached operator can finish a retirement already in progress even
|
|
811
|
+
// if this updater exits, so an exact retry never steals active work.
|
|
800
812
|
detached: process.platform !== 'win32',
|
|
801
|
-
env: invocation
|
|
813
|
+
env: invocation?.capabilityRequest
|
|
802
814
|
? {
|
|
803
815
|
...process.env,
|
|
804
816
|
[RUNTIME_HOST_OPERATOR_CAPABILITY_REQUEST_ENV]: invocation.capabilityRequest,
|
|
805
817
|
}
|
|
806
818
|
: process.env,
|
|
807
|
-
stdio: ['ignore', 'pipe', 'pipe'
|
|
819
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
808
820
|
windowsHide: true,
|
|
809
821
|
});
|
|
810
822
|
if (!child.stdout || !child.stderr) {
|
|
Binary file
|
|
@@ -85,6 +85,7 @@ const ARTIFACT_SOURCE_POLICIES = {
|
|
|
85
85
|
tool_result_projection: { userDeletable: false, userVisible: false, sharedReadable: true },
|
|
86
86
|
tool_result_archive: { userDeletable: false, userVisible: false, sharedReadable: false },
|
|
87
87
|
subagent_writeback: { userDeletable: false, userVisible: true, sharedReadable: false },
|
|
88
|
+
// Kept so reports saved before Deep Research retirement remain readable.
|
|
88
89
|
deep_research: { userDeletable: false, userVisible: true, sharedReadable: false },
|
|
89
90
|
user_upload: { userDeletable: true, userVisible: false, sharedReadable: true },
|
|
90
91
|
session_effect: { userDeletable: false, userVisible: false, sharedReadable: false },
|
|
@@ -37,6 +37,9 @@ export function buildChatModelChoices(connections) {
|
|
|
37
37
|
...(provider.authKind === 'oauth_token' ? {} : { connectionName: connection.name }),
|
|
38
38
|
isDefault: entry.isDefault,
|
|
39
39
|
thinkingLevels: entry.thinkingLevels,
|
|
40
|
+
...(entry.defaultThinkingLevel === undefined
|
|
41
|
+
? {}
|
|
42
|
+
: { defaultThinkingLevel: entry.defaultThinkingLevel }),
|
|
40
43
|
supportsVision: entry.supportsVision,
|
|
41
44
|
...(entry.contextWindow !== undefined ? { contextWindow: entry.contextWindow } : {}),
|
|
42
45
|
...(declaredWindow !== undefined ? { declaredContextWindow: declaredWindow } : {}),
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
19
|
import { CODEX_SUBSCRIPTION_UNSUPPORTED_CHATGPT_MODELS } from './codex-model-compatibility.js';
|
|
20
|
-
import { CATALOG_PROVIDER_TYPES,
|
|
20
|
+
import { CATALOG_PROVIDER_TYPES, PROVIDER_REGISTRY, RECOMMENDED_PROVIDER_TYPES, providerDefaultsOf, providerFallbackModelIds, providerMenuLabel, } from './provider-registry.js';
|
|
21
21
|
export { CODEX_SUBSCRIPTION_UNSUPPORTED_CHATGPT_MODELS };
|
|
22
|
-
export { CATALOG_PROVIDER_TYPES,
|
|
22
|
+
export { CATALOG_PROVIDER_TYPES, PROVIDER_REGISTRY, RECOMMENDED_PROVIDER_TYPES, providerDefaultsOf, providerFallbackModelIds, providerMenuLabel, };
|
|
23
23
|
export function isRelayProviderType(providerType) {
|
|
24
24
|
return providerType === 'openai-compatible' || providerType === 'openai-responses-compatible';
|
|
25
25
|
}
|
|
@@ -69,7 +69,7 @@ export function connectionEnabledModelIds(connection) {
|
|
|
69
69
|
* 3. the Host's entry says the connection can hold a chat on it.
|
|
70
70
|
*
|
|
71
71
|
* (3) already subsumes what clients used to re-derive locally: a retired
|
|
72
|
-
* provider
|
|
72
|
+
* provider and a model whose metadata says
|
|
73
73
|
* it cannot chat are all non-offerable before a client sees them. A client
|
|
74
74
|
* re-testing any of those against its OWN registry answers for a build that is
|
|
75
75
|
* not the one running the send.
|
|
@@ -135,12 +135,6 @@ export function authorizeConnectionModel(connection, modelId) {
|
|
|
135
135
|
const model = modelId.trim();
|
|
136
136
|
if (!model || !connectionEnabledModelIds(connection).includes(model))
|
|
137
137
|
return undefined;
|
|
138
|
-
// The one veto: quarantined ids fail in a shape the send cannot surface
|
|
139
|
-
// (e.g. a billed 200 with an empty completion), so the request settling it
|
|
140
|
-
// is not available as the arbiter. See ProviderDefaults.brokenModelIds.
|
|
141
|
-
if (providerDefaultsOf(connection.providerType)?.brokenModelIds?.includes(model)) {
|
|
142
|
-
return undefined;
|
|
143
|
-
}
|
|
144
138
|
// The observed row wins wherever it exists: it carries wire metadata such as
|
|
145
139
|
// `apiProtocol`, and capabilities, which a synthesized entry cannot. Absent
|
|
146
140
|
// capabilities already mean "unknown", not "unsupported".
|
|
@@ -268,18 +262,6 @@ export function reconcileConnectionAfterModelFetch(connection, models, options)
|
|
|
268
262
|
}),
|
|
269
263
|
};
|
|
270
264
|
}
|
|
271
|
-
/**
|
|
272
|
-
* The models a connection created without an explicit selection starts with,
|
|
273
|
-
* or undefined when the provider seeds nothing. Derived from the provider's
|
|
274
|
-
* shipped baseline rather than listed a second time: the two can then never
|
|
275
|
-
* disagree about what "all of them" means.
|
|
276
|
-
*/
|
|
277
|
-
export function defaultEnabledModelIdsWhenOmitted(providerType) {
|
|
278
|
-
const defaults = providerDefaultsOf(providerType);
|
|
279
|
-
if (!defaults?.enableShippedModelsByDefault)
|
|
280
|
-
return undefined;
|
|
281
|
-
return providerFallbackModelIds(defaults);
|
|
282
|
-
}
|
|
283
265
|
export function providerAuthRequiresSecret(providerType) {
|
|
284
266
|
const authKind = providerDefaultsOf(providerType)?.authKind;
|
|
285
267
|
return authKind === 'api_key' || authKind === 'oauth_token';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* specific language governing permissions and limitations
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
|
-
import { applyModelOverride, resolveModelLimits } from './model-thinking.js';
|
|
19
|
+
import { applyModelOverride, defaultThinkingLevelForConnection, resolveModelLimits, } from './model-thinking.js';
|
|
20
20
|
import { CODEX_SUBSCRIPTION_UNSUPPORTED_CHATGPT_MODELS, PROVIDER_REGISTRY, providerDefaultsOf, providerFallbackModelIds, providerSupportsModelDiscovery, } from './llm-connections.js';
|
|
21
21
|
import { lookupModelMetadata, resolveModelVisionSupport } from './model-metadata.js';
|
|
22
22
|
import { thinkingVariantsForConnection, } from './model-thinking.js';
|
|
@@ -95,36 +95,22 @@ export function buildConnectionModelCatalogEntries(input) {
|
|
|
95
95
|
if (!defaults)
|
|
96
96
|
return [];
|
|
97
97
|
const supportsModelDiscovery = providerSupportsModelDiscovery(connection.providerType);
|
|
98
|
-
// Quarantined ids never surface as offerable entries — from any source,
|
|
99
|
-
// including inventories stored or selections made before the quarantine —
|
|
100
|
-
// mirroring the `authorizeConnectionModel` veto.
|
|
101
|
-
const broken = new Set(defaults.brokenModelIds ?? []);
|
|
102
98
|
const fallbackModels = providerFallbackModelIds(defaults);
|
|
103
|
-
|
|
104
|
-
// re-enter the catalog either. `models` and `enabledModelIds` are filtered
|
|
105
|
-
// below, but a broken default reaches `makeMissingDefaultEntry` unfiltered and
|
|
106
|
-
// would be re-added as a selectable `provider_default` row — picker-visible
|
|
107
|
-
// and default-capable while `authorizeConnectionModel` vetoes the same id. A
|
|
108
|
-
// reachable persisted state: the id was picker-visible before the quarantine.
|
|
109
|
-
// Dropping it leaves the connection with no valid default (readiness reports
|
|
110
|
-
// `missing_model`), which is what a model that can no longer send warrants.
|
|
111
|
-
const defaultModel = broken.has((connection.defaultModel ?? '').trim())
|
|
112
|
-
? undefined
|
|
113
|
-
: connection.defaultModel;
|
|
99
|
+
const defaultModel = connection.defaultModel;
|
|
114
100
|
const fallbackModelIds = new Set(fallbackModels);
|
|
115
|
-
const projectedModelsById = new Map((connection.models ?? []).
|
|
101
|
+
const projectedModelsById = new Map((connection.models ?? []).map((model) => [model.id, model]));
|
|
116
102
|
// Fallback providers have no live inventory, but a projected connection can
|
|
117
103
|
// still carry enabled model-facts entries that are absent from the static
|
|
118
104
|
// list. Keep both sets in the catalog so those user-declared models retain
|
|
119
105
|
// their metadata.
|
|
120
106
|
const models = supportsModelDiscovery
|
|
121
|
-
? connection.models
|
|
107
|
+
? connection.models
|
|
122
108
|
: [
|
|
123
109
|
...fallbackModels.map((id) => projectedModelsById.get(id) ?? {
|
|
124
110
|
id,
|
|
125
111
|
...displayNameForKnownModel(connection.providerType, id),
|
|
126
112
|
}),
|
|
127
|
-
...(connection.models ?? []).filter((model) => !
|
|
113
|
+
...(connection.models ?? []).filter((model) => !fallbackModelIds.has(model.id)),
|
|
128
114
|
];
|
|
129
115
|
return buildModelCatalogEntries({
|
|
130
116
|
providerType: connection.providerType,
|
|
@@ -143,7 +129,7 @@ export function buildConnectionModelCatalogEntries(input) {
|
|
|
143
129
|
savedModelIds: [
|
|
144
130
|
...(connection.enabledModelIds ?? []),
|
|
145
131
|
...Object.keys(connection.modelOverrides ?? {}),
|
|
146
|
-
]
|
|
132
|
+
],
|
|
147
133
|
});
|
|
148
134
|
}
|
|
149
135
|
/**
|
|
@@ -239,6 +225,7 @@ function makeEntry(ctx, model, overrides = {}) {
|
|
|
239
225
|
capabilities,
|
|
240
226
|
...(modalities !== undefined ? { modalities } : {}),
|
|
241
227
|
});
|
|
228
|
+
const defaultThinkingLevel = defaultThinkingLevelForConnection(thinkingContext, normalizedModel.id);
|
|
242
229
|
return {
|
|
243
230
|
id: normalizedModel.id,
|
|
244
231
|
...displayNameForModel(input.providerType, normalizedModel),
|
|
@@ -253,6 +240,7 @@ function makeEntry(ctx, model, overrides = {}) {
|
|
|
253
240
|
? {}
|
|
254
241
|
: { compactionThreshold: input.modelOverrides[normalizedModel.id].compactionThreshold }),
|
|
255
242
|
thinkingLevels: thinkingVariantsForConnection(thinkingContext, normalizedModel.id),
|
|
243
|
+
...(defaultThinkingLevel === undefined ? {} : { defaultThinkingLevel }),
|
|
256
244
|
...limits,
|
|
257
245
|
...(defaults.contextWindow === undefined
|
|
258
246
|
? {}
|