lua-cli 3.49.0 → 3.49.2

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.
@@ -30,6 +30,7 @@ import { WorkflowShellFn as WorkflowShell } from '@lua/shared-types/workflow-exe
30
30
  import { WorkflowShellValue } from '@lua/shared-types/workflow-exec';
31
31
  import { z } from 'zod';
32
32
  import { ZodType } from 'zod';
33
+ import type { ZodTypeDef } from 'zod';
33
34
 
34
35
  /**
35
36
  * `auto` (default, today's behaviour): every user-owned connection of the agent's creator auto-mounts on
@@ -1945,6 +1946,8 @@ export declare interface BatchingConfig {
1945
1946
 
1946
1947
  export declare const Browser: BrowserApi;
1947
1948
 
1949
+ declare const BROWSER_BOT_WALL_KINDS: readonly ["captcha", "bot-block", "empty-content"];
1950
+
1948
1951
  /**
1949
1952
  * The full command surface (mirrors the desktop bridge's registry). Grouped the
1950
1953
  * way the agent-browser CLI groups them so the surface is complete without
@@ -2109,6 +2112,8 @@ declare const BROWSER_FALLBACKS: readonly ["browser-use", "none"];
2109
2112
 
2110
2113
  declare const BROWSER_LOG_CONTENT_MODES: readonly ["summary", "full", "none"];
2111
2114
 
2115
+ declare const BROWSER_READ_BOT_WALL_BLOCKER = "bot_wall";
2116
+
2112
2117
  declare const BROWSER_READ_FORMATS: readonly ["text", "html", "markdown"];
2113
2118
 
2114
2119
  declare const BROWSER_READ_LOAD_STATES: readonly ["load", "networkidle"];
@@ -2124,6 +2129,8 @@ export declare interface BrowserApi extends BrowserStepwiseApi {
2124
2129
 
2125
2130
  export declare type BrowserApiReadOptions = BrowserReadOptions & BrowserProfileOption;
2126
2131
 
2132
+ declare type BrowserBotWallKind = (typeof BROWSER_BOT_WALL_KINDS)[number];
2133
+
2127
2134
  export declare interface BrowserCommandInputs {
2128
2135
  health: BrowserSessionInput;
2129
2136
  session_open: BrowserSessionInput & {
@@ -2434,9 +2441,13 @@ export declare interface BrowserReadResult {
2434
2441
  matches?: number;
2435
2442
  /** Set when the page is a wall rather than the content you asked for. */
2436
2443
  blocked?: true;
2437
- /** `'login_required'`: the URL redirected to a sign-in page, so the content needs a signed-in session. */
2438
- blocker?: typeof BROWSER_READ_LOGIN_BLOCKER;
2439
- blockerKind?: 'login';
2444
+ /**
2445
+ * `'login_required'`: the URL redirected to a sign-in page, so the content needs a signed-in session.
2446
+ * `'bot_wall'`: the site showed a captcha, refused the automated browser, or served an empty page; `content` is
2447
+ * that wall, not the page you asked for.
2448
+ */
2449
+ blocker?: typeof BROWSER_READ_LOGIN_BLOCKER | typeof BROWSER_READ_BOT_WALL_BLOCKER;
2450
+ blockerKind?: 'login' | BrowserBotWallKind;
2440
2451
  /** What to do about the wall. */
2441
2452
  blockerGuidance?: string;
2442
2453
  }
@@ -3570,9 +3581,12 @@ declare const DECISION_ERROR_CODES: {
3570
3581
  readonly DISABLED: "decision_disabled";
3571
3582
  readonly INSUFFICIENT_CREDITS: "decision_insufficient_credits";
3572
3583
  readonly NOT_FOUND: "decision_not_found";
3584
+ readonly CANCELLED: "decision_cancelled";
3573
3585
  };
3574
3586
 
3575
- declare const DECISION_PROVIDERS: readonly ["jev", "openai"];
3587
+ declare const DECISION_FALLBACK_PROVIDERS: readonly ["jev", "openai"];
3588
+
3589
+ declare const DECISION_PROVIDERS: readonly ["jev", "openai", "openrouter"];
3576
3590
 
3577
3591
  declare const DECISION_ROUTING_RULES: readonly ["pinned", "images", "region", "zero_retention", "default", "fallback"];
3578
3592
 
@@ -3608,13 +3622,15 @@ export declare interface DecisionErrorFields {
3608
3622
  decisionId?: string;
3609
3623
  }
3610
3624
 
3611
- declare type DecisionFallback = DecisionProvider | 'none';
3625
+ declare type DecisionFallback = DecisionFallbackProvider | 'none';
3612
3626
 
3613
3627
  declare interface DecisionFallbackInfo {
3614
3628
  from: DecisionProvider;
3615
3629
  reason: string;
3616
3630
  }
3617
3631
 
3632
+ declare type DecisionFallbackProvider = (typeof DECISION_FALLBACK_PROVIDERS)[number];
3633
+
3618
3634
  declare interface DecisionImage {
3619
3635
  data: string;
3620
3636
  mimeType: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';
@@ -3813,7 +3829,7 @@ export declare function defineVoice(config: LuaVoiceConfig): LuaVoice;
3813
3829
  * routes: {
3814
3830
  * 'GET /tickets': route({
3815
3831
  * query: z.object({ status: z.enum(['open', 'closed']).default('open') }),
3816
- * handler: async ({ query }) => ({ items: (await Data.get('tickets', { filter: { status: query.status } })).data }),
3832
+ * handler: async ({ query }) => ({ items: (await Data.get('tickets', { status: query.status })).data }),
3817
3833
  * }),
3818
3834
  * 'POST /tickets/:id/close': route({
3819
3835
  * params: z.object({ id: z.string() }),
@@ -9362,14 +9378,20 @@ export declare interface RouteContext<P = Record<string, string>, Q = Record<str
9362
9378
  request: Request;
9363
9379
  }
9364
9380
 
9381
+ /**
9382
+ * The handler sees what a schema OUTPUTS (after `.default()`, `.transform()`, coercion), so only the
9383
+ * output type is inferred; the input type is left open (`unknown`, not `any`). `ZodType<P>` alone would also pin the input
9384
+ * to `P`, and `z.enum([...]).default('open')` (input `T | undefined`) would then make the handler's
9385
+ * value `T | undefined`.
9386
+ */
9365
9387
  export declare interface RouteDefinition<P = Record<string, string>, Q = Record<string, string | string[]>, B = unknown> {
9366
9388
  description?: string;
9367
9389
  /** Zod schema for path parameters; a failure answers 400 `VALIDATION`. */
9368
- params?: ZodType<P>;
9390
+ params?: ZodType<P, ZodTypeDef, unknown>;
9369
9391
  /** Zod schema for query parameters; a failure answers 400 `VALIDATION`. */
9370
- query?: ZodType<Q>;
9392
+ query?: ZodType<Q, ZodTypeDef, unknown>;
9371
9393
  /** Zod schema for the request body; a failure answers 400 `VALIDATION`. */
9372
- body?: ZodType<B>;
9394
+ body?: ZodType<B, ZodTypeDef, unknown>;
9373
9395
  /** Response schemas by status, for the typed client (not enforced at runtime). */
9374
9396
  responses?: Record<number, ZodType>;
9375
9397
  handler: (ctx: RouteContext<P, Q, B>) => Promise<RouteHandlerResult> | RouteHandlerResult;
@@ -11273,6 +11295,12 @@ declare const WORKFLOW_AGENT_EFFORTS: readonly ["low", "medium", "high"];
11273
11295
  /** `approval.onDeny` (§6.4.11 deny-as-data): `'fail'` fails the step on a denial; default `'continue'`. */
11274
11296
  declare const WORKFLOW_APPROVAL_ON_DENY: readonly ["fail", "continue"];
11275
11297
 
11298
+ /** Default `budget.maxDurationSeconds` of a workflow run (7 days). @catalogLimit workflow.run.defaultMaxDuration seconds */
11299
+ export declare const WORKFLOW_DEFAULT_MAX_DURATION_SECONDS = 604800;
11300
+
11301
+ /** Default `budget.maxDurationSeconds` when the graph can park on a human (approval, signal, suspend): 30 days. @catalogLimit workflow.run.hitlDefaultMaxDuration seconds */
11302
+ export declare const WORKFLOW_HITL_MAX_DURATION_SECONDS = 2592000;
11303
+
11276
11304
  /** D19-r2 (B22; 05 §5.17.6 Harness row) — both behind one `CodingHarness { run(turn) }`. */
11277
11305
  declare const WORKFLOW_JOB_HARNESSES: readonly ["claude-code", "generic"];
11278
11306
 
@@ -11443,6 +11471,8 @@ export declare interface WorkflowGoalEnvelope {
11443
11471
  maxRuns: number;
11444
11472
  budget?: LuaWorkflowConfig['budget'];
11445
11473
  maxTotalCredits?: number;
11474
+ /** The organisation's budget unit, as reported by the server (read-only; never sent on create). */
11475
+ budgetUnit?: 'actions' | 'credits';
11446
11476
  initialState?: Record<string, unknown>;
11447
11477
  }
11448
11478