@moltzap/client 2026.729.0 → 2026.730.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/dist/agent-client.d.ts +2 -0
- package/dist/agent-client.d.ts.map +1 -1
- package/dist/agent-client.js +1 -0
- package/dist/agent-client.js.map +1 -1
- package/dist/app-client.d.ts +2 -0
- package/dist/app-client.d.ts.map +1 -1
- package/dist/app-client.js +1 -0
- package/dist/app-client.js.map +1 -1
- package/dist/auth.d.ts +7 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +10 -5
- package/dist/auth.js.map +1 -1
- package/dist/channel-base/format-cross-conv.d.ts +8 -3
- package/dist/channel-base/format-cross-conv.d.ts.map +1 -1
- package/dist/channel-base/format-cross-conv.js +10 -9
- package/dist/channel-base/format-cross-conv.js.map +1 -1
- package/dist/channel-base/format-group-block.d.ts +9 -2
- package/dist/channel-base/format-group-block.d.ts.map +1 -1
- package/dist/channel-base/format-group-block.js +12 -7
- package/dist/channel-base/format-group-block.js.map +1 -1
- package/dist/channel-base/index.d.ts +8 -0
- package/dist/channel-base/index.d.ts.map +1 -1
- package/dist/channel-base/index.js +8 -0
- package/dist/channel-base/index.js.map +1 -1
- package/dist/channel-base/lease-guard.d.ts +6 -3
- package/dist/channel-base/lease-guard.d.ts.map +1 -1
- package/dist/channel-base/lease-guard.js +10 -4
- package/dist/channel-base/lease-guard.js.map +1 -1
- package/dist/channel-base/lease-store.d.ts +29 -10
- package/dist/channel-base/lease-store.d.ts.map +1 -1
- package/dist/channel-base/lease-store.js +33 -13
- package/dist/channel-base/lease-store.js.map +1 -1
- package/dist/channel-base/lease.d.ts +9 -1
- package/dist/channel-base/lease.d.ts.map +1 -1
- package/dist/channel-base/lease.js +16 -4
- package/dist/channel-base/lease.js.map +1 -1
- package/dist/channel-core-enrichment.d.ts +9 -2
- package/dist/channel-core-enrichment.d.ts.map +1 -1
- package/dist/channel-core-enrichment.js +17 -5
- package/dist/channel-core-enrichment.js.map +1 -1
- package/dist/channel-core-test-support.d.ts +46 -0
- package/dist/channel-core-test-support.d.ts.map +1 -1
- package/dist/channel-core-test-support.js +67 -13
- package/dist/channel-core-test-support.js.map +1 -1
- package/dist/channel-core.d.ts +37 -19
- package/dist/channel-core.d.ts.map +1 -1
- package/dist/channel-core.js +45 -30
- package/dist/channel-core.js.map +1 -1
- package/dist/cli/adapters.d.ts +4 -1
- package/dist/cli/adapters.d.ts.map +1 -1
- package/dist/cli/adapters.js +11 -4
- package/dist/cli/adapters.js.map +1 -1
- package/dist/cli/commands/agents.js +3 -3
- package/dist/cli/commands/contacts.d.ts +3 -3
- package/dist/cli/commands/contacts.d.ts.map +1 -1
- package/dist/cli/commands/contacts.js +13 -9
- package/dist/cli/commands/contacts.js.map +1 -1
- package/dist/cli/commands/conversations.d.ts +3 -2
- package/dist/cli/commands/conversations.d.ts.map +1 -1
- package/dist/cli/commands/conversations.js +7 -6
- package/dist/cli/commands/conversations.js.map +1 -1
- package/dist/cli/commands/messages.d.ts +6 -2
- package/dist/cli/commands/messages.d.ts.map +1 -1
- package/dist/cli/commands/messages.js +8 -5
- package/dist/cli/commands/messages.js.map +1 -1
- package/dist/cli/commands/register.d.ts +1 -1
- package/dist/cli/commands/register.js +4 -4
- package/dist/cli/commands/send.d.ts +7 -6
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +7 -6
- package/dist/cli/commands/send.js.map +1 -1
- package/dist/cli/commands/start.d.ts +15 -7
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +12 -5
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/status.js +2 -2
- package/dist/cli/commands/test-transport.d.ts +9 -1
- package/dist/cli/commands/test-transport.d.ts.map +1 -1
- package/dist/cli/commands/test-transport.js +5 -1
- package/dist/cli/commands/test-transport.js.map +1 -1
- package/dist/cli/index.js +8 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/output.d.ts +10 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +10 -0
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/socket-client.d.ts +13 -3
- package/dist/cli/socket-client.d.ts.map +1 -1
- package/dist/cli/socket-client.js +16 -5
- package/dist/cli/socket-client.js.map +1 -1
- package/dist/cli/transport.d.ts +16 -3
- package/dist/cli/transport.d.ts.map +1 -1
- package/dist/cli/transport.js +19 -6
- package/dist/cli/transport.js.map +1 -1
- package/dist/config.d.ts +9 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -3
- package/dist/config.js.map +1 -1
- package/dist/config.test-utils.d.ts +7 -2
- package/dist/config.test-utils.d.ts.map +1 -1
- package/dist/config.test-utils.js +8 -1
- package/dist/config.test-utils.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/local-daemon-rpc.d.ts +116 -93
- package/dist/local-daemon-rpc.d.ts.map +1 -1
- package/dist/local-daemon-rpc.js +128 -108
- package/dist/local-daemon-rpc.js.map +1 -1
- package/dist/local-history.d.ts +40 -20
- package/dist/local-history.d.ts.map +1 -1
- package/dist/local-history.js +45 -23
- package/dist/local-history.js.map +1 -1
- package/dist/local-paths.d.ts +17 -0
- package/dist/local-paths.d.ts.map +1 -1
- package/dist/local-paths.js +21 -4
- package/dist/local-paths.js.map +1 -1
- package/dist/local-socket-server.d.ts +13 -2
- package/dist/local-socket-server.d.ts.map +1 -1
- package/dist/local-socket-server.js +13 -2
- package/dist/local-socket-server.js.map +1 -1
- package/dist/message-rendering.d.ts +1 -0
- package/dist/message-rendering.d.ts.map +1 -1
- package/dist/message-rendering.js +1 -0
- package/dist/message-rendering.js.map +1 -1
- package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts +50 -2
- package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts.map +1 -1
- package/dist/notification/__tests__/subscribe-signatures.types-check.js +22 -48
- package/dist/notification/__tests__/subscribe-signatures.types-check.js.map +1 -1
- package/dist/notification/errors.d.ts +2 -0
- package/dist/notification/errors.d.ts.map +1 -1
- package/dist/notification/errors.js +3 -1
- package/dist/notification/errors.js.map +1 -1
- package/dist/notification/index.d.ts +1 -0
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1 -0
- package/dist/notification/index.js.map +1 -1
- package/dist/notification/stream.d.ts +11 -4
- package/dist/notification/stream.d.ts.map +1 -1
- package/dist/notification/stream.js +5 -38
- package/dist/notification/stream.js.map +1 -1
- package/dist/pagination.d.ts +13 -16
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +9 -1
- package/dist/pagination.js.map +1 -1
- package/dist/profile.d.ts +21 -9
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +30 -16
- package/dist/profile.js.map +1 -1
- package/dist/refs.d.ts +9 -1
- package/dist/refs.d.ts.map +1 -1
- package/dist/refs.js +9 -1
- package/dist/refs.js.map +1 -1
- package/dist/service-archive-purge.d.ts +18 -0
- package/dist/service-archive-purge.d.ts.map +1 -1
- package/dist/service-archive-purge.js +18 -0
- package/dist/service-archive-purge.js.map +1 -1
- package/dist/service-event-trace.d.ts +15 -0
- package/dist/service-event-trace.d.ts.map +1 -0
- package/dist/service-event-trace.js +35 -0
- package/dist/service-event-trace.js.map +1 -0
- package/dist/service-helpers.d.ts +35 -6
- package/dist/service-helpers.d.ts.map +1 -1
- package/dist/service-helpers.js +38 -8
- package/dist/service-helpers.js.map +1 -1
- package/dist/service-local-daemon.d.ts +12 -2
- package/dist/service-local-daemon.d.ts.map +1 -1
- package/dist/service-local-daemon.js +38 -25
- package/dist/service-local-daemon.js.map +1 -1
- package/dist/service.d.ts +62 -22
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +135 -80
- package/dist/service.js.map +1 -1
- package/dist/test-utils/channel-service-fixture.d.ts +8 -0
- package/dist/test-utils/channel-service-fixture.d.ts.map +1 -1
- package/dist/test-utils/channel-service-fixture.js +31 -13
- package/dist/test-utils/channel-service-fixture.js.map +1 -1
- package/dist/test-utils/fake-service.d.ts +20 -7
- package/dist/test-utils/fake-service.d.ts.map +1 -1
- package/dist/test-utils/fake-service.js +18 -4
- package/dist/test-utils/fake-service.js.map +1 -1
- package/dist/test-utils/harness.d.ts +5 -1
- package/dist/test-utils/harness.d.ts.map +1 -1
- package/dist/test-utils/harness.js +3 -0
- package/dist/test-utils/harness.js.map +1 -1
- package/dist/test-utils/ids.d.ts +25 -0
- package/dist/test-utils/ids.d.ts.map +1 -1
- package/dist/test-utils/ids.js +27 -1
- package/dist/test-utils/ids.js.map +1 -1
- package/dist/test-utils/index.d.ts +7 -1
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +7 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/standalone-provisioning.d.ts +5 -0
- package/dist/test-utils/standalone-provisioning.d.ts.map +1 -1
- package/dist/test-utils/standalone-provisioning.js +3 -0
- package/dist/test-utils/standalone-provisioning.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
package/dist/local-daemon-rpc.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Rpc, RpcGroup } from "@effect/rpc";
|
|
2
2
|
import { Effect, ParseResult, Schema } from "effect";
|
|
3
|
-
import {
|
|
3
|
+
import { agentId, agentsList, contactId, contactsAccept, contactsAdd, contactsList, userId, } from "@moltzap/protocol/identity";
|
|
4
4
|
import { agentCallableMethods } from "@moltzap/protocol/socket/catalog";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { appId, taskId } from "@moltzap/protocol/task";
|
|
6
|
+
import { conversationId, messageId } from "@moltzap/protocol/conversation";
|
|
7
|
+
import { messagesList } from "@moltzap/protocol/message";
|
|
8
8
|
import { NotConnectedError, RpcTimeoutError } from "@moltzap/protocol/rpc";
|
|
9
9
|
import { historyRequestSchema, historyResponseSchema, } from "./local-history.js";
|
|
10
10
|
const MAX_PAGE_LIMIT = 200;
|
|
@@ -12,23 +12,25 @@ const MAX_NAME_LOOKUP_BATCH = 100;
|
|
|
12
12
|
const UUID_V4_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
13
13
|
const SEND_TARGET_PREFIX = "task:";
|
|
14
14
|
const PARTICIPANT_PREFIX = "agent:";
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
agentId: Schema.optional(
|
|
15
|
+
const emptyPayload = Schema.Struct({});
|
|
16
|
+
const localDaemonStatusResultSchema = Schema.Struct({
|
|
17
|
+
agentId: Schema.optional(agentId),
|
|
18
18
|
connected: Schema.Boolean,
|
|
19
19
|
conversations: Schema.Number.pipe(Schema.int(), Schema.nonNegative()),
|
|
20
20
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const pageLimit = Schema.Number.pipe(Schema.int(), Schema.greaterThanOrEqualTo(1), Schema.lessThanOrEqualTo(MAX_PAGE_LIMIT));
|
|
22
|
+
/** Validates and decodes app id v4 values. */
|
|
23
|
+
const appIdV4 = appId.pipe(Schema.filter((value) => (typeof value === "string" && UUID_V4_RE.test(value)) ||
|
|
23
24
|
"must be a UUID v4"));
|
|
24
25
|
const parseStringIssue = (ast, actual, message) => Effect.fail(new ParseResult.Type(ast, actual, message));
|
|
25
|
-
const
|
|
26
|
-
taskId:
|
|
27
|
-
conversationId:
|
|
26
|
+
const sendTargetParts = Schema.Struct({
|
|
27
|
+
taskId: taskId,
|
|
28
|
+
conversationId: conversationId,
|
|
28
29
|
});
|
|
29
|
-
|
|
30
|
+
/** Validates and decodes send target values. */
|
|
31
|
+
export const sendTarget = Schema.transformOrFail(Schema.String, sendTargetParts, {
|
|
30
32
|
strict: true,
|
|
31
|
-
decode: (raw,
|
|
33
|
+
decode: (raw, ...[, ast]) => {
|
|
32
34
|
const expected = `expected ${SEND_TARGET_PREFIX}<taskId>:<conversationId>`;
|
|
33
35
|
if (!raw.startsWith(SEND_TARGET_PREFIX)) {
|
|
34
36
|
return parseStringIssue(ast, raw, expected);
|
|
@@ -39,26 +41,29 @@ export const SendTarget = Schema.transformOrFail(Schema.String, SendTargetParts,
|
|
|
39
41
|
return parseStringIssue(ast, raw, expected);
|
|
40
42
|
}
|
|
41
43
|
return Effect.succeed({
|
|
42
|
-
taskId:
|
|
43
|
-
|
|
44
|
+
taskId:
|
|
45
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ parts[0],
|
|
46
|
+
conversationId:
|
|
47
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ parts[1],
|
|
44
48
|
});
|
|
45
49
|
},
|
|
46
50
|
encode: (target) => Effect.succeed(`${SEND_TARGET_PREFIX}${target.taskId}:${target.conversationId}`),
|
|
47
51
|
});
|
|
48
|
-
const
|
|
49
|
-
const
|
|
52
|
+
const agentName = Schema.String.pipe(Schema.minLength(1), Schema.maxLength(32));
|
|
53
|
+
const startParticipantById = Schema.Struct({
|
|
50
54
|
kind: Schema.Literal("id"),
|
|
51
|
-
id:
|
|
55
|
+
id: agentId,
|
|
52
56
|
});
|
|
53
|
-
const
|
|
57
|
+
const startParticipantByName = Schema.Struct({
|
|
54
58
|
kind: Schema.Literal("name"),
|
|
55
59
|
token: Schema.String,
|
|
56
|
-
name:
|
|
60
|
+
name: agentName,
|
|
57
61
|
});
|
|
58
|
-
const
|
|
59
|
-
|
|
62
|
+
const startParticipantParts = Schema.Union(startParticipantById, startParticipantByName);
|
|
63
|
+
/** Validates and decodes start participant values. */
|
|
64
|
+
export const startParticipant = Schema.transformOrFail(Schema.String, startParticipantParts, {
|
|
60
65
|
strict: true,
|
|
61
|
-
decode: (raw,
|
|
66
|
+
decode: (raw, ...[, ast]) => {
|
|
62
67
|
const expected = `expected ${PARTICIPANT_PREFIX}<name-or-agent-id>`;
|
|
63
68
|
if (!raw.startsWith(PARTICIPANT_PREFIX)) {
|
|
64
69
|
return parseStringIssue(ast, raw, expected);
|
|
@@ -68,9 +73,9 @@ export const StartParticipant = Schema.transformOrFail(Schema.String, StartParti
|
|
|
68
73
|
return parseStringIssue(ast, raw, expected);
|
|
69
74
|
}
|
|
70
75
|
if (UUID_V4_RE.test(rest)) {
|
|
71
|
-
return Schema.decodeUnknown(
|
|
76
|
+
return Schema.decodeUnknown(agentId)(rest).pipe(Effect.map((id) => ({ kind: "id", id })), Effect.mapError(() => new ParseResult.Type(ast, raw, expected)));
|
|
72
77
|
}
|
|
73
|
-
return Schema.decodeUnknown(
|
|
78
|
+
return Schema.decodeUnknown(agentName)(rest).pipe(Effect.map((name) => ({
|
|
74
79
|
kind: "name",
|
|
75
80
|
token: raw,
|
|
76
81
|
name,
|
|
@@ -80,118 +85,133 @@ export const StartParticipant = Schema.transformOrFail(Schema.String, StartParti
|
|
|
80
85
|
? `${PARTICIPANT_PREFIX}${participant.id}`
|
|
81
86
|
: participant.token),
|
|
82
87
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
/** Provides the local daemon commands runtime value. */
|
|
89
|
+
export const localDaemonCommands = {
|
|
90
|
+
status: "daemon/status",
|
|
91
|
+
history: "daemon/history",
|
|
92
|
+
agentsList: "cli/agents/list",
|
|
93
|
+
agentsSearch: "cli/agents/search",
|
|
94
|
+
contactsList: "cli/contacts/list",
|
|
95
|
+
contactsAdd: "cli/contacts/add",
|
|
96
|
+
contactsAccept: "cli/contacts/accept",
|
|
97
|
+
messagesList: "cli/messages/list",
|
|
98
|
+
send: "cli/send",
|
|
99
|
+
startTask: "cli/start-task",
|
|
94
100
|
};
|
|
95
|
-
const
|
|
96
|
-
limit: Schema.optional(
|
|
101
|
+
const agentsListCommandPayload = Schema.Struct({
|
|
102
|
+
limit: Schema.optional(pageLimit),
|
|
97
103
|
});
|
|
98
|
-
const
|
|
99
|
-
names: Schema.Array(
|
|
104
|
+
const agentsSearchCommandPayload = Schema.Struct({
|
|
105
|
+
names: Schema.Array(agentName).pipe(Schema.minItems(1), Schema.maxItems(MAX_NAME_LOOKUP_BATCH)),
|
|
100
106
|
});
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
userId:
|
|
107
|
+
const contactsListCommandPayload = emptyPayload;
|
|
108
|
+
const contactsAddCommandPayload = Schema.Struct({
|
|
109
|
+
userId: userId,
|
|
104
110
|
});
|
|
105
|
-
const
|
|
106
|
-
contactId:
|
|
111
|
+
const contactsAcceptCommandPayload = Schema.Struct({
|
|
112
|
+
contactId: contactId,
|
|
107
113
|
});
|
|
108
|
-
const
|
|
109
|
-
taskId:
|
|
110
|
-
conversationId:
|
|
111
|
-
limit: Schema.optional(
|
|
114
|
+
const messagesListCommandPayload = Schema.Struct({
|
|
115
|
+
taskId: taskId,
|
|
116
|
+
conversationId: conversationId,
|
|
117
|
+
limit: Schema.optional(pageLimit),
|
|
112
118
|
});
|
|
113
|
-
const
|
|
114
|
-
target:
|
|
119
|
+
const sendCommandPayload = Schema.Struct({
|
|
120
|
+
target: sendTarget,
|
|
115
121
|
message: Schema.String.pipe(Schema.minLength(1)),
|
|
116
|
-
replyToId: Schema.optional(
|
|
122
|
+
replyToId: Schema.optional(messageId),
|
|
117
123
|
});
|
|
118
|
-
const
|
|
119
|
-
messageId:
|
|
124
|
+
const sendCommandResult = Schema.Struct({
|
|
125
|
+
messageId: messageId,
|
|
120
126
|
});
|
|
121
|
-
const
|
|
127
|
+
const startTaskCommandPayload = Schema.Struct({
|
|
122
128
|
name: Schema.String.pipe(Schema.minLength(1), Schema.maxLength(100)),
|
|
123
|
-
participants: Schema.Array(
|
|
129
|
+
participants: Schema.Array(startParticipant),
|
|
124
130
|
message: Schema.optional(Schema.String),
|
|
125
|
-
appId: Schema.optional(
|
|
131
|
+
appId: Schema.optional(appIdV4),
|
|
126
132
|
});
|
|
127
|
-
const
|
|
128
|
-
taskId:
|
|
129
|
-
conversationId:
|
|
133
|
+
const startTaskCommandResult = Schema.Struct({
|
|
134
|
+
taskId: taskId,
|
|
135
|
+
conversationId: conversationId,
|
|
130
136
|
reusedConversation: Schema.Boolean,
|
|
131
|
-
sentMessageId: Schema.optional(
|
|
137
|
+
sentMessageId: Schema.optional(messageId),
|
|
132
138
|
});
|
|
139
|
+
/** Reports local daemon input failures. */
|
|
133
140
|
export class LocalDaemonInputError extends Schema.TaggedError()("LocalDaemonInputError", { message: Schema.String }) {
|
|
134
141
|
}
|
|
142
|
+
/** Reports start task usage failures. */
|
|
135
143
|
export class StartTaskUsageError extends Schema.TaggedError()("StartTaskUsageError", { message: Schema.String }) {
|
|
136
144
|
}
|
|
145
|
+
/** Implements start task partial failure. */
|
|
137
146
|
export class StartTaskPartialFailure extends Schema.TaggedError()("StartTaskPartialFailure", {
|
|
138
|
-
taskId:
|
|
139
|
-
conversationId:
|
|
147
|
+
taskId: taskId,
|
|
148
|
+
conversationId: conversationId,
|
|
140
149
|
reusedConversation: Schema.Boolean,
|
|
141
150
|
message: Schema.String,
|
|
142
151
|
}) {
|
|
143
152
|
}
|
|
153
|
+
/** Reports service input failures. */
|
|
144
154
|
export class ServiceInputError extends Schema.TaggedError()("ServiceInputError", { message: Schema.String }) {
|
|
145
155
|
}
|
|
146
|
-
const
|
|
147
|
-
|
|
156
|
+
const localDaemonErrorSchema = Schema.Union(LocalDaemonInputError, StartTaskUsageError, StartTaskPartialFailure, ServiceInputError, NotConnectedError, RpcTimeoutError, ...agentCallableMethods.map((definition) => definition.errorSchema));
|
|
157
|
+
/** Validates and decodes is local daemon error values. */
|
|
158
|
+
export const isLocalDaemonError = Schema.is(localDaemonErrorSchema);
|
|
148
159
|
const errorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
160
|
+
/**
|
|
161
|
+
* Provides the to local daemon error runtime value.
|
|
162
|
+
* @param error Error to inspect.
|
|
163
|
+
* @returns The to local daemon error result.
|
|
164
|
+
*/
|
|
149
165
|
export const toLocalDaemonError = (error) => isLocalDaemonError(error)
|
|
150
166
|
? error
|
|
151
167
|
: new LocalDaemonInputError({ message: errorMessage(error) });
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
/** Provides the messages list command rpc runtime value. */
|
|
169
|
+
export const messagesListCommandRpc = Rpc.make(localDaemonCommands.messagesList, {
|
|
170
|
+
payload: messagesListCommandPayload,
|
|
171
|
+
success: messagesList.resultSchema,
|
|
172
|
+
error: localDaemonErrorSchema,
|
|
173
|
+
});
|
|
174
|
+
/** Provides the send command rpc runtime value. */
|
|
175
|
+
export const sendCommandRpc = Rpc.make(localDaemonCommands.send, {
|
|
176
|
+
payload: sendCommandPayload,
|
|
177
|
+
success: sendCommandResult,
|
|
178
|
+
error: localDaemonErrorSchema,
|
|
179
|
+
});
|
|
180
|
+
/** Provides the start task command rpc runtime value. */
|
|
181
|
+
export const startTaskCommandRpc = Rpc.make(localDaemonCommands.startTask, {
|
|
182
|
+
payload: startTaskCommandPayload,
|
|
183
|
+
success: startTaskCommandResult,
|
|
184
|
+
error: localDaemonErrorSchema,
|
|
185
|
+
});
|
|
186
|
+
/** Implements local daemon rpcs. */
|
|
187
|
+
export class LocalDaemonRpcs extends RpcGroup.make(Rpc.make(localDaemonCommands.status, {
|
|
188
|
+
payload: emptyPayload,
|
|
189
|
+
success: localDaemonStatusResultSchema,
|
|
190
|
+
error: localDaemonErrorSchema,
|
|
191
|
+
}), Rpc.make(localDaemonCommands.history, {
|
|
172
192
|
payload: historyRequestSchema(),
|
|
173
193
|
success: historyResponseSchema(),
|
|
174
|
-
error:
|
|
175
|
-
}), Rpc.make(
|
|
176
|
-
payload:
|
|
177
|
-
success:
|
|
178
|
-
error:
|
|
179
|
-
}), Rpc.make(
|
|
180
|
-
payload:
|
|
181
|
-
success:
|
|
182
|
-
error:
|
|
183
|
-
}), Rpc.make(
|
|
184
|
-
payload:
|
|
185
|
-
success:
|
|
186
|
-
error:
|
|
187
|
-
}), Rpc.make(
|
|
188
|
-
payload:
|
|
189
|
-
success:
|
|
190
|
-
error:
|
|
191
|
-
}), Rpc.make(
|
|
192
|
-
payload:
|
|
193
|
-
success:
|
|
194
|
-
error:
|
|
195
|
-
}),
|
|
194
|
+
error: localDaemonErrorSchema,
|
|
195
|
+
}), Rpc.make(localDaemonCommands.agentsList, {
|
|
196
|
+
payload: agentsListCommandPayload,
|
|
197
|
+
success: agentsList.resultSchema,
|
|
198
|
+
error: localDaemonErrorSchema,
|
|
199
|
+
}), Rpc.make(localDaemonCommands.agentsSearch, {
|
|
200
|
+
payload: agentsSearchCommandPayload,
|
|
201
|
+
success: agentsList.resultSchema,
|
|
202
|
+
error: localDaemonErrorSchema,
|
|
203
|
+
}), Rpc.make(localDaemonCommands.contactsList, {
|
|
204
|
+
payload: contactsListCommandPayload,
|
|
205
|
+
success: contactsList.resultSchema,
|
|
206
|
+
error: localDaemonErrorSchema,
|
|
207
|
+
}), Rpc.make(localDaemonCommands.contactsAdd, {
|
|
208
|
+
payload: contactsAddCommandPayload,
|
|
209
|
+
success: contactsAdd.resultSchema,
|
|
210
|
+
error: localDaemonErrorSchema,
|
|
211
|
+
}), Rpc.make(localDaemonCommands.contactsAccept, {
|
|
212
|
+
payload: contactsAcceptCommandPayload,
|
|
213
|
+
success: contactsAccept.resultSchema,
|
|
214
|
+
error: localDaemonErrorSchema,
|
|
215
|
+
}), messagesListCommandRpc, sendCommandRpc, startTaskCommandRpc) {
|
|
196
216
|
}
|
|
197
217
|
//# sourceMappingURL=local-daemon-rpc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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AAsB;CAC9B,CAAC,EACF,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE;IACvC,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,UAAU,CAAC,YAAY;IAChC,KAAK,EAAE,sBAAsB;CAC9B,CAAC,EACF,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE;IACzC,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,UAAU,CAAC,YAAY;IAChC,KAAK,EAAE,sBAAsB;CAC9B,CAAC,EACF,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE;IACzC,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,YAAY,CAAC,YAAY;IAClC,KAAK,EAAE,sBAAsB;CAC9B,CAAC,EACF,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE;IACxC,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,WAAW,CAAC,YAAY;IACjC,KAAK,EAAE,sBAAsB;CAC9B,CAAC,EACF,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE;IAC3C,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,cAAc,CAAC,YAAY;IACpC,KAAK,EAAE,sBAAsB;CAC9B,CAAC,EACF,sBAAsB,EACtB,cAAc,EACd,mBAAmB,CACpB;CAAG"}
|
package/dist/local-history.d.ts
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import { AgentId } from "@moltzap/protocol/identity";
|
|
2
|
-
import { ConversationId, MessageId } from "@moltzap/protocol/conversation";
|
|
3
|
-
import { TaskId } from "@moltzap/protocol/task";
|
|
4
1
|
import type { Message } from "@moltzap/protocol/message";
|
|
5
2
|
import { HashMap, Schema } from "effect";
|
|
6
|
-
declare const
|
|
7
|
-
taskId: Schema.Schema<TaskId, string, never>;
|
|
8
|
-
conversationId: Schema.Schema<ConversationId, string, never>;
|
|
3
|
+
declare const historyRequestSchemaValue: Schema.Struct<{
|
|
4
|
+
taskId: Schema.Schema<import("@moltzap/protocol/task").TaskId, string, never>;
|
|
5
|
+
conversationId: Schema.Schema<import("@moltzap/protocol/conversation").ConversationId, string, never>;
|
|
9
6
|
limit: Schema.optionalWith<Schema.filter<Schema.filter<typeof Schema.Number>>, {
|
|
10
7
|
default: () => number;
|
|
11
8
|
}>;
|
|
12
9
|
sessionKey: Schema.optional<typeof Schema.String>;
|
|
13
10
|
}>;
|
|
14
|
-
declare const
|
|
15
|
-
id: Schema.Schema<MessageId, string, never>;
|
|
16
|
-
senderId: Schema.Schema<AgentId, string, never>;
|
|
11
|
+
declare const historyMessageSummarySchema: Schema.Struct<{
|
|
12
|
+
id: Schema.Schema<import("@moltzap/protocol/conversation").MessageId, string, never>;
|
|
13
|
+
senderId: Schema.Schema<import("@moltzap/protocol/identity").AgentId, string, never>;
|
|
17
14
|
senderName: typeof Schema.String;
|
|
18
15
|
isOwn: typeof Schema.Boolean;
|
|
19
16
|
text: typeof Schema.String;
|
|
20
17
|
createdAt: typeof Schema.String;
|
|
21
18
|
isNew: typeof Schema.Boolean;
|
|
22
19
|
}>;
|
|
23
|
-
declare const
|
|
20
|
+
declare const historyResponseSchemaValue: Schema.Struct<{
|
|
24
21
|
messages: Schema.Array$<Schema.Struct<{
|
|
25
|
-
id: Schema.Schema<MessageId, string, never>;
|
|
26
|
-
senderId: Schema.Schema<AgentId, string, never>;
|
|
22
|
+
id: Schema.Schema<import("@moltzap/protocol/conversation").MessageId, string, never>;
|
|
23
|
+
senderId: Schema.Schema<import("@moltzap/protocol/identity").AgentId, string, never>;
|
|
27
24
|
senderName: typeof Schema.String;
|
|
28
25
|
isOwn: typeof Schema.Boolean;
|
|
29
26
|
text: typeof Schema.String;
|
|
@@ -31,9 +28,9 @@ declare const HistoryResponseSchema: Schema.Struct<{
|
|
|
31
28
|
isNew: typeof Schema.Boolean;
|
|
32
29
|
}>>;
|
|
33
30
|
conversationMeta: Schema.optional<Schema.Struct<{
|
|
34
|
-
id: Schema.Schema<ConversationId, string, never>;
|
|
31
|
+
id: Schema.Schema<import("@moltzap/protocol/conversation").ConversationId, string, never>;
|
|
35
32
|
name: Schema.optional<typeof Schema.String>;
|
|
36
|
-
createdBy: Schema.Schema<AgentId, string, never>;
|
|
33
|
+
createdBy: Schema.Schema<import("@moltzap/protocol/identity").AgentId, string, never>;
|
|
37
34
|
metadata: Schema.optional<Schema.Struct<{
|
|
38
35
|
tags: Schema.optional<Schema.Array$<Schema.Record$<typeof Schema.String, typeof Schema.String>>>;
|
|
39
36
|
}>>;
|
|
@@ -44,18 +41,41 @@ declare const HistoryResponseSchema: Schema.Struct<{
|
|
|
44
41
|
}>>;
|
|
45
42
|
newCount: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
46
43
|
}>;
|
|
47
|
-
|
|
48
|
-
export type
|
|
49
|
-
|
|
50
|
-
export
|
|
51
|
-
|
|
44
|
+
/** Represents history request values. */
|
|
45
|
+
export type HistoryRequest = Schema.Schema.Type<typeof historyRequestSchemaValue>;
|
|
46
|
+
/** Represents history message summary values. */
|
|
47
|
+
export type HistoryMessageSummary = Schema.Schema.Type<typeof historyMessageSummarySchema>;
|
|
48
|
+
/** Represents history response values. */
|
|
49
|
+
export type HistoryResponse = Schema.Schema.Type<typeof historyResponseSchemaValue>;
|
|
50
|
+
/**
|
|
51
|
+
* Executes the history request schema operation.
|
|
52
|
+
* @returns The history request schema result.
|
|
53
|
+
*/
|
|
54
|
+
export declare function historyRequestSchema(): typeof historyRequestSchemaValue;
|
|
55
|
+
/**
|
|
56
|
+
* Executes the history response schema operation.
|
|
57
|
+
* @returns The history response schema result.
|
|
58
|
+
*/
|
|
59
|
+
export declare function historyResponseSchema(): typeof historyResponseSchemaValue;
|
|
52
60
|
interface FormatHistoryMessageOptions {
|
|
53
61
|
readonly agentNames: HashMap.HashMap<string, string>;
|
|
54
|
-
readonly ownAgentId
|
|
62
|
+
readonly ownAgentId?: string;
|
|
55
63
|
readonly lastReadIds: ReadonlySet<string>;
|
|
56
64
|
readonly hasSessionKey: boolean;
|
|
57
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Formats history message.
|
|
68
|
+
* @param message Value supplied to the operation.
|
|
69
|
+
* @param options Options that control the operation.
|
|
70
|
+
* @returns The format history message result.
|
|
71
|
+
*/
|
|
58
72
|
export declare function formatHistoryMessage(message: Message, options: FormatHistoryMessageOptions): HistoryMessageSummary;
|
|
73
|
+
/**
|
|
74
|
+
* Executes the last read ids for session operation.
|
|
75
|
+
* @param lastReadMap Value supplied to the operation.
|
|
76
|
+
* @param request Value supplied to the operation.
|
|
77
|
+
* @returns The last read ids for session result.
|
|
78
|
+
*/
|
|
59
79
|
export declare function lastReadIdsForSession(lastReadMap: HashMap.HashMap<string, HashMap.HashMap<string, ReadonlySet<string>>>, request: HistoryRequest): ReadonlySet<string>;
|
|
60
80
|
export {};
|
|
61
81
|
//# sourceMappingURL=local-history.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-history.d.ts","sourceRoot":"","sources":["../src/local-history.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-history.d.ts","sourceRoot":"","sources":["../src/local-history.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAWjD,QAAA,MAAM,yBAAyB;;;;;;;EAO7B,CAAC;AAEH,QAAA,MAAM,2BAA2B;;;;;;;;EAQ/B,CAAC;AAwBH,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;EAI9B,CAAC;AAEH,yCAAyC;AACzC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAC7C,OAAO,yBAAyB,CACjC,CAAC;AACF,iDAAiD;AACjD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CACpD,OAAO,2BAA2B,CACnC,CAAC;AACF,0CAA0C;AAC1C,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAC9C,OAAO,0BAA0B,CAClC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,yBAAyB,CAEvE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,0BAA0B,CAEzE;AAED,UAAU,2BAA2B;IACnC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,2BAA2B,GACnC,qBAAqB,CAevB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,OAAO,CAAC,OAAO,CAC1B,MAAM,EACN,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAC7C,EACD,OAAO,EAAE,cAAc,GACtB,WAAW,CAAC,MAAM,CAAC,CAWrB"}
|
package/dist/local-history.js
CHANGED
|
@@ -1,55 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { agentId } from "@moltzap/protocol/identity";
|
|
2
|
+
import { conversationId, messageId } from "@moltzap/protocol/conversation";
|
|
3
|
+
import { taskId } from "@moltzap/protocol/task";
|
|
4
4
|
import { HashMap, Option, Schema } from "effect";
|
|
5
5
|
import { renderPart } from "./message-rendering.js";
|
|
6
6
|
const DEFAULT_HISTORY_LIMIT = 10;
|
|
7
7
|
const MAX_HISTORY_LIMIT = 100;
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
taskId:
|
|
11
|
-
conversationId:
|
|
12
|
-
limit: Schema.optionalWith(
|
|
8
|
+
const historyLimit = Schema.Number.pipe(Schema.int(), Schema.between(1, MAX_HISTORY_LIMIT));
|
|
9
|
+
const historyRequestSchemaValue = Schema.Struct({
|
|
10
|
+
taskId: taskId,
|
|
11
|
+
conversationId: conversationId,
|
|
12
|
+
limit: Schema.optionalWith(historyLimit, {
|
|
13
13
|
default: () => DEFAULT_HISTORY_LIMIT,
|
|
14
14
|
}),
|
|
15
15
|
sessionKey: Schema.optional(Schema.String),
|
|
16
16
|
});
|
|
17
|
-
const
|
|
18
|
-
id:
|
|
19
|
-
senderId:
|
|
17
|
+
const historyMessageSummarySchema = Schema.Struct({
|
|
18
|
+
id: messageId,
|
|
19
|
+
senderId: agentId,
|
|
20
20
|
senderName: Schema.String,
|
|
21
21
|
isOwn: Schema.Boolean,
|
|
22
22
|
text: Schema.String,
|
|
23
23
|
createdAt: Schema.String,
|
|
24
24
|
isNew: Schema.Boolean,
|
|
25
25
|
});
|
|
26
|
-
const
|
|
26
|
+
const conversationMetadataSchema = Schema.Struct({
|
|
27
27
|
tags: Schema.optional(Schema.Array(Schema.Record({
|
|
28
28
|
key: Schema.String,
|
|
29
29
|
value: Schema.String,
|
|
30
30
|
}))),
|
|
31
31
|
});
|
|
32
|
-
const
|
|
33
|
-
id:
|
|
32
|
+
const historyConversationMetaSchema = Schema.Struct({
|
|
33
|
+
id: conversationId,
|
|
34
34
|
name: Schema.optional(Schema.String),
|
|
35
|
-
createdBy:
|
|
36
|
-
metadata: Schema.optional(
|
|
35
|
+
createdBy: agentId,
|
|
36
|
+
metadata: Schema.optional(conversationMetadataSchema),
|
|
37
37
|
lastMessageTimestamp: Schema.optional(Schema.String),
|
|
38
38
|
createdAt: Schema.String,
|
|
39
39
|
updatedAt: Schema.String,
|
|
40
40
|
archivedAt: Schema.optional(Schema.String),
|
|
41
41
|
});
|
|
42
|
-
const
|
|
43
|
-
messages: Schema.Array(
|
|
44
|
-
conversationMeta: Schema.optional(
|
|
42
|
+
const historyResponseSchemaValue = Schema.Struct({
|
|
43
|
+
messages: Schema.Array(historyMessageSummarySchema),
|
|
44
|
+
conversationMeta: Schema.optional(historyConversationMetaSchema),
|
|
45
45
|
newCount: Schema.Number.pipe(Schema.int(), Schema.nonNegative()),
|
|
46
46
|
});
|
|
47
|
+
/**
|
|
48
|
+
* Executes the history request schema operation.
|
|
49
|
+
* @returns The history request schema result.
|
|
50
|
+
*/
|
|
47
51
|
export function historyRequestSchema() {
|
|
48
|
-
return
|
|
52
|
+
return historyRequestSchemaValue;
|
|
49
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Executes the history response schema operation.
|
|
56
|
+
* @returns The history response schema result.
|
|
57
|
+
*/
|
|
50
58
|
export function historyResponseSchema() {
|
|
51
|
-
return
|
|
59
|
+
return historyResponseSchemaValue;
|
|
52
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Formats history message.
|
|
63
|
+
* @param message Value supplied to the operation.
|
|
64
|
+
* @param options Options that control the operation.
|
|
65
|
+
* @returns The format history message result.
|
|
66
|
+
*/
|
|
53
67
|
export function formatHistoryMessage(message, options) {
|
|
54
68
|
const senderName = Option.getOrElse(HashMap.get(options.agentNames, message.senderId), () => message.senderId);
|
|
55
69
|
const isOwn = message.senderId === options.ownAgentId;
|
|
@@ -63,9 +77,17 @@ export function formatHistoryMessage(message, options) {
|
|
|
63
77
|
isNew: options.hasSessionKey ? !options.lastReadIds.has(message.id) : false,
|
|
64
78
|
};
|
|
65
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Executes the last read ids for session operation.
|
|
82
|
+
* @param lastReadMap Value supplied to the operation.
|
|
83
|
+
* @param request Value supplied to the operation.
|
|
84
|
+
* @returns The last read ids for session result.
|
|
85
|
+
*/
|
|
66
86
|
export function lastReadIdsForSession(lastReadMap, request) {
|
|
67
|
-
if (request.sessionKey === undefined)
|
|
87
|
+
if (request.sessionKey === undefined) {
|
|
68
88
|
return new Set();
|
|
69
|
-
|
|
89
|
+
}
|
|
90
|
+
return Option.getOrElse(Option.flatMap(HashMap.get(lastReadMap, request.sessionKey), (perConv) => HashMap.get(perConv, request.conversationId)), () =>
|
|
91
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ new Set());
|
|
70
92
|
}
|
|
71
93
|
//# sourceMappingURL=local-history.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-history.js","sourceRoot":"","sources":["../src/local-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CACrC,MAAM,CAAC,GAAG,EAAE,EACZ,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,iBAAiB,CAAC,CACrC,CAAC;AAEF,MAAM,
|
|
1
|
+
{"version":3,"file":"local-history.js","sourceRoot":"","sources":["../src/local-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,UA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,KAAK,CAAC,CAAC,CAAC,UAAU;QACtC,KAAK;QACL,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC7C,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK;KAC5E,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,WAGC,EACD,OAAuB;IAEvB,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACrC,OAAO,IAAI,GAAG,EAAU,CAAC;IAC3B,CAAC;IACD,OAAO,MAAM,CAAC,SAAS,CACrB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CACvE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,CAC7C,EACD,GAAG,EAAE;IACH,6EAA6E,CAAC,IAAI,GAAG,EAAiC,CACzH,CAAC;AACJ,CAAC"}
|
package/dist/local-paths.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the get molt zap config dir runtime value.
|
|
3
|
+
* @returns The get molt zap config dir result.
|
|
4
|
+
*/
|
|
1
5
|
export declare const getMoltZapConfigDir: () => string;
|
|
6
|
+
/**
|
|
7
|
+
* Provides the get molt zap config path runtime value.
|
|
8
|
+
* @returns The get molt zap config path result.
|
|
9
|
+
*/
|
|
2
10
|
export declare const getMoltZapConfigPath: () => string;
|
|
11
|
+
/**
|
|
12
|
+
* Provides the get molt zap service socket path runtime value.
|
|
13
|
+
* @returns The get molt zap service socket path result.
|
|
14
|
+
*/
|
|
3
15
|
export declare const getMoltZapServiceSocketPath: () => string;
|
|
16
|
+
/**
|
|
17
|
+
* Provides the get molt zap agent service socket path runtime value.
|
|
18
|
+
* @param agentId Identifier of the agent targeted by the operation.
|
|
19
|
+
* @returns The get molt zap agent service socket path result.
|
|
20
|
+
*/
|
|
4
21
|
export declare const getMoltZapAgentServiceSocketPath: (agentId: string) => string;
|
|
5
22
|
//# sourceMappingURL=local-paths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-paths.d.ts","sourceRoot":"","sources":["../src/local-paths.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,mBAAmB,QAAO,MACK,CAAC;AAE7C,eAAO,MAAM,oBAAoB,QAAO,MACgC,CAAC;AAEzE,eAAO,MAAM,2BAA2B,QAAO,MAG5C,CAAC;AAEJ,eAAO,MAAM,gCAAgC,GAAI,SAAS,MAAM,KAAG,MAGhE,CAAC"}
|
|
1
|
+
{"version":3,"file":"local-paths.d.ts","sourceRoot":"","sources":["../src/local-paths.ts"],"names":[],"mappings":"AA8BA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAO,MACK,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,MACgC,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,2BAA2B,QAAO,MAG5C,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,MAAM,KAAG,MAGhE,CAAC"}
|