@lunora/agent 1.0.0-alpha.40 → 1.0.0-alpha.41
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/dist/channels.d.mts +2 -2
- package/dist/channels.d.ts +2 -2
- package/dist/inbound.d.mts +1 -1
- package/dist/inbound.d.ts +1 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/packem_shared/{types.d-BC_N2z6_.d.mts → types.d-B6v0Hgi5.d.mts} +11 -11
- package/dist/packem_shared/{types.d-BC_N2z6_.d.ts → types.d-B6v0Hgi5.d.ts} +11 -11
- package/dist/sandbox.d.mts +2 -2
- package/dist/sandbox.d.ts +2 -2
- package/package.json +7 -7
package/dist/channels.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentDefinition } from "./packem_shared/types.d-
|
|
2
|
-
export type { I as InboundChannelEvent } from "./packem_shared/types.d-
|
|
1
|
+
import { A as AgentDefinition } from "./packem_shared/types.d-B6v0Hgi5.mjs";
|
|
2
|
+
export type { I as InboundChannelEvent } from "./packem_shared/types.d-B6v0Hgi5.mjs";
|
|
3
3
|
import '@lunora/mail/inbound';
|
|
4
4
|
import 'ai';
|
|
5
5
|
/**
|
package/dist/channels.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentDefinition } from "./packem_shared/types.d-
|
|
2
|
-
export type { I as InboundChannelEvent } from "./packem_shared/types.d-
|
|
1
|
+
import { A as AgentDefinition } from "./packem_shared/types.d-B6v0Hgi5.js";
|
|
2
|
+
export type { I as InboundChannelEvent } from "./packem_shared/types.d-B6v0Hgi5.js";
|
|
3
3
|
import '@lunora/mail/inbound';
|
|
4
4
|
import 'ai';
|
|
5
5
|
/**
|
package/dist/inbound.d.mts
CHANGED
package/dist/inbound.d.ts
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentDefinition, c as AgentCompact, d as AgentEpisodeExtract, e as AgentGraphExtract, f as AgentGenerate, g as AgentTokenSink, h as AgentRunInput, i as AgentFunctionPaths, j as AgentRunFunction, k as AgentStepLike, l as AgentStreamGenerate, m as AgentRunResult, n as AgentMessageRow, o as AgentConfig, S as SkillDefinition, p as AnyAgentTool, q as AgentAsToolOptions, r as AgentSubToolInput, b as AgentToolDefinition, s as AgentBindingSpec, t as AgentHandle, u as AgentToolConfig, v as AgentFunctionReference, w as AgentModelInput, x as SkillConfig } from "./packem_shared/types.d-
|
|
2
|
-
export type { y as AgentApprovalContext, z as AgentEmailMapper, B as AgentEmailRun, C as AgentGenerateOptions, D as AgentGenerateResult, E as AgentInstructionsContext, F as AgentLiveEvent, G as AgentMemoryOptions, H as AgentMemorySource, J as AgentMessageStatus, K as AgentOnStepFinish, L as AgentPrepareStep, M as AgentPrepareStepInput, N as AgentPrepareStepResult, O as AgentProgressEvent, P as AgentRunHandle, Q as AgentStepFinishInfo, R as AgentStepInfo, T as AgentThreadStatus, U as AgentTokenDelta, V as AgentToolCall, a as AgentToolContext, W as AgentUsage, X as AgentVoiceConfig, Y as AgentWorkflowBindingLike, Z as AgentWorkflowInstanceLike } from "./packem_shared/types.d-
|
|
1
|
+
import { A as AgentDefinition, c as AgentCompact, d as AgentEpisodeExtract, e as AgentGraphExtract, f as AgentGenerate, g as AgentTokenSink, h as AgentRunInput, i as AgentFunctionPaths, j as AgentRunFunction, k as AgentStepLike, l as AgentStreamGenerate, m as AgentRunResult, n as AgentMessageRow, o as AgentConfig, S as SkillDefinition, p as AnyAgentTool, q as AgentAsToolOptions, r as AgentSubToolInput, b as AgentToolDefinition, s as AgentBindingSpec, t as AgentHandle, u as AgentToolConfig, v as AgentFunctionReference, w as AgentModelInput, x as SkillConfig } from "./packem_shared/types.d-B6v0Hgi5.mjs";
|
|
2
|
+
export type { y as AgentApprovalContext, z as AgentEmailMapper, B as AgentEmailRun, C as AgentGenerateOptions, D as AgentGenerateResult, E as AgentInstructionsContext, F as AgentLiveEvent, G as AgentMemoryOptions, H as AgentMemorySource, J as AgentMessageStatus, K as AgentOnStepFinish, L as AgentPrepareStep, M as AgentPrepareStepInput, N as AgentPrepareStepResult, O as AgentProgressEvent, P as AgentRunHandle, Q as AgentStepFinishInfo, R as AgentStepInfo, T as AgentThreadStatus, U as AgentTokenDelta, V as AgentToolCall, a as AgentToolContext, W as AgentUsage, X as AgentVoiceConfig, Y as AgentWorkflowBindingLike, Z as AgentWorkflowInstanceLike } from "./packem_shared/types.d-B6v0Hgi5.mjs";
|
|
3
3
|
export { type AgentComponent, agentComponent, agentExtension } from "./component.mjs";
|
|
4
4
|
import { FlexibleSchema, LanguageModel, ModelMessage } from 'ai';
|
|
5
5
|
export { agentBindingName, agentClassName, agentDefaultName, voiceBindingName, voiceClassName } from "./naming.mjs";
|
|
@@ -183,7 +183,7 @@ declare const agentAsTool: (options: AgentAsToolOptions) => AgentToolDefinition<
|
|
|
183
183
|
interface ToolScriptStep {
|
|
184
184
|
/** A stable name later steps reference the output by. */
|
|
185
185
|
id: string;
|
|
186
|
-
/** The tool's input; values may embed `{ "$from": "
|
|
186
|
+
/** The tool's input; values may embed `{ "$from": "<stepId>", "$path": "a.b" }` refs. */
|
|
187
187
|
input?: Record<string, unknown>;
|
|
188
188
|
/** The tool to call — one of the tools handed to {@link codeTool}. */
|
|
189
189
|
tool: string;
|
|
@@ -821,15 +821,15 @@ declare class VoiceSessionDO {
|
|
|
821
821
|
}
|
|
822
822
|
/**
|
|
823
823
|
* Compile a `defineAgent` definition into the workflow the generated
|
|
824
|
-
*
|
|
824
|
+
* `<Name>AgentWorkflow` entrypoint class runs. Codegen emits, per agent:
|
|
825
825
|
*
|
|
826
826
|
* ```ts
|
|
827
827
|
* import LunoraWorkflow from "@lunora/workflow/do";
|
|
828
828
|
* import { compileAgentWorkflow } from "@lunora/agent";
|
|
829
829
|
* import { support } from "../agents.js";
|
|
830
830
|
*
|
|
831
|
-
* export class SupportAgentWorkflow extends LunoraWorkflow
|
|
832
|
-
* public constructor(ctx: ConstructorParameters
|
|
831
|
+
* export class SupportAgentWorkflow extends LunoraWorkflow<AgentRunInput, AgentRunResult> {
|
|
832
|
+
* public constructor(ctx: ConstructorParameters<typeof LunoraWorkflow>[0], env: Record<string, unknown>) {
|
|
833
833
|
* super(ctx, env, compileAgentWorkflow(support, "support"), "support");
|
|
834
834
|
* }
|
|
835
835
|
* }
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentDefinition, c as AgentCompact, d as AgentEpisodeExtract, e as AgentGraphExtract, f as AgentGenerate, g as AgentTokenSink, h as AgentRunInput, i as AgentFunctionPaths, j as AgentRunFunction, k as AgentStepLike, l as AgentStreamGenerate, m as AgentRunResult, n as AgentMessageRow, o as AgentConfig, S as SkillDefinition, p as AnyAgentTool, q as AgentAsToolOptions, r as AgentSubToolInput, b as AgentToolDefinition, s as AgentBindingSpec, t as AgentHandle, u as AgentToolConfig, v as AgentFunctionReference, w as AgentModelInput, x as SkillConfig } from "./packem_shared/types.d-
|
|
2
|
-
export type { y as AgentApprovalContext, z as AgentEmailMapper, B as AgentEmailRun, C as AgentGenerateOptions, D as AgentGenerateResult, E as AgentInstructionsContext, F as AgentLiveEvent, G as AgentMemoryOptions, H as AgentMemorySource, J as AgentMessageStatus, K as AgentOnStepFinish, L as AgentPrepareStep, M as AgentPrepareStepInput, N as AgentPrepareStepResult, O as AgentProgressEvent, P as AgentRunHandle, Q as AgentStepFinishInfo, R as AgentStepInfo, T as AgentThreadStatus, U as AgentTokenDelta, V as AgentToolCall, a as AgentToolContext, W as AgentUsage, X as AgentVoiceConfig, Y as AgentWorkflowBindingLike, Z as AgentWorkflowInstanceLike } from "./packem_shared/types.d-
|
|
1
|
+
import { A as AgentDefinition, c as AgentCompact, d as AgentEpisodeExtract, e as AgentGraphExtract, f as AgentGenerate, g as AgentTokenSink, h as AgentRunInput, i as AgentFunctionPaths, j as AgentRunFunction, k as AgentStepLike, l as AgentStreamGenerate, m as AgentRunResult, n as AgentMessageRow, o as AgentConfig, S as SkillDefinition, p as AnyAgentTool, q as AgentAsToolOptions, r as AgentSubToolInput, b as AgentToolDefinition, s as AgentBindingSpec, t as AgentHandle, u as AgentToolConfig, v as AgentFunctionReference, w as AgentModelInput, x as SkillConfig } from "./packem_shared/types.d-B6v0Hgi5.js";
|
|
2
|
+
export type { y as AgentApprovalContext, z as AgentEmailMapper, B as AgentEmailRun, C as AgentGenerateOptions, D as AgentGenerateResult, E as AgentInstructionsContext, F as AgentLiveEvent, G as AgentMemoryOptions, H as AgentMemorySource, J as AgentMessageStatus, K as AgentOnStepFinish, L as AgentPrepareStep, M as AgentPrepareStepInput, N as AgentPrepareStepResult, O as AgentProgressEvent, P as AgentRunHandle, Q as AgentStepFinishInfo, R as AgentStepInfo, T as AgentThreadStatus, U as AgentTokenDelta, V as AgentToolCall, a as AgentToolContext, W as AgentUsage, X as AgentVoiceConfig, Y as AgentWorkflowBindingLike, Z as AgentWorkflowInstanceLike } from "./packem_shared/types.d-B6v0Hgi5.js";
|
|
3
3
|
export { type AgentComponent, agentComponent, agentExtension } from "./component.js";
|
|
4
4
|
import { FlexibleSchema, LanguageModel, ModelMessage } from 'ai';
|
|
5
5
|
export { agentBindingName, agentClassName, agentDefaultName, voiceBindingName, voiceClassName } from "./naming.js";
|
|
@@ -183,7 +183,7 @@ declare const agentAsTool: (options: AgentAsToolOptions) => AgentToolDefinition<
|
|
|
183
183
|
interface ToolScriptStep {
|
|
184
184
|
/** A stable name later steps reference the output by. */
|
|
185
185
|
id: string;
|
|
186
|
-
/** The tool's input; values may embed `{ "$from": "
|
|
186
|
+
/** The tool's input; values may embed `{ "$from": "<stepId>", "$path": "a.b" }` refs. */
|
|
187
187
|
input?: Record<string, unknown>;
|
|
188
188
|
/** The tool to call — one of the tools handed to {@link codeTool}. */
|
|
189
189
|
tool: string;
|
|
@@ -821,15 +821,15 @@ declare class VoiceSessionDO {
|
|
|
821
821
|
}
|
|
822
822
|
/**
|
|
823
823
|
* Compile a `defineAgent` definition into the workflow the generated
|
|
824
|
-
*
|
|
824
|
+
* `<Name>AgentWorkflow` entrypoint class runs. Codegen emits, per agent:
|
|
825
825
|
*
|
|
826
826
|
* ```ts
|
|
827
827
|
* import LunoraWorkflow from "@lunora/workflow/do";
|
|
828
828
|
* import { compileAgentWorkflow } from "@lunora/agent";
|
|
829
829
|
* import { support } from "../agents.js";
|
|
830
830
|
*
|
|
831
|
-
* export class SupportAgentWorkflow extends LunoraWorkflow
|
|
832
|
-
* public constructor(ctx: ConstructorParameters
|
|
831
|
+
* export class SupportAgentWorkflow extends LunoraWorkflow<AgentRunInput, AgentRunResult> {
|
|
832
|
+
* public constructor(ctx: ConstructorParameters<typeof LunoraWorkflow>[0], env: Record<string, unknown>) {
|
|
833
833
|
* super(ctx, env, compileAgentWorkflow(support, "support"), "support");
|
|
834
834
|
* }
|
|
835
835
|
* }
|
|
@@ -23,7 +23,7 @@ interface AgentStepLike {
|
|
|
23
23
|
/**
|
|
24
24
|
* Durably hibernate until an external event of `type` arrives, then return
|
|
25
25
|
* its payload. Used for human-in-the-loop approvals: a run pauses on
|
|
26
|
-
* `approval
|
|
26
|
+
* `approval:<toolCallId>` until a client resolves it. Like `do`, a resolved
|
|
27
27
|
* wait is memoized — a replay returns the recorded decision without pausing
|
|
28
28
|
* again. Signature mirrors `@lunora/workflow`'s `WorkflowStepLike`.
|
|
29
29
|
*/
|
|
@@ -42,7 +42,7 @@ interface AgentStepLike {
|
|
|
42
42
|
* `idempotencyKey`.
|
|
43
43
|
*
|
|
44
44
|
* The `idempotencyKey` is the deterministic durable-step name
|
|
45
|
-
* (`tool
|
|
45
|
+
* (`tool:<name>:<toolCallId>`). A COMPLETED tool step is never re-run on a
|
|
46
46
|
* workflow replay (native step memoization) — but a step that FAILS mid-body
|
|
47
47
|
* is retried at-least-once, so a side-effecting tool (charge a card, send a
|
|
48
48
|
* mail) must dedupe on this key itself.
|
|
@@ -138,7 +138,7 @@ interface AgentToolDefinition<Input = unknown, Output = unknown> {
|
|
|
138
138
|
* Gate the tool behind a human approval (mirrors the AI SDK's
|
|
139
139
|
* `needsApproval`). When it resolves truthy the durable run PAUSES — the
|
|
140
140
|
* thread moves to `"awaiting_input"` and the workflow hibernates on
|
|
141
|
-
* `approval
|
|
141
|
+
* `approval:<toolCallId>` — until a client calls `agents:agentResolveApproval`.
|
|
142
142
|
* On approve the tool runs exactly as normal; on reject it is skipped and a
|
|
143
143
|
* tool result explaining the rejection is persisted so the next turn recovers.
|
|
144
144
|
* A boolean gates statically; a function gates per input. Default: `false`
|
|
@@ -146,7 +146,7 @@ interface AgentToolDefinition<Input = unknown, Output = unknown> {
|
|
|
146
146
|
*
|
|
147
147
|
* The boolean/`undefined` forms are compile-time constants re-derived
|
|
148
148
|
* identically on every replay — no durable step. The FUNCTION form runs
|
|
149
|
-
* inside its OWN durable step (`tool:approval-gate
|
|
149
|
+
* inside its OWN durable step (`tool:approval-gate:<toolCallId>`, distinct
|
|
150
150
|
* from the tool's own step), so it now runs exactly once per call, not once
|
|
151
151
|
* per replay. It must still be otherwise pure: deterministic given its
|
|
152
152
|
* inputs (no `Date.now()`/`Math.random()`) and free of side effects — the
|
|
@@ -269,7 +269,7 @@ interface AgentMemoryOptions {
|
|
|
269
269
|
* (`key: "default"`) from {@link AgentConfig.memory}, then one per skill that
|
|
270
270
|
* carries `knowledge` (keyed by the skill's name). The key names the durable
|
|
271
271
|
* step — the default source keeps the historic `"memory:retrieve"`, a skill
|
|
272
|
-
* source uses `"memory:retrieve
|
|
272
|
+
* source uses `"memory:retrieve:<key>"` — so replay stays deterministic.
|
|
273
273
|
* @experimental
|
|
274
274
|
*/
|
|
275
275
|
interface AgentMemorySource extends AgentMemoryOptions {
|
|
@@ -325,7 +325,7 @@ interface SkillConfig {
|
|
|
325
325
|
knowledge?: AgentMemoryOptions;
|
|
326
326
|
/**
|
|
327
327
|
* The skill's identifier — namespaces this skill's `knowledge` memory source
|
|
328
|
-
* (the durable step `memory:retrieve
|
|
328
|
+
* (the durable step `memory:retrieve:<name>`). Must be identifier-shaped.
|
|
329
329
|
*/
|
|
330
330
|
name: string;
|
|
331
331
|
/**
|
|
@@ -375,7 +375,7 @@ interface AgentStepFinishInfo {
|
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
377
|
* Called after each LLM turn with that turn's text, tool calls, and usage. Runs
|
|
378
|
-
* inside a named durable step (`agent:step-finish
|
|
378
|
+
* inside a named durable step (`agent:step-finish:<turn>`) so it fires exactly
|
|
379
379
|
* once per turn even across a workflow replay.
|
|
380
380
|
* @experimental
|
|
381
381
|
*/
|
|
@@ -547,7 +547,7 @@ interface AgentConfig {
|
|
|
547
547
|
model: AgentModelInput;
|
|
548
548
|
/**
|
|
549
549
|
* Optional override for the deployed workflow name (`wrangler.jsonc`
|
|
550
|
-
* `workflows[].name`). Defaults to `agent
|
|
550
|
+
* `workflows[].name`). Defaults to `agent-<kebab-cased export name>`. Does
|
|
551
551
|
* NOT change the binding name, which is always derived from the export
|
|
552
552
|
* name (`support` → `AGENT_SUPPORT`).
|
|
553
553
|
*/
|
|
@@ -594,7 +594,7 @@ interface AgentConfig {
|
|
|
594
594
|
* Opt this agent into being STARTED over the public RPC boundary — i.e. via
|
|
595
595
|
* the auto-registered `agents:agentRun` mutation an HTTP-only client (e.g.
|
|
596
596
|
* the `@lunora/mcp` server) calls. Default `false`: an agent is startable
|
|
597
|
-
* only from server-side app code (`ctx.agents
|
|
597
|
+
* only from server-side app code (`ctx.agents.<name>.run(...)`), so declaring
|
|
598
598
|
* an agent does NOT expose it to arbitrary RPC callers. Fail-closed — the run
|
|
599
599
|
* mutation refuses an agent that has not opted in, regardless of any MCP-side
|
|
600
600
|
* `allowAgents` configuration. A started thread is still owner-scoped to
|
|
@@ -705,7 +705,7 @@ interface AgentAsToolOptions {
|
|
|
705
705
|
/** Cap on child-run status polls before giving up. Default 120. */
|
|
706
706
|
maxPolls?: number;
|
|
707
707
|
/**
|
|
708
|
-
* The child agent's export name — selects its `AGENT_
|
|
708
|
+
* The child agent's export name — selects its `AGENT_<NAME>` Workflow
|
|
709
709
|
* binding (e.g. `"researcher"` → `AGENT_RESEARCHER`). The model-facing tool
|
|
710
710
|
* name is the KEY assigned in the parent's `tools` map, not this.
|
|
711
711
|
*/
|
|
@@ -1095,7 +1095,7 @@ interface AgentRunHandle {
|
|
|
1095
1095
|
id: string;
|
|
1096
1096
|
}
|
|
1097
1097
|
/**
|
|
1098
|
-
* The `ctx.agents
|
|
1098
|
+
* The `ctx.agents.<name>` producer handle.
|
|
1099
1099
|
* @experimental
|
|
1100
1100
|
*/
|
|
1101
1101
|
interface AgentHandle {
|
|
@@ -23,7 +23,7 @@ interface AgentStepLike {
|
|
|
23
23
|
/**
|
|
24
24
|
* Durably hibernate until an external event of `type` arrives, then return
|
|
25
25
|
* its payload. Used for human-in-the-loop approvals: a run pauses on
|
|
26
|
-
* `approval
|
|
26
|
+
* `approval:<toolCallId>` until a client resolves it. Like `do`, a resolved
|
|
27
27
|
* wait is memoized — a replay returns the recorded decision without pausing
|
|
28
28
|
* again. Signature mirrors `@lunora/workflow`'s `WorkflowStepLike`.
|
|
29
29
|
*/
|
|
@@ -42,7 +42,7 @@ interface AgentStepLike {
|
|
|
42
42
|
* `idempotencyKey`.
|
|
43
43
|
*
|
|
44
44
|
* The `idempotencyKey` is the deterministic durable-step name
|
|
45
|
-
* (`tool
|
|
45
|
+
* (`tool:<name>:<toolCallId>`). A COMPLETED tool step is never re-run on a
|
|
46
46
|
* workflow replay (native step memoization) — but a step that FAILS mid-body
|
|
47
47
|
* is retried at-least-once, so a side-effecting tool (charge a card, send a
|
|
48
48
|
* mail) must dedupe on this key itself.
|
|
@@ -138,7 +138,7 @@ interface AgentToolDefinition<Input = unknown, Output = unknown> {
|
|
|
138
138
|
* Gate the tool behind a human approval (mirrors the AI SDK's
|
|
139
139
|
* `needsApproval`). When it resolves truthy the durable run PAUSES — the
|
|
140
140
|
* thread moves to `"awaiting_input"` and the workflow hibernates on
|
|
141
|
-
* `approval
|
|
141
|
+
* `approval:<toolCallId>` — until a client calls `agents:agentResolveApproval`.
|
|
142
142
|
* On approve the tool runs exactly as normal; on reject it is skipped and a
|
|
143
143
|
* tool result explaining the rejection is persisted so the next turn recovers.
|
|
144
144
|
* A boolean gates statically; a function gates per input. Default: `false`
|
|
@@ -146,7 +146,7 @@ interface AgentToolDefinition<Input = unknown, Output = unknown> {
|
|
|
146
146
|
*
|
|
147
147
|
* The boolean/`undefined` forms are compile-time constants re-derived
|
|
148
148
|
* identically on every replay — no durable step. The FUNCTION form runs
|
|
149
|
-
* inside its OWN durable step (`tool:approval-gate
|
|
149
|
+
* inside its OWN durable step (`tool:approval-gate:<toolCallId>`, distinct
|
|
150
150
|
* from the tool's own step), so it now runs exactly once per call, not once
|
|
151
151
|
* per replay. It must still be otherwise pure: deterministic given its
|
|
152
152
|
* inputs (no `Date.now()`/`Math.random()`) and free of side effects — the
|
|
@@ -269,7 +269,7 @@ interface AgentMemoryOptions {
|
|
|
269
269
|
* (`key: "default"`) from {@link AgentConfig.memory}, then one per skill that
|
|
270
270
|
* carries `knowledge` (keyed by the skill's name). The key names the durable
|
|
271
271
|
* step — the default source keeps the historic `"memory:retrieve"`, a skill
|
|
272
|
-
* source uses `"memory:retrieve
|
|
272
|
+
* source uses `"memory:retrieve:<key>"` — so replay stays deterministic.
|
|
273
273
|
* @experimental
|
|
274
274
|
*/
|
|
275
275
|
interface AgentMemorySource extends AgentMemoryOptions {
|
|
@@ -325,7 +325,7 @@ interface SkillConfig {
|
|
|
325
325
|
knowledge?: AgentMemoryOptions;
|
|
326
326
|
/**
|
|
327
327
|
* The skill's identifier — namespaces this skill's `knowledge` memory source
|
|
328
|
-
* (the durable step `memory:retrieve
|
|
328
|
+
* (the durable step `memory:retrieve:<name>`). Must be identifier-shaped.
|
|
329
329
|
*/
|
|
330
330
|
name: string;
|
|
331
331
|
/**
|
|
@@ -375,7 +375,7 @@ interface AgentStepFinishInfo {
|
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
377
|
* Called after each LLM turn with that turn's text, tool calls, and usage. Runs
|
|
378
|
-
* inside a named durable step (`agent:step-finish
|
|
378
|
+
* inside a named durable step (`agent:step-finish:<turn>`) so it fires exactly
|
|
379
379
|
* once per turn even across a workflow replay.
|
|
380
380
|
* @experimental
|
|
381
381
|
*/
|
|
@@ -547,7 +547,7 @@ interface AgentConfig {
|
|
|
547
547
|
model: AgentModelInput;
|
|
548
548
|
/**
|
|
549
549
|
* Optional override for the deployed workflow name (`wrangler.jsonc`
|
|
550
|
-
* `workflows[].name`). Defaults to `agent
|
|
550
|
+
* `workflows[].name`). Defaults to `agent-<kebab-cased export name>`. Does
|
|
551
551
|
* NOT change the binding name, which is always derived from the export
|
|
552
552
|
* name (`support` → `AGENT_SUPPORT`).
|
|
553
553
|
*/
|
|
@@ -594,7 +594,7 @@ interface AgentConfig {
|
|
|
594
594
|
* Opt this agent into being STARTED over the public RPC boundary — i.e. via
|
|
595
595
|
* the auto-registered `agents:agentRun` mutation an HTTP-only client (e.g.
|
|
596
596
|
* the `@lunora/mcp` server) calls. Default `false`: an agent is startable
|
|
597
|
-
* only from server-side app code (`ctx.agents
|
|
597
|
+
* only from server-side app code (`ctx.agents.<name>.run(...)`), so declaring
|
|
598
598
|
* an agent does NOT expose it to arbitrary RPC callers. Fail-closed — the run
|
|
599
599
|
* mutation refuses an agent that has not opted in, regardless of any MCP-side
|
|
600
600
|
* `allowAgents` configuration. A started thread is still owner-scoped to
|
|
@@ -705,7 +705,7 @@ interface AgentAsToolOptions {
|
|
|
705
705
|
/** Cap on child-run status polls before giving up. Default 120. */
|
|
706
706
|
maxPolls?: number;
|
|
707
707
|
/**
|
|
708
|
-
* The child agent's export name — selects its `AGENT_
|
|
708
|
+
* The child agent's export name — selects its `AGENT_<NAME>` Workflow
|
|
709
709
|
* binding (e.g. `"researcher"` → `AGENT_RESEARCHER`). The model-facing tool
|
|
710
710
|
* name is the KEY assigned in the parent's `tools` map, not this.
|
|
711
711
|
*/
|
|
@@ -1095,7 +1095,7 @@ interface AgentRunHandle {
|
|
|
1095
1095
|
id: string;
|
|
1096
1096
|
}
|
|
1097
1097
|
/**
|
|
1098
|
-
* The `ctx.agents
|
|
1098
|
+
* The `ctx.agents.<name>` producer handle.
|
|
1099
1099
|
* @experimental
|
|
1100
1100
|
*/
|
|
1101
1101
|
interface AgentHandle {
|
package/dist/sandbox.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentToolContext, b as AgentToolDefinition } from "./packem_shared/types.d-
|
|
1
|
+
import { a as AgentToolContext, b as AgentToolDefinition } from "./packem_shared/types.d-B6v0Hgi5.mjs";
|
|
2
2
|
import '@lunora/mail/inbound';
|
|
3
3
|
import 'ai';
|
|
4
4
|
/**
|
|
@@ -149,7 +149,7 @@ interface ContainerToolOptions {
|
|
|
149
149
|
declare const browserTool: (options?: BrowserToolOptions) => AgentToolDefinition<BrowserToolInput, string>;
|
|
150
150
|
/**
|
|
151
151
|
* A batteries-included agent tool that talks to a declared Cloudflare
|
|
152
|
-
* Container. `name` is the `ctx.containers
|
|
152
|
+
* Container. `name` is the `ctx.containers.<name>` key (the `lunora/containers.ts`
|
|
153
153
|
* export). One tool exposes `fetch` (HTTP request) and `exec` (run a command);
|
|
154
154
|
* the model picks via `op`. The call dispatches to the auto-registered
|
|
155
155
|
* `sandbox:invoke` action, which carries `ctx.containers`.
|
package/dist/sandbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentToolContext, b as AgentToolDefinition } from "./packem_shared/types.d-
|
|
1
|
+
import { a as AgentToolContext, b as AgentToolDefinition } from "./packem_shared/types.d-B6v0Hgi5.js";
|
|
2
2
|
import '@lunora/mail/inbound';
|
|
3
3
|
import 'ai';
|
|
4
4
|
/**
|
|
@@ -149,7 +149,7 @@ interface ContainerToolOptions {
|
|
|
149
149
|
declare const browserTool: (options?: BrowserToolOptions) => AgentToolDefinition<BrowserToolInput, string>;
|
|
150
150
|
/**
|
|
151
151
|
* A batteries-included agent tool that talks to a declared Cloudflare
|
|
152
|
-
* Container. `name` is the `ctx.containers
|
|
152
|
+
* Container. `name` is the `ctx.containers.<name>` key (the `lunora/containers.ts`
|
|
153
153
|
* export). One tool exposes `fetch` (HTTP request) and `exec` (run a command);
|
|
154
154
|
* the model picks via `op`. The call dispatches to the auto-registered
|
|
155
155
|
* `sandbox:invoke` action, which carries `ctx.containers`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/agent",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.41",
|
|
4
4
|
"description": "Durable AI agents for Lunora: defineAgent compiles a replay-safe tool-loop onto Cloudflare Workflows, with DO SQLite threads and live message subscriptions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@lunora/ai": "1.0.0-alpha.
|
|
80
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
81
|
-
"@lunora/mail": "1.0.0-alpha.
|
|
82
|
-
"@lunora/server": "1.0.0-alpha.
|
|
83
|
-
"@lunora/values": "1.0.0-alpha.
|
|
84
|
-
"@lunora/workflow": "1.0.0-alpha.
|
|
79
|
+
"@lunora/ai": "1.0.0-alpha.48",
|
|
80
|
+
"@lunora/errors": "1.0.0-alpha.14",
|
|
81
|
+
"@lunora/mail": "1.0.0-alpha.41",
|
|
82
|
+
"@lunora/server": "1.0.0-alpha.62",
|
|
83
|
+
"@lunora/values": "1.0.0-alpha.19",
|
|
84
|
+
"@lunora/workflow": "1.0.0-alpha.21",
|
|
85
85
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
86
86
|
"ai": "7.0.37"
|
|
87
87
|
},
|