import type { SafeActionObservationV1 } from './safe-action-envelope-v1.js'; export declare const SAFE_SKILL_OBSERVATION_PATH: "/v1/beacon/safe/skill-observations"; export declare const SAFE_SKILL_OBSERVATION_PROTOCOL_VERSION: "v1"; export declare const SAFE_SKILL_OBSERVATION_SCHEMA_VERSION: "safe.skill_observation.v1"; export declare const SAFE_SKILL_OBSERVATION_MAX_ITEMS_PER_REQUEST: 100; export type SafeShareScope = 'local_only' | 'aggregate' | 'redacted_case' | 'public_case'; export type SafeObservationStage = 'pre_run' | 'decision_point' | 'post_run' | 'outcome'; export type SafeObservationStatus = 'success' | 'failed' | 'pending' | 'aborted'; export type SafeDecision = 'allow' | 'warn' | 'block' | 'redacted'; export type SafeRedactionLevel = 'none' | 'light' | 'strict' | 'metadata_only'; export type SafeUserAction = 'accepted' | 'edited' | 'rejected' | 'deferred' | 'unknown'; export type SafeArtifactVisibility = 'local_only' | 'redacted' | 'public'; export type SafeConsentSource = 'per_run' | 'skill_install' | 'account_setting' | 'admin_import'; export interface CapsuleRuntimeStateV1 { confidence: number; success_streak: number; env_fingerprint: { platform: string; version: string; region: string; }; outcome: { status: SafeObservationStatus; score: number; }; asset_id: string; blast_radius: { files: number; lines: number; }; } export interface SafeDecisionPoint { name: string; agent_suggestion?: string; user_action: SafeUserAction; user_edit_summary?: string; confidence?: number; } export interface SafeObservationFinding { code: string; severity: 'info' | 'warn' | 'block'; message: string; } export interface SafeObservationArtifact { kind: 'file' | 'url' | 'image' | 'report' | 'message' | 'other'; id?: string; path_hash?: string; content_hash?: string; visibility: SafeArtifactVisibility; } export interface SafeSkillObservation { schema_version: typeof SAFE_SKILL_OBSERVATION_SCHEMA_VERSION; observation_id: string; run_id: string; occurred_at: string; stage: SafeObservationStage; skill: { slug: string; version?: string; capability?: string; }; agent: { runtime: 'codex' | 'claude_code' | 'cursor' | 'openclaw' | 'other'; model_hint?: string; local_agent_id_hash?: string; }; env_fingerprint: { platform?: string; region?: string; locale?: string; os?: string; host_app?: string; skillfm_local_version?: string; }; summaries?: { input_summary?: string; output_summary?: string; decision_summary?: string; }; decision_points?: SafeDecisionPoint[]; action_events?: SafeActionObservationV1[]; safe: { decision: SafeDecision; findings?: SafeObservationFinding[]; redaction_level: SafeRedactionLevel; pii_detected?: boolean; byok_risk_detected?: boolean; banned_fields_stripped?: string[]; consent: { local_record: boolean; upload_scope: SafeShareScope; consent_source?: SafeConsentSource; consent_grant_id?: string; consented_at?: string; user_approved_upload?: boolean; }; }; outcome?: { status: SafeObservationStatus; score?: number; metrics?: Record; }; artifacts?: SafeObservationArtifact[]; learning?: { pattern_tags?: string[]; lesson_candidate?: string; next_recommendation?: string; upgrade_candidate?: boolean; }; reward?: { eligible: boolean; policy_id?: string; points_estimate?: number; voucher_estimate_cny?: number; ledger_reference_id?: string; }; capsule_runtime_state?: CapsuleRuntimeStateV1; metadata?: Record; } export interface SafeSkillObservationRequest { observations: SafeSkillObservation[]; client_timestamp?: string; } export interface SafeSkillObservationResponse { ok: true; accepted: number; skipped: number; } export declare const SAFE_SKILL_OBSERVATION_ERROR_CODES: { readonly AUTH_MISSING_TOKEN: "SAFE.OBSERVATION.AUTH.MISSING_TOKEN"; readonly AUTH_BAD_TOKEN: "SAFE.OBSERVATION.AUTH.BAD_TOKEN"; readonly BAD_REQUEST: "SAFE.OBSERVATION.BAD_REQUEST"; readonly PAYLOAD_TOO_LARGE: "SAFE.OBSERVATION.PAYLOAD_TOO_LARGE"; readonly BYOK_VIOLATION: "SAFE.OBSERVATION.BYOK_VIOLATION"; readonly CONSENT_REQUIRED: "SAFE.OBSERVATION.CONSENT_REQUIRED"; readonly INTERNAL: "SAFE.OBSERVATION.INTERNAL"; }; export type SafeSkillObservationErrorCode = (typeof SAFE_SKILL_OBSERVATION_ERROR_CODES)[keyof typeof SAFE_SKILL_OBSERVATION_ERROR_CODES]; export interface SafeSkillObservationErrorResponse { ok: false; error: { code: SafeSkillObservationErrorCode; message: string; details?: Record; }; } export type SafeSkillObservationEnvelope = { ok: true; data: SafeSkillObservationResponse; } | SafeSkillObservationErrorResponse; //# sourceMappingURL=safe-skill-observation-v1.d.ts.map