Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
# dist/ is checked in for Git installs; it must match a fresh compile exactly.
- run: npm run check
- run: npm test
# The Swift MCP server serves the Node server's instructions and tools/list, compiled in; they must not drift.
- run: node scripts/contract.mjs --check
# Hosted consumers import the protocol and client modules off macOS.
- run: >-
node --input-type=module -e "const p = await import('@githubnext/desktop-tools/protocol');
Expand Down Expand Up @@ -46,4 +44,6 @@ jobs:
mkdir -p build/Licenses/embedder && echo kept > build/Licenses/embedder/NOTICE
node dist/build.js --out build --scratch .build/native2
test "$(cat build/Licenses/embedder/NOTICE)" = kept
# /tools exports the tool declarations in native2 (src/contract.ts); they must not drift (#237).
- run: node scripts/contract.mjs --check --scratch .build/native2
- run: swift test --package-path native2 --scratch-path .build/native2
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ anchor: '@file'
created: 2026-10-20T03:22:18Z
norm: '1'
sig: 0fd09e8458d728cc
body_hash: 78bc32d6c8786781
raw_hash: b9160a43193908ae
vouched: 2026-11-12T19:43:59Z
body_hash: dcda86289dbcff9d
raw_hash: 915eed0c4d026965
vouched: 2026-11-13T01:12:33Z
lines: 1-131
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ anchor: '@file'
created: 2026-11-02T18:28:23Z
norm: '1'
sig: 0fd09e8458d728cc
body_hash: 78bc32d6c8786781
raw_hash: b9160a43193908ae
body_hash: dcda86289dbcff9d
raw_hash: 915eed0c4d026965
vouched: 2026-11-13T01:12:33Z
lines: 1-153
---

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
id: 01M797D98JQ8Y7BHAW2XN52BAA
anchor: '@file'
created: 2026-11-13T01:12:33Z
norm: '1'
---

The contract is Swift code, not a resource file: the embedded dylib and the bundled MCP binary run from app and Ace bundles where SwiftPM's Bundle.module lookup finds no resource bundle and crashes on first use
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ anchor: '@file'
created: 2026-11-02T16:12:36Z
norm: '1'
sig: 021fb596db81e6d0
body_hash: 53e61ffa87279904
raw_hash: 80d654e5bdd9cffa
vouched: 2026-11-12T19:44:00Z
body_hash: 6c7f8b9812d0093e
raw_hash: 4bd47c6891dd8696
vouched: 2026-11-13T01:12:33Z
lines: 1-30
supersedes: 01M5R48RRWQMVESK6RVKFWF174
---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: 01M797D9876WM2MRNZ9KCCPZB6
anchor: '@file'
created: 2026-11-13T01:12:33Z
norm: '1'
supersedes: 01M50Y6C8Z15HEPT1M6B0E0E6S
---

Only the server instructions mirror githubnext/ace packages/channel/src/desktop.ts guidance; tools come from native2's ContractTools.swift through src/tools.ts, which Ace imports too
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: 01M797D97G39XZAG6X6YB9W59X
anchor: '@file'
created: 2026-11-13T01:12:33Z
norm: '1'
supersedes: 01M7975EN9Y94PY508R9YP15Y3
---

generated wrapper: the tools' text and schemas come from src/contract.ts, which npm run contract writes from native2/Sources/DesktopProtocol/ContractTools.swift; edit them there, never here
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Every change happens in a [lane](https://lane.lukeed.com/usage/), never in the m
5. `lane push`, then `gh pr create`, and squash-merge the PR.
6. In the main checkout: `git pull --ff-only`, then `lane prune --dry-run`. Prune misses lanes whose PRs were squash-merged, so remove a merged lane with `lane rm <name>`.

`npm run dev-app` builds and launches the one dev copy of the app; see docs/build.md. All native code is the Swift package in `native2/` (see `native2/README.md`); `swift test --package-path native2` runs its tests without the desktop. A tool's description and schema live in `src/tools.ts`: regenerate native2's contract with `npm run build:js && node scripts/contract.mjs` after changing them. Until #237 moves the source into Swift, make the same change in `native2/Sources/DesktopProtocol/ContractTools.swift`; `swift test` fails when the two differ.
`npm run dev-app` builds and launches the one dev copy of the app; see docs/build.md. All native code is the Swift package in `native2/` (see `native2/README.md`); `swift test --package-path native2` runs its tests without the desktop. A tool's description and schema live in `native2/Sources/DesktopProtocol/ContractTools.swift`: run `npm run contract` after changing them, which regenerates `src/contract.ts`, what embedders import as `/tools`.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Notable changes to Desktop Tools, newest first. Each release's GitHub release no

## [Unreleased]

### Changed

- Tool descriptions, schemas and the rules they share are declared in Swift, in `native2/Sources/DesktopProtocol/ContractTools.swift`, which the app's MCP server serves. `@githubnext/desktop-tools/tools` and the key and wait-condition lists in `/protocol` are generated from those declarations (`npm run contract`) and export the same values as before. `desktopRequest` no longer checks the exclusive argument forms of `desktop_clipboard_write` and `desktop_dialog_answer` itself: the host refuses them with the same text. `DESKTOP_EXPECT_OPS` lists its ops in tool order. ([#237](https://github.com/githubnext/desktop-tools/issues/237))

## [0.20.0] - 2026-11-02

### Added
Expand Down
Loading
Loading