@firedrill-tools/linkedin 0.1.1

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 (111) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +189 -0
  3. package/firedrill/agent.target.json +16 -0
  4. package/firedrill/baseline.scenario.json +1834 -0
  5. package/firedrill/comment-throttled.scenario.json +11 -0
  6. package/firedrill/conformance.suite.json +27 -0
  7. package/firedrill/linkedin-comment-throttled.drill.json +51 -0
  8. package/firedrill/linkedin-comments-connection.drill.json +43 -0
  9. package/firedrill/linkedin-comments.drill.json +196 -0
  10. package/firedrill/linkedin-denied.drill.json +383 -0
  11. package/firedrill/linkedin-fresh-install.drill.json +43 -0
  12. package/firedrill/linkedin-identity.drill.json +73 -0
  13. package/firedrill/linkedin-invalid-token.drill.json +393 -0
  14. package/firedrill/linkedin-limited-scopes.drill.json +88 -0
  15. package/firedrill/linkedin-openid-only.drill.json +383 -0
  16. package/firedrill/linkedin-orgs-connection.drill.json +28 -0
  17. package/firedrill/linkedin-orgs-network.drill.json +193 -0
  18. package/firedrill/linkedin-post-lost-response.drill.json +61 -0
  19. package/firedrill/linkedin-posts-lifecycle.drill.json +228 -0
  20. package/firedrill/linkedin-reactions-metadata.drill.json +196 -0
  21. package/firedrill/linkedin-reactions-outage.drill.json +66 -0
  22. package/firedrill/linkedin-tight-limits.drill.json +228 -0
  23. package/firedrill/linkedin-ugc-legacy.drill.json +43 -0
  24. package/firedrill/linkedin-visibility-connection.drill.json +73 -0
  25. package/firedrill/linkedin-visibility-stranger.drill.json +88 -0
  26. package/firedrill/linkedin-wire-errors.drill.json +353 -0
  27. package/firedrill/post-lost-response.scenario.json +11 -0
  28. package/firedrill/reactions-outage.scenario.json +11 -0
  29. package/firedrill/tight-limits.scenario.json +16 -0
  30. package/firedrill/tools/linkedin/app/assets/ATTRIBUTION.md +28 -0
  31. package/firedrill/tools/linkedin/app/assets/fonts/OFL.txt +93 -0
  32. package/firedrill/tools/linkedin/app/assets/linkedin-in.svg +1 -0
  33. package/firedrill/tools/linkedin/app/assets/linkedin-wordmark.svg +1 -0
  34. package/firedrill/tools/linkedin/app/assets/linkedin.svg +1 -0
  35. package/firedrill/tools/linkedin/app/site/app.js +80 -0
  36. package/firedrill/tools/linkedin/app/site/assets/fonts/fira-sans-latin-400-normal.woff2 +0 -0
  37. package/firedrill/tools/linkedin/app/site/assets/fonts/fira-sans-latin-600-normal.woff2 +0 -0
  38. package/firedrill/tools/linkedin/app/site/assets/fonts/fira-sans-latin-700-normal.woff2 +0 -0
  39. package/firedrill/tools/linkedin/app/site/assets/fonts/fira-sans-latin-ext-400-normal.woff2 +0 -0
  40. package/firedrill/tools/linkedin/app/site/assets/fonts/fira-sans-latin-ext-600-normal.woff2 +0 -0
  41. package/firedrill/tools/linkedin/app/site/assets/fonts/fira-sans-latin-ext-700-normal.woff2 +0 -0
  42. package/firedrill/tools/linkedin/app/site/assets/linkedin-wordmark.svg +1 -0
  43. package/firedrill/tools/linkedin/app/site/assets/linkedin.svg +1 -0
  44. package/firedrill/tools/linkedin/app/site/base.css +87 -0
  45. package/firedrill/tools/linkedin/app/site/comment-box.js +119 -0
  46. package/firedrill/tools/linkedin/app/site/comments.css +59 -0
  47. package/firedrill/tools/linkedin/app/site/comments.js +188 -0
  48. package/firedrill/tools/linkedin/app/site/company.js +115 -0
  49. package/firedrill/tools/linkedin/app/site/composer.js +112 -0
  50. package/firedrill/tools/linkedin/app/site/feed.css +105 -0
  51. package/firedrill/tools/linkedin/app/site/feed.js +134 -0
  52. package/firedrill/tools/linkedin/app/site/icons.js +70 -0
  53. package/firedrill/tools/linkedin/app/site/index.html +58 -0
  54. package/firedrill/tools/linkedin/app/site/nav.css +51 -0
  55. package/firedrill/tools/linkedin/app/site/network.js +77 -0
  56. package/firedrill/tools/linkedin/app/site/overlay.css +62 -0
  57. package/firedrill/tools/linkedin/app/site/overlay.js +108 -0
  58. package/firedrill/tools/linkedin/app/site/pages.css +78 -0
  59. package/firedrill/tools/linkedin/app/site/post-actions.js +83 -0
  60. package/firedrill/tools/linkedin/app/site/post-menu.js +72 -0
  61. package/firedrill/tools/linkedin/app/site/post.css +82 -0
  62. package/firedrill/tools/linkedin/app/site/post.js +131 -0
  63. package/firedrill/tools/linkedin/app/site/profile.js +139 -0
  64. package/firedrill/tools/linkedin/app/site/reactions.js +46 -0
  65. package/firedrill/tools/linkedin/app/site/reactors.js +71 -0
  66. package/firedrill/tools/linkedin/app/site/shell.js +107 -0
  67. package/firedrill/tools/linkedin/app/site/store.js +62 -0
  68. package/firedrill/tools/linkedin/app/site/text.js +80 -0
  69. package/firedrill/tools/linkedin/app/site/ui.js +142 -0
  70. package/firedrill/tools/linkedin/behavior.mjs +66 -0
  71. package/firedrill/tools/linkedin/lib/access.mjs +69 -0
  72. package/firedrill/tools/linkedin/lib/auth.mjs +115 -0
  73. package/firedrill/tools/linkedin/lib/cascade.mjs +28 -0
  74. package/firedrill/tools/linkedin/lib/errors.mjs +50 -0
  75. package/firedrill/tools/linkedin/lib/message.mjs +43 -0
  76. package/firedrill/tools/linkedin/lib/paging.mjs +54 -0
  77. package/firedrill/tools/linkedin/lib/postinput.mjs +47 -0
  78. package/firedrill/tools/linkedin/lib/render.mjs +95 -0
  79. package/firedrill/tools/linkedin/lib/routes.mjs +219 -0
  80. package/firedrill/tools/linkedin/lib/social.mjs +25 -0
  81. package/firedrill/tools/linkedin/lib/store.mjs +54 -0
  82. package/firedrill/tools/linkedin/lib/text.mjs +55 -0
  83. package/firedrill/tools/linkedin/lib/urn.mjs +93 -0
  84. package/firedrill/tools/linkedin/lib/wire.mjs +125 -0
  85. package/firedrill/tools/linkedin/linkedin.tool.json +8935 -0
  86. package/firedrill/tools/linkedin/ops/comments-read.mjs +57 -0
  87. package/firedrill/tools/linkedin/ops/comments-write.mjs +104 -0
  88. package/firedrill/tools/linkedin/ops/feed.mjs +74 -0
  89. package/firedrill/tools/linkedin/ops/network.mjs +46 -0
  90. package/firedrill/tools/linkedin/ops/orgs.mjs +93 -0
  91. package/firedrill/tools/linkedin/ops/posts-edit.mjs +71 -0
  92. package/firedrill/tools/linkedin/ops/posts-read.mjs +54 -0
  93. package/firedrill/tools/linkedin/ops/posts-write.mjs +74 -0
  94. package/firedrill/tools/linkedin/ops/profile.mjs +38 -0
  95. package/firedrill/tools/linkedin/ops/reactions.mjs +78 -0
  96. package/firedrill/tools/linkedin/ops/social.mjs +34 -0
  97. package/firedrill/world.json +2585 -0
  98. package/firedrill.json +5 -0
  99. package/package.json +52 -0
  100. package/starter.json +1833 -0
  101. package/test/client.mjs +71 -0
  102. package/test/conformance.mjs +20 -0
  103. package/test/fixtures.mjs +182 -0
  104. package/test/flows/comments.mjs +116 -0
  105. package/test/flows/every.mjs +38 -0
  106. package/test/flows/faults.mjs +56 -0
  107. package/test/flows/identity.mjs +70 -0
  108. package/test/flows/orgs.mjs +107 -0
  109. package/test/flows/posts.mjs +196 -0
  110. package/test/flows/reactions.mjs +101 -0
  111. package/test/flows/wire.mjs +62 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Reload Tech Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,189 @@
1
+ # LinkedIn Tool for Firedrill
2
+
3
+ `@firedrill-tools/linkedin` simulates **one LinkedIn member's network** as seen by an application holding that member's
4
+ OAuth token: identity, posts, comments, reactions, social counts, the organization pages the member administers and the member's
5
+ first-degree connections. It follows LinkedIn's versioned Community Management REST API under `/rest` and the older `/v2`
6
+ consumer endpoints that many agents still call. Everything is synthetic: nothing is ever sent to LinkedIn, and "publishing" writes a row
7
+ in the Firedrill world.
8
+
9
+ The package also ships a **browser app** that recreates the LinkedIn desktop web client (feed, post composer, comments, reactions,
10
+ profile activity, connections, company pages). It calls the same operations as agents, so app and API share one world. See "Browser app".
11
+
12
+ ## Install
13
+
14
+ ```sh
15
+ firedrill tool add @firedrill-tools/linkedin --install
16
+ firedrill serve
17
+ ```
18
+
19
+ `tool add` creates a world with the starter data and grants the default actor every operation. For an existing world, add grants for
20
+ the `linkedin` operations listed below and copy the rows from `starter.json` (set `virtualTimeUs` from the same file so seeded relative
21
+ times make sense).
22
+
23
+ ## Identities and scopes
24
+
25
+ | actor attribute | meaning |
26
+ |---|---|
27
+ | `linkedinPersonId` | The member the token belongs to (10-character LinkedIn-style id). **Absent** → the network's default member, **Maya Okafor** (`mOk4f0rPx1`), so a fresh actor sees the seeded network. **Present but unknown** → every operation answers `401 INVALID_ACCESS_TOKEN` (`serviceErrorCode` 65600). |
28
+ | `linkedinScopes` | OAuth scopes of the token (string array). **Absent** → `openid, profile, email, w_member_social, r_member_social, rw_organization_admin, r_organization_social, w_organization_social, r_1st_connections_size`. |
29
+
30
+ Scope checks: userinfo needs `openid` and `profile` (e-mail fields need `email`); `/v2/me` and `/v2/people` need `profile`; writes need
31
+ `w_member_social` (as a person) or `w_organization_social` (as an organization); reads of member threads need `r_member_social`,
32
+ organization threads `r_organization_social`; organization records and role lists need `rw_organization_admin`; connection counts and
33
+ the connection list need `r_1st_connections_size`. A missing scope answers `403 ACCESS_DENIED` ("Not enough permissions to access: …").
34
+
35
+ Row rules enforced from state:
36
+
37
+ - Organization roles come from `organization-acls` rows in state `APPROVED`. Posting, commenting or reacting as an organization needs
38
+ `ADMINISTRATOR`, `CONTENT_ADMINISTRATOR` or `DIRECT_SPONSORED_CONTENT_POSTER`; finding an organization's posts also accepts `ANALYST`
39
+ and `CURATOR`; full organization records and `q=organization` role lists need `ADMINISTRATOR`.
40
+ - `CONNECTIONS` posts are visible to the author and the author's connections (others get `403`); drafts exist only for their author
41
+ under `viewContext=AUTHOR` (otherwise `404`); deleted posts answer `404`. Comments, reactions and social metadata inherit this.
42
+ - Only the author (or a poster of the authoring page) may edit or delete a post, open or close its comments; a comment may be edited
43
+ only by its actor and deleted by its actor or the post's author; `q=author` for a person returns only the caller's own posts.
44
+
45
+ ## Starting data
46
+
47
+ `starter.json` (109 rows, virtual time 2026-09-15T14:00:00Z), all fictional (`@example.com`, `media.example.com`): 12 members
48
+ (Maya Okafor and her 7 connections, plus members outside her network, one without an e-mail address), 3 organizations (Northwind
49
+ Analytics, Brightline Robotics, Lakeview Institute of Technology, a school) with approved, requested and revoked roles, 19 posts (text,
50
+ article, hashtag, mention, connections-only, logged-in-only, edited, comments-closed, 3000-character, legacy ugcPost, reshare,
51
+ reshare-disabled, a draft and a deleted tombstone), 12 comments with replies, a mention and an organization actor, and 14 reactions of
52
+ every current type.
53
+
54
+ ## Operations
55
+
56
+ Canonical names are `linkedin.<operation>`; no MCP aliases are declared (LinkedIn publishes no MCP tool contract).
57
+
58
+ | operation | HTTP route(s) | notes |
59
+ |---|---|---|
60
+ | `profile.userinfo` | `GET /v2/userinfo` | OpenID Connect claims; `email`/`email_verified` only with the `email` scope |
61
+ | `profile.me` | `GET /v2/me` | lite profile |
62
+ | `people.get` | `GET /v2/people/(id:{personId})` | lite profile of a member in state |
63
+ | `posts.create` | `POST /rest/posts` (201, `x-restli-id`), `POST /v2/ugcPosts` (201, body `{ id }`) | text, article link or reshare; as a person or an organization |
64
+ | `posts.get` | `GET /rest/posts/{postUrn}` | `viewContext=READER\|AUTHOR` |
65
+ | `posts.list_by_author` | `GET /rest/posts?q=author&author=…` | `sortBy=LAST_MODIFIED\|CREATED`, `start`/`count` ≤ 100 |
66
+ | `posts.update` | `POST /rest/posts/{postUrn}` + `X-RestLi-Method: PARTIAL_UPDATE` (204) | `patch.$set` of `commentary` or `lifecycleState: PUBLISHED` |
67
+ | `posts.delete` | `DELETE /rest/posts/{postUrn}`, `DELETE /v2/ugcPosts/{urn}` (204) | idempotent; removes the post's comments and reactions |
68
+ | `feed.list` | canonical only | reverse-chronological home feed with `serverTime` from virtual time |
69
+ | `comments.create` | `POST /rest/socialActions/{target}/comments` (201) | top-level or one reply level; mention attributes |
70
+ | `comments.list` | `GET /rest/socialActions/{target}/comments` | post target: top-level comments; comment target: replies; oldest first |
71
+ | `comments.get` | `GET /rest/socialActions/{target}/comments/{commentId}` | |
72
+ | `comments.update` | `POST …/comments/{commentId}` + `PARTIAL_UPDATE` (200, `x-resourceidentity-urn`) | `?actor=` for organization comments |
73
+ | `comments.delete` | `DELETE …/comments/{commentId}` (204) | deletes replies too |
74
+ | `reactions.create` | `POST /rest/reactions?actor=…` (201) | a different type replaces the actor's reaction; `MAYBE` is rejected |
75
+ | `reactions.list` | `GET /rest/reactions/(actor:…,entity:…)` (bare reaction) and `GET /rest/reactions/(entity:…)?q=entity` | `sort=(value:CHRONOLOGICAL\|REVERSE_CHRONOLOGICAL\|RELEVANCE)` |
76
+ | `reactions.delete` | `DELETE /rest/reactions/(actor:…,entity:…)` (204) | |
77
+ | `social_metadata.get` | `GET /rest/socialMetadata/{entity}` | reaction summaries, comment summary, comments state |
78
+ | `social_metadata.set_comments_state` | `POST /rest/socialMetadata/{entity}?actor=…` (202) | closing deletes existing comments |
79
+ | `organizations.get` | `GET /rest/organizations/{id}` | approved administrators only |
80
+ | `organizations.find_by_vanity_name` | `GET /rest/organizations?q=vanityName&vanityName=…` | non-admin fields, case-insensitive |
81
+ | `organization_acls.list` | `GET /rest/organizationAcls?q=roleAssignee\|organization` | `role`, `state`, paging |
82
+ | `network_sizes.get` | `GET /rest/networkSizes/{orgUrn}?edgeType=COMPANY_FOLLOWED_BY_MEMBER`, `GET /v2/connections/{personUrn}` | follower count or the caller's connection count |
83
+ | `connections.list` | canonical only | first-degree connections, newest first, name/headline search |
84
+
85
+ ## Wire behaviour
86
+
87
+ - Authentication is `Authorization: Bearer <FIREDRILL_HTTP_TOKEN>`; LinkedIn access tokens are not parsed.
88
+ - `/rest` routes require `LinkedIn-Version`: absent → `400 VERSION_MISSING`; anything outside the fixed active list 202509–202608 →
89
+ `426 NONEXISTENT_VERSION`. `X-RestLi-Method` is required (`PARTIAL_UPDATE`) on the post and comment update routes and, when sent
90
+ elsewhere, must name the route's method, otherwise `400 BAD_REQUEST`. `X-Restli-Protocol-Version` is accepted but not enforced;
91
+ responses carry `x-restli-protocol-version: 2.0.0`.
92
+ - Errors use LinkedIn's envelope `{ status, serviceErrorCode, code, message }` on `/rest` routes and `{ status, serviceErrorCode, message }`
93
+ (no `code`) on `/v2` routes. `serviceErrorCode` is 65600 for invalid tokens, 100 for access denied and 0 otherwise.
94
+ - URNs in paths and query values are Rest.li-encoded (`urn%3Ali%3Ashare%3A…`); complex keys use `(actor:…,entity:…)`. Batch get
95
+ (`ids=List(…)`), query values with mangled percent-encoding, more than 20 repeats of a query parameter, JSON bodies nested deeper than
96
+ 512 levels, `__proto__`/`constructor`/`prototype` keys and unknown body fields answer `400 BAD_REQUEST`.
97
+ - Hashtags are stored and returned in LinkedIn's `{hashtag|\#|tag}` template form; `@[Name](urn)` mention annotations are kept verbatim.
98
+ - Post, activity and comment ids are 19-digit numbers whose high bits carry the creation time (`id >> 22` is epoch milliseconds).
99
+ - Collections return `{ paging: { start, count, links, total }, elements }`; `next`/`prev` links are included, and a page also ends
100
+ early (with a `next` link) before its body passes about 900 KB counted in UTF-8 bytes.
101
+ - Canonical, MCP and app callers do not send headers, so the version and method checks apply only to HTTP routes.
102
+
103
+ ## Events and faults
104
+
105
+ | id | kind | when |
106
+ |---|---|---|
107
+ | `post.published` | event | every accepted post create (both routes) and a draft published by `posts.update` |
108
+ | `comment.created` | event | every accepted comment create |
109
+ | `reaction.created` | event | a reaction row is created or its type changes (`previousReactionType`) |
110
+ | `comment-create-throttled` | fault, before | `comments.create` → `429 TOO_MANY_REQUESTS`, nothing written |
111
+ | `post-create-lost-response` | fault, after commit | `posts.create` → `500 INTERNAL_SERVER_ERROR` **after** the post is saved; LinkedIn has no idempotency header, so a blind retry publishes a duplicate |
112
+ | `reactions-unavailable` | fault, before | `reactions.create` and `reactions.delete` → `503 SERVICE_UNAVAILABLE` |
113
+
114
+ ## Conformance
115
+
116
+ `firedrill tool test linkedin` runs the packaged suite (20 drills, 8 actors, 5 scenarios). `test/conformance.mjs` uses Node built-ins
117
+ only and checks statuses, headers, envelopes and bodies of every route, every declared error of every operation, the three events and
118
+ the three faults. Actors: `member` (Maya), `fresh` (no attributes), `connection` (Sam Whitfield), `stranger` (Tomás Ibáñez), `limited`
119
+ (`openid, profile, w_member_social`), `openid-only`, `revoked` (unknown member id) and `no-grants`. Scenario `tight-limits` sets
120
+ `meta/limits.maxScanRows` to 1 so every scanning operation proves it fails instead of truncating.
121
+
122
+ ## Browser app
123
+
124
+ `firedrill serve` prints the app link (declared as `ui: {root: "app/site", entry: "index.html"}`). The app calls only declared operations
125
+ through `/_firedrill/client.js`, renders record text with `textContent`, sends an idempotency key with every mutation, and re-reads the
126
+ open view when the world revision changes (if you are typing a comment or have a dialog open it shows a "New posts" button instead).
127
+ Relative times ("2h", "3d") come from `feed.list.serverTimeMs` (world virtual time, UTC), never from the browser clock.
128
+
129
+ | Screen | What works | Operations |
130
+ |---|---|---|
131
+ | Home | Identity card (name, headline, first managed page, connection count), "Start a post", reverse-chronological feed with "Show more feed updates" paging, post cards with hashtags and mentions, article and reshare frames, reaction badges and counts, "…more" | `feed.list` |
132
+ | Post actions | Like click toggles LIKE; hovering Like (or ArrowUp) opens the six-reaction picker (Like, Celebrate, Support, Love, Insightful, Funny); Repost opens the composer with the embedded post (disabled when resharing is off or the post is not public); "…" menu: Edit post, Delete post (confirmation), Turn commenting off/on (confirmation warns that comments are deleted), Copy link | `reactions.create/delete`, `social_metadata.get`, `posts.create/update/delete`, `social_metadata.set_comments_state` |
133
+ | Composer | Post as the member or a page the member can post for, visibility Anyone / Connections only, 3000-character counter, "Add a link" article, inline errors; an `INTERNAL_SERVER_ERROR` on create warns that the post may already exist | `posts.create`, `posts.update` |
134
+ | Comments | Paged "Load more comments", replies (one level), comment as a page, @mention picker over connections (writes mention attributes), Like on comments, Edit (own) and Delete (own or on managed posts, confirmation), closed-comments notice, throttled message | `comments.list/create/update/delete`, `reactions.create/delete`, `connections.list` |
135
+ | Reactions dialog | All and per-type tabs with counts, rows with reaction badge, paged | `reactions.list`, `people.get`, `organizations.get` |
136
+ | Profile | Own profile: top card, Contact info (e-mail from userinfo), Activity with Posts/Drafts chips and Publish for drafts; other members: top card only | `profile.me`, `profile.userinfo`, `people.get`, `posts.list_by_author`, `posts.update` |
137
+ | My Network | "N Connections", name search, Recently added list with connection dates, paging | `connections.list` |
138
+ | Company page | Header with followers; administrators also see About and approved Page admins and can post as the page | `organizations.find_by_vanity_name`, `organizations.get`, `network_sizes.get`, `organization_acls.list`, `posts.list_by_author` |
139
+ | Search | Typeahead over connections and an exact company vanity-name match | `connections.list`, `organizations.find_by_vanity_name` |
140
+
141
+ States: skeleton loading cards, empty feed ("Start a conversation"), error cards with Retry, toasts for failed writes, an expired-session
142
+ screen for `INVALID_ACCESS_TOKEN` and an access screen for denied actors.
143
+
144
+ Visible but **not simulated** (they open a "Not simulated by this Tool" panel and change nothing): Jobs, Messaging, Notifications,
145
+ For Business, Premium, Send, Save, Hide post, Not interested, Profile viewers, Post impressions, Saved items, Groups, Newsletters, Events,
146
+ LinkedIn News, hashtag feeds, external link opening, photo/video/event/poll post types, emoji keyboard, comment images, reporting,
147
+ profile editing, Follow/Message on pages, feed sort options, full search results and footer links. Sign Out is shown disabled.
148
+
149
+ Avatars are initials on a colour derived from the member or organization id (no pictures are stored). The interface font stack matches
150
+ the real web client (platform UI fonts) with Fira Sans bundled as the offline fallback (SIL OFL 1.1); logos and font sources are listed
151
+ in `firedrill/tools/linkedin/app/assets/ATTRIBUTION.md`.
152
+
153
+ ## Compatibility
154
+
155
+ Routes, headers, field names and error envelopes follow LinkedIn's public API documentation for the implemented subset. **Not verified
156
+ against a real client**: no official SDK (for example LinkedIn's Rest.li API client) has been run against `firedrill serve`, so
157
+ `compatibility` in the manifest is empty. The connection recipe `linkedin-rest-client` exposes `LINKEDIN_API_BASE_URL` and
158
+ `LINKEDIN_ACCESS_TOKEN` for a test process.
159
+
160
+ ## Limitations
161
+
162
+ - Synthetic network only: no feed ranking (the home feed is reverse-chronological over the caller, its connections and followed or
163
+ managed organizations), notifications, analytics, follows, invitations, messaging, search APIs or jobs. Follower counts are stored numbers.
164
+ - No OAuth flows, token refresh, expiry or introspection; identity and scopes come from actor attributes. Rate limits are not counted:
165
+ 429 and 503 come only from the faults.
166
+ - Posts: text, article-link and reshare posts only. No images, videos, documents, multi-image, polls, carousels, sponsored or targeted
167
+ posts, call-to-action edits, `GET /v2/ugcPosts`, batch get or the ad-account finder. Only hashtag templating and verbatim mentions of
168
+ the little text format are handled.
169
+ - Comments: one reply level, oldest-first order (no relevance order), no comment images (a `content` field answers `403`).
170
+ - Reactions: reacting again with a different type replaces the earlier reaction (the API's exact answer in that case is an approximation);
171
+ the entity of a post reaction is stored and returned as the post's activity URN; `RELEVANCE` is served reverse-chronologically.
172
+ - Organizations and role assignments are read-only; no logos, page edits, brand or parent finders.
173
+ - `feed.list` and `connections.list` have no LinkedIn endpoint and use Firedrill-defined shapes (canonical operations only).
174
+ - Error codes and messages follow LinkedIn's published tables where they exist; business-rule messages, most `serviceErrorCode` values,
175
+ `403` (rather than `404`) for hidden connections-only posts and the `/v2` envelope details are approximations. Framework denials
176
+ (missing grants) and schema-invalid arguments are rendered in the LinkedIn envelope as `403`/`400`; requests the framework cannot route
177
+ (unknown paths, undecodable path segments, bodies over 1 MiB) answer in the Firedrill envelope.
178
+ - Scans are bounded by `meta/limits.maxScanRows` (default 5000, at most 10000) and fail with `500 INTERNAL_SERVER_ERROR`
179
+ ("state exceeds the supported bound of N rows") instead of returning partial results.
180
+
181
+ ## Trademarks
182
+
183
+ LinkedIn, the "in" logo and the LinkedIn wordmark are trademarks of their owner. The name and the unmodified logo files bundled in the
184
+ app are used only to identify the simulated service in a test environment; this package is not affiliated with or endorsed by LinkedIn.
185
+ The logo sources are recorded in `firedrill/tools/linkedin/app/assets/ATTRIBUTION.md`.
186
+
187
+ ## License
188
+
189
+ Apache-2.0. See `LICENSE`.
@@ -0,0 +1,16 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "target": {
4
+ "id": "conformance-agent",
5
+ "kind": "command",
6
+ "bindings": [
7
+ "http"
8
+ ],
9
+ "executable": "node",
10
+ "arguments": [
11
+ "test/conformance.mjs"
12
+ ],
13
+ "workingDirectory": ".",
14
+ "timeoutMs": 120000
15
+ }
16
+ }