poe-code 3.0.125 → 3.0.126
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.js +36 -3
- package/dist/index.js.map +2 -2
- package/dist/sdk/pipeline.js +2 -1
- package/dist/sdk/pipeline.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7171,6 +7171,35 @@ function parseTaskStatus(value, availableSteps, taskId) {
|
|
|
7171
7171
|
}
|
|
7172
7172
|
return statusMap;
|
|
7173
7173
|
}
|
|
7174
|
+
function parseMcpConfig(value) {
|
|
7175
|
+
if (!isRecord3(value)) {
|
|
7176
|
+
throw new Error('Invalid plan YAML: "mcp" must be an object.');
|
|
7177
|
+
}
|
|
7178
|
+
const result = {};
|
|
7179
|
+
for (const [name, entry] of Object.entries(value)) {
|
|
7180
|
+
if (!isRecord3(entry)) {
|
|
7181
|
+
throw new Error(`Invalid plan YAML: mcp["${name}"] must be an object.`);
|
|
7182
|
+
}
|
|
7183
|
+
if (typeof entry.command !== "string" || entry.command.length === 0) {
|
|
7184
|
+
throw new Error(`Invalid plan YAML: mcp["${name}"].command must be a non-empty string.`);
|
|
7185
|
+
}
|
|
7186
|
+
const server = { command: entry.command };
|
|
7187
|
+
if (entry.args !== void 0) {
|
|
7188
|
+
if (!Array.isArray(entry.args) || !entry.args.every((a) => typeof a === "string")) {
|
|
7189
|
+
throw new Error(`Invalid plan YAML: mcp["${name}"].args must be an array of strings.`);
|
|
7190
|
+
}
|
|
7191
|
+
server.args = entry.args;
|
|
7192
|
+
}
|
|
7193
|
+
if (entry.env !== void 0) {
|
|
7194
|
+
if (!isRecord3(entry.env) || !Object.values(entry.env).every((v) => typeof v === "string")) {
|
|
7195
|
+
throw new Error(`Invalid plan YAML: mcp["${name}"].env must be a string record.`);
|
|
7196
|
+
}
|
|
7197
|
+
server.env = entry.env;
|
|
7198
|
+
}
|
|
7199
|
+
result[name] = server;
|
|
7200
|
+
}
|
|
7201
|
+
return result;
|
|
7202
|
+
}
|
|
7174
7203
|
function parsePlan(yamlContent, options = {}) {
|
|
7175
7204
|
let document;
|
|
7176
7205
|
try {
|
|
@@ -7203,7 +7232,9 @@ function parsePlan(yamlContent, options = {}) {
|
|
|
7203
7232
|
status: parseTaskStatus(value.status, options.availableSteps, id)
|
|
7204
7233
|
};
|
|
7205
7234
|
});
|
|
7206
|
-
|
|
7235
|
+
const mcpValue = document.mcp;
|
|
7236
|
+
const mcp = mcpValue !== void 0 ? parseMcpConfig(mcpValue) : void 0;
|
|
7237
|
+
return { tasks, ...mcp !== void 0 ? { mcp } : {} };
|
|
7207
7238
|
}
|
|
7208
7239
|
var init_parser = __esm({
|
|
7209
7240
|
"packages/pipeline/src/plan/parser.ts"() {
|
|
@@ -7759,6 +7790,7 @@ async function runPipeline(options) {
|
|
|
7759
7790
|
cwd: options.cwd,
|
|
7760
7791
|
logDir: options.logDir,
|
|
7761
7792
|
...model ? { model } : {},
|
|
7793
|
+
...plan.mcp ? { mcpServers: plan.mcp } : {},
|
|
7762
7794
|
...options.signal ? { signal: options.signal } : {}
|
|
7763
7795
|
});
|
|
7764
7796
|
} catch (error) {
|
|
@@ -7872,7 +7904,8 @@ async function runPipeline2(options) {
|
|
|
7872
7904
|
cwd: input.cwd,
|
|
7873
7905
|
logDir: input.logDir,
|
|
7874
7906
|
model: input.model,
|
|
7875
|
-
mode: input.mode
|
|
7907
|
+
mode: input.mode,
|
|
7908
|
+
...input.mcpServers ? { mcpServers: input.mcpServers } : {}
|
|
7876
7909
|
});
|
|
7877
7910
|
await renderAcpStream(events);
|
|
7878
7911
|
return await result;
|
|
@@ -24010,7 +24043,7 @@ var init_package = __esm({
|
|
|
24010
24043
|
"package.json"() {
|
|
24011
24044
|
package_default = {
|
|
24012
24045
|
name: "poe-code",
|
|
24013
|
-
version: "3.0.
|
|
24046
|
+
version: "3.0.126",
|
|
24014
24047
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
24015
24048
|
type: "module",
|
|
24016
24049
|
main: "./dist/index.js",
|