sdlc-agent-4-enterprise-server 1.55.1 → 1.55.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.
Files changed (97) hide show
  1. package/.kiro/agents/prompts/ba-agent.md +4 -4
  2. package/.kiro/agents/prompts/sa-agent.md +3 -3
  3. package/.kiro/agents/prompts/sm-agent.md +23 -22
  4. package/.kiro/agents/prompts/ta-agent.md +1 -1
  5. package/.kiro/agents/prompts/ui-agent.md +2 -2
  6. package/.kiro/agents/sm-agent.md +22 -21
  7. package/.kiro/agents/ui-agent.md +2 -2
  8. package/Dockerfile +28 -14
  9. package/README.md +5 -1
  10. package/dist/config/ContentProxy.d.ts +34 -0
  11. package/dist/config/ContentProxy.js +36 -0
  12. package/dist/config/ContentProxy.js.map +1 -0
  13. package/dist/modules/orchestration/McpClientManager.d.ts +12 -0
  14. package/dist/modules/orchestration/McpClientManager.js +47 -3
  15. package/dist/modules/orchestration/McpClientManager.js.map +1 -1
  16. package/dist/modules/orchestration/ProxiedToolRegistry.d.ts +9 -0
  17. package/dist/modules/orchestration/ProxiedToolRegistry.js +21 -3
  18. package/dist/modules/orchestration/ProxiedToolRegistry.js.map +1 -1
  19. package/dist/modules/orchestration/content-proxy/artifact-name.d.ts +10 -0
  20. package/dist/modules/orchestration/content-proxy/artifact-name.js +36 -0
  21. package/dist/modules/orchestration/content-proxy/artifact-name.js.map +1 -0
  22. package/dist/modules/orchestration/content-proxy/artifact-source.d.ts +30 -0
  23. package/dist/modules/orchestration/content-proxy/artifact-source.js +168 -0
  24. package/dist/modules/orchestration/content-proxy/artifact-source.js.map +1 -0
  25. package/dist/modules/orchestration/content-proxy/detect.d.ts +19 -0
  26. package/dist/modules/orchestration/content-proxy/detect.js +60 -0
  27. package/dist/modules/orchestration/content-proxy/detect.js.map +1 -0
  28. package/dist/modules/orchestration/content-proxy/invocation-adapter.d.ts +10 -0
  29. package/dist/modules/orchestration/content-proxy/invocation-adapter.js +52 -0
  30. package/dist/modules/orchestration/content-proxy/invocation-adapter.js.map +1 -0
  31. package/dist/modules/orchestration/content-proxy/result-adapter.d.ts +22 -0
  32. package/dist/modules/orchestration/content-proxy/result-adapter.js +131 -0
  33. package/dist/modules/orchestration/content-proxy/result-adapter.js.map +1 -0
  34. package/dist/modules/orchestration/content-proxy/schema-adapter.d.ts +13 -0
  35. package/dist/modules/orchestration/content-proxy/schema-adapter.js +45 -0
  36. package/dist/modules/orchestration/content-proxy/schema-adapter.js.map +1 -0
  37. package/dist/modules/orchestration/content-proxy/types.d.ts +21 -0
  38. package/dist/modules/orchestration/content-proxy/types.js +6 -0
  39. package/dist/modules/orchestration/content-proxy/types.js.map +1 -0
  40. package/eslint.config.js +9 -0
  41. package/package.json +1 -1
  42. package/src/config/ContentProxy.ts +52 -0
  43. package/src/modules/orchestration/McpClientManager.ts +45 -3
  44. package/src/modules/orchestration/ProxiedToolRegistry.ts +24 -3
  45. package/src/modules/orchestration/__tests__/McpClientManager.content-proxy.test.ts +132 -0
  46. package/src/modules/orchestration/content-proxy/__tests__/content-proxy.remote.test.ts +75 -0
  47. package/src/modules/orchestration/content-proxy/__tests__/content-proxy.test.ts +157 -0
  48. package/src/modules/orchestration/content-proxy/artifact-name.ts +39 -0
  49. package/src/modules/orchestration/content-proxy/artifact-source.ts +176 -0
  50. package/src/modules/orchestration/content-proxy/detect.ts +79 -0
  51. package/src/modules/orchestration/content-proxy/invocation-adapter.ts +57 -0
  52. package/src/modules/orchestration/content-proxy/result-adapter.ts +150 -0
  53. package/src/modules/orchestration/content-proxy/schema-adapter.ts +52 -0
  54. package/src/modules/orchestration/content-proxy/types.ts +23 -0
  55. package/tests/e2e/admin-api.auth.e2e.test.ts +80 -0
  56. package/tests/e2e/admin-api.config.e2e.test.ts +96 -0
  57. package/tests/e2e/admin-api.fixtures.ts +74 -0
  58. package/tests/e2e/admin-api.kb.e2e.test.ts +174 -0
  59. package/tests/e2e/admin-api.mcp-profile.e2e.test.ts +122 -0
  60. package/tests/e2e/admin-api.rbac.e2e.test.ts +105 -0
  61. package/tests/e2e/admin-api.unauth.e2e.test.ts +44 -0
  62. package/tests/e2e/admin-api.users-audit.e2e.test.ts +150 -0
  63. package/tests/e2e/admin-ui.audit-graph-profile.ui.test.ts +94 -0
  64. package/tests/e2e/admin-ui.config-search.ui.test.ts +79 -0
  65. package/tests/e2e/admin-ui.dashboard-nav.ui.test.ts +76 -0
  66. package/tests/e2e/admin-ui.fixtures.ts +31 -0
  67. package/tests/e2e/admin-ui.kb-mcp.ui.test.ts +116 -0
  68. package/tests/e2e/admin-ui.login.ui.test.ts +42 -0
  69. package/tests/e2e/admin-ui.multitab-logout.ui.test.ts +116 -0
  70. package/tests/e2e/admin-ui.quality-tags.ui.test.ts +81 -0
  71. package/tests/e2e/admin-ui.rbac-users.ui.test.ts +133 -0
  72. package/tests/e2e/mcp-api.health-tools.e2e.test.ts +85 -0
  73. package/tests/e2e/mcp-api.helpers.ts +79 -0
  74. package/tests/e2e/mcp-api.lifecycle.e2e.test.ts +58 -0
  75. package/tests/e2e/mcp-api.tool-call.e2e.test.ts +135 -0
  76. package/tests/e2e/multi-tenant.endpoint-permissions.e2e.test.ts +99 -0
  77. package/tests/e2e/multi-tenant.fixtures.ts +180 -0
  78. package/tests/e2e/multi-tenant.isolation-audit.e2e.test.ts +94 -0
  79. package/tests/e2e/multi-tenant.roledata.e2e.test.ts +78 -0
  80. package/tests/e2e/multi-tenant.setup.e2e.test.ts +187 -0
  81. package/tests/integration/auth.dual-token.test.ts +74 -0
  82. package/tests/integration/auth.lifecycle.test.ts +150 -0
  83. package/tests/integration/auth.users.test.ts +196 -0
  84. package/tests/integration/helpers.ts +81 -0
  85. package/tests/integration/mcp-tools.catalog.test.ts +156 -0
  86. package/tests/integration/mcp-tools.execution.test.ts +151 -0
  87. package/tests/integration/reindex.fixtures.ts +71 -0
  88. package/tests/integration/reindex.integrity.it.test.ts +79 -0
  89. package/tests/integration/reindex.isolation.it.test.ts +92 -0
  90. package/tests/integration/reindex.lifecycle.it.test.ts +73 -0
  91. package/tests/e2e/admin-api.e2e.test.ts +0 -704
  92. package/tests/e2e/admin-ui.e2e.test.ts +0 -702
  93. package/tests/e2e/mcp-api.e2e.test.ts +0 -311
  94. package/tests/e2e/multi-tenant.e2e.test.ts +0 -440
  95. package/tests/integration/auth.test.ts +0 -413
  96. package/tests/integration/mcp-tools.test.ts +0 -312
  97. package/tests/integration/reindex.it.test.ts +0 -260
@@ -285,9 +285,9 @@ After creating ALL `.drawio` files, you MUST export each one to PNG using the dr
285
285
 
286
286
  **CRITICAL — This step MUST be executed. Do NOT skip it.**
287
287
 
288
- **Flow: embed_images → export_docx(file_path=...)**
288
+ **Flow: embed_image → execute_dynamic_tool(toolName="export_docx", arguments={file_path=...})**
289
289
 
290
- 1. Call `embed_images` tool (via `execute_dynamic_tool`) to create self-contained markdown:
290
+ 1. Call `embed_image` tool (via `execute_dynamic_tool`) to create self-contained markdown:
291
291
  - `file_path`: absolute path to `documents/{TICKET-KEY}/BRD.md`
292
292
  - `output_path`: absolute path to `documents/{TICKET-KEY}/BRD-embedded.md`
293
293
  - This replaces all `![](diagrams/...)` with inline base64 data URIs
@@ -412,9 +412,9 @@ Verify all PNGs exist after export. Embed PNGs in FSD.
412
412
 
413
413
  **CRITICAL — This step MUST be executed. Do NOT skip it.**
414
414
 
415
- **Flow: embed_images → export_docx(file_path=...)**
415
+ **Flow: embed_image → execute_dynamic_tool(toolName="export_docx", arguments={file_path=...})**
416
416
 
417
- 1. Call `embed_images` tool (via `execute_dynamic_tool`) to create self-contained markdown:
417
+ 1. Call `embed_image` tool (via `execute_dynamic_tool`) to create self-contained markdown:
418
418
  - `file_path`: absolute path to `documents/{TICKET-KEY}/FSD.md`
419
419
  - `output_path`: absolute path to `documents/{TICKET-KEY}/FSD-embedded.md`
420
420
  2. Call `export_docx` tool (via `execute_dynamic_tool`) with **file_path**:
@@ -296,13 +296,13 @@ Create draw.io XML diagrams and export to PNG:
296
296
 
297
297
  **After completing TDD.md, you MUST export to DOCX using our tools:**
298
298
 
299
- 1. Call `embed_images` tool to create self-contained markdown:
299
+ 1. Call `embed_image` tool to create self-contained markdown:
300
300
  ```
301
- embed_images(file_path="C:/projects/.../documents/{TICKET-KEY}/TDD.md", output_path="C:/projects/.../documents/{TICKET-KEY}/TDD-embedded.md")
301
+ embed_image(file_path="C:/projects/.../documents/{TICKET-KEY}/TDD.md", output_path="C:/projects/.../documents/{TICKET-KEY}/TDD-embedded.md")
302
302
  ```
303
303
  2. Call `export_docx` via `execute_dynamic_tool` with file_path (NOT content):
304
304
  ```
305
- export_docx(file_path="C:/projects/.../documents/{TICKET-KEY}/TDD-embedded.md", file_name="TDD-v{VERSION}-{TICKET-KEY}")
305
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="C:/projects/.../documents/{TICKET-KEY}/TDD-embedded.md", file_name="TDD-v{VERSION}-{TICKET-KEY}"})
306
306
  ```
307
307
  3. Copy exported DOCX to `documents/{TICKET-KEY}/TDD-v{VERSION}-{TICKET-KEY}.docx`
308
308
  4. Delete temp `TDD-embedded.md` file
@@ -98,9 +98,9 @@ After discovery, log:
98
98
  ### Quy trình attach (áp dụng cho mọi document):
99
99
 
100
100
  ```
101
- 1. embed_images(file_path="documents/{TICKET}/{DOC}.md", output_path="documents/{TICKET}/{DOC}-embedded.md")
102
- 2. export_docx(file_path="documents/{TICKET}/{DOC}-embedded.md", file_name="{DOC}-v{version}-{TICKET}")
103
- 3. jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/{DOC}-v{version}-{TICKET}.docx")
101
+ 1. embed_image(file_path="documents/{TICKET}/{DOC}.md", output_path="documents/{TICKET}/{DOC}-embedded.md")
102
+ 2. execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/{DOC}-embedded.md", file_name="{DOC}-v{version}-{TICKET}"})
103
+ 3. jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/{DOC}-v{version}-{TICKET}.docx")
104
104
  ```
105
105
 
106
106
  ### Timing:
@@ -625,12 +625,12 @@ invokeSubAgent(
625
625
  5. Update STATUS: `requirements.status = "done"`, `requirements.version = 1`
626
626
  6. **Attach BRD to Jira** (MANDATORY — attach ngay sau khi phase hoàn thành):
627
627
  ```
628
- // Export DOCX: embed_images → export_docx
629
- embed_images(file_path="documents/{TICKET}/BRD.md", output_path="documents/{TICKET}/BRD-embedded.md")
630
- export_docx(file_path="documents/{TICKET}/BRD-embedded.md", file_name="BRD-v1-{TICKET}")
628
+ // Export DOCX: embed_image → export_docx
629
+ embed_image(file_path="documents/{TICKET}/BRD.md", output_path="documents/{TICKET}/BRD-embedded.md")
630
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/BRD-embedded.md", file_name="BRD-v1-{TICKET}"})
631
631
 
632
632
  // Attach to Jira
633
- jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/BRD-v1-{TICKET}.docx")
633
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/BRD-v1-{TICKET}.docx")
634
634
  ```
635
635
  7. Report: "✅ Phase 1 done — BRD.md created & attached to Jira. Chuyển sang Phase 2 (Specification)?"
636
636
  8. Wait for user confirmation.
@@ -682,12 +682,12 @@ invokeSubAgent(
682
682
  7. Update STATUS: `specification.status = "done"`, `specification.version = 1`
683
683
  8. **Attach FSD to Jira** (MANDATORY — attach ngay sau khi phase hoàn thành):
684
684
  ```
685
- // Export DOCX: embed_images → export_docx
686
- embed_images(file_path="documents/{TICKET}/FSD.md", output_path="documents/{TICKET}/FSD-embedded.md")
687
- export_docx(file_path="documents/{TICKET}/FSD-embedded.md", file_name="FSD-v1-{TICKET}")
685
+ // Export DOCX: embed_image → export_docx
686
+ embed_image(file_path="documents/{TICKET}/FSD.md", output_path="documents/{TICKET}/FSD-embedded.md")
687
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/FSD-embedded.md", file_name="FSD-v1-{TICKET}"})
688
688
 
689
689
  // Attach to Jira
690
- jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/FSD-v1-{TICKET}.docx")
690
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/FSD-v1-{TICKET}.docx")
691
691
  ```
692
692
  9. Report:
693
693
  ```
@@ -717,7 +717,7 @@ invokeSubAgent(
717
717
  name: "ui-agent",
718
718
  prompt: "{TICKET} — Phase 2.5: Tạo wireframes (draw.io) + UI-SPEC.md cho tất cả screens.
719
719
  Đọc FSD.md để xác định screens. Export PNG từ drawio. Embed images vào UI-SPEC.md.
720
- ⛔ PHẢI có hình trong UI-SPEC.md (dùng embed_images tool sau khi viết xong)."
720
+ ⛔ PHẢI có hình trong UI-SPEC.md (dùng embed_image tool sau khi viết xong)."
721
721
  )
722
722
  ```
723
723
  - Verify: `documents/{TICKET}/UI-SPEC.md` exists, `diagrams/ui-*.drawio` files exist
@@ -746,12 +746,12 @@ invokeSubAgent(
746
746
  6. If no discrepancy → Update STATUS: `design.status = "done"`
747
747
  7. **Attach TDD to Jira** (MANDATORY — attach ngay sau khi phase hoàn thành):
748
748
  ```
749
- // Export DOCX: embed_images → export_docx
750
- embed_images(file_path="documents/{TICKET}/TDD.md", output_path="documents/{TICKET}/TDD-embedded.md")
751
- export_docx(file_path="documents/{TICKET}/TDD-embedded.md", file_name="TDD-v1-{TICKET}")
749
+ // Export DOCX: embed_image → export_docx
750
+ embed_image(file_path="documents/{TICKET}/TDD.md", output_path="documents/{TICKET}/TDD-embedded.md")
751
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/TDD-embedded.md", file_name="TDD-v1-{TICKET}"})
752
752
 
753
753
  // Attach to Jira
754
- jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/TDD-v1-{TICKET}.docx")
754
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/TDD-v1-{TICKET}.docx")
755
755
  ```
756
756
  8. **Verify diagrams exist** (MANDATORY):
757
757
  - Check `documents/{TICKET}/diagrams/` directory exists and has `.drawio` + `.png` files
@@ -903,14 +903,15 @@ If review found issues:
903
903
  2. Update STATUS: `test_planning.review = "approved"` (hoặc "approved_with_conditions")
904
904
  3. **Attach STP/STC to Jira** (MANDATORY — attach ngay sau khi phase hoàn thành):
905
905
  ```
906
- // Export DOCX: embed_images → export_docx
907
- embed_images(file_path="documents/{TICKET}/STP.md", output_path="documents/{TICKET}/STP-embedded.md")
908
- export_docx(file_path="documents/{TICKET}/STP-embedded.md", file_name="STP-v1-{TICKET}")
909
- embed_images(file_path="documents/{TICKET}/STC.md", output_path="documents/{TICKET}/STC-embedded.md")
910
- export_docx(file_path="documents/{TICKET}/STC-embedded.md", file_name="STC-v1-{TICKET}")
906
+ // Export DOCX: embed_image → export_docx
907
+ embed_image(file_path="documents/{TICKET}/STP.md", output_path="documents/{TICKET}/STP-embedded.md")
908
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/STP-embedded.md", file_name="STP-v1-{TICKET}"})
909
+ embed_image(file_path="documents/{TICKET}/STC.md", output_path="documents/{TICKET}/STC-embedded.md")
910
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/STC-embedded.md", file_name="STC-v1-{TICKET}"})
911
911
 
912
912
  // Attach to Jira
913
- jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/STP-v1-{TICKET}.docx,documents/{TICKET}/STC-v1-{TICKET}.docx")
913
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/STP-v1-{TICKET}.docx")
914
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/STC-v1-{TICKET}.docx")
914
915
  ```
915
916
  4. Report:
916
917
  ```
@@ -260,7 +260,7 @@ Before delivering the FSD, verify:
260
260
 
261
261
  **After completing the FSD, you MUST export to DOCX format.**
262
262
 
263
- 1. Use `embed_images` tool to create a self-contained markdown (images as base64):
263
+ 1. Use `embed_image` tool to create a self-contained markdown (images as base64):
264
264
  - `file_path`: absolute path to FSD.md
265
265
  - `output_path`: absolute path to FSD-embedded.md (temp file)
266
266
  2. Use the discovered **DOCX export tool** (query: "convert markdown to docx") to export:
@@ -257,8 +257,8 @@ After creating UI-SPEC.md with wireframe references:
257
257
 
258
258
  1. Use **relative paths** for all images: `![Screen Name](diagrams/ui-{screen-name}.png)`
259
259
  2. **⛔ KHÔNG embed base64** vào UI-SPEC.md — chỉ dùng relative paths
260
- 3. `embed_images` tool CHỈ được gọi khi cần **export DOCX** (vì DOCX tool không có filesystem access)
261
- 4. Workflow export DOCX: copy file → embed_images (tạo bản tạm có base64) → export_docx → xóa bản tạm
260
+ 3. `embed_image` tool CHỈ được gọi khi cần **export DOCX** (vì DOCX tool không có filesystem access)
261
+ 4. Workflow export DOCX: copy file → embed_image (tạo bản tạm có base64) → export_docx → xóa bản tạm
262
262
 
263
263
  ### Step 7: Update FSD with UI Artifacts
264
264
 
@@ -110,9 +110,9 @@ After discovery, log:
110
110
  ### Quy trình attach (áp dụng cho mọi document):
111
111
 
112
112
  ```
113
- 1. embed_images(file_path="documents/{TICKET}/{DOC}.md", output_path="documents/{TICKET}/{DOC}-embedded.md")
114
- 2. export_docx(file_path="documents/{TICKET}/{DOC}-embedded.md", file_name="{DOC}-v{version}-{TICKET}")
115
- 3. jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/{DOC}-v{version}-{TICKET}.docx")
113
+ 1. embed_image(file_path="documents/{TICKET}/{DOC}.md", output_path="documents/{TICKET}/{DOC}-embedded.md")
114
+ 2. execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/{DOC}-embedded.md", file_name="{DOC}-v{version}-{TICKET}"})
115
+ 3. jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/{DOC}-v{version}-{TICKET}.docx")
116
116
  ```
117
117
 
118
118
  ### Timing:
@@ -642,12 +642,12 @@ invokeSubAgent(
642
642
  5. Update STATUS: `requirements.status = "done"`, `requirements.version = 1`
643
643
  6. **Attach BRD to Jira** (MANDATORY — attach ngay sau khi phase hoàn thành):
644
644
  ```
645
- // Export DOCX: embed_images → export_docx
646
- embed_images(file_path="documents/{TICKET}/BRD.md", output_path="documents/{TICKET}/BRD-embedded.md")
647
- export_docx(file_path="documents/{TICKET}/BRD-embedded.md", file_name="BRD-v1-{TICKET}")
645
+ // Export DOCX: embed_image → export_docx
646
+ embed_image(file_path="documents/{TICKET}/BRD.md", output_path="documents/{TICKET}/BRD-embedded.md")
647
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/BRD-embedded.md", file_name="BRD-v1-{TICKET}"})
648
648
 
649
649
  // Attach to Jira
650
- jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/BRD-v1-{TICKET}.docx")
650
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/BRD-v1-{TICKET}.docx")
651
651
  ```
652
652
  7. Report: "✅ Phase 1 done — BRD.md created & attached to Jira. Chuyển sang Phase 2 (Specification)?"
653
653
  8. Wait for user confirmation.
@@ -699,12 +699,12 @@ invokeSubAgent(
699
699
  7. Update STATUS: `specification.status = "done"`, `specification.version = 1`
700
700
  8. **Attach FSD to Jira** (MANDATORY — attach ngay sau khi phase hoàn thành):
701
701
  ```
702
- // Export DOCX: embed_images → export_docx
703
- embed_images(file_path="documents/{TICKET}/FSD.md", output_path="documents/{TICKET}/FSD-embedded.md")
704
- export_docx(file_path="documents/{TICKET}/FSD-embedded.md", file_name="FSD-v1-{TICKET}")
702
+ // Export DOCX: embed_image → export_docx
703
+ embed_image(file_path="documents/{TICKET}/FSD.md", output_path="documents/{TICKET}/FSD-embedded.md")
704
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/FSD-embedded.md", file_name="FSD-v1-{TICKET}"})
705
705
 
706
706
  // Attach to Jira
707
- jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/FSD-v1-{TICKET}.docx")
707
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/FSD-v1-{TICKET}.docx")
708
708
  ```
709
709
  9. Report:
710
710
  ```
@@ -736,12 +736,12 @@ invokeSubAgent(
736
736
  6. If no discrepancy → Update STATUS: `design.status = "done"`
737
737
  7. **Attach TDD to Jira** (MANDATORY — attach ngay sau khi phase hoàn thành):
738
738
  ```
739
- // Export DOCX: embed_images → export_docx
740
- embed_images(file_path="documents/{TICKET}/TDD.md", output_path="documents/{TICKET}/TDD-embedded.md")
741
- export_docx(file_path="documents/{TICKET}/TDD-embedded.md", file_name="TDD-v1-{TICKET}")
739
+ // Export DOCX: embed_image → export_docx
740
+ embed_image(file_path="documents/{TICKET}/TDD.md", output_path="documents/{TICKET}/TDD-embedded.md")
741
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/TDD-embedded.md", file_name="TDD-v1-{TICKET}"})
742
742
 
743
743
  // Attach to Jira
744
- jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/TDD-v1-{TICKET}.docx")
744
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/TDD-v1-{TICKET}.docx")
745
745
  ```
746
746
  8. **Verify diagrams exist** (MANDATORY):
747
747
  - Check `documents/{TICKET}/diagrams/` directory exists and has `.drawio` + `.png` files
@@ -893,14 +893,15 @@ If review found issues:
893
893
  2. Update STATUS: `test_planning.review = "approved"` (hoặc "approved_with_conditions")
894
894
  3. **Attach STP/STC to Jira** (MANDATORY — attach ngay sau khi phase hoàn thành):
895
895
  ```
896
- // Export DOCX: embed_images → export_docx
897
- embed_images(file_path="documents/{TICKET}/STP.md", output_path="documents/{TICKET}/STP-embedded.md")
898
- export_docx(file_path="documents/{TICKET}/STP-embedded.md", file_name="STP-v1-{TICKET}")
899
- embed_images(file_path="documents/{TICKET}/STC.md", output_path="documents/{TICKET}/STC-embedded.md")
900
- export_docx(file_path="documents/{TICKET}/STC-embedded.md", file_name="STC-v1-{TICKET}")
896
+ // Export DOCX: embed_image → export_docx
897
+ embed_image(file_path="documents/{TICKET}/STP.md", output_path="documents/{TICKET}/STP-embedded.md")
898
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/STP-embedded.md", file_name="STP-v1-{TICKET}"})
899
+ embed_image(file_path="documents/{TICKET}/STC.md", output_path="documents/{TICKET}/STC-embedded.md")
900
+ execute_dynamic_tool(toolName="export_docx", arguments={file_path="documents/{TICKET}/STC-embedded.md", file_name="STC-v1-{TICKET}"})
901
901
 
902
902
  // Attach to Jira
903
- jira_update_issue(issue_key: "{TICKET}", fields: "{}", attachments: "documents/{TICKET}/STP-v1-{TICKET}.docx,documents/{TICKET}/STC-v1-{TICKET}.docx")
903
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/STP-v1-{TICKET}.docx")
904
+ jira_attach_file(issue_key: "{TICKET}", file_path: "documents/{TICKET}/STC-v1-{TICKET}.docx")
904
905
  ```
905
906
  4. Report:
906
907
  ```
@@ -259,8 +259,8 @@ After creating UI-SPEC.md with wireframe references:
259
259
 
260
260
  1. Use **relative paths** for all images: `![Screen Name](diagrams/ui-{screen-name}.png)`
261
261
  2. **⛔ KHÔNG embed base64** vào UI-SPEC.md — chỉ dùng relative paths
262
- 3. `embed_images` tool CHỈ được gọi khi cần **export DOCX** (vì DOCX tool không có filesystem access)
263
- 4. Workflow export DOCX: copy file → embed_images (tạo bản tạm có base64) → export_docx → xóa bản tạm
262
+ 3. `embed_image` tool CHỈ được gọi khi cần **export DOCX** (vì DOCX tool không có filesystem access)
263
+ 4. Workflow export DOCX: copy file → embed_image (tạo bản tạm có base64) → export_docx → xóa bản tạm
264
264
 
265
265
  ### Step 7: Update FSD with UI Artifacts
266
266
 
package/Dockerfile CHANGED
@@ -117,6 +117,16 @@ ARG MARKDOWN_EXPORTER_MCP_REF=1429b6a94767a709f7f5119219ca5951042d9d3c
117
117
  # versions). Drop the override once the pinned base image bundles a fixed
118
118
  # setuptools.
119
119
  ARG SETUPTOOLS_VERSION=84.0.0
120
+ # SA4E-360 follow-up (continued, v1.55.3): Trivy 2026-10-23 flags BOTH venvs —
121
+ # - certifi 2026.7.22 (pulled via requests): GHSA-6q48-6c7w-9gw2 CRITICAL
122
+ # (compromised emSign intermediate CA keys), fix 2026.10.19
123
+ # - pillow 12.3.0: 55 CVEs (CRITICAL+HIGH, e.g. CVE-2026-112393/112403/112900,
124
+ # fixes in 13.0.0) — markitdown[all] pulls pillow into BOTH venvs
125
+ # Force-upgrade both to fixed versions after the main install; the
126
+ # pillow~=12.1.1 upstream-pin conflict warning stays EXPECTED and non-fatal
127
+ # (same PEP 440 pattern documented below). Probes fail the build on drift.
128
+ ARG CERTIFI_VERSION=2026.10.19
129
+ ARG PILLOW_VERSION=13.0.0
120
130
  # `python3` already exists in base (build toolchain); only the venv/ensurepip
121
131
  # support is missing. One venv per server: independent dependency trees that
122
132
  # are pinned, upgraded and Trivy-scanned separately.
@@ -130,30 +140,31 @@ RUN python3 -m venv /opt/markitdown-venv \
130
140
  && /opt/markitdown-venv/bin/python -c "import markitdown_mcp" \
131
141
  && /opt/markitdown-venv/bin/pip install --no-cache-dir "setuptools==${SETUPTOOLS_VERSION}" \
132
142
  && /opt/markitdown-venv/bin/python -c "from importlib.metadata import version; assert version('setuptools') == '${SETUPTOOLS_VERSION}'" \
143
+ && /opt/markitdown-venv/bin/pip install --no-cache-dir "certifi==${CERTIFI_VERSION}" "pillow==${PILLOW_VERSION}" \
144
+ && /opt/markitdown-venv/bin/python -c "from importlib.metadata import version; assert version('certifi') == '${CERTIFI_VERSION}' and version('pillow') == '${PILLOW_VERSION}'" \
133
145
  && /opt/markitdown-venv/bin/python -m pip uninstall -y pip
134
146
  # `mcp<2` constraint: upstream declares `mcp>=1.27.0` (unbounded) but its code
135
147
  # imports `mcp.server.fastmcp` — an API REMOVED in mcp 2.x (FastMCP → MCPServer).
136
148
  # The import probe below fails the build on exactly this class of drift
137
149
  # (verified: unconstrained pip resolved mcp 2.3.0 → ModuleNotFoundError).
138
- # `pillow==12.3.0` override (SA4E-360): upstream pins `pillow~=12.1.1`, which
139
- # resolves to 12.1.1 — carrying 16 HIGH CVEs that fail the production Trivy
140
- # gate. PEP 440 `~=12.1.1` means >=12.1.1,<12.2, so it does NOT admit the
141
- # fixed 12.3.0 (which markitdown-venv already runs on the same Python 3.11
142
- # base). The force-upgrade AFTER the main install therefore triggers a pip
143
- # metadata conflict warning ("markdown-exporter-mcp-local 0.1.0 requires
144
- # pillow~=12.1.1 ... incompatible") — EXPECTED and non-fatal: pip installs
145
- # the requested version and exits 0. Trivy reads the installed 12.3.0
146
- # metadata, clearing all 16 CVEs. The PIL version probe fails the build if
147
- # resolution ever regresses to 12.1.1. Remove this override once upstream
148
- # releases an officially fixed pin (e.g. pillow~=12.3).
150
+ # `pillow` override (SA4E-360, bumped v1.55.3 to 13.0.0): upstream pins
151
+ # `pillow~=12.1.1`, which resolves to 12.1.1 — carrying HIGH CVEs that fail the
152
+ # production Trivy gate. PEP 440 `~=12.1.1` means >=12.1.1,<12.2, so it does
153
+ # NOT admit the fixed 12.3.0/13.0.0. The force-upgrade AFTER the main install
154
+ # therefore triggers a pip metadata conflict warning ("markdown-exporter-mcp-local
155
+ # 0.1.0 requires pillow~=12.1.1 ... incompatible") — EXPECTED and non-fatal:
156
+ # pip installs the requested version and exits 0. Trivy reads the installed
157
+ # version's metadata, clearing the CVEs. The importlib.metadata probe fails the
158
+ # build if resolution ever regresses. Remove this override once upstream
159
+ # releases an officially fixed pin (e.g. pillow~=13).
149
160
  RUN python3 -m venv /opt/markdown-exporter-venv \
150
161
  && /opt/markdown-exporter-venv/bin/pip install --no-cache-dir \
151
162
  "markdown-exporter-mcp-local @ git+https://github.com/Zac-Chen-2001/markdown-exporter-mcp-local@${MARKDOWN_EXPORTER_MCP_REF}" \
152
163
  "mcp>=1.27.0,<2.0.0" \
153
164
  && test -x /opt/markdown-exporter-venv/bin/markdown-exporter-mcp-local \
154
165
  && /opt/markdown-exporter-venv/bin/python -c "import markdown_exporter_mcp.server, md_exporter" \
155
- && /opt/markdown-exporter-venv/bin/pip install --no-cache-dir "pillow==12.3.0" \
156
- && /opt/markdown-exporter-venv/bin/python -c "import PIL; assert PIL.__version__ == '12.3.0'" \
166
+ && /opt/markdown-exporter-venv/bin/pip install --no-cache-dir "pillow==${PILLOW_VERSION}" "certifi==${CERTIFI_VERSION}" \
167
+ && /opt/markdown-exporter-venv/bin/python -c "from importlib.metadata import version; assert version('pillow') == '${PILLOW_VERSION}' and version('certifi') == '${CERTIFI_VERSION}'" \
157
168
  && /opt/markdown-exporter-venv/bin/pip install --no-cache-dir "setuptools==${SETUPTOOLS_VERSION}" \
158
169
  && /opt/markdown-exporter-venv/bin/python -c "from importlib.metadata import version; assert version('setuptools') == '${SETUPTOOLS_VERSION}'" \
159
170
  && /opt/markdown-exporter-venv/bin/python -m pip uninstall -y pip
@@ -236,7 +247,10 @@ ENV PYTHONUNBUFFERED=1
236
247
  RUN groupadd -g 1001 sa4e \
237
248
  && useradd -u 1001 -g sa4e -r -s /usr/sbin/nologin sa4e \
238
249
  && mkdir -p /app/.code-intel \
239
- && chown -R sa4e:sa4e /app
250
+ && chown -R sa4e:sa4e /app \
251
+ && mkdir -p /home/sa4e \
252
+ && chmod -R 777 /home/sa4e
253
+
240
254
  USER sa4e
241
255
 
242
256
  ENV NODE_ENV=production
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  </p>
7
7
 
8
8
  <p align="center">
9
- <img src="https://img.shields.io/badge/version-1.54.0-blue?style=for-the-badge" alt="Version">
9
+ <img src="https://img.shields.io/badge/version-1.55.3-blue?style=for-the-badge" alt="Version">
10
10
  <img src="https://img.shields.io/badge/tools-66+-teal?style=for-the-badge" alt="Tools">
11
11
  <img src="https://img.shields.io/badge/node-%3E%3D18-green?style=for-the-badge" alt="Node">
12
12
  </p>
@@ -233,6 +233,10 @@ The embedding model is expected at `.code-intel/models/model.onnx`. Download it:
233
233
 
234
234
  | Version | Date | Ticket | Changes |
235
235
  |---------|------|--------|---------|
236
+ | 1.55.3 | 2026-10-23 | SA4E-380 | Content Proxy for child MCP tools — backend `content-proxy/` layer: convention detection + overrides, in-place schema adaptation, invocation adaptation (strict base64), transport-agnostic artifact retrieval (25 MB cap), multi-file `outputs[]`, host-path stripping; zero new tools. Extension output-proxy fail-loud. Backend content-proxy tests 21/21; live 6/6 exporters. Docs: BRD/FSD/TDD/STP/STC/SECURITY-REVIEW (F-01 binding). |
237
+ | 1.55.2 | 2026-10-23 | SA4E-369 | Fix: Pega config save reverts to default — `updatePegaConfig` uses new dotted keys (`pega.endpoint`, `pega.username`); `WORKSPACE_SCOPED_KEYS` + tests updated. |
238
+ | 1.55.1 | 2026-10-23 | SA4E-369 | Unified config reads — ALL reads via `getSetting` (zero direct `config.get`); one-time migration runner; runtime fallback removed. 3,247/3,247 pass. |
239
+ | 1.55.0 | 2026-10-23 | SA4E-369 | Config keys standardization — 42 settings dot notation, 21 keys renamed + 2 new (`pega.appName/appVersion`); auto-migration. |
236
240
  | 1.54.0 | 2026-10-21 | SA4E-369/370/373/374/375 | PeerBus release (agent-to-agent messaging), 77 extension test failures fixed, ide_launch DevToolsActivePort fix, backend test alignment (SA4E-374 SRP + SA4E-375 deterministic projectId/auto-upsert), CI fully GREEN (3,330 backend + 3,224 extension tests). |
237
241
  | 1.53.0 | 2026-10-15 | SA4E-360 | Version sync with extension release v1.53.0 (Multi-Resolution Context Supply P1 — skeleton + agentic loading, UAT-verified; backend runtime unchanged).
238
242
  | 1.48.0 | 2026-10-10 | SA4E-341 | Version sync (E2E testing framework delivered in standalone `e2e/` package — no backend runtime changes). Also includes SA4E-335 DB-layer 6 bugfixes (memoized id-column check, literal-safe placeholder translation, identifier quoting SQLi guard, safeExec SQLSTATE filter, writable test-backend data dir), SA4E-349 auth 401 fail-loud fixes, SA4E-350 Pega '@baseclass' appliesTo passthrough fix, enrichment retry scoped via X-Project-Id + runtime settings module. |
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Content Proxy configuration — how the backend exposes child tools to the
3
+ * extension's file↔base64 wrapper without adding new tools.
4
+ *
5
+ * Convention (auto-detected, no per-tool code):
6
+ * - Tools named `export_*`, `render_*`, `generate_*` (or whose description says
7
+ * "… to PDF/DOCX/HTML/…") are file producers → their result artifacts are
8
+ * inlined as `output_base64` when invoked through the wrapper.
9
+ * - Within those tools the content argument is the first alias present
10
+ * (`markdown`, `content`, `html`, …) or the single required string argument.
11
+ *
12
+ * Overrides exist only for tools that do not follow the convention.
13
+ */
14
+ /** Tool-name prefixes whose result is a file written by the child server. */
15
+ export declare const FILE_TOOL_NAME_PREFIXES: readonly string[];
16
+ /** Description fallback: "Convert ... to PDF/DOCX/…" (target must be a file format). */
17
+ export declare const FILE_OUTPUT_DESCRIPTION: RegExp;
18
+ /** Argument names that carry document content, in priority order. */
19
+ export declare const CONTENT_PARAM_ALIASES: readonly string[];
20
+ /** Argument names that are never document content (paths, ids, metadata). */
21
+ export declare const NON_CONTENT_PARAM: RegExp;
22
+ /** Maximum artifact size inlined as base64 (mirrors the extension pre-read cap). */
23
+ export declare const MAX_ARTIFACT_BYTES: number;
24
+ /** Per-tool escape hatch for tools that defy the naming/description convention. */
25
+ export interface ContentProxyOverride {
26
+ /** Force the content argument (null = the tool has no content argument). */
27
+ contentParam?: string | null;
28
+ /** Force artifact inlining on/off. */
29
+ fileOutput?: boolean;
30
+ /** Disable the adapter entirely for this tool. */
31
+ enabled?: boolean;
32
+ }
33
+ /** Empty by default — convention detection covers every current exporter. */
34
+ export declare const CONTENT_PROXY_OVERRIDES: Record<string, ContentProxyOverride>;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Content Proxy configuration — how the backend exposes child tools to the
3
+ * extension's file↔base64 wrapper without adding new tools.
4
+ *
5
+ * Convention (auto-detected, no per-tool code):
6
+ * - Tools named `export_*`, `render_*`, `generate_*` (or whose description says
7
+ * "… to PDF/DOCX/HTML/…") are file producers → their result artifacts are
8
+ * inlined as `output_base64` when invoked through the wrapper.
9
+ * - Within those tools the content argument is the first alias present
10
+ * (`markdown`, `content`, `html`, …) or the single required string argument.
11
+ *
12
+ * Overrides exist only for tools that do not follow the convention.
13
+ */
14
+ /** Tool-name prefixes whose result is a file written by the child server. */
15
+ export const FILE_TOOL_NAME_PREFIXES = ['export_', 'render_', 'generate_'];
16
+ /** Description fallback: "Convert ... to PDF/DOCX/…" (target must be a file format). */
17
+ export const FILE_OUTPUT_DESCRIPTION = /\bto\s+(pdf|docx|html|pptx|xlsx|json|png|jpe?g|gif|svg|zip)\b/i;
18
+ /** Argument names that carry document content, in priority order. */
19
+ export const CONTENT_PARAM_ALIASES = [
20
+ 'markdown',
21
+ 'markdown_content',
22
+ 'content',
23
+ 'html',
24
+ 'xml',
25
+ 'text',
26
+ 'body',
27
+ 'source',
28
+ 'template',
29
+ ];
30
+ /** Argument names that are never document content (paths, ids, metadata). */
31
+ export const NON_CONTENT_PARAM = /^(content_base64|.*_base64|file_path|.*_path|path|url|uri|dir|.*_id|id|name|.*_name|key|.*_key|token|secret|password|mime|.*_type|type|format|mode|encoding)$/i;
32
+ /** Maximum artifact size inlined as base64 (mirrors the extension pre-read cap). */
33
+ export const MAX_ARTIFACT_BYTES = 25 * 1024 * 1024;
34
+ /** Empty by default — convention detection covers every current exporter. */
35
+ export const CONTENT_PROXY_OVERRIDES = {};
36
+ //# sourceMappingURL=ContentProxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentProxy.js","sourceRoot":"","sources":["../../src/config/ContentProxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAsB,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAE9F,wFAAwF;AACxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,gEAAgE,CAAC;AAExG,qEAAqE;AACrE,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,UAAU;IACV,kBAAkB;IAClB,SAAS;IACT,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,QAAQ;IACR,UAAU;CACX,CAAC;AAEF,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAC5B,gKAAgK,CAAC;AAEnK,oFAAoF;AACpF,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAYnD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAyC,EAAE,CAAC"}
@@ -29,6 +29,18 @@ export declare class McpClientManager {
29
29
  setReservedToolNames(names: Set<string>): void;
30
30
  ownsTool(toolName: string): boolean;
31
31
  executeTool(toolName: string, args: unknown): Promise<any>;
32
+ /**
33
+ * Execute a tool on a named child server (no registry lookup).
34
+ * Content-proxy capabilities are applied here: wrapper mode maps
35
+ * content_base64 → child content arg and inlines artifacts as output_base64.
36
+ */
37
+ executeToolOnServer(serverName: string, toolName: string, args: unknown): Promise<any>;
38
+ /**
39
+ * Fetch a resource from a child server. Works for remote (httpStream) servers
40
+ * that expose their artifacts through resources/read; servers without resource
41
+ * support simply yield null and the adapter falls back to a local read.
42
+ */
43
+ private readResourceFromClient;
32
44
  connectServer(name: string, config: ServerConfig): Promise<void>;
33
45
  disconnectServer(name: string): Promise<void>;
34
46
  shutdownAll(): Promise<void>;
@@ -11,6 +11,8 @@ import { HealthCoordinator } from './health/HealthCoordinator.js';
11
11
  import { createTransport } from './health/TransportFactory.js';
12
12
  import { McpServerConfigLoader } from './McpServerConfigLoader.js';
13
13
  import { ProxiedToolRegistry } from './ProxiedToolRegistry.js';
14
+ import { adaptInvocation } from './content-proxy/invocation-adapter.js';
15
+ import { adaptResult } from './content-proxy/result-adapter.js';
14
16
  export class McpClientManager {
15
17
  clients = new Map();
16
18
  serverConfigs = new Map();
@@ -61,15 +63,57 @@ export class McpClientManager {
61
63
  const serverName = this.toolRegistry.getOwningServer(toolName);
62
64
  if (!serverName)
63
65
  throw new Error(`Tool ${toolName} is not managed by any child server`);
66
+ return this.executeToolOnServer(serverName, toolName, args);
67
+ }
68
+ /**
69
+ * Execute a tool on a named child server (no registry lookup).
70
+ * Content-proxy capabilities are applied here: wrapper mode maps
71
+ * content_base64 → child content arg and inlines artifacts as output_base64.
72
+ */
73
+ async executeToolOnServer(serverName, toolName, args) {
64
74
  const state = this.stateTracker.getState(serverName);
65
75
  if (state !== 'connected')
66
76
  throw new Error(this.health.getErrorMsg(serverName, state));
67
77
  const client = this.clients.get(serverName);
68
78
  if (!client)
69
79
  throw new Error(`Client for server ${serverName} is disconnected`);
70
- this.logger.info({ toolName, serverName }, 'Proxying tool execution to child server');
71
- const result = await client.callTool({ name: toolName, arguments: args });
72
- return { content: result.content, isError: result.isError };
80
+ const capability = this.toolRegistry.getCapability(toolName);
81
+ const invocation = capability ? adaptInvocation(capability, args) : undefined;
82
+ if (invocation?.error) {
83
+ return { content: [{ type: 'text', text: invocation.error }], isError: true };
84
+ }
85
+ this.logger.info({ toolName, serverName, wrapperMode: invocation?.wrapperMode ?? false }, 'Proxying tool execution to child server');
86
+ const result = await client.callTool({
87
+ name: toolName,
88
+ arguments: (invocation ? invocation.args : args),
89
+ });
90
+ const raw = { content: result.content, isError: result.isError };
91
+ if (!invocation)
92
+ return raw;
93
+ return adaptResult(invocation, raw, {
94
+ serverName,
95
+ readResource: (uri) => this.readResourceFromClient(client, uri),
96
+ });
97
+ }
98
+ /**
99
+ * Fetch a resource from a child server. Works for remote (httpStream) servers
100
+ * that expose their artifacts through resources/read; servers without resource
101
+ * support simply yield null and the adapter falls back to a local read.
102
+ */
103
+ async readResourceFromClient(client, uri) {
104
+ try {
105
+ const response = await client.readResource({ uri });
106
+ for (const item of response?.contents ?? []) {
107
+ if (typeof item?.blob === 'string')
108
+ return Buffer.from(item.blob, 'base64');
109
+ if (typeof item?.text === 'string')
110
+ return Buffer.from(item.text, 'utf8');
111
+ }
112
+ }
113
+ catch {
114
+ // No resources capability or unknown URI — the adapter reports the failure.
115
+ }
116
+ return null;
73
117
  }
74
118
  async connectServer(name, config) {
75
119
  if (config.disabled || name === 'code-intelligence')
@@ -1 +1 @@
1
- {"version":3,"file":"McpClientManager.js","sourceRoot":"","sources":["../../../src/modules/orchestration/McpClientManager.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,OAAO,gBAAgB;IACnB,OAAO,GAAwB,IAAI,GAAG,EAAE,CAAC;IACzC,aAAa,GAA8B,IAAI,GAAG,EAAE,CAAC;IACrD,MAAM,CAAS;IACf,YAAY,CAAyB;IACrC,YAAY,CAAsB;IAClC,YAAY,CAAwB;IACpC,MAAM,CAAoB;IAElC,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC;QACvD,IAAI,CAAC,YAAY,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,iBAAiB,CAAC;YAClC,MAAM;YACN,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE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provided) tool names are never shadowed by child servers.
4
4
  * Extracted from McpClientManager (SA4E-223 line-count gate, <= 200 lines/file).
5
+ *
6
+ * Content proxy: file-producing child tools (`export_…` / `render_…` / `generate_…`)
7
+ * are registered with the wrapper markers (`content_base64`, `x-content-param`,
8
+ * `x-output-base64`) and their capability is kept for invocation/result adaptation.
5
9
  */
6
10
  import type { Logger } from 'pino';
7
11
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
8
12
  import type { ToolDefinition } from '../../types/tool.js';
13
+ import type { ContentCapability } from './content-proxy/types.js';
9
14
  export declare class ProxiedToolRegistry {
10
15
  private toolsToServer;
11
16
  private proxiedTools;
17
+ /** Content-proxy capability per adapted tool. */
18
+ private capabilities;
12
19
  /** Tool names provided locally by the orchestrator/registry — child servers must never shadow these. */
13
20
  private reservedToolNames;
14
21
  private logger;
@@ -19,6 +26,8 @@ export declare class ProxiedToolRegistry {
19
26
  /** Returns the child server name owning a tool, or undefined if not proxied. */
20
27
  getOwningServer(toolName: string): string | undefined;
21
28
  getProxiedTools(): ToolDefinition[];
29
+ /** Content-proxy capability for a tool, or undefined for unadapted tools. */
30
+ getCapability(toolName: string): ContentCapability | undefined;
22
31
  getToolCount(serverName: string): number;
23
32
  registerServerTools(name: string, client: Client): Promise<void>;
24
33
  clearServerTools(name: string): void;