@mono-agent/agent-app 0.13.0 → 0.15.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 +164 -37
- package/dist/adapter-send-tools-main.js +0 -1
- package/dist/adapter-send-tools-main.js.map +1 -1
- package/dist/adapter-send-tools.d.ts +8 -5
- package/dist/adapter-send-tools.d.ts.map +1 -1
- package/dist/adapter-send-tools.js +133 -287
- package/dist/adapter-send-tools.js.map +1 -1
- package/dist/app-config.d.ts.map +1 -1
- package/dist/app-config.js +3 -0
- package/dist/app-config.js.map +1 -1
- package/dist/app-controller-channels.d.ts +41 -7
- package/dist/app-controller-channels.d.ts.map +1 -1
- package/dist/app-controller-channels.js +4 -4
- package/dist/app-controller-channels.js.map +1 -1
- package/dist/app-controller-continuation.d.ts +43 -11
- package/dist/app-controller-continuation.d.ts.map +1 -1
- package/dist/app-controller-continuation.js +1 -5
- package/dist/app-controller-continuation.js.map +1 -1
- package/dist/app-controller-lifecycle.d.ts +34 -5
- package/dist/app-controller-lifecycle.d.ts.map +1 -1
- package/dist/app-controller-lifecycle.js.map +1 -1
- package/dist/app-controller-maintenance.d.ts +46 -8
- package/dist/app-controller-maintenance.d.ts.map +1 -1
- package/dist/app-controller-maintenance.js +64 -1
- package/dist/app-controller-maintenance.js.map +1 -1
- package/dist/app-controller-memory-health.d.ts +39 -10
- package/dist/app-controller-memory-health.d.ts.map +1 -1
- package/dist/app-controller-memory-health.js.map +1 -1
- package/dist/app-controller-memory.d.ts +27 -5
- package/dist/app-controller-memory.d.ts.map +1 -1
- package/dist/app-controller-memory.js +0 -1
- package/dist/app-controller-memory.js.map +1 -1
- package/dist/app-controller-responder.d.ts +53 -7
- package/dist/app-controller-responder.d.ts.map +1 -1
- package/dist/app-controller-responder.js +5 -5
- package/dist/app-controller-responder.js.map +1 -1
- package/dist/app-controller-traceability.d.ts +63 -14
- package/dist/app-controller-traceability.d.ts.map +1 -1
- package/dist/app-controller-traceability.js.map +1 -1
- package/dist/app-controller-types.d.ts +63 -0
- package/dist/app-controller-types.d.ts.map +1 -0
- package/dist/app-controller-types.js +2 -0
- package/dist/app-controller-types.js.map +1 -0
- package/dist/app-controller-utils.d.ts +1 -1
- package/dist/app-controller-utils.d.ts.map +1 -1
- package/dist/app-controller-utils.js +1 -1
- package/dist/app-controller-utils.js.map +1 -1
- package/dist/app-controller.d.ts +5 -62
- package/dist/app-controller.d.ts.map +1 -1
- package/dist/app-controller.js +0 -6
- package/dist/app-controller.js.map +1 -1
- package/dist/background-environment.d.ts +1 -0
- package/dist/background-environment.d.ts.map +1 -1
- package/dist/background-environment.js +1 -0
- package/dist/background-environment.js.map +1 -1
- package/dist/background-lifecycle-utils.d.ts +27 -0
- package/dist/background-lifecycle-utils.d.ts.map +1 -0
- package/dist/background-lifecycle-utils.js +69 -0
- package/dist/background-lifecycle-utils.js.map +1 -0
- package/dist/background-log-maintenance.d.ts +6 -0
- package/dist/background-log-maintenance.d.ts.map +1 -0
- package/dist/background-log-maintenance.js +185 -0
- package/dist/background-log-maintenance.js.map +1 -0
- package/dist/background-runtime.d.ts +13 -2
- package/dist/background-runtime.d.ts.map +1 -1
- package/dist/background-runtime.js +27 -3
- package/dist/background-runtime.js.map +1 -1
- package/dist/background.d.ts +28 -5
- package/dist/background.d.ts.map +1 -1
- package/dist/background.js +229 -297
- package/dist/background.js.map +1 -1
- package/dist/channel-drivers/cron.js +8 -1
- package/dist/channel-drivers/cron.js.map +1 -1
- package/dist/channel-drivers/native-notify.d.ts +2 -0
- package/dist/channel-drivers/native-notify.d.ts.map +1 -1
- package/dist/channel-drivers/native-notify.js +14 -2
- package/dist/channel-drivers/native-notify.js.map +1 -1
- package/dist/channel-drivers/slack.d.ts.map +1 -1
- package/dist/channel-drivers/slack.js +49 -0
- package/dist/channel-drivers/slack.js.map +1 -1
- package/dist/channel-drivers/telegram.d.ts.map +1 -1
- package/dist/channel-drivers/telegram.js +7 -18
- package/dist/channel-drivers/telegram.js.map +1 -1
- package/dist/channel-drivers/tui.d.ts.map +1 -1
- package/dist/channel-drivers/tui.js +8 -0
- package/dist/channel-drivers/tui.js.map +1 -1
- package/dist/channel-plugins.d.ts +2 -11
- package/dist/channel-plugins.d.ts.map +1 -1
- package/dist/channel-plugins.js +63 -60
- package/dist/channel-plugins.js.map +1 -1
- package/dist/channel-status-display.js +2 -6
- package/dist/channel-status-display.js.map +1 -1
- package/dist/channels.d.ts +5 -6
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +7 -5
- package/dist/channels.js.map +1 -1
- package/dist/cli-args.d.ts +8 -2
- package/dist/cli-args.d.ts.map +1 -1
- package/dist/cli-args.js +98 -27
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-background-command.d.ts.map +1 -1
- package/dist/cli-background-command.js +90 -15
- package/dist/cli-background-command.js.map +1 -1
- package/dist/cli-commands.d.ts.map +1 -1
- package/dist/cli-commands.js +0 -14
- package/dist/cli-commands.js.map +1 -1
- package/dist/cli-help.d.ts.map +1 -1
- package/dist/cli-help.js +1 -7
- package/dist/cli-help.js.map +1 -1
- package/dist/cli-runs-command.d.ts +0 -3
- package/dist/cli-runs-command.d.ts.map +1 -1
- package/dist/cli-runs-command.js +1 -5
- package/dist/cli-runs-command.js.map +1 -1
- package/dist/cli-validate-config-command.d.ts.map +1 -1
- package/dist/cli-validate-config-command.js +12 -8
- package/dist/cli-validate-config-command.js.map +1 -1
- package/dist/config-reference.d.ts +4 -1
- package/dist/config-reference.d.ts.map +1 -1
- package/dist/config-reference.js +245 -69
- package/dist/config-reference.js.map +1 -1
- package/dist/configured-agent.d.ts +2 -8
- package/dist/configured-agent.d.ts.map +1 -1
- package/dist/configured-agent.js +3 -25
- package/dist/configured-agent.js.map +1 -1
- package/dist/consumer-contract.d.ts.map +1 -1
- package/dist/consumer-contract.js +2 -4
- package/dist/consumer-contract.js.map +1 -1
- package/dist/doctor-observability.d.ts +7 -0
- package/dist/doctor-observability.d.ts.map +1 -0
- package/dist/doctor-observability.js +80 -0
- package/dist/doctor-observability.js.map +1 -0
- package/dist/doctor-types.d.ts +17 -0
- package/dist/doctor-types.d.ts.map +1 -0
- package/dist/doctor-types.js +2 -0
- package/dist/doctor-types.js.map +1 -0
- package/dist/doctor.d.ts +2 -12
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +8 -108
- package/dist/doctor.js.map +1 -1
- package/dist/first-run-readiness.d.ts +1 -1
- package/dist/first-run-readiness.d.ts.map +1 -1
- package/dist/first-run-readiness.js +1 -1
- package/dist/first-run-readiness.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/interaction-bridge.d.ts +5 -22
- package/dist/interaction-bridge.d.ts.map +1 -1
- package/dist/interaction-bridge.js +251 -141
- package/dist/interaction-bridge.js.map +1 -1
- package/dist/launchd.d.ts +33 -1
- package/dist/launchd.d.ts.map +1 -1
- package/dist/launchd.js +129 -2
- package/dist/launchd.js.map +1 -1
- package/dist/managed-web-logs.d.ts +16 -0
- package/dist/managed-web-logs.d.ts.map +1 -0
- package/dist/managed-web-logs.js +153 -0
- package/dist/managed-web-logs.js.map +1 -0
- package/dist/modules/catalog.js +1 -1
- package/dist/modules/catalog.js.map +1 -1
- package/dist/modules/known-tools.d.ts +1 -1
- package/dist/modules/known-tools.d.ts.map +1 -1
- package/dist/modules/known-tools.js +0 -3
- package/dist/modules/known-tools.js.map +1 -1
- package/dist/posted-reply-history.d.ts.map +1 -1
- package/dist/posted-reply-history.js +3 -0
- package/dist/posted-reply-history.js.map +1 -1
- package/dist/run-history.d.ts +6 -2
- package/dist/run-history.d.ts.map +1 -1
- package/dist/run-history.js +476 -96
- package/dist/run-history.js.map +1 -1
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/dist/web-command.d.ts +4 -1
- package/dist/web-command.d.ts.map +1 -1
- package/dist/web-command.js +31 -1
- package/dist/web-command.js.map +1 -1
- package/dist/wizard/prompts.d.ts.map +1 -1
- package/dist/wizard/prompts.js +3 -4
- package/dist/wizard/prompts.js.map +1 -1
- package/dist/wizard/run.js +3 -3
- package/dist/wizard/run.js.map +1 -1
- package/package.json +16 -16
- package/schema/mono-agent.config.schema.json +282 -164
- package/skills/mono-agent-composer/SKILL.md +5 -5
- package/skills/mono-agent-composer/references/config-blueprint.md +6 -13
- package/skills/mono-agent-composer/references/discovery-questions.md +1 -1
- package/skills/mono-agent-composer/references/feature-coverage.md +7 -8
- package/skills/mono-agent-composer/references/package-map.md +5 -6
- package/skills/mono-agent-composer/references/playbooks.md +3 -3
- package/skills/mono-agent-composer/references/validation.md +21 -1
package/dist/doctor.js
CHANGED
|
@@ -7,18 +7,15 @@ import { join } from "node:path";
|
|
|
7
7
|
import { promisify } from "node:util";
|
|
8
8
|
import { getBuiltinModels as getPiBuiltinModels, getBuiltinProviders as getPiBuiltinProviders, } from "@earendil-works/pi-ai/providers/all";
|
|
9
9
|
import { validateCronExpression } from "@mono-agent/cron-adapter";
|
|
10
|
-
import { listRecordedRuns } from "@mono-agent/observability";
|
|
11
|
-
import { serializeTraceSpans } from "@mono-agent/observability/otel";
|
|
12
10
|
import { classifyContinuationMcpServerTransport, isStdioMcpServerSpec, loadToolPolicyFromJsonFile, } from "@mono-agent/agent-harness";
|
|
13
11
|
import { defaultExecutionModeForModel, describeMonoRuntimeSupport, isValidMcpServerName, modelReferenceKey, networkPolicyAllowsUrl, parseMonoRuntimeModelReference, resolveModelEffortLevels, } from "@mono-agent/runtime-adapter";
|
|
14
12
|
import { buildMonoAgentConfigView, findJsonSecretConfigWarnings, findRemovedConfigWarnings, readMonoAgentConfigJson, redactMonoAgentConfig, resolveSupermemoryContainer, } from "@mono-agent/config";
|
|
15
13
|
import { describeSandboxEffectiveState, resolveSandboxEffectiveState, sandboxEffectiveStateWarning, } from "@mono-agent/runtime-adapter";
|
|
16
|
-
import {
|
|
14
|
+
import { isAppCoreConfigError, loadAppCoreConfig, } from "./app-config.js";
|
|
17
15
|
import { adapterSendToolNames, isAdapterSendToolAllowed, resolveAdapterSendToolsSettings } from "./adapter-send-tools.js";
|
|
18
16
|
import { canonicalToolName, isAllowAllTools, isKnownToolName, isMcpToolName, suggestToolName } from "./modules/known-tools.js";
|
|
19
17
|
import { collectChannelConfigViews } from "./channel-config-view.js";
|
|
20
18
|
import { resolveChannelDrivers } from "./channels.js";
|
|
21
|
-
import { findUnknownAppConfigWarnings } from "./config-reference.js";
|
|
22
19
|
import { loadContinuationSettings } from "./continuation-config.js";
|
|
23
20
|
import { applyOriginContextGroupCommit } from "./continuation-origin-store.js";
|
|
24
21
|
import { readBoundedOwnerOnlyFile } from "./continuation-store-fs.js";
|
|
@@ -30,7 +27,6 @@ import { CONTINUATION_STATES, continuationDigest } from "./continuations.js";
|
|
|
30
27
|
import { formatInteractionBridgeUrl, loadInteractionSettings } from "./interaction-bridge.js";
|
|
31
28
|
import { FIRST_RUN_MEMORY_INITIALIZING_MARKER } from "./first-run-managed-memory.js";
|
|
32
29
|
import { DEFAULT_MEMORY_EMBEDDING_ENDPOINTS, probeMemoryEmbeddingSelection, } from "./memory-embedding-service.js";
|
|
33
|
-
import { buildRunsHealthDisplay, RUNS_HEALTH_MAX_RUNS } from "./runs-health.js";
|
|
34
30
|
import { piAuthRecoveryCommand } from "./provider-setup.js";
|
|
35
31
|
import { inspectPiAuthStore } from "./pi-auth-store-inspection.js";
|
|
36
32
|
import { checkManagedProjectSkills, managedProjectSkillsExist } from "./project-skills.js";
|
|
@@ -38,6 +34,7 @@ import { configuredRuntimeFallbackModels, configuredRuntimeModels } from "./runt
|
|
|
38
34
|
import { runtimeProvenanceDetail } from "./runtime-provenance.js";
|
|
39
35
|
import { loadSupermemoryPlugin } from "./supermemory-plugin.js";
|
|
40
36
|
import { DEFAULT_LAUNCHD_LOG_POLICY, inspectLaunchdLogs, LAUNCHD_LOG_MAINTENANCE_INTERVAL_SECONDS, launchdLogPathsForConfig, } from "./launchd-logs.js";
|
|
37
|
+
import { exporterSection, runsSection } from "./doctor-observability.js";
|
|
41
38
|
const execFile = promisify(execFileCallback);
|
|
42
39
|
const CONTINUATION_V2_ROLLBACK_GUARD = "UPGRADED-TO-RECORDS-V3";
|
|
43
40
|
const CONTINUATION_V2_ROLLBACK_GUARD_CONTENT = "This state directory uses continuation records v3. Older runtimes must not open records-v2.\n";
|
|
@@ -69,7 +66,6 @@ export async function validateMonoAgentFolder(options) {
|
|
|
69
66
|
// Channel secrets (bot tokens, API keys) live outside the core view, so the
|
|
70
67
|
// placement check spans both: core sections + every channel's config view.
|
|
71
68
|
const configWarnings = [
|
|
72
|
-
...findUnknownAppConfigWarnings(jsonResult.json),
|
|
73
69
|
...findJsonSecretConfigWarnings([
|
|
74
70
|
...buildMonoAgentConfigView({
|
|
75
71
|
redacted: redactMonoAgentConfig(coreConfig),
|
|
@@ -107,9 +103,13 @@ export async function validateMonoAgentFolder(options) {
|
|
|
107
103
|
if (coreConfig !== undefined) {
|
|
108
104
|
applyToolChannelCrossChecks(sections, coreConfig.tools.allowedTools, coreConfig.tools.disallowedTools);
|
|
109
105
|
}
|
|
106
|
+
const structurallyValid = sections.every((section) => section.status !== "error");
|
|
107
|
+
const operationallyReady = structurallyValid && sections.every((section) => section.status !== "waiting");
|
|
110
108
|
return {
|
|
111
109
|
sections,
|
|
112
|
-
|
|
110
|
+
structurallyValid,
|
|
111
|
+
operationallyReady,
|
|
112
|
+
ok: structurallyValid,
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
/** Read-only launchd log inventory used by both `validate` and its `doctor` alias. */
|
|
@@ -401,7 +401,7 @@ function hasExactAllowAllToolPolicy(tools) {
|
|
|
401
401
|
/** Adapter send tools each channel owns; an allowed entry needs BOTH the tool AND the enabled channel. */
|
|
402
402
|
const CHANNEL_OWNED_SEND_TOOLS = {
|
|
403
403
|
slack: ["SlackSendMessage"],
|
|
404
|
-
telegram: ["TelegramSendMessage", "
|
|
404
|
+
telegram: ["TelegramSendMessage", "TelegramSendFile"],
|
|
405
405
|
};
|
|
406
406
|
/**
|
|
407
407
|
* Reconciles the already-built `channel:*` section statuses with the tool policy
|
|
@@ -2655,7 +2655,6 @@ async function adapterSendToolNetworkPolicyWarnings(config, input, settings, sup
|
|
|
2655
2655
|
});
|
|
2656
2656
|
const bridgeTools = [
|
|
2657
2657
|
...(askUserAllowed ? ["AskUser"] : []),
|
|
2658
|
-
...(toolNames.includes("TelegramAskButtons") ? ["TelegramAskButtons"] : []),
|
|
2659
2658
|
];
|
|
2660
2659
|
if (bridgeTools.length > 0) {
|
|
2661
2660
|
const configuredBridgeUrl = input.env.MONO_AGENT_INTERACTION_BRIDGE_URL?.trim();
|
|
@@ -2857,105 +2856,6 @@ function directCodexSandboxPosture(permissionMode) {
|
|
|
2857
2856
|
detail: "Direct Codex default/acceptEdits mode uses its native workspace-write sandbox with network disabled; unattended escalation requests are denied.",
|
|
2858
2857
|
};
|
|
2859
2858
|
}
|
|
2860
|
-
async function runsSection(input, config) {
|
|
2861
|
-
const artifactDir = await resolveAppArtifactDir(input);
|
|
2862
|
-
const { totalRuns, runs, warnings } = await listRecordedRuns({ artifactDir, maxRuns: RUNS_HEALTH_MAX_RUNS, scope: "agent" });
|
|
2863
|
-
const display = buildRunsHealthDisplay({ artifactDir, totalRuns, runs, warnings });
|
|
2864
|
-
const retentionDetails = config === undefined
|
|
2865
|
-
? []
|
|
2866
|
-
: [
|
|
2867
|
-
`Artifact retention: maxAgeDays=${config.artifacts.retention.maxAgeDays}, maxCount=${config.artifacts.retention.maxCount}, dryRun=${config.artifacts.retention.dryRun ? "true" : "false"}.`,
|
|
2868
|
-
`Memory artifact retention: maxAgeDays=${config.artifacts.memoryRetention.maxAgeDays}, maxCount=${config.artifacts.memoryRetention.maxCount}, dryRun=${config.artifacts.memoryRetention.dryRun ? "true" : "false"}.`,
|
|
2869
|
-
];
|
|
2870
|
-
return { id: "runs", label: "Runs health", status: display.status, details: [...retentionDetails, ...display.details] };
|
|
2871
|
-
}
|
|
2872
|
-
const LOCAL_ARTIFACTS_NOTE = "JSONL artifacts remain local (the exporter is additive; export failures never affect them).";
|
|
2873
|
-
/**
|
|
2874
|
-
* Reports observability exporter state and, uniquely among the validation
|
|
2875
|
-
* sections, performs a LIVE reachability probe of the Phoenix endpoint. An
|
|
2876
|
-
* invalid exporter shape is a hard `error` (fails the report) so bad config is
|
|
2877
|
-
* caught before startup, but an unreachable endpoint is only `waiting` — Phoenix
|
|
2878
|
-
* may start after the agent, mirroring the Ollama-unreachable precedent so
|
|
2879
|
-
* `validate` still passes. Probe failures are swallowed into a warning.
|
|
2880
|
-
*/
|
|
2881
|
-
async function exporterSection(input, liveness) {
|
|
2882
|
-
let exporters;
|
|
2883
|
-
try {
|
|
2884
|
-
exporters = await resolveAppObservabilityExporters(input);
|
|
2885
|
-
}
|
|
2886
|
-
catch (error) {
|
|
2887
|
-
if (!isAppCoreConfigError(error)) {
|
|
2888
|
-
throw error;
|
|
2889
|
-
}
|
|
2890
|
-
return { id: "observability", label: "Observability exporter", status: "error", details: [error.message] };
|
|
2891
|
-
}
|
|
2892
|
-
if (exporters.length === 0) {
|
|
2893
|
-
return {
|
|
2894
|
-
id: "observability",
|
|
2895
|
-
label: "Observability exporter",
|
|
2896
|
-
status: "disabled",
|
|
2897
|
-
details: ["No observability exporter configured."],
|
|
2898
|
-
};
|
|
2899
|
-
}
|
|
2900
|
-
const exporter = exporters[0];
|
|
2901
|
-
const details = [`Exporter: ${exporter.type} -> ${exporter.endpoint}`];
|
|
2902
|
-
const appUrl = phoenixAppBaseUrl(exporter.endpoint);
|
|
2903
|
-
if (appUrl !== undefined) {
|
|
2904
|
-
details.push(`Phoenix app: ${appUrl}`);
|
|
2905
|
-
}
|
|
2906
|
-
if (exporter.includeSensitiveData) {
|
|
2907
|
-
details.push(describeSensitiveDataExportWarning(exporter.endpoint));
|
|
2908
|
-
}
|
|
2909
|
-
// The reachability probe only ever yields `waiting`, so the start preflight
|
|
2910
|
-
// skips it (liveness=false): the exporter shape is valid, and Phoenix may
|
|
2911
|
-
// legitimately come up after the agent.
|
|
2912
|
-
if (!liveness) {
|
|
2913
|
-
details.push(LOCAL_ARTIFACTS_NOTE);
|
|
2914
|
-
return { id: "observability", label: "Observability exporter", status: "ok", details };
|
|
2915
|
-
}
|
|
2916
|
-
const probeError = await probeExporterEndpoint(exporter.endpoint);
|
|
2917
|
-
if (probeError !== undefined) {
|
|
2918
|
-
details.push(`[WARN] Phoenix export not confirmed at ${exporter.endpoint} (${probeError}); exports will fail until it accepts OTLP protobuf. This is non-fatal.`);
|
|
2919
|
-
details.push(LOCAL_ARTIFACTS_NOTE);
|
|
2920
|
-
return { id: "observability", label: "Observability exporter", status: "waiting", details };
|
|
2921
|
-
}
|
|
2922
|
-
details.push(LOCAL_ARTIFACTS_NOTE);
|
|
2923
|
-
return { id: "observability", label: "Observability exporter", status: "ok", details };
|
|
2924
|
-
}
|
|
2925
|
-
/**
|
|
2926
|
-
* Live export-compatibility probe: POSTs a tiny but VALID empty OTLP protobuf
|
|
2927
|
-
* `ExportTraceServiceRequest` (zero spans, so nothing is recorded) with
|
|
2928
|
-
* `content-type: application/x-protobuf` — exactly the wire format a real export
|
|
2929
|
-
* uses. Returns undefined when the endpoint accepts it (2xx), else an error
|
|
2930
|
-
* string. This catches what the old OPTIONS reachability probe missed: a server
|
|
2931
|
-
* that is listening but rejects the export (e.g. Phoenix returns 415 for the
|
|
2932
|
-
* wrong content type), so `validate` no longer reports `[ok]` for an endpoint
|
|
2933
|
-
* that every real export would 415. A throw (refused / DNS / timeout) means
|
|
2934
|
-
* nothing is listening. Kept non-fatal upstream (`waiting`, not `error`): Phoenix
|
|
2935
|
-
* may start after the agent.
|
|
2936
|
-
*/
|
|
2937
|
-
async function probeExporterEndpoint(endpoint) {
|
|
2938
|
-
const ctrl = new AbortController();
|
|
2939
|
-
const timer = setTimeout(() => { ctrl.abort(); }, LIVENESS_PROBE_TIMEOUT_MS);
|
|
2940
|
-
try {
|
|
2941
|
-
const response = await fetch(endpoint, {
|
|
2942
|
-
method: "POST",
|
|
2943
|
-
headers: { "content-type": "application/x-protobuf" },
|
|
2944
|
-
body: serializeTraceSpans([]),
|
|
2945
|
-
signal: ctrl.signal,
|
|
2946
|
-
});
|
|
2947
|
-
if (!response.ok) {
|
|
2948
|
-
return `HTTP ${response.status}`;
|
|
2949
|
-
}
|
|
2950
|
-
return undefined;
|
|
2951
|
-
}
|
|
2952
|
-
catch (err) {
|
|
2953
|
-
return err instanceof Error ? err.message : String(err);
|
|
2954
|
-
}
|
|
2955
|
-
finally {
|
|
2956
|
-
clearTimeout(timer);
|
|
2957
|
-
}
|
|
2958
|
-
}
|
|
2959
2859
|
async function channelSection(driver, input) {
|
|
2960
2860
|
const id = `channel:${driver.id}`;
|
|
2961
2861
|
try {
|