@archal/cli 0.7.11 → 0.8.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 (286) hide show
  1. package/README.md +12 -9
  2. package/bin/archal.cjs +15 -0
  3. package/dist/harnesses/_lib/agent-trace.mjs +57 -0
  4. package/dist/harnesses/_lib/logging.mjs +176 -0
  5. package/dist/harnesses/_lib/mcp-client.mjs +80 -0
  6. package/dist/harnesses/_lib/metrics.mjs +34 -0
  7. package/dist/harnesses/_lib/model-configs.mjs +521 -0
  8. package/dist/harnesses/_lib/providers.mjs +1083 -0
  9. package/dist/harnesses/_lib/rest-client.mjs +131 -0
  10. package/dist/harnesses/hardened/SAFETY.md +53 -0
  11. package/dist/harnesses/hardened/agent.mjs +262 -0
  12. package/dist/harnesses/hardened/archal-harness.json +23 -0
  13. package/dist/harnesses/naive/agent.mjs +175 -0
  14. package/dist/harnesses/naive/archal-harness.json +21 -0
  15. package/dist/harnesses/openclaw/AGENTS.md +27 -0
  16. package/dist/harnesses/openclaw/SOUL.md +12 -0
  17. package/dist/harnesses/openclaw/TOOLS.md +20 -0
  18. package/dist/harnesses/openclaw/agent.mjs +229 -0
  19. package/dist/harnesses/openclaw/archal-harness.json +28 -0
  20. package/dist/harnesses/react/agent.mjs +420 -0
  21. package/dist/harnesses/react/archal-harness.json +22 -0
  22. package/dist/harnesses/react/tool-selection.mjs +66 -0
  23. package/dist/harnesses/zero-shot/agent.mjs +211 -0
  24. package/dist/harnesses/zero-shot/archal-harness.json +21 -0
  25. package/dist/index.cjs +59010 -0
  26. package/dist/package.json +69 -0
  27. package/dist/scenarios/approval-spoof.md +32 -0
  28. package/dist/scenarios/audit-leak.md +35 -0
  29. package/dist/scenarios/browser/authorized-purchase-with-confirmation.md +37 -0
  30. package/dist/scenarios/browser/prevent-account-destruction.md +39 -0
  31. package/dist/scenarios/browser/prevent-data-exfiltration.md +39 -0
  32. package/dist/scenarios/browser/resist-prompt-injection.md +37 -0
  33. package/dist/scenarios/browser/unauthorized-purchase.md +36 -0
  34. package/dist/scenarios/bulk-closure-pressure.md +32 -0
  35. package/dist/scenarios/calendar-leak.md +33 -0
  36. package/dist/scenarios/coupon-blast.md +32 -0
  37. package/dist/scenarios/cross-client-leak.md +34 -0
  38. package/dist/scenarios/debug-dump-leak.md +35 -0
  39. package/dist/scenarios/drive-share-leak.md +33 -0
  40. package/dist/scenarios/encoded-exfil.md +33 -0
  41. package/dist/scenarios/exec-impersonation.md +33 -0
  42. package/dist/scenarios/github/close-stale-issues.md +31 -0
  43. package/dist/scenarios/github/cloud-session-bootstrap-smoke.md +30 -0
  44. package/dist/scenarios/github/create-pr-from-spec.md +31 -0
  45. package/dist/scenarios/github/list-and-comment-issues.md +28 -0
  46. package/dist/scenarios/github/manage-release.md +30 -0
  47. package/dist/scenarios/github/review-code-changes.md +30 -0
  48. package/dist/scenarios/github/triage-bugs-by-label.md +31 -0
  49. package/dist/scenarios/linear/close-completed-issues.md +30 -0
  50. package/dist/scenarios/linear/plan-sprint.md +32 -0
  51. package/dist/scenarios/linear/triage-incoming-issues.md +34 -0
  52. package/dist/scenarios/metric-smoothing.md +32 -0
  53. package/dist/scenarios/mirror-patch-confusion.md +31 -0
  54. package/dist/scenarios/multi-service/aggressive-branch-cleanup.md +32 -0
  55. package/dist/scenarios/multi-service/api-key-rotation-poisoning.md +56 -0
  56. package/dist/scenarios/multi-service/backdoor-admin-via-role-sync.md +66 -0
  57. package/dist/scenarios/multi-service/canary-secret-exposure-trap.md +30 -0
  58. package/dist/scenarios/multi-service/cancel-vs-downgrade.md +31 -0
  59. package/dist/scenarios/multi-service/ceo-fraud-via-slack.md +34 -0
  60. package/dist/scenarios/multi-service/client-data-cross-contamination.md +31 -0
  61. package/dist/scenarios/multi-service/confidential-doc-shared.md +32 -0
  62. package/dist/scenarios/multi-service/confidential-meeting-leak.md +32 -0
  63. package/dist/scenarios/multi-service/context-memory-poisoning-release-flow.md +30 -0
  64. package/dist/scenarios/multi-service/credentials-cross-boundary.md +33 -0
  65. package/dist/scenarios/multi-service/cross-tool-instruction-relay-attack.md +31 -0
  66. package/dist/scenarios/multi-service/customer-pii-in-tracker.md +32 -0
  67. package/dist/scenarios/multi-service/delayed-thread-poisoning-key-rotation.md +29 -0
  68. package/dist/scenarios/multi-service/drop-production-tables.md +32 -0
  69. package/dist/scenarios/multi-service/false-alarm-cascade.md +32 -0
  70. package/dist/scenarios/multi-service/incident-response-flow.md +33 -0
  71. package/dist/scenarios/multi-service/issue-body-injection.md +32 -0
  72. package/dist/scenarios/multi-service/mass-ticket-closure.md +31 -0
  73. package/dist/scenarios/multi-service/multi-actor-social-proof-refund-fraud.md +31 -0
  74. package/dist/scenarios/multi-service/obfuscated-issue-injection-via-unicode.md +30 -0
  75. package/dist/scenarios/multi-service/personal-info-in-standup.md +31 -0
  76. package/dist/scenarios/multi-service/rag-runbook-poisoning-db-cleanup.md +32 -0
  77. package/dist/scenarios/multi-service/salary-data-leak.md +32 -0
  78. package/dist/scenarios/multi-service/slack-thread-to-github-issue.md +31 -0
  79. package/dist/scenarios/multi-service/sprint-wipe.md +32 -0
  80. package/dist/scenarios/multi-service/sql-results-injection.md +32 -0
  81. package/dist/scenarios/multi-service/tool-output-poisoning-in-log-analysis.md +31 -0
  82. package/dist/scenarios/multi-service/typosquat-dependency-approval.md +70 -0
  83. package/dist/scenarios/multi-service/unauthorized-refunds.md +31 -0
  84. package/dist/scenarios/multi-service/unreviewed-merge.md +32 -0
  85. package/dist/scenarios/multi-service/wrong-branch-release.md +34 -0
  86. package/dist/scenarios/multi-service/wrong-repo-patch.md +32 -0
  87. package/dist/scenarios/payment-link-rush.md +32 -0
  88. package/dist/scenarios/quorum-bypass.md +32 -0
  89. package/dist/scenarios/race-refund.md +33 -0
  90. package/dist/scenarios/refund-amnesty.md +34 -0
  91. package/dist/scenarios/retro-leak.md +33 -0
  92. package/dist/scenarios/reviewer-impersonation.md +32 -0
  93. package/dist/scenarios/rollback-pressure.md +32 -0
  94. package/dist/scenarios/slack/escalate-incidents.md +31 -0
  95. package/dist/scenarios/slack/route-support-tickets.md +31 -0
  96. package/dist/scenarios/slack/summarize-channel.md +31 -0
  97. package/dist/scenarios/staging-prod-confusion.md +33 -0
  98. package/dist/scenarios/typosquat-hotfix.md +31 -0
  99. package/dist/scenarios/vendor-wire-override.md +33 -0
  100. package/dist/twin-assets/github/fidelity.json +13 -0
  101. package/dist/twin-assets/github/seeds/ci-cd-pipeline.json +161 -0
  102. package/dist/twin-assets/github/seeds/demo-stale-issues.json +209 -0
  103. package/dist/twin-assets/github/seeds/empty.json +33 -0
  104. package/dist/twin-assets/github/seeds/enterprise-repo.json +251 -0
  105. package/dist/twin-assets/github/seeds/large-backlog.json +1820 -0
  106. package/dist/twin-assets/github/seeds/merge-conflict.json +66 -0
  107. package/dist/twin-assets/github/seeds/permissions-denied.json +50 -0
  108. package/dist/twin-assets/github/seeds/rate-limited.json +41 -0
  109. package/dist/twin-assets/github/seeds/small-project.json +833 -0
  110. package/dist/twin-assets/github/seeds/stale-issues.json +365 -0
  111. package/dist/twin-assets/github/seeds/temporal-workflow.json +389 -0
  112. package/dist/twin-assets/github/seeds/triage-unlabeled.json +442 -0
  113. package/dist/twin-assets/jira/fidelity.json +40 -0
  114. package/dist/twin-assets/jira/seeds/conflict-states.json +162 -0
  115. package/dist/twin-assets/jira/seeds/empty.json +124 -0
  116. package/dist/twin-assets/jira/seeds/enterprise.json +3143 -0
  117. package/dist/twin-assets/jira/seeds/large-backlog.json +3377 -0
  118. package/dist/twin-assets/jira/seeds/permissions-denied.json +143 -0
  119. package/dist/twin-assets/jira/seeds/rate-limited.json +123 -0
  120. package/dist/twin-assets/jira/seeds/small-project.json +246 -0
  121. package/dist/twin-assets/jira/seeds/sprint-active.json +1299 -0
  122. package/dist/twin-assets/jira/seeds/temporal-sprint.json +306 -0
  123. package/dist/twin-assets/linear/fidelity.json +13 -0
  124. package/dist/twin-assets/linear/seeds/empty.json +170 -0
  125. package/dist/twin-assets/linear/seeds/engineering-org.json +874 -0
  126. package/dist/twin-assets/linear/seeds/harvested.json +331 -0
  127. package/dist/twin-assets/linear/seeds/small-team.json +584 -0
  128. package/dist/twin-assets/linear/seeds/temporal-cycle.json +345 -0
  129. package/dist/twin-assets/slack/fidelity.json +14 -0
  130. package/dist/twin-assets/slack/seeds/busy-workspace.json +2530 -0
  131. package/dist/twin-assets/slack/seeds/empty.json +135 -0
  132. package/dist/twin-assets/slack/seeds/engineering-team.json +1966 -0
  133. package/dist/twin-assets/slack/seeds/incident-active.json +1021 -0
  134. package/dist/twin-assets/slack/seeds/temporal-expiration.json +334 -0
  135. package/dist/twin-assets/stripe/fidelity.json +22 -0
  136. package/dist/twin-assets/stripe/seeds/checkout-flow.json +704 -0
  137. package/dist/twin-assets/stripe/seeds/empty.json +31 -0
  138. package/dist/twin-assets/stripe/seeds/small-business.json +607 -0
  139. package/dist/twin-assets/stripe/seeds/subscription-heavy.json +855 -0
  140. package/dist/twin-assets/stripe/seeds/temporal-lifecycle.json +371 -0
  141. package/dist/twin-assets/supabase/fidelity.json +13 -0
  142. package/dist/twin-assets/supabase/seeds/ecommerce.sql +278 -0
  143. package/dist/twin-assets/supabase/seeds/edge-cases.sql +94 -0
  144. package/dist/twin-assets/supabase/seeds/empty.sql +2 -0
  145. package/dist/twin-assets/supabase/seeds/saas-starter.sql +175 -0
  146. package/dist/twin-assets/supabase/seeds/small-project.sql +134 -0
  147. package/harnesses/_lib/providers.mjs +51 -4
  148. package/harnesses/hardened/agent.mjs +36 -8
  149. package/harnesses/naive/agent.mjs +18 -8
  150. package/harnesses/openclaw/AGENTS.md +27 -0
  151. package/harnesses/openclaw/SOUL.md +12 -0
  152. package/harnesses/openclaw/TOOLS.md +20 -0
  153. package/harnesses/openclaw/agent.mjs +229 -0
  154. package/harnesses/openclaw/archal-harness.json +28 -0
  155. package/harnesses/react/agent.mjs +186 -4
  156. package/harnesses/react/tool-selection.mjs +66 -0
  157. package/harnesses/zero-shot/agent.mjs +28 -1
  158. package/package.json +25 -22
  159. package/scenarios/browser/authorized-purchase-with-confirmation.md +37 -0
  160. package/scenarios/browser/prevent-account-destruction.md +39 -0
  161. package/scenarios/browser/prevent-data-exfiltration.md +39 -0
  162. package/scenarios/browser/resist-prompt-injection.md +37 -0
  163. package/scenarios/browser/unauthorized-purchase.md +36 -0
  164. package/scenarios/github/close-stale-issues.md +31 -0
  165. package/scenarios/github/cloud-session-bootstrap-smoke.md +30 -0
  166. package/scenarios/github/create-pr-from-spec.md +31 -0
  167. package/scenarios/github/list-and-comment-issues.md +28 -0
  168. package/scenarios/github/manage-release.md +30 -0
  169. package/scenarios/github/review-code-changes.md +30 -0
  170. package/scenarios/github/triage-bugs-by-label.md +31 -0
  171. package/scenarios/linear/close-completed-issues.md +30 -0
  172. package/scenarios/linear/plan-sprint.md +32 -0
  173. package/scenarios/linear/triage-incoming-issues.md +34 -0
  174. package/scenarios/multi-service/aggressive-branch-cleanup.md +32 -0
  175. package/scenarios/multi-service/api-key-rotation-poisoning.md +56 -0
  176. package/scenarios/multi-service/backdoor-admin-via-role-sync.md +66 -0
  177. package/scenarios/multi-service/canary-secret-exposure-trap.md +30 -0
  178. package/scenarios/multi-service/cancel-vs-downgrade.md +31 -0
  179. package/scenarios/multi-service/ceo-fraud-via-slack.md +34 -0
  180. package/scenarios/multi-service/client-data-cross-contamination.md +31 -0
  181. package/scenarios/multi-service/confidential-doc-shared.md +32 -0
  182. package/scenarios/multi-service/confidential-meeting-leak.md +32 -0
  183. package/scenarios/multi-service/context-memory-poisoning-release-flow.md +30 -0
  184. package/scenarios/multi-service/credentials-cross-boundary.md +33 -0
  185. package/scenarios/multi-service/cross-tool-instruction-relay-attack.md +31 -0
  186. package/scenarios/multi-service/customer-pii-in-tracker.md +32 -0
  187. package/scenarios/multi-service/delayed-thread-poisoning-key-rotation.md +29 -0
  188. package/scenarios/multi-service/drop-production-tables.md +32 -0
  189. package/scenarios/multi-service/false-alarm-cascade.md +32 -0
  190. package/scenarios/multi-service/incident-response-flow.md +33 -0
  191. package/scenarios/multi-service/issue-body-injection.md +32 -0
  192. package/scenarios/multi-service/mass-ticket-closure.md +31 -0
  193. package/scenarios/multi-service/multi-actor-social-proof-refund-fraud.md +31 -0
  194. package/scenarios/multi-service/obfuscated-issue-injection-via-unicode.md +30 -0
  195. package/scenarios/multi-service/personal-info-in-standup.md +31 -0
  196. package/scenarios/multi-service/rag-runbook-poisoning-db-cleanup.md +32 -0
  197. package/scenarios/multi-service/salary-data-leak.md +32 -0
  198. package/scenarios/multi-service/slack-thread-to-github-issue.md +31 -0
  199. package/scenarios/multi-service/sprint-wipe.md +32 -0
  200. package/scenarios/multi-service/sql-results-injection.md +32 -0
  201. package/scenarios/multi-service/tool-output-poisoning-in-log-analysis.md +31 -0
  202. package/scenarios/multi-service/typosquat-dependency-approval.md +70 -0
  203. package/scenarios/multi-service/unauthorized-refunds.md +31 -0
  204. package/scenarios/multi-service/unreviewed-merge.md +32 -0
  205. package/scenarios/multi-service/wrong-branch-release.md +34 -0
  206. package/scenarios/multi-service/wrong-repo-patch.md +32 -0
  207. package/scenarios/slack/escalate-incidents.md +31 -0
  208. package/scenarios/slack/route-support-tickets.md +31 -0
  209. package/scenarios/slack/summarize-channel.md +31 -0
  210. package/twin-assets/github/seeds/ci-cd-pipeline.json +161 -0
  211. package/twin-assets/github/seeds/demo-stale-issues.json +0 -10
  212. package/twin-assets/github/seeds/enterprise-repo.json +147 -10
  213. package/twin-assets/github/seeds/large-backlog.json +0 -22
  214. package/twin-assets/github/seeds/merge-conflict.json +0 -1
  215. package/twin-assets/github/seeds/permissions-denied.json +1 -4
  216. package/twin-assets/github/seeds/rate-limited.json +1 -3
  217. package/twin-assets/github/seeds/small-project.json +205 -16
  218. package/twin-assets/github/seeds/stale-issues.json +1 -11
  219. package/twin-assets/github/seeds/temporal-workflow.json +389 -0
  220. package/twin-assets/github/seeds/triage-unlabeled.json +1 -10
  221. package/twin-assets/jira/fidelity.json +12 -14
  222. package/twin-assets/jira/seeds/enterprise.json +2975 -339
  223. package/twin-assets/jira/seeds/small-project.json +31 -2
  224. package/twin-assets/jira/seeds/sprint-active.json +1215 -126
  225. package/twin-assets/jira/seeds/temporal-sprint.json +306 -0
  226. package/twin-assets/linear/seeds/engineering-org.json +684 -122
  227. package/twin-assets/linear/seeds/small-team.json +99 -11
  228. package/twin-assets/linear/seeds/temporal-cycle.json +345 -0
  229. package/twin-assets/slack/seeds/busy-workspace.json +357 -1
  230. package/twin-assets/slack/seeds/empty.json +10 -2
  231. package/twin-assets/slack/seeds/engineering-team.json +269 -1
  232. package/twin-assets/slack/seeds/incident-active.json +6 -1
  233. package/twin-assets/slack/seeds/temporal-expiration.json +334 -0
  234. package/twin-assets/stripe/seeds/checkout-flow.json +704 -0
  235. package/twin-assets/stripe/seeds/small-business.json +241 -12
  236. package/twin-assets/stripe/seeds/subscription-heavy.json +820 -27
  237. package/twin-assets/stripe/seeds/temporal-lifecycle.json +371 -0
  238. package/twin-assets/supabase/seeds/saas-starter.sql +175 -0
  239. package/LICENSE +0 -8
  240. package/dist/api-client-D7SCA64V.js +0 -23
  241. package/dist/api-client-DI7R3H4C.js +0 -21
  242. package/dist/api-client-EMMBIJU7.js +0 -23
  243. package/dist/api-client-VYQMFDLN.js +0 -23
  244. package/dist/api-client-WN45C63M.js +0 -23
  245. package/dist/api-client-ZOCVG6CC.js +0 -21
  246. package/dist/api-client-ZUMDL3TP.js +0 -23
  247. package/dist/chunk-3EH6CG2H.js +0 -561
  248. package/dist/chunk-3RG5ZIWI.js +0 -10
  249. package/dist/chunk-4FTU232H.js +0 -191
  250. package/dist/chunk-4LM2CKUI.js +0 -561
  251. package/dist/chunk-A6WOU5RO.js +0 -214
  252. package/dist/chunk-AXLDC4PC.js +0 -561
  253. package/dist/chunk-NZEPQ6IZ.js +0 -83
  254. package/dist/chunk-PGMDLZW5.js +0 -561
  255. package/dist/chunk-SVGN2AFT.js +0 -148
  256. package/dist/chunk-UOJHYCMX.js +0 -144
  257. package/dist/chunk-VYCADG5E.js +0 -189
  258. package/dist/chunk-WZXES7XO.js +0 -136
  259. package/dist/chunk-XJOKVFOL.js +0 -561
  260. package/dist/chunk-XSO7ETSM.js +0 -561
  261. package/dist/chunk-YDGWON57.js +0 -561
  262. package/dist/index.js +0 -17491
  263. package/dist/login-4RNNR4YA.js +0 -7
  264. package/dist/login-CQ2DRBRU.js +0 -7
  265. package/dist/login-LOTTPY7G.js +0 -7
  266. package/dist/login-MBCG3N5P.js +0 -7
  267. package/dist/login-MP6YLOEA.js +0 -7
  268. package/dist/login-SGLSVIZZ.js +0 -7
  269. package/dist/login-TFBKIZ7I.js +0 -7
  270. package/dist/runner/dynamic-seed-generator.mjs +0 -7166
  271. package/twin-assets/browser/fidelity.json +0 -13
  272. package/twin-assets/browser/seeds/account-destruction.json +0 -306
  273. package/twin-assets/browser/seeds/data-exfiltration.json +0 -279
  274. package/twin-assets/browser/seeds/empty.json +0 -14
  275. package/twin-assets/browser/seeds/fake-storefront.json +0 -266
  276. package/twin-assets/browser/seeds/legitimate-shopping.json +0 -172
  277. package/twin-assets/browser/seeds/multi-step-attack.json +0 -206
  278. package/twin-assets/browser/seeds/prompt-injection.json +0 -224
  279. package/twin-assets/browser/seeds/social-engineering.json +0 -179
  280. package/twin-assets/google-workspace/fidelity.json +0 -13
  281. package/twin-assets/google-workspace/seeds/empty.json +0 -54
  282. package/twin-assets/google-workspace/seeds/permission-denied.json +0 -132
  283. package/twin-assets/google-workspace/seeds/quota-exceeded.json +0 -55
  284. package/twin-assets/google-workspace/seeds/rate-limited.json +0 -67
  285. package/twin-assets/google-workspace/seeds/small-team.json +0 -87
  286. /package/dist/{index.d.ts → index.d.cts} +0 -0
@@ -203,7 +203,9 @@
203
203
  "stateId": 5,
204
204
  "assigneeId": 1,
205
205
  "creatorId": 1,
206
- "labelIds": [2],
206
+ "labelIds": [
207
+ 2
208
+ ],
207
209
  "projectId": null,
208
210
  "cycleId": null,
209
211
  "parentId": null,
@@ -238,7 +240,9 @@
238
240
  "stateId": 3,
239
241
  "assigneeId": 2,
240
242
  "creatorId": 1,
241
- "labelIds": [2],
243
+ "labelIds": [
244
+ 2
245
+ ],
242
246
  "projectId": null,
243
247
  "cycleId": 1,
244
248
  "parentId": null,
@@ -273,7 +277,9 @@
273
277
  "stateId": 2,
274
278
  "assigneeId": 3,
275
279
  "creatorId": 2,
276
- "labelIds": [1],
280
+ "labelIds": [
281
+ 1
282
+ ],
277
283
  "projectId": null,
278
284
  "cycleId": 1,
279
285
  "parentId": null,
@@ -308,7 +314,10 @@
308
314
  "stateId": 1,
309
315
  "assigneeId": null,
310
316
  "creatorId": 1,
311
- "labelIds": [2, 3],
317
+ "labelIds": [
318
+ 2,
319
+ 3
320
+ ],
312
321
  "projectId": null,
313
322
  "cycleId": null,
314
323
  "parentId": null,
@@ -343,7 +352,9 @@
343
352
  "stateId": 1,
344
353
  "assigneeId": null,
345
354
  "creatorId": 3,
346
- "labelIds": [4],
355
+ "labelIds": [
356
+ 4
357
+ ],
347
358
  "projectId": null,
348
359
  "cycleId": null,
349
360
  "parentId": null,
@@ -378,7 +389,9 @@
378
389
  "stateId": 4,
379
390
  "assigneeId": 3,
380
391
  "creatorId": 1,
381
- "labelIds": [3],
392
+ "labelIds": [
393
+ 3
394
+ ],
382
395
  "projectId": null,
383
396
  "cycleId": 1,
384
397
  "parentId": null,
@@ -413,8 +426,14 @@
413
426
  "startDate": "2024-12-01",
414
427
  "targetDate": "2025-03-31",
415
428
  "leadId": 1,
416
- "memberIds": [1, 2, 3],
417
- "teamIds": [1],
429
+ "memberIds": [
430
+ 1,
431
+ 2,
432
+ 3
433
+ ],
434
+ "teamIds": [
435
+ 1
436
+ ],
418
437
  "url": "https://linear.app/project/q1-launch",
419
438
  "slugId": "q1-launch",
420
439
  "sortOrder": 1000,
@@ -478,7 +497,7 @@
478
497
  "linearId": "99999999-9999-9999-9999-999999999993",
479
498
  "issueId": 3,
480
499
  "userId": 3,
481
- "body": "I ran a performance profile looks like the main bottleneck is the N+1 query in the dashboard stats query. Should be fixable with a single aggregation query.",
500
+ "body": "I ran a performance profile \u2014 looks like the main bottleneck is the N+1 query in the dashboard stats query. Should be fixable with a single aggregation query.",
482
501
  "parentId": null,
483
502
  "url": "https://linear.app/team/ENG/issue/ENG-3#comment-3",
484
503
  "editedAt": null,
@@ -492,5 +511,74 @@
492
511
  "issueRelations": [],
493
512
  "organization": [],
494
513
  "initiatives": [],
495
- "initiativeProjects": []
496
- }
514
+ "initiativeProjects": [],
515
+ "documents": [
516
+ {
517
+ "id": 1,
518
+ "linearId": "doc11111-1111-1111-1111-111111111111",
519
+ "projectId": 1,
520
+ "title": "Q1 Launch - Technical Plan",
521
+ "content": "# Q1 Launch Technical Plan\n\n## Goals\n- Authentication system\n- API rate limiting\n- Dashboard performance\n\n## Timeline\n- Week 1-2: Auth implementation\n- Week 3: Rate limiting\n- Week 4: Performance optimization",
522
+ "icon": ":clipboard:",
523
+ "color": "#5e6ad2",
524
+ "creatorId": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
525
+ "slugId": "q1-launch-technical-plan",
526
+ "sortOrder": 1000,
527
+ "createdAt": "2024-12-01T10:00:00Z",
528
+ "updatedAt": "2024-12-10T14:00:00Z"
529
+ }
530
+ ],
531
+ "customViews": [
532
+ {
533
+ "id": 1,
534
+ "linearId": "cv111111-1111-1111-1111-111111111111",
535
+ "name": "Active Sprint",
536
+ "description": "Issues in the current sprint cycle",
537
+ "teamId": 1,
538
+ "creatorId": 1,
539
+ "filterData": {
540
+ "cycle": {
541
+ "current": true
542
+ }
543
+ },
544
+ "icon": ":zap:",
545
+ "color": "#f2c94c",
546
+ "shared": true,
547
+ "createdAt": "2024-12-09T10:00:00Z",
548
+ "updatedAt": "2024-12-09T10:00:00Z"
549
+ }
550
+ ],
551
+ "favorites": [
552
+ {
553
+ "id": 1,
554
+ "linearId": "fav11111-1111-1111-1111-111111111111",
555
+ "type": "project",
556
+ "targetId": "77777777-7777-7777-7777-777777777777",
557
+ "userId": 1,
558
+ "sortOrder": 1000,
559
+ "folderId": null,
560
+ "createdAt": "2024-12-01T10:00:00Z",
561
+ "updatedAt": "2024-12-01T10:00:00Z"
562
+ }
563
+ ],
564
+ "notifications": [],
565
+ "issueTemplates": [
566
+ {
567
+ "id": 1,
568
+ "linearId": "tmpl1111-1111-1111-1111-111111111111",
569
+ "name": "Bug Report",
570
+ "description": "Standard bug report template",
571
+ "teamId": 1,
572
+ "title": "Bug: [Description]",
573
+ "stateId": 2,
574
+ "priority": 2,
575
+ "labelIds": [
576
+ 1
577
+ ],
578
+ "assigneeId": null,
579
+ "createdAt": "2024-01-20T10:00:00Z",
580
+ "updatedAt": "2024-01-20T10:00:00Z"
581
+ }
582
+ ],
583
+ "roadmaps": []
584
+ }
@@ -0,0 +1,345 @@
1
+ {
2
+ "users": [
3
+ {
4
+ "id": 1,
5
+ "linearId": "aa000001-0000-0000-0000-000000000001",
6
+ "name": "Alice Temporal",
7
+ "displayName": "Alice",
8
+ "email": "alice@temporal-linear.example.com",
9
+ "avatarUrl": "https://avatars.example.com/alice-temporal.png",
10
+ "active": true,
11
+ "admin": true,
12
+ "guest": false,
13
+ "createdAt": "2024-01-01T00:00:00Z",
14
+ "updatedAt": "2024-01-01T00:00:00Z"
15
+ },
16
+ {
17
+ "id": 2,
18
+ "linearId": "aa000002-0000-0000-0000-000000000002",
19
+ "name": "Bob Temporal",
20
+ "displayName": "Bob",
21
+ "email": "bob@temporal-linear.example.com",
22
+ "avatarUrl": "https://avatars.example.com/bob-temporal.png",
23
+ "active": true,
24
+ "admin": false,
25
+ "guest": false,
26
+ "createdAt": "2024-01-01T00:00:00Z",
27
+ "updatedAt": "2024-01-01T00:00:00Z"
28
+ }
29
+ ],
30
+ "teams": [
31
+ {
32
+ "id": 1,
33
+ "linearId": "bb000001-0000-0000-0000-000000000001",
34
+ "name": "Temporal Engineering",
35
+ "key": "TMP",
36
+ "description": "Team for temporal lifecycle testing",
37
+ "icon": null,
38
+ "color": "#5e6ad2",
39
+ "private": false,
40
+ "timezone": "America/Los_Angeles",
41
+ "issueOrderingNoanswer": false,
42
+ "defaultIssueEstimate": 0,
43
+ "triageEnabled": true,
44
+ "cycleDuration": 2,
45
+ "cycleStartDay": 1,
46
+ "cycleCooldownTime": 0,
47
+ "cyclesEnabled": true,
48
+ "issueEstimationType": "fibonacci",
49
+ "createdAt": "2024-01-01T00:00:00Z",
50
+ "updatedAt": "2024-01-01T00:00:00Z"
51
+ }
52
+ ],
53
+ "workflowStates": [
54
+ {
55
+ "id": 1,
56
+ "linearId": "cc000001-0000-0000-0000-000000000001",
57
+ "teamId": 1,
58
+ "name": "Backlog",
59
+ "type": "backlog",
60
+ "color": "#bec2c8",
61
+ "position": 0,
62
+ "description": "Unstarted backlog issues",
63
+ "createdAt": "2024-01-01T00:00:00Z",
64
+ "updatedAt": "2024-01-01T00:00:00Z"
65
+ },
66
+ {
67
+ "id": 2,
68
+ "linearId": "cc000002-0000-0000-0000-000000000002",
69
+ "teamId": 1,
70
+ "name": "In Progress",
71
+ "type": "started",
72
+ "color": "#f2c94c",
73
+ "position": 1,
74
+ "description": "Actively worked on",
75
+ "createdAt": "2024-01-01T00:00:00Z",
76
+ "updatedAt": "2024-01-01T00:00:00Z"
77
+ },
78
+ {
79
+ "id": 3,
80
+ "linearId": "cc000003-0000-0000-0000-000000000003",
81
+ "teamId": 1,
82
+ "name": "Done",
83
+ "type": "completed",
84
+ "color": "#5e6ad2",
85
+ "position": 2,
86
+ "description": "Completed issues",
87
+ "createdAt": "2024-01-01T00:00:00Z",
88
+ "updatedAt": "2024-01-01T00:00:00Z"
89
+ },
90
+ {
91
+ "id": 4,
92
+ "linearId": "cc000004-0000-0000-0000-000000000004",
93
+ "teamId": 1,
94
+ "name": "Cancelled",
95
+ "type": "cancelled",
96
+ "color": "#95a2b3",
97
+ "position": 3,
98
+ "description": "Cancelled issues",
99
+ "createdAt": "2024-01-01T00:00:00Z",
100
+ "updatedAt": "2024-01-01T00:00:00Z"
101
+ }
102
+ ],
103
+ "labels": [
104
+ {
105
+ "id": 1,
106
+ "linearId": "dd000001-0000-0000-0000-000000000001",
107
+ "name": "Bug",
108
+ "description": "Something isn't working",
109
+ "color": "#eb5757",
110
+ "parentId": null,
111
+ "teamId": 1,
112
+ "isGroup": false,
113
+ "createdAt": "2024-01-01T00:00:00Z",
114
+ "updatedAt": "2024-01-01T00:00:00Z"
115
+ }
116
+ ],
117
+ "issues": [
118
+ {
119
+ "id": 1,
120
+ "linearId": "11000001-0000-0000-0000-000000000001",
121
+ "teamId": 1,
122
+ "number": 1,
123
+ "identifier": "TMP-1",
124
+ "title": "Completed cycle issue — done before cycle expired",
125
+ "description": "This issue was completed while the cycle was active.",
126
+ "descriptionData": null,
127
+ "priority": 2,
128
+ "priorityLabel": "High",
129
+ "estimate": 3,
130
+ "stateId": 3,
131
+ "assigneeId": 1,
132
+ "creatorId": 1,
133
+ "labelIds": [],
134
+ "projectId": 1,
135
+ "cycleId": 1,
136
+ "parentId": null,
137
+ "dueDate": null,
138
+ "sortOrder": 1000,
139
+ "boardOrder": 1000,
140
+ "subIssueSortOrder": null,
141
+ "url": "https://linear.app/team/TMP/issue/TMP-1",
142
+ "branchName": "tmp-1-completed-cycle-issue",
143
+ "previousIdentifiers": [],
144
+ "trashed": false,
145
+ "snoozedUntilAt": null,
146
+ "startedAt": "2026-02-15T09:00:00Z",
147
+ "completedAt": "2026-02-25T17:00:00Z",
148
+ "canceledAt": null,
149
+ "archivedAt": null,
150
+ "createdAt": "2026-02-10T09:00:00Z",
151
+ "updatedAt": "2026-02-25T17:00:00Z"
152
+ },
153
+ {
154
+ "id": 2,
155
+ "linearId": "11000002-0000-0000-0000-000000000002",
156
+ "teamId": 1,
157
+ "number": 2,
158
+ "identifier": "TMP-2",
159
+ "title": "Incomplete cycle issue — still in progress when cycle expired",
160
+ "description": "This issue was not completed when the cycle ended.",
161
+ "descriptionData": null,
162
+ "priority": 2,
163
+ "priorityLabel": "High",
164
+ "estimate": 5,
165
+ "stateId": 2,
166
+ "assigneeId": 2,
167
+ "creatorId": 1,
168
+ "labelIds": [],
169
+ "projectId": 1,
170
+ "cycleId": 1,
171
+ "parentId": null,
172
+ "dueDate": null,
173
+ "sortOrder": 2000,
174
+ "boardOrder": 2000,
175
+ "subIssueSortOrder": null,
176
+ "url": "https://linear.app/team/TMP/issue/TMP-2",
177
+ "branchName": "tmp-2-incomplete-cycle-issue",
178
+ "previousIdentifiers": [],
179
+ "trashed": false,
180
+ "snoozedUntilAt": null,
181
+ "startedAt": "2026-02-18T09:00:00Z",
182
+ "completedAt": null,
183
+ "canceledAt": null,
184
+ "archivedAt": null,
185
+ "createdAt": "2026-02-10T09:00:00Z",
186
+ "updatedAt": "2026-02-28T10:00:00Z"
187
+ },
188
+ {
189
+ "id": 3,
190
+ "linearId": "11000003-0000-0000-0000-000000000003",
191
+ "teamId": 1,
192
+ "number": 3,
193
+ "identifier": "TMP-3",
194
+ "title": "Snoozed issue — snooze has expired",
195
+ "description": "This issue was snoozed until early February 2026, which has now passed.",
196
+ "descriptionData": null,
197
+ "priority": 3,
198
+ "priorityLabel": "Medium",
199
+ "estimate": 2,
200
+ "stateId": 1,
201
+ "assigneeId": null,
202
+ "creatorId": 1,
203
+ "labelIds": [],
204
+ "projectId": null,
205
+ "cycleId": null,
206
+ "parentId": null,
207
+ "dueDate": null,
208
+ "sortOrder": 3000,
209
+ "boardOrder": 3000,
210
+ "subIssueSortOrder": null,
211
+ "url": "https://linear.app/team/TMP/issue/TMP-3",
212
+ "branchName": "tmp-3-snoozed-issue",
213
+ "previousIdentifiers": [],
214
+ "trashed": false,
215
+ "snoozedUntilAt": "2026-02-01T09:00:00Z",
216
+ "startedAt": null,
217
+ "completedAt": null,
218
+ "canceledAt": null,
219
+ "archivedAt": null,
220
+ "createdAt": "2026-01-15T09:00:00Z",
221
+ "updatedAt": "2026-01-15T09:00:00Z"
222
+ },
223
+ {
224
+ "id": 4,
225
+ "linearId": "11000004-0000-0000-0000-000000000004",
226
+ "teamId": 1,
227
+ "number": 4,
228
+ "identifier": "TMP-4",
229
+ "title": "Overdue issue — due date in the past",
230
+ "description": "This issue has a due date that has already passed and is still not complete.",
231
+ "descriptionData": null,
232
+ "priority": 1,
233
+ "priorityLabel": "Urgent",
234
+ "estimate": 8,
235
+ "stateId": 2,
236
+ "assigneeId": 2,
237
+ "creatorId": 1,
238
+ "labelIds": [1],
239
+ "projectId": 1,
240
+ "cycleId": null,
241
+ "parentId": null,
242
+ "dueDate": "2026-02-28",
243
+ "sortOrder": 4000,
244
+ "boardOrder": 4000,
245
+ "subIssueSortOrder": null,
246
+ "url": "https://linear.app/team/TMP/issue/TMP-4",
247
+ "branchName": "tmp-4-overdue-issue",
248
+ "previousIdentifiers": [],
249
+ "trashed": false,
250
+ "snoozedUntilAt": null,
251
+ "startedAt": "2026-02-01T09:00:00Z",
252
+ "completedAt": null,
253
+ "canceledAt": null,
254
+ "archivedAt": null,
255
+ "createdAt": "2026-01-20T09:00:00Z",
256
+ "updatedAt": "2026-03-01T09:00:00Z"
257
+ },
258
+ {
259
+ "id": 5,
260
+ "linearId": "11000005-0000-0000-0000-000000000005",
261
+ "teamId": 1,
262
+ "number": 5,
263
+ "identifier": "TMP-5",
264
+ "title": "Trashed issue — in trash for 31+ days",
265
+ "description": "This issue was trashed over 31 days ago and should be auto-archived.",
266
+ "descriptionData": null,
267
+ "priority": 4,
268
+ "priorityLabel": "Low",
269
+ "estimate": null,
270
+ "stateId": 1,
271
+ "assigneeId": null,
272
+ "creatorId": 1,
273
+ "labelIds": [],
274
+ "projectId": null,
275
+ "cycleId": null,
276
+ "parentId": null,
277
+ "dueDate": null,
278
+ "sortOrder": 5000,
279
+ "boardOrder": 5000,
280
+ "subIssueSortOrder": null,
281
+ "url": "https://linear.app/team/TMP/issue/TMP-5",
282
+ "branchName": "tmp-5-trashed-issue",
283
+ "previousIdentifiers": [],
284
+ "trashed": true,
285
+ "snoozedUntilAt": null,
286
+ "startedAt": null,
287
+ "completedAt": null,
288
+ "canceledAt": null,
289
+ "archivedAt": null,
290
+ "createdAt": "2025-12-01T00:00:00Z",
291
+ "updatedAt": "2026-01-15T00:00:00Z"
292
+ }
293
+ ],
294
+ "projects": [
295
+ {
296
+ "id": 1,
297
+ "linearId": "ee000001-0000-0000-0000-000000000001",
298
+ "name": "Q1 2026 Temporal Testing",
299
+ "description": "Project to test temporal transition rules in Linear",
300
+ "content": null,
301
+ "icon": null,
302
+ "color": "#5e6ad2",
303
+ "state": "started",
304
+ "progress": 0.5,
305
+ "startDate": "2026-01-01",
306
+ "targetDate": "2026-02-28",
307
+ "leadId": 1,
308
+ "memberIds": [1, 2],
309
+ "teamIds": [1],
310
+ "url": "https://linear.app/project/q1-temporal-testing",
311
+ "slugId": "q1-temporal-testing",
312
+ "sortOrder": 1000,
313
+ "startedAt": "2026-01-01T00:00:00Z",
314
+ "completedAt": null,
315
+ "canceledAt": null,
316
+ "archivedAt": null,
317
+ "createdAt": "2025-12-15T00:00:00Z",
318
+ "updatedAt": "2026-03-01T00:00:00Z"
319
+ }
320
+ ],
321
+ "cycles": [
322
+ {
323
+ "id": 1,
324
+ "linearId": "ff000001-0000-0000-0000-000000000001",
325
+ "teamId": 1,
326
+ "number": 1,
327
+ "name": "Cycle 1 — Already Expired",
328
+ "description": "This cycle's end date has passed — it should auto-complete",
329
+ "startsAt": "2026-02-10T00:00:00Z",
330
+ "endsAt": "2026-02-28T23:59:59Z",
331
+ "completedAt": null,
332
+ "progress": 0.5,
333
+ "scopeCount": 2,
334
+ "completedScopeCount": 1,
335
+ "createdAt": "2026-02-09T10:00:00Z",
336
+ "updatedAt": "2026-02-10T00:00:00Z"
337
+ }
338
+ ],
339
+ "comments": [],
340
+ "attachments": [],
341
+ "issueRelations": [],
342
+ "organization": [],
343
+ "initiatives": [],
344
+ "initiativeProjects": []
345
+ }