@jawache/flow 0.1.0 → 0.1.2
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/dist/flow.mjs +58 -57
- package/dist/index.mjs +15 -15
- package/dist/packs.mjs +46 -46
- package/dist/types/adapter/claude.d.ts +14 -2
- package/dist/types/adapter/domain.d.ts +17 -0
- package/dist/types/checks/domain.d.ts +69 -11
- package/dist/types/engine/domain.d.ts +3 -0
- package/dist/types/glob.d.ts +17 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/language/domain.d.ts +65 -5
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Case, CaseWorld, Check, Ctx, ExecResult, LoadedEntry, Moment, Unanswered } from "../language/domain.ts";
|
|
1
|
+
import type { Case, CaseWorld, Check, Ctx, ExecResult, Grammar, LoadedEntry, Moment, Unanswered } from "../language/domain.ts";
|
|
2
2
|
/** One pattern that matched, and the 1-based line it matched on. */
|
|
3
3
|
export interface PatternHit {
|
|
4
4
|
readonly pattern: string;
|
|
@@ -584,10 +584,24 @@ export interface RequireEdge {
|
|
|
584
584
|
* language, and a fence written in regexes is a fence nobody re-reads — the compiled literals of
|
|
585
585
|
* one such config were dead for four days while the guard's own status reported it healthy.
|
|
586
586
|
*/
|
|
587
|
+
/**
|
|
588
|
+
* One layer: the globs that are in it, and — optionally — the globs that are NOT.
|
|
589
|
+
*
|
|
590
|
+
* `not` exists because the shape a real architecture wants is "this folder, except these few": the
|
|
591
|
+
* marketing surface of a site is `src/pages/**` minus the handful of subtrees that are endpoints.
|
|
592
|
+
* Written as an enumeration of what IS marketing, the fence silently stops covering the next folder
|
|
593
|
+
* somebody adds — which is the failure this dialect is supposed to prevent, not cause. It compiles
|
|
594
|
+
* to dependency-cruiser's own `pathNot`, which is the same pair the `only` rule already uses.
|
|
595
|
+
*/
|
|
596
|
+
export interface Layer {
|
|
597
|
+
readonly path: readonly string[];
|
|
598
|
+
readonly not?: readonly string[];
|
|
599
|
+
}
|
|
587
600
|
export interface Dialect {
|
|
588
601
|
/** What to cruise. A GLOB, because a bare directory makes depcruise cruise zero modules. */
|
|
589
602
|
readonly scan: string;
|
|
590
|
-
|
|
603
|
+
/** Each layer, as globs — a bare list, or `{ path, not }` when it has holes in it. */
|
|
604
|
+
readonly layers: Readonly<Record<string, readonly string[] | Layer>>;
|
|
591
605
|
/** Fail-closed allowlist: a layer may reach ONLY these layers. */
|
|
592
606
|
readonly only?: Readonly<Record<string, readonly string[]>>;
|
|
593
607
|
/** Forbidden edges, each carrying the `why` its violation prints. */
|
|
@@ -635,7 +649,12 @@ export declare function entryToMatcher(entry: string): {
|
|
|
635
649
|
path?: string;
|
|
636
650
|
};
|
|
637
651
|
/** Layer names → a depcruise matcher fragment. `path` is an OR-list; builtins become a type. */
|
|
638
|
-
|
|
652
|
+
/** The globs a layer holds, whichever of the two ways it was written. */
|
|
653
|
+
export declare function layerGlobs(layer: readonly string[] | Layer | undefined): {
|
|
654
|
+
path: readonly string[];
|
|
655
|
+
not: readonly string[];
|
|
656
|
+
};
|
|
657
|
+
export declare function layersMatcher(names: readonly string[], layers: Readonly<Record<string, readonly string[] | Layer>>): Matcher;
|
|
639
658
|
/** The whole dialect → a native `{ forbidden, required, options }` config. */
|
|
640
659
|
export declare function compileDialect(rule: Dialect): NativeConfig;
|
|
641
660
|
/**
|
|
@@ -660,6 +679,25 @@ export declare function compileDialect(rule: Dialect): NativeConfig;
|
|
|
660
679
|
export declare function depcruiseCommand(dialect: Dialect): string;
|
|
661
680
|
/** The tool's JSON report → one hit per violation, each naming the fence and its `why`. */
|
|
662
681
|
export declare function depcruiseHits(result: ExecResult): string[];
|
|
682
|
+
/**
|
|
683
|
+
* Every layer entry that is a regex where a glob belongs — the fault `depcruise` refuses to load with.
|
|
684
|
+
*
|
|
685
|
+
* MEASURED, NOT IMAGINED: the first repo to convert its guard to flow brought its fence across
|
|
686
|
+
* verbatim, layers and all, from an engine whose layers WERE regexes. They compiled to
|
|
687
|
+
* `^\^src/pages/\([^/]!app/…` — a pattern no module path can match — and the fence loaded, reported
|
|
688
|
+
* armed, walked the graph and found nothing, for as long as it took somebody to plant a probe and
|
|
689
|
+
* watch the commit sail through. A rule that cannot do its job must refuse to load.
|
|
690
|
+
*/
|
|
691
|
+
export declare function nonGlobLayers(layers: Readonly<Record<string, readonly string[] | Layer>>): string[];
|
|
692
|
+
/**
|
|
693
|
+
* A layer with holes, named in an `only` allowlist — refused, because the holes would be silent.
|
|
694
|
+
*
|
|
695
|
+
* `only` is compiled by INVERTING the allowed layers: everything not in them blocks. The inversion
|
|
696
|
+
* reads the `path` globs and nothing else, so a layer's `not` would simply not be there — the
|
|
697
|
+
* allowlist would quietly be wider than the layer it names. Rather than half-apply it, this says so
|
|
698
|
+
* at load: use plain globs for a layer that an `only` names, or express the exclusion as a `forbid`.
|
|
699
|
+
*/
|
|
700
|
+
export declare function holesInAnOnlyList(opts: Dialect): string[];
|
|
663
701
|
/**
|
|
664
702
|
* The generic import-fence runner.
|
|
665
703
|
*
|
|
@@ -670,6 +708,23 @@ export declare function depcruiseHits(result: ExecResult): string[];
|
|
|
670
708
|
export declare const depcruise: (options: Dialect) => Check;
|
|
671
709
|
/** The grammars that need no install. */
|
|
672
710
|
export declare const NATIVE_LANGUAGES: readonly string[];
|
|
711
|
+
/**
|
|
712
|
+
* WHAT A MISSING GRAMMAR LIBRARY SAYS — one sentence, in one place.
|
|
713
|
+
*
|
|
714
|
+
* It is read at two moments that must not disagree: `flow status` says it before anything runs, and
|
|
715
|
+
* `resolveLang` says it when a rule on that language is reached. Two spellings would be two accounts
|
|
716
|
+
* of the same fact, and the day one of them was improved the other would quietly become the older,
|
|
717
|
+
* worse answer — which is the drift this package refuses everywhere else.
|
|
718
|
+
*/
|
|
719
|
+
export declare function missingGrammarText(name: string, libraryPath: string): string;
|
|
720
|
+
/**
|
|
721
|
+
* Declare the config's grammars, and how to tell whether one is built.
|
|
722
|
+
*
|
|
723
|
+
* Called once per config read; the last config read wins, and one declaring none clears the list —
|
|
724
|
+
* which is what makes `flow test <other-config>` an honest answer rather than one coloured by the
|
|
725
|
+
* file read before it.
|
|
726
|
+
*/
|
|
727
|
+
export declare function useGrammars(grammars: readonly Grammar[], exists?: (path: string) => boolean): void;
|
|
673
728
|
/** A resolved grammar, or the sentence saying why there is none. */
|
|
674
729
|
type LangResult = {
|
|
675
730
|
readonly ok: true;
|
|
@@ -681,14 +736,17 @@ type LangResult = {
|
|
|
681
736
|
/**
|
|
682
737
|
* Resolve a grammar name to something `parse()` accepts.
|
|
683
738
|
*
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
*
|
|
739
|
+
* THREE ROUTES, in this order. A tier-0 native is free. A grammar the CONFIG DECLARED is registered
|
|
740
|
+
* from the library the repo built — this is how a language nobody publishes (astro, vue, svelte)
|
|
741
|
+
* gets in, and it is tried SECOND, before the package route, because a repo that went to the trouble
|
|
742
|
+
* of building and declaring one has said which library it means. A published
|
|
743
|
+
* `@ast-grep/lang-<name>` package (sql, python, go, rust…) is registered on first use; its compiled
|
|
744
|
+
* binary lives in node_modules, and `registerDynamicLanguage` is safe to call per grammar.
|
|
745
|
+
*
|
|
746
|
+
* A DECLARED GRAMMAR THAT WILL NOT LOAD IS ITS OWN REFUSAL, naming the library file. The path is a
|
|
747
|
+
* build artefact, machine-specific and never committed, so "missing" is the ordinary state of a
|
|
748
|
+
* fresh clone and the message has to say which file and who builds it — not "unknown grammar",
|
|
749
|
+
* which sends the reader looking for a package that does not exist.
|
|
692
750
|
*
|
|
693
751
|
* An unknown name is a REFUSAL VALUE, and it never falls through to Tsx. The check turns it into a
|
|
694
752
|
* block, which is the fail-loud doctrine at its narrowest and most useful: a silent fall-through is
|
|
@@ -89,6 +89,8 @@ export interface BriefEvent {
|
|
|
89
89
|
readonly moment: BreadcrumbMoment;
|
|
90
90
|
/** touch: the path the tool call is about. A call carrying no path narrows nothing. */
|
|
91
91
|
readonly path?: string | undefined;
|
|
92
|
+
/** command: the line about to run — what a command note's `on` is matched against. */
|
|
93
|
+
readonly command?: string | undefined;
|
|
92
94
|
readonly wearing: readonly string[];
|
|
93
95
|
/** How far this session has drifted, in context tokens. The adapter measures it. */
|
|
94
96
|
readonly tokens: number;
|
|
@@ -650,6 +652,7 @@ export type RecordedStep = {
|
|
|
650
652
|
readonly rail: "brief";
|
|
651
653
|
readonly moment: BreadcrumbMoment;
|
|
652
654
|
readonly path?: string | undefined;
|
|
655
|
+
readonly command?: string | undefined;
|
|
653
656
|
readonly wearing: readonly string[];
|
|
654
657
|
readonly tokens: number;
|
|
655
658
|
}
|
package/dist/types/glob.d.ts
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
export declare function escapeRe(s: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Is that a REGULAR EXPRESSION where this dialect wants a glob?
|
|
4
|
+
*
|
|
5
|
+
* It lives beside `escapeRe` because it is that function read backwards: these are the shapes
|
|
6
|
+
* `escapeRe` turns into literals, which is how a pattern written as a regex comes to match nothing
|
|
7
|
+
* at all while reading as a fence. Four of them — a leading `^`, a `(?` group, a `|`, a trailing `$`
|
|
8
|
+
* — and nothing broader is claimed: this is not a regex detector, it is the list of characters whose
|
|
9
|
+
* meaning is silently lost here.
|
|
10
|
+
*
|
|
11
|
+
* ANY `|` COUNTS, with no carve-out for a backslash before it. The dialect has no escape character:
|
|
12
|
+
* `\|` is a literal backslash followed by a pipe, and a path with either in it is not a path anyone
|
|
13
|
+
* has. A carve-out would only ever wave through the thing it was meant to catch.
|
|
14
|
+
*
|
|
15
|
+
* It was found the hard way — a repo's fence, brought across from an engine whose layers WERE
|
|
16
|
+
* regexes, loaded green and refused nothing for a week.
|
|
17
|
+
*/
|
|
18
|
+
export declare function notAGlob(entry: string): boolean;
|
|
2
19
|
/** One piece of a glob. The whole dialect: `**` · `*` · `?` · `{a,b}` · literal text. */
|
|
3
20
|
export type GlobToken = {
|
|
4
21
|
readonly kind: "literal";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { guardrail, breadcrumb, type Sentence, type EntrySpec, type GuardrailSpec, type BreadcrumbSpec, type GuardrailSentence, type BreadcrumbSentence, type EntryGroup, type DisabledMark, } from "./language/domain.ts";
|
|
2
2
|
export { definePack, pack, override, defineConfig, type Pack, type PackDefinition, type EntryRef, type RefTarget, type FlowConfig, type Binding, type PackBinding, type OverrideBinding, type ConfigSentence, } from "./language/domain.ts";
|
|
3
|
-
export { defineCheck, type Check, type Ctx, type World, type Verdict, type ExecResult, type TurnAction, type Case, type CaseWorld, type Cases, } from "./language/domain.ts";
|
|
3
|
+
export { defineCheck, withFaults, faultsOf, type Check, type Ctx, type World, type Verdict, type ExecResult, type TurnAction, type Case, type CaseWorld, type Cases, } from "./language/domain.ts";
|
|
4
4
|
export { defineCategory, type Category, type Classifier, type SessionFacts } from "./language/domain.ts";
|
|
5
|
-
export { astGrep, banCommands, canonicalFiles, changeTogether, commitReason, depcruise, execPasses, jsonInvariant, protectedPath, ranSinceEdit, siblingExists, symbolsInSibling, textBan, type CanonOptions, type ChangeGroup, type Dialect, type DiffAdds, type ForbidEdge, type JsonAssert, type RequireEdge, } from "./checks/domain.ts";
|
|
5
|
+
export { astGrep, banCommands, canonicalFiles, changeTogether, commitReason, depcruise, execPasses, jsonInvariant, protectedPath, ranSinceEdit, siblingExists, symbolsInSibling, textBan, type CanonOptions, type ChangeGroup, type Dialect, type Layer, type DiffAdds, type ForbidEdge, type JsonAssert, type RequireEdge, } from "./checks/domain.ts";
|
|
6
6
|
export { substitutionInProse, SUBSTITUTION_MESSAGE } from "./checks/domain.ts";
|
|
7
7
|
export { commitMessage, gitDirPrefix, gitInvocations, givesReason, quoteArg, tokenizeCommand, type GitInvocation, } from "./checks/domain.ts";
|
|
8
8
|
export { spawnedAs, type SpawnRecipe } from "./engine/domain.ts";
|
|
@@ -12,7 +12,7 @@ export type BreadcrumbMoment = (typeof BREADCRUMB_MOMENTS)[number];
|
|
|
12
12
|
/** Either vocabulary. `turn-end` is the one word in both. */
|
|
13
13
|
export type Moment = GuardrailMoment | BreadcrumbMoment;
|
|
14
14
|
export declare const GUARDRAIL_MOMENTS: readonly GuardrailMoment[];
|
|
15
|
-
export declare const BREADCRUMB_MOMENTS: readonly ["session", "touch", "turn-end"];
|
|
15
|
+
export declare const BREADCRUMB_MOMENTS: readonly ["session", "touch", "command", "turn-end"];
|
|
16
16
|
export declare const write: "write";
|
|
17
17
|
export declare const command: "command";
|
|
18
18
|
export declare const commit: "commit";
|
|
@@ -40,6 +40,20 @@ export declare const PATH_MOMENTS: readonly ["write", "delete", "commit", "touch
|
|
|
40
40
|
export type PathMoment = (typeof PATH_MOMENTS)[number];
|
|
41
41
|
/** Does this moment carry a path for `on` / `ignore` to narrow? */
|
|
42
42
|
export declare function isPathMoment(m: string): m is PathMoment;
|
|
43
|
+
/**
|
|
44
|
+
* THE SUBJECT A NOTE'S SCOPE IS MATCHED AGAINST — a path at the path moments, and the COMMAND LINE
|
|
45
|
+
* at `command`, which is the one moment where the two kinds of entry are scoped differently.
|
|
46
|
+
*
|
|
47
|
+
* A command GUARDRAIL needs no scope and must not have one: its patterns are its scope, and a rule
|
|
48
|
+
* that could be narrowed one way and match another is a rule whose halves can disagree in silence.
|
|
49
|
+
* A command NOTE is the opposite case — it has no patterns at all, so without `.on(…)` it would show
|
|
50
|
+
* on every shell call in the session, which is the same as showing on none. `.on("npm install*")` is
|
|
51
|
+
* how it says which commands it is about, matched as a glob over the line about to run.
|
|
52
|
+
*/
|
|
53
|
+
export declare const BRIEF_SCOPE_MOMENTS: readonly ["write", "delete", "commit", "touch", "command"];
|
|
54
|
+
export type BriefScopeMoment = (typeof BRIEF_SCOPE_MOMENTS)[number];
|
|
55
|
+
/** Does a scope narrow anything for this KIND of entry at this moment? */
|
|
56
|
+
export declare function isScopable(kind: EntrySpec["kind"], m: string): boolean;
|
|
43
57
|
/**
|
|
44
58
|
* The host-written record of one session × agent, as a classifier sees it.
|
|
45
59
|
*
|
|
@@ -177,6 +191,24 @@ export type World = Pick<Ctx, "exec" | "fs" | "git">;
|
|
|
177
191
|
* would be called with `ctx` as its receiver and break any world that closes over itself.
|
|
178
192
|
*/
|
|
179
193
|
export declare function makeCtx(moment: Moment, facts: Partial<Ctx>, world: World): Ctx;
|
|
194
|
+
/**
|
|
195
|
+
* Mark a configured check as built with options it cannot work with, and say why.
|
|
196
|
+
*
|
|
197
|
+
* WHY IT IS A VALUE AND NOT A THROW: a check factory runs while the config module is evaluating, so
|
|
198
|
+
* a throw there is a module that will not import, and the reader gets one fault with a stack trace
|
|
199
|
+
* instead of every fault with its entry named. Marked instead, the load collects it beside the
|
|
200
|
+
* grammar's own refusals and the engine blocks every gated moment with the same text — which is the
|
|
201
|
+
* shape every other load failure already has.
|
|
202
|
+
*
|
|
203
|
+
* WHY IT EXISTS AT ALL: an option can be well-TYPED and still be nonsense — the class that bit here
|
|
204
|
+
* was a depcruise layer written as a regex where the dialect takes globs, which compiled to a
|
|
205
|
+
* pattern matching nothing. The fence loaded, `flow status` called it armed, and it walked no graph
|
|
206
|
+
* for as long as nobody planted a probe. A rule that cannot do its job must refuse to load, never
|
|
207
|
+
* report green.
|
|
208
|
+
*/
|
|
209
|
+
export declare function withFaults<C extends Check>(check: C, faults: readonly string[]): C;
|
|
210
|
+
/** What a configured check said is wrong with its own options. Empty for every healthy check. */
|
|
211
|
+
export declare function faultsOf(check: Check | undefined): readonly string[];
|
|
180
212
|
/**
|
|
181
213
|
* Declare a CONFIGURED check: a function that takes options and returns a check.
|
|
182
214
|
*
|
|
@@ -358,7 +390,7 @@ type DeadScope = "flow: every moment this entry fires at carries no path, so .on
|
|
|
358
390
|
* every scope is live. Saying `.on(…)` above `.at(command)` is the same mistake with the words in
|
|
359
391
|
* the other order, and the load's `dead-scope` refusal is what catches it. Both halves, always.
|
|
360
392
|
*/
|
|
361
|
-
type Scoping<At extends Moment, Verb> = [Extract<At,
|
|
393
|
+
type Scoping<At extends Moment, Verb, Scopable extends Moment = PathMoment> = [Extract<At, Scopable>] extends [never] ? (dead: DeadScope) => never : Verb;
|
|
362
394
|
/** Anything a pack may file under an entry name. The one shape `definePack` walks. */
|
|
363
395
|
export interface Sentence<S extends EntrySpec = EntrySpec> {
|
|
364
396
|
readonly spec: S;
|
|
@@ -381,8 +413,8 @@ export interface GuardrailSentence<Spoken extends GuardrailKey = never, At exten
|
|
|
381
413
|
export interface BreadcrumbSentence<Spoken extends BreadcrumbKey = never, At extends BreadcrumbMoment = BreadcrumbMoment> extends Sentence<BreadcrumbSpec> {
|
|
382
414
|
readonly at: Once<Spoken, "at", <M extends BreadcrumbMoment[]>(...moments: M) => BreadcrumbSentence<Spoken | "at", M[number]>>;
|
|
383
415
|
readonly for: Once<Spoken, "for", (...categories: Category[]) => BreadcrumbSentence<Spoken | "for", At>>;
|
|
384
|
-
readonly on: Once<Spoken, "on", Scoping<At, (...globs: string[]) => BreadcrumbSentence<Spoken | "on", At
|
|
385
|
-
readonly ignore: Once<Spoken, "ignore", Scoping<At, (...globs: string[]) => BreadcrumbSentence<Spoken | "ignore", At
|
|
416
|
+
readonly on: Once<Spoken, "on", Scoping<At, (...globs: string[]) => BreadcrumbSentence<Spoken | "on", At>, BriefScopeMoment>>;
|
|
417
|
+
readonly ignore: Once<Spoken, "ignore", Scoping<At, (...globs: string[]) => BreadcrumbSentence<Spoken | "ignore", At>, BriefScopeMoment>>;
|
|
386
418
|
readonly text: Once<Spoken, "text", (text: string) => BreadcrumbSentence<Spoken | "text", At>>;
|
|
387
419
|
readonly file: Once<Spoken, "file", (path: string) => BreadcrumbSentence<Spoken | "file", At>>;
|
|
388
420
|
readonly disabled: Once<Spoken, "disabled", (reason?: string) => BreadcrumbSentence<Spoken | "disabled", At>>;
|
|
@@ -495,6 +527,34 @@ export type Binding = PackBinding | OverrideBinding;
|
|
|
495
527
|
export interface Settings {
|
|
496
528
|
/** Context tokens between re-showings of a breadcrumb. Absent = the engine's own default. */
|
|
497
529
|
readonly driftTokens?: number;
|
|
530
|
+
/**
|
|
531
|
+
* Grammars this repo built itself, for `astGrep` rules whose language has no published package.
|
|
532
|
+
*
|
|
533
|
+
* ast-grep parses five languages out of the box and resolves anything else as an
|
|
534
|
+
* `@ast-grep/lang-<name>` package. A grammar that nobody publishes — astro, vue, svelte — has no
|
|
535
|
+
* third route unless a repo can hand over the tree-sitter library it built, which is what this is.
|
|
536
|
+
* Declared here rather than on the entry because a grammar is a fact about the MACHINE the guard
|
|
537
|
+
* runs on, not about any one rule: two rules on the same language must never be able to resolve
|
|
538
|
+
* it two ways.
|
|
539
|
+
*/
|
|
540
|
+
readonly grammars?: readonly Grammar[];
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* One hand-built tree-sitter grammar, as `registerDynamicLanguage` wants it.
|
|
544
|
+
*
|
|
545
|
+
* `libraryPath` is a path to a compiled library (`.so` / `.dylib`), relative to the repo root or
|
|
546
|
+
* absolute. It is a BUILD ARTEFACT — machine-specific, never committed — so a repo declaring one
|
|
547
|
+
* carries the recipe that builds it, and the refusal when it is missing names that file.
|
|
548
|
+
*/
|
|
549
|
+
export interface Grammar {
|
|
550
|
+
/** The name an `astGrep` rule spells as its `language`. */
|
|
551
|
+
readonly name: string;
|
|
552
|
+
/** The compiled tree-sitter library, relative to the repo root or absolute. */
|
|
553
|
+
readonly libraryPath: string;
|
|
554
|
+
/** The file extensions the grammar is for — ast-grep wants them, and they document the rule's reach. */
|
|
555
|
+
readonly extensions: readonly string[];
|
|
556
|
+
/** The symbol inside the library. Defaults to ast-grep's own `tree_sitter_<name>`. */
|
|
557
|
+
readonly languageSymbol?: string;
|
|
498
558
|
}
|
|
499
559
|
/** A whole guard, as its config file states it: bindings, in the order they were spoken. */
|
|
500
560
|
export interface FlowConfig {
|
|
@@ -589,7 +649,7 @@ export interface Overlaid {
|
|
|
589
649
|
*/
|
|
590
650
|
export declare function overlay(base: EntrySpec, spoken: Readonly<Record<string, unknown>>, prior?: Readonly<Record<string, "pack" | "override">>): Overlaid;
|
|
591
651
|
/** The closed vocabulary of refusals. Every load failure is exactly one of these. */
|
|
592
|
-
export declare const REFUSAL_CODES: readonly ["not-a-pack", "missing-parameter", "unknown-entry", "unknown-key", "unknown-moment", "missing-mandatory", "undeclared-category", "no-cases", "duplicate-id", "dead-scope"];
|
|
652
|
+
export declare const REFUSAL_CODES: readonly ["not-a-pack", "missing-parameter", "unknown-entry", "unknown-key", "unknown-moment", "missing-mandatory", "undeclared-category", "no-cases", "duplicate-id", "dead-scope", "bad-check-options"];
|
|
593
653
|
export type RefusalCode = (typeof REFUSAL_CODES)[number];
|
|
594
654
|
/** One reason the config will not load. */
|
|
595
655
|
export interface Refusal {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jawache/flow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Guardrails and breadcrumbs as code — packs you import, a config that typechecks, one adapter per harness.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"dependency-cruiser": "^18.1.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
+
"@ast-grep/lang-python": "^0.0.6",
|
|
51
52
|
"@types/node": "^24.13.4",
|
|
52
53
|
"@vitest/coverage-v8": "4.1.10",
|
|
53
54
|
"commit-and-tag-version": "^13.1.2",
|