@shipeasy/openapi 2.2.0 → 2.3.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.
Files changed (43) hide show
  1. package/dist/{chunk-643YSMLU.js → chunk-LYNWK55D.js} +23 -1
  2. package/dist/chunk-LYNWK55D.js.map +1 -0
  3. package/dist/{chunk-MRW3DJ57.js → chunk-PRN4AEAM.js} +250 -100
  4. package/dist/chunk-PRN4AEAM.js.map +1 -0
  5. package/dist/{client-K0ShmsC7.d.ts → client-DO5HTb_L.d.ts} +690 -143
  6. package/dist/client.d.ts +1 -1
  7. package/dist/client.js +7 -1
  8. package/dist/custom.js +4 -4
  9. package/dist/custom.js.map +1 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +8 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/schemas.d.ts +686 -73
  14. package/dist/schemas.js +41 -5
  15. package/openapi.json +1486 -521
  16. package/openapi.yaml +1016 -350
  17. package/package.json +1 -1
  18. package/spec/components/errors.yaml +30 -1
  19. package/spec/components/schemas/common.yaml +6 -0
  20. package/spec/components/schemas/errors-api.yaml +66 -3
  21. package/spec/components/schemas/experiment-api-row.yaml +293 -0
  22. package/spec/components/schemas/experiments.yaml +54 -299
  23. package/spec/components/schemas/gates.yaml +19 -0
  24. package/spec/components/schemas/keys.yaml +2 -1
  25. package/spec/components/schemas/metrics.yaml +17 -17
  26. package/spec/components/schemas/ops.yaml +101 -0
  27. package/spec/components/schemas/projects.yaml +119 -1
  28. package/spec/components/schemas/universes.yaml +83 -1
  29. package/spec/openapi.yaml +14 -0
  30. package/spec/paths/alert-rules.yaml +1 -0
  31. package/spec/paths/configs.yaml +1 -0
  32. package/spec/paths/errors.yaml +96 -2
  33. package/spec/paths/events.yaml +1 -0
  34. package/spec/paths/experiments.yaml +8 -0
  35. package/spec/paths/gates.yaml +1 -0
  36. package/spec/paths/keys.yaml +1 -0
  37. package/spec/paths/killswitches.yaml +1 -0
  38. package/spec/paths/metrics.yaml +1 -0
  39. package/spec/paths/ops.yaml +111 -0
  40. package/spec/paths/projects.yaml +2 -2
  41. package/spec/paths/universes.yaml +1 -0
  42. package/dist/chunk-643YSMLU.js.map +0 -1
  43. package/dist/chunk-MRW3DJ57.js.map +0 -1
package/dist/client.d.ts CHANGED
@@ -1 +1 @@
1
- export { i as Client, k as Config, m as ConfigureOptions, L as CreateClientConfig, gM as Options, hh as RequestResult, kA as approveEvent, kB as client, kC as configure, kD as createAlertRule, kE as createAttribute, kF as createClient, kG as createClientConfig, kH as createConfig, kI as createConnector, kJ as createEvent, kK as createExperiment, kL as createGate, kM as createGateTemplate, kN as createI18nDraft, kO as createI18nProfile, kP as createKey, kQ as createKillswitch, kR as createMetric, kS as createOpsItem, kT as createTriggerConnector, kU as createUniverse, kV as deleteAlertRule, kW as deleteAttribute, kX as deleteConfig, kY as deleteConnector, kZ as deleteEvent, k_ as deleteExperiment, k$ as deleteGate, l0 as deleteGateTemplate, l1 as deleteKillswitch, l2 as deleteMetric, l3 as deleteUniverse, l4 as disableGate, l5 as discardConfigDraft, l6 as enableGate, l7 as fileErrorTicket, l8 as fireConnector, l9 as getAttribute, la as getConfig, lb as getConnector, lc as getCurrentProject, ld as getError, le as getErrorSeries, lf as getEvent, lg as getExperiment, lh as getExperimentResults, li as getExperimentTimeseries, lj as getGateTemplate, lk as getKillswitch, ll as getMetric, lm as getOpsItem, ln as linkPrToOpsItem, lo as listAlertRules, lp as listAttributes, lq as listConfigActivity, lr as listConfigs, ls as listConnectors, lt as listErrors, lu as listEvents, lv as listExperiments, lw as listGateTemplates, lx as listGates, ly as listI18nDrafts, lz as listI18nKeys, lA as listI18nProfiles, lB as listKeys, lC as listKillswitches, lD as listMetrics, lE as listOpsItems, lF as listSlackChannels, lG as listUniverses, lH as notifyOps, lI as publishConfigDraft, lJ as publishI18nProfile, lK as pushI18nKeys, lL as reanalyzeExperiment, lM as revokeKey, lN as saveConfigDraft, lO as searchResources, lP as setExperimentMetrics, lQ as setExperimentStatus, lR as setI18nLabel, lS as setKillswitchSwitch, lT as setKillswitchValue, lU as testConnector, lV as unsetKillswitchSwitch, lW as updateAlertRule, lX as updateAttribute, lY as updateConfig, lZ as updateConfigSchema, l_ as updateConnector, l$ as updateErrorStatus, m0 as updateEvent, m1 as updateExperiment, m2 as updateGate, m3 as updateGateTemplate, m4 as updateI18nDraft, m5 as updateI18nKey, m6 as updateKillswitch, m7 as updateMetric, m8 as updateOpsItem, m9 as updateProject, ma as updateTriggerConnector, mb as updateUniverse, mc as upsertProject } from './client-K0ShmsC7.js';
1
+ export { i as Client, k as Config, m as ConfigureOptions, L as CreateClientConfig, h0 as Options, hx as RequestResult, kX as approveEvent, kY as client, kZ as configure, k_ as createAlertRule, k$ as createAttribute, l0 as createClient, l1 as createClientConfig, l2 as createConfig, l3 as createConnector, l4 as createEvent, l5 as createExperiment, l6 as createGate, l7 as createGateTemplate, l8 as createI18nDraft, l9 as createI18nProfile, la as createKey, lb as createKillswitch, lc as createMetric, ld as createOpsComment, le as createOpsItem, lf as createTriggerConnector, lg as createUniverse, lh as deleteAlertRule, li as deleteAttribute, lj as deleteConfig, lk as deleteConnector, ll as deleteEvent, lm as deleteExperiment, ln as deleteGate, lo as deleteGateTemplate, lp as deleteKillswitch, lq as deleteMetric, lr as deleteUniverse, ls as disableGate, lt as discardConfigDraft, lu as enableGate, lv as fileErrorTicket, lw as fireConnector, lx as getAttribute, ly as getConfig, lz as getConnector, lA as getCurrentProject, lB as getError, lC as getErrorSeries, lD as getEvent, lE as getExperiment, lF as getExperimentResults, lG as getExperimentTimeseries, lH as getGateTemplate, lI as getKillswitch, lJ as getMetric, lK as getOpsItem, lL as linkPrToOpsItem, lM as listAlertRules, lN as listAttributes, lO as listConfigActivity, lP as listConfigs, lQ as listConnectors, lR as listErrors, lS as listEvents, lT as listExperiments, lU as listGateTemplates, lV as listGates, lW as listI18nDrafts, lX as listI18nKeys, lY as listI18nProfiles, lZ as listKeys, l_ as listKillswitches, l$ as listMetrics, m0 as listOpsComments, m1 as listOpsItems, m2 as listSlackChannels, m3 as listUniverses, m4 as notifyOps, m5 as publishConfigDraft, m6 as publishI18nProfile, m7 as pushI18nKeys, m8 as reanalyzeExperiment, m9 as resolveError, ma as revokeKey, mb as saveConfigDraft, mc as searchResources, md as setExperimentMetrics, me as setExperimentStatus, mf as setI18nLabel, mg as setKillswitchSwitch, mh as setKillswitchValue, mi as testConnector, mj as unsetKillswitchSwitch, mk as updateAlertRule, ml as updateAttribute, mm as updateConfig, mn as updateConfigSchema, mo as updateConnector, mp as updateErrorStatus, mq as updateEvent, mr as updateExperiment, ms as updateGate, mt as updateGateTemplate, mu as updateI18nDraft, mv as updateI18nKey, mw as updateKillswitch, mx as updateMetric, my as updateOpsItem, mz as updateProject, mA as updateTriggerConnector, mB as updateUniverse, mC as upsertProject } from './client-DO5HTb_L.js';
package/dist/client.js CHANGED
@@ -17,6 +17,7 @@ import {
17
17
  createKey,
18
18
  createKillswitch,
19
19
  createMetric,
20
+ createOpsComment,
20
21
  createOpsItem,
21
22
  createTriggerConnector,
22
23
  createUniverse,
@@ -67,6 +68,7 @@ import {
67
68
  listKeys,
68
69
  listKillswitches,
69
70
  listMetrics,
71
+ listOpsComments,
70
72
  listOpsItems,
71
73
  listSlackChannels,
72
74
  listUniverses,
@@ -75,6 +77,7 @@ import {
75
77
  publishI18nProfile,
76
78
  pushI18nKeys,
77
79
  reanalyzeExperiment,
80
+ resolveError,
78
81
  revokeKey,
79
82
  saveConfigDraft,
80
83
  searchResources,
@@ -104,7 +107,7 @@ import {
104
107
  updateTriggerConnector,
105
108
  updateUniverse,
106
109
  upsertProject
107
- } from "./chunk-643YSMLU.js";
110
+ } from "./chunk-LYNWK55D.js";
108
111
  export {
109
112
  approveEvent,
110
113
  client,
@@ -124,6 +127,7 @@ export {
124
127
  createKey,
125
128
  createKillswitch,
126
129
  createMetric,
130
+ createOpsComment,
127
131
  createOpsItem,
128
132
  createTriggerConnector,
129
133
  createUniverse,
@@ -174,6 +178,7 @@ export {
174
178
  listKeys,
175
179
  listKillswitches,
176
180
  listMetrics,
181
+ listOpsComments,
177
182
  listOpsItems,
178
183
  listSlackChannels,
179
184
  listUniverses,
@@ -182,6 +187,7 @@ export {
182
187
  publishI18nProfile,
183
188
  pushI18nKeys,
184
189
  reanalyzeExperiment,
190
+ resolveError,
185
191
  revokeKey,
186
192
  saveConfigDraft,
187
193
  searchResources,
package/dist/custom.js CHANGED
@@ -134,10 +134,10 @@ var opId = (op) => [...op.group, op.name].join(".");
134
134
 
135
135
  // src/custom/docs.ts
136
136
  var SDK_REPOS = {
137
- typescript: { owner: "shipeasy-ai", repo: "sdk" },
138
- javascript: { owner: "shipeasy-ai", repo: "sdk" },
139
- node: { owner: "shipeasy-ai", repo: "sdk" },
140
- ts: { owner: "shipeasy-ai", repo: "sdk" },
137
+ typescript: { owner: "shipeasy-ai", repo: "sdk-ts" },
138
+ javascript: { owner: "shipeasy-ai", repo: "sdk-ts" },
139
+ node: { owner: "shipeasy-ai", repo: "sdk-ts" },
140
+ ts: { owner: "shipeasy-ai", repo: "sdk-ts" },
141
141
  python: { owner: "shipeasy-ai", repo: "sdk-python" },
142
142
  go: { owner: "shipeasy-ai", repo: "sdk-go" },
143
143
  java: { owner: "shipeasy-ai", repo: "sdk-java" },
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/custom/grammar.ts","../src/custom/types.ts","../src/custom/docs.ts","../src/custom/index.ts"],"sourcesContent":["import type { CustomOp } from \"./types.js\";\n\n/**\n * The Shipeasy metric query DSL grammar — printed by `shipeasy metrics grammar`\n * / the `metrics_grammar` MCP tool.\n *\n * This is the one-stop reference for both humans and AI agents that need to\n * author a `metrics create --query \"...\"` string. It is intentionally\n * self-contained: the formal grammar (precise, for machine parsing), a full\n * aggregation reference (semantics + value-label rules + experiment behaviour),\n * the selector/filter/group-by rules, hard constraints, and glossed examples.\n * Keep it in sync with the parser (`cli/src/query-dsl/parse.ts`) and the IR\n * (`cli/src/query-dsl/ir.ts`) — they are the source of truth for semantics.\n */\nexport const METRIC_GRAMMAR = `SHIPEASY METRIC QUERY DSL\n=========================\n\nA metric is ONE aggregation over ONE event stream. This DSL is the string you\npass to \\`metrics create --query \"...\"\\` (equivalently the typed \\`query_ir\\`).\nThere is no arithmetic, no formulas across events, no subqueries — one event\nselector, one aggregation, an optional group-by.\n\n\nGRAMMAR (BNF)\n-------------\n Query := AggFunc \"(\" Selector (\",\" Identifier)? \")\" GroupBy?\n AggFunc := \"count_users\" | \"count\" | \"sum\" | \"avg\" | \"min\" | \"max\"\n | \"unique\" | \"p50\" | \"p75\" | \"p90\" | \"p95\" | \"p99\" | \"p999\"\n | \"retention_\" <N> \"d\" (N = 1..90)\n Selector := Identifier (\"{\" Filter (\",\" Filter)* \",\"? \"}\")?\n Filter := Identifier MatchOp StringLiteral\n MatchOp := \"=\" | \"!=\" | \"=~\" | \"!~\"\n GroupBy := (\"by\" | \"without\") \"(\" Identifier (\",\" Identifier)* \",\"? \")\"\n StringLiteral := double-quoted; \\\\\" is a literal quote, \\\\\\\\ is a backslash\n Identifier := [A-Za-z_][A-Za-z0-9_]* (case-sensitive)\n\n The trailing Identifier after the selector — \"(\" Selector \",\" Identifier \")\" —\n is the VALUE LABEL: the numeric event label the aggregation reduces. Whether it\n is required, optional, or forbidden depends on the aggregation (see below).\n\n\nAGGREGATIONS\n------------\n Function Value label Meaning In experiments\n -------------- ------------ ------------------------------ ---------------\n count_users forbidden distinct users who fired it exact\n count forbidden number of events (rows) exact\n sum(e, v) required Σ of numeric label v exact\n avg(e, v) required mean of label v exact\n retention_Nd(e) forbidden % of users who returned exact\n within N days (N = 1..90)\n min(e, v) required minimum of label v approx → avg *\n max(e, v) required maximum of label v approx → avg *\n unique(e, v) required distinct values of label v approx → avg *\n p50 … p999(e,v) required quantile of v (50/75/90/ approx → avg *\n 95/99/99.9th percentile)\n\n * Display-only aggregations. The experiment t-test needs a per-user mean and\n variance, so min/max/unique/quantile are computed exactly on dashboards but\n collapse to a per-user \\`avg\\` when used as an experiment metric. If you need\n an exact experiment metric, pick count_users / count / sum / avg / retention.\n\n \"count\" is the DSL spelling of the internal count_events (one per matching\n row); \"count_users\" is unique-by-user. Getting these two confused is the most\n common mistake — count double-counts a user who fired the event twice.\n\n\nSELECTOR & FILTERS\n------------------\n The selector is the event name plus an optional \\`{ ... }\\` filter set that\n narrows which events count. Each filter compares an event LABEL to a quoted\n string:\n\n = equal != not equal\n =~ regex match !~ regex NOT match\n\n - Values are ALWAYS double-quoted strings, even for numeric labels — they are\n coerced on the server (\\`amount=~\"^1[0-9]$\"\\`, \\`status=\"200\"\\`).\n - Multiple filters are AND-ed: \\`{country=\"US\", tier!=\"free\"}\\`.\n - Every filter label AND the value label must be a label DECLARED on the source\n event. Undeclared labels are a validation error, not a silent no-match.\n\n\nGROUP-BY\n--------\n Splits the result into one series per label combination.\n by (a, b) one series per distinct (a, b) — keep only these labels\n without (a, b) group by all declared labels EXCEPT a, b\n\n NOTE: group-by is a DASHBOARD-only feature. In an experiment the group-by is\n ignored — a per-user reducer is applied across the whole arm instead.\n\n\nNOT SUPPORTED (will fail to parse)\n----------------------------------\n - arithmetic / ratios / formulas: \\`count(a) / count(b)\\`\n - more than one event per query\n - arbitrary quantiles (only the fixed p50/p75/p90/p95/p99/p999)\n - unquoted or numeric filter values: \\`{status=200}\\` → must be \\`\"200\"\\`\n - trailing tokens after the query\n\n\nEXAMPLES (query — what it measures)\n--------------------------------------\n count_users(checkout_completed)\n distinct users who completed checkout.\n\n count(add_to_cart{country=\"US\"})\n number of US add-to-cart events (a user can count many times).\n\n sum(purchase{country=\"US\"}, amount)\n total purchase amount from US purchase events.\n\n avg(req_dur{tier!=\"free\"}, ms) without (region)\n mean request duration for non-free tiers, one series per region-excluded\n label combination.\n\n p99(req_dur{route=~\"/api/.*\"}, ms) by (route, status)\n 99th-percentile latency of /api/* requests, split by route and status.\n\n unique(login{method=\"sso\"}, device_id)\n distinct SSO devices seen (display-only; an experiment would use per-user avg).\n\n retention_7d(session_start)\n share of users who started a new session within 7 days.\n`;\n\nexport const grammarOp: CustomOp = {\n group: [\"metrics\"],\n name: \"grammar\",\n summary: \"Print the metric query DSL grammar\",\n description:\n \"Print the full metric query DSL reference — grammar, aggregation semantics, \" +\n \"filter/group-by rules, and glossed examples — used to author `metrics create --query`.\",\n params: [],\n examples: [{ run: \"shipeasy metrics grammar\" }],\n run: () => ({ grammar: METRIC_GRAMMAR }),\n};\n","/**\n * The custom-operations registry — hand-written operations that are NOT admin\n * API endpoints (so they can't be generated from the spec): the metric-DSL\n * grammar (pure) and the SDK-docs fetcher (outbound `fetch` to GitHub Pages).\n *\n * It mirrors the old operations registry in spirit, but is deliberately tiny and\n * framework-agnostic: each `CustomOp` carries its command path, params, and a\n * self-contained `run`. Both consumers project it with a thin adapter — the CLI\n * (`commands/custom.ts`) and, later, the MCP server — so the surface stays in\n * sync across them. `run` never touches the filesystem, so it's worker-safe.\n */\nexport type CustomParamType = \"string\" | \"number\" | \"boolean\";\n\nexport interface CustomParam {\n name: string;\n type: CustomParamType;\n description?: string;\n required?: boolean;\n /** Render as a positional CLI argument (vs a `--flag`). */\n positional?: boolean;\n enum?: string[];\n}\n\nexport interface CustomOp {\n /** Command path, e.g. `[\"docs\"]` → `shipeasy docs <name>`, `[\"metrics\"]` → `metrics <name>`. */\n group: string[];\n /** Verb. */\n name: string;\n summary: string;\n description?: string;\n params: CustomParam[];\n examples?: { note?: string; run: string }[];\n /** Self-contained handler. `args` are the coerced param values. */\n run: (args: Record<string, unknown>) => Promise<unknown> | unknown;\n}\n\n/**\n * Group-level help for a custom-op command group (e.g. `docs`). Mirrors what an\n * OpenAPI tag carries for the generated tree — a short `summary` (shown in the\n * parent `--help` list) and a long `description` (shown on the group's own\n * `--help`). Consumers look this up by `group` path when creating the group so a\n * custom group reads as richly as a spec-backed one, instead of the bare\n * `\"<name> commands\"` fallback.\n */\nexport interface CustomGroup {\n /** Group path, e.g. `[\"docs\"]`. */\n group: string[];\n summary: string;\n description?: string;\n aliases?: string[];\n}\n\n/** Thrown by a custom op for a user-facing error with an HTTP-ish status. */\nexport class CustomOpError extends Error {\n constructor(\n message: string,\n public status = 400,\n ) {\n super(message);\n this.name = \"CustomOpError\";\n }\n}\n\nexport const opId = (op: CustomOp): string => [...op.group, op.name].join(\".\");\n","import { type CustomOp, CustomOpError } from \"./types.js\";\n\n/**\n * SDK-docs operations — `docs list/get/skill`. A generic fetcher over each SDK\n * repo's `/docs/` folder published to plain GitHub Pages (latest only, no\n * backend, no version arg). The `run`s do outbound `fetch` (worker-safe — not\n * the fs/AST boundary) and fall back to a built-in default doc set for repos\n * that haven't adopted the doc standard yet.\n */\nconst SDK_REPOS: Record<string, { owner: string; repo: string }> = {\n typescript: { owner: \"shipeasy-ai\", repo: \"sdk\" },\n javascript: { owner: \"shipeasy-ai\", repo: \"sdk\" },\n node: { owner: \"shipeasy-ai\", repo: \"sdk\" },\n ts: { owner: \"shipeasy-ai\", repo: \"sdk\" },\n python: { owner: \"shipeasy-ai\", repo: \"sdk-python\" },\n go: { owner: \"shipeasy-ai\", repo: \"sdk-go\" },\n java: { owner: \"shipeasy-ai\", repo: \"sdk-java\" },\n kotlin: { owner: \"shipeasy-ai\", repo: \"sdk-kotlin\" },\n php: { owner: \"shipeasy-ai\", repo: \"sdk-php\" },\n swift: { owner: \"shipeasy-ai\", repo: \"sdk-swift\" },\n ruby: { owner: \"shipeasy-ai\", repo: \"sdk-ruby\" },\n};\nconst SDK_ENUM = Object.keys(SDK_REPOS);\n\ninterface DocManifest {\n schemaVersion: number;\n sdk: string;\n placeholders?: string[];\n skill?: string;\n pages?: Record<string, string>;\n snippets?: Record<string, Record<string, string>>;\n}\n\nconst DEFAULT_MANIFEST: DocManifest = {\n schemaVersion: 2,\n sdk: \"default\",\n placeholders: [\"RESOURCE_NAME\"],\n skill: \"skill/SKILL.md\",\n pages: { overview: \"pages/overview.md\", installation: \"pages/installation.md\" },\n snippets: { release: { flags: \"snippets/release/flags.md\" } },\n};\nconst DEFAULT_CONTENT: Record<string, string> = {\n \"pages/overview.md\":\n \"# Shipeasy SDK\\n\\nThis SDK has not published its `/docs/` folder yet. See https://docs.shipeasy.ai for the full reference.\",\n \"pages/installation.md\":\n \"# Installation\\n\\nInstall the Shipeasy SDK for your language, then call `shipeasy({ serverKey })` (server) or `shipeasy({ clientKey })` (browser).\",\n \"snippets/release/flags.md\": \"```\\nconst on = await client.checkGate(user, '{{RESOURCE_NAME}}');\\n```\",\n \"skill/SKILL.md\":\n \"---\\nname: shipeasy-sdk\\ndescription: Use the Shipeasy SDK for flags, experiments, configs, and i18n.\\n---\\n\\nThis SDK has not published a skill yet. See https://docs.shipeasy.ai.\",\n};\n\n/**\n * Resolve the caller-supplied `sdk`. The adapters (CLI/MCP) default it from the\n * nearest `.shipeasy` before we get here, so an empty value means neither a flag\n * nor a bound project supplied one — surface that explicitly.\n */\nfunction requireSdk(sdk: unknown): string {\n const s = typeof sdk === \"string\" ? sdk.trim() : \"\";\n if (!s)\n throw new CustomOpError(\n `No SDK given and none recorded in .shipeasy. Pass --sdk <lang> (one of: ${SDK_ENUM.join(\", \")}), ` +\n `or run \\`shipeasy detect\\` in the project to record its sdk.`,\n 400,\n );\n return s;\n}\nfunction repoFor(sdk: string): { owner: string; repo: string } {\n const r = SDK_REPOS[sdk.toLowerCase()];\n if (!r) throw new CustomOpError(`Unknown SDK '${sdk}'. One of: ${SDK_ENUM.join(\", \")}`, 400);\n return r;\n}\nfunction pagesBase(sdk: string): string {\n const { owner, repo } = repoFor(sdk);\n return `https://${owner}.github.io/${repo}`;\n}\nasync function fetchText(url: string): Promise<string | null> {\n const res = await fetch(url);\n if (!res.ok) return null;\n return res.text();\n}\nasync function loadManifest(sdk: string): Promise<{ manifest: DocManifest; fallback: boolean }> {\n const text = await fetchText(`${pagesBase(sdk)}/manifest.json`);\n if (!text) return { manifest: DEFAULT_MANIFEST, fallback: true };\n try {\n return { manifest: JSON.parse(text) as DocManifest, fallback: false };\n } catch {\n return { manifest: DEFAULT_MANIFEST, fallback: true };\n }\n}\nfunction resolvePath(manifest: DocManifest, handle: string): string {\n if (handle.endsWith(\".md\")) return handle;\n if (manifest.pages?.[handle]) return manifest.pages[handle];\n if (handle.includes(\"/\")) {\n const [group, resource] = handle.split(\"/\", 2);\n const p = manifest.snippets?.[group]?.[resource];\n if (p) return p;\n }\n throw new CustomOpError(\n `Doc '${handle}' not found. Run 'docs list --sdk <lang>' to see available pages and snippets.`,\n 404,\n );\n}\nfunction substitute(body: string, manifest: DocManifest, args: Record<string, unknown>): string {\n let out = body;\n for (const ph of manifest.placeholders ?? []) {\n const value =\n (args[ph] as string | undefined) ??\n (ph === \"RESOURCE_NAME\" ? (args.name as string | undefined) : undefined) ??\n (ph === \"FRAMEWORK\" ? (args.framework as string | undefined) : undefined);\n if (value !== undefined) out = out.replaceAll(`{{${ph}}}`, value);\n }\n return out;\n}\n\nexport const docsOps: CustomOp[] = [\n {\n group: [\"docs\"],\n name: \"list\",\n summary: \"List an SDK's documentation tree\",\n description:\n \"Fetch an SDK's `/docs/manifest.json` and return the doc tree — feature pages, nested snippet groups, and whether an installable skill exists.\",\n params: [{ name: \"sdk\", type: \"string\", description: \"SDK language. Defaults to the `sdk` recorded in the nearest `.shipeasy` when omitted.\", required: false, enum: SDK_ENUM }],\n examples: [{ run: \"shipeasy docs list --sdk python\" }],\n run: async (args) => {\n const sdk = requireSdk(args.sdk);\n const { manifest, fallback } = await loadManifest(sdk);\n return {\n sdk,\n fallback,\n pages: Object.keys(manifest.pages ?? {}),\n snippets: Object.fromEntries(\n Object.entries(manifest.snippets ?? {}).map(([g, r]) => [g, Object.keys(r)]),\n ),\n skill: Boolean(manifest.skill),\n };\n },\n },\n {\n group: [\"docs\"],\n name: \"get\",\n summary: \"Fetch one SDK doc page or snippet\",\n description:\n \"Fetch one feature page (`flags`, `experiments`, …) or nested snippet (`release/experiments`, …), substituting declared {{placeholders}} from caller args.\",\n params: [\n { name: \"sdk\", type: \"string\", description: \"SDK language. Defaults to the `sdk` recorded in the nearest `.shipeasy` when omitted.\", required: false, enum: SDK_ENUM },\n { name: \"path\", type: \"string\", description: \"Page key or snippet 'group/resource'.\", required: true, positional: true },\n { name: \"framework\", type: \"string\", description: \"Framework hint (substitutes {{FRAMEWORK}}).\" },\n { name: \"name\", type: \"string\", description: \"Resource name (substitutes {{RESOURCE_NAME}}).\" },\n ],\n examples: [\n { note: \"A feature page\", run: \"shipeasy docs get --sdk python experiments\" },\n { note: \"A nested snippet\", run: \"shipeasy docs get --sdk typescript release/flags --name checkout_v2\" },\n ],\n run: async (args) => {\n const sdk = requireSdk(args.sdk);\n const { manifest, fallback } = await loadManifest(sdk);\n const path = resolvePath(manifest, args.path as string);\n const body = fallback ? DEFAULT_CONTENT[path] : ((await fetchText(`${pagesBase(sdk)}/${path}`)) ?? undefined);\n if (body === undefined) throw new CustomOpError(`Doc '${path}' could not be fetched for '${sdk}'.`, 404);\n return { sdk, path, fallback, content: substitute(body, manifest, args) };\n },\n },\n {\n group: [\"docs\"],\n name: \"skill\",\n summary: \"Fetch an SDK's installable LLM skill\",\n description:\n \"Fetch the SDK's `skill/SKILL.md` (frontmatter intact) so an agent can install it verbatim. The CLI `--install` writes it locally (a consumer fs side-effect).\",\n params: [\n { name: \"sdk\", type: \"string\", description: \"SDK language. Defaults to the `sdk` recorded in the nearest `.shipeasy` when omitted.\", required: false, enum: SDK_ENUM },\n { name: \"install\", type: \"boolean\", description: \"CLI only: write the skill to the local agent skills dir.\" },\n ],\n examples: [{ run: \"shipeasy docs skill --sdk python\" }],\n run: async (args) => {\n const sdk = requireSdk(args.sdk);\n const { manifest, fallback } = await loadManifest(sdk);\n const skillPath = manifest.skill ?? \"skill/SKILL.md\";\n const content = fallback ? DEFAULT_CONTENT[skillPath] : ((await fetchText(`${pagesBase(sdk)}/${skillPath}`)) ?? undefined);\n if (content === undefined) throw new CustomOpError(`No skill published for '${sdk}'.`, 404);\n return { sdk, skillPath, fallback, content };\n },\n },\n];\n","import { grammarOp } from \"./grammar.js\";\nimport { docsOps } from \"./docs.js\";\nimport type { CustomOp, CustomGroup } from \"./types.js\";\n\nexport type { CustomOp, CustomGroup, CustomParam, CustomParamType } from \"./types.js\";\nexport { CustomOpError, opId } from \"./types.js\";\nexport { METRIC_GRAMMAR } from \"./grammar.js\";\n\n/**\n * Every custom (non-spec) operation, in surface order. The CLI and MCP each\n * project this with a thin adapter so the sugar commands stay in sync.\n */\nexport const customOperations: CustomOp[] = [grammarOp, ...docsOps];\n\n/**\n * Group-level help for custom-op groups that aren't backed by an OpenAPI tag.\n * `metrics` is a spec tag (its group is created — and described — by the\n * generated tree), so only `docs` needs an entry here; without it the CLI would\n * label the group the bare `\"docs commands\"`.\n */\nexport const customGroups: CustomGroup[] = [\n {\n group: [\"docs\"],\n summary:\n \"SDK docs: fetch a language SDK's published docs — its page tree, feature pages, code snippets, and installable agent skill.\",\n description:\n \"SDK docs — a read-only fetcher over each language SDK's `/docs/` folder, \" +\n \"published to plain GitHub Pages (latest only; no backend, no version arg). \" +\n \"Point it at an SDK with `--sdk <lang>` (one of: typescript, python, go, \" +\n \"java, kotlin, php, swift, ruby) or let it default to the `sdk` recorded in \" +\n \"the nearest `.shipeasy`.\\n\\n\" +\n \"**Commands.**\\n\" +\n \"- `list` — the SDK's doc tree: feature pages, nested snippet groups, and whether an installable skill exists.\\n\" +\n \"- `get <path>` — one feature page (`flags`, `experiments`, …) or nested snippet (`release/flags`), with `{{placeholders}}` substituted from `--name`/`--framework`.\\n\" +\n \"- `skill` — the SDK's installable LLM skill (`SKILL.md`); `--install` writes it into your agent's skills dir.\\n\\n\" +\n \"SDKs that haven't adopted the doc standard yet fall back to a built-in \" +\n \"default doc set, flagged `fallback: true` in the output.\",\n },\n];\n"],"mappings":";AAcO,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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esContent":["import type { CustomOp } from \"./types.js\";\n\n/**\n * The Shipeasy metric query DSL grammar — printed by `shipeasy metrics grammar`\n * / the `metrics_grammar` MCP tool.\n *\n * This is the one-stop reference for both humans and AI agents that need to\n * author a `metrics create --query \"...\"` string. It is intentionally\n * self-contained: the formal grammar (precise, for machine parsing), a full\n * aggregation reference (semantics + value-label rules + experiment behaviour),\n * the selector/filter/group-by rules, hard constraints, and glossed examples.\n * Keep it in sync with the parser (`cli/src/query-dsl/parse.ts`) and the IR\n * (`cli/src/query-dsl/ir.ts`) — they are the source of truth for semantics.\n */\nexport const METRIC_GRAMMAR = `SHIPEASY METRIC QUERY DSL\n=========================\n\nA metric is ONE aggregation over ONE event stream. This DSL is the string you\npass to \\`metrics create --query \"...\"\\` (equivalently the typed \\`query_ir\\`).\nThere is no arithmetic, no formulas across events, no subqueries — one event\nselector, one aggregation, an optional group-by.\n\n\nGRAMMAR (BNF)\n-------------\n Query := AggFunc \"(\" Selector (\",\" Identifier)? \")\" GroupBy?\n AggFunc := \"count_users\" | \"count\" | \"sum\" | \"avg\" | \"min\" | \"max\"\n | \"unique\" | \"p50\" | \"p75\" | \"p90\" | \"p95\" | \"p99\" | \"p999\"\n | \"retention_\" <N> \"d\" (N = 1..90)\n Selector := Identifier (\"{\" Filter (\",\" Filter)* \",\"? \"}\")?\n Filter := Identifier MatchOp StringLiteral\n MatchOp := \"=\" | \"!=\" | \"=~\" | \"!~\"\n GroupBy := (\"by\" | \"without\") \"(\" Identifier (\",\" Identifier)* \",\"? \")\"\n StringLiteral := double-quoted; \\\\\" is a literal quote, \\\\\\\\ is a backslash\n Identifier := [A-Za-z_][A-Za-z0-9_]* (case-sensitive)\n\n The trailing Identifier after the selector — \"(\" Selector \",\" Identifier \")\" —\n is the VALUE LABEL: the numeric event label the aggregation reduces. Whether it\n is required, optional, or forbidden depends on the aggregation (see below).\n\n\nAGGREGATIONS\n------------\n Function Value label Meaning In experiments\n -------------- ------------ ------------------------------ ---------------\n count_users forbidden distinct users who fired it exact\n count forbidden number of events (rows) exact\n sum(e, v) required Σ of numeric label v exact\n avg(e, v) required mean of label v exact\n retention_Nd(e) forbidden % of users who returned exact\n within N days (N = 1..90)\n min(e, v) required minimum of label v approx → avg *\n max(e, v) required maximum of label v approx → avg *\n unique(e, v) required distinct values of label v approx → avg *\n p50 … p999(e,v) required quantile of v (50/75/90/ approx → avg *\n 95/99/99.9th percentile)\n\n * Display-only aggregations. The experiment t-test needs a per-user mean and\n variance, so min/max/unique/quantile are computed exactly on dashboards but\n collapse to a per-user \\`avg\\` when used as an experiment metric. If you need\n an exact experiment metric, pick count_users / count / sum / avg / retention.\n\n \"count\" is the DSL spelling of the internal count_events (one per matching\n row); \"count_users\" is unique-by-user. Getting these two confused is the most\n common mistake — count double-counts a user who fired the event twice.\n\n\nSELECTOR & FILTERS\n------------------\n The selector is the event name plus an optional \\`{ ... }\\` filter set that\n narrows which events count. Each filter compares an event LABEL to a quoted\n string:\n\n = equal != not equal\n =~ regex match !~ regex NOT match\n\n - Values are ALWAYS double-quoted strings, even for numeric labels — they are\n coerced on the server (\\`amount=~\"^1[0-9]$\"\\`, \\`status=\"200\"\\`).\n - Multiple filters are AND-ed: \\`{country=\"US\", tier!=\"free\"}\\`.\n - Every filter label AND the value label must be a label DECLARED on the source\n event. Undeclared labels are a validation error, not a silent no-match.\n\n\nGROUP-BY\n--------\n Splits the result into one series per label combination.\n by (a, b) one series per distinct (a, b) — keep only these labels\n without (a, b) group by all declared labels EXCEPT a, b\n\n NOTE: group-by is a DASHBOARD-only feature. In an experiment the group-by is\n ignored — a per-user reducer is applied across the whole arm instead.\n\n\nNOT SUPPORTED (will fail to parse)\n----------------------------------\n - arithmetic / ratios / formulas: \\`count(a) / count(b)\\`\n - more than one event per query\n - arbitrary quantiles (only the fixed p50/p75/p90/p95/p99/p999)\n - unquoted or numeric filter values: \\`{status=200}\\` → must be \\`\"200\"\\`\n - trailing tokens after the query\n\n\nEXAMPLES (query — what it measures)\n--------------------------------------\n count_users(checkout_completed)\n distinct users who completed checkout.\n\n count(add_to_cart{country=\"US\"})\n number of US add-to-cart events (a user can count many times).\n\n sum(purchase{country=\"US\"}, amount)\n total purchase amount from US purchase events.\n\n avg(req_dur{tier!=\"free\"}, ms) without (region)\n mean request duration for non-free tiers, one series per region-excluded\n label combination.\n\n p99(req_dur{route=~\"/api/.*\"}, ms) by (route, status)\n 99th-percentile latency of /api/* requests, split by route and status.\n\n unique(login{method=\"sso\"}, device_id)\n distinct SSO devices seen (display-only; an experiment would use per-user avg).\n\n retention_7d(session_start)\n share of users who started a new session within 7 days.\n`;\n\nexport const grammarOp: CustomOp = {\n group: [\"metrics\"],\n name: \"grammar\",\n summary: \"Print the metric query DSL grammar\",\n description:\n \"Print the full metric query DSL reference — grammar, aggregation semantics, \" +\n \"filter/group-by rules, and glossed examples — used to author `metrics create --query`.\",\n params: [],\n examples: [{ run: \"shipeasy metrics grammar\" }],\n run: () => ({ grammar: METRIC_GRAMMAR }),\n};\n","/**\n * The custom-operations registry — hand-written operations that are NOT admin\n * API endpoints (so they can't be generated from the spec): the metric-DSL\n * grammar (pure) and the SDK-docs fetcher (outbound `fetch` to GitHub Pages).\n *\n * It mirrors the old operations registry in spirit, but is deliberately tiny and\n * framework-agnostic: each `CustomOp` carries its command path, params, and a\n * self-contained `run`. Both consumers project it with a thin adapter — the CLI\n * (`commands/custom.ts`) and, later, the MCP server — so the surface stays in\n * sync across them. `run` never touches the filesystem, so it's worker-safe.\n */\nexport type CustomParamType = \"string\" | \"number\" | \"boolean\";\n\nexport interface CustomParam {\n name: string;\n type: CustomParamType;\n description?: string;\n required?: boolean;\n /** Render as a positional CLI argument (vs a `--flag`). */\n positional?: boolean;\n enum?: string[];\n}\n\nexport interface CustomOp {\n /** Command path, e.g. `[\"docs\"]` → `shipeasy docs <name>`, `[\"metrics\"]` → `metrics <name>`. */\n group: string[];\n /** Verb. */\n name: string;\n summary: string;\n description?: string;\n params: CustomParam[];\n examples?: { note?: string; run: string }[];\n /** Self-contained handler. `args` are the coerced param values. */\n run: (args: Record<string, unknown>) => Promise<unknown> | unknown;\n}\n\n/**\n * Group-level help for a custom-op command group (e.g. `docs`). Mirrors what an\n * OpenAPI tag carries for the generated tree — a short `summary` (shown in the\n * parent `--help` list) and a long `description` (shown on the group's own\n * `--help`). Consumers look this up by `group` path when creating the group so a\n * custom group reads as richly as a spec-backed one, instead of the bare\n * `\"<name> commands\"` fallback.\n */\nexport interface CustomGroup {\n /** Group path, e.g. `[\"docs\"]`. */\n group: string[];\n summary: string;\n description?: string;\n aliases?: string[];\n}\n\n/** Thrown by a custom op for a user-facing error with an HTTP-ish status. */\nexport class CustomOpError extends Error {\n constructor(\n message: string,\n public status = 400,\n ) {\n super(message);\n this.name = \"CustomOpError\";\n }\n}\n\nexport const opId = (op: CustomOp): string => [...op.group, op.name].join(\".\");\n","import { type CustomOp, CustomOpError } from \"./types.js\";\n\n/**\n * SDK-docs operations — `docs list/get/skill`. A generic fetcher over each SDK\n * repo's `/docs/` folder published to plain GitHub Pages (latest only, no\n * backend, no version arg). The `run`s do outbound `fetch` (worker-safe — not\n * the fs/AST boundary) and fall back to a built-in default doc set for repos\n * that haven't adopted the doc standard yet.\n */\nconst SDK_REPOS: Record<string, { owner: string; repo: string }> = {\n typescript: { owner: \"shipeasy-ai\", repo: \"sdk-ts\" },\n javascript: { owner: \"shipeasy-ai\", repo: \"sdk-ts\" },\n node: { owner: \"shipeasy-ai\", repo: \"sdk-ts\" },\n ts: { owner: \"shipeasy-ai\", repo: \"sdk-ts\" },\n python: { owner: \"shipeasy-ai\", repo: \"sdk-python\" },\n go: { owner: \"shipeasy-ai\", repo: \"sdk-go\" },\n java: { owner: \"shipeasy-ai\", repo: \"sdk-java\" },\n kotlin: { owner: \"shipeasy-ai\", repo: \"sdk-kotlin\" },\n php: { owner: \"shipeasy-ai\", repo: \"sdk-php\" },\n swift: { owner: \"shipeasy-ai\", repo: \"sdk-swift\" },\n ruby: { owner: \"shipeasy-ai\", repo: \"sdk-ruby\" },\n};\nconst SDK_ENUM = Object.keys(SDK_REPOS);\n\ninterface DocManifest {\n schemaVersion: number;\n sdk: string;\n placeholders?: string[];\n skill?: string;\n pages?: Record<string, string>;\n snippets?: Record<string, Record<string, string>>;\n}\n\nconst DEFAULT_MANIFEST: DocManifest = {\n schemaVersion: 2,\n sdk: \"default\",\n placeholders: [\"RESOURCE_NAME\"],\n skill: \"skill/SKILL.md\",\n pages: { overview: \"pages/overview.md\", installation: \"pages/installation.md\" },\n snippets: { release: { flags: \"snippets/release/flags.md\" } },\n};\nconst DEFAULT_CONTENT: Record<string, string> = {\n \"pages/overview.md\":\n \"# Shipeasy SDK\\n\\nThis SDK has not published its `/docs/` folder yet. See https://docs.shipeasy.ai for the full reference.\",\n \"pages/installation.md\":\n \"# Installation\\n\\nInstall the Shipeasy SDK for your language, then call `shipeasy({ serverKey })` (server) or `shipeasy({ clientKey })` (browser).\",\n \"snippets/release/flags.md\": \"```\\nconst on = await client.checkGate(user, '{{RESOURCE_NAME}}');\\n```\",\n \"skill/SKILL.md\":\n \"---\\nname: shipeasy-sdk\\ndescription: Use the Shipeasy SDK for flags, experiments, configs, and i18n.\\n---\\n\\nThis SDK has not published a skill yet. See https://docs.shipeasy.ai.\",\n};\n\n/**\n * Resolve the caller-supplied `sdk`. The adapters (CLI/MCP) default it from the\n * nearest `.shipeasy` before we get here, so an empty value means neither a flag\n * nor a bound project supplied one — surface that explicitly.\n */\nfunction requireSdk(sdk: unknown): string {\n const s = typeof sdk === \"string\" ? sdk.trim() : \"\";\n if (!s)\n throw new CustomOpError(\n `No SDK given and none recorded in .shipeasy. Pass --sdk <lang> (one of: ${SDK_ENUM.join(\", \")}), ` +\n `or run \\`shipeasy detect\\` in the project to record its sdk.`,\n 400,\n );\n return s;\n}\nfunction repoFor(sdk: string): { owner: string; repo: string } {\n const r = SDK_REPOS[sdk.toLowerCase()];\n if (!r) throw new CustomOpError(`Unknown SDK '${sdk}'. One of: ${SDK_ENUM.join(\", \")}`, 400);\n return r;\n}\nfunction pagesBase(sdk: string): string {\n const { owner, repo } = repoFor(sdk);\n return `https://${owner}.github.io/${repo}`;\n}\nasync function fetchText(url: string): Promise<string | null> {\n const res = await fetch(url);\n if (!res.ok) return null;\n return res.text();\n}\nasync function loadManifest(sdk: string): Promise<{ manifest: DocManifest; fallback: boolean }> {\n const text = await fetchText(`${pagesBase(sdk)}/manifest.json`);\n if (!text) return { manifest: DEFAULT_MANIFEST, fallback: true };\n try {\n return { manifest: JSON.parse(text) as DocManifest, fallback: false };\n } catch {\n return { manifest: DEFAULT_MANIFEST, fallback: true };\n }\n}\nfunction resolvePath(manifest: DocManifest, handle: string): string {\n if (handle.endsWith(\".md\")) return handle;\n if (manifest.pages?.[handle]) return manifest.pages[handle];\n if (handle.includes(\"/\")) {\n const [group, resource] = handle.split(\"/\", 2);\n const p = manifest.snippets?.[group]?.[resource];\n if (p) return p;\n }\n throw new CustomOpError(\n `Doc '${handle}' not found. Run 'docs list --sdk <lang>' to see available pages and snippets.`,\n 404,\n );\n}\nfunction substitute(body: string, manifest: DocManifest, args: Record<string, unknown>): string {\n let out = body;\n for (const ph of manifest.placeholders ?? []) {\n const value =\n (args[ph] as string | undefined) ??\n (ph === \"RESOURCE_NAME\" ? (args.name as string | undefined) : undefined) ??\n (ph === \"FRAMEWORK\" ? (args.framework as string | undefined) : undefined);\n if (value !== undefined) out = out.replaceAll(`{{${ph}}}`, value);\n }\n return out;\n}\n\nexport const docsOps: CustomOp[] = [\n {\n group: [\"docs\"],\n name: \"list\",\n summary: \"List an SDK's documentation tree\",\n description:\n \"Fetch an SDK's `/docs/manifest.json` and return the doc tree — feature pages, nested snippet groups, and whether an installable skill exists.\",\n params: [{ name: \"sdk\", type: \"string\", description: \"SDK language. Defaults to the `sdk` recorded in the nearest `.shipeasy` when omitted.\", required: false, enum: SDK_ENUM }],\n examples: [{ run: \"shipeasy docs list --sdk python\" }],\n run: async (args) => {\n const sdk = requireSdk(args.sdk);\n const { manifest, fallback } = await loadManifest(sdk);\n return {\n sdk,\n fallback,\n pages: Object.keys(manifest.pages ?? {}),\n snippets: Object.fromEntries(\n Object.entries(manifest.snippets ?? {}).map(([g, r]) => [g, Object.keys(r)]),\n ),\n skill: Boolean(manifest.skill),\n };\n },\n },\n {\n group: [\"docs\"],\n name: \"get\",\n summary: \"Fetch one SDK doc page or snippet\",\n description:\n \"Fetch one feature page (`flags`, `experiments`, …) or nested snippet (`release/experiments`, …), substituting declared {{placeholders}} from caller args.\",\n params: [\n { name: \"sdk\", type: \"string\", description: \"SDK language. Defaults to the `sdk` recorded in the nearest `.shipeasy` when omitted.\", required: false, enum: SDK_ENUM },\n { name: \"path\", type: \"string\", description: \"Page key or snippet 'group/resource'.\", required: true, positional: true },\n { name: \"framework\", type: \"string\", description: \"Framework hint (substitutes {{FRAMEWORK}}).\" },\n { name: \"name\", type: \"string\", description: \"Resource name (substitutes {{RESOURCE_NAME}}).\" },\n ],\n examples: [\n { note: \"A feature page\", run: \"shipeasy docs get --sdk python experiments\" },\n { note: \"A nested snippet\", run: \"shipeasy docs get --sdk typescript release/flags --name checkout_v2\" },\n ],\n run: async (args) => {\n const sdk = requireSdk(args.sdk);\n const { manifest, fallback } = await loadManifest(sdk);\n const path = resolvePath(manifest, args.path as string);\n const body = fallback ? DEFAULT_CONTENT[path] : ((await fetchText(`${pagesBase(sdk)}/${path}`)) ?? undefined);\n if (body === undefined) throw new CustomOpError(`Doc '${path}' could not be fetched for '${sdk}'.`, 404);\n return { sdk, path, fallback, content: substitute(body, manifest, args) };\n },\n },\n {\n group: [\"docs\"],\n name: \"skill\",\n summary: \"Fetch an SDK's installable LLM skill\",\n description:\n \"Fetch the SDK's `skill/SKILL.md` (frontmatter intact) so an agent can install it verbatim. The CLI `--install` writes it locally (a consumer fs side-effect).\",\n params: [\n { name: \"sdk\", type: \"string\", description: \"SDK language. Defaults to the `sdk` recorded in the nearest `.shipeasy` when omitted.\", required: false, enum: SDK_ENUM },\n { name: \"install\", type: \"boolean\", description: \"CLI only: write the skill to the local agent skills dir.\" },\n ],\n examples: [{ run: \"shipeasy docs skill --sdk python\" }],\n run: async (args) => {\n const sdk = requireSdk(args.sdk);\n const { manifest, fallback } = await loadManifest(sdk);\n const skillPath = manifest.skill ?? \"skill/SKILL.md\";\n const content = fallback ? DEFAULT_CONTENT[skillPath] : ((await fetchText(`${pagesBase(sdk)}/${skillPath}`)) ?? undefined);\n if (content === undefined) throw new CustomOpError(`No skill published for '${sdk}'.`, 404);\n return { sdk, skillPath, fallback, content };\n },\n },\n];\n","import { grammarOp } from \"./grammar.js\";\nimport { docsOps } from \"./docs.js\";\nimport type { CustomOp, CustomGroup } from \"./types.js\";\n\nexport type { CustomOp, CustomGroup, CustomParam, CustomParamType } from \"./types.js\";\nexport { CustomOpError, opId } from \"./types.js\";\nexport { METRIC_GRAMMAR } from \"./grammar.js\";\n\n/**\n * Every custom (non-spec) operation, in surface order. The CLI and MCP each\n * project this with a thin adapter so the sugar commands stay in sync.\n */\nexport const customOperations: CustomOp[] = [grammarOp, ...docsOps];\n\n/**\n * Group-level help for custom-op groups that aren't backed by an OpenAPI tag.\n * `metrics` is a spec tag (its group is created — and described — by the\n * generated tree), so only `docs` needs an entry here; without it the CLI would\n * label the group the bare `\"docs commands\"`.\n */\nexport const customGroups: CustomGroup[] = [\n {\n group: [\"docs\"],\n summary:\n \"SDK docs: fetch a language SDK's published docs — its page tree, feature pages, code snippets, and installable agent skill.\",\n description:\n \"SDK docs — a read-only fetcher over each language SDK's `/docs/` folder, \" +\n \"published to plain GitHub Pages (latest only; no backend, no version arg). \" +\n \"Point it at an SDK with `--sdk <lang>` (one of: typescript, python, go, \" +\n \"java, kotlin, php, swift, ruby) or let it default to the `sdk` recorded in \" +\n \"the nearest `.shipeasy`.\\n\\n\" +\n \"**Commands.**\\n\" +\n \"- `list` — the SDK's doc tree: feature pages, nested snippet groups, and whether an installable skill exists.\\n\" +\n \"- `get <path>` — one feature page (`flags`, `experiments`, …) or nested snippet (`release/flags`), with `{{placeholders}}` substituted from `--name`/`--framework`.\\n\" +\n \"- `skill` — the SDK's installable LLM skill (`SKILL.md`); `--install` writes it into your agent's skills dir.\\n\\n\" +\n \"SDKs that haven't adopted the doc standard yet fall back to a built-in \" +\n \"default doc set, flagged `fallback: true` in the output.\",\n },\n];\n"],"mappings":";AAcO,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiHvB,IAAM,YAAsB;AAAA,EACjC,OAAO,CAAC,SAAS;AAAA,EACjB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aACE;AAAA,EAEF,QAAQ,CAAC;AAAA,EACT,UAAU,CAAC,EAAE,KAAK,2BAA2B,CAAC;AAAA,EAC9C,KAAK,OAAO,EAAE,SAAS,eAAe;AACxC;;;ACpFO,IAAM,gBAAN,cAA4B,MAAM;AAAA,EACvC,YACE,SACO,SAAS,KAChB;AACA,UAAM,OAAO;AAFN;AAGP,SAAK,OAAO;A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2B,GAAG,MAAM,GAAG;AAC1F,aAAO,EAAE,KAAK,WAAW,UAAU,QAAQ;AAAA,IAC7C;AAAA,EACF;AACF;;;AC1KO,IAAM,mBAA+B,CAAC,WAAW,GAAG,OAAO;AAQ3D,IAAM,eAA8B;AAAA,EACzC;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,SACE;AAAA,IACF,aACE;AAAA,EAWJ;AACF;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as ErrorCode, a as Error } from './client-K0ShmsC7.js';
2
- export { A as ApproveEventData, b as ApproveEventError, c as ApproveEventErrors, d as ApproveEventRequest, e as ApproveEventResponse, f as ApproveEventResponse2, g as ApproveEventResponses, h as AttributeType, C as ClaudeTriggerConfig, i as Client, j as ClientOptions, k as Config, l as ConfigName, m as ConfigureOptions, n as ConnectorData, o as ConnectorEvent, p as ConnectorProvider, q as ConnectorRecord, r as CopilotTriggerConfig, s as CreateAlertRuleData, t as CreateAlertRuleError, u as CreateAlertRuleErrors, v as CreateAlertRuleRequest, w as CreateAlertRuleResponse, x as CreateAlertRuleResponse2, y as CreateAlertRuleResponses, z as CreateAttributeData, B as CreateAttributeError, D as CreateAttributeErrors, F as CreateAttributeRequest, G as CreateAttributeResponse, H as CreateAttributeResponse2, I as CreateAttributeResponses, J as CreateBugRequest, K as CreateClaudeTriggerRequest, L as CreateClientConfig, M as CreateConfigData, N as CreateConfigError, O as CreateConfigErrors, P as CreateConfigRequest, Q as CreateConfigResponse, R as CreateConfigResponse2, S as CreateConfigResponses, T as CreateConnectorData, U as CreateConnectorError, V as CreateConnectorErrors, W as CreateConnectorRequest, X as CreateConnectorResponse, Y as CreateConnectorResponse2, Z as CreateConnectorResponses, _ as CreateCopilotTriggerRequest, $ as CreateCursorTriggerRequest, a0 as CreateEventData, a1 as CreateEventError, a2 as CreateEventErrors, a3 as CreateEventRequest, a4 as CreateEventResponse, a5 as CreateEventResponse2, a6 as CreateEventResponses, a7 as CreateExperimentData, a8 as CreateExperimentError, a9 as CreateExperimentErrors, aa as CreateExperimentRequest, ab as CreateExperimentResponse, ac as CreateExperimentResponse2, ad as CreateExperimentResponses, ae as CreateFeatureRequestRequest, af as CreateGateData, ag as CreateGateError, ah as CreateGateErrors, ai as CreateGateRequest, aj as CreateGateResponse, ak as CreateGateResponse2, al as CreateGateResponses, am as CreateGateTemplateData, an as CreateGateTemplateError, ao as CreateGateTemplateErrors, ap as CreateGateTemplateRequest, aq as CreateGateTemplateResponse, ar as CreateGateTemplateResponse2, as as CreateGateTemplateResponses, at as CreateI18nDraftData, au as CreateI18nDraftError, av as CreateI18nDraftErrors, aw as CreateI18nDraftRequest, ax as CreateI18nDraftResponse, ay as CreateI18nDraftResponses, az as CreateI18nProfileData, aA as CreateI18nProfileError, aB as CreateI18nProfileErrors, aC as CreateI18nProfileRequest, aD as CreateI18nProfileResponse, aE as CreateI18nProfileResponse2, aF as CreateI18nProfileResponses, aG as CreateJulesTriggerRequest, aH as CreateKeyData, aI as CreateKeyError, aJ as CreateKeyErrors, aK as CreateKeyRequest, aL as CreateKeyResponse, aM as CreateKeyResponse2, aN as CreateKeyResponses, aO as CreateKillswitchData, aP as CreateKillswitchError, aQ as CreateKillswitchErrors, aR as CreateKillswitchRequest, aS as CreateKillswitchResponse, aT as CreateKillswitchResponse2, aU as CreateKillswitchResponses, aV as CreateMetricData, aW as CreateMetricError, aX as CreateMetricErrors, aY as CreateMetricRequest, aZ as CreateMetricResponse, a_ as CreateMetricResponse2, a$ as CreateMetricResponses, b0 as CreateMetricWithQuery, b1 as CreateMetricWithQueryIr, b2 as CreateOAuthConnectorRequest, b3 as CreateOpsItemData, b4 as CreateOpsItemError, b5 as CreateOpsItemErrors, b6 as CreateOpsItemRequest, b7 as CreateOpsItemResponse, b8 as CreateOpsItemResponse2, b9 as CreateOpsItemResponses, ba as CreateTriggerConnectorData, bb as CreateTriggerConnectorError, bc as CreateTriggerConnectorErrors, bd as CreateTriggerConnectorRequest, be as CreateTriggerConnectorResponse, bf as CreateTriggerConnectorResponses, bg as CreateUniverseData, bh as CreateUniverseError, bi as CreateUniverseErrors, bj as CreateUniverseRequest, bk as CreateUniverseResponse, bl as CreateUniverseResponse2, bm as CreateUniverseResponses, bn as CursorTriggerConfig, bo as DeleteAlertRuleData, bp as DeleteAlertRuleError, bq as DeleteAlertRuleErrors, br as DeleteAlertRuleResponse, bs as DeleteAlertRuleResponse2, bt as DeleteAlertRuleResponses, bu as DeleteAttributeData, bv as DeleteAttributeError, bw as DeleteAttributeErrors, bx as DeleteAttributeResponse, by as DeleteAttributeResponse2, bz as DeleteAttributeResponses, bA as DeleteConfigData, bB as DeleteConfigError, bC as DeleteConfigErrors, bD as DeleteConfigResponse, bE as DeleteConfigResponse2, bF as DeleteConfigResponses, bG as DeleteConnectorData, bH as DeleteConnectorError, bI as DeleteConnectorErrors, bJ as DeleteConnectorResponse, bK as DeleteConnectorResponse2, bL as DeleteConnectorResponses, bM as DeleteEventData, bN as DeleteEventError, bO as DeleteEventErrors, bP as DeleteEventResponse, bQ as DeleteEventResponse2, bR as DeleteEventResponses, bS as DeleteExperimentData, bT as DeleteExperimentError, bU as DeleteExperimentErrors, bV as DeleteExperimentResponse, bW as DeleteExperimentResponse2, bX as DeleteExperimentResponses, bY as DeleteGateData, bZ as DeleteGateError, b_ as DeleteGateErrors, b$ as DeleteGateResponse, c0 as DeleteGateResponse2, c1 as DeleteGateResponses, c2 as DeleteGateTemplateData, c3 as DeleteGateTemplateError, c4 as DeleteGateTemplateErrors, c5 as DeleteGateTemplateResponse, c6 as DeleteGateTemplateResponse2, c7 as DeleteGateTemplateResponses, c8 as DeleteKillswitchData, c9 as DeleteKillswitchError, ca as DeleteKillswitchErrors, cb as DeleteKillswitchResponse, cc as DeleteKillswitchResponse2, cd as DeleteKillswitchResponses, ce as DeleteMetricData, cf as DeleteMetricError, cg as DeleteMetricErrors, ch as DeleteMetricResponse, ci as DeleteMetricResponse2, cj as DeleteMetricResponses, ck as DeleteUniverseData, cl as DeleteUniverseError, cm as DeleteUniverseErrors, cn as DeleteUniverseResponse, co as DeleteUniverseResponse2, cp as DeleteUniverseResponses, cq as DisableGateData, cr as DisableGateError, cs as DisableGateErrors, ct as DisableGateResponse, cu as DisableGateResponse2, cv as DisableGateResponses, cw as DiscardConfigDraftData, cx as DiscardConfigDraftError, cy as DiscardConfigDraftErrors, cz as DiscardConfigDraftRequest, cA as DiscardConfigDraftResponse, cB as DiscardConfigDraftResponse2, cC as DiscardConfigDraftResponses, cD as Domain, cE as EnableGateData, cF as EnableGateError, cG as EnableGateErrors, cH as EnableGateResponse, cI as EnableGateResponse2, cJ as EnableGateResponses, cK as Env, cL as ErrorRecord, cM as ErrorSeriesRequest, cN as ErrorSeriesResponse, cO as ExperimentInlineMetric, cP as FileErrorTicketData, cQ as FileErrorTicketError, cR as FileErrorTicketErrors, cS as FileErrorTicketResponse, cT as FileErrorTicketResponse2, cU as FileErrorTicketResponses, cV as FireConnectorData, cW as FireConnectorError, cX as FireConnectorErrors, cY as FireConnectorRequest, cZ as FireConnectorResponse, c_ as FireConnectorResponse2, c$ as FireConnectorResponses, d0 as Folder, d1 as GateTemplate, d2 as GateTemplateRule, d3 as GateTemplateRuleResponse, d4 as GetAttributeData, d5 as GetAttributeError, d6 as GetAttributeErrors, d7 as GetAttributeResponse, d8 as GetAttributeResponse2, d9 as GetAttributeResponses, da as GetConfigData, db as GetConfigError, dc as GetConfigErrors, dd as GetConfigResponse, de as GetConfigResponse2, df as GetConfigResponses, dg as GetConnectorData, dh as GetConnectorError, di as GetConnectorErrors, dj as GetConnectorResponse, dk as GetConnectorResponses, dl as GetCurrentProjectData, dm as GetCurrentProjectError, dn as GetCurrentProjectErrors, dp as GetCurrentProjectResponse, dq as GetCurrentProjectResponse2, dr as GetCurrentProjectResponses, ds as GetErrorData, dt as GetErrorError, du as GetErrorErrors, dv as GetErrorResponse, dw as GetErrorResponses, dx as GetErrorSeriesData, dy as GetErrorSeriesError, dz as GetErrorSeriesErrors, dA as GetErrorSeriesResponse, dB as GetErrorSeriesResponses, dC as GetEventData, dD as GetEventError, dE as GetEventErrors, dF as GetEventResponse, dG as GetEventResponse2, dH as GetEventResponses, dI as GetExperimentData, dJ as GetExperimentError, dK as GetExperimentErrors, dL as GetExperimentResponse, dM as GetExperimentResponse2, dN as GetExperimentResponses, dO as GetExperimentResultsData, dP as GetExperimentResultsError, dQ as GetExperimentResultsErrors, dR as GetExperimentResultsResponse, dS as GetExperimentResultsResponse2, dT as GetExperimentResultsResponses, dU as GetExperimentTimeseriesData, dV as GetExperimentTimeseriesError, dW as GetExperimentTimeseriesErrors, dX as GetExperimentTimeseriesResponse, dY as GetExperimentTimeseriesResponse2, dZ as GetExperimentTimeseriesResponses, d_ as GetGateTemplateData, d$ as GetGateTemplateError, e0 as GetGateTemplateErrors, e1 as GetGateTemplateResponse, e2 as GetGateTemplateResponses, e3 as GetKillswitchData, e4 as GetKillswitchError, e5 as GetKillswitchErrors, e6 as GetKillswitchResponse, e7 as GetKillswitchResponse2, e8 as GetKillswitchResponses, e9 as GetMetricData, ea as GetMetricError, eb as GetMetricErrors, ec as GetMetricResponse, ed as GetMetricResponse2, ee as GetMetricResponses, ef as GetOpsItemData, eg as GetOpsItemError, eh as GetOpsItemErrors, ei as GetOpsItemResponse, ej as GetOpsItemResponse2, ek as GetOpsItemResponses, el as GithubConnectorData, em as I18nDraft, en as JulesTriggerConfig, eo as KeyRecord, ep as KillswitchValue, eq as LinkPrToOpsItemData, er as LinkPrToOpsItemError, es as LinkPrToOpsItemErrors, et as LinkPrToOpsItemRequest, eu as LinkPrToOpsItemResponse, ev as LinkPrToOpsItemResponse2, ew as LinkPrToOpsItemResponses, ex as ListAlertRulesData, ey as ListAlertRulesError, ez as ListAlertRulesErrors, eA as ListAlertRulesResponse, eB as ListAlertRulesResponse2, eC as ListAlertRulesResponses, eD as ListAttributesData, eE as ListAttributesError, eF as ListAttributesErrors, eG as ListAttributesResponse, eH as ListAttributesResponse2, eI as ListAttributesResponses, eJ as ListConfigActivityData, eK as ListConfigActivityError, eL as ListConfigActivityErrors, eM as ListConfigActivityResponse, eN as ListConfigActivityResponse2, eO as ListConfigActivityResponses, eP as ListConfigsData, eQ as ListConfigsError, eR as ListConfigsErrors, eS as ListConfigsResponse, eT as ListConfigsResponse2, eU as ListConfigsResponses, eV as ListConnectorsData, eW as ListConnectorsError, eX as ListConnectorsErrors, eY as ListConnectorsResponse, eZ as ListConnectorsResponse2, e_ as ListConnectorsResponses, e$ as ListErrorsData, f0 as ListErrorsError, f1 as ListErrorsErrors, f2 as ListErrorsResponse, f3 as ListErrorsResponse2, f4 as ListErrorsResponses, f5 as ListEventsData, f6 as ListEventsError, f7 as ListEventsErrors, f8 as ListEventsResponse, f9 as ListEventsResponse2, fa as ListEventsResponses, fb as ListExperimentsData, fc as ListExperimentsError, fd as ListExperimentsErrors, fe as ListExperimentsResponse, ff as ListExperimentsResponse2, fg as ListExperimentsResponses, fh as ListGateTemplatesData, fi as ListGateTemplatesError, fj as ListGateTemplatesErrors, fk as ListGateTemplatesResponse, fl as ListGateTemplatesResponse2, fm as ListGateTemplatesResponses, fn as ListGatesData, fo as ListGatesError, fp as ListGatesErrors, fq as ListGatesResponse, fr as ListGatesResponse2, fs as ListGatesResponses, ft as ListI18nDraftsData, fu as ListI18nDraftsError, fv as ListI18nDraftsErrors, fw as ListI18nDraftsResponse, fx as ListI18nDraftsResponse2, fy as ListI18nDraftsResponses, fz as ListI18nKeysData, fA as ListI18nKeysError, fB as ListI18nKeysErrors, fC as ListI18nKeysResponse, fD as ListI18nKeysResponse2, fE as ListI18nKeysResponses, fF as ListI18nProfilesData, fG as ListI18nProfilesError, fH as ListI18nProfilesErrors, fI as ListI18nProfilesResponse, fJ as ListI18nProfilesResponse2, fK as ListI18nProfilesResponses, fL as ListKeysData, fM as ListKeysError, fN as ListKeysErrors, fO as ListKeysResponse, fP as ListKeysResponse2, fQ as ListKeysResponses, fR as ListKillswitchesData, fS as ListKillswitchesError, fT as ListKillswitchesErrors, fU as ListKillswitchesResponse, fV as ListKillswitchesResponse2, fW as ListKillswitchesResponses, fX as ListMetricsData, fY as ListMetricsError, fZ as ListMetricsErrors, f_ as ListMetricsResponse, f$ as ListMetricsResponse2, g0 as ListMetricsResponses, g1 as ListOpsItemsData, g2 as ListOpsItemsError, g3 as ListOpsItemsErrors, g4 as ListOpsItemsResponse, g5 as ListOpsItemsResponse2, g6 as ListOpsItemsResponses, g7 as ListSlackChannelsData, g8 as ListSlackChannelsError, g9 as ListSlackChannelsErrors, ga as ListSlackChannelsResponse, gb as ListSlackChannelsResponse2, gc as ListSlackChannelsResponses, gd as ListUniversesData, ge as ListUniversesError, gf as ListUniversesErrors, gg as ListUniversesResponse, gh as ListUniversesResponse2, gi as ListUniversesResponses, gj as MeasurePlanResource, gk as MeasurePlanStep, gl as MetricDirection, gm as MetricEventName, gn as MetricMinDetectableEffect, go as MetricName, gp as MetricQueryDsl, gq as MetricWinsorizePct, gr as NotificationTarget, gs as NotifyOpsData, gt as NotifyOpsError, gu as NotifyOpsErrors, gv as NotifyOpsRequest, gw as NotifyOpsResponse, gx as NotifyOpsResponse2, gy as NotifyOpsResponses, gz as OpsAlertContext, gA as OpsAlertMetricSummary, gB as OpsAlertRuleSummary, gC as OpsBrowserContext, gD as OpsErrorContext, gE as OpsItemAttachment, gF as OpsItemContext, gG as OpsItemNotifyOrNull, gH as OpsItemPriority, gI as OpsItemPriorityOrNull, gJ as OpsItemRelated, gK as OpsItemStatus, gL as OpsMeasurePlanContext, gM as Options, gN as PaginationCursor, gO as PaginationLimit, gP as ProjectId, gQ as PublishConfigDraftData, gR as PublishConfigDraftError, gS as PublishConfigDraftErrors, gT as PublishConfigDraftRequest, gU as PublishConfigDraftResponse, gV as PublishConfigDraftResponse2, gW as PublishConfigDraftResponses, gX as PublishI18nProfileData, gY as PublishI18nProfileError, gZ as PublishI18nProfileErrors, g_ as PublishI18nProfileRequest, g$ as PublishI18nProfileResponse, h0 as PublishI18nProfileResponse2, h1 as PublishI18nProfileResponses, h2 as PushI18nKeysData, h3 as PushI18nKeysError, h4 as PushI18nKeysErrors, h5 as PushI18nKeysRequest, h6 as PushI18nKeysResponse, h7 as PushI18nKeysResponse2, h8 as PushI18nKeysResponses, h9 as Q, ha as QueryIr, hb as ReanalyzeExperimentData, hc as ReanalyzeExperimentError, hd as ReanalyzeExperimentErrors, he as ReanalyzeExperimentResponse, hf as ReanalyzeExperimentResponse2, hg as ReanalyzeExperimentResponses, hh as RequestResult, hi as ResourceId, hj as RevokeKeyData, hk as RevokeKeyError, hl as RevokeKeyErrors, hm as RevokeKeyResponse, hn as RevokeKeyResponse2, ho as RevokeKeyResponses, hp as SaveConfigDraftData, hq as SaveConfigDraftError, hr as SaveConfigDraftErrors, hs as SaveConfigDraftRequest, ht as SaveConfigDraftResponse, hu as SaveConfigDraftResponse2, hv as SaveConfigDraftResponses, hw as SearchHit, hx as SearchResourcesData, hy as SearchResourcesError, hz as SearchResourcesErrors, hA as SearchResourcesResponse, hB as SearchResourcesResponses, hC as SearchResponse, hD as SetExperimentMetricsData, hE as SetExperimentMetricsError, hF as SetExperimentMetricsErrors, hG as SetExperimentMetricsRequest, hH as SetExperimentMetricsResponse, hI as SetExperimentMetricsResponse2, hJ as SetExperimentMetricsResponses, hK as SetExperimentStatusData, hL as SetExperimentStatusError, hM as SetExperimentStatusErrors, hN as SetExperimentStatusRequest, hO as SetExperimentStatusResponse, hP as SetExperimentStatusResponse2, hQ as SetExperimentStatusResponses, hR as SetI18nLabelData, hS as SetI18nLabelError, hT as SetI18nLabelErrors, hU as SetI18nLabelRequest, hV as SetI18nLabelResponse, hW as SetI18nLabelResponse2, hX as SetI18nLabelResponses, hY as SetKillswitchSwitchData, hZ as SetKillswitchSwitchError, h_ as SetKillswitchSwitchErrors, h$ as SetKillswitchSwitchRequest, i0 as SetKillswitchSwitchResponse, i1 as SetKillswitchSwitchResponse2, i2 as SetKillswitchSwitchResponses, i3 as SetKillswitchValueData, i4 as SetKillswitchValueError, i5 as SetKillswitchValueErrors, i6 as SetKillswitchValueRequest, i7 as SetKillswitchValueResponse, i8 as SetKillswitchValueResponse2, i9 as SetKillswitchValueResponses, ia as SlackConnectorData, ib as TestConnectorData, ic as TestConnectorError, id as TestConnectorErrors, ie as TestConnectorResponse, ig as TestConnectorResponse2, ih as TestConnectorResponses, ii as UnsetKillswitchSwitchData, ij as UnsetKillswitchSwitchError, ik as UnsetKillswitchSwitchErrors, il as UnsetKillswitchSwitchRequest, im as UnsetKillswitchSwitchResponse, io as UnsetKillswitchSwitchResponse2, ip as UnsetKillswitchSwitchResponses, iq as UpdateAlertRuleData, ir as UpdateAlertRuleError, is as UpdateAlertRuleErrors, it as UpdateAlertRuleRequest, iu as UpdateAlertRuleResponse, iv as UpdateAlertRuleResponse2, iw as UpdateAlertRuleResponses, ix as UpdateAttributeData, iy as UpdateAttributeError, iz as UpdateAttributeErrors, iA as UpdateAttributeRequest, iB as UpdateAttributeResponse, iC as UpdateAttributeResponse2, iD as UpdateAttributeResponses, iE as UpdateBugRequest, iF as UpdateClaudeTriggerRequest, iG as UpdateConfigData, iH as UpdateConfigError, iI as UpdateConfigErrors, iJ as UpdateConfigRequest, iK as UpdateConfigResponse, iL as UpdateConfigResponse2, iM as UpdateConfigResponses, iN as UpdateConfigSchemaData, iO as UpdateConfigSchemaError, iP as UpdateConfigSchemaErrors, iQ as UpdateConfigSchemaRequest, iR as UpdateConfigSchemaResponse, iS as UpdateConfigSchemaResponse2, iT as UpdateConfigSchemaResponses, iU as UpdateConnectorData, iV as UpdateConnectorError, iW as UpdateConnectorErrors, iX as UpdateConnectorRequest, iY as UpdateConnectorResponse, iZ as UpdateConnectorResponse2, i_ as UpdateConnectorResponses, i$ as UpdateCopilotTriggerRequest, j0 as UpdateCursorTriggerRequest, j1 as UpdateErrorStatusData, j2 as UpdateErrorStatusError, j3 as UpdateErrorStatusErrors, j4 as UpdateErrorStatusRequest, j5 as UpdateErrorStatusResponse, j6 as UpdateErrorStatusResponses, j7 as UpdateEventData, j8 as UpdateEventError, j9 as UpdateEventErrors, ja as UpdateEventRequest, jb as UpdateEventResponse, jc as UpdateEventResponse2, jd as UpdateEventResponses, je as UpdateExperimentData, jf as UpdateExperimentError, jg as UpdateExperimentErrors, jh as UpdateExperimentRequest, ji as UpdateExperimentResponse, jj as UpdateExperimentResponse2, jk as UpdateExperimentResponses, jl as UpdateFeatureRequestRequest, jm as UpdateGateData, jn as UpdateGateError, jo as UpdateGateErrors, jp as UpdateGateRequest, jq as UpdateGateResponse, jr as UpdateGateResponse2, js as UpdateGateResponses, jt as UpdateGateTemplateData, ju as UpdateGateTemplateError, jv as UpdateGateTemplateErrors, jw as UpdateGateTemplateRequest, jx as UpdateGateTemplateResponse, jy as UpdateGateTemplateResponse2, jz as UpdateGateTemplateResponses, jA as UpdateI18nDraftData, jB as UpdateI18nDraftError, jC as UpdateI18nDraftErrors, jD as UpdateI18nDraftRequest, jE as UpdateI18nDraftResponse, jF as UpdateI18nDraftResponses, jG as UpdateI18nKeyData, jH as UpdateI18nKeyError, jI as UpdateI18nKeyErrors, jJ as UpdateI18nKeyRequest, jK as UpdateI18nKeyResponse, jL as UpdateI18nKeyResponse2, jM as UpdateI18nKeyResponses, jN as UpdateJulesTriggerRequest, jO as UpdateKillswitchData, jP as UpdateKillswitchError, jQ as UpdateKillswitchErrors, jR as UpdateKillswitchRequest, jS as UpdateKillswitchResponse, jT as UpdateKillswitchResponse2, jU as UpdateKillswitchResponses, jV as UpdateMetricData, jW as UpdateMetricError, jX as UpdateMetricErrors, jY as UpdateMetricFields, jZ as UpdateMetricRequest, j_ as UpdateMetricResponse, j$ as UpdateMetricResponses, k0 as UpdateMetricWithQuery, k1 as UpdateMetricWithQueryIr, k2 as UpdateOpsItemData, k3 as UpdateOpsItemError, k4 as UpdateOpsItemErrors, k5 as UpdateOpsItemRequest, k6 as UpdateOpsItemResponse, k7 as UpdateOpsItemResponse2, k8 as UpdateOpsItemResponses, k9 as UpdateOpsItemStatusRequest, ka as UpdateProjectData, kb as UpdateProjectError, kc as UpdateProjectErrors, kd as UpdateProjectRequest, ke as UpdateProjectResponse, kf as UpdateProjectResponses, kg as UpdateTriggerConnectorData, kh as UpdateTriggerConnectorError, ki as UpdateTriggerConnectorErrors, kj as UpdateTriggerConnectorRequest, kk as UpdateTriggerConnectorResponse, kl as UpdateTriggerConnectorResponses, km as UpdateUniverseData, kn as UpdateUniverseError, ko as UpdateUniverseErrors, kp as UpdateUniverseRequest, kq as UpdateUniverseResponse, kr as UpdateUniverseResponse2, ks as UpdateUniverseResponses, kt as UpsertProjectData, ku as UpsertProjectError, kv as UpsertProjectErrors, kw as UpsertProjectRequest, kx as UpsertProjectResponse, ky as UpsertProjectResponse2, kz as UpsertProjectResponses, kA as approveEvent, kB as client, kC as configure, kD as createAlertRule, kE as createAttribute, kF as createClient, kG as createClientConfig, kH as createConfig, kI as createConnector, kJ as createEvent, kK as createExperiment, kL as createGate, kM as createGateTemplate, kN as createI18nDraft, kO as createI18nProfile, kP as createKey, kQ as createKillswitch, kR as createMetric, kS as createOpsItem, kT as createTriggerConnector, kU as createUniverse, kV as deleteAlertRule, kW as deleteAttribute, kX as deleteConfig, kY as deleteConnector, kZ as deleteEvent, k_ as deleteExperiment, k$ as deleteGate, l0 as deleteGateTemplate, l1 as deleteKillswitch, l2 as deleteMetric, l3 as deleteUniverse, l4 as disableGate, l5 as discardConfigDraft, l6 as enableGate, l7 as fileErrorTicket, l8 as fireConnector, l9 as getAttribute, la as getConfig, lb as getConnector, lc as getCurrentProject, ld as getError, le as getErrorSeries, lf as getEvent, lg as getExperiment, lh as getExperimentResults, li as getExperimentTimeseries, lj as getGateTemplate, lk as getKillswitch, ll as getMetric, lm as getOpsItem, ln as linkPrToOpsItem, lo as listAlertRules, lp as listAttributes, lq as listConfigActivity, lr as listConfigs, ls as listConnectors, lt as listErrors, lu as listEvents, lv as listExperiments, lw as listGateTemplates, lx as listGates, ly as listI18nDrafts, lz as listI18nKeys, lA as listI18nProfiles, lB as listKeys, lC as listKillswitches, lD as listMetrics, lE as listOpsItems, lF as listSlackChannels, lG as listUniverses, lH as notifyOps, lI as publishConfigDraft, lJ as publishI18nProfile, lK as pushI18nKeys, lL as reanalyzeExperiment, lM as revokeKey, lN as saveConfigDraft, lO as searchResources, lP as setExperimentMetrics, lQ as setExperimentStatus, lR as setI18nLabel, lS as setKillswitchSwitch, lT as setKillswitchValue, lU as testConnector, lV as unsetKillswitchSwitch, lW as updateAlertRule, lX as updateAttribute, lY as updateConfig, lZ as updateConfigSchema, l_ as updateConnector, l$ as updateErrorStatus, m0 as updateEvent, m1 as updateExperiment, m2 as updateGate, m3 as updateGateTemplate, m4 as updateI18nDraft, m5 as updateI18nKey, m6 as updateKillswitch, m7 as updateMetric, m8 as updateOpsItem, m9 as updateProject, ma as updateTriggerConnector, mb as updateUniverse, mc as upsertProject } from './client-K0ShmsC7.js';
1
+ import { E as ErrorCode, a as Error } from './client-DO5HTb_L.js';
2
+ export { A as ApproveEventData, b as ApproveEventError, c as ApproveEventErrors, d as ApproveEventRequest, e as ApproveEventResponse, f as ApproveEventResponse2, g as ApproveEventResponses, h as AttributeType, C as ClaudeTriggerConfig, i as Client, j as ClientOptions, k as Config, l as ConfigName, m as ConfigureOptions, n as ConnectorData, o as ConnectorEvent, p as ConnectorProvider, q as ConnectorRecord, r as CopilotTriggerConfig, s as CreateAlertRuleData, t as CreateAlertRuleError, u as CreateAlertRuleErrors, v as CreateAlertRuleRequest, w as CreateAlertRuleResponse, x as CreateAlertRuleResponse2, y as CreateAlertRuleResponses, z as CreateAttributeData, B as CreateAttributeError, D as CreateAttributeErrors, F as CreateAttributeRequest, G as CreateAttributeResponse, H as CreateAttributeResponse2, I as CreateAttributeResponses, J as CreateBugRequest, K as CreateClaudeTriggerRequest, L as CreateClientConfig, M as CreateConfigData, N as CreateConfigError, O as CreateConfigErrors, P as CreateConfigRequest, Q as CreateConfigResponse, R as CreateConfigResponse2, S as CreateConfigResponses, T as CreateConnectorData, U as CreateConnectorError, V as CreateConnectorErrors, W as CreateConnectorRequest, X as CreateConnectorResponse, Y as CreateConnectorResponse2, Z as CreateConnectorResponses, _ as CreateCopilotTriggerRequest, $ as CreateCursorTriggerRequest, a0 as CreateEventData, a1 as CreateEventError, a2 as CreateEventErrors, a3 as CreateEventRequest, a4 as CreateEventResponse, a5 as CreateEventResponse2, a6 as CreateEventResponses, a7 as CreateExperimentData, a8 as CreateExperimentError, a9 as CreateExperimentErrors, aa as CreateExperimentRequest, ab as CreateExperimentResponse, ac as CreateExperimentResponse2, ad as CreateExperimentResponses, ae as CreateFeatureRequestRequest, af as CreateGateData, ag as CreateGateError, ah as CreateGateErrors, ai as CreateGateRequest, aj as CreateGateResponse, ak as CreateGateResponse2, al as CreateGateResponses, am as CreateGateTemplateData, an as CreateGateTemplateError, ao as CreateGateTemplateErrors, ap as CreateGateTemplateRequest, aq as CreateGateTemplateResponse, ar as CreateGateTemplateResponse2, as as CreateGateTemplateResponses, at as CreateI18nDraftData, au as CreateI18nDraftError, av as CreateI18nDraftErrors, aw as CreateI18nDraftRequest, ax as CreateI18nDraftResponse, ay as CreateI18nDraftResponses, az as CreateI18nProfileData, aA as CreateI18nProfileError, aB as CreateI18nProfileErrors, aC as CreateI18nProfileRequest, aD as CreateI18nProfileResponse, aE as CreateI18nProfileResponse2, aF as CreateI18nProfileResponses, aG as CreateJulesTriggerRequest, aH as CreateKeyData, aI as CreateKeyError, aJ as CreateKeyErrors, aK as CreateKeyRequest, aL as CreateKeyResponse, aM as CreateKeyResponse2, aN as CreateKeyResponses, aO as CreateKillswitchData, aP as CreateKillswitchError, aQ as CreateKillswitchErrors, aR as CreateKillswitchRequest, aS as CreateKillswitchResponse, aT as CreateKillswitchResponse2, aU as CreateKillswitchResponses, aV as CreateMetricData, aW as CreateMetricError, aX as CreateMetricErrors, aY as CreateMetricRequest, aZ as CreateMetricResponse, a_ as CreateMetricResponse2, a$ as CreateMetricResponses, b0 as CreateMetricWithQuery, b1 as CreateMetricWithQueryIr, b2 as CreateOAuthConnectorRequest, b3 as CreateOpsCommentData, b4 as CreateOpsCommentError, b5 as CreateOpsCommentErrors, b6 as CreateOpsCommentRequest, b7 as CreateOpsCommentResponse, b8 as CreateOpsCommentResponse2, b9 as CreateOpsCommentResponses, ba as CreateOpsItemData, bb as CreateOpsItemError, bc as CreateOpsItemErrors, bd as CreateOpsItemRequest, be as CreateOpsItemResponse, bf as CreateOpsItemResponse2, bg as CreateOpsItemResponses, bh as CreateTriggerConnectorData, bi as CreateTriggerConnectorError, bj as CreateTriggerConnectorErrors, bk as CreateTriggerConnectorRequest, bl as CreateTriggerConnectorResponse, bm as CreateTriggerConnectorResponses, bn as CreateUniverseData, bo as CreateUniverseError, bp as CreateUniverseErrors, bq as CreateUniverseRequest, br as CreateUniverseResponse, bs as CreateUniverseResponse2, bt as CreateUniverseResponses, bu as CursorTriggerConfig, bv as DeleteAlertRuleData, bw as DeleteAlertRuleError, bx as DeleteAlertRuleErrors, by as DeleteAlertRuleResponse, bz as DeleteAlertRuleResponse2, bA as DeleteAlertRuleResponses, bB as DeleteAttributeData, bC as DeleteAttributeError, bD as DeleteAttributeErrors, bE as DeleteAttributeResponse, bF as DeleteAttributeResponse2, bG as DeleteAttributeResponses, bH as DeleteConfigData, bI as DeleteConfigError, bJ as DeleteConfigErrors, bK as DeleteConfigResponse, bL as DeleteConfigResponse2, bM as DeleteConfigResponses, bN as DeleteConnectorData, bO as DeleteConnectorError, bP as DeleteConnectorErrors, bQ as DeleteConnectorResponse, bR as DeleteConnectorResponse2, bS as DeleteConnectorResponses, bT as DeleteEventData, bU as DeleteEventError, bV as DeleteEventErrors, bW as DeleteEventResponse, bX as DeleteEventResponse2, bY as DeleteEventResponses, bZ as DeleteExperimentData, b_ as DeleteExperimentError, b$ as DeleteExperimentErrors, c0 as DeleteExperimentResponse, c1 as DeleteExperimentResponse2, c2 as DeleteExperimentResponses, c3 as DeleteGateData, c4 as DeleteGateError, c5 as DeleteGateErrors, c6 as DeleteGateResponse, c7 as DeleteGateResponse2, c8 as DeleteGateResponses, c9 as DeleteGateTemplateData, ca as DeleteGateTemplateError, cb as DeleteGateTemplateErrors, cc as DeleteGateTemplateResponse, cd as DeleteGateTemplateResponse2, ce as DeleteGateTemplateResponses, cf as DeleteKillswitchData, cg as DeleteKillswitchError, ch as DeleteKillswitchErrors, ci as DeleteKillswitchResponse, cj as DeleteKillswitchResponse2, ck as DeleteKillswitchResponses, cl as DeleteMetricData, cm as DeleteMetricError, cn as DeleteMetricErrors, co as DeleteMetricResponse, cp as DeleteMetricResponse2, cq as DeleteMetricResponses, cr as DeleteUniverseData, cs as DeleteUniverseError, ct as DeleteUniverseErrors, cu as DeleteUniverseResponse, cv as DeleteUniverseResponse2, cw as DeleteUniverseResponses, cx as DisableGateData, cy as DisableGateError, cz as DisableGateErrors, cA as DisableGateResponse, cB as DisableGateResponse2, cC as DisableGateResponses, cD as DiscardConfigDraftData, cE as DiscardConfigDraftError, cF as DiscardConfigDraftErrors, cG as DiscardConfigDraftRequest, cH as DiscardConfigDraftResponse, cI as DiscardConfigDraftResponse2, cJ as DiscardConfigDraftResponses, cK as Domain, cL as EnableGateData, cM as EnableGateError, cN as EnableGateErrors, cO as EnableGateResponse, cP as EnableGateResponse2, cQ as EnableGateResponses, cR as Env, cS as ErrorOccurrence, cT as ErrorRecord, cU as ErrorSeriesRequest, cV as ErrorSeriesResponse, cW as ExperimentApiRow, cX as ExperimentInlineMetric, cY as FileErrorTicketData, cZ as FileErrorTicketError, c_ as FileErrorTicketErrors, c$ as FileErrorTicketResponse, d0 as FileErrorTicketResponse2, d1 as FileErrorTicketResponses, d2 as FireConnectorData, d3 as FireConnectorError, d4 as FireConnectorErrors, d5 as FireConnectorRequest, d6 as FireConnectorResponse, d7 as FireConnectorResponse2, d8 as FireConnectorResponses, d9 as Folder, da as GateTemplate, db as GateTemplateRule, dc as GateTemplateRuleResponse, dd as GetAttributeData, de as GetAttributeError, df as GetAttributeErrors, dg as GetAttributeResponse, dh as GetAttributeResponse2, di as GetAttributeResponses, dj as GetConfigData, dk as GetConfigError, dl as GetConfigErrors, dm as GetConfigResponse, dn as GetConfigResponse2, dp as GetConfigResponses, dq as GetConnectorData, dr as GetConnectorError, ds as GetConnectorErrors, dt as GetConnectorResponse, du as GetConnectorResponses, dv as GetCurrentProjectData, dw as GetCurrentProjectError, dx as GetCurrentProjectErrors, dy as GetCurrentProjectResponse, dz as GetCurrentProjectResponse2, dA as GetCurrentProjectResponses, dB as GetErrorData, dC as GetErrorError, dD as GetErrorErrors, dE as GetErrorResponse, dF as GetErrorResponses, dG as GetErrorSeriesData, dH as GetErrorSeriesError, dI as GetErrorSeriesErrors, dJ as GetErrorSeriesResponse, dK as GetErrorSeriesResponses, dL as GetEventData, dM as GetEventError, dN as GetEventErrors, dO as GetEventResponse, dP as GetEventResponse2, dQ as GetEventResponses, dR as GetExperimentData, dS as GetExperimentError, dT as GetExperimentErrors, dU as GetExperimentResponse, dV as GetExperimentResponses, dW as GetExperimentResultsData, dX as GetExperimentResultsError, dY as GetExperimentResultsErrors, dZ as GetExperimentResultsResponse, d_ as GetExperimentResultsResponse2, d$ as GetExperimentResultsResponses, e0 as GetExperimentTimeseriesData, e1 as GetExperimentTimeseriesError, e2 as GetExperimentTimeseriesErrors, e3 as GetExperimentTimeseriesResponse, e4 as GetExperimentTimeseriesResponse2, e5 as GetExperimentTimeseriesResponses, e6 as GetGateTemplateData, e7 as GetGateTemplateError, e8 as GetGateTemplateErrors, e9 as GetGateTemplateResponse, ea as GetGateTemplateResponses, eb as GetKillswitchData, ec as GetKillswitchError, ed as GetKillswitchErrors, ee as GetKillswitchResponse, ef as GetKillswitchResponse2, eg as GetKillswitchResponses, eh as GetMetricData, ei as GetMetricError, ej as GetMetricErrors, ek as GetMetricResponse, el as GetMetricResponse2, em as GetMetricResponses, en as GetOpsItemData, eo as GetOpsItemError, ep as GetOpsItemErrors, eq as GetOpsItemResponse, er as GetOpsItemResponse2, es as GetOpsItemResponses, et as GithubConnectorData, eu as I18nDraft, ev as JulesTriggerConfig, ew as KeyRecord, ex as KillswitchValue, ey as LinkPrToOpsItemData, ez as LinkPrToOpsItemError, eA as LinkPrToOpsItemErrors, eB as LinkPrToOpsItemRequest, eC as LinkPrToOpsItemResponse, eD as LinkPrToOpsItemResponse2, eE as LinkPrToOpsItemResponses, eF as ListAlertRulesData, eG as ListAlertRulesError, eH as ListAlertRulesErrors, eI as ListAlertRulesResponse, eJ as ListAlertRulesResponse2, eK as ListAlertRulesResponses, eL as ListAttributesData, eM as ListAttributesError, eN as ListAttributesErrors, eO as ListAttributesResponse, eP as ListAttributesResponse2, eQ as ListAttributesResponses, eR as ListConfigActivityData, eS as ListConfigActivityError, eT as ListConfigActivityErrors, eU as ListConfigActivityResponse, eV as ListConfigActivityResponse2, eW as ListConfigActivityResponses, eX as ListConfigsData, eY as ListConfigsError, eZ as ListConfigsErrors, e_ as ListConfigsResponse, e$ as ListConfigsResponse2, f0 as ListConfigsResponses, f1 as ListConnectorsData, f2 as ListConnectorsError, f3 as ListConnectorsErrors, f4 as ListConnectorsResponse, f5 as ListConnectorsResponse2, f6 as ListConnectorsResponses, f7 as ListErrorsData, f8 as ListErrorsError, f9 as ListErrorsErrors, fa as ListErrorsResponse, fb as ListErrorsResponse2, fc as ListErrorsResponses, fd as ListEventsData, fe as ListEventsError, ff as ListEventsErrors, fg as ListEventsResponse, fh as ListEventsResponse2, fi as ListEventsResponses, fj as ListExperimentsData, fk as ListExperimentsError, fl as ListExperimentsErrors, fm as ListExperimentsResponse, fn as ListExperimentsResponse2, fo as ListExperimentsResponses, fp as ListGateTemplatesData, fq as ListGateTemplatesError, fr as ListGateTemplatesErrors, fs as ListGateTemplatesResponse, ft as ListGateTemplatesResponse2, fu as ListGateTemplatesResponses, fv as ListGatesData, fw as ListGatesError, fx as ListGatesErrors, fy as ListGatesResponse, fz as ListGatesResponse2, fA as ListGatesResponses, fB as ListI18nDraftsData, fC as ListI18nDraftsError, fD as ListI18nDraftsErrors, fE as ListI18nDraftsResponse, fF as ListI18nDraftsResponse2, fG as ListI18nDraftsResponses, fH as ListI18nKeysData, fI as ListI18nKeysError, fJ as ListI18nKeysErrors, fK as ListI18nKeysResponse, fL as ListI18nKeysResponse2, fM as ListI18nKeysResponses, fN as ListI18nProfilesData, fO as ListI18nProfilesError, fP as ListI18nProfilesErrors, fQ as ListI18nProfilesResponse, fR as ListI18nProfilesResponse2, fS as ListI18nProfilesResponses, fT as ListKeysData, fU as ListKeysError, fV as ListKeysErrors, fW as ListKeysResponse, fX as ListKeysResponse2, fY as ListKeysResponses, fZ as ListKillswitchesData, f_ as ListKillswitchesError, f$ as ListKillswitchesErrors, g0 as ListKillswitchesResponse, g1 as ListKillswitchesResponse2, g2 as ListKillswitchesResponses, g3 as ListMetricsData, g4 as ListMetricsError, g5 as ListMetricsErrors, g6 as ListMetricsResponse, g7 as ListMetricsResponse2, g8 as ListMetricsResponses, g9 as ListOpsCommentsData, ga as ListOpsCommentsError, gb as ListOpsCommentsErrors, gc as ListOpsCommentsResponse, gd as ListOpsCommentsResponse2, ge as ListOpsCommentsResponses, gf as ListOpsItemsData, gg as ListOpsItemsError, gh as ListOpsItemsErrors, gi as ListOpsItemsResponse, gj as ListOpsItemsResponse2, gk as ListOpsItemsResponses, gl as ListSlackChannelsData, gm as ListSlackChannelsError, gn as ListSlackChannelsErrors, go as ListSlackChannelsResponse, gp as ListSlackChannelsResponse2, gq as ListSlackChannelsResponses, gr as ListUniversesData, gs as ListUniversesError, gt as ListUniversesErrors, gu as ListUniversesResponse, gv as ListUniversesResponse2, gw as ListUniversesResponses, gx as MeasurePlanResource, gy as MeasurePlanStep, gz as MetricDefaultMinEffectOfInterest, gA as MetricDirection, gB as MetricEventName, gC as MetricName, gD as MetricQueryDsl, gE as MetricWinsorizePct, gF as NotificationTarget, gG as NotifyOpsData, gH as NotifyOpsError, gI as NotifyOpsErrors, gJ as NotifyOpsRequest, gK as NotifyOpsResponse, gL as NotifyOpsResponse2, gM as NotifyOpsResponses, gN as OpsAlertContext, gO as OpsAlertMetricSummary, gP as OpsAlertRuleSummary, gQ as OpsBrowserContext, gR as OpsComment, gS as OpsCommentAuthorType, gT as OpsErrorContext, gU as OpsItemAttachment, gV as OpsItemContext, gW as OpsItemNotifyOrNull, gX as OpsItemPriority, gY as OpsItemPriorityOrNull, gZ as OpsItemRelated, g_ as OpsItemStatus, g$ as OpsMeasurePlanContext, h0 as Options, h1 as PaginationCursor, h2 as PaginationLimit, h3 as ProjectId, h4 as PublishConfigDraftData, h5 as PublishConfigDraftError, h6 as PublishConfigDraftErrors, h7 as PublishConfigDraftRequest, h8 as PublishConfigDraftResponse, h9 as PublishConfigDraftResponse2, ha as PublishConfigDraftResponses, hb as PublishI18nProfileData, hc as PublishI18nProfileError, hd as PublishI18nProfileErrors, he as PublishI18nProfileRequest, hf as PublishI18nProfileResponse, hg as PublishI18nProfileResponse2, hh as PublishI18nProfileResponses, hi as PushI18nKeysData, hj as PushI18nKeysError, hk as PushI18nKeysErrors, hl as PushI18nKeysRequest, hm as PushI18nKeysResponse, hn as PushI18nKeysResponse2, ho as PushI18nKeysResponses, hp as Q, hq as QueryIr, hr as ReanalyzeExperimentData, hs as ReanalyzeExperimentError, ht as ReanalyzeExperimentErrors, hu as ReanalyzeExperimentResponse, hv as ReanalyzeExperimentResponse2, hw as ReanalyzeExperimentResponses, hx as RequestResult, hy as ResolveErrorData, hz as ResolveErrorError, hA as ResolveErrorErrors, hB as ResolveErrorResponse, hC as ResolveErrorResponses, hD as ResourceId, hE as RevokeKeyData, hF as RevokeKeyError, hG as RevokeKeyErrors, hH as RevokeKeyResponse, hI as RevokeKeyResponse2, hJ as RevokeKeyResponses, hK as SaveConfigDraftData, hL as SaveConfigDraftError, hM as SaveConfigDraftErrors, hN as SaveConfigDraftRequest, hO as SaveConfigDraftResponse, hP as SaveConfigDraftResponse2, hQ as SaveConfigDraftResponses, hR as SearchHit, hS as SearchResourcesData, hT as SearchResourcesError, hU as SearchResourcesErrors, hV as SearchResourcesResponse, hW as SearchResourcesResponses, hX as SearchResponse, hY as SetExperimentMetricsData, hZ as SetExperimentMetricsError, h_ as SetExperimentMetricsErrors, h$ as SetExperimentMetricsRequest, i0 as SetExperimentMetricsResponse, i1 as SetExperimentMetricsResponse2, i2 as SetExperimentMetricsResponses, i3 as SetExperimentStatusData, i4 as SetExperimentStatusError, i5 as SetExperimentStatusErrors, i6 as SetExperimentStatusRequest, i7 as SetExperimentStatusResponse, i8 as SetExperimentStatusResponse2, i9 as SetExperimentStatusResponses, ia as SetI18nLabelData, ib as SetI18nLabelError, ic as SetI18nLabelErrors, id as SetI18nLabelRequest, ie as SetI18nLabelResponse, ig as SetI18nLabelResponse2, ih as SetI18nLabelResponses, ii as SetKillswitchSwitchData, ij as SetKillswitchSwitchError, ik as SetKillswitchSwitchErrors, il as SetKillswitchSwitchRequest, im as SetKillswitchSwitchResponse, io as SetKillswitchSwitchResponse2, ip as SetKillswitchSwitchResponses, iq as SetKillswitchValueData, ir as SetKillswitchValueError, is as SetKillswitchValueErrors, it as SetKillswitchValueRequest, iu as SetKillswitchValueResponse, iv as SetKillswitchValueResponse2, iw as SetKillswitchValueResponses, ix as SlackConnectorData, iy as TestConnectorData, iz as TestConnectorError, iA as TestConnectorErrors, iB as TestConnectorResponse, iC as TestConnectorResponse2, iD as TestConnectorResponses, iE as UniverseParam, iF as UniverseParamSchema, iG as UnsetKillswitchSwitchData, iH as UnsetKillswitchSwitchError, iI as UnsetKillswitchSwitchErrors, iJ as UnsetKillswitchSwitchRequest, iK as UnsetKillswitchSwitchResponse, iL as UnsetKillswitchSwitchResponse2, iM as UnsetKillswitchSwitchResponses, iN as UpdateAlertRuleData, iO as UpdateAlertRuleError, iP as UpdateAlertRuleErrors, iQ as UpdateAlertRuleRequest, iR as UpdateAlertRuleResponse, iS as UpdateAlertRuleResponse2, iT as UpdateAlertRuleResponses, iU as UpdateAttributeData, iV as UpdateAttributeError, iW as UpdateAttributeErrors, iX as UpdateAttributeRequest, iY as UpdateAttributeResponse, iZ as UpdateAttributeResponse2, i_ as UpdateAttributeResponses, i$ as UpdateBugRequest, j0 as UpdateClaudeTriggerRequest, j1 as UpdateConfigData, j2 as UpdateConfigError, j3 as UpdateConfigErrors, j4 as UpdateConfigRequest, j5 as UpdateConfigResponse, j6 as UpdateConfigResponse2, j7 as UpdateConfigResponses, j8 as UpdateConfigSchemaData, j9 as UpdateConfigSchemaError, ja as UpdateConfigSchemaErrors, jb as UpdateConfigSchemaRequest, jc as UpdateConfigSchemaResponse, jd as UpdateConfigSchemaResponse2, je as UpdateConfigSchemaResponses, jf as UpdateConnectorData, jg as UpdateConnectorError, jh as UpdateConnectorErrors, ji as UpdateConnectorRequest, jj as UpdateConnectorResponse, jk as UpdateConnectorResponse2, jl as UpdateConnectorResponses, jm as UpdateCopilotTriggerRequest, jn as UpdateCursorTriggerRequest, jo as UpdateErrorStatusData, jp as UpdateErrorStatusError, jq as UpdateErrorStatusErrors, jr as UpdateErrorStatusRequest, js as UpdateErrorStatusResponse, jt as UpdateErrorStatusResponses, ju as UpdateEventData, jv as UpdateEventError, jw as UpdateEventErrors, jx as UpdateEventRequest, jy as UpdateEventResponse, jz as UpdateEventResponse2, jA as UpdateEventResponses, jB as UpdateExperimentData, jC as UpdateExperimentError, jD as UpdateExperimentErrors, jE as UpdateExperimentRequest, jF as UpdateExperimentResponse, jG as UpdateExperimentResponse2, jH as UpdateExperimentResponses, jI as UpdateFeatureRequestRequest, jJ as UpdateGateData, jK as UpdateGateError, jL as UpdateGateErrors, jM as UpdateGateRequest, jN as UpdateGateResponse, jO as UpdateGateResponse2, jP as UpdateGateResponses, jQ as UpdateGateTemplateData, jR as UpdateGateTemplateError, jS as UpdateGateTemplateErrors, jT as UpdateGateTemplateRequest, jU as UpdateGateTemplateResponse, jV as UpdateGateTemplateResponse2, jW as UpdateGateTemplateResponses, jX as UpdateI18nDraftData, jY as UpdateI18nDraftError, jZ as UpdateI18nDraftErrors, j_ as UpdateI18nDraftRequest, j$ as UpdateI18nDraftResponse, k0 as UpdateI18nDraftResponses, k1 as UpdateI18nKeyData, k2 as UpdateI18nKeyError, k3 as UpdateI18nKeyErrors, k4 as UpdateI18nKeyRequest, k5 as UpdateI18nKeyResponse, k6 as UpdateI18nKeyResponse2, k7 as UpdateI18nKeyResponses, k8 as UpdateJulesTriggerRequest, k9 as UpdateKillswitchData, ka as UpdateKillswitchError, kb as UpdateKillswitchErrors, kc as UpdateKillswitchRequest, kd as UpdateKillswitchResponse, ke as UpdateKillswitchResponse2, kf as UpdateKillswitchResponses, kg as UpdateMetricData, kh as UpdateMetricError, ki as UpdateMetricErrors, kj as UpdateMetricFields, kk as UpdateMetricRequest, kl as UpdateMetricResponse, km as UpdateMetricResponses, kn as UpdateMetricWithQuery, ko as UpdateMetricWithQueryIr, kp as UpdateOpsItemData, kq as UpdateOpsItemError, kr as UpdateOpsItemErrors, ks as UpdateOpsItemRequest, kt as UpdateOpsItemResponse, ku as UpdateOpsItemResponse2, kv as UpdateOpsItemResponses, kw as UpdateOpsItemStatusRequest, kx as UpdateProjectData, ky as UpdateProjectError, kz as UpdateProjectErrors, kA as UpdateProjectRequest, kB as UpdateProjectResponse, kC as UpdateProjectResponses, kD as UpdateTriggerConnectorData, kE as UpdateTriggerConnectorError, kF as UpdateTriggerConnectorErrors, kG as UpdateTriggerConnectorRequest, kH as UpdateTriggerConnectorResponse, kI as UpdateTriggerConnectorResponses, kJ as UpdateUniverseData, kK as UpdateUniverseError, kL as UpdateUniverseErrors, kM as UpdateUniverseRequest, kN as UpdateUniverseResponse, kO as UpdateUniverseResponse2, kP as UpdateUniverseResponses, kQ as UpsertProjectData, kR as UpsertProjectError, kS as UpsertProjectErrors, kT as UpsertProjectRequest, kU as UpsertProjectResponse, kV as UpsertProjectResponse2, kW as UpsertProjectResponses, kX as approveEvent, kY as client, kZ as configure, k_ as createAlertRule, k$ as createAttribute, l0 as createClient, l1 as createClientConfig, l2 as createConfig, l3 as createConnector, l4 as createEvent, l5 as createExperiment, l6 as createGate, l7 as createGateTemplate, l8 as createI18nDraft, l9 as createI18nProfile, la as createKey, lb as createKillswitch, lc as createMetric, ld as createOpsComment, le as createOpsItem, lf as createTriggerConnector, lg as createUniverse, lh as deleteAlertRule, li as deleteAttribute, lj as deleteConfig, lk as deleteConnector, ll as deleteEvent, lm as deleteExperiment, ln as deleteGate, lo as deleteGateTemplate, lp as deleteKillswitch, lq as deleteMetric, lr as deleteUniverse, ls as disableGate, lt as discardConfigDraft, lu as enableGate, lv as fileErrorTicket, lw as fireConnector, lx as getAttribute, ly as getConfig, lz as getConnector, lA as getCurrentProject, lB as getError, lC as getErrorSeries, lD as getEvent, lE as getExperiment, lF as getExperimentResults, lG as getExperimentTimeseries, lH as getGateTemplate, lI as getKillswitch, lJ as getMetric, lK as getOpsItem, lL as linkPrToOpsItem, lM as listAlertRules, lN as listAttributes, lO as listConfigActivity, lP as listConfigs, lQ as listConnectors, lR as listErrors, lS as listEvents, lT as listExperiments, lU as listGateTemplates, lV as listGates, lW as listI18nDrafts, lX as listI18nKeys, lY as listI18nProfiles, lZ as listKeys, l_ as listKillswitches, l$ as listMetrics, m0 as listOpsComments, m1 as listOpsItems, m2 as listSlackChannels, m3 as listUniverses, m4 as notifyOps, m5 as publishConfigDraft, m6 as publishI18nProfile, m7 as pushI18nKeys, m8 as reanalyzeExperiment, m9 as resolveError, ma as revokeKey, mb as saveConfigDraft, mc as searchResources, md as setExperimentMetrics, me as setExperimentStatus, mf as setI18nLabel, mg as setKillswitchSwitch, mh as setKillswitchValue, mi as testConnector, mj as unsetKillswitchSwitch, mk as updateAlertRule, ml as updateAttribute, mm as updateConfig, mn as updateConfigSchema, mo as updateConnector, mp as updateErrorStatus, mq as updateEvent, mr as updateExperiment, ms as updateGate, mt as updateGateTemplate, mu as updateI18nDraft, mv as updateI18nKey, mw as updateKillswitch, mx as updateMetric, my as updateOpsItem, mz as updateProject, mA as updateTriggerConnector, mB as updateUniverse, mC as upsertProject } from './client-DO5HTb_L.js';
3
3
 
4
4
  /**
5
5
  * The canonical `ErrorCode` catalogue as a runtime array — derived from the
package/dist/index.js CHANGED
@@ -17,6 +17,7 @@ import {
17
17
  createKey,
18
18
  createKillswitch,
19
19
  createMetric,
20
+ createOpsComment,
20
21
  createOpsItem,
21
22
  createTriggerConnector,
22
23
  createUniverse,
@@ -67,6 +68,7 @@ import {
67
68
  listKeys,
68
69
  listKillswitches,
69
70
  listMetrics,
71
+ listOpsComments,
70
72
  listOpsItems,
71
73
  listSlackChannels,
72
74
  listUniverses,
@@ -75,6 +77,7 @@ import {
75
77
  publishI18nProfile,
76
78
  pushI18nKeys,
77
79
  reanalyzeExperiment,
80
+ resolveError,
78
81
  revokeKey,
79
82
  saveConfigDraft,
80
83
  searchResources,
@@ -104,10 +107,10 @@ import {
104
107
  updateTriggerConnector,
105
108
  updateUniverse,
106
109
  upsertProject
107
- } from "./chunk-643YSMLU.js";
110
+ } from "./chunk-LYNWK55D.js";
108
111
  import {
109
112
  zErrorCode
110
- } from "./chunk-MRW3DJ57.js";
113
+ } from "./chunk-PRN4AEAM.js";
111
114
 
112
115
  // src/errors.ts
113
116
  var ERROR_CODES = zErrorCode.options;
@@ -168,6 +171,7 @@ export {
168
171
  createKey,
169
172
  createKillswitch,
170
173
  createMetric,
174
+ createOpsComment,
171
175
  createOpsItem,
172
176
  createTriggerConnector,
173
177
  createUniverse,
@@ -221,6 +225,7 @@ export {
221
225
  listKeys,
222
226
  listKillswitches,
223
227
  listMetrics,
228
+ listOpsComments,
224
229
  listOpsItems,
225
230
  listSlackChannels,
226
231
  listUniverses,
@@ -229,6 +234,7 @@ export {
229
234
  publishI18nProfile,
230
235
  pushI18nKeys,
231
236
  reanalyzeExperiment,
237
+ resolveError,
232
238
  revokeKey,
233
239
  saveConfigDraft,
234
240
  searchResources,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/errors.ts"],"sourcesContent":["import { zErrorCode } from \"./generated/zod.gen.js\";\nimport type { Error as ApiErrorBody, ErrorCode } from \"./generated/types.gen.js\";\n\nexport type { ErrorCode };\nexport type { ApiErrorBody };\n\n/**\n * The canonical `ErrorCode` catalogue as a runtime array — derived from the\n * generated Zod enum so it can never drift from the spec. Mirrors\n * `@shipeasy/core`'s `ErrorCode`; the parity test (`scripts/check-drift.mjs`)\n * asserts every `x-error-codes` entry in the spec is one of these.\n */\nexport const ERROR_CODES = zErrorCode.options as readonly ErrorCode[];\n\n/** Type guard for the uniform `{ error, code?, detail? }` error envelope. */\nexport function isApiErrorBody(value: unknown): value is ApiErrorBody {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"error\" in value &&\n typeof (value as { error: unknown }).error === \"string\"\n );\n}\n\n/** Narrow an error body to a known `ErrorCode`, or `undefined` if uncatalogued. */\nexport function errorCodeOf(value: unknown): ErrorCode | undefined {\n if (!isApiErrorBody(value)) return undefined;\n const code = value.code;\n return code && (ERROR_CODES as readonly string[]).includes(code) ? code : undefined;\n}\n\n/** Which binary is reporting the failure — determines which command to tell the caller to run. */\nexport type AuthSurface = \"cli\" | \"mcp\";\n\nconst REAUTH_COMMAND: Record<AuthSurface, string> = {\n cli: \"shipeasy login --force\",\n mcp: \"shipeasy-mcp install --force\",\n};\n\n/**\n * Structured, agent-parseable remediation text for an admin-API auth failure\n * (401/403) — shared by the CLI's and MCP's error printers so every command\n * and every tool call reports auth failures the same way. The leading\n * `AUTH_REQUIRED:` / `AUTH_FORBIDDEN:` token is a stable marker a calling\n * agent can grep for; everything after it is human-readable remediation.\n *\n * Returns `undefined` for non-auth statuses so callers fall back to their\n * normal error formatting.\n */\nexport function formatAuthFailure(\n surface: AuthSurface,\n status: number,\n message: string,\n): string | undefined {\n const reauth = REAUTH_COMMAND[surface];\n if (status === 401) {\n return [\n `AUTH_REQUIRED: ${message} (401)`,\n ``,\n `Cause: the request's Shipeasy credentials are missing, invalid, or expired.`,\n `Fix:`,\n ` 1. Run: ${reauth}`,\n ` 2. Retry the command that failed.`,\n ].join(\"\\n\");\n }\n if (status === 403) {\n return [\n `AUTH_FORBIDDEN: ${message} (403)`,\n ``,\n `Cause: the credentials are valid but don't have access to this project or resource.`,\n `Fix:`,\n ` 1. Confirm the bound project is correct (check the .shipeasy file, or run: shipeasy root --json).`,\n ` 2. If it's the wrong project, run: shipeasy bind <project_id>.`,\n ` 3. If it's the right project, ask a workspace admin to grant access — retrying will not help.`,\n ].join(\"\\n\");\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAM,cAAc,WAAW;AAG/B,SAAS,eAAe,OAAuC;AACpE,SACE,OAAO,UAAU,YACjB,UAAU,QACV,WAAW,SACX,OAAQ,MAA6B,UAAU;AAEnD;AAGO,SAAS,YAAY,OAAuC;AACjE,MAAI,CAAC,eAAe,KAAK,EAAG,QAAO;AACnC,QAAM,OAAO,MAAM;AACnB,SAAO,QAAS,YAAkC,SAAS,IAAI,IAAI,OAAO;AAC5E;AAKA,IAAM,iBAA8C;AAAA,EAClD,KAAK;AAAA,EACL,KAAK;AACP;AAYO,SAAS,kBACd,SACA,QACA,SACoB;AACpB,QAAM,SAAS,eAAe,OAAO;AACrC,MAAI,WAAW,KAAK;AAClB,WAAO;AAAA,MACL,kBAAkB,OAAO;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,MAAM;AAAA,MACnB;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACA,MAAI,WAAW,KAAK;AAClB,WAAO;AAAA,MACL,mBAAmB,OAAO;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/errors.ts"],"sourcesContent":["import { zErrorCode } from \"./generated/zod.gen.js\";\nimport type { Error as ApiErrorBody, ErrorCode } from \"./generated/types.gen.js\";\n\nexport type { ErrorCode };\nexport type { ApiErrorBody };\n\n/**\n * The canonical `ErrorCode` catalogue as a runtime array — derived from the\n * generated Zod enum so it can never drift from the spec. Mirrors\n * `@shipeasy/core`'s `ErrorCode`; the parity test (`scripts/check-drift.mjs`)\n * asserts every `x-error-codes` entry in the spec is one of these.\n */\nexport const ERROR_CODES = zErrorCode.options as readonly ErrorCode[];\n\n/** Type guard for the uniform `{ error, code?, detail? }` error envelope. */\nexport function isApiErrorBody(value: unknown): value is ApiErrorBody {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"error\" in value &&\n typeof (value as { error: unknown }).error === \"string\"\n );\n}\n\n/** Narrow an error body to a known `ErrorCode`, or `undefined` if uncatalogued. */\nexport function errorCodeOf(value: unknown): ErrorCode | undefined {\n if (!isApiErrorBody(value)) return undefined;\n const code = value.code;\n return code && (ERROR_CODES as readonly string[]).includes(code) ? code : undefined;\n}\n\n/** Which binary is reporting the failure — determines which command to tell the caller to run. */\nexport type AuthSurface = \"cli\" | \"mcp\";\n\nconst REAUTH_COMMAND: Record<AuthSurface, string> = {\n cli: \"shipeasy login --force\",\n mcp: \"shipeasy-mcp install --force\",\n};\n\n/**\n * Structured, agent-parseable remediation text for an admin-API auth failure\n * (401/403) — shared by the CLI's and MCP's error printers so every command\n * and every tool call reports auth failures the same way. The leading\n * `AUTH_REQUIRED:` / `AUTH_FORBIDDEN:` token is a stable marker a calling\n * agent can grep for; everything after it is human-readable remediation.\n *\n * Returns `undefined` for non-auth statuses so callers fall back to their\n * normal error formatting.\n */\nexport function formatAuthFailure(\n surface: AuthSurface,\n status: number,\n message: string,\n): string | undefined {\n const reauth = REAUTH_COMMAND[surface];\n if (status === 401) {\n return [\n `AUTH_REQUIRED: ${message} (401)`,\n ``,\n `Cause: the request's Shipeasy credentials are missing, invalid, or expired.`,\n `Fix:`,\n ` 1. Run: ${reauth}`,\n ` 2. Retry the command that failed.`,\n ].join(\"\\n\");\n }\n if (status === 403) {\n return [\n `AUTH_FORBIDDEN: ${message} (403)`,\n ``,\n `Cause: the credentials are valid but don't have access to this project or resource.`,\n `Fix:`,\n ` 1. Confirm the bound project is correct (check the .shipeasy file, or run: shipeasy root --json).`,\n ` 2. If it's the wrong project, run: shipeasy bind <project_id>.`,\n ` 3. If it's the right project, ask a workspace admin to grant access — retrying will not help.`,\n ].join(\"\\n\");\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAM,cAAc,WAAW;AAG/B,SAAS,eAAe,OAAuC;AACpE,SACE,OAAO,UAAU,YACjB,UAAU,QACV,WAAW,SACX,OAAQ,MAA6B,UAAU;AAEnD;AAGO,SAAS,YAAY,OAAuC;AACjE,MAAI,CAAC,eAAe,KAAK,EAAG,QAAO;AACnC,QAAM,OAAO,MAAM;AACnB,SAAO,QAAS,YAAkC,SAAS,IAAI,IAAI,OAAO;AAC5E;AAKA,IAAM,iBAA8C;AAAA,EAClD,KAAK;AAAA,EACL,KAAK;AACP;AAYO,SAAS,kBACd,SACA,QACA,SACoB;AACpB,QAAM,SAAS,eAAe,OAAO;AACrC,MAAI,WAAW,KAAK;AAClB,WAAO;AAAA,MACL,kBAAkB,OAAO;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,MAAM;AAAA,MACnB;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACA,MAAI,WAAW,KAAK;AAClB,WAAO;AAAA,MACL,mBAAmB,OAAO;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACA,SAAO;AACT;","names":[]}