@agent-plan/mcp 0.2.29 → 0.3.1
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/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +401 -404
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
type ToolResult = {
|
|
3
|
+
content: Array<{
|
|
4
|
+
type: "text";
|
|
5
|
+
text: string;
|
|
6
|
+
}>;
|
|
7
|
+
structuredContent?: Record<string, unknown>;
|
|
8
|
+
isError?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Claude Code gives the agent only `structuredContent` when a result has
|
|
12
|
+
* one, and drops `content[].text`. Anything a tool says in text — a handoff
|
|
13
|
+
* body, a phase work map, task-start context, an advisory — would never
|
|
14
|
+
* reach the agent. So every result with a structured part also carries its
|
|
15
|
+
* text there, as `text`. `content` keeps the text for clients that read
|
|
16
|
+
* only that. Applied once, to every tool, by the registerTool wrapper below;
|
|
17
|
+
* no handler needs to know.
|
|
18
|
+
*/
|
|
19
|
+
export declare function foldTextIntoStructured<T extends ToolResult>(result: T): T;
|
|
2
20
|
export declare function startStdioServer(): Promise<void>;
|
|
21
|
+
export {};
|
|
3
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA4BA,KAAK,UAAU,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA2LrI;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,UAAU,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAUzE;AAs2FD,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAItD"}
|