feat(codegen): scaffold ai-feature-gated pipeline module
This commit is contained in:
parent
82a293e7ab
commit
ed7608fc04
|
|
@ -13,3 +13,15 @@ path = "src/lib.rs"
|
|||
[dependencies]
|
||||
jian-ops-schema = { path = "../../vendor/jian/crates/jian-ops-schema" }
|
||||
op-editor-core = { path = "../op-editor-core" }
|
||||
|
||||
# AI pipeline deps — optional, pulled in only by the `ai` feature so
|
||||
# non-AI consumers (and the deterministic generators) stay lean. op-ai
|
||||
# is dependency-free + wasm-clean; op-codegen does NOT depend on
|
||||
# op-ai-skills (skill corpus is expanded at the transport edge).
|
||||
op-ai = { path = "../op-ai", optional = true }
|
||||
serde = { workspace = true, features = ["derive"], optional = true }
|
||||
serde_json = { workspace = true, optional = true }
|
||||
|
||||
[features]
|
||||
# Gates the AI code-generation pipeline (src/ai/). Off by default.
|
||||
ai = ["dep:op-ai", "dep:serde", "dep:serde_json"]
|
||||
|
|
|
|||
1
crates/op-codegen/src/ai/assets.rs
Normal file
1
crates/op-codegen/src/ai/assets.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Implemented in later tasks of this plan.
|
||||
1
crates/op-codegen/src/ai/bundle.rs
Normal file
1
crates/op-codegen/src/ai/bundle.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Implemented in later tasks of this plan.
|
||||
13
crates/op-codegen/src/ai/mod.rs
Normal file
13
crates/op-codegen/src/ai/mod.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
//! AI-driven code-generation pipeline. A pull-based, transport-agnostic
|
||||
//! state machine: it emits `PendingRequest`s (skill names + user message
|
||||
//! + params) and consumes streamed text deltas via `on_delta`/
|
||||
//! `on_complete`/`on_error`, advancing through planning → chunk →
|
||||
//! assembly. Hosts supply the streaming transport; the pipeline owns the
|
||||
//! logic. Ported from the TS `code-generation-pipeline.ts`.
|
||||
|
||||
pub mod assets;
|
||||
pub mod bundle;
|
||||
pub mod parse;
|
||||
pub mod pipeline;
|
||||
pub mod prompts;
|
||||
pub mod types;
|
||||
1
crates/op-codegen/src/ai/parse.rs
Normal file
1
crates/op-codegen/src/ai/parse.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Implemented in later tasks of this plan.
|
||||
1
crates/op-codegen/src/ai/pipeline.rs
Normal file
1
crates/op-codegen/src/ai/pipeline.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Implemented in later tasks of this plan.
|
||||
1
crates/op-codegen/src/ai/prompts.rs
Normal file
1
crates/op-codegen/src/ai/prompts.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Implemented in later tasks of this plan.
|
||||
1
crates/op-codegen/src/ai/types.rs
Normal file
1
crates/op-codegen/src/ai/types.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Implemented in later tasks of this plan.
|
||||
|
|
@ -12,6 +12,12 @@
|
|||
//! node-accessor helpers, and the test suite; per-framework markup
|
||||
//! generators live in the sibling `codegen_targets` module.
|
||||
|
||||
/// AI-driven code-generation pipeline (planning → chunk → assembly).
|
||||
/// Gated behind the `ai` feature so the deterministic generators stay
|
||||
/// dependency-light.
|
||||
#[cfg(feature = "ai")]
|
||||
pub mod ai;
|
||||
|
||||
mod codegen_targets;
|
||||
|
||||
pub use crate::codegen_targets::{
|
||||
|
|
|
|||
Loading…
Reference in a new issue