GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(sdk): consolidate project services into SDK (#111) · modelstudioai/OpenAgentPack@0084ddc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .changeset
    • config.json
  • .dependency-cruiser.cjs
  • .github/workflows
    • ci.yml
  • README.md
  • README.zh-CN.md
  • apps/server
    • package.json
    • src
      • routes
        • project.ts
      • services
        • project-declarations.ts
        • project-manager.ts
        • project-versions.ts
    • tests
      • project-declarations.test.ts
      • project-manager.test.ts
      • project-versions.test.ts
  • bun.lock
  • docs
    • contributing
      • release.md
      • release.zh-CN.md
    • reference
      • sdk.md
  • package.json
  • packages
    • cli
      • CHANGELOG.md
      • package.json
      • src
        • commands
          • apply.ts
          • destroy.ts
          • plan.ts
          • project.ts
        • versioning
          • project-versions.ts
      • tests/unit
        • version.test.ts
    • playground
      • CHANGELOG.md
      • package.json
      • tsup.config.ts
    • project-versions
      • CHANGELOG.md
      • package.json
      • tsconfig.json
      • tsup.config.ts
    • project-workspace
      • CHANGELOG.md
      • package.json
      • tsconfig.json
      • tsup.config.ts
    • sdk
      • CHANGELOG.md
      • README.md
      • docs
        • project-versions.md
        • project-workspace.md
        • public-api-layers.md
      • package.json
      • src
        • internal
          • project-versions
            • directory.ts
            • index.ts
          • project-workspace
            • index.ts
            • scaffold.ts
            • vault-secrets.ts
        • project-versions.ts
        • project-workspace.ts
      • tests/unit
        • project-scaffold.test.ts
        • project-vault-secrets.test.ts
        • project-versions.test.ts
        • project-workspace.test.ts
      • tsup.config.ts
  • scripts
    • open-source.test.ts
    • release
      • build.ts
      • channel.ts
      • consumer-smoke.ts
      • playground-bundle.test.ts
      • project-sdk-smoke.ts
      • publish.ts
      • smoke-packed.test.ts
      • smoke-packed.ts
      • snapshot.ts
    • verify.ts

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.changeset/config.json‎

Copy file name to clipboardExpand all lines: .changeset/config.json
+1-9Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
33
"changelog": "@changesets/cli/changelog",
44
"commit": false,
5-
"fixed": [
6-
[
7-
"@openagentpack/sdk",
8-
"@openagentpack/project-versions",
9-
"@openagentpack/project-workspace",
10-
"@openagentpack/playground",
11-
"@openagentpack/cli"
12-
]
13-
],
5+
"fixed": [["@openagentpack/sdk", "@openagentpack/playground", "@openagentpack/cli"]],
146
"linked": [],
157
"access": "public",
168
"baseBranch": "main",
Collapse file

‎.dependency-cruiser.cjs‎

Copy file name to clipboardExpand all lines: .dependency-cruiser.cjs
+12-23Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,25 @@ module.exports = {
2020
severity: "error",
2121
comment: "@openagentpack/sdk is the shared engine and must not depend on host packages or applications.",
2222
from: { path: "^packages/sdk/" },
23-
to: { path: "^(packages/cli|apps/server|apps/webui)/" },
23+
to: { path: "^(packages/cli|packages/playground|apps/server|apps/webui)/" },
2424
},
2525
{
26-
name: "no-project-versions-to-hosts-or-apps",
26+
name: "no-sdk-core-to-project-services",
2727
severity: "error",
2828
comment:
29-
"@openagentpack/project-versions is a shared Node engine and must not depend on host packages or applications.",
30-
from: { path: "^packages/project-versions/" },
31-
to: { path: "^(packages/cli|packages/playground|apps/server|apps/webui)/" },
29+
"Core SDK modules must not pull Node project services into the default entry or create dependency cycles.",
30+
from: {
31+
path: "^packages/sdk/src/",
32+
pathNot: "^packages/sdk/src/(internal/project-(versions|workspace)/|project-(versions|workspace)\\.ts$)",
33+
},
34+
to: { path: "^packages/sdk/src/(internal/project-(versions|workspace)/|project-(versions|workspace)\\.ts$)" },
3235
},
3336
{
34-
name: "no-project-workspace-to-hosts-or-apps",
37+
name: "no-project-versions-to-workspace",
3538
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+
comment: "Snapshot storage must remain independent of the directory workspace adapter.",
40+
from: { path: "^packages/sdk/src/(internal/project-versions/|project-versions\\.ts$)" },
41+
to: { path: "^packages/sdk/src/(internal/project-workspace/|project-workspace\\.ts$)" },
3942
},
4043
{
4144
name: "no-sdk-deep-imports",
@@ -57,20 +60,6 @@ module.exports = {
5760
from: { path: "^apps/webui/src/" },
5861
to: { path: "^packages/sdk/" },
5962
},
60-
{
61-
name: "no-webui-project-versions-runtime-import",
62-
severity: "error",
63-
comment: "Browser-facing code must use Workbench APIs instead of importing the Node-only version engine.",
64-
from: { path: "^apps/webui/src/" },
65-
to: { path: "^packages/project-versions/" },
66-
},
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-
},
7463
],
7564
options: {
7665
doNotFollow: {
Collapse file

‎.github/workflows/ci.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- node: 24
6565
scope: all
6666
# Library smoke on the SDK engines floor (>=18.17.0): build and install
67-
# sdk, project-versions, and project-workspace; cli/playground require Node >=22.
67+
# SDK and its project subpaths; cli/playground require Node >=22.
6868
- node: 18.17.0
6969
scope: sdk
7070
- node: 20
@@ -86,8 +86,6 @@ jobs:
8686
- if: matrix.scope == 'sdk'
8787
run: |
8888
bun run build:sdk
89-
bun run build:project-versions
90-
bun run build:project-workspace
9189
bun scripts/release/smoke-packed.ts --sdk-only
9290
9391
gate:
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ The [`examples/`](./examples) directory has runnable configs for every provider,
179179

180180
## Using the SDK
181181

182-
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`:
182+
Cloud runtime capabilities are available from `@openagentpack/sdk`. The same npm package includes Node-only subpaths: `@openagentpack/sdk/project-workspace` provides directory compilation, Build/Publish, and full-tree versions, backed by the storage primitives in `@openagentpack/sdk/project-versions`:
183183

184184
```ts
185-
import { previewProjectBuild, commitProjectBuild } from "@openagentpack/project-workspace";
185+
import { previewProjectBuild, commitProjectBuild } from "@openagentpack/sdk/project-workspace";
186186
187187
const preview = await previewProjectBuild("./my-agent");
188188
const build = await commitProjectBuild({
Collapse file

‎README.zh-CN.md‎

Copy file name to clipboardExpand all lines: README.zh-CN.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ Beta 用户可以安装 `@openagentpack/cli@beta`;固定版本及切回稳定
175175

176176
## 使用 SDK
177177

178-
云端项目运行能力可通过 `@openagentpack/sdk` 以编程方式调用;仅限 Node.js 的本地项目版本能力由独立包 `@openagentpack/project-versions` 提供:
178+
云端项目运行能力可通过 `@openagentpack/sdk` 以编程方式调用;本地版本和目录项目能力随同一个 SDK 包发布,分别通过仅限 Node.js 的 `@openagentpack/sdk/project-versions`、`@openagentpack/sdk/project-workspace` 子路径调用:
179179

180180
```ts
181181
import { resolveProjectConfig, planProjectContext } from "@openagentpack/sdk";
182-
import { createProjectVersionService } from "@openagentpack/project-versions";
182+
import { createProjectVersionService } from "@openagentpack/sdk/project-versions";
183183
184184
const config = await resolveProjectConfig({ configPath: "agents.yaml" });
185185
const plan = await planProjectContext(config);
Collapse file

‎apps/server/package.json‎

Copy file name to clipboardExpand all lines: apps/server/package.json
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
},
1717
"dependencies": {
1818
"@hono/zod-openapi": "^1.4.0",
19-
"@openagentpack/project-versions": "workspace:*",
20-
"@openagentpack/project-workspace": "workspace:*",
2119
"@openagentpack/sdk": "workspace:*",
2220
"chokidar": "^4.0.3",
2321
"hono": "^4.12.28",
Collapse file

‎apps/server/src/routes/project.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/routes/project.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
2+
import { planAgentResourcesWithStateBackend, syncAgentResourcesWithStateBackend } from "@openagentpack/sdk";
23
import {
34
acquireDirectoryProjectMutation,
45
commitProjectBuild,
56
previewProjectBuild,
67
readValidProjectBuild,
7-
} from "@openagentpack/project-workspace";
8-
import { planAgentResourcesWithStateBackend, syncAgentResourcesWithStateBackend } from "@openagentpack/sdk";
8+
} from "@openagentpack/sdk/project-workspace";
99
import { errorResponses } from "@/schemas/common";
1010
import {
1111
AgentApplyBodySchema,
Collapse file

‎apps/server/src/services/project-declarations.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/services/project-declarations.ts
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { randomUUID } from "node:crypto";
22
import { mkdir, readFile, rename, stat, unlink, writeFile } from "node:fs/promises";
33
import { basename, dirname, relative, resolve } from "node:path";
4-
import {
5-
acquireDirectoryProjectMutation,
6-
type DirectoryResourceType,
7-
FILE_AUTO_ASSOCIATION_IGNORE_FILE,
8-
inspectDirectoryProject,
9-
locateDirectoryProjectResource,
10-
} from "@openagentpack/project-workspace";
114
import {
125
type Diagnostic,
136
type ResolvedProjectConfig,
147
resolveProjectConfigFromObject,
158
validateProjectConfig,
169
} from "@openagentpack/sdk";
10+
import {
11+
acquireDirectoryProjectMutation,
12+
type DirectoryResourceType,
13+
FILE_AUTO_ASSOCIATION_IGNORE_FILE,
14+
inspectDirectoryProject,
15+
locateDirectoryProjectResource,
16+
} from "@openagentpack/sdk/project-workspace";
1717
import { parse, stringify } from "yaml";
1818
import { type ProjectRuntimeManager, projectRuntimeManager } from "@/services/project-manager";
1919
import { projectMutationCoordinator } from "@/services/project-mutations";
Collapse file

‎apps/server/src/services/project-manager.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/services/project-manager.ts
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
import { createHash } from "node:crypto";
22
import { existsSync } from "node:fs";
33
import { basename, resolve } from "node:path";
4-
import {
5-
getProjectBuildStatus,
6-
inspectDirectoryProject,
7-
PROJECT_BUILD_FILE,
8-
PROJECT_METADATA_FILE,
9-
PROJECT_STATE_FILE,
10-
resolveDirectoryProjectRuntime,
11-
} from "@openagentpack/project-workspace";
124
import {
135
type AgentWithReadiness,
146
type BackendRuntimeInput,
@@ -18,6 +10,14 @@ import {
1810
type ResolvedProjectConfig,
1911
readProjectRuntime,
2012
} from "@openagentpack/sdk";
13+
import {
14+
getProjectBuildStatus,
15+
inspectDirectoryProject,
16+
PROJECT_BUILD_FILE,
17+
PROJECT_METADATA_FILE,
18+
PROJECT_STATE_FILE,
19+
resolveDirectoryProjectRuntime,
20+
} from "@openagentpack/sdk/project-workspace";
2121
import { type FSWatcher, watch } from "chokidar";
2222
import { type ProjectMutationSnapshot, projectMutationCoordinator } from "@/services/project-mutations";
2323

Collapse file

‎apps/server/src/services/project-versions.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/services/project-versions.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type {
44
DirectoryProjectVersionStatus,
55
DirectoryVersionFileChange,
66
PreparedDirectoryProjectVersion,
7-
} from "@openagentpack/project-versions";
8-
import { createDirectoryWorkspaceVersionService, inspectDirectoryProject } from "@openagentpack/project-workspace";
7+
} from "@openagentpack/sdk/project-versions";
8+
import { createDirectoryWorkspaceVersionService, inspectDirectoryProject } from "@openagentpack/sdk/project-workspace";
99
import { type ProjectRuntimeManager, projectRuntimeManager } from "@/services/project-manager";
1010
import { projectMutationCoordinator } from "@/services/project-mutations";
1111

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.