create-windy 0.2.21 → 0.2.23
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/dist/cli.js +14 -4
- package/package.json +1 -1
- package/template/.windy-template.json +2 -2
- package/template/apps/server/src/index.ts +16 -8
- package/template/apps/server/src/module-host.ts +6 -0
- package/template/apps/server/src/module-runtime-validation.ts +3 -4
- package/template/docs/platform/agent-runtime.md +3 -3
package/dist/cli.js
CHANGED
|
@@ -213,7 +213,11 @@ var optionalModuleManifests = [
|
|
|
213
213
|
"system",
|
|
214
214
|
"system.settings"
|
|
215
215
|
]),
|
|
216
|
-
fileRoots: [
|
|
216
|
+
fileRoots: [
|
|
217
|
+
"apps/server/src/storage",
|
|
218
|
+
"apps/server/src/module-host/route-installer.test.ts",
|
|
219
|
+
"apps/server/src/module-host/storage-port.test.ts"
|
|
220
|
+
],
|
|
217
221
|
documentation: ["docs/architecture/object-storage.md"],
|
|
218
222
|
schemaFiles: ["packages/database/src/schema/file-storage.ts"],
|
|
219
223
|
databaseTables: [
|
|
@@ -230,6 +234,7 @@ var optionalModuleManifests = [
|
|
|
230
234
|
fileRoots: [
|
|
231
235
|
"apps/agent-server",
|
|
232
236
|
"apps/server/src/agent",
|
|
237
|
+
"apps/server/src/module-host/tool-handlers.ts",
|
|
233
238
|
"packages/modules/src/system-agent-tools.ts"
|
|
234
239
|
],
|
|
235
240
|
documentation: [
|
|
@@ -247,6 +252,7 @@ var optionalModuleManifests = [
|
|
|
247
252
|
"apps/server/src/scheduler",
|
|
248
253
|
"apps/server/src/jobs",
|
|
249
254
|
"apps/server/src/application-services.ts",
|
|
255
|
+
"apps/server/src/module-host/task-definitions.ts",
|
|
250
256
|
"apps/web/src/pages/system/components/SchedulerOperationsPanel.vue",
|
|
251
257
|
"apps/web/src/pages/system/components/SchedulerOperationsPanel.webtest.ts",
|
|
252
258
|
"apps/web/src/pages/system/components/SchedulerRunTable.vue",
|
|
@@ -333,6 +339,7 @@ var optionalModuleManifests = [
|
|
|
333
339
|
]),
|
|
334
340
|
fileRoots: [
|
|
335
341
|
"apps/server/src/search",
|
|
342
|
+
"apps/server/src/module-host/search-providers.ts",
|
|
336
343
|
"apps/web/src/layout/NavigationSearchDialog.vue",
|
|
337
344
|
"apps/web/src/layout/NavigationSearchDialog.webtest.ts"
|
|
338
345
|
],
|
|
@@ -4279,7 +4286,9 @@ var recipes = [
|
|
|
4279
4286
|
{ id: "starter-0.2.17-to-0.2.18", from: "0.2.17", to: "0.2.18" },
|
|
4280
4287
|
{ id: "starter-0.2.18-to-0.2.19", from: "0.2.18", to: "0.2.19" },
|
|
4281
4288
|
{ id: "starter-0.2.19-to-0.2.20", from: "0.2.19", to: "0.2.20" },
|
|
4282
|
-
{ id: "starter-0.2.20-to-0.2.21", from: "0.2.20", to: "0.2.21" }
|
|
4289
|
+
{ id: "starter-0.2.20-to-0.2.21", from: "0.2.20", to: "0.2.21" },
|
|
4290
|
+
{ id: "starter-0.2.21-to-0.2.22", from: "0.2.21", to: "0.2.22" },
|
|
4291
|
+
{ id: "starter-0.2.22-to-0.2.23", from: "0.2.22", to: "0.2.23" }
|
|
4283
4292
|
];
|
|
4284
4293
|
function resolveRecipeChain(sourceVersion, targetVersion) {
|
|
4285
4294
|
if (sourceVersion === targetVersion)
|
|
@@ -5114,14 +5123,15 @@ async function finalize(result2) {
|
|
|
5114
5123
|
const generationContent = `${JSON.stringify(result2.plan.targetProvenance, null, 2)}
|
|
5115
5124
|
`;
|
|
5116
5125
|
await writeFile12(join17(root, ".windy/generation.json"), generationContent);
|
|
5126
|
+
const deletedPaths = new Set(result2.plan.files.filter(({ action }) => action === "delete").map(({ path: path2 }) => path2));
|
|
5117
5127
|
const refreshedPaths = new Set([
|
|
5118
5128
|
".windy/generation.json",
|
|
5119
|
-
...result2.changedFiles
|
|
5129
|
+
...result2.changedFiles.filter((path2) => !deletedPaths.has(path2))
|
|
5120
5130
|
]);
|
|
5121
5131
|
const refreshedHashes = new Map(await Promise.all([...refreshedPaths].map(async (path2) => [path2, hashContent(await readFile16(join17(root, path2)))])));
|
|
5122
5132
|
const targetManifest = {
|
|
5123
5133
|
...result2.plan.targetManifest,
|
|
5124
|
-
files: result2.plan.targetManifest.files.map((entry) => ({
|
|
5134
|
+
files: result2.plan.targetManifest.files.filter((entry) => !deletedPaths.has(entry.path)).map((entry) => ({
|
|
5125
5135
|
...entry,
|
|
5126
5136
|
hash: refreshedHashes.get(entry.path) ?? entry.hash
|
|
5127
5137
|
}))
|
package/package.json
CHANGED
|
@@ -57,12 +57,16 @@ import { createStorageRuntime } from "./storage/runtime.js";
|
|
|
57
57
|
import { registerStorageRoutes } from "./storage/routes.js";
|
|
58
58
|
// @windy-module system.storage end
|
|
59
59
|
import { validateInstalledRuntime } from "./module-runtime-validation.js";
|
|
60
|
-
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} from "./module-host.js";
|
|
60
|
+
import { installModuleRoutes } from "./module-host.js";
|
|
61
|
+
// @windy-module system.search begin
|
|
62
|
+
import { adaptModuleSearchProviders } from "./module-host.js";
|
|
63
|
+
// @windy-module system.search end
|
|
64
|
+
// @windy-module system.scheduler begin
|
|
65
|
+
import { createModuleTaskDefinitions } from "./module-host.js";
|
|
66
|
+
// @windy-module system.scheduler end
|
|
67
|
+
// @windy-module system.agent begin
|
|
68
|
+
import { createModuleToolHandlerMap } from "./module-host.js";
|
|
69
|
+
// @windy-module system.agent end
|
|
66
70
|
// @windy-module system.search begin
|
|
67
71
|
import { createSearchHost } from "./search/host.js";
|
|
68
72
|
// @windy-module system.search end
|
|
@@ -309,17 +313,19 @@ registerBulkDataRoutes(
|
|
|
309
313
|
foundationSnapshot.features,
|
|
310
314
|
);
|
|
311
315
|
// @windy-module system.bulk-data end
|
|
312
|
-
// @windy-module work-order begin
|
|
313
316
|
installModuleRoutes(moduleHosts, app, {
|
|
314
317
|
runtime,
|
|
315
318
|
features: foundationSnapshot.features,
|
|
319
|
+
// @windy-module system.scheduler begin
|
|
316
320
|
jobs: durableJobRuntime.service,
|
|
321
|
+
// @windy-module system.scheduler end
|
|
322
|
+
// @windy-module system.storage begin
|
|
317
323
|
storage: {
|
|
318
324
|
uploads: storageRuntime.uploads,
|
|
319
325
|
files: storageRuntime.files,
|
|
320
326
|
},
|
|
327
|
+
// @windy-module system.storage end
|
|
321
328
|
});
|
|
322
|
-
// @windy-module work-order end
|
|
323
329
|
|
|
324
330
|
validateInstalledRuntime({
|
|
325
331
|
modules: foundationModules,
|
|
@@ -327,7 +333,9 @@ validateInstalledRuntime({
|
|
|
327
333
|
// @windy-module system.scheduler begin
|
|
328
334
|
tasks: scheduledTaskDefinitions,
|
|
329
335
|
// @windy-module system.scheduler end
|
|
336
|
+
// @windy-module system.agent begin
|
|
330
337
|
tools: toolHandlers,
|
|
338
|
+
// @windy-module system.agent end
|
|
331
339
|
// @windy-module system.search begin
|
|
332
340
|
providers: searchHost.providerKeys,
|
|
333
341
|
// @windy-module system.search end
|
|
@@ -22,14 +22,20 @@ export {
|
|
|
22
22
|
moduleRolePresetId,
|
|
23
23
|
synchronizeModuleRolePresets,
|
|
24
24
|
} from "./module-host/role-presets.js";
|
|
25
|
+
// @windy-module system.search begin
|
|
25
26
|
export {
|
|
26
27
|
adaptModuleSearchProvider,
|
|
27
28
|
adaptModuleSearchProviders,
|
|
28
29
|
} from "./module-host/search-providers.js";
|
|
30
|
+
// @windy-module system.search end
|
|
29
31
|
export {
|
|
30
32
|
createModuleStoragePort,
|
|
31
33
|
type ModuleStorageScope,
|
|
32
34
|
type ModuleStorageServices,
|
|
33
35
|
} from "./module-host/storage-port.js";
|
|
36
|
+
// @windy-module system.scheduler begin
|
|
34
37
|
export { createModuleTaskDefinitions } from "./module-host/task-definitions.js";
|
|
38
|
+
// @windy-module system.scheduler end
|
|
39
|
+
// @windy-module system.agent begin
|
|
35
40
|
export { createModuleToolHandlerMap } from "./module-host/tool-handlers.js";
|
|
41
|
+
// @windy-module system.agent end
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { ModuleManifest } from "@southwind-ai/modules";
|
|
2
|
-
import type { ModuleToolHandlers } from "./agent/routes.js";
|
|
3
2
|
import { validateServerModuleComposition } from "./module-composition.js";
|
|
4
3
|
import type { InitializedModuleHosts } from "./module-host.js";
|
|
5
4
|
|
|
6
5
|
export function validateInstalledRuntime(input: {
|
|
7
6
|
modules: ModuleManifest[];
|
|
8
7
|
routes: readonly { method: string; path: string }[];
|
|
9
|
-
tasks
|
|
10
|
-
tools
|
|
11
|
-
providers
|
|
8
|
+
tasks?: readonly { key: string }[];
|
|
9
|
+
tools?: ReadonlyMap<string, unknown>;
|
|
10
|
+
providers?: readonly string[];
|
|
12
11
|
hosts: InitializedModuleHosts;
|
|
13
12
|
}): void {
|
|
14
13
|
const aiOperations = input.hosts.aiOperationHandlers.map(
|
|
@@ -114,13 +114,13 @@ SSE 事件包括 `output.delta`、`tool.requested`、`tool.completed`、usage,
|
|
|
114
114
|
`run.completed`、`run.failed` 或 `run.cancelled` 终态。断线后使用已确认 sequence 作为
|
|
115
115
|
cursor 恢复;不要重新创建 Run 或重复执行 Tool。
|
|
116
116
|
|
|
117
|
-
## 从 create-windy 0.2.
|
|
117
|
+
## 从 create-windy 0.2.21 或更早版本升级
|
|
118
118
|
|
|
119
119
|
先检查计划,再应用连续 recipe:
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
bunx --bun create-windy@0.2.
|
|
123
|
-
bunx --bun create-windy@0.2.
|
|
122
|
+
bunx --bun create-windy@0.2.22 update --check
|
|
123
|
+
bunx --bun create-windy@0.2.22 update
|
|
124
124
|
bun install
|
|
125
125
|
```
|
|
126
126
|
|