@codemcp/workflows 6.21.0 → 6.22.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/package.json +2 -2
- package/packages/cli/dist/{chunk-KWAFQZUI.js → chunk-ZKTSATU2.js} +2695 -43
- package/packages/cli/dist/{cli-O52P3RVC.js → cli-6HOSC22C.js} +15 -9
- package/packages/cli/dist/{dist-FIUD5G5U.js → dist-6BKGI5U7.js} +26 -4
- package/packages/cli/dist/{dist-ZTAPC4IK.js → dist-PUE2THQS.js} +1 -1
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/core/dist/system-prompt-generator.js +26 -4
- package/packages/core/dist/system-prompt-generator.js.map +1 -1
- package/packages/core/package.json +1 -1
- package/packages/docs/package.json +1 -1
- package/packages/mcp-server/dist/index.js +26 -4
- package/packages/mcp-server/package.json +1 -1
- package/packages/opencode-plugin/dist/index.js +26 -4
- package/packages/opencode-plugin/package.json +1 -1
- package/packages/opencode-tui-plugin/package.json +1 -1
- package/packages/visualizer/package.json +1 -1
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
ConfigManager,
|
|
3
3
|
StateMachineLoader,
|
|
4
4
|
WorkflowManager,
|
|
5
|
-
generateSystemPrompt
|
|
6
|
-
|
|
5
|
+
generateSystemPrompt,
|
|
6
|
+
jsYaml
|
|
7
|
+
} from "./chunk-ZKTSATU2.js";
|
|
7
8
|
import "./chunk-R5U7XKVJ.js";
|
|
8
9
|
|
|
9
10
|
// src/cli.ts
|
|
@@ -220,11 +221,13 @@ var KiroConfigGenerator = class extends ConfigGenerator {
|
|
|
220
221
|
"knowledge",
|
|
221
222
|
"thinking",
|
|
222
223
|
"use_aws",
|
|
224
|
+
"subagent",
|
|
223
225
|
"@workflows"
|
|
224
226
|
],
|
|
225
227
|
allowedTools: [
|
|
226
228
|
"fs_read",
|
|
227
229
|
"fs_write",
|
|
230
|
+
"subagent",
|
|
228
231
|
"@workflows/whats_next",
|
|
229
232
|
"@workflows/conduct_review",
|
|
230
233
|
"@workflows/list_workflows",
|
|
@@ -246,7 +249,11 @@ var KiroConfigGenerator = class extends ConfigGenerator {
|
|
|
246
249
|
]
|
|
247
250
|
}
|
|
248
251
|
},
|
|
249
|
-
resources: [
|
|
252
|
+
resources: [
|
|
253
|
+
"file://README.md",
|
|
254
|
+
"file://.kiro/rules/**/*.md",
|
|
255
|
+
"skill://.kiro/skills/**/SKILL.md"
|
|
256
|
+
],
|
|
250
257
|
hooks: {}
|
|
251
258
|
};
|
|
252
259
|
const kiroDir = join2(outputDir, ".kiro", "agents");
|
|
@@ -997,7 +1004,6 @@ import { readFile as readFile3, writeFile as writeFile3, mkdir as mkdir3 } from
|
|
|
997
1004
|
import { existsSync as existsSync3 } from "fs";
|
|
998
1005
|
import { join as join5, dirname as dirname3 } from "path";
|
|
999
1006
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
1000
|
-
import yaml from "js-yaml";
|
|
1001
1007
|
var __filename3 = fileURLToPath3(import.meta.url);
|
|
1002
1008
|
var __dirname3 = dirname3(__filename3);
|
|
1003
1009
|
var SUPPORTED_CAPABILITIES = [
|
|
@@ -1057,7 +1063,7 @@ async function mergeCapabilityModels(configPath, models) {
|
|
|
1057
1063
|
existingConfig = loaded;
|
|
1058
1064
|
} else {
|
|
1059
1065
|
const existingRaw = await readFile3(configPath, "utf-8");
|
|
1060
|
-
const parsed =
|
|
1066
|
+
const parsed = jsYaml.load(existingRaw);
|
|
1061
1067
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
1062
1068
|
existingConfig = parsed;
|
|
1063
1069
|
}
|
|
@@ -1070,9 +1076,9 @@ async function mergeCapabilityModels(configPath, models) {
|
|
|
1070
1076
|
...newEntries
|
|
1071
1077
|
}
|
|
1072
1078
|
};
|
|
1073
|
-
const serialized =
|
|
1079
|
+
const serialized = jsYaml.dump(mergedConfig, { noRefs: true, sortKeys: false });
|
|
1074
1080
|
if (configExisted) {
|
|
1075
|
-
const existingSerialized =
|
|
1081
|
+
const existingSerialized = jsYaml.dump(existingConfig, {
|
|
1076
1082
|
noRefs: true,
|
|
1077
1083
|
sortKeys: false
|
|
1078
1084
|
});
|
|
@@ -1335,11 +1341,11 @@ var isLocal = existsSync4(join6(__dirname4, "../../core/dist/index.js"));
|
|
|
1335
1341
|
var generateSystemPrompt2;
|
|
1336
1342
|
var StateMachineLoader2;
|
|
1337
1343
|
if (isLocal) {
|
|
1338
|
-
const coreModule = await import("./dist-
|
|
1344
|
+
const coreModule = await import("./dist-PUE2THQS.js");
|
|
1339
1345
|
generateSystemPrompt2 = coreModule.generateSystemPrompt;
|
|
1340
1346
|
StateMachineLoader2 = coreModule.StateMachineLoader;
|
|
1341
1347
|
} else {
|
|
1342
|
-
const coreModule = await import("./dist-
|
|
1348
|
+
const coreModule = await import("./dist-PUE2THQS.js");
|
|
1343
1349
|
generateSystemPrompt2 = coreModule.generateSystemPrompt;
|
|
1344
1350
|
StateMachineLoader2 = coreModule.StateMachineLoader;
|
|
1345
1351
|
}
|
|
@@ -10286,13 +10286,35 @@ function generateSystemPrompt(stateMachine) {
|
|
|
10286
10286
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
10287
10287
|
logger13.debug("Generating system prompt");
|
|
10288
10288
|
const systemPrompt = `
|
|
10289
|
-
You are
|
|
10289
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
10290
10290
|
|
|
10291
|
-
|
|
10291
|
+
## Core loop
|
|
10292
10292
|
|
|
10293
|
-
|
|
10293
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely \u2014 they are the authoritative source of what to do in the current phase.
|
|
10294
10294
|
|
|
10295
|
-
|
|
10295
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
10296
|
+
|
|
10297
|
+
## Before acting
|
|
10298
|
+
|
|
10299
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
10300
|
+
|
|
10301
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
10302
|
+
|
|
10303
|
+
## Scope discipline
|
|
10304
|
+
|
|
10305
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time \u2014 do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
10306
|
+
|
|
10307
|
+
## Subagent delegation
|
|
10308
|
+
|
|
10309
|
+
### Capability hints
|
|
10310
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
10311
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
10312
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
10313
|
+
|
|
10314
|
+
### Reviews
|
|
10315
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
10316
|
+
|
|
10317
|
+
## Task management
|
|
10296
10318
|
|
|
10297
10319
|
Do not use your own task management tools.`;
|
|
10298
10320
|
logger13.info("System prompt generated successfully", {
|
|
@@ -10,7 +10,7 @@ var args = process.argv.slice(2);
|
|
|
10
10
|
if (args.length === 0) {
|
|
11
11
|
const isLocal = existsSync(join(__dirname, "../../mcp-server/dist/index.js"));
|
|
12
12
|
if (isLocal) {
|
|
13
|
-
const { startMcpServer } = await import("./dist-
|
|
13
|
+
const { startMcpServer } = await import("./dist-6BKGI5U7.js");
|
|
14
14
|
await startMcpServer();
|
|
15
15
|
} else {
|
|
16
16
|
const mcpServerModule = "@codemcp/workflows-server";
|
|
@@ -18,6 +18,6 @@ if (args.length === 0) {
|
|
|
18
18
|
await startMcpServer();
|
|
19
19
|
}
|
|
20
20
|
} else {
|
|
21
|
-
const { runCli } = await import("./cli-
|
|
21
|
+
const { runCli } = await import("./cli-6HOSC22C.js");
|
|
22
22
|
await runCli();
|
|
23
23
|
}
|
|
@@ -25,13 +25,35 @@ export function generateSystemPrompt(stateMachine) {
|
|
|
25
25
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
26
26
|
logger.debug('Generating system prompt');
|
|
27
27
|
const systemPrompt = `
|
|
28
|
-
You are
|
|
28
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
## Core loop
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely — they are the authoritative source of what to do in the current phase.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
35
|
+
|
|
36
|
+
## Before acting
|
|
37
|
+
|
|
38
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
39
|
+
|
|
40
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
41
|
+
|
|
42
|
+
## Scope discipline
|
|
43
|
+
|
|
44
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time — do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
45
|
+
|
|
46
|
+
## Subagent delegation
|
|
47
|
+
|
|
48
|
+
### Capability hints
|
|
49
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
50
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
51
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
52
|
+
|
|
53
|
+
### Reviews
|
|
54
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
55
|
+
|
|
56
|
+
## Task management
|
|
35
57
|
|
|
36
58
|
Do not use your own task management tools.`;
|
|
37
59
|
logger.info('System prompt generated successfully', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt-generator.js","sourceRoot":"","sources":["../src/system-prompt-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAA8B;IACjE,MAAM,CAAC,KAAK,CAAC,wDAAwD,EAAE;QACrE,gBAAgB,EAAE,YAAY,CAAC,IAAI;QACnC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM;KACpD,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC,YAAY,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAS,0BAA0B,CAAC,aAA+B;IACjE,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAEzC,MAAM,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"system-prompt-generator.js","sourceRoot":"","sources":["../src/system-prompt-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAA8B;IACjE,MAAM,CAAC,KAAK,CAAC,wDAAwD,EAAE;QACrE,gBAAgB,EAAE,YAAY,CAAC,IAAI;QACnC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM;KACpD,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC,YAAY,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAS,0BAA0B,CAAC,aAA+B;IACjE,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAEzC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA+BoB,CAAC;IAE1C,MAAM,CAAC,IAAI,CAAC,sCAAsC,EAAE;QAClD,YAAY,EAAE,YAAY,CAAC,MAAM;KAClC,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -6272,13 +6272,35 @@ function generateSystemPrompt(stateMachine) {
|
|
|
6272
6272
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
6273
6273
|
logger13.debug("Generating system prompt");
|
|
6274
6274
|
const systemPrompt = `
|
|
6275
|
-
You are
|
|
6275
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
6276
6276
|
|
|
6277
|
-
|
|
6277
|
+
## Core loop
|
|
6278
6278
|
|
|
6279
|
-
|
|
6279
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely \u2014 they are the authoritative source of what to do in the current phase.
|
|
6280
6280
|
|
|
6281
|
-
|
|
6281
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
6282
|
+
|
|
6283
|
+
## Before acting
|
|
6284
|
+
|
|
6285
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
6286
|
+
|
|
6287
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
6288
|
+
|
|
6289
|
+
## Scope discipline
|
|
6290
|
+
|
|
6291
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time \u2014 do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
6292
|
+
|
|
6293
|
+
## Subagent delegation
|
|
6294
|
+
|
|
6295
|
+
### Capability hints
|
|
6296
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
6297
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
6298
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
6299
|
+
|
|
6300
|
+
### Reviews
|
|
6301
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
6302
|
+
|
|
6303
|
+
## Task management
|
|
6282
6304
|
|
|
6283
6305
|
Do not use your own task management tools.`;
|
|
6284
6306
|
logger13.info("System prompt generated successfully", {
|
|
@@ -20073,13 +20073,35 @@ function generateSystemPrompt(stateMachine) {
|
|
|
20073
20073
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
20074
20074
|
logger13.debug("Generating system prompt");
|
|
20075
20075
|
const systemPrompt = `
|
|
20076
|
-
You are
|
|
20076
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
20077
20077
|
|
|
20078
|
-
|
|
20078
|
+
## Core loop
|
|
20079
20079
|
|
|
20080
|
-
|
|
20080
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely \u2014 they are the authoritative source of what to do in the current phase.
|
|
20081
20081
|
|
|
20082
|
-
|
|
20082
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
20083
|
+
|
|
20084
|
+
## Before acting
|
|
20085
|
+
|
|
20086
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
20087
|
+
|
|
20088
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
20089
|
+
|
|
20090
|
+
## Scope discipline
|
|
20091
|
+
|
|
20092
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time \u2014 do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
20093
|
+
|
|
20094
|
+
## Subagent delegation
|
|
20095
|
+
|
|
20096
|
+
### Capability hints
|
|
20097
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
20098
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
20099
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
20100
|
+
|
|
20101
|
+
### Reviews
|
|
20102
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
20103
|
+
|
|
20104
|
+
## Task management
|
|
20083
20105
|
|
|
20084
20106
|
Do not use your own task management tools.`;
|
|
20085
20107
|
logger13.info("System prompt generated successfully", {
|