mirror of
https://github.com/openai/codex.git
synced 2026-11-25 15:24:26 +00:00
Track artifact operations from trusted plugin markers (#38057)
## What changed - Recognize validated create and edit marker commands from the trusted presentations, documents, spreadsheets, and PDF plugins. - Emit a `codex_artifact_operation` analytics event plus started-count and expected-output-count metrics when a recognized marker starts through unified exec. - Attribute remote executor commands only when their plugin cache path and script contents match a trusted local plugin, including primary-runtime plugins. ## Testing - Cover supported marker combinations and reject mismatched plugins, paths, arguments, counts, and output formats. - Cover local, relocated remote, and Windows-style plugin attribution, including rejection of modified remote scripts. GitOrigin-RevId: 475cc1689aa7f371a24dec0a8bdb6f7fd5a2e922
This commit is contained in:
1 parent
285abc0368
commit
44d992c14e
18 files changed
+971
-60
No files matched your search
@@ -61,6 +61,7 @@ use crate::events::ToolItemTerminalStatus;
|
||||
use crate::events::TrackEventRequest;
|
||||
use crate::events::WebSearchActionKind;
|
||||
use crate::events::codex_app_metadata;
|
||||
use crate::events::codex_artifact_operation_event_request;
|
||||
use crate::events::codex_compaction_event_params;
|
||||
use crate::events::codex_goal_event_params;
|
||||
use crate::events::codex_hook_run_metadata;
|
||||
@@ -74,6 +75,7 @@ use crate::facts::AnalyticsFact;
|
||||
use crate::facts::AnalyticsJsonRpcError;
|
||||
use crate::facts::AppMentionedInput;
|
||||
use crate::facts::AppUsedInput;
|
||||
use crate::facts::ArtifactOperationInput;
|
||||
use crate::facts::CodeModeToolCallFact;
|
||||
use crate::facts::CodeModeToolCallStatus;
|
||||
use crate::facts::CodexCompactionEvent;
|
||||
@@ -550,6 +552,9 @@ impl AnalyticsReducer {
|
||||
self.ingest_server_request_aborted(completed_at_ms, request_id, out);
|
||||
}
|
||||
AnalyticsFact::Custom(input) => match input {
|
||||
CustomAnalyticsFact::ArtifactOperation(input) => {
|
||||
self.ingest_artifact_operation(input, out);
|
||||
}
|
||||
CustomAnalyticsFact::CodeModeToolCall(input) => {
|
||||
self.ingest_code_mode_tool_call(input, out);
|
||||
}
|
||||
@@ -614,6 +619,16 @@ impl AnalyticsReducer {
|
||||
}
|
||||
}
|
||||
|
||||
fn ingest_artifact_operation(
|
||||
&mut self,
|
||||
input: ArtifactOperationInput,
|
||||
out: &mut Vec<TrackEventRequest>,
|
||||
) {
|
||||
out.push(TrackEventRequest::ArtifactOperation(
|
||||
codex_artifact_operation_event_request(input.tracking, input.operation),
|
||||
));
|
||||
}
|
||||
|
||||
fn ingest_code_mode_tool_call(
|
||||
&mut self,
|
||||
input: CodeModeToolCallFact,
|
||||
|
||||
Reference in new issue
Block a user