@betterlu/agentlu 1.11.0 → 1.12.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 CHANGED
@@ -236,7 +236,7 @@ Plain text (throws unless `status === "completed"` with non-empty `output_text`)
236
236
  const { text } = await ai.tag.runText({ input: "summarize this" });
237
237
  ```
238
238
 
239
- `timeoutMs` aborts the HTTP attempt and, when `timeout_ms` is omitted, is also sent as the server-side run budget. Constructor `new AgentLu({ timeoutMs: 30_000 })` is the default for calls that omit it.
239
+ `timeoutMs` aborts the HTTP attempt and, when `timeout_ms` is omitted, is also sent as the server-side run budget. Constructor `new AgentLu({ timeoutMs: 30_000 })` is the default for calls that omit it. The server rejects `timeout_ms` below 15 000 ms and `max_output_tokens` below 256 with a 400 naming the minimum; `/v1/chat/completions` applies the same minimum to `max_tokens` / `max_completion_tokens`. Registered defaults below either minimum are clamped up with a once-per-client warning.
240
240
 
241
241
  Upload-and-run:
242
242
 
@@ -130,7 +130,7 @@ export interface WireCreateResponse {
130
130
  "conversation"?: string | {
131
131
  "id": string;
132
132
  };
133
- /** Optional and discouraged. Omit it to use the model's own output limit; values here are applied verbatim. If the limit is reached, the HTTP 200 Response has status `incomplete`, reason `max_output_tokens`, and may retain partial output. */
133
+ /** Optional and discouraged. Minimum 256 tokens; omit it to use the model's own output limit; values here are applied verbatim. A registered client default below the minimum is clamped up. If the limit is reached, the HTTP 200 Response has status `incomplete`, reason `max_output_tokens`, and may retain partial output. */
134
134
  "max_output_tokens"?: number;
135
135
  "temperature"?: number;
136
136
  "text"?: {
@@ -156,13 +156,13 @@ export interface WireCreateResponse {
156
156
  "tool_choice"?: "auto" | "none" | "required";
157
157
  "metadata"?: Record<string, string>;
158
158
  "include"?: Array<"reasoning" | "rounds" | "subagents" | "artifacts">;
159
- /** Which agent runs the request. The recommended general machine agent is `api`, which has no persona: `instructions` replace its system prompt. Pin `fast` for the chat-tuned version. `direct` selects the direct tier: the profile-free `api` agent with no tools and no session (see the Tiers section). `household/<slug>` runs a household agent built in the Agents studio (list them at GET /v1/agents). An `<app>/<name>` id runs an agent the caller's app declared at registration. `research` is an alias for `thorough` with Report output (a sourced report artifact). Retired ids (`mealu`, `nestlu`, `kitchen`, `waterlu`, `money`, `swarm`, `storylu`, `google-research`, `google-image`, `android`) return HTTP 400 `unknown_agent` with a pointer to their successor; the Android phone is now the `android` tool family on `assistant`. */
160
- "agent"?: "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom" | "direct" | string | "mealu" | "nestlu" | "kitchen" | "waterlu" | "money" | "swarm" | "stage" | "roleplay" | "storylu" | "google-research" | "google-image" | "android" | "research";
159
+ /** Which agent runs the request. The recommended general machine agent is `api`, which has no persona: `instructions` replace its system prompt. Pin `fast` for the chat-tuned version. `direct` selects the direct tier: the profile-free `api` agent with no tools and no session (see the Tiers section). `household/<slug>` runs a household agent built in the Agents studio (list them at GET /v1/agents). An `<app>/<name>` id runs an agent the caller's app declared at registration. `research` is an alias for `thorough` with Report output (a sourced report artifact). Retired ids (`mealu`, `nestlu`, `kitchen`, `waterlu`, `money`, `code`, `image`, `swarm`, `storylu`, `google-research`, `google-image`, `android`) return HTTP 400 `unknown_agent` with a pointer to their successor; Code and Image merged into `assistant` (AgentLu). The Android phone is now the `android` tool family on `assistant`. */
160
+ "agent"?: "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom" | "direct" | string | "mealu" | "nestlu" | "kitchen" | "waterlu" | "money" | "code" | "image" | "swarm" | "stage" | "roleplay" | "storylu" | "google-research" | "google-image" | "android" | "research";
161
161
  /** Thinking level. Explicit `effort: "off"` is honored; other requests are clamped to the selected model's supported capabilities. The SDK does not promise provider benchmark parity. */
162
162
  "reasoning"?: {
163
163
  "effort"?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
164
164
  };
165
- /** Wall clock for this run. Default: the use-case tier's (45s instant / 180s standard / 600s deep). */
165
+ /** Wall clock for this run. Minimum 15000 ms (15 s); a registered client default below it is clamped up. Default: the use-case tier's (45s instant / 180s standard / 600s deep). */
166
166
  "timeout_ms"?: number;
167
167
  /** Provider attempts for this run (1 = none). Bounds model-chain fallbacks. Default: the use-case tier's (instant 1, standard 2, deep 3) when the client declares a profile; without one the run keeps the pre-tier budget (the direct tier walks its whole chain, the agent tier does not fall back). */
168
168
  "attempts"?: number;
@@ -235,9 +235,9 @@ export interface WireRegisterClientRequest {
235
235
  /** Run defaults applied when a request omits the field: request > registered client default > use-case tier > agent/profile default. The built-in `store` default is true. Register one client per use-case (e.g. mealu-enrich) with its system prompt and tools baked in. */
236
236
  "defaults"?: {
237
237
  "backend"?: "pi";
238
- "agent"?: "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom" | "direct" | string | "mealu" | "nestlu" | "kitchen" | "waterlu" | "money" | "swarm" | "stage" | "roleplay" | "storylu" | "google-research" | "google-image" | "android" | "research";
238
+ "agent"?: "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom" | "direct" | string | "mealu" | "nestlu" | "kitchen" | "waterlu" | "money" | "code" | "image" | "swarm" | "stage" | "roleplay" | "storylu" | "google-research" | "google-image" | "android" | "research";
239
239
  "model"?: string;
240
- "modelRoute"?: "chat.quick" | "chat.household" | "chat.deep" | "chat.code" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
240
+ "modelRoute"?: "chat.quick" | "chat.household" | "chat.deep" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
241
241
  "instructions"?: string;
242
242
  "temperature"?: number;
243
243
  "store"?: boolean;
@@ -286,12 +286,12 @@ export interface WireRegisterClientRequest {
286
286
  /** Run defaults applied when a request omits the field: request > registered client default > use-case tier > agent/profile default. The built-in `store` default is true. Register one client per use-case (e.g. mealu-enrich) with its system prompt and tools baked in. */
287
287
  export interface WireClientDefaults {
288
288
  "backend"?: "pi";
289
- /** Which agent runs the request. The recommended general machine agent is `api`, which has no persona: `instructions` replace its system prompt. Pin `fast` for the chat-tuned version. `direct` selects the direct tier: the profile-free `api` agent with no tools and no session (see the Tiers section). `household/<slug>` runs a household agent built in the Agents studio (list them at GET /v1/agents). An `<app>/<name>` id runs an agent the caller's app declared at registration. `research` is an alias for `thorough` with Report output (a sourced report artifact). Retired ids (`mealu`, `nestlu`, `kitchen`, `waterlu`, `money`, `swarm`, `storylu`, `google-research`, `google-image`, `android`) return HTTP 400 `unknown_agent` with a pointer to their successor; the Android phone is now the `android` tool family on `assistant`. */
290
- "agent"?: "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom" | "direct" | string | "mealu" | "nestlu" | "kitchen" | "waterlu" | "money" | "swarm" | "stage" | "roleplay" | "storylu" | "google-research" | "google-image" | "android" | "research";
289
+ /** Which agent runs the request. The recommended general machine agent is `api`, which has no persona: `instructions` replace its system prompt. Pin `fast` for the chat-tuned version. `direct` selects the direct tier: the profile-free `api` agent with no tools and no session (see the Tiers section). `household/<slug>` runs a household agent built in the Agents studio (list them at GET /v1/agents). An `<app>/<name>` id runs an agent the caller's app declared at registration. `research` is an alias for `thorough` with Report output (a sourced report artifact). Retired ids (`mealu`, `nestlu`, `kitchen`, `waterlu`, `money`, `code`, `image`, `swarm`, `storylu`, `google-research`, `google-image`, `android`) return HTTP 400 `unknown_agent` with a pointer to their successor; Code and Image merged into `assistant` (AgentLu). The Android phone is now the `android` tool family on `assistant`. */
290
+ "agent"?: "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom" | "direct" | string | "mealu" | "nestlu" | "kitchen" | "waterlu" | "money" | "code" | "image" | "swarm" | "stage" | "roleplay" | "storylu" | "google-research" | "google-image" | "android" | "research";
291
291
  /** ModelConfig id (GET /v1/models). Stock clients may also use an agent name here; prefer explicit `agent` for machine calls. */
292
292
  "model"?: string;
293
293
  /** Task route whose pool order and effort apply to automatic model selection. Mutually exclusive with model. Explicit request models, builtin chat agents, and agent model pins win; app-owned and api agents inherit the client route. */
294
- "modelRoute"?: "chat.quick" | "chat.household" | "chat.deep" | "chat.code" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
294
+ "modelRoute"?: "chat.quick" | "chat.household" | "chat.deep" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
295
295
  /** System prompt for every run of this client. */
296
296
  "instructions"?: string;
297
297
  "temperature"?: number;
@@ -322,8 +322,9 @@ export interface WireClientDefaults {
322
322
  "url": string;
323
323
  "allowed_tools"?: string[];
324
324
  }>;
325
+ /** Default wall clock when the request omits `timeout_ms`. Values below 15000 ms are clamped up at run time (with a once-per-client warning). */
325
326
  "timeoutMs"?: number;
326
- /** Default output cap when the request omits `max_output_tokens`. The use-case tier supplies one when this is unset (instant 2048, deep 8192, standard none); requests always win. Honored for defaults written after this release: a value stored earlier stays inert until the app re-declares its defaults (or the console edits them), so a re-enable can never silently cap runs that used to complete. */
327
+ /** Default output cap when the request omits `max_output_tokens`. Values below 256 tokens are clamped up at run time (with a once-per-client warning). The use-case tier supplies one when this is unset (instant 2048, deep 8192, standard none); requests always win. Honored for defaults written after this release: a value stored earlier stays inert until the app re-declares its defaults (or the console edits them), so a re-enable can never silently cap runs that used to complete. */
327
328
  "maxOutputTokens"?: number;
328
329
  /** Provider attempts per run (1 = none). Bounds model-chain fallbacks, and is the background queue's retry budget. Defaults to the tier's (instant 1, standard 2, deep 3) when `use_case_profile.priority` is declared; without one the run keeps the pre-tier budget. */
329
330
  "attempts"?: number;
@@ -352,7 +353,7 @@ export interface WireAppAgentDeclaration {
352
353
  }
353
354
  export interface WireCreateThreadRequest {
354
355
  "title"?: string;
355
- "agent"?: "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom" | "research" | string;
356
+ "agent"?: "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom" | "research" | string;
356
357
  "model"?: string;
357
358
  "person"?: string | null;
358
359
  "owner"?: "client" | "person";
@@ -388,7 +389,7 @@ export interface WireResponse {
388
389
  "created_at": number;
389
390
  "status": "queued" | "in_progress" | "completed" | "failed" | "incomplete" | "cancelled";
390
391
  "backend": "pi";
391
- "agent": "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom";
392
+ "agent": "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom";
392
393
  "model": string;
393
394
  "conversation"?: {
394
395
  "id": string;
@@ -458,7 +459,7 @@ export interface WireResponse {
458
459
  "thread_id"?: string | null;
459
460
  "retries"?: number;
460
461
  "effective_model"?: string | null;
461
- "model_route"?: "chat.quick" | "chat.household" | "chat.deep" | "chat.code" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
462
+ "model_route"?: "chat.quick" | "chat.household" | "chat.deep" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
462
463
  "service_tier"?: "standard" | "priority";
463
464
  "execution_path"?: string | null;
464
465
  "queue_wait_ms"?: number | null;
@@ -578,7 +579,7 @@ export interface WireThread {
578
579
  "created_at": number;
579
580
  "updated_at": number;
580
581
  "title": string;
581
- "agent": "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom";
582
+ "agent": "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom";
582
583
  "model": string | null;
583
584
  /** "api" for threads created through /v1; "chat" when a human started it. */
584
585
  "origin": string;
@@ -617,9 +618,9 @@ export interface WireClient {
617
618
  "allow_person_threads"?: boolean;
618
619
  "defaults"?: {
619
620
  "backend"?: "pi";
620
- "agent"?: "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom" | "direct" | string | "mealu" | "nestlu" | "kitchen" | "waterlu" | "money" | "swarm" | "stage" | "roleplay" | "storylu" | "google-research" | "google-image" | "android" | "research";
621
+ "agent"?: "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom" | "direct" | string | "mealu" | "nestlu" | "kitchen" | "waterlu" | "money" | "code" | "image" | "swarm" | "stage" | "roleplay" | "storylu" | "google-research" | "google-image" | "android" | "research";
621
622
  "model"?: string;
622
- "modelRoute"?: "chat.quick" | "chat.household" | "chat.deep" | "chat.code" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
623
+ "modelRoute"?: "chat.quick" | "chat.household" | "chat.deep" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
623
624
  "instructions"?: string;
624
625
  "temperature"?: number;
625
626
  "store"?: boolean;
@@ -743,7 +744,7 @@ export interface WireResponseList {
743
744
  "created_at": number;
744
745
  "status": "queued" | "in_progress" | "completed" | "failed" | "incomplete" | "cancelled";
745
746
  "backend": "pi";
746
- "agent": "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom";
747
+ "agent": "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom";
747
748
  "model": string;
748
749
  "conversation"?: {
749
750
  "id": string;
@@ -808,7 +809,7 @@ export interface WireResponseList {
808
809
  "thread_id"?: string | null;
809
810
  "retries"?: number;
810
811
  "effective_model"?: string | null;
811
- "model_route"?: "chat.quick" | "chat.household" | "chat.deep" | "chat.code" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
812
+ "model_route"?: "chat.quick" | "chat.household" | "chat.deep" | "device" | "background.digest" | "utility" | "memory.extract" | "memory.judge" | "memory.consolidate";
812
813
  "service_tier"?: "standard" | "priority";
813
814
  "execution_path"?: string | null;
814
815
  "queue_wait_ms"?: number | null;
@@ -878,7 +879,7 @@ export interface WireThreadList {
878
879
  "created_at": number;
879
880
  "updated_at": number;
880
881
  "title": string;
881
- "agent": "auto" | "fast" | "thorough" | "assistant" | "code" | "google" | "image" | "api" | "digest" | "herald" | "cradle" | "custom";
882
+ "agent": "auto" | "fast" | "thorough" | "assistant" | "google" | "api" | "digest" | "herald" | "cradle" | "custom";
882
883
  "model": string | null;
883
884
  "origin": string;
884
885
  "end_user"?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterlu/agentlu",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "Client for the agentlu service API (/v1). Or just use the openai SDK pointed at http://localhost:8912/v1.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",