@aiwg/cli 2026.11.7 → 2026.11.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/agentic/code/addons/aiwg-hooks/hooks/aiwg-prompt-discovery.cjs +3 -2
- package/agentic/code/providers/capability-matrix.yaml +4 -4
- package/agentic/code/providers/model-capabilities.v1.json +169 -46
- package/agentic/code/providers/model-catalog.v1.json +17 -15
- package/bin/aiwg.mjs +3 -1
- package/dist/src/agents/agent-packager.js +3 -3
- package/dist/src/artifacts/cli.js +6 -2
- package/dist/src/artifacts/fortemi-core-sync.js +2 -0
- package/dist/src/artifacts/index-query-help.js +27 -0
- package/dist/src/artifacts/query-engine-installation.js +17 -4
- package/dist/src/artifacts/query-engine-name-intent.js +56 -0
- package/dist/src/artifacts/query-engine-scoring.js +14 -8
- package/dist/src/artifacts/query-engine-show-card.js +3 -3
- package/dist/src/cli/agent-spawn.js +4 -4
- package/dist/src/cli/handlers/best-practices-audit.js +1 -1
- package/dist/src/cli/handlers/bundle-deployment-mode.js +26 -13
- package/dist/src/cli/handlers/bundle-reconciliation.js +2 -2
- package/dist/src/cli/handlers/init.js +1 -1
- package/dist/src/cli/handlers/issues.js +5 -0
- package/dist/src/cli/handlers/marketplace-plugin-search.js +6 -5
- package/dist/src/cli/handlers/marketplace.js +1 -1
- package/dist/src/cli/handlers/models-muse-wrapper.js +32 -0
- package/dist/src/cli/handlers/models.js +5 -4
- package/dist/src/cli/handlers/refresh-artifact-freshness.js +51 -0
- package/dist/src/cli/handlers/refresh-bundles.js +3 -0
- package/dist/src/cli/handlers/refresh-managed-deployment.js +19 -7
- package/dist/src/cli/handlers/refresh-user-hooks.js +102 -0
- package/dist/src/cli/handlers/refresh.js +9 -3
- package/dist/src/cli/handlers/repo-access.js +15 -2
- package/dist/src/cli/handlers/sdlc-accelerate.js +1 -1
- package/dist/src/cli/handlers/steward.js +1 -1
- package/dist/src/cli/handlers/subcommands-bundles.js +1 -1
- package/dist/src/cli/handlers/subcommands-discovery.js +5 -0
- package/dist/src/cli/handlers/subcommands-list.js +1 -1
- package/dist/src/cli/handlers/subcommands-plugins.js +1 -1
- package/dist/src/cli/handlers/subcommands-storage.js +11 -0
- package/dist/src/cli/handlers/team.js +1 -1
- package/dist/src/cli/handlers/use-additive-bundles.js +9 -2
- package/dist/src/cli/handlers/use-bundle-counts.js +1 -1
- package/dist/src/cli/handlers/use-copy-selection.js +42 -0
- package/dist/src/cli/handlers/use.js +33 -38
- package/dist/src/cli/handlers/workspace-context.js +4 -0
- package/dist/src/cli/help-generator.js +1 -1
- package/dist/src/cli/new-project-options.js +46 -0
- package/dist/src/cli/router.js +15 -4
- package/dist/src/cli/scope-resolver.js +6 -6
- package/dist/src/cli/services/deployment-probe-scope.js +11 -0
- package/dist/src/cli/services/deployment-staleness.js +83 -0
- package/dist/src/cli/services/deployment-verification.js +20 -11
- package/dist/src/config/aiwg-config.js +1 -1
- package/dist/src/config/authorization-cli.js +36 -1
- package/dist/src/config/config-normalization.js +3 -1
- package/dist/src/config/worker-guidance-warning.js +8 -0
- package/dist/src/data/community.yaml +3 -3
- package/dist/src/extensions/commands/definitions.js +2 -2
- package/dist/src/extensions/manifest.js +27 -1
- package/dist/src/extensions/user-hook-diagnostics.js +18 -1
- package/dist/src/extensions/verified-hook-command.js +9 -0
- package/dist/src/features/catalog.js +2 -2
- package/dist/src/issues/cli.js +10 -2
- package/dist/src/marketplace/cache.js +31 -0
- package/dist/src/marketplace/plugin-search.js +39 -20
- package/dist/src/marketplace/public-search.js +122 -0
- package/dist/src/marketplace/registry.js +2 -0
- package/dist/src/marketplace/search-contract.js +19 -0
- package/dist/src/marketplace/sources/public-search.js +81 -0
- package/dist/src/mcp/cli.mjs +8 -7
- package/dist/src/mcp/credentials.mjs +1 -1
- package/dist/src/mcp/registry.js +6 -2
- package/dist/src/mcp/tool-filters.mjs +1 -1
- package/dist/src/memory/provider-memory-adapter.js +1 -1
- package/dist/src/models/catalog-policy.js +2 -1
- package/dist/src/models/config-loader.js +2 -1
- package/dist/src/models/cursor-models.js +92 -0
- package/dist/src/models/cursor-worker-version.d.mts +2 -0
- package/dist/src/models/cursor-worker-version.mjs +27 -0
- package/dist/src/models/model-capabilities.v1.json +169 -46
- package/dist/src/models/model-catalog.v1.json +17 -15
- package/dist/src/models/model-discovery.js +7 -6
- package/dist/src/models/policy-resources.js +1 -1
- package/dist/src/models/provider-policy.js +1 -1
- package/dist/src/models/worker-direct-readiness.js +8 -5
- package/dist/src/models/worker-health-readiness.js +4 -0
- package/dist/src/models/worker-installation.d.mts +5 -2
- package/dist/src/models/worker-installation.mjs +20 -12
- package/dist/src/models/worker-invocation-policy.js +22 -2
- package/dist/src/models/worker-plan.js +3 -1
- package/dist/src/models/worker-wiring-diagnostics.js +25 -0
- package/dist/src/models/wrapper-deployment.js +1 -1
- package/dist/src/models/wrapper-enforcement.js +6 -2
- package/dist/src/plugin/skill-command-frontmatter.js +1 -1
- package/dist/src/plugin/skill-command-translator.js +1 -1
- package/dist/src/policy/repo-access-workspace-spec.js +63 -0
- package/dist/src/policy/repo-access.js +22 -0
- package/dist/src/providers/capability-matrix.yaml +4 -4
- package/dist/src/providers/deployment-ownership.mjs +1 -1
- package/dist/src/providers/deployment-preservation.mjs +10 -5
- package/dist/src/providers/deployment-removal.js +1 -1
- package/dist/src/providers/devin-compat.d.mts +4 -0
- package/dist/src/providers/devin-compat.mjs +29 -0
- package/dist/src/providers/grok-build-acp.js +39 -9
- package/dist/src/providers/grok-build-paths.js +8 -7
- package/dist/src/providers/provider-context-contracts.js +7 -3
- package/dist/src/providers/provider-definition-schema.js +1 -1
- package/dist/src/providers/provider-definitions.js +1 -1
- package/dist/src/providers/provider-definitions.mjs +3 -3
- package/dist/src/providers/provider-inventory.js +13 -1
- package/dist/src/providers/provider-seeds-1.js +1 -1
- package/dist/src/providers/provider-seeds-3.js +10 -9
- package/dist/src/providers/transformation-receipt-integration.js +1 -1
- package/dist/src/sessions/adapters/windsurf.js +7 -7
- package/dist/src/sessions/grok-build-cli-output.js +1 -1
- package/dist/src/sessions/grok-build-cli.js +7 -1
- package/dist/src/skills/bundle-import-cli.js +61 -0
- package/dist/src/skills/bundle-import-plan.js +108 -0
- package/dist/src/skills/bundle-import.js +192 -0
- package/dist/src/skills/cli.js +5 -0
- package/dist/src/skills/deployment-policy.js +1 -1
- package/dist/src/skills/importer.js +4 -4
- package/dist/src/smiths/agentsmith/demo.js +1 -1
- package/dist/src/smiths/agentsmith/examples.js +6 -6
- package/dist/src/smiths/commandsmith/generator.js +1 -1
- package/dist/src/smiths/context-pipeline/allowlist.js +1 -1
- package/dist/src/smiths/context-pipeline/muse-bridge.js +7 -4
- package/dist/src/smiths/context-pipeline/parallelism-section.js +2 -2
- package/dist/src/smiths/context-pipeline/workspace-audit.js +37 -6
- package/dist/src/smiths/context-pipeline/workspace-bootstrap.js +3 -1
- package/dist/src/smiths/context-pipeline/workspace-doctor.js +16 -4
- package/dist/src/smiths/context-pipeline/workspace-document.js +4 -2
- package/dist/src/smiths/hook-bridge/codex-trust.js +56 -7
- package/dist/src/smiths/hook-bridge/cursor-translator.js +89 -0
- package/dist/src/smiths/hook-bridge/index.js +4 -1
- package/dist/src/smiths/skillsmith/collision-detector.js +1 -1
- package/dist/src/smiths/skillsmith/namespace-adapter.js +1 -1
- package/dist/src/smiths/skillsmith/platform-resolver.js +2 -2
- package/dist/src/writing/campaign-report.js +4 -3
- package/dist/src/writing/contextual-diagnostics.js +29 -3
- package/dist/src/writing/current-patterns.catalogue.json +4 -4
- package/dist/src/writing/current-patterns.js +3 -2
- package/dist/src/writing/structural-judgment.catalogue.json +17 -0
- package/dist/src/writing/structural-judgment.js +33 -0
- package/dist/src/writing/structural-patterns.js +78 -6
- package/dist/src/writing/validation-campaign.js +3 -0
- package/dist/src/writing/validation-engine.js +7 -4
- package/package.json +4 -2
- package/schemas/models/model-config-compatibility.v1.schema.json +1 -1
- package/tools/agents/deploy-agents.mjs +12 -10
- package/tools/agents/deploy-options.mjs +1 -0
- package/tools/agents/providers/base-behaviors.mjs +1 -1
- package/tools/agents/providers/base-contract.mjs +1 -1
- package/tools/agents/providers/base-kernel-skills.mjs +1 -1
- package/tools/agents/providers/base-models-platforms.mjs +9 -7
- package/tools/agents/providers/base-rule-index.mjs +1 -1
- package/tools/agents/providers/codex.mjs +1 -0
- package/tools/agents/providers/cursor-prompt-discovery.mjs +13 -0
- package/tools/agents/providers/cursor.mjs +2 -0
- package/tools/agents/providers/devin.mjs +3 -0
- package/tools/agents/providers/grok-build.mjs +14 -19
- package/tools/agents/providers/hook-capabilities.mjs +1 -1
- package/tools/agents/providers/model-wrapper.mjs +1 -1
- package/tools/agents/providers/openclaw-context.mjs +6 -0
- package/tools/agents/providers/openclaw.mjs +14 -12
- package/tools/agents/providers/rule-delivery-surface.mjs +15 -11
- package/tools/agents/providers/rule-deployment-prepare.mjs +9 -8
- package/tools/agents/providers/rule-presentation.mjs +1 -1
- package/tools/agents/providers/rule-projection.mjs +5 -5
- package/tools/agents/providers/rule-startup.mjs +4 -2
- package/tools/agents/providers/skill-copy-prune.mjs +5 -1
- package/tools/agents/providers/windsurf.mjs +26 -26
- package/tools/agents/use-rule-selection.mjs +1 -1
- package/tools/cli/workspace-deployment-health.mjs +38 -0
- package/tools/cli/workspace-status.mjs +5 -2
- package/tools/daemon/provider-watcher.mjs +3 -3
- package/tools/plugin/package-plugins.mjs +16 -2
- package/tools/ralph-external/lib/deepseek-harness-adapter.mjs +36 -22
- package/tools/ralph-external/lib/factory-adapter.mjs +13 -28
- package/tools/ralph-external/lib/factory-stream-final.mjs +31 -0
- package/tools/skills/deploy-skills-codex.mjs +2 -1
- package/vscode-extension/schemas/aiwg.config.v1.json +15 -1
package/dist/src/mcp/registry.js
CHANGED
|
@@ -369,7 +369,11 @@ export function getProviderConfigPath(provider, projectDir = '.', options = {})
|
|
|
369
369
|
? resolve(process.env.GROK_HOME || resolve(homeDir, '.grok'), 'config.toml')
|
|
370
370
|
: resolve(projectDir, '.grok/config.toml'),
|
|
371
371
|
opencode: resolve(projectDir, 'opencode.json'),
|
|
372
|
-
|
|
372
|
+
devin: resolve(homeDir, '.codeium/windsurf/mcp_config.json'),
|
|
373
|
+
windsurf: resolve(homeDir, '.codeium/windsurf/mcp_config.json'), // Deprecated selector, same legacy path.
|
|
374
|
+
'devin-desktop': resolve(homeDir, '.codeium/windsurf/mcp_config.json'),
|
|
375
|
+
'devin-local': resolve(homeDir, '.codeium/windsurf/mcp_config.json'),
|
|
376
|
+
cascade: resolve(homeDir, '.codeium/windsurf/mcp_config.json'),
|
|
373
377
|
warp: resolve(homeDir, '.warp/mcp.json'),
|
|
374
378
|
};
|
|
375
379
|
return pathMap[provider] || '';
|
|
@@ -554,7 +558,7 @@ export const SUPPORTED_PROVIDERS = [
|
|
|
554
558
|
'codex',
|
|
555
559
|
'grok-build',
|
|
556
560
|
'opencode',
|
|
557
|
-
'
|
|
561
|
+
'devin',
|
|
558
562
|
'warp',
|
|
559
563
|
];
|
|
560
564
|
//# sourceMappingURL=registry.js.map
|
|
@@ -32,7 +32,7 @@ import { resolve } from 'path';
|
|
|
32
32
|
import { homedir } from 'os';
|
|
33
33
|
import { normalizeRuntimeProviderId } from '../providers/provider-definitions.mjs';
|
|
34
34
|
|
|
35
|
-
const PER_SERVER_DISABLED_TOOLS = new Set(['factory', '
|
|
35
|
+
const PER_SERVER_DISABLED_TOOLS = new Set(['factory', 'devin', 'antigravity']);
|
|
36
36
|
const SERVER_DISABLE_KEY = { factory: 'disabled', antigravity: 'disabled' };
|
|
37
37
|
|
|
38
38
|
function unique(values) {
|
|
@@ -31,7 +31,7 @@ const POLICIES = {
|
|
|
31
31
|
pi: { limits: ['runtime-load-unobserved'], sessionEffect: 'next-session' },
|
|
32
32
|
omp: { limits: ['nearest-nonempty-context', 'depth-ordered-include-deduplication', 'runtime-load-unobserved'], sessionEffect: 'next-session' },
|
|
33
33
|
warp: { limits: ['runtime-load-unobserved'], sessionEffect: 'next-session' },
|
|
34
|
-
|
|
34
|
+
devin: { limits: ['runtime-load-unobserved'], sessionEffect: 'next-session' },
|
|
35
35
|
generic: { limits: ['indexed-baseline-only'], sessionEffect: 'unknown' },
|
|
36
36
|
};
|
|
37
37
|
function memoryRoots(definition) {
|
|
@@ -3,6 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { integer, dateTime, url, number } from '../schema/zod-validation.mjs';
|
|
4
4
|
import { getCatalogValidators, validateWorkerModelObservation } from './worker-review-lineage.js';
|
|
5
5
|
import { MODEL_TIERS, normalizeModelTier, flagshipElected, isFlagshipModel } from './tiers.js';
|
|
6
|
+
import { normalizeDesktopModelConfig } from '../providers/devin-compat.mjs';
|
|
6
7
|
import { ProviderSchema, requireModelResource } from './policy-resources.js';
|
|
7
8
|
import { loadProviderModelCapabilities } from './provider-policy.js';
|
|
8
9
|
import { WorkerSelectionPolicySchema } from './worker-selection-policy.js';
|
|
@@ -129,7 +130,7 @@ export function validateCanonicalModelPolicy(input) {
|
|
|
129
130
|
return { valid: true, policy: parsed.data, diagnostics: [] };
|
|
130
131
|
}
|
|
131
132
|
export function validateUserProjectModelConfig(input) {
|
|
132
|
-
const parsed = UserProjectModelConfigSchema.safeParse(input);
|
|
133
|
+
const parsed = UserProjectModelConfigSchema.safeParse(normalizeDesktopModelConfig(input));
|
|
133
134
|
if (parsed.success)
|
|
134
135
|
return { valid: true, diagnostics: [] };
|
|
135
136
|
return {
|
|
@@ -7,6 +7,7 @@ import { workerDispatchBlocked, isWorkerMaintenance, workerRecoveryDiagnostic }
|
|
|
7
7
|
* @architecture @docs/models/supported-models.md
|
|
8
8
|
*/
|
|
9
9
|
import { readFile } from 'fs/promises';
|
|
10
|
+
import { normalizeDesktopModelConfig } from '../providers/devin-compat.mjs';
|
|
10
11
|
import { dirname, resolve } from 'path';
|
|
11
12
|
import { fileURLToPath } from 'node:url';
|
|
12
13
|
import { homedir } from 'os';
|
|
@@ -57,7 +58,7 @@ export class ConfigLoader {
|
|
|
57
58
|
if (this.cache && this.cacheDigest === digest)
|
|
58
59
|
return this.cache;
|
|
59
60
|
// Merge with precedence
|
|
60
|
-
const merged = this.merge(aiwgDefault, userConfig, projectConfig);
|
|
61
|
+
const merged = this.merge(aiwgDefault, normalizeDesktopModelConfig(userConfig), normalizeDesktopModelConfig(projectConfig));
|
|
61
62
|
// A group-bound wrapper's inherited exact pin survives a higher-precedence
|
|
62
63
|
// tier-only preference. Preserve the legacy unbound merge otherwise.
|
|
63
64
|
if (parallelism?.worker_dispatch) {
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { tmpdir } from 'node:os';
|
|
2
|
+
import { stripVTControlCharacters } from 'node:util';
|
|
3
|
+
import { buildWorkerObservation, classifyDiscoveryError, discoveryDigest, redactModelDiscoveryText, runModelDiscoveryCommand } from './model-discovery.js';
|
|
4
|
+
function diagnostic(value) {
|
|
5
|
+
// Redact bearer values before assignment redaction consumes the scheme.
|
|
6
|
+
return redactModelDiscoveryText(value.replace(/\bbearer\s+[A-Za-z0-9._~+/=-]+/gi, 'Bearer [REDACTED]'));
|
|
7
|
+
}
|
|
8
|
+
export async function discoverCursorListModels(command = 'cursor-agent', runner = runModelDiscoveryCommand, options = {}) {
|
|
9
|
+
const observedAt = (options.now?.() ?? new Date()).toISOString();
|
|
10
|
+
const base = { provider: 'cursor', source: 'native', observedAt,
|
|
11
|
+
accountScope: 'local-account', ...(options.accountBinding ? { accountBinding: options.accountBinding } : {}), models: [] };
|
|
12
|
+
try {
|
|
13
|
+
let version = options.runtimeVersion;
|
|
14
|
+
if (!version) {
|
|
15
|
+
const probe = await runner(command, ['--version'], { cwd: tmpdir(), timeoutMs: 5000 });
|
|
16
|
+
// Cursor emits a plain date-version banner. Retain only that known shape.
|
|
17
|
+
if (probe.exitCode === 0)
|
|
18
|
+
version = /^(\d+\.\d+\.\d+-[\w.-]+)$/.exec(probe.stdout.trim())?.[1]
|
|
19
|
+
.replace(/^(\d+)\.(\d+)\.(\d+)/, (_, major, minor, patch) => [major, minor, patch].map(Number).join('.'));
|
|
20
|
+
}
|
|
21
|
+
if (version)
|
|
22
|
+
base.runtimeVersion = version;
|
|
23
|
+
const result = await runner(command, ['--list-models'], { cwd: tmpdir(), timeoutMs: 15_000 });
|
|
24
|
+
if (result.exitCode !== 0) {
|
|
25
|
+
const error = diagnostic(result.stderr.trim() || result.stdout.trim())
|
|
26
|
+
|| `Cursor --list-models exited ${result.exitCode}`;
|
|
27
|
+
return { ...base, errorKind: /not logged in|log in|sign in/i.test(error) ? 'authentication' : classifyDiscoveryError(error), error };
|
|
28
|
+
}
|
|
29
|
+
const diagnostics = [];
|
|
30
|
+
const seen = new Set();
|
|
31
|
+
for (const [index, raw] of result.stdout.split(/\r?\n/).entries()) {
|
|
32
|
+
const line = stripVTControlCharacters(raw).replace(/[\u200B-\u200D\u2060\uFEFF]/g, '').trim();
|
|
33
|
+
if (!line || /^Available models$/i.test(line) || /^Tip: use --model <id>/.test(line))
|
|
34
|
+
continue;
|
|
35
|
+
const match = /^([a-z0-9][a-z0-9._-]*) - (\S.*)$/i.exec(line);
|
|
36
|
+
if (!match || /[\x00-\x1f\x7f]/.test(line)) {
|
|
37
|
+
diagnostics.push(`Cursor --list-models line ${index + 1}: malformed model row`);
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const [, id, label] = match;
|
|
41
|
+
if (seen.has(id)) {
|
|
42
|
+
diagnostics.push(`Cursor --list-models line ${index + 1}: duplicate model selector`);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
seen.add(id);
|
|
46
|
+
const displayName = label.replace(/(?:\s+\([^()]*\))+$/, '').trim();
|
|
47
|
+
const automatic = /^(?:auto|default)$/i.test(id);
|
|
48
|
+
// Effort belongs to the exact selector; never invent bracket overrides or
|
|
49
|
+
// a default effort for a name that does not report a variant.
|
|
50
|
+
const effort = /-extra-high(?:-fast)?$/.test(id) ? 'xhigh'
|
|
51
|
+
: /-(minimal|none|low|medium|high|xhigh|max)(?:-fast)?$/.exec(id)?.[1];
|
|
52
|
+
const declared = Object.hasOwn(options.modelLimits ?? {}, id) ? options.modelLimits[id] : undefined;
|
|
53
|
+
const displayContext = /(?:^|\s)1M(?:\s|$)/.test(displayName) ? 1_000_000 : undefined;
|
|
54
|
+
const worker = buildWorkerObservation({ cliId: options.cliId ?? 'cursor', source: `${command} --list-models`,
|
|
55
|
+
pointer: `/lines/${index + 1}`, runtimeVersion: version ?? 'unknown', accountScope: 'local-account',
|
|
56
|
+
accountBinding: options.accountBinding, observedAt, contentDigest: discoveryDigest(line) }, {
|
|
57
|
+
modelId: id, family: 'unknown', visibility: 'listed', lifecycle: 'active',
|
|
58
|
+
availability: automatic ? 'unavailable' : 'accessible',
|
|
59
|
+
contextTokens: declared?.contextTokens ?? displayContext, maxOutputTokens: declared?.maxOutputTokens,
|
|
60
|
+
efforts: !automatic && effort ? [{ id: effort, selfDelegates: null }] : [],
|
|
61
|
+
provenanceFields: ['/apiModelId:listed-selector', '/llmProvider:cursor-gateway', '/displayName', '/efforts:selector-suffix',
|
|
62
|
+
...(!declared && displayContext ? ['/contextTokens:display-name-1M'] : [])],
|
|
63
|
+
});
|
|
64
|
+
if (declared) {
|
|
65
|
+
// The native list does not attest operator limits.
|
|
66
|
+
worker.provenance[0].fields = worker.provenance[0].fields.filter(field => field !== '/contextTokens' && (declared.maxOutputTokens === undefined || field !== '/maxOutputTokens'));
|
|
67
|
+
const source = `/parallelism/clis/${options.cliId ?? 'cursor'}/modelLimits`;
|
|
68
|
+
worker.provenance.push({ fields: ['/contextTokens', ...(declared.maxOutputTokens === undefined ? [] : ['/maxOutputTokens'])],
|
|
69
|
+
source, kind: 'operator', observedAt, digest: discoveryDigest(JSON.stringify({ id, ...declared })), confidence: 'reported' });
|
|
70
|
+
worker.evidenceDigest = discoveryDigest(JSON.stringify({ native: worker.evidenceDigest, source, id, ...declared }));
|
|
71
|
+
}
|
|
72
|
+
// The list identifies the Cursor gateway selector, not an attested
|
|
73
|
+
// upstream API model, vendor, family or data policy.
|
|
74
|
+
base.models.push({ id, apiModelId: id, llmProvider: 'cursor', displayName,
|
|
75
|
+
isDefault: /\([^()]*\bdefault\b[^()]*\)/i.test(label), hidden: false,
|
|
76
|
+
reasoningEfforts: worker.efforts.map(entry => entry.id), worker });
|
|
77
|
+
}
|
|
78
|
+
return { ...base, ...(diagnostics.length || !base.models.length ? { errorKind: 'invalid-output',
|
|
79
|
+
error: diagnostics.join('; ') || 'Cursor returned no parseable model rows.' } : {}) };
|
|
80
|
+
}
|
|
81
|
+
catch (cause) {
|
|
82
|
+
const error = diagnostic(cause instanceof Error ? cause.message : 'Cursor discovery command failed');
|
|
83
|
+
return { ...base, models: [], errorKind: classifyDiscoveryError(error), error };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/** Bind refresh to the configured Cursor executable and account label when unambiguous. */
|
|
87
|
+
export async function discoverProjectCursorModels(options) {
|
|
88
|
+
const clis = Object.entries(options.parallelism?.clis ?? {}).filter(([id, cli]) => cli.enabled !== false && !cli.localModels && (cli.adapter ?? `providers:${id}`) === 'providers:cursor');
|
|
89
|
+
const [cliId, cli] = clis.length === 1 ? clis[0] : [];
|
|
90
|
+
return discoverCursorListModels(cli?.executable, options.runner, { cliId, accountBinding: cli?.accountScope, modelLimits: cli?.modelLimits, now: options.now });
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=cursor-models.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Compare Cursor date/hash releases by date while retaining exact build identities.
|
|
2
|
+
import { gt } from 'semver';
|
|
3
|
+
|
|
4
|
+
export function workerComparableVersion(version, provider) {
|
|
5
|
+
if (provider !== 'cursor') return version;
|
|
6
|
+
const match = /^(\d{4})\.(\d{1,2})\.(\d{1,2})-[0-9a-f]{7,40}$/.exec(version);
|
|
7
|
+
if (!match) return '';
|
|
8
|
+
const [, year, month, day] = match.map(Number);
|
|
9
|
+
const date = new Date(Date.UTC(year, month - 1, day));
|
|
10
|
+
if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day) return '';
|
|
11
|
+
return `${year}.${month}.${day}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function cursorWorkerVersionWarning(version, testedVersions, cli) {
|
|
15
|
+
const current = workerComparableVersion(version, 'cursor');
|
|
16
|
+
if (!current) return null;
|
|
17
|
+
let latest;
|
|
18
|
+
for (const tested of testedVersions) {
|
|
19
|
+
const comparable = workerComparableVersion(tested, 'cursor');
|
|
20
|
+
if (comparable && (!latest || gt(comparable, latest.comparable))) latest = { version: tested, comparable };
|
|
21
|
+
}
|
|
22
|
+
if (!latest || !gt(current, latest.comparable)) return null;
|
|
23
|
+
return `Cursor build ${version} is newer than tested build ${latest.version}. `
|
|
24
|
+
+ 'Run the manual smoke in docs/providers/cursor-direct.md, then refresh approval with '
|
|
25
|
+
+ `\`aiwg doctor --probe-workers --qualify --cli ${cli} --yes\`. `
|
|
26
|
+
+ 'Qualification records this exact build; it does not run a live model smoke.';
|
|
27
|
+
}
|