Skip to content

Commit a8d2685

Browse files
committed
feat: add directory projects and local snapshot versions
1 parent f956bad commit a8d2685

67 files changed

Lines changed: 5010 additions & 1861 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/config.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
"changelog": "@changesets/cli/changelog",
44
"commit": false,
55
"fixed": [
6-
["@openagentpack/sdk", "@openagentpack/project-versions", "@openagentpack/playground", "@openagentpack/cli"]
6+
[
7+
"@openagentpack/sdk",
8+
"@openagentpack/project-versions",
9+
"@openagentpack/project-workspace",
10+
"@openagentpack/playground",
11+
"@openagentpack/cli"
12+
]
713
],
814
"linked": [],
915
"access": "public",

.changeset/project-playground-debugger.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"@openagentpack/cli": minor
55
---
66

7-
Replace the fixed Playbook showcase with an `agents.yaml` project debugger. Playground now watches project inputs, performs fingerprint-protected per-Agent Plan and Apply operations, streams operation and Session events, and manages explicit temporary attachment cleanup without mutating YAML or Deployment declarations.
7+
Replace the fixed Playbook showcase with project-aware debugging. `agents playground` remains a read-only `agents.yaml` Session Preview, while `agents project workbench` watches and edits a directory project, performs fingerprint-protected Build/Plan/Publish operations, streams operation and Session events, and manages explicit temporary attachment cleanup.
88

9-
Add SDK source-path tracking, runtime-scoped Agent planning, stable plan fingerprints, and stale-plan enforcement. The CLI now launches Preview with `agents playground -f/--file [--agent <id>]`, exposes the project console separately through `agents workbench`, and falls back to the diagnostic Workbench for missing, invalid, empty, or unselected multi-Agent projects; the former `playground --provider` option is removed.
9+
Add SDK source-path tracking, runtime-scoped Agent planning, full-project planning, stable plan fingerprints, and stale-plan enforcement. Preview stays at `agents playground -f/--file [--agent <id>]`; the project console moves under `agents project workbench --project <directory>`.
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
---
22
"@openagentpack/sdk": minor
33
"@openagentpack/project-versions": minor
4+
"@openagentpack/project-workspace": minor
45
"@openagentpack/playground": minor
56
"@openagentpack/cli": minor
67
---
78

8-
Publish the shared Git-independent local snapshot engine and use one versioning
9-
switch across the CLI and Workbench.
9+
Publish a directory workspace service for deterministic Build/Publish and a
10+
Git-independent full source-tree snapshot engine. CLI and Workbench share one
11+
versioning switch, content-addressed text/binary blobs, forward restore, and a
12+
cross-process mutation lock while remote State remains excluded. Project Build
13+
previews now show full directory source changes against the current version HEAD.

.changeset/workbench-resource-editing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@openagentpack/playground": minor
33
---
44

5-
Add Workbench editing and removal for existing `agents.yaml` resources with server-side YAML previews, conflict and reference protection, automatic project runtime planning, and separately confirmed Apply.
5+
Add Workbench editing and removal for resources already present in a directory project. Agent JSON, instructions Markdown, Skill metadata/content, and project resources use server-side redacted previews, revision conflicts, reference protection, explicit Build, full-project Plan, and separately confirmed Publish.

.dependency-cruiser.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ module.exports = {
3030
from: { path: "^packages/project-versions/" },
3131
to: { path: "^(packages/cli|packages/playground|apps/server|apps/webui)/" },
3232
},
33+
{
34+
name: "no-project-workspace-to-hosts-or-apps",
35+
severity: "error",
36+
comment: "@openagentpack/project-workspace is a shared Node engine and must not depend on hosts or applications.",
37+
from: { path: "^packages/project-workspace/" },
38+
to: { path: "^(packages/cli|packages/playground|apps/server|apps/webui)/" },
39+
},
3340
{
3441
name: "no-sdk-deep-imports",
3542
severity: "error",
@@ -57,6 +64,13 @@ module.exports = {
5764
from: { path: "^apps/webui/src/" },
5865
to: { path: "^packages/project-versions/" },
5966
},
67+
{
68+
name: "no-webui-project-workspace-runtime-import",
69+
severity: "error",
70+
comment: "Browser-facing code must use Workbench APIs instead of importing the Node-only workspace engine.",
71+
from: { path: "^apps/webui/src/" },
72+
to: { path: "^packages/project-workspace/" },
73+
},
6074
],
6175
options: {
6276
doNotFollow: {

README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,19 @@ The mechanics are a single `agents.yaml`, a `validate → plan → apply` workfl
7777
## Quick start
7878

7979
```bash
80-
agents init # interactive wizard writes a starter agents.yaml
81-
agents validate # offline YAML check, no API calls
82-
agents plan # preview create / update / delete
83-
agents apply -y # apply changes
84-
agents version enable # optional: version YAML after successful Apply
85-
agents destroy # tear down managed resources
80+
agents project init # create a directory project (or convert agents.yaml)
81+
agents project validate # validate JSON, Markdown, skills, and local files
82+
agents project build --dry-run # preview organization and generated YAML
83+
agents project build -y # freeze the current source into a Build
84+
agents project publish -y # publish exactly that Build and record a version
85+
agents project workbench # edit and debug the same directory project
8686
```
8787

88-
Run `agents playground -f agents.yaml` to open an Agent directly in Preview; single-Agent projects are selected automatically, while multi-Agent projects accept `--agent <id>` or open the Workbench for selection. Use `agents workbench -f agents.yaml` to open the project console without creating a Session. Playground reads every Agent and Provider from YAML and watches local dependencies. In the Workbench, Resources can edit or remove existing Agent, Environment, Skill, Vault, Memory Store, and File declarations through a server-generated YAML Diff; saving updates `agents.yaml` and automatically refreshes the project Plan. Local versions remain absent until the user explicitly enables them in the project-level Versions tab or with `agents version enable`. When enabled, a successful Apply versions changed YAML; the Versions tab uses the same switch as `agents version enable|disable`, browses history, and restores historical YAML as a forward working-tree change.
88+
Directory projects keep global settings in `project.json`, each Agent under `agents/<id>/`, Agent instructions in `instructions.md`, and local Skill source either beside its Agent or under the shared `skills/` directory. Build promotes a Skill to the shared directory when multiple Agents reference it and deterministically writes `.openagentpack/build/agents.yaml`. Publish never runs Build implicitly.
8989

90-
The CLI exposes local history through `agents version status|enable|disable|list|preview|restore`. Workbench and CLI share one local switch per `agents.yaml`: `agents version enable` creates a baseline when needed and enables successful Apply versions in both hosts, while `version disable` disables them in both. `store.json` contains only the switch and head; immutable linked entries live under `entries/`, and complete YAML lives in content-addressed `blobs/`, so Git is not required. Restore writes historical YAML into the working tree without changing version history. Neither `agents.state.json` nor referenced files are included. Deployment and Channel declarations stay read-only and are excluded from Workbench project Apply. Missing or invalid projects open the diagnostic Workbench.
90+
Workbench and CLI share `agents project version status|enable|disable|list|preview|restore`. Versions are Git-independent full source-tree snapshots: immutable manifests point to content-addressed text and binary blobs, while `.openagentpack/state.json` is always excluded. Restore writes a historical tree forward into the working directory without moving version history or remote State. Deployment and Channel declarations remain read-only in Workbench but participate in full project Publish.
91+
92+
The original YAML workflow remains available through `agents init`, `validate`, `plan`, `apply`, and `destroy`. `agents playground -f agents.yaml` continues to open a YAML Agent Session Preview, but YAML Apply no longer creates project versions and cannot be used inside a directory-project root.
9193

9294
[Watch the full Playground demo](https://github.com/user-attachments/assets/bf51b8d8-f2ed-464b-bca9-0709fefcc44d)
9395

@@ -175,29 +177,31 @@ The [`examples/`](./examples) directory has runnable configs for every provider,
175177

176178
## Using the SDK
177179

178-
Cloud project runtime capabilities are available programmatically from `@openagentpack/sdk`; Node-only local project versions are provided separately by `@openagentpack/project-versions`:
180+
Cloud runtime capabilities are available from `@openagentpack/sdk`. Directory compilation, Build/Publish, and full-tree versions are exposed by `@openagentpack/project-workspace`, backed by the storage primitives in `@openagentpack/project-versions`:
179181

180182
```ts
181-
import { resolveProjectConfig, planProjectContext } from "@openagentpack/sdk";
182-
import { createProjectVersionService } from "@openagentpack/project-versions";
183-
184-
const config = await resolveProjectConfig({ configPath: "agents.yaml" });
185-
const plan = await planProjectContext(config);
186-
console.log(plan);
183+
import { previewProjectBuild, commitProjectBuild } from "@openagentpack/project-workspace";
184+
185+
const preview = await previewProjectBuild("./my-agent");
186+
const build = await commitProjectBuild({
187+
projectRoot: preview.project_root,
188+
baseRevision: preview.project_revision,
189+
});
190+
console.log(build.manifest);
187191
```
188192

189193
See the [SDK reference](./docs/reference/sdk.md) for the public API surface.
190194

191195
## WebUI
192196

193-
`apps/webui` is a Vite single-page project workbench for inspecting and debugging the Agents declared in `agents.yaml`; `apps/server` exposes the SDK over an OpenAPI surface. Run both from the repo root:
197+
`apps/webui` is a Vite directory-project Workbench; `apps/server` exposes directory editing, Build/Publish, versions, and Session debugging over an OpenAPI surface. Run both from the repo root with `AGENTS_PROJECT_ROOT` pointing at a project:
194198

195199
```bash
196200
bun install
197201
bun run dev # server + webui together
198202
```
199203

200-
Or launch the packaged local UI with `agents playground -f <path/to/agents.yaml>` for Preview or `agents workbench -f <path/to/agents.yaml>` for the project console. Provider, model, tools, memory, skills, and resources come from YAML; the UI does not override them. Deployment declarations are displayed read-only.
204+
Launch the packaged project console with `agents project workbench --project <directory>`. Use `agents playground -f <path/to/agents.yaml>` only for the legacy YAML Session Preview. Workbench edits directory source, requires an explicit Build, and publishes the reviewed Build; it never edits Provider ownership or pushes Git state.
201205

202206
## Contributing
203207

0 commit comments

Comments
 (0)