@agllama/mcp 0.7.3 → 0.10.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/dist/api-client.d.ts +67 -6
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +74 -8
- package/dist/api-client.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/lib/__tests__/resolve-org-project.test.d.ts +2 -0
- package/dist/lib/__tests__/resolve-org-project.test.d.ts.map +1 -0
- package/dist/lib/__tests__/resolve-org-project.test.js +114 -0
- package/dist/lib/__tests__/resolve-org-project.test.js.map +1 -0
- package/dist/lib/resolve-org-project.d.ts +28 -0
- package/dist/lib/resolve-org-project.d.ts.map +1 -0
- package/dist/lib/resolve-org-project.js +16 -0
- package/dist/lib/resolve-org-project.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +16 -116
- package/dist/server.js.map +1 -1
- package/dist/tools/__tests__/help.test.d.ts +2 -0
- package/dist/tools/__tests__/help.test.d.ts.map +1 -0
- package/dist/tools/__tests__/help.test.js +25 -0
- package/dist/tools/__tests__/help.test.js.map +1 -0
- package/dist/tools/__tests__/issuePlanLinks.test.d.ts +2 -0
- package/dist/tools/__tests__/issuePlanLinks.test.d.ts.map +1 -0
- package/dist/tools/__tests__/issuePlanLinks.test.js +294 -0
- package/dist/tools/__tests__/issuePlanLinks.test.js.map +1 -0
- package/dist/tools/__tests__/plans.test.d.ts +2 -0
- package/dist/tools/__tests__/plans.test.d.ts.map +1 -0
- package/dist/tools/__tests__/plans.test.js +359 -0
- package/dist/tools/__tests__/plans.test.js.map +1 -0
- package/dist/tools/__tests__/specs.test.d.ts +2 -0
- package/dist/tools/__tests__/specs.test.d.ts.map +1 -0
- package/dist/tools/__tests__/specs.test.js +262 -0
- package/dist/tools/__tests__/specs.test.js.map +1 -0
- package/dist/tools/attachments.d.ts.map +1 -1
- package/dist/tools/attachments.js +9 -17
- package/dist/tools/attachments.js.map +1 -1
- package/dist/tools/codeDocs.d.ts +6 -6
- package/dist/tools/codeDocs.d.ts.map +1 -1
- package/dist/tools/codeDocs.js +9 -21
- package/dist/tools/codeDocs.js.map +1 -1
- package/dist/tools/comments.d.ts.map +1 -1
- package/dist/tools/comments.js +2 -14
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/help.d.ts.map +1 -1
- package/dist/tools/help.js +28 -18
- package/dist/tools/help.js.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/issuePlanLinks.d.ts +18 -8
- package/dist/tools/issuePlanLinks.d.ts.map +1 -1
- package/dist/tools/issuePlanLinks.js +182 -67
- package/dist/tools/issuePlanLinks.js.map +1 -1
- package/dist/tools/issues.d.ts +15 -19
- package/dist/tools/issues.d.ts.map +1 -1
- package/dist/tools/issues.js +21 -7
- package/dist/tools/issues.js.map +1 -1
- package/dist/tools/labels.d.ts +2 -2
- package/dist/tools/notificationRules.d.ts +2 -2
- package/dist/tools/organizations.d.ts +2 -2
- package/dist/tools/plans.d.ts +37 -13
- package/dist/tools/plans.d.ts.map +1 -1
- package/dist/tools/plans.js +92 -29
- package/dist/tools/plans.js.map +1 -1
- package/dist/tools/projectErrors.d.ts.map +1 -1
- package/dist/tools/projectErrors.js +2 -14
- package/dist/tools/projectErrors.js.map +1 -1
- package/dist/tools/prompts.d.ts +4 -4
- package/dist/tools/prompts.d.ts.map +1 -1
- package/dist/tools/prompts.js +4 -5
- package/dist/tools/prompts.js.map +1 -1
- package/dist/tools/roadmap.d.ts +12 -12
- package/dist/tools/roadmap.d.ts.map +1 -1
- package/dist/tools/roadmap.js +3 -15
- package/dist/tools/roadmap.js.map +1 -1
- package/dist/tools/search.d.ts +2 -2
- package/dist/tools/skills.d.ts +8 -8
- package/dist/tools/specs.d.ts +30 -0
- package/dist/tools/specs.d.ts.map +1 -0
- package/dist/tools/specs.js +127 -0
- package/dist/tools/specs.js.map +1 -0
- package/dist/types.d.ts +80 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +14 -2
- package/dist/types.js.map +1 -1
- package/dist/utils/__tests__/zod-json-schema.test.d.ts +2 -0
- package/dist/utils/__tests__/zod-json-schema.test.d.ts.map +1 -0
- package/dist/utils/__tests__/zod-json-schema.test.js +97 -0
- package/dist/utils/__tests__/zod-json-schema.test.js.map +1 -0
- package/dist/utils/zod-json-schema.d.ts +29 -0
- package/dist/utils/zod-json-schema.d.ts.map +1 -0
- package/dist/utils/zod-json-schema.js +128 -0
- package/dist/utils/zod-json-schema.js.map +1 -0
- package/package.json +1 -1
- package/dist/tools/decomposition.d.ts +0 -236
- package/dist/tools/decomposition.d.ts.map +0 -1
- package/dist/tools/decomposition.js +0 -285
- package/dist/tools/decomposition.js.map +0 -1
- package/dist/tools/documents.d.ts +0 -99
- package/dist/tools/documents.d.ts.map +0 -1
- package/dist/tools/documents.js +0 -254
- package/dist/tools/documents.js.map +0 -1
- package/dist/tools/epicSignOff.d.ts +0 -25
- package/dist/tools/epicSignOff.d.ts.map +0 -1
- package/dist/tools/epicSignOff.js +0 -89
- package/dist/tools/epicSignOff.js.map +0 -1
- package/dist/tools/integrations.d.ts +0 -38
- package/dist/tools/integrations.d.ts.map +0 -1
- package/dist/tools/integrations.js +0 -153
- package/dist/tools/integrations.js.map +0 -1
- package/dist/tools/planComments.d.ts.map +0 -1
- package/dist/tools/planComments.js.map +0 -1
- package/dist/tools/status.d.ts.map +0 -1
- package/dist/tools/status.js.map +0 -1
- package/dist/tools/workflows.d.ts +0 -169
- package/dist/tools/workflows.d.ts.map +0 -1
- package/dist/tools/workflows.js +0 -436
- package/dist/tools/workflows.js.map +0 -1
package/dist/types.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
// ============================================
|
|
2
|
-
//
|
|
3
|
+
// Plan Types
|
|
3
4
|
// ============================================
|
|
4
|
-
|
|
5
|
+
// Single source of truth for plan lifecycle status: the runtime validator and the
|
|
6
|
+
// compile-time union both derive from this schema so MCP tool schemas cannot drift
|
|
7
|
+
// from the type again (see LLAMA-2091).
|
|
8
|
+
export const planStatusSchema = z.enum([
|
|
9
|
+
'DRAFT',
|
|
10
|
+
'READY_FOR_DEV',
|
|
11
|
+
'IN_PROGRESS',
|
|
12
|
+
'ACTIVE',
|
|
13
|
+
'DONE',
|
|
14
|
+
'DEFERRED',
|
|
15
|
+
'ABANDONED',
|
|
16
|
+
]);
|
|
5
17
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyuBxB,+CAA+C;AAC/C,aAAa;AACb,+CAA+C;AAE/C,kFAAkF;AAClF,mFAAmF;AACnF,wCAAwC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IACrC,OAAO;IACP,eAAe;IACf,aAAa;IACb,QAAQ;IACR,MAAM;IACN,UAAU;IACV,WAAW;CACZ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod-json-schema.test.d.ts","sourceRoot":"","sources":["../../../src/utils/__tests__/zod-json-schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { zodToJsonSchema, isOptionalDef } from '../zod-json-schema.js';
|
|
4
|
+
import { batchUpdateIssuesToolSchema } from '../../tools/issues.js';
|
|
5
|
+
/**
|
|
6
|
+
* The JSON Schema produced here is what the calling model sees. A field wrongly
|
|
7
|
+
* marked `required` obliges the model to supply a value for something it never
|
|
8
|
+
* meant to change — and on a nullable field the only value it can supply is
|
|
9
|
+
* `null`, which write paths read as "clear this". That is how a batch update
|
|
10
|
+
* wiped descriptions and orphaned subtasks in production.
|
|
11
|
+
*/
|
|
12
|
+
describe('zodToJsonSchema — optional detection', () => {
|
|
13
|
+
it('does not mark .optional().nullable() fields as required', () => {
|
|
14
|
+
const schema = z.object({
|
|
15
|
+
plain: z.string(),
|
|
16
|
+
optionalOnly: z.string().optional(),
|
|
17
|
+
optionalThenNullable: z.string().optional().nullable(),
|
|
18
|
+
nullableThenOptional: z.string().nullable().optional(),
|
|
19
|
+
});
|
|
20
|
+
const json = zodToJsonSchema(schema);
|
|
21
|
+
expect(json.required).toEqual(['plain']);
|
|
22
|
+
});
|
|
23
|
+
it('still marks genuinely required fields as required', () => {
|
|
24
|
+
const schema = z.object({
|
|
25
|
+
issueKey: z.string(),
|
|
26
|
+
note: z.string().optional(),
|
|
27
|
+
});
|
|
28
|
+
expect(zodToJsonSchema(schema).required).toEqual(['issueKey']);
|
|
29
|
+
});
|
|
30
|
+
it('omits required entirely when every field is optional', () => {
|
|
31
|
+
const schema = z.object({
|
|
32
|
+
a: z.string().optional(),
|
|
33
|
+
b: z.string().optional().nullable(),
|
|
34
|
+
});
|
|
35
|
+
expect(zodToJsonSchema(schema).required).toBeUndefined();
|
|
36
|
+
});
|
|
37
|
+
it('keeps null in the emitted type for nullable fields', () => {
|
|
38
|
+
const schema = z.object({ epicKey: z.string().optional().nullable() });
|
|
39
|
+
const props = zodToJsonSchema(schema).properties;
|
|
40
|
+
expect(props.epicKey.type).toEqual(['string', 'null']);
|
|
41
|
+
});
|
|
42
|
+
it('sees through a preprocess wrapper around an optional', () => {
|
|
43
|
+
const schema = z.object({
|
|
44
|
+
estimate: z
|
|
45
|
+
.preprocess((v) => v, z.number().nullable())
|
|
46
|
+
.optional(),
|
|
47
|
+
});
|
|
48
|
+
expect(zodToJsonSchema(schema).required).toBeUndefined();
|
|
49
|
+
});
|
|
50
|
+
it('applies the same rule to nested objects and array items', () => {
|
|
51
|
+
const schema = z.object({
|
|
52
|
+
updates: z.array(z.object({
|
|
53
|
+
issueKey: z.string(),
|
|
54
|
+
fields: z.object({
|
|
55
|
+
description: z.string().optional().nullable(),
|
|
56
|
+
epicKey: z.string().optional().nullable(),
|
|
57
|
+
}),
|
|
58
|
+
})),
|
|
59
|
+
});
|
|
60
|
+
const json = zodToJsonSchema(schema);
|
|
61
|
+
const updates = json.properties.updates;
|
|
62
|
+
const item = updates.items;
|
|
63
|
+
expect(item.required).toEqual(['issueKey', 'fields']);
|
|
64
|
+
expect(item.properties.fields.required).toBeUndefined();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
describe('isOptionalDef', () => {
|
|
68
|
+
const defOf = (s) => s._def;
|
|
69
|
+
it.each([
|
|
70
|
+
['optional', z.string().optional()],
|
|
71
|
+
['optional then nullable', z.string().optional().nullable()],
|
|
72
|
+
['nullable then optional', z.string().nullable().optional()],
|
|
73
|
+
['default', z.string().default('x')],
|
|
74
|
+
['preprocess around optional', z.preprocess((v) => v, z.string()).optional()],
|
|
75
|
+
])('treats %s as optional', (_label, schema) => {
|
|
76
|
+
expect(isOptionalDef(defOf(schema))).toBe(true);
|
|
77
|
+
});
|
|
78
|
+
it.each([
|
|
79
|
+
['plain string', z.string()],
|
|
80
|
+
['nullable only', z.string().nullable()],
|
|
81
|
+
])('treats %s as required', (_label, schema) => {
|
|
82
|
+
expect(isOptionalDef(defOf(schema))).toBe(false);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
describe('llama_batch_update_issues tool schema', () => {
|
|
86
|
+
it('requires nothing inside fields, so a caller can send only what changed', () => {
|
|
87
|
+
const json = zodToJsonSchema(batchUpdateIssuesToolSchema);
|
|
88
|
+
const item = json.properties.updates.items;
|
|
89
|
+
expect(item.properties.fields.required).toBeUndefined();
|
|
90
|
+
});
|
|
91
|
+
it('offers no way to express a null description', () => {
|
|
92
|
+
const json = zodToJsonSchema(batchUpdateIssuesToolSchema);
|
|
93
|
+
const fields = json.properties.updates.items.properties.fields;
|
|
94
|
+
expect(fields.properties.description.type).toBe('string');
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=zod-json-schema.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod-json-schema.test.js","sourceRoot":"","sources":["../../../src/utils/__tests__/zod-json-schema.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;;;;;GAMG;AACH,QAAQ,CAAC,sCAAsC,EAAE,GAAG,EAAE;IACpD,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;YACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;YACjB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACnC,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;YACtD,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SACvD,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QAErC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MA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AAI,IAAI,CAAC,UAAkB,CAAC,OAAO,CAAC,KAAK,CAAC;QAEpD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,EAAE,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,MAAM,IAAI,GAAG,eAAe,CAAC,2BAA2B,CAAC,CAAC;QAC1D,MAAM,MAAM,GAAI,IAAI,CAAC,UAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;QAExE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal Zod -> JSON Schema conversion for MCP tool definitions.
|
|
3
|
+
*
|
|
4
|
+
* The JSON Schema emitted here is what the calling model sees, so a field
|
|
5
|
+
* wrongly marked `required` doesn't just annoy a client — it obliges the model
|
|
6
|
+
* to invent a value for a field it never meant to touch.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* True when a field may be omitted entirely.
|
|
10
|
+
*
|
|
11
|
+
* The wrapper chain has to be walked, not just peeked at: `.optional().nullable()`
|
|
12
|
+
* builds ZodNullable(ZodOptional(inner)), so an outermost-only check reports the
|
|
13
|
+
* key as required. That marked half of the update tools' fields required and
|
|
14
|
+
* left `null` as the only value a caller could supply for "not changing this" —
|
|
15
|
+
* which write paths then read as "clear it".
|
|
16
|
+
*/
|
|
17
|
+
export declare function isOptionalDef(def: any): boolean;
|
|
18
|
+
/** Extract description from a Zod def, checking wrapper levels */
|
|
19
|
+
export declare function getZodDescription(def: any): string | undefined;
|
|
20
|
+
/** Recursively convert a Zod type def to JSON Schema */
|
|
21
|
+
export declare function zodDefToJsonSchema(def: any): Record<string, unknown>;
|
|
22
|
+
/** Convert a top-level Zod object schema to JSON Schema for MCP */
|
|
23
|
+
export declare function zodToJsonSchema(schema: {
|
|
24
|
+
shape?: Record<string, unknown>;
|
|
25
|
+
_def?: {
|
|
26
|
+
shape?: () => Record<string, unknown>;
|
|
27
|
+
};
|
|
28
|
+
}): Record<string, unknown>;
|
|
29
|
+
//# sourceMappingURL=zod-json-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod-json-schema.d.ts","sourceRoot":"","sources":["../../src/utils/zod-json-schema.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAS/C;AAED,kEAAkE;AAClE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAM9D;AAED,wDAAwD;AACxD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqEpE;AAED,mEAAmE;AACnE,wBAAgB,eAAe,CAAC,MAAM,EAAE;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;CAClD,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwB1B"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/**
|
|
3
|
+
* Minimal Zod -> JSON Schema conversion for MCP tool definitions.
|
|
4
|
+
*
|
|
5
|
+
* The JSON Schema emitted here is what the calling model sees, so a field
|
|
6
|
+
* wrongly marked `required` doesn't just annoy a client — it obliges the model
|
|
7
|
+
* to invent a value for a field it never meant to touch.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* True when a field may be omitted entirely.
|
|
11
|
+
*
|
|
12
|
+
* The wrapper chain has to be walked, not just peeked at: `.optional().nullable()`
|
|
13
|
+
* builds ZodNullable(ZodOptional(inner)), so an outermost-only check reports the
|
|
14
|
+
* key as required. That marked half of the update tools' fields required and
|
|
15
|
+
* left `null` as the only value a caller could supply for "not changing this" —
|
|
16
|
+
* which write paths then read as "clear it".
|
|
17
|
+
*/
|
|
18
|
+
export function isOptionalDef(def) {
|
|
19
|
+
if (!def)
|
|
20
|
+
return false;
|
|
21
|
+
const typeName = def.typeName;
|
|
22
|
+
if (typeName === 'ZodOptional' || typeName === 'ZodDefault')
|
|
23
|
+
return true;
|
|
24
|
+
if (typeName === 'ZodNullable')
|
|
25
|
+
return isOptionalDef(def.innerType?._def);
|
|
26
|
+
if (typeName === 'ZodEffects')
|
|
27
|
+
return isOptionalDef(def.schema?._def);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
/** Extract description from a Zod def, checking wrapper levels */
|
|
31
|
+
export function getZodDescription(def) {
|
|
32
|
+
if (!def)
|
|
33
|
+
return undefined;
|
|
34
|
+
if (def.description)
|
|
35
|
+
return def.description;
|
|
36
|
+
if (def.innerType?._def)
|
|
37
|
+
return getZodDescription(def.innerType._def);
|
|
38
|
+
if (def.schema?._def)
|
|
39
|
+
return getZodDescription(def.schema._def);
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
/** Recursively convert a Zod type def to JSON Schema */
|
|
43
|
+
export function zodDefToJsonSchema(def) {
|
|
44
|
+
if (!def)
|
|
45
|
+
return { type: 'string' };
|
|
46
|
+
const typeName = def.typeName;
|
|
47
|
+
// Unwrap wrapper types (Optional, Default, Effects/Preprocess)
|
|
48
|
+
if (typeName === 'ZodOptional' || typeName === 'ZodDefault') {
|
|
49
|
+
return zodDefToJsonSchema(def.innerType?._def);
|
|
50
|
+
}
|
|
51
|
+
// Nullable: preserve null-ability in JSON Schema so MCP clients can pass null
|
|
52
|
+
if (typeName === 'ZodNullable') {
|
|
53
|
+
const inner = zodDefToJsonSchema(def.innerType?._def);
|
|
54
|
+
if (inner.type && typeof inner.type === 'string') {
|
|
55
|
+
return { ...inner, type: [inner.type, 'null'] };
|
|
56
|
+
}
|
|
57
|
+
return inner;
|
|
58
|
+
}
|
|
59
|
+
if (typeName === 'ZodEffects') {
|
|
60
|
+
return zodDefToJsonSchema(def.schema?._def);
|
|
61
|
+
}
|
|
62
|
+
// Primitives
|
|
63
|
+
if (typeName === 'ZodString')
|
|
64
|
+
return { type: 'string' };
|
|
65
|
+
if (typeName === 'ZodNumber')
|
|
66
|
+
return { type: 'number' };
|
|
67
|
+
if (typeName === 'ZodBoolean')
|
|
68
|
+
return { type: 'boolean' };
|
|
69
|
+
// Enum
|
|
70
|
+
if (typeName === 'ZodEnum') {
|
|
71
|
+
return { type: 'string', enum: def.values };
|
|
72
|
+
}
|
|
73
|
+
// Array — recurse into element type to generate `items`
|
|
74
|
+
if (typeName === 'ZodArray') {
|
|
75
|
+
const itemSchema = zodDefToJsonSchema(def.type?._def);
|
|
76
|
+
return { type: 'array', items: itemSchema };
|
|
77
|
+
}
|
|
78
|
+
// Object — recurse into shape properties
|
|
79
|
+
if (typeName === 'ZodObject') {
|
|
80
|
+
const shape = typeof def.shape === 'function' ? def.shape() : (def.shape || {});
|
|
81
|
+
const properties = {};
|
|
82
|
+
const required = [];
|
|
83
|
+
for (const [key, value] of Object.entries(shape)) {
|
|
84
|
+
const fieldDef = value?._def;
|
|
85
|
+
const prop = zodDefToJsonSchema(fieldDef);
|
|
86
|
+
// Extract description (may be on wrapper or inner type)
|
|
87
|
+
const desc = getZodDescription(fieldDef);
|
|
88
|
+
if (desc)
|
|
89
|
+
prop.description = desc;
|
|
90
|
+
properties[key] = prop;
|
|
91
|
+
if (!isOptionalDef(fieldDef)) {
|
|
92
|
+
required.push(key);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const result = { type: 'object', properties };
|
|
96
|
+
if (required.length > 0)
|
|
97
|
+
result.required = required;
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
// Record
|
|
101
|
+
if (typeName === 'ZodRecord') {
|
|
102
|
+
return { type: 'object', additionalProperties: { type: 'string' } };
|
|
103
|
+
}
|
|
104
|
+
return { type: 'string' };
|
|
105
|
+
}
|
|
106
|
+
/** Convert a top-level Zod object schema to JSON Schema for MCP */
|
|
107
|
+
export function zodToJsonSchema(schema) {
|
|
108
|
+
const shape = schema.shape || (schema._def?.shape ? schema._def.shape() : {});
|
|
109
|
+
const properties = {};
|
|
110
|
+
const required = [];
|
|
111
|
+
for (const [key, value] of Object.entries(shape)) {
|
|
112
|
+
const fieldDef = value?._def;
|
|
113
|
+
const prop = zodDefToJsonSchema(fieldDef);
|
|
114
|
+
const desc = getZodDescription(fieldDef);
|
|
115
|
+
if (desc)
|
|
116
|
+
prop.description = desc;
|
|
117
|
+
properties[key] = prop;
|
|
118
|
+
if (!isOptionalDef(fieldDef)) {
|
|
119
|
+
required.push(key);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
type: 'object',
|
|
124
|
+
properties,
|
|
125
|
+
required: required.length > 0 ? required : undefined,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=zod-json-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod-json-schema.js","sourceRoot":"","sources":["../../src/utils/zod-json-schema.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,GAAQ;IACpC,IAAI,CAAC,GAAG;QAAE,OAAO,KAAK,CAAC;IAEvB,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAC9B,IAAI,QAAQ,KAAK,aAAa,IAAI,QAAQ,KAAK,YAAY;QAAE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E,CAAC;IAE9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,MAAM,QAAQ,GAAI,KAAa,EAAE,IAAI,CAAC;QACtC,MAAM,IAAI,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAE1C,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,IAAI;YAAE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAElC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QAEvB,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,UAAU;QACV,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;KACrD,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const analyzeFeatureToolName = "llama_analyze_feature";
|
|
3
|
-
export declare const analyzeFeatureToolDescription = "Start feature decomposition. Returns requirements questions (ask user FIRST), codebase search instructions, and technical questions. Do NOT assume user intent - clarify requirements before generating stories.";
|
|
4
|
-
export declare const analyzeFeatureToolSchema: z.ZodObject<{
|
|
5
|
-
orgSlug: z.ZodOptional<z.ZodString>;
|
|
6
|
-
projectKey: z.ZodOptional<z.ZodString>;
|
|
7
|
-
title: z.ZodString;
|
|
8
|
-
description: z.ZodString;
|
|
9
|
-
scope: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
10
|
-
gitRef: z.ZodOptional<z.ZodString>;
|
|
11
|
-
issueType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["TASK", "STORY"]>>>;
|
|
12
|
-
userContext: z.ZodOptional<z.ZodString>;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
description: string;
|
|
15
|
-
title: string;
|
|
16
|
-
issueType: "STORY" | "TASK";
|
|
17
|
-
scope?: string[] | undefined;
|
|
18
|
-
orgSlug?: string | undefined;
|
|
19
|
-
projectKey?: string | undefined;
|
|
20
|
-
gitRef?: string | undefined;
|
|
21
|
-
userContext?: string | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
description: string;
|
|
24
|
-
title: string;
|
|
25
|
-
scope?: unknown;
|
|
26
|
-
orgSlug?: string | undefined;
|
|
27
|
-
projectKey?: string | undefined;
|
|
28
|
-
gitRef?: string | undefined;
|
|
29
|
-
issueType?: "STORY" | "TASK" | undefined;
|
|
30
|
-
userContext?: string | undefined;
|
|
31
|
-
}>;
|
|
32
|
-
export type AnalyzeFeatureToolInput = z.infer<typeof analyzeFeatureToolSchema>;
|
|
33
|
-
export declare function executeAnalyzeFeature(input: AnalyzeFeatureToolInput): Promise<string>;
|
|
34
|
-
export declare const submitDecompositionToolName = "llama_submit_decomposition";
|
|
35
|
-
export declare const submitDecompositionToolDescription = "Submit codebase analysis and generated stories. Call after llama_analyze_feature. Stories include summary, estimate, codeContext, and optional blockedByIndex for dependencies.";
|
|
36
|
-
export declare const submitDecompositionToolSchema: z.ZodObject<{
|
|
37
|
-
decompositionId: z.ZodString;
|
|
38
|
-
analysisAnswers: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
39
|
-
stories: z.ZodArray<z.ZodObject<{
|
|
40
|
-
summary: z.ZodString;
|
|
41
|
-
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["STORY", "TASK", "BUG"]>>>;
|
|
42
|
-
estimate: z.ZodNumber;
|
|
43
|
-
description: z.ZodOptional<z.ZodString>;
|
|
44
|
-
codeContext: z.ZodOptional<z.ZodObject<{
|
|
45
|
-
relatedPaths: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
46
|
-
technicalNotes: z.ZodOptional<z.ZodString>;
|
|
47
|
-
patternRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
48
|
-
file: z.ZodString;
|
|
49
|
-
description: z.ZodString;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
file: string;
|
|
52
|
-
description: string;
|
|
53
|
-
}, {
|
|
54
|
-
file: string;
|
|
55
|
-
description: string;
|
|
56
|
-
}>, "many">>;
|
|
57
|
-
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
relatedPaths?: string[] | undefined;
|
|
59
|
-
technicalNotes?: string | undefined;
|
|
60
|
-
patternRefs?: {
|
|
61
|
-
file: string;
|
|
62
|
-
description: string;
|
|
63
|
-
}[] | undefined;
|
|
64
|
-
}, {
|
|
65
|
-
relatedPaths?: unknown;
|
|
66
|
-
technicalNotes?: string | undefined;
|
|
67
|
-
patternRefs?: {
|
|
68
|
-
file: string;
|
|
69
|
-
description: string;
|
|
70
|
-
}[] | undefined;
|
|
71
|
-
}>>;
|
|
72
|
-
labels: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
73
|
-
blockedByIndex: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
type: "STORY" | "TASK" | "BUG";
|
|
76
|
-
summary: string;
|
|
77
|
-
estimate: number;
|
|
78
|
-
labels?: string[] | undefined;
|
|
79
|
-
description?: string | undefined;
|
|
80
|
-
codeContext?: {
|
|
81
|
-
relatedPaths?: string[] | undefined;
|
|
82
|
-
technicalNotes?: string | undefined;
|
|
83
|
-
patternRefs?: {
|
|
84
|
-
file: string;
|
|
85
|
-
description: string;
|
|
86
|
-
}[] | undefined;
|
|
87
|
-
} | undefined;
|
|
88
|
-
blockedByIndex?: number[] | undefined;
|
|
89
|
-
}, {
|
|
90
|
-
summary: string;
|
|
91
|
-
estimate: number;
|
|
92
|
-
type?: "STORY" | "TASK" | "BUG" | undefined;
|
|
93
|
-
labels?: unknown;
|
|
94
|
-
description?: string | undefined;
|
|
95
|
-
codeContext?: {
|
|
96
|
-
relatedPaths?: unknown;
|
|
97
|
-
technicalNotes?: string | undefined;
|
|
98
|
-
patternRefs?: {
|
|
99
|
-
file: string;
|
|
100
|
-
description: string;
|
|
101
|
-
}[] | undefined;
|
|
102
|
-
} | undefined;
|
|
103
|
-
blockedByIndex?: number[] | undefined;
|
|
104
|
-
}>, "many">;
|
|
105
|
-
epicSummary: z.ZodOptional<z.ZodString>;
|
|
106
|
-
warnings: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
107
|
-
issueType: z.ZodEnum<["TASK", "STORY"]>;
|
|
108
|
-
destination: z.ZodEnum<["backlog", "new_sprint", "existing_sprint"]>;
|
|
109
|
-
newSprintName: z.ZodOptional<z.ZodString>;
|
|
110
|
-
sprintId: z.ZodOptional<z.ZodString>;
|
|
111
|
-
epicStrategy: z.ZodEnum<["new", "existing"]>;
|
|
112
|
-
existingEpicKey: z.ZodOptional<z.ZodString>;
|
|
113
|
-
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
issueType: "STORY" | "TASK";
|
|
115
|
-
destination: "backlog" | "new_sprint" | "existing_sprint";
|
|
116
|
-
epicStrategy: "new" | "existing";
|
|
117
|
-
decompositionId: string;
|
|
118
|
-
analysisAnswers: Record<string, unknown>;
|
|
119
|
-
stories: {
|
|
120
|
-
type: "STORY" | "TASK" | "BUG";
|
|
121
|
-
summary: string;
|
|
122
|
-
estimate: number;
|
|
123
|
-
labels?: string[] | undefined;
|
|
124
|
-
description?: string | undefined;
|
|
125
|
-
codeContext?: {
|
|
126
|
-
relatedPaths?: string[] | undefined;
|
|
127
|
-
technicalNotes?: string | undefined;
|
|
128
|
-
patternRefs?: {
|
|
129
|
-
file: string;
|
|
130
|
-
description: string;
|
|
131
|
-
}[] | undefined;
|
|
132
|
-
} | undefined;
|
|
133
|
-
blockedByIndex?: number[] | undefined;
|
|
134
|
-
}[];
|
|
135
|
-
sprintId?: string | undefined;
|
|
136
|
-
newSprintName?: string | undefined;
|
|
137
|
-
existingEpicKey?: string | undefined;
|
|
138
|
-
epicSummary?: string | undefined;
|
|
139
|
-
warnings?: string[] | undefined;
|
|
140
|
-
}, {
|
|
141
|
-
issueType: "STORY" | "TASK";
|
|
142
|
-
destination: "backlog" | "new_sprint" | "existing_sprint";
|
|
143
|
-
epicStrategy: "new" | "existing";
|
|
144
|
-
decompositionId: string;
|
|
145
|
-
analysisAnswers: Record<string, unknown>;
|
|
146
|
-
stories: {
|
|
147
|
-
summary: string;
|
|
148
|
-
estimate: number;
|
|
149
|
-
type?: "STORY" | "TASK" | "BUG" | undefined;
|
|
150
|
-
labels?: unknown;
|
|
151
|
-
description?: string | undefined;
|
|
152
|
-
codeContext?: {
|
|
153
|
-
relatedPaths?: unknown;
|
|
154
|
-
technicalNotes?: string | undefined;
|
|
155
|
-
patternRefs?: {
|
|
156
|
-
file: string;
|
|
157
|
-
description: string;
|
|
158
|
-
}[] | undefined;
|
|
159
|
-
} | undefined;
|
|
160
|
-
blockedByIndex?: number[] | undefined;
|
|
161
|
-
}[];
|
|
162
|
-
sprintId?: string | undefined;
|
|
163
|
-
newSprintName?: string | undefined;
|
|
164
|
-
existingEpicKey?: string | undefined;
|
|
165
|
-
epicSummary?: string | undefined;
|
|
166
|
-
warnings?: unknown;
|
|
167
|
-
}>;
|
|
168
|
-
export type SubmitDecompositionToolInput = z.infer<typeof submitDecompositionToolSchema>;
|
|
169
|
-
export declare function executeSubmitDecomposition(input: SubmitDecompositionToolInput): Promise<string>;
|
|
170
|
-
export declare const applyDecompositionToolName = "llama_apply_decomposition";
|
|
171
|
-
export declare const applyDecompositionToolDescription = "Create issues from submitted decomposition. Uses preferences stored during submit (epic strategy, destination). Modifications can skip stories or override estimates.";
|
|
172
|
-
export declare const applyDecompositionToolSchema: z.ZodObject<{
|
|
173
|
-
decompositionId: z.ZodString;
|
|
174
|
-
sprintId: z.ZodOptional<z.ZodString>;
|
|
175
|
-
modifications: z.ZodOptional<z.ZodObject<{
|
|
176
|
-
skipIndexes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
177
|
-
estimateOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
178
|
-
}, "strip", z.ZodTypeAny, {
|
|
179
|
-
skipIndexes?: number[] | undefined;
|
|
180
|
-
estimateOverrides?: Record<string, number> | undefined;
|
|
181
|
-
}, {
|
|
182
|
-
skipIndexes?: number[] | undefined;
|
|
183
|
-
estimateOverrides?: Record<string, number> | undefined;
|
|
184
|
-
}>>;
|
|
185
|
-
}, "strip", z.ZodTypeAny, {
|
|
186
|
-
decompositionId: string;
|
|
187
|
-
sprintId?: string | undefined;
|
|
188
|
-
modifications?: {
|
|
189
|
-
skipIndexes?: number[] | undefined;
|
|
190
|
-
estimateOverrides?: Record<string, number> | undefined;
|
|
191
|
-
} | undefined;
|
|
192
|
-
}, {
|
|
193
|
-
decompositionId: string;
|
|
194
|
-
sprintId?: string | undefined;
|
|
195
|
-
modifications?: {
|
|
196
|
-
skipIndexes?: number[] | undefined;
|
|
197
|
-
estimateOverrides?: Record<string, number> | undefined;
|
|
198
|
-
} | undefined;
|
|
199
|
-
}>;
|
|
200
|
-
export type ApplyDecompositionToolInput = z.infer<typeof applyDecompositionToolSchema>;
|
|
201
|
-
export declare function executeApplyDecomposition(input: ApplyDecompositionToolInput): Promise<string>;
|
|
202
|
-
export declare const getDecompositionToolName = "llama_get_decomposition";
|
|
203
|
-
export declare const getDecompositionToolDescription = "Get details of a feature decomposition by ID.";
|
|
204
|
-
export declare const getDecompositionToolSchema: z.ZodObject<{
|
|
205
|
-
orgSlug: z.ZodOptional<z.ZodString>;
|
|
206
|
-
projectKey: z.ZodOptional<z.ZodString>;
|
|
207
|
-
decompositionId: z.ZodString;
|
|
208
|
-
}, "strip", z.ZodTypeAny, {
|
|
209
|
-
decompositionId: string;
|
|
210
|
-
orgSlug?: string | undefined;
|
|
211
|
-
projectKey?: string | undefined;
|
|
212
|
-
}, {
|
|
213
|
-
decompositionId: string;
|
|
214
|
-
orgSlug?: string | undefined;
|
|
215
|
-
projectKey?: string | undefined;
|
|
216
|
-
}>;
|
|
217
|
-
export type GetDecompositionToolInput = z.infer<typeof getDecompositionToolSchema>;
|
|
218
|
-
export declare function executeGetDecomposition(input: GetDecompositionToolInput): Promise<string>;
|
|
219
|
-
export declare const cancelDecompositionToolName = "llama_cancel_decomposition";
|
|
220
|
-
export declare const cancelDecompositionToolDescription = "Cancel a decomposition that hasn't been applied yet.";
|
|
221
|
-
export declare const cancelDecompositionToolSchema: z.ZodObject<{
|
|
222
|
-
orgSlug: z.ZodOptional<z.ZodString>;
|
|
223
|
-
projectKey: z.ZodOptional<z.ZodString>;
|
|
224
|
-
decompositionId: z.ZodString;
|
|
225
|
-
}, "strip", z.ZodTypeAny, {
|
|
226
|
-
decompositionId: string;
|
|
227
|
-
orgSlug?: string | undefined;
|
|
228
|
-
projectKey?: string | undefined;
|
|
229
|
-
}, {
|
|
230
|
-
decompositionId: string;
|
|
231
|
-
orgSlug?: string | undefined;
|
|
232
|
-
projectKey?: string | undefined;
|
|
233
|
-
}>;
|
|
234
|
-
export type CancelDecompositionToolInput = z.infer<typeof cancelDecompositionToolSchema>;
|
|
235
|
-
export declare function executeCancelDecomposition(input: CancelDecompositionToolInput): Promise<string>;
|
|
236
|
-
//# sourceMappingURL=decomposition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decomposition.d.ts","sourceRoot":"","sources":["../../src/tools/decomposition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkDxB,eAAO,MAAM,sBAAsB,0BAA0B,CAAC;AAE9D,eAAO,MAAM,6BAA6B,qNAAqN,CAAC;AAEhQ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