@jobshimo/browser-link 0.8.0 → 0.8.2

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.
Files changed (38) hide show
  1. package/dist/agent-instructions/content.d.ts +15 -2
  2. package/dist/agent-instructions/content.js +29 -4
  3. package/dist/agent-instructions/content.js.map +1 -1
  4. package/dist/agent-instructions/errors.d.ts +38 -0
  5. package/dist/agent-instructions/errors.js +59 -0
  6. package/dist/agent-instructions/errors.js.map +1 -0
  7. package/dist/agent-instructions/file-ops.d.ts +8 -2
  8. package/dist/agent-instructions/file-ops.js +119 -26
  9. package/dist/agent-instructions/file-ops.js.map +1 -1
  10. package/dist/agent-instructions/index.d.ts +28 -0
  11. package/dist/agent-instructions/index.js +69 -3
  12. package/dist/agent-instructions/index.js.map +1 -1
  13. package/dist/agent-instructions/types.d.ts +5 -2
  14. package/dist/bridge/server.js +30 -28
  15. package/dist/bridge/server.js.map +1 -1
  16. package/dist/commands/doctor.js +9 -4
  17. package/dist/commands/doctor.js.map +1 -1
  18. package/dist/commands/instructions.d.ts +7 -1
  19. package/dist/commands/instructions.js +52 -27
  20. package/dist/commands/instructions.js.map +1 -1
  21. package/dist/commands/updates.js +5 -12
  22. package/dist/commands/updates.js.map +1 -1
  23. package/dist/extension/manifest.json +1 -1
  24. package/dist/ui/screens/agent-instructions.js +25 -6
  25. package/dist/ui/screens/agent-instructions.js.map +1 -1
  26. package/dist/utils/semver.d.ts +14 -0
  27. package/dist/utils/semver.js +32 -0
  28. package/dist/utils/semver.js.map +1 -0
  29. package/package.json +1 -1
  30. package/dist/agent-instructions/claude.d.ts +0 -2
  31. package/dist/agent-instructions/claude.js +0 -29
  32. package/dist/agent-instructions/claude.js.map +0 -1
  33. package/dist/agent-instructions/copilot.d.ts +0 -2
  34. package/dist/agent-instructions/copilot.js +0 -31
  35. package/dist/agent-instructions/copilot.js.map +0 -1
  36. package/dist/agent-instructions/opencode.d.ts +0 -2
  37. package/dist/agent-instructions/opencode.js +0 -30
  38. package/dist/agent-instructions/opencode.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Single semver-ish comparator used by both `agent-instructions/file-ops`
3
+ * (deciding whether an installed block is outdated) and `commands/updates`
4
+ * (deciding whether the npm registry has a newer version). Pre-release
5
+ * suffixes like `0.3.0-beta.1` are NOT handled — both call sites only ever
6
+ * compare plain MAJOR.MINOR.PATCH strings. Anything that does not parse
7
+ * cleanly is treated as the segment integer `0`, which yields a stable
8
+ * (if not semver-correct) ordering rather than throwing.
9
+ *
10
+ * The `null` branch represents the legacy unversioned marker the agent-
11
+ * instructions installer used to write. By construction it predates any
12
+ * real VERSION, so it always compares less than a real string.
13
+ */
14
+ export declare function compareSemver(a: string | null, b: string | null): number;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Single semver-ish comparator used by both `agent-instructions/file-ops`
3
+ * (deciding whether an installed block is outdated) and `commands/updates`
4
+ * (deciding whether the npm registry has a newer version). Pre-release
5
+ * suffixes like `0.3.0-beta.1` are NOT handled — both call sites only ever
6
+ * compare plain MAJOR.MINOR.PATCH strings. Anything that does not parse
7
+ * cleanly is treated as the segment integer `0`, which yields a stable
8
+ * (if not semver-correct) ordering rather than throwing.
9
+ *
10
+ * The `null` branch represents the legacy unversioned marker the agent-
11
+ * instructions installer used to write. By construction it predates any
12
+ * real VERSION, so it always compares less than a real string.
13
+ */
14
+ export function compareSemver(a, b) {
15
+ if (a === null && b === null)
16
+ return 0;
17
+ if (a === null)
18
+ return -1;
19
+ if (b === null)
20
+ return 1;
21
+ const pa = a.split('.').map((s) => parseInt(s, 10) || 0);
22
+ const pb = b.split('.').map((s) => parseInt(s, 10) || 0);
23
+ const n = Math.max(pa.length, pb.length, 3);
24
+ for (let i = 0; i < n; i++) {
25
+ const da = pa[i] ?? 0;
26
+ const db = pb[i] ?? 0;
27
+ if (da !== db)
28
+ return da - db;
29
+ }
30
+ return 0;
31
+ }
32
+ //# sourceMappingURL=semver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semver.js","sourceRoot":"","sources":["../../src/utils/semver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,UAAU,aAAa,CAAC,CAAgB,EAAE,CAAgB;IAC9D,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IACvC,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC,CAAC;IAC1B,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IACzB,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACtB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAChC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobshimo/browser-link",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "MCP server that bridges Claude Code, OpenCode, GitHub Copilot CLI and other MCP clients to a Chrome tab. Per-tool permissions, multi-agent mode (multiple MCP clients sharing one bridge), persistent UI map across sessions.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -1,2 +0,0 @@
1
- import type { InstructionsInstaller } from './types.js';
2
- export declare const claudeInstructionsInstaller: InstructionsInstaller;
@@ -1,29 +0,0 @@
1
- import { homedir } from 'node:os';
2
- import { join } from 'node:path';
3
- import { detectAt, installAt, uninstallAt } from './file-ops.js';
4
- /**
5
- * Claude Code reads `~/.claude/CLAUDE.md` as the user-level global
6
- * instructions file (applied to every project). That is where the block
7
- * lives so the trigger list reaches every Claude session, regardless of
8
- * which repo the user is in.
9
- */
10
- function file() {
11
- return join(homedir(), '.claude', 'CLAUDE.md');
12
- }
13
- export const claudeInstructionsInstaller = {
14
- id: 'claude',
15
- displayName: 'Claude Code',
16
- filePath() {
17
- return file();
18
- },
19
- detect() {
20
- return detectAt(file());
21
- },
22
- install() {
23
- return installAt(file(), 'Claude Code');
24
- },
25
- uninstall() {
26
- return uninstallAt(file(), 'Claude Code');
27
- },
28
- };
29
- //# sourceMappingURL=claude.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/agent-instructions/claude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjE;;;;;GAKG;AACH,SAAS,IAAI;IACX,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,CAAC,MAAM,2BAA2B,GAA0B;IAChE,EAAE,EAAE,QAAQ;IACZ,WAAW,EAAE,aAAa;IAE1B,QAAQ;QACN,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAED,MAAM;QACJ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO;QACL,OAAO,SAAS,CAAC,IAAI,EAAE,EAAE,aAAa,CAAC,CAAC;IAC1C,CAAC;IAED,SAAS;QACP,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,aAAa,CAAC,CAAC;IAC5C,CAAC;CACF,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { InstructionsInstaller } from './types.js';
2
- export declare const copilotInstructionsInstaller: InstructionsInstaller;
@@ -1,31 +0,0 @@
1
- import { homedir } from 'node:os';
2
- import { join } from 'node:path';
3
- import { detectAt, installAt, uninstallAt } from './file-ops.js';
4
- /**
5
- * GitHub Copilot CLI keeps its config under `~/.copilot/` (overridable via
6
- * COPILOT_HOME, same env var the rest of our Copilot integration honours).
7
- * AGENTS.md alongside `mcp-config.json` is the convention recent versions
8
- * pick up; older releases ignore the file, in which case the block sits
9
- * there harmlessly until they catch up.
10
- */
11
- function file() {
12
- const root = process.env.COPILOT_HOME ?? join(homedir(), '.copilot');
13
- return join(root, 'AGENTS.md');
14
- }
15
- export const copilotInstructionsInstaller = {
16
- id: 'copilot',
17
- displayName: 'GitHub Copilot CLI',
18
- filePath() {
19
- return file();
20
- },
21
- detect() {
22
- return detectAt(file());
23
- },
24
- install() {
25
- return installAt(file(), 'GitHub Copilot CLI');
26
- },
27
- uninstall() {
28
- return uninstallAt(file(), 'GitHub Copilot CLI');
29
- },
30
- };
31
- //# sourceMappingURL=copilot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../src/agent-instructions/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjE;;;;;;GAMG;AACH,SAAS,IAAI;IACX,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,MAAM,4BAA4B,GAA0B;IACjE,EAAE,EAAE,SAAS;IACb,WAAW,EAAE,oBAAoB;IAEjC,QAAQ;QACN,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAED,MAAM;QACJ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO;QACL,OAAO,SAAS,CAAC,IAAI,EAAE,EAAE,oBAAoB,CAAC,CAAC;IACjD,CAAC;IAED,SAAS;QACP,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,oBAAoB,CAAC,CAAC;IACnD,CAAC;CACF,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { InstructionsInstaller } from './types.js';
2
- export declare const opencodeInstructionsInstaller: InstructionsInstaller;
@@ -1,30 +0,0 @@
1
- import { homedir } from 'node:os';
2
- import { join } from 'node:path';
3
- import { detectAt, installAt, uninstallAt } from './file-ops.js';
4
- /**
5
- * OpenCode follows the AGENTS.md convention (https://agents.md). Global
6
- * instructions live next to the MCP config at
7
- * `~/.config/opencode/AGENTS.md` on every OS — same dir as `opencode.json`.
8
- * Project-level AGENTS.md still applies in addition; the global file is
9
- * the one we manage so the agent gets the trigger list everywhere.
10
- */
11
- function file() {
12
- return join(homedir(), '.config', 'opencode', 'AGENTS.md');
13
- }
14
- export const opencodeInstructionsInstaller = {
15
- id: 'opencode',
16
- displayName: 'OpenCode',
17
- filePath() {
18
- return file();
19
- },
20
- detect() {
21
- return detectAt(file());
22
- },
23
- install() {
24
- return installAt(file(), 'OpenCode');
25
- },
26
- uninstall() {
27
- return uninstallAt(file(), 'OpenCode');
28
- },
29
- };
30
- //# sourceMappingURL=opencode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/agent-instructions/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjE;;;;;;GAMG;AACH,SAAS,IAAI;IACX,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,MAAM,6BAA6B,GAA0B;IAClE,EAAE,EAAE,UAAU;IACd,WAAW,EAAE,UAAU;IAEvB,QAAQ;QACN,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAED,MAAM;QACJ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO;QACL,OAAO,SAAS,CAAC,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,SAAS;QACP,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;IACzC,CAAC;CACF,CAAC"}