@ultimat3/mcp 12.0.0 → 14.0.0
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/package.json +9 -9
- package/src/app-tool.ts +12 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "MCP server, dev tools, and the action-to-tool projection \u2014 one authz system, two surfaces",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"test": "bun test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ultimat3/action": "
|
|
35
|
-
"@ultimat3/core": "
|
|
36
|
-
"@ultimat3/entity": "
|
|
37
|
-
"@ultimat3/http": "
|
|
38
|
-
"@ultimat3/jobs": "
|
|
39
|
-
"@ultimat3/policy": "
|
|
40
|
-
"@ultimat3/query": "
|
|
41
|
-
"@ultimat3/schema": "
|
|
34
|
+
"@ultimat3/action": "14.0.0",
|
|
35
|
+
"@ultimat3/core": "14.0.0",
|
|
36
|
+
"@ultimat3/entity": "14.0.0",
|
|
37
|
+
"@ultimat3/http": "14.0.0",
|
|
38
|
+
"@ultimat3/jobs": "14.0.0",
|
|
39
|
+
"@ultimat3/policy": "14.0.0",
|
|
40
|
+
"@ultimat3/query": "14.0.0",
|
|
41
|
+
"@ultimat3/schema": "14.0.0"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/app-tool.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { useContext } from '@ultimat3/core';
|
|
|
16
16
|
import type { KnownPermission } from '@ultimat3/policy';
|
|
17
17
|
import { can } from '@ultimat3/policy';
|
|
18
18
|
import type { InferOutput, StandardSchemaV1 } from '@ultimat3/schema';
|
|
19
|
-
import { formatIssues, validateAsync } from '@ultimat3/schema';
|
|
19
|
+
import { formatIssues, toValidationIssues, validateAsync } from '@ultimat3/schema';
|
|
20
20
|
import { asCallerContext } from './caller-context';
|
|
21
21
|
import { McpToolUnsafeError } from './errors';
|
|
22
22
|
import type { ProjectablePrimitive } from './from-action';
|
|
@@ -123,7 +123,17 @@ async function parseInput(
|
|
|
123
123
|
): Promise<InferOutput<StandardSchemaV1>> {
|
|
124
124
|
const result = await validateAsync(schema, raw);
|
|
125
125
|
if (result.issues !== undefined) {
|
|
126
|
-
|
|
126
|
+
// `toValidationIssues`, never the raw `result.issues` — the same normalisation
|
|
127
|
+
// `packages/action/src/validate.ts` does, for the same two reasons. A conforming library's
|
|
128
|
+
// issue object may carry members Ultimate's shape does not, INCLUDING the rejected value, and
|
|
129
|
+
// this list reaches an agent and the audit record. And the list is what a caller addresses a
|
|
130
|
+
// field by: passing only the joined line made an MCP rejection carry strictly less than the
|
|
131
|
+
// HTTP one, which puts the list on the problem document (`error-facts.ts`).
|
|
132
|
+
//
|
|
133
|
+
// `formatIssues(issues)` is byte-identical to `formatIssues(result.issues)`: that renderer
|
|
134
|
+
// reads `path` and `message`, which is exactly what `toValidationIssues` copies out.
|
|
135
|
+
const issues = toValidationIssues(result.issues);
|
|
136
|
+
throw new InputInvalidError(name, formatIssues(issues).join('; '), issues);
|
|
127
137
|
}
|
|
128
138
|
return result.value;
|
|
129
139
|
}
|