@webpresso/agent-kit 0.23.0 → 0.25.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.
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Webpresso agent-kit Claude Code plugin: blueprints, skills, hooks, MCP server",
9
- "version": "0.23.0"
9
+ "version": "0.25.0"
10
10
  },
11
11
  "plugins": [
12
12
  {
@@ -23,5 +23,5 @@
23
23
  ]
24
24
  }
25
25
  ],
26
- "version": "0.23.0"
26
+ "version": "0.25.0"
27
27
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpresso",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "Webpresso agent-kit: blueprints, skills, lore commit protocol, tech-debt lifecycle",
5
5
  "skills": "./skills",
6
6
  "commands": "./commands",
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  > TypeScript infrastructure for AI-agent-driven development. One `wp` runtime
7
7
  > gives agents planning, tests, mutation, e2e, CI, docs, and debt tracking —
8
8
  > all summary-first so they keep context, and enforced as contracts so docs,
9
- > intent, and code can't drift. MIT. Experimental v0.x.
9
+ > intent, and code can't drift. MIT. Active development.
10
10
 
11
11
  ## What it is
12
12
 
@@ -125,7 +125,8 @@ validate` when `claude` is present).
125
125
 
126
126
  ## Status
127
127
 
128
- Experimental v0.x. Public APIs may change before v1.
128
+ Active development. Review [CHANGELOG.md](./CHANGELOG.md) before upgrading
129
+ across minor versions.
129
130
 
130
131
  ## License
131
132
 
@@ -1,9 +1,12 @@
1
- import { existsSync } from 'node:fs';
1
+ import { existsSync, readFileSync } from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { loadWebpressoConfigSafe } from '#e2e/load-host-adapter';
4
4
  function violation(file, message) {
5
5
  return { file, message };
6
6
  }
7
+ function readProductionMetadata(metadataPath) {
8
+ return JSON.parse(readFileSync(metadataPath, 'utf8'));
9
+ }
7
10
  export async function auditCloudflareDeployContract(root) {
8
11
  let loaded;
9
12
  try {
@@ -33,6 +36,19 @@ export async function auditCloudflareDeployContract(root) {
33
36
  if (!existsSync(metadataPath)) {
34
37
  violations.push(violation(configPath, `shared deploy contract requires ${cloudflare.production.metadataPath} to exist`));
35
38
  }
39
+ else {
40
+ try {
41
+ const metadata = readProductionMetadata(metadataPath);
42
+ if (metadata.durableObjectMigration === 'required' &&
43
+ metadata.rolloutMode !== 'direct') {
44
+ violations.push(violation(cloudflare.production.metadataPath, 'Durable Object migration releases must use rolloutMode "direct"'));
45
+ }
46
+ }
47
+ catch (error) {
48
+ const message = error instanceof Error ? error.message : String(error);
49
+ violations.push(violation(cloudflare.production.metadataPath, `production release metadata must be valid JSON: ${message}`));
50
+ }
51
+ }
36
52
  for (const target of cloudflare.targets) {
37
53
  const isDurableObjectTarget = (target.durableObjectBindings?.length ?? 0) > 0;
38
54
  if (target.previewTransport === 'custom_domain_env' && !target.routeSpec) {
@@ -1,6 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  export declare const WEBPRESSO_CONFIG_FILE_NAME = "webpresso.config.ts";
3
3
  export declare const WEBPRESSO_CONFIG_EXPORT_NAME = "webpressoConfig";
4
+ export declare const AGENT_KIT_CONFIG_FILE_NAME = "agent-kit.config.ts";
5
+ export declare const AGENT_KIT_CONFIG_EXPORT_NAME = "agentKitConfig";
6
+ export declare const WEBPRESSO_CONFIG_CANDIDATES: readonly [{
7
+ readonly fileName: "agent-kit.config.ts";
8
+ readonly exportName: "agentKitConfig";
9
+ }, {
10
+ readonly fileName: "webpresso.config.ts";
11
+ readonly exportName: "webpressoConfig";
12
+ }];
4
13
  declare const webpressoConfigSchema: z.ZodObject<{
5
14
  e2e: z.ZodOptional<z.ZodObject<{
6
15
  hostAdapterModule: z.ZodString;
@@ -1,6 +1,18 @@
1
1
  import { z } from 'zod';
2
2
  export const WEBPRESSO_CONFIG_FILE_NAME = 'webpresso.config.ts';
3
3
  export const WEBPRESSO_CONFIG_EXPORT_NAME = 'webpressoConfig';
4
+ export const AGENT_KIT_CONFIG_FILE_NAME = 'agent-kit.config.ts';
5
+ export const AGENT_KIT_CONFIG_EXPORT_NAME = 'agentKitConfig';
6
+ export const WEBPRESSO_CONFIG_CANDIDATES = [
7
+ {
8
+ fileName: AGENT_KIT_CONFIG_FILE_NAME,
9
+ exportName: AGENT_KIT_CONFIG_EXPORT_NAME,
10
+ },
11
+ {
12
+ fileName: WEBPRESSO_CONFIG_FILE_NAME,
13
+ exportName: WEBPRESSO_CONFIG_EXPORT_NAME,
14
+ },
15
+ ];
4
16
  const wranglerEnvNameSchema = z
5
17
  .string()
6
18
  .min(1, 'wranglerEnvName must not be empty.')
@@ -19,7 +19,8 @@ export declare class WebpressoConfigLoadError extends Error {
19
19
  }
20
20
  export declare class WebpressoConfigExportError extends Error {
21
21
  readonly configPath: string;
22
- constructor(configPath: string);
22
+ readonly exportName: string;
23
+ constructor(configPath: string, exportName?: string);
23
24
  }
24
25
  export declare class HostAdapterModuleLoadError extends Error {
25
26
  readonly moduleSpecifier: string;
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { dirname, resolve, parse } from 'node:path';
3
3
  import { pathToFileURL } from 'node:url';
4
- import { WEBPRESSO_CONFIG_EXPORT_NAME, WEBPRESSO_CONFIG_FILE_NAME, validateWebpressoConfig, } from './config.js';
4
+ import { WEBPRESSO_CONFIG_CANDIDATES, WEBPRESSO_CONFIG_EXPORT_NAME, WEBPRESSO_CONFIG_FILE_NAME, validateWebpressoConfig, } from './config.js';
5
5
  import { FALLBACK_HOST_ADAPTER_EXPORT_NAMES, isE2eHostAdapter } from './host-adapter.js';
6
6
  export class WebpressoConfigLoadError extends Error {
7
7
  configPath;
@@ -15,9 +15,11 @@ export class WebpressoConfigLoadError extends Error {
15
15
  }
16
16
  export class WebpressoConfigExportError extends Error {
17
17
  configPath;
18
- constructor(configPath) {
19
- super(`Expected ${WEBPRESSO_CONFIG_FILE_NAME} at ${configPath} to export ${WEBPRESSO_CONFIG_EXPORT_NAME}.`);
18
+ exportName;
19
+ constructor(configPath, exportName = WEBPRESSO_CONFIG_EXPORT_NAME) {
20
+ super(`Expected config at ${configPath} to export ${exportName}.`);
20
21
  this.configPath = configPath;
22
+ this.exportName = exportName;
21
23
  this.name = 'WebpressoConfigExportError';
22
24
  }
23
25
  }
@@ -55,9 +57,11 @@ export function resolveWebpressoConfigPath(cwd = process.cwd()) {
55
57
  }
56
58
  export function findWebpressoConfigPath(cwd = process.cwd()) {
57
59
  for (const searchDir of getSearchDirectories(cwd)) {
58
- const configPath = getWebpressoConfigPath(searchDir);
59
- if (existsSync(configPath)) {
60
- return configPath;
60
+ for (const candidate of WEBPRESSO_CONFIG_CANDIDATES) {
61
+ const configPath = resolve(searchDir, candidate.fileName);
62
+ if (existsSync(configPath)) {
63
+ return configPath;
64
+ }
61
65
  }
62
66
  }
63
67
  return null;
@@ -67,11 +71,12 @@ export async function loadWebpressoConfig(options = {}) {
67
71
  const configModule = await loadModuleNamespace(pathToFileURL(configPath).href, (cause) => {
68
72
  throw new WebpressoConfigLoadError(configPath, cause);
69
73
  });
70
- if (!(WEBPRESSO_CONFIG_EXPORT_NAME in configModule)) {
71
- throw new WebpressoConfigExportError(configPath);
74
+ const exportName = expectedConfigExportName(configPath);
75
+ if (!(exportName in configModule)) {
76
+ throw new WebpressoConfigExportError(configPath, exportName);
72
77
  }
73
78
  return {
74
- config: validateWebpressoConfig(configModule[WEBPRESSO_CONFIG_EXPORT_NAME], configPath),
79
+ config: validateWebpressoConfig(configModule[exportName], configPath),
75
80
  configPath,
76
81
  };
77
82
  }
@@ -138,6 +143,10 @@ function resolveModuleSpecifier(moduleSpecifier, configPath) {
138
143
  }
139
144
  return moduleSpecifier;
140
145
  }
146
+ function expectedConfigExportName(configPath) {
147
+ const candidate = WEBPRESSO_CONFIG_CANDIDATES.find((item) => configPath.endsWith(item.fileName));
148
+ return candidate?.exportName ?? WEBPRESSO_CONFIG_EXPORT_NAME;
149
+ }
141
150
  async function loadModuleNamespace(moduleSpecifier, onError) {
142
151
  try {
143
152
  const moduleNamespace = await import(moduleSpecifier);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpresso/agent-kit",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -696,10 +696,10 @@
696
696
  },
697
697
  "packageManager": "pnpm@11.1.1",
698
698
  "optionalDependencies": {
699
- "@webpresso/agent-kit-runtime-darwin-arm64": "0.23.0",
700
- "@webpresso/agent-kit-runtime-darwin-x64": "0.23.0",
701
- "@webpresso/agent-kit-runtime-linux-x64": "0.23.0",
702
- "@webpresso/agent-kit-runtime-linux-arm64": "0.23.0",
703
- "@webpresso/agent-kit-runtime-windows-x64": "0.23.0"
699
+ "@webpresso/agent-kit-runtime-darwin-arm64": "0.25.0",
700
+ "@webpresso/agent-kit-runtime-darwin-x64": "0.25.0",
701
+ "@webpresso/agent-kit-runtime-linux-x64": "0.25.0",
702
+ "@webpresso/agent-kit-runtime-linux-arm64": "0.25.0",
703
+ "@webpresso/agent-kit-runtime-windows-x64": "0.25.0"
704
704
  }
705
705
  }