Skip to content

Commit d1fcf5d

Browse files
author
Jonathan D.A. Jewell
committed
feat: add cli client stubs, registry schemas, and IMP docs
1 parent ca42324 commit d1fcf5d

13 files changed

Lines changed: 162 additions & 7 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// SPDX-License-Identifier: PMPL-1.0
2+
3+
use anyhow::Result;
4+
5+
pub fn analyze(_path: &str) -> Result<()> {
6+
// TODO: call checky-monkey (8-dimension analysis + CUBS)
7+
Ok(())
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// SPDX-License-Identifier: PMPL-1.0
2+
3+
use anyhow::Result;
4+
5+
pub fn publish(_path: &str) -> Result<()> {
6+
// TODO: call cicd-hyper-a registry write
7+
Ok(())
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// SPDX-License-Identifier: PMPL-1.0
2+
3+
use anyhow::Result;
4+
5+
pub fn attest(_path: &str) -> Result<()> {
6+
// TODO: call claim-forge service (GPG + OpenTimestamps)
7+
Ok(())
8+
}

crates/opm-cli/src/clients/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// SPDX-License-Identifier: PMPL-1.0
2+
3+
pub mod claim_forge;
4+
pub mod checky_monkey;
5+
pub mod palimpsest_license;
6+
pub mod cicd_hyper_a;
7+
pub mod oikos;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// SPDX-License-Identifier: PMPL-1.0
2+
3+
use anyhow::Result;
4+
5+
pub fn score(_package: &str) -> Result<()> {
6+
// TODO: call oikos sustainability scoring
7+
Ok(())
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// SPDX-License-Identifier: PMPL-1.0
2+
3+
use anyhow::Result;
4+
5+
pub fn audit(_path: &str) -> Result<()> {
6+
// TODO: call palimpsest-license audit/sign
7+
Ok(())
8+
}

crates/opm-cli/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
use clap::{Parser, Subcommand};
44

5+
mod clients;
6+
mod types;
57
mod wiring;
68

79
#[derive(Parser)]

crates/opm-cli/src/types.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// SPDX-License-Identifier: PMPL-1.0
2+
3+
use serde::{Deserialize, Serialize};
4+
5+
#[derive(Debug, Serialize, Deserialize)]
6+
pub struct PublishRequest {
7+
pub path: String,
8+
}
9+
10+
#[derive(Debug, Serialize, Deserialize)]
11+
pub struct AuditRequest {
12+
pub package: String,
13+
}
14+
15+
#[derive(Debug, Serialize, Deserialize)]
16+
pub struct StatusResponse {
17+
pub registry_hub: String,
18+
pub federation: String,
19+
}

crates/opm-cli/src/wiring.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22

33
use anyhow::Result;
44

5+
use crate::clients;
6+
57
pub fn publish(path: &str) -> Result<()> {
68
println!("opm publish (stub) for {path}");
7-
println!("- claim-forge: provenance");
8-
println!("- checky-monkey: 8-dimension analysis");
9-
println!("- palimpsest-license: audit/sign");
10-
println!("- cicd-hyper-a: registry write");
9+
clients::claim_forge::attest(path)?;
10+
clients::checky_monkey::analyze(path)?;
11+
clients::palimpsest_license::audit(path)?;
12+
clients::cicd_hyper_a::publish(path)?;
1113
Ok(())
1214
}
1315

1416
pub fn audit(package: &str) -> Result<()> {
1517
println!("opm audit (stub) for {package}");
16-
println!("- claim-forge: provenance check");
17-
println!("- checky-monkey: scoring");
18-
println!("- oikos: sustainability");
18+
clients::claim_forge::attest(package)?;
19+
clients::checky_monkey::analyze(package)?;
20+
clients::oikos::score(package)?;
1921
Ok(())
2022
}
2123

docs/imp/IMP.adoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// SPDX-License-Identifier: PMPL-1.0
2+
= Internal Manifest Protocol (IMP)
3+
:revdate: 2026-01-18
4+
5+
== Purpose
6+
7+
IMP is the canonical, normalized manifest used by OPM to bridge Cargo.toml, package.json, and other formats.
8+
9+
== Required fields
10+
11+
- name
12+
- version
13+
- license
14+
- dependencies
15+
- provenance
16+
17+
== Source formats
18+
19+
- Cargo.toml (Rust)
20+
- package.json (JS/TS)
21+
- mix.exs (Elixir)
22+
- pyproject.toml (Python)
23+
24+
== Pipeline
25+
26+
1. nickel-config-reporter validates incoming manifests against contract
27+
2. hybrid-automation-router normalizes into IMP
28+
3. protocol-squisher handles cross-language edges

0 commit comments

Comments
 (0)