archal 0.9.13 → 0.9.15

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 (53) hide show
  1. package/README.md +81 -73
  2. package/bin/archal.cjs +1 -1
  3. package/clone-assets/apify/tools.json +668 -0
  4. package/{twin-assets → clone-assets}/discord/fidelity.json +1 -1
  5. package/{twin-assets → clone-assets}/discord/tools.json +510 -510
  6. package/clone-assets/github/fidelity.json +31 -0
  7. package/{twin-assets → clone-assets}/github/tools.json +113 -3
  8. package/{twin-assets → clone-assets}/google-workspace/fidelity.json +2 -2
  9. package/{twin-assets → clone-assets}/google-workspace/tools.json +10 -10
  10. package/{twin-assets → clone-assets}/jira/fidelity.json +44 -4
  11. package/{twin-assets → clone-assets}/jira/tools.json +1 -1
  12. package/clone-assets/linear/fidelity.json +36 -0
  13. package/{twin-assets → clone-assets}/linear/tools.json +1 -1
  14. package/{twin-assets → clone-assets}/ramp/fidelity.json +1 -1
  15. package/{twin-assets → clone-assets}/ramp/tools.json +1 -1
  16. package/clone-assets/slack/fidelity.json +38 -0
  17. package/{twin-assets → clone-assets}/slack/tools.json +1 -1
  18. package/clone-assets/stripe/fidelity.json +67 -0
  19. package/{twin-assets → clone-assets}/stripe/tools.json +42 -11
  20. package/clone-assets/supabase/fidelity.json +31 -0
  21. package/{twin-assets → clone-assets}/supabase/tools.json +1 -1
  22. package/clone-assets/tavily/tools.json +115 -0
  23. package/dist/cli.cjs +97917 -0
  24. package/dist/cli.d.cts +1 -0
  25. package/dist/harness.cjs +62 -0
  26. package/dist/harness.d.cts +20 -0
  27. package/dist/index.cjs +5 -87878
  28. package/dist/index.d.cts +3 -1
  29. package/dist/seed/dynamic-generator.cjs +8796 -9201
  30. package/dist/seed/dynamic-generator.d.cts +39 -0
  31. package/dist/vitest/chunk-2GY4SFKE.js +29279 -0
  32. package/dist/vitest/{chunk-KTMNDJFB.js → chunk-WVRVNHAX.js} +45255 -44440
  33. package/dist/vitest/index.cjs +56408 -31519
  34. package/dist/vitest/index.d.ts +61 -27
  35. package/dist/vitest/index.js +145 -1807
  36. package/dist/vitest/runtime/hosted-session-reaper.cjs +34766 -28922
  37. package/dist/vitest/runtime/hosted-session-reaper.js +1 -2
  38. package/dist/vitest/runtime/setup-files.js +2 -3
  39. package/package.json +19 -10
  40. package/skills/eval/SKILL.md +113 -0
  41. package/skills/onboard/SKILL.md +67 -36
  42. package/skills/scenario/SKILL.md +22 -20
  43. package/skills/vitest/SKILL.md +25 -24
  44. package/dist/vitest/chunk-L6HSMJ3F.js +0 -2216
  45. package/dist/vitest/chunk-YJICENME.js +0 -1230
  46. package/dist/vitest/src-JGHX6UKK.js +0 -94
  47. package/skills/audit/SKILL.md +0 -55
  48. package/skills/test/SKILL.md +0 -109
  49. package/twin-assets/github/fidelity.json +0 -13
  50. package/twin-assets/linear/fidelity.json +0 -18
  51. package/twin-assets/slack/fidelity.json +0 -20
  52. package/twin-assets/stripe/fidelity.json +0 -22
  53. package/twin-assets/supabase/fidelity.json +0 -13
@@ -1,3 +1,33 @@
1
+ /**
2
+ * Shared type-only declarations for the seed-codegen modules.
3
+ *
4
+ * Lives as a leaf module so `test-overrides.ts` can describe its
5
+ * registry shape without importing back into `executor.ts`,
6
+ * `legacy-codegen.ts`, or `seed-llm.ts`. Previously the override file
7
+ * imported types from each producer, and each producer imported the
8
+ * registry value back, forming four interlocking cycles.
9
+ */
10
+
11
+ /**
12
+ * Audit row reported after a direct (non-proxy) seedgen LLM call.
13
+ *
14
+ * Structurally compatible with `infra/api/llm/usage-log.ts#ManagedLlmUsageInput`
15
+ * so the API route can pass `recordManagedLlmUsageLog` straight through. The
16
+ * proxy path already logs via the proxy hook; this callback closes the
17
+ * cooldown-fallback bypass where direct calls would otherwise miss accounting.
18
+ */
19
+ interface SeedgenDirectUsage {
20
+ userId: string;
21
+ sessionId: string | null;
22
+ intent: 'seedgen';
23
+ model: string;
24
+ inputTokens: number;
25
+ outputTokens: number;
26
+ clientBringsOwnKey: boolean;
27
+ authKind: string | null;
28
+ }
29
+ type SeedgenDirectUsageReporter = (usage: SeedgenDirectUsage) => Promise<void>;
30
+
1
31
  interface SeedPatch {
2
32
  add?: Record<string, Record<string, unknown>[]>;
3
33
  modify?: Record<string, Record<string, unknown>[]>;
@@ -46,6 +76,15 @@ interface DynamicSeedConfig {
46
76
  * a 503 from one user's request does not block other users.
47
77
  */
48
78
  userId?: string;
79
+ /**
80
+ * Server-side direct-fallback accounting hook. The API route wires this to
81
+ * `recordManagedLlmUsageLog` so cooldown-fallback calls (which use infra
82
+ * env keys, not the proxy) are still attributed to the requesting user.
83
+ * Undefined in CLI / vitest contexts — those use BYOK and don't need it.
84
+ */
85
+ recordDirectUsage?: SeedgenDirectUsageReporter;
86
+ /** Auth kind for direct-usage attribution (`user` | `internal_service`). */
87
+ authKind?: string;
49
88
  }
50
89
  interface SeedPromptContext {
51
90
  scenarioTitle?: string;