@1presence/bridge 0.12.0 → 0.14.0

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/dist/claude.js CHANGED
@@ -65,11 +65,14 @@ chat interface. Call them by their MCP-prefixed names (\`mcp__1presence__<name>\
65
65
  again later only if the topic clearly shifts. Without this, the user's
66
66
  conversation list shows untitled threads.
67
67
 
68
- - **ui_payload** — Emit at most ONE per turn, AFTER your reply text ends.
69
- Pass \`hints: []\` most turns (aim ~1 hint per 3 early turns, less later)
70
- and \`suggestions\`: 2–4 follow-on prompts the user can tap. Hints are
68
+ - **ui_payload** — Call exactly ONCE per turn, AFTER your reply text ends.
69
+ \`suggestions\` (2–4 tappable follow-on prompts) is REQUIRED on every turn
70
+ with a user-facing reply never skip it. \`hints\` is an independent,
71
+ sparse decision: pass \`[]\` most turns (aim ~1 hint per 3 early turns,
72
+ less later). Do not drop suggestions because there is no hint. Hints are
71
73
  end-user product coaching only — never mention models, AI vendors,
72
- engineering, or roadmap. Skip entirely on pure tool-ingestion turns.
74
+ engineering, or roadmap. The only legitimate skip is a turn with no
75
+ user-facing reply text at all.
73
76
 
74
77
  - **plan** — Show a checklist when a task has ≥3 distinct, user-visible
75
78
  steps with side effects. Call once at the start with all steps; update
package/dist/index.js CHANGED
@@ -13,6 +13,20 @@ const claude_1 = require("./claude");
13
13
  const config_1 = require("./config");
14
14
  const update_1 = require("./update");
15
15
  const package_json_1 = require("../package.json");
16
+ // Published tarballs don't ship src/, so this fires only when running the
17
+ // dist build from a live workspace checkout. Catches the trap where editing
18
+ // src/ without re-running tsc leaves you executing stale dist code — banner
19
+ // version matches package.json but behavior doesn't match the source.
20
+ if (__dirname.endsWith('dist')) {
21
+ const srcDir = (0, path_1.join)(__dirname, '..', 'src');
22
+ if ((0, fs_1.existsSync)(srcDir)) {
23
+ const newest = (dir) => Math.max(...(0, fs_1.readdirSync)(dir).map(f => (0, fs_1.statSync)((0, path_1.join)(dir, f)).mtimeMs));
24
+ if (newest(srcDir) > newest(__dirname)) {
25
+ console.error('Bridge dist is stale (src/ has been edited since last build). Run: npm run build');
26
+ process.exit(1);
27
+ }
28
+ }
29
+ }
16
30
  // ─── CLI args ─────────────────────────────────────────────────────────────────
17
31
  const VERBOSE = process.argv.includes('--verbose') || process.argv.includes('-v');
18
32
  // ─── Config ───────────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1presence/bridge",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "Run 1Presence on your Mac and use your Claude.ai Pro subscription from any device",
5
5
  "bin": {
6
6
  "1presence-bridge": "dist/index.js"
@@ -11,6 +11,7 @@
11
11
  "README.md"
12
12
  ],
13
13
  "scripts": {
14
+ "prepare": "tsc",
14
15
  "prepack": "tsc",
15
16
  "build": "tsc",
16
17
  "dev": "tsx src/index.ts",