@ethisyscore/plugin-ui 1.132.0 → 1.133.0

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.
@@ -104,6 +104,12 @@ interface TestToolMappingResult {
104
104
  * right JSON path.
105
105
  */
106
106
  rawResponseJson: string | null;
107
+ /**
108
+ * The request arguments actually sent to the tool, as a JSON string, after templates and field maps
109
+ * were applied. Optional: a host whose API does not return it simply omits it, and the editor then
110
+ * shows no "Request sent" block.
111
+ */
112
+ requestArgumentsJson?: string | null;
107
113
  /** Per-field extraction result. */
108
114
  extractedFields: TestToolMappingExtractedField[];
109
115
  }
@@ -359,8 +365,13 @@ interface ConnectorMappingTranslationEditorProps {
359
365
  * mapping" button inside it. The consumer supplies this callback so the editor never owns a
360
366
  * network call. Invoked with the sample args and the current (unsaved) field maps — stripped to
361
367
  * `null` when every input is blank, matching `onSave`.
368
+ *
369
+ * `extras` is the same optional trailing argument `onSave` takes: the DRAFT request templates and
370
+ * row fields, passed only when the host showed at least one of those sections, so a templated
371
+ * mapping can be tested before it is saved. A host that declares only the first parameter still
372
+ * compiles and simply never sees them.
362
373
  */
363
- onTestMapping?: (request: TestToolMappingRequest) => Promise<TestToolMappingResult>;
374
+ onTestMapping?: (request: TestToolMappingRequest, extras?: ConnectorMappingTranslationExtras) => Promise<TestToolMappingResult>;
364
375
  /**
365
376
  * Optional. When provided, the editor renders an "Auto-configure" button in the Test section. The
366
377
  * consumer invokes the AI suggestion endpoint with the sample inputs the Test section collects,
@@ -104,6 +104,12 @@ interface TestToolMappingResult {
104
104
  * right JSON path.
105
105
  */
106
106
  rawResponseJson: string | null;
107
+ /**
108
+ * The request arguments actually sent to the tool, as a JSON string, after templates and field maps
109
+ * were applied. Optional: a host whose API does not return it simply omits it, and the editor then
110
+ * shows no "Request sent" block.
111
+ */
112
+ requestArgumentsJson?: string | null;
107
113
  /** Per-field extraction result. */
108
114
  extractedFields: TestToolMappingExtractedField[];
109
115
  }
@@ -359,8 +365,13 @@ interface ConnectorMappingTranslationEditorProps {
359
365
  * mapping" button inside it. The consumer supplies this callback so the editor never owns a
360
366
  * network call. Invoked with the sample args and the current (unsaved) field maps — stripped to
361
367
  * `null` when every input is blank, matching `onSave`.
368
+ *
369
+ * `extras` is the same optional trailing argument `onSave` takes: the DRAFT request templates and
370
+ * row fields, passed only when the host showed at least one of those sections, so a templated
371
+ * mapping can be tested before it is saved. A host that declares only the first parameter still
372
+ * compiles and simply never sees them.
362
373
  */
363
- onTestMapping?: (request: TestToolMappingRequest) => Promise<TestToolMappingResult>;
374
+ onTestMapping?: (request: TestToolMappingRequest, extras?: ConnectorMappingTranslationExtras) => Promise<TestToolMappingResult>;
364
375
  /**
365
376
  * Optional. When provided, the editor renders an "Auto-configure" button in the Test section. The
366
377
  * consumer invokes the AI suggestion endpoint with the sample inputs the Test section collects,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethisyscore/plugin-ui",
3
- "version": "1.132.0",
3
+ "version": "1.133.0",
4
4
  "description": "Plugin-UI umbrella SDK: client bridge + a11y/l10n primitives + brokered-MCP client (WI 4858).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",