@uibot/application 0.19.0 → 0.20.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.
@@ -0,0 +1,64 @@
1
+ import type { LogoGenerateRequest, LogoGenerationRequestSnapshot } from "@uibot/contracts";
2
+ import type { LogoAssetStore } from "./studio-logo.js";
3
+ export interface LogoGenerationRequestStore {
4
+ get(id: string): Promise<LogoGenerationRequestSnapshot | undefined>;
5
+ claim(id: string, hash: string): Promise<{
6
+ created: boolean;
7
+ request: LogoGenerationRequestSnapshot;
8
+ }>;
9
+ finish(request: LogoGenerationRequestSnapshot): Promise<void>;
10
+ }
11
+ /** Fixed field order, independent of caller JSON order. The caller's ID is not design data. */
12
+ export declare function hashLogoRequest(input: LogoGenerateRequest): string;
13
+ export declare function createLogoRequestCoordinator(options: {
14
+ assets: LogoAssetStore;
15
+ requests?: LogoGenerationRequestStore;
16
+ generate(input: LogoGenerateRequest, signal: AbortSignal, dispatch: () => void): ReturnType<LogoAssetStore["save"]>;
17
+ }): {
18
+ status(id: string): Promise<{
19
+ request: LogoGenerationRequestSnapshot;
20
+ asset: import("@uibot/contracts").LogoAssetManifest;
21
+ } | {
22
+ request: {
23
+ schema: "uibot.logo-request.v1";
24
+ requestId: string;
25
+ requestHash?: string;
26
+ createdAt?: string;
27
+ state: "succeeded";
28
+ assetId: string;
29
+ updatedAt: string;
30
+ error: undefined;
31
+ };
32
+ asset: import("@uibot/contracts").LogoAssetManifest;
33
+ } | {
34
+ asset?: never;
35
+ request: LogoGenerationRequestSnapshot;
36
+ }>;
37
+ generate(input: LogoGenerateRequest, signal: AbortSignal): Promise<{
38
+ status: number;
39
+ data: {
40
+ request: LogoGenerationRequestSnapshot;
41
+ asset: import("@uibot/contracts").LogoAssetManifest;
42
+ } | {
43
+ request: {
44
+ schema: "uibot.logo-request.v1";
45
+ requestId: string;
46
+ requestHash?: string;
47
+ createdAt?: string;
48
+ state: "succeeded";
49
+ assetId: string;
50
+ updatedAt: string;
51
+ error: undefined;
52
+ };
53
+ asset: import("@uibot/contracts").LogoAssetManifest;
54
+ } | {
55
+ asset?: never;
56
+ request: LogoGenerationRequestSnapshot;
57
+ };
58
+ } | {
59
+ status: number;
60
+ data: {
61
+ asset: import("@uibot/contracts").LogoAssetManifest;
62
+ };
63
+ }>;
64
+ };
@@ -1,3 +1,4 @@
1
+ import { type LogoGenerationRequestStore } from "./logo-requests.js";
1
2
  import type { ImageGenerationService, LogoAssetManifest, LogoGenerateRequest, LogoExportOptions, LogoExportRequest, LogoExportTargetDescriptor } from "@uibot/contracts";
2
3
  export interface LogoAssetStore {
3
4
  list(): Promise<LogoAssetManifest[]>;
@@ -21,4 +22,5 @@ export declare function createUIBotStudioLogoHandler(options: {
21
22
  images: ImageGenerationService;
22
23
  store: LogoAssetStore;
23
24
  exporter?: LogoAssetExporter;
25
+ requests?: LogoGenerationRequestStore;
24
26
  }): (request: Request) => Promise<Response | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uibot/application",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,6 +19,10 @@
19
19
  "./collection-application": {
20
20
  "types": "./dist/collection-application.d.ts",
21
21
  "default": "./dist/collection-application.js"
22
+ },
23
+ "./agent-logo": {
24
+ "types": "./dist/agent-logo.d.ts",
25
+ "default": "./dist/agent-logo.js"
22
26
  }
23
27
  },
24
28
  "files": [
@@ -31,21 +35,21 @@
31
35
  "access": "public"
32
36
  },
33
37
  "dependencies": {
34
- "@uibot/artifact-exporters": "^0.19.0",
35
- "@uibot/compiler": "^0.19.0",
36
- "@uibot/context": "^0.19.0",
37
- "@uibot/context-code": "^0.19.0",
38
- "@uibot/contracts": "^0.19.0",
39
- "@uibot/design-md": "^0.19.0",
40
- "@uibot/registry": "^0.19.0",
41
- "@uibot/renderer-react": "^0.19.0",
42
- "@uibot/runtime": "^0.19.0",
38
+ "@uibot/artifact-exporters": "^0.20.0",
39
+ "@uibot/compiler": "^0.20.0",
40
+ "@uibot/context": "^0.20.0",
41
+ "@uibot/context-code": "^0.20.0",
42
+ "@uibot/contracts": "^0.20.0",
43
+ "@uibot/design-md": "^0.20.0",
44
+ "@uibot/registry": "^0.20.0",
45
+ "@uibot/renderer-react": "^0.20.0",
46
+ "@uibot/runtime": "^0.20.0",
43
47
  "parse5": "7.3.0",
44
- "@uibot/page-annotation": "^0.19.0",
45
- "@uibot/web-preview": "^0.19.0"
48
+ "@uibot/page-annotation": "^0.20.0",
49
+ "@uibot/web-preview": "^0.20.0"
46
50
  },
47
51
  "scripts": {
48
- "build": "rm -rf dist tsconfig.tsbuildinfo && bun build --minify ./src/index.ts --outdir ./dist --format esm --target bun && bun build ./src/collection-application.ts --outdir ./dist --format esm --target node --packages external && bun x tsc -b",
52
+ "build": "rm -rf dist tsconfig.tsbuildinfo && bun build --minify ./src/index.ts --outdir ./dist --format esm --target bun && bun build ./src/collection-application.ts ./src/agent-logo.ts --outdir ./dist --format esm --target node --packages external && bun x tsc -b",
49
53
  "typecheck": "bun x tsc -p tsconfig.json --noEmit",
50
54
  "test": "bun test"
51
55
  }