Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions apps/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,15 @@ app's own agent and `tools.json`, the system toolbox, `glance.publish` and
engine's reader (`engine_read`, the steps of the pinned
`open_presentation` after its sniff, compared by a test). It inflates
every entry against its declared size and
refuses a nested zip or an audio or video part (`held:`), an encrypted
refuses a nested zip (`held:`), an encrypted
`.pptx` (`protected:`) and a legacy `.ppt` or any other file it does not
know (`unsupported:`); engine-side bounds stay with #448. The one nested
know (`unsupported:`); engine-side bounds stay with #448. Audio and video
open like any other part: the service carries them as bytes (drawn with
their poster, or a film or speaker glyph; saved and exported unchanged)
and nothing it runs decodes or plays them, since deckcraft's decoders
(`deckcraft-media`) are reached only through `media.info`,
`media.posterFrame`, `insert.audio` and `insert.video`, which stay held;
a deck's media counts against the session's 128 MiB (`too_large:`). The one nested
zip it lets through is an Office package's embedded object under
`ppt/embeddings/` (a chart's workbook, an embedded document), which
neither the service nor deckcraft ever unzips; it still counts against
Expand Down
2 changes: 1 addition & 1 deletion apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ them. They live in `apps/` of the [OctoSense repository](../README.md); until
speech, embedding and asynchronous video requests. Apps declare `model` and
exact host API versions; provider entitlement is checked when used. See the
[media contract and validation limits](ai-providers/host-service/MEDIA.md).
- **The `deck` host service** (`deck/host-service`, ADR 0013) is the deckcraft presentation engine behind `deck.*`: decks inspected, read as outline text, rendered to PNG, created from titles and bullets, and converted (pptx, native, outline, PDF), confined to the caller's own folder. Its app is Quick Deck (`quickdeck/bundle`), whose calls work in Quick Deck's own storage. For Quick Deck v2 it also keeps open documents (`apps/quickdeck/design/SERVICE.md`): `deck.open` and `deck.create` return a handle, and the methods on it (slides, objects, text, formatting, design, notes, transitions, undo and redo, drawing a slide into a render cache, Present's order and build steps, save and export) each run reviewed engine commands through the same gate as the system agent's `deck.run`, as one undo step. Every file the service opens first passes its own import guard, which refuses a zip beyond its bounds, audio and video, an encrypted `.pptx` and a legacy `.ppt` before the engine reads it.
- **The `deck` host service** (`deck/host-service`, ADR 0013) is the deckcraft presentation engine behind `deck.*`: decks inspected, read as outline text, rendered to PNG, created from titles and bullets, and converted (pptx, native, outline, PDF), confined to the caller's own folder. Its app is Quick Deck (`quickdeck/bundle`), whose calls work in Quick Deck's own storage. For Quick Deck v2 it also keeps open documents (`apps/quickdeck/design/SERVICE.md`): `deck.open` and `deck.create` return a handle, and the methods on it (slides, objects, text, formatting, design, notes, transitions, undo and redo, drawing a slide into a render cache, Present's order and build steps, save and export) each run reviewed engine commands through the same gate as the system agent's `deck.run`, as one undo step. Every file the service opens first passes its own import guard, which refuses a zip beyond its bounds, an encrypted `.pptx` and a legacy `.ppt` before the engine reads it. A deck's audio and video come along as they are: drawn with their poster, saved and exported unchanged, and never decoded or played.
- **The `cad` engine service** (`cad/host-service`): the cadcraft drafting engine behind `cad.*` (ADR 0013, no bundle yet) — inspect, query, measure, render and convert DXF/DWG drawings, every path inside the caller's own folder.
- **The `light` engine service** (`light/host-service`) is lightcraft's RAW
develop engine behind `light.*` (ADR 0013): EXIF/XMP metadata, the develop
Expand Down
2 changes: 1 addition & 1 deletion apps/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ OctoSense-System-Apps 仓库(已归档)。
- **`model` 媒体 API** 使用宿主持有的供应商配置,执行有上限的图片、语音、向量和异步
视频请求。应用声明 `model` 和精确宿主 API 版本;调用时检查供应商权益。见
[媒体契约与验证范围](ai-providers/host-service/MEDIA.zh-CN.md)。
- **`deck` 宿主服务**(`deck/host-service`,ADR 0013)把 deckcraft 演示文稿引擎放在 `deck.*` 之后:检查幻灯片、提取大纲文本、渲染 PNG、按标题和要点新建演示文稿,以及格式转换(pptx、原生格式、大纲、PDF),全部限制在调用方自己的文件夹内。它的应用是 Quick Deck(`quickdeck/bundle`),其调用在 Quick Deck 自己的存储中运行。它还为 Quick Deck v2 保持打开的文档(`apps/quickdeck/design/SERVICE.md`):`deck.open` 和 `deck.create` 返回一个句柄,作用于它的方法(幻灯片、对象、文本、格式、设计、备注、切换效果、撤销与重做、把幻灯片绘制到渲染缓存、放映的顺序与动画步骤、保存与导出)都通过与系统代理的 `deck.run` 相同的入口运行经过审查的引擎命令,每次调用合为一个撤销步骤。服务打开的每个文件都先通过它自己的导入检查:在引擎读取之前,拒绝超出界限的 zip、音频和视频、加密的 `.pptx` 以及旧版 `.ppt`。
- **`deck` 宿主服务**(`deck/host-service`,ADR 0013)把 deckcraft 演示文稿引擎放在 `deck.*` 之后:检查幻灯片、提取大纲文本、渲染 PNG、按标题和要点新建演示文稿,以及格式转换(pptx、原生格式、大纲、PDF),全部限制在调用方自己的文件夹内。它的应用是 Quick Deck(`quickdeck/bundle`),其调用在 Quick Deck 自己的存储中运行。它还为 Quick Deck v2 保持打开的文档(`apps/quickdeck/design/SERVICE.md`):`deck.open` 和 `deck.create` 返回一个句柄,作用于它的方法(幻灯片、对象、文本、格式、设计、备注、切换效果、撤销与重做、把幻灯片绘制到渲染缓存、放映的顺序与动画步骤、保存与导出)都通过与系统代理的 `deck.run` 相同的入口运行经过审查的引擎命令,每次调用合为一个撤销步骤。服务打开的每个文件都先通过它自己的导入检查:在引擎读取之前,拒绝超出界限的 zip、加密的 `.pptx` 以及旧版 `.ppt`。演示文稿中的音频和视频会原样保留:显示其海报图,保存和导出时不作改动,并且从不解码或播放。
- **`cad` 引擎服务**(`cad/host-service`):cadcraft 制图引擎,提供 `cad.*` 方法(ADR 0013,暂无 bundle)——在调用方自己的文件夹内检查、查询、测量、渲染和转换 DXF/DWG 图纸。
- **`light` 引擎服务**(`light/host-service`)把 lightcraft 的 RAW 显影引擎
放在 `light.*` 方法之后(ADR 0013):EXIF/XMP 元数据、显影控制目录、单张与
Expand Down
3 changes: 2 additions & 1 deletion apps/deck/host-service/src/codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ pub(crate) enum Code {
Unsupported,
/// An encrypted `.pptx`, which needs a password.
Protected,
/// The deck holds audio or video, or its zip is beyond the import guard
/// The deck's zip is beyond the import guard (a zip inside the zip, past
/// a bound), or a command the door holds back until deckcraft bounds it
/// (#448).
Held,
/// Over one of the service's caps.
Expand Down
4 changes: 2 additions & 2 deletions apps/deck/host-service/src/covers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use serde_json::{json, Value as Json};

use crate::args;
use crate::cache;
use crate::codes::{fail, invalid, too_large, Code};
use crate::codes::{fail, invalid, Code};
use crate::reading;
use crate::Ctx;

Expand Down Expand Up @@ -79,7 +79,7 @@ pub(crate) fn cover(a: &Json, cx: &Ctx) -> Result<Json, String> {
let mut session = deckcraft_engine::Session::new();
engine_file::add_opened(&mut session, &name, None, deck);
if let Some(why) = crate::Held::of(&session).over() {
return Err(too_large(format!("the deck holds {why}, more than the deck service opens")));
return Err(crate::too_large_deck(why));
}
let deck = session.doc().map_err(|_| fail(Code::Damaged, "the engine opened no deck"))?.doc.clone();
if deck.slides.is_empty() {
Expand Down
Loading
Loading