@uluops/registry-mcp 0.3.7 → 0.5.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/CHANGELOG.md +94 -0
- package/README.md +2 -2
- package/dist/client/sdk-error-mapper.d.ts.map +1 -1
- package/dist/client/sdk-error-mapper.js +18 -1
- package/dist/client/sdk-error-mapper.js.map +1 -1
- package/dist/tools/archive-definition.d.ts +3 -3
- package/dist/tools/archive-definition.d.ts.map +1 -1
- package/dist/tools/archive-definition.js +2 -2
- package/dist/tools/archive-definition.js.map +1 -1
- package/dist/tools/batch-publish.d.ts.map +1 -1
- package/dist/tools/batch-publish.js +2 -0
- package/dist/tools/batch-publish.js.map +1 -1
- package/dist/tools/compare-effectiveness.d.ts +3 -3
- package/dist/tools/compare-effectiveness.d.ts.map +1 -1
- package/dist/tools/compare-effectiveness.js +2 -2
- package/dist/tools/compare-effectiveness.js.map +1 -1
- package/dist/tools/create-definition.d.ts +3 -3
- package/dist/tools/create-definition.js +2 -2
- package/dist/tools/create-definition.js.map +1 -1
- package/dist/tools/delete-definition.d.ts +3 -3
- package/dist/tools/delete-definition.d.ts.map +1 -1
- package/dist/tools/delete-definition.js +2 -2
- package/dist/tools/delete-definition.js.map +1 -1
- package/dist/tools/deprecate-definition.d.ts +3 -3
- package/dist/tools/deprecate-definition.d.ts.map +1 -1
- package/dist/tools/deprecate-definition.js +2 -2
- package/dist/tools/deprecate-definition.js.map +1 -1
- package/dist/tools/diff-versions.d.ts +5 -5
- package/dist/tools/diff-versions.d.ts.map +1 -1
- package/dist/tools/diff-versions.js +2 -2
- package/dist/tools/diff-versions.js.map +1 -1
- package/dist/tools/fork-definition.d.ts +3 -3
- package/dist/tools/fork-definition.d.ts.map +1 -1
- package/dist/tools/fork-definition.js +2 -2
- package/dist/tools/fork-definition.js.map +1 -1
- package/dist/tools/get-definition.d.ts +3 -3
- package/dist/tools/get-definition.d.ts.map +1 -1
- package/dist/tools/get-definition.js +2 -2
- package/dist/tools/get-definition.js.map +1 -1
- package/dist/tools/get-dependencies.d.ts +3 -3
- package/dist/tools/get-dependencies.d.ts.map +1 -1
- package/dist/tools/get-dependencies.js +2 -2
- package/dist/tools/get-dependencies.js.map +1 -1
- package/dist/tools/get-dependents.d.ts +3 -3
- package/dist/tools/get-dependents.d.ts.map +1 -1
- package/dist/tools/get-dependents.js +2 -2
- package/dist/tools/get-dependents.js.map +1 -1
- package/dist/tools/get-diff-impact.d.ts +3 -3
- package/dist/tools/get-diff-impact.d.ts.map +1 -1
- package/dist/tools/get-diff-impact.js +2 -2
- package/dist/tools/get-diff-impact.js.map +1 -1
- package/dist/tools/get-effectiveness.d.ts +3 -3
- package/dist/tools/get-effectiveness.d.ts.map +1 -1
- package/dist/tools/get-effectiveness.js +2 -2
- package/dist/tools/get-effectiveness.js.map +1 -1
- package/dist/tools/get-evolution.d.ts +3 -3
- package/dist/tools/get-evolution.d.ts.map +1 -1
- package/dist/tools/get-evolution.js +2 -2
- package/dist/tools/get-evolution.js.map +1 -1
- package/dist/tools/get-execution-stats.d.ts +3 -3
- package/dist/tools/get-execution-stats.d.ts.map +1 -1
- package/dist/tools/get-execution-stats.js +7 -4
- package/dist/tools/get-execution-stats.js.map +1 -1
- package/dist/tools/get-fork-lineage.d.ts +3 -3
- package/dist/tools/get-fork-lineage.d.ts.map +1 -1
- package/dist/tools/get-fork-lineage.js +2 -2
- package/dist/tools/get-fork-lineage.js.map +1 -1
- package/dist/tools/get-health.d.ts +3 -3
- package/dist/tools/get-health.d.ts.map +1 -1
- package/dist/tools/get-health.js +2 -2
- package/dist/tools/get-health.js.map +1 -1
- package/dist/tools/get-language.d.ts +2 -2
- package/dist/tools/get-lineage.d.ts +3 -3
- package/dist/tools/get-lineage.d.ts.map +1 -1
- package/dist/tools/get-lineage.js +2 -2
- package/dist/tools/get-lineage.js.map +1 -1
- package/dist/tools/get-translation-analytics.d.ts +3 -3
- package/dist/tools/get-translation-analytics.d.ts.map +1 -1
- package/dist/tools/get-translation-analytics.js +2 -2
- package/dist/tools/get-translation-analytics.js.map +1 -1
- package/dist/tools/is-forkable.d.ts +3 -3
- package/dist/tools/is-forkable.d.ts.map +1 -1
- package/dist/tools/is-forkable.js +2 -2
- package/dist/tools/is-forkable.js.map +1 -1
- package/dist/tools/list-aliases.js +1 -1
- package/dist/tools/list-aliases.js.map +1 -1
- package/dist/tools/list-definitions.d.ts +11 -2
- package/dist/tools/list-definitions.d.ts.map +1 -1
- package/dist/tools/list-definitions.js +50 -3
- package/dist/tools/list-definitions.js.map +1 -1
- package/dist/tools/list-forks.d.ts +3 -3
- package/dist/tools/list-forks.d.ts.map +1 -1
- package/dist/tools/list-forks.js +2 -2
- package/dist/tools/list-forks.js.map +1 -1
- package/dist/tools/list-versions.d.ts +3 -3
- package/dist/tools/list-versions.d.ts.map +1 -1
- package/dist/tools/list-versions.js +2 -2
- package/dist/tools/list-versions.js.map +1 -1
- package/dist/tools/publish-definition.d.ts +3 -3
- package/dist/tools/publish-definition.d.ts.map +1 -1
- package/dist/tools/publish-definition.js +2 -2
- package/dist/tools/publish-definition.js.map +1 -1
- package/dist/tools/record-execution.d.ts +3 -3
- package/dist/tools/record-execution.d.ts.map +1 -1
- package/dist/tools/record-execution.js +25 -6
- package/dist/tools/record-execution.js.map +1 -1
- package/dist/tools/render-definition.d.ts +3 -3
- package/dist/tools/render-definition.d.ts.map +1 -1
- package/dist/tools/render-definition.js +15 -3
- package/dist/tools/render-definition.js.map +1 -1
- package/dist/tools/resolve-alias.js +1 -1
- package/dist/tools/resolve-alias.js.map +1 -1
- package/dist/tools/retranslate-definition.d.ts +3 -3
- package/dist/tools/retranslate-definition.d.ts.map +1 -1
- package/dist/tools/retranslate-definition.js +3 -3
- package/dist/tools/retranslate-definition.js.map +1 -1
- package/dist/tools/search-definitions.d.ts +2 -2
- package/dist/tools/update-and-publish.d.ts +5 -5
- package/dist/tools/update-and-publish.d.ts.map +1 -1
- package/dist/tools/update-and-publish.js +9 -3
- package/dist/tools/update-and-publish.js.map +1 -1
- package/dist/tools/update-definition.d.ts +5 -8
- package/dist/tools/update-definition.d.ts.map +1 -1
- package/dist/tools/update-definition.js +2 -5
- package/dist/tools/update-definition.js.map +1 -1
- package/dist/tools/upgrade-definition.d.ts +3 -3
- package/dist/tools/upgrade-definition.d.ts.map +1 -1
- package/dist/tools/upgrade-definition.js +2 -2
- package/dist/tools/upgrade-definition.js.map +1 -1
- package/dist/tools/validate-definition.d.ts +3 -3
- package/dist/tools/validate-definition.d.ts.map +1 -1
- package/dist/tools/validate-definition.js +2 -2
- package/dist/tools/validate-definition.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/schemas.d.ts +8 -0
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +8 -0
- package/dist/types/schemas.js.map +1 -1
- package/dist/utils/tool-handler.d.ts +7 -0
- package/dist/utils/tool-handler.d.ts.map +1 -1
- package/dist/utils/tool-handler.js +89 -5
- package/dist/utils/tool-handler.js.map +1 -1
- package/package.json +3 -3
|
@@ -7,17 +7,17 @@ import { z } from 'zod';
|
|
|
7
7
|
import type { RegistryClient } from '@uluops/registry-sdk';
|
|
8
8
|
import { type McpServerToolRegistration } from '../types/index.js';
|
|
9
9
|
export declare const IsForkableInputSchema: z.ZodObject<{
|
|
10
|
-
type: z.ZodEnum<["agent", "command", "workflow", "pipeline"]
|
|
10
|
+
type: z.ZodOptional<z.ZodEnum<["agent", "command", "workflow", "pipeline"]>>;
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
version: z.ZodString;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
name: string;
|
|
15
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
16
15
|
version: string;
|
|
16
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
name: string;
|
|
19
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
20
19
|
version: string;
|
|
20
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
export declare function registerIsForkableTool(server: McpServerToolRegistration, registryClient: RegistryClient): void;
|
|
23
23
|
//# sourceMappingURL=is-forkable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-forkable.d.ts","sourceRoot":"","sources":["../../src/tools/is-forkable.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"is-forkable.d.ts","sourceRoot":"","sources":["../../src/tools/is-forkable.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAGpG,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAC;AAEH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,yBAAyB,EACjC,cAAc,EAAE,cAAc,GAC7B,IAAI,CASN"}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Check if a definition can be forked.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import {
|
|
7
|
+
import { DefinitionTypeWithDefaultSchema } from '../types/index.js';
|
|
8
8
|
import { createToolHandler } from '../utils/tool-handler.js';
|
|
9
9
|
export const IsForkableInputSchema = z.object({
|
|
10
|
-
type:
|
|
10
|
+
type: DefinitionTypeWithDefaultSchema,
|
|
11
11
|
name: z.string().min(1),
|
|
12
12
|
version: z.string().min(1),
|
|
13
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-forkable.js","sourceRoot":"","sources":["../../src/tools/is-forkable.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"is-forkable.js","sourceRoot":"","sources":["../../src/tools/is-forkable.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,+BAA+B,EAAkC,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,UAAU,sBAAsB,CACpC,MAAiC,EACjC,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,aAAa,EACb,8CAA8C,EAC9C,qBAAqB,CAAC,KAAK,EAC3B,iBAAiB,CAAC,qBAAqB,EAAE,CAAC,CAAC,EAAE,EAAE,CAC7C,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAC3D,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -7,6 +7,6 @@ import { z } from 'zod';
|
|
|
7
7
|
import { createToolHandler } from '../utils/tool-handler.js';
|
|
8
8
|
export const ListAliasesInputSchema = z.object({});
|
|
9
9
|
export function registerListAliasesTool(server, registryClient) {
|
|
10
|
-
server.tool('list_aliases', 'List all model aliases and their resolved provider+model mappings.', ListAliasesInputSchema.shape, createToolHandler(ListAliasesInputSchema, () => registryClient.models.listAliases()));
|
|
10
|
+
server.tool('list_aliases', 'List all model aliases and their resolved provider+model mappings. ALIAS-FLOAT CONTRACT: bare aliases track the current family model and are repointed each generation (see resolve_alias); qualified model ids pin. There is deliberately no fable alias (restricted-availability model).', ListAliasesInputSchema.shape, createToolHandler(ListAliasesInputSchema, () => registryClient.models.listAliases()));
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=list-aliases.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-aliases.js","sourceRoot":"","sources":["../../src/tools/list-aliases.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEnD,MAAM,UAAU,uBAAuB,CACrC,MAAiC,EACjC,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"list-aliases.js","sourceRoot":"","sources":["../../src/tools/list-aliases.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEnD,MAAM,UAAU,uBAAuB,CACrC,MAAiC,EACjC,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,cAAc,EACd,4RAA4R,EAC5R,sBAAsB,CAAC,KAAK,EAC5B,iBAAiB,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CACrF,CAAC;AACJ,CAAC"}
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
* list_definitions tool
|
|
3
3
|
*
|
|
4
4
|
* List definitions with filters (type, status, domain, visibility, search, tags, pagination).
|
|
5
|
+
* Returns a compact per-item projection by default; pass format:'full' for all
|
|
6
|
+
* catalog fields. The public catalog is large enough (558+ definitions) that an
|
|
7
|
+
* unprojected default page exceeds MCP client response limits (RE-PROBE-02 N4)
|
|
8
|
+
* — the 2-space pretty-printed full shape is ~26 fields/item × 50 items.
|
|
5
9
|
*/
|
|
6
10
|
import { z } from 'zod';
|
|
7
11
|
import type { RegistryClient } from '@uluops/registry-sdk';
|
|
8
12
|
import { type McpServerToolRegistration } from '../types/index.js';
|
|
13
|
+
/** Per-item projection served by format:'compact' (the default). */
|
|
14
|
+
export declare const COMPACT_LIST_FIELDS: readonly ["type", "name", "version", "status", "visibility", "description"];
|
|
9
15
|
export declare const ListDefinitionsInputSchema: z.ZodObject<{
|
|
10
16
|
type: z.ZodOptional<z.ZodEnum<["agent", "command", "workflow", "pipeline"]>>;
|
|
11
17
|
status: z.ZodOptional<z.ZodEnum<["draft", "published", "deprecated", "archived"]>>;
|
|
@@ -20,16 +26,18 @@ export declare const ListDefinitionsInputSchema: z.ZodObject<{
|
|
|
20
26
|
order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
21
27
|
page: z.ZodOptional<z.ZodNumber>;
|
|
22
28
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["compact", "full"]>>>;
|
|
23
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
format: "compact" | "full";
|
|
24
32
|
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
25
33
|
sort?: "name" | "createdAt" | "updatedAt" | "executionCount" | "uniqueExecutionCount" | undefined;
|
|
26
34
|
status?: "draft" | "published" | "deprecated" | "archived" | undefined;
|
|
27
35
|
authorship_type?: "agent" | "human" | "collaborative" | "automated" | undefined;
|
|
28
36
|
limit?: number | undefined;
|
|
29
37
|
page?: number | undefined;
|
|
38
|
+
visibility?: "private" | "unlisted" | "public" | undefined;
|
|
30
39
|
domain?: "software" | "security" | "compliance" | "legal" | "medical" | "financial" | "scientific" | "content" | "general" | "cognitive-lens" | undefined;
|
|
31
40
|
agent_type?: "validator" | "executor" | "analyst" | "generator" | "explorer" | "forecaster" | undefined;
|
|
32
|
-
visibility?: "private" | "unlisted" | "public" | undefined;
|
|
33
41
|
search?: string | undefined;
|
|
34
42
|
tags?: string[] | undefined;
|
|
35
43
|
is_fork?: boolean | undefined;
|
|
@@ -41,13 +49,14 @@ export declare const ListDefinitionsInputSchema: z.ZodObject<{
|
|
|
41
49
|
authorship_type?: "agent" | "human" | "collaborative" | "automated" | undefined;
|
|
42
50
|
limit?: number | undefined;
|
|
43
51
|
page?: number | undefined;
|
|
52
|
+
visibility?: "private" | "unlisted" | "public" | undefined;
|
|
44
53
|
domain?: "software" | "security" | "compliance" | "legal" | "medical" | "financial" | "scientific" | "content" | "general" | "cognitive-lens" | undefined;
|
|
45
54
|
agent_type?: "validator" | "executor" | "analyst" | "generator" | "explorer" | "forecaster" | undefined;
|
|
46
|
-
visibility?: "private" | "unlisted" | "public" | undefined;
|
|
47
55
|
search?: string | undefined;
|
|
48
56
|
tags?: string[] | undefined;
|
|
49
57
|
is_fork?: boolean | undefined;
|
|
50
58
|
order?: "asc" | "desc" | undefined;
|
|
59
|
+
format?: "compact" | "full" | undefined;
|
|
51
60
|
}>;
|
|
52
61
|
export declare function registerListDefinitionsTool(server: McpServerToolRegistration, registryClient: RegistryClient): void;
|
|
53
62
|
//# sourceMappingURL=list-definitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-definitions.d.ts","sourceRoot":"","sources":["../../src/tools/list-definitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"list-definitions.d.ts","sourceRoot":"","sources":["../../src/tools/list-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EASL,KAAK,yBAAyB,EAC/B,MAAM,mBAAmB,CAAC;AAG3B,oEAAoE;AACpE,eAAO,MAAM,mBAAmB,6EAOtB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBrC,CAAC;AAeH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,yBAAyB,EACjC,cAAc,EAAE,cAAc,GAC7B,IAAI,CAmCN"}
|
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
* list_definitions tool
|
|
3
3
|
*
|
|
4
4
|
* List definitions with filters (type, status, domain, visibility, search, tags, pagination).
|
|
5
|
+
* Returns a compact per-item projection by default; pass format:'full' for all
|
|
6
|
+
* catalog fields. The public catalog is large enough (558+ definitions) that an
|
|
7
|
+
* unprojected default page exceeds MCP client response limits (RE-PROBE-02 N4)
|
|
8
|
+
* — the 2-space pretty-printed full shape is ~26 fields/item × 50 items.
|
|
5
9
|
*/
|
|
6
10
|
import { z } from 'zod';
|
|
7
11
|
import { DefinitionTypeSchema, DefinitionStatusSchema, DomainSchema, AgentTypeSchema, VisibilitySchema, SortFieldSchema, SortOrderSchema, AuthorshipTypeSchema, } from '../types/index.js';
|
|
8
12
|
import { createToolHandler } from '../utils/tool-handler.js';
|
|
13
|
+
/** Per-item projection served by format:'compact' (the default). */
|
|
14
|
+
export const COMPACT_LIST_FIELDS = [
|
|
15
|
+
'type',
|
|
16
|
+
'name',
|
|
17
|
+
'version',
|
|
18
|
+
'status',
|
|
19
|
+
'visibility',
|
|
20
|
+
'description',
|
|
21
|
+
];
|
|
9
22
|
export const ListDefinitionsInputSchema = z.object({
|
|
10
23
|
type: DefinitionTypeSchema.optional(),
|
|
11
24
|
status: DefinitionStatusSchema.optional(),
|
|
@@ -20,9 +33,33 @@ export const ListDefinitionsInputSchema = z.object({
|
|
|
20
33
|
order: SortOrderSchema.optional(),
|
|
21
34
|
page: z.number().int().positive().optional(),
|
|
22
35
|
limit: z.number().int().positive().max(100).optional(),
|
|
36
|
+
format: z
|
|
37
|
+
.enum(['compact', 'full'])
|
|
38
|
+
.optional()
|
|
39
|
+
.default('compact')
|
|
40
|
+
.describe("Response verbosity. 'compact' (default) projects each item to " +
|
|
41
|
+
`${COMPACT_LIST_FIELDS.join(', ')} — enough to browse and address a ` +
|
|
42
|
+
"definition. 'full' returns all catalog fields per item (counts, risk, " +
|
|
43
|
+
'timestamps, authorship). To select other specific fields, combine ' +
|
|
44
|
+
"format:'full' with the fields parameter."),
|
|
23
45
|
});
|
|
46
|
+
/** Project one catalog item down to the compact field set. */
|
|
47
|
+
function toCompactItem(item) {
|
|
48
|
+
if (typeof item !== 'object' || item === null)
|
|
49
|
+
return item;
|
|
50
|
+
const obj = item;
|
|
51
|
+
const result = {};
|
|
52
|
+
for (const field of COMPACT_LIST_FIELDS) {
|
|
53
|
+
if (field in obj) {
|
|
54
|
+
result[field] = obj[field];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
24
59
|
export function registerListDefinitionsTool(server, registryClient) {
|
|
25
|
-
server.tool('list_definitions', 'List registry definitions with optional filters (type, status, domain, visibility, search,
|
|
60
|
+
server.tool('list_definitions', 'List registry definitions with optional filters (type, status, domain, visibility, search, ' +
|
|
61
|
+
"tags, pagination). Returns a compact projection per item by default; pass format:'full' " +
|
|
62
|
+
'for all catalog fields.', ListDefinitionsInputSchema.shape, createToolHandler(ListDefinitionsInputSchema, async (n) => {
|
|
26
63
|
const query = {};
|
|
27
64
|
if (n.type !== undefined)
|
|
28
65
|
query.type = n.type;
|
|
@@ -46,11 +83,21 @@ export function registerListDefinitionsTool(server, registryClient) {
|
|
|
46
83
|
query.sortBy = n.sort;
|
|
47
84
|
if (n.order !== undefined)
|
|
48
85
|
query.sortOrder = n.order;
|
|
86
|
+
// 50 mirrors the API's default page size — offsets must be computed with
|
|
87
|
+
// the same value the server will apply when no limit is sent.
|
|
49
88
|
if (n.page !== undefined)
|
|
50
|
-
query.offset = (n.page - 1) * (n.limit ??
|
|
89
|
+
query.offset = (n.page - 1) * (n.limit ?? 50);
|
|
51
90
|
if (n.limit !== undefined)
|
|
52
91
|
query.limit = n.limit;
|
|
53
|
-
|
|
92
|
+
const result = await registryClient.definitions.list(query);
|
|
93
|
+
if (n.format === 'full') {
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
...result,
|
|
98
|
+
format: 'compact',
|
|
99
|
+
definitions: result.definitions.map(toCompactItem),
|
|
100
|
+
};
|
|
54
101
|
}));
|
|
55
102
|
}
|
|
56
103
|
//# sourceMappingURL=list-definitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-definitions.js","sourceRoot":"","sources":["../../src/tools/list-definitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"list-definitions.js","sourceRoot":"","sources":["../../src/tools/list-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,oBAAoB,GAErB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,oEAAoE;AACpE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM;IACN,MAAM;IACN,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,aAAa;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAA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AAK,SAAS;YAAE,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC;QAC7C,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS;YAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACpD,IAAI,CAAC,CAAC,cAAc,KAAK,SAAS;YAAE,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,CAAC;QAC5E,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS;YAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC;QAChD,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS;YAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC;QACrD,yEAAyE;QACzE,8DAA8D;QAC9D,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS;YAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QACxE,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS;YAAE,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;QACjD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5D,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACxB,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO;YACL,GAAG,MAAM;YACT,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC;SACnD,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -7,17 +7,17 @@ import { z } from 'zod';
|
|
|
7
7
|
import type { RegistryClient } from '@uluops/registry-sdk';
|
|
8
8
|
import { type McpServerToolRegistration } from '../types/index.js';
|
|
9
9
|
export declare const ListForksInputSchema: z.ZodObject<{
|
|
10
|
-
type: z.ZodEnum<["agent", "command", "workflow", "pipeline"]
|
|
10
|
+
type: z.ZodOptional<z.ZodEnum<["agent", "command", "workflow", "pipeline"]>>;
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
version: z.ZodString;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
name: string;
|
|
15
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
16
15
|
version: string;
|
|
16
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
name: string;
|
|
19
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
20
19
|
version: string;
|
|
20
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
export declare function registerListForksTool(server: McpServerToolRegistration, registryClient: RegistryClient): void;
|
|
23
23
|
//# sourceMappingURL=list-forks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-forks.d.ts","sourceRoot":"","sources":["../../src/tools/list-forks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"list-forks.d.ts","sourceRoot":"","sources":["../../src/tools/list-forks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAGpG,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,yBAAyB,EACjC,cAAc,EAAE,cAAc,GAC7B,IAAI,CASN"}
|
package/dist/tools/list-forks.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* List forks of a definition.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import {
|
|
7
|
+
import { DefinitionTypeWithDefaultSchema } from '../types/index.js';
|
|
8
8
|
import { createToolHandler } from '../utils/tool-handler.js';
|
|
9
9
|
export const ListForksInputSchema = z.object({
|
|
10
|
-
type:
|
|
10
|
+
type: DefinitionTypeWithDefaultSchema,
|
|
11
11
|
name: z.string().min(1),
|
|
12
12
|
version: z.string().min(1),
|
|
13
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-forks.js","sourceRoot":"","sources":["../../src/tools/list-forks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list-forks.js","sourceRoot":"","sources":["../../src/tools/list-forks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,+BAA+B,EAAkC,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CACnC,MAAiC,EACjC,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,YAAY,EACZ,yCAAyC,EACzC,oBAAoB,CAAC,KAAK,EAC1B,iBAAiB,CAAC,oBAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,CAC5C,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CACrD,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -7,18 +7,18 @@ import { z } from 'zod';
|
|
|
7
7
|
import type { RegistryClient } from '@uluops/registry-sdk';
|
|
8
8
|
import { type McpServerToolRegistration } from '../types/index.js';
|
|
9
9
|
export declare const ListVersionsInputSchema: z.ZodObject<{
|
|
10
|
-
type: z.ZodEnum<["agent", "command", "workflow", "pipeline"]
|
|
10
|
+
type: z.ZodOptional<z.ZodEnum<["agent", "command", "workflow", "pipeline"]>>;
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
name: string;
|
|
16
|
-
type
|
|
16
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
17
17
|
limit?: number | undefined;
|
|
18
18
|
offset?: number | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
name: string;
|
|
21
|
-
type
|
|
21
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
22
22
|
limit?: number | undefined;
|
|
23
23
|
offset?: number | undefined;
|
|
24
24
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-versions.d.ts","sourceRoot":"","sources":["../../src/tools/list-versions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"list-versions.d.ts","sourceRoot":"","sources":["../../src/tools/list-versions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAGpG,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlC,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,yBAAyB,EACjC,cAAc,EAAE,cAAc,GAC7B,IAAI,CAYN"}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* List all versions of a definition.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import {
|
|
7
|
+
import { DefinitionTypeWithDefaultSchema } from '../types/index.js';
|
|
8
8
|
import { createToolHandler } from '../utils/tool-handler.js';
|
|
9
9
|
export const ListVersionsInputSchema = z.object({
|
|
10
|
-
type:
|
|
10
|
+
type: DefinitionTypeWithDefaultSchema,
|
|
11
11
|
name: z.string().min(1),
|
|
12
12
|
limit: z.number().int().min(1).max(200).optional(),
|
|
13
13
|
offset: z.number().int().min(0).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-versions.js","sourceRoot":"","sources":["../../src/tools/list-versions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list-versions.js","sourceRoot":"","sources":["../../src/tools/list-versions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,+BAA+B,EAAkC,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAClD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,MAAiC,EACjC,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,eAAe,EACf,mEAAmE,EACnE,uBAAuB,CAAC,KAAK,EAC7B,iBAAiB,CAAC,uBAAuB,EAAE,CAAC,CAAC,EAAE,EAAE,CAC/C,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;QAC3C,GAAG,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAChD,GAAG,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;KACpD,CAAC,CACH,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -7,17 +7,17 @@ import { z } from 'zod';
|
|
|
7
7
|
import type { RegistryClient } from '@uluops/registry-sdk';
|
|
8
8
|
import { type McpServerToolRegistration } from '../types/index.js';
|
|
9
9
|
export declare const PublishDefinitionInputSchema: z.ZodObject<{
|
|
10
|
-
type: z.ZodEnum<["agent", "command", "workflow", "pipeline"]
|
|
10
|
+
type: z.ZodOptional<z.ZodEnum<["agent", "command", "workflow", "pipeline"]>>;
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
version: z.ZodString;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
name: string;
|
|
15
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
16
15
|
version: string;
|
|
16
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
name: string;
|
|
19
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
20
19
|
version: string;
|
|
20
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
export declare function registerPublishDefinitionTool(server: McpServerToolRegistration, registryClient: RegistryClient): void;
|
|
23
23
|
//# sourceMappingURL=publish-definition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-definition.d.ts","sourceRoot":"","sources":["../../src/tools/publish-definition.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"publish-definition.d.ts","sourceRoot":"","sources":["../../src/tools/publish-definition.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAIpG,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAIvC,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,yBAAyB,EACjC,cAAc,EAAE,cAAc,GAC7B,IAAI,CAeN"}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* Publish a draft definition.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import {
|
|
7
|
+
import { DefinitionTypeWithDefaultSchema } from '../types/index.js';
|
|
8
8
|
import { createToolHandler } from '../utils/tool-handler.js';
|
|
9
9
|
import { trimDefinitionResponse } from '../utils/trim-definition.js';
|
|
10
10
|
export const PublishDefinitionInputSchema = z.object({
|
|
11
|
-
type:
|
|
11
|
+
type: DefinitionTypeWithDefaultSchema,
|
|
12
12
|
name: z.string().min(1),
|
|
13
13
|
version: z.string().min(1),
|
|
14
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-definition.js","sourceRoot":"","sources":["../../src/tools/publish-definition.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"publish-definition.js","sourceRoot":"","sources":["../../src/tools/publish-definition.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,+BAA+B,EAAkC,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B,CAC3C,MAAiC,EACjC,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,oBAAoB,EACpB,mPAAmP,EACnP,4BAA4B,CAAC,KAAK,EAClC,iBAAiB,CAAC,4BAA4B,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QAC1D,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;QACnF,4EAA4E;QAC5E,kFAAkF;QAClF,OAAO;YACL,UAAU,EAAE,sBAAsB,CAAC,MAAM,CAAC,UAAU,CAAC;YACrD,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -7,21 +7,21 @@ import { z } from 'zod';
|
|
|
7
7
|
import type { RegistryClient } from '@uluops/registry-sdk';
|
|
8
8
|
import { type McpServerToolRegistration } from '../types/index.js';
|
|
9
9
|
export declare const RecordExecutionInputSchema: z.ZodObject<{
|
|
10
|
-
type: z.ZodEnum<["agent", "command", "workflow", "pipeline"]
|
|
10
|
+
type: z.ZodOptional<z.ZodEnum<["agent", "command", "workflow", "pipeline"]>>;
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
version: z.ZodString;
|
|
13
13
|
source: z.ZodDefault<z.ZodString>;
|
|
14
14
|
run_id: z.ZodOptional<z.ZodString>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
name: string;
|
|
17
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
18
17
|
version: string;
|
|
19
18
|
source: string;
|
|
19
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
20
20
|
run_id?: string | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
name: string;
|
|
23
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
24
23
|
version: string;
|
|
24
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
25
25
|
source?: string | undefined;
|
|
26
26
|
run_id?: string | undefined;
|
|
27
27
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-execution.d.ts","sourceRoot":"","sources":["../../src/tools/record-execution.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"record-execution.d.ts","sourceRoot":"","sources":["../../src/tools/record-execution.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAGpG,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;EAMrC,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,yBAAyB,EACjC,cAAc,EAAE,cAAc,GAC7B,IAAI,CA6BN"}
|
|
@@ -4,19 +4,38 @@
|
|
|
4
4
|
* Record an execution (idempotent).
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import {
|
|
7
|
+
import { ForbiddenError, isForbiddenError } from '@uluops/registry-sdk/errors';
|
|
8
|
+
import { DefinitionTypeWithDefaultSchema } from '../types/index.js';
|
|
8
9
|
import { createToolHandler } from '../utils/tool-handler.js';
|
|
9
10
|
export const RecordExecutionInputSchema = z.object({
|
|
10
|
-
type:
|
|
11
|
+
type: DefinitionTypeWithDefaultSchema,
|
|
11
12
|
name: z.string().min(1),
|
|
12
13
|
version: z.string().min(1),
|
|
13
14
|
source: z.string().min(1).default('mcp'),
|
|
14
15
|
run_id: z.string().optional(),
|
|
15
16
|
});
|
|
16
17
|
export function registerRecordExecutionTool(server, registryClient) {
|
|
17
|
-
server.tool('record_execution', 'Record a definition execution (idempotent).
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
server.tool('record_execution', 'Record a definition execution (idempotent). Admin-only: executions are recorded ' +
|
|
19
|
+
'automatically by the UluOps runtime — user API keys do not need to call this.', RecordExecutionInputSchema.shape, createToolHandler(RecordExecutionInputSchema, async (n) => {
|
|
20
|
+
try {
|
|
21
|
+
return await registryClient.executions.record(n.type, n.name, n.version, {
|
|
22
|
+
source: n.source,
|
|
23
|
+
...(n.runId !== undefined && { runId: n.runId }),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
// RE-PROBE-02 R16: the API's role gate returns a bare "Requires admin
|
|
28
|
+
// role", which a user-key caller cannot act on. The tool stays in the
|
|
29
|
+
// toolset (the server never learns the caller's role, so it cannot be
|
|
30
|
+
// conditionally hidden) — instead the denial explains whose job the
|
|
31
|
+
// recording is.
|
|
32
|
+
if (isForbiddenError(error)) {
|
|
33
|
+
throw new ForbiddenError('record_execution requires the admin role. Executions are recorded ' +
|
|
34
|
+
'automatically by the UluOps runtime when a definition runs — user ' +
|
|
35
|
+
'API keys do not need to call this tool.');
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
21
40
|
}
|
|
22
41
|
//# sourceMappingURL=record-execution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-execution.js","sourceRoot":"","sources":["../../src/tools/record-execution.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"record-execution.js","sourceRoot":"","sources":["../../src/tools/record-execution.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAkC,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;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} from 'zod';
|
|
|
8
8
|
import type { RegistryClient } from '@uluops/registry-sdk';
|
|
9
9
|
import { type McpServerToolRegistration } from '../types/index.js';
|
|
10
10
|
export declare const RenderDefinitionInputSchema: z.ZodObject<{
|
|
11
|
-
type: z.ZodEnum<["agent", "command", "workflow", "pipeline"]
|
|
11
|
+
type: z.ZodOptional<z.ZodEnum<["agent", "command", "workflow", "pipeline"]>>;
|
|
12
12
|
name: z.ZodString;
|
|
13
13
|
version: z.ZodDefault<z.ZodString>;
|
|
14
14
|
renderProfile: z.ZodOptional<z.ZodEnum<["core", "uluops-full"]>>;
|
|
@@ -18,16 +18,16 @@ export declare const RenderDefinitionInputSchema: z.ZodObject<{
|
|
|
18
18
|
overwrite: z.ZodDefault<z.ZodBoolean>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
name: string;
|
|
21
|
-
type: "agent" | "command" | "workflow" | "pipeline";
|
|
22
21
|
version: string;
|
|
23
22
|
overwrite: boolean;
|
|
23
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
24
24
|
renderProfile?: "core" | "uluops-full" | undefined;
|
|
25
25
|
target?: string | undefined;
|
|
26
26
|
model?: string | undefined;
|
|
27
27
|
output_path?: string | undefined;
|
|
28
28
|
}, {
|
|
29
29
|
name: string;
|
|
30
|
-
type
|
|
30
|
+
type?: "agent" | "command" | "workflow" | "pipeline" | undefined;
|
|
31
31
|
version?: string | undefined;
|
|
32
32
|
renderProfile?: "core" | "uluops-full" | undefined;
|
|
33
33
|
target?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-definition.d.ts","sourceRoot":"","sources":["../../src/tools/render-definition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"render-definition.d.ts","sourceRoot":"","sources":["../../src/tools/render-definition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAEL,KAAK,yBAAyB,EAG/B,MAAM,mBAAmB,CAAC;AAc3B,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BtC,CAAC;AAEH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,yBAAyB,EACjC,cAAc,EAAE,cAAc,GAC7B,IAAI,CAyGN"}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Get rendered markdown for a definition.
|
|
5
5
|
* Optionally write the markdown directly to a file via output_path.
|
|
6
6
|
*/
|
|
7
|
+
import { getDefaultType } from '../utils/session-state.js';
|
|
7
8
|
import { writeFile, mkdir, lstat, access } from 'node:fs/promises';
|
|
8
9
|
import { dirname, resolve, relative } from 'node:path';
|
|
9
10
|
import { z } from 'zod';
|
|
10
|
-
import {
|
|
11
|
+
import { DefinitionTypeWithDefaultSchema, createSuccessResponse, createErrorResponse, } from '../types/index.js';
|
|
11
12
|
import { createToolHandler } from '../utils/tool-handler.js';
|
|
12
13
|
import { mapSdkErrorToMcp, mapZodErrorToMcp } from '../client/sdk-error-mapper.js';
|
|
13
14
|
/**
|
|
@@ -20,7 +21,7 @@ function getOutputBaseDir() {
|
|
|
20
21
|
return resolve(process.env['OUTPUT_BASE_DIR'] ?? process.cwd());
|
|
21
22
|
}
|
|
22
23
|
export const RenderDefinitionInputSchema = z.object({
|
|
23
|
-
type:
|
|
24
|
+
type: DefinitionTypeWithDefaultSchema,
|
|
24
25
|
name: z.string().min(1),
|
|
25
26
|
version: z.string().min(1).default('latest'),
|
|
26
27
|
renderProfile: z
|
|
@@ -55,6 +56,12 @@ export function registerRenderDefinitionTool(server, registryClient) {
|
|
|
55
56
|
}));
|
|
56
57
|
server.tool('render_definition', 'Get the rendered runtime output for a definition version. Use target to render for a specific harness (opencode, codex, gemini). Use output_path to write directly to a file.', RenderDefinitionInputSchema.shape, async (args) => {
|
|
57
58
|
const parsed = RenderDefinitionInputSchema.safeParse(args);
|
|
59
|
+
// RG4: this tool parses its own input, so resolve the session default
|
|
60
|
+
// here (the shared handler guard does it for createToolHandler tools).
|
|
61
|
+
const resolvedType = parsed.success ? (parsed.data.type ?? getDefaultType()) : undefined;
|
|
62
|
+
if (parsed.success && resolvedType === undefined) {
|
|
63
|
+
return createErrorResponse("Missing 'type': pass it explicitly (agent, command, workflow, pipeline) or set a session default first with set_default_type.");
|
|
64
|
+
}
|
|
58
65
|
if (!parsed.success || parsed.data.output_path === undefined) {
|
|
59
66
|
return baseHandler(args);
|
|
60
67
|
}
|
|
@@ -90,8 +97,13 @@ export function registerRenderDefinitionTool(server, registryClient) {
|
|
|
90
97
|
return createErrorResponse('output_path contains a symbolic link in its directory path');
|
|
91
98
|
}
|
|
92
99
|
}
|
|
100
|
+
// Narrow for the compiler: undefined resolvedType was either rejected
|
|
101
|
+
// above (no session default) or delegated to baseHandler (parse failure).
|
|
102
|
+
if (resolvedType === undefined) {
|
|
103
|
+
return baseHandler(args);
|
|
104
|
+
}
|
|
93
105
|
try {
|
|
94
|
-
const result = await registryClient.render.get(
|
|
106
|
+
const result = await registryClient.render.get(resolvedType, parsed.data.name, parsed.data.version, { target: parsed.data.target, model: parsed.data.model, renderProfile: parsed.data.renderProfile });
|
|
95
107
|
// SDK RenderResult guarantees markdown: string
|
|
96
108
|
const { markdown } = result;
|
|
97
109
|
if (typeof markdown !== 'string') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-definition.js","sourceRoot":"","sources":["../../src/tools/render-definition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA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AAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YAE5C,OAAO,qBAAqB,CAAC;gBAC3B,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,OAAO;gBACpB,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC;aAC5C,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC;gBAChC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC;YACD,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -9,6 +9,6 @@ export const ResolveAliasInputSchema = z.object({
|
|
|
9
9
|
alias: z.string().min(1),
|
|
10
10
|
});
|
|
11
11
|
export function registerResolveAliasTool(server, registryClient) {
|
|
12
|
-
server.tool('resolve_alias', 'Resolve a model alias (e.g. "sonnet", "haiku") to its provider and model ID.', ResolveAliasInputSchema.shape, createToolHandler(ResolveAliasInputSchema, (n) => registryClient.models.resolveAlias(n.alias)));
|
|
12
|
+
server.tool('resolve_alias', 'Resolve a model alias (e.g. "sonnet", "haiku") to its provider and model ID. ALIAS-FLOAT CONTRACT: a bare alias means the CURRENT model in its family and is repointed each generation — every published definition using a bare alias adopts the new target on its next execution. Write a qualified model id (e.g. claude-sonnet-4-6) to pin.', ResolveAliasInputSchema.shape, createToolHandler(ResolveAliasInputSchema, (n) => registryClient.models.resolveAlias(n.alias)));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=resolve-alias.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-alias.js","sourceRoot":"","sources":["../../src/tools/resolve-alias.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,MAAiC,EACjC,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"resolve-alias.js","sourceRoot":"","sources":["../../src/tools/resolve-alias.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,MAAiC,EACjC,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACT,eAAe,EACf,iVAAiV,EACjV,uBAAuB,CAAC,KAAK,EAC7B,iBAAiB,CAAC,uBAAuB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAC/F,CAAC;AACJ,CAAC"}
|