@lobu/runtime-device 24.7.0 → 24.9.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 (88) hide show
  1. package/dist/component.json +1 -1
  2. package/dist/dependencies.bun.lock +35 -51
  3. package/npm-shrinkwrap.json +214 -334
  4. package/package.json +4 -2
  5. package/vendor/cli/dist/bundled-skills/lobu/SKILL.md +14 -3
  6. package/vendor/cli/dist/chrome-extension/manifest.json +5 -4
  7. package/vendor/cli/dist/chrome-extension/tools.js +2 -3
  8. package/vendor/cli/dist/commands/_lib/apply/apply-cmd.js +27 -0
  9. package/vendor/cli/dist/commands/_lib/apply/client.d.ts +16 -5
  10. package/vendor/cli/dist/commands/_lib/apply/client.js +31 -9
  11. package/vendor/cli/dist/commands/_lib/apply/deployment.d.ts +8 -12
  12. package/vendor/cli/dist/commands/_lib/apply/deployment.js +14 -1
  13. package/vendor/cli/dist/commands/_lib/apply/desired-state.d.ts +8 -4
  14. package/vendor/cli/dist/commands/_lib/apply/desired-state.js +2 -1
  15. package/vendor/cli/dist/commands/_lib/apply/diff.d.ts +26 -7
  16. package/vendor/cli/dist/commands/_lib/apply/diff.js +101 -30
  17. package/vendor/cli/dist/commands/_lib/apply/map-config.js +29 -2
  18. package/vendor/cli/dist/commands/_lib/apply/render.js +2 -0
  19. package/vendor/cli/dist/commands/_lib/apply/shared.d.ts +20 -0
  20. package/vendor/cli/dist/commands/_lib/apply/shared.js +22 -0
  21. package/vendor/cli/dist/commands/_lib/init-from-org/bootstrap.js +14 -0
  22. package/vendor/cli/dist/commands/dev.js +28 -4
  23. package/vendor/cli/dist/commands/memory/_lib/seed-cmd.js +6 -2
  24. package/vendor/cli/dist/config/define.d.ts +21 -3
  25. package/vendor/cli/dist/connectors/README.md +6 -2
  26. package/vendor/cli/dist/connectors/github.ts +16 -3
  27. package/vendor/cli/dist/connectors/imessage.ts +953 -0
  28. package/vendor/cli/dist/connectors/linkedin.ts +20 -377
  29. package/vendor/cli/dist/connectors/market_quotes.ts +388 -91
  30. package/vendor/cli/dist/connectors/postgres.ts +21 -14
  31. package/vendor/cli/dist/connectors/x-dm-adapter.js +55 -21
  32. package/vendor/cli/dist/connectors/x.ts +1 -1
  33. package/vendor/cli/dist/runtime-components.json +4 -4
  34. package/vendor/cli/dist/templates/AGENTS.md.tmpl +1 -1
  35. package/vendor/cli/package.json +1 -1
  36. package/vendor/connector-sdk/dist/connector-types.d.ts +23 -2
  37. package/vendor/connector-sdk/package.json +1 -1
  38. package/vendor/connector-worker/dist/daemon/automation.js +7 -4
  39. package/vendor/connector-worker/dist/env.d.ts +15 -0
  40. package/vendor/connector-worker/dist/env.js +17 -0
  41. package/vendor/connector-worker/dist/executor/isolate.d.ts +3 -1
  42. package/vendor/connector-worker/dist/executor/isolate.js +32 -8
  43. package/vendor/connector-worker/package.json +1 -1
  44. package/vendor/core/dist/classify-error.d.ts +3 -4
  45. package/vendor/core/dist/classify-error.js +8 -8
  46. package/vendor/core/dist/connector-query-errors.d.ts +6 -0
  47. package/vendor/core/dist/connector-query-errors.js +4 -0
  48. package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +17 -1
  49. package/vendor/core/dist/contracts/tools/collection-presentation.js +27 -3
  50. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +39 -0
  51. package/vendor/core/dist/contracts/tools/manage-automations.js +11 -1
  52. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +1 -1
  53. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +2 -0
  54. package/vendor/core/dist/contracts/tools/manage-entity.js +7 -0
  55. package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +2 -0
  56. package/vendor/core/dist/contracts/tools/manage-feeds.js +3 -0
  57. package/vendor/core/dist/contracts/tools/manage-views.d.ts +249 -7
  58. package/vendor/core/dist/contracts/tools/manage-views.js +83 -21
  59. package/vendor/core/dist/contracts/tools/navigation.d.ts +248 -0
  60. package/vendor/core/dist/contracts/tools/navigation.js +284 -0
  61. package/vendor/core/dist/contracts/tools/view-attach.d.ts +7 -0
  62. package/vendor/core/dist/contracts/tools/view-attach.js +15 -0
  63. package/vendor/core/dist/contracts/tools/view-content-hash.d.ts +4 -1
  64. package/vendor/core/dist/contracts/tools/view-content-hash.js +4 -2
  65. package/vendor/core/dist/contracts/tools/view-definition.d.ts +2 -0
  66. package/vendor/core/dist/contracts/tools/view-definition.js +52 -0
  67. package/vendor/core/dist/contracts/tools/view-host.d.ts +68 -0
  68. package/vendor/core/dist/contracts/tools/view-host.js +30 -1
  69. package/vendor/core/dist/contracts/tools/view-scope.d.ts +31 -0
  70. package/vendor/core/dist/contracts/tools/view-scope.js +45 -0
  71. package/vendor/core/dist/error-report.js +1 -0
  72. package/vendor/core/dist/errors.d.ts +17 -24
  73. package/vendor/core/dist/errors.js +17 -24
  74. package/vendor/core/dist/types.d.ts +0 -6
  75. package/vendor/core/package.json +11 -1
  76. package/vendor/views/dist/api.d.ts +30 -5
  77. package/vendor/views/dist/api.js +22 -8
  78. package/vendor/views/dist/bridge.d.ts +17 -0
  79. package/vendor/views/dist/bridge.js +49 -1
  80. package/vendor/views/dist/components.d.ts +27 -5
  81. package/vendor/views/dist/components.js +57 -7
  82. package/vendor/views/dist/embed.d.ts +98 -0
  83. package/vendor/views/dist/embed.js +418 -0
  84. package/vendor/views/dist/index.d.ts +3 -1
  85. package/vendor/views/dist/index.js +1 -0
  86. package/vendor/views/package.json +1 -1
  87. package/vendor/cli/dist/connectors/linkedin-takeout.ts +0 -577
  88. package/vendor/cli/dist/connectors/takeout-utils.ts +0 -240
@@ -1,27 +1,15 @@
1
1
  /**
2
2
  * LinkedIn Connector
3
3
  *
4
- * Built-in connector spanning live browser feeds and local export readers:
5
- *
6
- * • LIVE feeds (home_feed, company_updates, jobs) — scraped via the paired
7
- * Owletto Chrome extension's network-intercept / content-script primitives.
8
- * The extension runs inside the user's real Chrome session — no Playwright,
9
- * no cookie cache, no `--remote-debugging-port` plumbing. We attach the CDP
10
- * Network domain in the user's signed-in tab, drive scroll pagination, and
11
- * parse the Voyager API responses the page emits. Auth is implicit: the user
12
- * is already signed into linkedin.com in the paired Chrome. If no online
13
- * Owletto extension is reachable in the connection's org, these syncs fail
14
- * fast with a clear "no paired Owletto extension" error.
15
- *
16
- * • TAKEOUT feeds (connections, messages, invitations, applied_jobs, profile,
17
- * companies, learning, events, endorsements, media) — read from the user's
18
- * local LinkedIn Data Export CSV files through an injected reader. The
19
- * platform does not currently supply that reader; those feeds fail with
20
- * a missing-capability error until a filesystem-capable caller supplies it.
21
- *
22
- * Folding both into ONE connector (key "linkedin") means a single connection
23
- * dedups all people on the shared `linkedin_slug`/`email` identity: a person met
24
- * live and a person in the CSV export collapse to the same entity.
4
+ * Live browser feeds (home_feed, company_updates, jobs) scraped via the paired
5
+ * Owletto Chrome extension's network-intercept / content-script primitives.
6
+ * The extension runs inside the user's real Chrome session — no Playwright,
7
+ * no cookie cache, no `--remote-debugging-port` plumbing. We attach the CDP
8
+ * Network domain in the user's signed-in tab, drive scroll pagination, and
9
+ * parse the Voyager API responses the page emits. Auth is implicit: the user
10
+ * is already signed into linkedin.com in the paired Chrome. If no online
11
+ * Owletto extension is reachable in the connection's org, these syncs fail
12
+ * fast with a clear "no paired Owletto extension" error.
25
13
  *
26
14
  * Write handoff: `prepare_comment` waits for the user to open the exact post,
27
15
  * fills that page's comment composer, and stops. The human clicks Post
@@ -46,7 +34,6 @@ import {
46
34
  type EventEnvelope,
47
35
  extensionDomScrape,
48
36
  extensionNetworkSync,
49
- IDENTITY,
50
37
  type SyncContext,
51
38
  type SyncResult,
52
39
  } from "@lobu/connector-sdk";
@@ -57,25 +44,6 @@ import {
57
44
  normalizeLinkedInSlug,
58
45
  } from "./linkedin-identity.js";
59
46
  import { setLinkedInLike } from "./linkedin-like.js";
60
- import {
61
- readCompanyFollows,
62
- readConnections,
63
- readEndorsements,
64
- readEvents,
65
- readInvitations,
66
- readJobs,
67
- readLearning,
68
- readMessages,
69
- readProfile,
70
- readRichMedia,
71
- type TakeoutCsvReader,
72
- } from "./linkedin-takeout.js";
73
- import {
74
- batchSize,
75
- type LocalTakeoutConfig,
76
- maxEventCursor,
77
- takeBatch,
78
- } from "./takeout-utils.js";
79
47
  import {
80
48
  observeLinkedInInbox,
81
49
  readLinkedInInbox,
@@ -87,38 +55,14 @@ import { LINKEDIN_HOME_URL } from "./linkedin-browser-script.js";
87
55
 
88
56
  // ── Types ──────────────────────────────────────────────────────
89
57
 
90
- /**
91
- * Merged checkpoint. Carries the live cursor fields (last_post_id / last_job_id
92
- * / last_timestamp) AND every takeout feed's `last_*_timestamp` cursor. The
93
- * takeout `jobs` feed was renamed to `applied_jobs`, so its cursor is
94
- * `last_applied_jobs_timestamp` (no ambiguity with the live `jobs` feed, which
95
- * checkpoints on last_job_id/last_timestamp). No production checkpoint exists,
96
- * so the rename is safe.
97
- */
58
+ /** Live feed cursors (last_post_id / last_job_id / last_timestamp). */
98
59
  interface LinkedInCheckpoint extends LinkedInInboxCheckpoint {
99
- // Live feed cursors.
100
60
  last_post_id?: string;
101
61
  last_job_id?: string;
102
62
  last_timestamp?: string;
103
- // Takeout feed cursors.
104
- last_messages_timestamp?: string;
105
- last_connections_timestamp?: string;
106
- last_invitations_timestamp?: string;
107
- last_applied_jobs_timestamp?: string;
108
- last_profile_timestamp?: string;
109
- last_companies_timestamp?: string;
110
- last_learning_timestamp?: string;
111
- last_events_timestamp?: string;
112
- last_endorsements_timestamp?: string;
113
- last_media_timestamp?: string;
114
63
  }
115
64
 
116
- /**
117
- * Merged config. Permissive superset of the live config (company_url,
118
- * max_scrolls) and the takeout config (takeout_dir, batch_size). A given feed
119
- * only reads the keys relevant to its source.
120
- */
121
- interface LinkedInConfig extends LocalTakeoutConfig {
65
+ interface LinkedInConfig {
122
66
  company_url?: string;
123
67
  max_scrolls?: number;
124
68
  min_scrolls?: number;
@@ -132,7 +76,7 @@ interface LinkedInPost {
132
76
  authorHeadline?: string;
133
77
  /** Immutable `urn:li:fsd_profile:<id>` tail — primary identity when present. */
134
78
  authorMemberId?: string;
135
- /** Canonical `/in/<slug>` vanity id — soft identity, bridges to takeout. */
79
+ /** Canonical `/in/<slug>` vanity id — soft identity alongside member id. */
136
80
  authorSlug?: string;
137
81
  /** Canonical `/company/<slug>` when the actor is a company page. */
138
82
  authorCompanySlug?: string;
@@ -160,78 +104,6 @@ function normalizeCheckpointPostId(postId?: string): string | undefined {
160
104
 
161
105
  // ── Identity attributions ──────────────────────────────────────
162
106
 
163
- /**
164
- * Link a `connection` event to the connected person via their canonical
165
- * `linkedin_slug` (extracted from the profile URL) plus their `email`. Neither
166
- * is `primary` — they match equal-weight cross-channel until a stable primary
167
- * id arrives from the live connector. The full URL is kept as a display trait,
168
- * not an identity (case/URL noise would fork the entity). Connections ARE the
169
- * user's network, so we mint (`autoCreate`) a person per row.
170
- */
171
- const LINKEDIN_CONNECTION_ATTRIBUTIONS: EventAttributionRule[] = [
172
- {
173
- role: "about",
174
- autoCreate: true,
175
- target: {
176
- entityType: "person",
177
- titlePath: "author_name",
178
- identities: [
179
- {
180
- namespace: LINKEDIN_IDENTITY.SLUG,
181
- eventPath: "metadata.linkedin_slug",
182
- },
183
- { namespace: IDENTITY.EMAIL, eventPath: "metadata.email" },
184
- ],
185
- },
186
- traits: {
187
- linkedin_url: {
188
- eventPath: "metadata.linkedin_url",
189
- mergeStrategy: "prefer_non_empty",
190
- },
191
- company: {
192
- eventPath: "metadata.company",
193
- mergeStrategy: "prefer_non_empty",
194
- },
195
- position: {
196
- eventPath: "metadata.position",
197
- mergeStrategy: "prefer_non_empty",
198
- },
199
- },
200
- },
201
- ];
202
-
203
- /**
204
- * Link a `message` event to its sender (the counterparty) via the
205
- * `linkedin_slug` extracted from their profile URL, plus display name. Real
206
- * counterparties, so mint on no match.
207
- */
208
- const LINKEDIN_MESSAGE_ATTRIBUTIONS: EventAttributionRule[] = [
209
- {
210
- role: "authored_by",
211
- autoCreate: true,
212
- target: {
213
- entityType: "person",
214
- titlePath: "metadata.from",
215
- identities: [
216
- {
217
- namespace: LINKEDIN_IDENTITY.SLUG,
218
- eventPath: "metadata.sender_linkedin_slug",
219
- },
220
- ],
221
- },
222
- traits: {
223
- linkedin_url: {
224
- eventPath: "metadata.sender_profile_url",
225
- mergeStrategy: "prefer_non_empty",
226
- },
227
- last_linkedin_message_at: {
228
- eventPath: "occurred_at",
229
- mergeStrategy: "overwrite",
230
- },
231
- },
232
- },
233
- ];
234
-
235
107
  /**
236
108
  * Link a post written by a company page to a `company` entity keyed on the
237
109
  * page's `/company/<slug>`. Like person authors, a company that authors a post
@@ -277,17 +149,8 @@ const CREATE_ENGAGER_PEOPLE_GATE = {
277
149
  * Link a live `post` to its author. The Voyager feed (company_updates) exposes
278
150
  * the actor's immutable `urn:li:fsd_profile:<id>` as `author_member_id` plus the
279
151
  * `/in/<slug>`. Both are identities; NEITHER is `primary` — they match
280
- * EQUAL-WEIGHT (same as the connections/messages attributions).
281
- *
282
- * Why not primary member_id: takeout-ingested people already exist keyed on
283
- * `linkedin_slug` (no member id — the export has none). A `primary` member_id
284
- * would be authoritative: on a live post it would find no member-id match, mint
285
- * a NEW person, and fork the existing slug-person (the resolver does not fall
286
- * back to a secondary slug hit when a primary is present). Equal-weight instead
287
- * UNIONS the hits: the live post matches the existing person by slug AND
288
- * accretes the member_id onto them. Durability still holds — once the member_id
289
- * is on the person, a later vanity-URL change still resolves via that member_id
290
- * in the equal-weight union. Real authors, so mint on no match.
152
+ * EQUAL-WEIGHT so a slug-only person and a later member-id sighting union onto
153
+ * one entity instead of forking. Real authors, so mint on no match.
291
154
  */
292
155
  const LINKEDIN_POST_AUTHOR_ATTRIBUTIONS: EventAttributionRule[] = [
293
156
  {
@@ -2880,22 +2743,6 @@ const jobsConfigSchema = {
2880
2743
  },
2881
2744
  };
2882
2745
 
2883
- function localTakeoutSchema(description: string): Record<string, unknown> {
2884
- return {
2885
- type: "object",
2886
- properties: {
2887
- takeout_dir: { type: "string", description },
2888
- batch_size: {
2889
- type: "integer",
2890
- minimum: 1,
2891
- maximum: 5000,
2892
- default: 1000,
2893
- description: "Maximum events to emit per sync run.",
2894
- },
2895
- },
2896
- };
2897
- }
2898
-
2899
2746
  // ── Connector ─────────────────────────────────────────────────
2900
2747
 
2901
2748
  /**
@@ -2957,51 +2804,6 @@ function notActionableMissingPostId(postUrlRaw: string): ActionResult {
2957
2804
  };
2958
2805
  }
2959
2806
 
2960
- /**
2961
- * The ten LinkedIn Data Export feeds: checkpoint cursor and pure reader per
2962
- * feed key. This table replaces a chain of ten near-identical `if (feedKey ===
2963
- * …)` blocks; the mapping it encodes is unchanged.
2964
- *
2965
- * Feed keys and cursor names are the persisted contract — a feed row keys on
2966
- * the feed key and a checkpoint on the cursor name — so both are copied over
2967
- * verbatim rather than tidied (see {@link LinkedInCheckpoint} on why the
2968
- * takeout `jobs` cursor is `last_applied_jobs_timestamp`).
2969
- */
2970
- const LINKEDIN_TAKEOUT_FEEDS: Record<
2971
- string,
2972
- {
2973
- cursor: Exclude<keyof LinkedInCheckpoint, "linkedin_inbox">;
2974
- read: (readCsv: TakeoutCsvReader) => EventEnvelope[];
2975
- }
2976
- > = {
2977
- messages: { cursor: "last_messages_timestamp", read: readMessages },
2978
- connections: { cursor: "last_connections_timestamp", read: readConnections },
2979
- invitations: { cursor: "last_invitations_timestamp", read: readInvitations },
2980
- applied_jobs: { cursor: "last_applied_jobs_timestamp", read: readJobs },
2981
- profile: { cursor: "last_profile_timestamp", read: readProfile },
2982
- companies: { cursor: "last_companies_timestamp", read: readCompanyFollows },
2983
- learning: { cursor: "last_learning_timestamp", read: readLearning },
2984
- events: { cursor: "last_events_timestamp", read: readEvents },
2985
- endorsements: {
2986
- cursor: "last_endorsements_timestamp",
2987
- read: readEndorsements,
2988
- },
2989
- media: { cursor: "last_media_timestamp", read: readRichMedia },
2990
- };
2991
-
2992
- /**
2993
- * The configured export directory, or a thrown error naming what is missing.
2994
- *
2995
- * Only checks that the value is SET; it cannot stat the path, because this runs
2996
- * inside the isolate, which has no filesystem. An injected host reader must
2997
- * validate its directory before reading; the platform does not provide one.
2998
- */
2999
- function assertTakeoutDir(config: LinkedInConfig): string {
3000
- const dir = config.takeout_dir;
3001
- if (!dir) throw new Error("Missing takeout_dir for LinkedIn.");
3002
- return dir;
3003
- }
3004
-
3005
2807
  /** One sync pass's output; `syncFeed` commits it as a single page. */
3006
2808
  interface LinkedInSyncPage {
3007
2809
  events: EventEnvelope[];
@@ -3014,22 +2816,10 @@ export default class LinkedInConnector extends ConnectorRuntime<
3014
2816
  LinkedInConfig
3015
2817
  > {
3016
2818
  private readonly fetchImpl: typeof fetch;
3017
- /**
3018
- * Builds a CSV reader rooted at the export directory, or `undefined` when the
3019
- * host has no filesystem — which is the case in the isolate every platform
3020
- * run uses. Supplying it is how a Node-hosted caller (or a future worker that
3021
- * advertises a local-file capability) turns the takeout feeds on, WITHOUT
3022
- * putting `node:fs` into the bundle the live browser feeds must load.
3023
- */
3024
- private readonly csvReader?: (takeoutDir: string) => TakeoutCsvReader;
3025
2819
 
3026
- constructor(
3027
- fetchImpl: typeof fetch = fetch,
3028
- csvReader?: (takeoutDir: string) => TakeoutCsvReader
3029
- ) {
2820
+ constructor(fetchImpl: typeof fetch = fetch) {
3030
2821
  super();
3031
2822
  this.fetchImpl = fetchImpl;
3032
- this.csvReader = csvReader;
3033
2823
  }
3034
2824
 
3035
2825
  readonly definition: RuntimeConnectorDefinition<
@@ -3039,10 +2829,10 @@ export default class LinkedInConnector extends ConnectorRuntime<
3039
2829
  key: "linkedin",
3040
2830
  name: "LinkedIn",
3041
2831
  description:
3042
- "Read LinkedIn feeds, notifications, and recent inbox messages through paired Chrome. Subscribe to source changes, answer direct messages, and prepare message, post, or comment drafts for human submission. Also supports local LinkedIn Data Export CSV files.",
3043
- version: "3.20.2",
2832
+ "Read LinkedIn feeds, notifications, and recent inbox messages through paired Chrome. Subscribe to source changes, answer direct messages, and prepare message, post, or comment drafts for human submission.",
2833
+ version: "3.21.0",
3044
2834
  faviconDomain: "linkedin.com",
3045
- // Live feeds bind a signed-in Chrome account. Local takeout imports need no browser.
2835
+ // Live feeds bind a signed-in Chrome account.
3046
2836
  browser: {
3047
2837
  authMethods: ["browser"],
3048
2838
  origins: ["https://www.linkedin.com"],
@@ -3071,7 +2861,6 @@ export default class LinkedInConnector extends ConnectorRuntime<
3071
2861
  type: "browser",
3072
2862
  mode: "live",
3073
2863
  },
3074
- { type: "none", label: "Local data export" },
3075
2864
  // Keep browser first: connection setup uses the first authenticated
3076
2865
  // method, while sign-in independently discovers OAuth loginScopes.
3077
2866
  {
@@ -3087,7 +2876,7 @@ export default class LinkedInConnector extends ConnectorRuntime<
3087
2876
  clientIdKey: "LINKEDIN_CLIENT_ID",
3088
2877
  clientSecretKey: "LINKEDIN_CLIENT_SECRET",
3089
2878
  description:
3090
- "Identity-only LinkedIn sign-in. Feeds use the browser or local exports.",
2879
+ "Identity-only LinkedIn sign-in. Feeds use the paired browser.",
3091
2880
  setupInstructions:
3092
2881
  "Enable Sign In with LinkedIn using OpenID Connect in your LinkedIn app. Register /api/auth/oauth2/callback/linkedin on your Lobu origin for sign-in, then enter the client ID and client secret.",
3093
2882
  },
@@ -3120,8 +2909,6 @@ export default class LinkedInConnector extends ConnectorRuntime<
3120
2909
  { key: "post", label: "Post" },
3121
2910
  { key: "comment", label: "Comment" },
3122
2911
  { key: "job_posting", label: "Job Posting" },
3123
- { key: "message", label: "Message" },
3124
- { key: "connection", label: "Connection" },
3125
2912
  ],
3126
2913
  feeds: {
3127
2914
  // ── Live (Chrome-extension) feeds ──────────────────────────
@@ -3293,101 +3080,6 @@ export default class LinkedInConnector extends ConnectorRuntime<
3293
3080
  },
3294
3081
  },
3295
3082
  },
3296
- // ── Takeout (local CSV) feeds ──────────────────────────────
3297
- messages: {
3298
- sync: (ctx) => this.syncFeed(ctx),
3299
- key: "messages",
3300
- name: "Messages",
3301
- configSchema: localTakeoutSchema(
3302
- "Path to the LinkedIn Data Export folder."
3303
- ),
3304
- eventKinds: {
3305
- message: {
3306
- description: "A LinkedIn direct message",
3307
- attributions: LINKEDIN_MESSAGE_ATTRIBUTIONS,
3308
- },
3309
- },
3310
- },
3311
- connections: {
3312
- sync: (ctx) => this.syncFeed(ctx),
3313
- key: "connections",
3314
- name: "Connections",
3315
- configSchema: localTakeoutSchema(
3316
- "Path to the LinkedIn Data Export folder."
3317
- ),
3318
- eventKinds: {
3319
- connection: {
3320
- description: "A first-degree LinkedIn connection",
3321
- attributions: LINKEDIN_CONNECTION_ATTRIBUTIONS,
3322
- },
3323
- },
3324
- },
3325
- invitations: {
3326
- sync: (ctx) => this.syncFeed(ctx),
3327
- key: "invitations",
3328
- name: "Invitations",
3329
- configSchema: localTakeoutSchema(
3330
- "Path to the LinkedIn Data Export folder."
3331
- ),
3332
- },
3333
- applied_jobs: {
3334
- sync: (ctx) => this.syncFeed(ctx),
3335
- key: "applied_jobs",
3336
- name: "Applied Jobs",
3337
- description:
3338
- "Your own applied/saved job postings from the LinkedIn Data Export.",
3339
- configSchema: localTakeoutSchema(
3340
- "Path to the LinkedIn Data Export folder."
3341
- ),
3342
- },
3343
- profile: {
3344
- sync: (ctx) => this.syncFeed(ctx),
3345
- key: "profile",
3346
- name: "Profile",
3347
- configSchema: localTakeoutSchema(
3348
- "Path to the LinkedIn Data Export folder."
3349
- ),
3350
- },
3351
- companies: {
3352
- sync: (ctx) => this.syncFeed(ctx),
3353
- key: "companies",
3354
- name: "Company Follows",
3355
- configSchema: localTakeoutSchema(
3356
- "Path to the LinkedIn Data Export folder."
3357
- ),
3358
- },
3359
- learning: {
3360
- sync: (ctx) => this.syncFeed(ctx),
3361
- key: "learning",
3362
- name: "Learning",
3363
- configSchema: localTakeoutSchema(
3364
- "Path to the LinkedIn Data Export folder."
3365
- ),
3366
- },
3367
- events: {
3368
- sync: (ctx) => this.syncFeed(ctx),
3369
- key: "events",
3370
- name: "Events",
3371
- configSchema: localTakeoutSchema(
3372
- "Path to the LinkedIn Data Export folder."
3373
- ),
3374
- },
3375
- endorsements: {
3376
- sync: (ctx) => this.syncFeed(ctx),
3377
- key: "endorsements",
3378
- name: "Endorsements and Recommendations",
3379
- configSchema: localTakeoutSchema(
3380
- "Path to the LinkedIn Data Export folder."
3381
- ),
3382
- },
3383
- media: {
3384
- sync: (ctx) => this.syncFeed(ctx),
3385
- key: "media",
3386
- name: "Rich Media",
3387
- configSchema: localTakeoutSchema(
3388
- "Path to the LinkedIn Data Export folder."
3389
- ),
3390
- },
3391
3083
  },
3392
3084
  actions: {
3393
3085
  set_like: {
@@ -3821,8 +3513,6 @@ export default class LinkedInConnector extends ConnectorRuntime<
3821
3513
  ctx: SyncContext<LinkedInCheckpoint, LinkedInConfig>
3822
3514
  ): Promise<LinkedInSyncPage> {
3823
3515
  const feedKey = ctx.feedKey;
3824
-
3825
- // ── Live (Chrome-extension) feeds ────────────────────────────
3826
3516
  if (
3827
3517
  feedKey === "home_feed" ||
3828
3518
  feedKey === "company_updates" ||
@@ -3830,35 +3520,6 @@ export default class LinkedInConnector extends ConnectorRuntime<
3830
3520
  ) {
3831
3521
  return this.syncLive(ctx);
3832
3522
  }
3833
-
3834
- // ── Takeout (local CSV) feeds ────────────────────────────────
3835
- // Parsing lives in `linkedin-takeout.ts` and is filesystem-free; the
3836
- // capability to actually READ the export is supplied here. Injecting it
3837
- // (rather than importing `node:fs` alongside the live feeds) is what keeps
3838
- // the whole bundle isolate-eligible — see this class's header.
3839
- const takeout = Object.hasOwn(LINKEDIN_TAKEOUT_FEEDS, feedKey)
3840
- ? LINKEDIN_TAKEOUT_FEEDS[feedKey]
3841
- : undefined;
3842
- if (takeout) {
3843
- const readCsv = this.csvReader;
3844
- if (!readCsv) {
3845
- throw new Error(
3846
- "LinkedIn feed '" +
3847
- feedKey +
3848
- "' reads the local LinkedIn Data Export, " +
3849
- "and this runtime provides no filesystem access. This invocation has no CSV reader; " +
3850
- "browser-backed live feeds do not require one. For a local import, construct " +
3851
- "the connector with an explicit reader in a filesystem-capable host."
3852
- );
3853
- }
3854
- return this.result(
3855
- ctx,
3856
- takeout.cursor,
3857
- takeout.read(readCsv(assertTakeoutDir(ctx.config))),
3858
- batchSize(ctx.config)
3859
- );
3860
- }
3861
-
3862
3523
  throw new Error(`Unknown LinkedIn feed: ${feedKey}`);
3863
3524
  }
3864
3525
 
@@ -4050,7 +3711,7 @@ export default class LinkedInConnector extends ConnectorRuntime<
4050
3711
  metadata: {
4051
3712
  author_headline: post.authorHeadline,
4052
3713
  // Author identity for the `post` attribution. member_id (primary) when
4053
- // Voyager exposed the actor's fsd_profile urn; slug bridges to takeout.
3714
+ // Voyager exposed the actor's fsd_profile urn; slug is the soft identity.
4054
3715
  author_member_id: post.authorMemberId,
4055
3716
  author_linkedin_slug: post.authorSlug,
4056
3717
  ...(post.authorCompanySlug
@@ -4147,22 +3808,4 @@ export default class LinkedInConnector extends ConnectorRuntime<
4147
3808
  },
4148
3809
  };
4149
3810
  }
4150
-
4151
- // ── Takeout (local CSV) readers ──────────────────────────────
4152
-
4153
- private result(
4154
- ctx: SyncContext<LinkedInCheckpoint, LinkedInConfig>,
4155
- key: Exclude<keyof LinkedInCheckpoint, "linkedin_inbox">,
4156
- allEvents: EventEnvelope[],
4157
- max: number
4158
- ): LinkedInSyncPage {
4159
- const events = takeBatch(allEvents, ctx.checkpoint?.[key], max);
4160
- return {
4161
- events,
4162
- checkpoint: {
4163
- ...ctx.checkpoint,
4164
- [key]: maxEventCursor(events, ctx.checkpoint?.[key]),
4165
- },
4166
- };
4167
- }
4168
3811
  }