oh-my-agent 19.0.1 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -15
- package/bin/cli-main.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
Spawning parallel agents is the easy part. The hard part is knowing whether they actually did the work. "Tests pass, all criteria met" costs an agent nothing to say, and nothing inside that same session can contradict it.
|
|
10
10
|
|
|
11
|
-
oh-my-agent makes the claim falsifiable. A Stop hook refuses to end your session until your project's own `typecheck` / `test` / `lint` script exits 0. A gate command decides whether a workflow really ran by looking for the artifacts it must have left behind — and its JSON verdict, not the agent's summary, is the result.
|
|
11
|
+
oh-my-agent makes the claim falsifiable. A Stop hook refuses to end your session until your project's own `typecheck` / `test` / `lint` script exits 0. A gate command decides whether a workflow really ran by looking for the artifacts it must have left behind — and its JSON verdict, not the agent's summary, is the result. In `/ralph`, the workflow prompt dispatches a judge, briefed on the criteria only, that re-verifies every criterion each round, including the ones that already passed. Gate decisions are appended to a per-session event log that you can read afterwards with `oma state`. Then it runs that same discipline across a dozen agent runtimes from one portable `.agents/` directory.
|
|
12
12
|
|
|
13
13
|
Follow [Quick Start](https://github.com/first-fluke/oh-my-agent/blob/main/web/docs/getting-started/quick-start.md) to choose a skill preset, run `oma doctor`, and ask a named skill for one scoped change. Record the file, check command, and exit status.
|
|
14
14
|
|
|
@@ -72,7 +72,7 @@ Pick a preset and you're ready:
|
|
|
72
72
|
<sub>native + adapter</sub>
|
|
73
73
|
</td>
|
|
74
74
|
<td align="center">
|
|
75
|
-
<a href="https://antigravity.google"><img src="
|
|
75
|
+
<a href="https://antigravity.google"><img src="https://github.com/first-fluke/oh-my-agent/raw/main/docs/assets/agents/antigravity.png" alt="Antigravity" width="48" height="48" /></a><br/>
|
|
76
76
|
<strong>Antigravity</strong><br/>
|
|
77
77
|
<sub>native SSOT</sub>
|
|
78
78
|
</td>
|
|
@@ -94,17 +94,17 @@ Pick a preset and you're ready:
|
|
|
94
94
|
</tr>
|
|
95
95
|
<tr>
|
|
96
96
|
<td align="center">
|
|
97
|
-
<a href="https://pi.dev/"><img src="
|
|
97
|
+
<a href="https://pi.dev/"><img src="https://github.com/first-fluke/oh-my-agent/raw/main/docs/assets/agents/pi.svg" alt="Pi" width="48" height="48" /></a><br/>
|
|
98
98
|
<strong>Pi</strong><br/>
|
|
99
99
|
<sub>native-compatible</sub>
|
|
100
100
|
</td>
|
|
101
101
|
<td align="center">
|
|
102
|
-
<a href="https://github.com/anomalyco/opencode"><img src="
|
|
102
|
+
<a href="https://github.com/anomalyco/opencode"><img src="https://github.com/first-fluke/oh-my-agent/raw/main/docs/assets/agents/opencode.png" alt="OpenCode" width="48" height="48" /></a><br/>
|
|
103
103
|
<strong>OpenCode</strong><br/>
|
|
104
104
|
<sub>native-compatible</sub>
|
|
105
105
|
</td>
|
|
106
106
|
<td align="center">
|
|
107
|
-
<a href="https://ampcode.com"><img src="
|
|
107
|
+
<a href="https://ampcode.com"><img src="https://github.com/first-fluke/oh-my-agent/raw/main/docs/assets/agents/amp.png" alt="Amp" width="48" height="48" /></a><br/>
|
|
108
108
|
<strong>Amp</strong><br/>
|
|
109
109
|
<sub>native-compatible</sub>
|
|
110
110
|
</td>
|
|
@@ -114,19 +114,19 @@ Pick a preset and you're ready:
|
|
|
114
114
|
<sub>symlinked skills</sub>
|
|
115
115
|
</td>
|
|
116
116
|
<td align="center">
|
|
117
|
-
<a href="https://grok.x.ai"><img src="
|
|
117
|
+
<a href="https://grok.x.ai"><img src="https://github.com/first-fluke/oh-my-agent/raw/main/docs/assets/agents/grok.png" alt="Grok Build" width="48" height="48" /></a><br/>
|
|
118
118
|
<strong>Grok Build</strong><br/>
|
|
119
119
|
<sub>native hooks</sub>
|
|
120
120
|
</td>
|
|
121
121
|
<td align="center">
|
|
122
|
-
<a href="https://kiro.dev"><img src="
|
|
122
|
+
<a href="https://kiro.dev"><img src="https://github.com/first-fluke/oh-my-agent/raw/main/docs/assets/agents/kiro.png" alt="Kiro CLI" width="48" height="48" /></a><br/>
|
|
123
123
|
<strong>Kiro CLI</strong><br/>
|
|
124
124
|
<sub>native hooks + agents</sub>
|
|
125
125
|
</td>
|
|
126
126
|
</tr>
|
|
127
127
|
</table>
|
|
128
128
|
|
|
129
|
-
<p align="center"><sub><a href="
|
|
129
|
+
<p align="center"><sub><a href="https://github.com/first-fluke/oh-my-agent/blob/main/docs/SUPPORTED_AGENTS.md">& more</a></sub></p>
|
|
130
130
|
|
|
131
131
|
## Your Engineering Team
|
|
132
132
|
|
|
@@ -185,14 +185,14 @@ Separate from the engineering team, oma ships content and research pipelines bui
|
|
|
185
185
|
|
|
186
186
|
### Orca IDE
|
|
187
187
|
|
|
188
|
-
[OMA for Orca](integrations/orca/README.md) adds a sidebar panel and command-palette
|
|
188
|
+
[OMA for Orca](https://github.com/first-fluke/oh-my-agent/blob/main/integrations/orca/README.md) adds a sidebar panel and command-palette
|
|
189
189
|
actions for project setup, review, debugging, verification, and local results.
|
|
190
190
|
It uses your existing Orca agent terminal and project OMA installation. Requires
|
|
191
191
|
Orca 1.4.197+ with experimental plugins enabled.
|
|
192
192
|
|
|
193
193
|
### DeepSeek Harness
|
|
194
194
|
|
|
195
|
-
[OMA for DeepSeek Harness](integrations/dsh/README.md) connects project OMA checks
|
|
195
|
+
[OMA for DeepSeek Harness](https://github.com/first-fluke/oh-my-agent/blob/main/integrations/dsh/README.md) connects project OMA checks
|
|
196
196
|
to DSH tool execution and turn completion through a Cordis plugin. DSH discovers
|
|
197
197
|
the existing `.agents/skills` directly. The plugin ships executable JavaScript
|
|
198
198
|
and requires no build. See the integration guide for installation, tested versions,
|
|
@@ -224,7 +224,7 @@ Or use slash commands for structured workflows:
|
|
|
224
224
|
| 3 | `/work` | Builds your feature step by step across multiple agents |
|
|
225
225
|
| 3 | `/orchestrate` | Runs multiple agents in parallel to build your feature faster |
|
|
226
226
|
| 3 | `/ultrawork` | Builds your feature through five gated quality phases; every review runs in a fresh, isolated reviewer session (cross-context review) |
|
|
227
|
-
| 3 | `/ralph` | Repeats `/ultrawork` until
|
|
227
|
+
| 3 | `/ralph` | Repeats `/ultrawork` until its judge passes every criterion |
|
|
228
228
|
| 4 | `/review` | Reviews your code for security, performance, and accessibility issues |
|
|
229
229
|
| 4 | `/security` | Scans security targets, validates findings, and applies CI gates |
|
|
230
230
|
| 5 | `/debug` | Finds the root cause, fixes the bug, and writes a regression test |
|
|
@@ -232,7 +232,7 @@ Or use slash commands for structured workflows:
|
|
|
232
232
|
| 6 | `/scm` | Manages your branches, merges, and Conventional Commits |
|
|
233
233
|
| - | `/schedule` | Schedules an agent job to run on a recurring interval |
|
|
234
234
|
|
|
235
|
-
**Auto-detection**: You don't even need slash commands — keywords like "architecture", "plan", "review", and "debug" in your message (in 11 languages!) auto-activate the right workflow. Detection accuracy is measured, not assumed: `oma verify triggers` scores the detector against a labeled
|
|
235
|
+
**Auto-detection**: You don't even need slash commands — keywords like "architecture", "plan", "review", and "debug" in your message (in 11 languages!) auto-activate the right workflow. Detection accuracy is measured, not assumed: `oma verify triggers` scores the detector against a labeled English and Korean prompt corpus, and CI fails if false fires exceed 10% or missed fires exceed 20% (re-measured 2026-10-13: **0% missed-fire**, 5.3% false-fire).
|
|
236
236
|
|
|
237
237
|
### Per-Agent Models
|
|
238
238
|
|
|
@@ -252,17 +252,19 @@ agents:
|
|
|
252
252
|
|
|
253
253
|
## Verification, Not Narration
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
Every mechanism below except the prompted judge is mechanical: a command exits 0 or it doesn't, a file is on disk or it isn't. None of those asks an LLM whether the work "looks correct."
|
|
256
256
|
|
|
257
257
|
| Mechanism | What it mechanically checks | Where it lives |
|
|
258
258
|
|-----------|------------------------------|----------------|
|
|
259
259
|
| **Stop-hook gate** | Blocks session termination while a persistent workflow is active, and runs the configured gate script before allowing a stop. Only `typecheck`, `test`, and `lint` are executable — an agent that writes anything else into the state file gets it ignored, never run. Capped at 5 reinforcements so a permanently red gate can't trap you. | [`.agents/hooks/core/persistent-mode.ts`](https://github.com/first-fluke/oh-my-agent/blob/main/.agents/hooks/core/persistent-mode.ts) |
|
|
260
260
|
| **Anti-Circumvention Gate** | `oma ralph verify --json` checks four artifacts a shortcut can't fake: ultrawork's phase records, the plan JSON, a **distinct QA agent's** result file, and a **distinct refactor agent's** result file. Missing artifacts mean the phase did not run, whatever the narration says. | [`.agents/workflows/ralph.md`](https://github.com/first-fluke/oh-my-agent/blob/main/.agents/workflows/ralph.md) |
|
|
261
|
-
| **
|
|
262
|
-
| **Event-sourced state** |
|
|
261
|
+
| **Prompted judge** | Not mechanical: the `/ralph` workflow prompt tells the orchestrator to spawn the judge as a separate agent with fresh context, briefed on the criteria only — never on what the implementer claims it fixed — and to re-verify **every** criterion each iteration, including prior PASSes, because fixing C2 is how C1 silently regresses. Nothing checks that the spawn happened: `oma ralph verify` gates the EXEC artifacts, not the judge, and a runtime that cannot spawn subagents is told to judge inline and record `ralph.judge-inline-fallback`. | [`judge-protocol.md`](https://github.com/first-fluke/oh-my-agent/blob/main/.agents/workflows/ralph/resources/judge-protocol.md) |
|
|
262
|
+
| **Event-sourced state** | In an OMA session, every gate pass, gate failure, and decision appends one JSON line to the session's `events.jsonl`, stamped with vendor and runtime session id. Append-only, cross-vendor, auditable after the run. Find the session with `oma state list` and read its events with `oma state get <sid>`; the file's location depends on `OMA_HOME`, `OMA_STATE_HOME`, `OMA_PROFILE`, and older project-local session folders, so don't hard-code it. | [`state-core.ts`](https://github.com/first-fluke/oh-my-agent/blob/main/.agents/hooks/core/state-core.ts) · [`event-spec.md`](https://github.com/first-fluke/oh-my-agent/blob/main/.agents/skills/_shared/runtime/event-spec.md) |
|
|
263
263
|
| **Per-agent check battery** | `oma verify <agent>` runs a shared core (scope violation, charter alignment, hardcoded secrets, TODO scan, declared outputs) plus type-specific checks (TypeScript strict, tests, raw SQL, Flutter analyze, inline styles). | `oma verify <agent>` |
|
|
264
264
|
| **Skill eval harness** | `oma skill eval` measures utility lift on held-out tasks — treatment vs. baseline — instead of assuming a skill helps. `oma skill optimize` keeps only edits that improve the measured lift. | [skill-eval guide](https://github.com/first-fluke/oh-my-agent/blob/main/web/docs/guide/skill-eval.md) |
|
|
265
265
|
|
|
266
|
+
> **No session, no trail.** The Stop hook records gate events under the OMA session opened when the persistent workflow started. If that session could not be created (stderr shows `[oma] L1 session activation failed`), a failing gate still blocks the stop, but no `gate.failed` line is written. Before you rely on the trail, or demo it, check that `oma state list` shows an active session.
|
|
267
|
+
|
|
266
268
|
Budgets are enforced the same way. `session.quota_cap` caps tokens, spawn count, and per-vendor spend; the orchestrator refuses the next spawn when a dimension is exceeded. When the wall-clock budget runs out, the Stop hook stops honestly with partial status recorded on the event log, rather than pretending completion.
|
|
267
269
|
|
|
268
270
|
### Control Boundary
|
package/bin/cli-main.js
CHANGED
|
@@ -24,7 +24,7 @@ Expecting one of '${r.join("', '")}'`);if(this._lifeCycleHooks[e])this._lifeCycl
|
|
|
24
24
|
`),this.outputHelp({error:!0});let r=t||{},n=r.exitCode||1,i=r.code||"commander.error";this._exit(n,i,e)}_parseOptionsEnv(){this.options.forEach((e)=>{if(e.envVar&&e.envVar in Dr.env){let t=e.attributeName();if(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))if(e.required||e.optional)this.emit(`optionEnv:${e.name()}`,Dr.env[e.envVar]);else this.emit(`optionEnv:${e.name()}`)}})}_parseOptionsImplied(){let e=new wV(this.options),t=(r)=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter((r)=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach((r)=>{Object.keys(r.implied).filter((n)=>!t(n)).forEach((n)=>{this.setOptionValueWithSource(n,r.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=(o)=>{let s=o.attributeName(),a=this.getOptionValue(s),c=this.options.find((u)=>u.negate&&s===u.attributeName()),l=this.options.find((u)=>!u.negate&&s===u.attributeName());if(c&&(c.presetArg===void 0&&a===!1||c.presetArg!==void 0&&a===c.presetArg))return c;return l||o},n=(o)=>{let s=r(o),a=s.attributeName();if(this.getOptionValueSource(a)==="env")return`environment variable '${s.envVar}'`;return`option '${s.flags}'`},i=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let o=i.createHelp().visibleOptions(i).filter((s)=>s.long).map((s)=>s.long);n=n.concat(o),i=i.parent}while(i&&!i._enablePositionalOptions);t=AV(e,n)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",n=e.length,i=this.parent?` for '${this.name()}'`:"",o=e.join(", "),s=`error: too many arguments${i}. Expected ${t} argument${r} but got ${n}: ${o}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach((i)=>{if(n.push(i.name()),i.alias())n.push(i.alias())}),t=AV(e,n)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let n=this.createOption(t,r);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
25
25
|
`),this._exit(0,"commander.version",e)}),this}description(e,t){if(e===void 0&&t===void 0)return this._description;if(this._description=e,t)this._argsDescription=t;return this}summary(e){if(e===void 0)return this._summary;return this._summary=e,this}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)t=this.commands[this.commands.length-1];if(e===t._name)throw Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let n=[r.name()].concat(r.aliases()).join("|");throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){if(e===void 0)return this._aliases;return e.forEach((t)=>this.alias(t)),this}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map((r)=>M_(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){if(e===void 0)return this._name;return this._name=e,this}helpGroup(e){if(e===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=e,this}commandsGroup(e){if(e===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=e,this}optionsGroup(e){if(e===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=e,this}_initOptionGroup(e){if(this._defaultOptionGroup&&!e.helpGroupHeading)e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){if(this._defaultCommandGroup&&!e.helpGroup())e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=k4.basename(e,k4.extname(e)),this}executableDir(e){if(e===void 0)return this._executableDir;return this._executableDir=e,this}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let n=t.formatHelp(this,t);if(r.hasColors)return n;return this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let t=!!e.error,r,n,i;if(t)r=(s)=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth();else r=(s)=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth();return{error:t,write:(s)=>{if(!n)s=this._outputConfiguration.stripColor(s);return r(s)},hasColors:n,helpWidth:i}}outputHelp(e){let t;if(typeof e==="function")t=e,e=void 0;let r=this._getOutputContext(e),n={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach((o)=>o.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:r.error});if(t){if(i=t(i),typeof i!=="string"&&!Buffer.isBuffer(i))throw Error("outputHelp callback must return a string or a Buffer")}if(r.write(i),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",n),this._getCommandAndAncestors().forEach((o)=>o.emit("afterAllHelp",n))}helpOption(e,t){if(typeof e==="boolean"){if(e){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),e||t)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(Dr.exitCode??0);if(t===0&&e&&typeof e!=="function"&&e.error)t=1;this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
26
26
|
Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,(i)=>{let o;if(typeof t==="function")o=t({error:i.error,command:i.command});else o=t;if(o)i.write(`${o}
|
|
27
|
-
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();if(t&&e.find((n)=>t.is(n)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}});var PKr;var gm=v(()=>{D_();N7e();Qv();kV();xV();PKr=new Nu});var w4;var eb=v(()=>{w4={name:"oh-my-agent",version:"19.0.1",description:"Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",type:"module",bin:{"oh-my-agent":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin","assets/serena"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs","generate:skill-data":"node ./scripts/generate-skill-data.mjs",build:"bun run generate:skill-data && bun run sync:readme && bun build cli.ts --outfile bin/cli-main.js --target node --minify --external @napi-rs/keyring --external jsonc-parser && node ./scripts/write-bin-entry.mjs && bun run check:bundle",dev:"bun run generate:skill-data && bun run cli.ts",lint:"biome check .","lint:fix":"biome check --write --unsafe .","check:boundaries":"node ./scripts/check-boundaries.mjs","check:bundle":"node ./scripts/check-bundle.mjs","check:emit-drift":"node ./scripts/check-emit-drift.mjs",test:"vitest run","test:coverage":"vitest run --coverage",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.7.0","@dagrejs/dagre":"^3.1.1","@date-fns/tz":"^1.5.0","@napi-rs/keyring":"^1.3.0",axios:"^1.18.1","better-sqlite3":"^13.0.2",chokidar:"^5.0.0",commander:"^15.0.0","date-fns":"^4.4.0",eld:"^2.0.3","fast-xml-parser":"^5.10.1","jsonc-parser":"^3.3.1",minimatch:"^10.2.6","p-map":"^7.0.6",picocolors:"^1.1.1","puppeteer-core":"^25.4.0",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","smol-toml":"^1.7.1",unified:"^11.0.5",ws:"^8.21.1",yaml:"^2.9.0",zod:"^4.4.3"},optionalDependencies:{pptxgenjs:"^4.0.1"},devDependencies:{"@babel/parser":"7.29.3","@biomejs/biome":"^2.5.6","@types/better-sqlite3":"^7.6.13","@types/mdast":"^4.0.4","@types/node":"^26.1.2","@types/ws":"^8.18.1","@vitest/coverage-v8":"^4.1.10",typescript:"^7.0.2",vitest:"^4.1.10"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},homepage:"https://firstfluke.com/oh-my-agent",bugs:{url:"https://github.com/first-fluke/oh-my-agent/issues"},antigravity:{skillsPath:".agents/skills",skills:["oma-architecture","oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestration","oma-dev-workflow","oma-tf-infra","oma-scm","oma-pdf","oma-recap"]}}});import{homedir as F7e}from"node:os";import{isAbsolute as Kkt,join as Jkt,resolve as Xkt}from"node:path";function z7e(e,t){let r=Array.from(e).some((n)=>{let i=n.charCodeAt(0);return i<32||i===127});if(!Kkt(e)||r)throw Error(`${t} must be an absolute path without control characters`);return Xkt(e)}function qr(e=process.env,t=F7e()){return z7e(e.OMA_HOME||Jkt(t,".oma"),"OMA_HOME")}function fs(e=process.env,t=F7e()){return e.OMA_STATE_HOME===void 0?qr(e,t):z7e(e.OMA_STATE_HOME,"OMA_STATE_HOME")}var N_=()=>{};import{homedir as Ykt}from"node:os";import{join as tb}from"node:path";function cc(e=process.env,t=Ykt()){let r=qr(e,t),n=tb(r,"state");return{home:r,definitions:tb(r,".agents"),state:n,serena:tb(n,"serena"),schedule:tb(r,"schedule"),backup:tb(r,"backup")}}var ci=v(()=>{N_();N_()});import*as Fu from"node:fs";import{homedir as Zkt}from"node:os";import*as xl from"node:path";function U7e(e){if(F_)throw Error("install context already set in this process");F_=e}function H7e(){if(F_===null)throw Error("install context not set — entry point must call setInstallContext()");return F_}function x4(){return H7e().installRoot}function yi(){return H7e().mode}function kt(){try{return yi()}catch{return"project"}}function cg(){try{return x4()}catch{return process.cwd()}}function z_(e,t,r=Zkt()){return t==="project"&&xl.resolve(e)===xl.resolve(r)}function G7e(e){if(e.global===!0||process.env.OMA_INSTALL_GLOBAL==="1"){let r=qr();return Qkt(r),{installRoot:r,mode:"global"}}return{installRoot:process.cwd(),mode:"project"}}function Qkt(e){if(!xl.isAbsolute(e))throw Error("OMA_HOME must be absolute path");for(let n of B7e)if(e===n||e.startsWith(n+xl.sep))throw Error(`OMA_HOME=${e} is forbidden (system path ${n})`);let t,r=xl.resolve(e);try{while(!Fu.existsSync(r)){let n=xl.dirname(r);if(n===r)break;r=n}if(t=Fu.realpathSync(r),!Fu.statSync(t).isDirectory())throw Error("nearest existing ancestor is not a directory")}catch(n){let i=n instanceof Error?n.message:String(n);throw Error(`OMA_HOME=${e}: ${i}`)}for(let n of B7e)if(t===n||t.startsWith(n+xl.sep))throw Error(`OMA_HOME=${e} is forbidden (system path ${n})`);try{Fu.accessSync(t,Fu.constants.W_OK)}catch{throw Error(`OMA_HOME=${e} is not writable`)}}var F_=null,B7e;var vi=v(()=>{ci();B7e=["/etc","/usr","/bin","/boot","/sys","/proc"]});import{join as owt}from"node:path";function vm(e){return e.endsWith("/")?e:`${e}/`}function l2(e,t){let r=t.split("/").filter((n)=>n.length>0);return owt(e,...r)}var nr=".agents",ym,bi,S1,XKr,YKr,ZKr,swt=".antigravitycli",V7e,awt=".migration-backup",cwt="docs/plans",lwt=".qwen/tmp",uwt,dwt,pwt,fwt,mwt,hwt,gwt,EV;var un=v(()=>{ym=`${nr}/skills`,bi=`${nr}/results`,S1=`${nr}/state`,XKr=`${S1}/sessions`,YKr=`${S1}/retry`,ZKr=`${S1}/archive`,V7e=`${nr}/backup`;uwt=vm(bi),dwt=vm(S1),pwt=vm(swt),fwt=vm(V7e),mwt=vm(awt),hwt=vm(cwt),gwt=vm(lwt),EV=[".agents/oma-config.local.cue",".agents/oma-config.local.yaml",pwt,uwt,dwt,fwt,hwt,mwt,gwt]});var dn="first-fluke/oh-my-agent",Ht,Al,$V,ywt,vwt,A4,Zn;var u2=v(()=>{un();Ht=ym,Al=["antigravity","claude","codex","commandcode","cursor","grok","kimi","kiro","qwen"],$V=["pi","opencode"],ywt=["copilot","hermes"],vwt=["zcode"],A4=[...Al,...$V,...ywt,...vwt].sort(),Zn={antigravity:{projectPath:".gemini/antigravity-cli/skills",homePath:".gemini/antigravity-cli/skills",requiresHomeConsent:!0},claude:{projectPath:".claude/skills",homePath:".claude/skills"},codex:{projectPath:".codex/skills",homePath:".codex/skills"},commandcode:{projectPath:".commandcode/skills",homePath:".commandcode/skills",optIn:!0},copilot:{projectPath:".github/skills",homePath:".copilot/skills"},cursor:{projectPath:".cursor/skills",homePath:".cursor/skills"},hermes:{projectPath:".hermes/skills/oma",homePath:".hermes/skills/oma",requiresHomeConsent:!0},kimi:{projectPath:".kimi-code/skills",homePath:".kimi-code/skills",requiresHomeConsent:!0,optIn:!0},kiro:{projectPath:".kiro/skills",homePath:".kiro/skills",optIn:!0},opencode:{projectPath:".opencode/skills",homePath:".opencode/skills"},qwen:{projectPath:".qwen/skills",homePath:".qwen/skills"}}});function ue(e,t="Output as JSON"){return e.option("--json",t).option("--output <format>","Output format (text/json)",(r)=>{let n=r.trim().toLowerCase();if(!rb.includes(n))throw Error(`Invalid output format: ${r}. Expected one of ${rb.join(", ")}`);return n})}function bwt(e){if(e?.json)return"json";let t=e?.output?.trim().toLowerCase();if(t&&rb.includes(t))return t;if(process.env[J7e]?.trim().toLowerCase()==="json")return"json";return"text"}function de(e){return bwt(e)==="json"}function X7e(e){let t=e.at(-1);return t instanceof Nu?t:null}function kwt(e){let t=X7e(e);if(t)return t.opts();let r=e.at(-1);return r&&typeof r==="object"?r:{}}function wwt(e){if(e instanceof Error)return e.message;return String(e)}function E1(e){throw Error(e)}function _V(e,t){for(let r of e){let n=r.charCodeAt(0);if(n>=0&&n<=31||n===127)E1(`${t} must not contain control characters`)}}function xwt(e,t){if(_V(e,t),/[?#%]/.test(e))E1(`${t} must not contain ?, #, or %`);if(e.includes(".."))E1(`${t} must not contain '..'`)}function Awt(e,t){_V(e,t);try{new URL(e)}catch{E1(`${t} must be a valid absolute URL`)}}function CV(e,t,r="text"){if(typeof e==="string"){if(r==="identifier"){xwt(e,t);return}if(r==="url"){Awt(e,t);return}_V(e,t);return}if(Array.isArray(e))for(let[n,i]of e.entries())CV(i,`${t}[${n}]`,r)}function K7e(e){let t=e.toLowerCase();if(t==="url"||t.endsWith("url"))return"url";if(t.includes("id")||t.includes("type")||t.includes("vendor")||t.includes("session"))return"identifier";return"text"}function Swt(e){let t=e.vendor;if(typeof t==="string"){if(t.split(",").map((o)=>o.trim()).filter(Boolean).filter((o)=>!A4.includes(o)).length>0)E1(`vendor must be one of ${A4.join(", ")}`)}let r=e.output;if(typeof r==="string"&&!rb.includes(r))E1(`output must be one of ${rb.join(", ")}`)}function Ewt(e){let t=e.processedArgs??e.args??[];(e.registeredArguments??[]).forEach((i,o)=>{let s=i.name?.()||String(o),a=t[o];if(CV(a,s,K7e(s)),s==="agent-type"&&typeof a==="string"&&!q7e.includes(a))E1(`agent-type must be one of ${q7e.join(", ")}`)});let n=e.opts();Swt(n);for(let[i,o]of Object.entries(n))CV(o,i,K7e(i))}function $wt(e){return(e.registeredArguments??[]).map((t)=>({name:t.name?.()||"",required:!!t.required,variadic:!!t.variadic}))}function Cwt(e){return e.options.map((t)=>({flags:t.flags,long:t.long||void 0,short:t.short||void 0,description:t.description||"",required:!!t.required||!!t.mandatory,optional:!!t.optional,defaultValue:t.defaultValue}))}function Y7e(e){let t=[],r=e;while(r?.parent)t.unshift(r.name()),r=r.parent;return t.join(" ")}function _wt(e){return e.options.some((t)=>t.long==="--json"||t.long==="--output")}function Twt(e){return e.options.some((t)=>t.long==="--dry-run")}function Z7e(e){return{name:e.name(),path:Y7e(e),summary:e.summary()||void 0,description:e.description(),arguments:$wt(e),options:Cwt(e),supportsJsonOutput:_wt(e),supportsDryRun:Twt(e),subcommands:e.commands.map((t)=>Z7e(t))}}function Rwt(e,t){if(!t?.trim())return e;let r=t.trim(),n=[...e.commands];while(n.length>0){let i=n.shift();if(!i)continue;if(i.name()===r||Y7e(i)===r)return i;n.push(...i.commands)}return null}function Q7e(e,t){let r=Rwt(e,t);if(!r)E1(`Unknown command: ${t}`);let n={name:e.name(),version:e.version(),description:e.description(),env:{[J7e]:"Set to json to force machine-readable output on commands that support it."},command:Z7e(r)};console.log(JSON.stringify(n,null,2))}function J(e,t={}){return async(...r)=>{let n=X7e(r);if(n&&r.length>=2)r[r.length-2]=n.optsWithGlobals();let i=kwt(r);try{if(n)Ewt(n);await e(...r)}catch(o){let s=wwt(o);if(t.supportsJsonOutput&&de(i))console.log(JSON.stringify({error:s},null,2));else console.error(s);process.exitCode=1}}}var J7e="OH_MY_AG_OUTPUT_FORMAT",rb,q7e;var $t=v(()=>{gm();u2();rb=["text","json"],q7e=["backend","frontend","mobile","qa","debug","pm"]});function ne(e,t,r){function n(a,c){if(!a._zod)Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=s.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let p=u[d];if(!(p in a))a[p]=l[p].bind(a)}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(a){var c;let l=r?.Parent?new o:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}function d2(e){if(e)Object.assign(lg,e);return lg}var ege,oJr,S4,nb,lg;var bm=v(()=>{oJr=Symbol("zod_brand");S4=class S4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};nb=class nb extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}};(ege=globalThis).__zod_globalConfig??(ege.__zod_globalConfig={});lg=globalThis.__zod_globalConfig});function U_(e){let t=Object.values(e).filter((n)=>typeof n==="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function RV(e,t="|"){return e.map((r)=>MV(r)).join(t)}function ob(e,t){if(typeof t==="bigint")return t.toString();return t}function H_(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw Error("cached value already set")}}}function G_(e){return e===null||e===void 0}function W_(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function rge(e,t){let r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-n)<i)return 0;return r-n}function lr(e,t,r){let n=void 0;Object.defineProperty(e,t,{get(){if(n===tge)return;if(n===void 0)n=tge,n=r();return n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function km(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function $1(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function PV(e){return JSON.stringify(e)}function nge(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function ib(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function wm(e){if(ib(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(ib(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function OV(e){if(wm(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function C1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zu(e,t,r){let n=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)n._zod.parent=e;return n}function We(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function MV(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function sge(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Pwt(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=$1(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;s[a]=r.shape[a]}return km(this,"shape",s),s},checks:[]});return zu(e,o)}function Iwt(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=$1(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;delete s[a]}return km(this,"shape",s),s},checks:[]});return zu(e,o)}function Owt(e,t){if(!wm(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=$1(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return km(this,"shape",o),o}});return zu(e,i)}function Mwt(e,t){if(!wm(t))throw Error("Invalid input to safeExtend: expected a plain object");let r=$1(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return km(this,"shape",n),n}});return zu(e,r)}function Dwt(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=$1(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return km(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return zu(e,r)}function jwt(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let s=$1(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw Error(`Unrecognized key: "${l}"`);if(!r[l])continue;c[l]=e?new e({type:"optional",innerType:a[l]}):a[l]}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return km(this,"shape",c),c},checks:[]});return zu(t,s)}function Lwt(e,t,r){let n=$1(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;o[s]=new e({type:"nonoptional",innerType:i[s]})}else for(let s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return km(this,"shape",o),o}});return zu(t,n)}function xm(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function cge(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function _1(e,t){return t.map((r)=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function B_(e){return typeof e==="string"?e:e?.message}function Sl(e,t,r){let n=e.message?e.message:B_(e.inst?._zod.def?.error?.(e))??B_(t?.error?.(e))??B_(r.customError?.(e))??B_(r.localeError?.(e))??"Invalid input",{inst:i,continue:o,input:s,...a}=e;if(a.path??(a.path=[]),a.message=n,t?.reportInput)a.input=s;return a}function V_(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function lge(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Am(...e){let[t,r,n]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:n};return{...t}}var tge,IV,ige,oge,age;var El=v(()=>{bm();tge=Symbol("evaluating");IV="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};ige=H_(()=>{if(lg.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});oge=new Set(["string","number","symbol"]);age={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}});function dge(e,t=(r)=>r.message){let r={},n=[];for(let i of e.issues)if(i.path.length>0)r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i));else n.push(t(i));return{formErrors:n,fieldErrors:r}}function pge(e,t=(r)=>r.message){let r={_errors:[]},n=(i,o=[])=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((a)=>n({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,l=0;while(l<a.length){let u=a[l];if(l!==a.length-1)c[u]=c[u]||{_errors:[]};else c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(s));c=c[u],l++}}}};return n(e),r}var uge=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ob,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},q_,DV;var jV=v(()=>{bm();El();q_=ne("$ZodError",uge),DV=ne("$ZodError",uge,{Parent:Error})});var K_=(e)=>(t,r,n,i)=>{let o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new S4;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map((c)=>Sl(c,o,d2())));throw IV(a,i?.callee),a}return s.value},J_=(e)=>async(t,r,n,i)=>{let o=n?{...n,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map((c)=>Sl(c,o,d2())));throw IV(a,i?.callee),a}return s.value},sb=(e)=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new S4;return o.issues.length?{success:!1,error:new(e??q_)(o.issues.map((s)=>Sl(s,i,d2())))}:{success:!0,data:o.value}},fge,ab=(e)=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)o=await o;return o.issues.length?{success:!1,error:new e(o.issues.map((s)=>Sl(s,i,d2())))}:{success:!0,data:o.value}},mge,hge=(e)=>(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return K_(e)(t,r,i)},gge=(e)=>(t,r,n)=>K_(e)(t,r,n),yge=(e)=>async(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return J_(e)(t,r,i)},vge=(e)=>async(t,r,n)=>J_(e)(t,r,n),bge=(e)=>(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return sb(e)(t,r,i)},kge=(e)=>(t,r,n)=>sb(e)(t,r,n),wge=(e)=>async(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return ab(e)(t,r,i)},xge=(e)=>async(t,r,n)=>ab(e)(t,r,n);var LV=v(()=>{bm();jV();El();fge=sb(DV),mge=ab(DV)});function Ige(){return new RegExp(Fwt,"u")}function Uge(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Hge(e){return new RegExp(`^${Uge(e)}$`)}function Gge(e){let t=Uge({precision:e.precision}),r=["Z"];if(e.local)r.push("");if(e.offset)r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${zge}T(?:${n})$`)}var Age,Sge,Ege,$ge,Cge,_ge,Tge,Rge,NV=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},Pge,Fwt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Oge,Mge,Dge,jge,Lge,FV,Nge,Fge,zge="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Bge,Wge=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Vge,zV,qge,Kge,Jge,Xge;var Y_=v(()=>{Age=/^[cC][0-9a-z]{6,}$/,Sge=/^[0-9a-z]+$/,Ege=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$ge=/^[0-9a-vA-V]{20}$/,Cge=/^[A-Za-z0-9]{27}$/,_ge=/^[a-zA-Z0-9_-]{21}$/,Tge=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Rge=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pge=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;Oge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mge=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Dge=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,jge=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lge=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,FV=/^[A-Za-z0-9_-]*$/,Nge=/^https?$/,Fge=/^\+[1-9]\d{6,14}$/,Bge=new RegExp(`^${zge}$`);Vge=/^-?\d+$/,zV=/^-?\d+(?:\.\d+)?$/,qge=/^(?:true|false)$/i,Kge=/^null$/i,Jge=/^[^A-Z]*$/,Xge=/^[^a-z]*$/});var Ho,Yge,BV,UV,Zge,Qge,e6e,t6e,r6e,cb,n6e,i6e,o6e,s6e,a6e,c6e,l6e;var Z_=v(()=>{bm();Y_();El();Ho=ne("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Yge={number:"number",bigint:"bigint",object:"date"},BV=ne("$ZodCheckLessThan",(e,t)=>{Ho.init(e,t);let r=Yge[typeof t.value];e._zod.onattach.push((n)=>{let i=n._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<o)if(t.inclusive)i.maximum=t.value;else i.exclusiveMaximum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value<=t.value:n.value<t.value)return;n.issues.push({origin:r,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),UV=ne("$ZodCheckGreaterThan",(e,t)=>{Ho.init(e,t);let r=Yge[typeof t.value];e._zod.onattach.push((n)=>{let i=n._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>o)if(t.inclusive)i.minimum=t.value;else i.exclusiveMinimum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value>=t.value:n.value>t.value)return;n.issues.push({origin:r,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zge=ne("$ZodCheckMultipleOf",(e,t)=>{Ho.init(e,t),e._zod.onattach.push((r)=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof r.value==="bigint"?r.value%t.value===BigInt(0):rge(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Qge=ne("$ZodCheckNumberFormat",(e,t)=>{Ho.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,o]=age[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=i,a.maximum=o,r)a.pattern=Vge}),e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}if(a<i)s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort});if(a>o)s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),e6e=ne("$ZodCheckMaxLength",(e,t)=>{var r;Ho.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!G_(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<i)n._zod.bag.maximum=t.maximum}),e._zod.check=(n)=>{let i=n.value;if(i.length<=t.maximum)return;let s=V_(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t6e=ne("$ZodCheckMinLength",(e,t)=>{var r;Ho.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!G_(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>i)n._zod.bag.minimum=t.minimum}),e._zod.check=(n)=>{let i=n.value;if(i.length>=t.minimum)return;let s=V_(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),r6e=ne("$ZodCheckLengthEquals",(e,t)=>{var r;Ho.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!G_(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=(n)=>{let i=n.value,o=i.length;if(o===t.length)return;let s=V_(i),a=o>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),cb=ne("$ZodCheckStringFormat",(e,t)=>{var r,n;if(Ho.init(e,t),e._zod.onattach.push((i)=>{let o=i._zod.bag;if(o.format=t.format,t.pattern)o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(i)=>{if(t.pattern.lastIndex=0,t.pattern.test(i.value))return;i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(n=e._zod).check??(n.check=()=>{})}),n6e=ne("$ZodCheckRegex",(e,t)=>{cb.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),i6e=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Jge),cb.init(e,t)}),o6e=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xge),cb.init(e,t)}),s6e=ne("$ZodCheckIncludes",(e,t)=>{Ho.init(e,t);let r=C1(t.includes),n=new RegExp(typeof t.position==="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push((i)=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=(i)=>{if(i.value.includes(t.includes,t.position))return;i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),a6e=ne("$ZodCheckStartsWith",(e,t)=>{Ho.init(e,t);let r=new RegExp(`^${C1(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.startsWith(t.prefix))return;n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),c6e=ne("$ZodCheckEndsWith",(e,t)=>{Ho.init(e,t);let r=new RegExp(`.*${C1(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.endsWith(t.suffix))return;n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),l6e=ne("$ZodCheckOverwrite",(e,t)=>{Ho.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}})});class HV{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
27
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();if(t&&e.find((n)=>t.is(n)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}});var PKr;var gm=v(()=>{D_();N7e();Qv();kV();xV();PKr=new Nu});var w4;var eb=v(()=>{w4={name:"oh-my-agent",version:"19.1.0",description:"Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",type:"module",bin:{"oh-my-agent":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin","assets/serena"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs","generate:skill-data":"node ./scripts/generate-skill-data.mjs",build:"bun run generate:skill-data && bun run sync:readme && bun build cli.ts --outfile bin/cli-main.js --target node --minify --external @napi-rs/keyring --external jsonc-parser && node ./scripts/write-bin-entry.mjs && bun run check:bundle",dev:"bun run generate:skill-data && bun run cli.ts",lint:"biome check .","lint:fix":"biome check --write --unsafe .","check:boundaries":"node ./scripts/check-boundaries.mjs","check:bundle":"node ./scripts/check-bundle.mjs","check:emit-drift":"node ./scripts/check-emit-drift.mjs",test:"vitest run","test:coverage":"vitest run --coverage",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.7.0","@dagrejs/dagre":"^3.1.1","@date-fns/tz":"^1.5.0","@napi-rs/keyring":"^1.3.0",axios:"^1.18.1","better-sqlite3":"^13.0.2",chokidar:"^5.0.0",commander:"^15.0.0","date-fns":"^4.4.0",eld:"^2.0.3","fast-xml-parser":"^5.10.1","jsonc-parser":"^3.3.1",minimatch:"^10.2.6","p-map":"^7.0.6",picocolors:"^1.1.1","puppeteer-core":"^25.4.0",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","smol-toml":"^1.7.1",unified:"^11.0.5",ws:"^8.21.1",yaml:"^2.9.0",zod:"^4.4.3"},optionalDependencies:{pptxgenjs:"^4.0.1"},devDependencies:{"@babel/parser":"7.29.3","@biomejs/biome":"^2.5.6","@types/better-sqlite3":"^7.6.13","@types/mdast":"^4.0.4","@types/node":"^26.1.2","@types/ws":"^8.18.1","@vitest/coverage-v8":"^4.1.10",typescript:"^7.0.2",vitest:"^4.1.10"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},homepage:"https://firstfluke.com/oh-my-agent",bugs:{url:"https://github.com/first-fluke/oh-my-agent/issues"},antigravity:{skillsPath:".agents/skills",skills:["oma-architecture","oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestration","oma-dev-workflow","oma-tf-infra","oma-scm","oma-pdf","oma-recap"]}}});import{homedir as F7e}from"node:os";import{isAbsolute as Kkt,join as Jkt,resolve as Xkt}from"node:path";function z7e(e,t){let r=Array.from(e).some((n)=>{let i=n.charCodeAt(0);return i<32||i===127});if(!Kkt(e)||r)throw Error(`${t} must be an absolute path without control characters`);return Xkt(e)}function qr(e=process.env,t=F7e()){return z7e(e.OMA_HOME||Jkt(t,".oma"),"OMA_HOME")}function fs(e=process.env,t=F7e()){return e.OMA_STATE_HOME===void 0?qr(e,t):z7e(e.OMA_STATE_HOME,"OMA_STATE_HOME")}var N_=()=>{};import{homedir as Ykt}from"node:os";import{join as tb}from"node:path";function cc(e=process.env,t=Ykt()){let r=qr(e,t),n=tb(r,"state");return{home:r,definitions:tb(r,".agents"),state:n,serena:tb(n,"serena"),schedule:tb(r,"schedule"),backup:tb(r,"backup")}}var ci=v(()=>{N_();N_()});import*as Fu from"node:fs";import{homedir as Zkt}from"node:os";import*as xl from"node:path";function U7e(e){if(F_)throw Error("install context already set in this process");F_=e}function H7e(){if(F_===null)throw Error("install context not set — entry point must call setInstallContext()");return F_}function x4(){return H7e().installRoot}function yi(){return H7e().mode}function kt(){try{return yi()}catch{return"project"}}function cg(){try{return x4()}catch{return process.cwd()}}function z_(e,t,r=Zkt()){return t==="project"&&xl.resolve(e)===xl.resolve(r)}function G7e(e){if(e.global===!0||process.env.OMA_INSTALL_GLOBAL==="1"){let r=qr();return Qkt(r),{installRoot:r,mode:"global"}}return{installRoot:process.cwd(),mode:"project"}}function Qkt(e){if(!xl.isAbsolute(e))throw Error("OMA_HOME must be absolute path");for(let n of B7e)if(e===n||e.startsWith(n+xl.sep))throw Error(`OMA_HOME=${e} is forbidden (system path ${n})`);let t,r=xl.resolve(e);try{while(!Fu.existsSync(r)){let n=xl.dirname(r);if(n===r)break;r=n}if(t=Fu.realpathSync(r),!Fu.statSync(t).isDirectory())throw Error("nearest existing ancestor is not a directory")}catch(n){let i=n instanceof Error?n.message:String(n);throw Error(`OMA_HOME=${e}: ${i}`)}for(let n of B7e)if(t===n||t.startsWith(n+xl.sep))throw Error(`OMA_HOME=${e} is forbidden (system path ${n})`);try{Fu.accessSync(t,Fu.constants.W_OK)}catch{throw Error(`OMA_HOME=${e} is not writable`)}}var F_=null,B7e;var vi=v(()=>{ci();B7e=["/etc","/usr","/bin","/boot","/sys","/proc"]});import{join as owt}from"node:path";function vm(e){return e.endsWith("/")?e:`${e}/`}function l2(e,t){let r=t.split("/").filter((n)=>n.length>0);return owt(e,...r)}var nr=".agents",ym,bi,S1,XKr,YKr,ZKr,swt=".antigravitycli",V7e,awt=".migration-backup",cwt="docs/plans",lwt=".qwen/tmp",uwt,dwt,pwt,fwt,mwt,hwt,gwt,EV;var un=v(()=>{ym=`${nr}/skills`,bi=`${nr}/results`,S1=`${nr}/state`,XKr=`${S1}/sessions`,YKr=`${S1}/retry`,ZKr=`${S1}/archive`,V7e=`${nr}/backup`;uwt=vm(bi),dwt=vm(S1),pwt=vm(swt),fwt=vm(V7e),mwt=vm(awt),hwt=vm(cwt),gwt=vm(lwt),EV=[".agents/oma-config.local.cue",".agents/oma-config.local.yaml",pwt,uwt,dwt,fwt,hwt,mwt,gwt]});var dn="first-fluke/oh-my-agent",Ht,Al,$V,ywt,vwt,A4,Zn;var u2=v(()=>{un();Ht=ym,Al=["antigravity","claude","codex","commandcode","cursor","grok","kimi","kiro","qwen"],$V=["pi","opencode"],ywt=["copilot","hermes"],vwt=["zcode"],A4=[...Al,...$V,...ywt,...vwt].sort(),Zn={antigravity:{projectPath:".gemini/antigravity-cli/skills",homePath:".gemini/antigravity-cli/skills",requiresHomeConsent:!0},claude:{projectPath:".claude/skills",homePath:".claude/skills"},codex:{projectPath:".codex/skills",homePath:".codex/skills"},commandcode:{projectPath:".commandcode/skills",homePath:".commandcode/skills",optIn:!0},copilot:{projectPath:".github/skills",homePath:".copilot/skills"},cursor:{projectPath:".cursor/skills",homePath:".cursor/skills"},hermes:{projectPath:".hermes/skills/oma",homePath:".hermes/skills/oma",requiresHomeConsent:!0},kimi:{projectPath:".kimi-code/skills",homePath:".kimi-code/skills",requiresHomeConsent:!0,optIn:!0},kiro:{projectPath:".kiro/skills",homePath:".kiro/skills",optIn:!0},opencode:{projectPath:".opencode/skills",homePath:".opencode/skills"},qwen:{projectPath:".qwen/skills",homePath:".qwen/skills"}}});function ue(e,t="Output as JSON"){return e.option("--json",t).option("--output <format>","Output format (text/json)",(r)=>{let n=r.trim().toLowerCase();if(!rb.includes(n))throw Error(`Invalid output format: ${r}. Expected one of ${rb.join(", ")}`);return n})}function bwt(e){if(e?.json)return"json";let t=e?.output?.trim().toLowerCase();if(t&&rb.includes(t))return t;if(process.env[J7e]?.trim().toLowerCase()==="json")return"json";return"text"}function de(e){return bwt(e)==="json"}function X7e(e){let t=e.at(-1);return t instanceof Nu?t:null}function kwt(e){let t=X7e(e);if(t)return t.opts();let r=e.at(-1);return r&&typeof r==="object"?r:{}}function wwt(e){if(e instanceof Error)return e.message;return String(e)}function E1(e){throw Error(e)}function _V(e,t){for(let r of e){let n=r.charCodeAt(0);if(n>=0&&n<=31||n===127)E1(`${t} must not contain control characters`)}}function xwt(e,t){if(_V(e,t),/[?#%]/.test(e))E1(`${t} must not contain ?, #, or %`);if(e.includes(".."))E1(`${t} must not contain '..'`)}function Awt(e,t){_V(e,t);try{new URL(e)}catch{E1(`${t} must be a valid absolute URL`)}}function CV(e,t,r="text"){if(typeof e==="string"){if(r==="identifier"){xwt(e,t);return}if(r==="url"){Awt(e,t);return}_V(e,t);return}if(Array.isArray(e))for(let[n,i]of e.entries())CV(i,`${t}[${n}]`,r)}function K7e(e){let t=e.toLowerCase();if(t==="url"||t.endsWith("url"))return"url";if(t.includes("id")||t.includes("type")||t.includes("vendor")||t.includes("session"))return"identifier";return"text"}function Swt(e){let t=e.vendor;if(typeof t==="string"){if(t.split(",").map((o)=>o.trim()).filter(Boolean).filter((o)=>!A4.includes(o)).length>0)E1(`vendor must be one of ${A4.join(", ")}`)}let r=e.output;if(typeof r==="string"&&!rb.includes(r))E1(`output must be one of ${rb.join(", ")}`)}function Ewt(e){let t=e.processedArgs??e.args??[];(e.registeredArguments??[]).forEach((i,o)=>{let s=i.name?.()||String(o),a=t[o];if(CV(a,s,K7e(s)),s==="agent-type"&&typeof a==="string"&&!q7e.includes(a))E1(`agent-type must be one of ${q7e.join(", ")}`)});let n=e.opts();Swt(n);for(let[i,o]of Object.entries(n))CV(o,i,K7e(i))}function $wt(e){return(e.registeredArguments??[]).map((t)=>({name:t.name?.()||"",required:!!t.required,variadic:!!t.variadic}))}function Cwt(e){return e.options.map((t)=>({flags:t.flags,long:t.long||void 0,short:t.short||void 0,description:t.description||"",required:!!t.required||!!t.mandatory,optional:!!t.optional,defaultValue:t.defaultValue}))}function Y7e(e){let t=[],r=e;while(r?.parent)t.unshift(r.name()),r=r.parent;return t.join(" ")}function _wt(e){return e.options.some((t)=>t.long==="--json"||t.long==="--output")}function Twt(e){return e.options.some((t)=>t.long==="--dry-run")}function Z7e(e){return{name:e.name(),path:Y7e(e),summary:e.summary()||void 0,description:e.description(),arguments:$wt(e),options:Cwt(e),supportsJsonOutput:_wt(e),supportsDryRun:Twt(e),subcommands:e.commands.map((t)=>Z7e(t))}}function Rwt(e,t){if(!t?.trim())return e;let r=t.trim(),n=[...e.commands];while(n.length>0){let i=n.shift();if(!i)continue;if(i.name()===r||Y7e(i)===r)return i;n.push(...i.commands)}return null}function Q7e(e,t){let r=Rwt(e,t);if(!r)E1(`Unknown command: ${t}`);let n={name:e.name(),version:e.version(),description:e.description(),env:{[J7e]:"Set to json to force machine-readable output on commands that support it."},command:Z7e(r)};console.log(JSON.stringify(n,null,2))}function J(e,t={}){return async(...r)=>{let n=X7e(r);if(n&&r.length>=2)r[r.length-2]=n.optsWithGlobals();let i=kwt(r);try{if(n)Ewt(n);await e(...r)}catch(o){let s=wwt(o);if(t.supportsJsonOutput&&de(i))console.log(JSON.stringify({error:s},null,2));else console.error(s);process.exitCode=1}}}var J7e="OH_MY_AG_OUTPUT_FORMAT",rb,q7e;var $t=v(()=>{gm();u2();rb=["text","json"],q7e=["backend","frontend","mobile","qa","debug","pm"]});function ne(e,t,r){function n(a,c){if(!a._zod)Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=s.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let p=u[d];if(!(p in a))a[p]=l[p].bind(a)}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(a){var c;let l=r?.Parent?new o:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}function d2(e){if(e)Object.assign(lg,e);return lg}var ege,oJr,S4,nb,lg;var bm=v(()=>{oJr=Symbol("zod_brand");S4=class S4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};nb=class nb extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}};(ege=globalThis).__zod_globalConfig??(ege.__zod_globalConfig={});lg=globalThis.__zod_globalConfig});function U_(e){let t=Object.values(e).filter((n)=>typeof n==="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function RV(e,t="|"){return e.map((r)=>MV(r)).join(t)}function ob(e,t){if(typeof t==="bigint")return t.toString();return t}function H_(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw Error("cached value already set")}}}function G_(e){return e===null||e===void 0}function W_(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function rge(e,t){let r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-n)<i)return 0;return r-n}function lr(e,t,r){let n=void 0;Object.defineProperty(e,t,{get(){if(n===tge)return;if(n===void 0)n=tge,n=r();return n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function km(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function $1(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function PV(e){return JSON.stringify(e)}function nge(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function ib(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function wm(e){if(ib(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(ib(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function OV(e){if(wm(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function C1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zu(e,t,r){let n=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)n._zod.parent=e;return n}function We(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function MV(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function sge(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Pwt(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=$1(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;s[a]=r.shape[a]}return km(this,"shape",s),s},checks:[]});return zu(e,o)}function Iwt(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=$1(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;delete s[a]}return km(this,"shape",s),s},checks:[]});return zu(e,o)}function Owt(e,t){if(!wm(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=$1(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return km(this,"shape",o),o}});return zu(e,i)}function Mwt(e,t){if(!wm(t))throw Error("Invalid input to safeExtend: expected a plain object");let r=$1(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return km(this,"shape",n),n}});return zu(e,r)}function Dwt(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=$1(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return km(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return zu(e,r)}function jwt(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let s=$1(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw Error(`Unrecognized key: "${l}"`);if(!r[l])continue;c[l]=e?new e({type:"optional",innerType:a[l]}):a[l]}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return km(this,"shape",c),c},checks:[]});return zu(t,s)}function Lwt(e,t,r){let n=$1(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let s in r){if(!(s in o))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;o[s]=new e({type:"nonoptional",innerType:i[s]})}else for(let s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return km(this,"shape",o),o}});return zu(t,n)}function xm(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function cge(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function _1(e,t){return t.map((r)=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function B_(e){return typeof e==="string"?e:e?.message}function Sl(e,t,r){let n=e.message?e.message:B_(e.inst?._zod.def?.error?.(e))??B_(t?.error?.(e))??B_(r.customError?.(e))??B_(r.localeError?.(e))??"Invalid input",{inst:i,continue:o,input:s,...a}=e;if(a.path??(a.path=[]),a.message=n,t?.reportInput)a.input=s;return a}function V_(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function lge(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Am(...e){let[t,r,n]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:n};return{...t}}var tge,IV,ige,oge,age;var El=v(()=>{bm();tge=Symbol("evaluating");IV="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};ige=H_(()=>{if(lg.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});oge=new Set(["string","number","symbol"]);age={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}});function dge(e,t=(r)=>r.message){let r={},n=[];for(let i of e.issues)if(i.path.length>0)r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i));else n.push(t(i));return{formErrors:n,fieldErrors:r}}function pge(e,t=(r)=>r.message){let r={_errors:[]},n=(i,o=[])=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((a)=>n({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,l=0;while(l<a.length){let u=a[l];if(l!==a.length-1)c[u]=c[u]||{_errors:[]};else c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(s));c=c[u],l++}}}};return n(e),r}var uge=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ob,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},q_,DV;var jV=v(()=>{bm();El();q_=ne("$ZodError",uge),DV=ne("$ZodError",uge,{Parent:Error})});var K_=(e)=>(t,r,n,i)=>{let o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new S4;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map((c)=>Sl(c,o,d2())));throw IV(a,i?.callee),a}return s.value},J_=(e)=>async(t,r,n,i)=>{let o=n?{...n,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(i?.Err??e)(s.issues.map((c)=>Sl(c,o,d2())));throw IV(a,i?.callee),a}return s.value},sb=(e)=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new S4;return o.issues.length?{success:!1,error:new(e??q_)(o.issues.map((s)=>Sl(s,i,d2())))}:{success:!0,data:o.value}},fge,ab=(e)=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)o=await o;return o.issues.length?{success:!1,error:new e(o.issues.map((s)=>Sl(s,i,d2())))}:{success:!0,data:o.value}},mge,hge=(e)=>(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return K_(e)(t,r,i)},gge=(e)=>(t,r,n)=>K_(e)(t,r,n),yge=(e)=>async(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return J_(e)(t,r,i)},vge=(e)=>async(t,r,n)=>J_(e)(t,r,n),bge=(e)=>(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return sb(e)(t,r,i)},kge=(e)=>(t,r,n)=>sb(e)(t,r,n),wge=(e)=>async(t,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return ab(e)(t,r,i)},xge=(e)=>async(t,r,n)=>ab(e)(t,r,n);var LV=v(()=>{bm();jV();El();fge=sb(DV),mge=ab(DV)});function Ige(){return new RegExp(Fwt,"u")}function Uge(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Hge(e){return new RegExp(`^${Uge(e)}$`)}function Gge(e){let t=Uge({precision:e.precision}),r=["Z"];if(e.local)r.push("");if(e.offset)r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${zge}T(?:${n})$`)}var Age,Sge,Ege,$ge,Cge,_ge,Tge,Rge,NV=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},Pge,Fwt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Oge,Mge,Dge,jge,Lge,FV,Nge,Fge,zge="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Bge,Wge=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Vge,zV,qge,Kge,Jge,Xge;var Y_=v(()=>{Age=/^[cC][0-9a-z]{6,}$/,Sge=/^[0-9a-z]+$/,Ege=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$ge=/^[0-9a-vA-V]{20}$/,Cge=/^[A-Za-z0-9]{27}$/,_ge=/^[a-zA-Z0-9_-]{21}$/,Tge=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Rge=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pge=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;Oge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mge=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Dge=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,jge=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lge=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,FV=/^[A-Za-z0-9_-]*$/,Nge=/^https?$/,Fge=/^\+[1-9]\d{6,14}$/,Bge=new RegExp(`^${zge}$`);Vge=/^-?\d+$/,zV=/^-?\d+(?:\.\d+)?$/,qge=/^(?:true|false)$/i,Kge=/^null$/i,Jge=/^[^A-Z]*$/,Xge=/^[^a-z]*$/});var Ho,Yge,BV,UV,Zge,Qge,e6e,t6e,r6e,cb,n6e,i6e,o6e,s6e,a6e,c6e,l6e;var Z_=v(()=>{bm();Y_();El();Ho=ne("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Yge={number:"number",bigint:"bigint",object:"date"},BV=ne("$ZodCheckLessThan",(e,t)=>{Ho.init(e,t);let r=Yge[typeof t.value];e._zod.onattach.push((n)=>{let i=n._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<o)if(t.inclusive)i.maximum=t.value;else i.exclusiveMaximum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value<=t.value:n.value<t.value)return;n.issues.push({origin:r,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),UV=ne("$ZodCheckGreaterThan",(e,t)=>{Ho.init(e,t);let r=Yge[typeof t.value];e._zod.onattach.push((n)=>{let i=n._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>o)if(t.inclusive)i.minimum=t.value;else i.exclusiveMinimum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value>=t.value:n.value>t.value)return;n.issues.push({origin:r,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Zge=ne("$ZodCheckMultipleOf",(e,t)=>{Ho.init(e,t),e._zod.onattach.push((r)=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof r.value==="bigint"?r.value%t.value===BigInt(0):rge(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Qge=ne("$ZodCheckNumberFormat",(e,t)=>{Ho.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,o]=age[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=i,a.maximum=o,r)a.pattern=Vge}),e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}if(a<i)s.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort});if(a>o)s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),e6e=ne("$ZodCheckMaxLength",(e,t)=>{var r;Ho.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!G_(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<i)n._zod.bag.maximum=t.maximum}),e._zod.check=(n)=>{let i=n.value;if(i.length<=t.maximum)return;let s=V_(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t6e=ne("$ZodCheckMinLength",(e,t)=>{var r;Ho.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!G_(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>i)n._zod.bag.minimum=t.minimum}),e._zod.check=(n)=>{let i=n.value;if(i.length>=t.minimum)return;let s=V_(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),r6e=ne("$ZodCheckLengthEquals",(e,t)=>{var r;Ho.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let i=n.value;return!G_(i)&&i.length!==void 0}),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=(n)=>{let i=n.value,o=i.length;if(o===t.length)return;let s=V_(i),a=o>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),cb=ne("$ZodCheckStringFormat",(e,t)=>{var r,n;if(Ho.init(e,t),e._zod.onattach.push((i)=>{let o=i._zod.bag;if(o.format=t.format,t.pattern)o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(i)=>{if(t.pattern.lastIndex=0,t.pattern.test(i.value))return;i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(n=e._zod).check??(n.check=()=>{})}),n6e=ne("$ZodCheckRegex",(e,t)=>{cb.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),i6e=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Jge),cb.init(e,t)}),o6e=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xge),cb.init(e,t)}),s6e=ne("$ZodCheckIncludes",(e,t)=>{Ho.init(e,t);let r=C1(t.includes),n=new RegExp(typeof t.position==="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push((i)=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=(i)=>{if(i.value.includes(t.includes,t.position))return;i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),a6e=ne("$ZodCheckStartsWith",(e,t)=>{Ho.init(e,t);let r=new RegExp(`^${C1(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.startsWith(t.prefix))return;n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),c6e=ne("$ZodCheckEndsWith",(e,t)=>{Ho.init(e,t);let r=new RegExp(`.*${C1(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.endsWith(t.suffix))return;n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),l6e=ne("$ZodCheckOverwrite",(e,t)=>{Ho.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}})});class HV{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
28
28
|
`).filter((o)=>o),n=Math.min(...r.map((o)=>o.length-o.trimStart().length)),i=r.map((o)=>o.slice(n)).map((o)=>" ".repeat(this.indent*2)+o);for(let o of i)this.content.push(o)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[""]).map((i)=>` ${i}`)];return new e(...t,n.join(`
|
|
29
29
|
`))}}var d6e;var GV=v(()=>{d6e={major:4,minor:4,patch:3}});function F6e(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function zwt(e){if(!FV.test(e))return!1;let t=e.replace(/[-_]/g,(n)=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return F6e(r)}function Bwt(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));if("typ"in i&&i?.typ!=="JWT")return!1;if(!i.alg)return!1;if(t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}function p6e(e,t,r){if(e.issues.length)t.issues.push(..._1(r,e.issues));t.value[r]=e.value}function eT(e,t,r,n,i,o){let s=r in n;if(e.issues.length){if(i&&o&&!s)return;t.issues.push(..._1(r,e.issues))}if(!s&&!i){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}if(e.value===void 0){if(s)t.value[r]=void 0}else t.value[r]=e.value}function X6e(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let r=sge(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Y6e(e,t,r,n,i,o){let s=[],a=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin==="optional",d=c.optout==="optional";for(let p in t){if(p==="__proto__")continue;if(a.has(p))continue;if(l==="never"){s.push(p);continue}let f=c.run({value:t[p],issues:[]},n);if(f instanceof Promise)e.push(f.then((m)=>eT(m,r,p,t,u,d)));else eT(f,r,p,t,u,d)}if(s.length)r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o});if(!e.length)return r;return Promise.all(e).then(()=>r)}function f6e(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let i=e.filter((o)=>!xm(o));if(i.length===1)return t.value=i[0].value,i[0];return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((o)=>o.issues.map((s)=>Sl(s,n,d2())))}),t}function WV(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(wm(e)&&wm(t)){let r=Object.keys(t),n=Object.keys(e).filter((o)=>r.indexOf(o)!==-1),i={...e,...t};for(let o of n){let s=WV(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};i[o]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let i=e[n],o=t[n],s=WV(i,o);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function m6e(e,t,r){let n=new Map,i;for(let a of t.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(let c of a.keys){if(!n.has(c))n.set(c,{});n.get(c).l=!0}}else e.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys){if(!n.has(c))n.set(c,{});n.get(c).r=!0}else e.issues.push(a);let o=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&i)e.issues.push({...i,keys:o});if(xm(e))return e;let s=WV(t.value,r.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}function h6e(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}function g6e(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}function y6e(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}function Q_(e,t,r){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}function v6e(e){return e.value=Object.freeze(e.value),e}function b6e(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};if(n._zod.def.params)i.params=n._zod.def.params;t.issues.push(Am(i))}}var En,tT,Pn,k6e,w6e,x6e,A6e,S6e,E6e,$6e,C6e,_6e,T6e,R6e,P6e,I6e,O6e,M6e,D6e,j6e,L6e,N6e,z6e,B6e,U6e,H6e,VV,G6e,W6e,V6e,q6e,K6e,J6e,Uwt,Z6e,Q6e,e9e,t9e,r9e,n9e,i9e,qV,o9e,s9e,a9e,c9e,l9e,u9e,d9e,p9e,f9e,m9e;var h9e=v(()=>{Z_();bm();LV();Y_();El();GV();El();En=ne("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=d6e;let n=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))n.unshift(e);for(let i of n)for(let o of i._zod.onattach)o(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(s,a,c)=>{let l=xm(s),u;for(let d of a){if(d._zod.def.when){if(cge(s))continue;if(!d._zod.def.when(s))continue}else if(l)continue;let p=s.issues.length,f=d._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new S4;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{if(await f,s.issues.length===p)return;if(!l)l=xm(s,p)});else{if(s.issues.length===p)continue;if(!l)l=xm(s,p)}}if(u)return u.then(()=>s);return s},o=(s,a,c)=>{if(xm(s))return s.aborted=!0,s;let l=i(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new S4;return l.then((u)=>e._zod.parse(u,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(l instanceof Promise)return l.then((u)=>o(u,s,a));return o(l,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new S4;return c.then((l)=>i(l,n,a))}return i(c,n,a)}}lr(e,"~standard",()=>({validate:(i)=>{try{let o=fge(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch(o){return mge(e,i).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),tT=ne("$ZodString",(e,t)=>{En.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Wge(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch(i){}if(typeof r.value==="string")return r;return r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Pn=ne("$ZodStringFormat",(e,t)=>{cb.init(e,t),tT.init(e,t)}),k6e=ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Rge),Pn.init(e,t)}),w6e=ne("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=NV(n))}else t.pattern??(t.pattern=NV());Pn.init(e,t)}),x6e=ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Pge),Pn.init(e,t)}),A6e=ne("$ZodURL",(e,t)=>{Pn.init(e,t),e._zod.check=(r)=>{try{let n=r.value.trim();if(!t.normalize&&t.protocol?.source===Nge.source){if(!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}}let i=new URL(n);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(i.hostname))r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol))r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})}if(t.normalize)r.value=i.href;else r.value=n;return}catch(n){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),S6e=ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ige()),Pn.init(e,t)}),E6e=ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=_ge),Pn.init(e,t)}),$6e=ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Age),Pn.init(e,t)}),C6e=ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Sge),Pn.init(e,t)}),_6e=ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ege),Pn.init(e,t)}),T6e=ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=$ge),Pn.init(e,t)}),R6e=ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Cge),Pn.init(e,t)}),P6e=ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Gge(t)),Pn.init(e,t)}),I6e=ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Bge),Pn.init(e,t)}),O6e=ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Hge(t)),Pn.init(e,t)}),M6e=ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Tge),Pn.init(e,t)}),D6e=ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Oge),Pn.init(e,t),e._zod.bag.format="ipv4"}),j6e=ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Mge),Pn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=(r)=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),L6e=ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Dge),Pn.init(e,t)}),N6e=ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=jge),Pn.init(e,t),e._zod.check=(r)=>{let n=r.value.split("/");try{if(n.length!==2)throw Error();let[i,o]=n;if(!o)throw Error();let s=Number(o);if(`${s}`!==o)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});z6e=ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Lge),Pn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=(r)=>{if(F6e(r.value))return;r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});B6e=ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=FV),Pn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=(r)=>{if(zwt(r.value))return;r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),U6e=ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Fge),Pn.init(e,t)});H6e=ne("$ZodJWT",(e,t)=>{Pn.init(e,t),e._zod.check=(r)=>{if(Bwt(r.value,t.alg))return;r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),VV=ne("$ZodNumber",(e,t)=>{En.init(e,t),e._zod.pattern=e._zod.bag.pattern??zV,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let i=r.value;if(typeof i==="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i==="number"?Number.isNaN(i)?"NaN":!Number.isFinite(i)?"Infinity":void 0:void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),r}}),G6e=ne("$ZodNumberFormat",(e,t)=>{Qge.init(e,t),VV.init(e,t)}),W6e=ne("$ZodBoolean",(e,t)=>{En.init(e,t),e._zod.pattern=qge,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(o){}let i=r.value;if(typeof i==="boolean")return r;return r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),V6e=ne("$ZodNull",(e,t)=>{En.init(e,t),e._zod.pattern=Kge,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let i=r.value;if(i===null)return r;return r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),q6e=ne("$ZodUnknown",(e,t)=>{En.init(e,t),e._zod.parse=(r)=>r}),K6e=ne("$ZodNever",(e,t)=>{En.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});J6e=ne("$ZodArray",(e,t)=>{En.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let o=[];for(let s=0;s<i.length;s++){let a=i[s],c=t.element._zod.run({value:a,issues:[]},n);if(c instanceof Promise)o.push(c.then((l)=>p6e(l,r,s)));else p6e(c,r,s)}if(o.length)return Promise.all(o).then(()=>r);return r}});Uwt=ne("$ZodObject",(e,t)=>{if(En.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let n=H_(()=>X6e(t));lr(e._zod,"propValues",()=>{let a=t.shape,c={};for(let l in a){let u=a[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let d of u.values)c[l].add(d)}}return c});let i=ib,o=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=n.value);let l=a.value;if(!i(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};let u=[],d=s.shape;for(let p of s.keys){let f=d[p],m=f._zod.optin==="optional",h=f._zod.optout==="optional",g=f._zod.run({value:l[p],issues:[]},c);if(g instanceof Promise)u.push(g.then((y)=>eT(y,a,p,l,m,h)));else eT(g,a,p,l,m,h)}if(!o)return u.length?Promise.all(u).then(()=>a):a;return Y6e(u,l,a,c,n.value,e)}}),Z6e=ne("$ZodObjectJIT",(e,t)=>{Uwt.init(e,t);let r=e._zod.parse,n=H_(()=>X6e(t)),i=(p)=>{let f=new HV(["shape","payload","ctx"]),m=n.value,h=(b)=>{let w=PV(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let g=Object.create(null),y=0;for(let b of m.keys)g[b]=`key_${y++}`;f.write("const newResult = {};");for(let b of m.keys){let w=g[b],A=PV(b),S=p[b],E=S?._zod?.optin==="optional",x=S?._zod?.optout==="optional";if(f.write(`const ${w} = ${h(b)};`),E&&x)f.write(`
|
|
30
30
|
if (${w}.issues.length) {
|
package/package.json
CHANGED