@basmilius/apple-companion-link 0.0.104 → 0.1.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/index.js CHANGED
@@ -51,7 +51,7 @@ function convertAttentionState(state) {
51
51
  }
52
52
  }
53
53
  // src/protocol.ts
54
- import { randomInt as randomInt2 } from "node:crypto";
54
+ import { randomBytes, randomInt as randomInt2 } from "node:crypto";
55
55
  import { reporter as reporter2, waitFor } from "@basmilius/apple-common";
56
56
  import { OPack as OPack2, Plist } from "@basmilius/apple-encoding";
57
57
 
@@ -494,9 +494,11 @@ class CompanionLink {
494
494
  const [, payload] = await this.#socket.exchange(FrameType.E_OPACK, {
495
495
  _i: "_sessionStart",
496
496
  _t: MessageType.Request,
497
+ _btHP: false,
497
498
  _c: {
498
499
  _srvT: "com.apple.tvremoteservices",
499
- _sid: randomInt2(0, 2 ** 32 - 1)
500
+ _sid: randomInt2(0, 2 ** 32 - 1),
501
+ _btHP: false
500
502
  }
501
503
  });
502
504
  return objectOrFail(payload);
@@ -505,25 +507,66 @@ class CompanionLink {
505
507
  const [, payload] = await this.#socket.exchange(FrameType.E_OPACK, {
506
508
  _i: "_systemInfo",
507
509
  _t: MessageType.Request,
510
+ _btHP: false,
508
511
  _c: {
509
512
  _bf: 0,
510
513
  _cf: 512,
511
514
  _clFl: 128,
512
- _i: "cafecafecafe",
515
+ _i: randomBytes(6).toString("hex"),
513
516
  _idsID: pairingId.toString(),
514
- _pubID: "FF:70:79:61:74:76",
515
- _sf: 256,
516
- _sv: "170.18",
517
- model: "iPhone10,6",
518
- name: "Bas Companion Link"
517
+ _pubID: "DA:6D:1E:D8:A0:4F",
518
+ _sf: 1099511628032,
519
+ _sv: "715.2",
520
+ model: "iPhone16,2",
521
+ name: "AP Companion Link",
522
+ _lP: 50402,
523
+ _dC: "1",
524
+ _stA: [
525
+ "com.apple.sharingd.AirDrop",
526
+ "SymptomNetworkDiagnostics",
527
+ "com.apple.photosface.network-service",
528
+ "com.apple.ApplicationService.chrono",
529
+ "com.apple.DDUI-Picker",
530
+ "com.apple.biomesyncd.cascade.rapport",
531
+ "com.apple.SeymourSession",
532
+ "com.apple.workflow.remotewidgets",
533
+ "com.apple.ApplicationService.chrono",
534
+ "SCD.MessageCenter.remoteIntelligence",
535
+ "DeviceSharingDaemonApplicationService",
536
+ "com.apple.biomesyncd.rapport",
537
+ "com.apple.devicediscoveryui.rapportwake",
538
+ "com.apple.healthd.rapport",
539
+ "com.apple.dropin.setup",
540
+ "com.apple.coreduet.sync",
541
+ "com.apple.siri.wakeup",
542
+ "com.apple.wifivelocityd.rapportWake",
543
+ "com.apple.Seymour",
544
+ "CPSRemoteLLM",
545
+ "com.apple.networkrelay.on-demand-setup",
546
+ "com.apple.home.messaging",
547
+ "com.apple.accessibility.axremoted.rapportWake",
548
+ "com.apple.continuitycapture.sideband",
549
+ "com.apple.announce",
550
+ "com.apple.coreidv.coreidvd.handoff"
551
+ ]
519
552
  }
520
553
  });
521
554
  return objectOrFail(payload);
522
555
  }
556
+ async _tiStart() {
557
+ const [, payload] = await this.#socket.exchange(FrameType.E_OPACK, {
558
+ _i: "_tiStart",
559
+ _t: MessageType.Request,
560
+ _btHP: false,
561
+ _c: {}
562
+ });
563
+ return objectOrFail(payload);
564
+ }
523
565
  async _touchStart() {
524
566
  const [, payload] = await this.#socket.exchange(FrameType.E_OPACK, {
525
567
  _i: "_touchStart",
526
568
  _t: MessageType.Request,
569
+ _btHP: false,
527
570
  _c: {
528
571
  _height: OPack2.float(1000),
529
572
  _tFl: 0,
@@ -30,6 +30,7 @@ export default class CompanionLink {
30
30
  _unsubscribe(event: string, fn?: (data: unknown) => void): Promise<void>;
31
31
  _sessionStart(): Promise<object>;
32
32
  _systemInfo(pairingId: Buffer): Promise<object>;
33
+ _tiStart(): Promise<object>;
33
34
  _touchStart(): Promise<object>;
34
35
  _tvrcSessionStart(): Promise<object>;
35
36
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@basmilius/apple-companion-link",
3
3
  "description": "Implementation of Apple's Companion Link in Node.js.",
4
- "version": "0.0.104",
4
+ "version": "0.1.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": {
@@ -40,8 +40,8 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@basmilius/apple-common": "0.0.104",
44
- "@basmilius/apple-encoding": "0.0.104"
43
+ "@basmilius/apple-common": "0.1.0",
44
+ "@basmilius/apple-encoding": "0.1.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@basmilius/tools": "^2.23.0",