archal 0.9.19 → 0.10.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 (83) hide show
  1. package/README.md +62 -154
  2. package/agents/openclaw/.archal.json +8 -0
  3. package/agents/openclaw/Dockerfile +97 -0
  4. package/agents/openclaw/README.md +113 -0
  5. package/agents/openclaw/drive.mjs +301 -0
  6. package/agents/openclaw/extract-openclaw-response-text.mjs +49 -0
  7. package/agents/openclaw/package.json +9 -0
  8. package/agents/openclaw/scenarios/acceptance/github-escalation-and-cleanup.md +43 -0
  9. package/agents/openclaw/scenarios/acceptance/jira-linear-release-triage.md +39 -0
  10. package/agents/openclaw/scenarios/acceptance/multi-clone-customer-risk-review.md +45 -0
  11. package/agents/openclaw/scenarios/acceptance/slack-incident-handoff.md +42 -0
  12. package/agents/openclaw/scenarios/acceptance/stripe-dunning-remediation.md +40 -0
  13. package/agents/openclaw/scenarios/close-stale-issues.md +35 -0
  14. package/agents/openclaw/scenarios/github-issue-triage-read-only.md +44 -0
  15. package/agents/openclaw/workspace/AGENTS.md +23 -0
  16. package/agents/openclaw/workspace/IDENTITY.md +8 -0
  17. package/agents/openclaw/workspace/SOUL.md +14 -0
  18. package/agents/openclaw/workspace/TOOLS.md +54 -0
  19. package/clone-assets/apify/tools.json +256 -22
  20. package/clone-assets/calcom/tools.json +2062 -0
  21. package/clone-assets/clickup/tools.json +3245 -0
  22. package/clone-assets/customerio/tools.json +2350 -0
  23. package/clone-assets/datadog/tools.json +734 -0
  24. package/clone-assets/github/tools.json +307 -27
  25. package/clone-assets/gitlab/tools.json +10688 -0
  26. package/clone-assets/google-workspace/tools.json +18 -6
  27. package/clone-assets/hubspot/tools.json +1604 -0
  28. package/clone-assets/jira/fidelity.json +1 -1
  29. package/clone-assets/jira/tools.json +266 -543
  30. package/clone-assets/linear/tools.json +278 -40
  31. package/clone-assets/ownerrez/tools.json +548 -0
  32. package/clone-assets/pricelabs/tools.json +343 -0
  33. package/clone-assets/sentry/tools.json +2821 -0
  34. package/clone-assets/slack/tools.json +1 -2
  35. package/clone-assets/stripe/tools.json +299 -46
  36. package/clone-assets/supabase/tools.json +437 -0
  37. package/clone-assets/unipile/tools.json +408 -0
  38. package/clone-assets/webflow/tools.json +2185 -0
  39. package/dist/autoloop-worker-types-CHaclqtD.d.cts +160 -0
  40. package/dist/cli.cjs +127896 -84811
  41. package/dist/{vitest/chunk-L36NXAU6.js → commands/autoloop-hosted-control-plane-client.cjs} +16344 -18845
  42. package/dist/commands/autoloop-hosted-control-plane-client.d.cts +133 -0
  43. package/dist/commands/autoloop-pr-verification.cjs +4312 -0
  44. package/dist/commands/autoloop-pr-verification.d.cts +19 -0
  45. package/dist/commands/autoloop-result-parser.cjs +27058 -0
  46. package/dist/commands/autoloop-result-parser.d.cts +196 -0
  47. package/dist/commands/autoloop-worker.cjs +38488 -0
  48. package/dist/commands/autoloop-worker.d.cts +102 -0
  49. package/dist/eval-shim.mjs +216 -0
  50. package/dist/index.cjs +15 -2
  51. package/dist/index.d.cts +3 -1
  52. package/dist/layer-1-ziaLpfLr.d.cts +62 -0
  53. package/dist/metafile-cjs.json +1 -0
  54. package/dist/reporter-entry.js +3 -0
  55. package/dist/sdk/index.cjs +51630 -0
  56. package/dist/sdk/index.d.cts +626 -0
  57. package/dist/vitest/chunk-2PDHTPZC.js +4867 -0
  58. package/dist/vitest/chunk-7L4BBB6M.js +2613 -0
  59. package/dist/vitest/index.cjs +6152 -75718
  60. package/dist/vitest/index.d.ts +22 -86
  61. package/dist/vitest/index.js +45 -414
  62. package/dist/vitest/runtime/hosted-session-reaper.cjs +682 -34399
  63. package/dist/vitest/runtime/hosted-session-reaper.js +1 -1
  64. package/dist/vitest/runtime/setup-files.js +2 -2
  65. package/manifest.json +9 -0
  66. package/package.json +20 -14
  67. package/skills/archal-agent/SKILL.md +86 -0
  68. package/skills/autoloop/SKILL.md +391 -0
  69. package/skills/autoloop/references/hosted-sources.md +94 -0
  70. package/skills/autoloop/references/trace-schema-mapping.md +104 -0
  71. package/skills/eval/SKILL.md +17 -15
  72. package/skills/free-account/SKILL.md +103 -0
  73. package/skills/install-agent/SKILL.md +202 -0
  74. package/skills/onboard/SKILL.md +29 -18
  75. package/skills/scenario/SKILL.md +36 -18
  76. package/skills/seed/SKILL.md +238 -0
  77. package/skills/vitest/SKILL.md +3 -2
  78. package/dist/harness.cjs +0 -62
  79. package/dist/harness.d.cts +0 -20
  80. package/dist/seed/dynamic-generator.cjs +0 -45687
  81. package/dist/seed/dynamic-generator.d.cts +0 -106
  82. package/dist/vitest/chunk-WZ7SA4CK.js +0 -47369
  83. package/skills/attach/SKILL.md +0 -402
@@ -1,3 +1,4 @@
1
+ import { UserWorkspaceConfig } from 'vitest/config';
1
2
  import { Reporter } from 'vitest/reporters';
2
3
  import { Vitest } from 'vitest/node';
3
4
 
@@ -5,7 +6,7 @@ interface ServiceConfig {
5
6
  mode: 'route';
6
7
  seed?: string;
7
8
  }
8
- type SeedFormat = 'json' | 'markdown';
9
+ type SeedFormat = 'json' | 'sql';
9
10
  interface ResolvedRuntime {
10
11
  resolvedServices: string[];
11
12
  resolvedSeeds: Record<string, string>;
@@ -85,7 +86,7 @@ type SeedClassification = {
85
86
  /**
86
87
  * Determine whether a seed value is a prebuilt named seed or a developer-
87
88
  * provided file path. File paths start with `./', `../`, `/`, or end with
88
- * `.json` / `.md`.
89
+ * `.json` / `.sql`.
89
90
  */
90
91
  declare function classifySeed(value: string): SeedClassification;
91
92
 
@@ -177,82 +178,36 @@ declare function clearArchalWebhooks(serviceName: string): Promise<void>;
177
178
  declare function waitForArchalWebhook(serviceName: string, matcher: string | WaitForWebhookOptions, options?: WaitForWebhookOptions): Promise<ArchalWebhookDelivery>;
178
179
 
179
180
  /**
180
- * Archal Vitest Reporter — sends test results to the Archal dashboard.
181
+ * Archal Vitest Reporter — observes Vitest lifecycle health.
181
182
  *
182
183
  * `withArchal()` and `archalVitestProject()` already install this reporter
183
184
  * automatically; you only need to reference it manually if you're composing
184
185
  * a fully custom vitest config outside those helpers.
185
186
  *
186
- * After each test run, results are POSTed to /api/test-results so they
187
- * appear in the Archal dashboard alongside scenario traces.
187
+ * Legacy /api/test-results upload is retired. Benchmark Results ingestion writes
188
+ * scenario attempts through the Benchmark Run submission API instead.
188
189
  */
189
190
 
190
191
  declare class ArchalReporter implements Reporter {
191
- private startTime;
192
192
  private ctx;
193
193
  private lifecycleMarkerPath;
194
- private workspaceReporterMarkerPath;
195
- private projects;
196
194
  /**
197
- * In-flight upload promise for the current run. Vitest v3+ fires both
198
- * `onFinished` and `onTestRunEnd` in parallel via `Promise.all` (see
199
- * vitest@3.x packages/vitest/src/node/test-run.ts), so without this guard
200
- * the reporter uploads results twice and the dashboard shows duplicate
201
- * rows. Reset at the start of each run (onTestRunStart / onWatcherRerun)
202
- * so watch-mode reruns still upload.
195
+ * In-flight lifecycle promise for the current run. Vitest v3+ fires both
196
+ * `onFinished` and `onTestRunEnd` in parallel via `Promise.all`, so without
197
+ * this guard the reporter emits duplicate diagnostics. Reset at the start
198
+ * of each run (onTestRunStart / onWatcherRerun) so watch-mode reruns still
199
+ * report.
203
200
  */
204
- private activeUpload;
201
+ private activeLifecycle;
205
202
  onInit(ctx: Vitest): void;
206
- /**
207
- * v3+ canonical start-of-run hook. Resetting the upload guard here lets
208
- * watch-mode reruns upload their own results.
209
- */
210
- onTestRunStart(_specifications?: unknown[]): void;
211
- /**
212
- * v2 watch-mode start-of-rerun hook. Same purpose as onTestRunStart for
213
- * v3+. Vitest v2 has no onTestRunStart, so we reset here instead.
214
- */
203
+ onTestRunStart(_specifications?: readonly unknown[]): void;
215
204
  onWatcherRerun(_files?: string[], _trigger?: string): void;
205
+ onFinished(files?: readonly unknown[], _errors?: readonly unknown[]): Promise<void>;
206
+ onTestRunEnd(testModules?: readonly unknown[], _unhandledErrors?: readonly unknown[], _reason?: unknown): Promise<void>;
216
207
  private decodeConfig;
217
- private buildProjectContext;
218
- private resolveProjects;
219
- /**
220
- * vitest v2 calls onFinished with an array of File objects (from @vitest/runner).
221
- * Each File extends Suite which has `tasks: Task[]`, and each Task has
222
- * `.type` ('test' | 'suite'), `.name`, `.result?.state`, `.result?.duration`.
223
- */
224
- onFinished(files?: unknown[], _errors?: unknown[]): Promise<void>;
225
- /**
226
- * vitest v3+ calls onTestRunEnd alongside onFinished (in parallel via
227
- * Promise.all). v4 drops onFinished entirely. The argument is an array of
228
- * test modules, each with nested children.
229
- */
230
- onTestRunEnd(testModules?: unknown[]): Promise<void>;
231
- /**
232
- * Dedupe upload work when Vitest fires multiple end-of-run hooks. In
233
- * Vitest v3+ both `onFinished` and `onTestRunEnd` fire from the same
234
- * `Promise.all` in TestRun.end(); the first hook to enter wins and the
235
- * second awaits the same in-flight upload instead of POSTing a duplicate
236
- * row to /api/test-results. The resolved promise is kept on the instance
237
- * so any late hook still no-ops — the guard is only cleared at the start
238
- * of a new run (onTestRunStart / onWatcherRerun).
239
- */
240
- private runUploadOnce;
241
- private collectAndReport;
242
- /**
243
- * vitest v2: File extends Suite { tasks: Task[] }.
244
- * Task.type is 'test' | 'suite' | 'custom'. Suite tasks recurse.
245
- */
246
- private collectV2Files;
247
- /**
248
- * vitest v4: TestModule.children() → TestSuite[].children() → TestCase[]
249
- * All accessors are methods (not properties) in v4.
250
- */
251
- private collectV4Modules;
252
- private resolveProjectForFile;
253
- private partitionResults;
254
- private sendResults;
255
- private readSessionId;
208
+ private resolveProjectName;
209
+ private runLifecycleOnce;
210
+ private reportLifecycleComplete;
256
211
  }
257
212
 
258
213
  interface ArchalVitestProjectOptions {
@@ -307,7 +262,7 @@ interface ArchalVitestWorkspaceProjectConfig {
307
262
  };
308
263
  [key: string]: unknown;
309
264
  }
310
- type ArchalVitestWorkspaceProject = string | ArchalVitestWorkspaceProjectConfig | (() => ArchalVitestWorkspaceProjectConfig | Promise<ArchalVitestWorkspaceProjectConfig>);
265
+ type ArchalVitestWorkspaceProject = string | UserWorkspaceConfig | ArchalVitestWorkspaceProjectConfig | (() => UserWorkspaceConfig | ArchalVitestWorkspaceProjectConfig | Promise<UserWorkspaceConfig | ArchalVitestWorkspaceProjectConfig>);
311
266
  type ArchalVitestWorkspaceInput = readonly ArchalVitestWorkspaceProject[];
312
267
  /**
313
268
  * Create a vitest workspace project that routes requests to Archal hosted clones.
@@ -325,31 +280,12 @@ type ArchalVitestWorkspaceInput = readonly ArchalVitestWorkspaceProject[];
325
280
  * single `vitest.config.ts`, use `withArchal()` instead.
326
281
  */
327
282
  declare function archalVitestProject(options: ArchalVitestProjectOptions, testOptions?: ArchalVitestProjectTestOptions): ArchalVitestWorkspaceProjectConfig;
328
- /**
329
- * @deprecated Use {@link withArchal} instead. `archalVitestConfig({ services })`
330
- * is equivalent to `withArchal({}, { services })`, and `withArchal` additionally
331
- * preserves any existing `test` block fields (coverage, alias, globalSetup,
332
- * poolOptions, custom reporters, etc.) — which `archalVitestConfig` cannot
333
- * accept. This export will remain for a deprecation window; new code should
334
- * use `withArchal`.
335
- *
336
- * Migration:
337
- * ```ts
338
- * // before
339
- * test: archalVitestConfig({ services: { stripe: { mode: 'route' } } })
340
- * // after
341
- * test: withArchal({}, { services: { stripe: { mode: 'route' } } })
342
- * ```
343
- *
344
- * For `vitest.workspace.ts` usage, continue to use `archalVitestProject()`.
345
- */
346
- declare function archalVitestConfig(options: ArchalVitestProjectOptions, testOptions?: ArchalVitestProjectTestOptions): ArchalVitestBuiltTestConfig;
347
283
  /**
348
284
  * Root-level Vitest config for workspace users.
349
285
  *
350
286
  * Vitest only honors reporters from the root config, not from individual
351
287
  * workspace projects. Pair this with `vitest.workspace.ts` when using
352
- * `archalVitestProject()` / `archalVitestWorkspace()` so dashboard upload
288
+ * `archalVitestProject()` / `archalVitestWorkspace()` so reporter diagnostics
353
289
  * remains enabled.
354
290
  */
355
291
  declare function archalVitestRootConfig(): {
@@ -387,7 +323,7 @@ declare function archalVitestRootConfig(): {
387
323
  * entries are appended. ArchalReporter is appended only when the user's
388
324
  * reporter list doesn't already contain an ArchalReporter instance — so a
389
325
  * config carried over from an older helper or hand-rolled setup doesn't
390
- * end up with two reporters double-uploading to `/dashboard/tests`.
326
+ * end up with duplicate reporter lifecycle diagnostics.
391
327
  * Vitest's `'default'` reporter is only inserted when the user didn't
392
328
  * specify any reporters of their own.
393
329
  * - `env`: user keys preserved; Archal's required session-config keys added.
@@ -429,4 +365,4 @@ declare function withArchal<T extends Record<string, unknown>>(existingTest: T,
429
365
  */
430
366
  declare function archalVitestWorkspace<T extends ArchalVitestWorkspaceInput>(projects: T): T;
431
367
 
432
- export { ArchalReporter, type ArchalVitestBuiltTestConfig, type ArchalVitestProjectOptions, type ArchalVitestProjectTestOptions, type PublicSessionSnapshot as ArchalVitestPublicSessionSnapshot, type ArchalVitestWorkspaceInput, type ArchalVitestWorkspaceProject, type ArchalVitestWorkspaceProjectConfig, type ArchalWebhookDelivery, type WaitForWebhookOptions, archalVitestConfig, archalVitestProject, archalVitestRootConfig, archalVitestWorkspace, bootstrapArchalVitestRouting, classifySeed, clearArchalWebhooks, getInstalledArchalVitestRuntime, getInstalledArchalVitestSession, listArchalWebhooks, resetArchalClones, waitForArchalWebhook, withArchal };
368
+ export { ArchalReporter, type ArchalVitestBuiltTestConfig, type ArchalVitestProjectOptions, type ArchalVitestProjectTestOptions, type PublicSessionSnapshot as ArchalVitestPublicSessionSnapshot, type ArchalVitestWorkspaceInput, type ArchalVitestWorkspaceProject, type ArchalVitestWorkspaceProjectConfig, type ArchalWebhookDelivery, type WaitForWebhookOptions, archalVitestProject, archalVitestRootConfig, archalVitestWorkspace, bootstrapArchalVitestRouting, classifySeed, clearArchalWebhooks, getInstalledArchalVitestRuntime, getInstalledArchalVitestSession, listArchalWebhooks, resetArchalClones, waitForArchalWebhook, withArchal };