agentic-sdlc-mcp 1.3.0 → 1.4.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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +233 -240
  3. package/dist/config.d.ts +4 -3
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +117 -23
  6. package/dist/config.js.map +1 -1
  7. package/dist/github/context.d.ts +41 -0
  8. package/dist/github/context.d.ts.map +1 -1
  9. package/dist/github/context.js +191 -3
  10. package/dist/github/context.js.map +1 -1
  11. package/dist/index.js +4 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/tools/agent-handoff.d.ts +5 -41
  14. package/dist/tools/agent-handoff.d.ts.map +1 -1
  15. package/dist/tools/branch-protection-status.d.ts +17 -25
  16. package/dist/tools/branch-protection-status.d.ts.map +1 -1
  17. package/dist/tools/create-issue-set.d.ts +6 -46
  18. package/dist/tools/create-issue-set.d.ts.map +1 -1
  19. package/dist/tools/create-pr-summary.d.ts +3 -11
  20. package/dist/tools/create-pr-summary.d.ts.map +1 -1
  21. package/dist/tools/plan-from-context.d.ts +65 -32
  22. package/dist/tools/plan-from-context.d.ts.map +1 -1
  23. package/dist/tools/plan-from-context.js +545 -61
  24. package/dist/tools/plan-from-context.js.map +1 -1
  25. package/dist/tools/prepare-work-item.d.ts +6 -30
  26. package/dist/tools/prepare-work-item.d.ts.map +1 -1
  27. package/dist/tools/quality-gate-status.d.ts +11 -107
  28. package/dist/tools/quality-gate-status.d.ts.map +1 -1
  29. package/dist/tools/release-readiness.d.ts +8 -15
  30. package/dist/tools/release-readiness.d.ts.map +1 -1
  31. package/dist/tools/repo-context.d.ts +21 -30
  32. package/dist/tools/repo-context.d.ts.map +1 -1
  33. package/dist/tools/repo-context.js +86 -4
  34. package/dist/tools/repo-context.js.map +1 -1
  35. package/dist/tools/review-pr.d.ts +20 -28
  36. package/dist/tools/review-pr.d.ts.map +1 -1
  37. package/dist/tools/security-triage.d.ts +12 -46
  38. package/dist/tools/security-triage.d.ts.map +1 -1
  39. package/dist/tools/workflow-permissions-audit.d.ts +16 -24
  40. package/dist/tools/workflow-permissions-audit.d.ts.map +1 -1
  41. package/dist/types.d.ts +6 -0
  42. package/dist/types.d.ts.map +1 -1
  43. package/package.json +9 -9
@@ -13,15 +13,7 @@ export declare const BranchProtectionStatusInputSchema: z.ZodObject<{
13
13
  owner: z.ZodOptional<z.ZodString>;
14
14
  repo: z.ZodOptional<z.ZodString>;
15
15
  branch: z.ZodOptional<z.ZodString>;
16
- }, "strip", z.ZodTypeAny, {
17
- owner?: string | undefined;
18
- repo?: string | undefined;
19
- branch?: string | undefined;
20
- }, {
21
- owner?: string | undefined;
22
- repo?: string | undefined;
23
- branch?: string | undefined;
24
- }>;
16
+ }, z.core.$strip>;
25
17
  export type BranchProtectionStatusInput = z.infer<typeof BranchProtectionStatusInputSchema>;
26
18
  export declare const BranchProtectionStatusOutputSchema: {
27
19
  repo: z.ZodString;
@@ -29,30 +21,30 @@ export declare const BranchProtectionStatusOutputSchema: {
29
21
  classicProtectionEnabled: z.ZodBoolean;
30
22
  requiredApprovingReviewCount: z.ZodNullable<z.ZodNumber>;
31
23
  requireCodeOwnerReviews: z.ZodNullable<z.ZodBoolean>;
32
- requiredStatusCheckContexts: z.ZodArray<z.ZodString, "many">;
24
+ requiredStatusCheckContexts: z.ZodArray<z.ZodString>;
33
25
  enforceAdmins: z.ZodNullable<z.ZodBoolean>;
34
26
  allowForcePushes: z.ZodNullable<z.ZodBoolean>;
35
27
  allowDeletions: z.ZodNullable<z.ZodBoolean>;
36
28
  requiredConversationResolution: z.ZodNullable<z.ZodBoolean>;
37
- rulesetRuleTypes: z.ZodArray<z.ZodString, "many">;
29
+ rulesetRuleTypes: z.ZodArray<z.ZodString>;
38
30
  findings: z.ZodArray<z.ZodObject<{
39
- severity: z.ZodEnum<["critical", "high", "medium", "low", "info"]>;
31
+ severity: z.ZodEnum<{
32
+ critical: "critical";
33
+ high: "high";
34
+ medium: "medium";
35
+ low: "low";
36
+ info: "info";
37
+ }>;
40
38
  category: z.ZodString;
41
39
  description: z.ZodString;
42
40
  suggestion: z.ZodOptional<z.ZodString>;
43
- }, "strip", z.ZodTypeAny, {
44
- description: string;
45
- severity: "critical" | "high" | "medium" | "low" | "info";
46
- category: string;
47
- suggestion?: string | undefined;
48
- }, {
49
- description: string;
50
- severity: "critical" | "high" | "medium" | "low" | "info";
51
- category: string;
52
- suggestion?: string | undefined;
53
- }>, "many">;
54
- errors: z.ZodArray<z.ZodString, "many">;
55
- conclusion: z.ZodEnum<["protected", "partially_protected", "unprotected"]>;
41
+ }, z.core.$strip>>;
42
+ errors: z.ZodArray<z.ZodString>;
43
+ conclusion: z.ZodEnum<{
44
+ protected: "protected";
45
+ partially_protected: "partially_protected";
46
+ unprotected: "unprotected";
47
+ }>;
56
48
  };
57
49
  export interface BranchProtectionStatusResult {
58
50
  repo: string;
@@ -1 +1 @@
1
- {"version":3,"file":"branch-protection-status.d.ts","sourceRoot":"","sources":["../../src/tools/branch-protection-status.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAM7C,eAAO,MAAM,iCAAiC;;;;;;;;;;;;EAI5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAM5F,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsB9C,CAAC;AAMF,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,wBAA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AwC1E"}
@@ -15,43 +15,11 @@ export declare const CreateIssueSetInputSchema: z.ZodObject<{
15
15
  issues: z.ZodArray<z.ZodObject<{
16
16
  title: z.ZodString;
17
17
  body: z.ZodString;
18
- labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
- assignees: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
20
- }, "strip", z.ZodTypeAny, {
21
- title: string;
22
- body: string;
23
- labels?: string[] | undefined;
24
- assignees?: string[] | undefined;
25
- }, {
26
- title: string;
27
- body: string;
28
- labels?: string[] | undefined;
29
- assignees?: string[] | undefined;
30
- }>, "many">;
18
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ assignees: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ }, z.core.$strip>>;
31
21
  dryRun: z.ZodDefault<z.ZodBoolean>;
32
- }, "strip", z.ZodTypeAny, {
33
- issues: {
34
- title: string;
35
- body: string;
36
- labels?: string[] | undefined;
37
- assignees?: string[] | undefined;
38
- }[];
39
- dryRun: boolean;
40
- owner?: string | undefined;
41
- repo?: string | undefined;
42
- titlePrefix?: string | undefined;
43
- }, {
44
- issues: {
45
- title: string;
46
- body: string;
47
- labels?: string[] | undefined;
48
- assignees?: string[] | undefined;
49
- }[];
50
- owner?: string | undefined;
51
- repo?: string | undefined;
52
- titlePrefix?: string | undefined;
53
- dryRun?: boolean | undefined;
54
- }>;
22
+ }, z.core.$strip>;
55
23
  export type CreateIssueSetInput = z.infer<typeof CreateIssueSetInputSchema>;
56
24
  export declare const CreateIssueSetOutputSchema: {
57
25
  dryRun: z.ZodBoolean;
@@ -60,16 +28,8 @@ export declare const CreateIssueSetOutputSchema: {
60
28
  number: z.ZodNumber;
61
29
  title: z.ZodString;
62
30
  url: z.ZodString;
63
- }, "strip", z.ZodTypeAny, {
64
- number: number;
65
- title: string;
66
- url: string;
67
- }, {
68
- number: number;
69
- title: string;
70
- url: string;
71
- }>, "many">;
72
- previewTitles: z.ZodArray<z.ZodString, "many">;
31
+ }, z.core.$strip>>;
32
+ previewTitles: z.ZodArray<z.ZodString>;
73
33
  };
74
34
  export interface CreatedIssue {
75
35
  number: number;
@@ -1 +1 @@
1
- {"version":3,"file":"create-issue-set.d.ts","sourceRoot":"","sources":["../../src/tools/create-issue-set.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAM7C,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;CAatC,CAAC;AAMF,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAMD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,mBAAmB,EAC3B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,oBAAoB,CAAA;CAAE,CAAC,CA+D7D;AAMD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0ClE"}
1
+ {"version":3,"file":"create-issue-set.d.ts","sourceRoot":"","sources":["../../src/tools/create-issue-set.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAM7C,eAAO,MAAM,yBAAyB;;;;;;;;;;;iBAoBpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;;;;;;;;CAatC,CAAC;AAMF,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAMD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,mBAAmB,EAC3B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,oBAAoB,CAAA;CAAE,CAAC,CA+D7D;AAMD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0ClE"}
@@ -12,15 +12,7 @@ export declare const CreatePrSummaryInputSchema: z.ZodObject<{
12
12
  owner: z.ZodOptional<z.ZodString>;
13
13
  repo: z.ZodOptional<z.ZodString>;
14
14
  pullNumber: z.ZodNumber;
15
- }, "strip", z.ZodTypeAny, {
16
- pullNumber: number;
17
- owner?: string | undefined;
18
- repo?: string | undefined;
19
- }, {
20
- pullNumber: number;
21
- owner?: string | undefined;
22
- repo?: string | undefined;
23
- }>;
15
+ }, z.core.$strip>;
24
16
  export type CreatePrSummaryInput = z.infer<typeof CreatePrSummaryInputSchema>;
25
17
  export declare const CreatePrSummaryOutputSchema: {
26
18
  pullNumber: z.ZodNumber;
@@ -34,8 +26,8 @@ export declare const CreatePrSummaryOutputSchema: {
34
26
  totalDeletions: z.ZodNumber;
35
27
  totalFiles: z.ZodNumber;
36
28
  hasTests: z.ZodBoolean;
37
- risks: z.ZodArray<z.ZodString, "many">;
38
- labels: z.ZodArray<z.ZodString, "many">;
29
+ risks: z.ZodArray<z.ZodString>;
30
+ labels: z.ZodArray<z.ZodString>;
39
31
  };
40
32
  export interface PrSummaryResult {
41
33
  pullNumber: number;
@@ -1 +1 @@
1
- {"version":3,"file":"create-pr-summary.d.ts","sourceRoot":"","sources":["../../src/tools/create-pr-summary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAM7C,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAIrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;CAcvC,CAAC;AAMF,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC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AAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAMD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,oBAAoB,EAC5B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,eAAe,CAAA;CAAE,CAAC,CAoJxD;AAMD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwCnE"}
@@ -2,67 +2,100 @@
2
2
  * Tool: plan_from_context
3
3
  *
4
4
  * Handler extracted as `buildPlan` and `handlePlanFromContext` for testing.
5
+ *
6
+ * Supports `workType` (docs/feature/bugfix/refactor/security/release/infra):
7
+ * each type gets a distinct phase-by-phase template rather than one
8
+ * one-size-fits-all plan -- a docs-only task should not default to requiring
9
+ * code unit tests, while a bugfix task must always include repro + regression
10
+ * tests. When the caller does not pass `workType` explicitly, it is inferred
11
+ * from `goal` + `acceptanceCriteria` via a conservative keyword heuristic
12
+ * (see `inferWorkType`), and the inference itself (confidence, reasoning,
13
+ * whether clarification is needed) is surfaced in the output rather than
14
+ * hidden -- callers should not have to trust a silent guess.
5
15
  */
6
16
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
7
17
  import { z } from "zod";
8
18
  import { fetchRepoContext } from "../github/context.js";
9
- import type { SdlcPlanPhase } from "../types.js";
19
+ import type { SdlcPlanPhase, SdlcWorkType } from "../types.js";
10
20
  export declare const PlanFromContextInputSchema: z.ZodObject<{
11
21
  goal: z.ZodString;
12
22
  owner: z.ZodOptional<z.ZodString>;
13
23
  repo: z.ZodOptional<z.ZodString>;
14
- constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15
- acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
- }, "strip", z.ZodTypeAny, {
17
- goal: string;
18
- owner?: string | undefined;
19
- repo?: string | undefined;
20
- constraints?: string[] | undefined;
21
- acceptanceCriteria?: string[] | undefined;
22
- }, {
23
- goal: string;
24
- owner?: string | undefined;
25
- repo?: string | undefined;
26
- constraints?: string[] | undefined;
27
- acceptanceCriteria?: string[] | undefined;
28
- }>;
24
+ workType: z.ZodOptional<z.ZodEnum<{
25
+ docs: "docs";
26
+ feature: "feature";
27
+ bugfix: "bugfix";
28
+ refactor: "refactor";
29
+ security: "security";
30
+ release: "release";
31
+ infra: "infra";
32
+ }>>;
33
+ constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ }, z.core.$strip>;
29
36
  export type PlanFromContextInput = z.infer<typeof PlanFromContextInputSchema>;
30
37
  export declare const PlanFromContextOutputSchema: {
31
38
  goal: z.ZodString;
32
39
  repo: z.ZodString;
33
40
  defaultBranch: z.ZodString;
34
41
  language: z.ZodNullable<z.ZodString>;
35
- constraints: z.ZodArray<z.ZodString, "many">;
36
- acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
42
+ workType: z.ZodEnum<{
43
+ docs: "docs";
44
+ feature: "feature";
45
+ bugfix: "bugfix";
46
+ refactor: "refactor";
47
+ security: "security";
48
+ release: "release";
49
+ infra: "infra";
50
+ }>;
51
+ confidence: z.ZodEnum<{
52
+ high: "high";
53
+ medium: "medium";
54
+ low: "low";
55
+ }>;
56
+ reasoning: z.ZodString;
57
+ needsClarification: z.ZodBoolean;
58
+ constraints: z.ZodArray<z.ZodString>;
59
+ acceptanceCriteria: z.ZodArray<z.ZodString>;
37
60
  phases: z.ZodArray<z.ZodObject<{
38
61
  phase: z.ZodString;
39
62
  summary: z.ZodString;
40
- tasks: z.ZodArray<z.ZodString, "many">;
41
- }, "strip", z.ZodTypeAny, {
42
- phase: string;
43
- summary: string;
44
- tasks: string[];
45
- }, {
46
- phase: string;
47
- summary: string;
48
- tasks: string[];
49
- }>, "many">;
50
- suggestedIssues: z.ZodArray<z.ZodString, "many">;
51
- risks: z.ZodArray<z.ZodString, "many">;
63
+ tasks: z.ZodArray<z.ZodString>;
64
+ }, z.core.$strip>>;
65
+ suggestedIssues: z.ZodArray<z.ZodString>;
66
+ risks: z.ZodArray<z.ZodString>;
52
67
  };
53
68
  export interface PlanFromContextResult {
54
69
  goal: string;
55
70
  repo: string;
56
71
  defaultBranch: string;
57
72
  language: string | null;
73
+ workType: SdlcWorkType;
74
+ confidence: "high" | "medium" | "low";
75
+ reasoning: string;
76
+ needsClarification: boolean;
58
77
  constraints: string[];
59
78
  acceptanceCriteria: string[];
60
79
  phases: SdlcPlanPhase[];
61
80
  suggestedIssues: string[];
62
81
  risks: string[];
63
82
  }
64
- /** Build the phase-by-phase plan. Pure — no I/O. */
65
- export declare function buildPlan(goal: string, repoName: string): SdlcPlanPhase[];
83
+ export interface WorkTypeInference {
84
+ workType: SdlcWorkType;
85
+ confidence: "high" | "medium" | "low";
86
+ reasoning: string;
87
+ needsClarification: boolean;
88
+ }
89
+ /**
90
+ * Infer a `workType` from free-text goal + acceptance criteria when the caller
91
+ * did not pass one explicitly. Conservative by design: ties or zero signal
92
+ * fall back to `feature` with `needsClarification: true` rather than guessing
93
+ * confidently, so callers know to double-check rather than trust a silent
94
+ * default.
95
+ */
96
+ export declare function inferWorkType(goal: string, acceptanceCriteria: string[], explicit?: SdlcWorkType): WorkTypeInference;
97
+ /** Build the phase-by-phase plan for a given workType (defaults to "feature" for backward compatibility). Pure -- no I/O. */
98
+ export declare function buildPlan(goal: string, repoName: string, workType?: SdlcWorkType): SdlcPlanPhase[];
66
99
  export declare function handlePlanFromContext(params: PlanFromContextInput, fetchContext: typeof fetchRepoContext): Promise<{
67
100
  text: string;
68
101
  structured: PlanFromContextResult;
@@ -1 +1 @@
1
- {"version":3,"file":"plan-from-context.d.ts","sourceRoot":"","sources":["../../src/tools/plan-from-context.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