@tangle-network/agent-app 0.60.62 → 0.60.64
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/{DesignCanvasEditor-3DL3PF6P.js → DesignCanvasEditor-UOOPYYYR.js} +3 -3
- package/dist/VaultPane-XUAGL5SP.js +7 -0
- package/dist/agent-profiles/d1.js +3 -3
- package/dist/agent-profiles/index.js +3 -3
- package/dist/app-auth/index.js +3 -3
- package/dist/assistant/index.js +11 -10
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.js +1 -1
- package/dist/chat-routes/index.js +16 -16
- package/dist/chat-store/index.js +3 -3
- package/dist/{chunk-FAU5FIFD.js → chunk-2FLSODOX.js} +3 -2
- package/dist/chunk-2FLSODOX.js.map +1 -0
- package/dist/chunk-5UQJ7F3P.js +41 -0
- package/dist/chunk-5UQJ7F3P.js.map +1 -0
- package/dist/{chunk-YXYQ6MJL.js → chunk-5V6VTO5Q.js} +65 -2
- package/dist/chunk-5V6VTO5Q.js.map +1 -0
- package/dist/chunk-7UB4K2R2.js +470 -0
- package/dist/chunk-7UB4K2R2.js.map +1 -0
- package/dist/{chunk-T2IESIJ7.js → chunk-BMZTYGKE.js} +2 -2
- package/dist/{chunk-2YLSWZ5W.js → chunk-JBEFTXDO.js} +4 -4
- package/dist/{chunk-JGZ7WEPL.js → chunk-JC7YSRBR.js} +15 -1
- package/dist/chunk-JC7YSRBR.js.map +1 -0
- package/dist/{chunk-N7ZJWESQ.js → chunk-KBTY4AAU.js} +274 -4
- package/dist/chunk-KBTY4AAU.js.map +1 -0
- package/dist/{chunk-S2G5NAWV.js → chunk-KSITU6BQ.js} +4 -4
- package/dist/{chunk-CN5HNTU6.js → chunk-NRG2YHGY.js} +2 -2
- package/dist/{chunk-GNA5I5NM.js → chunk-ORFRFCXQ.js} +53 -22
- package/dist/chunk-ORFRFCXQ.js.map +1 -0
- package/dist/{chunk-4WJREKXX.js → chunk-OUW5AI2G.js} +9 -9
- package/dist/chunk-OUW5AI2G.js.map +1 -0
- package/dist/{chunk-M36GXE2W.js → chunk-QXKKS3I4.js} +3 -3
- package/dist/chunk-RYUTKTOR.js +510 -0
- package/dist/chunk-RYUTKTOR.js.map +1 -0
- package/dist/{chunk-FWLCPAST.js → chunk-SH56N4PV.js} +3 -3
- package/dist/{chunk-QBNV6BJ4.js → chunk-ST3ARHJH.js} +3 -2
- package/dist/chunk-ST3ARHJH.js.map +1 -0
- package/dist/{chunk-4DIO2LTR.js → chunk-TMOYOMSW.js} +5 -5
- package/dist/{chunk-4DIO2LTR.js.map → chunk-TMOYOMSW.js.map} +1 -1
- package/dist/{chunk-J7TCMW2J.js → chunk-XMIV374H.js} +2 -2
- package/dist/{chunk-ZGUXI5SI.js → chunk-XNKLQG26.js} +5 -5
- package/dist/{chunk-XCBDWT5H.js → chunk-Z362IHYL.js} +2 -2
- package/dist/{chunk-VUXCM5ZO.js → chunk-ZZACC24K.js} +1 -1
- package/dist/{chunk-VUXCM5ZO.js.map → chunk-ZZACC24K.js.map} +1 -1
- package/dist/design-canvas-react/index.js +6 -6
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/launch-invariants/auth-lookup-cache.d.ts +57 -0
- package/dist/launch-invariants/catalog.d.ts +51 -0
- package/dist/launch-invariants/cli.d.ts +10 -0
- package/dist/launch-invariants/cli.js +88 -0
- package/dist/launch-invariants/cli.js.map +1 -0
- package/dist/launch-invariants/conformance.d.ts +49 -0
- package/dist/launch-invariants/index.d.ts +19 -0
- package/dist/launch-invariants/index.js +253 -0
- package/dist/launch-invariants/index.js.map +1 -0
- package/dist/launch-invariants/limit-alarms.d.ts +66 -0
- package/dist/launch-invariants/schedule.d.ts +114 -0
- package/dist/launch-invariants/settlement.d.ts +90 -0
- package/dist/launch-invariants/sized-reads.d.ts +50 -0
- package/dist/launch-invariants/testing.d.ts +175 -0
- package/dist/launch-invariants/testing.js +45 -0
- package/dist/launch-invariants/testing.js.map +1 -0
- package/dist/preset-cloudflare/index.js +2 -2
- package/dist/public-consultation/index.js +7 -7
- package/dist/sandbox/index.js +4 -4
- package/dist/signoff/cli.js +7 -2
- package/dist/signoff/cli.js.map +1 -1
- package/dist/signoff/index.d.ts +2 -0
- package/dist/signoff/index.js +15 -1
- package/dist/signoff/shell-alignment-cli.d.ts +8 -0
- package/dist/signoff/shell-alignment.d.ts +82 -0
- package/dist/stream/index.d.ts +1 -0
- package/dist/stream/index.js +9 -5
- package/dist/stream/orphaned-turns.d.ts +56 -0
- package/dist/stream/turn-buffer.d.ts +12 -0
- package/dist/studio-react/index.js +1 -1
- package/dist/teams/invitations-api.js +3 -3
- package/dist/theme/brand.generated.d.ts +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/tokens.css +7 -2
- package/dist/tools/index.js +4 -4
- package/dist/turn-health/index.js +6 -17
- package/dist/turn-health/index.js.map +1 -1
- package/dist/turn-stream/index.js +1 -1
- package/dist/vault/index.js +1 -1
- package/dist/vault/lazy.js +1 -1
- package/dist/web-react/index.d.ts +1 -1
- package/dist/web-react/index.js +19 -15
- package/dist/web-react/lazy-load-boundary.d.ts +19 -1
- package/dist/work-product/index.js +2 -2
- package/dist/workspace-export/index.js +30 -9
- package/dist/workspace-export/index.js.map +1 -1
- package/dist/workspace-export/react.js +14 -5
- package/dist/workspace-export/react.js.map +1 -1
- package/package.json +23 -12
- package/dist/VaultPane-A2RGT5PI.js +0 -7
- package/dist/chunk-4WJREKXX.js.map +0 -1
- package/dist/chunk-FAU5FIFD.js.map +0 -1
- package/dist/chunk-GNA5I5NM.js.map +0 -1
- package/dist/chunk-JGZ7WEPL.js.map +0 -1
- package/dist/chunk-N7ZJWESQ.js.map +0 -1
- package/dist/chunk-QBNV6BJ4.js.map +0 -1
- package/dist/chunk-YXYQ6MJL.js.map +0 -1
- /package/dist/{DesignCanvasEditor-3DL3PF6P.js.map → DesignCanvasEditor-UOOPYYYR.js.map} +0 -0
- /package/dist/{VaultPane-A2RGT5PI.js.map → VaultPane-XUAGL5SP.js.map} +0 -0
- /package/dist/{chunk-T2IESIJ7.js.map → chunk-BMZTYGKE.js.map} +0 -0
- /package/dist/{chunk-2YLSWZ5W.js.map → chunk-JBEFTXDO.js.map} +0 -0
- /package/dist/{chunk-S2G5NAWV.js.map → chunk-KSITU6BQ.js.map} +0 -0
- /package/dist/{chunk-CN5HNTU6.js.map → chunk-NRG2YHGY.js.map} +0 -0
- /package/dist/{chunk-M36GXE2W.js.map → chunk-QXKKS3I4.js.map} +0 -0
- /package/dist/{chunk-FWLCPAST.js.map → chunk-SH56N4PV.js.map} +0 -0
- /package/dist/{chunk-J7TCMW2J.js.map → chunk-XMIV374H.js.map} +0 -0
- /package/dist/{chunk-ZGUXI5SI.js.map → chunk-XNKLQG26.js.map} +0 -0
- /package/dist/{chunk-XCBDWT5H.js.map → chunk-Z362IHYL.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolInputError,
|
|
3
3
|
validateOpenUIJsonNode
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TMOYOMSW.js";
|
|
5
5
|
|
|
6
6
|
// src/tools/render-ui-schema.ts
|
|
7
7
|
function assertRenderUiSchema(value) {
|
|
@@ -14,4 +14,4 @@ function assertRenderUiSchema(value) {
|
|
|
14
14
|
export {
|
|
15
15
|
assertRenderUiSchema
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-XMIV374H.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
canTransitionInteractionStatus,
|
|
3
|
-
persistedPartToInteraction
|
|
4
|
-
} from "./chunk-6VQCFJWP.js";
|
|
5
1
|
import {
|
|
6
2
|
canTransitionPlanStatus,
|
|
7
3
|
persistedPartToPlan,
|
|
8
4
|
planPartKey,
|
|
9
5
|
planToPersistedPart
|
|
10
6
|
} from "./chunk-LQYIBL3G.js";
|
|
7
|
+
import {
|
|
8
|
+
canTransitionInteractionStatus,
|
|
9
|
+
persistedPartToInteraction
|
|
10
|
+
} from "./chunk-6VQCFJWP.js";
|
|
11
11
|
|
|
12
12
|
// src/stream/stream-normalizer.ts
|
|
13
13
|
function asRecord(value) {
|
|
@@ -406,4 +406,4 @@ export {
|
|
|
406
406
|
terminalizeDanglingAssistantToolUpdates,
|
|
407
407
|
encodeEvent
|
|
408
408
|
};
|
|
409
|
-
//# sourceMappingURL=chunk-
|
|
409
|
+
//# sourceMappingURL=chunk-XNKLQG26.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-DKHM4B4A.js";
|
|
8
8
|
import {
|
|
9
9
|
lightTheme
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZZACC24K.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_INSERT_TEMPLATES,
|
|
13
13
|
collectGridTargets,
|
|
@@ -1937,4 +1937,4 @@ export {
|
|
|
1937
1937
|
Workspace,
|
|
1938
1938
|
DesignCanvasEditor
|
|
1939
1939
|
};
|
|
1940
|
-
//# sourceMappingURL=chunk-
|
|
1940
|
+
//# sourceMappingURL=chunk-Z362IHYL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/theme/brand.generated.ts","../src/theme/theme.ts"],"sourcesContent":["/** GENERATED from @tangle-network/brand/styles/legacy-light.css\n * SHA-256: cbb8fe7d4441db729bc299cdcecc165a519d0dfe29930b11ade7feb5070007f4\n * Run node src/theme/build.mjs --write; do not edit colors or ratios here. */\nexport const brandThemes = {\n \"light\": {\n \"background\": \"223 23% 94%\",\n \"foreground\": \"0 0% 17.6471%\",\n \"card\": \"0 0% 100%\",\n \"cardForeground\": \"0 0% 17.6471%\",\n \"popover\": \"0 0% 100%\",\n \"popoverForeground\": \"0 0% 17.6471%\",\n \"primary\": \"243.2787 80.6167% 55.4902%\",\n \"primaryForeground\": \"0 0% 100%\",\n \"secondary\": \"230 27% 96%\",\n \"secondaryForeground\": \"0 0% 17.6471%\",\n \"muted\": \"230 27% 96%\",\n \"mutedForeground\": \"0 0% 29.8039%\",\n \"accent\": \"230 27% 96%\",\n \"accentForeground\": \"0 0% 17.6471%\",\n \"destructive\": \"0 73.7089% 41.7647%\",\n \"destructiveForeground\": \"0 0% 100%\",\n \"border\": \"244 16% 81%\",\n \"input\": \"0 0% 29.8039%\",\n \"ring\": \"246 54% 51%\",\n \"success\": \"162.931 93.5484% 24.3137%\",\n \"warning\": \"41 96% 50%\",\n \"successForeground\": \"0 0% 100%\",\n \"warningForeground\": \"0 0% 0%\",\n \"warningStrong\": \"25.9259 90% 35.2941%\",\n \"inputFill\": \"hsl(225 29% 97%)\",\n \"canvasBackdrop\": \"#dcdee6\",\n \"borderSoft\": \"rgba(0, 0, 0, 0.10)\",\n \"cardEdge\": \"rgba(0, 0, 0, 0.14)\",\n \"canvasRender\": {\n \"grid\": \"#c7c6d6\",\n \"snapGrid\": \"#787878\",\n \"snapGuide\": \"#0369a1\",\n \"snapPage\": \"#ab4f09\",\n \"snapElement\": \"#b91c1c\",\n \"selectionStroke\": \"#3c32e9\",\n \"selectionAnchorFill\": \"#ffffff\",\n \"placeholderFill\": \"#f6f7fa\",\n \"placeholderStroke\": \"#c7c6d6\",\n \"brokenFill\": \"#f1f2f7\",\n \"brokenStroke\": \"#787878\"\n }\n },\n \"dark\": {\n \"background\": \"240 33% 6%\",\n \"foreground\": \"0 0% 90.1961%\",\n \"card\": \"244 23% 12%\",\n \"cardForeground\": \"0 0% 90.1961%\",\n \"popover\": \"247 23% 21%\",\n \"popoverForeground\": \"0 0% 90.1961%\",\n \"primary\": \"229.6552 93.5484% 81.7647%\",\n \"primaryForeground\": \"0 0% 0%\",\n \"secondary\": \"249 24% 16%\",\n \"secondaryForeground\": \"0 0% 90.1961%\",\n \"muted\": \"249 24% 16%\",\n \"mutedForeground\": \"240 5% 68%\",\n \"accent\": \"249 24% 16%\",\n \"accentForeground\": \"0 0% 90.1961%\",\n \"destructive\": \"2.7907 100% 83.1373%\",\n \"destructiveForeground\": \"0 0% 0%\",\n \"border\": \"243 20% 20%\",\n \"input\": \"240 5% 68%\",\n \"ring\": \"233 100% 87%\",\n \"success\": \"154.7107 60.199% 60.5882%\",\n \"warning\": \"40 94% 56%\",\n \"successForeground\": \"0 0% 0%\",\n \"warningForeground\": \"0 0% 0%\",\n \"warningStrong\": \"41.4545 88.2353% 63.3333%\",\n \"inputFill\": \"hsl(244 29% 9%)\",\n \"canvasBackdrop\": \"#060610\",\n \"borderSoft\": \"rgba(255, 255, 255, 0.10)\",\n \"cardEdge\": \"rgba(255, 255, 255, 0.16)\",\n \"canvasRender\": {\n \"grid\": \"#2a293d\",\n \"snapGrid\": \"#8e8e8e\",\n \"snapGuide\": \"#67cdff\",\n \"snapPage\": \"#f4c14f\",\n \"snapElement\": \"#ffada9\",\n \"selectionStroke\": \"#a5b4fc\",\n \"selectionAnchorFill\": \"#232238\",\n \"placeholderFill\": \"#12111f\",\n \"placeholderStroke\": \"#2a293d\",\n \"brokenFill\": \"#221f33\",\n \"brokenStroke\": \"#8e8e8e\"\n }\n }\n} as const\n","/** Brand-derived HSL compatibility and bitmap snapshots. Regenerate with src/theme/build.mjs; never author a second palette here. */\nimport { brandThemes } from './brand.generated'\n\nexport interface AgentAppTheme {\n background: string\n foreground: string\n card: string\n cardForeground: string\n popover: string\n popoverForeground: string\n primary: string\n primaryForeground: string\n secondary: string\n secondaryForeground: string\n muted: string\n mutedForeground: string\n accent: string\n accentForeground: string\n destructive: string\n destructiveForeground: string\n border: string\n input: string\n /** Full field fill, distinct from the input border. Optional for existing custom themes. */\n inputFill?: string\n ring: string\n success: string\n successForeground: string\n warning: string\n warningForeground: string\n /**\n * Warning as TEXT on a warning-TINTED surface, as a channel triple. Optional\n * so a consumer's existing `AgentAppTheme` literal still type-checks;\n * {@link themeToCssVars} falls back to `warningForeground`, which is what the\n * surface used before this token existed.\n */\n warningStrong?: string\n /** Full CSS color (not a triple) — the canvas/scene backdrop. */\n canvasBackdrop: string\n /**\n * Border tiers as FULL CSS colors (they are `color-mix()` results, not\n * triples). Optional so a consumer's existing `AgentAppTheme` literal still\n * type-checks; {@link themeToCssVars} falls back to full-strength\n * `hsl(var(--border))`, which can never erase an edge.\n */\n borderSoft?: string\n /** @see borderSoft */\n cardEdge?: string\n /** Konva render palette — full hex colors the bitmap canvas paints with\n * (it cannot resolve `var(--…)`). NOT emitted by themeToCssVars. */\n canvasRender: CanvasRenderPalette\n}\n\n/**\n * Colors the Konva design-canvas paints directly. Konva renders to a bitmap\n * and cannot read CSS custom properties, so these are full hex strings sourced\n * from the active theme and threaded through the canvas components.\n */\nexport interface CanvasRenderPalette {\n /** Grid line color (GridLayer). */\n grid: string\n /** Grid-snap guide line (SnapGuidesOverlay, kind 'grid'). */\n snapGrid: string\n /** Saved ruler-guide snap line (kind 'guide'). */\n snapGuide: string\n /** Page edge/center snap line (kinds 'page-edge'/'page-center'). */\n snapPage: string\n /** Element edge/center snap line (kinds 'element-edge'/'element-center'). */\n snapElement: string\n /** Transformer border + anchor stroke (SelectionLayer). */\n selectionStroke: string\n /** Transformer anchor fill (SelectionLayer). */\n selectionAnchorFill: string\n /** Video placeholder fill (ElementNode VideoNode). */\n placeholderFill: string\n /** Video placeholder stroke (ElementNode VideoNode). */\n placeholderStroke: string\n /** Broken/loading image placeholder fill (ElementNode ImageNode). */\n brokenFill: string\n /** Broken/loading image placeholder stroke (ElementNode ImageNode). */\n brokenStroke: string\n}\n\n/** Define a light color theme with specific background, foreground, and accent color values */\nexport const lightTheme: AgentAppTheme = brandThemes.light\n\n/** Canonical Brand dark values projected for legacy JS and bitmap callers. */\nexport const darkTheme: AgentAppTheme = brandThemes.dark\n\n/**\n * Wrap a channel triple in `hsl()`; pass through values already in a color form.\n * `oklch(…)` / `oklab(…)` / `color-mix(…)` are recognised because the ramp is\n * authored in oklch and the border tiers are colour mixes — wrapping either in\n * `hsl()` yields an invalid colour that paints as nothing.\n */\nexport function themeColor(value: string): string {\n return /^(hsl|rgb|oklch|oklab|lch|lab|color|color-mix|#)/.test(value) ? value : `hsl(${value})`\n}\n\n/**\n * Map a theme to the full CSS-variable set (shadcn triples + canvas/sequences\n * aliases + canvas surface). Apply at runtime to scope a theme without loading\n * tokens.css: `Object.assign(el.style, themeToCssVars(darkTheme))`.\n */\nexport function themeToCssVars(theme: AgentAppTheme): Record<string, string> {\n return {\n '--background': theme.background,\n '--foreground': theme.foreground,\n '--card': theme.card,\n '--card-foreground': theme.cardForeground,\n '--popover': theme.popover,\n '--popover-foreground': theme.popoverForeground,\n '--primary': theme.primary,\n '--primary-foreground': theme.primaryForeground,\n '--secondary': theme.secondary,\n '--secondary-foreground': theme.secondaryForeground,\n '--muted': theme.muted,\n '--muted-foreground': theme.mutedForeground,\n '--accent': theme.accent,\n '--accent-foreground': theme.accentForeground,\n '--destructive': theme.destructive,\n '--destructive-foreground': theme.destructiveForeground,\n '--border': theme.border,\n '--input': theme.input,\n '--ring': theme.ring,\n '--success': theme.success,\n '--success-foreground': theme.successForeground,\n '--warning': theme.warning,\n '--warning-foreground': theme.warningForeground,\n // Falls back to the pairing the tinted surfaces used before this token\n // existed, so an unset value restores the previous look rather than an\n // unthemed one.\n '--warning-strong': theme.warningStrong ?? theme.warningForeground,\n '--bg-input': theme.inputFill ?? `hsl(${theme.card})`,\n '--text-primary': `hsl(${theme.foreground})`,\n '--text-secondary': `hsl(${theme.secondaryForeground})`,\n '--text-muted': `hsl(${theme.mutedForeground})`,\n '--text-danger': `hsl(${theme.destructive})`,\n '--text-warning': `hsl(${theme.warningStrong ?? theme.warningForeground})`,\n '--border-default': `hsl(${theme.border})`,\n '--brand-primary': `hsl(${theme.primary})`,\n '--editor-selection-background': `hsl(${theme.primary})`,\n '--editor-selection-foreground': `hsl(${theme.primaryForeground})`,\n '--canvas-backdrop': theme.canvasBackdrop,\n // Full strength is the safe default: an unset tier can under-draw an edge,\n // never erase one.\n '--border-soft': theme.borderSoft ?? `h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AAoB,MAAM,iBAAiB,MAAM;AAAA,IACjD,cAAc,MAAM,aAAa,OAAO,MAAM,IAAI;AAAA,IAClD,kBAAkB,OAAO,MAAM,UAAU;AAAA,IACzC,oBAAoB,OAAO,MAAM,mBAAmB;AAAA,IACpD,gBAAgB,OAAO,MAAM,eAAe;AAAA,IAC5C,iBAAiB,OAAO,MAAM,WAAW;AAAA,IACzC,kBAAkB,OAAO,MAAM,iBAAiB,MAAM,iBAAiB;AAAA,IACvE,oBAAoB,OAAO,MAAM,MAAM;AAAA,IACvC,mBAAmB,OAAO,MAAM,OAAO;AAAA,IACvC,iCAAiC,OAAO,MAAM,OAAO;AAAA,IACrD,iCAAiC,OAAO,MAAM,iBAAiB;AAAA,IAC/D,qBAAqB,MAAM;AAAA;AAAA;AAAA,IAG3B,iBAAiB,MAAM,cAAc,OAAO,MAAM,MAAM;AAAA,IACxD,eAAe,MAAM,YAAY,OAAO,MAAM,MAAM;AAAA,EACtD;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/theme/brand.generated.ts","../src/theme/theme.ts"],"sourcesContent":["/** GENERATED from @tangle-network/brand/styles/legacy-light.css\n * SHA-256: 3e234bf78f67517f5541305f7657f577aef8fd53a0208154a7916d64951c299e\n * Run node src/theme/build.mjs --write; do not edit colors or ratios here. */\nexport const brandThemes = {\n \"light\": {\n \"background\": \"223 23% 94%\",\n \"foreground\": \"0 0% 17.6471%\",\n \"card\": \"0 0% 100%\",\n \"cardForeground\": \"0 0% 17.6471%\",\n \"popover\": \"0 0% 100%\",\n \"popoverForeground\": \"0 0% 17.6471%\",\n \"primary\": \"243.2787 80.6167% 55.4902%\",\n \"primaryForeground\": \"0 0% 100%\",\n \"secondary\": \"230 27% 96%\",\n \"secondaryForeground\": \"0 0% 17.6471%\",\n \"muted\": \"230 27% 96%\",\n \"mutedForeground\": \"0 0% 29.8039%\",\n \"accent\": \"230 27% 96%\",\n \"accentForeground\": \"0 0% 17.6471%\",\n \"destructive\": \"0 73.7089% 41.7647%\",\n \"destructiveForeground\": \"0 0% 100%\",\n \"border\": \"244 16% 81%\",\n \"input\": \"0 0% 29.8039%\",\n \"ring\": \"246 54% 51%\",\n \"success\": \"162.931 93.5484% 24.3137%\",\n \"warning\": \"41 96% 50%\",\n \"successForeground\": \"0 0% 100%\",\n \"warningForeground\": \"0 0% 0%\",\n \"warningStrong\": \"25.9259 90% 35.2941%\",\n \"inputFill\": \"hsl(225 29% 97%)\",\n \"canvasBackdrop\": \"#dcdee6\",\n \"borderSoft\": \"rgba(0, 0, 0, 0.10)\",\n \"cardEdge\": \"rgba(0, 0, 0, 0.14)\",\n \"canvasRender\": {\n \"grid\": \"#c7c6d6\",\n \"snapGrid\": \"#787878\",\n \"snapGuide\": \"#0369a1\",\n \"snapPage\": \"#ab4f09\",\n \"snapElement\": \"#b91c1c\",\n \"selectionStroke\": \"#3c32e9\",\n \"selectionAnchorFill\": \"#ffffff\",\n \"placeholderFill\": \"#f6f7fa\",\n \"placeholderStroke\": \"#c7c6d6\",\n \"brokenFill\": \"#f1f2f7\",\n \"brokenStroke\": \"#787878\"\n }\n },\n \"dark\": {\n \"background\": \"240 33% 6%\",\n \"foreground\": \"0 0% 90.1961%\",\n \"card\": \"244 23% 12%\",\n \"cardForeground\": \"0 0% 90.1961%\",\n \"popover\": \"247 23% 21%\",\n \"popoverForeground\": \"0 0% 90.1961%\",\n \"primary\": \"229.6552 93.5484% 81.7647%\",\n \"primaryForeground\": \"0 0% 0%\",\n \"secondary\": \"249 24% 16%\",\n \"secondaryForeground\": \"0 0% 90.1961%\",\n \"muted\": \"249 24% 16%\",\n \"mutedForeground\": \"240 5% 68%\",\n \"accent\": \"249 24% 16%\",\n \"accentForeground\": \"0 0% 90.1961%\",\n \"destructive\": \"2.7907 100% 83.1373%\",\n \"destructiveForeground\": \"0 0% 0%\",\n \"border\": \"243 20% 20%\",\n \"input\": \"240 5% 68%\",\n \"ring\": \"233 100% 87%\",\n \"success\": \"154.7107 60.199% 60.5882%\",\n \"warning\": \"40 94% 56%\",\n \"successForeground\": \"0 0% 0%\",\n \"warningForeground\": \"0 0% 0%\",\n \"warningStrong\": \"41.4545 88.2353% 63.3333%\",\n \"inputFill\": \"hsl(244 29% 9%)\",\n \"canvasBackdrop\": \"#060610\",\n \"borderSoft\": \"rgba(255, 255, 255, 0.10)\",\n \"cardEdge\": \"rgba(255, 255, 255, 0.16)\",\n \"canvasRender\": {\n \"grid\": \"#2a293d\",\n \"snapGrid\": \"#8e8e8e\",\n \"snapGuide\": \"#67cdff\",\n \"snapPage\": \"#f4c14f\",\n \"snapElement\": \"#ffada9\",\n \"selectionStroke\": \"#a5b4fc\",\n \"selectionAnchorFill\": \"#232238\",\n \"placeholderFill\": \"#12111f\",\n \"placeholderStroke\": \"#2a293d\",\n \"brokenFill\": \"#221f33\",\n \"brokenStroke\": \"#8e8e8e\"\n }\n }\n} as const\n","/** Brand-derived HSL compatibility and bitmap snapshots. Regenerate with src/theme/build.mjs; never author a second palette here. */\nimport { brandThemes } from './brand.generated'\n\nexport interface AgentAppTheme {\n background: string\n foreground: string\n card: string\n cardForeground: string\n popover: string\n popoverForeground: string\n primary: string\n primaryForeground: string\n secondary: string\n secondaryForeground: string\n muted: string\n mutedForeground: string\n accent: string\n accentForeground: string\n destructive: string\n destructiveForeground: string\n border: string\n input: string\n /** Full field fill, distinct from the input border. Optional for existing custom themes. */\n inputFill?: string\n ring: string\n success: string\n successForeground: string\n warning: string\n warningForeground: string\n /**\n * Warning as TEXT on a warning-TINTED surface, as a channel triple. Optional\n * so a consumer's existing `AgentAppTheme` literal still type-checks;\n * {@link themeToCssVars} falls back to `warningForeground`, which is what the\n * surface used before this token existed.\n */\n warningStrong?: string\n /** Full CSS color (not a triple) — the canvas/scene backdrop. */\n canvasBackdrop: string\n /**\n * Border tiers as FULL CSS colors (they are `color-mix()` results, not\n * triples). Optional so a consumer's existing `AgentAppTheme` literal still\n * type-checks; {@link themeToCssVars} falls back to full-strength\n * `hsl(var(--border))`, which can never erase an edge.\n */\n borderSoft?: string\n /** @see borderSoft */\n cardEdge?: string\n /** Konva render palette — full hex colors the bitmap canvas paints with\n * (it cannot resolve `var(--…)`). NOT emitted by themeToCssVars. */\n canvasRender: CanvasRenderPalette\n}\n\n/**\n * Colors the Konva design-canvas paints directly. Konva renders to a bitmap\n * and cannot read CSS custom properties, so these are full hex strings sourced\n * from the active theme and threaded through the canvas components.\n */\nexport interface CanvasRenderPalette {\n /** Grid line color (GridLayer). */\n grid: string\n /** Grid-snap guide line (SnapGuidesOverlay, kind 'grid'). */\n snapGrid: string\n /** Saved ruler-guide snap line (kind 'guide'). */\n snapGuide: string\n /** Page edge/center snap line (kinds 'page-edge'/'page-center'). */\n snapPage: string\n /** Element edge/center snap line (kinds 'element-edge'/'element-center'). */\n snapElement: string\n /** Transformer border + anchor stroke (SelectionLayer). */\n selectionStroke: string\n /** Transformer anchor fill (SelectionLayer). */\n selectionAnchorFill: string\n /** Video placeholder fill (ElementNode VideoNode). */\n placeholderFill: string\n /** Video placeholder stroke (ElementNode VideoNode). */\n placeholderStroke: string\n /** Broken/loading image placeholder fill (ElementNode ImageNode). */\n brokenFill: string\n /** Broken/loading image placeholder stroke (ElementNode ImageNode). */\n brokenStroke: string\n}\n\n/** Define a light color theme with specific background, foreground, and accent color values */\nexport const lightTheme: AgentAppTheme = brandThemes.light\n\n/** Canonical Brand dark values projected for legacy JS and bitmap callers. */\nexport const darkTheme: AgentAppTheme = brandThemes.dark\n\n/**\n * Wrap a channel triple in `hsl()`; pass through values already in a color form.\n * `oklch(…)` / `oklab(…)` / `color-mix(…)` are recognised because the ramp is\n * authored in oklch and the border tiers are colour mixes — wrapping either in\n * `hsl()` yields an invalid colour that paints as nothing.\n */\nexport function themeColor(value: string): string {\n return /^(hsl|rgb|oklch|oklab|lch|lab|color|color-mix|#)/.test(value) ? value : `hsl(${value})`\n}\n\n/**\n * Map a theme to the full CSS-variable set (shadcn triples + canvas/sequences\n * aliases + canvas surface). Apply at runtime to scope a theme without loading\n * tokens.css: `Object.assign(el.style, themeToCssVars(darkTheme))`.\n */\nexport function themeToCssVars(theme: AgentAppTheme): Record<string, string> {\n return {\n '--background': theme.background,\n '--foreground': theme.foreground,\n '--card': theme.card,\n '--card-foreground': theme.cardForeground,\n '--popover': theme.popover,\n '--popover-foreground': theme.popoverForeground,\n '--primary': theme.primary,\n '--primary-foreground': theme.primaryForeground,\n '--secondary': theme.secondary,\n '--secondary-foreground': theme.secondaryForeground,\n '--muted': theme.muted,\n '--muted-foreground': theme.mutedForeground,\n '--accent': theme.accent,\n '--accent-foreground': theme.accentForeground,\n '--destructive': theme.destructive,\n '--destructive-foreground': theme.destructiveForeground,\n '--border': theme.border,\n '--input': theme.input,\n '--ring': theme.ring,\n '--success': theme.success,\n '--success-foreground': theme.successForeground,\n '--warning': theme.warning,\n '--warning-foreground': theme.warningForeground,\n // Falls back to the pairing the tinted surfaces used before this token\n // existed, so an unset value restores the previous look rather than an\n // unthemed one.\n '--warning-strong': theme.warningStrong ?? theme.warningForeground,\n '--bg-input': theme.inputFill ?? `hsl(${theme.card})`,\n '--text-primary': `hsl(${theme.foreground})`,\n '--text-secondary': `hsl(${theme.secondaryForeground})`,\n '--text-muted': `hsl(${theme.mutedForeground})`,\n '--text-danger': `hsl(${theme.destructive})`,\n '--text-warning': `hsl(${theme.warningStrong ?? theme.warningForeground})`,\n '--border-default': `hsl(${theme.border})`,\n '--brand-primary': `hsl(${theme.primary})`,\n '--editor-selection-background': `hsl(${theme.primary})`,\n '--editor-selection-foreground': `hsl(${theme.primaryForeground})`,\n '--canvas-backdrop': theme.canvasBackdrop,\n // Full strength is the safe default: an unset tier can under-draw an edge,\n // never erase one.\n '--border-soft': theme.borderSoft ?? `hsl(${theme.border})`,\n '--card-edge': theme.cardEdge ?? `hsl(${theme.border})`,\n }\n}\n"],"mappings":";AAGO,IAAM,cAAc;AAAA,EACzB,SAAS;AAAA,IACP,cAAc;AAAA,IACd,cAAc;AAAA,IACd,QAAQ;AAAA,IAC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AAgB,OAAO,MAAM,eAAe;AAAA,IAC5C,iBAAiB,OAAO,MAAM,WAAW;AAAA,IACzC,kBAAkB,OAAO,MAAM,iBAAiB,MAAM,iBAAiB;AAAA,IACvE,oBAAoB,OAAO,MAAM,MAAM;AAAA,IACvC,mBAAmB,OAAO,MAAM,OAAO;AAAA,IACvC,iCAAiC,OAAO,MAAM,OAAO;AAAA,IACrD,iCAAiC,OAAO,MAAM,iBAAiB;AAAA,IAC/D,qBAAqB,MAAM;AAAA;AAAA;AAAA,IAG3B,iBAAiB,MAAM,cAAc,OAAO,MAAM,MAAM;AAAA,IACxD,eAAe,MAAM,YAAY,OAAO,MAAM,MAAM;AAAA,EACtD;AACF;","names":[]}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
bakeTextTransform,
|
|
12
12
|
exportDocumentJson,
|
|
13
13
|
exportPageDataUrl
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-Z362IHYL.js";
|
|
15
15
|
import {
|
|
16
16
|
BTN,
|
|
17
17
|
BTN_ACTIVE,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
formatRulerLabel,
|
|
42
42
|
selectTickStep
|
|
43
43
|
} from "../chunk-DKHM4B4A.js";
|
|
44
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-ZZACC24K.js";
|
|
45
45
|
import "../chunk-ZN5J47UX.js";
|
|
46
46
|
import {
|
|
47
47
|
DEFAULT_INSERT_TEMPLATES,
|
|
@@ -84,15 +84,15 @@ import {
|
|
|
84
84
|
setPagePropsCommand,
|
|
85
85
|
ungroupElementCommand
|
|
86
86
|
} from "../chunk-6NYVAURR.js";
|
|
87
|
+
import {
|
|
88
|
+
DesignCanvasChromeLazy,
|
|
89
|
+
DesignCanvasLazy
|
|
90
|
+
} from "../chunk-NRG2YHGY.js";
|
|
87
91
|
import {
|
|
88
92
|
assertSceneMediaSrc,
|
|
89
93
|
bleedAwareExportBounds,
|
|
90
94
|
scaleForPreset
|
|
91
95
|
} from "../chunk-OHWQUKBP.js";
|
|
92
|
-
import {
|
|
93
|
-
DesignCanvasChromeLazy,
|
|
94
|
-
DesignCanvasLazy
|
|
95
|
-
} from "../chunk-CN5HNTU6.js";
|
|
96
96
|
import "../chunk-UTAIRVOK.js";
|
|
97
97
|
import "../chunk-RN4WPTBH.js";
|
|
98
98
|
import "../chunk-3NCPXNBZ.js";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The last valid result of each auth lookup (API key, key owner, browser
|
|
3
|
+
* session), served only while the store cannot answer.
|
|
4
|
+
*
|
|
5
|
+
* Every lookup reads the store first, so a revoked or expired credential is
|
|
6
|
+
* refused as soon as the store says so, and that answer drops its entry. When
|
|
7
|
+
* the store errors or stalls past the deadline, a valid result verified less
|
|
8
|
+
* than the TTL ago is served instead: on 2026-10-10 an overloaded D1 failed
|
|
9
|
+
* API-key checks and session reads for requests whose credentials were valid
|
|
10
|
+
* moments before (GTM #1488). The TTL counts from the last successful store
|
|
11
|
+
* read and a served entry never renews it, so a credential revoked during an
|
|
12
|
+
* outage lives at most the TTL past its last verification. Entries are per
|
|
13
|
+
* isolate; revoking or rotating a key must also drop its entry here.
|
|
14
|
+
*
|
|
15
|
+
* The cache serves the verified value itself, never a copy: GTM keyed a
|
|
16
|
+
* WeakMap on the verified key object, a copy missed it, and operator requests
|
|
17
|
+
* answered 401 (GTM #1492).
|
|
18
|
+
*/
|
|
19
|
+
/** Longest a verified result may be served while the store cannot answer. A larger configured TTL is capped here. */
|
|
20
|
+
export declare const AUTH_LOOKUP_TTL_MS = 60000;
|
|
21
|
+
/** A store read slower than this is treated as unavailable; a healthy D1 lookup answers in tens of milliseconds. */
|
|
22
|
+
export declare const AUTH_LOOKUP_DEADLINE_MS = 2500;
|
|
23
|
+
/** The store answered that the credential is not valid; never answered from the cache. */
|
|
24
|
+
export declare class AuthLookupRefused extends Error {
|
|
25
|
+
}
|
|
26
|
+
export interface AuthLookupOptions<V> {
|
|
27
|
+
/** When the credential itself expires (Unix ms); the entry never outlives it. */
|
|
28
|
+
expiresAt?: (value: V) => number | null | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface AuthLookupCache<V> {
|
|
31
|
+
/**
|
|
32
|
+
* Read through the store. `read` resolves the valid value or null, or throws
|
|
33
|
+
* {@link AuthLookupRefused} (or a `Response`) when the store refuses; any
|
|
34
|
+
* other failure, or no answer by the deadline, falls back to a fresh entry.
|
|
35
|
+
* `key` must not be the secret: use {@link credentialCacheKey}.
|
|
36
|
+
*/
|
|
37
|
+
lookup(key: string, read: () => Promise<V | null>, options?: AuthLookupOptions<V>): Promise<V | null>;
|
|
38
|
+
/** Drop every entry whose value matches, as when a key is revoked or rotated. */
|
|
39
|
+
invalidate(matches: (value: V) => boolean): void;
|
|
40
|
+
/** Drop one entry by its key. */
|
|
41
|
+
forget(key: string): void;
|
|
42
|
+
clear(): void;
|
|
43
|
+
/** The keys held, for a check that no secret is stored. */
|
|
44
|
+
keys(): string[];
|
|
45
|
+
}
|
|
46
|
+
export interface AuthLookupCacheOptions {
|
|
47
|
+
/** Names the lookup in the warning logged when a cached result is served. */
|
|
48
|
+
label: string;
|
|
49
|
+
/** Capped at {@link AUTH_LOOKUP_TTL_MS}. */
|
|
50
|
+
ttlMs?: number;
|
|
51
|
+
deadlineMs?: number;
|
|
52
|
+
now?: () => number;
|
|
53
|
+
warn?: (message: string, detail: Record<string, unknown>) => void;
|
|
54
|
+
}
|
|
55
|
+
export declare function createAuthLookupCache<V>(options: AuthLookupCacheOptions): AuthLookupCache<V>;
|
|
56
|
+
/** A credential's cache key: its SHA-256 in hex, so the cache never holds the secret. */
|
|
57
|
+
export declare function credentialCacheKey(secret: string): Promise<string>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The launch invariants every agent app holds, and the budgets they are held to.
|
|
3
|
+
*
|
|
4
|
+
* Each one is a failure GTM shipped to production on 2026-10-10 and fixed by
|
|
5
|
+
* hand. They are listed here once so every app checks the same rule with the
|
|
6
|
+
* same numbers, and `agent-app-invariants` reports each by its id.
|
|
7
|
+
*/
|
|
8
|
+
/** Budgets the invariants are measured against. */
|
|
9
|
+
export declare const LAUNCH_BUDGETS: {
|
|
10
|
+
/** Most bytes one query may return in a scheduled job or report route: one sized batch with room for its listing. */
|
|
11
|
+
readonly queryBytes: number;
|
|
12
|
+
/** Most the live heap may grow while one scheduled job runs on a day-sized fixture. */
|
|
13
|
+
readonly heapGrowthBytes: number;
|
|
14
|
+
/** Most bytes of a large column one sized read returns; a single larger row is read alone. */
|
|
15
|
+
readonly sizedReadBytes: number;
|
|
16
|
+
/** Most stored events one long turn may write. */
|
|
17
|
+
readonly turnEvents: 5000;
|
|
18
|
+
/** A turn whose owner stopped reaches its terminal state within this long. */
|
|
19
|
+
readonly settleWithinMs: number;
|
|
20
|
+
/** Turn recovery and orphan settlement run at least this often. */
|
|
21
|
+
readonly recoveryEveryMs: number;
|
|
22
|
+
/** Longest a cached auth lookup may be served while the store cannot answer. */
|
|
23
|
+
readonly authCacheTtlMs: 60000;
|
|
24
|
+
/** A platform-limit alarm fires at this share of the limit. */
|
|
25
|
+
readonly alarmRatio: 0.8;
|
|
26
|
+
};
|
|
27
|
+
export type LaunchInvariantId = 'bounded-reads' | 'memory-budget' | 'isolated-jobs' | 'honest-settlement' | 'coalesced-events' | 'auth-survives-d1-stall' | 'authorize-before-stream' | 'limit-alarms';
|
|
28
|
+
export interface LaunchInvariant {
|
|
29
|
+
id: LaunchInvariantId;
|
|
30
|
+
title: string;
|
|
31
|
+
/** The rule, as the conformance report states it. */
|
|
32
|
+
rule: string;
|
|
33
|
+
/** The production failure the rule answers. */
|
|
34
|
+
incident: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const LAUNCH_INVARIANTS: readonly LaunchInvariant[];
|
|
37
|
+
/** The invariant ids in report order. */
|
|
38
|
+
export declare const LAUNCH_INVARIANT_IDS: readonly LaunchInvariantId[];
|
|
39
|
+
/** One checked outcome of one invariant, for one subject (a job, a route, a scenario). */
|
|
40
|
+
export interface InvariantVerdict {
|
|
41
|
+
invariant: LaunchInvariantId;
|
|
42
|
+
/** What was checked: a job name, a route, a scenario. */
|
|
43
|
+
subject: string;
|
|
44
|
+
pass: boolean;
|
|
45
|
+
/** Findings, one line each. On a pass, what was proven. */
|
|
46
|
+
details: string[];
|
|
47
|
+
/** Measurements behind the verdict, for the report. */
|
|
48
|
+
data?: Record<string, unknown>;
|
|
49
|
+
}
|
|
50
|
+
/** A verdict whose message names every finding, for a test runner's failure output. */
|
|
51
|
+
export declare function describeVerdict(verdict: InvariantVerdict): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { type ConformanceReport } from './conformance.js';
|
|
3
|
+
interface CliArgs {
|
|
4
|
+
appDir: string;
|
|
5
|
+
config?: string;
|
|
6
|
+
json?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Run the app's invariant tests and judge the result. */
|
|
9
|
+
export declare function runConformance(args: CliArgs): Promise<ConformanceReport>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
INVARIANT_RESULTS_ENV,
|
|
4
|
+
buildConformanceReport,
|
|
5
|
+
formatConformanceReport,
|
|
6
|
+
readDeploymentFacts,
|
|
7
|
+
readVerdicts
|
|
8
|
+
} from "../chunk-RYUTKTOR.js";
|
|
9
|
+
import "../chunk-7UB4K2R2.js";
|
|
10
|
+
import {
|
|
11
|
+
invokedAsScript
|
|
12
|
+
} from "../chunk-C3CAYGGQ.js";
|
|
13
|
+
|
|
14
|
+
// src/launch-invariants/cli.ts
|
|
15
|
+
import { spawnSync } from "child_process";
|
|
16
|
+
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
17
|
+
import { tmpdir } from "os";
|
|
18
|
+
import { join, resolve } from "path";
|
|
19
|
+
import { pathToFileURL } from "url";
|
|
20
|
+
var CONFIG_NAMES = ["launch-invariants.config.mjs", "launch-invariants.config.js", "launch-invariants.config.json"];
|
|
21
|
+
function parseArgs(argv) {
|
|
22
|
+
const args = { appDir: process.cwd() };
|
|
23
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
24
|
+
const arg = argv[index];
|
|
25
|
+
if (arg === "--config") args.config = argv[++index];
|
|
26
|
+
else if (arg === "--json") args.json = argv[++index];
|
|
27
|
+
else if (arg.startsWith("--")) throw new Error(`unknown option ${arg}`);
|
|
28
|
+
else args.appDir = resolve(arg);
|
|
29
|
+
}
|
|
30
|
+
return args;
|
|
31
|
+
}
|
|
32
|
+
async function loadConfig(appDir, explicit) {
|
|
33
|
+
const file = explicit ? resolve(appDir, explicit) : CONFIG_NAMES.map((name) => join(appDir, name)).find((path) => existsSync(path));
|
|
34
|
+
if (!file || !existsSync(file)) throw new Error(`no ${CONFIG_NAMES[0]} in ${appDir}`);
|
|
35
|
+
const config = file.endsWith(".json") ? JSON.parse(readFileSync(file, "utf8")) : (await import(pathToFileURL(file).href)).default;
|
|
36
|
+
if (!config?.product || !config.test) throw new Error(`${file} must export { product, test }`);
|
|
37
|
+
return config;
|
|
38
|
+
}
|
|
39
|
+
async function runConformance(args) {
|
|
40
|
+
const config = await loadConfig(args.appDir, args.config);
|
|
41
|
+
const facts = readDeploymentFacts(args.appDir, config.wrangler);
|
|
42
|
+
const dir = mkdtempSync(join(tmpdir(), "agent-app-invariants-"));
|
|
43
|
+
const results = join(dir, "verdicts.jsonl");
|
|
44
|
+
writeFileSync(results, "");
|
|
45
|
+
try {
|
|
46
|
+
const run = spawnSync(config.test, {
|
|
47
|
+
cwd: args.appDir,
|
|
48
|
+
shell: true,
|
|
49
|
+
stdio: "inherit",
|
|
50
|
+
env: { ...process.env, [INVARIANT_RESULTS_ENV]: results }
|
|
51
|
+
});
|
|
52
|
+
return buildConformanceReport({
|
|
53
|
+
config,
|
|
54
|
+
facts,
|
|
55
|
+
verdicts: readVerdicts(readFileSync(results, "utf8")),
|
|
56
|
+
testExitCode: run.status
|
|
57
|
+
});
|
|
58
|
+
} finally {
|
|
59
|
+
rmSync(dir, { recursive: true, force: true });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async function main() {
|
|
63
|
+
let args;
|
|
64
|
+
try {
|
|
65
|
+
args = parseArgs(process.argv.slice(2));
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
68
|
+
return 2;
|
|
69
|
+
}
|
|
70
|
+
let report;
|
|
71
|
+
try {
|
|
72
|
+
report = await runConformance(args);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error(`agent-app-invariants: ${error instanceof Error ? error.message : String(error)}`);
|
|
75
|
+
return 2;
|
|
76
|
+
}
|
|
77
|
+
console.log(formatConformanceReport(report));
|
|
78
|
+
if (args.json) writeFileSync(resolve(args.appDir, args.json), `${JSON.stringify(report, null, 2)}
|
|
79
|
+
`);
|
|
80
|
+
return report.pass ? 0 : 1;
|
|
81
|
+
}
|
|
82
|
+
if (invokedAsScript(import.meta.url, process.argv[1])) {
|
|
83
|
+
void main().then((code) => process.exit(code));
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
runConformance
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/launch-invariants/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * `agent-app-invariants` — report which launch invariants an app holds, and\n * fail its CI when one does not.\n *\n * Runs in the app's repo. Add a `launch-invariants.config.mjs` at the root:\n *\n * export default {\n * product: 'gtm',\n * test: 'pnpm exec vitest run tests/launch-invariants.test.ts',\n * }\n *\n * and a script next to typecheck:\n *\n * \"scripts\": { \"invariants\": \"agent-app-invariants\" }\n *\n * Usage: agent-app-invariants [appDir] [--config <file>] [--json <out>]\n * Exits 0 when every invariant holds, 1 when one does not, 2 on a usage error.\n */\nimport { spawnSync } from 'node:child_process'\nimport { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'\nimport { tmpdir } from 'node:os'\nimport { join, resolve } from 'node:path'\nimport { pathToFileURL } from 'node:url'\nimport { invokedAsScript } from '../signoff/invoked-as-script.js'\nimport {\n buildConformanceReport,\n formatConformanceReport,\n readDeploymentFacts,\n readVerdicts,\n type ConformanceReport,\n type LaunchInvariantsConfig,\n} from './conformance.js'\nimport { INVARIANT_RESULTS_ENV } from './testing.js'\n\nconst CONFIG_NAMES = ['launch-invariants.config.mjs', 'launch-invariants.config.js', 'launch-invariants.config.json']\n\ninterface CliArgs {\n appDir: string\n config?: string\n json?: string\n}\n\nfunction parseArgs(argv: readonly string[]): CliArgs {\n const args: CliArgs = { appDir: process.cwd() }\n for (let index = 0; index < argv.length; index += 1) {\n const arg = argv[index]!\n if (arg === '--config') args.config = argv[++index]\n else if (arg === '--json') args.json = argv[++index]\n else if (arg.startsWith('--')) throw new Error(`unknown option ${arg}`)\n else args.appDir = resolve(arg)\n }\n return args\n}\n\nasync function loadConfig(appDir: string, explicit?: string): Promise<LaunchInvariantsConfig> {\n const file = explicit ? resolve(appDir, explicit) : CONFIG_NAMES.map((name) => join(appDir, name)).find((path) => existsSync(path))\n if (!file || !existsSync(file)) throw new Error(`no ${CONFIG_NAMES[0]} in ${appDir}`)\n const config = file.endsWith('.json')\n ? JSON.parse(readFileSync(file, 'utf8')) as LaunchInvariantsConfig\n : ((await import(pathToFileURL(file).href)) as { default: LaunchInvariantsConfig }).default\n if (!config?.product || !config.test) throw new Error(`${file} must export { product, test }`)\n return config\n}\n\n/** Run the app's invariant tests and judge the result. */\nexport async function runConformance(args: CliArgs): Promise<ConformanceReport> {\n const config = await loadConfig(args.appDir, args.config)\n const facts = readDeploymentFacts(args.appDir, config.wrangler)\n const dir = mkdtempSync(join(tmpdir(), 'agent-app-invariants-'))\n const results = join(dir, 'verdicts.jsonl')\n writeFileSync(results, '')\n try {\n const run = spawnSync(config.test, {\n cwd: args.appDir,\n shell: true,\n stdio: 'inherit',\n env: { ...process.env, [INVARIANT_RESULTS_ENV]: results },\n })\n return buildConformanceReport({\n config,\n facts,\n verdicts: readVerdicts(readFileSync(results, 'utf8')),\n testExitCode: run.status,\n })\n } finally {\n rmSync(dir, { recursive: true, force: true })\n }\n}\n\nasync function main(): Promise<number> {\n let args: CliArgs\n try {\n args = parseArgs(process.argv.slice(2))\n } catch (error) {\n console.error(error instanceof Error ? error.message : String(error))\n return 2\n }\n let report: ConformanceReport\n try {\n report = await runConformance(args)\n } catch (error) {\n console.error(`agent-app-invariants: ${error instanceof Error ? error.message : String(error)}`)\n return 2\n }\n console.log(formatConformanceReport(report))\n if (args.json) writeFileSync(resolve(args.appDir, args.json), `${JSON.stringify(report, null, 2)}\\n`)\n return report.pass ? 0 : 1\n}\n\nif (invokedAsScript(import.meta.url, process.argv[1])) {\n void main().then((code) => process.exit(code))\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,SAAS,iBAAiB;AAC1B,SAAS,YAAY,aAAa,cAAc,QAAQ,qBAAqB;AAC7E,SAAS,cAAc;AACvB,SAAS,MAAM,eAAe;AAC9B,SAAS,qBAAqB;AAY9B,IAAM,eAAe,CAAC,gCAAgC,+BAA+B,+BAA+B;AAQpH,SAAS,UAAU,MAAkC;AACnD,QAAM,OAAgB,EAAE,QAAQ,QAAQ,IAAI,EAAE;AAC9C,WAAS,QAAQ,GAAG,QAAQ,KAAK,QAAQ,SAAS,GAAG;AACnD,UAAM,MAAM,KAAK,KAAK;AACtB,QAAI,QAAQ,WAAY,MAAK,SAAS,KAAK,EAAE,KAAK;AAAA,aACzC,QAAQ,SAAU,MAAK,OAAO,KAAK,EAAE,KAAK;AAAA,aAC1C,IAAI,WAAW,IAAI,EAAG,OAAM,IAAI,MAAM,kBAAkB,GAAG,EAAE;AAAA,QACjE,MAAK,SAAS,QAAQ,GAAG;AAAA,EAChC;AACA,SAAO;AACT;AAEA,eAAe,WAAW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QAAQ,KAAK,MAAM,CAAC,CAAC;AAAA,EACxC,SAAS,OAAO;AACd,YAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;AACpE,WAAO;AAAA,EACT;AACA,MAAI;AACJ,MAAI;AACF,aAAS,MAAM,eAAe,IAAI;AAAA,EACpC,SAAS,OAAO;AACd,YAAQ,MAAM,yBAAyB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,EAAE;AAC/F,WAAO;AAAA,EACT;AACA,UAAQ,IAAI,wBAAwB,MAAM,CAAC;AAC3C,MAAI,KAAK,KAAM,eAAc,QAAQ,KAAK,QAAQ,KAAK,IAAI,GAAG,GAAG,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;AAAA,CAAI;AACpG,SAAO,OAAO,OAAO,IAAI;AAC3B;AAEA,IAAI,gBAAgB,YAAY,KAAK,QAAQ,KAAK,CAAC,CAAC,GAAG;AACrD,OAAK,KAAK,EAAE,KAAK,CAAC,SAAS,QAAQ,KAAK,IAAI,CAAC;AAC/C;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type InvariantVerdict, type LaunchInvariantId } from './catalog.js';
|
|
2
|
+
/** `launch-invariants.config.mjs` (or `.json`) at the app root. */
|
|
3
|
+
export interface LaunchInvariantsConfig {
|
|
4
|
+
/** The app's name in the report. */
|
|
5
|
+
product: string;
|
|
6
|
+
/** The command that runs the app's invariant tests, e.g. `pnpm exec vitest run tests/launch-invariants.test.ts`. */
|
|
7
|
+
test: string;
|
|
8
|
+
/** Wrangler configs, relative to the app root. Default: the first of wrangler.toml, wrangler.jsonc, wrangler.json. */
|
|
9
|
+
wrangler?: readonly string[];
|
|
10
|
+
/** Invariants the deployment shows do not apply, with the reason. */
|
|
11
|
+
notApplicable?: Partial<Record<LaunchInvariantId, string>>;
|
|
12
|
+
}
|
|
13
|
+
/** What the deployment declares, read from its wrangler configs. */
|
|
14
|
+
export interface DeploymentFacts {
|
|
15
|
+
wranglerFiles: string[];
|
|
16
|
+
configuredCrons: string[];
|
|
17
|
+
hasD1: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type InvariantStatus = 'pass' | 'fail' | 'not-applicable';
|
|
20
|
+
export interface InvariantReport {
|
|
21
|
+
id: LaunchInvariantId;
|
|
22
|
+
title: string;
|
|
23
|
+
status: InvariantStatus;
|
|
24
|
+
/** Why it failed or does not apply; on a pass, what was proven. */
|
|
25
|
+
lines: string[];
|
|
26
|
+
verdicts: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ConformanceReport {
|
|
29
|
+
product: string;
|
|
30
|
+
pass: boolean;
|
|
31
|
+
passed: number;
|
|
32
|
+
total: number;
|
|
33
|
+
testExitCode: number | null;
|
|
34
|
+
invariants: InvariantReport[];
|
|
35
|
+
facts: DeploymentFacts;
|
|
36
|
+
}
|
|
37
|
+
/** Read the crons and D1 bindings the app's wrangler configs declare. */
|
|
38
|
+
export declare function readDeploymentFacts(appDir: string, files?: readonly string[]): DeploymentFacts;
|
|
39
|
+
/** Parse the results file the invariant tests appended to. */
|
|
40
|
+
export declare function readVerdicts(source: string): InvariantVerdict[];
|
|
41
|
+
/** Judge each invariant from the recorded verdicts and the deployment facts. */
|
|
42
|
+
export declare function buildConformanceReport(input: {
|
|
43
|
+
config: LaunchInvariantsConfig;
|
|
44
|
+
facts: DeploymentFacts;
|
|
45
|
+
verdicts: readonly InvariantVerdict[];
|
|
46
|
+
testExitCode: number | null;
|
|
47
|
+
}): ConformanceReport;
|
|
48
|
+
/** The report as the CLI prints it. */
|
|
49
|
+
export declare function formatConformanceReport(report: ConformanceReport): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/launch-invariants` — the rules every agent app holds before launch, and the
|
|
3
|
+
* runtime pieces that hold them.
|
|
4
|
+
*
|
|
5
|
+
* Each invariant is a failure GTM shipped on 2026-10-10 and fixed by hand
|
|
6
|
+
* (see {@link LAUNCH_INVARIANTS}). This subpath carries what runs in the
|
|
7
|
+
* Worker: sized reads, the scheduled dispatcher that gives each job its own
|
|
8
|
+
* invocation, the auth lookup cache that survives a D1 stall, and the 80%
|
|
9
|
+
* platform-limit alarms. `/launch-invariants/testing` carries the checks an app
|
|
10
|
+
* runs in its own suite, and `agent-app-invariants` reports them per invariant.
|
|
11
|
+
*
|
|
12
|
+
* Server-safe: no Node built-ins. See docs/launch-invariants.md.
|
|
13
|
+
*/
|
|
14
|
+
export { describeVerdict, LAUNCH_BUDGETS, LAUNCH_INVARIANT_IDS, LAUNCH_INVARIANTS, type InvariantVerdict, type LaunchInvariant, type LaunchInvariantId, } from './catalog.js';
|
|
15
|
+
export { D1_MAX_BOUND_PARAMETERS, readInSizedBatches, SIZED_READ_BYTES, SIZED_READ_COMPOSITE_ROWS, SIZED_READ_ROWS, sizedBatches, type SizedBatchOptions, type SizedRow, } from './sized-reads.js';
|
|
16
|
+
export { AUTH_LOOKUP_DEADLINE_MS, AUTH_LOOKUP_TTL_MS, AuthLookupRefused, createAuthLookupCache, credentialCacheKey, type AuthLookupCache, type AuthLookupCacheOptions, type AuthLookupOptions, } from './auth-lookup-cache.js';
|
|
17
|
+
export { checkIsolatedJobs, createScheduledDispatch, cronDailyFirings, longestGapMinutes, parseWranglerCrons, slotsOf, type IsolatedJobsInput, type ObservedSlot, type ScheduledDispatch, type ScheduledDispatchOptions, type ScheduledDispatchResult, type ScheduledJob, type ScheduledJobInput, type ScheduledJobOutcome, type ScheduleEntry, type ScheduleSlot, type WranglerCrons, } from './schedule.js';
|
|
18
|
+
export { createLimitAlarms, estimatedBytes, LIMIT_RESOURCES, withD1LimitAlarms, type LimitAlarmOptions, type LimitAlarms, type LimitBudgets, type LimitLevel, type LimitObservation, type LimitResource, } from './limit-alarms.js';
|
|
19
|
+
export { checkSettlementScenarios, checkTurnSettlement, SETTLEMENT_SCENARIOS, type SettledTurnRecord, type SettlementScenario, type TurnSettlementCounts, type TurnTerminalState, } from './settlement.js';
|