aKode fase 2c: eliminato il codice di invio dati (crate analytics, otel-trace-websocket, sentry, esportatori OTLP); /feedback salva solo in locale; chiavi legacy [analytics]/[otel] accettate e ignorate; test di analytics/OTLP/upload rimossi
Some checks failed
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled

This commit is contained in:
Andrea
2026-11-09 18:45:41 +01:00
parent 981745ccc8
commit 60532b6337
509 changed files with 2043 additions and 46606 deletions

View File

@@ -1,8 +1,7 @@
use codex_analytics::InvocationType;
use codex_analytics::SkillInvocation;
use codex_analytics::SkillInvocationLocation;
use codex_exec_server::LOCAL_ENVIRONMENT_ID;
use codex_extension_api::ExtensionData;
use codex_otel::SkillInvocationType as InvocationType;
use codex_protocol::protocol::SkillScope;
use codex_skills::ImplicitSkillAccess;
use codex_skills::detect_implicit_skill_invocation_for_command;
use codex_skills::implicit_skill_accesses_for_command;
@@ -16,6 +15,30 @@ use crate::catalog::SkillResourceId;
use crate::catalog::SkillSourceKind;
use crate::catalog::SkillSourceLocation;
/// A detected skill use, consumed by local logging, local metrics and skill contributors.
#[derive(Clone, Debug)]
pub struct SkillInvocation {
pub skill_name: String,
pub location: SkillInvocationLocation,
pub plugin_id: Option<String>,
pub remote_plugin_id: Option<String>,
pub invocation_type: InvocationType,
}
/// Where the invoked skill was loaded from.
#[derive(Clone, Debug)]
pub enum SkillInvocationLocation {
Host {
path: PathUri,
scope: SkillScope,
},
Resource {
id: String,
skill_id: Option<String>,
scope: Option<SkillScope>,
},
}
impl SkillCatalogEntry {
/// Uses merged identity and scope, with plugin attribution from the route actually used.
pub(crate) fn invocation(
@@ -28,7 +51,7 @@ impl SkillCatalogEntry {
location: SkillInvocationLocation::Resource {
id: self.main_prompt.as_str().to_owned(),
skill_id: self.canonical_skill_id.clone(),
scope: self.analytics_scope,
scope: self.invocation_scope,
},
plugin_id: source.plugin_id.clone(),
remote_plugin_id: self.remote_plugin_id.clone(),