@crossdelta/platform-sdk 0.25.6 โ 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +19 -46
- package/bin/cli.mjs +101 -237
- package/bin/docs/generators/README.md +4 -32
- package/bin/templates/workspace/.claude/rules/cloudevents.md +1 -2
- package/bin/templates/workspace/CLAUDE.md +5 -1
- package/bin/templates/workspace/package.json.hbs +9 -0
- package/bin/templates/workspace/packages/contracts/README.md.hbs +1 -1
- package/package.json +1 -43
- package/schemas/service-types.schema.json +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,31 @@ All notable changes to `@crossdelta/platform-sdk` will be documented in this fil
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.26.0] - 2026-10-11
|
|
9
|
+
|
|
10
|
+
### Removed
|
|
11
|
+
- **BREAKING: `pf setup ai` and the AI generation path are gone.** `pf setup ai`, the `--ai` and `-d`
|
|
12
|
+
options of `pf new hono-micro` and `pf new nest-micro`, and the "Use AI?" step of `pf new` no longer
|
|
13
|
+
exist. Services are generated through the pf MCP server (`@crossdelta/pf-mcp`), which is unchanged.
|
|
14
|
+
The AI provider code, the events service updater, the NestJS and AST patchers that only it used, the
|
|
15
|
+
`generatorConfig` block with its `schemas/service-types.schema.json`, and the dependencies `ai`,
|
|
16
|
+
`@ai-sdk/anthropic`, `@ai-sdk/openai`, `@inquirer/prompts`, `ora` and `ts-morph` went with it.
|
|
17
|
+
`AI_IMAGE_PROVIDERS` (added in 0.25.0) is removed too; its only user, the demo-seed image script, now holds
|
|
18
|
+
its one entry itself.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- README: the AI section is replaced by a short section on the pf MCP server, and the commands table
|
|
22
|
+
lists `pf new workspace` and `pf pulumi`.
|
|
23
|
+
|
|
24
|
+
## [0.25.7] - 2026-10-09
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- **`pf dev` ends with a single Ctrl+C.** Turbo's TUI takes Ctrl+C as a key press, stops its tasks
|
|
28
|
+
and exits; `pf` only followed when that exit code was 1, so every other outcome (0, 130, a signal)
|
|
29
|
+
left `pf` and its file watchers running until a second Ctrl+C. Now any turbo exit that `pf` did not
|
|
30
|
+
cause itself (neither restart nor shutdown) shuts `pf` down: watchers closed, process group
|
|
31
|
+
cleaned up, exit code 0 for a cancellation and the turbo code otherwise.
|
|
32
|
+
|
|
8
33
|
## [0.25.6] - 2026-10-07
|
|
9
34
|
|
|
10
35
|
### Fixed
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<code>pf</code> scaffolds real-world platforms: backend services, event-driven messaging, infrastructure. All wired together and kept in sync.
|
|
12
|
+
<code>pf</code> scaffolds real-world platforms: backend services, event-driven messaging, infrastructure. All wired together and kept in sync.
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
|
|
@@ -116,74 +116,47 @@ pf cloudevents publish order.created
|
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
119
|
-
##
|
|
119
|
+
## ๐งฐ Commands
|
|
120
120
|
|
|
121
121
|
| Command | What it does |
|
|
122
122
|
|:--------|:-------------|
|
|
123
123
|
| `pf dev` | ๐ Start development infrastructure (NATS) + all services in watch mode |
|
|
124
124
|
| `pf new hono-micro <path>` | โก Create a Hono service (lightweight, Bun-optimized) |
|
|
125
125
|
| `pf new nest-micro <path>` | ๐ข Create a NestJS service (full-featured, decorators) |
|
|
126
|
+
| `pf new workspace [name]` | ๐๏ธ Create a new workspace with infrastructure setup |
|
|
126
127
|
| `pf cloudevents add <type> --service <path>` | ๐ Add contract + handler + wire stream |
|
|
127
128
|
| `pf cloudevents list` | ๐ List available events and consumers |
|
|
128
129
|
| `pf cloudevents publish <type>` | ๐ค Publish mock event to NATS |
|
|
129
130
|
| `pf setup completion` | ๐ง Install shell autocompletion (zsh/bash) |
|
|
130
|
-
| `pf setup ai` | ๐ค Configure AI provider for code generation |
|
|
131
131
|
| `pf test` | ๐งช Run tests across the monorepo |
|
|
132
132
|
| `pf build` | ๐ฆ Build all packages and services |
|
|
133
133
|
| `pf lint` | โจ Lint and format with Biome |
|
|
134
134
|
| `pf audit` | ๐ Run security audit on dependencies |
|
|
135
|
+
| `pf pulumi <args>` | โ๏ธ Run Pulumi in the workspace's `infra/` directory, e.g. `pf pulumi up` |
|
|
135
136
|
|
|
136
|
-
> `pf`
|
|
137
|
+
> Your workspace can add its own commands: an entry under `pf.commands` in the root `package.json` (optionally with `cwd` and `command`), or any root `scripts` entry, runs as `pf <name>`. Plugins listed under `pf.plugins` add command groups, as `@crossdelta/cloudevents` does for `pf cloudevents`. The plugin interface is described in `docs/plugins.md` in the package source.
|
|
137
138
|
|
|
138
139
|
---
|
|
139
140
|
|
|
140
|
-
##
|
|
141
|
+
## ๐งฉ Works with coding agents
|
|
141
142
|
|
|
142
|
-
|
|
143
|
+
`@crossdelta/pf-mcp` is a [Model Context Protocol](https://github.com/modelcontextprotocol/typescript-sdk) server for the Platform SDK. It exposes four tools:
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
The AI generates **convention-following code** tailored to your platform:
|
|
145
|
+
| Tool | What it does |
|
|
146
|
+
|:-----|:-------------|
|
|
147
|
+
| `scan_workspace` | Scan the workspace for services, contracts, and configuration |
|
|
148
|
+
| `generate_service` | Generate a plan for a new microservice (dry-run by default) |
|
|
149
|
+
| `plan_review` | Validate a generation plan before applying |
|
|
150
|
+
| `apply_changes` | Apply the changes from a generation plan |
|
|
152
151
|
|
|
153
|
-
|
|
154
|
-
<tr>
|
|
155
|
-
<td>โ
</td>
|
|
156
|
-
<td><strong>Event contracts</strong> with Zod schemas in <code>packages/contracts/</code></td>
|
|
157
|
-
</tr>
|
|
158
|
-
<tr>
|
|
159
|
-
<td>โ
</td>
|
|
160
|
-
<td><strong>Event handlers</strong> that auto-discover and consume from NATS</td>
|
|
161
|
-
</tr>
|
|
162
|
-
<tr>
|
|
163
|
-
<td>โ
</td>
|
|
164
|
-
<td><strong>Use-cases/Services</strong> with business logic separated from handlers</td>
|
|
165
|
-
</tr>
|
|
166
|
-
<tr>
|
|
167
|
-
<td>โ
</td>
|
|
168
|
-
<td><strong>Tests</strong> for use-cases with realistic scenarios</td>
|
|
169
|
-
</tr>
|
|
170
|
-
<tr>
|
|
171
|
-
<td>โ
</td>
|
|
172
|
-
<td><strong>Type-safe:</strong> no <code>any</code>, proper imports, strict TypeScript</td>
|
|
173
|
-
</tr>
|
|
174
|
-
<tr>
|
|
175
|
-
<td>โ
</td>
|
|
176
|
-
<td><strong>Lint-compliant:</strong> passes Biome formatting out of the box</td>
|
|
177
|
-
</tr>
|
|
178
|
-
</table>
|
|
152
|
+
The server plans the structure; the agent writes the content. A service is created in this order: the agent calls `generate_service` with a prompt, receives a plan with files and a `planHash`, writes the code for those files, optionally calls `plan_review`, asks you to confirm, and then calls `apply_changes` with `expectedPlanHash`.
|
|
179
153
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
- **Hot-reload friendly:** `pf dev` automatically restarts when AI finishes
|
|
154
|
+
```bash
|
|
155
|
+
bun add @crossdelta/pf-mcp
|
|
156
|
+
node ./node_modules/@crossdelta/pf-mcp/dist/cli.js --stdio
|
|
157
|
+
```
|
|
185
158
|
|
|
186
|
-
|
|
159
|
+
The server talks over stdio, so the MCP client of your agent has to start that command. It also serves the generator guidelines from `docs/generators/` in the package source as the MCP resource `docs://generators`.
|
|
187
160
|
|
|
188
161
|
---
|
|
189
162
|
|