@ccpocket/bridge 1.61.2 → 1.61.4

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/LICENSE CHANGED
@@ -1,12 +1,21 @@
1
- This package is part of the CC Pocket project.
1
+ MIT License
2
2
 
3
- License: SEE LICENSE IN LICENSE
3
+ Copyright (c) 2026 K9i
4
4
 
5
- The governing license for this package is the repository root LICENSE, including
6
- the Bridge Redistribution Exception that applies to the Bridge Server component.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
7
11
 
8
- Repository:
9
- https://github.com/K9i-0/ccpocket
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
10
14
 
11
- Root license:
12
- https://github.com/K9i-0/ccpocket/blob/main/LICENSE
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -145,18 +145,5 @@ The bridge server spawns and manages Claude Code CLI processes, translating WebS
145
145
 
146
146
  ## License
147
147
 
148
- This package is governed by the [CC Pocket license](../../LICENSE).
149
-
150
- The repository remains under FSL-1.1-MIT, with a specific Bridge Redistribution
151
- Exception that allows unofficial redistribution of the Bridge Server, including
152
- environment-specific builds and forks for Windows, WSL, proxy-restricted, or
153
- other hard-to-validate environments.
154
-
155
- If you redistribute this package or a modified fork:
156
-
157
- - do not imply it is official, endorsed, or supported by the CC Pocket maintainer
158
- - preserve the license text and clearly state that the software is provided "AS IS"
159
- - make clear that compliance with Anthropic, OpenAI, network, enterprise, and other third-party terms is the responsibility of the redistributor and end user
160
-
161
- In short: unofficial Bridge redistributions are permitted for compatibility and
162
- support purposes, but they remain unsupported and at your own risk.
148
+ This package is MIT licensed as part of CC Pocket. See [LICENSE](./LICENSE) and
149
+ the repository root [LICENSE](../../LICENSE).
package/dist/mdns.d.ts CHANGED
@@ -1,3 +1,20 @@
1
+ interface PublishedService {
2
+ on(event: "error", listener: (err: Error) => void): void;
3
+ stop?: () => void;
4
+ }
5
+ interface BonjourClient {
6
+ publish(opts: {
7
+ name: string;
8
+ type: string;
9
+ protocol: "tcp";
10
+ port: number;
11
+ probe: boolean;
12
+ txt: Record<string, string>;
13
+ }): PublishedService;
14
+ destroy(): void;
15
+ }
16
+ type BonjourConstructor = new (opts?: Record<string, unknown>, errorCallback?: (err: Error) => void) => BonjourClient;
17
+ export declare function resolveBonjourConstructor(moduleExport: unknown): BonjourConstructor;
1
18
  export declare class MdnsAdvertiser {
2
19
  private bonjour;
3
20
  private service;
@@ -5,3 +22,4 @@ export declare class MdnsAdvertiser {
5
22
  start(port: number, apiKey?: string): void;
6
23
  stop(): void;
7
24
  }
25
+ export {};
package/dist/mdns.js CHANGED
@@ -1,4 +1,24 @@
1
- import { Bonjour } from "bonjour-service";
1
+ import BonjourModule from "bonjour-service";
2
+ function readExport(value, key) {
3
+ if (typeof value !== "object" || value === null)
4
+ return undefined;
5
+ return value[key];
6
+ }
7
+ export function resolveBonjourConstructor(moduleExport) {
8
+ const defaultExport = readExport(moduleExport, "default");
9
+ const candidates = [
10
+ moduleExport,
11
+ readExport(moduleExport, "Bonjour"),
12
+ defaultExport,
13
+ readExport(defaultExport, "Bonjour"),
14
+ readExport(defaultExport, "default"),
15
+ ];
16
+ const constructor = candidates.find((candidate) => typeof candidate === "function");
17
+ if (!constructor) {
18
+ throw new TypeError("Unsupported bonjour-service export shape");
19
+ }
20
+ return constructor;
21
+ }
2
22
  export class MdnsAdvertiser {
3
23
  bonjour = null;
4
24
  service = null;
@@ -7,6 +27,7 @@ export class MdnsAdvertiser {
7
27
  if (this.disabled)
8
28
  return;
9
29
  try {
30
+ const Bonjour = resolveBonjourConstructor(BonjourModule);
10
31
  this.bonjour = new Bonjour({}, (err) => {
11
32
  console.warn(`[bridge] mDNS: transport error (non-fatal): ${err.message}`);
12
33
  this.disabled = true;
package/dist/mdns.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mdns.js","sourceRoot":"","sources":["../src/mdns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,iBAAiB,CAAC;AAExD,MAAM,OAAO,cAAc;IACjB,OAAO,GAAmB,IAAI,CAAC;IAC/B,OAAO,GAAmB,IAAI,CAAC;IAC/B,QAAQ,GAAG,KAAK,CAAC;IAEzB,KAAK,CAAC,IAAY,EAAE,MAAe;QACjC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC;YACH,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,GAAU,EAAE,EAAE;gBAC5C,OAAO,CAAC,IAAI,CACV,+CAA+C,GAAG,CAAC,OAAO,EAAE,CAC7D,CAAC;gBACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACrB,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;gBAClC,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,KAAK;gBACf,IAAI;gBACJ,KAAK,EAAE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"description": "Bridge server that connects Claude Agent SDK and Codex CLI sessions to mobile devices via WebSocket",
5
5
  "private": false,
6
6
  "type": "module",
7
- "license": "SEE LICENSE IN LICENSE",
7
+ "license": "MIT",
8
8
  "author": "K9i",
9
9
  "repository": {
10
10
  "type": "git",
@@ -51,7 +51,7 @@
51
51
  "doctor": "tsx src/cli.ts doctor"
52
52
  },
53
53
  "dependencies": {
54
- "@anthropic-ai/claude-agent-sdk": "^0.2.119",
54
+ "@anthropic-ai/claude-agent-sdk": "^0.3.148",
55
55
  "bonjour-service": "^1.3.0",
56
56
  "qrcode": "^1.5.4",
57
57
  "socks": "^2.8.7",