archal 0.9.7 → 0.9.9
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.
- package/README.md +163 -93
- package/bin/archal.cjs +3 -3
- package/dist/index.cjs +82301 -0
- package/dist/index.d.cts +1 -0
- package/dist/seed/dynamic-generator.cjs +45640 -0
- package/dist/seed/dynamic-generator.d.cts +67 -0
- package/dist/vitest/chunk-RKYS44AS.js +2216 -0
- package/dist/vitest/chunk-YJICENME.js +1230 -0
- package/dist/vitest/chunk-YV6BH6DO.js +45974 -0
- package/dist/vitest/index.cjs +51963 -0
- package/dist/vitest/index.d.ts +398 -0
- package/dist/vitest/index.js +2669 -0
- package/dist/vitest/runtime/hosted-session-reaper.cjs +29349 -0
- package/dist/vitest/runtime/hosted-session-reaper.d.ts +2 -0
- package/dist/vitest/runtime/hosted-session-reaper.js +58 -0
- package/dist/vitest/runtime/setup-files.d.ts +2 -0
- package/dist/vitest/runtime/setup-files.js +27 -0
- package/dist/vitest/src-JGHX6UKK.js +94 -0
- package/package.json +19 -22
- package/twin-assets/discord/fidelity.json +113 -0
- package/twin-assets/discord/tools.json +1953 -0
- package/twin-assets/github/fidelity.json +13 -0
- package/twin-assets/github/tools.json +21818 -0
- package/twin-assets/google-workspace/fidelity.json +19 -0
- package/twin-assets/google-workspace/tools.json +10191 -0
- package/twin-assets/jira/fidelity.json +40 -0
- package/twin-assets/jira/tools.json +17387 -0
- package/twin-assets/linear/fidelity.json +18 -0
- package/twin-assets/linear/tools.json +6496 -0
- package/twin-assets/ramp/fidelity.json +22 -0
- package/twin-assets/ramp/tools.json +2610 -0
- package/twin-assets/slack/fidelity.json +20 -0
- package/twin-assets/slack/tools.json +7301 -0
- package/twin-assets/stripe/fidelity.json +22 -0
- package/twin-assets/stripe/tools.json +15284 -0
- package/twin-assets/supabase/fidelity.json +13 -0
- package/twin-assets/supabase/tools.json +2973 -0
- package/dist/vitest.d.ts +0 -1
- package/dist/vitest.js +0 -23
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
interface SeedPatch {
|
|
2
|
+
add?: Record<string, Record<string, unknown>[]>;
|
|
3
|
+
modify?: Record<string, Record<string, unknown>[]>;
|
|
4
|
+
remove?: Record<string, number[]>;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface SeedIntentEntityRef {
|
|
8
|
+
kind: string;
|
|
9
|
+
key: string;
|
|
10
|
+
value: string | number | boolean;
|
|
11
|
+
}
|
|
12
|
+
interface SeedIntent {
|
|
13
|
+
twinName: string;
|
|
14
|
+
setupSummary: string;
|
|
15
|
+
requiredSlots: string[];
|
|
16
|
+
extractedSlots: Record<string, string | number | boolean>;
|
|
17
|
+
entities: SeedIntentEntityRef[];
|
|
18
|
+
quotedStrings: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* LLM routing and cooldown logic for seed codegen.
|
|
23
|
+
*
|
|
24
|
+
* Extracted from dynamic-generator.ts so this module can be imported by the
|
|
25
|
+
* infra server without pulling in the full generator machinery.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
declare function resetManagedSeedBackendStateForTests(): void;
|
|
29
|
+
|
|
30
|
+
declare class DynamicSeedError extends Error {
|
|
31
|
+
readonly twinName: string;
|
|
32
|
+
readonly validationErrors: string[];
|
|
33
|
+
constructor(twinName: string, validationErrors: string[], hint?: string);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface DynamicSeedConfig {
|
|
37
|
+
noCache?: boolean;
|
|
38
|
+
/** When true, FK validation failures and coverage gaps become hard errors instead of warnings. */
|
|
39
|
+
strictSeed?: boolean;
|
|
40
|
+
/** When true, use the caller-prepared seed input verbatim instead of re-scoping it to one twin. */
|
|
41
|
+
skipTwinScoping?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* User identifier used to scope the managed-backend cooldown.
|
|
44
|
+
* When omitted (CLI usage), a global key is used — safe because each CLI
|
|
45
|
+
* invocation is a separate process. In the infra server, pass the userId so
|
|
46
|
+
* a 503 from one user's request does not block other users.
|
|
47
|
+
*/
|
|
48
|
+
userId?: string;
|
|
49
|
+
}
|
|
50
|
+
interface SeedPromptContext {
|
|
51
|
+
scenarioTitle?: string;
|
|
52
|
+
expectedBehavior?: string;
|
|
53
|
+
successCriteria?: string[];
|
|
54
|
+
}
|
|
55
|
+
interface DynamicSeedResult {
|
|
56
|
+
seed: Record<string, unknown[]>;
|
|
57
|
+
patch: SeedPatch;
|
|
58
|
+
fromCache: boolean;
|
|
59
|
+
source: 'llm' | 'cache';
|
|
60
|
+
/** The JavaScript code that produced this seed (only set when source==='llm'). */
|
|
61
|
+
generatedCode?: string;
|
|
62
|
+
/** SQL seed for Supabase twins — used instead of seed JSON when present. */
|
|
63
|
+
seedSql?: string;
|
|
64
|
+
}
|
|
65
|
+
declare function generateDynamicSeed(twinName: string, baseSeedName: string, baseSeedData: Record<string, unknown[]>, setupDescription: string, config: DynamicSeedConfig, intent?: SeedIntent, context?: SeedPromptContext): Promise<DynamicSeedResult>;
|
|
66
|
+
|
|
67
|
+
export { type DynamicSeedConfig, DynamicSeedError, type SeedPromptContext, generateDynamicSeed, resetManagedSeedBackendStateForTests };
|