Skip to main content

lean_ctx/core/config/
intelligence.rs

1// SPDX-License-Identifier: Apache-2.0
2//! User-global opt-in and independent trust pins for the optional local runtime.
3
4use serde::{Deserialize, Serialize};
5
6/// Never merged from a project file, including trusted workspaces.
7/// A public signing key is not a credential; the package cannot provide its pin.
8#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
9#[serde(default, deny_unknown_fields)]
10pub struct IntelligenceRuntimeConfig {
11    pub enabled: bool,
12    pub accept_proprietary: bool,
13    pub staging: bool,
14    pub root: String,
15    pub manifest_sha256: String,
16    pub trust_key_hex: String,
17    pub channel_url: String,
18    pub channel_signature_url: String,
19    pub channel_root_key_hex: String,
20    /// Explicit user-global handoff to the private verifier, never project input.
21    pub license_configuration: String,
22    /// No effect: read-strategy policies are no longer learned by a runtime.
23    /// Kept so an existing config (`deny_unknown_fields`) still loads.
24    pub context_policy_apply: bool,
25    /// The projects of this user that read shared team artifacts, each with
26    /// its team identity. Empty by default: a project without an entry uses
27    /// no artifact. Global-only like the rest of this section, so a
28    /// repository cannot name itself. It carries no clearance: none is
29    /// configurable here.
30    pub team_artifact_projects: Vec<TeamArtifactProject>,
31}
32
33/// One `[[intelligence_runtime.team_artifact_projects]]` entry.
34#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
35#[serde(default, deny_unknown_fields)]
36pub struct TeamArtifactProject {
37    /// Absolute path of the project root.
38    pub root: String,
39    pub organization_id: String,
40    pub project_id: String,
41    /// The project's opaque repository identity — not a URL or a path.
42    pub repository_id: String,
43}