@mmnto/totem 1.81.1 → 1.83.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.
- package/dist/compiler-schema.d.ts +511 -734
- package/dist/compiler-schema.d.ts.map +1 -1
- package/dist/compiler-schema.js +72 -2
- package/dist/compiler-schema.js.map +1 -1
- package/dist/compiler-schema.test.js +42 -3
- package/dist/compiler-schema.test.js.map +1 -1
- package/dist/compiler.d.ts +1 -1
- package/dist/compiler.d.ts.map +1 -1
- package/dist/compiler.js +1 -1
- package/dist/compiler.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/spine/authored-controls.d.ts +245 -0
- package/dist/spine/authored-controls.d.ts.map +1 -0
- package/dist/spine/authored-controls.js +291 -0
- package/dist/spine/authored-controls.js.map +1 -0
- package/dist/spine/authored-controls.test.d.ts +2 -0
- package/dist/spine/authored-controls.test.d.ts.map +1 -0
- package/dist/spine/authored-controls.test.js +441 -0
- package/dist/spine/authored-controls.test.js.map +1 -0
- package/dist/spine/authored-rule.d.ts +136 -306
- package/dist/spine/authored-rule.d.ts.map +1 -1
- package/dist/spine/authored-rule.js +7 -3
- package/dist/spine/authored-rule.js.map +1 -1
- package/dist/spine/authoring-ledger.d.ts +24 -9
- package/dist/spine/authoring-ledger.d.ts.map +1 -1
- package/dist/spine/authoring-ledger.js +22 -7
- package/dist/spine/authoring-ledger.js.map +1 -1
- package/dist/spine/authoring-ledger.test.js +13 -1
- package/dist/spine/authoring-ledger.test.js.map +1 -1
- package/dist/spine/rule-policy.d.ts +8 -0
- package/dist/spine/rule-policy.d.ts.map +1 -1
- package/dist/spine/rule-policy.js +2 -0
- package/dist/spine/rule-policy.js.map +1 -1
- package/dist/spine/rule-policy.test.js +8 -2
- package/dist/spine/rule-policy.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
// ─── ADR-112 §6/§9 — the authored-controls EMISSION builder (slice C2b) ──────
|
|
2
|
+
//
|
|
3
|
+
// An authored rule earns its §6 controls structurally, not by hand: a TRAIN-side
|
|
4
|
+
// positive fixture becomes a positive control ONLY when its preimage-differential
|
|
5
|
+
// HOLDS (fires on the defect preimage, silent on the fixed postimage — §4); a
|
|
6
|
+
// declared near-miss becomes a negative control DECLARATIVELY (a one-leg silence
|
|
7
|
+
// assertion the §6 scorer resolves at slice D). This module turns a set of
|
|
8
|
+
// compiled AUTHORED rules + the frozen split into those three emission lists.
|
|
9
|
+
//
|
|
10
|
+
// It is deliberately INERT (like the C1 preimage-differential primitive): it
|
|
11
|
+
// wires nothing into a cert run, mints no §5 verdict, and reads no git. The §4
|
|
12
|
+
// differential is injected (default = the real evaluator) so the producer stays
|
|
13
|
+
// pure + fully testable; slice D consumes the emission lists + joins the loci
|
|
14
|
+
// back (Tenet-20) to the run vocabulary.
|
|
15
|
+
//
|
|
16
|
+
// Two strategy-ratified asymmetries (strategy#777) are load-bearing here:
|
|
17
|
+
// - POSITIVE controls are GATED on the §4 differential and carry the per-fixture
|
|
18
|
+
// `contentHash` — the two-loci-one-PR disambiguator that prevents a wrong-
|
|
19
|
+
// exemplar miscert when one PR contributes two fixtures (Q1 ruling (a)).
|
|
20
|
+
// - NEGATIVE controls are DECLARATIVE — no differential, no silence gate, no
|
|
21
|
+
// train-side check: a synthetic near-miss carries no `pr` and no corpus
|
|
22
|
+
// position, so its (filePath, matchedSpan) locus is the disambiguator (Q2).
|
|
23
|
+
//
|
|
24
|
+
// The producer-kind contract (train-side positives, differential gate) is READ
|
|
25
|
+
// from `getRulePolicy('authored')` — the §9 single-home — and fail-loud-asserted,
|
|
26
|
+
// never hard-coded, so a policy/producer divergence surfaces here, not at slice D.
|
|
27
|
+
import { z } from 'zod';
|
|
28
|
+
import { isAuthoredProvenance, provenanceKind, } from '../compiler-schema.js';
|
|
29
|
+
import { evaluatePreimageDifferential, } from './preimage-differential.js';
|
|
30
|
+
import { getRulePolicy } from './rule-policy.js';
|
|
31
|
+
/** Non-blank string field (trim-then-min — the house convention, cf. cert-corpus-seed.ts). */
|
|
32
|
+
const nonBlank = (msg) => z.string().trim().min(1, msg);
|
|
33
|
+
/**
|
|
34
|
+
* Encode a §6 emission join-key from its parts. `JSON.stringify` (NOT a `\0`-joined
|
|
35
|
+
* template) so the key is delimiter-injection-proof: distinct part-tuples ALWAYS map
|
|
36
|
+
* to distinct keys regardless of part content (greptile P2 — an embedded delimiter
|
|
37
|
+
* could otherwise collide two distinct loci on a load-bearing D-join key). Single-home
|
|
38
|
+
* so positive + negative key encoding can never drift apart (Tenet-21).
|
|
39
|
+
*/
|
|
40
|
+
const controlKey = (...parts) => JSON.stringify(parts);
|
|
41
|
+
// ─── Named constants (the §9 producer contract this builder asserts) ─────────
|
|
42
|
+
/** §6: an authored positive control is TRAIN-side (the rule is authored against the train slice). */
|
|
43
|
+
const EXPECTED_POSITIVE_CONTROL_SIDE = 'train';
|
|
44
|
+
/** §4: an authored positive control is admitted only through the preimage-differential gate. */
|
|
45
|
+
const EXPECTED_POSITIVE_CONTROL_GATE = 'preimage-differential';
|
|
46
|
+
/** The one differential outcome that EMITS a positive control (exact equality, never a negation). */
|
|
47
|
+
const EMITTING_OUTCOME = 'differential-holds';
|
|
48
|
+
// ─── Emission schemas (the .strict() boundary; types inferred) ───────────────
|
|
49
|
+
/**
|
|
50
|
+
* The 3-way disposition of a positive fixture that did NOT emit a control
|
|
51
|
+
* (strategy#777): `illegitimate` (the matcher is fix-shaped / over-matching /
|
|
52
|
+
* vacuous — never a legitimate control), `undecidable` (the differential could
|
|
53
|
+
* not be established — routes to operator adjudication), `deferred` (a typed
|
|
54
|
+
* non-pass whose source is not yet supported, e.g. the commit-pair fallback).
|
|
55
|
+
*/
|
|
56
|
+
const AuthoredNonEmissionClassSchema = z.enum(['illegitimate', 'undecidable', 'deferred']);
|
|
57
|
+
/**
|
|
58
|
+
* The §4 differential vocabulary, mirrored as a Zod enum so `nonEmissions[].outcome`
|
|
59
|
+
* validates at the `.strict()` boundary. The inverse class map below is a `Record`
|
|
60
|
+
* over the NON-emitting outcomes, so a 7th primitive outcome (or a rename) fails
|
|
61
|
+
* THIS build rather than silently emitting an unclassed control.
|
|
62
|
+
*/
|
|
63
|
+
const PreimageDifferentialOutcomeSchema = z.enum([
|
|
64
|
+
'differential-holds',
|
|
65
|
+
'fix-shaped',
|
|
66
|
+
'over-match',
|
|
67
|
+
'vacuous-silent',
|
|
68
|
+
'needs-adjudication',
|
|
69
|
+
'unsupported-source',
|
|
70
|
+
]);
|
|
71
|
+
/**
|
|
72
|
+
* A legitimate, differential-gated positive control, keyed on the fixture LOCUS
|
|
73
|
+
* (strategy#777 §6, `aa2a501`/`614dfdf`) — symmetric with the negative control and
|
|
74
|
+
* aligned to §8 `firingLabelId(ruleId, pr, filePath, matchedLine)`. `contentHash` is
|
|
75
|
+
* span-content-only, so it is NOT locus-unique (two distinct loci in one PR with
|
|
76
|
+
* byte-identical span content collide) and is deliberately NOT carried here — the
|
|
77
|
+
* locus is the disambiguator. `contentHash` stays a fixture FIELD (ADR §3), unchanged.
|
|
78
|
+
*/
|
|
79
|
+
export const AuthoredPositiveControlSchema = z
|
|
80
|
+
.object({
|
|
81
|
+
/** The in-corpus PR the fixture anchors to (train-side; §5). */
|
|
82
|
+
pr: z.number().int().positive(),
|
|
83
|
+
/** The authored rule's stable id — its `lessonHash` (the C2a `firingLabelId ← ruleId` unification). */
|
|
84
|
+
targetRuleId: nonBlank(),
|
|
85
|
+
/** Defect locus file — half of the (filePath, matchedSpan) per-fixture disambiguator. */
|
|
86
|
+
filePath: nonBlank(),
|
|
87
|
+
/** Line-range or AST-node path — the defect locus, not just the file (admits two-loci-one-PR). */
|
|
88
|
+
matchedSpan: nonBlank(),
|
|
89
|
+
})
|
|
90
|
+
.strict();
|
|
91
|
+
/** A declared, silence-only negative control (no differential, no `pr` — strategy#777 Q2). */
|
|
92
|
+
export const AuthoredNegativeControlSchema = z
|
|
93
|
+
.object({
|
|
94
|
+
/** The authored rule's stable id (its `lessonHash`). */
|
|
95
|
+
targetRuleId: nonBlank(),
|
|
96
|
+
/** Near-miss locus file — half of the (filePath, matchedSpan) disambiguator. */
|
|
97
|
+
filePath: nonBlank(),
|
|
98
|
+
/** Line-range or AST-node path — the near-miss locus, not just the file. */
|
|
99
|
+
matchedSpan: nonBlank(),
|
|
100
|
+
})
|
|
101
|
+
.strict();
|
|
102
|
+
// ─── Classification (strategy#777 classOf; doubles as the build-time exhaustiveness guard) ─
|
|
103
|
+
/**
|
|
104
|
+
* Maps every NON-emitting differential outcome to its emission class. A `Record`
|
|
105
|
+
* over `Exclude<…, 'differential-holds'>`, so it is exhaustive by construction: a
|
|
106
|
+
* new primitive outcome breaks this build (missing key) instead of slipping through
|
|
107
|
+
* unclassed. `fix-shaped | over-match | vacuous-silent` are all illegitimate (the
|
|
108
|
+
* matcher is not a legitimate control); `needs-adjudication` is undecidable;
|
|
109
|
+
* `unsupported-source` is deferred.
|
|
110
|
+
*/
|
|
111
|
+
const NON_EMISSION_CLASS_BY_OUTCOME = {
|
|
112
|
+
'fix-shaped': 'illegitimate',
|
|
113
|
+
'over-match': 'illegitimate',
|
|
114
|
+
'vacuous-silent': 'illegitimate',
|
|
115
|
+
'needs-adjudication': 'undecidable',
|
|
116
|
+
'unsupported-source': 'deferred',
|
|
117
|
+
};
|
|
118
|
+
/** A positive fixture that did NOT clear the §4 gate — kept (never silently dropped) with its differential outcome + class. */
|
|
119
|
+
export const AuthoredNonEmissionSchema = z
|
|
120
|
+
.object({
|
|
121
|
+
/** The authored rule's stable id (its `lessonHash`). */
|
|
122
|
+
targetRuleId: nonBlank(),
|
|
123
|
+
/** The train-side PR the non-emitting fixture anchored to. */
|
|
124
|
+
pr: z.number().int().positive(),
|
|
125
|
+
/** The source differential outcome (exact, never derived from a negation). */
|
|
126
|
+
outcome: PreimageDifferentialOutcomeSchema,
|
|
127
|
+
/** The 3-way class derived from `outcome` (strategy#777 classOf). */
|
|
128
|
+
class: AuthoredNonEmissionClassSchema,
|
|
129
|
+
/** First-line differential reason — present for `needs-adjudication` / `unsupported-source`. */
|
|
130
|
+
reason: z.string().optional(),
|
|
131
|
+
})
|
|
132
|
+
.strict()
|
|
133
|
+
// Exported-boundary guard: a non-emission is structurally impossible for the EMITTING
|
|
134
|
+
// outcome, and `class` is DERIVED from `outcome` (classOf, strategy#777) — so the schema
|
|
135
|
+
// must reject `differential-holds` and any mismatched (outcome, class) pair, not just any
|
|
136
|
+
// enum members. superRefine (parse-time, non-mutating) per #2263 — an OUTER refine on the
|
|
137
|
+
// object, never a branch `.refine` on a union (which throws at construction in Zod 3.25).
|
|
138
|
+
.superRefine((v, ctx) => {
|
|
139
|
+
if (v.outcome === EMITTING_OUTCOME) {
|
|
140
|
+
ctx.addIssue({
|
|
141
|
+
code: z.ZodIssueCode.custom,
|
|
142
|
+
path: ['outcome'],
|
|
143
|
+
message: `a non-emission cannot carry the emitting outcome '${EMITTING_OUTCOME}'`,
|
|
144
|
+
});
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const expectedClass = NON_EMISSION_CLASS_BY_OUTCOME[v.outcome];
|
|
148
|
+
if (v.class !== expectedClass) {
|
|
149
|
+
ctx.addIssue({
|
|
150
|
+
code: z.ZodIssueCode.custom,
|
|
151
|
+
path: ['class'],
|
|
152
|
+
message: `class '${v.class}' contradicts outcome '${v.outcome}' (classOf expects '${expectedClass}')`,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
/** The three emission lists this builder produces (the §6 controls surface, inert-until-D). */
|
|
157
|
+
export const AuthoredControlsSchema = z
|
|
158
|
+
.object({
|
|
159
|
+
positive: z.array(AuthoredPositiveControlSchema),
|
|
160
|
+
negative: z.array(AuthoredNegativeControlSchema),
|
|
161
|
+
nonEmissions: z.array(AuthoredNonEmissionSchema),
|
|
162
|
+
})
|
|
163
|
+
.strict();
|
|
164
|
+
/**
|
|
165
|
+
* Read a rule's AUTHORED provenance, fail-loud if it is missing or mined. The id
|
|
166
|
+
* the controls join on is the rule's `lessonHash` — for an authored rule that IS
|
|
167
|
+
* its persisted, minted `ruleId` (the C2a `firingLabelId ← ruleId` unification),
|
|
168
|
+
* NOT a content hash. We gate on `isAuthoredProvenance` so a mined rule (whose
|
|
169
|
+
* `lessonHash` is a content hash) can never be read as a control target.
|
|
170
|
+
*/
|
|
171
|
+
function readAuthoredProvenance(rule) {
|
|
172
|
+
const provenance = rule.legitimacy?.provenance;
|
|
173
|
+
if (provenance === undefined) {
|
|
174
|
+
throw new Error(`[Totem Error] deriveAuthoredControls: rule '${rule.lessonHash}' has no legitimacy.provenance — ` +
|
|
175
|
+
`deriveAuthoredControls requires compiled AUTHORED rules (ADR-112 §3)`);
|
|
176
|
+
}
|
|
177
|
+
if (!isAuthoredProvenance(provenance)) {
|
|
178
|
+
throw new Error(`[Totem Error] deriveAuthoredControls: rule '${rule.lessonHash}' is not authored ` +
|
|
179
|
+
`(provenance.kind='${provenanceKind(provenance)}') — only authored rules carry §6 controls`);
|
|
180
|
+
}
|
|
181
|
+
return provenance;
|
|
182
|
+
}
|
|
183
|
+
// ─── Public API ─────────────────────────────────────
|
|
184
|
+
/**
|
|
185
|
+
* Build the §6 authored controls (positive + negative + the kept non-emissions)
|
|
186
|
+
* for a set of compiled AUTHORED rules, gating positives on the §4 preimage-
|
|
187
|
+
* differential. Inert: emits nothing into a cert run.
|
|
188
|
+
*
|
|
189
|
+
* Determinism (Tenet-15): the output arrays are byte-identical across re-runs for
|
|
190
|
+
* identical inputs. Positives/non-emissions follow input order (rule order ×
|
|
191
|
+
* declared `positiveFixtures` order); negatives follow rule order × declared
|
|
192
|
+
* `negativeFixtures` order. The differential runs under `Promise.all`, which
|
|
193
|
+
* preserves the positional task order regardless of settle timing — never a
|
|
194
|
+
* push-on-settle / Set/Map iteration.
|
|
195
|
+
*/
|
|
196
|
+
export async function deriveAuthoredControls(params) {
|
|
197
|
+
const { rules, split } = params;
|
|
198
|
+
const evaluate = params.deps?.evaluate ?? evaluatePreimageDifferential;
|
|
199
|
+
// §9 single-home: READ the authored policy (do NOT hard-code "train"), then
|
|
200
|
+
// fail-loud-assert the producer contract this builder is wired for. A policy
|
|
201
|
+
// that diverges from train-side / differential-gated is a producer mismatch that
|
|
202
|
+
// must surface HERE, never silently mis-emit at slice D.
|
|
203
|
+
const policy = getRulePolicy('authored');
|
|
204
|
+
if (policy.positiveControlSide !== EXPECTED_POSITIVE_CONTROL_SIDE) {
|
|
205
|
+
throw new Error(`[Totem Error] deriveAuthoredControls: authored policy.positiveControlSide is ` +
|
|
206
|
+
`'${policy.positiveControlSide}', expected '${EXPECTED_POSITIVE_CONTROL_SIDE}' (ADR-112 §6 producer mismatch)`);
|
|
207
|
+
}
|
|
208
|
+
if (policy.positiveControlGate !== EXPECTED_POSITIVE_CONTROL_GATE) {
|
|
209
|
+
throw new Error(`[Totem Error] deriveAuthoredControls: authored policy.positiveControlGate is ` +
|
|
210
|
+
`'${policy.positiveControlGate}', expected '${EXPECTED_POSITIVE_CONTROL_GATE}' (ADR-112 §4 producer mismatch)`);
|
|
211
|
+
}
|
|
212
|
+
const trainSet = new Set(split.trainPrs);
|
|
213
|
+
// ── First pass: collect positional positive tasks + the declarative negatives.
|
|
214
|
+
const positiveTasks = [];
|
|
215
|
+
const negative = [];
|
|
216
|
+
// The §6 controls are an ANSWER KEY — each emitted control must be a unique join
|
|
217
|
+
// target for slice D. Two fixtures emitting the same key would resolve ambiguously
|
|
218
|
+
// (the minimal #777 shape drops the locus/source that would tell them apart), so a
|
|
219
|
+
// duplicate is a fail-loud contract fault, never a silent double-entry.
|
|
220
|
+
const negativeKeys = new Set();
|
|
221
|
+
for (const rule of rules) {
|
|
222
|
+
const provenance = readAuthoredProvenance(rule);
|
|
223
|
+
const targetRuleId = rule.lessonHash;
|
|
224
|
+
// POSITIVE: build a positional task per declared fixture (input order). A
|
|
225
|
+
// held-out fixture.pr is a §5 leakage violation — fail loud, NEVER a silent
|
|
226
|
+
// skip (a silent skip would let a leaked exemplar weaken the train/test bar).
|
|
227
|
+
for (const fixture of provenance.positiveFixtures) {
|
|
228
|
+
if (!trainSet.has(fixture.pr)) {
|
|
229
|
+
throw new Error(`[Totem Error] deriveAuthoredControls: positive fixture pr #${fixture.pr} (rule '${targetRuleId}') ` +
|
|
230
|
+
`is not in the train slice — a held-out positive fixture is an ADR-112 §5 leakage violation`);
|
|
231
|
+
}
|
|
232
|
+
positiveTasks.push({ rule, targetRuleId, fixture });
|
|
233
|
+
}
|
|
234
|
+
// NEGATIVE: DECLARATIVE (strategy#777 Q2) — no differential, no silence gate,
|
|
235
|
+
// no trainSet check. A synthetic near-miss carries no `pr` and no corpus
|
|
236
|
+
// position; the (filePath, matchedSpan) locus is the disambiguator. We do NOT
|
|
237
|
+
// inline `nearMissSource` — it is resolved at D (Tenet-20 join-back).
|
|
238
|
+
for (const nf of provenance.negativeFixtures ?? []) {
|
|
239
|
+
const negativeKey = controlKey(targetRuleId, nf.filePath, nf.matchedSpan);
|
|
240
|
+
if (negativeKeys.has(negativeKey)) {
|
|
241
|
+
throw new Error(`[Totem Error] deriveAuthoredControls: duplicate negative control (rule '${targetRuleId}', ` +
|
|
242
|
+
`filePath '${nf.filePath}', matchedSpan '${nf.matchedSpan}') — two near-misses emit an ` +
|
|
243
|
+
`indistinguishable §6 silence-control key; differentiate the loci or drop one`);
|
|
244
|
+
}
|
|
245
|
+
negativeKeys.add(negativeKey);
|
|
246
|
+
negative.push({ targetRuleId, filePath: nf.filePath, matchedSpan: nf.matchedSpan });
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
// ── Evaluate the §4 differential for every positive task. `Promise.all` resolves
|
|
250
|
+
// in the original task order regardless of which evaluation settles first, so the
|
|
251
|
+
// emitted order is the stable declared order (a push-on-settle impl would not be).
|
|
252
|
+
const evaluated = await Promise.all(positiveTasks.map(async (task) => ({ task, result: await evaluate(task.rule, task.fixture) })));
|
|
253
|
+
// ── Second pass: split into emitted positives vs kept non-emissions.
|
|
254
|
+
const positive = [];
|
|
255
|
+
const positiveKeys = new Set();
|
|
256
|
+
const nonEmissions = [];
|
|
257
|
+
for (const { task, result } of evaluated) {
|
|
258
|
+
if (result.outcome === EMITTING_OUTCOME) {
|
|
259
|
+
// The fixture LOCUS (filePath, matchedSpan) is the per-entry disambiguator
|
|
260
|
+
// (strategy#777 §6) — unique by construction, so two DISTINCT loci sharing one PR
|
|
261
|
+
// (even byte-identical span content) emit two distinct controls. Only a TRUE
|
|
262
|
+
// duplicate (same pr + filePath + matchedSpan) is an answer-key clash: fail loud.
|
|
263
|
+
const positiveKey = controlKey(task.targetRuleId, task.fixture.pr, task.fixture.filePath, task.fixture.matchedSpan);
|
|
264
|
+
if (positiveKeys.has(positiveKey)) {
|
|
265
|
+
throw new Error(`[Totem Error] deriveAuthoredControls: duplicate positive control (rule '${task.targetRuleId}', ` +
|
|
266
|
+
`pr #${task.fixture.pr}, filePath '${task.fixture.filePath}', matchedSpan '${task.fixture.matchedSpan}') — ` +
|
|
267
|
+
`two fixtures emit an indistinguishable §6 answer-key entry; differentiate the loci or drop one`);
|
|
268
|
+
}
|
|
269
|
+
positiveKeys.add(positiveKey);
|
|
270
|
+
positive.push({
|
|
271
|
+
pr: task.fixture.pr,
|
|
272
|
+
targetRuleId: task.targetRuleId,
|
|
273
|
+
filePath: task.fixture.filePath,
|
|
274
|
+
matchedSpan: task.fixture.matchedSpan,
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
nonEmissions.push({
|
|
279
|
+
targetRuleId: task.targetRuleId,
|
|
280
|
+
pr: task.fixture.pr,
|
|
281
|
+
outcome: result.outcome,
|
|
282
|
+
class: NON_EMISSION_CLASS_BY_OUTCOME[result.outcome],
|
|
283
|
+
// Omit `reason` when absent (house convention, cf. buildWindtunnelLock) —
|
|
284
|
+
// keeps the emitted JSON clean + byte-identical across re-runs.
|
|
285
|
+
...(result.reason !== undefined ? { reason: result.reason } : {}),
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return { positive, negative, nonEmissions };
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=authored-controls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authored-controls.js","sourceRoot":"","sources":["../../src/spine/authored-controls.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,EAAE;AACF,iFAAiF;AACjF,kFAAkF;AAClF,8EAA8E;AAC9E,iFAAiF;AACjF,2EAA2E;AAC3E,8EAA8E;AAC9E,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,gFAAgF;AAChF,8EAA8E;AAC9E,yCAAyC;AACzC,EAAE;AACF,0EAA0E;AAC1E,mFAAmF;AACnF,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,4EAA4E;AAC5E,gFAAgF;AAChF,EAAE;AACF,+EAA+E;AAC/E,kFAAkF;AAClF,mFAAmF;AAEnF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAIL,oBAAoB,EACpB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,4BAA4B,GAG7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,8FAA8F;AAC9F,MAAM,QAAQ,GAAG,CAAC,GAAY,EAAe,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,GAAG,KAA0B,EAAU,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAEpF,gFAAgF;AAEhF,qGAAqG;AACrG,MAAM,8BAA8B,GAAG,OAAO,CAAC;AAC/C,gGAAgG;AAChG,MAAM,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