@animalabs/agent-framework 0.22.3 → 0.23.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/README.md +105 -3
- package/dist/src/agent.d.ts +36 -10
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +76 -32
- package/dist/src/agent.js.map +1 -1
- package/dist/src/code-execution/index.d.ts +1 -1
- package/dist/src/code-execution/index.d.ts.map +1 -1
- package/dist/src/code-execution/index.js.map +1 -1
- package/dist/src/code-execution/py-runner.d.ts +34 -2
- package/dist/src/code-execution/py-runner.d.ts.map +1 -1
- package/dist/src/code-execution/py-runner.js +72 -16
- package/dist/src/code-execution/py-runner.js.map +1 -1
- package/dist/src/code-execution/runtime-py.d.ts +3 -2
- package/dist/src/code-execution/runtime-py.d.ts.map +1 -1
- package/dist/src/code-execution/runtime-py.js +47 -7
- package/dist/src/code-execution/runtime-py.js.map +1 -1
- package/dist/src/code-execution/tool-definition.d.ts +12 -7
- package/dist/src/code-execution/tool-definition.d.ts.map +1 -1
- package/dist/src/code-execution/tool-definition.js +59 -11
- package/dist/src/code-execution/tool-definition.js.map +1 -1
- package/dist/src/config-checks.d.ts +2 -2
- package/dist/src/config-checks.d.ts.map +1 -1
- package/dist/src/config-checks.js +6 -2
- package/dist/src/config-checks.js.map +1 -1
- package/dist/src/framework.d.ts +744 -120
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +3546 -906
- package/dist/src/framework.js.map +1 -1
- package/dist/src/gate/event-gate.d.ts.map +1 -1
- package/dist/src/gate/event-gate.js +13 -6
- package/dist/src/gate/event-gate.js.map +1 -1
- package/dist/src/held-writes.d.ts +16 -0
- package/dist/src/held-writes.d.ts.map +1 -0
- package/dist/src/held-writes.js +56 -0
- package/dist/src/held-writes.js.map +1 -0
- package/dist/src/index.d.ts +7 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcpl/capability-grant.d.ts +4 -0
- package/dist/src/mcpl/capability-grant.d.ts.map +1 -1
- package/dist/src/mcpl/capability-grant.js +1 -1
- package/dist/src/mcpl/capability-grant.js.map +1 -1
- package/dist/src/mcpl/channel-registry.d.ts +95 -18
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +578 -150
- package/dist/src/mcpl/channel-registry.js.map +1 -1
- package/dist/src/mcpl/convert-block.d.ts +2 -2
- package/dist/src/mcpl/convert-block.d.ts.map +1 -1
- package/dist/src/mcpl/convert-block.js +6 -7
- package/dist/src/mcpl/convert-block.js.map +1 -1
- package/dist/src/mcpl/index.d.ts +5 -1
- package/dist/src/mcpl/index.d.ts.map +1 -1
- package/dist/src/mcpl/index.js +3 -1
- package/dist/src/mcpl/index.js.map +1 -1
- package/dist/src/mcpl/inference-router.d.ts +4 -2
- package/dist/src/mcpl/inference-router.d.ts.map +1 -1
- package/dist/src/mcpl/inference-router.js +6 -7
- package/dist/src/mcpl/inference-router.js.map +1 -1
- package/dist/src/mcpl/log-value.d.ts +7 -0
- package/dist/src/mcpl/log-value.d.ts.map +1 -1
- package/dist/src/mcpl/log-value.js +9 -0
- package/dist/src/mcpl/log-value.js.map +1 -1
- package/dist/src/mcpl/modern-connection.d.ts +227 -0
- package/dist/src/mcpl/modern-connection.d.ts.map +1 -0
- package/dist/src/mcpl/modern-connection.js +1088 -0
- package/dist/src/mcpl/modern-connection.js.map +1 -0
- package/dist/src/mcpl/prefix-rule.d.ts +18 -0
- package/dist/src/mcpl/prefix-rule.d.ts.map +1 -0
- package/dist/src/mcpl/prefix-rule.js +25 -0
- package/dist/src/mcpl/prefix-rule.js.map +1 -0
- package/dist/src/mcpl/protocol-family.d.ts +179 -0
- package/dist/src/mcpl/protocol-family.d.ts.map +1 -0
- package/dist/src/mcpl/protocol-family.js +697 -0
- package/dist/src/mcpl/protocol-family.js.map +1 -0
- package/dist/src/mcpl/push-coalescer.d.ts +38 -19
- package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
- package/dist/src/mcpl/push-coalescer.js +52 -23
- package/dist/src/mcpl/push-coalescer.js.map +1 -1
- package/dist/src/mcpl/reference-fetcher.d.ts +66 -15
- package/dist/src/mcpl/reference-fetcher.d.ts.map +1 -1
- package/dist/src/mcpl/reference-fetcher.js +243 -76
- package/dist/src/mcpl/reference-fetcher.js.map +1 -1
- package/dist/src/mcpl/references.d.ts +63 -18
- package/dist/src/mcpl/references.d.ts.map +1 -1
- package/dist/src/mcpl/references.js +117 -32
- package/dist/src/mcpl/references.js.map +1 -1
- package/dist/src/mcpl/server-connection.d.ts +326 -30
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +995 -212
- package/dist/src/mcpl/server-connection.js.map +1 -1
- package/dist/src/mcpl/server-registry.d.ts +25 -5
- package/dist/src/mcpl/server-registry.d.ts.map +1 -1
- package/dist/src/mcpl/server-registry.js +51 -12
- package/dist/src/mcpl/server-registry.js.map +1 -1
- package/dist/src/mcpl/tool-result-normalize.d.ts +54 -0
- package/dist/src/mcpl/tool-result-normalize.d.ts.map +1 -0
- package/dist/src/mcpl/tool-result-normalize.js +232 -0
- package/dist/src/mcpl/tool-result-normalize.js.map +1 -0
- package/dist/src/mcpl/transport.d.ts +56 -13
- package/dist/src/mcpl/transport.d.ts.map +1 -1
- package/dist/src/mcpl/transport.js +206 -70
- package/dist/src/mcpl/transport.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +66 -20
- package/dist/src/mcpl/types.d.ts.map +1 -1
- package/dist/src/mcpl/types.js.map +1 -1
- package/dist/src/mcpl/visible-content.d.ts +2 -1
- package/dist/src/mcpl/visible-content.d.ts.map +1 -1
- package/dist/src/mcpl/visible-content.js +2 -1
- package/dist/src/mcpl/visible-content.js.map +1 -1
- package/dist/src/module-registry.d.ts +16 -6
- package/dist/src/module-registry.d.ts.map +1 -1
- package/dist/src/module-registry.js +65 -6
- package/dist/src/module-registry.js.map +1 -1
- package/dist/src/modules/api/index.d.ts +1 -1
- package/dist/src/modules/api/index.d.ts.map +1 -1
- package/dist/src/modules/api/index.js +3 -2
- package/dist/src/modules/api/index.js.map +1 -1
- package/dist/src/modules/discord/discord-js-client.d.ts +42 -2
- package/dist/src/modules/discord/discord-js-client.d.ts.map +1 -1
- package/dist/src/modules/discord/discord-js-client.js +268 -65
- package/dist/src/modules/discord/discord-js-client.js.map +1 -1
- package/dist/src/modules/discord/index.d.ts +27 -5
- package/dist/src/modules/discord/index.d.ts.map +1 -1
- package/dist/src/modules/discord/index.js +366 -76
- package/dist/src/modules/discord/index.js.map +1 -1
- package/dist/src/modules/discord/refusal.d.ts +14 -0
- package/dist/src/modules/discord/refusal.d.ts.map +1 -0
- package/dist/src/modules/discord/refusal.js +14 -0
- package/dist/src/modules/discord/refusal.js.map +1 -0
- package/dist/src/modules/discord/types.d.ts +17 -7
- package/dist/src/modules/discord/types.d.ts.map +1 -1
- package/dist/src/modules/health/index.d.ts.map +1 -1
- package/dist/src/modules/health/index.js +6 -2
- package/dist/src/modules/health/index.js.map +1 -1
- package/dist/src/modules/index.d.ts +1 -1
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +1 -1
- package/dist/src/modules/index.js.map +1 -1
- package/dist/src/modules/workspace/disk-agreement.d.ts +25 -2
- package/dist/src/modules/workspace/disk-agreement.d.ts.map +1 -1
- package/dist/src/modules/workspace/disk-agreement.js +45 -5
- package/dist/src/modules/workspace/disk-agreement.js.map +1 -1
- package/dist/src/modules/workspace/effects.d.ts +2 -1
- package/dist/src/modules/workspace/effects.d.ts.map +1 -1
- package/dist/src/modules/workspace/effects.js +19 -9
- package/dist/src/modules/workspace/effects.js.map +1 -1
- package/dist/src/modules/workspace/index.d.ts +214 -42
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +667 -113
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/modules/workspace/observe.d.ts +240 -8
- package/dist/src/modules/workspace/observe.d.ts.map +1 -1
- package/dist/src/modules/workspace/observe.js +554 -24
- package/dist/src/modules/workspace/observe.js.map +1 -1
- package/dist/src/modules/workspace/types.d.ts +10 -1
- package/dist/src/modules/workspace/types.d.ts.map +1 -1
- package/dist/src/modules/workspace/types.js.map +1 -1
- package/dist/src/modules/workspace/watcher.d.ts +42 -0
- package/dist/src/modules/workspace/watcher.d.ts.map +1 -1
- package/dist/src/modules/workspace/watcher.js +130 -25
- package/dist/src/modules/workspace/watcher.js.map +1 -1
- package/dist/src/silent-heartbeat.d.ts +112 -39
- package/dist/src/silent-heartbeat.d.ts.map +1 -1
- package/dist/src/silent-heartbeat.js +100 -29
- package/dist/src/silent-heartbeat.js.map +1 -1
- package/dist/src/tool-args.d.ts +40 -0
- package/dist/src/tool-args.d.ts.map +1 -0
- package/dist/src/tool-args.js +207 -0
- package/dist/src/tool-args.js.map +1 -0
- package/dist/src/tool-presentation.d.ts.map +1 -1
- package/dist/src/tool-presentation.js +9 -2
- package/dist/src/tool-presentation.js.map +1 -1
- package/dist/src/types/agent.d.ts +27 -17
- package/dist/src/types/agent.d.ts.map +1 -1
- package/dist/src/types/events.d.ts +8 -0
- package/dist/src/types/events.d.ts.map +1 -1
- package/dist/src/types/framework.d.ts +17 -2
- package/dist/src/types/framework.d.ts.map +1 -1
- package/dist/src/types/module.d.ts +54 -10
- package/dist/src/types/module.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +2 -2
- package/dist/src/types/trace.d.ts.map +1 -1
- package/package.json +3 -1
- package/src/agent.ts +99 -36
- package/src/code-execution/index.ts +1 -0
- package/src/code-execution/py-runner.ts +104 -17
- package/src/code-execution/runtime-py.ts +47 -7
- package/src/code-execution/tool-definition.ts +65 -11
- package/src/config-checks.ts +4 -2
- package/src/framework.ts +3633 -956
- package/src/gate/event-gate.ts +14 -6
- package/src/held-writes.ts +59 -0
- package/src/index.ts +19 -4
- package/src/mcpl/capability-grant.ts +1 -1
- package/src/mcpl/channel-registry.ts +613 -160
- package/src/mcpl/convert-block.ts +15 -7
- package/src/mcpl/index.ts +14 -1
- package/src/mcpl/inference-router.ts +8 -7
- package/src/mcpl/log-value.ts +10 -0
- package/src/mcpl/modern-connection.ts +1182 -0
- package/src/mcpl/prefix-rule.ts +32 -0
- package/src/mcpl/protocol-family.ts +691 -0
- package/src/mcpl/push-coalescer.ts +67 -29
- package/src/mcpl/reference-fetcher.ts +288 -82
- package/src/mcpl/references.ts +123 -33
- package/src/mcpl/server-connection.ts +1050 -221
- package/src/mcpl/server-registry.ts +50 -12
- package/src/mcpl/tool-result-normalize.ts +294 -0
- package/src/mcpl/transport.ts +204 -62
- package/src/mcpl/types.ts +67 -20
- package/src/mcpl/visible-content.ts +2 -1
- package/src/module-registry.ts +68 -13
- package/src/modules/api/index.ts +3 -2
- package/src/modules/discord/discord-js-client.ts +288 -72
- package/src/modules/discord/index.ts +380 -77
- package/src/modules/discord/refusal.ts +13 -0
- package/src/modules/discord/types.ts +17 -9
- package/src/modules/health/index.ts +6 -2
- package/src/modules/index.ts +1 -1
- package/src/modules/workspace/disk-agreement.ts +46 -5
- package/src/modules/workspace/effects.ts +18 -7
- package/src/modules/workspace/index.ts +722 -124
- package/src/modules/workspace/observe.ts +591 -22
- package/src/modules/workspace/types.ts +10 -1
- package/src/modules/workspace/watcher.ts +126 -25
- package/src/silent-heartbeat.ts +184 -59
- package/src/tool-args.ts +213 -0
- package/src/tool-presentation.ts +9 -2
- package/src/types/agent.ts +27 -17
- package/src/types/events.ts +8 -0
- package/src/types/framework.ts +17 -2
- package/src/types/module.ts +55 -10
- package/src/types/trace.ts +2 -2
|
@@ -5,7 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { ContentBlock } from '@animalabs/membrane';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
AUDIO_NO_DATA_TEXT,
|
|
10
|
+
AUDIO_NO_MEDIA_TYPE_TEXT,
|
|
11
|
+
IMAGE_NO_DATA_TEXT,
|
|
12
|
+
IMAGE_NO_MEDIA_TYPE_TEXT,
|
|
13
|
+
INLINE_WITHHELD_TEXT,
|
|
14
|
+
isInlineContradiction,
|
|
15
|
+
referenceStubOrNull,
|
|
16
|
+
unknownBlockText,
|
|
17
|
+
} from './references.js';
|
|
9
18
|
import { NON_STRING_TEXT_PLACEHOLDER } from './visible-content.js';
|
|
10
19
|
import type { McplContentBlock } from './types.js';
|
|
11
20
|
|
|
@@ -17,8 +26,8 @@ import type { McplContentBlock } from './types.js';
|
|
|
17
26
|
* shows as NON_STRING_TEXT_PLACEHOLDER. `provenance` is what a reference stub
|
|
18
27
|
* says the reference came on, such as 'attachment on push event'. `serverId`
|
|
19
28
|
* is the server that sent the content: a reference is registered with it, as
|
|
20
|
-
* a tool result's references are, so fetch_reference can fetch it
|
|
21
|
-
* server.
|
|
29
|
+
* a tool result's references are, so fetch_reference can fetch it through that
|
|
30
|
+
* server's address, where it has one.
|
|
22
31
|
*/
|
|
23
32
|
export function convertBlock(block: McplContentBlock, provenance: string, serverId: string): ContentBlock {
|
|
24
33
|
switch (block.type) {
|
|
@@ -51,7 +60,7 @@ export function convertBlock(block: McplContentBlock, provenance: string, server
|
|
|
51
60
|
source: { type: 'url', url: block.uri },
|
|
52
61
|
} as ContentBlock;
|
|
53
62
|
}
|
|
54
|
-
return { type: 'text', text: isFilledString(block.data) ?
|
|
63
|
+
return { type: 'text', text: isFilledString(block.data) ? IMAGE_NO_MEDIA_TYPE_TEXT : IMAGE_NO_DATA_TEXT };
|
|
55
64
|
|
|
56
65
|
case 'audio':
|
|
57
66
|
if (isInlineContradiction(block)) {
|
|
@@ -70,7 +79,7 @@ export function convertBlock(block: McplContentBlock, provenance: string, server
|
|
|
70
79
|
source: { type: 'base64', data: block.data, mediaType: block.mimeType },
|
|
71
80
|
} as ContentBlock;
|
|
72
81
|
}
|
|
73
|
-
return { type: 'text', text: isFilledString(block.data) ?
|
|
82
|
+
return { type: 'text', text: isFilledString(block.data) ? AUDIO_NO_MEDIA_TYPE_TEXT : AUDIO_NO_DATA_TEXT };
|
|
74
83
|
|
|
75
84
|
case 'resource':
|
|
76
85
|
// RFC-005: reference blocks become bounded stubs — never raw URIs
|
|
@@ -82,8 +91,7 @@ export function convertBlock(block: McplContentBlock, provenance: string, server
|
|
|
82
91
|
// and propagated `undefined` into ContentBlock[]. Fail visibly. A type
|
|
83
92
|
// that isn't a string is no type, and is never converted to one: an
|
|
84
93
|
// object can throw when it is.
|
|
85
|
-
|
|
86
|
-
return { type: 'text', text: `[unrecognized content block: ${typeof type === 'string' ? type : 'untyped'}]` };
|
|
94
|
+
return { type: 'text', text: unknownBlockText(block) };
|
|
87
95
|
}
|
|
88
96
|
}
|
|
89
97
|
}
|
package/src/mcpl/index.ts
CHANGED
|
@@ -106,9 +106,22 @@ export {
|
|
|
106
106
|
} from './errors.js';
|
|
107
107
|
|
|
108
108
|
// Server connection and registry
|
|
109
|
-
export { McplServerConnection, McplRequestError } from './server-connection.js';
|
|
109
|
+
export { McplServerConnection, McplRequestError, McplProtocolVersionError, McplUnreapedLaunchError } from './server-connection.js';
|
|
110
110
|
export type { McplConnectionCloseInfo } from './server-connection.js';
|
|
111
111
|
export type { TransportCloseInfo } from './transport.js';
|
|
112
|
+
export { ModernMcpConnection } from './modern-connection.js';
|
|
113
|
+
export type { ModernToolCallResult } from './modern-connection.js';
|
|
114
|
+
export {
|
|
115
|
+
LEGACY_MCP_PROTOCOL_VERSION,
|
|
116
|
+
MODERN_MCP_PROTOCOL_VERSION,
|
|
117
|
+
MAX_TIMER_MS,
|
|
118
|
+
mcplPolicyGrants,
|
|
119
|
+
resolveServerBinding,
|
|
120
|
+
serverConfigProblems,
|
|
121
|
+
serverConfigWarnings,
|
|
122
|
+
checkServerConfig,
|
|
123
|
+
} from './protocol-family.js';
|
|
124
|
+
export type { McpProtocolFamily, McpTransportKind, ServerBinding } from './protocol-family.js';
|
|
112
125
|
export { McplServerRegistry, type McplCapabilityQuery } from './server-registry.js';
|
|
113
126
|
|
|
114
127
|
// Feature set management (permission layer)
|
|
@@ -37,6 +37,9 @@ interface Responder {
|
|
|
37
37
|
respondError(code: number, message: string, data?: unknown): void;
|
|
38
38
|
/** The JSON-RPC request ID, used for streaming chunk correlation. */
|
|
39
39
|
requestId?: string | number;
|
|
40
|
+
/** Sends a streamed chunk on the transport the request came on, as its
|
|
41
|
+
* answer is sent. */
|
|
42
|
+
sendChunk?(params: InferenceChunkParams): void;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
// ============================================================================
|
|
@@ -178,7 +181,6 @@ export class InferenceRouter {
|
|
|
178
181
|
private featureSetManager: FeatureSetManager;
|
|
179
182
|
private routingPolicy: InferenceRoutingPolicy | null;
|
|
180
183
|
private emitTraceFn: (event: { type: string; [key: string]: unknown }) => void;
|
|
181
|
-
private sendChunkFn?: (serverId: string, params: InferenceChunkParams) => void;
|
|
182
184
|
|
|
183
185
|
constructor(
|
|
184
186
|
membrane: Membrane,
|
|
@@ -186,14 +188,12 @@ export class InferenceRouter {
|
|
|
186
188
|
featureSetManager: FeatureSetManager,
|
|
187
189
|
routingPolicy: InferenceRoutingPolicy | null,
|
|
188
190
|
emitTraceFn: (event: { type: string; [key: string]: unknown }) => void,
|
|
189
|
-
sendChunkFn?: (serverId: string, params: InferenceChunkParams) => void,
|
|
190
191
|
) {
|
|
191
192
|
this.membrane = membrane;
|
|
192
193
|
this.hookOrchestrator = hookOrchestrator;
|
|
193
194
|
this.featureSetManager = featureSetManager;
|
|
194
195
|
this.routingPolicy = routingPolicy;
|
|
195
196
|
this.emitTraceFn = emitTraceFn;
|
|
196
|
-
this.sendChunkFn = sendChunkFn;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
/**
|
|
@@ -265,14 +265,15 @@ export class InferenceRouter {
|
|
|
265
265
|
|
|
266
266
|
// Streaming needs a way to send chunks and an id to tag them with;
|
|
267
267
|
// without either, the request is answered whole.
|
|
268
|
-
const
|
|
268
|
+
const sendChunk = params.stream ? responder.sendChunk?.bind(responder) : undefined;
|
|
269
|
+
const chunkRequestId = sendChunk ? responder.requestId : undefined;
|
|
269
270
|
const streamed = chunkRequestId != null;
|
|
270
271
|
|
|
271
272
|
try {
|
|
272
273
|
// 5. Run inference. Both modes end in membrane's response, and one
|
|
273
274
|
// builder makes the result from it.
|
|
274
275
|
const response = chunkRequestId != null
|
|
275
|
-
? await this.streamResponse(
|
|
276
|
+
? await this.streamResponse(request, chunkRequestId, sendChunk!)
|
|
276
277
|
: await this.membrane.complete(request);
|
|
277
278
|
|
|
278
279
|
// 6. Answer
|
|
@@ -375,9 +376,9 @@ export class InferenceRouter {
|
|
|
375
376
|
* so nothing keeps running once the request is answered.
|
|
376
377
|
*/
|
|
377
378
|
private async streamResponse(
|
|
378
|
-
serverId: string,
|
|
379
379
|
request: NormalizedRequest,
|
|
380
380
|
requestId: string | number,
|
|
381
|
+
sendChunk: (params: InferenceChunkParams) => void,
|
|
381
382
|
): Promise<NormalizedResponse> {
|
|
382
383
|
const stream = this.membrane.streamYielding(request);
|
|
383
384
|
let index = 0;
|
|
@@ -392,7 +393,7 @@ export class InferenceRouter {
|
|
|
392
393
|
// naming a tag the stream parser opens a block for, or a thinking
|
|
393
394
|
// block cut off before its close tag.
|
|
394
395
|
if (event.meta.visible) {
|
|
395
|
-
|
|
396
|
+
sendChunk({ requestId, index: index++, delta: event.content });
|
|
396
397
|
}
|
|
397
398
|
break;
|
|
398
399
|
case 'tool-calls':
|
package/src/mcpl/log-value.ts
CHANGED
|
@@ -45,6 +45,16 @@ export function logValue(value: unknown): string {
|
|
|
45
45
|
return printed(textOf(value), FIELD);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* `logValue` of a value a server chose whose text may hold a credential:
|
|
50
|
+
* its text, as logValue reads it (a JSON value as its JSON text), with
|
|
51
|
+
* `redact` applied, then printed as logValue prints a field. A value whose
|
|
52
|
+
* text holds nothing `redact` replaces prints exactly as logValue prints it.
|
|
53
|
+
*/
|
|
54
|
+
export function logValueRedacted(value: unknown, redact: (text: string) => string): string {
|
|
55
|
+
return printed(redact(textOf(value)), FIELD);
|
|
56
|
+
}
|
|
57
|
+
|
|
48
58
|
/**
|
|
49
59
|
* The host's own message, as the free text that ends a log line after its
|
|
50
60
|
* fields: `reason=coalesce-invalid field=payload.content: "content must be an
|