@mcoda/codali 0.1.88 → 0.1.89
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/EvalCommand.d.ts +8 -0
- package/dist/cli/EvalCommand.d.ts.map +1 -1
- package/dist/cli/EvalCommand.js +93 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/docdex/DocdexClient.d.ts +8 -1
- package/dist/docdex/DocdexClient.d.ts.map +1 -1
- package/dist/docdex/DocdexClient.js +126 -33
- package/dist/eval/CodaliGatewayLiveHarness.d.ts +169 -0
- package/dist/eval/CodaliGatewayLiveHarness.d.ts.map +1 -0
- package/dist/eval/CodaliGatewayLiveHarness.js +824 -0
- package/dist/eval/GatewayEvalSuite.d.ts +202 -0
- package/dist/eval/GatewayEvalSuite.d.ts.map +1 -0
- package/dist/eval/GatewayEvalSuite.js +673 -0
- package/dist/gateway/AgentTierResolver.d.ts +74 -0
- package/dist/gateway/AgentTierResolver.d.ts.map +1 -0
- package/dist/gateway/AgentTierResolver.js +576 -0
- package/dist/gateway/AppToolGatewayDispatcher.d.ts +88 -0
- package/dist/gateway/AppToolGatewayDispatcher.d.ts.map +1 -0
- package/dist/gateway/AppToolGatewayDispatcher.js +381 -0
- package/dist/gateway/CodaliGateway.d.ts +73 -0
- package/dist/gateway/CodaliGateway.d.ts.map +1 -0
- package/dist/gateway/CodaliGateway.js +824 -0
- package/dist/gateway/CodaliGatewaySchemas.d.ts +21 -0
- package/dist/gateway/CodaliGatewaySchemas.d.ts.map +1 -0
- package/dist/gateway/CodaliGatewaySchemas.js +874 -0
- package/dist/gateway/CodaliGatewayStore.d.ts +157 -0
- package/dist/gateway/CodaliGatewayStore.d.ts.map +1 -0
- package/dist/gateway/CodaliGatewayStore.js +206 -0
- package/dist/gateway/CodaliGatewayTypes.d.ts +336 -0
- package/dist/gateway/CodaliGatewayTypes.d.ts.map +1 -0
- package/dist/gateway/CodaliGatewayTypes.js +1 -0
- package/dist/gateway/ContextPackBuilder.d.ts +43 -0
- package/dist/gateway/ContextPackBuilder.d.ts.map +1 -0
- package/dist/gateway/ContextPackBuilder.js +317 -0
- package/dist/gateway/EvidenceNormalizer.d.ts +42 -0
- package/dist/gateway/EvidenceNormalizer.d.ts.map +1 -0
- package/dist/gateway/EvidenceNormalizer.js +488 -0
- package/dist/gateway/GatewayPlanner.d.ts +195 -0
- package/dist/gateway/GatewayPlanner.d.ts.map +1 -0
- package/dist/gateway/GatewayPlanner.js +379 -0
- package/dist/gateway/GatewayPolicyCompiler.d.ts +30 -0
- package/dist/gateway/GatewayPolicyCompiler.d.ts.map +1 -0
- package/dist/gateway/GatewayPolicyCompiler.js +114 -0
- package/dist/gateway/GatewaySecurityPolicy.d.ts +14 -0
- package/dist/gateway/GatewaySecurityPolicy.d.ts.map +1 -0
- package/dist/gateway/GatewaySecurityPolicy.js +350 -0
- package/dist/gateway/GatewayStateMachine.d.ts +165 -0
- package/dist/gateway/GatewayStateMachine.d.ts.map +1 -0
- package/dist/gateway/GatewayStateMachine.js +790 -0
- package/dist/gateway/GatewayTraceReplay.d.ts +120 -0
- package/dist/gateway/GatewayTraceReplay.d.ts.map +1 -0
- package/dist/gateway/GatewayTraceReplay.js +273 -0
- package/dist/gateway/ToolCapabilityCompiler.d.ts +50 -0
- package/dist/gateway/ToolCapabilityCompiler.d.ts.map +1 -0
- package/dist/gateway/ToolCapabilityCompiler.js +442 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/runtime/CodaliRuntime.d.ts +7 -0
- package/dist/runtime/CodaliRuntime.d.ts.map +1 -1
- package/dist/runtime/CodaliRuntime.js +98 -54
- package/dist/tools/ToolRegistry.d.ts.map +1 -1
- package/dist/tools/ToolRegistry.js +4 -0
- package/dist/tools/ToolTypes.d.ts +1 -1
- package/dist/tools/ToolTypes.d.ts.map +1 -1
- package/dist/tools/ToolTypes.js +5 -1
- package/package.json +3 -3
|
@@ -6,6 +6,7 @@ import { OllamaRemoteProvider } from "../providers/OllamaRemoteProvider.js";
|
|
|
6
6
|
import { CodexCliProvider } from "../providers/CodexCliProvider.js";
|
|
7
7
|
import { MswarmWorkerProvider } from "../providers/MswarmWorkerProvider.js";
|
|
8
8
|
import { DocdexClient, normalizeDocdexRuntimeOperation, } from "../docdex/DocdexClient.js";
|
|
9
|
+
import { AppToolGatewayDispatchError, dispatchAppToolGateway, } from "../gateway/AppToolGatewayDispatcher.js";
|
|
9
10
|
import { createDiffTool } from "../tools/diff/DiffTool.js";
|
|
10
11
|
import { createDocdexTools } from "../tools/docdex/DocdexTools.js";
|
|
11
12
|
import { createFileTools } from "../tools/filesystem/FileTools.js";
|
|
@@ -440,10 +441,58 @@ const resolveGatewayContract = (contract, policyGateway) => {
|
|
|
440
441
|
return undefined;
|
|
441
442
|
return { ...(policyGateway ?? {}), ...(gateway ?? {}) };
|
|
442
443
|
};
|
|
444
|
+
const gatewayString = (gateway, keys) => {
|
|
445
|
+
if (!gateway)
|
|
446
|
+
return undefined;
|
|
447
|
+
for (const key of keys) {
|
|
448
|
+
const value = gateway[key];
|
|
449
|
+
if (typeof value === "string" && value.trim()) {
|
|
450
|
+
return value.trim();
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
return undefined;
|
|
454
|
+
};
|
|
455
|
+
const gatewayBoolean = (gateway, keys) => {
|
|
456
|
+
if (!gateway)
|
|
457
|
+
return undefined;
|
|
458
|
+
for (const key of keys) {
|
|
459
|
+
const value = gateway[key];
|
|
460
|
+
if (typeof value === "boolean") {
|
|
461
|
+
return value;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return undefined;
|
|
465
|
+
};
|
|
466
|
+
const gatewayEndpoint = (gateway) => gatewayString(gateway, ["endpoint"]);
|
|
467
|
+
const gatewaySigningSecret = (gateway) => gatewayString(gateway, [
|
|
468
|
+
"signatureSecret",
|
|
469
|
+
"signature_secret",
|
|
470
|
+
"signingSecret",
|
|
471
|
+
"signing_secret",
|
|
472
|
+
"secret",
|
|
473
|
+
"signature",
|
|
474
|
+
]);
|
|
475
|
+
const appToolGatewayTenantScope = (input) => stripUndefined({
|
|
476
|
+
tenant_id: input.metadata?.tenantId,
|
|
477
|
+
docdex_repo_id: input.docdex?.repoId,
|
|
478
|
+
});
|
|
479
|
+
const appToolGatewayRequesterScope = (input) => stripUndefined({
|
|
480
|
+
request_id: input.metadata?.requestId,
|
|
481
|
+
owner_user_id: input.metadata?.ownerUserId,
|
|
482
|
+
api_key_id: input.metadata?.apiKeyId,
|
|
483
|
+
agent_slug: input.metadata?.agentSlug,
|
|
484
|
+
});
|
|
485
|
+
const gatewayDispatchToolErrorCode = (error) => {
|
|
486
|
+
if (error.code === "GATEWAY_INVALID_ARGS")
|
|
487
|
+
return "tool_invalid_args";
|
|
488
|
+
if (error.code === "GATEWAY_HTTP_FAILED" ||
|
|
489
|
+
error.code === "GATEWAY_RESPONSE_MALFORMED") {
|
|
490
|
+
return "tool_execution_failed";
|
|
491
|
+
}
|
|
492
|
+
return "tool_permission_denied";
|
|
493
|
+
};
|
|
443
494
|
const createGatewayDynamicTool = (options) => {
|
|
444
495
|
const { name, contract, gateway, input, state } = options;
|
|
445
|
-
const endpoint = typeof gateway.endpoint === "string" ? gateway.endpoint : undefined;
|
|
446
|
-
const signature = typeof gateway.signature === "string" ? gateway.signature : undefined;
|
|
447
496
|
return {
|
|
448
497
|
name,
|
|
449
498
|
description: contract.description ??
|
|
@@ -453,44 +502,19 @@ const createGatewayDynamicTool = (options) => {
|
|
|
453
502
|
const startedAt = Date.now();
|
|
454
503
|
try {
|
|
455
504
|
assertDynamicArgsStayInScope(name, args);
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
const response = await fetch(endpoint, {
|
|
470
|
-
method: "POST",
|
|
471
|
-
headers: stripUndefined({
|
|
472
|
-
"content-type": "application/json",
|
|
473
|
-
"x-codali-app-tool-signature": signature,
|
|
474
|
-
}),
|
|
475
|
-
body: JSON.stringify({
|
|
476
|
-
tenant: input.metadata?.tenantId ? { id: input.metadata.tenantId } : undefined,
|
|
477
|
-
tool: name,
|
|
478
|
-
args,
|
|
479
|
-
run_id: context.runId,
|
|
480
|
-
session_id: input.session?.id,
|
|
481
|
-
request_id: input.metadata?.requestId,
|
|
482
|
-
read_only: true,
|
|
483
|
-
result_contract: contract.resultContract ?? contract.result_contract,
|
|
484
|
-
}),
|
|
505
|
+
const dispatched = await dispatchAppToolGateway({
|
|
506
|
+
runId: context.runId ?? input.metadata?.requestId ?? input.metadata?.jobId ?? "codali-runtime",
|
|
507
|
+
sessionId: input.session?.id,
|
|
508
|
+
requestId: input.metadata?.requestId,
|
|
509
|
+
tenantScope: appToolGatewayTenantScope(input),
|
|
510
|
+
requesterScope: appToolGatewayRequesterScope(input),
|
|
511
|
+
toolName: name,
|
|
512
|
+
args,
|
|
513
|
+
contract,
|
|
514
|
+
gateway,
|
|
515
|
+
allowedTools: input.policy.allowedTools,
|
|
516
|
+
deniedTools: input.policy.deniedTools,
|
|
485
517
|
});
|
|
486
|
-
const text = await response.text();
|
|
487
|
-
if (!response.ok) {
|
|
488
|
-
throw new ToolExecutionError("tool_execution_failed", `App tool gateway failed with HTTP ${response.status}`, {
|
|
489
|
-
retryable: response.status >= 500,
|
|
490
|
-
details: { tool: name, status: response.status, body: text.slice(0, 1000) },
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
const parsed = parseJsonPayload(text);
|
|
494
518
|
state.dynamicToolCalls.push({
|
|
495
519
|
name,
|
|
496
520
|
backingTool: "app_tool_gateway",
|
|
@@ -498,20 +522,30 @@ const createGatewayDynamicTool = (options) => {
|
|
|
498
522
|
latencyMs: Date.now() - startedAt,
|
|
499
523
|
});
|
|
500
524
|
return {
|
|
501
|
-
output:
|
|
502
|
-
data:
|
|
525
|
+
output: JSON.stringify(dispatched.evidencePayload, null, 2),
|
|
526
|
+
data: dispatched.evidencePayload,
|
|
503
527
|
};
|
|
504
528
|
}
|
|
505
529
|
catch (error) {
|
|
530
|
+
const toolError = error instanceof AppToolGatewayDispatchError
|
|
531
|
+
? new ToolExecutionError(gatewayDispatchToolErrorCode(error), error.message, {
|
|
532
|
+
retryable: error.retryable,
|
|
533
|
+
details: stripUndefined({
|
|
534
|
+
tool: name,
|
|
535
|
+
gatewayErrorCode: error.code,
|
|
536
|
+
gatewayDetails: error.details,
|
|
537
|
+
}),
|
|
538
|
+
})
|
|
539
|
+
: error;
|
|
506
540
|
state.dynamicToolCalls.push({
|
|
507
541
|
name,
|
|
508
542
|
backingTool: "app_tool_gateway",
|
|
509
543
|
status: "failed",
|
|
510
544
|
latencyMs: Date.now() - startedAt,
|
|
511
|
-
errorCode:
|
|
512
|
-
errorMessage:
|
|
545
|
+
errorCode: toolError instanceof ToolExecutionError ? toolError.code : "tool_execution_failed",
|
|
546
|
+
errorMessage: toolError instanceof Error ? toolError.message : String(toolError),
|
|
513
547
|
});
|
|
514
|
-
throw
|
|
548
|
+
throw toolError;
|
|
515
549
|
}
|
|
516
550
|
},
|
|
517
551
|
};
|
|
@@ -1032,6 +1066,8 @@ const isDocdexToolAllowed = (toolName, docdex) => {
|
|
|
1032
1066
|
}
|
|
1033
1067
|
return true;
|
|
1034
1068
|
};
|
|
1069
|
+
const isImmutableDocdexRuntimeContext = (docdex) => docdex?.immutableRuntimeContext === true ||
|
|
1070
|
+
docdex?.credentialSource === "attached_mswarm_api_key";
|
|
1035
1071
|
const registerRuntimeTool = (registry, tool, policy, docdex) => {
|
|
1036
1072
|
if (isRuntimeToolAllowed(tool.name, policy) && isDocdexToolAllowed(tool.name, docdex)) {
|
|
1037
1073
|
registry.register(tool);
|
|
@@ -1093,30 +1129,32 @@ const registerRuntimeContractTools = (registry, input, state, warnings) => {
|
|
|
1093
1129
|
const executionMode = contractString(candidate.contract, "executionMode", "execution_mode") ??
|
|
1094
1130
|
"server_supplied_snapshot_plus_docdex";
|
|
1095
1131
|
const gateway = resolveGatewayContract(candidate.contract, input.policy.appToolGateway);
|
|
1096
|
-
|
|
1132
|
+
const resolvedGatewayEndpoint = gatewayEndpoint(gateway);
|
|
1133
|
+
if (executionMode === "app_tool_gateway" || resolvedGatewayEndpoint) {
|
|
1097
1134
|
if (!gateway) {
|
|
1098
1135
|
recordSkippedDynamicTool(state, name, "gateway_not_configured");
|
|
1099
1136
|
continue;
|
|
1100
1137
|
}
|
|
1101
|
-
if (
|
|
1138
|
+
if (readOnly !== true) {
|
|
1139
|
+
recordSkippedDynamicTool(state, name, "not_read_only");
|
|
1140
|
+
continue;
|
|
1141
|
+
}
|
|
1142
|
+
if (gatewayBoolean(gateway, ["readOnly", "read_only"]) !== true) {
|
|
1102
1143
|
recordSkippedDynamicTool(state, name, "gateway_not_read_only");
|
|
1103
1144
|
continue;
|
|
1104
1145
|
}
|
|
1105
|
-
|
|
1106
|
-
? gateway.endpoint.trim()
|
|
1107
|
-
: undefined;
|
|
1108
|
-
if (!gatewayEndpoint) {
|
|
1146
|
+
if (!resolvedGatewayEndpoint) {
|
|
1109
1147
|
recordSkippedDynamicTool(state, name, "gateway_endpoint_missing");
|
|
1110
1148
|
continue;
|
|
1111
1149
|
}
|
|
1112
|
-
if ((gateway
|
|
1150
|
+
if (!gatewaySigningSecret(gateway)) {
|
|
1113
1151
|
recordSkippedDynamicTool(state, name, "gateway_signature_missing");
|
|
1114
1152
|
continue;
|
|
1115
1153
|
}
|
|
1116
1154
|
registerRuntimeTool(registry, createGatewayDynamicTool({
|
|
1117
1155
|
name,
|
|
1118
1156
|
contract: candidate.contract,
|
|
1119
|
-
gateway: { ...gateway, endpoint:
|
|
1157
|
+
gateway: { ...gateway, endpoint: resolvedGatewayEndpoint },
|
|
1120
1158
|
input,
|
|
1121
1159
|
state,
|
|
1122
1160
|
}), input.policy, input.docdex);
|
|
@@ -1177,16 +1215,22 @@ const buildRuntimeToolRegistry = (input, dynamicToolState, warnings) => {
|
|
|
1177
1215
|
if (input.policy.allowShell) {
|
|
1178
1216
|
register(createShellTool());
|
|
1179
1217
|
}
|
|
1218
|
+
const immutableDocdexContext = isImmutableDocdexRuntimeContext(input.docdex);
|
|
1180
1219
|
const docdexClient = new DocdexClient({
|
|
1181
|
-
baseUrl:
|
|
1220
|
+
baseUrl: immutableDocdexContext
|
|
1221
|
+
? input.docdex?.baseUrl ?? ""
|
|
1222
|
+
: input.docdex?.baseUrl ?? DEFAULT_DOCDEX_BASE_URL,
|
|
1182
1223
|
repoId: input.docdex?.repoId,
|
|
1183
|
-
repoRoot:
|
|
1224
|
+
repoRoot: immutableDocdexContext
|
|
1225
|
+
? undefined
|
|
1226
|
+
: input.docdex?.repoRoot ?? input.workspace.root,
|
|
1184
1227
|
dagSessionId: input.docdex?.dagSessionId ?? input.metadata?.requestId,
|
|
1185
1228
|
apiKey: input.docdex?.apiKey,
|
|
1186
1229
|
credentialSource: input.docdex?.credentialSource,
|
|
1187
1230
|
required: input.docdex?.required,
|
|
1188
1231
|
allowedOperations: input.docdex?.allowedOperations,
|
|
1189
1232
|
capabilities: input.docdex?.capabilities,
|
|
1233
|
+
immutableRuntimeContext: immutableDocdexContext,
|
|
1190
1234
|
});
|
|
1191
1235
|
for (const tool of createDocdexTools(docdexClient))
|
|
1192
1236
|
register(tool);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolRegistry.d.ts","sourceRoot":"","sources":["../../src/tools/ToolRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,cAAc,EAGnB,KAAK,mBAAmB,EAGzB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolRegistry.d.ts","sourceRoot":"","sources":["../../src/tools/ToolRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,cAAc,EAGnB,KAAK,mBAAmB,EAGzB,MAAM,gBAAgB,CAAC;AA4QxB,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAqC;IAElD,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAOpC,IAAI,IAAI,cAAc,EAAE;IAIxB,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC,CAAC;IAQzE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAkC/F"}
|
|
@@ -201,6 +201,10 @@ const PRESERVED_ERROR_CODES = new Set([
|
|
|
201
201
|
"tool_permission_denied",
|
|
202
202
|
"tool_timeout",
|
|
203
203
|
"tool_execution_failed",
|
|
204
|
+
"missing_credentials",
|
|
205
|
+
"repo_access_denied",
|
|
206
|
+
"scope_denied",
|
|
207
|
+
"encrypted_operation_disabled",
|
|
204
208
|
"docdex_context_missing",
|
|
205
209
|
"docdex_api_key_missing",
|
|
206
210
|
"docdex_operation_not_allowed",
|
|
@@ -27,7 +27,7 @@ export interface ToolInputSchema extends ToolSchemaDefinition {
|
|
|
27
27
|
properties?: Record<string, ToolSchemaDefinition>;
|
|
28
28
|
required?: string[];
|
|
29
29
|
}
|
|
30
|
-
export type ToolErrorCode = "tool_unknown" | "tool_schema_invalid" | "tool_invalid_args" | "tool_permission_denied" | "tool_timeout" | "tool_execution_failed" | "docdex_context_missing" | "docdex_api_key_missing" | "docdex_operation_not_allowed" | "docdex_auth_failed" | "docdex_repo_access_denied" | "docdex_unavailable";
|
|
30
|
+
export type ToolErrorCode = "tool_unknown" | "tool_schema_invalid" | "tool_invalid_args" | "tool_permission_denied" | "tool_timeout" | "tool_execution_failed" | "missing_credentials" | "repo_access_denied" | "scope_denied" | "encrypted_operation_disabled" | "docdex_context_missing" | "docdex_api_key_missing" | "docdex_operation_not_allowed" | "docdex_auth_failed" | "docdex_repo_access_denied" | "docdex_unavailable";
|
|
31
31
|
export type ToolErrorCategory = "lookup" | "schema" | "validation" | "permission" | "timeout" | "execution";
|
|
32
32
|
export interface ToolError {
|
|
33
33
|
code: ToolErrorCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolTypes.d.ts","sourceRoot":"","sources":["../../src/tools/ToolTypes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,MAAM,uBAAuB,GAC/B,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,WAAW,oBAAqB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnE,IAAI,CAAC,EAAE,uBAAuB,GAAG,uBAAuB,EAAE,CAAC;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,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B,GAAI,MAAM,aAAa,KAAG,iBAoB9D,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE9F,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,WAAW,CAAC;CACtB"}
|
package/dist/tools/ToolTypes.js
CHANGED
|
@@ -30,7 +30,11 @@ export const toolErrorCategoryForCode = (code) => {
|
|
|
30
30
|
return "timeout";
|
|
31
31
|
if (code === "docdex_context_missing")
|
|
32
32
|
return "validation";
|
|
33
|
-
if (code === "
|
|
33
|
+
if (code === "missing_credentials" ||
|
|
34
|
+
code === "repo_access_denied" ||
|
|
35
|
+
code === "scope_denied" ||
|
|
36
|
+
code === "encrypted_operation_disabled" ||
|
|
37
|
+
code === "docdex_api_key_missing" ||
|
|
34
38
|
code === "docdex_operation_not_allowed" ||
|
|
35
39
|
code === "docdex_auth_failed" ||
|
|
36
40
|
code === "docdex_repo_access_denied") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcoda/codali",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.89",
|
|
4
4
|
"description": "Standalone tool-runner adapter for mcoda.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@mcoda/db": "0.1.
|
|
37
|
-
"@mcoda/shared": "0.1.
|
|
36
|
+
"@mcoda/db": "0.1.89",
|
|
37
|
+
"@mcoda/shared": "0.1.89"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "tsc -p tsconfig.json",
|