@corbat-tech/coco 2.25.4 → 2.25.5
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/cli/index.js +36 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -3764,6 +3764,8 @@ var init_openai = __esm({
|
|
|
3764
3764
|
"o3",
|
|
3765
3765
|
"o3-mini",
|
|
3766
3766
|
"o4-mini",
|
|
3767
|
+
"gpt-5",
|
|
3768
|
+
"codex",
|
|
3767
3769
|
"kimi-k2.5",
|
|
3768
3770
|
"kimi-k2-0324",
|
|
3769
3771
|
"kimi-latest"
|
|
@@ -4458,12 +4460,13 @@ var init_openai = __esm({
|
|
|
4458
4460
|
try {
|
|
4459
4461
|
const model = options?.model ?? this.config.model ?? DEFAULT_MODEL2;
|
|
4460
4462
|
const { input, instructions } = this.convertToResponsesInput(messages, options?.system);
|
|
4463
|
+
const supportsTemp = this.supportsTemperature(model);
|
|
4461
4464
|
const response = await this.client.responses.create({
|
|
4462
4465
|
model,
|
|
4463
4466
|
input,
|
|
4464
4467
|
instructions: instructions ?? void 0,
|
|
4465
4468
|
max_output_tokens: options?.maxTokens ?? this.config.maxTokens ?? 8192,
|
|
4466
|
-
temperature: options?.temperature ?? this.config.temperature ?? 0,
|
|
4469
|
+
...supportsTemp && { temperature: options?.temperature ?? this.config.temperature ?? 0 },
|
|
4467
4470
|
store: false
|
|
4468
4471
|
});
|
|
4469
4472
|
return {
|
|
@@ -4491,13 +4494,14 @@ var init_openai = __esm({
|
|
|
4491
4494
|
const model = options?.model ?? this.config.model ?? DEFAULT_MODEL2;
|
|
4492
4495
|
const { input, instructions } = this.convertToResponsesInput(messages, options?.system);
|
|
4493
4496
|
const tools = this.convertToolsForResponses(options.tools);
|
|
4497
|
+
const supportsTemp = this.supportsTemperature(model);
|
|
4494
4498
|
const response = await this.client.responses.create({
|
|
4495
4499
|
model,
|
|
4496
4500
|
input,
|
|
4497
4501
|
instructions: instructions ?? void 0,
|
|
4498
4502
|
tools,
|
|
4499
4503
|
max_output_tokens: options?.maxTokens ?? this.config.maxTokens ?? 8192,
|
|
4500
|
-
temperature: options?.temperature ?? this.config.temperature ?? 0,
|
|
4504
|
+
...supportsTemp && { temperature: options?.temperature ?? this.config.temperature ?? 0 },
|
|
4501
4505
|
store: false
|
|
4502
4506
|
});
|
|
4503
4507
|
let content = "";
|
|
@@ -4542,12 +4546,13 @@ var init_openai = __esm({
|
|
|
4542
4546
|
try {
|
|
4543
4547
|
const model = options?.model ?? this.config.model ?? DEFAULT_MODEL2;
|
|
4544
4548
|
const { input, instructions } = this.convertToResponsesInput(messages, options?.system);
|
|
4549
|
+
const supportsTemp = this.supportsTemperature(model);
|
|
4545
4550
|
const stream = await this.client.responses.create({
|
|
4546
4551
|
model,
|
|
4547
4552
|
input,
|
|
4548
4553
|
instructions: instructions ?? void 0,
|
|
4549
4554
|
max_output_tokens: options?.maxTokens ?? this.config.maxTokens ?? 8192,
|
|
4550
|
-
temperature: options?.temperature ?? this.config.temperature ?? 0,
|
|
4555
|
+
...supportsTemp && { temperature: options?.temperature ?? this.config.temperature ?? 0 },
|
|
4551
4556
|
store: false,
|
|
4552
4557
|
stream: true
|
|
4553
4558
|
});
|
|
@@ -4604,12 +4609,13 @@ var init_openai = __esm({
|
|
|
4604
4609
|
const model = options?.model ?? this.config.model ?? DEFAULT_MODEL2;
|
|
4605
4610
|
const { input, instructions } = this.convertToResponsesInput(messages, options?.system);
|
|
4606
4611
|
const tools = options.tools.length > 0 ? this.convertToolsForResponses(options.tools) : void 0;
|
|
4612
|
+
const supportsTemp = this.supportsTemperature(model);
|
|
4607
4613
|
const requestParams = {
|
|
4608
4614
|
model,
|
|
4609
4615
|
input,
|
|
4610
4616
|
instructions: instructions ?? void 0,
|
|
4611
4617
|
max_output_tokens: options?.maxTokens ?? this.config.maxTokens ?? 8192,
|
|
4612
|
-
temperature: options?.temperature ?? this.config.temperature ?? 0,
|
|
4618
|
+
...supportsTemp && { temperature: options?.temperature ?? this.config.temperature ?? 0 },
|
|
4613
4619
|
store: false,
|
|
4614
4620
|
stream: true
|
|
4615
4621
|
};
|
|
@@ -21112,15 +21118,23 @@ async function authenticateMcpOAuth(params) {
|
|
|
21112
21118
|
`MCP server '${params.serverName}' requires interactive OAuth in a TTY session. Run Coco in a terminal, or use mcp-remote (e.g. npx -y mcp-remote@latest ${resource}) for IDE bridge workflows.`
|
|
21113
21119
|
);
|
|
21114
21120
|
}
|
|
21115
|
-
|
|
21116
|
-
|
|
21117
|
-
|
|
21118
|
-
|
|
21119
|
-
|
|
21120
|
-
|
|
21121
|
-
|
|
21121
|
+
let authorizationServer;
|
|
21122
|
+
let authorizationMetadata;
|
|
21123
|
+
try {
|
|
21124
|
+
const protectedMetadata = await discoverProtectedResourceMetadata(
|
|
21125
|
+
resource,
|
|
21126
|
+
params.wwwAuthenticateHeader
|
|
21127
|
+
);
|
|
21128
|
+
authorizationServer = protectedMetadata.authorization_servers?.[0];
|
|
21129
|
+
if (authorizationServer) {
|
|
21130
|
+
authorizationMetadata = await discoverAuthorizationServerMetadata(authorizationServer);
|
|
21131
|
+
}
|
|
21132
|
+
} catch {
|
|
21122
21133
|
}
|
|
21123
|
-
|
|
21134
|
+
if (!authorizationMetadata) {
|
|
21135
|
+
authorizationMetadata = await discoverAuthorizationServerMetadata(resource);
|
|
21136
|
+
}
|
|
21137
|
+
authorizationServer = authorizationServer ?? authorizationMetadata.issuer ?? new URL(resource).origin;
|
|
21124
21138
|
if (stored && isTokenExpired2(stored) && stored.refreshToken && stored.clientId) {
|
|
21125
21139
|
try {
|
|
21126
21140
|
const refreshed = await refreshAccessToken2({
|
|
@@ -52826,10 +52840,12 @@ async function startRepl(options = {}) {
|
|
|
52826
52840
|
const mcpRegistry = new MCPRegistryImpl2();
|
|
52827
52841
|
await mcpRegistry.load();
|
|
52828
52842
|
const registryServers = mcpRegistry.listEnabledServers();
|
|
52829
|
-
const { loadProjectMCPFile: loadProjectMCPFile2, mergeMCPConfigs: mergeMCPConfigs2 } = await Promise.resolve().then(() => (init_config_loader(), config_loader_exports));
|
|
52830
|
-
const projectServers = await loadProjectMCPFile2(
|
|
52843
|
+
const { loadProjectMCPFile: loadProjectMCPFile2, loadMCPServersFromCOCOConfig: loadMCPServersFromCOCOConfig2, mergeMCPConfigs: mergeMCPConfigs2 } = await Promise.resolve().then(() => (init_config_loader(), config_loader_exports));
|
|
52844
|
+
const projectServers = await loadProjectMCPFile2(projectPath);
|
|
52845
|
+
const cocoConfigServers = await loadMCPServersFromCOCOConfig2();
|
|
52831
52846
|
const enabledServers = mergeMCPConfigs2(
|
|
52832
52847
|
registryServers,
|
|
52848
|
+
cocoConfigServers.filter((s) => s.enabled !== false),
|
|
52833
52849
|
projectServers.filter((s) => s.enabled !== false)
|
|
52834
52850
|
);
|
|
52835
52851
|
if (enabledServers.length > 0) {
|
|
@@ -52850,7 +52866,12 @@ async function startRepl(options = {}) {
|
|
|
52850
52866
|
}
|
|
52851
52867
|
for (const connection of connections.values()) {
|
|
52852
52868
|
try {
|
|
52853
|
-
await registerMCPTools2(toolRegistry, connection.name, connection.client);
|
|
52869
|
+
const wrapped = await registerMCPTools2(toolRegistry, connection.name, connection.client);
|
|
52870
|
+
if (wrapped.length === 0) {
|
|
52871
|
+
logger2.warn(
|
|
52872
|
+
`[MCP] Server '${connection.name}' connected but exposed 0 tools (check server auth/scopes).`
|
|
52873
|
+
);
|
|
52874
|
+
}
|
|
52854
52875
|
} catch (toolError) {
|
|
52855
52876
|
logger2.warn(
|
|
52856
52877
|
`[MCP] Failed to register tools for server '${connection.name}': ${toolError instanceof Error ? toolError.message : String(toolError)}`
|