feat(web): Document/Endpoint/Resource artifact rewrite (ADR 0007)

Replace the monolithic compose_*/configure author surface with file-level
web|endpoint artifacts, split ext/{web,data,security,net}, and lock
no-degrade rules so the model cannot regress to God-object APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-28 11:06:38 +08:00
1 parent 33f8b94bb0
commit 67bac1bf02
54 files changed
+4642 -2505

No files matched your search

+11
View File
@@ -109,6 +109,17 @@ pub fn meta_get(ctx: &HostContext, key: &Value) -> Result<Value, String> {
.unwrap_or(Value::None))
}
/// Classify entry Artifact (`web` / `endpoint` / `prompt` / `other`); missing type → None.
pub fn artifact_kind(ctx: &HostContext) -> Result<Value, String> {
Ok(match crate::artifact::classify(&ctx.entry_metadata) {
None => Value::None,
Some(crate::artifact::ArtifactKind::Web) => Value::Text("web".into()),
Some(crate::artifact::ArtifactKind::Endpoint) => Value::Text("endpoint".into()),
Some(crate::artifact::ArtifactKind::Prompt) => Value::Text("prompt".into()),
Some(crate::artifact::ArtifactKind::Other) => Value::Text("other".into()),
})
}
pub fn exit(ctx: &HostContext, code: &Value) -> Result<Value, String> {
let c = as_i64(code, "code")?;
if ctx.soft_side_effects {