teamshare-bridge 0.19.5 → 0.19.6
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.
|
@@ -7,6 +7,7 @@ exports.cmdConnect = cmdConnect;
|
|
|
7
7
|
const api_1 = require("../../lib/api");
|
|
8
8
|
const config_1 = require("../../lib/config");
|
|
9
9
|
const bus_1 = require("../../lib/workspace/bus");
|
|
10
|
+
const protocol_1 = require("../../bridge/protocol");
|
|
10
11
|
const utils_1 = require("../utils");
|
|
11
12
|
async function cmdConnect(flags) {
|
|
12
13
|
const agentId = (0, utils_1.need)(flags, 'agent');
|
|
@@ -15,6 +16,18 @@ async function cmdConnect(flags) {
|
|
|
15
16
|
await api.heartbeat(agentId, 'online');
|
|
16
17
|
(0, config_1.upsertAgent)(agentId, apiKey);
|
|
17
18
|
console.log(`Connected: agent ${agentId} (key saved to ~/.teamshare/config.json)`);
|
|
19
|
+
// Ensure the teamshare:// protocol is registered so deep links work.
|
|
20
|
+
// Idempotent — skips if already registered.
|
|
21
|
+
if (!(0, protocol_1.schemeRegistered)()) {
|
|
22
|
+
try {
|
|
23
|
+
(0, protocol_1.registerScheme)();
|
|
24
|
+
console.log('[protocol] teamshare:// scheme registered — folder picker and run links will now auto-open.');
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
console.warn(`[protocol] Could not register teamshare:// scheme: ${err instanceof Error ? err.message : String(err)}`);
|
|
28
|
+
console.warn('[protocol] Deep links may not work. Run: teamshare-bridge register');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
18
31
|
// IMP-9xx hot-pickup: nudge a running daemon so the new agent starts
|
|
19
32
|
// receiving wakes immediately (no `teamshare-bridge restart` needed).
|
|
20
33
|
// Best-effort - a not-running daemon just gets the usual start hint.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../src/cli/commands/connect.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":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C,IAAI,CAAC,OAAO,EAAE,IAAI;gBAAE,OAAO;YAC3B,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,oBAAoB,OAAO,CAAC,IAAI,kBAAkB,EAAE;gBAC1E,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;aACnC,CAAC,CAAC;YACH,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC;gBACX,OAAO,CAAC,GAAG,CAAC,kEAAkE,CAAC,CAAC;YAClF,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;QACpF,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;IAEL,MAAM,KAAK,GAAG,IAAA,wBAAe,EAAC,MAAM,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CACT,KAAK;QACH,CAAC,CAAC,gHAAgH;QAClH,CAAC,CAAC,gEAAgE,CACrE,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,qDAAqD,GAAG,OAAO,GAAG,EAAE,CAAC,CAAC;AACpF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "teamshare-bridge",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.6",
|
|
4
4
|
"description": "Local bridge for TeamShare agents - CLI session runner, auto-wake WebSocket daemon, and teamshare:// protocol handler.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "tsc -p tsconfig.json",
|
|
35
35
|
"prepare": "npm run build",
|
|
36
|
+
"postinstall": "node dist/bridge/index.js register 2>/dev/null || true",
|
|
36
37
|
"dev": "tsc -p tsconfig.json --watch",
|
|
37
38
|
"lint": "eslint src --ext .ts",
|
|
38
39
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|