@mono-agent/agent-app 0.3.0 → 0.4.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 +24 -10
- package/dist/adapter-send-tools-main.d.ts +3 -0
- package/dist/adapter-send-tools-main.d.ts.map +1 -0
- package/dist/adapter-send-tools-main.js +20 -0
- package/dist/adapter-send-tools-main.js.map +1 -0
- package/dist/adapter-send-tools.d.ts +125 -0
- package/dist/adapter-send-tools.d.ts.map +1 -0
- package/dist/adapter-send-tools.js +629 -0
- package/dist/adapter-send-tools.js.map +1 -0
- package/dist/app-config.d.ts +86 -26
- package/dist/app-config.d.ts.map +1 -1
- package/dist/app-config.js +284 -90
- package/dist/app-config.js.map +1 -1
- package/dist/app.d.ts +51 -20
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +889 -119
- package/dist/app.js.map +1 -1
- package/dist/artifact-retention.d.ts +32 -0
- package/dist/artifact-retention.d.ts.map +1 -0
- package/dist/artifact-retention.js +111 -0
- package/dist/artifact-retention.js.map +1 -0
- package/dist/audit-runs.d.ts +12 -0
- package/dist/audit-runs.d.ts.map +1 -0
- package/dist/audit-runs.js +68 -0
- package/dist/audit-runs.js.map +1 -0
- package/dist/backfill.d.ts +75 -0
- package/dist/backfill.d.ts.map +1 -0
- package/dist/backfill.js +350 -0
- package/dist/backfill.js.map +1 -0
- package/dist/background.d.ts +8 -5
- package/dist/background.d.ts.map +1 -1
- package/dist/background.js +279 -53
- package/dist/background.js.map +1 -1
- package/dist/broadcast-recorder.d.ts +27 -0
- package/dist/broadcast-recorder.d.ts.map +1 -0
- package/dist/broadcast-recorder.js +82 -0
- package/dist/broadcast-recorder.js.map +1 -0
- package/dist/channel-config-view.d.ts +28 -0
- package/dist/channel-config-view.d.ts.map +1 -0
- package/dist/channel-config-view.js +79 -0
- package/dist/channel-config-view.js.map +1 -0
- package/dist/channel-gate.d.ts +22 -0
- package/dist/channel-gate.d.ts.map +1 -0
- package/dist/channel-gate.js +35 -0
- package/dist/channel-gate.js.map +1 -0
- package/dist/channel-plugins.d.ts +39 -0
- package/dist/channel-plugins.d.ts.map +1 -0
- package/dist/channel-plugins.js +346 -0
- package/dist/channel-plugins.js.map +1 -0
- package/dist/channels.d.ts +62 -66
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +850 -120
- package/dist/channels.js.map +1 -1
- package/dist/cli.d.ts +103 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +984 -112
- package/dist/cli.js.map +1 -1
- package/dist/config-reference.d.ts +24 -0
- package/dist/config-reference.d.ts.map +1 -0
- package/dist/config-reference.js +580 -0
- package/dist/config-reference.js.map +1 -0
- package/dist/configured-agent.d.ts +104 -0
- package/dist/configured-agent.d.ts.map +1 -0
- package/dist/configured-agent.js +578 -0
- package/dist/configured-agent.js.map +1 -0
- package/dist/consumer-contract.d.ts +36 -0
- package/dist/consumer-contract.d.ts.map +1 -0
- package/dist/consumer-contract.js +290 -0
- package/dist/consumer-contract.js.map +1 -0
- package/dist/doctor.d.ts +17 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +392 -95
- package/dist/doctor.js.map +1 -1
- package/dist/index.d.ts +14 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +23 -7
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +91 -26
- package/dist/init.js.map +1 -1
- package/dist/install-skill.d.ts +1 -1
- package/dist/install-skill.js +2 -2
- package/dist/install-skill.js.map +1 -1
- package/dist/interaction-bridge.d.ts +72 -0
- package/dist/interaction-bridge.d.ts.map +1 -0
- package/dist/interaction-bridge.js +354 -0
- package/dist/interaction-bridge.js.map +1 -0
- package/dist/launchd.d.ts +0 -2
- package/dist/launchd.d.ts.map +1 -1
- package/dist/launchd.js +0 -2
- package/dist/launchd.js.map +1 -1
- package/dist/memory-command.d.ts +10 -0
- package/dist/memory-command.d.ts.map +1 -0
- package/dist/memory-command.js +649 -0
- package/dist/memory-command.js.map +1 -0
- package/dist/memory-recall-main.d.ts +3 -0
- package/dist/memory-recall-main.d.ts.map +1 -0
- package/dist/memory-recall-main.js +30 -0
- package/dist/memory-recall-main.js.map +1 -0
- package/dist/memory-recall.d.ts +147 -0
- package/dist/memory-recall.d.ts.map +1 -0
- package/dist/memory-recall.js +345 -0
- package/dist/memory-recall.js.map +1 -0
- package/dist/memory-rituals.d.ts +8 -11
- package/dist/memory-rituals.d.ts.map +1 -1
- package/dist/memory-rituals.js +26 -25
- package/dist/memory-rituals.js.map +1 -1
- package/dist/metrics.d.ts +13 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +105 -0
- package/dist/metrics.js.map +1 -0
- package/dist/notify-destinations.d.ts +23 -0
- package/dist/notify-destinations.d.ts.map +1 -0
- package/dist/notify-destinations.js +79 -0
- package/dist/notify-destinations.js.map +1 -0
- package/dist/posted-message-index.d.ts +61 -0
- package/dist/posted-message-index.d.ts.map +1 -0
- package/dist/posted-message-index.js +178 -0
- package/dist/posted-message-index.js.map +1 -0
- package/dist/proactive-notify.d.ts +32 -0
- package/dist/proactive-notify.d.ts.map +1 -0
- package/dist/proactive-notify.js +62 -0
- package/dist/proactive-notify.js.map +1 -0
- package/dist/recipes/base.d.ts +15 -0
- package/dist/recipes/base.d.ts.map +1 -0
- package/dist/recipes/base.js +51 -0
- package/dist/recipes/base.js.map +1 -0
- package/dist/recipes/catalog.d.ts +4 -0
- package/dist/recipes/catalog.d.ts.map +1 -0
- package/dist/recipes/catalog.js +509 -0
- package/dist/recipes/catalog.js.map +1 -0
- package/dist/recipes/index.d.ts +11 -0
- package/dist/recipes/index.d.ts.map +1 -0
- package/dist/recipes/index.js +14 -0
- package/dist/recipes/index.js.map +1 -0
- package/dist/recipes/types.d.ts +70 -0
- package/dist/recipes/types.d.ts.map +1 -0
- package/dist/recipes/types.js +15 -0
- package/dist/recipes/types.js.map +1 -0
- package/dist/request-model-override.d.ts +67 -0
- package/dist/request-model-override.d.ts.map +1 -0
- package/dist/request-model-override.js +96 -0
- package/dist/request-model-override.js.map +1 -0
- package/dist/runs-health.d.ts +22 -0
- package/dist/runs-health.d.ts.map +1 -0
- package/dist/runs-health.js +144 -0
- package/dist/runs-health.js.map +1 -0
- package/dist/seen-conversations.d.ts +22 -0
- package/dist/seen-conversations.d.ts.map +1 -0
- package/dist/seen-conversations.js +120 -0
- package/dist/seen-conversations.js.map +1 -0
- package/dist/sessions.d.ts +21 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +45 -0
- package/dist/sessions.js.map +1 -0
- package/dist/setup.d.ts +29 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +97 -0
- package/dist/setup.js.map +1 -0
- package/dist/trigger-overrides.d.ts +17 -0
- package/dist/trigger-overrides.d.ts.map +1 -0
- package/dist/trigger-overrides.js +30 -0
- package/dist/trigger-overrides.js.map +1 -0
- package/dist/tui-command.d.ts +56 -0
- package/dist/tui-command.d.ts.map +1 -0
- package/dist/tui-command.js +160 -0
- package/dist/tui-command.js.map +1 -0
- package/dist/ui.d.ts +54 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +157 -0
- package/dist/ui.js.map +1 -0
- package/dist/web-command.d.ts +39 -0
- package/dist/web-command.d.ts.map +1 -0
- package/dist/web-command.js +151 -0
- package/dist/web-command.js.map +1 -0
- package/package.json +22 -17
- package/schema/mono-agent.config.schema.json +1686 -0
- package/skills/mono-agent-composer/SKILL.md +38 -12
- package/skills/mono-agent-composer/agents/openai.yaml +4 -0
- package/skills/mono-agent-composer/references/config-blueprint.md +84 -31
- package/skills/mono-agent-composer/references/discovery-questions.md +49 -36
- package/skills/mono-agent-composer/references/feature-coverage.md +26 -19
- package/skills/mono-agent-composer/references/package-map.md +20 -22
- package/skills/mono-agent-composer/references/playbooks.md +209 -0
- package/skills/mono-agent-composer/references/validation.md +14 -5
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { appendFile, mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* Maps a message the agent POSTED (`channelId` + Slack `ts`) back to the
|
|
5
|
+
* conversation that produced it, so a later in-thread reply can be resolved to
|
|
6
|
+
* that conversation and continue its history/session.
|
|
7
|
+
*
|
|
8
|
+
* Why this exists: a scheduled/proactive post (e.g. a daily digest) runs under a
|
|
9
|
+
* synthetic conversationId (e.g. `scheduled-scan`) and posts via
|
|
10
|
+
* `slack_send_message`, which registers no `slack:` conversation. When the user
|
|
11
|
+
* replies, the Slack adapter derives `slack:<channel>:<posted-ts>` — an id with no
|
|
12
|
+
* history. This index closes that gap: the producer records `(channel, ts) →
|
|
13
|
+
* producing conversationId`; the consumer (inbound dispatch) looks it up and
|
|
14
|
+
* aliases the reply onto the producing conversation.
|
|
15
|
+
*
|
|
16
|
+
* Storage is an append-only JSONL file inside the run-artifact dir. Append-only
|
|
17
|
+
* keeps cross-process writes safe: the `slack_send_message` child process and the
|
|
18
|
+
* adapter both only ever append (small `O_APPEND` writes are atomic), and only the
|
|
19
|
+
* single adapter process compacts. A `.jsonl` file is ignored by the
|
|
20
|
+
* `.summary.json` artifact scanners (see `seen-conversations.ts`), so it never
|
|
21
|
+
* collides with run-artifact tooling.
|
|
22
|
+
*/
|
|
23
|
+
export const POSTED_MESSAGE_INDEX_FILENAME = "posted-message-index.jsonl";
|
|
24
|
+
/** Daily-rollover bucket suffix the responder appends (`…#2026-06-22`). */
|
|
25
|
+
const ROLLOVER_BUCKET = /#\d{4}-\d{2}-\d{2}$/u;
|
|
26
|
+
const DEFAULT_COMPACT_MAX_ENTRIES = 5000;
|
|
27
|
+
/** The single index-file path both producer and consumer agree on. */
|
|
28
|
+
export function resolvePostedMessageIndexPath(artifactDir) {
|
|
29
|
+
return join(artifactDir, POSTED_MESSAGE_INDEX_FILENAME);
|
|
30
|
+
}
|
|
31
|
+
/** Strip a trailing daily-rollover bucket so the stored id is the base producing id. */
|
|
32
|
+
export function basePostedConversationId(conversationId) {
|
|
33
|
+
return conversationId.replace(ROLLOVER_BUCKET, "");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Record that `conversationId` posted a message at `(channelId, ts)`. Best-effort:
|
|
37
|
+
* a failed index write must never fail the Slack post, so callers should not await
|
|
38
|
+
* this in a way that surfaces its errors — it swallows them. The stored
|
|
39
|
+
* conversationId is de-bucketed so the consumer can let the responder re-bucket to
|
|
40
|
+
* the reply's own day (consistent with daily session rollover).
|
|
41
|
+
*/
|
|
42
|
+
export async function appendPostedMessage(indexPath, entry, now = () => new Date()) {
|
|
43
|
+
const channelId = entry.channelId.trim();
|
|
44
|
+
const ts = entry.ts.trim();
|
|
45
|
+
const conversationId = basePostedConversationId(entry.conversationId.trim());
|
|
46
|
+
if (channelId.length === 0 || ts.length === 0 || conversationId.length === 0) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const record = {
|
|
50
|
+
channelId,
|
|
51
|
+
ts,
|
|
52
|
+
conversationId,
|
|
53
|
+
writtenAt: now().toISOString(),
|
|
54
|
+
};
|
|
55
|
+
const line = `${JSON.stringify(record)}\n`;
|
|
56
|
+
try {
|
|
57
|
+
await appendFile(indexPath, line, "utf8");
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (error?.code !== "ENOENT") {
|
|
61
|
+
return; // best-effort
|
|
62
|
+
}
|
|
63
|
+
// Artifact dir not created yet (agent never wrote a summary here). Create it
|
|
64
|
+
// and retry once; still best-effort.
|
|
65
|
+
try {
|
|
66
|
+
await mkdir(dirname(indexPath), { recursive: true });
|
|
67
|
+
await appendFile(indexPath, line, "utf8");
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
// Give up silently.
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Resolve the producing conversationId for a posted message, newest write wins.
|
|
76
|
+
* Returns `undefined` when the file is missing or has no matching entry, so the
|
|
77
|
+
* caller falls back to the default (a fresh `slack:` conversation) — no regression.
|
|
78
|
+
*/
|
|
79
|
+
export async function lookupProducingConversation(indexPath, channelId, ts) {
|
|
80
|
+
const wantChannel = channelId.trim();
|
|
81
|
+
const wantTs = ts.trim();
|
|
82
|
+
if (wantChannel.length === 0 || wantTs.length === 0) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
let match;
|
|
86
|
+
for (const entry of await readEntries(indexPath)) {
|
|
87
|
+
if (entry.channelId !== wantChannel || entry.ts !== wantTs) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (match === undefined || entry.writtenAt >= match.writtenAt) {
|
|
91
|
+
match = entry;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return match?.conversationId;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Bound file growth by rewriting the index with only the newest `maxEntries`
|
|
98
|
+
* (by write time, de-duped to the newest entry per `channel+ts`). Consumer-only —
|
|
99
|
+
* a single process compacts, via temp-file + rename so a concurrent append is
|
|
100
|
+
* never interleaved with a partial rewrite. Best-effort.
|
|
101
|
+
*/
|
|
102
|
+
export async function compactPostedMessageIndex(indexPath, maxEntries = DEFAULT_COMPACT_MAX_ENTRIES) {
|
|
103
|
+
const entries = await readEntries(indexPath);
|
|
104
|
+
if (entries.length <= maxEntries) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
// Newest entry per (channel, ts), then newest-first, then cap.
|
|
108
|
+
const latest = new Map();
|
|
109
|
+
for (const entry of entries) {
|
|
110
|
+
const key = `${entry.channelId} ${entry.ts}`;
|
|
111
|
+
const prior = latest.get(key);
|
|
112
|
+
if (prior === undefined || entry.writtenAt >= prior.writtenAt) {
|
|
113
|
+
latest.set(key, entry);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const kept = [...latest.values()]
|
|
117
|
+
.sort((a, b) => (a.writtenAt < b.writtenAt ? 1 : a.writtenAt > b.writtenAt ? -1 : 0))
|
|
118
|
+
.slice(0, maxEntries);
|
|
119
|
+
const body = kept.map((entry) => JSON.stringify(entry)).join("\n");
|
|
120
|
+
const tmpPath = `${indexPath}.tmp-${String(kept.length)}`;
|
|
121
|
+
try {
|
|
122
|
+
await writeFile(tmpPath, kept.length === 0 ? "" : `${body}\n`, "utf8");
|
|
123
|
+
await rename(tmpPath, indexPath);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// Best-effort; leave the original file in place on failure.
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async function readEntries(indexPath) {
|
|
130
|
+
let raw;
|
|
131
|
+
try {
|
|
132
|
+
raw = await readFile(indexPath, "utf8");
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
return []; // missing/unreadable → nothing recorded yet
|
|
136
|
+
}
|
|
137
|
+
const out = [];
|
|
138
|
+
for (const line of raw.split("\n")) {
|
|
139
|
+
const trimmed = line.trim();
|
|
140
|
+
if (trimmed.length === 0) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const parsed = parseEntry(trimmed);
|
|
144
|
+
if (parsed !== undefined) {
|
|
145
|
+
out.push(parsed);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return out;
|
|
149
|
+
}
|
|
150
|
+
function parseEntry(line) {
|
|
151
|
+
let json;
|
|
152
|
+
try {
|
|
153
|
+
json = JSON.parse(line);
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
return undefined; // tolerate a torn/partial line
|
|
157
|
+
}
|
|
158
|
+
if (typeof json !== "object" || json === null) {
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
const record = json;
|
|
162
|
+
const channelId = stringField(record.channelId);
|
|
163
|
+
const ts = stringField(record.ts);
|
|
164
|
+
const conversationId = stringField(record.conversationId);
|
|
165
|
+
if (channelId === undefined || ts === undefined || conversationId === undefined) {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
channelId,
|
|
170
|
+
ts,
|
|
171
|
+
conversationId,
|
|
172
|
+
writtenAt: stringField(record.writtenAt) ?? "",
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function stringField(value) {
|
|
176
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=posted-message-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posted-message-index.js","sourceRoot":"","sources":["../src/posted-message-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,4BAA4B,CAAC;AAE1E,2EAA2E;AAC3E,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAE/C,MAAM,2BAA2B,GAAG,IAAI,CAAC;AAazC,sEAAsE;AACtE,MAAM,UAAU,6BAA6B,CAAC,WAAmB;IAC/D,OAAO,IAAI,CAAC,WAAW,EAAE,6BAA6B,CAAC,CAAC;AAC1D,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,wBAAwB,CAAC,cAAsB;IAC7D,OAAO,cAAc,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,SAAiB,EACjB,KAAgE,EAChE,MAAkB,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;IAElC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACzC,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,IAA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|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { NotifyDeliveryResult } from "@mono-agent/agent-contracts";
|
|
2
|
+
import type { ChannelId, MonoAgentAppLogger, RunningChannel } from "./channels.js";
|
|
3
|
+
export type { NotifyDeliveryResult } from "@mono-agent/agent-contracts";
|
|
4
|
+
/** The push channel that owns a destination conversationId (requires a `<scheme>:<target>` form), or undefined. */
|
|
5
|
+
export declare function channelIdForConversation(conversationId: string): ChannelId | undefined;
|
|
6
|
+
export interface ProactiveNotifyInput {
|
|
7
|
+
/** Destination conversationId, e.g. `telegram:42` or `slack:C1:171.5`. */
|
|
8
|
+
readonly conversationId: string;
|
|
9
|
+
/** The message to deliver. With `verbatim`, posted as-is; otherwise run as a turn. */
|
|
10
|
+
readonly text: string;
|
|
11
|
+
/**
|
|
12
|
+
* Deliver `text` VERBATIM — post it to the destination unchanged with no model
|
|
13
|
+
* call, then record it to the conversation's history (native cron/webhook
|
|
14
|
+
* notification). Without it, `text` is a prompt run as a turn on the
|
|
15
|
+
* destination's harness (e.g. a Slack interactive trigger).
|
|
16
|
+
*/
|
|
17
|
+
readonly verbatim?: boolean;
|
|
18
|
+
/** Currently running channels, keyed by id (the app's live registry). */
|
|
19
|
+
readonly running: ReadonlyMap<ChannelId, Pick<RunningChannel, "notify">>;
|
|
20
|
+
readonly logger?: MonoAgentAppLogger;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Route a proactive notification to the channel that owns its destination
|
|
24
|
+
* conversation, so the message runs as a real turn on that channel's own harness
|
|
25
|
+
* (shared session/history) and is delivered through its normal stream. The owning
|
|
26
|
+
* channel's `notify` hook enforces its adapter allowlist before delivering, so a
|
|
27
|
+
* non-allowlisted (e.g. payload-supplied) destination is rejected here. Returns a
|
|
28
|
+
* structured {@link NotifyDeliveryResult}; never throws (the trigger run already
|
|
29
|
+
* succeeded), so the caller can report the outcome to the model.
|
|
30
|
+
*/
|
|
31
|
+
export declare function routeProactiveNotification(input: ProactiveNotifyInput): Promise<NotifyDeliveryResult>;
|
|
32
|
+
//# sourceMappingURL=proactive-notify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proactive-notify.d.ts","sourceRoot":"","sources":["../src/proactive-notify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAInF,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAcxE,mHAAmH;AACnH,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAMtF;AAED,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,sFAAsF;IACtF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA+B3G"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Push channels a proactive notification can be delivered to. The conversationId
|
|
3
|
+
* scheme (the part before the first `:`) identifies the owning channel; only
|
|
4
|
+
* these channels run a destination harness that can both produce and deliver a
|
|
5
|
+
* turn. cron/webhook/openai-api/a2a are request-driven, not push destinations.
|
|
6
|
+
*/
|
|
7
|
+
const PUSH_CHANNEL_BY_SCHEME = {
|
|
8
|
+
telegram: "telegram",
|
|
9
|
+
slack: "slack",
|
|
10
|
+
whatsapp: "whatsapp",
|
|
11
|
+
};
|
|
12
|
+
/** The push channel that owns a destination conversationId (requires a `<scheme>:<target>` form), or undefined. */
|
|
13
|
+
export function channelIdForConversation(conversationId) {
|
|
14
|
+
const colon = conversationId.indexOf(":");
|
|
15
|
+
if (colon <= 0) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
return PUSH_CHANNEL_BY_SCHEME[conversationId.slice(0, colon)];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Route a proactive notification to the channel that owns its destination
|
|
22
|
+
* conversation, so the message runs as a real turn on that channel's own harness
|
|
23
|
+
* (shared session/history) and is delivered through its normal stream. The owning
|
|
24
|
+
* channel's `notify` hook enforces its adapter allowlist before delivering, so a
|
|
25
|
+
* non-allowlisted (e.g. payload-supplied) destination is rejected here. Returns a
|
|
26
|
+
* structured {@link NotifyDeliveryResult}; never throws (the trigger run already
|
|
27
|
+
* succeeded), so the caller can report the outcome to the model.
|
|
28
|
+
*/
|
|
29
|
+
export async function routeProactiveNotification(input) {
|
|
30
|
+
const channelId = channelIdForConversation(input.conversationId);
|
|
31
|
+
if (channelId === undefined) {
|
|
32
|
+
input.logger?.warn?.("Proactive notification skipped: unrecognized destination.", {
|
|
33
|
+
conversationId: input.conversationId,
|
|
34
|
+
});
|
|
35
|
+
return { delivered: false, reason: "unrecognized destination conversationId" };
|
|
36
|
+
}
|
|
37
|
+
const channel = input.running.get(channelId);
|
|
38
|
+
if (channel?.notify === undefined) {
|
|
39
|
+
input.logger?.warn?.("Proactive notification skipped: destination channel is not running or does not support delivery.", { conversationId: input.conversationId, channelId });
|
|
40
|
+
return { delivered: false, reason: `${channelId} channel is not running or does not support proactive delivery` };
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
return await channel.notify({
|
|
44
|
+
conversationId: input.conversationId,
|
|
45
|
+
text: input.text,
|
|
46
|
+
...(input.verbatim === undefined ? {} : { verbatim: input.verbatim }),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
const reason = reasonOf(error);
|
|
51
|
+
input.logger?.warn?.("Proactive notification failed: destination channel notify threw.", {
|
|
52
|
+
conversationId: input.conversationId,
|
|
53
|
+
channelId,
|
|
54
|
+
reason,
|
|
55
|
+
});
|
|
56
|
+
return { delivered: false, reason };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function reasonOf(error) {
|
|
60
|
+
return error instanceof Error ? error.message : String(error);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=proactive-notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proactive-notify.js","sourceRoot":"","sources":["../src/proactive-notify.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,MAAM,sBAAsB,GAAuC;IACjE,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,mHAAmH;AACnH,MAAM,UAAU,wBAAwB,CAAC,cAAsB;IAC7D,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,sBAAsB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,CAAC;AAmBD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,KAA2B;IAC1E,MAAM,SAAS,GAAG,wBAAwB,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACjE,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,2DAA2D,EAAE;YAChF,cAAc,EAAE,KAAK,CAAC,cAAc;SACrC,CAAC,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+1,15 @@
|
|
|
1
|
+
import type { MonoAgentConfigJson } from "@mono-agent/config";
|
|
2
|
+
import type { RecipeInput, RecipeInputValues } from "./types.js";
|
|
3
|
+
export declare const DEFAULT_MODEL = "claude:claude-sonnet-4-6";
|
|
4
|
+
/** The model input every recipe shares; overridable from `--model`. */
|
|
5
|
+
export declare const MODEL_INPUT: RecipeInput;
|
|
6
|
+
/**
|
|
7
|
+
* The adapter-neutral skeleton every recipe extends: runtime model, identity,
|
|
8
|
+
* empty tool policy, local artifacts, and the trace registry. Recipes spread
|
|
9
|
+
* this and add their channel / memory / sandbox / observability blocks. Mirrors
|
|
10
|
+
* `init.ts`'s scaffold so a recipe-built folder matches a hand-init'd one.
|
|
11
|
+
*/
|
|
12
|
+
export declare function baseConfig(input: RecipeInputValues): MonoAgentConfigJson;
|
|
13
|
+
/** A `memory` block for the given tier, rooted at the standard memory path. */
|
|
14
|
+
export declare function memoryBlock(mode: "lite" | "journal" | "bujo"): NonNullable<MonoAgentConfigJson["memory"]>;
|
|
15
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/recipes/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjE,eAAO,MAAM,aAAa,6BAA6B,CAAC;AAExD,uEAAuE;AACvE,eAAO,MAAM,WAAW,EAAE,WAKzB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,mBAAmB,CA0BxE;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAChC,WAAW,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAM5C"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { monoAgentConfigWithSchema } from "../config-reference.js";
|
|
2
|
+
export const DEFAULT_MODEL = "claude:claude-sonnet-4-6";
|
|
3
|
+
/** The model input every recipe shares; overridable from `--model`. */
|
|
4
|
+
export const MODEL_INPUT = {
|
|
5
|
+
id: "model",
|
|
6
|
+
label: "Model",
|
|
7
|
+
description: "Primary runtime model reference, e.g. claude:claude-sonnet-4-6, codex:gpt-5.5, pi:ollama:gemma4:31b.",
|
|
8
|
+
default: DEFAULT_MODEL,
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The adapter-neutral skeleton every recipe extends: runtime model, identity,
|
|
12
|
+
* empty tool policy, local artifacts, and the trace registry. Recipes spread
|
|
13
|
+
* this and add their channel / memory / sandbox / observability blocks. Mirrors
|
|
14
|
+
* `init.ts`'s scaffold so a recipe-built folder matches a hand-init'd one.
|
|
15
|
+
*/
|
|
16
|
+
export function baseConfig(input) {
|
|
17
|
+
return monoAgentConfigWithSchema({
|
|
18
|
+
runtime: {
|
|
19
|
+
model: input.model ?? DEFAULT_MODEL,
|
|
20
|
+
workspace: ".",
|
|
21
|
+
},
|
|
22
|
+
context: {
|
|
23
|
+
identityPath: "./IDENTITY.md",
|
|
24
|
+
selectedSkills: [],
|
|
25
|
+
},
|
|
26
|
+
tools: {
|
|
27
|
+
allowedTools: [],
|
|
28
|
+
disallowedTools: [],
|
|
29
|
+
},
|
|
30
|
+
artifacts: {
|
|
31
|
+
dir: "./.mono-agent/artifacts",
|
|
32
|
+
retention: {
|
|
33
|
+
maxAgeDays: 365,
|
|
34
|
+
maxCount: 50000,
|
|
35
|
+
dryRun: false,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
traceability: {
|
|
39
|
+
registryDir: "./.mono-agent/trace-sources",
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/** A `memory` block for the given tier, rooted at the standard memory path. */
|
|
44
|
+
export function memoryBlock(mode) {
|
|
45
|
+
return {
|
|
46
|
+
mode,
|
|
47
|
+
path: "./.mono-agent/memory",
|
|
48
|
+
writeMode: mode === "bujo" ? "capture" : "append-host-summary",
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/recipes/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,MAAM,CAAC,MAAM,aAAa,GAAG,0BAA0B,CAAC;AAExD,uEAAuE;AACvE,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,sGAAsG;IACnH,OAAO,EAAE,aAAa;CACvB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,KAAwB;IACjD,OAAO,yBAAyB,CAAC;QAC/B,OAAO,EAAE;YACP,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,aAAa;YACnC,SAAS,EAAE,GAAG;SACf;QACD,OAAO,EAAE;YACP,YAAY,EAAE,eAAe;YAC7B,cAAc,EAAE,EAAE;SACnB;QACD,KAAK,EAAE;YACL,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,EAAE;SACpB;QACD,SAAS,EAAE;YACT,GAAG,EAAE,yBAAyB;YAC9B,SAAS,EAAE;gBACT,UAAU,EAAE,GAAG;gBACf,QAAQ,EAAE,KAAK;gBACf,MAAM,EAAE,KAAK;aACd;SACF;QACD,YAAY,EAAE;YACZ,WAAW,EAAE,6BAA6B;SAC3C;KACqB,CAAC,CAAC;AAC5B,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,WAAW,CACzB,IAAiC;IAEjC,OAAO;QACL,IAAI;QACJ,IAAI,EAAE,sBAAsB;QAC5B,SAAS,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,C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