@embassys/ambassador 0.0.0 → 0.2.7
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/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/agent-capabilities.d.ts +35 -0
- package/dist/agent-capabilities.js +221 -0
- package/dist/agent-capabilities.js.map +1 -0
- package/dist/ambassador-options.d.ts +6 -0
- package/dist/ambassador-options.js +13 -0
- package/dist/ambassador-options.js.map +1 -0
- package/dist/central-credential.d.ts +41 -0
- package/dist/central-credential.js +355 -0
- package/dist/central-credential.js.map +1 -0
- package/dist/central-enrollment.d.ts +31 -0
- package/dist/central-enrollment.js +278 -0
- package/dist/central-enrollment.js.map +1 -0
- package/dist/central-json.d.ts +8 -0
- package/dist/central-json.js +259 -0
- package/dist/central-json.js.map +1 -0
- package/dist/central-protected-transport.d.ts +21 -0
- package/dist/central-protected-transport.js +217 -0
- package/dist/central-protected-transport.js.map +1 -0
- package/dist/central-rest.d.ts +50 -0
- package/dist/central-rest.js +401 -0
- package/dist/central-rest.js.map +1 -0
- package/dist/cli.d.ts +26 -0
- package/dist/cli.js +129 -0
- package/dist/cli.js.map +1 -0
- package/dist/credential-store.d.ts +18 -0
- package/dist/credential-store.js +617 -0
- package/dist/credential-store.js.map +1 -0
- package/dist/delivery-profile.d.ts +43 -0
- package/dist/delivery-profile.js +253 -0
- package/dist/delivery-profile.js.map +1 -0
- package/dist/direct-delivery.d.ts +37 -0
- package/dist/direct-delivery.js +312 -0
- package/dist/direct-delivery.js.map +1 -0
- package/dist/dpop.d.ts +28 -0
- package/dist/dpop.js +119 -0
- package/dist/dpop.js.map +1 -0
- package/dist/errors.d.ts +5 -0
- package/dist/errors.js +11 -0
- package/dist/errors.js.map +1 -0
- package/dist/gateway-application.d.ts +32 -0
- package/dist/gateway-application.js +255 -0
- package/dist/gateway-application.js.map +1 -0
- package/dist/gateway-paths.d.ts +11 -0
- package/dist/gateway-paths.js +29 -0
- package/dist/gateway-paths.js.map +1 -0
- package/dist/guided-registration.d.ts +23 -0
- package/dist/guided-registration.js +117 -0
- package/dist/guided-registration.js.map +1 -0
- package/dist/identity.d.ts +20 -0
- package/dist/identity.js +54 -0
- package/dist/identity.js.map +1 -0
- package/dist/local-mcp.d.ts +28 -0
- package/dist/local-mcp.js +410 -0
- package/dist/local-mcp.js.map +1 -0
- package/dist/local-tool-result.d.ts +4 -0
- package/dist/local-tool-result.js +17 -0
- package/dist/local-tool-result.js.map +1 -0
- package/dist/mcp-contract.d.ts +10 -0
- package/dist/mcp-contract.js +63 -0
- package/dist/mcp-contract.js.map +1 -0
- package/dist/notification-journal.d.ts +24 -0
- package/dist/notification-journal.js +194 -0
- package/dist/notification-journal.js.map +1 -0
- package/dist/notification-relay.d.ts +31 -0
- package/dist/notification-relay.js +203 -0
- package/dist/notification-relay.js.map +1 -0
- package/dist/process-lock.d.ts +8 -0
- package/dist/process-lock.js +122 -0
- package/dist/process-lock.js.map +1 -0
- package/dist/sqlite-artifact.d.ts +7 -0
- package/dist/sqlite-artifact.js +121 -0
- package/dist/sqlite-artifact.js.map +1 -0
- package/dist/webhook-delivery.d.ts +23 -0
- package/dist/webhook-delivery.js +122 -0
- package/dist/webhook-delivery.js.map +1 -0
- package/docs/getting-started-claude.md +33 -0
- package/docs/getting-started-codex.md +36 -0
- package/docs/getting-started-gemini.md +31 -0
- package/docs/getting-started-hermes.md +47 -0
- package/docs/getting-started-openclaw.md +48 -0
- package/docs/live-qualification.md +174 -0
- package/package.json +48 -7
- package/index.js +0 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Live central qualification
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This runbook records the controlled test of Ambassador's REST and DPoP client
|
|
6
|
+
against `https://mcp.embassys.ai`. It does not test central MCP, API-version
|
|
7
|
+
fallbacks, migration, token reissue, leases, conversations, or invented
|
|
8
|
+
general reply operations. It does test the deployed, action-specific
|
|
9
|
+
`submit_action_result` contract.
|
|
10
|
+
|
|
11
|
+
The runner covers the current package name, guided registration, one
|
|
12
|
+
full-message webhook target, and one direct target. The default direct target
|
|
13
|
+
is the deterministic mock ACP agent. A separately confirmed mode uses the
|
|
14
|
+
fixed Codex profile and `codex-acp` 1.8.0 with an isolated Codex login.
|
|
15
|
+
|
|
16
|
+
## Safety
|
|
17
|
+
|
|
18
|
+
- Use disposable Mailosaur addresses and synthetic action data.
|
|
19
|
+
- Read Mailosaur credentials from approved local secret storage.
|
|
20
|
+
- Keep addresses, codes, tokens, keys, proofs, messages, and payloads out of
|
|
21
|
+
commands, files, logs, screenshots, and reports.
|
|
22
|
+
- Capture only route names, status, timing, digests, and safe pass/fail evidence.
|
|
23
|
+
- Delete captured mail and all temporary state in cleanup.
|
|
24
|
+
|
|
25
|
+
## Required live checks after the cutover
|
|
26
|
+
|
|
27
|
+
1. Pack and scan the exact candidate package.
|
|
28
|
+
2. Create two disposable identities through loopback local MCP.
|
|
29
|
+
3. Use the exact enabled `clientInfo` aliases for one webhook profile and one
|
|
30
|
+
direct profile. Prove a dual-mode profile advertises direct as its default;
|
|
31
|
+
prove a direct-only profile proceeds without a delivery question.
|
|
32
|
+
4. Receive and use both verification emails without persisting their codes.
|
|
33
|
+
5. Restart and prove encrypted credential and nonsecret profile loading.
|
|
34
|
+
6. Prove valid Bearer plus DPoP requests and the negative DPoP matrix.
|
|
35
|
+
7. Validate the live action catalog against the recorded fixture schemas.
|
|
36
|
+
8. Request and decide one synthetic `get_phone_number` permission.
|
|
37
|
+
9. Deliver the action request to the direct target.
|
|
38
|
+
10. Submit one correlated synthetic result from the target and deliver the
|
|
39
|
+
resulting `action_response` to the webhook requester.
|
|
40
|
+
11. Prove each local acceptance or completion precedes its central
|
|
41
|
+
acknowledgement.
|
|
42
|
+
12. Record the consuming-poll restart-loss and non-idempotent result-submission
|
|
43
|
+
limitations.
|
|
44
|
+
13. Stop all processes, delete mail and temporary state, and scan artifacts.
|
|
45
|
+
|
|
46
|
+
Use the mock webhook receiver and either the mock ACP agent or the fixed real
|
|
47
|
+
Codex mode for this live REST test. Real-agent qualification for all five
|
|
48
|
+
enabled profiles remains a separate local matrix in
|
|
49
|
+
[Delivery qualification](qualification.md).
|
|
50
|
+
|
|
51
|
+
The controlled runner must require an explicit confirmation phrase before any
|
|
52
|
+
live request. It must record the reviewed central source revision or note that
|
|
53
|
+
the deployment does not expose one.
|
|
54
|
+
|
|
55
|
+
After packing and clean-installing the candidate, set
|
|
56
|
+
`AMBASSADOR_PACKED_CLI`, `AMBASSADOR_PACKED_TARBALL`, and
|
|
57
|
+
`AMBASSADOR_CONFIRM_LIVE_QUALIFICATION` to the confirmation phrase embedded in
|
|
58
|
+
`scripts/live-qualification.mjs`, then run `pnpm run qualify:live`. In default
|
|
59
|
+
mode, the runner uses the mock ACP fixture compiled by `pnpm run test:build`
|
|
60
|
+
and does not run a paid provider.
|
|
61
|
+
|
|
62
|
+
For the real Codex mode, prepare an owner-only temporary home containing only
|
|
63
|
+
the copied Codex authentication needed for the run. Put exact
|
|
64
|
+
`codex-acp` 1.8.0 on `PATH`, then set:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
export AMBASSADOR_LIVE_DIRECT_AGENT=codex
|
|
68
|
+
export AMBASSADOR_CODEX_QUALIFICATION_HOME=/absolute/path/to/isolated/home
|
|
69
|
+
export AMBASSADOR_CONFIRM_LIVE_QUALIFICATION=run-live-qualification-with-real-codex-and-two-disposable-mailosaur-identities
|
|
70
|
+
pnpm run qualify:live
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The runner rejects an ordinary user home, checks the adapter version before it
|
|
74
|
+
contacts central, uses the compiled-in Codex command and profile, and never
|
|
75
|
+
accepts a command override. It also lets abandoned server-side polls expire
|
|
76
|
+
after the restart check before it enqueues a message. Delete the isolated home
|
|
77
|
+
after the run.
|
|
78
|
+
|
|
79
|
+
## Required report
|
|
80
|
+
|
|
81
|
+
Record only:
|
|
82
|
+
|
|
83
|
+
- date and reviewed server revision;
|
|
84
|
+
- live origin;
|
|
85
|
+
- packed Ambassador digest;
|
|
86
|
+
- qualification runner revision;
|
|
87
|
+
- status for each safe case;
|
|
88
|
+
- whether the target submitted a correlated action result and the requester
|
|
89
|
+
received it;
|
|
90
|
+
- returned action names and schema digests;
|
|
91
|
+
- whether a DPoP nonce was observed;
|
|
92
|
+
- delivery mode used for each synthetic message;
|
|
93
|
+
- artifact-scan result; and
|
|
94
|
+
- the known consuming-poll and result-submission limitations.
|
|
95
|
+
|
|
96
|
+
Do not include identities, IDs, codes, tokens, JWK coordinates, proof claims,
|
|
97
|
+
messages, action payloads, permission scopes, webhook details, prompts,
|
|
98
|
+
provider output, or remote error bodies.
|
|
99
|
+
|
|
100
|
+
## Correlated-result observation
|
|
101
|
+
|
|
102
|
+
At 00:43 BST on 2026-09-03, the real Codex mode passed against the live service
|
|
103
|
+
with `codex-acp` 1.8.0 and packed candidate
|
|
104
|
+
`7cbbf27fbd401024c51a48f6ae6b0a0b55059df200035cdbb33c72faf9ab4d70`.
|
|
105
|
+
The runner's UTC date field was still 2026-09-02. The reviewed central source
|
|
106
|
+
revision was `ac3f7a6e33829eb80301c7944f611d29cc2499b5`, the exact runner digest was
|
|
107
|
+
`769959d2bec4f7b436b9376570e940a14756c4f563e5f07343de9475c4cf3236`,
|
|
108
|
+
and the deployment did not expose its revision.
|
|
109
|
+
|
|
110
|
+
The run registered and verified two disposable Mailosaur identities. The mock
|
|
111
|
+
requester used webhook delivery; the target used direct ACP delivery to real
|
|
112
|
+
Codex. The requester asked for `get_phone_number`. Codex received the
|
|
113
|
+
`permission_request` through Ambassador's central poll and called
|
|
114
|
+
`respond_to_permission`. After central returned the grant to the requester's
|
|
115
|
+
webhook, the requester called `call_action`. Codex received the correlated
|
|
116
|
+
`action_call` and called `submit_action_result` exactly once with its `call_id`,
|
|
117
|
+
`success`, and the approved synthetic phone object. Central returned
|
|
118
|
+
`completed` and queued an `action_response` with the same call ID, action type,
|
|
119
|
+
status, and result. The requester received that response through its webhook,
|
|
120
|
+
and Ambassador acknowledged it.
|
|
121
|
+
|
|
122
|
+
The same run also passed encrypted restart, the DPoP positive case and missing,
|
|
123
|
+
wrong-key, stale, future, wrong-URL, wrong-method, wrong-token-hash, and replay
|
|
124
|
+
failures, the six-action live catalog and schema digests, acknowledgement order,
|
|
125
|
+
zero central MCP requests, artifact scanning, and mail and temporary-state
|
|
126
|
+
cleanup. The external isolated credential copy was removed after the run. No
|
|
127
|
+
defect appeared in the live `submit_action_result` path.
|
|
128
|
+
|
|
129
|
+
The pass used an owner-only `AGENTS.md` in the isolated Codex working directory
|
|
130
|
+
to represent the user's prior approval of only this synthetic permission and
|
|
131
|
+
result. It did not test a live interactive prompt to the user. An earlier run
|
|
132
|
+
without that local policy reached Codex, which called `respond_to_permission`,
|
|
133
|
+
but the permission was not granted; no action or result submission followed.
|
|
134
|
+
This is expected for a background ACP session with no interactive user.
|
|
135
|
+
|
|
136
|
+
A second attempt accepted the permission request but timed out before Codex
|
|
137
|
+
received it. The source and request sequence indicate that an abandoned
|
|
138
|
+
server-side long poll from the deliberate restart consumed the queued message
|
|
139
|
+
after its local HTTP request had been aborted. Central marks messages delivered
|
|
140
|
+
during polling and provides no lease or redelivery. The runner now waits 31
|
|
141
|
+
seconds after stopping the old gateways before it starts replacements; the
|
|
142
|
+
subsequent run passed. This is evidence of the existing restart-loss window,
|
|
143
|
+
not a failure of the result endpoint.
|
|
144
|
+
|
|
145
|
+
The live process used installed Node 24.14.0, below the package's declared
|
|
146
|
+
24.19.0 floor, because no in-range Node runtime was installed. Functional live
|
|
147
|
+
behavior passed. The supported-Node repeat remains part of the qualification
|
|
148
|
+
record even though the user approved 0.2.6 as a one-release exception before
|
|
149
|
+
that repeat.
|
|
150
|
+
|
|
151
|
+
## Earlier direct observation
|
|
152
|
+
|
|
153
|
+
On 2026-09-02, real Codex had already passed delivery, injected Ambassador MCP
|
|
154
|
+
use, and acknowledgement with candidate
|
|
155
|
+
`22a65d370897172a726b4890bade780e907c2c38ccf5d6cb5e347c9c01f14ec7`.
|
|
156
|
+
That run predated adoption of `submit_action_result` and is not evidence for the
|
|
157
|
+
correlated-result contract. Earlier mock-target delivery timeouts remained
|
|
158
|
+
unexplained at that point; the restart race above now explains one reproducible
|
|
159
|
+
class of such timeout.
|
|
160
|
+
|
|
161
|
+
## Baseline observation
|
|
162
|
+
|
|
163
|
+
On 2026-09-02, the packed pre-ADR-0038 implementation passed registration, Mailosaur
|
|
164
|
+
email receipt, verification, encrypted restart, the DPoP positive and negative
|
|
165
|
+
matrix, six-action catalog validation, permission request and decision,
|
|
166
|
+
permission-response delivery, one `get_email` delivery, consuming polls,
|
|
167
|
+
acknowledgements, and forbidden-marker scans.
|
|
168
|
+
|
|
169
|
+
It used no central MCP request and observed no initial nonce challenge. The
|
|
170
|
+
final `get_my_permissions` check matched the deployed email-field model.
|
|
171
|
+
Captured mail and temporary process state were deleted.
|
|
172
|
+
|
|
173
|
+
This observation remains useful evidence for ADR 0037 only. It is not release
|
|
174
|
+
evidence for the Ambassador delivery cutover.
|
package/package.json
CHANGED
|
@@ -1,15 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embassys/ambassador",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.7",
|
|
4
|
+
"description": "Local Ambassador for the Embassys agent network",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"
|
|
7
|
-
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/embassys/ambassador.git"
|
|
9
|
+
},
|
|
8
10
|
"files": [
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
+
"dist",
|
|
12
|
+
"docs/getting-started-claude.md",
|
|
13
|
+
"docs/getting-started-codex.md",
|
|
14
|
+
"docs/getting-started-gemini.md",
|
|
15
|
+
"docs/getting-started-hermes.md",
|
|
16
|
+
"docs/getting-started-openclaw.md",
|
|
17
|
+
"docs/live-qualification.md"
|
|
11
18
|
],
|
|
12
19
|
"publishConfig": {
|
|
13
20
|
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"type": "module",
|
|
23
|
+
"bin": {
|
|
24
|
+
"ambassador": "dist/cli.js"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=24.19.0 <25"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@agentclientprotocol/sdk": "1.4.0",
|
|
31
|
+
"@modelcontextprotocol/client": "2.0.0",
|
|
32
|
+
"@modelcontextprotocol/node": "2.0.0",
|
|
33
|
+
"@modelcontextprotocol/server": "2.0.0",
|
|
34
|
+
"better-sqlite3": "13.0.3",
|
|
35
|
+
"zod": "4.4.3"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@biomejs/biome": "2.5.10",
|
|
39
|
+
"@types/better-sqlite3": "9.6.0",
|
|
40
|
+
"@types/node": "24.13.3",
|
|
41
|
+
"typescript": "7.0.2"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsc -p tsconfig.build.json",
|
|
45
|
+
"check": "pnpm run lint && pnpm run typecheck && pnpm test",
|
|
46
|
+
"clean": "node scripts/clean.mjs",
|
|
47
|
+
"format": "biome check --write .",
|
|
48
|
+
"lint": "biome check .",
|
|
49
|
+
"qualify:agents": "node scripts/qualify-agents.mjs",
|
|
50
|
+
"qualify:live": "node scripts/live-qualification.mjs",
|
|
51
|
+
"test": "pnpm run test:build && node scripts/run-tests.mjs",
|
|
52
|
+
"test:build": "node scripts/clean.mjs .test-dist && tsc -p tsconfig.test.json",
|
|
53
|
+
"test:coverage": "pnpm run test:build && node scripts/run-tests.mjs --coverage",
|
|
54
|
+
"typecheck": "tsc -p tsconfig.test.json --noEmit"
|
|
14
55
|
}
|
|
15
|
-
}
|
|
56
|
+
}
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|