linkque-cli-v2 1.4.4 → 1.4.5
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/linkquejs.js +1291 -354
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-OHRCYI66.js → chunk-CLYLJ5MD.js} +591 -393
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-XL6BPKTI.js → chunk-NFVKWQGM.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-CUMXO6KK.js → chunk-S75HFRLD.js} +4 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +94 -8
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +2 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +2 -2
- package/vendor/linkque-agent-appwrite-integrate/package.json +1 -1
- package/worker.js +691 -381
package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-OHRCYI66.js → chunk-CLYLJ5MD.js}
RENAMED
|
@@ -4514,13 +4514,14 @@ var require_fast_uri = __commonJS({
|
|
|
4514
4514
|
if (!malformedIPLiteral) {
|
|
4515
4515
|
malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
|
|
4516
4516
|
}
|
|
4517
|
-
if (
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
4522
|
-
}
|
|
4517
|
+
if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
|
|
4518
|
+
let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
|
|
4519
|
+
if (!isIP) {
|
|
4520
|
+
host = normalizePercentEncoding(host.toLowerCase());
|
|
4523
4521
|
}
|
|
4522
|
+
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
4523
|
+
}
|
|
4524
|
+
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
4524
4525
|
if (parsed.path) {
|
|
4525
4526
|
parsed.path = normalizePathEncoding(parsed.path);
|
|
4526
4527
|
}
|
|
@@ -22825,10 +22826,24 @@ var EDebugLogScope;
|
|
|
22825
22826
|
EDebugLogScope2["LLM"] = "LLM";
|
|
22826
22827
|
EDebugLogScope2["PI_EVENT"] = "PI_EVENT";
|
|
22827
22828
|
EDebugLogScope2["MCP"] = "MCP";
|
|
22829
|
+
EDebugLogScope2["SKILL"] = "SKILL";
|
|
22828
22830
|
EDebugLogScope2["HTTP"] = "HTTP";
|
|
22829
22831
|
EDebugLogScope2["HOOK"] = "HOOK";
|
|
22830
22832
|
})(EDebugLogScope || (EDebugLogScope = {}));
|
|
22831
22833
|
|
|
22834
|
+
// ../linkque-agent-runtime/dist/esm/core/debugLog.js
|
|
22835
|
+
function isDebugLoggingEnabled(level) {
|
|
22836
|
+
return level?.trim().toLowerCase() === "debug";
|
|
22837
|
+
}
|
|
22838
|
+
function createRuntimeDebugLog(level, sink) {
|
|
22839
|
+
const debug = isDebugLoggingEnabled(level);
|
|
22840
|
+
return (line, scope) => {
|
|
22841
|
+
if (!debug && (scope === EDebugLogScope.PI_EVENT || scope === EDebugLogScope.HTTP || scope === EDebugLogScope.MCP || scope === EDebugLogScope.SKILL))
|
|
22842
|
+
return;
|
|
22843
|
+
sink(line, scope);
|
|
22844
|
+
};
|
|
22845
|
+
}
|
|
22846
|
+
|
|
22832
22847
|
// ../linkque-agent-runtime/dist/esm/core/cardTools.js
|
|
22833
22848
|
import { randomUUID } from "node:crypto";
|
|
22834
22849
|
|
|
@@ -26035,6 +26050,383 @@ function resolvePhoneAuthorizationDependency(protocol, resourceIds, toolName) {
|
|
|
26035
26050
|
return dependencies.length ? { required: dependencies.some((dependency) => dependency.required) } : void 0;
|
|
26036
26051
|
}
|
|
26037
26052
|
|
|
26053
|
+
// ../linkque-agent-protocol/dist/esm/telemetry/telemetryEnums.js
|
|
26054
|
+
var CONTENT_VALUE_MAX_LENGTH = 16 * 1024;
|
|
26055
|
+
var ETelemetryAttribute;
|
|
26056
|
+
(function(ETelemetryAttribute2) {
|
|
26057
|
+
ETelemetryAttribute2["HARNESS_TELEMETRY_SCHEMA_VERSION"] = "harness.telemetry.schema.version";
|
|
26058
|
+
ETelemetryAttribute2["LINKQUE_TELEMETRY_SCHEMA_VERSION"] = "linkque.telemetry.schema.version";
|
|
26059
|
+
ETelemetryAttribute2["LINKQUE_TELEMETRY_ADAPTER_VERSION"] = "linkque.telemetry.adapter.version";
|
|
26060
|
+
ETelemetryAttribute2["HARNESS_TELEMETRY_SOURCE"] = "harness.telemetry.source";
|
|
26061
|
+
ETelemetryAttribute2["HARNESS_TELEMETRY_EVIDENCE"] = "harness.telemetry.evidence";
|
|
26062
|
+
ETelemetryAttribute2["HARNESS_TELEMETRY_COMPLETENESS"] = "harness.telemetry.completeness";
|
|
26063
|
+
ETelemetryAttribute2["LINKQUE_RUNTIME_KIND"] = "linkque.runtime.kind";
|
|
26064
|
+
ETelemetryAttribute2["LINKQUE_RUN_ID"] = "linkque.run.id";
|
|
26065
|
+
ETelemetryAttribute2["LINKQUE_AGENT_ID"] = "linkque.agent.id";
|
|
26066
|
+
ETelemetryAttribute2["HARNESS_SESSION_ID"] = "harness.session.id";
|
|
26067
|
+
ETelemetryAttribute2["LINKQUE_CONVERSATION_ID"] = "linkque.conversation.id";
|
|
26068
|
+
ETelemetryAttribute2["LINKQUE_REQUEST_ID"] = "linkque.request.id";
|
|
26069
|
+
ETelemetryAttribute2["LINKQUE_TURN_ID"] = "linkque.turn.id";
|
|
26070
|
+
ETelemetryAttribute2["LINKQUE_ACCOUNT_ID"] = "linkque.account.id";
|
|
26071
|
+
ETelemetryAttribute2["LINKQUE_CHANNEL"] = "linkque.channel";
|
|
26072
|
+
ETelemetryAttribute2["LINKQUE_USER_KEY"] = "linkque.user.key";
|
|
26073
|
+
ETelemetryAttribute2["HARNESS_ADVANCE_ID"] = "harness.advance.id";
|
|
26074
|
+
ETelemetryAttribute2["HARNESS_CALL_ID"] = "harness.call.id";
|
|
26075
|
+
ETelemetryAttribute2["HARNESS_INVOCATION_ID"] = "harness.invocation.id";
|
|
26076
|
+
ETelemetryAttribute2["HARNESS_ATTEMPT_ID"] = "harness.attempt.id";
|
|
26077
|
+
ETelemetryAttribute2["HARNESS_ATTEMPT_VISIBILITY"] = "harness.attempt.visibility";
|
|
26078
|
+
ETelemetryAttribute2["HARNESS_ADVANCE_OUTCOME"] = "harness.advance.outcome";
|
|
26079
|
+
ETelemetryAttribute2["HARNESS_OPERATION_OUTCOME"] = "harness.operation.outcome";
|
|
26080
|
+
ETelemetryAttribute2["HARNESS_REMOTE_COMPLETION"] = "harness.remote.completion";
|
|
26081
|
+
ETelemetryAttribute2["HARNESS_STATE_COMMIT_STATUS"] = "harness.state.commit.status";
|
|
26082
|
+
ETelemetryAttribute2["LINKQUE_OPERATION_ID"] = "linkque.operation.id";
|
|
26083
|
+
ETelemetryAttribute2["LINKQUE_OPERATION_NAME"] = "linkque.operation.name";
|
|
26084
|
+
ETelemetryAttribute2["LINKQUE_OPERATION_PARENT_ID"] = "linkque.operation.parent_id";
|
|
26085
|
+
ETelemetryAttribute2["LINKQUE_SPAN_PARENT_ID"] = "linkque.span.parent_id";
|
|
26086
|
+
ETelemetryAttribute2["HARNESS_RECORD_ID"] = "harness.record.id";
|
|
26087
|
+
ETelemetryAttribute2["HARNESS_EVENT_SEQUENCE"] = "harness.event.sequence";
|
|
26088
|
+
ETelemetryAttribute2["ERROR_TYPE"] = "error.type";
|
|
26089
|
+
ETelemetryAttribute2["LINKQUE_STREAM_TERMINATION"] = "linkque.stream.termination";
|
|
26090
|
+
ETelemetryAttribute2["LINKQUE_STREAM_CANCEL_SOURCE"] = "linkque.stream.cancel_source";
|
|
26091
|
+
ETelemetryAttribute2["LINKQUE_TERMINAL_EVIDENCE"] = "linkque.terminal.evidence";
|
|
26092
|
+
ETelemetryAttribute2["LINKQUE_RUNTIME_CLEANUP_OUTCOME"] = "linkque.runtime.cleanup_outcome";
|
|
26093
|
+
ETelemetryAttribute2["LINKQUE_OBSERVATION_BOUNDARY"] = "linkque.observation.boundary";
|
|
26094
|
+
ETelemetryAttribute2["LINKQUE_LOOP_ITERATION_ID"] = "linkque.loop.iteration.id";
|
|
26095
|
+
ETelemetryAttribute2["LINKQUE_LOOP_ITERATION_INDEX"] = "linkque.loop.iteration.index";
|
|
26096
|
+
ETelemetryAttribute2["LINKQUE_STREAM_TERMINAL_SOURCE"] = "linkque.stream.terminal_source";
|
|
26097
|
+
ETelemetryAttribute2["LINKQUE_STREAM_PUBLIC_TEXT_DELTA_COUNT"] = "linkque.stream.public_text_delta_count";
|
|
26098
|
+
ETelemetryAttribute2["LINKQUE_STREAM_THINKING_DELTA_COUNT"] = "linkque.stream.thinking_delta_count";
|
|
26099
|
+
ETelemetryAttribute2["LINKQUE_MODEL_FIRST_CHUNK_MS"] = "linkque.model.first_chunk_ms";
|
|
26100
|
+
ETelemetryAttribute2["LINKQUE_MODEL_FIRST_TEXT_MS"] = "linkque.model.first_text_ms";
|
|
26101
|
+
ETelemetryAttribute2["LINKQUE_LOOP_FIRST_PUBLIC_TEXT_MS"] = "linkque.loop.first_public_text_ms";
|
|
26102
|
+
ETelemetryAttribute2["LINKQUE_MODEL_CHUNK_COUNT"] = "linkque.model.chunk_count";
|
|
26103
|
+
ETelemetryAttribute2["LINKQUE_MODEL_TEXT_CHARS"] = "linkque.model.text_chars";
|
|
26104
|
+
ETelemetryAttribute2["LINKQUE_MODEL_THINKING_CHARS"] = "linkque.model.thinking_chars";
|
|
26105
|
+
ETelemetryAttribute2["GEN_AI_OPERATION_NAME"] = "gen_ai.operation.name";
|
|
26106
|
+
ETelemetryAttribute2["GEN_AI_AGENT_NAME"] = "gen_ai.agent.name";
|
|
26107
|
+
ETelemetryAttribute2["GEN_AI_PROVIDER_NAME"] = "gen_ai.provider.name";
|
|
26108
|
+
ETelemetryAttribute2["GEN_AI_REQUEST_MODEL"] = "gen_ai.request.model";
|
|
26109
|
+
ETelemetryAttribute2["GEN_AI_RESPONSE_MODEL"] = "gen_ai.response.model";
|
|
26110
|
+
ETelemetryAttribute2["GEN_AI_RESPONSE_ID"] = "gen_ai.response.id";
|
|
26111
|
+
ETelemetryAttribute2["LINKQUE_CONTENT_VALUE_TRUNCATED"] = "linkque.content.value.truncated";
|
|
26112
|
+
ETelemetryAttribute2["GEN_AI_RESPONSE_FINISH_REASONS"] = "gen_ai.response.finish_reasons";
|
|
26113
|
+
ETelemetryAttribute2["GEN_AI_USAGE_INPUT_TOKENS"] = "gen_ai.usage.input_tokens";
|
|
26114
|
+
ETelemetryAttribute2["GEN_AI_USAGE_OUTPUT_TOKENS"] = "gen_ai.usage.output_tokens";
|
|
26115
|
+
ETelemetryAttribute2["GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS"] = "gen_ai.usage.cache_read.input_tokens";
|
|
26116
|
+
ETelemetryAttribute2["GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS"] = "gen_ai.usage.cache_creation.input_tokens";
|
|
26117
|
+
ETelemetryAttribute2["GEN_AI_USAGE_REASONING_OUTPUT_TOKENS"] = "gen_ai.usage.reasoning.output_tokens";
|
|
26118
|
+
ETelemetryAttribute2["HARNESS_USAGE_SOURCE"] = "harness.usage.source";
|
|
26119
|
+
ETelemetryAttribute2["HARNESS_USAGE_ATTEMPT_COVERAGE"] = "harness.usage.attempt_coverage";
|
|
26120
|
+
ETelemetryAttribute2["HARNESS_MODEL_PURPOSE"] = "harness.model.purpose";
|
|
26121
|
+
ETelemetryAttribute2["HARNESS_MODEL_INVOCATION_COUNT"] = "harness.model.invocation_count";
|
|
26122
|
+
ETelemetryAttribute2["GEN_AI_TOOL_NAME"] = "gen_ai.tool.name";
|
|
26123
|
+
ETelemetryAttribute2["GEN_AI_TOOL_CALL_ID"] = "gen_ai.tool.call.id";
|
|
26124
|
+
ETelemetryAttribute2["HARNESS_TOOL_RESULT_STATUS"] = "harness.tool.result.status";
|
|
26125
|
+
ETelemetryAttribute2["LINKQUE_TOOL_FAILURE_STAGE"] = "linkque.tool.failure_stage";
|
|
26126
|
+
ETelemetryAttribute2["HARNESS_HOOK_NAME"] = "harness.hook.name";
|
|
26127
|
+
ETelemetryAttribute2["LINKQUE_HOOK_STAGE"] = "linkque.hook.stage";
|
|
26128
|
+
ETelemetryAttribute2["LINKQUE_HOOK_RESOURCE_ID"] = "linkque.hook.resource_id";
|
|
26129
|
+
ETelemetryAttribute2["LINKQUE_HOOK_EVENT_ID"] = "linkque.hook.event_id";
|
|
26130
|
+
ETelemetryAttribute2["LINKQUE_HOOK_MATCHED_COUNT"] = "linkque.hook.matched_count";
|
|
26131
|
+
ETelemetryAttribute2["LINKQUE_HOOK_PENDING_COUNT"] = "linkque.hook.pending_count";
|
|
26132
|
+
ETelemetryAttribute2["LINKQUE_HOOK_SCHEDULED_COUNT"] = "linkque.hook.scheduled_count";
|
|
26133
|
+
ETelemetryAttribute2["LINKQUE_HOOK_HAS_SIDE_EFFECTS"] = "linkque.hook.has_side_effects";
|
|
26134
|
+
ETelemetryAttribute2["LINKQUE_HOOK_MODE"] = "linkque.hook.mode";
|
|
26135
|
+
ETelemetryAttribute2["LINKQUE_HOOK_TIMEOUT_MS"] = "linkque.hook.timeout_ms";
|
|
26136
|
+
ETelemetryAttribute2["LINKQUE_HOOK_RESULT"] = "linkque.hook.result";
|
|
26137
|
+
ETelemetryAttribute2["HARNESS_MIDDLEWARE_NAME"] = "harness.middleware.name";
|
|
26138
|
+
ETelemetryAttribute2["HARNESS_MIDDLEWARE_INVOCATION_ID"] = "harness.middleware.invocation.id";
|
|
26139
|
+
ETelemetryAttribute2["LINKQUE_HOOK_EXECUTOR_SETTLED"] = "linkque.hook.executor_settled";
|
|
26140
|
+
ETelemetryAttribute2["LINKQUE_HISTORY_MESSAGE_COUNT"] = "linkque.history.message_count";
|
|
26141
|
+
ETelemetryAttribute2["LINKQUE_TELEMETRY_COVERAGE"] = "linkque.telemetry.coverage";
|
|
26142
|
+
ETelemetryAttribute2["LINKQUE_TELEMETRY_LOSS_REASON"] = "linkque.telemetry.loss_reason";
|
|
26143
|
+
ETelemetryAttribute2["LINKQUE_OPERATION_DURATION_MS"] = "linkque.operation.duration_ms";
|
|
26144
|
+
ETelemetryAttribute2["HTTP_RESPONSE_STATUS_CODE"] = "http.response.status_code";
|
|
26145
|
+
ETelemetryAttribute2["SERVICE_NAME"] = "service.name";
|
|
26146
|
+
ETelemetryAttribute2["SERVICE_NAMESPACE"] = "service.namespace";
|
|
26147
|
+
ETelemetryAttribute2["SERVICE_VERSION"] = "service.version";
|
|
26148
|
+
ETelemetryAttribute2["SERVICE_INSTANCE_ID"] = "service.instance.id";
|
|
26149
|
+
ETelemetryAttribute2["DEPLOYMENT_ENVIRONMENT_NAME"] = "deployment.environment.name";
|
|
26150
|
+
ETelemetryAttribute2["LINKQUE_LINK_RELATION"] = "linkque.link.relation";
|
|
26151
|
+
})(ETelemetryAttribute || (ETelemetryAttribute = {}));
|
|
26152
|
+
var ETelemetryEventPrefix;
|
|
26153
|
+
(function(ETelemetryEventPrefix2) {
|
|
26154
|
+
ETelemetryEventPrefix2["OPERATION"] = "linkque.operation";
|
|
26155
|
+
ETelemetryEventPrefix2["ADVANCE"] = "harness.advance";
|
|
26156
|
+
ETelemetryEventPrefix2["MODEL_INVOKE"] = "harness.model.invoke";
|
|
26157
|
+
ETelemetryEventPrefix2["MODEL_ATTEMPT"] = "harness.model.attempt";
|
|
26158
|
+
ETelemetryEventPrefix2["TOOL_INVOKE"] = "harness.tool.invoke";
|
|
26159
|
+
ETelemetryEventPrefix2["TOOL_ATTEMPT"] = "harness.tool.attempt";
|
|
26160
|
+
ETelemetryEventPrefix2["HOOK_CHAIN"] = "harness.hook.chain";
|
|
26161
|
+
ETelemetryEventPrefix2["MIDDLEWARE"] = "harness.middleware";
|
|
26162
|
+
ETelemetryEventPrefix2["LOOP"] = "linkque.loop";
|
|
26163
|
+
ETelemetryEventPrefix2["LOOP_ITERATION"] = "linkque.loop.iteration";
|
|
26164
|
+
ETelemetryEventPrefix2["HISTORY_APPEND"] = "linkque.history.append";
|
|
26165
|
+
ETelemetryEventPrefix2["HOOK_DRAIN"] = "linkque.hook.drain";
|
|
26166
|
+
})(ETelemetryEventPrefix || (ETelemetryEventPrefix = {}));
|
|
26167
|
+
var ETelemetryEventPhase;
|
|
26168
|
+
(function(ETelemetryEventPhase2) {
|
|
26169
|
+
ETelemetryEventPhase2["STARTED"] = "started";
|
|
26170
|
+
ETelemetryEventPhase2["FINISHED"] = "finished";
|
|
26171
|
+
ETelemetryEventPhase2["OBSERVATION_LOST"] = "observation_lost";
|
|
26172
|
+
})(ETelemetryEventPhase || (ETelemetryEventPhase = {}));
|
|
26173
|
+
var ETelemetryEventName;
|
|
26174
|
+
(function(ETelemetryEventName2) {
|
|
26175
|
+
ETelemetryEventName2["TOOL_EXECUTION_FAILED"] = "linkque.tool.execution.failed";
|
|
26176
|
+
ETelemetryEventName2["TELEMETRY_COVERAGE"] = "linkque.telemetry.coverage";
|
|
26177
|
+
ETelemetryEventName2["HOOK_MATCHED"] = "linkque.hook.matched";
|
|
26178
|
+
ETelemetryEventName2["HOOK_SCHEDULED"] = "linkque.hook.scheduled";
|
|
26179
|
+
ETelemetryEventName2["HOOK_CANCEL_REQUESTED"] = "linkque.hook.cancel_requested";
|
|
26180
|
+
ETelemetryEventName2["HOOK_TIMEOUT_REQUESTED"] = "linkque.hook.timeout_requested";
|
|
26181
|
+
ETelemetryEventName2["HOOK_EXECUTOR_SETTLED"] = "linkque.hook.executor_settled";
|
|
26182
|
+
ETelemetryEventName2["HOOK_WAIT_FINISHED"] = "linkque.hook.wait_finished";
|
|
26183
|
+
ETelemetryEventName2["LOOP_FIRST_PUBLIC_TEXT"] = "linkque.loop.first_public_text";
|
|
26184
|
+
ETelemetryEventName2["STREAM_TERMINAL_OBSERVED"] = "linkque.stream.terminal_observed";
|
|
26185
|
+
ETelemetryEventName2["MODEL_FIRST_CHUNK"] = "harness.model.first_chunk";
|
|
26186
|
+
ETelemetryEventName2["MODEL_FIRST_TEXT"] = "harness.model.first_text";
|
|
26187
|
+
ETelemetryEventName2["MODEL_USAGE_RECORDED"] = "linkque.model.usage.recorded";
|
|
26188
|
+
ETelemetryEventName2["MODEL_RESPONSE_HEADERS"] = "linkque.model.response_headers";
|
|
26189
|
+
ETelemetryEventName2["OPERATION_OBSERVATION_LOST"] = "linkque.operation.observation_lost";
|
|
26190
|
+
ETelemetryEventName2["RUNTIME_UNCAUGHT_ERROR"] = "linkque.runtime.uncaught_error";
|
|
26191
|
+
ETelemetryEventName2["OPERATION_STARTED"] = "linkque.operation.started";
|
|
26192
|
+
ETelemetryEventName2["OPERATION_FINISHED"] = "linkque.operation.finished";
|
|
26193
|
+
ETelemetryEventName2["ADVANCE_STARTED"] = "harness.advance.started";
|
|
26194
|
+
ETelemetryEventName2["ADVANCE_FINISHED"] = "harness.advance.finished";
|
|
26195
|
+
ETelemetryEventName2["MODEL_INVOKE_STARTED"] = "harness.model.invoke.started";
|
|
26196
|
+
ETelemetryEventName2["MODEL_INVOKE_FINISHED"] = "harness.model.invoke.finished";
|
|
26197
|
+
ETelemetryEventName2["MODEL_ATTEMPT_STARTED"] = "harness.model.attempt.started";
|
|
26198
|
+
ETelemetryEventName2["MODEL_ATTEMPT_FINISHED"] = "harness.model.attempt.finished";
|
|
26199
|
+
ETelemetryEventName2["TOOL_INVOKE_STARTED"] = "harness.tool.invoke.started";
|
|
26200
|
+
ETelemetryEventName2["TOOL_INVOKE_FINISHED"] = "harness.tool.invoke.finished";
|
|
26201
|
+
ETelemetryEventName2["TOOL_ATTEMPT_STARTED"] = "harness.tool.attempt.started";
|
|
26202
|
+
ETelemetryEventName2["TOOL_ATTEMPT_FINISHED"] = "harness.tool.attempt.finished";
|
|
26203
|
+
ETelemetryEventName2["HOOK_CHAIN_STARTED"] = "harness.hook.chain.started";
|
|
26204
|
+
ETelemetryEventName2["HOOK_CHAIN_FINISHED"] = "harness.hook.chain.finished";
|
|
26205
|
+
ETelemetryEventName2["MIDDLEWARE_STARTED"] = "harness.middleware.started";
|
|
26206
|
+
ETelemetryEventName2["MIDDLEWARE_FINISHED"] = "harness.middleware.finished";
|
|
26207
|
+
ETelemetryEventName2["LOOP_STARTED"] = "linkque.loop.started";
|
|
26208
|
+
ETelemetryEventName2["LOOP_FINISHED"] = "linkque.loop.finished";
|
|
26209
|
+
ETelemetryEventName2["LOOP_ITERATION_STARTED"] = "linkque.loop.iteration.started";
|
|
26210
|
+
ETelemetryEventName2["LOOP_ITERATION_FINISHED"] = "linkque.loop.iteration.finished";
|
|
26211
|
+
ETelemetryEventName2["HISTORY_APPEND_STARTED"] = "linkque.history.append.started";
|
|
26212
|
+
ETelemetryEventName2["HISTORY_APPEND_FINISHED"] = "linkque.history.append.finished";
|
|
26213
|
+
ETelemetryEventName2["HOOK_DRAIN_STARTED"] = "linkque.hook.drain.started";
|
|
26214
|
+
ETelemetryEventName2["HOOK_DRAIN_FINISHED"] = "linkque.hook.drain.finished";
|
|
26215
|
+
ETelemetryEventName2["CONTENT_RECORDED"] = "linkque.content.recorded";
|
|
26216
|
+
})(ETelemetryEventName || (ETelemetryEventName = {}));
|
|
26217
|
+
var ETelemetryContentSection;
|
|
26218
|
+
(function(ETelemetryContentSection2) {
|
|
26219
|
+
ETelemetryContentSection2["QUERY_INPUT"] = "query.input";
|
|
26220
|
+
ETelemetryContentSection2["MODEL_OUTPUT"] = "model.output";
|
|
26221
|
+
ETelemetryContentSection2["MCP_ACTION_OUTPUT"] = "mcp_action.output";
|
|
26222
|
+
ETelemetryContentSection2["TOOL_INPUT"] = "tool.input";
|
|
26223
|
+
ETelemetryContentSection2["TOOL_OUTPUT"] = "tool.output";
|
|
26224
|
+
ETelemetryContentSection2["MCP_REQUESTED_INPUT"] = "mcp.requested_input";
|
|
26225
|
+
ETelemetryContentSection2["MCP_INPUT"] = "mcp.input";
|
|
26226
|
+
ETelemetryContentSection2["MCP_OUTPUT"] = "mcp.output";
|
|
26227
|
+
ETelemetryContentSection2["SKILL_INPUT"] = "skill.input";
|
|
26228
|
+
ETelemetryContentSection2["SKILL_OUTPUT"] = "skill.output";
|
|
26229
|
+
ETelemetryContentSection2["KNOWLEDGE_INPUT"] = "knowledge.input";
|
|
26230
|
+
ETelemetryContentSection2["KNOWLEDGE_OUTPUT"] = "knowledge.output";
|
|
26231
|
+
})(ETelemetryContentSection || (ETelemetryContentSection = {}));
|
|
26232
|
+
var ETelemetryOperationName;
|
|
26233
|
+
(function(ETelemetryOperationName2) {
|
|
26234
|
+
ETelemetryOperationName2["OPERATION"] = "linkque.operation";
|
|
26235
|
+
ETelemetryOperationName2["TOOL_INVOKE"] = "harness.tool.invoke";
|
|
26236
|
+
ETelemetryOperationName2["ADVANCE"] = "harness.advance";
|
|
26237
|
+
ETelemetryOperationName2["MODEL_INVOKE"] = "harness.model.invoke";
|
|
26238
|
+
ETelemetryOperationName2["MODEL_ATTEMPT"] = "harness.model.attempt";
|
|
26239
|
+
ETelemetryOperationName2["TOOL_ATTEMPT"] = "harness.tool.attempt";
|
|
26240
|
+
ETelemetryOperationName2["HOOK_CHAIN"] = "harness.hook.chain";
|
|
26241
|
+
ETelemetryOperationName2["MIDDLEWARE"] = "harness.middleware";
|
|
26242
|
+
ETelemetryOperationName2["LOOP"] = "linkque.agent.loop";
|
|
26243
|
+
ETelemetryOperationName2["ITERATION"] = "linkque.agent.iteration";
|
|
26244
|
+
ETelemetryOperationName2["SESSION_LOAD"] = "harness.session.load";
|
|
26245
|
+
ETelemetryOperationName2["HISTORY_APPEND"] = "linkque.history.append";
|
|
26246
|
+
ETelemetryOperationName2["CLEANUP"] = "linkque.runtime.cleanup";
|
|
26247
|
+
ETelemetryOperationName2["HOOK_DRAIN"] = "linkque.hook.drain";
|
|
26248
|
+
})(ETelemetryOperationName || (ETelemetryOperationName = {}));
|
|
26249
|
+
var ETelemetryOutcome;
|
|
26250
|
+
(function(ETelemetryOutcome2) {
|
|
26251
|
+
ETelemetryOutcome2["SUCCESS"] = "success";
|
|
26252
|
+
ETelemetryOutcome2["ERROR"] = "error";
|
|
26253
|
+
ETelemetryOutcome2["CANCELLED"] = "cancelled";
|
|
26254
|
+
ETelemetryOutcome2["TIMEOUT"] = "timeout";
|
|
26255
|
+
ETelemetryOutcome2["REJECTED"] = "rejected";
|
|
26256
|
+
ETelemetryOutcome2["UNKNOWN"] = "unknown";
|
|
26257
|
+
})(ETelemetryOutcome || (ETelemetryOutcome = {}));
|
|
26258
|
+
var ETelemetrySignal;
|
|
26259
|
+
(function(ETelemetrySignal2) {
|
|
26260
|
+
ETelemetrySignal2["LOGS"] = "logs";
|
|
26261
|
+
ETelemetrySignal2["TRACES"] = "traces";
|
|
26262
|
+
})(ETelemetrySignal || (ETelemetrySignal = {}));
|
|
26263
|
+
var ETelemetryLossReason;
|
|
26264
|
+
(function(ETelemetryLossReason2) {
|
|
26265
|
+
ETelemetryLossReason2["UNCAUGHT_ERROR"] = "uncaught_error";
|
|
26266
|
+
ETelemetryLossReason2["ACTIVE_LIMIT"] = "active_limit";
|
|
26267
|
+
ETelemetryLossReason2["ACTIVE_EXPIRED"] = "active_expired";
|
|
26268
|
+
ETelemetryLossReason2["SHUTDOWN"] = "shutdown";
|
|
26269
|
+
})(ETelemetryLossReason || (ETelemetryLossReason = {}));
|
|
26270
|
+
var ETelemetryAdvanceOutcome;
|
|
26271
|
+
(function(ETelemetryAdvanceOutcome2) {
|
|
26272
|
+
ETelemetryAdvanceOutcome2["FAILED"] = "failed";
|
|
26273
|
+
ETelemetryAdvanceOutcome2["COMPLETED"] = "completed";
|
|
26274
|
+
ETelemetryAdvanceOutcome2["UNKNOWN"] = "unknown";
|
|
26275
|
+
})(ETelemetryAdvanceOutcome || (ETelemetryAdvanceOutcome = {}));
|
|
26276
|
+
var ETelemetryStreamTermination;
|
|
26277
|
+
(function(ETelemetryStreamTermination2) {
|
|
26278
|
+
ETelemetryStreamTermination2["CANCEL"] = "cancel";
|
|
26279
|
+
ETelemetryStreamTermination2["ERROR"] = "error";
|
|
26280
|
+
ETelemetryStreamTermination2["COMPLETE"] = "complete";
|
|
26281
|
+
ETelemetryStreamTermination2["EXHAUSTED"] = "exhausted";
|
|
26282
|
+
})(ETelemetryStreamTermination || (ETelemetryStreamTermination = {}));
|
|
26283
|
+
var ETelemetryCancelSource;
|
|
26284
|
+
(function(ETelemetryCancelSource2) {
|
|
26285
|
+
ETelemetryCancelSource2["HOST_SIGNAL"] = "host_signal";
|
|
26286
|
+
ETelemetryCancelSource2["CONSUMER_RETURN"] = "consumer_return";
|
|
26287
|
+
})(ETelemetryCancelSource || (ETelemetryCancelSource = {}));
|
|
26288
|
+
var ETelemetryObservationBoundary;
|
|
26289
|
+
(function(ETelemetryObservationBoundary2) {
|
|
26290
|
+
ETelemetryObservationBoundary2["LOCAL_WAIT"] = "local_wait";
|
|
26291
|
+
ETelemetryObservationBoundary2["EXECUTOR_SETTLED"] = "executor_settled";
|
|
26292
|
+
ETelemetryObservationBoundary2["GENERATOR_WITH_SETUP_AND_CLEANUP"] = "generator_with_setup_and_cleanup";
|
|
26293
|
+
})(ETelemetryObservationBoundary || (ETelemetryObservationBoundary = {}));
|
|
26294
|
+
var ETelemetryRemoteCompletion;
|
|
26295
|
+
(function(ETelemetryRemoteCompletion2) {
|
|
26296
|
+
ETelemetryRemoteCompletion2["UNKNOWN"] = "unknown";
|
|
26297
|
+
ETelemetryRemoteCompletion2["NOT_DISPATCHED"] = "not_dispatched";
|
|
26298
|
+
ETelemetryRemoteCompletion2["CONFIRMED"] = "confirmed";
|
|
26299
|
+
})(ETelemetryRemoteCompletion || (ETelemetryRemoteCompletion = {}));
|
|
26300
|
+
var ETelemetryCommitStatus;
|
|
26301
|
+
(function(ETelemetryCommitStatus2) {
|
|
26302
|
+
ETelemetryCommitStatus2["COMMITTED"] = "committed";
|
|
26303
|
+
ETelemetryCommitStatus2["FAILED"] = "failed";
|
|
26304
|
+
})(ETelemetryCommitStatus || (ETelemetryCommitStatus = {}));
|
|
26305
|
+
var ETelemetryHookMode;
|
|
26306
|
+
(function(ETelemetryHookMode2) {
|
|
26307
|
+
ETelemetryHookMode2["AWAITED"] = "awaited";
|
|
26308
|
+
ETelemetryHookMode2["DETACHED"] = "detached";
|
|
26309
|
+
})(ETelemetryHookMode || (ETelemetryHookMode = {}));
|
|
26310
|
+
var ETelemetryHookResult;
|
|
26311
|
+
(function(ETelemetryHookResult2) {
|
|
26312
|
+
ETelemetryHookResult2["OK"] = "ok";
|
|
26313
|
+
ETelemetryHookResult2["TIMEOUT"] = "timeout";
|
|
26314
|
+
ETelemetryHookResult2["SKIPPED"] = "skipped";
|
|
26315
|
+
ETelemetryHookResult2["SUCCESS"] = "success";
|
|
26316
|
+
ETelemetryHookResult2["ERROR"] = "error";
|
|
26317
|
+
})(ETelemetryHookResult || (ETelemetryHookResult = {}));
|
|
26318
|
+
var ETelemetrySource;
|
|
26319
|
+
(function(ETelemetrySource2) {
|
|
26320
|
+
ETelemetrySource2["KERNEL"] = "kernel";
|
|
26321
|
+
ETelemetrySource2["PROVIDER"] = "provider";
|
|
26322
|
+
})(ETelemetrySource || (ETelemetrySource = {}));
|
|
26323
|
+
var ETelemetryEvidence;
|
|
26324
|
+
(function(ETelemetryEvidence2) {
|
|
26325
|
+
ETelemetryEvidence2["OBSERVED"] = "observed";
|
|
26326
|
+
})(ETelemetryEvidence || (ETelemetryEvidence = {}));
|
|
26327
|
+
var ETelemetryCompleteness;
|
|
26328
|
+
(function(ETelemetryCompleteness2) {
|
|
26329
|
+
ETelemetryCompleteness2["COMPLETE"] = "complete";
|
|
26330
|
+
ETelemetryCompleteness2["PARTIAL"] = "partial";
|
|
26331
|
+
})(ETelemetryCompleteness || (ETelemetryCompleteness = {}));
|
|
26332
|
+
var ETelemetryCoverage;
|
|
26333
|
+
(function(ETelemetryCoverage2) {
|
|
26334
|
+
ETelemetryCoverage2["PI_MODEL_TOOL_HOOK"] = "pi_model_tool_hook";
|
|
26335
|
+
ETelemetryCoverage2["CORE_ONLY"] = "core_only";
|
|
26336
|
+
})(ETelemetryCoverage || (ETelemetryCoverage = {}));
|
|
26337
|
+
var ETelemetryUsageSource;
|
|
26338
|
+
(function(ETelemetryUsageSource2) {
|
|
26339
|
+
ETelemetryUsageSource2["UNKNOWN"] = "unknown";
|
|
26340
|
+
ETelemetryUsageSource2["PROVIDER_NORMALIZED"] = "provider_normalized";
|
|
26341
|
+
})(ETelemetryUsageSource || (ETelemetryUsageSource = {}));
|
|
26342
|
+
var ETelemetryAttemptVisibility;
|
|
26343
|
+
(function(ETelemetryAttemptVisibility2) {
|
|
26344
|
+
ETelemetryAttemptVisibility2["PROVIDER_INVOCATION"] = "provider_invocation";
|
|
26345
|
+
ETelemetryAttemptVisibility2["TOOL_PROVIDER_INVOCATION"] = "tool_provider_invocation";
|
|
26346
|
+
})(ETelemetryAttemptVisibility || (ETelemetryAttemptVisibility = {}));
|
|
26347
|
+
var ETelemetryLinkRelation;
|
|
26348
|
+
(function(ETelemetryLinkRelation2) {
|
|
26349
|
+
ETelemetryLinkRelation2["GENERATED_BY"] = "generated_by";
|
|
26350
|
+
ETelemetryLinkRelation2["SCHEDULED_BY"] = "scheduled_by";
|
|
26351
|
+
})(ETelemetryLinkRelation || (ETelemetryLinkRelation = {}));
|
|
26352
|
+
var ETelemetryToolFailureStage;
|
|
26353
|
+
(function(ETelemetryToolFailureStage2) {
|
|
26354
|
+
ETelemetryToolFailureStage2["BEFORE_HOOK"] = "before_hook";
|
|
26355
|
+
ETelemetryToolFailureStage2["EXECUTION"] = "execution";
|
|
26356
|
+
ETelemetryToolFailureStage2["AFTER_HOOK"] = "after_hook";
|
|
26357
|
+
})(ETelemetryToolFailureStage || (ETelemetryToolFailureStage = {}));
|
|
26358
|
+
var ETelemetryTerminalEvidence;
|
|
26359
|
+
(function(ETelemetryTerminalEvidence2) {
|
|
26360
|
+
ETelemetryTerminalEvidence2["EXPLICIT_DONE_HISTORY_COMMITTED"] = "explicit_done_history_committed";
|
|
26361
|
+
ETelemetryTerminalEvidence2["EXPLICIT_DONE"] = "explicit_done";
|
|
26362
|
+
ETelemetryTerminalEvidence2["STREAM_ERROR"] = "stream_error";
|
|
26363
|
+
ETelemetryTerminalEvidence2["CONSUMER_CANCEL"] = "consumer_cancel";
|
|
26364
|
+
ETelemetryTerminalEvidence2["NATURAL_EXHAUSTION"] = "natural_exhaustion";
|
|
26365
|
+
})(ETelemetryTerminalEvidence || (ETelemetryTerminalEvidence = {}));
|
|
26366
|
+
var ETelemetryTerminalSource;
|
|
26367
|
+
(function(ETelemetryTerminalSource2) {
|
|
26368
|
+
ETelemetryTerminalSource2["NATIVE_AGENT_END"] = "native_agent_end";
|
|
26369
|
+
ETelemetryTerminalSource2["PROMPT_RESOLVED_FALLBACK"] = "prompt_resolved_fallback";
|
|
26370
|
+
})(ETelemetryTerminalSource || (ETelemetryTerminalSource = {}));
|
|
26371
|
+
var ETelemetryModelPurpose;
|
|
26372
|
+
(function(ETelemetryModelPurpose2) {
|
|
26373
|
+
ETelemetryModelPurpose2["AGENT_LOOP"] = "agent_loop";
|
|
26374
|
+
})(ETelemetryModelPurpose || (ETelemetryModelPurpose = {}));
|
|
26375
|
+
var ETelemetryErrorType;
|
|
26376
|
+
(function(ETelemetryErrorType2) {
|
|
26377
|
+
ETelemetryErrorType2["PROVIDER_STREAM_ERROR"] = "ProviderStreamError";
|
|
26378
|
+
ETelemetryErrorType2["TOOL_EXECUTION_ERROR"] = "ToolExecutionError";
|
|
26379
|
+
ETelemetryErrorType2["HOOK_DISPATCH_ERROR"] = "HookDispatchError";
|
|
26380
|
+
ETelemetryErrorType2["HOOK_DRAIN_ERROR"] = "HookDrainError";
|
|
26381
|
+
})(ETelemetryErrorType || (ETelemetryErrorType = {}));
|
|
26382
|
+
var ETelemetrySpanKind;
|
|
26383
|
+
(function(ETelemetrySpanKind2) {
|
|
26384
|
+
ETelemetrySpanKind2["INTERNAL"] = "internal";
|
|
26385
|
+
ETelemetrySpanKind2["CLIENT"] = "client";
|
|
26386
|
+
})(ETelemetrySpanKind || (ETelemetrySpanKind = {}));
|
|
26387
|
+
var ETelemetryGenAiOperation;
|
|
26388
|
+
(function(ETelemetryGenAiOperation2) {
|
|
26389
|
+
ETelemetryGenAiOperation2["CHAT"] = "chat";
|
|
26390
|
+
ETelemetryGenAiOperation2["EXECUTE_TOOL"] = "execute_tool";
|
|
26391
|
+
ETelemetryGenAiOperation2["INVOKE_AGENT"] = "invoke_agent";
|
|
26392
|
+
})(ETelemetryGenAiOperation || (ETelemetryGenAiOperation = {}));
|
|
26393
|
+
var ETelemetryVersion;
|
|
26394
|
+
(function(ETelemetryVersion2) {
|
|
26395
|
+
ETelemetryVersion2["V0_2"] = "0.2";
|
|
26396
|
+
ETelemetryVersion2["V1_0"] = "1.0";
|
|
26397
|
+
})(ETelemetryVersion || (ETelemetryVersion = {}));
|
|
26398
|
+
|
|
26399
|
+
// ../linkque-agent-runtime/dist/esm/core/telemetry/contentRecording.js
|
|
26400
|
+
function recordContentSection(observation, section, value, availability = "available") {
|
|
26401
|
+
observation?.record(ETelemetryEventName.CONTENT_RECORDED, {}, { section, value, availability });
|
|
26402
|
+
}
|
|
26403
|
+
function recordMcpContentSection(observation, section, value, schema) {
|
|
26404
|
+
if (!observation)
|
|
26405
|
+
return;
|
|
26406
|
+
const fieldTitles = {};
|
|
26407
|
+
const visit = (node, path2) => {
|
|
26408
|
+
if (!node || typeof node !== "object" || Array.isArray(node))
|
|
26409
|
+
return;
|
|
26410
|
+
const definition = node;
|
|
26411
|
+
if (path2 && typeof definition.title === "string" && definition.title.trim())
|
|
26412
|
+
fieldTitles[path2] = definition.title;
|
|
26413
|
+
const properties = definition.properties;
|
|
26414
|
+
if (properties && typeof properties === "object" && !Array.isArray(properties)) {
|
|
26415
|
+
for (const [key, child] of Object.entries(properties))
|
|
26416
|
+
visit(child, `${path2}/${key.replaceAll("~", "~0").replaceAll("/", "~1")}`);
|
|
26417
|
+
}
|
|
26418
|
+
if (definition.items)
|
|
26419
|
+
visit(definition.items, `${path2}/*`);
|
|
26420
|
+
};
|
|
26421
|
+
visit(schema, section === ETelemetryContentSection.MCP_OUTPUT ? "/structuredContent" : "");
|
|
26422
|
+
observation.record(ETelemetryEventName.CONTENT_RECORDED, {}, {
|
|
26423
|
+
section,
|
|
26424
|
+
value,
|
|
26425
|
+
availability: "available",
|
|
26426
|
+
...Object.keys(fieldTitles).length ? { fieldTitles } : {}
|
|
26427
|
+
});
|
|
26428
|
+
}
|
|
26429
|
+
|
|
26038
26430
|
// ../linkque-agent-runtime/dist/esm/core/mcpProxyTool.js
|
|
26039
26431
|
var MCP_PROXY_TOOL_NAME = "mcp";
|
|
26040
26432
|
var McpProxyTool = class {
|
|
@@ -26094,6 +26486,10 @@ var McpProxyTool = class {
|
|
|
26094
26486
|
context: context2
|
|
26095
26487
|
});
|
|
26096
26488
|
return entry.server.callTool(tool.name, args, sig, {
|
|
26489
|
+
toolSchema: {
|
|
26490
|
+
inputSchema: tool.inputSchema,
|
|
26491
|
+
outputSchema: tool.outputSchema
|
|
26492
|
+
},
|
|
26097
26493
|
...headers ? { headers } : {},
|
|
26098
26494
|
...context2 ? { context: context2 } : {}
|
|
26099
26495
|
});
|
|
@@ -26187,25 +26583,35 @@ var McpProxyTool = class {
|
|
|
26187
26583
|
async dispatch(args, signal, context2) {
|
|
26188
26584
|
const params = parseProxyArgs(args);
|
|
26189
26585
|
if (params.connect !== void 0) {
|
|
26190
|
-
return this.executeConnect(params.connect, signal);
|
|
26586
|
+
return this.executeConnect(params.connect, signal, context2);
|
|
26191
26587
|
}
|
|
26192
26588
|
if (params.describe !== void 0) {
|
|
26193
|
-
return this.executeDescribe(params.describe, params.server, signal);
|
|
26589
|
+
return this.executeDescribe(params.describe, params.server, signal, context2);
|
|
26194
26590
|
}
|
|
26195
26591
|
if (params.searches !== void 0) {
|
|
26196
|
-
return this.executeBatchSearch(params.searches, params.server);
|
|
26592
|
+
return this.executeBatchSearch(params.searches, params.server, context2);
|
|
26197
26593
|
}
|
|
26198
26594
|
if (params.search !== void 0) {
|
|
26199
|
-
|
|
26595
|
+
const result = await this.executeSearch(params.search, params.server);
|
|
26596
|
+
this.recordAction(context2, "search", result.tools.length ? "matched" : "no_hits", { query: result.query, tools: result.tools });
|
|
26597
|
+
return result.text;
|
|
26200
26598
|
}
|
|
26201
26599
|
if (params.tool !== void 0) {
|
|
26202
26600
|
return this.executeCall(params.tool, params.args, params.server, signal, context2);
|
|
26203
26601
|
}
|
|
26204
26602
|
if (params.server !== void 0) {
|
|
26205
|
-
return this.executeList(params.server, signal);
|
|
26603
|
+
return this.executeList(params.server, signal, context2);
|
|
26206
26604
|
}
|
|
26207
26605
|
return this.executeStatus();
|
|
26208
26606
|
}
|
|
26607
|
+
/** 保留代理动作事实,不改变供模型消费的原始返回值。 */
|
|
26608
|
+
recordAction(context2, action, status, data = {}) {
|
|
26609
|
+
recordContentSection(context2?.observation, ETelemetryContentSection.MCP_ACTION_OUTPUT, {
|
|
26610
|
+
action,
|
|
26611
|
+
status,
|
|
26612
|
+
...data
|
|
26613
|
+
});
|
|
26614
|
+
}
|
|
26209
26615
|
/** `mcp({})` / `mcp({ status: true })`:列各 server 连接状态 + 工具数。 */
|
|
26210
26616
|
executeStatus() {
|
|
26211
26617
|
const lines = [];
|
|
@@ -26233,35 +26639,43 @@ var McpProxyTool = class {
|
|
|
26233
26639
|
${lines.join("\n")}${hint}`.trim();
|
|
26234
26640
|
}
|
|
26235
26641
|
/** `mcp({ connect: "server" })`:显式连接并刷元数据,返回该 server 工具列表。 */
|
|
26236
|
-
async executeConnect(server, signal) {
|
|
26642
|
+
async executeConnect(server, signal, context2) {
|
|
26237
26643
|
const spec = this.findSpec(server);
|
|
26238
|
-
if (!spec)
|
|
26644
|
+
if (!spec) {
|
|
26645
|
+
this.recordAction(context2, "connect", "not_found", { server });
|
|
26239
26646
|
return `Server "${server}" not found. Use mcp({}) to see available servers.`;
|
|
26647
|
+
}
|
|
26240
26648
|
this.entries.delete(spec.serverName);
|
|
26241
26649
|
const entry = await this.ensureEntry(spec.serverName, signal);
|
|
26242
26650
|
if (!entry) {
|
|
26651
|
+
this.recordAction(context2, "connect", "failed", { server: spec.serverName });
|
|
26243
26652
|
const failed = this.entries.get(spec.serverName);
|
|
26244
26653
|
const detail = failed?.error ? `: ${failed.error}` : "";
|
|
26245
26654
|
return `Failed to connect to "${spec.serverName}"${detail}.`;
|
|
26246
26655
|
}
|
|
26656
|
+
this.recordAction(context2, "connect", "matched", { server: spec.serverName, tools: entry.tools.map((tool) => ({ name: tool.name, description: tool.description })) });
|
|
26247
26657
|
return this.formatToolList(spec.serverName, entry.tools);
|
|
26248
26658
|
}
|
|
26249
26659
|
/** `mcp({ server: "name" })`:列该 server 工具名 + 截断 description。 */
|
|
26250
|
-
async executeList(server, signal) {
|
|
26660
|
+
async executeList(server, signal, context2) {
|
|
26251
26661
|
const spec = this.findSpec(server);
|
|
26252
|
-
if (!spec)
|
|
26662
|
+
if (!spec) {
|
|
26663
|
+
this.recordAction(context2, "list", "not_found", { server });
|
|
26253
26664
|
return `Server "${server}" not found. Use mcp({}) to see available servers.`;
|
|
26665
|
+
}
|
|
26254
26666
|
const entry = await this.ensureEntry(spec.serverName, signal);
|
|
26255
26667
|
if (!entry) {
|
|
26668
|
+
this.recordAction(context2, "list", "failed", { server: spec.serverName });
|
|
26256
26669
|
return `Server "${spec.serverName}" is not connected. Use mcp({ connect: "${spec.serverName}" }) to retry.`;
|
|
26257
26670
|
}
|
|
26671
|
+
this.recordAction(context2, "list", "matched", { server: spec.serverName, tools: entry.tools.map((tool) => ({ name: tool.name, description: tool.description })) });
|
|
26258
26672
|
return this.formatToolList(spec.serverName, entry.tools);
|
|
26259
26673
|
}
|
|
26260
26674
|
/** `mcp({ search: "query" })`:空格分词 OR 子串匹配 name/description(跨所有 server)。 */
|
|
26261
26675
|
async executeSearch(query, serverHint) {
|
|
26262
26676
|
const terms = query.trim().split(/\s+/u).filter((t) => t.length > 0);
|
|
26263
26677
|
if (terms.length === 0)
|
|
26264
|
-
return "Search query cannot be empty.";
|
|
26678
|
+
return { query, text: "Search query cannot be empty.", tools: [] };
|
|
26265
26679
|
const pattern = new RegExp(terms.map(escapeRegExp).join("|"), "iu");
|
|
26266
26680
|
const specs = serverHint ? this.specsMatching(serverHint) : this.specs;
|
|
26267
26681
|
await Promise.all(specs.map((s) => this.ensureEntry(s.serverName)));
|
|
@@ -26276,8 +26690,9 @@ ${lines.join("\n")}${hint}`.trim();
|
|
|
26276
26690
|
}
|
|
26277
26691
|
}
|
|
26278
26692
|
}
|
|
26693
|
+
const tools = matches.map(({ server, tool }) => ({ server, name: tool.name, description: tool.description, inputSchema: tool.inputSchema }));
|
|
26279
26694
|
if (matches.length === 0) {
|
|
26280
|
-
return serverHint ? `No tools matching "${query}" in "${serverHint}"` : `No tools matching "${query}"
|
|
26695
|
+
return { query, tools, text: serverHint ? `No tools matching "${query}" in "${serverHint}"` : `No tools matching "${query}"` };
|
|
26281
26696
|
}
|
|
26282
26697
|
const lines = [`Found ${matches.length} tool(s) matching "${query}":`, ""];
|
|
26283
26698
|
for (const { server, tool } of matches) {
|
|
@@ -26289,10 +26704,10 @@ ${formatSchema(tool.inputSchema, " ")}`);
|
|
|
26289
26704
|
}
|
|
26290
26705
|
lines.push("");
|
|
26291
26706
|
}
|
|
26292
|
-
return lines.join("\n").trim();
|
|
26707
|
+
return { query, tools, text: lines.join("\n").trim() };
|
|
26293
26708
|
}
|
|
26294
26709
|
/** `mcp({ searches: [...] })`:一次连接元数据并按 query 分组执行多组搜索。 */
|
|
26295
|
-
async executeBatchSearch(queries, serverHint) {
|
|
26710
|
+
async executeBatchSearch(queries, serverHint, context2) {
|
|
26296
26711
|
const normalized = [
|
|
26297
26712
|
...new Set(queries.map((query) => query.trim()).filter(Boolean))
|
|
26298
26713
|
].slice(0, MCP_BATCH_SEARCH_MAX_ITEMS);
|
|
@@ -26302,16 +26717,19 @@ ${formatSchema(tool.inputSchema, " ")}`);
|
|
|
26302
26717
|
const specs = serverHint ? this.specsMatching(serverHint) : this.specs;
|
|
26303
26718
|
await Promise.all(specs.map((spec) => this.ensureEntry(spec.serverName)));
|
|
26304
26719
|
const results = await Promise.all(normalized.map((query) => this.executeSearch(query, serverHint)));
|
|
26720
|
+
this.recordAction(context2, "search", results.some((result) => result.tools.length) ? "matched" : "no_hits", { results: results.map(({ query, tools }) => ({ query, tools })) });
|
|
26305
26721
|
return results.map((result, index) => `Query ${index + 1}: "${normalized[index]}"
|
|
26306
|
-
${result}`).join("\n\n");
|
|
26722
|
+
${result.text}`).join("\n\n");
|
|
26307
26723
|
}
|
|
26308
26724
|
/** `mcp({ describe: "tool" })`:输出工具所属 server + 参数 schema。 */
|
|
26309
|
-
async executeDescribe(toolName, serverHint, signal) {
|
|
26725
|
+
async executeDescribe(toolName, serverHint, signal, context2) {
|
|
26310
26726
|
const found = await this.findTool(toolName, serverHint, signal);
|
|
26311
26727
|
if (!found) {
|
|
26728
|
+
this.recordAction(context2, "describe", "not_found", { name: toolName });
|
|
26312
26729
|
return `Tool "${toolName}" not found. Use mcp({ search: "..." }) to search.`;
|
|
26313
26730
|
}
|
|
26314
26731
|
const { server, tool } = found;
|
|
26732
|
+
this.recordAction(context2, "describe", "matched", { server, name: tool.name, inputSchema: tool.inputSchema });
|
|
26315
26733
|
const lines = [
|
|
26316
26734
|
`${tool.name}`,
|
|
26317
26735
|
`Server: ${server}`,
|
|
@@ -26330,6 +26748,7 @@ ${formatSchema(tool.inputSchema)}`);
|
|
|
26330
26748
|
async executeCall(toolName, args, serverHint, signal, context2) {
|
|
26331
26749
|
const found = await this.findTool(toolName, serverHint, signal);
|
|
26332
26750
|
if (!found) {
|
|
26751
|
+
this.recordAction(context2, "call", "not_found", { name: toolName });
|
|
26333
26752
|
return `Tool "${toolName}" not found. Use mcp({ search: "..." }) to search.`;
|
|
26334
26753
|
}
|
|
26335
26754
|
const { entry, tool, spec } = found;
|
|
@@ -26341,11 +26760,17 @@ ${formatSchema(tool.inputSchema)}`);
|
|
|
26341
26760
|
context: context2
|
|
26342
26761
|
});
|
|
26343
26762
|
const result = await entry.server.callTool(tool.name, args, signal, {
|
|
26763
|
+
toolSchema: {
|
|
26764
|
+
inputSchema: tool.inputSchema,
|
|
26765
|
+
outputSchema: tool.outputSchema
|
|
26766
|
+
},
|
|
26344
26767
|
...headers ? { headers } : {},
|
|
26345
26768
|
...context2 ? { context: context2 } : {}
|
|
26346
26769
|
});
|
|
26770
|
+
this.recordAction(context2, "call", result && typeof result === "object" && "isError" in result && result.isError === true ? "failed" : "completed", { name: tool.name, server: spec.serverName });
|
|
26347
26771
|
return serializeToolResult(result);
|
|
26348
26772
|
} catch (error) {
|
|
26773
|
+
this.recordAction(context2, "call", signal?.aborted ? "cancelled" : "failed", { name: tool.name, server: spec.serverName });
|
|
26349
26774
|
const message = error instanceof Error ? error.message : String(error);
|
|
26350
26775
|
return `Tool "${toolName}" call failed: ${message}`;
|
|
26351
26776
|
}
|
|
@@ -27196,334 +27621,6 @@ function normalizeHookResources(resources) {
|
|
|
27196
27621
|
}).sort((a, b) => (a.config.order ?? 0) - (b.config.order ?? 0));
|
|
27197
27622
|
}
|
|
27198
27623
|
|
|
27199
|
-
// ../linkque-agent-protocol/dist/esm/telemetry/telemetryEnums.js
|
|
27200
|
-
var ETelemetryAttribute;
|
|
27201
|
-
(function(ETelemetryAttribute2) {
|
|
27202
|
-
ETelemetryAttribute2["HARNESS_TELEMETRY_SCHEMA_VERSION"] = "harness.telemetry.schema.version";
|
|
27203
|
-
ETelemetryAttribute2["LINKQUE_TELEMETRY_SCHEMA_VERSION"] = "linkque.telemetry.schema.version";
|
|
27204
|
-
ETelemetryAttribute2["LINKQUE_TELEMETRY_ADAPTER_VERSION"] = "linkque.telemetry.adapter.version";
|
|
27205
|
-
ETelemetryAttribute2["HARNESS_TELEMETRY_SOURCE"] = "harness.telemetry.source";
|
|
27206
|
-
ETelemetryAttribute2["HARNESS_TELEMETRY_EVIDENCE"] = "harness.telemetry.evidence";
|
|
27207
|
-
ETelemetryAttribute2["HARNESS_TELEMETRY_COMPLETENESS"] = "harness.telemetry.completeness";
|
|
27208
|
-
ETelemetryAttribute2["LINKQUE_RUNTIME_KIND"] = "linkque.runtime.kind";
|
|
27209
|
-
ETelemetryAttribute2["LINKQUE_RUN_ID"] = "linkque.run.id";
|
|
27210
|
-
ETelemetryAttribute2["LINKQUE_AGENT_ID"] = "linkque.agent.id";
|
|
27211
|
-
ETelemetryAttribute2["HARNESS_SESSION_ID"] = "harness.session.id";
|
|
27212
|
-
ETelemetryAttribute2["LINKQUE_CONVERSATION_ID"] = "linkque.conversation.id";
|
|
27213
|
-
ETelemetryAttribute2["LINKQUE_REQUEST_ID"] = "linkque.request.id";
|
|
27214
|
-
ETelemetryAttribute2["LINKQUE_TURN_ID"] = "linkque.turn.id";
|
|
27215
|
-
ETelemetryAttribute2["LINKQUE_ACCOUNT_ID"] = "linkque.account.id";
|
|
27216
|
-
ETelemetryAttribute2["LINKQUE_CHANNEL"] = "linkque.channel";
|
|
27217
|
-
ETelemetryAttribute2["LINKQUE_USER_KEY"] = "linkque.user.key";
|
|
27218
|
-
ETelemetryAttribute2["HARNESS_ADVANCE_ID"] = "harness.advance.id";
|
|
27219
|
-
ETelemetryAttribute2["HARNESS_CALL_ID"] = "harness.call.id";
|
|
27220
|
-
ETelemetryAttribute2["HARNESS_INVOCATION_ID"] = "harness.invocation.id";
|
|
27221
|
-
ETelemetryAttribute2["HARNESS_ATTEMPT_ID"] = "harness.attempt.id";
|
|
27222
|
-
ETelemetryAttribute2["HARNESS_ATTEMPT_VISIBILITY"] = "harness.attempt.visibility";
|
|
27223
|
-
ETelemetryAttribute2["HARNESS_ADVANCE_OUTCOME"] = "harness.advance.outcome";
|
|
27224
|
-
ETelemetryAttribute2["HARNESS_OPERATION_OUTCOME"] = "harness.operation.outcome";
|
|
27225
|
-
ETelemetryAttribute2["HARNESS_REMOTE_COMPLETION"] = "harness.remote.completion";
|
|
27226
|
-
ETelemetryAttribute2["HARNESS_STATE_COMMIT_STATUS"] = "harness.state.commit.status";
|
|
27227
|
-
ETelemetryAttribute2["LINKQUE_OPERATION_ID"] = "linkque.operation.id";
|
|
27228
|
-
ETelemetryAttribute2["LINKQUE_OPERATION_NAME"] = "linkque.operation.name";
|
|
27229
|
-
ETelemetryAttribute2["LINKQUE_OPERATION_PARENT_ID"] = "linkque.operation.parent_id";
|
|
27230
|
-
ETelemetryAttribute2["LINKQUE_SPAN_PARENT_ID"] = "linkque.span.parent_id";
|
|
27231
|
-
ETelemetryAttribute2["HARNESS_RECORD_ID"] = "harness.record.id";
|
|
27232
|
-
ETelemetryAttribute2["HARNESS_EVENT_SEQUENCE"] = "harness.event.sequence";
|
|
27233
|
-
ETelemetryAttribute2["ERROR_TYPE"] = "error.type";
|
|
27234
|
-
ETelemetryAttribute2["LINKQUE_STREAM_TERMINATION"] = "linkque.stream.termination";
|
|
27235
|
-
ETelemetryAttribute2["LINKQUE_STREAM_CANCEL_SOURCE"] = "linkque.stream.cancel_source";
|
|
27236
|
-
ETelemetryAttribute2["LINKQUE_TERMINAL_EVIDENCE"] = "linkque.terminal.evidence";
|
|
27237
|
-
ETelemetryAttribute2["LINKQUE_RUNTIME_CLEANUP_OUTCOME"] = "linkque.runtime.cleanup_outcome";
|
|
27238
|
-
ETelemetryAttribute2["LINKQUE_OBSERVATION_BOUNDARY"] = "linkque.observation.boundary";
|
|
27239
|
-
ETelemetryAttribute2["LINKQUE_LOOP_ITERATION_ID"] = "linkque.loop.iteration.id";
|
|
27240
|
-
ETelemetryAttribute2["LINKQUE_LOOP_ITERATION_INDEX"] = "linkque.loop.iteration.index";
|
|
27241
|
-
ETelemetryAttribute2["LINKQUE_STREAM_TERMINAL_SOURCE"] = "linkque.stream.terminal_source";
|
|
27242
|
-
ETelemetryAttribute2["LINKQUE_STREAM_PUBLIC_TEXT_DELTA_COUNT"] = "linkque.stream.public_text_delta_count";
|
|
27243
|
-
ETelemetryAttribute2["LINKQUE_STREAM_THINKING_DELTA_COUNT"] = "linkque.stream.thinking_delta_count";
|
|
27244
|
-
ETelemetryAttribute2["LINKQUE_MODEL_FIRST_CHUNK_MS"] = "linkque.model.first_chunk_ms";
|
|
27245
|
-
ETelemetryAttribute2["LINKQUE_MODEL_FIRST_TEXT_MS"] = "linkque.model.first_text_ms";
|
|
27246
|
-
ETelemetryAttribute2["LINKQUE_LOOP_FIRST_PUBLIC_TEXT_MS"] = "linkque.loop.first_public_text_ms";
|
|
27247
|
-
ETelemetryAttribute2["LINKQUE_MODEL_CHUNK_COUNT"] = "linkque.model.chunk_count";
|
|
27248
|
-
ETelemetryAttribute2["LINKQUE_MODEL_TEXT_CHARS"] = "linkque.model.text_chars";
|
|
27249
|
-
ETelemetryAttribute2["LINKQUE_MODEL_THINKING_CHARS"] = "linkque.model.thinking_chars";
|
|
27250
|
-
ETelemetryAttribute2["GEN_AI_OPERATION_NAME"] = "gen_ai.operation.name";
|
|
27251
|
-
ETelemetryAttribute2["GEN_AI_AGENT_NAME"] = "gen_ai.agent.name";
|
|
27252
|
-
ETelemetryAttribute2["GEN_AI_PROVIDER_NAME"] = "gen_ai.provider.name";
|
|
27253
|
-
ETelemetryAttribute2["GEN_AI_REQUEST_MODEL"] = "gen_ai.request.model";
|
|
27254
|
-
ETelemetryAttribute2["GEN_AI_RESPONSE_MODEL"] = "gen_ai.response.model";
|
|
27255
|
-
ETelemetryAttribute2["GEN_AI_RESPONSE_ID"] = "gen_ai.response.id";
|
|
27256
|
-
ETelemetryAttribute2["GEN_AI_RESPONSE_FINISH_REASONS"] = "gen_ai.response.finish_reasons";
|
|
27257
|
-
ETelemetryAttribute2["GEN_AI_USAGE_INPUT_TOKENS"] = "gen_ai.usage.input_tokens";
|
|
27258
|
-
ETelemetryAttribute2["GEN_AI_USAGE_OUTPUT_TOKENS"] = "gen_ai.usage.output_tokens";
|
|
27259
|
-
ETelemetryAttribute2["GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS"] = "gen_ai.usage.cache_read.input_tokens";
|
|
27260
|
-
ETelemetryAttribute2["GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS"] = "gen_ai.usage.cache_creation.input_tokens";
|
|
27261
|
-
ETelemetryAttribute2["GEN_AI_USAGE_REASONING_OUTPUT_TOKENS"] = "gen_ai.usage.reasoning.output_tokens";
|
|
27262
|
-
ETelemetryAttribute2["HARNESS_USAGE_SOURCE"] = "harness.usage.source";
|
|
27263
|
-
ETelemetryAttribute2["HARNESS_USAGE_ATTEMPT_COVERAGE"] = "harness.usage.attempt_coverage";
|
|
27264
|
-
ETelemetryAttribute2["HARNESS_MODEL_PURPOSE"] = "harness.model.purpose";
|
|
27265
|
-
ETelemetryAttribute2["HARNESS_MODEL_INVOCATION_COUNT"] = "harness.model.invocation_count";
|
|
27266
|
-
ETelemetryAttribute2["GEN_AI_TOOL_NAME"] = "gen_ai.tool.name";
|
|
27267
|
-
ETelemetryAttribute2["GEN_AI_TOOL_CALL_ID"] = "gen_ai.tool.call.id";
|
|
27268
|
-
ETelemetryAttribute2["HARNESS_TOOL_RESULT_STATUS"] = "harness.tool.result.status";
|
|
27269
|
-
ETelemetryAttribute2["LINKQUE_TOOL_FAILURE_STAGE"] = "linkque.tool.failure_stage";
|
|
27270
|
-
ETelemetryAttribute2["HARNESS_HOOK_NAME"] = "harness.hook.name";
|
|
27271
|
-
ETelemetryAttribute2["LINKQUE_HOOK_STAGE"] = "linkque.hook.stage";
|
|
27272
|
-
ETelemetryAttribute2["LINKQUE_HOOK_RESOURCE_ID"] = "linkque.hook.resource_id";
|
|
27273
|
-
ETelemetryAttribute2["LINKQUE_HOOK_EVENT_ID"] = "linkque.hook.event_id";
|
|
27274
|
-
ETelemetryAttribute2["LINKQUE_HOOK_MATCHED_COUNT"] = "linkque.hook.matched_count";
|
|
27275
|
-
ETelemetryAttribute2["LINKQUE_HOOK_PENDING_COUNT"] = "linkque.hook.pending_count";
|
|
27276
|
-
ETelemetryAttribute2["LINKQUE_HOOK_SCHEDULED_COUNT"] = "linkque.hook.scheduled_count";
|
|
27277
|
-
ETelemetryAttribute2["LINKQUE_HOOK_HAS_SIDE_EFFECTS"] = "linkque.hook.has_side_effects";
|
|
27278
|
-
ETelemetryAttribute2["LINKQUE_HOOK_MODE"] = "linkque.hook.mode";
|
|
27279
|
-
ETelemetryAttribute2["LINKQUE_HOOK_TIMEOUT_MS"] = "linkque.hook.timeout_ms";
|
|
27280
|
-
ETelemetryAttribute2["LINKQUE_HOOK_RESULT"] = "linkque.hook.result";
|
|
27281
|
-
ETelemetryAttribute2["HARNESS_MIDDLEWARE_NAME"] = "harness.middleware.name";
|
|
27282
|
-
ETelemetryAttribute2["HARNESS_MIDDLEWARE_INVOCATION_ID"] = "harness.middleware.invocation.id";
|
|
27283
|
-
ETelemetryAttribute2["LINKQUE_HOOK_EXECUTOR_SETTLED"] = "linkque.hook.executor_settled";
|
|
27284
|
-
ETelemetryAttribute2["LINKQUE_HISTORY_MESSAGE_COUNT"] = "linkque.history.message_count";
|
|
27285
|
-
ETelemetryAttribute2["LINKQUE_TELEMETRY_COVERAGE"] = "linkque.telemetry.coverage";
|
|
27286
|
-
ETelemetryAttribute2["LINKQUE_TELEMETRY_LOSS_REASON"] = "linkque.telemetry.loss_reason";
|
|
27287
|
-
ETelemetryAttribute2["LINKQUE_OPERATION_DURATION_MS"] = "linkque.operation.duration_ms";
|
|
27288
|
-
ETelemetryAttribute2["HTTP_RESPONSE_STATUS_CODE"] = "http.response.status_code";
|
|
27289
|
-
ETelemetryAttribute2["SERVICE_NAME"] = "service.name";
|
|
27290
|
-
ETelemetryAttribute2["SERVICE_NAMESPACE"] = "service.namespace";
|
|
27291
|
-
ETelemetryAttribute2["SERVICE_VERSION"] = "service.version";
|
|
27292
|
-
ETelemetryAttribute2["SERVICE_INSTANCE_ID"] = "service.instance.id";
|
|
27293
|
-
ETelemetryAttribute2["DEPLOYMENT_ENVIRONMENT_NAME"] = "deployment.environment.name";
|
|
27294
|
-
ETelemetryAttribute2["LINKQUE_LINK_RELATION"] = "linkque.link.relation";
|
|
27295
|
-
})(ETelemetryAttribute || (ETelemetryAttribute = {}));
|
|
27296
|
-
var ETelemetryEventPrefix;
|
|
27297
|
-
(function(ETelemetryEventPrefix2) {
|
|
27298
|
-
ETelemetryEventPrefix2["OPERATION"] = "linkque.operation";
|
|
27299
|
-
ETelemetryEventPrefix2["ADVANCE"] = "harness.advance";
|
|
27300
|
-
ETelemetryEventPrefix2["MODEL_INVOKE"] = "harness.model.invoke";
|
|
27301
|
-
ETelemetryEventPrefix2["MODEL_ATTEMPT"] = "harness.model.attempt";
|
|
27302
|
-
ETelemetryEventPrefix2["TOOL_INVOKE"] = "harness.tool.invoke";
|
|
27303
|
-
ETelemetryEventPrefix2["TOOL_ATTEMPT"] = "harness.tool.attempt";
|
|
27304
|
-
ETelemetryEventPrefix2["HOOK_CHAIN"] = "harness.hook.chain";
|
|
27305
|
-
ETelemetryEventPrefix2["MIDDLEWARE"] = "harness.middleware";
|
|
27306
|
-
ETelemetryEventPrefix2["LOOP"] = "linkque.loop";
|
|
27307
|
-
ETelemetryEventPrefix2["LOOP_ITERATION"] = "linkque.loop.iteration";
|
|
27308
|
-
ETelemetryEventPrefix2["HISTORY_APPEND"] = "linkque.history.append";
|
|
27309
|
-
ETelemetryEventPrefix2["HOOK_DRAIN"] = "linkque.hook.drain";
|
|
27310
|
-
})(ETelemetryEventPrefix || (ETelemetryEventPrefix = {}));
|
|
27311
|
-
var ETelemetryEventPhase;
|
|
27312
|
-
(function(ETelemetryEventPhase2) {
|
|
27313
|
-
ETelemetryEventPhase2["STARTED"] = "started";
|
|
27314
|
-
ETelemetryEventPhase2["FINISHED"] = "finished";
|
|
27315
|
-
ETelemetryEventPhase2["OBSERVATION_LOST"] = "observation_lost";
|
|
27316
|
-
})(ETelemetryEventPhase || (ETelemetryEventPhase = {}));
|
|
27317
|
-
var ETelemetryEventName;
|
|
27318
|
-
(function(ETelemetryEventName2) {
|
|
27319
|
-
ETelemetryEventName2["TOOL_EXECUTION_FAILED"] = "linkque.tool.execution.failed";
|
|
27320
|
-
ETelemetryEventName2["TELEMETRY_COVERAGE"] = "linkque.telemetry.coverage";
|
|
27321
|
-
ETelemetryEventName2["HOOK_MATCHED"] = "linkque.hook.matched";
|
|
27322
|
-
ETelemetryEventName2["HOOK_SCHEDULED"] = "linkque.hook.scheduled";
|
|
27323
|
-
ETelemetryEventName2["HOOK_CANCEL_REQUESTED"] = "linkque.hook.cancel_requested";
|
|
27324
|
-
ETelemetryEventName2["HOOK_TIMEOUT_REQUESTED"] = "linkque.hook.timeout_requested";
|
|
27325
|
-
ETelemetryEventName2["HOOK_EXECUTOR_SETTLED"] = "linkque.hook.executor_settled";
|
|
27326
|
-
ETelemetryEventName2["HOOK_WAIT_FINISHED"] = "linkque.hook.wait_finished";
|
|
27327
|
-
ETelemetryEventName2["LOOP_FIRST_PUBLIC_TEXT"] = "linkque.loop.first_public_text";
|
|
27328
|
-
ETelemetryEventName2["STREAM_TERMINAL_OBSERVED"] = "linkque.stream.terminal_observed";
|
|
27329
|
-
ETelemetryEventName2["MODEL_FIRST_CHUNK"] = "harness.model.first_chunk";
|
|
27330
|
-
ETelemetryEventName2["MODEL_FIRST_TEXT"] = "harness.model.first_text";
|
|
27331
|
-
ETelemetryEventName2["MODEL_USAGE_RECORDED"] = "linkque.model.usage.recorded";
|
|
27332
|
-
ETelemetryEventName2["MODEL_RESPONSE_HEADERS"] = "linkque.model.response_headers";
|
|
27333
|
-
ETelemetryEventName2["OPERATION_OBSERVATION_LOST"] = "linkque.operation.observation_lost";
|
|
27334
|
-
ETelemetryEventName2["RUNTIME_UNCAUGHT_ERROR"] = "linkque.runtime.uncaught_error";
|
|
27335
|
-
ETelemetryEventName2["OPERATION_STARTED"] = "linkque.operation.started";
|
|
27336
|
-
ETelemetryEventName2["OPERATION_FINISHED"] = "linkque.operation.finished";
|
|
27337
|
-
ETelemetryEventName2["ADVANCE_STARTED"] = "harness.advance.started";
|
|
27338
|
-
ETelemetryEventName2["ADVANCE_FINISHED"] = "harness.advance.finished";
|
|
27339
|
-
ETelemetryEventName2["MODEL_INVOKE_STARTED"] = "harness.model.invoke.started";
|
|
27340
|
-
ETelemetryEventName2["MODEL_INVOKE_FINISHED"] = "harness.model.invoke.finished";
|
|
27341
|
-
ETelemetryEventName2["MODEL_ATTEMPT_STARTED"] = "harness.model.attempt.started";
|
|
27342
|
-
ETelemetryEventName2["MODEL_ATTEMPT_FINISHED"] = "harness.model.attempt.finished";
|
|
27343
|
-
ETelemetryEventName2["TOOL_INVOKE_STARTED"] = "harness.tool.invoke.started";
|
|
27344
|
-
ETelemetryEventName2["TOOL_INVOKE_FINISHED"] = "harness.tool.invoke.finished";
|
|
27345
|
-
ETelemetryEventName2["TOOL_ATTEMPT_STARTED"] = "harness.tool.attempt.started";
|
|
27346
|
-
ETelemetryEventName2["TOOL_ATTEMPT_FINISHED"] = "harness.tool.attempt.finished";
|
|
27347
|
-
ETelemetryEventName2["HOOK_CHAIN_STARTED"] = "harness.hook.chain.started";
|
|
27348
|
-
ETelemetryEventName2["HOOK_CHAIN_FINISHED"] = "harness.hook.chain.finished";
|
|
27349
|
-
ETelemetryEventName2["MIDDLEWARE_STARTED"] = "harness.middleware.started";
|
|
27350
|
-
ETelemetryEventName2["MIDDLEWARE_FINISHED"] = "harness.middleware.finished";
|
|
27351
|
-
ETelemetryEventName2["LOOP_STARTED"] = "linkque.loop.started";
|
|
27352
|
-
ETelemetryEventName2["LOOP_FINISHED"] = "linkque.loop.finished";
|
|
27353
|
-
ETelemetryEventName2["LOOP_ITERATION_STARTED"] = "linkque.loop.iteration.started";
|
|
27354
|
-
ETelemetryEventName2["LOOP_ITERATION_FINISHED"] = "linkque.loop.iteration.finished";
|
|
27355
|
-
ETelemetryEventName2["HISTORY_APPEND_STARTED"] = "linkque.history.append.started";
|
|
27356
|
-
ETelemetryEventName2["HISTORY_APPEND_FINISHED"] = "linkque.history.append.finished";
|
|
27357
|
-
ETelemetryEventName2["HOOK_DRAIN_STARTED"] = "linkque.hook.drain.started";
|
|
27358
|
-
ETelemetryEventName2["HOOK_DRAIN_FINISHED"] = "linkque.hook.drain.finished";
|
|
27359
|
-
})(ETelemetryEventName || (ETelemetryEventName = {}));
|
|
27360
|
-
var ETelemetryOperationName;
|
|
27361
|
-
(function(ETelemetryOperationName2) {
|
|
27362
|
-
ETelemetryOperationName2["OPERATION"] = "linkque.operation";
|
|
27363
|
-
ETelemetryOperationName2["TOOL_INVOKE"] = "harness.tool.invoke";
|
|
27364
|
-
ETelemetryOperationName2["ADVANCE"] = "harness.advance";
|
|
27365
|
-
ETelemetryOperationName2["MODEL_INVOKE"] = "harness.model.invoke";
|
|
27366
|
-
ETelemetryOperationName2["MODEL_ATTEMPT"] = "harness.model.attempt";
|
|
27367
|
-
ETelemetryOperationName2["TOOL_ATTEMPT"] = "harness.tool.attempt";
|
|
27368
|
-
ETelemetryOperationName2["HOOK_CHAIN"] = "harness.hook.chain";
|
|
27369
|
-
ETelemetryOperationName2["MIDDLEWARE"] = "harness.middleware";
|
|
27370
|
-
ETelemetryOperationName2["LOOP"] = "linkque.agent.loop";
|
|
27371
|
-
ETelemetryOperationName2["ITERATION"] = "linkque.agent.iteration";
|
|
27372
|
-
ETelemetryOperationName2["SESSION_LOAD"] = "harness.session.load";
|
|
27373
|
-
ETelemetryOperationName2["HISTORY_APPEND"] = "linkque.history.append";
|
|
27374
|
-
ETelemetryOperationName2["CLEANUP"] = "linkque.runtime.cleanup";
|
|
27375
|
-
ETelemetryOperationName2["HOOK_DRAIN"] = "linkque.hook.drain";
|
|
27376
|
-
})(ETelemetryOperationName || (ETelemetryOperationName = {}));
|
|
27377
|
-
var ETelemetryOutcome;
|
|
27378
|
-
(function(ETelemetryOutcome2) {
|
|
27379
|
-
ETelemetryOutcome2["SUCCESS"] = "success";
|
|
27380
|
-
ETelemetryOutcome2["ERROR"] = "error";
|
|
27381
|
-
ETelemetryOutcome2["CANCELLED"] = "cancelled";
|
|
27382
|
-
ETelemetryOutcome2["TIMEOUT"] = "timeout";
|
|
27383
|
-
ETelemetryOutcome2["REJECTED"] = "rejected";
|
|
27384
|
-
ETelemetryOutcome2["UNKNOWN"] = "unknown";
|
|
27385
|
-
})(ETelemetryOutcome || (ETelemetryOutcome = {}));
|
|
27386
|
-
var ETelemetrySignal;
|
|
27387
|
-
(function(ETelemetrySignal2) {
|
|
27388
|
-
ETelemetrySignal2["LOGS"] = "logs";
|
|
27389
|
-
ETelemetrySignal2["TRACES"] = "traces";
|
|
27390
|
-
})(ETelemetrySignal || (ETelemetrySignal = {}));
|
|
27391
|
-
var ETelemetryLossReason;
|
|
27392
|
-
(function(ETelemetryLossReason2) {
|
|
27393
|
-
ETelemetryLossReason2["UNCAUGHT_ERROR"] = "uncaught_error";
|
|
27394
|
-
ETelemetryLossReason2["ACTIVE_LIMIT"] = "active_limit";
|
|
27395
|
-
ETelemetryLossReason2["ACTIVE_EXPIRED"] = "active_expired";
|
|
27396
|
-
ETelemetryLossReason2["SHUTDOWN"] = "shutdown";
|
|
27397
|
-
})(ETelemetryLossReason || (ETelemetryLossReason = {}));
|
|
27398
|
-
var ETelemetryAdvanceOutcome;
|
|
27399
|
-
(function(ETelemetryAdvanceOutcome2) {
|
|
27400
|
-
ETelemetryAdvanceOutcome2["FAILED"] = "failed";
|
|
27401
|
-
ETelemetryAdvanceOutcome2["COMPLETED"] = "completed";
|
|
27402
|
-
ETelemetryAdvanceOutcome2["UNKNOWN"] = "unknown";
|
|
27403
|
-
})(ETelemetryAdvanceOutcome || (ETelemetryAdvanceOutcome = {}));
|
|
27404
|
-
var ETelemetryStreamTermination;
|
|
27405
|
-
(function(ETelemetryStreamTermination2) {
|
|
27406
|
-
ETelemetryStreamTermination2["CANCEL"] = "cancel";
|
|
27407
|
-
ETelemetryStreamTermination2["ERROR"] = "error";
|
|
27408
|
-
ETelemetryStreamTermination2["COMPLETE"] = "complete";
|
|
27409
|
-
ETelemetryStreamTermination2["EXHAUSTED"] = "exhausted";
|
|
27410
|
-
})(ETelemetryStreamTermination || (ETelemetryStreamTermination = {}));
|
|
27411
|
-
var ETelemetryCancelSource;
|
|
27412
|
-
(function(ETelemetryCancelSource2) {
|
|
27413
|
-
ETelemetryCancelSource2["HOST_SIGNAL"] = "host_signal";
|
|
27414
|
-
ETelemetryCancelSource2["CONSUMER_RETURN"] = "consumer_return";
|
|
27415
|
-
})(ETelemetryCancelSource || (ETelemetryCancelSource = {}));
|
|
27416
|
-
var ETelemetryObservationBoundary;
|
|
27417
|
-
(function(ETelemetryObservationBoundary2) {
|
|
27418
|
-
ETelemetryObservationBoundary2["LOCAL_WAIT"] = "local_wait";
|
|
27419
|
-
ETelemetryObservationBoundary2["EXECUTOR_SETTLED"] = "executor_settled";
|
|
27420
|
-
ETelemetryObservationBoundary2["GENERATOR_WITH_SETUP_AND_CLEANUP"] = "generator_with_setup_and_cleanup";
|
|
27421
|
-
})(ETelemetryObservationBoundary || (ETelemetryObservationBoundary = {}));
|
|
27422
|
-
var ETelemetryRemoteCompletion;
|
|
27423
|
-
(function(ETelemetryRemoteCompletion2) {
|
|
27424
|
-
ETelemetryRemoteCompletion2["UNKNOWN"] = "unknown";
|
|
27425
|
-
ETelemetryRemoteCompletion2["NOT_DISPATCHED"] = "not_dispatched";
|
|
27426
|
-
ETelemetryRemoteCompletion2["CONFIRMED"] = "confirmed";
|
|
27427
|
-
})(ETelemetryRemoteCompletion || (ETelemetryRemoteCompletion = {}));
|
|
27428
|
-
var ETelemetryCommitStatus;
|
|
27429
|
-
(function(ETelemetryCommitStatus2) {
|
|
27430
|
-
ETelemetryCommitStatus2["COMMITTED"] = "committed";
|
|
27431
|
-
ETelemetryCommitStatus2["FAILED"] = "failed";
|
|
27432
|
-
})(ETelemetryCommitStatus || (ETelemetryCommitStatus = {}));
|
|
27433
|
-
var ETelemetryHookMode;
|
|
27434
|
-
(function(ETelemetryHookMode2) {
|
|
27435
|
-
ETelemetryHookMode2["AWAITED"] = "awaited";
|
|
27436
|
-
ETelemetryHookMode2["DETACHED"] = "detached";
|
|
27437
|
-
})(ETelemetryHookMode || (ETelemetryHookMode = {}));
|
|
27438
|
-
var ETelemetryHookResult;
|
|
27439
|
-
(function(ETelemetryHookResult2) {
|
|
27440
|
-
ETelemetryHookResult2["OK"] = "ok";
|
|
27441
|
-
ETelemetryHookResult2["TIMEOUT"] = "timeout";
|
|
27442
|
-
ETelemetryHookResult2["SKIPPED"] = "skipped";
|
|
27443
|
-
ETelemetryHookResult2["SUCCESS"] = "success";
|
|
27444
|
-
ETelemetryHookResult2["ERROR"] = "error";
|
|
27445
|
-
})(ETelemetryHookResult || (ETelemetryHookResult = {}));
|
|
27446
|
-
var ETelemetrySource;
|
|
27447
|
-
(function(ETelemetrySource2) {
|
|
27448
|
-
ETelemetrySource2["KERNEL"] = "kernel";
|
|
27449
|
-
ETelemetrySource2["PROVIDER"] = "provider";
|
|
27450
|
-
})(ETelemetrySource || (ETelemetrySource = {}));
|
|
27451
|
-
var ETelemetryEvidence;
|
|
27452
|
-
(function(ETelemetryEvidence2) {
|
|
27453
|
-
ETelemetryEvidence2["OBSERVED"] = "observed";
|
|
27454
|
-
})(ETelemetryEvidence || (ETelemetryEvidence = {}));
|
|
27455
|
-
var ETelemetryCompleteness;
|
|
27456
|
-
(function(ETelemetryCompleteness2) {
|
|
27457
|
-
ETelemetryCompleteness2["COMPLETE"] = "complete";
|
|
27458
|
-
ETelemetryCompleteness2["PARTIAL"] = "partial";
|
|
27459
|
-
})(ETelemetryCompleteness || (ETelemetryCompleteness = {}));
|
|
27460
|
-
var ETelemetryCoverage;
|
|
27461
|
-
(function(ETelemetryCoverage2) {
|
|
27462
|
-
ETelemetryCoverage2["PI_MODEL_TOOL_HOOK"] = "pi_model_tool_hook";
|
|
27463
|
-
ETelemetryCoverage2["CORE_ONLY"] = "core_only";
|
|
27464
|
-
})(ETelemetryCoverage || (ETelemetryCoverage = {}));
|
|
27465
|
-
var ETelemetryUsageSource;
|
|
27466
|
-
(function(ETelemetryUsageSource2) {
|
|
27467
|
-
ETelemetryUsageSource2["UNKNOWN"] = "unknown";
|
|
27468
|
-
ETelemetryUsageSource2["PROVIDER_NORMALIZED"] = "provider_normalized";
|
|
27469
|
-
})(ETelemetryUsageSource || (ETelemetryUsageSource = {}));
|
|
27470
|
-
var ETelemetryAttemptVisibility;
|
|
27471
|
-
(function(ETelemetryAttemptVisibility2) {
|
|
27472
|
-
ETelemetryAttemptVisibility2["PROVIDER_INVOCATION"] = "provider_invocation";
|
|
27473
|
-
ETelemetryAttemptVisibility2["TOOL_PROVIDER_INVOCATION"] = "tool_provider_invocation";
|
|
27474
|
-
})(ETelemetryAttemptVisibility || (ETelemetryAttemptVisibility = {}));
|
|
27475
|
-
var ETelemetryLinkRelation;
|
|
27476
|
-
(function(ETelemetryLinkRelation2) {
|
|
27477
|
-
ETelemetryLinkRelation2["GENERATED_BY"] = "generated_by";
|
|
27478
|
-
ETelemetryLinkRelation2["SCHEDULED_BY"] = "scheduled_by";
|
|
27479
|
-
})(ETelemetryLinkRelation || (ETelemetryLinkRelation = {}));
|
|
27480
|
-
var ETelemetryToolFailureStage;
|
|
27481
|
-
(function(ETelemetryToolFailureStage2) {
|
|
27482
|
-
ETelemetryToolFailureStage2["BEFORE_HOOK"] = "before_hook";
|
|
27483
|
-
ETelemetryToolFailureStage2["EXECUTION"] = "execution";
|
|
27484
|
-
ETelemetryToolFailureStage2["AFTER_HOOK"] = "after_hook";
|
|
27485
|
-
})(ETelemetryToolFailureStage || (ETelemetryToolFailureStage = {}));
|
|
27486
|
-
var ETelemetryTerminalEvidence;
|
|
27487
|
-
(function(ETelemetryTerminalEvidence2) {
|
|
27488
|
-
ETelemetryTerminalEvidence2["EXPLICIT_DONE_HISTORY_COMMITTED"] = "explicit_done_history_committed";
|
|
27489
|
-
ETelemetryTerminalEvidence2["EXPLICIT_DONE"] = "explicit_done";
|
|
27490
|
-
ETelemetryTerminalEvidence2["STREAM_ERROR"] = "stream_error";
|
|
27491
|
-
ETelemetryTerminalEvidence2["CONSUMER_CANCEL"] = "consumer_cancel";
|
|
27492
|
-
ETelemetryTerminalEvidence2["NATURAL_EXHAUSTION"] = "natural_exhaustion";
|
|
27493
|
-
})(ETelemetryTerminalEvidence || (ETelemetryTerminalEvidence = {}));
|
|
27494
|
-
var ETelemetryTerminalSource;
|
|
27495
|
-
(function(ETelemetryTerminalSource2) {
|
|
27496
|
-
ETelemetryTerminalSource2["NATIVE_AGENT_END"] = "native_agent_end";
|
|
27497
|
-
ETelemetryTerminalSource2["PROMPT_RESOLVED_FALLBACK"] = "prompt_resolved_fallback";
|
|
27498
|
-
})(ETelemetryTerminalSource || (ETelemetryTerminalSource = {}));
|
|
27499
|
-
var ETelemetryModelPurpose;
|
|
27500
|
-
(function(ETelemetryModelPurpose2) {
|
|
27501
|
-
ETelemetryModelPurpose2["AGENT_LOOP"] = "agent_loop";
|
|
27502
|
-
})(ETelemetryModelPurpose || (ETelemetryModelPurpose = {}));
|
|
27503
|
-
var ETelemetryErrorType;
|
|
27504
|
-
(function(ETelemetryErrorType2) {
|
|
27505
|
-
ETelemetryErrorType2["PROVIDER_STREAM_ERROR"] = "ProviderStreamError";
|
|
27506
|
-
ETelemetryErrorType2["TOOL_EXECUTION_ERROR"] = "ToolExecutionError";
|
|
27507
|
-
ETelemetryErrorType2["HOOK_DISPATCH_ERROR"] = "HookDispatchError";
|
|
27508
|
-
ETelemetryErrorType2["HOOK_DRAIN_ERROR"] = "HookDrainError";
|
|
27509
|
-
})(ETelemetryErrorType || (ETelemetryErrorType = {}));
|
|
27510
|
-
var ETelemetrySpanKind;
|
|
27511
|
-
(function(ETelemetrySpanKind2) {
|
|
27512
|
-
ETelemetrySpanKind2["INTERNAL"] = "internal";
|
|
27513
|
-
ETelemetrySpanKind2["CLIENT"] = "client";
|
|
27514
|
-
})(ETelemetrySpanKind || (ETelemetrySpanKind = {}));
|
|
27515
|
-
var ETelemetryGenAiOperation;
|
|
27516
|
-
(function(ETelemetryGenAiOperation2) {
|
|
27517
|
-
ETelemetryGenAiOperation2["CHAT"] = "chat";
|
|
27518
|
-
ETelemetryGenAiOperation2["EXECUTE_TOOL"] = "execute_tool";
|
|
27519
|
-
ETelemetryGenAiOperation2["INVOKE_AGENT"] = "invoke_agent";
|
|
27520
|
-
})(ETelemetryGenAiOperation || (ETelemetryGenAiOperation = {}));
|
|
27521
|
-
var ETelemetryVersion;
|
|
27522
|
-
(function(ETelemetryVersion2) {
|
|
27523
|
-
ETelemetryVersion2["V0_2"] = "0.2";
|
|
27524
|
-
ETelemetryVersion2["V1_0"] = "1.0";
|
|
27525
|
-
})(ETelemetryVersion || (ETelemetryVersion = {}));
|
|
27526
|
-
|
|
27527
27624
|
// ../linkque-agent-runtime/dist/esm/core/hook/hookDispatcher.js
|
|
27528
27625
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
27529
27626
|
|
|
@@ -28754,18 +28851,45 @@ function createActivateSkillTool(records) {
|
|
|
28754
28851
|
required: ["name"],
|
|
28755
28852
|
additionalProperties: false
|
|
28756
28853
|
},
|
|
28757
|
-
execute: async (args) => {
|
|
28854
|
+
execute: async (args, _signal, context2) => {
|
|
28758
28855
|
const name = extractName(args);
|
|
28759
|
-
|
|
28856
|
+
const startedAt = Date.now();
|
|
28857
|
+
const obs = context2?.observation;
|
|
28858
|
+
recordContentSection(obs, ETelemetryContentSection.SKILL_INPUT, {
|
|
28859
|
+
name: name ?? null
|
|
28860
|
+
});
|
|
28861
|
+
if (!name) {
|
|
28862
|
+
recordContentSection(obs, ETelemetryContentSection.SKILL_OUTPUT, {
|
|
28863
|
+
status: "failed",
|
|
28864
|
+
error: "\u7F3A\u5C11 name \u53C2\u6570",
|
|
28865
|
+
durationMs: Date.now() - startedAt
|
|
28866
|
+
});
|
|
28760
28867
|
return "\u6FC0\u6D3B\u6280\u80FD\u5931\u8D25:\u7F3A\u5C11 name \u53C2\u6570\u3002";
|
|
28868
|
+
}
|
|
28761
28869
|
if (!bodyByName.has(name)) {
|
|
28870
|
+
recordContentSection(obs, ETelemetryContentSection.SKILL_OUTPUT, {
|
|
28871
|
+
name,
|
|
28872
|
+
status: "failed",
|
|
28873
|
+
error: `\u672A\u627E\u5230\u6280\u80FD "${name}"`,
|
|
28874
|
+
durationMs: Date.now() - startedAt
|
|
28875
|
+
});
|
|
28762
28876
|
return `\u6FC0\u6D3B\u6280\u80FD\u5931\u8D25:\u672A\u627E\u5230\u6280\u80FD "${name}"\u3002\u53EF\u7528:${[...bodyByName.keys()].join(", ")}`;
|
|
28763
28877
|
}
|
|
28764
28878
|
if (activated.has(name)) {
|
|
28879
|
+
recordContentSection(obs, ETelemetryContentSection.SKILL_OUTPUT, {
|
|
28880
|
+
name,
|
|
28881
|
+
status: "already_loaded",
|
|
28882
|
+
durationMs: Date.now() - startedAt
|
|
28883
|
+
});
|
|
28765
28884
|
return `\u6280\u80FD "${name}" \u5DF2\u5728\u672C\u8F6E\u52A0\u8F7D,\u65E0\u9700\u91CD\u590D\u6FC0\u6D3B\u3002`;
|
|
28766
28885
|
}
|
|
28767
28886
|
activated.add(name);
|
|
28768
28887
|
const body = bodyByName.get(name) ?? "";
|
|
28888
|
+
recordContentSection(obs, ETelemetryContentSection.SKILL_OUTPUT, {
|
|
28889
|
+
name,
|
|
28890
|
+
status: "loaded",
|
|
28891
|
+
durationMs: Date.now() - startedAt
|
|
28892
|
+
});
|
|
28769
28893
|
return `<skill name="${escapeXml(name)}">
|
|
28770
28894
|
${body}
|
|
28771
28895
|
</skill>`;
|
|
@@ -29016,7 +29140,7 @@ function createKnowledgeTools(resources, searchPort, agentId) {
|
|
|
29016
29140
|
additionalProperties: false
|
|
29017
29141
|
},
|
|
29018
29142
|
annotations: { readOnlyHint: true },
|
|
29019
|
-
execute: () => listKnowledge()
|
|
29143
|
+
execute: (_args, _signal, context2) => listKnowledge(context2)
|
|
29020
29144
|
},
|
|
29021
29145
|
{
|
|
29022
29146
|
name: KNOWLEDGE_RECALL_TOOL_NAME,
|
|
@@ -29043,24 +29167,48 @@ function createKnowledgeTools(resources, searchPort, agentId) {
|
|
|
29043
29167
|
additionalProperties: false
|
|
29044
29168
|
},
|
|
29045
29169
|
annotations: { readOnlyHint: true },
|
|
29046
|
-
execute: (args, signal) => recallKnowledge(args, signal)
|
|
29170
|
+
execute: (args, signal, context2) => recallKnowledge(args, signal, context2)
|
|
29047
29171
|
}
|
|
29048
29172
|
];
|
|
29049
|
-
async function listKnowledge() {
|
|
29050
|
-
|
|
29173
|
+
async function listKnowledge(context2) {
|
|
29174
|
+
const result = { knowledgeBases: await getKnowledgeBases() };
|
|
29175
|
+
recordContentSection(context2?.observation, ETelemetryContentSection.KNOWLEDGE_OUTPUT, {
|
|
29176
|
+
knowledgeBases: result.knowledgeBases.map((kb) => ({
|
|
29177
|
+
knowledgeBaseId: kb.knowledgeBaseId,
|
|
29178
|
+
knowledgeDesc: kb.knowledgeDesc
|
|
29179
|
+
}))
|
|
29180
|
+
});
|
|
29181
|
+
return result;
|
|
29051
29182
|
}
|
|
29052
|
-
async function recallKnowledge(args, signal) {
|
|
29183
|
+
async function recallKnowledge(args, signal, context2) {
|
|
29053
29184
|
const parsed = parseRecallArgs(args);
|
|
29185
|
+
const obs = context2?.observation;
|
|
29054
29186
|
if ("error" in parsed) {
|
|
29187
|
+
recordContentSection(obs, ETelemetryContentSection.KNOWLEDGE_INPUT, {
|
|
29188
|
+
error: parsed.error
|
|
29189
|
+
});
|
|
29190
|
+
recordContentSection(obs, ETelemetryContentSection.KNOWLEDGE_OUTPUT, {
|
|
29191
|
+
status: "failed",
|
|
29192
|
+
hits: [],
|
|
29193
|
+
error: parsed.error
|
|
29194
|
+
});
|
|
29055
29195
|
return { hits: [], error: parsed.error };
|
|
29056
29196
|
}
|
|
29197
|
+
recordContentSection(obs, ETelemetryContentSection.KNOWLEDGE_INPUT, {
|
|
29198
|
+
knowledgeBaseId: parsed.knowledgeBaseId,
|
|
29199
|
+
query: parsed.query,
|
|
29200
|
+
topK: parsed.topK
|
|
29201
|
+
});
|
|
29057
29202
|
const knowledgeBases = await getKnowledgeBases();
|
|
29058
29203
|
const bound = knowledgeBases.some((info) => info.knowledgeBaseId === parsed.knowledgeBaseId);
|
|
29059
29204
|
if (!bound) {
|
|
29060
|
-
|
|
29205
|
+
const error = `knowledgeBaseId \u672A\u7ED1\u5B9A: ${parsed.knowledgeBaseId}\u3002\u8BF7\u5148\u8C03\u7528 knowledge_list \u67E5\u770B\u53EF\u7528\u77E5\u8BC6\u5E93\u3002`;
|
|
29206
|
+
recordContentSection(obs, ETelemetryContentSection.KNOWLEDGE_OUTPUT, {
|
|
29207
|
+
status: "failed",
|
|
29061
29208
|
hits: [],
|
|
29062
|
-
error
|
|
29063
|
-
};
|
|
29209
|
+
error
|
|
29210
|
+
});
|
|
29211
|
+
return { hits: [], error };
|
|
29064
29212
|
}
|
|
29065
29213
|
try {
|
|
29066
29214
|
const result = await searchPort.search({
|
|
@@ -29069,10 +29217,20 @@ function createKnowledgeTools(resources, searchPort, agentId) {
|
|
|
29069
29217
|
agentId,
|
|
29070
29218
|
topK: parsed.topK
|
|
29071
29219
|
}, signal);
|
|
29220
|
+
recordContentSection(obs, ETelemetryContentSection.KNOWLEDGE_OUTPUT, {
|
|
29221
|
+
status: result.hits.length ? "matched" : "no_hits",
|
|
29222
|
+
hits: result.hits
|
|
29223
|
+
});
|
|
29072
29224
|
return { hits: result.hits };
|
|
29073
29225
|
} catch (e) {
|
|
29074
29226
|
const msg = e instanceof Error ? e.message : String(e);
|
|
29075
|
-
|
|
29227
|
+
const error = `\u77E5\u8BC6\u5E93\u68C0\u7D22\u5931\u8D25: ${msg}`;
|
|
29228
|
+
recordContentSection(obs, ETelemetryContentSection.KNOWLEDGE_OUTPUT, {
|
|
29229
|
+
status: "failed",
|
|
29230
|
+
hits: [],
|
|
29231
|
+
error
|
|
29232
|
+
});
|
|
29233
|
+
return { hits: [], error };
|
|
29076
29234
|
}
|
|
29077
29235
|
}
|
|
29078
29236
|
async function getKnowledgeBases() {
|
|
@@ -29099,7 +29257,7 @@ var NoopRuntimeObservation = class {
|
|
|
29099
29257
|
startOperation(_operation) {
|
|
29100
29258
|
return this;
|
|
29101
29259
|
}
|
|
29102
|
-
record(_name, _attributes) {
|
|
29260
|
+
record(_name, _attributes, _body) {
|
|
29103
29261
|
}
|
|
29104
29262
|
finish(_outcome, _attributes) {
|
|
29105
29263
|
}
|
|
@@ -29182,7 +29340,7 @@ var RuntimeObservation = class _RuntimeObservation {
|
|
|
29182
29340
|
find(key) {
|
|
29183
29341
|
return this.associations.get(key);
|
|
29184
29342
|
}
|
|
29185
|
-
record(name, attributes) {
|
|
29343
|
+
record(name, attributes, body) {
|
|
29186
29344
|
if (this.abandoned)
|
|
29187
29345
|
return;
|
|
29188
29346
|
try {
|
|
@@ -29190,7 +29348,7 @@ var RuntimeObservation = class _RuntimeObservation {
|
|
|
29190
29348
|
this.resultAttributes = {
|
|
29191
29349
|
[ETelemetryAttribute.LINKQUE_TOOL_FAILURE_STAGE]: attributes[ETelemetryAttribute.LINKQUE_TOOL_FAILURE_STAGE]
|
|
29192
29350
|
};
|
|
29193
|
-
this.sink.record(name, attributes);
|
|
29351
|
+
this.sink.record(name, attributes, body);
|
|
29194
29352
|
} catch {
|
|
29195
29353
|
}
|
|
29196
29354
|
}
|
|
@@ -35782,7 +35940,14 @@ var RemoteGatewayMcpServerProvider = class {
|
|
|
35782
35940
|
if (!this.debugLog)
|
|
35783
35941
|
return;
|
|
35784
35942
|
try {
|
|
35785
|
-
this.debugLog(`[mcp-client] ${JSON.stringify({
|
|
35943
|
+
this.debugLog(`[mcp-client] ${JSON.stringify({
|
|
35944
|
+
serverName,
|
|
35945
|
+
resourceId: resource.resourceId,
|
|
35946
|
+
requestId,
|
|
35947
|
+
method,
|
|
35948
|
+
phase,
|
|
35949
|
+
payload: this.invocationContext.current()?.auth ? { redacted: true } : payload
|
|
35950
|
+
})}`, EDebugLogScope.MCP);
|
|
35786
35951
|
} catch (error) {
|
|
35787
35952
|
warnLogFailure("remoteGatewayMcpServer.log", error);
|
|
35788
35953
|
}
|
|
@@ -35802,6 +35967,8 @@ var RemoteGatewayMcpServerProvider = class {
|
|
|
35802
35967
|
callTool: (params, resultSchema, requestOptions) => request("tools/call", params, () => client.callTool(params, resultSchema, requestOptions))
|
|
35803
35968
|
};
|
|
35804
35969
|
const callTool = (name, args, signal, options) => callHeaders.run(options?.headers ?? {}, () => this.invocationContext.run(timeoutMs, signal, async (invocation) => {
|
|
35970
|
+
const observation = options?.context?.observation;
|
|
35971
|
+
recordMcpContentSection(observation, ETelemetryContentSection.MCP_REQUESTED_INPUT, args, options?.toolSchema?.inputSchema);
|
|
35805
35972
|
const plan = createArgsMappingPlan(name, args, argsMappingRules);
|
|
35806
35973
|
if (plan.requiresUserId) {
|
|
35807
35974
|
if (config.signEndpoint !== void 0 && config.signEndpoint !== DEFAULT_SIGN_ENDPOINT && !config.verifyTokenEndpoint?.trim())
|
|
@@ -35824,19 +35991,22 @@ var RemoteGatewayMcpServerProvider = class {
|
|
|
35824
35991
|
};
|
|
35825
35992
|
}
|
|
35826
35993
|
const mapped = resolveArgsMappingPlan(plan, invocation.auth);
|
|
35994
|
+
recordMcpContentSection(observation, ETelemetryContentSection.MCP_INPUT, mapped, options?.toolSchema?.inputSchema);
|
|
35827
35995
|
invocation.signal.throwIfAborted();
|
|
35828
35996
|
const remaining = Math.max(1, invocation.deadline - performance.now());
|
|
35829
35997
|
try {
|
|
35830
|
-
|
|
35998
|
+
const result = await loggedClient.callTool({ name, arguments: mapped }, void 0, {
|
|
35831
35999
|
signal: invocation.signal,
|
|
35832
36000
|
timeout: remaining,
|
|
35833
36001
|
maxTotalTimeout: remaining,
|
|
35834
36002
|
resetTimeoutOnProgress: false
|
|
35835
36003
|
});
|
|
36004
|
+
recordMcpContentSection(observation, ETelemetryContentSection.MCP_OUTPUT, result, options?.toolSchema?.outputSchema);
|
|
36005
|
+
return result;
|
|
35836
36006
|
} catch (error) {
|
|
35837
36007
|
invocation.signal.throwIfAborted();
|
|
35838
36008
|
if (invocation.auth && !(error instanceof McpInvocationError))
|
|
35839
|
-
throw new Error("MCP \u7528\u6237\u5DE5\u5177\u8C03\u7528\u5931\u8D25");
|
|
36009
|
+
throw new Error("MCP \u7528\u6237\u5DE5\u5177\u8C03\u7528\u5931\u8D25", { cause: error });
|
|
35840
36010
|
throw error;
|
|
35841
36011
|
}
|
|
35842
36012
|
}));
|
|
@@ -35861,7 +36031,13 @@ async function listToolsFromClient(client, resourceId, callTool) {
|
|
|
35861
36031
|
const descriptor = {
|
|
35862
36032
|
name: tool.name,
|
|
35863
36033
|
resourceId,
|
|
35864
|
-
execute: (args, signal) => callTool(tool.name, args, signal
|
|
36034
|
+
execute: (args, signal, context2) => callTool(tool.name, args, signal, {
|
|
36035
|
+
context: context2,
|
|
36036
|
+
toolSchema: {
|
|
36037
|
+
inputSchema: tool.inputSchema,
|
|
36038
|
+
outputSchema: tool.outputSchema
|
|
36039
|
+
}
|
|
36040
|
+
})
|
|
35865
36041
|
};
|
|
35866
36042
|
if (tool.description !== void 0)
|
|
35867
36043
|
descriptor.description = tool.description;
|
|
@@ -36895,7 +37071,7 @@ var WebSkillLoader = class {
|
|
|
36895
37071
|
return records.filter((record2, idx) => {
|
|
36896
37072
|
if (record2 !== void 0)
|
|
36897
37073
|
return true;
|
|
36898
|
-
this.debugLog?.(`[skill] \u8DF3\u8FC7\u8D44\u6E90 ${resources[idx]?.resourceId ?? "?"}:SKILL.md \u7F3A description(\u524D\u7F6E\u65E0\u6548),\u6309 spec \u4E0D\u52A0\u8F7D
|
|
37074
|
+
this.debugLog?.(`[skill] \u8DF3\u8FC7\u8D44\u6E90 ${resources[idx]?.resourceId ?? "?"}:SKILL.md \u7F3A description(\u524D\u7F6E\u65E0\u6548),\u6309 spec \u4E0D\u52A0\u8F7D`, EDebugLogScope.SKILL);
|
|
36899
37075
|
return false;
|
|
36900
37076
|
});
|
|
36901
37077
|
}
|
|
@@ -37562,6 +37738,7 @@ var allowedAttributeKeys = /* @__PURE__ */ new Set([
|
|
|
37562
37738
|
ETelemetryAttribute.GEN_AI_REQUEST_MODEL,
|
|
37563
37739
|
ETelemetryAttribute.GEN_AI_RESPONSE_MODEL,
|
|
37564
37740
|
ETelemetryAttribute.GEN_AI_RESPONSE_ID,
|
|
37741
|
+
ETelemetryAttribute.LINKQUE_CONTENT_VALUE_TRUNCATED,
|
|
37565
37742
|
ETelemetryAttribute.GEN_AI_RESPONSE_FINISH_REASONS,
|
|
37566
37743
|
ETelemetryAttribute.GEN_AI_USAGE_INPUT_TOKENS,
|
|
37567
37744
|
ETelemetryAttribute.GEN_AI_USAGE_OUTPUT_TOKENS,
|
|
@@ -37720,7 +37897,7 @@ var OtelRuntimeTelemetry = class {
|
|
|
37720
37897
|
{
|
|
37721
37898
|
onEmit: (record2, ctx) => {
|
|
37722
37899
|
const route = ctx?.getValue(this.routeKey);
|
|
37723
|
-
this.output(ETelemetrySignal.LOGS, import_otlp_transformer.JsonLogsSerializer.serializeRequest([record2]), route?.route, route?.critical ?? false);
|
|
37900
|
+
this.output(ETelemetrySignal.LOGS, import_otlp_transformer.JsonLogsSerializer.serializeRequest([record2]), route?.route, route?.critical ?? false, route?.localOnly ?? false);
|
|
37724
37901
|
},
|
|
37725
37902
|
forceFlush: async () => void 0,
|
|
37726
37903
|
shutdown: async () => void 0
|
|
@@ -37728,12 +37905,13 @@ var OtelRuntimeTelemetry = class {
|
|
|
37728
37905
|
]
|
|
37729
37906
|
});
|
|
37730
37907
|
}
|
|
37731
|
-
output(signal, encoded, route, critical) {
|
|
37908
|
+
output(signal, encoded, route, critical, localOnly = false) {
|
|
37732
37909
|
if (!encoded || this.outputActive || this.disposed)
|
|
37733
37910
|
return;
|
|
37734
37911
|
this.outputActive = true;
|
|
37735
37912
|
try {
|
|
37736
|
-
|
|
37913
|
+
if (!localOnly)
|
|
37914
|
+
this.queue.enqueue(route, signal, encoded, critical);
|
|
37737
37915
|
if (this.options.localSink) {
|
|
37738
37916
|
try {
|
|
37739
37917
|
const payload = JSON.parse(new TextDecoder().decode(encoded));
|
|
@@ -37758,7 +37936,6 @@ var OtelRuntimeTelemetry = class {
|
|
|
37758
37936
|
return new NoopRuntimeObservation();
|
|
37759
37937
|
}
|
|
37760
37938
|
const state = {
|
|
37761
|
-
agentId: input.agentId,
|
|
37762
37939
|
sequence: 0,
|
|
37763
37940
|
route: auth2 ? this.queue.authorize(auth2) : void 0,
|
|
37764
37941
|
attributes: sanitizeTelemetryAttributes({
|
|
@@ -37814,7 +37991,6 @@ var OtelRuntimeTelemetry = class {
|
|
|
37814
37991
|
isRemote: upstream !== null,
|
|
37815
37992
|
traceState: parentContext.traceState ? createTraceState(parentContext.traceState) : void 0
|
|
37816
37993
|
});
|
|
37817
|
-
const spanName = spec.name === ETelemetryOperationName.MODEL_ATTEMPT ? `${ETelemetryGenAiOperation.CHAT} ${spec.attributes[ETelemetryAttribute.GEN_AI_REQUEST_MODEL]}` : spec.name === ETelemetryOperationName.TOOL_INVOKE ? `${ETelemetryGenAiOperation.EXECUTE_TOOL} ${spec.attributes[ETelemetryAttribute.GEN_AI_TOOL_NAME]}` : spec.name === ETelemetryOperationName.ADVANCE && state.agentId ? `${ETelemetryGenAiOperation.INVOKE_AGENT} ${state.agentId}` : spec.name;
|
|
37818
37994
|
const attributes = sanitizeTelemetryAttributes({
|
|
37819
37995
|
...state.attributes,
|
|
37820
37996
|
...parent?.attributes,
|
|
@@ -37832,11 +38008,11 @@ var OtelRuntimeTelemetry = class {
|
|
|
37832
38008
|
ETelemetryAttribute.LINKQUE_CONVERSATION_ID
|
|
37833
38009
|
].some((attribute) => attribute === key))),
|
|
37834
38010
|
[ETelemetryAttribute.LINKQUE_OPERATION_ID]: randomUUID5(),
|
|
37835
|
-
[ETelemetryAttribute.LINKQUE_OPERATION_NAME]:
|
|
38011
|
+
[ETelemetryAttribute.LINKQUE_OPERATION_NAME]: spec.name,
|
|
37836
38012
|
[ETelemetryAttribute.LINKQUE_OPERATION_PARENT_ID]: spec.detached ? "" : parent?.operationId ?? "",
|
|
37837
38013
|
[ETelemetryAttribute.LINKQUE_SPAN_PARENT_ID]: spec.detached ? "" : parentContext?.spanId ?? ""
|
|
37838
38014
|
});
|
|
37839
|
-
const span = this.tracerProvider.getTracer(ETelemetryMetadata.SCOPE_NAME, ETelemetryVersion.V1_0).startSpan(
|
|
38015
|
+
const span = this.tracerProvider.getTracer(ETelemetryMetadata.SCOPE_NAME, ETelemetryVersion.V1_0).startSpan(spec.name, {
|
|
37840
38016
|
kind: spec.name === ETelemetryOperationName.MODEL_ATTEMPT ? SpanKind.CLIENT : SpanKind.INTERNAL,
|
|
37841
38017
|
attributes,
|
|
37842
38018
|
links: spec.links.filter((link) => validContext(link.context)).slice(0, 16).map((link) => ({
|
|
@@ -37864,7 +38040,7 @@ var OtelRuntimeTelemetry = class {
|
|
|
37864
38040
|
operation.record(`${spec.eventPrefix}.${ETelemetryEventPhase.STARTED}`, {});
|
|
37865
38041
|
return operation;
|
|
37866
38042
|
}
|
|
37867
|
-
emit(operation, name, attributes, critical) {
|
|
38043
|
+
emit(operation, name, attributes, critical, body) {
|
|
37868
38044
|
if (this.disposed || this.queue.isExporting)
|
|
37869
38045
|
return;
|
|
37870
38046
|
const contextAttributes = operation.attributes;
|
|
@@ -37891,18 +38067,33 @@ var OtelRuntimeTelemetry = class {
|
|
|
37891
38067
|
Math.floor(now / 1e3),
|
|
37892
38068
|
now % 1e3 * 1e6
|
|
37893
38069
|
];
|
|
37894
|
-
|
|
38070
|
+
const localOnly = name === ETelemetryEventName.CONTENT_RECORDED;
|
|
38071
|
+
if (localOnly && body && typeof body === "object" && "value" in body) {
|
|
38072
|
+
const { value, ...metadata } = body;
|
|
38073
|
+
try {
|
|
38074
|
+
const valueJson = JSON.stringify(value);
|
|
38075
|
+
body = valueJson !== void 0 && Buffer.byteLength(JSON.stringify(valueJson), "utf8") <= 512 * 1024 ? { ...metadata, valueJson } : { ...metadata, availability: "unavailable", reason: "content_limit" };
|
|
38076
|
+
} catch {
|
|
38077
|
+
body = { ...metadata, availability: "unavailable" };
|
|
38078
|
+
}
|
|
38079
|
+
}
|
|
38080
|
+
if (!localOnly && operation.span.isRecording())
|
|
37895
38081
|
operation.span.addEvent(
|
|
37896
38082
|
name,
|
|
37897
38083
|
// 复用已投影的属性;Span 已持有上下文,事件只保留本次事实及去重字段。
|
|
37898
38084
|
Object.fromEntries(Object.entries(record2).filter(([key]) => Object.hasOwn(attributes, key) || key === ETelemetryAttribute.HARNESS_RECORD_ID || key === ETelemetryAttribute.HARNESS_EVENT_SEQUENCE)),
|
|
37899
38085
|
time
|
|
37900
38086
|
);
|
|
37901
|
-
const ctx = trace.setSpan(ROOT_CONTEXT, operation.span).setValue(this.routeKey, {
|
|
38087
|
+
const ctx = trace.setSpan(ROOT_CONTEXT, operation.span).setValue(this.routeKey, {
|
|
38088
|
+
route: operation.state.route,
|
|
38089
|
+
critical,
|
|
38090
|
+
localOnly
|
|
38091
|
+
});
|
|
37902
38092
|
this.loggerProvider.getLogger(ETelemetryMetadata.SCOPE_NAME, ETelemetryVersion.V1_0).emit({
|
|
37903
38093
|
eventName: name,
|
|
37904
38094
|
timestamp: time,
|
|
37905
38095
|
observedTimestamp: time,
|
|
38096
|
+
...body !== void 0 ? { body } : {},
|
|
37906
38097
|
severityNumber: record2[ETelemetryAttribute.HARNESS_OPERATION_OUTCOME] === ETelemetryOutcome.ERROR || record2[ETelemetryAttribute.HARNESS_OPERATION_OUTCOME] === ETelemetryOutcome.TIMEOUT ? import_api_logs.SeverityNumber.ERROR : import_api_logs.SeverityNumber.INFO,
|
|
37907
38098
|
severityText: record2[ETelemetryAttribute.HARNESS_OPERATION_OUTCOME] === ETelemetryOutcome.ERROR || record2[ETelemetryAttribute.HARNESS_OPERATION_OUTCOME] === ETelemetryOutcome.TIMEOUT ? import_api_logs.SeverityNumber[import_api_logs.SeverityNumber.ERROR] : import_api_logs.SeverityNumber[import_api_logs.SeverityNumber.INFO],
|
|
37908
38099
|
attributes: record2,
|
|
@@ -37973,10 +38164,11 @@ var OtelObservation = class {
|
|
|
37973
38164
|
return new NoopRuntimeObservation();
|
|
37974
38165
|
return this.owner.createOperation(this.state, spec, this);
|
|
37975
38166
|
}
|
|
37976
|
-
record(name, attributes) {
|
|
38167
|
+
record(name, attributes, body) {
|
|
37977
38168
|
if (this.lost || !/^(harness|linkque)\.[a-z0-9_.]{1,128}$/.test(name))
|
|
37978
38169
|
return;
|
|
37979
|
-
|
|
38170
|
+
const critical = name.endsWith(`.${ETelemetryEventPhase.FINISHED}`) || name === ETelemetryEventName.MODEL_USAGE_RECORDED || name === ETelemetryEventName.RUNTIME_UNCAUGHT_ERROR || name.endsWith(`.${ETelemetryEventPhase.OBSERVATION_LOST}`);
|
|
38171
|
+
this.owner.emit(this, name, attributes, critical, body);
|
|
37980
38172
|
}
|
|
37981
38173
|
finish(outcome, attributes) {
|
|
37982
38174
|
if (this.ended)
|
|
@@ -38022,6 +38214,8 @@ function validContext(value) {
|
|
|
38022
38214
|
export {
|
|
38023
38215
|
EModelRequestSource,
|
|
38024
38216
|
EDebugLogScope,
|
|
38217
|
+
isDebugLoggingEnabled,
|
|
38218
|
+
createRuntimeDebugLog,
|
|
38025
38219
|
EModelProvider,
|
|
38026
38220
|
EResourceType,
|
|
38027
38221
|
EResourceProviderType,
|
|
@@ -38049,22 +38243,11 @@ export {
|
|
|
38049
38243
|
McpPhoneAuthorizationFailedError,
|
|
38050
38244
|
isMcpPhoneAuthorizationError,
|
|
38051
38245
|
resolvePhoneAuthorizationDependency,
|
|
38052
|
-
|
|
38053
|
-
executeHomeData,
|
|
38054
|
-
CardActionDiagnostics,
|
|
38055
|
-
executeCardAction,
|
|
38056
|
-
executeFunctionActionMcp,
|
|
38057
|
-
FOLLOW_UP_CONTEXT_MAX_HISTORY_RUNS,
|
|
38058
|
-
prepareFollowUpQuestionContext,
|
|
38059
|
-
normalizeFollowUpQuestionStrings,
|
|
38060
|
-
InMemorySessionManager,
|
|
38061
|
-
NoopSkillLoader,
|
|
38062
|
-
NoopMcpServerProvider,
|
|
38063
|
-
buildHookCommonParams,
|
|
38064
|
-
normalizeHookResources,
|
|
38246
|
+
CONTENT_VALUE_MAX_LENGTH,
|
|
38065
38247
|
ETelemetryAttribute,
|
|
38066
38248
|
ETelemetryEventPrefix,
|
|
38067
38249
|
ETelemetryEventName,
|
|
38250
|
+
ETelemetryContentSection,
|
|
38068
38251
|
ETelemetryOperationName,
|
|
38069
38252
|
ETelemetryOutcome,
|
|
38070
38253
|
ETelemetryLossReason,
|
|
@@ -38086,6 +38269,20 @@ export {
|
|
|
38086
38269
|
ETelemetryModelPurpose,
|
|
38087
38270
|
ETelemetryErrorType,
|
|
38088
38271
|
ETelemetryGenAiOperation,
|
|
38272
|
+
recordContentSection,
|
|
38273
|
+
McpProxyTool,
|
|
38274
|
+
executeHomeData,
|
|
38275
|
+
CardActionDiagnostics,
|
|
38276
|
+
executeCardAction,
|
|
38277
|
+
executeFunctionActionMcp,
|
|
38278
|
+
FOLLOW_UP_CONTEXT_MAX_HISTORY_RUNS,
|
|
38279
|
+
prepareFollowUpQuestionContext,
|
|
38280
|
+
normalizeFollowUpQuestionStrings,
|
|
38281
|
+
InMemorySessionManager,
|
|
38282
|
+
NoopSkillLoader,
|
|
38283
|
+
NoopMcpServerProvider,
|
|
38284
|
+
buildHookCommonParams,
|
|
38285
|
+
normalizeHookResources,
|
|
38089
38286
|
warnLogFailure,
|
|
38090
38287
|
HookDispatcher,
|
|
38091
38288
|
DEFAULT_HOOK_DRAIN_BUDGET_MS,
|
|
@@ -38100,6 +38297,7 @@ export {
|
|
|
38100
38297
|
summarizeBody,
|
|
38101
38298
|
formatHttpLogLine,
|
|
38102
38299
|
LinkquegwEventHookExecutor,
|
|
38300
|
+
ACTIVATE_SKILL_TOOL_NAME,
|
|
38103
38301
|
parseSkillFile,
|
|
38104
38302
|
buildSkillCatalog,
|
|
38105
38303
|
createActivateSkillTool,
|