veryfront 0.1.809 → 0.1.811

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.
Files changed (81) hide show
  1. package/esm/deno.d.ts +3 -0
  2. package/esm/deno.js +5 -2
  3. package/esm/src/agent/factory.d.ts.map +1 -1
  4. package/esm/src/agent/factory.js +18 -6
  5. package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts.map +1 -1
  6. package/esm/src/agent/hosted/veryfront-cloud-agent-service.js +1 -0
  7. package/esm/src/agent/types.d.ts +8 -0
  8. package/esm/src/agent/types.d.ts.map +1 -1
  9. package/esm/src/build/production-build/build/build-executor.d.ts +2 -0
  10. package/esm/src/build/production-build/build/build-executor.d.ts.map +1 -1
  11. package/esm/src/build/production-build/build/build-orchestrator.d.ts.map +1 -1
  12. package/esm/src/build/production-build/build/build-orchestrator.js +9 -0
  13. package/esm/src/build/production-build/build/output-generator.d.ts +2 -0
  14. package/esm/src/build/production-build/build/output-generator.d.ts.map +1 -1
  15. package/esm/src/build/production-build/build/output-generator.js +9 -7
  16. package/esm/src/build/production-build/local-release-assets.d.ts +2 -1
  17. package/esm/src/build/production-build/local-release-assets.d.ts.map +1 -1
  18. package/esm/src/build/production-build/local-release-assets.js +14 -4
  19. package/esm/src/build/production-build/static-generation.d.ts +2 -0
  20. package/esm/src/build/production-build/static-generation.d.ts.map +1 -1
  21. package/esm/src/build/production-build/static-generation.js +29 -5
  22. package/esm/src/config/schemas/config.schema.d.ts +12 -0
  23. package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
  24. package/esm/src/config/schemas/config.schema.js +12 -0
  25. package/esm/src/discovery/discovery-engine.d.ts.map +1 -1
  26. package/esm/src/discovery/discovery-engine.js +6 -1
  27. package/esm/src/discovery/handlers/index.d.ts +1 -0
  28. package/esm/src/discovery/handlers/index.d.ts.map +1 -1
  29. package/esm/src/discovery/handlers/index.js +1 -0
  30. package/esm/src/discovery/handlers/work-handler.d.ts +7 -0
  31. package/esm/src/discovery/handlers/work-handler.d.ts.map +1 -0
  32. package/esm/src/discovery/handlers/work-handler.js +19 -0
  33. package/esm/src/discovery/import-rewriter.d.ts +1 -1
  34. package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
  35. package/esm/src/discovery/import-rewriter.js +1 -0
  36. package/esm/src/discovery/project-discovery-config.d.ts +2 -0
  37. package/esm/src/discovery/project-discovery-config.d.ts.map +1 -1
  38. package/esm/src/discovery/project-discovery-config.js +2 -0
  39. package/esm/src/discovery/transpiler.d.ts.map +1 -1
  40. package/esm/src/discovery/transpiler.js +2 -0
  41. package/esm/src/discovery/types.d.ts +3 -0
  42. package/esm/src/discovery/types.d.ts.map +1 -1
  43. package/esm/src/html/utils.d.ts.map +1 -1
  44. package/esm/src/html/utils.js +8 -8
  45. package/esm/src/observability/request-profiler.d.ts +1 -0
  46. package/esm/src/observability/request-profiler.d.ts.map +1 -1
  47. package/esm/src/observability/request-profiler.js +6 -0
  48. package/esm/src/release-assets/build-executor.d.ts +14 -0
  49. package/esm/src/release-assets/build-executor.d.ts.map +1 -1
  50. package/esm/src/release-assets/build-executor.js +158 -20
  51. package/esm/src/rendering/cache/cache-coordinator.d.ts +3 -0
  52. package/esm/src/rendering/cache/cache-coordinator.d.ts.map +1 -1
  53. package/esm/src/rendering/cache/cache-coordinator.js +26 -2
  54. package/esm/src/rendering/renderer.d.ts.map +1 -1
  55. package/esm/src/rendering/renderer.js +3 -1
  56. package/esm/src/rendering/shared/context-aware-cache.d.ts +3 -0
  57. package/esm/src/rendering/shared/context-aware-cache.d.ts.map +1 -1
  58. package/esm/src/rendering/shared/context-aware-cache.js +24 -2
  59. package/esm/src/server/build-app-route-renderer.d.ts +2 -0
  60. package/esm/src/server/build-app-route-renderer.d.ts.map +1 -1
  61. package/esm/src/server/build-app-route-renderer.js +3 -2
  62. package/esm/src/server/dev-server/server.d.ts.map +1 -1
  63. package/esm/src/server/dev-server/server.js +4 -1
  64. package/esm/src/utils/version-constant.d.ts +1 -1
  65. package/esm/src/utils/version-constant.js +1 -1
  66. package/esm/src/work/factory.d.ts +4 -0
  67. package/esm/src/work/factory.d.ts.map +1 -0
  68. package/esm/src/work/factory.js +51 -0
  69. package/esm/src/work/index.d.ts +27 -0
  70. package/esm/src/work/index.d.ts.map +1 -0
  71. package/esm/src/work/index.js +25 -0
  72. package/esm/src/work/prompt-augmentation.d.ts +6 -0
  73. package/esm/src/work/prompt-augmentation.d.ts.map +1 -0
  74. package/esm/src/work/prompt-augmentation.js +30 -0
  75. package/esm/src/work/registry.d.ts +10 -0
  76. package/esm/src/work/registry.d.ts.map +1 -0
  77. package/esm/src/work/registry.js +23 -0
  78. package/esm/src/work/types.d.ts +30 -0
  79. package/esm/src/work/types.d.ts.map +1 -0
  80. package/esm/src/work/types.js +1 -0
  81. package/package.json +5 -1
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/src/rendering/renderer.ts"],"names":[],"mappings":"AA6CA,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAKL,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AAgBzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAwBxD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,oBAAoB;IACpB,KAAK,CAAC,EAAE,wBAAwB,CAAC;CAClC;AAeD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAA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C,EAAE,0BAA0B,GAC1C,OAAO,CAAC,YAAY,CAAC,CAIvB"}
@@ -130,7 +130,7 @@ export class Renderer {
130
130
  const cacheKey = this.buildCacheKey(slug, effectiveCtx, effectiveOptions);
131
131
  const cacheResult = cacheKey
132
132
  ? await this.cache.checkCache(slug, effectiveCtx, effectiveOptions?.colorScheme, cacheKey)
133
- : { hit: false, cacheKey: "" };
133
+ : { hit: false, cacheKey: "", status: "miss", lookupDurationMs: 0 };
134
134
  if (cacheResult.hit && cacheResult.cachedResult) {
135
135
  logger.debug("Cache hit", {
136
136
  slug,
@@ -398,6 +398,8 @@ export class Renderer {
398
398
  depAwareSlug: slug,
399
399
  moduleCacheKey: cacheKey ?? slug,
400
400
  cachedModule: result.cachedResult?.pageModule,
401
+ cacheStatus: result.status,
402
+ lookupDurationMs: result.lookupDurationMs,
401
403
  };
402
404
  },
403
405
  persistResult: async (result, slug, cacheKey) => {
@@ -1,5 +1,6 @@
1
1
  import type { RenderResult } from "../orchestrator/types.js";
2
2
  import type { CacheStore } from "../cache/types.js";
3
+ import type { CacheLookupStatus } from "../cache/cache-coordinator.js";
3
4
  import { type MemoryCacheStoreOptions } from "../cache/stores/index.js";
4
5
  import type { RenderContext } from "../context/render-context.js";
5
6
  export interface ContextAwareCacheOptions {
@@ -11,6 +12,8 @@ export interface ContextAwareCacheLookupResult {
11
12
  cachedResult?: RenderResult;
12
13
  cacheKey: string;
13
14
  hit: boolean;
15
+ status: CacheLookupStatus;
16
+ lookupDurationMs: number;
14
17
  }
15
18
  export declare class ContextAwareCacheCoordinator {
16
19
  private store;
@@ -1 +1 @@
1
- {"version":3,"file":"context-aware-cache.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/shared/context-aware-cache.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAoB,KAAK,uBA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AAG,EAAE,aAAa,EAClB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,EAC9B,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,IAAI,CAAC;IAqBV,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BlD,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBjD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B1D,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAKzB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B,QAAQ,IAAI;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;IAO5B,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,WAAW;CAkCpB"}
@@ -1,4 +1,6 @@
1
1
  import { rendererLogger } from "../../utils/index.js";
2
+ import { markRequestProfilePhase } from "../../observability/request-profiler.js";
3
+ import { metrics } from "../../observability/simple-metrics/index.js";
2
4
  import { withSpan } from "../../observability/tracing/otlp-setup.js";
3
5
  import { SpanNames } from "../../observability/tracing/span-names.js";
4
6
  import { MemoryCacheStore } from "../cache/stores/index.js";
@@ -23,35 +25,47 @@ export class ContextAwareCacheCoordinator {
23
25
  checkCache(slug, ctx, colorScheme, cacheKeyOverride) {
24
26
  const cacheKey = this.getCacheKey(slug, ctx, colorScheme, cacheKeyOverride);
25
27
  return withSpan(SpanNames.CACHE_CHECK_SPECULATIVE, async () => {
28
+ const lookupStart = performance.now();
26
29
  const cached = (await this.store.get(cacheKey));
27
30
  if (!cached) {
31
+ const lookupDurationMs = roundDurationMs(performance.now() - lookupStart);
32
+ recordCacheLookup("miss", lookupDurationMs);
28
33
  logger.debug("Cache miss", {
29
34
  slug,
30
35
  cacheKey,
31
36
  projectId: ctx.projectId,
32
37
  environment: ctx.environment,
38
+ lookupDurationMs,
33
39
  });
34
- return { cacheKey, hit: false };
40
+ return { cacheKey, hit: false, status: "miss", lookupDurationMs };
35
41
  }
36
42
  if (this.isExpired(cached)) {
37
43
  await this.store.delete(cacheKey);
44
+ const lookupDurationMs = roundDurationMs(performance.now() - lookupStart);
45
+ recordCacheLookup("expired", lookupDurationMs);
38
46
  logger.debug("Cache expired", {
39
47
  slug,
40
48
  cacheKey,
41
49
  projectId: ctx.projectId,
42
50
  environment: ctx.environment,
51
+ lookupDurationMs,
43
52
  });
44
- return { cacheKey, hit: false };
53
+ return { cacheKey, hit: false, status: "expired", lookupDurationMs };
45
54
  }
55
+ const lookupDurationMs = roundDurationMs(performance.now() - lookupStart);
56
+ recordCacheLookup("hit", lookupDurationMs);
46
57
  logger.debug("Cache hit", {
47
58
  slug,
48
59
  projectId: ctx.projectId,
49
60
  environment: ctx.environment,
61
+ lookupDurationMs,
50
62
  });
51
63
  return {
52
64
  cachedResult: this.cloneResult(cached.result, cached.nodeMapEntries),
53
65
  cacheKey,
54
66
  hit: true,
67
+ status: "hit",
68
+ lookupDurationMs,
55
69
  };
56
70
  }, {
57
71
  "cache.key": cacheKey,
@@ -195,3 +209,11 @@ export class ContextAwareCacheCoordinator {
195
209
  return cloned;
196
210
  }
197
211
  }
212
+ function roundDurationMs(value) {
213
+ return Math.round(value * 100) / 100;
214
+ }
215
+ function recordCacheLookup(status, durationMs) {
216
+ markRequestProfilePhase("render.cache_lookup", durationMs);
217
+ markRequestProfilePhase(`render.cache_${status}`);
218
+ metrics.recordCacheGet(status === "hit");
219
+ }
@@ -2,6 +2,7 @@
2
2
  * App Route HTML Rendering for Build
3
3
  */
4
4
  import type { RuntimeAdapter } from "../platform/adapters/base.js";
5
+ import type { ReleaseAssetManifest } from "../release-assets/manifest-schema.js";
5
6
  /**
6
7
  * Render an App Router route to HTML
7
8
  */
@@ -12,6 +13,7 @@ export declare function renderAppRouteToHTML(args: {
12
13
  pageFile: string;
13
14
  contentSourceId: string;
14
15
  reactVersion?: string;
16
+ releaseAssetManifest?: ReleaseAssetManifest | null;
15
17
  stylesheetHref?: string;
16
18
  includePreviewStylesheet?: boolean;
17
19
  }): Promise<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"build-app-route-renderer.d.ts","sourceRoot":"","sources":["../../../src/src/server/build-app-route-renderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAiEnE;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,GAAG,OAAO,CAAC,MAAM,CAAC,CAgHlB"}
1
+ {"version":3,"file":"build-app-route-renderer.d.ts","sourceRoot":"","sources":["../../../src/src/server/build-app-route-renderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAMnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AA4DjF;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,GAAG,OAAO,CAAC,MAAM,CAAC,CAkHlB"}
@@ -50,7 +50,7 @@ function getLayoutsForRoute(appRoot, routePath) {
50
50
  * Render an App Router route to HTML
51
51
  */
52
52
  export async function renderAppRouteToHTML(args) {
53
- const { adapter, projectDir, routePath, pageFile, contentSourceId, stylesheetHref, includePreviewStylesheet, } = args;
53
+ const { adapter, projectDir, routePath, pageFile, contentSourceId, releaseAssetManifest, stylesheetHref, includePreviewStylesheet, } = args;
54
54
  const appRoot = join(projectDir, "app");
55
55
  const layoutCandidates = getLayoutsForRoute(appRoot, routePath);
56
56
  const layouts = [];
@@ -94,7 +94,7 @@ export async function renderAppRouteToHTML(args) {
94
94
  const htmlInner = await renderToStringAdapter(element);
95
95
  const title = "Veryfront App";
96
96
  const slug = routePathToSlug(routePath);
97
- const importMapJson = await buildImportMapJson({ projectDir });
97
+ const importMapJson = await buildImportMapJson({ projectDir, releaseAssetManifest });
98
98
  const hydrationData = hasUseClientDirective(pageSource)
99
99
  ? generateHydrationData(slug, {}, {}, {
100
100
  mode: "production",
@@ -102,6 +102,7 @@ export async function renderAppRouteToHTML(args) {
102
102
  projectDir,
103
103
  pagePath: pageFile,
104
104
  pageType: "tsx",
105
+ releaseAssetManifest,
105
106
  isLocalProject: false,
106
107
  forceProductionScripts: true,
107
108
  nestedLayouts: layouts.map((layoutPath) => ({ kind: "tsx", path: layoutPath })),
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/src/server/dev-server/server.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAmCvD,4BAA4B;AAC5B,qBAAa,SAAS;IAiBR,OAAO,CAAC,OAAO;IAhB3B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,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OAAO,CAAC,OAAO;IAhB3B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,cAAc,CAAC,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,cAAc,CAAC,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,CAAsC;IACvD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,iBAAiB,CAAC,CAAa;IACvC,OAAO,CAAC,qBAAqB,CAAC,CAAa;IAC3C,OAAO,CAAC,8BAA8B,CAAC,CAAa;gBAEhC,OAAO,EAAE,gBAAgB;IAQ7C,OAAO,CAAC,OAAO;YAID,YAAY;IAWpB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAgL5B,qEAAqE;IACrE,IAAI,OAAO,IAAI,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAKjD;IAED,OAAO,CAAC,oBAAoB;YAmBd,qBAAqB;YAoBrB,yBAAyB;YAoBzB,uBAAuB;YA4BvB,wBAAwB;IAmBtC,OAAO,CAAC,kBAAkB;IAuBpB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;YAe7B,iBAAiB;IAsC/B,qBAAqB,IAAI,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,GAAG,IAAI;IAIlE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CA6B5B"}
@@ -227,6 +227,7 @@ export class DevServer {
227
227
  resourceDirs: ["resources"],
228
228
  promptDirs: ["prompts"],
229
229
  workflowDirs: ["workflows"],
230
+ workDirs: ["work"],
230
231
  fsAdapter: this.adapter.fs,
231
232
  verbose: this.isDebug(),
232
233
  };
@@ -236,10 +237,12 @@ export class DevServer {
236
237
  const config = this.buildDiscoveryConfig();
237
238
  const result = await discoverAll(config);
238
239
  const total = result.tools.size + result.agents.size + result.skills.size +
239
- result.workflows.size + result.prompts.size + result.resources.size;
240
+ result.workflows.size + result.works.size + result.prompts.size +
241
+ result.resources.size;
240
242
  if (total > 0) {
241
243
  logger.debug(`[Discovery] Registered ${result.tools.size} tools, ${result.agents.size} agents, ` +
242
244
  `${result.skills.size} skills, ${result.workflows.size} workflows, ` +
245
+ `${result.works.size} Work definitions, ` +
243
246
  `${result.prompts.size} prompts, ${result.resources.size} resources`);
244
247
  }
245
248
  }
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.809";
2
+ export declare const VERSION = "0.1.811";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.809";
4
+ export const VERSION = "0.1.811";
@@ -0,0 +1,4 @@
1
+ import type { WorkConfig, WorkDefinition } from "./types.js";
2
+ /** Create a typed Work definition. */
3
+ export declare function work(config: WorkConfig): WorkDefinition;
4
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/work/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGtF,sCAAsC;AACtC,wBAAgB,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CA0CvD"}
@@ -0,0 +1,51 @@
1
+ import { createError, toError } from "../errors/veryfront-error.js";
2
+ /** Create a typed Work definition. */
3
+ export function work(config) {
4
+ const id = assertWorkId(config.id);
5
+ const outcome = assertNonEmptyString(config.outcome, `Work "${id}" outcome`);
6
+ if (!Array.isArray(config.acceptanceCriteria) || config.acceptanceCriteria.length === 0) {
7
+ throwWorkConfigError(`Work "${id}" must define at least one acceptance criterion.`);
8
+ }
9
+ const seenCriterionIds = new Set();
10
+ const acceptanceCriteria = config.acceptanceCriteria.map((criterion, index) => {
11
+ const criterionId = assertNonEmptyString(criterion.id, `Work "${id}" acceptance criterion at index ${index} id`);
12
+ if (seenCriterionIds.has(criterionId)) {
13
+ throwWorkConfigError(`Work "${id}" has duplicate acceptance criterion id "${criterionId}".`);
14
+ }
15
+ seenCriterionIds.add(criterionId);
16
+ const description = assertNonEmptyString(criterion.description, `Work "${id}" acceptance criterion "${criterionId}" description`);
17
+ const normalizedCriterion = {
18
+ id: criterionId,
19
+ description,
20
+ };
21
+ if (criterion.optional === true) {
22
+ normalizedCriterion.optional = true;
23
+ }
24
+ return normalizedCriterion;
25
+ });
26
+ return {
27
+ id,
28
+ name: config.name?.trim() || id,
29
+ outcome,
30
+ acceptanceCriteria,
31
+ };
32
+ }
33
+ function assertWorkId(value) {
34
+ const id = assertNonEmptyString(value, "Work id");
35
+ if (!/^[A-Za-z0-9][A-Za-z0-9_-]*$/.test(id)) {
36
+ throwWorkConfigError("Work id must be a path-safe single segment using letters, numbers, underscores, or hyphens.");
37
+ }
38
+ return id;
39
+ }
40
+ function assertNonEmptyString(value, label) {
41
+ if (typeof value !== "string" || value.trim().length === 0) {
42
+ throwWorkConfigError(`${label} cannot be empty.`);
43
+ }
44
+ return value.trim();
45
+ }
46
+ function throwWorkConfigError(message) {
47
+ throw toError(createError({
48
+ type: "agent",
49
+ message,
50
+ }));
51
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Declare source-backed Work definitions for business process observability.
3
+ *
4
+ * @module work
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { work } from "veryfront/work";
9
+ *
10
+ * export default work({
11
+ * id: "supplier-invoice-processing",
12
+ * name: "Supplier invoice processing",
13
+ * outcome: "Resolve all open supplier invoices.",
14
+ * acceptanceCriteria: [
15
+ * {
16
+ * id: "invoices_discovered",
17
+ * description: "Open supplier invoices have been discovered.",
18
+ * },
19
+ * ],
20
+ * });
21
+ * ```
22
+ */
23
+ import "../../_dnt.polyfills.js";
24
+ export type { WorkAcceptanceCriterion, WorkConfig, WorkDefinition, WorkReference, } from "./types.js";
25
+ export { work } from "./factory.js";
26
+ export { workRegistry } from "./registry.js";
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/work/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,YAAY,EACV,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Declare source-backed Work definitions for business process observability.
3
+ *
4
+ * @module work
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { work } from "veryfront/work";
9
+ *
10
+ * export default work({
11
+ * id: "supplier-invoice-processing",
12
+ * name: "Supplier invoice processing",
13
+ * outcome: "Resolve all open supplier invoices.",
14
+ * acceptanceCriteria: [
15
+ * {
16
+ * id: "invoices_discovered",
17
+ * description: "Open supplier invoices have been discovered.",
18
+ * },
19
+ * ],
20
+ * });
21
+ * ```
22
+ */
23
+ import "../../_dnt.polyfills.js";
24
+ export { work } from "./factory.js";
25
+ export { workRegistry } from "./registry.js";
@@ -0,0 +1,6 @@
1
+ import type { WorkDefinition, WorkReference } from "./types.js";
2
+ /** Resolve agent work references to concrete Work definitions. */
3
+ export declare function resolveWorkReferences(references: WorkReference | WorkReference[]): WorkDefinition[];
4
+ /** Build a concise system-prompt section describing assigned Work outcomes. */
5
+ export declare function buildWorkManifestPrompt(works: Iterable<WorkDefinition>): string;
6
+ //# sourceMappingURL=prompt-augmentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-augmentation.d.ts","sourceRoot":"","sources":["../../../src/src/work/prompt-augmentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhE,kEAAkE;AAClE,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,aAAa,GAAG,aAAa,EAAE,GAC1C,cAAc,EAAE,CAGlB;AAED,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,MAAM,CAwB/E"}
@@ -0,0 +1,30 @@
1
+ import { workRegistry } from "./registry.js";
2
+ /** Resolve agent work references to concrete Work definitions. */
3
+ export function resolveWorkReferences(references) {
4
+ const refs = Array.isArray(references) ? references : [references];
5
+ return refs.map((ref) => typeof ref === "string" ? workRegistry.getRequired(ref) : ref);
6
+ }
7
+ /** Build a concise system-prompt section describing assigned Work outcomes. */
8
+ export function buildWorkManifestPrompt(works) {
9
+ const workDefinitions = Array.from(works);
10
+ if (workDefinitions.length === 0)
11
+ return "";
12
+ const sections = workDefinitions.map((definition) => {
13
+ const criteria = definition.acceptanceCriteria.map((criterion) => {
14
+ const optionalLabel = criterion.optional ? " (optional)" : "";
15
+ return `- ${criterion.id}${optionalLabel}: ${criterion.description}`;
16
+ }).join("\n");
17
+ return [
18
+ `### ${definition.name} (${definition.id})`,
19
+ `Outcome: ${definition.outcome}`,
20
+ "Acceptance criteria:",
21
+ criteria,
22
+ ].join("\n");
23
+ }).join("\n\n");
24
+ return [
25
+ "## Work",
26
+ "Work is business/process state: pursue the outcome, then use Work execution tools to record durable status and evidence. Work definitions do not prescribe fixed workflow control flow.",
27
+ "",
28
+ sections,
29
+ ].join("\n");
30
+ }
@@ -0,0 +1,10 @@
1
+ import type { WorkDefinition } from "./types.js";
2
+ import { ScopedRegistryFacade } from "../registry/scoped-registry-facade.js";
3
+ declare class WorkRegistryClass extends ScopedRegistryFacade<WorkDefinition> {
4
+ getRequired(id: string): WorkDefinition;
5
+ list(): string[];
6
+ }
7
+ /** Shared Work registry value. */
8
+ export declare const workRegistry: WorkRegistryClass;
9
+ export {};
10
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/src/work/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAa7E,cAAM,iBAAkB,SAAQ,oBAAoB,CAAC,cAAc,CAAC;IAClE,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc;IAMvC,IAAI,IAAI,MAAM,EAAE;CAGjB;AAED,kCAAkC;AAClC,eAAO,MAAM,YAAY,mBAA6C,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { createError, toError } from "../errors/veryfront-error.js";
2
+ import { ProjectScopedRegistryManager } from "../registry/project-scoped-registry-manager.js";
3
+ import { ScopedRegistryFacade } from "../registry/scoped-registry-facade.js";
4
+ const workRegistryManager = new ProjectScopedRegistryManager("work");
5
+ function createMissingWorkError(id) {
6
+ return toError(createError({
7
+ type: "agent",
8
+ message: `Work "${id}" not found`,
9
+ }));
10
+ }
11
+ class WorkRegistryClass extends ScopedRegistryFacade {
12
+ getRequired(id) {
13
+ const registeredWork = this.get(id);
14
+ if (registeredWork)
15
+ return registeredWork;
16
+ throw createMissingWorkError(id);
17
+ }
18
+ list() {
19
+ return this.getAllIds();
20
+ }
21
+ }
22
+ /** Shared Work registry value. */
23
+ export const workRegistry = new WorkRegistryClass(workRegistryManager);
@@ -0,0 +1,30 @@
1
+ /** One measurable outcome condition for a Work definition. */
2
+ export interface WorkAcceptanceCriterion {
3
+ /** Stable identifier used by execution state and cloud persistence. */
4
+ id: string;
5
+ /** Human-readable condition that must be satisfied unless optional. */
6
+ description: string;
7
+ /** Optional criteria do not block Work execution completion. */
8
+ optional?: true;
9
+ }
10
+ /** Configuration used by work(). */
11
+ export interface WorkConfig {
12
+ /** Stable project-local Work identifier. */
13
+ id: string;
14
+ /** Human-readable display name. Defaults to the id when omitted. */
15
+ name?: string;
16
+ /** Business outcome the execution layer should make true. */
17
+ outcome: string;
18
+ /** Outcome criteria tracked as business process state. */
19
+ acceptanceCriteria: WorkAcceptanceCriterion[];
20
+ }
21
+ /** Public API contract for Work definitions. */
22
+ export interface WorkDefinition {
23
+ id: string;
24
+ name: string;
25
+ outcome: string;
26
+ acceptanceCriteria: WorkAcceptanceCriterion[];
27
+ }
28
+ /** Agent-level reference to source-declared Work. */
29
+ export type WorkReference = string | WorkDefinition;
30
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/work/types.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB;IACtC,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,uEAAuE;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB;AAED,oCAAoC;AACpC,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,kBAAkB,EAAE,uBAAuB,EAAE,CAAC;CAC/C;AAED,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,uBAAuB,EAAE,CAAC;CAC/C;AAED,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.809",
3
+ "version": "0.1.811",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
@@ -105,6 +105,10 @@
105
105
  "import": "./esm/src/workflow/discovery/index.js",
106
106
  "types": "./esm/src/workflow/discovery/index.d.ts"
107
107
  },
108
+ "./work": {
109
+ "import": "./esm/src/work/index.js",
110
+ "types": "./esm/src/work/index.d.ts"
111
+ },
108
112
  "./schemas": {
109
113
  "import": "./esm/src/schemas/index.js",
110
114
  "types": "./esm/src/schemas/index.d.ts"