@mcpc-tech/core 0.3.17 → 0.3.19
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/README.md +4 -4
- package/index.cjs +422 -2260
- package/index.mjs +422 -2260
- package/package.json +2 -2
- package/types/src/compose.d.ts.map +1 -1
- package/types/src/prompts/types.d.ts +1 -1
- package/types/src/prompts/types.d.ts.map +1 -1
- package/types/src/set-up-mcp-compose.d.ts +8 -20
- package/types/src/set-up-mcp-compose.d.ts.map +1 -1
- package/types/src/types.d.ts.map +1 -1
- package/types/src/utils/state.d.ts +0 -5
- package/types/src/utils/state.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpc-tech/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.19",
|
|
4
4
|
"homepage": "https://jsr.io/@mcpc/core",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@ai-sdk/provider": "^2.0.0",
|
|
7
|
-
"@mcpc-tech/acp-ai-provider": "^0.1.
|
|
7
|
+
"@mcpc-tech/acp-ai-provider": "^0.1.20",
|
|
8
8
|
"@mcpc-tech/ripgrep-napi": "^0.0.4",
|
|
9
9
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
10
10
|
"@opentelemetry/api": "^1.9.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sources":["../../src/compose.ts"],"names":[],"mappings":"AAAA,SAGE,KAAK,cAAc,EAGnB,KAAK,IAAI,6CAC8C;AACzD,SAAwC,KAAK,MAAM,4BAA4B;AAC/E,cAAc,UAAU,6BAA6B;AACrD,SACE,MAAM,EACN,KAAK,aAAa,oDAC4C;AAGhE,cAAc,iBAAiB,kCAAkC;AACjE,cAAc,UAAU,EAAE,YAAY,qBAAqB;AAM3D,cAA4B,UAAU,EAAE,UAAU,4BAA4B;AAe9E,OAAO,cAAM,4BAA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D,oBACE,MAAM,MAAM;IACT,aAAa,MAAM;IAAE,QAAQ;MAAe,SAAS;EAI1D;;GAEC,GACD,aAAa,MAAM,MAAM,GAAG,OAAO;EAInC;;GAEC,GACD,WAAW,UAAU,MAAM,EAAE,QAAQ,UAAU,GAAG,IAAI;EAItD;;GAEC,GACD,cAAc,UAAU,MAAM,GAAG,aAAa,SAAS;EAIvD;;GAEC,GACD,iBAAiB,UAAU,MAAM,GAAG,OAAO;EAI3C;;GAEC,GACD,AAAM,UAAU,QAAQ,UAAU,GAAG,QAAQ,IAAI;EAIjD;;GAEC,GACD,AAAM,mBACJ,YAAY,MAAM,EAClB;IAAW,QAAQ,OAAO;GAAoB,GAC7C,QAAQ,IAAI;UAOD;EAOd;;GAEC,GACD,AAAM,kBAAkB,QAAQ,IAAI;EAIpC;;GAEC,GACD,SAAe,SAAS,QAAQ,IAAI;EAK9B,QACJ,MAAM,MAAM,GAAG,IAAI,EACnB,aAAa,MAAM,EACnB,aAAY,UAA+B,EAC3C,UAAS,kBAAkB,UAAgC;AA+Q/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Execution mode types
|
|
3
|
-
*/ export type ExecutionMode = "agentic" | "
|
|
3
|
+
*/ export type ExecutionMode = "agentic" | "ai_sampling" | "ai_acp" | (string & Record<never, never>);
|
|
4
4
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sources":["../../../src/prompts/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sources":["../../../src/prompts/types.ts"],"names":[],"mappings":"AAoBA;;CAEC,GACD,YAAY,gBACR,YACA,gBACA,YACC,MAAM,GAAG,OAAO,KAAK,EAAE,KAAK"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComposableMCPServer } from "../mod.js";
|
|
2
|
-
import type { MCPCStep } from "./utils/state.js";
|
|
3
2
|
import type { MCPSetting } from "./service/tools.js";
|
|
4
3
|
import type { SamplingConfig } from "./types.js";
|
|
5
4
|
import type { ToolPlugin } from "./plugin-types.js";
|
|
@@ -29,17 +28,13 @@ export interface ComposeDefinition {
|
|
|
29
28
|
options?: {
|
|
30
29
|
/**
|
|
31
30
|
* Execution mode for the agent
|
|
32
|
-
* - "agentic": Fully autonomous agent mode
|
|
33
|
-
* - "agentic_workflow": Agent workflow mode that can either generate steps at runtime or use predefined steps
|
|
34
|
-
* - "agentic_sampling": Autonomous sampling mode for agentic execution
|
|
35
|
-
* - "agentic_workflow_sampling": Autonomous sampling mode for workflow execution
|
|
31
|
+
* - "agentic": Fully autonomous agent mode (default)
|
|
36
32
|
* - "ai_sampling": AI SDK sampling mode using streamText with MCP sampling provider
|
|
37
33
|
* - "ai_acp": AI SDK ACP mode for coding agents (Claude Code, etc.)
|
|
38
34
|
* @default "agentic"
|
|
39
35
|
*/ mode?: ExecutionMode;
|
|
40
36
|
/**
|
|
41
37
|
* Configuration for sampling mode execution
|
|
42
|
-
* Only applies when mode is "agentic_sampling" or "agentic_workflow_sampling"
|
|
43
38
|
*/ samplingConfig?: SamplingConfig;
|
|
44
39
|
/**
|
|
45
40
|
* Provider options for AI SDK sampling mode
|
|
@@ -79,23 +74,16 @@ export interface ComposeDefinition {
|
|
|
79
74
|
* Applies to ai_sampling and ai_acp modes
|
|
80
75
|
* @default 50
|
|
81
76
|
*/ maxSteps?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Maximum tokens for sampling requests
|
|
79
|
+
* Applies to ai_sampling mode
|
|
80
|
+
* @default 128_000
|
|
81
|
+
*/ maxTokens?: number;
|
|
82
82
|
/**
|
|
83
83
|
* Enable OpenTelemetry tracing
|
|
84
84
|
* Applies to ai_sampling and ai_acp modes
|
|
85
85
|
* @default false
|
|
86
86
|
*/ tracingEnabled?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Optional predefined workflow steps for agentic_workflow mode
|
|
89
|
-
* - If provided: Uses these predefined steps in agentic_workflow mode
|
|
90
|
-
* - If empty/undefined: Generates workflow steps dynamically at runtime in agentic_workflow mode
|
|
91
|
-
* - Ignored when mode is "agentic"
|
|
92
|
-
*/ steps?: MCPCStep[];
|
|
93
|
-
/**
|
|
94
|
-
* Actions that must be included at least once in any workflow
|
|
95
|
-
* Validation will fail if these actions are not present in the workflow steps
|
|
96
|
-
* - Only applies to agentic_workflow mode
|
|
97
|
-
* - Ignored when mode is "agentic"
|
|
98
|
-
*/ ensureStepActions?: string[];
|
|
99
87
|
/**
|
|
100
88
|
* Default references for the dependent mcps
|
|
101
89
|
*
|
|
@@ -148,7 +136,7 @@ export declare function parseMcpcConfigs(conf?: ComposeDefinition[]): ComposeDef
|
|
|
148
136
|
* }
|
|
149
137
|
* },
|
|
150
138
|
* plugins: [createLargeResultPlugin({ maxSize: 8000 })],
|
|
151
|
-
* options: { mode: "
|
|
139
|
+
* options: { mode: "ai_sampling" }
|
|
152
140
|
* }]
|
|
153
141
|
* );
|
|
154
142
|
* await server.connect(new StdioServerTransport());
|
|
@@ -163,7 +151,7 @@ export declare function parseMcpcConfigs(conf?: ComposeDefinition[]): ComposeDef
|
|
|
163
151
|
* - description: Agent purpose with XML-like tool references (e.g., `<tool name="server.tool"/>`)
|
|
164
152
|
* - deps: MCP server dependencies with transport configurations (stdio, sse, streamable-http)
|
|
165
153
|
* - plugins: Global plugins to transform/extend tool behavior (objects or file paths)
|
|
166
|
-
* - options: Execution mode settings (agentic,
|
|
154
|
+
* - options: Execution mode settings (agentic, ai_sampling, ai_acp)
|
|
167
155
|
*
|
|
168
156
|
* @param setupCallback - Optional callback to register custom tools or perform additional setup
|
|
169
157
|
* before composition. Useful for adding internal tools or custom configurations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-up-mcp-compose.d.ts","sources":["../../src/set-up-mcp-compose.ts"],"names":[],"mappings":"AAAA,SAAS,mBAAmB,oBAAoB;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"set-up-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,CAAC,GACpE,QAAQ,oBAAoB"}
|
package/types/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sources":["../../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,aAAa,OAAO,MAAM,EAAE,OAAO;AAE/C,YAAY,gBAAgB,MAAM,OAAO,EAAE,QAAQ,OAAO,KAAK,OAAO;AAEtE,iBAAiB;EACf,gBAAgB,MAAM;EACtB;;;GAGC,GACD,YAAY,OAAO;;AAWrB;;;;;;;;CAQC,GACD,YAAY,WAAW,MAAM,cAAc,EAAE,MAAM,CAAC,CAAC;AACrD,YAAY,YACR,KACA,UACA,YACA,iBACA;AACJ,YAAY,UAAU,OAAO;AAE7B,YAAY,cACP,YAAY,EAAE,MAAM,CAAC,CAAC,EAAE,WAAW,YAAY,aAC/C,YAAY,EAAE,MAAM,CAAC,CAAC,EAAE,YAAY,WAAW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sources":["../../../src/utils/state.ts"],"names":[],"mappings":"AAAA,YAAY;EACV,aAAa,MAAM;EACnB,SAAS,MAAM,MAAM"}
|