@exaudeus/workrail 3.6.0 → 3.6.2
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 -1
- package/dist/manifest.json +2 -2
- package/dist/mcp/transports/stdio-entry.js +47 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -156,9 +156,12 @@ The agent will find the workflow, start at step 1, and proceed systematically.
|
|
|
156
156
|
|
|
157
157
|
- **Lockfile is enforced**: `package-lock.json` is canonical and CI will fail if `npm ci` would modify it. Commit lockfile changes intentionally.
|
|
158
158
|
- **Release authority**: releases are produced by **semantic-release** in GitHub Actions (don’t bump versions/tags locally).
|
|
159
|
+
- **Major releases are approval-gated**: breaking changes become **minor by default** and only become **major** when `WORKRAIL_ALLOW_MAJOR_RELEASE=true`.
|
|
159
160
|
- **Preview a release (dry-run)**:
|
|
160
161
|
- **Locally**: `npx semantic-release --dry-run --no-ci`
|
|
161
|
-
- **
|
|
162
|
+
- **Locally (major allowed)**: `WORKRAIL_ALLOW_MAJOR_RELEASE=true npx semantic-release --dry-run --no-ci`
|
|
163
|
+
- **In Actions**: run the **Release (dry-run)** workflow (`.github/workflows/release-dry-run.yml`).
|
|
164
|
+
- **Full release policy**: see [`docs/reference/releases.md`](docs/reference/releases.md)
|
|
162
165
|
|
|
163
166
|
---
|
|
164
167
|
|
package/dist/manifest.json
CHANGED
|
@@ -1014,8 +1014,8 @@
|
|
|
1014
1014
|
"bytes": 59
|
|
1015
1015
|
},
|
|
1016
1016
|
"mcp/transports/stdio-entry.js": {
|
|
1017
|
-
"sha256": "
|
|
1018
|
-
"bytes":
|
|
1017
|
+
"sha256": "a8ee8c153aa907b928053d4ddf3fe5d3848caef34c82435bf1c2abd918fd8acd",
|
|
1018
|
+
"bytes": 4989
|
|
1019
1019
|
},
|
|
1020
1020
|
"mcp/transports/transport-mode.d.ts": {
|
|
1021
1021
|
"sha256": "1c59128ab0174bd2a113fff17521e6339ca367f2b8980c2f2c164ec393c10518",
|
|
@@ -35,7 +35,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.startStdioServer = startStdioServer;
|
|
37
37
|
const server_js_1 = require("../server.js");
|
|
38
|
-
const
|
|
38
|
+
const container_js_1 = require("../../di/container.js");
|
|
39
|
+
const tokens_js_1 = require("../../di/tokens.js");
|
|
40
|
+
const INITIAL_ROOTS_TIMEOUT_MS = 1000;
|
|
41
|
+
async function fetchInitialRootsWithTimeout(server) {
|
|
42
|
+
return Promise.race([
|
|
43
|
+
server.listRoots(),
|
|
44
|
+
new Promise((resolve) => {
|
|
45
|
+
setTimeout(() => resolve(null), INITIAL_ROOTS_TIMEOUT_MS);
|
|
46
|
+
}),
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
39
49
|
async function startStdioServer() {
|
|
40
50
|
const { server, ctx, rootsManager } = await (0, server_js_1.composeServer)();
|
|
41
51
|
const { StdioServerTransport } = await Promise.resolve().then(() => __importStar(require('@modelcontextprotocol/sdk/server/stdio.js')));
|
|
@@ -52,19 +62,44 @@ async function startStdioServer() {
|
|
|
52
62
|
});
|
|
53
63
|
const transport = new StdioServerTransport();
|
|
54
64
|
await server.connect(transport);
|
|
55
|
-
|
|
56
|
-
|
|
65
|
+
console.error('[Transport] WorkRail MCP Server running on stdio');
|
|
66
|
+
void fetchInitialRootsWithTimeout(server)
|
|
67
|
+
.then((result) => {
|
|
68
|
+
if (result == null) {
|
|
69
|
+
console.error('[Roots] Initial roots probe timed out; workspace context will use server CWD fallback');
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
57
72
|
rootsManager.updateRootUris(result.roots.map((r) => r.uri));
|
|
58
73
|
console.error(`[Roots] Initial workspace roots: ${result.roots.map((r) => r.uri).join(', ') || '(none)'}`);
|
|
59
|
-
}
|
|
60
|
-
|
|
74
|
+
})
|
|
75
|
+
.catch(() => {
|
|
61
76
|
console.error('[Roots] Client does not support roots/list; workspace context will use server CWD fallback');
|
|
62
|
-
}
|
|
63
|
-
console.error('[Transport] WorkRail MCP Server running on stdio');
|
|
64
|
-
(0, shutdown_hooks_js_1.wireShutdownHooks)({
|
|
65
|
-
onBeforeTerminate: async () => {
|
|
66
|
-
await ctx.httpServer?.stop();
|
|
67
|
-
},
|
|
68
77
|
});
|
|
69
|
-
|
|
78
|
+
const shutdownEvents = container_js_1.container.resolve(tokens_js_1.DI.Runtime.ShutdownEvents);
|
|
79
|
+
const processSignals = container_js_1.container.resolve(tokens_js_1.DI.Runtime.ProcessSignals);
|
|
80
|
+
const terminator = container_js_1.container.resolve(tokens_js_1.DI.Runtime.ProcessTerminator);
|
|
81
|
+
processSignals.on('SIGINT', () => shutdownEvents.emit({ kind: 'shutdown_requested', signal: 'SIGINT' }));
|
|
82
|
+
processSignals.on('SIGTERM', () => shutdownEvents.emit({ kind: 'shutdown_requested', signal: 'SIGTERM' }));
|
|
83
|
+
processSignals.on('SIGHUP', () => shutdownEvents.emit({ kind: 'shutdown_requested', signal: 'SIGHUP' }));
|
|
84
|
+
process.stdin.on('end', () => {
|
|
85
|
+
console.error('[MCP] stdin closed, initiating shutdown');
|
|
86
|
+
shutdownEvents.emit({ kind: 'shutdown_requested', signal: 'SIGHUP' });
|
|
87
|
+
});
|
|
88
|
+
let shutdownStarted = false;
|
|
89
|
+
shutdownEvents.onShutdown((event) => {
|
|
90
|
+
if (shutdownStarted)
|
|
91
|
+
return;
|
|
92
|
+
shutdownStarted = true;
|
|
93
|
+
void (async () => {
|
|
94
|
+
try {
|
|
95
|
+
console.error(`[Shutdown] Requested by ${event.signal}. Stopping services...`);
|
|
96
|
+
await ctx.httpServer?.stop();
|
|
97
|
+
terminator.terminate({ kind: 'success' });
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
console.error('[Shutdown] Error while stopping services:', err);
|
|
101
|
+
terminator.terminate({ kind: 'failure' });
|
|
102
|
+
}
|
|
103
|
+
})();
|
|
104
|
+
});
|
|
70
105
|
}
|