@intx/tools-mail 0.2.2 → 0.3.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
@@ -14,7 +14,11 @@ its definitions alongside other bundles.
14
14
  import { createMailTools } from "@intx/tools-mail";
15
15
  import { defineMailTools } from "@intx/harness";
16
16
 
17
- const mailFactory = defineMailTools(() => createMailTools({ capabilities }));
17
+ const mailTools = createMailTools({ capabilities });
18
+ const mailFactory = defineMailTools(
19
+ () => mailTools,
20
+ mailTools.definitions.map((def) => ({ name: def.name })),
21
+ );
18
22
  const def = defineAgent({ ..., tools: [mailFactory, posixFactory] });
19
23
  ```
20
24
 
@@ -1,13 +1,12 @@
1
1
  import { type BaseEnv } from "@intx/agent";
2
- import type { MessageTransport } from "@intx/types/runtime";
2
+ import type { RuntimeCapabilities } from "@intx/types/runtime-capabilities";
3
3
  /**
4
4
  * Env contract for the mail tool bundle. Extends `BaseEnv` with the
5
- * harness-level fields the mail tools depend on at handler-init time.
6
- * Compatible by structure with `@intx/harness`'s `MailEnv` so a host
7
- * that already provides that env can pass it straight through.
5
+ * host-assembled `capabilities` -- from which the mail tools resolve
6
+ * `mail.transport` -- and the agent `address`.
8
7
  */
9
8
  export interface MailToolEnv extends BaseEnv {
10
- transport: MessageTransport;
9
+ capabilities: RuntimeCapabilities;
11
10
  address: string;
12
11
  }
13
12
  /**
@@ -1,13 +1,15 @@
1
1
  // Sidecar-bundle entry for `@intx/tools-mail` — the convention-compliant
2
2
  // factory the tool-package loader invokes.
3
3
  //
4
- // The factory declares the env keys it touches (`transport`, `address`)
5
- // via `defineTool`'s `requires`. The host populates those slots in the
6
- // per-instance env; the factory wraps the existing `createMailTools`
7
- // implementation.
4
+ // The bundle consumes the host-assembled runtime capabilities rather than
5
+ // building its own. The host (the sidecar's step-env builder) owns the
6
+ // `RuntimeCapabilities` and puts it on `env.capabilities`; this factory
7
+ // resolves `mail.transport` from it through `createMailTools` instead of
8
+ // re-wrapping a raw transport it was handed separately. The env keys it
9
+ // touches (`capabilities`, `address`) are declared in `requires`.
8
10
  import { defineTool } from "@intx/agent";
9
- import { createRuntimeCapabilities } from "@intx/types/runtime-capabilities";
10
11
  import { createMailTools } from "./index.js";
12
+ import { TOOL_DEFINITIONS } from "./definitions.js";
11
13
  /**
12
14
  * Named export the loader picks up. The id is package-namespaced per
13
15
  * the convention; the model-facing tool names are synthesized by the
@@ -15,12 +17,10 @@ import { createMailTools } from "./index.js";
15
17
  */
16
18
  export const mail = defineTool({
17
19
  id: "@intx/tools-mail/sidecar-bundle",
18
- requires: ["transport", "address"],
20
+ requires: ["capabilities", "address"],
21
+ definitions: TOOL_DEFINITIONS.map((def) => ({ name: def.name })),
19
22
  factory: (env) => {
20
- const capabilities = createRuntimeCapabilities({
21
- "mail.transport": env.transport,
22
- });
23
- const tools = createMailTools({ capabilities });
23
+ const tools = createMailTools({ capabilities: env.capabilities });
24
24
  return {
25
25
  definitions: tools.definitions,
26
26
  run: (call, signal) => tools.run(call, signal),
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@intx/tools-mail",
3
- "version": "0.2.2",
3
+ "description": "Mail tool runner giving agents mail_send, mail_reply, mail_search, mail_read, and mail_wait",
4
+ "version": "0.3.0",
4
5
  "license": "LGPL-2.1-only",
5
6
  "type": "module",
6
7
  "interchange": {
@@ -19,10 +20,13 @@
19
20
  }
20
21
  },
21
22
  "dependencies": {
22
- "@intx/agent": "0.2.2",
23
- "@intx/types": "0.2.2",
23
+ "@intx/agent": "0.3.0",
24
+ "@intx/types": "0.3.0",
24
25
  "arktype": "^2.1.29"
25
26
  },
27
+ "devDependencies": {
28
+ "@intx/storage-isogit": "0.3.0"
29
+ },
26
30
  "files": [
27
31
  "dist",
28
32
  "README.md",