Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
40f4ffd
Initial plan
Copilot Feb 9, 2026
190a9d6
Fix macOS notarization failures with timestamps and signing improvements
Copilot Feb 9, 2026
e840196
Apply macOS notarization fixes to nightly build workflow
Copilot Feb 9, 2026
69dd291
chore: add macOS certificate files to .gitignore
Power-Maverick Feb 9, 2026
854cc6f
Merge pull request #371 from PowerPlatformToolBox/copilot/fix-macos-n…
Power-Maverick Feb 9, 2026
bfd701d
fix: update macOS code signing verification to skip spctl assessment
Power-Maverick Feb 9, 2026
aa6e584
Merge branch 'main' into dev
Power-Maverick Feb 9, 2026
af647d5
fix: enhance macOS notarization steps to support multiple artifacts a…
Power-Maverick Feb 9, 2026
b4f1a17
fix: update notarization scripts to support multiple asset types and …
Power-Maverick Feb 9, 2026
9ba5b69
Merge branch 'main' into dev
Power-Maverick Feb 9, 2026
0a17a65
fix: update version to 1.1.3 in package.json
Power-Maverick Feb 9, 2026
47ffa9f
feat: Associate browser profile with connections - visual tags and pr…
Copilot Feb 10, 2026
9c5f70c
Add optional file type filters to saveFile with extension-based auto-…
Copilot Feb 10, 2026
2d65bf8
Signing executables for all platform (#377)
Power-Maverick Feb 11, 2026
83f2c0a
feat: Added support for Metadata CRUD operations (#356)
mohsinonxrm Feb 11, 2026
e05dd2e
Fix loading overlay positioning and add manual dismiss button (#379)
Copilot Feb 12, 2026
3d6ec9c
fix: update release date formatting in workflows for consistency (#383)
Power-Maverick Feb 12, 2026
79c6112
fix: clean up toolboxAPI type definitions and improve connection hand…
Power-Maverick Feb 12, 2026
4b27beb
feat: add getCSDLDocument API for retrieving OData endpoint (#384) (…
mohsinonxrm Feb 15, 2026
badfdcb
File System cleanup (#389)
Power-Maverick Feb 15, 2026
5d40287
fix: update force check-in timestamp in README.md
Power-Maverick Feb 16, 2026
aa7fc24
fix: calculate and log SHA256 and SHA512 hashes in release workflows
Power-Maverick Feb 16, 2026
397ef02
chore: update RELEASE_NOTES.md for version 1.1.3 with highlights and …
Power-Maverick Feb 18, 2026
55167b9
fix: update version to 1.0.20 in package.json
Power-Maverick Feb 19, 2026
e67b760
Fix Windows and macOS auto-update downloading wrong architecture inst…
Copilot Feb 19, 2026
4114d57
fix: update macOS release scripts to use ZIP artifacts instead of DMG…
Power-Maverick Feb 19, 2026
4f0e1ee
fix: add webresource to entity mapping in DataverseManager (#402)
LinkeD365 Feb 22, 2026
87d8ef9
Move marketplace to azure blob (#403)
Power-Maverick Feb 24, 2026
02949ce
fix: update version to 1.2.0 in package.json
Power-Maverick Feb 24, 2026
41fc28a
Replace native OS update dialogs with themed custom modal (#408)
Copilot Feb 24, 2026
288d006
Add global search command palette to activity bar (#409)
Copilot Feb 24, 2026
5a5eeca
Improve tool load time (#410)
Power-Maverick Feb 24, 2026
64db729
Add tool version compatibility checking with proper cache management …
Copilot Feb 27, 2026
9a33b34
fix: update permissions for publish-types jobs in release workflows
Power-Maverick Feb 27, 2026
8bbf550
fix: replace pnpm with npm for publishing @pptb/types
Power-Maverick Feb 27, 2026
b0ca541
fix: update job dependencies and version handling in release workflows
Power-Maverick Feb 27, 2026
be4252d
fix: update versioning scheme from dev to beta for insider builds
Power-Maverick Feb 27, 2026
f0bf3b0
Relationshipdefinitions setname (#415)
LinkeD365 Feb 27, 2026
02208a6
fix: add registry URL configuration for npm publishing
Power-Maverick Mar 1, 2026
dcc56e6
fix: comment out publish-types jobs in release workflows
Power-Maverick Mar 2, 2026
37cf6eb
feat: implement custom protocol handler for tool installation via ppt…
Power-Maverick Mar 2, 2026
43e0d16
Merge branch 'main' into dev
Power-Maverick Mar 2, 2026
744b6d5
feat: Show tool details as a tab instead of a modal dialog (#421)
Copilot Mar 2, 2026
eca1c82
Fix bug where Restart & Install Now does nothing (#427)
Copilot Mar 2, 2026
6d25125
fix: update launchTool and createTab functions to handle environment …
LinkeD365 Mar 3, 2026
b418297
Show browser profile badge in connection selection modals (#429)
Copilot Mar 3, 2026
1b177f5
fix: Improve CSP exception modal wording to be user-friendly (#428)
Copilot Mar 3, 2026
bb1a679
Fix: Toast notifications no longer always-on-top; add configurable di…
Copilot Mar 4, 2026
5704309
Add Category and Environment Color to Dataverse connections (#433)
Copilot Mar 4, 2026
66969dd
feat(packages): add pptb-validate CLI for pre-publish tool validation…
Copilot Mar 5, 2026
aebd2a8
feat: Allow toolmakers to explain why they need CSP exceptions with s…
Copilot Mar 5, 2026
947756a
fix: add alwaysOnTop option for auto update notification… (#437)
Power-Maverick Mar 5, 2026
5d7393b
feat: Add category filter and grouping to connection selection modals…
Copilot Mar 6, 2026
b4d7dc2
Remove Sentry monitoring and replace with centralized console logging…
Copilot Mar 7, 2026
9594165
feat: add preflight job for version validation and release notes chec…
Power-Maverick Mar 8, 2026
d3c3934
fix: update version to 1.2.0 in package.json
Power-Maverick Mar 9, 2026
9587368
handle entity collection bound action/function correctly (#445)
drivardxrm Mar 9, 2026
d1b2150
correctly handle dates in function parameters (formatFunctionParamete…
drivardxrm Mar 9, 2026
5f1b298
fix: update preflight job condition to correctly handle pull request …
Power-Maverick Mar 9, 2026
192ac6b
feat: enhance preflight checks with detailed failure comments for rel…
Power-Maverick Mar 9, 2026
b0c8d63
feat: enhance preflight checks with detailed error reporting for vers…
Power-Maverick Mar 9, 2026
b9e3041
chore: update release notes for version 1.2.0 with new highlights, fi…
Power-Maverick Mar 9, 2026
5942058
fix: update version to 1.2.1 in package.json and 1.2.1-beta.0 in pack…
Power-Maverick Mar 9, 2026
e0d8ae2
fix: adjust loading overlay window settings to avoid conflicts with s…
Power-Maverick Mar 9, 2026
6903d66
Merge branch 'main' into dev
Power-Maverick Mar 9, 2026
8dd9b1b
fix: enable protocol handling in development mode with environment va…
Power-Maverick Mar 13, 2026
9c0a58a
Add search clear buttons to sidebar search inputs #442 (#451)
cyco77 Mar 16, 2026
4a78830
Implement "What's New" feature with auto-update notification (#453)
Power-Maverick Mar 16, 2026
a382592
Feature/tab context menu (#456)
cyco77 Mar 16, 2026
38bc686
Merge branch 'main' into dev
Power-Maverick Mar 18, 2026
0b2fece
feat: Allow sharing of connection files (import/export) (#444)
Copilot Mar 18, 2026
c9b2b9a
Fix: Wrong BrowserView dimensions and connection prompt after force-r…
Copilot Mar 18, 2026
7a9cbc2
Settings opens as a tab with VSCode-style UI; adds Settings to View m…
Copilot Mar 19, 2026
a640979
feat: Import connections from XrmToolBox XML files (#463)
Copilot Mar 19, 2026
931dfe0
feat: Support US Government cloud (GCC High / DoD) Dataverse URLs (#469)
Copilot Mar 20, 2026
1e928c4
Add a Links Hub and Multi-agent Orchestration (#470)
Power-Maverick Mar 20, 2026
4907213
fix: deprecate showLoading and hideLoading methods in toolboxAPI (#475)
Power-Maverick Mar 20, 2026
6d9c18b
minor change to clarify usage of metadata api functions (#474)
OliverFlint Mar 20, 2026
dfdb468
Fix dual-connection tab colour split, swap Test/UAT env defaults, imp…
Copilot Mar 21, 2026
87524a8
Replace blocking About dialog with custom modal BrowserWindow (#477)
Copilot Mar 22, 2026
742e077
Add appearance settings for category color and environment color bord…
Copilot Mar 22, 2026
80b8103
fix: enhance dual connection handling in tool management (#483)
Power-Maverick Mar 22, 2026
b9baa9c
Add option to disable session restore on startup (#482)
Copilot Mar 22, 2026
72cad4b
fix: improve connection import handling and clean up logger imports (…
Power-Maverick Mar 25, 2026
1721ec0
Fix: Global search command palette renders behind active tool Browser…
Copilot Mar 28, 2026
d6f1e40
Fix: TypeError "Object has been destroyed" in emitModalClosed during …
Copilot Mar 28, 2026
87353dd
Rename "Important Links" to "Community Resources" with dynamic Supaba…
Copilot Mar 28, 2026
18dc4e5
feat: source selection modal for connection import (XTB vs PPTB) (#500)
Copilot Mar 29, 2026
1db8a9d
fix: update DevTools opening mode to detach for main and tool windows
Power-Maverick Mar 29, 2026
034b11e
feat: add backdrop overlay to all modal windows
Power-Maverick Mar 29, 2026
3c3ac97
fix: apply only background/blur styling to modal windows
Power-Maverick Mar 29, 2026
6f5676c
fix: render modal backdrop overlay in main renderer window
Power-Maverick Mar 29, 2026
4418353
fix: show modal backdrop immediately with correct display value
Power-Maverick Mar 29, 2026
b3f0543
chore: update release notes for version 1.2.1 with highlights, fixes,…
Power-Maverick Apr 2, 2026
6a66bf5
fix: improve formatting and organization of changelog entries for cla…
Power-Maverick Apr 2, 2026
23a7823
Fix: Tool detail page icon not adapting to dark/light theme (#510)
Copilot Apr 3, 2026
8f3492f
fix: improve empty state handling in sidebar tools by updating hint d…
Power-Maverick Apr 3, 2026
b34b1b7
feat: Add visual indicator and one-click clear to filter button when …
Copilot Apr 3, 2026
4f988bc
Pre-filter marketplace to "new tools only" when clicking the homepage…
Copilot Apr 3, 2026
6be4f45
chore(deps): bump handlebars (#512)
dependabot[bot] Apr 3, 2026
0f70f3f
chore(deps): bump lodash in the npm_and_yarn group across 1 directory…
dependabot[bot] Apr 3, 2026
e86e784
chore(deps): bump @xmldom/xmldom (#514)
dependabot[bot] Apr 3, 2026
ddd327f
introduce merge pr workflow
darkwheel Apr 3, 2026
ba46898
Release/1.2.2 into Dev (#519)
Power-Maverick Apr 6, 2026
50cf03a
fix: update version to 1.2.2 in package.json
Power-Maverick Apr 6, 2026
b07f064
fix: update version from 1.2.1-beta.0 to 1.2.1 in package.json
Power-Maverick Apr 6, 2026
2b8376d
fix: update version to 1.2.2-beta.0 in package.json
Power-Maverick Apr 6, 2026
ab91c7d
Update src/renderer/modules/browserWindowModals.ts
Power-Maverick Apr 8, 2026
d186e63
Update src/renderer/modals/updateNotification/view.ts
Power-Maverick Apr 8, 2026
fa363ee
Update src/renderer/modals/troubleshooting/view.ts
Power-Maverick Apr 8, 2026
9ed15a6
Update src/renderer/modals/toolDetail/view.ts
Power-Maverick Apr 8, 2026
fea065d
Update src/renderer/modals/about/view.ts
Power-Maverick Apr 8, 2026
8924ed6
Merge pull request #502 from PowerPlatformToolBox/add-overlay-to-modals
Power-Maverick Apr 8, 2026
f21e2cc
Initial plan
Copilot Apr 8, 2026
939ffc4
Fix Windows assembly signing: sign app binaries before packaging into…
Copilot Apr 8, 2026
b0f07e7
Initial plan
Copilot Apr 8, 2026
bd19a65
feat: add system tray icon so app is accessible when window is closed…
Copilot Apr 8, 2026
283270c
chore: clean up code structure and remove unused code blocks
Power-Maverick Apr 8, 2026
866627f
Delete .DS_Store
Power-Maverick Apr 8, 2026
c5824df
fix: update icon paths from assets/ to icons/
Copilot Apr 8, 2026
851d972
feat: support separate icons for stable and insider release channels
Copilot Apr 8, 2026
da43e3b
ci: update release workflows for stable/insider channel separation
Copilot Apr 8, 2026
73a3ff5
Refactor code structure for improved readability and maintainability
Power-Maverick Apr 9, 2026
48ed9b7
Apply suggestions from code review
Power-Maverick Apr 9, 2026
c172ff8
fix: track isQuitting flag so tray Quit fully exits app on macOS
Copilot Apr 9, 2026
56fa306
feat: restrict pptb:// protocol registration to stable channel only
Copilot Apr 10, 2026
05ee3d1
fix: cross-platform package scripts and single-instance lock for insi…
Copilot Apr 10, 2026
2592579
Merge pull request #521 from PowerPlatformToolBox/copilot/fix-macos-q…
Power-Maverick Apr 11, 2026
8f02025
Fix unpacked dir path and --dir flag for Windows signing steps
Copilot Apr 11, 2026
c054063
feat(pptb-validate): add pptb.config.json invocation validation with …
Copilot Apr 11, 2026
39bdd5e
feat(inter-tool-launch): implement all 7 parts of Inter-Tool Launch C…
Copilot Apr 11, 2026
9a5d455
fix: address code review comments (explicit null check, blank line, .…
Copilot Apr 11, 2026
9399036
docs: add plan-inter-tool-launch-context.md with accurate v3 reflecti…
Copilot Apr 13, 2026
cfd03dc
fix: rename PptbConfig→PPTBConfig and validatePptbConfig→validatePPTB…
Copilot Apr 13, 2026
5cc1e8f
[Feature]: Send version, platflorm etc automagically to feedback
LinkeD365 Apr 27, 2026
01af851
fix: improve feedback URL fallback and separate instanceId/toolId fields
Copilot Apr 27, 2026
b597e4b
[Bug]: Color/Size of update available not clear
LinkeD365 Apr 27, 2026
30dbc67
fix: apply PR review feedback - update badge icon and checkbox accent…
Copilot Apr 27, 2026
4b43126
fix: update tool update badge styling and replace image with text ind…
LinkeD365 Apr 27, 2026
5d987b6
fix: address review feedback - remove unused var, add ARIA attrs, fix…
Copilot Apr 27, 2026
4668cac
Potential fix for code scanning alert no. 21: Workflow does not conta…
darkwheel May 14, 2026
905b538
Update .github/workflows/merge-prs.yml
darkwheel May 14, 2026
91e8125
Update .github/workflows/merge-prs.yml
darkwheel May 14, 2026
0d58658
update based on copilot review
darkwheel May 14, 2026
0c70b4c
formatting
darkwheel May 14, 2026
8f86cf1
Potential fix for pull request finding
darkwheel May 14, 2026
b1b4b71
Potential fix for pull request finding
darkwheel May 14, 2026
2955ac5
Potential fix for pull request finding
darkwheel May 14, 2026
b8d02ef
Apply suggestions from code review
darkwheel May 14, 2026
ba3b102
update to fix copilot suggestions
darkwheel May 14, 2026
2cd958d
Merge pull request #535 from darkwheel/pr-518
darkwheel May 14, 2026
af9ee24
Merge pull request #523 from PowerPlatformToolBox/copilot/create-impl…
Power-Maverick May 14, 2026
db6b0fe
Add concurrency to merge PRs workflow
darkwheel May 14, 2026
eb613c0
Potential fix for pull request finding
darkwheel May 14, 2026
e5e0c5a
Apply suggestions from code review
darkwheel May 14, 2026
f22bcdd
Update merge-prs.yml
darkwheel May 14, 2026
2bf0ddb
Update workflow to combine PRs with new permissions
darkwheel May 14, 2026
057697f
Potential fix for pull request finding
darkwheel May 15, 2026
e61f967
[Feature]: Send version, platflorm etc automagically to feedback for …
LinkeD365 May 19, 2026
3202ed6
Configure concurrency for PR merge workflow
darkwheel May 19, 2026
852495b
Merge pull request #518 from PowerPlatformToolBox/merge-dependabot-prs
Power-Maverick May 19, 2026
ae9fd44
Merge pull request #520 from PowerPlatformToolBox/copilot/fix-windows…
Power-Maverick May 19, 2026
a521b43
added support for url's ending in `mcas.ms`
OliverFlint May 20, 2026
c055d83
fixed notification z-index issue
OliverFlint May 20, 2026
32a8c73
Initial plan
Copilot May 20, 2026
bc0c763
fix: address PR 531 review feedback in feedback URL diagnostics
Copilot May 20, 2026
130eae2
Merge pull request #539 from PowerPlatformToolBox/copilot/fix-comment…
LinkeD365 May 20, 2026
47d8290
[Bug]: Color/Size of update available not clear
LinkeD365 May 20, 2026
0e13514
chore: refactored file and code
Power-Maverick May 20, 2026
c3f79c7
Merge pull request #531 from PowerPlatformToolBox/LinkeD365/issue528
Power-Maverick May 21, 2026
f2fc410
Merge branch 'dev' into LinkeD365/issue524
Power-Maverick May 21, 2026
343176a
Merge pull request #537 from OliverFlint/mcas.ms-url-support
Power-Maverick May 21, 2026
d3f6a85
Merge pull request #538 from OliverFlint/notification-z-index
Power-Maverick May 21, 2026
2ba02ec
Merge branch 'dev' into release/1.2.2
Power-Maverick May 21, 2026
9b723c2
Initial plan
Copilot May 21, 2026
c673005
fix inter-tool launch and invocation error handling
Copilot May 21, 2026
33f5f0b
refine non-blocking inter-tool launch flow
Copilot May 21, 2026
0b166e6
harden invocation failure cleanup logging
Copilot May 21, 2026
60f8409
clarify fire-and-forget invocation launch handling
Copilot May 21, 2026
453a12e
Merge pull request #541 from PowerPlatformToolBox/copilot/fix-code-co…
Power-Maverick May 21, 2026
46cd349
Merge pull request #540 from PowerPlatformToolBox/release/1.2.2
Power-Maverick May 21, 2026
7c4a51e
bump version to 1.2.2-beta.1 in package.json
Power-Maverick May 21, 2026
330b045
remove deprecated loading screen API and associated handlers
Power-Maverick May 21, 2026
2a7b431
fix: address review feedback - remove stale comment, unused LoadingOv…
Copilot May 21, 2026
98a1de7
Initial plan
Copilot May 21, 2026
faba7d3
Initial plan
Copilot May 21, 2026
8a69b7c
Merge pull request #542 from PowerPlatformToolBox/bug/remove-loading-…
Power-Maverick May 21, 2026
b1c785d
feat: sync zoom level between main window and all open tool BrowserViews
Copilot May 21, 2026
0c4359e
feat: allow tools to open mailto: links with user consent
Copilot May 21, 2026
47affc5
refactor: address code review - extract helper, add URL validation, f…
Copilot May 21, 2026
d4a05fb
fix: correct zoom-in accelerator and re-fit BrowserView bounds after …
Copilot May 21, 2026
7ba3b77
chore: merge dev into branch to resolve divergence
Copilot May 21, 2026
a131b31
feat: update zoom in accelerator keys and improve window menu structure
Power-Maverick May 21, 2026
834c220
Merge pull request #543 from PowerPlatformToolBox/copilot/feature-all…
Power-Maverick May 21, 2026
9c10f97
chore: merge dev into branch and address review feedback
Copilot May 21, 2026
f1156b4
fix: improve parse-failure log message with scheme context (no PII)
Copilot May 21, 2026
ec2278d
Merge branch 'dev' into LinkeD365/issue524
Power-Maverick May 21, 2026
36c8481
fix: avoid full-url lowercase in mailto scheme checks
Copilot May 22, 2026
a26e9e1
feat: enable mock updates in development environment
Power-Maverick May 22, 2026
3655c91
Merge pull request #532 from PowerPlatformToolBox/LinkeD365/issue524
Power-Maverick May 22, 2026
f5bd91b
Merge pull request #544 from PowerPlatformToolBox/copilot/add-csp-rul…
Power-Maverick May 22, 2026
c7736b1
feat: enhance protocol handler to support single-instance lock for st…
Power-Maverick May 22, 2026
25c23d6
docs: add Inter-Tool Invocation documentation
Copilot May 22, 2026
5d4c788
docs: fix markdown escaping in parameter table
Copilot May 22, 2026
9d19c11
Merge pull request #545 from PowerPlatformToolBox/copilot/add-inter-t…
Power-Maverick May 22, 2026
651b920
feat: Open URLs in external browser using connection's browser profil…
Copilot May 24, 2026
abd8419
chore: update package version to 1.2.2 and release notes for consistency
Power-Maverick May 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
8 changes: 7 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@ SENTRY_AUTH_TOKEN=
SENTRY_ORG=your-org-slug
SENTRY_PROJECT=your-project-slug

# Azure Blob Storage Configuration
AZURE_BLOB_BASE_URL=https://yourstorageaccount.blob.core.windows.net/yourcontainer

# Capture the URL for What's New content
PPTB_UPDATES_ORIGIN=https://www.powerplatformtoolbox.com
PPTB_UPDATES_ORIGIN=https://www.powerplatformtoolbox.com

# Enable mock updates for testing (set to "true" to enable)
MOCK_UPDATES=false
303 changes: 303 additions & 0 deletions .github/plans/plan-inter-tool-launch-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
# Plan: Inter-Tool Launch Context

## Request summary

Enable tools to programmatically launch other installed tools, pass typed "prefill" data into them,
and receive a return value when the callee finishes. The feature follows the VS Code Extension Host
pattern already used for tool isolation, routing all communication through the Electron IPC bridge
so no tool ever has direct access to another tool's process.

## Goals

- Tool A can call `toolboxAPI.invocation.launchTool(targetToolId, prefillData?)` and receive back
whatever data the callee returns.
- Tool B reads caller-supplied data via `toolboxAPI.invocation.getLaunchContext()` and signals
completion via `toolboxAPI.invocation.returnData(result)`.
- If Tool B is closed before calling `returnData`, the caller receives `null` (no hang).
- Tools declare their invocation contract in an optional `pptb.config.json` (validated by
`pptb-validate` CLI) so callers know exactly what shape of data to pass and expect back.
- The existing `launchTool()` renderer entry-point is extended non-breakingly (new optional fields).

## Non-goals

- Cross-instance communication outside the launch/return lifecycle (use the Events API for that).
- Auto-closing the callee after `returnData` (the callee manages its own lifecycle).
- Schema-level runtime type checking of `prefillData` / `returnData` at IPC boundaries.

## Assumptions / Open questions

- Tools must be already installed; `launchTool` in the preload bridge looks up the tool manifest via
the existing `TOOL_CHANNELS.GET_TOOL` IPC channel.
- `callerInstanceId` is derived from the calling tool's own `toolContext.instanceId`; it is always
set when `toolboxAPI.invocation.launchTool` is called from a tool window.
- Connection IDs for the callee default to `null` when not supplied; the caller can override them
via `options.primaryConnectionId` / `options.secondaryConnectionId`.

## Acceptance criteria

- [ ] `toolboxAPI.invocation.launchTool("@scope/tool", { key: "value" })` opens the target tool,
passes the data, and returns the data supplied by `returnData()`.
- [ ] If the callee is closed without calling `returnData`, the caller's Promise resolves with `null`.
- [ ] `toolboxAPI.invocation.getLaunchContext()` returns `null` when no inter-tool context is
present (standalone tool launch).
- [ ] `toolboxAPI.invocation.returnData({...})` is a no-op when the tool was not launched by another
tool.
- [ ] `pptb-validate` validates `pptb.config.json` when present alongside `package.json`.
- [ ] `InvocationAPI` is exported from `packages/toolboxAPI.d.ts` with full JSDoc.
- [ ] `packages/README.md` has caller/callee examples and an API reference entry.
- [ ] `pnpm run typecheck`, `pnpm run lint`, and `pnpm run build` pass with 0 errors.

## Triage

Type: **High-risk**

Rationale:

- Changes span IPC channels (new handlers), the preload bridge (new surface exposed to tool
windows), and the main-process ToolWindowManager (new Promise-based invocation lifecycle).
- Any mistake in the preload bridge or IPC handler could expose unintended cross-tool data access.

## Participants (mesh)

- Product Manager (gateway)
- Data Architect (IPC schema, types)
- Tech Designer (preload bridge, ToolWindowManager lifecycle)
- App Developer (implementation)
- Code Reviewer
- Security Reviewer

## Plan (drafted by agents)

### Product Manager (Orchestrator)

- Scope confirmed: 7 implementation parts, high-risk triage, requires explicit APPROVED before coding.
- Acceptance criteria locked above.

### Data Architect

**Part 1 — `pptb.config.json` schema & validation**
- Add `packages/pptbConfig.d.ts` — TypeScript types for `PPTBConfig`, `InvocationConfig`,
`JsonSchemaObject` and `JsonSchemaProperty`.
- Update `packages/lib/validate.js` — add `validatePPTBConfig(config)` function that checks:
- `invocation.version` is required and must be a valid semver string.
- `invocation.prefill` (optional) must be a `JsonSchemaObject` with valid `properties`.
- `invocation.returnTopic` (optional) must be a `JsonSchemaObject` with valid `properties`.
- Unknown root keys emit warnings (not errors).
- Update `packages/bin/pptb-validate.js` — auto-discover `pptb.config.json` in the same directory
as `package.json` and call `validatePPTBConfig` when found; report results in the same
human-readable / `--json` output format.

**Part 2 — IPC Channels**
- Add to `TOOL_WINDOW_CHANNELS` in `src/common/ipc/channels.ts`:
- `LAUNCH_WITH_CONTEXT: "tool-window:launch-with-context"`
- `RETURN_INVOCATION_DATA: "tool-window:return-invocation-data"`

### Tech Designer

**Part 3 — Main Process: ToolWindowManager**

New private field:
```ts
private pendingInvocations: Map<
string, // calleeInstanceId
{
callerInstanceId: string;
prefillData: Record<string, unknown>;
resolve: (data: unknown) => void;
reject: (reason: unknown) => void;
}
> = new Map();
```

New / updated methods in `src/main/managers/toolWindowManager.ts`:

- `launchTool(instanceId, tool, primaryConnectionId, secondaryConnectionId, prefillData?)` —
optional 5th parameter; when `pendingInvocations` has an entry for `instanceId` the context
message (`toolbox:context`) includes `callerInstanceId` and `prefillData`.
- `launchToolWithContext(callerInstanceId, calleeInstanceId, tool, primaryConnectionId,
secondaryConnectionId, prefillData)` — stores pending invocation entry then delegates to
`launchTool`; returns a Promise resolved by `resolveInvocation`.
- `resolveInvocation(calleeInstanceId, returnData)` — pops the pending entry, sends
`toolbox:invocation-result` IPC push to the caller BrowserView (if still alive), resolves the
Promise.
- `closeTool(instanceId)` — if a pending invocation exists for this instance, resolve it with
`null` and send `toolbox:invocation-result` to the caller (prevents hang).

IPC handlers to add in `setupIpcHandlers()` / `removeIpcHandlers()` / `destroy()`:
- `LAUNCH_WITH_CONTEXT` → `launchToolWithContext(...)`
- `RETURN_INVOCATION_DATA` → `resolveInvocation(...)`

**Part 4 — Tool Preload Bridge**

Import `TOOL_CHANNELS` and `TOOL_WINDOW_CHANNELS` in `src/main/toolPreloadBridge.ts`.

New `toolboxAPI.invocation` namespace exposed via `contextBridge.exposeInMainWorld`:

```ts
invocation: {
getLaunchContext(): Promise<Record<string, unknown> | null>
returnData(returnData: Record<string, unknown>): Promise<void>
launchTool(
targetToolId: string,
prefillData?: Record<string, unknown>,
options?: { primaryConnectionId?: string | null; secondaryConnectionId?: string | null }
): Promise<unknown>
}
```

- `getLaunchContext` reads `toolContext.prefillData`; returns `null` when the field is absent,
`null`, `undefined`, or not a plain object. Uses explicit `=== null || === undefined` guard
(not truthiness check) to correctly handle empty-object `{}` prefill data.
- `returnData` invokes `RETURN_INVOCATION_DATA` with the caller's `instanceId` and the payload.
- `launchTool` fetches the target tool manifest via `TOOL_CHANNELS.GET_TOOL`, generates a callee
`instanceId` with `targetToolId-Date.now()-randomSuffix`, then calls `LAUNCH_WITH_CONTEXT`.

**Part 5 — Renderer**

`src/renderer/modules/toolManagement.ts`:
- Extend `LaunchToolOptions` with two new optional fields:
- `prefillData?: Record<string, unknown>`
- `callerInstanceId?: string`
- In `launchTool()`, when `options.callerInstanceId` is set call
`window.toolboxAPI.launchToolWithContext(callerInstanceId, instanceId, tool,
primaryConnectionId, secondaryConnectionId ?? null, options.prefillData ?? {})` instead of the
standard `launchToolWindow` path.

`src/main/preload.ts`:
- Expose `launchToolWithContext(callerInstanceId, calleeInstanceId, tool, primaryConnectionId,
secondaryConnectionId, prefillData)` → `ipcRenderer.invoke(LAUNCH_WITH_CONTEXT, ...)`.

`src/common/types/api.ts`:
- Add `launchToolWithContext(...)` to the renderer `ToolboxAPI` type.

### App Developer

*(see Execution log below)*

### Critic

- Empty-object `{}` prefill data must not be rejected by `getLaunchContext` — use explicit
`=== null || === undefined` guard, not `!prefillData`.
- Extra blank lines between method definitions in `toolWindowManager.ts` should match the
surrounding code style.
- `.DS_Store` must remain in `.gitignore`.

## Checkpoint

Status: **APPROVED**

- [x] Scope and acceptance criteria confirmed
- [x] Critic reviewed
- [x] User approved plan (required for high-risk)

---

## Execution log (only after GO/APPROVED)

### App Developer

**Part 1 — pptb.config.json schema & validation**

- `packages/pptbConfig.d.ts` — created; exports `JsonSchemaProperty`, `JsonSchemaObject`,
`InvocationConfig`, `PPTBConfig`.
- `packages/lib/validate.js` — `validatePPTBConfig(config)` added; validates `invocation.version`
(semver), `prefill` and `returnTopic` (JSON-schema objects).
- `packages/bin/pptb-validate.js` — auto-discovers `pptb.config.json` alongside `package.json`;
calls `validatePPTBConfig`; results included in human-readable and `--json` output.

**Part 2 — IPC Channels**

- `src/common/ipc/channels.ts` — `LAUNCH_WITH_CONTEXT` and `RETURN_INVOCATION_DATA` added to
`TOOL_WINDOW_CHANNELS`.

**Part 3 — ToolWindowManager**

- `pendingInvocations` private map added.
- `launchTool` signature extended with optional `prefillData` param; tool context message includes
`callerInstanceId` + `prefillData` when a pending invocation exists.
- `launchToolWithContext` method added (stores pending entry, delegates to `launchTool`, returns
Promise).
- `resolveInvocation` method added (pops pending entry, pushes `toolbox:invocation-result` to
caller BrowserView, resolves Promise).
- `closeTool` extended: if a pending invocation exists for the closing instance, resolve its
Promise with `null` and notify the caller BrowserView.
- `setupIpcHandlers` / `removeIpcHandlers` / `destroy` updated for both new channels.

**Part 4 — Tool Preload Bridge**

- `src/main/toolPreloadBridge.ts` imports `TOOL_CHANNELS` and `TOOL_WINDOW_CHANNELS`.
- `toolboxAPI.invocation` namespace added: `getLaunchContext`, `returnData`, `launchTool`.
- `getLaunchContext` uses explicit `=== null || === undefined` guard (Critic fix applied).

**Part 5 — Renderer**

- `LaunchToolOptions` extended with `prefillData` and `callerInstanceId`.
- `launchTool()` routes through `launchToolWithContext` when `callerInstanceId` is present.
- `preload.ts` exposes `launchToolWithContext` method.
- `src/common/types/api.ts` — `launchToolWithContext` added to renderer API type.

**Part 6 — Public type definitions**

- `packages/toolboxAPI.d.ts` — `InvocationAPI` interface added with full JSDoc including
caller/callee usage examples; `API` interface updated to include `invocation: InvocationAPI`.

**Part 7 — Documentation**

- `packages/README.md` — new **Inter-Tool Invocation** section added (table of contents,
caller/callee examples, `pptb.config.json` contract guidance); **Invocation** entry added to
the API Reference section.

### Code Reviewer

- Issue: `!prefillData` truthiness check rejects valid empty-object `{}`.
Fix: changed to `prefillData === null || prefillData === undefined`.
- Issue: extra blank line between `resolveInvocation` and `switchToTool` method definitions.
Fix: blank line removed.
- Issue: `.DS_Store` removed from `.gitignore` (pre-existing regression on the branch).
Fix: entry restored.
- All other review comments: no further issues raised.

### Security Reviewer

- CodeQL scan: 0 alerts.
- No new attack surface introduced: `prefillData` and `returnData` are plain JSON objects
serialised over Electron's existing IPC bridge; no new Node.js APIs are exposed to tool windows.

---

## Files changed

| File | Change |
|------|--------|
| `src/common/ipc/channels.ts` | Add `LAUNCH_WITH_CONTEXT`, `RETURN_INVOCATION_DATA` to `TOOL_WINDOW_CHANNELS` |
| `src/main/managers/toolWindowManager.ts` | `pendingInvocations` map; `launchToolWithContext`; `resolveInvocation`; `launchTool` prefill param; `closeTool` null-resolve on close |
| `src/main/toolPreloadBridge.ts` | `toolboxAPI.invocation` namespace; import `TOOL_CHANNELS`, `TOOL_WINDOW_CHANNELS` |
| `src/main/preload.ts` | Expose `launchToolWithContext` to renderer |
| `src/renderer/modules/toolManagement.ts` | Extend `LaunchToolOptions`; route through `launchToolWithContext` |
| `src/common/types/api.ts` | Add `launchToolWithContext` to renderer API type |
| `packages/toolboxAPI.d.ts` | Add `InvocationAPI` interface; update `API` interface |
| `packages/README.md` | Inter-tool invocation section + API reference entry |
| `packages/pptbConfig.d.ts` | New file — TypeScript types for `pptb.config.json` |
| `packages/lib/validate.js` | `validatePPTBConfig` function |
| `packages/bin/pptb-validate.js` | Auto-discover and validate `pptb.config.json` |
| `.gitignore` | Restored `.DS_Store` entry |

## Validation steps

- `pnpm run typecheck` — 0 errors ✅
- `pnpm run lint` — 0 errors ✅
- `pnpm run build` — succeeds ✅
- CodeQL Security Scan — 0 alerts ✅

## Risks & rollback

- **IPC handler conflicts**: new channels are added to both `setupIpcHandlers`/`removeIpcHandlers`
and `destroy`; duplicate-registration risk is mitigated by always calling `removeHandler` before
`handle`.
- **Hanging caller Promise**: mitigated by the `closeTool` null-resolve path.
- **Prefill data size**: no size limit is enforced at IPC level; very large objects could slow IPC.
Mitigated by documenting that `prefillData` should contain identifiers/configs, not large
payloads.
- **Rollback**: all changes are additive (new channels, new methods, new API namespace). The
existing `LAUNCH` channel and `launchToolWindow` path are untouched. Reverting this PR requires
only removing the new symbols; no migration is needed.
25 changes: 25 additions & 0 deletions .github/workflows/merge-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Combine PRs

on:
workflow_dispatch:

concurrency:
group: combine-prs
cancel-in-progress: false

permissions:
contents: write
pull-requests: write
checks: read

jobs:
combine-prs:
runs-on: ubuntu-latest

steps:
- name: combine-prs
id: combine-prs
uses: github/combine-prs@v5.2.0
with:
token: ${{ secrets.COMBINE_PRS_TOKEN }}
base: dev
Loading
Loading