@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 +5 -1
- package/dist/sidecar-bundle.d.ts +4 -5
- package/dist/sidecar-bundle.js +10 -10
- package/package.json +7 -3
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
|
|
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
|
|
package/dist/sidecar-bundle.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { type BaseEnv } from "@intx/agent";
|
|
2
|
-
import type {
|
|
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
|
-
*
|
|
6
|
-
*
|
|
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
|
-
|
|
9
|
+
capabilities: RuntimeCapabilities;
|
|
11
10
|
address: string;
|
|
12
11
|
}
|
|
13
12
|
/**
|
package/dist/sidecar-bundle.js
CHANGED
|
@@ -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
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
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: ["
|
|
20
|
+
requires: ["capabilities", "address"],
|
|
21
|
+
definitions: TOOL_DEFINITIONS.map((def) => ({ name: def.name })),
|
|
19
22
|
factory: (env) => {
|
|
20
|
-
const
|
|
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
|
-
"
|
|
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.
|
|
23
|
-
"@intx/types": "0.
|
|
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",
|