Compare commits

...

2 Commits

Author SHA1 Message Date
2790a35acf
docs(tickets): workflowのプロパティ名の修正 2026-05-01 23:40:47 +09:00
776a6a29bd
chore: 依存パッケージの集約 2026-05-01 23:35:46 +09:00
16 changed files with 158 additions and 127 deletions

View File

@ -11,9 +11,40 @@ members = [
"crates/provider",
"crates/pod-registry",
"crates/tools",
"crates/tui", "crates/memory",
"crates/tui",
"crates/memory",
]
[workspace.package]
edition = "2024"
license = "MIT"
[workspace.dependencies]
# Internal crates
llm-worker = { path = "crates/llm-worker", version = "0.2" }
llm-worker-macros = { path = "crates/llm-worker-macros", version = "0.2" }
manifest = { path = "crates/manifest" }
memory = { path = "crates/memory" }
pod-registry = { path = "crates/pod-registry" }
protocol = { path = "crates/protocol" }
provider = { path = "crates/provider" }
session-store = { path = "crates/session-store" }
tools = { path = "crates/tools" }
# External
# Note: `reqwest` and `chrono` are not aggregated here because some crates
# need `default-features = false`, which workspace inheritance cannot override.
async-trait = "0.1"
fs4 = "0.13"
futures = "0.3"
libc = "0.2"
schemars = "1.2"
serde = "1.0"
serde_json = "1.0"
sha2 = "0.11"
tempfile = "3.27"
thiserror = "2.0"
tokio = "1.52"
toml = "1.1"
tracing = "0.1"
uuid = "1.23"

View File

@ -5,6 +5,6 @@ edition.workspace = true
license.workspace = true
[dependencies]
manifest = { path = "../manifest" }
protocol = { path = "../protocol" }
tokio = { version = "1.49", features = ["full"] }
manifest = { workspace = true }
protocol = { workspace = true }
tokio = { workspace = true, features = ["full"] }

View File

@ -6,22 +6,22 @@ edition.workspace = true
license.workspace = true
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "2.0"
tracing = "0.1"
async-trait = "0.1"
futures = "0.3"
tokio = { version = "1.49", features = ["macros", "rt-multi-thread"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
async-trait = { workspace = true }
futures = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
tokio-util = "0.7"
reqwest = { version = "0.13.1", default-features = false, features = ["stream", "json", "native-tls", "http2"] }
reqwest = { version = "0.13", default-features = false, features = ["stream", "json", "native-tls", "http2"] }
eventsource-stream = "0.2"
llm-worker-macros = { path = "../llm-worker-macros", version = "0.2" }
llm-worker-macros = { workspace = true }
[dev-dependencies]
clap = { version = "4.5", features = ["derive", "env"] }
schemars = "1.2"
tempfile = "3.24"
schemars = { workspace = true }
tempfile = { workspace = true }
dotenv = "0.15"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
trybuild = "1.0.116"

View File

@ -5,13 +5,13 @@ edition.workspace = true
license.workspace = true
[dependencies]
llm-worker = { version = "0.2.1", path = "../llm-worker" }
protocol = { version = "0.1.0", path = "../protocol" }
serde = { version = "1.0.228", features = ["derive"] }
llm-worker = { workspace = true }
protocol = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_ignored = "0.1.14"
thiserror = "2.0.18"
toml = "1.1.2"
tracing = "0.1.44"
thiserror = { workspace = true }
toml = { workspace = true }
tracing = { workspace = true }
[dev-dependencies]
tempfile = "3.27.0"
tempfile = { workspace = true }

View File

@ -5,19 +5,19 @@ edition.workspace = true
license.workspace = true
[dependencies]
async-trait = "0.1.89"
chrono = { version = "0.4.44", features = ["serde"] }
libc = "0.2.186"
llm-worker = { version = "0.2.1", path = "../llm-worker" }
manifest = { version = "0.1.0", path = "../manifest" }
schemars = "1.2.1"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
async-trait = { workspace = true }
chrono = { version = "0.4", features = ["serde"] }
libc = { workspace = true }
llm-worker = { workspace = true }
manifest = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_yaml = "0.9.34"
thiserror = "2.0.18"
tracing = "0.1.44"
uuid = { version = "1.23.1", features = ["v7", "serde"] }
thiserror = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true, features = ["v7", "serde"] }
[dev-dependencies]
tempfile = "3.27.0"
tokio = { version = "1.52.1", features = ["macros", "rt-multi-thread"] }
tempfile = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }

View File

@ -5,13 +5,13 @@ edition.workspace = true
license.workspace = true
[dependencies]
fs4 = { version = "0.13.1", features = ["sync"] }
libc = "0.2.186"
manifest = { version = "0.1.0", path = "../manifest" }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
session-store = { version = "0.1.0", path = "../session-store" }
thiserror = "2.0"
fs4 = { workspace = true, features = ["sync"] }
libc = { workspace = true }
manifest = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
session-store = { workspace = true }
thiserror = { workspace = true }
[dev-dependencies]
tempfile = "3.27.0"
tempfile = { workspace = true }

View File

@ -5,37 +5,37 @@ edition.workspace = true
license.workspace = true
[dependencies]
async-trait = "0.1.89"
async-trait = { workspace = true }
clap = { version = "4.6.0", features = ["derive"] }
llm-worker = { version = "0.2.1", path = "../llm-worker" }
session-store = { version = "0.1.0", path = "../session-store" }
manifest = { version = "0.1.0", path = "../manifest" }
protocol = { version = "0.1.0", path = "../protocol" }
provider = { version = "0.1.0", path = "../provider" }
pod-registry = { version = "0.1.0", path = "../pod-registry" }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
thiserror = "2.0"
tokio = { version = "1.49", features = ["fs", "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] }
toml = "1.1.2"
tracing = "0.1.44"
tools = { version = "0.1.0", path = "../tools" }
llm-worker = { workspace = true }
session-store = { workspace = true }
manifest = { workspace = true }
protocol = { workspace = true }
provider = { workspace = true }
pod-registry = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["fs", "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] }
toml = { workspace = true }
tracing = { workspace = true }
tools = { workspace = true }
minijinja = "2.19.0"
chrono = "0.4.44"
chrono = "0.4"
include_dir = "0.7.4"
fs4 = { version = "0.13.1", features = ["sync"] }
libc = "0.2.186"
schemars = "1.2.1"
memory = { version = "0.1.0", path = "../memory" }
uuid = { version = "1.23.1", features = ["v7"] }
fs4 = { workspace = true, features = ["sync"] }
libc = { workspace = true }
schemars = { workspace = true }
memory = { workspace = true }
uuid = { workspace = true, features = ["v7"] }
[dev-dependencies]
async-trait = "0.1.89"
async-trait = { workspace = true }
dotenv = "0.15.0"
futures = "0.3.32"
session-store = { path = "../session-store" }
tempfile = "3.27.0"
tokio = { version = "1.49", features = ["macros", "rt-multi-thread", "time"] }
futures = { workspace = true }
session-store = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] }
[build-dependencies]
toml = "1.1.2"
toml = { workspace = true }

View File

@ -5,7 +5,7 @@ edition.workspace = true
license.workspace = true
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.51.1", features = ["io-util"] }
uuid = { version = "1.23.1", features = ["serde"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["io-util"] }
uuid = { workspace = true, features = ["serde"] }

View File

@ -5,20 +5,20 @@ edition.workspace = true
license.workspace = true
[dependencies]
async-trait = "0.1.89"
async-trait = { workspace = true }
base64 = "0.22.1"
chrono = { version = "0.4.44", default-features = false, features = ["serde", "clock"] }
llm-worker = { version = "0.2.1", path = "../llm-worker" }
manifest = { version = "0.1.0", path = "../manifest" }
reqwest = { version = "0.13.2", features = ["json", "native-tls"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
thiserror = "2.0"
tokio = { version = "1.52.1", features = ["sync", "fs", "rt"] }
toml = "1.1.2"
tracing = "0.1.44"
chrono = { version = "0.4", default-features = false, features = ["serde", "clock"] }
llm-worker = { workspace = true }
manifest = { workspace = true }
reqwest = { version = "0.13", features = ["json", "native-tls"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["sync", "fs", "rt"] }
toml = { workspace = true }
tracing = { workspace = true }
[dev-dependencies]
serial_test = "3.4.0"
tempfile = "3.27.0"
tempfile = { workspace = true }
wiremock = "0.6.5"

View File

@ -6,19 +6,19 @@ edition.workspace = true
license.workspace = true
[dependencies]
llm-worker = { path = "../llm-worker" }
async-trait = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.49", features = ["fs", "io-util"] }
uuid = { version = "1", features = ["v7", "serde"] }
thiserror = "2.0"
sha2 = "0.11.0"
llm-worker = { workspace = true }
async-trait = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["fs", "io-util"] }
uuid = { workspace = true, features = ["v7", "serde"] }
thiserror = { workspace = true }
sha2 = { workspace = true }
hex = "0.4.3"
protocol = { version = "0.1.0", path = "../protocol" }
protocol = { workspace = true }
[dev-dependencies]
tokio = { version = "1.49", features = ["macros", "rt-multi-thread", "fs", "io-util"] }
tempfile = "3.24"
futures = "0.3"
async-trait = "0.1"
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "fs", "io-util"] }
tempfile = { workspace = true }
futures = { workspace = true }
async-trait = { workspace = true }

View File

@ -5,23 +5,23 @@ edition.workspace = true
license.workspace = true
[dependencies]
async-trait = "0.1.89"
async-trait = { workspace = true }
globset = "0.4.18"
grep-matcher = "0.1.8"
grep-regex = "0.1.14"
grep-searcher = "0.1.16"
ignore = "0.4.25"
llm-worker = { version = "0.2.1", path = "../llm-worker" }
manifest = { version = "0.1.0", path = "../manifest" }
schemars = "1.2.1"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
sha2 = "0.11.0"
tempfile = "3.27.0"
thiserror = "2.0.18"
tokio = { version = "1.51.1", features = ["process", "rt", "time"] }
tracing = "0.1.44"
llm-worker = { workspace = true }
manifest = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha2 = { workspace = true }
tempfile = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["process", "rt", "time"] }
tracing = { workspace = true }
[dev-dependencies]
filetime = "0.2.27"
tokio = { version = "1.51.1", features = ["macros", "rt-multi-thread"] }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }

View File

@ -5,14 +5,14 @@ edition.workspace = true
license.workspace = true
[dependencies]
protocol = { path = "../protocol" }
protocol = { workspace = true }
ratatui = { version = "0.30.0", features = ["scrolling-regions"] }
crossterm = "0.28"
tokio = { version = "1.49", features = ["rt-multi-thread", "macros", "net", "io-util", "sync", "time", "process"] }
serde_json = "1.0"
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "net", "io-util", "sync", "time", "process"] }
serde_json = { workspace = true }
unicode-width = "0.2.2"
uuid = "1.23"
toml = "1.1.2"
manifest = { version = "0.1.0", path = "../manifest" }
session-store = { version = "0.1.0", path = "../session-store" }
pod-registry = { version = "0.1.0", path = "../pod-registry" }
uuid = { workspace = true }
toml = { workspace = true }
manifest = { workspace = true }
session-store = { workspace = true }
pod-registry = { workspace = true }

View File

@ -31,7 +31,7 @@ SKILL.md frontmatter:
## 前提チケット
- `tickets/workflow.md` — Workflow loader / `/<slug>` resolve / `auto_invoke` 注入の本実装。本チケットはその ingest 経路を増やすだけで、Workflow 側の意味論には手を入れない
- `tickets/workflow.md` — Workflow loader / `/<slug>` resolve / `model_invokation` 注入の本実装。本チケットはその ingest 経路を増やすだけで、Workflow 側の意味論には手を入れない
## 方針
@ -55,7 +55,7 @@ SKILL.md frontmatter:
|---|---|---|
| `name` | (ファイル名 = slug として扱う) | `name` がディレクトリ名と一致することは仕様上の不変。slug としてはディレクトリ名を使用 |
| `description` | `description` | そのまま |
| — | `auto_invoke` | **`true` 固定**。agentskills の progressive disclosureメタデータ常時注入と整合 |
| — | `model_invokation` | **`true` 固定**。agentskills の progressive disclosureメタデータ常時注入と整合 |
| — | `user_invocable` | **`true` 固定** |
| — | `requires` | **空配列**。SKILL 側に概念がない |
| `license` / `compatibility` / `metadata` | — | 保持はするが Workflow 実行には影響しない |

View File

@ -24,7 +24,7 @@ INSOMNIA が内部で固定 prompt を持って disposable Worker / 専用 Pod
- 同じファイル形式(`memory/workflow/<slug>.md`)、同じ frontmatter / Linter
- `user_invocable: false``/<slug>` 経路から見えなくする
- `auto_invoke` は通常 Pod 用の system prompt 注入仕様のまま(内部 Workflow は通常 OFF
- `model_invokation` は通常 Pod 用の system prompt 注入仕様のまま(内部 Workflow は通常 OFF
- 内部 Workflow を識別するキー(例: `internal_role`)と、必要なツール surface を表明する手段を frontmatter に追加する。具体 schema は実装で詰める
### 内部呼び出し経路
@ -54,7 +54,7 @@ Pod 側の既存トリガーPhase 1 post-run / Phase 2 staging 閾値 / Compa
- Workflow 仕様自体の本体実装(`tickets/workflow.md`
- 内部 Workflow の自動生成consolidation の offer 等。`docs/plan/memory.md` §Offer 経路 / 将来検討)
- 既存 `&str` 定数の物理削除タイミング(移行が完了した role ごとに削除する運用)
- `auto_invoke` 注入予算の最適化(既存 Knowledge 常駐注入予算と合算する規約は `docs/plan/memory.md` 側)
- `model_invokation` 注入予算の最適化(既存 Knowledge 常駐注入予算と合算する規約は `docs/plan/memory.md` 側)
## 完了条件

View File

@ -14,7 +14,7 @@ agent-skills (agentskills.io 形式) は本チケットの ingest 経路を再
- 呼び出し: `/<slug>`、フラットな名前空間、kebab-case
- 配置: `<workspace_root>/.insomnia/memory/workflow/<slug>.md`(ファイル名 = slug、frontmatter に `name` を持たない)
- frontmatter: `description` / `auto_invoke` (default OFF) / `user_invocable` (default ON) / `requires: [knowledge-slug, ...]`
- frontmatter: `description` / `model_invokation` (default OFF) / `user_invocable` (default ON) / `requires: [knowledge-slug, ...]`
- 実行: `requires` の Knowledge 本文を context に inject してから Workflow 本文を実行
- 自動書き込み禁止consolidation の write tool schema に `workflow` カテゴリを含めないことで構造的に担保。Linter で人間にも見える形で再保証)
@ -34,8 +34,8 @@ agent-skills (agentskills.io 形式) は本チケットの ingest 経路を再
- `requires` の Knowledge 本文を Knowledge 検索ツールの slug 完全一致経路で取得し、Workflow 本文の前に context へ inject
- Workflow 本文は Markdown のままサブミット内容として扱うDSL 化はしない)
3. **`auto_invoke` 注入**
- `auto_invoke: true` な Workflow の `description` を通常 Pod の system prompt に常駐注入する。Phase 2 prompt には入れない
3. **`model_invokation` 注入**
- `model_invokation: true` な Workflow の `description` を通常 Pod の system prompt に常駐注入する。Phase 2 prompt には入れない
- 予算は Knowledge の常駐注入(`memory.md` §retrieval 経路と合算管理。description 上限は agentskills 準拠の 1024 chars に揃える
4. **Linter ルール**
@ -55,14 +55,14 @@ agent-skills (agentskills.io 形式) は本チケットの ingest 経路を再
- `<workspace_root>/.insomnia/memory/workflow/*.md` をロードし、frontmatter 違反は Pod 起動エラーになる
- `/<slug>` を含む submit が `Segment::WorkflowInvoke` として送られ、Pod 側で `requires` Knowledge を inject した上で本文が実行される
- `auto_invoke: true` の Workflow description が通常 Pod の system prompt に列挙される
- `model_invokation: true` の Workflow description が通常 Pod の system prompt に列挙される
- `user_invocable: false` の Workflow は `/<slug>` 補完候補から除外され、明示呼び出しもエラーになる
- 単体テストで frontmatter 検証の正常 / 異常系、`requires` 解決、フラグ別の挙動が verify される
## 実装順序
1. `manifest` または既存 memory クレートに `Workflow` 構造体と `WorkflowDirectoryLoader` を置く。frontmatter パースと検証のみでテスト完結
2. Pod に Workflow registry を持たせ、`auto_invoke` description の system prompt 注入を組む
2. Pod に Workflow registry を持たせ、`model_invokation` description の system prompt 注入を組む
3. `Segment::WorkflowInvoke` の resolver を Pod 側に実装。Knowledge 検索ツールの slug 完全一致経路で `requires` を inject
4. 汎用 Write/Edit に対する `memory/workflow/` deny を Scope に追加、Linter 仕上げ