@aimail/mail 0.1.0-rc.14 → 0.1.0-rc.16
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 -5
- package/lib/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ pnpm add @aimail/mail
|
|
|
15
15
|
## What it does
|
|
16
16
|
|
|
17
17
|
Every adapter needs the same three lookups, sourced from the per-address
|
|
18
|
-
`agentmail.json` bindings under `$AIMAIL_HOME` (default `~/.
|
|
18
|
+
`agentmail.json` bindings under `$AIMAIL_HOME` (default `~/.aimail`):
|
|
19
19
|
|
|
20
20
|
- `resolveBySessionId(sessionId)` — session-file match first, then agent_id
|
|
21
21
|
field match. For dsh session uuids and OpenClaw/pi agent ids.
|
|
@@ -36,14 +36,14 @@ Every adapter needs the same three lookups, sourced from the per-address
|
|
|
36
36
|
`$AIMAIL_HOME/systems/` are scanned (two-level traversal:
|
|
37
37
|
`systems/{system_id}/{address_dir}/agentmail.json`).
|
|
38
38
|
|
|
39
|
-
Unbound resolutions throw loudly (`no
|
|
39
|
+
Unbound resolutions throw loudly (`no aimail binding for …`) — callers
|
|
40
40
|
surface that to the model/user instead of guessing an identity.
|
|
41
41
|
|
|
42
42
|
## Related repositories
|
|
43
43
|
|
|
44
|
-
- [metercai/aimail](https://github.com/metercai/aimail) — the AIMail
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
- [metercai/aimail](https://github.com/metercai/aimail) — the AIMail monorepo:
|
|
45
|
+
CLI (`cli/`), Python SDK (`pysdk/`), TypeScript SDK (`tssdk/`, you are here),
|
|
46
|
+
bridge distributions.
|
|
47
47
|
- [metercai/aimail-gateway](https://github.com/metercai/aimail-gateway) — the
|
|
48
48
|
AIMail gateway: SMTP/HTTP mail service and the address & activation APIs
|
|
49
49
|
that create the bindings being resolved here.
|
package/lib/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function systemIdFrom(opts) {
|
|
|
15
15
|
return opts.systemId ?? process.env.AIMAIL_SYSTEM_ID ?? '';
|
|
16
16
|
}
|
|
17
17
|
function unbound(what) {
|
|
18
|
-
return new Error(`no
|
|
18
|
+
return new Error(`no aimail binding for ${what} — run bind_agent.py first`);
|
|
19
19
|
}
|
|
20
20
|
/** Scan one system dir (or all systems) for every bound AgentConfig. */
|
|
21
21
|
async function scanAllConfigs(systemId) {
|
|
@@ -59,7 +59,7 @@ async function scanAllConfigs(systemId) {
|
|
|
59
59
|
*/
|
|
60
60
|
export async function resolveBySessionId(sessionId, opts = {}) {
|
|
61
61
|
if (!sessionId)
|
|
62
|
-
throw new Error('no session id to resolve
|
|
62
|
+
throw new Error('no session id to resolve aimail config');
|
|
63
63
|
const systemId = systemIdFrom(opts);
|
|
64
64
|
let cfg = await loadConfigBySessionId(systemId, sessionId);
|
|
65
65
|
if (!cfg && systemId)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aimail/mail",
|
|
3
3
|
"description": "AIMail platform-neutral config resolution: sessionId/email/recipient → agentmail.json → AgentConfig (pure functions, no framework deps).",
|
|
4
|
-
"version": "0.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.16",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"provenance": true
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"peerDependencies": {},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aimail/mail-core": "^0.1.0-rc.
|
|
30
|
+
"@aimail/mail-core": "^0.1.0-rc.20"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {},
|
|
33
33
|
"keywords": [
|