-
Notifications
You must be signed in to change notification settings - Fork 1
Fix Relayfile mount packaging and active integration events #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d3b3bb7
Fix relayfile mount launcher packaging
334d821
chore: apply pr-reviewer fixes for #114
agent-relay-code[bot] e68de19
Fix active integration event subscriptions
a050ed1
Subscribe integration events before local mounts
8bcf95b
chore: apply pr-reviewer fixes for #114
agent-relay-code[bot] 6620cee
Seed integration context on agent spawn
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/main/__tests__/relayfile-mount-launcher-import.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import { readFile } from 'node:fs/promises' | ||
| import { dirname, join } from 'node:path' | ||
| import { fileURLToPath } from 'node:url' | ||
| import test from 'node:test' | ||
| import assert from 'node:assert/strict' | ||
|
|
||
| const __dirname = dirname(fileURLToPath(import.meta.url)) | ||
| const launcherPath = join(__dirname, '..', 'relayfile-mount-launcher.ts') | ||
| const packageJsonPath = join(__dirname, '..', '..', '..', 'package.json') | ||
| const installScriptPath = join(__dirname, '..', '..', '..', 'scripts', 'install-relayfile-mount.mjs') | ||
|
|
||
| test('relayfile mount launcher imports the launcher from the SDK launcher entrypoint', async () => { | ||
| const source = await readFile(launcherPath, 'utf8') | ||
|
|
||
| assert.match( | ||
| source, | ||
| /from ['"]@relayfile\/sdk\/mount-launcher['"]/, | ||
| 'createDefaultMountLauncher must come from @relayfile/sdk/mount-launcher' | ||
| ) | ||
| assert.doesNotMatch( | ||
| source, | ||
| /createDefaultMountLauncher[\s\S]*from ['"]@relayfile\/sdk['"]/, | ||
| 'the root @relayfile/sdk export does not expose createDefaultMountLauncher at runtime' | ||
| ) | ||
| }) | ||
|
|
||
| test('mac release scripts install relayfile-mount from release assets only', async () => { | ||
| const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf8')) as { | ||
| scripts: Record<string, string> | ||
| } | ||
| const installScript = await readFile(installScriptPath, 'utf8') | ||
|
|
||
| assert.equal( | ||
| packageJson.scripts['relayfile-mount:install:release'], | ||
| 'node scripts/install-relayfile-mount.mjs --release' | ||
| ) | ||
| for (const scriptName of ['dist:mac', 'release:mac']) { | ||
| const script = packageJson.scripts[scriptName] | ||
| assert.match(script, /relayfile-mount:install:release/) | ||
| assert.match(script, /RELAYFILE_MOUNT_INSTALL_SOURCE=release npm run build/) | ||
| } | ||
| assert.match(installScript, /const releaseMode = /) | ||
| assert.match( | ||
| installScript, | ||
| /if \(releaseMode\) \{[\s\S]*?await downloadRelease\(version\)[\s\S]*?process\.exit\(0\)/ | ||
| ) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Switching post-ready handling from notify to refresh suppresses integration system messages for newly ready agents, which leaves persona spawns without integration context.
Prompt for AI agents