@codemcp/workflows 6.18.1 → 6.18.3
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/package.json +1 -1
- package/packages/core/package.json +1 -1
- package/packages/docs/package.json +1 -1
- package/packages/mcp-server/package.json +1 -1
- package/packages/opencode-plugin/dist/index.js +48 -3
- package/packages/opencode-plugin/package.json +7 -4
- package/packages/opencode-tui-plugin/package.json +1 -1
- package/packages/visualizer/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemcp/workflows",
|
|
3
|
-
"version": "6.18.
|
|
3
|
+
"version": "6.18.3",
|
|
4
4
|
"description": "A Model Context Protocol server that acts as an intelligent conversation state manager and development guide for LLMs, featuring comprehensive long-term memory with persistent project artifacts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "packages/cli/dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"typescript": "^5.9.3",
|
|
52
52
|
"vitepress": "^1.6.4",
|
|
53
53
|
"vitest": "4.0.18",
|
|
54
|
-
"@codemcp/workflows-core": "6.18.
|
|
54
|
+
"@codemcp/workflows-core": "6.18.3"
|
|
55
55
|
},
|
|
56
56
|
"lint-staged": {
|
|
57
57
|
"*.{ts,js,mts,cts,tsx,jsx}": [
|
|
@@ -28852,7 +28852,9 @@ var WorkflowsPlugin = async (input) => {
|
|
|
28852
28852
|
let bufferedInstructions = null;
|
|
28853
28853
|
let postCompactionSession = null;
|
|
28854
28854
|
let postCompactionMessagePending = false;
|
|
28855
|
+
let postCompactionAutoResume = false;
|
|
28855
28856
|
let lastKnownModel = null;
|
|
28857
|
+
let lastKnownAgent = null;
|
|
28856
28858
|
function setBufferedInstructions(result3) {
|
|
28857
28859
|
bufferedInstructions = {
|
|
28858
28860
|
phase: result3.phase,
|
|
@@ -28939,6 +28941,9 @@ var WorkflowsPlugin = async (input) => {
|
|
|
28939
28941
|
if (hookInput.model) {
|
|
28940
28942
|
lastKnownModel = hookInput.model;
|
|
28941
28943
|
}
|
|
28944
|
+
if (hookInput.agent && isAgentEnabled(hookInput.agent)) {
|
|
28945
|
+
lastKnownAgent = hookInput.agent;
|
|
28946
|
+
}
|
|
28942
28947
|
if (postCompactionMessagePending) {
|
|
28943
28948
|
postCompactionMessagePending = false;
|
|
28944
28949
|
logger24.debug(
|
|
@@ -28946,7 +28951,15 @@ var WorkflowsPlugin = async (input) => {
|
|
|
28946
28951
|
);
|
|
28947
28952
|
return;
|
|
28948
28953
|
}
|
|
28949
|
-
|
|
28954
|
+
const bypassAgentFilter = postCompactionAutoResume;
|
|
28955
|
+
if (bypassAgentFilter) {
|
|
28956
|
+
postCompactionAutoResume = false;
|
|
28957
|
+
logger24.debug(
|
|
28958
|
+
"chat.message: bypassing agent filter for post-compaction auto-resume",
|
|
28959
|
+
{ agent: hookInput.agent }
|
|
28960
|
+
);
|
|
28961
|
+
}
|
|
28962
|
+
if (!bypassAgentFilter && !isAgentEnabled(hookInput.agent)) {
|
|
28950
28963
|
logger24.debug(
|
|
28951
28964
|
"chat.message: Agent not enabled \u2014 injecting tool suppression",
|
|
28952
28965
|
{
|
|
@@ -29144,6 +29157,7 @@ ${phaseInstructions}`
|
|
|
29144
29157
|
logger24.debug("event hook fired", { type: event.type });
|
|
29145
29158
|
if (event.type === "session.compacted") {
|
|
29146
29159
|
postCompactionSession = event.properties.sessionID;
|
|
29160
|
+
postCompactionAutoResume = true;
|
|
29147
29161
|
logger24.info("session.compacted: pending phase-aware continue", {
|
|
29148
29162
|
sessionID: postCompactionSession
|
|
29149
29163
|
});
|
|
@@ -29182,7 +29196,8 @@ ${phaseInstructions}`
|
|
|
29182
29196
|
await client.session.promptAsync({
|
|
29183
29197
|
path: { id: sessionID },
|
|
29184
29198
|
body: {
|
|
29185
|
-
parts: [{ type: "text", text: promptText }]
|
|
29199
|
+
parts: [{ type: "text", text: promptText }],
|
|
29200
|
+
...lastKnownAgent ? { agent: lastKnownAgent } : {}
|
|
29186
29201
|
}
|
|
29187
29202
|
});
|
|
29188
29203
|
logger24.info("session.idle: phase-aware continue sent (async)", {
|
|
@@ -29301,7 +29316,37 @@ ${phaseInstructions}`
|
|
|
29301
29316
|
await createSetupProjectDocsTool(input.directory, getServerContext)
|
|
29302
29317
|
)
|
|
29303
29318
|
};
|
|
29304
|
-
})()
|
|
29319
|
+
})(),
|
|
29320
|
+
/**
|
|
29321
|
+
* Bridge Zod .describe() descriptions from plugin's registry into host's registry.
|
|
29322
|
+
*
|
|
29323
|
+
* Problem: this plugin uses a different zod instance than OpenCode (host). In Zod v4,
|
|
29324
|
+
* .describe() stores descriptions in a module-level globalRegistry singleton. When
|
|
29325
|
+
* OpenCode calls z.toJSONSchema(parameters), it reads from its own registry which has
|
|
29326
|
+
* no entries for plugin schemas — so all parameter descriptions are missing from the
|
|
29327
|
+
* JSON Schema sent to the LLM.
|
|
29328
|
+
*
|
|
29329
|
+
* Solution: dynamically import 'zod' at hook call time. When the plugin is installed
|
|
29330
|
+
* without its own node_modules/zod (zod is a peerDependency), this import resolves to
|
|
29331
|
+
* the host's (OpenCode's) zod module — the same instance used when creating
|
|
29332
|
+
* output.parameters. We then register each field schema's description into the host's
|
|
29333
|
+
* globalRegistry, making them visible to the subsequent z.toJSONSchema() call.
|
|
29334
|
+
*/
|
|
29335
|
+
"tool.definition": async (_input, output) => {
|
|
29336
|
+
try {
|
|
29337
|
+
const parameters = output.parameters;
|
|
29338
|
+
const shape = parameters?._zod?.def?.shape;
|
|
29339
|
+
if (!shape) return;
|
|
29340
|
+
const { globalRegistry: hostRegistry } = await import("zod");
|
|
29341
|
+
for (const [_key, fieldSchema] of Object.entries(shape)) {
|
|
29342
|
+
const desc = fieldSchema?.description;
|
|
29343
|
+
if (desc && typeof desc === "string") {
|
|
29344
|
+
hostRegistry.add(fieldSchema, { description: desc });
|
|
29345
|
+
}
|
|
29346
|
+
}
|
|
29347
|
+
} catch {
|
|
29348
|
+
}
|
|
29349
|
+
}
|
|
29305
29350
|
};
|
|
29306
29351
|
};
|
|
29307
29352
|
var plugin_default = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemcp/workflows-opencode",
|
|
3
|
-
"version": "6.18.
|
|
3
|
+
"version": "6.18.3",
|
|
4
4
|
"description": "OpenCode plugin for structured development workflows",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"format": "prettier --write ."
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"effect": "4.0.0-beta.48"
|
|
28
|
-
"zod": "^4.1.8"
|
|
27
|
+
"effect": "4.0.0-beta.48"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@codemcp/workflows-core": "workspace:*",
|
|
@@ -35,11 +34,15 @@
|
|
|
35
34
|
"vitest": "4.0.18"
|
|
36
35
|
},
|
|
37
36
|
"peerDependencies": {
|
|
38
|
-
"@anthropic-ai/sdk": "*"
|
|
37
|
+
"@anthropic-ai/sdk": "*",
|
|
38
|
+
"zod": ">=4.1.8"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@anthropic-ai/sdk": {
|
|
42
42
|
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"zod": {
|
|
45
|
+
"optional": false
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
"keywords": [
|