@agentcomms/events-daemon 0.17.0 → 0.18.1
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 +19 -9
- package/THIRD_PARTY_LICENSES +2 -2
- package/dist/{b3-contract-DFxcHY0I.mjs → b3-contract-BZIj-LWV.mjs} +4 -4
- package/dist/cli.mjs +493 -171
- package/dist/index.d.mts +119 -12
- package/dist/index.mjs +1 -1
- package/dist/{mcp-DXXb3Vv3-B0sHZfig.mjs → mcp-DIH4cS6P-YuKZfqTg.mjs} +181 -68
- package/dist/{stdio-CD7QQBAh.mjs → stdio-Dp1EE6ok.mjs} +28 -3
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -27,7 +27,8 @@ agent-events run # in a terminal you keep open: the owner of
|
|
|
27
27
|
cleanly on `agent-events stop` or when the terminal closes. There is no background service or autostart in this
|
|
28
28
|
release; the desktop app will supervise it later. Its state lives in an owner-only directory. A state directory so
|
|
29
29
|
deep that its control socket's path would pass the system limit (103 bytes on macOS, 107 on Linux) is refused, with
|
|
30
|
-
a hint to pin a shorter one.
|
|
30
|
+
a hint to pin a shorter one. `agent-events --version` (or `-V`) prints the installed daemon version; a subcommand's
|
|
31
|
+
`--version <number>` continues to select an immutable rule, target, subscriber or judge version.
|
|
31
32
|
|
|
32
33
|
## A first rule: Gmail into the dry-run log
|
|
33
34
|
|
|
@@ -39,19 +40,23 @@ safe way to see what a rule would send before you point it at a webhook.
|
|
|
39
40
|
agent-events target add '{"targetId":"log","version":1,"kind":"dry-run","retentionMs":86400000}'
|
|
40
41
|
|
|
41
42
|
# 2. a rule: every received Gmail message with a subject, mapped to its subject only
|
|
42
|
-
agent-events sources list #
|
|
43
|
+
agent-events sources list # every connected account a rule can name: its source, id and name
|
|
43
44
|
agent-events rule create "$(cat rule.json)"
|
|
44
45
|
|
|
45
46
|
# 3. turn it on: each step prints an approval, which you approve by typing its challenge
|
|
46
|
-
agent-events rule enable mail-subjects 1
|
|
47
|
-
agent-events approve <approval-id>
|
|
48
47
|
agent-events enable-all # the standing approval that starts collection
|
|
49
48
|
agent-events approve <approval-id>
|
|
49
|
+
agent-events rule enable mail-subjects 1
|
|
50
|
+
agent-events approve <approval-id> # offers to test the target first; answering no is fine
|
|
50
51
|
|
|
51
|
-
# 4. read what matched
|
|
52
|
+
# 4. read what matched: the list gives each record's id, and show prints that record
|
|
52
53
|
agent-events dryrun list
|
|
54
|
+
agent-events dryrun show <record-id>
|
|
53
55
|
```
|
|
54
56
|
|
|
57
|
+
Switch collection on before approving the rule: a pending target can be tested only while collection is on. If a test
|
|
58
|
+
cannot run, the approval says why and still asks for its challenge.
|
|
59
|
+
|
|
55
60
|
`rule.json`:
|
|
56
61
|
|
|
57
62
|
```json
|
|
@@ -112,8 +117,10 @@ approval preview then shows exactly what changes.
|
|
|
112
117
|
|
|
113
118
|
## Agents and approvals
|
|
114
119
|
|
|
115
|
-
`agent-events mcp` serves the same operations to a coding agent over MCP. Register it
|
|
116
|
-
|
|
120
|
+
`agent-events mcp` serves the same operations to a coding agent over MCP. Register it through the core's managed
|
|
121
|
+
installer — for example, `agentcomms mcp install --server events --client claude-code` — or call
|
|
122
|
+
`comms_server_install` with `channel: "events"` from the core MCP server. The same preview-and-approval flow used for
|
|
123
|
+
channel servers applies, and the result tells you to restart the client. The
|
|
117
124
|
[`agentcomms-events` skill](../../skills/agentcomms-events/SKILL.md) tells an agent how to use it.
|
|
118
125
|
|
|
119
126
|
- **An agent can:** read the catalogue and your rules, propose rules, targets, judges and a judge budget, test a rule
|
|
@@ -146,7 +153,9 @@ The third kind, **`laya`**, runs the Laya model inside the daemon. It is not ava
|
|
|
146
153
|
list` shows it as unavailable, and a judge naming it is refused.
|
|
147
154
|
|
|
148
155
|
**Every judge kind is off until you enable it, at your terminal.** Installing, updating, a rule or a budget never
|
|
149
|
-
turns one on.
|
|
156
|
+
turns one on. Turning a kind off also cancels any pending global enablement that captured a rule of that kind. Removing
|
|
157
|
+
a judge cancels its pending rule activations, and a rule that embeds that revoked judge cannot later become active. To
|
|
158
|
+
ask Jev about received mail:
|
|
150
159
|
|
|
151
160
|
```bash
|
|
152
161
|
# 1. turn the kind on: you approve its exact enablement at this terminal
|
|
@@ -243,7 +252,8 @@ address in `"approvedAddressSet": ["127.0.0.1"]`. It needs no key.
|
|
|
243
252
|
calls, and the most input and output tokens per call. The daemon-wide budget caps every rule, overall and per
|
|
244
253
|
provider, and a rule cannot raise it. A rule's new version inherits the charges of the versions before it, so a new
|
|
245
254
|
version never resets a budget. `judge test` runs at most ten times an hour per judge version, charged to the overall
|
|
246
|
-
budget.
|
|
255
|
+
budget. A call is charged once it reaches the network: one refused, out of time or cut short before its first
|
|
256
|
+
connection costs nothing, and a retry is a call of its own.
|
|
247
257
|
|
|
248
258
|
**Turning a kind off.** `agent-events judge kind disable typesafe` takes effect at once: decisions waiting on its
|
|
249
259
|
judges, and the deliveries, dry-run records and stream entries bound to them, are cancelled and purged. Rules that
|
package/THIRD_PARTY_LICENSES
CHANGED
|
@@ -8,7 +8,7 @@ Generated by scripts/third-party-licenses.mjs from the 4 packages the bundler pu
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
----------------------------------------------------------------------------------------------------
|
|
11
|
-
@modelcontextprotocol/core@2.
|
|
11
|
+
@modelcontextprotocol/core@2.3.1 — Apache-2.0
|
|
12
12
|
https://modelcontextprotocol.io
|
|
13
13
|
----------------------------------------------------------------------------------------------------
|
|
14
14
|
The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0.
|
|
@@ -228,7 +228,7 @@ Documentation in this project (excluding specifications) is licensed under
|
|
|
228
228
|
CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
|
|
229
229
|
the full license text.
|
|
230
230
|
----------------------------------------------------------------------------------------------------
|
|
231
|
-
@modelcontextprotocol/server@2.
|
|
231
|
+
@modelcontextprotocol/server@2.3.1 — Apache-2.0
|
|
232
232
|
https://modelcontextprotocol.io
|
|
233
233
|
----------------------------------------------------------------------------------------------------
|
|
234
234
|
The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as number, c as unknown, o as strictObject, s as string, t as McpServer } from "./mcp-
|
|
1
|
+
import { a as number, c as unknown, o as strictObject, s as string, t as McpServer } from "./mcp-DIH4cS6P-YuKZfqTg.mjs";
|
|
2
2
|
import { a as EventDomainError, c as JUDGE_KIND_LOCAL_ENDPOINT, f as validateLocalEndpoint, g as parseIpLiteral, h as assertApprovedAddressSet, l as JUDGE_KIND_TYPESAFE, n as canonicalWebhookTarget, o as JUDGE_KINDS } from "./webhook-target-DyDTwWhV.mjs";
|
|
3
3
|
import { createHash, randomBytes } from "node:crypto";
|
|
4
4
|
import { chmod, lstat, mkdir, open, readFile, realpath, rm, writeFile } from "node:fs/promises";
|
|
@@ -832,7 +832,7 @@ async function removeTarget(targetId, options = {}) {
|
|
|
832
832
|
//#endregion
|
|
833
833
|
//#region src/version.ts
|
|
834
834
|
/** The package version, read from package.json at build time. */
|
|
835
|
-
const VERSION = "0.
|
|
835
|
+
const VERSION = "0.18.1";
|
|
836
836
|
//#endregion
|
|
837
837
|
//#region src/mcp/server.ts
|
|
838
838
|
function reply(data) {
|
|
@@ -1002,7 +1002,7 @@ async function createEventsMcpServer(options = {}) {
|
|
|
1002
1002
|
return {
|
|
1003
1003
|
server,
|
|
1004
1004
|
async connectStdio() {
|
|
1005
|
-
const { StdioServerTransport } = await import("./stdio-
|
|
1005
|
+
const { StdioServerTransport } = await import("./stdio-Dp1EE6ok.mjs");
|
|
1006
1006
|
await server.connect(new StdioServerTransport());
|
|
1007
1007
|
}
|
|
1008
1008
|
};
|
|
@@ -2483,4 +2483,4 @@ const B3_CONTROL_CONTRACT = Object.freeze({
|
|
|
2483
2483
|
judgeUnavailable: B3_JUDGE_UNAVAILABLE_VARIANTS
|
|
2484
2484
|
});
|
|
2485
2485
|
//#endregion
|
|
2486
|
-
export {
|
|
2486
|
+
export { sourcesList as $, assertControlSupported as $t, normaliseWhatsAppSourceOptions as A, decideHeld as At, addTarget as B, CONTROL_PROTOCOL_VERSIONS as Bt, canonicalSseSubscriber as C, enableAll as Ct, normaliseResendSourceOptions as D, ACTIVATION_FAILURE as Dt, normaliseGmailSourceOptions as E, doctor as Et, canonicalJudgeBudget as F, catalogueList as Ft, addSubscriber as G, isControlRequest as Gt, targetsList as H, controlFailure as Ht, canonicalJudgeKindEnablement as I, catalogueShow as It, updateSubscriber as J, newInstanceRecord as Jt, removeSubscriber as K, negotiateVersion as Kt, judgeKindDefinition as L, approvalView as Lt, JUDGE_BUDGET_ID as M, dropDelivery as Mt, JUDGE_KIND_DEFINITIONS as N, heldList as Nt, normaliseSlackSourceOptions as O, isActivationFailureCode as Ot, canonicalJudge as P, retryDelivery as Pt, sourceShow as Q, writeInstance as Qt, createEventsMcpServer as R, EventControlClient as Rt, normaliseActivationDocument as S, updateJudge as St, classifySourceOptionChange as T, assertDoctorReportV2 as Tt, updateTarget as U, encodeControlFrame as Ut, removeTarget as V, ControlFrameReader as Vt, targetTest as W, isControlHello as Wt, status as X, readInstance as Xt, stop as Y, processIsLive as Yt, loadSqlite as Z, removeInstance as Zt, activationDocumentDigest as _, judgeTest as _t, B3_CONTROL_V1_OPERATION_SPECS as a, ensureEventSocketDirectory as an, rulesList as at, canonicalTarget as b, removeJudgeModel as bt, B3_CONTROL_V1_SUCCESSOR_REQUIREMENT as c, installErrorSink as cn, ruleTestRetained as ct, B3_SECRET_TERMINAL_ORIGIN as d, addJudge as dt, assertSocketPathFits as en, createRule as et, isB3ControlOperation as f, budgetShow as ft, isOwnerControlWireOperation as g, judgeModelStatus as gt, OWNER_CONTROL_WIRES as h, judgeKindsList as ht, B3_CONTROL_ERROR_CODES as i, ensureEventPaths as in, ruleShow as it, APPROVED_TYPESAFE_MODELS as j, deliveriesList as jt, normaliseSourceOptions as k, disableAll as kt, B3_DESKTOP_CONTROL_OPERATIONS as l, pause as lt, renderB3ApprovalPreviewV1 as m, enableJudgeKind as mt, B3_CAPABILITIES as n, verifyControlSocket as nn, enableRule as nt, B3_CONTROL_V1_RESULT_OPERATIONS as o, ensureOwnerOnlyFile as on, updateRule as ot, isB3SecretOperation as p, disableJudgeKind as pt, subscribersList as q, mayRecoverStaleInstance as qt, B3_CONTROL_CONTRACT as r, verifyPrivateSocketDirectory as rn, removeRule as rt, B3_CONTROL_V1_SCHEMA_VERSION as s, eventPaths as sn, ruleTest as st, B3_APPROVAL_VIEW_VARIANTS as t, controlEndpoint as tn, disableRule as tt, B3_JUDGE_UNAVAILABLE_VARIANTS as u, resume as ut, canonicalFullRuleDocument as v, judgesList as vt, sseDeliveryTarget as w, assertDoctorReportV1 as wt, disclosureBindingFor as x, updateBudget as xt, canonicalSubscriber as y, removeJudge as yt, VERSION as z, probeControl as zt };
|