@hraness/ghostget 0.18.0 → 0.18.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 (76) hide show
  1. package/CHANGELOG.md +283 -0
  2. package/README.md +7 -7
  3. package/dist/apple-photos-client.js +2 -1
  4. package/dist/beeper-client.js +2 -1
  5. package/dist/client.js +1 -0
  6. package/dist/imessage-direct-install-2gm3kge7.js +324 -0
  7. package/dist/index-01eeae9e.js +5 -0
  8. package/dist/index-2ymnp8xv.js +145 -0
  9. package/dist/index-en5hycxp.js +175 -0
  10. package/dist/{index-9wca02er.js → index-hfbygww8.js} +1 -1
  11. package/dist/index-n4szk3nw.js +50 -0
  12. package/dist/index-yq6maz71.js +1105 -0
  13. package/dist/index-z1w83f81.js +4 -0
  14. package/dist/index.js +4 -47
  15. package/dist/messaging-automation-api.js +21 -0
  16. package/dist/messaging-automation-j4274hvc.js +609 -0
  17. package/dist/messaging-native-install-8w1j36ah.js +16 -0
  18. package/dist/messaging.js +1 -0
  19. package/dist/omni-client.js +1 -0
  20. package/dist/whatsapp-automation-runtime-hgh1e9rm.js +845 -0
  21. package/dist/whatsapp-client.js +1 -0
  22. package/docs/control-panel.md +2 -2
  23. package/docs/imessage-direct-provider.md +31 -7
  24. package/docs/messaging-automation.md +103 -0
  25. package/package.json +22 -2
  26. package/skills/ghostget/references/control-panel.md +1 -1
  27. package/skills/ghostget/references/install.md +5 -5
  28. package/skills/ghostget/references/linkedin-adapter.md +209 -13
  29. package/skills/ghostget/references/platform-patterns.md +1 -1
  30. package/src/args.ts +18 -5
  31. package/src/assets/adapters/imessage/wrench-web-adapter.json +126 -0
  32. package/src/assets/adapters/linkedin/wrench-web-adapter.json +1 -1
  33. package/src/assets/adapters/whatsapp/wrench-web-adapter.json +144 -0
  34. package/src/assets/messaging-runtime/NOTICE.txt +2580 -0
  35. package/src/assets/messaging-runtime/imsg-darwin-arm64.gz +0 -0
  36. package/src/assets/messaging-runtime/phone-number-info.plist.gz +0 -0
  37. package/src/assets/messaging-runtime/phone-number-metadata.json.gz +0 -0
  38. package/src/assets/messaging-runtime/phone-number-privacy.plist.gz +0 -0
  39. package/src/assets/messaging-runtime/wacli-darwin-arm64.gz +0 -0
  40. package/src/beeper-client-types.ts +1 -1
  41. package/src/ghostget.ts +16 -4
  42. package/src/messaging-automation-api.ts +12 -0
  43. package/src/messaging-automation-descriptors.ts +29 -0
  44. package/src/messaging-automation-factory.ts +148 -0
  45. package/src/messaging-automation-server.ts +183 -0
  46. package/src/messaging-automation-types.ts +155 -0
  47. package/src/messaging-automation-validation.ts +110 -0
  48. package/src/messaging-automation.ts +356 -0
  49. package/src/plugins/imessage-direct/plugin.ts +12 -1
  50. package/src/plugins/imessage-direct/vendor/0003-feat-rpc-add-no-fetch-rich-cards.patch +276 -0
  51. package/src/plugins/imessage-direct/vendor/provenance.json +84 -10
  52. package/src/plugins/linkedin-web/plugin.ts +1 -1
  53. package/src/plugins/whatsapp-linked-device/plugin.ts +7 -2
  54. package/src/plugins/whatsapp-linked-device/vendor/0001-ghostget-private-messaging.patch +1093 -0
  55. package/src/plugins/whatsapp-linked-device/vendor/README.md +39 -0
  56. package/src/plugins/whatsapp-linked-device/vendor/provenance.json +45 -0
  57. package/src/provider-plugin.ts +14 -0
  58. package/src/providers/imessage-automation.ts +250 -0
  59. package/src/providers/imessage-direct-install.ts +7 -0
  60. package/src/providers/imessage-direct-runtime.ts +32 -2
  61. package/src/providers/imessage-direct.ts +13 -3
  62. package/src/providers/linkedin-contact-failure.ts +21 -0
  63. package/src/providers/linkedin-contact-platform.ts +8 -1
  64. package/src/providers/linkedin-contact-program.ts +34 -5
  65. package/src/providers/linkedin-web-contact.ts +1023 -51
  66. package/src/providers/linkedin-web-profile-browser.ts +659 -45
  67. package/src/providers/linkedin-web-runtime.ts +1 -0
  68. package/src/providers/linkedin-web.ts +46 -2
  69. package/src/providers/messaging-native-artifacts.ts +38 -0
  70. package/src/providers/messaging-native-install.ts +75 -0
  71. package/src/providers/whatsapp-automation-runtime.ts +240 -0
  72. package/src/providers/whatsapp-automation.ts +153 -0
  73. package/src/usage.ts +3 -1
  74. package/src/version.ts +1 -1
  75. package/src/web-session-contract-definitions.ts +1 -1
  76. package/tsconfig.json +3 -0
package/src/args.ts CHANGED
@@ -36,6 +36,8 @@ type MessagingArguments = {
36
36
 
37
37
  export type GhostgetArguments =
38
38
  | { readonly command: "help" }
39
+ | { readonly command: "messaging-automation-serve" }
40
+ | { readonly command: "whatsapp-automation-install"; readonly binary?: string; readonly json: boolean }
39
41
  | { readonly command: "clip"; readonly arguments: readonly string[] }
40
42
  | { readonly command: "read"; readonly arguments: readonly string[] }
41
43
  | { readonly command: "media"; readonly arguments: readonly string[] }
@@ -69,7 +71,7 @@ export type GhostgetArguments =
69
71
  }
70
72
  | {
71
73
  readonly command: "imessage-transport-install";
72
- readonly binary: string;
74
+ readonly binary?: string;
73
75
  readonly json: boolean;
74
76
  }
75
77
  | { readonly command: "doctor"; readonly json: boolean }
@@ -464,6 +466,11 @@ function optionalPositiveInteger(
464
466
 
465
467
  function parseMessagingArguments(raw: readonly string[]): ParseGhostgetResult {
466
468
  const operation = raw[0];
469
+ if (operation === "automation") {
470
+ return raw.length === 3 && raw[1] === "serve" && raw[2] === "--stdio"
471
+ ? { ok: true, value: { command: "messaging-automation-serve" } }
472
+ : { ok: false, message: "Use messaging automation serve --stdio; all owner configuration and message data must arrive on stdin." };
473
+ }
467
474
  if (operation === "reconcile") {
468
475
  const runId = raw[1];
469
476
  if (runId === undefined) {
@@ -923,6 +930,13 @@ export function parseGhostgetArguments(raw: readonly string[]): ParseGhostgetRes
923
930
  };
924
931
  }
925
932
  if (first === "whatsapp") {
933
+ if (raw[1] === "automation" && raw[2] === "install") {
934
+ const parsed = optionValues(raw.slice(3), ["--binary"], ["--json"]);
935
+ if (isFailure(parsed)) return parsed;
936
+ const binary = parsed.values["--binary"];
937
+ if (binary !== undefined && (!isAbsolute(binary) || resolve(binary) !== binary || Buffer.byteLength(binary) > 4096 || /[\0\r\n]/u.test(binary))) return { ok: false, message: "whatsapp automation install requires --binary <normalized-absolute-reviewed-wacli-file>" };
938
+ return { ok: true, value: { command: "whatsapp-automation-install", ...(binary === undefined ? {} : { binary }), json: parsed.booleans.has("--json") } };
939
+ }
926
940
  if (raw[1] !== "export-message-like-me") {
927
941
  return {
928
942
  ok: false,
@@ -966,11 +980,10 @@ export function parseGhostgetArguments(raw: readonly string[]): ParseGhostgetRes
966
980
  if (isFailure(parsed)) return parsed;
967
981
  const binary = parsed.values["--binary"];
968
982
  if (
969
- binary === undefined
970
- || !isAbsolute(binary)
983
+ binary !== undefined && (!isAbsolute(binary)
971
984
  || resolve(binary) !== binary
972
985
  || Buffer.byteLength(binary, "utf8") > 4_096
973
- || /[\0\r\n]/u.test(binary)
986
+ || /[\0\r\n]/u.test(binary))
974
987
  ) {
975
988
  return {
976
989
  ok: false,
@@ -982,7 +995,7 @@ export function parseGhostgetArguments(raw: readonly string[]): ParseGhostgetRes
982
995
  ok: true,
983
996
  value: {
984
997
  command: "imessage-transport-install",
985
- binary,
998
+ ...(binary === undefined ? {} : { binary }),
986
999
  json: parsed.booleans.has("--json"),
987
1000
  },
988
1001
  };
@@ -231,6 +231,132 @@
231
231
  "timeoutMs": 30000,
232
232
  "maxOutputBytes": 1048576
233
233
  }
234
+ },
235
+ "messaging.automation.read": {
236
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
237
+ "risk": "R1",
238
+ "sideEffect": "none",
239
+ "idempotency": "none",
240
+ "dedupeWindowMs": 0,
241
+ "input": {
242
+ "properties": {},
243
+ "required": []
244
+ },
245
+ "localCli": {
246
+ "surface": "imessage",
247
+ "action": "messaging.automation.read",
248
+ "contractVersion": 1,
249
+ "timeoutMs": 30000,
250
+ "maxOutputBytes": 8388608
251
+ }
252
+ },
253
+ "messaging.automation.send.text": {
254
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
255
+ "risk": "R3",
256
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
257
+ "idempotency": "local-at-most-once",
258
+ "dedupeWindowMs": 86400000,
259
+ "input": {
260
+ "properties": {},
261
+ "required": []
262
+ },
263
+ "localCli": {
264
+ "surface": "imessage",
265
+ "action": "messaging.automation.send.text",
266
+ "contractVersion": 1,
267
+ "timeoutMs": 30000,
268
+ "maxOutputBytes": 8388608
269
+ }
270
+ },
271
+ "messaging.automation.send.attachment": {
272
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
273
+ "risk": "R3",
274
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
275
+ "idempotency": "local-at-most-once",
276
+ "dedupeWindowMs": 86400000,
277
+ "input": {
278
+ "properties": {},
279
+ "required": []
280
+ },
281
+ "localCli": {
282
+ "surface": "imessage",
283
+ "action": "messaging.automation.send.attachment",
284
+ "contractVersion": 1,
285
+ "timeoutMs": 30000,
286
+ "maxOutputBytes": 8388608
287
+ }
288
+ },
289
+ "messaging.automation.send.reaction": {
290
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
291
+ "risk": "R3",
292
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
293
+ "idempotency": "local-at-most-once",
294
+ "dedupeWindowMs": 86400000,
295
+ "input": {
296
+ "properties": {},
297
+ "required": []
298
+ },
299
+ "localCli": {
300
+ "surface": "imessage",
301
+ "action": "messaging.automation.send.reaction",
302
+ "contractVersion": 1,
303
+ "timeoutMs": 30000,
304
+ "maxOutputBytes": 8388608
305
+ }
306
+ },
307
+ "messaging.automation.send.sticker": {
308
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
309
+ "risk": "R3",
310
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
311
+ "idempotency": "local-at-most-once",
312
+ "dedupeWindowMs": 86400000,
313
+ "input": {
314
+ "properties": {},
315
+ "required": []
316
+ },
317
+ "localCli": {
318
+ "surface": "imessage",
319
+ "action": "messaging.automation.send.sticker",
320
+ "contractVersion": 1,
321
+ "timeoutMs": 30000,
322
+ "maxOutputBytes": 8388608
323
+ }
324
+ },
325
+ "messaging.automation.send.link": {
326
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
327
+ "risk": "R3",
328
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
329
+ "idempotency": "local-at-most-once",
330
+ "dedupeWindowMs": 86400000,
331
+ "input": {
332
+ "properties": {},
333
+ "required": []
334
+ },
335
+ "localCli": {
336
+ "surface": "imessage",
337
+ "action": "messaging.automation.send.link",
338
+ "contractVersion": 1,
339
+ "timeoutMs": 30000,
340
+ "maxOutputBytes": 8388608
341
+ }
342
+ },
343
+ "messaging.automation.send.poll": {
344
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
345
+ "risk": "R3",
346
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
347
+ "idempotency": "local-at-most-once",
348
+ "dedupeWindowMs": 86400000,
349
+ "input": {
350
+ "properties": {},
351
+ "required": []
352
+ },
353
+ "localCli": {
354
+ "surface": "imessage",
355
+ "action": "messaging.automation.send.poll",
356
+ "contractVersion": 1,
357
+ "timeoutMs": 30000,
358
+ "maxOutputBytes": 8388608
359
+ }
234
360
  }
235
361
  }
236
362
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 4,
3
3
  "id": "linkedin-web",
4
- "version": "1.24.0",
4
+ "version": "1.36.2",
5
5
  "displayName": "LinkedIn (Authenticated Web API)",
6
6
  "surfaceId": "linkedin",
7
7
  "origins": [
@@ -395,6 +395,150 @@
395
395
  "timeoutMs": 600000,
396
396
  "maxOutputBytes": 8388608
397
397
  }
398
+ },
399
+ "messaging.automation.read": {
400
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
401
+ "risk": "R1",
402
+ "sideEffect": "none",
403
+ "idempotency": "none",
404
+ "dedupeWindowMs": 0,
405
+ "input": {
406
+ "properties": {},
407
+ "required": []
408
+ },
409
+ "webSession": {
410
+ "site": "whatsapp",
411
+ "action": "messaging.automation.read",
412
+ "contractVersion": 1,
413
+ "timeoutMs": 30000,
414
+ "maxOutputBytes": 8388608
415
+ }
416
+ },
417
+ "messaging.automation.sync": {
418
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
419
+ "risk": "R2",
420
+ "sideEffect": "Maintain an explicitly started linked-device sync session; may emit protocol acknowledgements.",
421
+ "idempotency": "local-at-most-once",
422
+ "dedupeWindowMs": 86400000,
423
+ "input": {
424
+ "properties": {},
425
+ "required": []
426
+ },
427
+ "webSession": {
428
+ "site": "whatsapp",
429
+ "action": "messaging.automation.sync",
430
+ "contractVersion": 1,
431
+ "timeoutMs": 30000,
432
+ "maxOutputBytes": 8388608
433
+ }
434
+ },
435
+ "messaging.automation.send.text": {
436
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
437
+ "risk": "R3",
438
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
439
+ "idempotency": "local-at-most-once",
440
+ "dedupeWindowMs": 86400000,
441
+ "input": {
442
+ "properties": {},
443
+ "required": []
444
+ },
445
+ "webSession": {
446
+ "site": "whatsapp",
447
+ "action": "messaging.automation.send.text",
448
+ "contractVersion": 1,
449
+ "timeoutMs": 30000,
450
+ "maxOutputBytes": 8388608
451
+ }
452
+ },
453
+ "messaging.automation.send.attachment": {
454
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
455
+ "risk": "R3",
456
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
457
+ "idempotency": "local-at-most-once",
458
+ "dedupeWindowMs": 86400000,
459
+ "input": {
460
+ "properties": {},
461
+ "required": []
462
+ },
463
+ "webSession": {
464
+ "site": "whatsapp",
465
+ "action": "messaging.automation.send.attachment",
466
+ "contractVersion": 1,
467
+ "timeoutMs": 30000,
468
+ "maxOutputBytes": 8388608
469
+ }
470
+ },
471
+ "messaging.automation.send.reaction": {
472
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
473
+ "risk": "R3",
474
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
475
+ "idempotency": "local-at-most-once",
476
+ "dedupeWindowMs": 86400000,
477
+ "input": {
478
+ "properties": {},
479
+ "required": []
480
+ },
481
+ "webSession": {
482
+ "site": "whatsapp",
483
+ "action": "messaging.automation.send.reaction",
484
+ "contractVersion": 1,
485
+ "timeoutMs": 30000,
486
+ "maxOutputBytes": 8388608
487
+ }
488
+ },
489
+ "messaging.automation.send.sticker": {
490
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
491
+ "risk": "R3",
492
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
493
+ "idempotency": "local-at-most-once",
494
+ "dedupeWindowMs": 86400000,
495
+ "input": {
496
+ "properties": {},
497
+ "required": []
498
+ },
499
+ "webSession": {
500
+ "site": "whatsapp",
501
+ "action": "messaging.automation.send.sticker",
502
+ "contractVersion": 1,
503
+ "timeoutMs": 30000,
504
+ "maxOutputBytes": 8388608
505
+ }
506
+ },
507
+ "messaging.automation.send.link": {
508
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
509
+ "risk": "R3",
510
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
511
+ "idempotency": "local-at-most-once",
512
+ "dedupeWindowMs": 86400000,
513
+ "input": {
514
+ "properties": {},
515
+ "required": []
516
+ },
517
+ "webSession": {
518
+ "site": "whatsapp",
519
+ "action": "messaging.automation.send.link",
520
+ "contractVersion": 1,
521
+ "timeoutMs": 30000,
522
+ "maxOutputBytes": 8388608
523
+ }
524
+ },
525
+ "messaging.automation.send.poll": {
526
+ "description": "Scoped owner automation permission; use ghostget messaging automation serve --stdio. Generic invocation is unavailable.",
527
+ "risk": "R3",
528
+ "sideEffect": "Submit one exact action through an enrolled conversation and an unexpired bounded owner grant; delivery remains unknown.",
529
+ "idempotency": "local-at-most-once",
530
+ "dedupeWindowMs": 86400000,
531
+ "input": {
532
+ "properties": {},
533
+ "required": []
534
+ },
535
+ "webSession": {
536
+ "site": "whatsapp",
537
+ "action": "messaging.automation.send.poll",
538
+ "contractVersion": 1,
539
+ "timeoutMs": 30000,
540
+ "maxOutputBytes": 8388608
541
+ }
398
542
  }
399
543
  }
400
544
  }