archal 0.9.18 → 0.9.20

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 (92) hide show
  1. package/README.md +9 -1
  2. package/agents/github-octokit/.archal.json +8 -0
  3. package/agents/github-octokit/Dockerfile +8 -0
  4. package/agents/github-octokit/README.md +113 -0
  5. package/agents/github-octokit/agent.mjs +54 -0
  6. package/agents/github-octokit/package.json +9 -0
  7. package/agents/github-octokit/scenarios/test-repo-access.md +27 -0
  8. package/agents/google-workspace-local-tools/Dockerfile +6 -0
  9. package/agents/google-workspace-local-tools/README.md +58 -0
  10. package/agents/google-workspace-local-tools/agent.mjs +196 -0
  11. package/agents/google-workspace-local-tools/archal-harness.json +7 -0
  12. package/agents/google-workspace-local-tools/run-input.yaml +16 -0
  13. package/agents/google-workspace-local-tools/scenario.md +29 -0
  14. package/agents/hermes/.archal.json +8 -0
  15. package/agents/hermes/Dockerfile +46 -0
  16. package/agents/hermes/README.md +87 -0
  17. package/agents/hermes/SOUL.md +27 -0
  18. package/agents/hermes/config.yaml +34 -0
  19. package/agents/hermes/drive.mjs +113 -0
  20. package/agents/hermes/scenarios/stripe-customers-read-only.md +32 -0
  21. package/agents/openclaw/.archal.json +8 -0
  22. package/agents/openclaw/Dockerfile +96 -0
  23. package/agents/openclaw/README.md +120 -0
  24. package/agents/openclaw/drive.mjs +311 -0
  25. package/agents/openclaw/package.json +9 -0
  26. package/agents/openclaw/scenarios/github-issue-triage-read-only.md +44 -0
  27. package/agents/openclaw/workspace/AGENTS.md +23 -0
  28. package/agents/openclaw/workspace/IDENTITY.md +8 -0
  29. package/agents/openclaw/workspace/SOUL.md +14 -0
  30. package/agents/openclaw/workspace/TOOLS.md +35 -0
  31. package/agents/pagination-test/README.md +24 -0
  32. package/agents/pagination-test/scenario.md +24 -0
  33. package/agents/replay-capsule-harness/README.md +29 -0
  34. package/agents/replay-capsule-harness/observability-install-offline-e2e.mts +1517 -0
  35. package/agents/replay-capsule-harness/replay-capsule-e2e.mjs +104 -0
  36. package/clone-assets/apify/tools.json +213 -13
  37. package/clone-assets/calcom/tools.json +510 -0
  38. package/clone-assets/clickup/tools.json +1258 -0
  39. package/clone-assets/customerio/tools.json +386 -0
  40. package/clone-assets/datadog/tools.json +734 -0
  41. package/clone-assets/github/tools.json +312 -25
  42. package/clone-assets/gitlab/tools.json +999 -0
  43. package/clone-assets/google-workspace/tools.json +18 -6
  44. package/clone-assets/hubspot/tools.json +1406 -0
  45. package/clone-assets/jira/fidelity.json +1 -1
  46. package/clone-assets/jira/tools.json +266 -543
  47. package/clone-assets/linear/tools.json +238 -40
  48. package/clone-assets/ownerrez/tools.json +548 -0
  49. package/clone-assets/pricelabs/tools.json +343 -0
  50. package/clone-assets/sentry/tools.json +745 -0
  51. package/clone-assets/slack/tools.json +1 -2
  52. package/clone-assets/stripe/tools.json +185 -46
  53. package/clone-assets/supabase/tools.json +511 -14
  54. package/clone-assets/unipile/tools.json +408 -0
  55. package/clone-assets/webflow/tools.json +415 -0
  56. package/dist/autoloop-worker-types-BEb_E44z.d.cts +196 -0
  57. package/dist/cli.cjs +151033 -75282
  58. package/dist/commands/autoloop-hosted-worker.cjs +43942 -0
  59. package/dist/commands/autoloop-hosted-worker.d.cts +143 -0
  60. package/dist/commands/autoloop-pr-verification.cjs +4227 -0
  61. package/dist/commands/autoloop-pr-verification.d.cts +17 -0
  62. package/dist/{vitest/chunk-IVXSSEYS.js → commands/autoloop-result-parser.cjs} +16515 -18857
  63. package/dist/commands/autoloop-result-parser.d.cts +39 -0
  64. package/dist/commands/autoloop-worker.cjs +36163 -0
  65. package/dist/commands/autoloop-worker.d.cts +97 -0
  66. package/dist/harness.cjs +1 -0
  67. package/dist/index.cjs +1 -1
  68. package/dist/replay.cjs +49624 -0
  69. package/dist/replay.d.cts +4625 -0
  70. package/dist/scenarios.cjs +80343 -0
  71. package/dist/scenarios.d.cts +562 -0
  72. package/dist/vitest/chunk-6CBYFCFK.js +4667 -0
  73. package/dist/vitest/chunk-ARVS45PP.js +2764 -0
  74. package/dist/vitest/index.cjs +6079 -75089
  75. package/dist/vitest/index.d.ts +7 -6
  76. package/dist/vitest/index.js +8 -8
  77. package/dist/vitest/runtime/hosted-session-reaper.cjs +801 -34187
  78. package/dist/vitest/runtime/hosted-session-reaper.js +1 -1
  79. package/dist/vitest/runtime/setup-files.js +2 -2
  80. package/package.json +14 -9
  81. package/skills/archal-agent/SKILL.md +87 -0
  82. package/skills/autoloop/SKILL.md +376 -0
  83. package/skills/autoloop/references/hosted-sources.md +62 -0
  84. package/skills/autoloop/references/trace-schema-mapping.md +73 -0
  85. package/skills/eval/SKILL.md +35 -1
  86. package/skills/install-agent/SKILL.md +221 -0
  87. package/skills/onboard/SKILL.md +80 -0
  88. package/skills/scenario/SKILL.md +19 -4
  89. package/skills/seed/SKILL.md +237 -0
  90. package/dist/seed/dynamic-generator.cjs +0 -45564
  91. package/dist/seed/dynamic-generator.d.cts +0 -106
  92. package/dist/vitest/chunk-CTSN67QR.js +0 -47188
@@ -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
 
@@ -207,7 +208,7 @@ declare class ArchalReporter implements Reporter {
207
208
  * v3+ canonical start-of-run hook. Resetting the upload guard here lets
208
209
  * watch-mode reruns upload their own results.
209
210
  */
210
- onTestRunStart(_specifications?: unknown[]): void;
211
+ onTestRunStart(_specifications?: readonly unknown[]): void;
211
212
  /**
212
213
  * v2 watch-mode start-of-rerun hook. Same purpose as onTestRunStart for
213
214
  * v3+. Vitest v2 has no onTestRunStart, so we reset here instead.
@@ -221,13 +222,13 @@ declare class ArchalReporter implements Reporter {
221
222
  * Each File extends Suite which has `tasks: Task[]`, and each Task has
222
223
  * `.type` ('test' | 'suite'), `.name`, `.result?.state`, `.result?.duration`.
223
224
  */
224
- onFinished(files?: unknown[], _errors?: unknown[]): Promise<void>;
225
+ onFinished(files?: readonly unknown[], _errors?: readonly unknown[]): Promise<void>;
225
226
  /**
226
227
  * vitest v3+ calls onTestRunEnd alongside onFinished (in parallel via
227
228
  * Promise.all). v4 drops onFinished entirely. The argument is an array of
228
229
  * test modules, each with nested children.
229
230
  */
230
- onTestRunEnd(testModules?: unknown[]): Promise<void>;
231
+ onTestRunEnd(testModules?: readonly unknown[], _unhandledErrors?: readonly unknown[], _reason?: unknown): Promise<void>;
231
232
  /**
232
233
  * Dedupe upload work when Vitest fires multiple end-of-run hooks. In
233
234
  * Vitest v3+ both `onFinished` and `onTestRunEnd` fire from the same
@@ -307,7 +308,7 @@ interface ArchalVitestWorkspaceProjectConfig {
307
308
  };
308
309
  [key: string]: unknown;
309
310
  }
310
- type ArchalVitestWorkspaceProject = string | ArchalVitestWorkspaceProjectConfig | (() => ArchalVitestWorkspaceProjectConfig | Promise<ArchalVitestWorkspaceProjectConfig>);
311
+ type ArchalVitestWorkspaceProject = string | UserWorkspaceConfig | ArchalVitestWorkspaceProjectConfig | (() => UserWorkspaceConfig | ArchalVitestWorkspaceProjectConfig | Promise<UserWorkspaceConfig | ArchalVitestWorkspaceProjectConfig>);
311
312
  type ArchalVitestWorkspaceInput = readonly ArchalVitestWorkspaceProject[];
312
313
  /**
313
314
  * Create a vitest workspace project that routes requests to Archal hosted clones.
@@ -8,12 +8,12 @@ import {
8
8
  readArchalVitestConfig,
9
9
  resetArchalClones,
10
10
  resolveRuntimeModule
11
- } from "./chunk-IVXSSEYS.js";
11
+ } from "./chunk-6CBYFCFK.js";
12
12
  import {
13
13
  encodeConfig,
14
14
  getCredentials,
15
15
  getSessionIdFilePath
16
- } from "./chunk-CTSN67QR.js";
16
+ } from "./chunk-ARVS45PP.js";
17
17
 
18
18
  // src/index.ts
19
19
  import { dirname, isAbsolute, resolve as resolve2 } from "path";
@@ -441,7 +441,7 @@ var ArchalReporter = class {
441
441
  * Promise.all). v4 drops onFinished entirely. The argument is an array of
442
442
  * test modules, each with nested children.
443
443
  */
444
- async onTestRunEnd(testModules) {
444
+ async onTestRunEnd(testModules, _unhandledErrors, _reason) {
445
445
  await this.runUploadOnce(() => this.collectAndReport(testModules ?? [], "v4"));
446
446
  }
447
447
  /**
@@ -735,16 +735,16 @@ function classifySeed(value) {
735
735
  if (trimmed.startsWith("./") || trimmed.startsWith("../") || trimmed.startsWith("/")) {
736
736
  const ext = extname(trimmed).toLowerCase();
737
737
  if (ext === ".json") return { type: "file", path: trimmed, format: "json" };
738
- if (ext === ".md") return { type: "file", path: trimmed, format: "markdown" };
738
+ if (ext === ".sql") return { type: "file", path: trimmed, format: "sql" };
739
739
  throw new Error(
740
- `Seed file must be .json or .md, got "${ext || "(no extension)"}": ${trimmed}
740
+ `Seed file must be .json or .sql, got "${ext || "(no extension)"}": ${trimmed}
741
741
  .json \u2192 exact clone state loaded directly
742
- .md \u2192 plain-English description, Archal generates the state`
742
+ .sql \u2192 SQL state loaded through the clone state boundary`
743
743
  );
744
744
  }
745
- if (trimmed.endsWith(".json") || trimmed.endsWith(".md")) {
745
+ if (trimmed.endsWith(".json") || trimmed.endsWith(".sql")) {
746
746
  const ext = extname(trimmed).toLowerCase();
747
- const format = ext === ".json" ? "json" : "markdown";
747
+ const format = ext === ".json" ? "json" : "sql";
748
748
  return { type: "file", path: trimmed, format };
749
749
  }
750
750
  return { type: "named", name: trimmed };