Parse
Path:
codemode-gateway/src/parse.tsRelative: src/parse.tsSubproject: codemode-gatewayCategory: codemode-gatewayLines: 103Bytes: 2,885Imports: 0Exports: 7
Content Preview
- /**
- * Parse-don't-validate helpers for tool argument parsing.
- *
- * Each helper throws a plain `Error` with a `"<tool>: <field> ..."` message on
- * bad input. The codemode `ToolDispatcher` catches thrown errors and returns
- * them to the sandbox as `{ error: message }`, so the user's
- * `async () => { await cf.d1_query(...) }` sees a clear, field-specific error
- * without any host-side logging.
- */
- /** Assert `raw` is a plain object and return it as a string-keyed record. */
- export function as