@leemour/max-cli 0.1.0 → 0.2.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.
Files changed (78) hide show
  1. package/README.md +25 -9
  2. package/dist/cache/schema.d.ts +10 -1
  3. package/dist/cache/schema.d.ts.map +1 -1
  4. package/dist/cache/schema.js +71 -7
  5. package/dist/cache/schema.js.map +1 -1
  6. package/dist/cache/store.d.ts +84 -3
  7. package/dist/cache/store.d.ts.map +1 -1
  8. package/dist/cache/store.js +155 -25
  9. package/dist/cache/store.js.map +1 -1
  10. package/dist/client.d.ts +68 -9
  11. package/dist/client.d.ts.map +1 -1
  12. package/dist/client.js +286 -31
  13. package/dist/client.js.map +1 -1
  14. package/dist/commands/chats.d.ts.map +1 -1
  15. package/dist/commands/chats.js +5 -9
  16. package/dist/commands/chats.js.map +1 -1
  17. package/dist/commands/contacts.d.ts.map +1 -1
  18. package/dist/commands/contacts.js +46 -5
  19. package/dist/commands/contacts.js.map +1 -1
  20. package/dist/commands/login.d.ts +15 -0
  21. package/dist/commands/login.d.ts.map +1 -0
  22. package/dist/commands/login.js +43 -0
  23. package/dist/commands/login.js.map +1 -0
  24. package/dist/commands/logout.d.ts +10 -0
  25. package/dist/commands/logout.d.ts.map +1 -0
  26. package/dist/commands/logout.js +22 -0
  27. package/dist/commands/logout.js.map +1 -0
  28. package/dist/commands/me.d.ts +3 -0
  29. package/dist/commands/me.d.ts.map +1 -0
  30. package/dist/commands/me.js +18 -0
  31. package/dist/commands/me.js.map +1 -0
  32. package/dist/commands/messages.d.ts.map +1 -1
  33. package/dist/commands/messages.js +18 -3
  34. package/dist/commands/messages.js.map +1 -1
  35. package/dist/commands/paging.d.ts +38 -0
  36. package/dist/commands/paging.d.ts.map +1 -0
  37. package/dist/commands/paging.js +43 -0
  38. package/dist/commands/paging.js.map +1 -0
  39. package/dist/commands/send.d.ts +10 -0
  40. package/dist/commands/send.d.ts.map +1 -0
  41. package/dist/commands/send.js +30 -0
  42. package/dist/commands/send.js.map +1 -0
  43. package/dist/commands/session.d.ts.map +1 -1
  44. package/dist/commands/session.js +3 -3
  45. package/dist/commands/session.js.map +1 -1
  46. package/dist/config.d.ts +6 -0
  47. package/dist/config.d.ts.map +1 -1
  48. package/dist/config.js +10 -0
  49. package/dist/config.js.map +1 -1
  50. package/dist/domain/map.d.ts +1 -0
  51. package/dist/domain/map.d.ts.map +1 -1
  52. package/dist/domain/map.js +2 -0
  53. package/dist/domain/map.js.map +1 -1
  54. package/dist/domain/models.d.ts +18 -0
  55. package/dist/domain/models.d.ts.map +1 -1
  56. package/dist/generated/operations.generated.d.ts +1 -0
  57. package/dist/generated/operations.generated.d.ts.map +1 -1
  58. package/dist/protocol/session.d.ts +54 -0
  59. package/dist/protocol/session.d.ts.map +1 -0
  60. package/dist/protocol/session.js +57 -0
  61. package/dist/protocol/session.js.map +1 -0
  62. package/dist/session/adopt.d.ts +22 -0
  63. package/dist/session/adopt.d.ts.map +1 -0
  64. package/dist/session/adopt.js +29 -0
  65. package/dist/session/adopt.js.map +1 -0
  66. package/dist/session/handshake.d.ts +14 -1
  67. package/dist/session/handshake.d.ts.map +1 -1
  68. package/dist/session/handshake.js +5 -5
  69. package/dist/session/handshake.js.map +1 -1
  70. package/dist/spec/operations/auth.d.ts +42 -0
  71. package/dist/spec/operations/auth.d.ts.map +1 -0
  72. package/dist/spec/operations/session.d.ts +16 -0
  73. package/dist/spec/operations/session.d.ts.map +1 -1
  74. package/dist/spec/operations/session.js +21 -1
  75. package/dist/spec/operations/session.js.map +1 -1
  76. package/dist/version.d.ts +1 -1
  77. package/dist/version.js +1 -1
  78. package/package.json +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC1F,OAAO,KAAK,CAAC,MAAM,SAAS,C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EAAiE,CAAC,CAAA;IAC3G,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE;IAC1C,IAAI,CAAC;QACH,OAAO,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;IACrE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,QAAQ,CAAC,qBAAqB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IACnG,CAAC;AACH,CAAC,CAAA;AAED,mGAAmG;AACnG,MAAM,KAAK,GAAG,CAAC,KAAyB,EAAsB,EAAE;IAC9D,MAAM,OAAO,GAAG,KAAK,EAAE,IAAI,EAAE,CAAA;IAC7B,OAAO,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAA;AACtE,CAAC,CAAA"}
@@ -15,6 +15,7 @@ export interface NameLookup {
15
15
  }
16
16
  export declare const toChat: (raw: Payload) => Chat;
17
17
  export declare const toMessage: (raw: Payload, chatId: Id, lookup?: NameLookup) => Message;
18
+ /** `lastMessagedAt` is always `null` here: MAX puts it on the chat, and only the store has both. */
18
19
  export declare const toContact: (raw: Payload) => Contact;
19
20
  export declare const toProfile: (raw: Payload) => Profile;
20
21
  /** The names a login response carries, so a message can name its sender without another request. */
@@ -1 +1 @@
1
- {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/domain/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAc,IAAI,EAAY,OAAO,EAAE,EAAE,EAAE,OAA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,KAAG,OAMvC,CAAA;AAEF,eAAO,MAAM,SAAS,GAAI,KAAK,OAAO,KAAG,OAQxC,CAAA;AAED,oGAAoG;AACpG,eAAO,MAAM,SAAS,GAAI,UAAU,OAAO,KAAG,GAAG,CAAC,EAAE,EAAE,MAAM,CAY3D,CAAA"}
@@ -21,11 +21,13 @@ export const toMessage = (raw, chatId, lookup = {}) => {
21
21
  attachments: attachments(raw.attaches),
22
22
  };
23
23
  };
24
+ /** `lastMessagedAt` is always `null` here: MAX puts it on the chat, and only the store has both. */
24
25
  export const toContact = (raw) => ({
25
26
  id: asId(raw.id) ?? "",
26
27
  name: displayName(raw.names) ?? text(raw.name),
27
28
  username: text(raw.link),
28
29
  description: text(raw.description),
30
+ lastMessagedAt: null,
29
31
  });
30
32
  export const toProfile = (raw) => {
31
33
  const contact = asRecord(raw.contact) ?? raw;
@@ -1 +1 @@
1
- {"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/domain/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgB,MAAM,sBAAsB,CAAA;AAkBzD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAY,EAAQ,EAAE,CAAC,CAAC;IAC7C,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE;IACtB,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;IACtB,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;IACxB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC;IACnC,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,aAAa,IAAI,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC;IAC9E,iBAAiB,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC;CAChD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAY,EAAE,MAAU,EAAE,SAAqB,E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AC,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;AACxG,CAAC,CAAA"}
@@ -48,6 +48,24 @@ export interface Contact {
48
48
  username: string | null;
49
49
  /** Whatever they wrote about themselves. */
50
50
  description: string | null;
51
+ /**
52
+ * The newest message in a one-to-one chat with them, ISO 8601, and `null` for somebody we have
53
+ * only ever met in a group. It is what `--order recent` sorts on.
54
+ *
55
+ * MAX does not send this on a contact: it comes from the chat, and only the store has both.
56
+ */
57
+ lastMessagedAt: string | null;
58
+ }
59
+ /**
60
+ * One page of a listing, and **the same shape whether it came from MAX or from the store** — where
61
+ * rows come from is the exit code's business and the diagnostics', never the answer's.
62
+ *
63
+ * `hasMore` rather than a total: a pager asks whether to offer the next page, and counting rows
64
+ * MAX has not sent is a second question with a second cost.
65
+ */
66
+ export interface Page<T> {
67
+ items: T[];
68
+ hasMore: boolean;
51
69
  }
52
70
  export interface Profile {
53
71
  id: Id;
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/domain/models.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,2GAA2G;AAC3G,MAAM,MAAM,EAAE,GAAG,MAAM,CAAA;AAEvB,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAEjE,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,EAAE,CAAA;IACN,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,QAAQ,CAAA;IACd,mEAAmE;IACnE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,iEAAiE;IACjE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,WAAW,UAAU;IACzB,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAA;CACb;A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AC5B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,WAAW,UAAU;IACzB,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,EAAE,CAAA;IACN,MAAM,EAAE,EAAE,CAAA;IACV,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAA;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,gBAAgB;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;;OAOG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,WAAW,EAAE,UAAU,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,EAAE,CAAA;IACN,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,4CAA4C;IAC5C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B;;;;;OAKG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,IAAI,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,EAAE,CAAA;IACN,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB"}
@@ -28,6 +28,7 @@ export declare const OPERATIONS: {
28
28
  readonly chats: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").LooseObjectSchema<{}, undefined>, undefined>, undefined>;
29
29
  readonly contacts: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").LooseObjectSchema<{}, undefined>, undefined>, undefined>;
30
30
  readonly messages: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
31
+ readonly token: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
31
32
  readonly presence: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
32
33
  readonly time: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
33
34
  readonly chatMarker: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"operations.generated.d.ts","sourceRoot":"","sources":["../../src/generated/operations.generated.ts"],"names":[],"mappings":"AAOA,yEAAyE;AACzE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOb,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,CAAA"}
1
+ {"version":3,"file":"operations.generated.d.ts","sourceRoot":"","sources":["../../src/generated/operations.generated.ts"],"names":[],"mappings":"AAOA,yEAAyE;AACzE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOb,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,CAAA"}
@@ -0,0 +1,54 @@
1
+ import type { Connection } from "./connection.js";
2
+ import type { Payload } from "./frame.js";
3
+ export declare const Opcode: {
4
+ readonly SESSION_INIT: 6;
5
+ readonly PROFILE: 16;
6
+ readonly LOGIN: 19;
7
+ readonly LOGOUT: 20;
8
+ /**
9
+ * Contact details by id. **Sources disagree about its neighbour**: opcode 36 is `CONTACT_LIST` in
10
+ * tsmax and PyMax, and `GET_BLOCKED` in the protocol documentation. We use 32, which both call the
11
+ * same thing, and stay away from 36 until somebody has watched what it returns.
12
+ */
13
+ readonly CONTACT_INFO: 32;
14
+ readonly CHAT_HISTORY: 49;
15
+ readonly CHATS_LIST: 53;
16
+ readonly MSG_SEND: 64;
17
+ };
18
+ /**
19
+ * What we claim to be. **We imitate MAX's own web client rather than announcing ourselves**
20
+ * (REQUIREMENTS §34), so none of these values names this tool.
21
+ *
22
+ * Shape and field names from `max-api-docs/protocol/auth.md`, cross-checked against tsmax's
23
+ * `createWebAgent`. The device identity is not here: it is generated once per profile and stored,
24
+ * because a client that presents a new device on every command is not imitating anything.
25
+ */
26
+ export declare const WEB_USER_AGENT: {
27
+ readonly deviceType: "WEB";
28
+ readonly pushDeviceType: "WEBPUSH";
29
+ readonly locale: "ru";
30
+ readonly deviceLocale: "ru";
31
+ readonly osVersion: "Linux";
32
+ readonly deviceName: "Chrome";
33
+ readonly headerUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36";
34
+ readonly appVersion: "26.5.5";
35
+ readonly screen: "1080x1920 1.0x";
36
+ readonly timezone: "Europe/Madrid";
37
+ };
38
+ export interface SessionOptions {
39
+ token: string;
40
+ deviceId: string;
41
+ /** How many chats LOGIN should return with the profile. */
42
+ chatsCount?: number;
43
+ }
44
+ /**
45
+ * INIT then LOGIN, in that order, before anything else will be answered
46
+ * (`max-api-docs/protocol/auth.md`).
47
+ *
48
+ * **`interactive` is false.** The web client sends true because a person is looking at it; we are
49
+ * a script reading, and whether that flag moves presence or read state is not settled (`RES-5`).
50
+ * Claiming a human is present when none is, is the kind of small lie that turns into a
51
+ * side effect nobody can trace.
52
+ */
53
+ export declare const startSession: (connection: Connection, { token, deviceId, chatsCount }: SessionOptions) => Promise<Payload>;
54
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/protocol/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,eAAO,MAAM,MAAM;;;;;IAKjB;;;;OAIG;;;;;CAKK,CAAA;AAEV;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;CAYjB,CAAA;AAEV,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,YAAY,UAAU,EACtB,iCAAsC,cAAc,KACnD,OAAO,CAAC,OAAO,CAYjB,CAAA"}
@@ -0,0 +1,57 @@
1
+ export const Opcode = {
2
+ SESSION_INIT: 6,
3
+ PROFILE: 16,
4
+ LOGIN: 19,
5
+ LOGOUT: 20,
6
+ /**
7
+ * Contact details by id. **Sources disagree about its neighbour**: opcode 36 is `CONTACT_LIST` in
8
+ * tsmax and PyMax, and `GET_BLOCKED` in the protocol documentation. We use 32, which both call the
9
+ * same thing, and stay away from 36 until somebody has watched what it returns.
10
+ */
11
+ CONTACT_INFO: 32,
12
+ CHAT_HISTORY: 49,
13
+ CHATS_LIST: 53,
14
+ MSG_SEND: 64,
15
+ };
16
+ /**
17
+ * What we claim to be. **We imitate MAX's own web client rather than announcing ourselves**
18
+ * (REQUIREMENTS §34), so none of these values names this tool.
19
+ *
20
+ * Shape and field names from `max-api-docs/protocol/auth.md`, cross-checked against tsmax's
21
+ * `createWebAgent`. The device identity is not here: it is generated once per profile and stored,
22
+ * because a client that presents a new device on every command is not imitating anything.
23
+ */
24
+ export const WEB_USER_AGENT = {
25
+ deviceType: "WEB",
26
+ pushDeviceType: "WEBPUSH",
27
+ locale: "ru",
28
+ deviceLocale: "ru",
29
+ osVersion: "Linux",
30
+ deviceName: "Chrome",
31
+ headerUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36",
32
+ appVersion: "26.5.5",
33
+ screen: "1080x1920 1.0x",
34
+ timezone: "Europe/Madrid",
35
+ };
36
+ /**
37
+ * INIT then LOGIN, in that order, before anything else will be answered
38
+ * (`max-api-docs/protocol/auth.md`).
39
+ *
40
+ * **`interactive` is false.** The web client sends true because a person is looking at it; we are
41
+ * a script reading, and whether that flag moves presence or read state is not settled (`RES-5`).
42
+ * Claiming a human is present when none is, is the kind of small lie that turns into a
43
+ * side effect nobody can trace.
44
+ */
45
+ export const startSession = async (connection, { token, deviceId, chatsCount = 40 }) => {
46
+ await connection.invoke(Opcode.SESSION_INIT, { userAgent: WEB_USER_AGENT, deviceId });
47
+ return await connection.invoke(Opcode.LOGIN, {
48
+ token,
49
+ interactive: false,
50
+ chatsCount,
51
+ chatsSync: 0,
52
+ contactsSync: 0,
53
+ presenceSync: 0,
54
+ draftsSync: 0,
55
+ });
56
+ };
57
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/protocol/session.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,YAAY,EAAE,CAAC;IACf,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV;;;;OAIG;IACH,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE,EAAE;CACJ,CAAA;AAEV;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,SAAS;IACzB,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE,QAAQ;IACpB,eAAe,EACb,uGAAuG;IACzG,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,gBAAgB;IACxB,QAAQ,EAAE,eAAe;CACjB,CAAA;AASV;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,UAAsB,EACtB,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,GAAG,EAAE,EAAkB,EAClC,EAAE;IACpB,MAAM,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAA;IAErF,OAAO,MAAM,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;QAC3C,KAAK;QACL,WAAW,EAAE,KAAK;QAClB,UAAU;QACV,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,CAAC;KACd,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,22 @@
1
+ import type { MaxClient } from "../client.js";
2
+ import type { SessionStore } from "./store.js";
3
+ /**
4
+ * Takes a token into a profile — **logging in first, and writing to the keyring only after.**
5
+ *
6
+ * The order is the whole point, and it is the opposite of what the command did until 2026-09-21.
7
+ * Writing first looks harmless because the login is about to happen anyway; what it actually means
8
+ * is that a typo, an expired token or a browser tab that has been closed replaces a *working*
9
+ * credential with a dead one. There is no way back: `Credentials.write` overwrites unconditionally
10
+ * and a keyring entry cannot be read out again afterwards. The same shape destroyed two working
11
+ * keys in `brazecli` on 2026-09-14 — `cli-core`'s own `credentials.ts` says so.
12
+ *
13
+ * Restoring the old token after a failed login was the obvious alternative and is worse: a process
14
+ * killed between the write and the restore leaves the profile broken. Here nothing is written until
15
+ * there is something worth writing, so there is no window to die in.
16
+ *
17
+ * It lives beside `handshake.ts` rather than in the command for the same reason that one does:
18
+ * `forCommand` builds its own store and its own socket, so anything left inside a command action
19
+ * cannot be driven by a test — and this ordering is too expensive to hold on trust.
20
+ */
21
+ export declare const adoptToken: (client: MaxClient, store: SessionStore, token: string) => Promise<void>;
22
+ //# sourceMappingURL=adopt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/session/adopt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU,GAAU,QAAQ,SAAS,EAAE,OAAO,YAAY,EAAE,OAAO,MAAM,KAAG,OAAO,CAAC,IAAI,CASpG,CAAA"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Takes a token into a profile — **logging in first, and writing to the keyring only after.**
3
+ *
4
+ * The order is the whole point, and it is the opposite of what the command did until 2026-09-21.
5
+ * Writing first looks harmless because the login is about to happen anyway; what it actually means
6
+ * is that a typo, an expired token or a browser tab that has been closed replaces a *working*
7
+ * credential with a dead one. There is no way back: `Credentials.write` overwrites unconditionally
8
+ * and a keyring entry cannot be read out again afterwards. The same shape destroyed two working
9
+ * keys in `brazecli` on 2026-09-14 — `cli-core`'s own `credentials.ts` says so.
10
+ *
11
+ * Restoring the old token after a failed login was the obvious alternative and is worse: a process
12
+ * killed between the write and the restore leaves the profile broken. Here nothing is written until
13
+ * there is something worth writing, so there is no window to die in.
14
+ *
15
+ * It lives beside `handshake.ts` rather than in the command for the same reason that one does:
16
+ * `forCommand` builds its own store and its own socket, so anything left inside a command action
17
+ * cannot be driven by a test — and this ordering is too expensive to hold on trust.
18
+ */
19
+ export const adoptToken = async (client, store, token) => {
20
+ await client.connect({ token });
21
+ // ⚠ **Only if the login did not already leave a better one.** MAX answers every login with a
22
+ // fresh token and `connect` now keeps it (`MAX-11`); writing the pasted one here unconditionally
23
+ // would replace that with the credential the person copied out of a browser, which is the older
24
+ // of the two. The check also covers the case where the keyring write failed inside `connect`:
25
+ // then there is nothing stored, and what was pasted is better than nothing.
26
+ if (store.readToken() === undefined)
27
+ store.writeToken(token);
28
+ };
29
+ //# sourceMappingURL=adopt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adopt.js","sourceRoot":"","sources":["../../src/session/adopt.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,MAAiB,EAAE,KAAmB,EAAE,KAAa,EAAiB,EAAE;IACvG,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAE/B,6FAA6F;IAC7F,iGAAiG;IACjG,gGAAgG;IAChG,8FAA8F;IAC9F,4EAA4E;IAC5E,IAAI,KAAK,CAAC,SAAS,EAAE,KAAK,SAAS;QAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;AAC9D,CAAC,CAAA"}
@@ -5,6 +5,19 @@ export interface SessionOptions {
5
5
  deviceId: string;
6
6
  /** How many chats LOGIN should return with the profile. The specification caps it at 100. */
7
7
  chatsCount?: number;
8
+ /**
9
+ * The `time` the previous login answered with, or `0` for "send me everything".
10
+ *
11
+ * **The four markers are moments, not flags** — measured 2026-09-20. MAX returns only what
12
+ * changed in each collection since the one given, so a stored marker is the difference between
13
+ * re-fetching every chat and every contact on every invocation and receiving the handful that
14
+ * moved. Where it is kept, and why the merge and the marker share a transaction, is
15
+ * `ARCHITECTURE.md`.
16
+ *
17
+ * All four carry the same value: nothing reads presence or drafts, and sending the marker in
18
+ * those two as well was measured harmless on the real account (`NEED-103`).
19
+ */
20
+ sync?: number;
8
21
  }
9
22
  /**
10
23
  * INIT then LOGIN, in that order, before anything else will be answered
@@ -22,5 +35,5 @@ export interface SessionOptions {
22
35
  * diagnostic hook in `MaxClient` saw nothing of the two requests every single invocation makes,
23
36
  * and `max chats list` answers from the LOGIN response without sending anything else.
24
37
  */
25
- export declare const startSession: (invoke: Invoke, { token, deviceId, chatsCount }: SessionOptions) => Promise<Payload>;
38
+ export declare const startSession: (invoke: Invoke, { token, deviceId, chatsCount, sync }: SessionOptions) => Promise<Payload>;
26
39
  //# sourceMappingURL=handshake.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handshake.d.ts","sourceRoot":"","sources":["../../src/session/handshake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAInD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,MAAM,EACd,iCAAsC,cAAc,KACnD,OAAO,CAAC,OAAO,CAajB,CAAA"}
1
+ {"version":3,"file":"handshake.d.ts","sourceRoot":"","sources":["../../src/session/handshake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAInD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,MAAM,EACd,uCAAgD,cAAc,KAC7D,OAAO,CAAC,OAAO,CAajB,CAAA"}
@@ -16,17 +16,17 @@ import { sessionInit, sessionLogin } from "../spec/operations/session.js";
16
16
  * diagnostic hook in `MaxClient` saw nothing of the two requests every single invocation makes,
17
17
  * and `max chats list` answers from the LOGIN response without sending anything else.
18
18
  */
19
- export const startSession = async (invoke, { token, deviceId, chatsCount = 40 }) => {
19
+ export const startSession = async (invoke, { token, deviceId, chatsCount = 40, sync = 0 }) => {
20
20
  await invoke(sessionInit, { userAgent: WEB_USER_AGENT, deviceId });
21
21
  return await invoke(sessionLogin, {
22
22
  token,
23
23
  // A script reading is not a person looking; see the specification for why this is never true.
24
24
  interactive: false,
25
25
  chatsCount,
26
- chatsSync: 0,
27
- contactsSync: 0,
28
- presenceSync: 0,
29
- draftsSync: 0,
26
+ chatsSync: sync,
27
+ contactsSync: sync,
28
+ presenceSync: sync,
29
+ draftsSync: sync,
30
30
  });
31
31
  };
32
32
  //# sourceMappingURL=handshake.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"handshake.js","sourceRoot":"","sources":["../../src/session/handshake.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AASzE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,MAAc,EACd,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,GAAG,EAAE,EAAkB,EAClC,EAAE;IACpB,MAAM,MAAM,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAA;IAElE,OAAO,MAAM,MAAM,CAAC,YAAY,EAAE;QAChC,KAAK;QACL,8FAA8F;QAC9F,WAAW,EAAE,KAAK;QAClB,UAAU;QACV,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,CAAC;KACd,CAAC,CAAA;AACJ,CAAC,CAAA"}
1
+ {"version":3,"file":"handshake.js","sourceRoot":"","sources":["../../src/session/handshake.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAsBzE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,MAAc,EACd,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,GAAG,CAAC,EAAkB,EAC5C,EAAE;IACpB,MAAM,MAAM,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAA;IAElE,OAAO,MAAM,MAAM,CAAC,YAAY,EAAE;QAChC,KAAK;QACL,8FAA8F;QAC9F,WAAW,EAAE,KAAK;QAClB,UAAU;QACV,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;KACjB,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,42 @@
1
+ import * as v from "valibot";
2
+ export declare const sessionInit: import("../define.js").Operation<v.StrictObjectSchema<{
3
+ readonly userAgent: v.StrictObjectSchema<{
4
+ readonly deviceType: v.LiteralSchema<"WEB", undefined>;
5
+ readonly pushDeviceType: v.LiteralSchema<"WEBPUSH", undefined>;
6
+ readonly locale: v.StringSchema<undefined>;
7
+ readonly deviceLocale: v.StringSchema<undefined>;
8
+ readonly osVersion: v.StringSchema<undefined>;
9
+ readonly deviceName: v.StringSchema<undefined>;
10
+ readonly headerUserAgent: v.StringSchema<undefined>;
11
+ readonly appVersion: v.StringSchema<undefined>;
12
+ readonly screen: v.StringSchema<undefined>;
13
+ readonly timezone: v.StringSchema<undefined>;
14
+ }, undefined>;
15
+ readonly deviceId: v.StringSchema<undefined>;
16
+ }, undefined>, v.LooseObjectSchema<{}, undefined>>;
17
+ export declare const sessionLogin: import("../define.js").Operation<v.StrictObjectSchema<{
18
+ readonly token: v.StringSchema<undefined>;
19
+ /**
20
+ * False, always. The web client sends true because a person is looking at it; we are a script
21
+ * reading, and claiming a human is present is the small lie that becomes a side effect nobody
22
+ * can trace (`RES-5`).
23
+ */
24
+ readonly interactive: v.LiteralSchema<false, undefined>;
25
+ readonly chatsCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>;
26
+ readonly chatsSync: v.NumberSchema<undefined>;
27
+ readonly contactsSync: v.NumberSchema<undefined>;
28
+ readonly presenceSync: v.NumberSchema<undefined>;
29
+ readonly draftsSync: v.NumberSchema<undefined>;
30
+ }, undefined>, v.LooseObjectSchema<{
31
+ readonly profile: v.OptionalSchema<v.LooseObjectSchema<{}, undefined>, undefined>;
32
+ readonly chats: v.OptionalSchema<v.ArraySchema<v.LooseObjectSchema<{}, undefined>, undefined>, undefined>;
33
+ readonly contacts: v.OptionalSchema<v.ArraySchema<v.LooseObjectSchema<{}, undefined>, undefined>, undefined>;
34
+ readonly messages: v.OptionalSchema<v.ArraySchema<v.LooseObjectSchema<{}, undefined>, undefined>, undefined>;
35
+ readonly presence: v.OptionalSchema<v.UnknownSchema, undefined>;
36
+ readonly time: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
37
+ readonly chatMarker: v.OptionalSchema<v.UnknownSchema, undefined>;
38
+ readonly config: v.OptionalSchema<v.UnknownSchema, undefined>;
39
+ readonly videoChatHistory: v.OptionalSchema<v.UnknownSchema, undefined>;
40
+ }, undefined>>;
41
+ export declare const logout: import("../define.js").Reservation;
42
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/spec/operations/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAsB5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;kDAYtB,CAAA;AAEF,eAAO,MAAM,YAAY;;IAOrB;;;;OAIG;;;;;;;;;;;;;;;;;cA2BL,CAAA;AAEF,eAAO,MAAM,MAAM,oCAOjB,CAAA"}
@@ -59,6 +59,22 @@ export declare const sessionLogin: import("../define.js").Operation<v.StrictObje
59
59
  * Left as `unknown` until somebody looks (`PROTO-6`). `pnpm probe:ids` reports its type and key count.
60
60
  */
61
61
  readonly messages: v.OptionalSchema<v.UnknownSchema, undefined>;
62
+ /**
63
+ * **A replacement for a credential that has aged** — measured on the real account 2026-09-22
64
+ * (`pnpm probe:token`). Logging in with a token pasted months earlier answers with a different
65
+ * one; logging in with *that* one answers with the same one back. So it is an exchange that
66
+ * happens once, not a rotation on every login.
67
+ *
68
+ * It was undeclared until then, so the exchange happened on every login and the client threw
69
+ * the result away, leaving the profile on whatever was pasted in months ago (`MAX-11`,
70
+ * `NEED-106`). The old token goes on working, which is why this is hygiene rather than repair.
71
+ * `NEED-8` had asserted the rotation in 2026-09-18 on the strength of `tsmax/src/app.ts:99` —
72
+ * somebody else's client — which is a claim; this is the measurement.
73
+ *
74
+ * ⚠ **It is a credential.** Nothing may print it, log it or put it in a fixture. `MaxClient`
75
+ * writes it to the keyring and never returns it.
76
+ */
77
+ readonly token: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
62
78
  readonly presence: v.OptionalSchema<v.UnknownSchema, undefined>;
63
79
  readonly time: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
64
80
  readonly chatMarker: v.OptionalSchema<v.UnknownSchema, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/spec/operations/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAsB5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;kDAYtB,CAAA;AAEF,eAAO,MAAM,YAAY;;IAOrB;;;;OAIG;;;IAKH;;;;;;;;;;;OAWG;;;;;;;;;IAUH;;;;;;;;;;;;;;OAcG;;;;;;;cAcL,CAAA;AAEF,eAAO,MAAM,MAAM,oCAOjB,CAAA"}
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/spec/operations/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAsB5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;kDAYtB,CAAA;AAEF,eAAO,MAAM,YAAY;;IAOrB;;;;OAIG;;;IAKH;;;;;;;;;;;OAWG;;;;;;;;;IAUH;;;;;;;;;;;;;;OAcG;;IAEH;;;;;;;;;;;;;;OAcG;;;;;;;cAkBL,CAAA;AAEF,eAAO,MAAM,MAAM,oCAOjB,CAAA"}
@@ -84,6 +84,22 @@ export const sessionLogin = defineOperation({
84
84
  * Left as `unknown` until somebody looks (`PROTO-6`). `pnpm probe:ids` reports its type and key count.
85
85
  */
86
86
  messages: v.optional(v.unknown()),
87
+ /**
88
+ * **A replacement for a credential that has aged** — measured on the real account 2026-09-22
89
+ * (`pnpm probe:token`). Logging in with a token pasted months earlier answers with a different
90
+ * one; logging in with *that* one answers with the same one back. So it is an exchange that
91
+ * happens once, not a rotation on every login.
92
+ *
93
+ * It was undeclared until then, so the exchange happened on every login and the client threw
94
+ * the result away, leaving the profile on whatever was pasted in months ago (`MAX-11`,
95
+ * `NEED-106`). The old token goes on working, which is why this is hygiene rather than repair.
96
+ * `NEED-8` had asserted the rotation in 2026-09-18 on the strength of `tsmax/src/app.ts:99` —
97
+ * somebody else's client — which is a claim; this is the measurement.
98
+ *
99
+ * ⚠ **It is a credential.** Nothing may print it, log it or put it in a fixture. `MaxClient`
100
+ * writes it to the keyring and never returns it.
101
+ */
102
+ token: v.optional(v.string()),
87
103
  presence: v.optional(v.unknown()),
88
104
  time: v.optional(v.number()),
89
105
  chatMarker: v.optional(v.unknown()),
@@ -92,7 +108,11 @@ export const sessionLogin = defineOperation({
92
108
  }),
93
109
  provenance: {
94
110
  confidence: "measured",
95
- sources: ["measured against MAX 2026-09-19", "measured against MAX 2026-09-20 (`messages` is an object)"],
111
+ sources: [
112
+ "measured against MAX 2026-09-19",
113
+ "measured against MAX 2026-09-20 (`messages` is an object)",
114
+ "measured against MAX 2026-09-22 (`token` replaces a stale credential once, then repeats)",
115
+ ],
96
116
  notes: "Unusually generous: the answer carries the profile, chats, contacts and recent messages, so `me` and `chats` need no further request.",
97
117
  },
98
118
  });
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/spec/operations/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE7D;;;;;GAKG;AACH,MAAM,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC;IAClC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5B,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;IACzC,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC1E,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;IAC3B,UAAU,EAAE;QACV,UAAU,EAAE,UAAU;Q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;KAC1C,CAAC;IACF,UAAU,EAAE;QACV,UAAU,EAAE,UAAU;QACtB,OAAO,EAAE;YACP,iCAAiC;YACjC,2DAA2D;YAC3D,0FAA0F;SAC3F;QACD,KAAK,EACH,uIAAuI;KAC1I;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC;IAClC,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,EAAE;IACV,MAAM,EACJ,sMAAsM;IACxM,UAAU,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,+BAA+B,CAAC,EAAE;CACnF,CAAC,CAAA"}
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** The one the running command reports. `pnpm version:check` fails when it and package.json disagree. */
2
- export declare const VERSION = "0.1.0";
2
+ export declare const VERSION = "0.2.0";
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /** The one the running command reports. `pnpm version:check` fails when it and package.json disagree. */
2
- export const VERSION = "0.1.0";
2
+ export const VERSION = "0.2.0";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leemour/max-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A local command line interface for a personal MAX Messenger account, built for agents and scripts",
5
5
  "license": "MIT",
6
6
  "author": "Viacheslav Ptsarev",
@@ -41,7 +41,7 @@
41
41
  "scripts": {
42
42
  "build": "tsc --build",
43
43
  "generate": "pnpm build && node --experimental-strip-types scripts/generate.ts && node --experimental-strip-types scripts/commands.ts",
44
- "typecheck": "tsc --build --force --emitDeclarationOnly && tsc -p tsconfig.test.json",
44
+ "typecheck": "tsc --build --force --emitDeclarationOnly && tsc -p tsconfig.test.json && tsc -p tsconfig.scripts.json",
45
45
  "lint": "biome check .",
46
46
  "lint:fix": "biome check --write .",
47
47
  "test": "vitest run",
@@ -53,6 +53,7 @@
53
53
  "probe:edits": "pnpm build && node --experimental-strip-types scripts/probe-edits.ts",
54
54
  "verify:live": "pnpm build && node --experimental-strip-types scripts/verify-commands.ts",
55
55
  "secrets:scan": "gitleaks git --no-banner --redact .",
56
- "probe:contacts": "pnpm build && node --experimental-strip-types scripts/probe-contacts.ts"
56
+ "probe:contacts": "pnpm build && node --experimental-strip-types scripts/probe-contacts.ts",
57
+ "probe:token": "pnpm build && node --experimental-strip-types scripts/probe-token.ts"
57
58
  }
58
59
  }