@stdiobus/workers-registry 1.3.8 → 1.3.10

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.
Files changed (84) hide show
  1. package/README.md +1 -13
  2. package/index.js +49 -0
  3. package/launcher/index.js +4 -0
  4. package/launcher/index.js.map +7 -0
  5. package/out/dist/workers/acp-worker/index.js.map +1 -1
  6. package/out/dist/workers/index.js +3 -3
  7. package/out/dist/workers/mcp-echo-server/index.js.map +1 -1
  8. package/out/dist/workers/mcp-echo-server/mcp-echo-server-config.json +2 -2
  9. package/out/tsc/workers-registry/acp-worker/src/acp/content-mapper.test.d.ts +1 -0
  10. package/out/tsc/workers-registry/acp-worker/src/acp/tools.test.d.ts +1 -0
  11. package/out/tsc/workers-registry/acp-worker/src/agent.test.d.ts +1 -0
  12. package/out/tsc/workers-registry/acp-worker/src/index.d.ts +2 -0
  13. package/out/tsc/workers-registry/acp-worker/src/mcp/manager.test.d.ts +1 -0
  14. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/config/config.property.test.d.ts +1 -0
  15. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/config/config.test.d.ts +1 -0
  16. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/log.test.d.ts +10 -0
  17. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/registry/index.property.test.d.ts +1 -0
  18. package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/registry/types.d.ts +1 -1
  19. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/router/message-router.property.test.d.ts +1 -0
  20. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/runtime/manager.property.test.d.ts +1 -0
  21. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/runtime/manager.test.d.ts +1 -0
  22. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/stream/ndjson-handler.property.test.d.ts +1 -0
  23. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/stream/ndjson-handler.test.d.ts +1 -0
  24. package/out/tsc/workers-registry/acp-worker/src/session/session.test.d.ts +1 -0
  25. package/out/tsc/workers-registry/acp-worker/tests/integration/acp.test.d.ts +1 -0
  26. package/out/tsc/workers-registry/acp-worker/tests/integration/error-scenarios.test.d.ts +1 -0
  27. package/out/tsc/workers-registry/acp-worker/tests/integration/mcp.test.d.ts +1 -0
  28. package/out/tsc/workers-registry/acp-worker/tests/integration/registry-launcher.test.d.ts +1 -0
  29. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/connection.property.d.ts +1 -0
  30. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/connection.test.d.ts +1 -0
  31. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/converter.property.d.ts +1 -0
  32. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/converter.test.d.ts +1 -0
  33. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/index.test.d.ts +1 -0
  34. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/integration.property.d.ts +1 -0
  35. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/integration.test.d.ts +1 -0
  36. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/state.property.d.ts +1 -0
  37. package/out/tsc/workers-registry/acp-worker/tests/mcp-proxy/state.test.d.ts +1 -0
  38. package/out/tsc/workers-registry/acp-worker/tests/spec-validation/echo-worker-roundtrip.test.d.ts +1 -0
  39. package/out/tsc/workers-registry/acp-worker/tests/spec-validation/echo-worker-sessionid.test.d.ts +1 -0
  40. package/out/tsc/workers-registry/acp-worker/tests/spec-validation/ndjson-client-roundtrip.test.d.ts +1 -0
  41. package/out/tsc/workers-registry/acp-worker/tests/spec-validation/rfc2119.test.d.ts +1 -0
  42. package/out/tsc/workers-registry/index.d.ts +4 -0
  43. package/package.json +11 -8
  44. package/out/dist/workers/launcher/index.js +0 -4
  45. package/out/dist/workers/launcher/index.js.map +0 -7
  46. /package/out/tsc/{workers → workers-registry}/acp-worker/src/acp/client-capabilities.d.ts +0 -0
  47. /package/out/tsc/{workers/acp-worker/src/index.d.ts → workers-registry/acp-worker/src/acp/client-capabilities.test.d.ts} +0 -0
  48. /package/out/tsc/{workers → workers-registry}/acp-worker/src/acp/content-mapper.d.ts +0 -0
  49. /package/out/tsc/{workers → workers-registry}/acp-worker/src/acp/index.d.ts +0 -0
  50. /package/out/tsc/{workers → workers-registry}/acp-worker/src/acp/tools.d.ts +0 -0
  51. /package/out/tsc/{workers → workers-registry}/acp-worker/src/agent.d.ts +0 -0
  52. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp/connection.d.ts +0 -0
  53. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp/index.d.ts +0 -0
  54. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp/manager.d.ts +0 -0
  55. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp/types.d.ts +0 -0
  56. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp-proxy/connection.d.ts +0 -0
  57. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp-proxy/converter.d.ts +0 -0
  58. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp-proxy/index.d.ts +0 -0
  59. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp-proxy/state.d.ts +0 -0
  60. /package/out/tsc/{workers → workers-registry}/acp-worker/src/mcp-proxy/types.d.ts +0 -0
  61. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/config/api-keys.d.ts +0 -0
  62. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/config/config.d.ts +0 -0
  63. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/config/index.d.ts +0 -0
  64. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/config/types.d.ts +0 -0
  65. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/index.d.ts +0 -0
  66. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/log.d.ts +0 -0
  67. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/registry/index.d.ts +0 -0
  68. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/registry/resolver.d.ts +0 -0
  69. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/router/index.d.ts +0 -0
  70. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/router/message-router.d.ts +0 -0
  71. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/runtime/agent-runtime.d.ts +0 -0
  72. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/runtime/index.d.ts +0 -0
  73. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/runtime/manager.d.ts +0 -0
  74. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/runtime/types.d.ts +0 -0
  75. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/stream/index.d.ts +0 -0
  76. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/stream/ndjson-handler.d.ts +0 -0
  77. /package/out/tsc/{workers → workers-registry}/acp-worker/src/registry-launcher/test-utils/index.d.ts +0 -0
  78. /package/out/tsc/{workers → workers-registry}/acp-worker/src/session/index.d.ts +0 -0
  79. /package/out/tsc/{workers → workers-registry}/acp-worker/src/session/manager.d.ts +0 -0
  80. /package/out/tsc/{workers → workers-registry}/acp-worker/src/session/session.d.ts +0 -0
  81. /package/out/tsc/{workers → workers-registry}/acp-worker/src/session/types.d.ts +0 -0
  82. /package/out/tsc/{workers → workers-registry}/acp-worker/src/test-utils/test-harness.d.ts +0 -0
  83. /package/out/tsc/{workers → workers-registry}/launcher/index.d.ts +0 -0
  84. /package/out/tsc/{workers/mcp-echo-server/mcp-echo-server.d.ts → workers-registry/mcp-echo-server/index.d.ts} +0 -0
package/README.md CHANGED
@@ -87,18 +87,6 @@ Workers Registry (this repo)
87
87
 
88
88
  ## Package API
89
89
 
90
- ### Binary Commands
91
-
92
- After installation, the following commands are available:
93
-
94
- ```bash
95
- stdiobus-acp-worker # ACP Worker
96
- stdiobus-registry-launcher # Registry Launcher
97
- stdiobus-mcp-to-acp-proxy # MCP-to-ACP Proxy
98
- stdiobus-echo-worker # Echo Worker
99
- stdiobus-mcp-echo-server # MCP Echo Server
100
- ```
101
-
102
90
  ### Module Imports
103
91
 
104
92
  ```javascript
@@ -483,7 +471,7 @@ npm run build
483
471
 
484
472
  **Run:**
485
473
  ```bash
486
- node workers-registry/mcp-echo-server/dist/mcp-echo-server.js
474
+ node workers-registry/mcp-echo-server/dist/index.js
487
475
  ```
488
476
 
489
477
  ---
package/index.js ADDED
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * Universal Worker Launcher
4
+ *
5
+ * Usage:
6
+ * stdiobus-worker <worker-name>
7
+ * node index.js <worker-name>
8
+ *
9
+ * Examples:
10
+ * stdiobus-worker launcher
11
+ * stdiobus-worker acp-worker
12
+ * stdiobus-worker echo-worker
13
+ */
14
+
15
+ import { fileURLToPath } from 'url';
16
+ import { dirname, join } from 'path';
17
+
18
+ const __filename = fileURLToPath(import.meta.url);
19
+ const __dirname = dirname(__filename);
20
+
21
+ const workerName = process.argv[2];
22
+
23
+ if (!workerName) {
24
+ console.error('Usage: stdiobus-worker <worker-name>');
25
+ console.error('Available workers: launcher, acp-worker, echo-worker, mcp-echo-server, mcp-to-acp-proxy');
26
+ process.exit(1);
27
+ }
28
+
29
+ // Map worker names to their entry points
30
+ const workers = {
31
+ 'launcher': './out/dist/workers/launcher/index.js',
32
+ 'acp-worker': './out/dist/workers/acp-worker/index.js',
33
+ 'echo-worker': './out/dist/workers/echo-worker/echo-worker.js',
34
+ 'mcp-echo-server': './out/dist/workers/mcp-echo-server/index.js',
35
+ 'mcp-to-acp-proxy': './out/dist/workers/mcp-to-acp-proxy/proxy.js',
36
+ 'acp-registry': './out/dist/workers/acp-registry/registry-launcher-client.js',
37
+ };
38
+
39
+ const workerPath = workers[workerName];
40
+
41
+ if (!workerPath) {
42
+ console.error(`Unknown worker: ${workerName}`);
43
+ console.error('Available workers:', Object.keys(workers).join(', '));
44
+ process.exit(1);
45
+ }
46
+
47
+ // Import and run the worker
48
+ const fullPath = join(__dirname, workerPath);
49
+ await import(fullPath);
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{fileURLToPath}from"url";import{dirname,join}from"path";import{readFile}from"fs/promises";var __filename=fileURLToPath(import.meta.url);var __dirname=dirname(__filename);var WORKERS={"acp-worker":{path:"../out/dist/workers/acp-worker/index.js",description:"Full ACP protocol implementation with MCP integration"},"acp-registry":{path:"../out/dist/workers/acp-registry/registry-launcher-client.js",description:"Registry Launcher for ACP Registry agents"},"echo-worker":{path:"../out/dist/workers/echo-worker/echo-worker.js",description:"Simple echo worker for testing NDJSON protocol"},"mcp-echo-server":{path:"../out/dist/workers/mcp-echo-server/index.js",description:"MCP server example for testing"},"mcp-to-acp-proxy":{path:"../out/dist/workers/mcp-to-acp-proxy/proxy.js",description:"MCP-to-ACP protocol bridge"}};function showUsage(){console.error("Usage: node index.js <worker-name>");console.error("");console.error("Available workers:");for(const[name,config]of Object.entries(WORKERS)){console.error(` - ${name.padEnd(20)} ${config.description}`)}console.error("");console.error("Examples:");console.error(" node index.js acp-worker");console.error(" node index.js echo-worker");console.error(" node index.js mcp-echo-server")}function isValidWorkerName(name){return name in WORKERS}async function main(){const workerName=process.argv[2];if(!workerName){console.error("Error: Worker name is required\n");showUsage();process.exit(1)}if(!isValidWorkerName(workerName)){console.error(`Error: Unknown worker "${workerName}"
3
+ `);showUsage();process.exit(1)}const workerConfig=WORKERS[workerName];const workerPath=workerConfig.path;const absolutePath=join(__dirname,workerPath);try{await readFile(absolutePath);console.error(`[launcher] Starting worker: ${workerName}`);console.error(`[launcher] Description: ${workerConfig.description}`);console.error(`[launcher] Path: ${absolutePath}`);await import(absolutePath)}catch(error){if(error&&typeof error==="object"&&"code"in error&&error.code==="ENOENT"){console.error(`Error: Worker file not found: ${absolutePath}`);console.error("");console.error('Please run "npm run build" first to compile the workers.');process.exit(1)}const errorMessage=error instanceof Error?error.message:String(error);const errorStack=error instanceof Error?error.stack:void 0;console.error(`Error loading worker "${workerName}":`,errorMessage);if(errorStack){console.error(errorStack)}process.exit(1)}}main().catch(error=>{console.error("Fatal error:",error);process.exit(1)});
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../workers-registry/launcher/index.ts"],
4
+ "sourcesContent": ["#!/usr/bin/env node\n\n/*\n * Apache License 2.0\n * Copyright (c) 2025\u2013present Raman Marozau, Target Insight Function.\n * Contact: raman@worktif.com\n *\n * This file is part of the stdio bus protocol reference implementation:\n * stdio_bus_kernel_workers (target: <target_stdio_bus_kernel_workers>).\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Universal worker launcher for stdio Bus Workers Registry\n * \n * Usage:\n * node index.js <worker-name>\n * node index.js acp-worker\n * node index.js echo-worker\n * node index.js mcp-echo-server\n * \n * This script dynamically imports and runs the specified worker from the compiled output.\n */\n\nimport { fileURLToPath } from 'url';\nimport { dirname, join } from 'path';\nimport { readFile } from 'fs/promises';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Worker configuration mapping worker names to their entry points\n */\ninterface WorkerConfig {\n readonly path: string;\n readonly description: string;\n}\n\n/**\n * Available workers mapping\n */\nconst WORKERS: Readonly<Record<string, WorkerConfig>> = {\n 'acp-worker': {\n path: '../out/dist/workers/acp-worker/index.js',\n description: 'Full ACP protocol implementation with MCP integration'\n },\n 'acp-registry': {\n path: '../out/dist/workers/acp-registry/registry-launcher-client.js',\n description: 'Registry Launcher for ACP Registry agents'\n },\n 'echo-worker': {\n path: '../out/dist/workers/echo-worker/echo-worker.js',\n description: 'Simple echo worker for testing NDJSON protocol'\n },\n 'mcp-echo-server': {\n path: '../out/dist/workers/mcp-echo-server/index.js',\n description: 'MCP server example for testing'\n },\n 'mcp-to-acp-proxy': {\n path: '../out/dist/workers/mcp-to-acp-proxy/proxy.js',\n description: 'MCP-to-ACP protocol bridge'\n }\n} as const;\n\n/**\n * Worker name type\n */\ntype WorkerName = keyof typeof WORKERS;\n\n/**\n * Display usage information\n */\nfunction showUsage(): void {\n console.error('Usage: node index.js <worker-name>');\n console.error('');\n console.error('Available workers:');\n\n for (const [name, config] of Object.entries(WORKERS)) {\n console.error(` - ${name.padEnd(20)} ${config.description}`);\n }\n\n console.error('');\n console.error('Examples:');\n console.error(' node index.js acp-worker');\n console.error(' node index.js echo-worker');\n console.error(' node index.js mcp-echo-server');\n}\n\n/**\n * Validate worker name\n */\nfunction isValidWorkerName(name: string): name is WorkerName {\n return name in WORKERS;\n}\n\n/**\n * Main entry point\n */\nasync function main(): Promise<void> {\n const workerName = process.argv[2];\n\n // Check if worker name is provided\n if (!workerName) {\n console.error('Error: Worker name is required\\n');\n showUsage();\n process.exit(1);\n }\n\n // Check if worker exists\n if (!isValidWorkerName(workerName)) {\n console.error(`Error: Unknown worker \"${workerName}\"\\n`);\n showUsage();\n process.exit(1);\n }\n\n const workerConfig = WORKERS[workerName];\n const workerPath = workerConfig.path;\n\n // Resolve absolute path\n const absolutePath = join(__dirname, workerPath);\n\n try {\n // Verify the worker file exists\n await readFile(absolutePath);\n\n // Import and run the worker\n console.error(`[launcher] Starting worker: ${workerName}`);\n console.error(`[launcher] Description: ${workerConfig.description}`);\n console.error(`[launcher] Path: ${absolutePath}`);\n\n await import(absolutePath);\n } catch (error) {\n if (error && typeof error === 'object' && 'code' in error && error.code === 'ENOENT') {\n console.error(`Error: Worker file not found: ${absolutePath}`);\n console.error('');\n console.error('Please run \"npm run build\" first to compile the workers.');\n process.exit(1);\n }\n\n const errorMessage = error instanceof Error ? error.message : String(error);\n const errorStack = error instanceof Error ? error.stack : undefined;\n\n console.error(`Error loading worker \"${workerName}\":`, errorMessage);\n if (errorStack) {\n console.error(errorStack);\n }\n process.exit(1);\n }\n}\n\n// Run main function\nmain().catch((error) => {\n console.error('Fatal error:', error);\n process.exit(1);\n});\n"],
5
+ "mappings": ";AAqCA,OAAS,kBAAqB,MAC9B,OAAS,QAAS,SAAY,OAC9B,OAAS,aAAgB,cAEzB,IAAM,WAAa,cAAc,YAAY,GAAG,EAChD,IAAM,UAAY,QAAQ,UAAU,EAapC,IAAM,QAAkD,CACtD,aAAc,CACZ,KAAM,0CACN,YAAa,uDACf,EACA,eAAgB,CACd,KAAM,+DACN,YAAa,2CACf,EACA,cAAe,CACb,KAAM,iDACN,YAAa,gDACf,EACA,kBAAmB,CACjB,KAAM,+CACN,YAAa,gCACf,EACA,mBAAoB,CAClB,KAAM,gDACN,YAAa,4BACf,CACF,EAUA,SAAS,WAAkB,CACzB,QAAQ,MAAM,oCAAoC,EAClD,QAAQ,MAAM,EAAE,EAChB,QAAQ,MAAM,oBAAoB,EAElC,SAAW,CAAC,KAAM,MAAM,IAAK,OAAO,QAAQ,OAAO,EAAG,CACpD,QAAQ,MAAM,OAAO,KAAK,OAAO,EAAE,CAAC,IAAI,OAAO,WAAW,EAAE,CAC9D,CAEA,QAAQ,MAAM,EAAE,EAChB,QAAQ,MAAM,WAAW,EACzB,QAAQ,MAAM,4BAA4B,EAC1C,QAAQ,MAAM,6BAA6B,EAC3C,QAAQ,MAAM,iCAAiC,CACjD,CAKA,SAAS,kBAAkB,KAAkC,CAC3D,OAAO,QAAQ,OACjB,CAKA,eAAe,MAAsB,CACnC,MAAM,WAAa,QAAQ,KAAK,CAAC,EAGjC,GAAI,CAAC,WAAY,CACf,QAAQ,MAAM,kCAAkC,EAChD,UAAU,EACV,QAAQ,KAAK,CAAC,CAChB,CAGA,GAAI,CAAC,kBAAkB,UAAU,EAAG,CAClC,QAAQ,MAAM,0BAA0B,UAAU;AAAA,CAAK,EACvD,UAAU,EACV,QAAQ,KAAK,CAAC,CAChB,CAEA,MAAM,aAAe,QAAQ,UAAU,EACvC,MAAM,WAAa,aAAa,KAGhC,MAAM,aAAe,KAAK,UAAW,UAAU,EAE/C,GAAI,CAEF,MAAM,SAAS,YAAY,EAG3B,QAAQ,MAAM,+BAA+B,UAAU,EAAE,EACzD,QAAQ,MAAM,2BAA2B,aAAa,WAAW,EAAE,EACnE,QAAQ,MAAM,oBAAoB,YAAY,EAAE,EAEhD,MAAM,OAAO,aACf,OAAS,MAAO,CACd,GAAI,OAAS,OAAO,QAAU,UAAY,SAAU,OAAS,MAAM,OAAS,SAAU,CACpF,QAAQ,MAAM,iCAAiC,YAAY,EAAE,EAC7D,QAAQ,MAAM,EAAE,EAChB,QAAQ,MAAM,0DAA0D,EACxE,QAAQ,KAAK,CAAC,CAChB,CAEA,MAAM,aAAe,iBAAiB,MAAQ,MAAM,QAAU,OAAO,KAAK,EAC1E,MAAM,WAAa,iBAAiB,MAAQ,MAAM,MAAQ,OAE1D,QAAQ,MAAM,yBAAyB,UAAU,KAAM,YAAY,EACnE,GAAI,WAAY,CACd,QAAQ,MAAM,UAAU,CAC1B,CACA,QAAQ,KAAK,CAAC,CAChB,CACF,CAGA,KAAK,EAAE,MAAO,OAAU,CACtB,QAAQ,MAAM,eAAgB,KAAK,EACnC,QAAQ,KAAK,CAAC,CAChB,CAAC",
6
+ "names": []
7
+ }