@lunora/agent 1.0.0-alpha.3 → 1.0.0-alpha.5

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.
Files changed (29) hide show
  1. package/dist/channels.d.mts +39 -31
  2. package/dist/channels.d.ts +39 -31
  3. package/dist/channels.mjs +1 -1
  4. package/dist/component.d.mts +57 -68
  5. package/dist/component.d.ts +57 -68
  6. package/dist/component.mjs +20 -9
  7. package/dist/inbound.d.mts +20 -20
  8. package/dist/inbound.d.ts +20 -20
  9. package/dist/index.d.mts +474 -490
  10. package/dist/index.d.ts +474 -490
  11. package/dist/index.mjs +4 -4
  12. package/dist/naming.d.mts +19 -19
  13. package/dist/naming.d.ts +19 -19
  14. package/dist/packem_shared/{agentAsTool-Dt8NlU6k.mjs → agentAsTool-CUHlWsmt.mjs} +5 -1
  15. package/dist/packem_shared/{compileAgentWorkflow-BxJjHgtD.mjs → compileAgentWorkflow-DX90058f.mjs} +1 -1
  16. package/dist/packem_shared/{defineAgent-D6maSbVc.mjs → defineAgent-DAwAZC9P.mjs} +1 -1
  17. package/dist/packem_shared/{graph-component-aoUwO-f0.mjs → graph-component-Bbaxxymp.mjs} +3 -2
  18. package/dist/packem_shared/{normalizeEntityName-CyEEWFkR.mjs → normalizeEntityName-BouctxLC.mjs} +1 -1
  19. package/dist/packem_shared/{runAgentLoop-Dhg4ZNvw.mjs → runAgentLoop-B3Q2o-Uz.mjs} +1 -1
  20. package/dist/packem_shared/types.d-boAM2Yi1.d.mts +1114 -0
  21. package/dist/packem_shared/types.d-boAM2Yi1.d.ts +1114 -0
  22. package/dist/sandbox.d.mts +126 -122
  23. package/dist/sandbox.d.ts +126 -122
  24. package/dist/sandbox.mjs +5 -1
  25. package/dist/telemetry/index.d.mts +103 -103
  26. package/dist/telemetry/index.d.ts +103 -103
  27. package/package.json +8 -8
  28. package/dist/packem_shared/types.d-BhJFTvz_.d.mts +0 -1114
  29. package/dist/packem_shared/types.d-BhJFTvz_.d.ts +0 -1114
@@ -1,34 +1,34 @@
1
- import { A as AgentDefinition } from "./packem_shared/types.d-BhJFTvz_.mjs";
1
+ import { A as AgentDefinition } from "./packem_shared/types.d-boAM2Yi1.mjs";
2
2
  import '@lunora/mail/inbound';
3
3
  import 'ai';
4
4
  /**
5
- * One agent wired into the inbound `email()` handler.
6
- * @experimental
7
- */
5
+ * One agent wired into the inbound `email()` handler.
6
+ * @experimental
7
+ */
8
8
  interface AgentEmailTarget {
9
9
  /**
10
- * The agent definition — only its `onEmail` mapper is read, deciding whether
11
- * this agent claims the message and, if so, the run to start.
12
- */
10
+ * The agent definition — only its `onEmail` mapper is read, deciding whether
11
+ * this agent claims the message and, if so, the run to start.
12
+ */
13
13
  agent: Pick<AgentDefinition, "onEmail">;
14
14
  /** The `AGENT_*` Workflow binding name (off `env`) that starts a run. */
15
15
  binding: string;
16
16
  }
17
17
  /**
18
- * The worker `email(message, env, ctx)` callback. Typed with `unknown`
19
- * parameters so it drops straight onto the generated `composed.email` slot
20
- * without a cast.
21
- * @experimental
22
- */
18
+ * The worker `email(message, env, ctx)` callback. Typed with `unknown`
19
+ * parameters so it drops straight onto the generated `composed.email` slot
20
+ * without a cast.
21
+ * @experimental
22
+ */
23
23
  type InboundAgentEmailHandler = (message: unknown, env: unknown, context: unknown) => Promise<void>;
24
24
  /**
25
- * Build the inbound `email()` handler for one or more `onEmail` agents. The
26
- * returned callback parses the message, then walks `targets` in order and starts
27
- * a durable run for the first agent whose `onEmail` mapper returns a run. If the
28
- * matched agent's Workflow binding is missing from `env` (run codegen/dev so
29
- * `wrangler.jsonc` declares it) the dispatch throws, and the inbound handler's
30
- * `onError` rejects (bounces) the message.
31
- * @experimental
32
- */
25
+ * Build the inbound `email()` handler for one or more `onEmail` agents. The
26
+ * returned callback parses the message, then walks `targets` in order and starts
27
+ * a durable run for the first agent whose `onEmail` mapper returns a run. If the
28
+ * matched agent's Workflow binding is missing from `env` (run codegen/dev so
29
+ * `wrangler.jsonc` declares it) the dispatch throws, and the inbound handler's
30
+ * `onError` rejects (bounces) the message.
31
+ * @experimental
32
+ */
33
33
  declare const dispatchAgentEmail: (targets: ReadonlyArray<AgentEmailTarget>) => InboundAgentEmailHandler;
34
34
  export { type AgentEmailTarget, type InboundAgentEmailHandler, dispatchAgentEmail };
package/dist/inbound.d.ts CHANGED
@@ -1,34 +1,34 @@
1
- import { A as AgentDefinition } from "./packem_shared/types.d-BhJFTvz_.js";
1
+ import { A as AgentDefinition } from "./packem_shared/types.d-boAM2Yi1.js";
2
2
  import '@lunora/mail/inbound';
3
3
  import 'ai';
4
4
  /**
5
- * One agent wired into the inbound `email()` handler.
6
- * @experimental
7
- */
5
+ * One agent wired into the inbound `email()` handler.
6
+ * @experimental
7
+ */
8
8
  interface AgentEmailTarget {
9
9
  /**
10
- * The agent definition — only its `onEmail` mapper is read, deciding whether
11
- * this agent claims the message and, if so, the run to start.
12
- */
10
+ * The agent definition — only its `onEmail` mapper is read, deciding whether
11
+ * this agent claims the message and, if so, the run to start.
12
+ */
13
13
  agent: Pick<AgentDefinition, "onEmail">;
14
14
  /** The `AGENT_*` Workflow binding name (off `env`) that starts a run. */
15
15
  binding: string;
16
16
  }
17
17
  /**
18
- * The worker `email(message, env, ctx)` callback. Typed with `unknown`
19
- * parameters so it drops straight onto the generated `composed.email` slot
20
- * without a cast.
21
- * @experimental
22
- */
18
+ * The worker `email(message, env, ctx)` callback. Typed with `unknown`
19
+ * parameters so it drops straight onto the generated `composed.email` slot
20
+ * without a cast.
21
+ * @experimental
22
+ */
23
23
  type InboundAgentEmailHandler = (message: unknown, env: unknown, context: unknown) => Promise<void>;
24
24
  /**
25
- * Build the inbound `email()` handler for one or more `onEmail` agents. The
26
- * returned callback parses the message, then walks `targets` in order and starts
27
- * a durable run for the first agent whose `onEmail` mapper returns a run. If the
28
- * matched agent's Workflow binding is missing from `env` (run codegen/dev so
29
- * `wrangler.jsonc` declares it) the dispatch throws, and the inbound handler's
30
- * `onError` rejects (bounces) the message.
31
- * @experimental
32
- */
25
+ * Build the inbound `email()` handler for one or more `onEmail` agents. The
26
+ * returned callback parses the message, then walks `targets` in order and starts
27
+ * a durable run for the first agent whose `onEmail` mapper returns a run. If the
28
+ * matched agent's Workflow binding is missing from `env` (run codegen/dev so
29
+ * `wrangler.jsonc` declares it) the dispatch throws, and the inbound handler's
30
+ * `onError` rejects (bounces) the message.
31
+ * @experimental
32
+ */
33
33
  declare const dispatchAgentEmail: (targets: ReadonlyArray<AgentEmailTarget>) => InboundAgentEmailHandler;
34
34
  export { type AgentEmailTarget, type InboundAgentEmailHandler, dispatchAgentEmail };