@mohsinonxrm/pptb-fetchxml-studio 1.2.2-beta.2 → 1.2.3-beta.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/CHANGELOG.md CHANGED
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### ✨ Added
11
+
12
+ #### Tool-to-Tool (T2T) — capability-based tool discovery
13
+
14
+ The "Send to Tool" target list is now populated automatically via the PPTB capability registry instead of a manually maintained list. Requires **`@pptb/types` ≥ 1.2.3-beta.0** and a host that exposes capability discovery.
15
+
16
+ - **Automatic discovery** — FetchXML Studio calls `toolboxAPI.invocation.findToolsByCapability("fetchxml")` to find installed tools that declare the `fetchxml` capability, excludes itself, and lists them in the Send to Tool button (single button for one match, dropdown for several). Hidden when no matches or when the host lacks discovery — feature-detected at runtime, so older hosts degrade gracefully.
17
+ - **One-way send** — Launches now pass `noReturn: true`, the dedicated flag for the "Send To" pattern, which suppresses the callee's "Return to [Caller]" banner since FXS isn't waiting for data back.
18
+
19
+ ### 🔧 Changed
20
+
21
+ - **Removed the manual "Tool Integration" settings.** The Settings → Tool Integration section and the `targetTools` display setting are gone; discovery replaces them entirely.
22
+
23
+ ### 🏗️ Technical
24
+
25
+ - Bumped `@pptb/types` `1.2.2-beta.1` → `1.2.3-beta.0`, which now types `invocation.findToolsByCapability` / `getKnownCapabilityTags`, the `capabilities` field on `InvocationConfig`, the `CapabilityTag`/`KnownCapabilityTag` types, and `launchTool`'s `noReturn` option. Removed the local `InvocationAPI` interface in `invocation.ts` in favor of the now-published host types.
26
+ - `src/features/fetchxml/api/invocation.ts` — Added `DiscoveredTool` + `discoverFetchXmlTools()` (feature-detected; filters out our own id; defaults `name` to `id`); added `noReturn: true` to `sendFetchXmlToTool`.
27
+ - `src/shared/hooks/useSendToTools.ts` — New hook; discovers send targets once on mount.
28
+ - `src/app/AppShell.tsx` — Uses `useSendToTools`; Send to Tool slot now gated on `isT2TSupported() && sendToTools.length > 0`.
29
+ - `src/features/fetchxml/ui/Toolbar/SendToToolButton.tsx` — Prop changed from `targetTools: string[]` to `tools: DiscoveredTool[]`; labels use the discovered tool name.
30
+ - `src/features/fetchxml/ui/Settings/SettingsDrawer.tsx` — Removed the Tool Integration section, its handlers/state/styles, and now-unused imports.
31
+ - `src/features/fetchxml/model/displaySettings.ts` — Removed `targetTools` from `DisplaySettings` and the defaults.
32
+
10
33
  ## [1.2.2-beta.2] - 2026-06-16
11
34
 
12
35
  ### ✨ Added
package/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  A powerful, modern FetchXML query builder and data explorer for [Power Platform ToolBox](https://github.com/PowerPlatformToolBox/desktop-app). Inspired by the XrmToolBox FetchXML Builder, reimagined with React 18, Fluent UI v9, and seamless Dataverse integration.
4
4
 
5
- ![Version](https://img.shields.io/badge/version-1.2.2--beta.1-orange)
5
+ ![Version](https://img.shields.io/badge/version-1.2.3--beta.1-orange)
6
6
  ![React](https://img.shields.io/badge/React-18-61DAFB?logo=react)
7
7
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178C6?logo=typescript)
8
8
  ![Fluent UI](https://img.shields.io/badge/Fluent%20UI-v9-0078D4?logo=microsoft)
9
- ![PPTB Types](https://img.shields.io/badge/%40pptb%2Ftypes-1.2.2--beta.1-orange)
9
+ ![PPTB Types](https://img.shields.io/badge/%40pptb%2Ftypes-1.2.3--beta.0-orange)
10
10
 
11
11
  ## ✨ Features
12
12
 
@@ -64,8 +64,8 @@ A powerful, modern FetchXML query builder and data explorer for [Power Platform
64
64
  - **Advanced Find Only toggle** — When on (default), limits entities and attributes to those marked `IsValidForAdvancedFind = true`. Disable to access all entities including system and developer tables. Filter is applied locally — toggling is instant with no additional API call.
65
65
 
66
66
  ### � Tool-to-Tool (T2T) Integration
67
- - **Send to Tool button** — Launch any other PPTB tool directly from FetchXML Studio, pre-loading it with the current FetchXML query and active Dataverse connection. Appears automatically when running on PPTB host ≥ 1.2.2.
68
- - **Multi-tool picker** — Configure one or more target tools in Settings → Tool Integration. When multiple tools are configured, the button shows a dropdown menu.
67
+ - **Send to Tool button** — Launch another PPTB tool directly from FetchXML Studio, pre-loading it with the current FetchXML query and active Dataverse connection (one-way handoff).
68
+ - **Automatic tool discovery** — Targets are discovered via the PPTB capability registry — installed tools that declare the `fetchxml` capability. A single match shows one button; several show a dropdown picker. No configuration needed.
69
69
  - **Active connection forwarding** — The active Dataverse connection is forwarded automatically so the target tool opens against the same environment.
70
70
  - **Inbound prefill** — FetchXML Studio also accepts incoming T2T invocations from other tools (see [Callee Contract](#-callee-contract-pptbconfigjson) below).
71
71
 
@@ -291,15 +291,15 @@ const result = await window.toolboxAPI.invocation.launchTool(
291
291
  const editedFetchXml = (result as { fetchXml?: string } | null)?.fetchXml;
292
292
  ```
293
293
 
294
- ### Configuring outbound targets (Send to Tool)
294
+ ### Sending a query to another tool (Send to Tool)
295
295
 
296
- To send FetchXML Studio queries *to* another tool:
296
+ FetchXML Studio discovers send targets automatically — no configuration needed. It calls the host capability registry (`toolboxAPI.invocation.findToolsByCapability("fetchxml")`) to find installed tools that declare the `fetchxml` capability in their own `pptb.config.json`, and lists them in a **Send to Tool** button (a single button for one match, a dropdown picker for several). The button is hidden when no other `fetchxml`-capable tools are installed, or on hosts that don't support capability discovery.
297
297
 
298
- 1. Open **Settings** (⚙ icon in the toolbar)
299
- 2. Scroll to **Tool Integration**
300
- 3. Enter the target tool's npm package ID (e.g. `@linked365/pptb-bulk-data-studio`) and click **Add**
298
+ The launch is one-way (`noReturn: true`) — FetchXML Studio hands the current query off and does not wait for data back. Any tool that wants to appear here only needs to declare:
301
299
 
302
- The "Send to Tool" button will appear in the toolbar. Multiple tools show a dropdown picker.
300
+ ```json
301
+ { "invocation": { "version": "1.0.0", "capabilities": ["fetchxml"], "prefill": { "properties": { "fetchXml": { "type": "string" } } } } }
302
+ ```
303
303
 
304
304
  ---
305
305