@moltzap/client 2026.806.0 → 2026.812.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/dist/channel-base/index.d.ts +4 -4
- package/dist/channel-base/index.d.ts.map +1 -1
- package/dist/channel-base/index.js +6 -3
- package/dist/channel-base/index.js.map +1 -1
- package/dist/channel-core-enrichment.d.ts +24 -0
- package/dist/channel-core-enrichment.d.ts.map +1 -1
- package/dist/channel-core-enrichment.js +94 -20
- package/dist/channel-core-enrichment.js.map +1 -1
- package/dist/channel-core.d.ts +3 -1
- package/dist/channel-core.d.ts.map +1 -1
- package/dist/channel-core.js +2 -0
- package/dist/channel-core.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -1
- package/dist/config.js.map +1 -1
- package/dist/config.test-utils.d.ts +6 -0
- package/dist/config.test-utils.d.ts.map +1 -1
- package/dist/config.test-utils.js +5 -1
- package/dist/config.test-utils.js.map +1 -1
- package/dist/harness/client-runtime.d.ts +12 -5
- package/dist/harness/client-runtime.d.ts.map +1 -1
- package/dist/harness/client-runtime.js +16 -2
- package/dist/harness/client-runtime.js.map +1 -1
- package/dist/harness/index.d.ts +2 -2
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +2 -2
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/runtime.d.ts +152 -0
- package/dist/harness/runtime.d.ts.map +1 -1
- package/dist/harness/runtime.js +99 -2
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness-client.d.ts +17 -13
- package/dist/harness-client.d.ts.map +1 -1
- package/dist/harness-client.js +59 -4
- package/dist/harness-client.js.map +1 -1
- package/dist/harness-context-projection.d.ts +35 -0
- package/dist/harness-context-projection.d.ts.map +1 -0
- package/dist/harness-context-projection.js +123 -0
- package/dist/harness-context-projection.js.map +1 -0
- package/dist/harness-mcp-server.d.ts +1 -2
- package/dist/harness-mcp-server.d.ts.map +1 -1
- package/dist/harness-mcp-server.js +11 -17
- package/dist/harness-mcp-server.js.map +1 -1
- package/dist/harness-mcp-wire.d.ts +47 -15
- package/dist/harness-mcp-wire.d.ts.map +1 -1
- package/dist/harness-mcp-wire.js +93 -37
- package/dist/harness-mcp-wire.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/local-paths.d.ts +0 -11
- package/dist/local-paths.d.ts.map +1 -1
- package/dist/local-paths.js +0 -12
- package/dist/local-paths.js.map +1 -1
- package/dist/moltzapd-catalog.d.ts +35 -0
- package/dist/moltzapd-catalog.d.ts.map +1 -0
- package/dist/moltzapd-catalog.js +117 -0
- package/dist/moltzapd-catalog.js.map +1 -0
- package/dist/moltzapd-child-ipc.d.ts +26 -0
- package/dist/moltzapd-child-ipc.d.ts.map +1 -0
- package/dist/moltzapd-child-ipc.js +31 -0
- package/dist/moltzapd-child-ipc.js.map +1 -0
- package/dist/moltzapd-child.d.ts +55 -0
- package/dist/moltzapd-child.d.ts.map +1 -0
- package/dist/moltzapd-child.js +225 -0
- package/dist/moltzapd-child.js.map +1 -0
- package/dist/moltzapd-main.d.ts +3 -0
- package/dist/moltzapd-main.d.ts.map +1 -0
- package/dist/moltzapd-main.js +18 -0
- package/dist/moltzapd-main.js.map +1 -0
- package/dist/moltzapd-registration.d.ts +40 -0
- package/dist/moltzapd-registration.d.ts.map +1 -0
- package/dist/moltzapd-registration.js +59 -0
- package/dist/moltzapd-registration.js.map +1 -0
- package/dist/moltzapd.d.ts +56 -9
- package/dist/moltzapd.d.ts.map +1 -1
- package/dist/moltzapd.js +108 -36
- package/dist/moltzapd.js.map +1 -1
- package/dist/notification/trace.d.ts +10 -0
- package/dist/notification/trace.d.ts.map +1 -0
- package/dist/notification/trace.js +34 -0
- package/dist/notification/trace.js.map +1 -0
- package/dist/presentation/index.d.ts +3 -0
- package/dist/presentation/index.d.ts.map +1 -0
- package/dist/presentation/index.js +3 -0
- package/dist/presentation/index.js.map +1 -0
- package/dist/presentation/state.d.ts +77 -0
- package/dist/presentation/state.d.ts.map +1 -0
- package/dist/presentation/state.js +211 -0
- package/dist/presentation/state.js.map +1 -0
- package/dist/profile.d.ts +30 -28
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +28 -20
- package/dist/profile.js.map +1 -1
- package/dist/service.d.ts +8 -79
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +29 -333
- package/dist/service.js.map +1 -1
- package/dist/test-utils/fake-service.d.ts +3 -5
- package/dist/test-utils/fake-service.d.ts.map +1 -1
- package/dist/test-utils/fake-service.js +12 -12
- package/dist/test-utils/fake-service.js.map +1 -1
- package/dist/test-utils/index.d.ts +2 -0
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +2 -0
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/process/reserve-port.d.ts +20 -0
- package/dist/test-utils/process/reserve-port.d.ts.map +1 -0
- package/dist/test-utils/process/reserve-port.js +41 -0
- package/dist/test-utils/process/reserve-port.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -6
- package/dist/cli/adapters.d.ts +0 -21
- package/dist/cli/adapters.d.ts.map +0 -1
- package/dist/cli/adapters.js +0 -111
- package/dist/cli/adapters.js.map +0 -1
- package/dist/cli/commands/agents.d.ts +0 -11
- package/dist/cli/commands/agents.d.ts.map +0 -1
- package/dist/cli/commands/agents.js +0 -27
- package/dist/cli/commands/agents.js.map +0 -1
- package/dist/cli/commands/conversations.d.ts +0 -18
- package/dist/cli/commands/conversations.d.ts.map +0 -1
- package/dist/cli/commands/conversations.js +0 -33
- package/dist/cli/commands/conversations.js.map +0 -1
- package/dist/cli/commands/messages.d.ts +0 -41
- package/dist/cli/commands/messages.d.ts.map +0 -1
- package/dist/cli/commands/messages.js +0 -39
- package/dist/cli/commands/messages.js.map +0 -1
- package/dist/cli/commands/register.d.ts +0 -46
- package/dist/cli/commands/register.d.ts.map +0 -1
- package/dist/cli/commands/register.js +0 -103
- package/dist/cli/commands/register.js.map +0 -1
- package/dist/cli/commands/send.d.ts +0 -53
- package/dist/cli/commands/send.d.ts.map +0 -1
- package/dist/cli/commands/send.js +0 -57
- package/dist/cli/commands/send.js.map +0 -1
- package/dist/cli/commands/start.d.ts +0 -34
- package/dist/cli/commands/start.d.ts.map +0 -1
- package/dist/cli/commands/start.js +0 -59
- package/dist/cli/commands/start.js.map +0 -1
- package/dist/cli/commands/status.d.ts +0 -7
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js +0 -16
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/test-transport.d.ts +0 -28
- package/dist/cli/commands/test-transport.d.ts.map +0 -1
- package/dist/cli/commands/test-transport.js +0 -40
- package/dist/cli/commands/test-transport.js.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -105
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/output.d.ts +0 -14
- package/dist/cli/output.d.ts.map +0 -1
- package/dist/cli/output.js +0 -19
- package/dist/cli/output.js.map +0 -1
- package/dist/cli/socket-client.d.ts +0 -28
- package/dist/cli/socket-client.d.ts.map +0 -1
- package/dist/cli/socket-client.js +0 -63
- package/dist/cli/socket-client.js.map +0 -1
- package/dist/cli/transport.d.ts +0 -132
- package/dist/cli/transport.d.ts.map +0 -1
- package/dist/cli/transport.js +0 -127
- package/dist/cli/transport.js.map +0 -1
- package/dist/local-daemon-rpc.d.ts +0 -1170
- package/dist/local-daemon-rpc.d.ts.map +0 -1
- package/dist/local-daemon-rpc.js +0 -178
- package/dist/local-daemon-rpc.js.map +0 -1
- package/dist/local-history.d.ts +0 -75
- package/dist/local-history.d.ts.map +0 -1
- package/dist/local-history.js +0 -82
- package/dist/local-history.js.map +0 -1
- package/dist/local-socket-server.d.ts +0 -33
- package/dist/local-socket-server.d.ts.map +0 -1
- package/dist/local-socket-server.js +0 -100
- package/dist/local-socket-server.js.map +0 -1
- package/dist/refs.d.ts +0 -18
- package/dist/refs.d.ts.map +0 -1
- package/dist/refs.js +0 -18
- package/dist/refs.js.map +0 -1
- package/dist/service-helpers.d.ts +0 -55
- package/dist/service-helpers.d.ts.map +0 -1
- package/dist/service-helpers.js +0 -108
- package/dist/service-helpers.js.map +0 -1
- package/dist/service-local-daemon.d.ts +0 -32
- package/dist/service-local-daemon.d.ts.map +0 -1
- package/dist/service-local-daemon.js +0 -153
- package/dist/service-local-daemon.js.map +0 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { Effect, HashMap, Option, Ref } from "effect";
|
|
2
|
+
const DEFAULT_MAX_CONTEXT_CONVERSATIONS = 5;
|
|
3
|
+
const DEFAULT_MAX_MESSAGES_PER_CONVERSATION = 3;
|
|
4
|
+
const MILLISECONDS_PER_MINUTE = 60_000;
|
|
5
|
+
const snapshot = (ref) => Effect.runSync(Ref.get(ref));
|
|
6
|
+
const getOr = (map, key, fallback) => Option.getOrElse(HashMap.get(map, key), fallback);
|
|
7
|
+
/**
|
|
8
|
+
* Per-conversation message cap. Older messages are evicted FIFO; the
|
|
9
|
+
* on-disk history remains the source of truth. Sized for typical CLI
|
|
10
|
+
* display windows — `conversations get` shows at most a few hundred.
|
|
11
|
+
*/
|
|
12
|
+
const MAX_MESSAGES_PER_CONV = 1000;
|
|
13
|
+
function newMessagesForConversation(convId, messages, viewMarkers, currentConvId) {
|
|
14
|
+
if (convId === currentConvId || messages.length === 0) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
const lastSeenId = Option.getOrUndefined(HashMap.get(viewMarkers, convId));
|
|
18
|
+
const lastSeenIndex = lastSeenId !== undefined
|
|
19
|
+
? messages.findIndex((message) => message.id === lastSeenId)
|
|
20
|
+
: -1;
|
|
21
|
+
return messages.slice(lastSeenIndex + 1);
|
|
22
|
+
}
|
|
23
|
+
function makeContextCandidate(convId, newMsgs) {
|
|
24
|
+
const last =
|
|
25
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ newMsgs[newMsgs.length - 1];
|
|
26
|
+
return {
|
|
27
|
+
convId,
|
|
28
|
+
newMsgs,
|
|
29
|
+
lastTs: new Date(last.createdAt).getTime(),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function minutesSince(timestamp) {
|
|
33
|
+
return Math.max(0, Math.round((Date.now() - new Date(timestamp).getTime()) / MILLISECONDS_PER_MINUTE));
|
|
34
|
+
}
|
|
35
|
+
function contextEntryForCandidate(candidate, state, maxMessagesPerConv, renderMessageText) {
|
|
36
|
+
const reportable = candidate.newMsgs.slice(-maxMessagesPerConv);
|
|
37
|
+
const last =
|
|
38
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ reportable[reportable.length - 1];
|
|
39
|
+
const senderName = getOr(state.agentNamesMap, last.senderId, () => last.senderId);
|
|
40
|
+
return {
|
|
41
|
+
entry: {
|
|
42
|
+
conversationId: candidate.convId,
|
|
43
|
+
conversationName: Option.getOrUndefined(HashMap.get(state.conversationsMap, candidate.convId))?.name,
|
|
44
|
+
senderName,
|
|
45
|
+
text: renderMessageText(last),
|
|
46
|
+
minutesAgo: minutesSince(last.createdAt),
|
|
47
|
+
count: reportable.length,
|
|
48
|
+
},
|
|
49
|
+
advance: [candidate.convId, last.id],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function buildContextEntries(candidates, state, maxMessagesPerConv, renderMessageText) {
|
|
53
|
+
const entries = [];
|
|
54
|
+
const pendingAdvances = [];
|
|
55
|
+
for (const candidate of candidates) {
|
|
56
|
+
const { entry, advance } = contextEntryForCandidate(candidate, state, maxMessagesPerConv, renderMessageText);
|
|
57
|
+
entries.push(entry);
|
|
58
|
+
pendingAdvances.push(advance);
|
|
59
|
+
}
|
|
60
|
+
return { entries, pendingAdvances };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Owns the service's in-memory presentation caches and viewer-scoped context
|
|
64
|
+
* markers. Network ingress and presentation rendering remain with the caller.
|
|
65
|
+
*/
|
|
66
|
+
export class PresentationState {
|
|
67
|
+
conversationsRef = Effect.runSync(Ref.make(HashMap.empty()));
|
|
68
|
+
messagesRef = Effect.runSync(Ref.make(HashMap.empty()));
|
|
69
|
+
agentNamesRef = Effect.runSync(Ref.make(HashMap.empty()));
|
|
70
|
+
lastNotifiedRef = Effect.runSync(Ref.make(HashMap.empty()));
|
|
71
|
+
reset() {
|
|
72
|
+
return Effect.all([
|
|
73
|
+
Ref.set(this.conversationsRef, HashMap.empty()),
|
|
74
|
+
Ref.set(this.messagesRef, HashMap.empty()),
|
|
75
|
+
Ref.set(this.agentNamesRef, HashMap.empty()),
|
|
76
|
+
Ref.set(this.lastNotifiedRef, HashMap.empty()),
|
|
77
|
+
], { discard: true });
|
|
78
|
+
}
|
|
79
|
+
getConversation(convId) {
|
|
80
|
+
return Option.getOrUndefined(HashMap.get(snapshot(this.conversationsRef), convId));
|
|
81
|
+
}
|
|
82
|
+
getConversations() {
|
|
83
|
+
return [...HashMap.values(snapshot(this.conversationsRef))];
|
|
84
|
+
}
|
|
85
|
+
storeConversation(notification) {
|
|
86
|
+
const { conversationId, name, participants } = notification;
|
|
87
|
+
Effect.runSync(Ref.update(this.conversationsRef, (conversations) => {
|
|
88
|
+
// The notification carries the full membership, this agent included,
|
|
89
|
+
// so anything past two members is a group.
|
|
90
|
+
const inferredType = participants.length <= 2 ? "dm" : "group";
|
|
91
|
+
return HashMap.set(conversations, conversationId, {
|
|
92
|
+
id: conversationId,
|
|
93
|
+
type: inferredType,
|
|
94
|
+
participants: participants.map((participant) => `agent:${participant}`),
|
|
95
|
+
...(name !== undefined ? { name } : {}),
|
|
96
|
+
});
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
getHistory(convId, limit) {
|
|
100
|
+
const messages = getOr(snapshot(this.messagesRef), convId, () => []);
|
|
101
|
+
return limit ? messages.slice(-limit) : [...messages];
|
|
102
|
+
}
|
|
103
|
+
storeMessage(conversationId, message) {
|
|
104
|
+
Effect.runSync(Ref.update(this.messagesRef, (messages) => {
|
|
105
|
+
const existing = getOr(messages, conversationId, () => []);
|
|
106
|
+
const appended = [...existing, message];
|
|
107
|
+
const capped = appended.length > MAX_MESSAGES_PER_CONV
|
|
108
|
+
? appended.slice(-MAX_MESSAGES_PER_CONV)
|
|
109
|
+
: appended;
|
|
110
|
+
return HashMap.set(messages, conversationId, capped);
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
getAgentName(agentId) {
|
|
114
|
+
return Option.getOrUndefined(HashMap.get(snapshot(this.agentNamesRef), agentId));
|
|
115
|
+
}
|
|
116
|
+
getAgentNames() {
|
|
117
|
+
return snapshot(this.agentNamesRef);
|
|
118
|
+
}
|
|
119
|
+
cacheAgentNames(agents) {
|
|
120
|
+
if (agents.length === 0) {
|
|
121
|
+
return Effect.void;
|
|
122
|
+
}
|
|
123
|
+
return Ref.update(this.agentNamesRef, (names) => {
|
|
124
|
+
let next = names;
|
|
125
|
+
for (const agent of agents) {
|
|
126
|
+
next = HashMap.set(next, agent.id, agent.name);
|
|
127
|
+
}
|
|
128
|
+
return next;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
peekContextEntries(currentConvId, renderMessageText, opts) {
|
|
132
|
+
const maxConversations = opts?.maxConversations ?? DEFAULT_MAX_CONTEXT_CONVERSATIONS;
|
|
133
|
+
const maxMessagesPerConversation = opts?.maxMessagesPerConv ?? DEFAULT_MAX_MESSAGES_PER_CONVERSATION;
|
|
134
|
+
const state = this.readCrossConvState(currentConvId);
|
|
135
|
+
const candidates = this.collectContextCandidates(state, currentConvId);
|
|
136
|
+
const { entries, pendingAdvances } = buildContextEntries(candidates.slice(0, maxConversations), state, maxMessagesPerConversation, renderMessageText);
|
|
137
|
+
return {
|
|
138
|
+
entries,
|
|
139
|
+
commit: () => {
|
|
140
|
+
this.advanceLastNotified(currentConvId, pendingAdvances);
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
peekFullMessages(currentConvId, renderMessageText) {
|
|
145
|
+
const { messagesMap, conversationsMap, agentNamesMap, viewMarkers } = this.readCrossConvState(currentConvId);
|
|
146
|
+
const allMessages = [];
|
|
147
|
+
const pendingAdvances = [];
|
|
148
|
+
for (const [conversationId, newMessages] of this.iterNewMessagesByConv(messagesMap, viewMarkers, currentConvId)) {
|
|
149
|
+
const conversationName = Option.getOrUndefined(HashMap.get(conversationsMap, conversationId))?.name;
|
|
150
|
+
for (const message of newMessages) {
|
|
151
|
+
allMessages.push({
|
|
152
|
+
conversationId,
|
|
153
|
+
conversationName,
|
|
154
|
+
senderName: getOr(agentNamesMap, message.senderId, () => message.senderId),
|
|
155
|
+
senderId: message.senderId,
|
|
156
|
+
text: renderMessageText(message),
|
|
157
|
+
timestamp: message.createdAt,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
pendingAdvances.push([
|
|
161
|
+
conversationId,
|
|
162
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ newMessages[newMessages.length - 1].id,
|
|
163
|
+
]);
|
|
164
|
+
}
|
|
165
|
+
allMessages.sort((left, right) => left.timestamp.localeCompare(right.timestamp));
|
|
166
|
+
return {
|
|
167
|
+
messages: allMessages,
|
|
168
|
+
commit: () => {
|
|
169
|
+
this.advanceLastNotified(currentConvId, pendingAdvances);
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
readCrossConvState(currentConvId) {
|
|
174
|
+
const lastNotifiedMap = snapshot(this.lastNotifiedRef);
|
|
175
|
+
return {
|
|
176
|
+
messagesMap: snapshot(this.messagesRef),
|
|
177
|
+
conversationsMap: snapshot(this.conversationsRef),
|
|
178
|
+
agentNamesMap: snapshot(this.agentNamesRef),
|
|
179
|
+
viewMarkers: getOr(lastNotifiedMap, currentConvId, () => HashMap.empty()),
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
collectContextCandidates(state, currentConvId) {
|
|
183
|
+
const candidates = [];
|
|
184
|
+
for (const [conversationId, newMessages] of this.iterNewMessagesByConv(state.messagesMap, state.viewMarkers, currentConvId)) {
|
|
185
|
+
candidates.push(makeContextCandidate(conversationId, newMessages));
|
|
186
|
+
}
|
|
187
|
+
candidates.sort((left, right) => right.lastTs - left.lastTs);
|
|
188
|
+
return candidates;
|
|
189
|
+
}
|
|
190
|
+
*iterNewMessagesByConv(messagesMap, viewMarkers, currentConvId) {
|
|
191
|
+
for (const [conversationId, messages] of messagesMap) {
|
|
192
|
+
const newMessages = newMessagesForConversation(conversationId, messages, viewMarkers, currentConvId);
|
|
193
|
+
if (newMessages.length > 0) {
|
|
194
|
+
yield [conversationId, newMessages];
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
advanceLastNotified(currentConvId, pendingAdvances) {
|
|
199
|
+
if (pendingAdvances.length === 0) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
Effect.runSync(Ref.update(this.lastNotifiedRef, (outer) => {
|
|
203
|
+
let markers = getOr(outer, currentConvId, () => HashMap.empty());
|
|
204
|
+
for (const [conversationId, messageId] of pendingAdvances) {
|
|
205
|
+
markers = HashMap.set(markers, conversationId, messageId);
|
|
206
|
+
}
|
|
207
|
+
return HashMap.set(outer, currentConvId, markers);
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/presentation/state.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAEtD,MAAM,iCAAiC,GAAG,CAAC,CAAC;AAC5C,MAAM,qCAAqC,GAAG,CAAC,CAAC;AAChD,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC,MAAM,QAAQ,GAAG,CAAI,GA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AM,CAAC,cAAc,EAAE,SAAS,CAAC,IAAI,eAAe,EAAE,CAAC;gBAC1D,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;YAC5D,CAAC;YACD,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
|
package/dist/profile.d.ts
CHANGED
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
2
|
/** Validates and decodes profile name values. */
|
|
3
3
|
export declare const profileName: Schema.brand<Schema.filter<typeof Schema.String>, "ProfileName">;
|
|
4
|
+
/** Branded profile name shared by slot lookup and daemon registration. */
|
|
5
|
+
export type ProfileName = Schema.Schema.Type<typeof profileName>;
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
7
|
+
* A slot exists before registration and carries no AgentId. Registry commit
|
|
8
|
+
* adds the identity pair, which is irreversible for that slot.
|
|
6
9
|
*/
|
|
7
|
-
|
|
8
|
-
declare const profileRecordSchema: Schema.Struct<{
|
|
9
|
-
agentId: Schema.Schema<import("@moltzap/protocol/identity").AgentId, string, never>;
|
|
10
|
-
apiKey: Schema.Schema<import("@moltzap/protocol/identity").AgentKey, string, never>;
|
|
10
|
+
declare const profileRecordSchema: Schema.filter<Schema.Struct<{
|
|
11
11
|
agentName: typeof Schema.String;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
mcpPort: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
13
|
+
agentId: Schema.optional<Schema.Schema<import("@moltzap/protocol/identity").AgentId, string, never>>;
|
|
14
|
+
apiKey: Schema.optional<Schema.Schema<import("@moltzap/protocol/identity").AgentKey, string, never>>;
|
|
15
|
+
}>>;
|
|
16
|
+
/** One profile's persisted slot, with its identity once Registry has committed. */
|
|
14
17
|
export type ProfileRecord = Schema.Schema.Type<typeof profileRecordSchema>;
|
|
18
|
+
/** A slot whose Registry commit has happened, so it can authenticate. */
|
|
19
|
+
export interface RegisteredProfileRecord extends ProfileRecord {
|
|
20
|
+
readonly agentId: NonNullable<ProfileRecord["agentId"]>;
|
|
21
|
+
readonly apiKey: NonNullable<ProfileRecord["apiKey"]>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Narrow a slot to its registered form.
|
|
25
|
+
* @param record Slot to inspect.
|
|
26
|
+
* @returns Whether Registry has committed an identity for the slot.
|
|
27
|
+
*/
|
|
28
|
+
export declare const isRegisteredProfile: (record: ProfileRecord) => record is RegisteredProfileRecord;
|
|
15
29
|
/** Named profile view of config.json. */
|
|
16
30
|
export interface LayeredConfig {
|
|
17
31
|
readonly profiles: ReadonlyMap<ProfileName, ProfileRecord>;
|
|
18
32
|
}
|
|
19
|
-
/** Exhaustive error union for the profile surface. */
|
|
20
|
-
export type ProfileError = ProfileNotFoundError | ProfileInvalidNameError | ProfileConfigReadError | ProfileConfigWriteError;
|
|
21
33
|
declare const ProfileNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
22
34
|
readonly _tag: "ProfileNotFoundError";
|
|
23
35
|
} & Readonly<A>;
|
|
@@ -26,6 +38,14 @@ export declare class ProfileNotFoundError extends ProfileNotFoundError_base<{
|
|
|
26
38
|
readonly name: string;
|
|
27
39
|
}> {
|
|
28
40
|
}
|
|
41
|
+
declare const ProfileNotRegisteredError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
42
|
+
readonly _tag: "ProfileNotRegisteredError";
|
|
43
|
+
} & Readonly<A>;
|
|
44
|
+
/** Reports a slot that exists but has no committed Registry identity. */
|
|
45
|
+
export declare class ProfileNotRegisteredError extends ProfileNotRegisteredError_base<{
|
|
46
|
+
readonly name: string;
|
|
47
|
+
}> {
|
|
48
|
+
}
|
|
29
49
|
declare const ProfileInvalidNameError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
30
50
|
readonly _tag: "ProfileInvalidNameError";
|
|
31
51
|
} & Readonly<A>;
|
|
@@ -70,8 +90,7 @@ export declare const parseProfileName: (raw: string) => Effect.Effect<ProfileNam
|
|
|
70
90
|
*/
|
|
71
91
|
export declare const loadLayeredConfig: Effect.Effect<LayeredConfig, ProfileConfigReadError>;
|
|
72
92
|
/**
|
|
73
|
-
* Resolve a named profile record
|
|
74
|
-
* `agentId`; daemon startup consumes the redacted `apiKey`.
|
|
93
|
+
* Resolve a named profile record for daemon startup or client acquisition.
|
|
75
94
|
* @param name Name of the operation.
|
|
76
95
|
* @returns The next profile file result.
|
|
77
96
|
*/
|
|
@@ -83,22 +102,5 @@ export declare const resolveProfileRecord: (name: ProfileName) => Effect.Effect<
|
|
|
83
102
|
* @returns The write profile result.
|
|
84
103
|
*/
|
|
85
104
|
export declare const writeProfile: (name: ProfileName, record: ProfileRecord) => Effect.Effect<void, ProfileConfigWriteError | ProfileConfigReadError>;
|
|
86
|
-
/**
|
|
87
|
-
* `--no-persist` contract for `moltzap register`: no file under
|
|
88
|
-
* `$HOME/.moltzap/` is created or modified. Returns the record so the caller
|
|
89
|
-
* can print it; does no I/O under that tree.
|
|
90
|
-
*
|
|
91
|
-
* The register command invokes either `writeProfile` (default) or
|
|
92
|
-
* `emitNoPersist` (when the flag is set). The register handler never calls
|
|
93
|
-
* both paths on the same invocation.
|
|
94
|
-
*
|
|
95
|
-
* The register command pipes the returned record through the printer,
|
|
96
|
-
* which writes non-secret registration details to stdout.
|
|
97
|
-
* @param record Value supplied to the operation.
|
|
98
|
-
* @returns The emit no persist result.
|
|
99
|
-
*/
|
|
100
|
-
export declare const emitNoPersist: (record: ProfileRecord) => Effect.Effect<{
|
|
101
|
-
readonly record: ProfileRecord;
|
|
102
|
-
}>;
|
|
103
105
|
export {};
|
|
104
106
|
//# sourceMappingURL=profile.d.ts.map
|
package/dist/profile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAQA,OAAO,EAAQ,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAQA,OAAO,EAAQ,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAoBtD,iDAAiD;AACjD,eAAO,MAAM,WAAW,kEAGvB,CAAC;AAEF,0EAA0E;AAC1E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAYjE;;;GAGG;AACH,QAAA,MAAM,mBAAmB;;;;;GAWxB,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE3E,yEAAyE;AACzE,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,WACtB,aAAa,KACpB,MAAM,IAAI,uBACgD,CAAC;AAe9D,yCAAyC;AACzC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;CAC5D;;;;AAID,0CAA0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8 @@ import { getMoltZapConfigDir, getMoltZapConfigPath } from "./local-paths.js";
|
|
|
13
13
|
const NAME_PATTERN = /^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$/;
|
|
14
14
|
const PROFILE_NAME_REASON = "must be 3-32 chars, lowercase alphanumeric and hyphens, cannot start or end with a hyphen";
|
|
15
15
|
const CONFIG_FILE_MODE = 0o600;
|
|
16
|
+
const MIN_TCP_PORT = 1;
|
|
17
|
+
const MAX_TCP_PORT = 65_535;
|
|
16
18
|
const JSON_INDENT_SPACES = 2;
|
|
17
19
|
const getConfigDir = getMoltZapConfigDir;
|
|
18
20
|
const getConfigFilePathSync = getMoltZapConfigPath;
|
|
@@ -20,11 +22,29 @@ const STRICT_PARSE_OPTIONS = { onExcessProperty: "error" };
|
|
|
20
22
|
// ─── Records ───────────────────────────────────────────────────────────────
|
|
21
23
|
/** Validates and decodes profile name values. */
|
|
22
24
|
export const profileName = Schema.String.pipe(Schema.pattern(NAME_PATTERN), Schema.brand("ProfileName"));
|
|
25
|
+
/**
|
|
26
|
+
* Loopback port the slot's daemon listens on. Operator-supplied and stable for
|
|
27
|
+
* the life of the slot: the daemon and every adapter derive the same MCP URL
|
|
28
|
+
* from it, so nothing discovers, allocates, or falls back to another port.
|
|
29
|
+
*/
|
|
30
|
+
const mcpPort = Schema.Number.pipe(Schema.int(), Schema.between(MIN_TCP_PORT, MAX_TCP_PORT));
|
|
31
|
+
/**
|
|
32
|
+
* A slot exists before registration and carries no AgentId. Registry commit
|
|
33
|
+
* adds the identity pair, which is irreversible for that slot.
|
|
34
|
+
*/
|
|
23
35
|
const profileRecordSchema = Schema.Struct({
|
|
24
|
-
agentId: agentId,
|
|
25
|
-
apiKey: agentKey,
|
|
26
36
|
agentName: Schema.String,
|
|
27
|
-
|
|
37
|
+
mcpPort,
|
|
38
|
+
agentId: Schema.optional(agentId),
|
|
39
|
+
apiKey: Schema.optional(agentKey),
|
|
40
|
+
}).pipe(Schema.filter((record) => (record.agentId === undefined) === (record.apiKey === undefined) ||
|
|
41
|
+
"agentId and apiKey are written together at Registry commit"));
|
|
42
|
+
/**
|
|
43
|
+
* Narrow a slot to its registered form.
|
|
44
|
+
* @param record Slot to inspect.
|
|
45
|
+
* @returns Whether Registry has committed an identity for the slot.
|
|
46
|
+
*/
|
|
47
|
+
export const isRegisteredProfile = (record) => record.agentId !== undefined && record.apiKey !== undefined;
|
|
28
48
|
const profileMapSchema = Schema.Record({
|
|
29
49
|
key: profileName,
|
|
30
50
|
value: profileRecordSchema,
|
|
@@ -35,9 +55,13 @@ const profileFileSchema = Schema.Struct({
|
|
|
35
55
|
const profileFileTextSchema = Schema.parseJson(profileFileSchema, {
|
|
36
56
|
space: JSON_INDENT_SPACES,
|
|
37
57
|
});
|
|
58
|
+
// ─── Errors ────────────────────────────────────────────────────────────────
|
|
38
59
|
/** Reports profile not found failures. */
|
|
39
60
|
export class ProfileNotFoundError extends Data.TaggedError("ProfileNotFoundError") {
|
|
40
61
|
}
|
|
62
|
+
/** Reports a slot that exists but has no committed Registry identity. */
|
|
63
|
+
export class ProfileNotRegisteredError extends Data.TaggedError("ProfileNotRegisteredError") {
|
|
64
|
+
}
|
|
41
65
|
/** Reports profile invalid name failures. */
|
|
42
66
|
export class ProfileInvalidNameError extends Data.TaggedError("ProfileInvalidNameError") {
|
|
43
67
|
}
|
|
@@ -100,8 +124,7 @@ export const loadLayeredConfig = Effect.gen(function* () {
|
|
|
100
124
|
};
|
|
101
125
|
}).pipe(Effect.withSpan("loadLayeredConfig"));
|
|
102
126
|
/**
|
|
103
|
-
* Resolve a named profile record
|
|
104
|
-
* `agentId`; daemon startup consumes the redacted `apiKey`.
|
|
127
|
+
* Resolve a named profile record for daemon startup or client acquisition.
|
|
105
128
|
* @param name Name of the operation.
|
|
106
129
|
* @returns The next profile file result.
|
|
107
130
|
*/
|
|
@@ -145,19 +168,4 @@ export const writeProfile = (name, record) => Effect.gen(function* () {
|
|
|
145
168
|
const { file } = yield* readProfileFile();
|
|
146
169
|
yield* writeProfileFile(nextProfileFile(file, name, record));
|
|
147
170
|
}).pipe(Effect.withSpan("writeProfile"));
|
|
148
|
-
/**
|
|
149
|
-
* `--no-persist` contract for `moltzap register`: no file under
|
|
150
|
-
* `$HOME/.moltzap/` is created or modified. Returns the record so the caller
|
|
151
|
-
* can print it; does no I/O under that tree.
|
|
152
|
-
*
|
|
153
|
-
* The register command invokes either `writeProfile` (default) or
|
|
154
|
-
* `emitNoPersist` (when the flag is set). The register handler never calls
|
|
155
|
-
* both paths on the same invocation.
|
|
156
|
-
*
|
|
157
|
-
* The register command pipes the returned record through the printer,
|
|
158
|
-
* which writes non-secret registration details to stdout.
|
|
159
|
-
* @param record Value supplied to the operation.
|
|
160
|
-
* @returns The emit no persist result.
|
|
161
|
-
*/
|
|
162
|
-
export const emitNoPersist = (record) => Effect.succeed({ record });
|
|
163
171
|
//# sourceMappingURL=profile.js.map
|
package/dist/profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,8EAA8E;AAE9E,MAAM,YAAY,GAAG,mCAAmC,CAAC;AACzD,MAAM,mBAAmB,GACvB,2FAA2F,CAAC;AAE9F,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,YAAY,GAAG,mBAAmB,CAAC;AACzC,M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,MAAM,CAAC,KAAK,CAAC;QACX,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAChB,MAAM,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;QACvE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;KAC1C,CAAC,CACH,CACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,IAAiB,EACjB,MAAqB,EACkD,EAAE,CACzE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,eAAe,EAAE,CAAC;IAC1C,KAAK,CAAC,CAAC,gBAAgB,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/D,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC"}
|
package/dist/service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type AgentId } from "@moltzap/protocol/identity";
|
|
2
2
|
import type { HelloOk } from "@moltzap/protocol/network";
|
|
3
3
|
import type { AnyAgentCallableRpcDefinition, AnyNotificationDefinition, agentCallableGroup } from "@moltzap/protocol/socket/catalog";
|
|
4
4
|
import type { ClientDefinitionPayload, ClientDefinitionSuccess } from "@moltzap/protocol/socket";
|
|
@@ -9,6 +9,9 @@ import type { RpcGroup, Rpc } from "@effect/rpc";
|
|
|
9
9
|
import { Effect } from "effect";
|
|
10
10
|
import { type RpcCallOptions } from "./agent-client.js";
|
|
11
11
|
import { type MoltzapServiceConfig, type ServiceConfigError } from "./config.js";
|
|
12
|
+
import { type ConversationMeta, type CrossConversationEntry, type CrossConvMessage } from "./presentation/index.js";
|
|
13
|
+
/** Presentation value types exposed alongside MoltZapService. */
|
|
14
|
+
export type { ConversationMeta, CrossConversationEntry, CrossConvMessage, } from "./presentation/index.js";
|
|
12
15
|
/** The agent group's member `Rpc`s — the tag-keyed surface the service drives. */
|
|
13
16
|
type AgentCallableRpcs = RpcGroup.Rpcs<typeof agentCallableGroup>;
|
|
14
17
|
/** The branded wire tags the service may originate. */
|
|
@@ -16,34 +19,17 @@ type AgentCallableTag = AgentCallableRpcs["_tag"];
|
|
|
16
19
|
/**
|
|
17
20
|
* Errors that can surface from the Effect-based service API: any tagged error
|
|
18
21
|
* an agent-callable method declares (recovered from the group's per-method
|
|
19
|
-
* error unions) plus the transport errors.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
+
* error unions) plus the transport errors. A method that fans several calls
|
|
23
|
+
* surfaces this broad union; a single-method call narrows to that method's
|
|
24
|
+
* errors at the `call` site.
|
|
22
25
|
*/
|
|
23
26
|
export type ServiceRpcError = Rpc.Error<AgentCallableRpcs> | RpcTimeoutError | NotConnectedError;
|
|
24
|
-
/** Describes conversation meta. */
|
|
25
|
-
export interface ConversationMeta {
|
|
26
|
-
id: string;
|
|
27
|
-
type: string;
|
|
28
|
-
name?: string;
|
|
29
|
-
participants: string[];
|
|
30
|
-
}
|
|
31
27
|
/** Configures context. */
|
|
32
28
|
export interface ContextOptions {
|
|
33
29
|
type: "cross-conversation";
|
|
34
30
|
maxConversations?: number;
|
|
35
31
|
maxMessagesPerConv?: number;
|
|
36
32
|
}
|
|
37
|
-
/** Structured summary of recent activity in one other conversation. */
|
|
38
|
-
export interface CrossConversationEntry {
|
|
39
|
-
conversationId: string;
|
|
40
|
-
conversationName?: string;
|
|
41
|
-
senderName: string;
|
|
42
|
-
text: string;
|
|
43
|
-
minutesAgo: number;
|
|
44
|
-
/** Messages in this summary (capped by maxMessagesPerConv). */
|
|
45
|
-
count: number;
|
|
46
|
-
}
|
|
47
33
|
/**
|
|
48
34
|
* Escape `<`, `>`, `&` so sender content can't escape a `<system-reminder>` block.
|
|
49
35
|
* @param s Value supplied to the operation.
|
|
@@ -67,15 +53,6 @@ interface ServiceHandlerPayloads {
|
|
|
67
53
|
readonly disconnect: undefined;
|
|
68
54
|
}
|
|
69
55
|
type ServiceHandlerName = keyof ServiceHandlerPayloads;
|
|
70
|
-
/** Full message from another conversation, used by peekFullMessages(). */
|
|
71
|
-
export interface CrossConvMessage {
|
|
72
|
-
conversationId: string;
|
|
73
|
-
conversationName?: string;
|
|
74
|
-
senderName: string;
|
|
75
|
-
senderId: string;
|
|
76
|
-
text: string;
|
|
77
|
-
timestamp: string;
|
|
78
|
-
}
|
|
79
56
|
/**
|
|
80
57
|
* Stateful MoltZap client that manages connection, conversation tracking,
|
|
81
58
|
* agent name resolution, and cross-conversation context generation.
|
|
@@ -98,12 +75,7 @@ export declare class MoltZapService {
|
|
|
98
75
|
* thread a `Scope` requirement.
|
|
99
76
|
*/
|
|
100
77
|
private serviceScope;
|
|
101
|
-
private readonly
|
|
102
|
-
private readonly messagesRef;
|
|
103
|
-
private readonly agentNamesRef;
|
|
104
|
-
private readonly agentConversationCacheRef;
|
|
105
|
-
private readonly lastNotifiedRef;
|
|
106
|
-
private readonly lastReadRef;
|
|
78
|
+
private readonly presentationState;
|
|
107
79
|
/**
|
|
108
80
|
* The branded outer and inner keys keep conversation and message ids from
|
|
109
81
|
* crossing accidentally while each conversation owns its eviction window.
|
|
@@ -115,7 +87,6 @@ export declare class MoltZapService {
|
|
|
115
87
|
protected constructor(opts: ServiceOptions);
|
|
116
88
|
static fromConfig(config: MoltzapServiceConfig): MoltZapService;
|
|
117
89
|
static make(profileName: string): Effect.Effect<MoltZapService, ServiceConfigError>;
|
|
118
|
-
static startDaemon(profileName: string): Effect.Effect<MoltZapService, unknown>;
|
|
119
90
|
get connected(): boolean;
|
|
120
91
|
get ownAgentId(): AgentId | undefined;
|
|
121
92
|
/**
|
|
@@ -137,33 +108,6 @@ export declare class MoltZapService {
|
|
|
137
108
|
* lifecycle boundary.
|
|
138
109
|
*/
|
|
139
110
|
close(): void;
|
|
140
|
-
private socketServerScope;
|
|
141
|
-
private activeSocketPath;
|
|
142
|
-
/** Default socket path for CLI discovery. Per-instance path uses agentId. */
|
|
143
|
-
static readonly SOCKET_PATH: string;
|
|
144
|
-
/**
|
|
145
|
-
* `agentId` is a server-assigned string. Treat it as untrusted: if a
|
|
146
|
-
* compromised or malicious server returns an id containing `..` or a
|
|
147
|
-
* path separator, a naive `path.join(... , agentId)` escapes `~/.moltzap`.
|
|
148
|
-
* Reject anything that isn't a safe identifier.
|
|
149
|
-
* @param id Value supplied to the operation.
|
|
150
|
-
* @returns The id result.
|
|
151
|
-
*/
|
|
152
|
-
private static safeAgentIdSegment;
|
|
153
|
-
/**
|
|
154
|
-
* Per-instance socket path based on connected agentId.
|
|
155
|
-
* @returns The id result.
|
|
156
|
-
*/
|
|
157
|
-
get socketPath(): string;
|
|
158
|
-
startSocketServer(): Effect.Effect<void, unknown>;
|
|
159
|
-
private resetSocketServerState;
|
|
160
|
-
private stopSocketServer;
|
|
161
|
-
private localDaemonHandlers;
|
|
162
|
-
private handleHistoryRequest;
|
|
163
|
-
private loadHistorySupportData;
|
|
164
|
-
private refreshHistoryAgentNames;
|
|
165
|
-
private fetchHistoryConversationMeta;
|
|
166
|
-
private advanceHistoryLastRead;
|
|
167
111
|
getConversation(convId: string): ConversationMeta | undefined;
|
|
168
112
|
getConversations(): ConversationMeta[];
|
|
169
113
|
getHistory(convId: string, limit?: number): Message[];
|
|
@@ -203,15 +147,6 @@ export declare class MoltZapService {
|
|
|
203
147
|
* @returns The send result.
|
|
204
148
|
*/
|
|
205
149
|
send(conversationId: ConversationId, text: string): Effect.Effect<void, ServiceRpcError>;
|
|
206
|
-
/**
|
|
207
|
-
* Send to a named agent, minting the DM conversation on first use and
|
|
208
|
-
* reusing it afterwards. The per-name cache is what makes the DM stable:
|
|
209
|
-
* `agent/conversation/create` mints a fresh conversation on every call.
|
|
210
|
-
* @param agentName Name of the agent to reach.
|
|
211
|
-
* @param text Text to process.
|
|
212
|
-
* @returns The send result.
|
|
213
|
-
*/
|
|
214
|
-
sendToAgent(agentName: string, text: string): Effect.Effect<void, ServiceRpcError | AgentNotFoundError>;
|
|
215
150
|
private cacheAgentNames;
|
|
216
151
|
private agentListParams;
|
|
217
152
|
private cacheVisibleAgentNamesForIds;
|
|
@@ -254,10 +189,6 @@ export declare class MoltZapService {
|
|
|
254
189
|
messages: CrossConvMessage[];
|
|
255
190
|
commit: () => void;
|
|
256
191
|
};
|
|
257
|
-
private readCrossConvState;
|
|
258
|
-
private collectContextCandidates;
|
|
259
|
-
private iterNewMessagesByConv;
|
|
260
|
-
private advanceLastNotified;
|
|
261
192
|
on<K extends ServiceHandlerName>(notification: K, handler: NotificationHandler<ServiceHandlerPayloads[K]>): void;
|
|
262
193
|
/**
|
|
263
194
|
* Outbound RPC, typed per method — delegates to the agent client's typed
|
|
@@ -293,7 +224,5 @@ export declare class MoltZapService {
|
|
|
293
224
|
private recordMessageIdIfNew;
|
|
294
225
|
private handleMessageReceivedNotification;
|
|
295
226
|
private handleConversationCreatedNotification;
|
|
296
|
-
private storeMessage;
|
|
297
227
|
}
|
|
298
|
-
export {};
|
|
299
228
|
//# sourceMappingURL=service.d.ts.map
|
package/dist/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,OAAO,EACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACV,uBAAuB,EACvB,u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