@lobu/runtime-device 22.0.0 → 24.0.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 (115) hide show
  1. package/dist/component.json +1 -1
  2. package/dist/dependencies.bun.lock +33 -30
  3. package/npm-shrinkwrap.json +140 -124
  4. package/package.json +2 -1
  5. package/vendor/cli/dist/bundled-skills/lobu/SKILL.md +74 -1
  6. package/vendor/cli/dist/commands/_lib/apply/apply-cmd.js +9 -11
  7. package/vendor/cli/dist/commands/_lib/apply/client.d.ts +3 -11
  8. package/vendor/cli/dist/commands/_lib/apply/client.js +3 -3
  9. package/vendor/cli/dist/commands/_lib/apply/desired-state.d.ts +0 -6
  10. package/vendor/cli/dist/commands/_lib/apply/desired-state.js +6 -15
  11. package/vendor/cli/dist/commands/_lib/apply/diff.js +1 -0
  12. package/vendor/cli/dist/commands/_lib/apply/map-config.js +8 -0
  13. package/vendor/cli/dist/commands/_lib/view-bundler.d.ts +2 -9
  14. package/vendor/cli/dist/commands/_lib/view-bundler.js +25 -97
  15. package/vendor/cli/dist/config/define.d.ts +8 -0
  16. package/vendor/cli/dist/connectors/README.md +15 -2
  17. package/vendor/cli/dist/connectors/google_gmail.ts +1 -0
  18. package/vendor/cli/dist/connectors/jira-helpers.ts +313 -0
  19. package/vendor/cli/dist/connectors/jira.ts +29 -221
  20. package/vendor/cli/dist/connectors/linkedin-browser-script.ts +13 -0
  21. package/vendor/cli/dist/connectors/linkedin-draft-page.js +104 -0
  22. package/vendor/cli/dist/connectors/linkedin-drafts.ts +73 -0
  23. package/vendor/cli/dist/connectors/linkedin-identity.ts +32 -0
  24. package/vendor/cli/dist/connectors/linkedin-inbox-adapter.js +1182 -0
  25. package/vendor/cli/dist/connectors/linkedin-inbox.ts +156 -0
  26. package/vendor/cli/dist/connectors/linkedin-like.ts +114 -0
  27. package/vendor/cli/dist/connectors/linkedin-takeout.ts +577 -0
  28. package/vendor/cli/dist/connectors/linkedin.ts +4017 -0
  29. package/vendor/cli/dist/connectors/reddit.ts +92 -20
  30. package/vendor/cli/dist/connectors/slack.ts +1 -0
  31. package/vendor/cli/dist/connectors/takeout-utils.ts +240 -0
  32. package/vendor/cli/dist/connectors/tiktok-inbox-page.js +9 -9
  33. package/vendor/cli/dist/connectors/tiktok-web-page.js +21 -15
  34. package/vendor/cli/dist/connectors/tiktok_web.ts +63 -30
  35. package/vendor/cli/dist/connectors/whatsapp-web-adapter.js +104 -574
  36. package/vendor/cli/dist/connectors/whatsapp-web-helpers.ts +30 -444
  37. package/vendor/cli/dist/connectors/whatsapp-web-identity.ts +20 -6
  38. package/vendor/cli/dist/connectors/whatsapp_web.ts +46 -646
  39. package/vendor/cli/dist/connectors/x-dm-adapter.js +556 -0
  40. package/vendor/cli/dist/connectors/x-identity.ts +33 -2
  41. package/vendor/cli/dist/connectors/x.ts +266 -120
  42. package/vendor/cli/dist/runtime-components.json +4 -4
  43. package/vendor/cli/dist/templates/AGENTS.md.tmpl +12 -5
  44. package/vendor/cli/package.json +1 -1
  45. package/vendor/connector-sdk/dist/browser-handoff-banner.d.ts +39 -0
  46. package/vendor/connector-sdk/dist/browser-handoff-banner.js +175 -0
  47. package/vendor/connector-sdk/dist/browser-source-read.d.ts +52 -0
  48. package/vendor/connector-sdk/dist/browser-source-read.js +107 -0
  49. package/vendor/connector-sdk/dist/connector-types.d.ts +10 -0
  50. package/vendor/connector-sdk/dist/index.d.ts +3 -0
  51. package/vendor/connector-sdk/dist/index.js +2 -0
  52. package/vendor/connector-sdk/package.json +9 -1
  53. package/vendor/connector-worker/dist/agent-turn/gateway-tools.d.ts +2 -2
  54. package/vendor/connector-worker/dist/agent-turn/gateway-tools.js +2 -2
  55. package/vendor/connector-worker/dist/agent-turn/guest-entry.js +49 -8
  56. package/vendor/connector-worker/dist/agent-turn/guest.bundle.js +650 -448
  57. package/vendor/connector-worker/dist/agent-turn/native-session.d.ts +12 -0
  58. package/vendor/connector-worker/dist/agent-turn/native-session.js +32 -6
  59. package/vendor/connector-worker/dist/agent-turn/types.d.ts +24 -3
  60. package/vendor/connector-worker/dist/daemon/agent-turn.js +5 -1
  61. package/vendor/connector-worker/dist/daemon/automation.d.ts +4 -11
  62. package/vendor/connector-worker/dist/daemon/automation.js +26 -21
  63. package/vendor/connector-worker/dist/daemon/client.d.ts +2 -4
  64. package/vendor/connector-worker/dist/daemon/client.js +0 -3
  65. package/vendor/connector-worker/dist/daemon/executor.js +0 -3
  66. package/vendor/connector-worker/dist/daemon/mac-device-daemon.d.ts +4 -3
  67. package/vendor/connector-worker/dist/daemon/mac-device-daemon.js +4 -10
  68. package/vendor/connector-worker/dist/daemon/native-bridge/executor.js +27 -25
  69. package/vendor/connector-worker/dist/daemon/start.js +3 -15
  70. package/vendor/connector-worker/dist/daemon/terminal-failure.js +0 -11
  71. package/vendor/connector-worker/dist/daemon/worker-id.d.ts +17 -0
  72. package/vendor/connector-worker/dist/daemon/worker-id.js +22 -0
  73. package/vendor/connector-worker/dist/isolate/prelude.js +93 -44
  74. package/vendor/connector-worker/dist/mac-device-daemon.js +14 -26
  75. package/vendor/connector-worker/package.json +1 -1
  76. package/vendor/core/dist/agent-policy.js +0 -3
  77. package/vendor/core/dist/agent-tooling.d.ts +1 -1
  78. package/vendor/core/dist/agent-tooling.js +3 -1
  79. package/vendor/core/dist/capabilities.d.ts +1 -1
  80. package/vendor/core/dist/capabilities.js +0 -1
  81. package/vendor/core/dist/connector-query-errors.d.ts +32 -0
  82. package/vendor/core/dist/connector-query-errors.js +41 -1
  83. package/vendor/core/dist/contracts/agent-settings.d.ts +6 -2
  84. package/vendor/core/dist/contracts/agent-settings.js +12 -1
  85. package/vendor/core/dist/contracts/tools/manage-conversations.js +2 -2
  86. package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +14 -0
  87. package/vendor/core/dist/contracts/tools/manage-feeds.js +17 -0
  88. package/vendor/core/dist/contracts/tools/manage-views.d.ts +53 -234
  89. package/vendor/core/dist/contracts/tools/manage-views.js +50 -76
  90. package/vendor/core/dist/contracts/tools/view-attach.d.ts +5 -8
  91. package/vendor/core/dist/contracts/tools/view-attach.js +14 -31
  92. package/vendor/core/dist/contracts/tools/view-definition.d.ts +21 -0
  93. package/vendor/core/dist/contracts/tools/view-definition.js +165 -0
  94. package/vendor/core/dist/contracts/worker/protocol.d.ts +47 -133
  95. package/vendor/core/dist/contracts/worker/protocol.js +33 -62
  96. package/vendor/core/dist/device-pin-tombstones.d.ts +44 -0
  97. package/vendor/core/dist/device-pin-tombstones.js +57 -0
  98. package/vendor/core/dist/index.d.ts +3 -2
  99. package/vendor/core/dist/index.js +3 -1
  100. package/vendor/core/dist/logger.js +10 -25
  101. package/vendor/core/dist/suggestions.d.ts +15 -2
  102. package/vendor/core/dist/suggestions.js +48 -3
  103. package/vendor/core/dist/types.d.ts +26 -0
  104. package/vendor/core/dist/types.js +5 -0
  105. package/vendor/core/dist/utils/diagnostic-scrubber.js +258 -21
  106. package/vendor/core/dist/worker/wire.d.ts +0 -10
  107. package/vendor/core/package.json +16 -10
  108. package/vendor/postgres/cf/src/connection.js +18 -0
  109. package/vendor/postgres/cjs/src/connection.js +18 -0
  110. package/vendor/postgres/src/connection.js +18 -0
  111. package/vendor/connector-worker/dist/daemon/device-chat.d.ts +0 -9
  112. package/vendor/connector-worker/dist/daemon/device-chat.js +0 -61
  113. package/vendor/core/dist/contracts/worker/device-chat.d.ts +0 -4
  114. package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
  115. /package/vendor/postgres/{.bun-tag-f39dafdb2305d504 → .bun-tag-2f292c6554a8475e} +0 -0
@@ -1,4 +1,7 @@
1
1
  import {
2
+ assertInboxSourceRead,
3
+ assertPositiveReadLimit,
4
+ assertSnapshotSourceRead,
2
5
  ConnectorRuntime,
3
6
  requireBrowser,
4
7
  type ActionContext,
@@ -26,10 +29,15 @@ export function normalizeTikTokPostUrl(value: unknown): string {
26
29
  return `${ORIGIN}${url.pathname}`;
27
30
  }
28
31
 
32
+ function hasPostIdentity(item: RecordValue): boolean {
33
+ const author = object(item.author);
34
+ return typeof item.id === "string" && /^[0-9]+$/.test(item.id) && typeof author.uniqueId === "string" && HANDLE.test(author.uniqueId);
35
+ }
36
+
29
37
  export function normalizeTikTokPost(value: unknown): RecordValue {
30
38
  const item = object(value);
31
39
  const author = object(item.author);
32
- if (typeof item.id !== "string" || !/^[0-9]+$/.test(item.id) || typeof author.uniqueId !== "string" || !HANDLE.test(author.uniqueId)) {
40
+ if (!hasPostIdentity(item)) {
33
41
  throw new Error("TikTok returned a post without a valid source identity");
34
42
  }
35
43
  const video = object(item.video);
@@ -49,29 +57,49 @@ export function normalizeTikTokPost(value: unknown): RecordValue {
49
57
  };
50
58
  }
51
59
 
60
+ // Keep structured page failures in a successful CDP value. CDP exceptions only
61
+ // preserve prose, which cannot safely distinguish a challenge from a timeout.
62
+ function pageExpression(source: string): string {
63
+ return `Promise.resolve().then(() => ${source}).catch(error => { if (!error.browser_interruption) throw error; return { __lobu_browser_interruption: { reason: error.browser_interruption, message: error.message } }; })`;
64
+ }
65
+
52
66
  function expression(command: string, args: RecordValue = {}): string {
53
- return `(${tiktokPage.toString()})(${JSON.stringify(command)},${JSON.stringify(args)})`;
67
+ return pageExpression(`(${tiktokPage.toString()})(${JSON.stringify(command)},${JSON.stringify(args)})`);
54
68
  }
55
69
 
56
70
  async function page(browser: ChromeActionDispatcher, tabId: number, command: string, args: RecordValue = {}): Promise<RecordValue> {
57
71
  const output = await browser.dispatch("evaluate", { tab_id: tabId, expression: expression(command, args), allowed_origins: ORIGINS });
72
+ // Only the source-read bridge throws a typed interruption; operation and
73
+ // worker dispatchers return the marker as a completed value.
74
+ const interruption = object(object(output.value).__lobu_browser_interruption);
75
+ if (interruption.reason) throw new Error(String(interruption.message));
58
76
  if (!output.value || typeof output.value !== "object") throw new Error("TikTok page returned no data");
59
77
  return object(output.value);
60
78
  }
61
79
 
62
80
  async function scratch<T>(browser: ChromeActionDispatcher, run: (tabId: number) => Promise<T>): Promise<T> {
63
- const nav = await browser.dispatch("navigate", { url: "about:blank", new_tab: true, allowed_origins: ORIGINS });
81
+ const nav = await browser.dispatch("navigate", { url: "about:blank", new_tab: true, retain_on_interruption: true, allowed_origins: ORIGINS });
64
82
  if (typeof nav.tab_id !== "number") throw new Error("TikTok scratch tab was not created");
65
83
  try { return await run(nav.tab_id); }
66
84
  finally { await browser.dispatch("close_tab", { tab_id: nav.tab_id, allowed_origins: ORIGINS }); }
67
85
  }
68
86
 
87
+ async function waitFor(browser: ChromeActionDispatcher, tabId: number, selector: string): Promise<void> {
88
+ try { await browser.dispatch("wait_for_selector", { tab_id: tabId, selector, timeout_ms: 15000, allowed_origins: ORIGINS }); }
89
+ catch (error) {
90
+ // Inspect the page while it is still owned. A selector timeout alone is
91
+ // neither verification evidence nor permission for a recovery handoff.
92
+ await page(browser, tabId, "read_failure");
93
+ throw error;
94
+ }
95
+ }
96
+
69
97
  async function navigate(browser: ChromeActionDispatcher, tabId: number, url: string, focus = false): Promise<void> {
70
98
  await browser.dispatch("navigate", { tab_id: tabId, url, allowed_origins: ORIGINS });
71
99
  // TikTok's video page can remain blank in a fresh background tab. Its own
72
100
  // controls appeared immediately after focus in the live browser probe.
73
101
  if (focus) await browser.dispatch("focus_tab", { tab_id: tabId, draw_attention: false, allowed_origins: ORIGINS });
74
- await browser.dispatch("wait_for_selector", { tab_id: tabId, selector: '[data-e2e="nav-profile"]', timeout_ms: 15000, allowed_origins: ORIGINS });
102
+ await waitFor(browser, tabId, '[data-e2e="nav-profile"]');
75
103
  }
76
104
 
77
105
  async function sourcePost(browser: ChromeActionDispatcher, tabId: number, url: string): Promise<RecordValue> {
@@ -83,7 +111,7 @@ async function sourcePost(browser: ChromeActionDispatcher, tabId: number, url: s
83
111
  if (typeof start.session_id !== "string") throw new Error("TikTok photo capture did not start");
84
112
  try {
85
113
  await navigate(browser, tabId, url);
86
- await browser.dispatch("wait_for_selector", { tab_id: tabId, selector: '[data-e2e="recommend-list-item-container"] .swiper', timeout_ms: 15000, allowed_origins: ORIGINS });
114
+ await waitFor(browser, tabId, '[data-e2e="recommend-list-item-container"] .swiper');
87
115
  const data = await browser.dispatch("network_intercept_drain", { session_id: start.session_id, allowed_origins: ORIGINS });
88
116
  for (const response of Array.isArray(data.responses) ? data.responses : []) {
89
117
  const r = object(response);
@@ -98,25 +126,31 @@ async function sourcePost(browser: ChromeActionDispatcher, tabId: number, url: s
98
126
  }
99
127
  }
100
128
 
101
- async function followingPosts(browser: ChromeActionDispatcher, tabId: number, sessionId: string, limit: number): Promise<RecordValue[]> {
129
+ async function timelinePosts(browser: ChromeActionDispatcher, tabId: number, sessionId: string, limit: number, feedKey: "for_you" | "following"): Promise<RecordValue[]> {
130
+ const endpoint = feedKey === "following" ? "following" : "recommend";
131
+ const label = feedKey === "following" ? "Following" : "For You";
102
132
  const unique = new Map<unknown, RecordValue>();
103
133
  let continuation: RecordValue | undefined;
104
134
  for (let poll = 0; poll < 5; poll++) {
105
- await page(browser, tabId, poll ? "following_wait" : "following_status");
135
+ await page(browser, tabId, `${feedKey}_${poll ? "wait" : "status"}`);
106
136
  const data = await browser.dispatch("network_intercept_drain", { session_id: sessionId, allowed_origins: ORIGINS });
107
- if (data.missing || !Array.isArray(data.responses)) throw new Error("TikTok Following capture is unavailable");
137
+ if (data.missing || !Array.isArray(data.responses)) throw new Error(`TikTok ${label} capture is unavailable`);
108
138
  for (const response of data.responses) {
109
139
  const r = object(response);
110
140
  const url = new URL(String(r.url));
111
- if (url.origin !== ORIGIN || url.pathname !== "/api/following/item_list/" || url.username || url.password) throw new Error("TikTok Following capture has an unexpected URL");
112
- if (r.status !== 200 || r.truncated || r.base64_encoded || typeof r.body !== "string") throw new Error("TikTok Following response is unavailable or truncated");
141
+ if (url.origin !== ORIGIN || url.pathname !== `/api/${endpoint}/item_list/` || url.username || url.password) throw new Error(`TikTok ${label} capture has an unexpected URL`);
142
+ if (r.status !== 200 || r.truncated || r.base64_encoded || typeof r.body !== "string") throw new Error(`TikTok ${label} response is unavailable or truncated`);
113
143
  const json = object(JSON.parse(r.body));
114
- if (json.status_code !== 0 || (json.statusCode !== undefined && json.statusCode !== 0) || !Array.isArray(json.itemList) || typeof json.hasMore !== "boolean") throw new Error("TikTok did not return a successful Following feed");
144
+ if (json.status_code !== 0 || (json.statusCode !== undefined && json.statusCode !== 0) || !Array.isArray(json.itemList) || typeof json.hasMore !== "boolean") throw new Error(`TikTok did not return a successful ${label} feed`);
115
145
  for (const item of json.itemList) {
146
+ const record = object(item);
147
+ // Some recommendation ads use an advertiser label in uniqueId,
148
+ // not a creator handle. They cannot produce a canonical post URL.
149
+ if (feedKey === "for_you" && record.isAd === true && !hasPostIdentity(record)) continue;
116
150
  const row = normalizeTikTokPost(item);
117
151
  unique.set(row.origin_id, row);
118
152
  }
119
- continuation = json.hasMore ? { url: url.href, cursor: json.cursor, level: json.level } : undefined;
153
+ continuation = feedKey === "following" && json.hasMore ? { url: url.href, cursor: json.cursor, level: json.level } : undefined;
120
154
  }
121
155
  if (data.responses.length) break;
122
156
  }
@@ -131,14 +165,14 @@ async function followingPosts(browser: ChromeActionDispatcher, tabId: number, se
131
165
  }
132
166
  }
133
167
  // Do not return a successful partial read when a late challenge appeared.
134
- await page(browser, tabId, "following_status");
168
+ await page(browser, tabId, `${feedKey}_status`);
135
169
  return [...unique.values()];
136
170
  }
137
171
 
138
172
  async function readTikTokSnapshot(ctx: FeedReadContext): Promise<FeedReadResult> {
139
- if (ctx.cursor || ctx.offset || ctx.sort || ctx.window || ctx.match) throw new Error("TikTok snapshot feeds do not support pagination, sorting, time windows, or exact-match filters");
173
+ assertSnapshotSourceRead(ctx, "TikTok");
140
174
  if (ctx.query && ctx.feedKey !== "search") throw new Error("Use the TikTok search feed for queries");
141
- if (ctx.limit !== undefined && (!Number.isInteger(ctx.limit) || ctx.limit < 1)) throw new Error("limit must be a positive integer");
175
+ assertPositiveReadLimit(ctx);
142
176
  const limit = Math.min(ctx.limit ?? 10, 30);
143
177
  let url = ORIGIN;
144
178
  if (ctx.feedKey === "following") url += "/following";
@@ -151,28 +185,26 @@ async function readTikTokSnapshot(ctx: FeedReadContext): Promise<FeedReadResult>
151
185
  return scratch(browser, async tabId => {
152
186
  let sessionId: string | undefined;
153
187
  try {
154
- if (ctx.feedKey === "following") {
155
- const start = await browser.dispatch("network_intercept_start", { tab_id: tabId, patterns: [`${ORIGIN}/api/following/item_list/**`], max_body_bytes: 2097152, max_buffer_responses: 10, allowed_origins: ORIGINS });
188
+ if (ctx.feedKey !== "search") {
189
+ const endpoint = ctx.feedKey === "following" ? "following" : "recommend";
190
+ const start = await browser.dispatch("network_intercept_start", { tab_id: tabId, patterns: [`${ORIGIN}/api/${endpoint}/item_list/**`], max_body_bytes: 2097152, max_buffer_responses: 10, allowed_origins: ORIGINS });
156
191
  if (typeof start.session_id !== "string") throw new Error("TikTok feed capture did not start");
157
192
  sessionId = start.session_id;
158
193
  }
159
194
  // Snapshot/search results also lazy-load only in a visible tab.
160
195
  await navigate(browser, tabId, url, true);
161
196
  let rows: RecordValue[] = [];
162
- if (ctx.feedKey === "following") {
163
- await browser.dispatch("wait_for_selector", { tab_id: tabId, selector: '[data-e2e="recommend-list-item-container"]', timeout_ms: 15000, allowed_origins: ORIGINS });
164
- rows = await followingPosts(browser, tabId, sessionId!, limit);
165
- } else if (ctx.feedKey === "search") {
166
- await browser.dispatch("wait_for_selector", { tab_id: tabId, selector: 'a[href*="/video/"],a[href*="/photo/"]', timeout_ms: 15000, allowed_origins: ORIGINS });
197
+ if (ctx.feedKey === "following" || ctx.feedKey === "for_you") {
198
+ await waitFor(browser, tabId, '[data-e2e="recommend-list-item-container"]');
199
+ rows = await timelinePosts(browser, tabId, sessionId!, limit, ctx.feedKey);
200
+ } else {
201
+ await waitFor(browser, tabId, 'a[href*="/video/"],a[href*="/photo/"]');
167
202
  const data = await page(browser, tabId, "post_links");
168
203
  rows = (Array.isArray(data.rows) ? data.rows : []).map(value => {
169
204
  const r = object(value);
170
205
  const sourceUrl = normalizeTikTokPostUrl(r.url);
171
206
  return { origin_id: sourceUrl.split("/").pop(), source_url: sourceUrl, text: r.text, media: { type: sourceUrl.includes("/photo/") ? "photos" : "video" } };
172
207
  });
173
- } else {
174
- const data = await page(browser, tabId, "snapshot");
175
- rows = (Array.isArray(data.items) ? data.items : []).map(normalizeTikTokPost);
176
208
  }
177
209
  if (!rows.length) throw new Error("TikTok returned no verifiable posts; this is not proof of an empty feed");
178
210
  const unique = [...new Map(rows.map(row => [row.origin_id, row])).values()];
@@ -186,18 +218,19 @@ async function readTikTokSnapshot(ctx: FeedReadContext): Promise<FeedReadResult>
186
218
  }
187
219
 
188
220
  async function readTikTokInbox(ctx: FeedReadContext): Promise<FeedReadResult> {
189
- if (ctx.offset || ctx.sort || ctx.window || ctx.match || ctx.query) throw new Error("TikTok inbox reads use source order and the returned cursor; search, offsets, sorting, matching, and time windows are unsupported");
190
- if (ctx.limit !== undefined && (!Number.isInteger(ctx.limit) || ctx.limit < 1)) throw new Error("limit must be a positive integer");
221
+ assertInboxSourceRead(ctx, "TikTok");
222
+ assertPositiveReadLimit(ctx);
191
223
  const browser = requireBrowser(ctx);
192
224
  return scratch(browser, async tabId => {
193
225
  await navigate(browser, tabId, ORIGIN);
194
226
  const result = await browser.dispatch("evaluate", {
195
227
  tab_id: tabId,
196
- expression: `(${tiktokInboxPage.toString()})(${JSON.stringify({ feed: ctx.feedKey, limit: Math.min(ctx.limit ?? 20, 100), cursor: ctx.cursor })})`,
228
+ expression: pageExpression(`(${tiktokInboxPage.toString()})(${JSON.stringify({ feed: ctx.feedKey, limit: Math.min(ctx.limit ?? 20, 100), cursor: ctx.cursor })})`),
197
229
  await_promise: true,
198
230
  allowed_origins: ORIGINS,
199
231
  });
200
232
  const data = object(result.value);
233
+ if (data.__lobu_browser_interruption) throw new Error(String(object(data.__lobu_browser_interruption).message));
201
234
  if (!Array.isArray(data.rows) || typeof data.hasMore !== "boolean" || (data.hasMore && typeof data.nextCursor !== "string")) throw new Error("TikTok inbox returned no verifiable page");
202
235
  return data as unknown as FeedReadResult;
203
236
  });
@@ -205,14 +238,14 @@ async function readTikTokInbox(ctx: FeedReadContext): Promise<FeedReadResult> {
205
238
 
206
239
  export default class TikTokConnector extends ConnectorRuntime {
207
240
  readonly definition: RuntimeConnectorDefinition = {
208
- key: "tiktok.web", name: "TikTok", version: "1.1.5", faviconDomain: "tiktok.com",
241
+ key: "tiktok.web", name: "TikTok", version: "1.1.9", faviconDomain: "tiktok.com",
209
242
  description: "Read TikTok through your signed-in paired browser, inspect post visuals, set likes, and prepare comments for human submission. Automations decide what to read and act on.",
210
243
  browser: { origins: ORIGINS, authMethods: ["browser"], accountProbe: { url: ORIGIN, expression: expression("identity") } },
211
244
  authSchema: { methods: [{ type: "browser", mode: "live" }] },
212
245
  feeds: {
213
246
  messages: { key: "messages", name: "Messages", description: "Read a recent page per conversation before older history, with sender, direction, source IDs, evidence revisions and timestamps. Cursors cover the initial conversation set; a changed set reports incomplete coverage and needs a fresh scan. Unsupported media is identified, not transcribed. No message is sent.", read: readTikTokInbox },
214
247
  activity: { key: "activity", name: "Activity", description: "Read loaded TikTok activity including likes, comments, mentions and followers, with source IDs and links. Follow the returned cursor for older entries. Opening the activity panel may clear its unread badge.", read: readTikTokInbox },
215
- for_you: { key: "for_you", name: "For You", description: "Initial personalized timeline snapshot. No history coverage or continuation; repeat reads can overlap.", read: readTikTokSnapshot },
248
+ for_you: { key: "for_you", name: "For You", description: "Initial personalized timeline snapshot. Ad units without canonical post identity are excluded. No history coverage or continuation; repeat reads can overlap.", read: readTikTokSnapshot },
216
249
  following: { key: "following", name: "Following", description: "Read up to 30 distinct Following posts using TikTok's source continuation. Returns fewer only at the source end; stalled or budget-limited reads report an error. No complete history coverage or caller continuation; repeat reads can overlap.", read: readTikTokSnapshot },
217
250
  search: { key: "search", name: "Search", description: "Browser search results for videos and photo posts. Use query when reading. Initial snapshot without continuation.", read: readTikTokSnapshot, configSchema: { type: "object", properties: { query: { type: "string", maxLength: 200 } }, additionalProperties: false } },
218
251
  },