@lousy-agents/cli 2.2.0 → 2.2.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/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +29 -1
- package/dist/mcp-server.js.map +1 -1
- package/package.json +8 -8
package/dist/mcp-server.js
CHANGED
|
@@ -39824,6 +39824,9 @@ class Protocol {
|
|
|
39824
39824
|
* The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
|
|
39825
39825
|
*/
|
|
39826
39826
|
async connect(transport) {
|
|
39827
|
+
if (this._transport) {
|
|
39828
|
+
throw new Error('Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.');
|
|
39829
|
+
}
|
|
39827
39830
|
this._transport = transport;
|
|
39828
39831
|
const _onclose = this.transport?.onclose;
|
|
39829
39832
|
this._transport.onclose = () => {
|
|
@@ -39859,6 +39862,11 @@ class Protocol {
|
|
|
39859
39862
|
this._progressHandlers.clear();
|
|
39860
39863
|
this._taskProgressTokens.clear();
|
|
39861
39864
|
this._pendingDebouncedNotifications.clear();
|
|
39865
|
+
// Abort all in-flight request handlers so they stop sending messages
|
|
39866
|
+
for (const controller of this._requestHandlerAbortControllers.values()) {
|
|
39867
|
+
controller.abort();
|
|
39868
|
+
}
|
|
39869
|
+
this._requestHandlerAbortControllers.clear();
|
|
39862
39870
|
const error = McpError.fromError(types_ErrorCode.ConnectionClosed, 'Connection closed');
|
|
39863
39871
|
this._transport = undefined;
|
|
39864
39872
|
this.onclose?.();
|
|
@@ -39919,6 +39927,8 @@ class Protocol {
|
|
|
39919
39927
|
sessionId: capturedTransport?.sessionId,
|
|
39920
39928
|
_meta: request.params?._meta,
|
|
39921
39929
|
sendNotification: async (notification) => {
|
|
39930
|
+
if (abortController.signal.aborted)
|
|
39931
|
+
return;
|
|
39922
39932
|
// Include related-task metadata if this request is part of a task
|
|
39923
39933
|
const notificationOptions = { relatedRequestId: request.id };
|
|
39924
39934
|
if (relatedTaskId) {
|
|
@@ -39927,6 +39937,9 @@ class Protocol {
|
|
|
39927
39937
|
await this.notification(notification, notificationOptions);
|
|
39928
39938
|
},
|
|
39929
39939
|
sendRequest: async (r, resultSchema, options) => {
|
|
39940
|
+
if (abortController.signal.aborted) {
|
|
39941
|
+
throw new McpError(types_ErrorCode.ConnectionClosed, 'Request was cancelled');
|
|
39942
|
+
}
|
|
39930
39943
|
// Include related-task metadata if this request is part of a task
|
|
39931
39944
|
const requestOptions = { ...options, relatedRequestId: request.id };
|
|
39932
39945
|
if (relatedTaskId && !requestOptions.relatedTask) {
|
|
@@ -45595,6 +45608,15 @@ Example resolved format: actions/setup-node@1a2b3c4d5e6f # v4.0.0`;
|
|
|
45595
45608
|
* })
|
|
45596
45609
|
* workflow.addJob(testJob)
|
|
45597
45610
|
* ```
|
|
45611
|
+
*
|
|
45612
|
+
* @example
|
|
45613
|
+
* ```typescript
|
|
45614
|
+
* // With custom output path
|
|
45615
|
+
* const workflow = new Workflow('deploy', {
|
|
45616
|
+
* name: 'Deploy',
|
|
45617
|
+
* on: { push: { branches: ['main'] } },
|
|
45618
|
+
* }, { outputPath: 'packages/app-a/.github/workflows' })
|
|
45619
|
+
* ```
|
|
45598
45620
|
*/
|
|
45599
45621
|
class Workflow {
|
|
45600
45622
|
workflow;
|
|
@@ -45602,6 +45624,11 @@ class Workflow {
|
|
|
45602
45624
|
* The filename of the workflow e.g. `main.yml`
|
|
45603
45625
|
*/
|
|
45604
45626
|
filename;
|
|
45627
|
+
/**
|
|
45628
|
+
* Custom output path for this workflow.
|
|
45629
|
+
* If set, overrides any config file settings.
|
|
45630
|
+
*/
|
|
45631
|
+
outputPath;
|
|
45605
45632
|
addEnvs(envs) {
|
|
45606
45633
|
if (this.workflow.env && typeof this.workflow.env === 'object')
|
|
45607
45634
|
this.workflow.env = {
|
|
@@ -45626,11 +45653,12 @@ class Workflow {
|
|
|
45626
45653
|
};
|
|
45627
45654
|
return this;
|
|
45628
45655
|
}
|
|
45629
|
-
constructor(filename, workflowProps) {
|
|
45656
|
+
constructor(filename, workflowProps, options) {
|
|
45630
45657
|
this.filename = filename;
|
|
45631
45658
|
this.workflow = {
|
|
45632
45659
|
...workflowProps,
|
|
45633
45660
|
};
|
|
45661
|
+
this.outputPath = options?.outputPath;
|
|
45634
45662
|
}
|
|
45635
45663
|
}
|
|
45636
45664
|
//# sourceMappingURL=index.js.map
|