canicode 0.11.0 → 0.11.1

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.
@@ -671,9 +671,27 @@ function defineRule(rule) {
671
671
  ruleRegistry.register(rule);
672
672
  return rule;
673
673
  }
674
+ var AcknowledgmentIntentSchema = z.object({
675
+ field: z.string(),
676
+ value: z.unknown(),
677
+ scope: z.enum(["instance", "definition"])
678
+ });
679
+ var AcknowledgmentSceneWriteOutcomeSchema = z.object({
680
+ result: z.enum([
681
+ "succeeded",
682
+ "silent-ignored",
683
+ "api-rejected",
684
+ "user-declined-propagation",
685
+ "unknown"
686
+ ]),
687
+ reason: z.string().optional()
688
+ });
674
689
  var AcknowledgmentSchema = z.object({
675
690
  nodeId: z.string(),
676
- ruleId: z.string()
691
+ ruleId: z.string(),
692
+ intent: AcknowledgmentIntentSchema.optional(),
693
+ sceneWriteOutcome: AcknowledgmentSceneWriteOutcomeSchema.optional(),
694
+ codegenDirective: z.string().optional()
677
695
  });
678
696
  z.array(AcknowledgmentSchema);
679
697
  function normalizeNodeId(id) {
@@ -1845,7 +1863,7 @@ function computeApplyContext(violation, instanceContext) {
1845
1863
  }
1846
1864
 
1847
1865
  // package.json
1848
- var version = "0.11.0";
1866
+ var version = "0.11.1";
1849
1867
 
1850
1868
  // src/core/engine/scoring.ts
1851
1869
  function computeTotalScorePerCategory(configs) {
@@ -3611,7 +3629,9 @@ var EVENTS = {
3611
3629
  // cannot import `core/monitoring` directly, so the event fires through a
3612
3630
  // caller-supplied callback. Define the typed name here so a future consumer
3613
3631
  // has a single place to wire it up.
3614
- ROUNDTRIP_DEFINITION_WRITE_SKIPPED: `${EVENT_PREFIX}roundtrip_definition_write_skipped`
3632
+ ROUNDTRIP_DEFINITION_WRITE_SKIPPED: `${EVENT_PREFIX}roundtrip_definition_write_skipped`,
3633
+ /** CLI `canicode roundtrip-tally` completed successfully. */
3634
+ ROUNDTRIP_TALLY: `${EVENT_PREFIX}roundtrip_tally`
3615
3635
  };
3616
3636
 
3617
3637
  // src/core/monitoring/capture.ts
@@ -5157,7 +5177,7 @@ Provide a Figma URL or fixture path via the input parameter. Requires FIGMA_TOKE
5157
5177
  targetNodeId: z.string().optional().describe("Scope analysis to a specific node ID"),
5158
5178
  configPath: z.string().optional().describe("Path to config JSON file for rule overrides"),
5159
5179
  openReport: z.boolean().optional().describe("Open the generated HTML report in the user's browser. Defaults to false \u2014 opt in only when a visible report is the explicit user request (#365). The HTML file is always written to disk regardless."),
5160
- acknowledgments: z.array(AcknowledgmentSchema).optional().describe("(#371) Pre-resolved [{ nodeId, ruleId }] pairs harvested from canicode-authored Figma annotations (e.g. via the `readCanicodeAcknowledgments` Plugin helper inside a use_figma batch). Matching issues are flagged `acknowledged: true` and contribute half weight to the density score so re-analyze surfaces movement after a roundtrip even under ADR-012's annotate-by-default policy."),
5180
+ acknowledgments: z.array(AcknowledgmentSchema).optional().describe("(#371 / ADR-019) Pre-resolved acknowledgments from canicode-authored Figma annotations (e.g. via readCanicodeAcknowledgments in a use_figma batch). Each entry includes nodeId and ruleId; newer annotations may also carry intent, sceneWriteOutcome, and codegenDirective from a canicode-json fenced block (#444). Matching issues are flagged acknowledged and contribute half weight to the density score."),
5161
5181
  scope: z.enum(["page", "component"]).optional().describe("(#404) Override analysis scope \u2014 `page` (screen/section where container bounds are required) or `component` (standalone reusable unit where root FILL is the design contract). Defaults to auto-detection from the root node type: `COMPONENT` / `COMPONENT_SET` / `INSTANCE` roots resolve to `component`, everything else to `page`.")
5162
5182
  },
5163
5183
  {