@dbx-tools/appkit-generator 0.0.0-stage → 0.9.138

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 (60) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +181 -2
  3. package/index.ts +44 -0
  4. package/lib/index.d.ts +40 -0
  5. package/lib/index.js +30 -0
  6. package/lib/src/assets.d.ts +33 -0
  7. package/lib/src/assets.js +224 -0
  8. package/lib/src/config.d.ts +75 -0
  9. package/lib/src/config.js +31 -0
  10. package/lib/src/dashboard.d.ts +30 -0
  11. package/lib/src/dashboard.js +257 -0
  12. package/lib/src/data.d.ts +17 -0
  13. package/lib/src/data.js +114 -0
  14. package/lib/src/defaults.d.ts +39 -0
  15. package/lib/src/defaults.js +36 -0
  16. package/lib/src/generate.d.ts +51 -0
  17. package/lib/src/generate.js +163 -0
  18. package/lib/src/genie.d.ts +51 -0
  19. package/lib/src/genie.js +84 -0
  20. package/lib/src/kpi.d.ts +22 -0
  21. package/lib/src/kpi.js +74 -0
  22. package/lib/src/manifest.json +72 -0
  23. package/lib/src/namespace.d.ts +36 -0
  24. package/lib/src/namespace.js +119 -0
  25. package/lib/src/operations.d.ts +42 -0
  26. package/lib/src/operations.js +96 -0
  27. package/lib/src/palette.d.ts +10 -0
  28. package/lib/src/palette.js +69 -0
  29. package/lib/src/plan.d.ts +21 -0
  30. package/lib/src/plan.js +33 -0
  31. package/lib/src/plugin.d.ts +619 -0
  32. package/lib/src/plugin.js +205 -0
  33. package/lib/src/research.d.ts +78 -0
  34. package/lib/src/research.js +235 -0
  35. package/lib/src/schema.d.ts +52 -0
  36. package/lib/src/schema.js +82 -0
  37. package/lib/src/structured.d.ts +27 -0
  38. package/lib/src/structured.js +30 -0
  39. package/lib/src/workflow.d.ts +314 -0
  40. package/lib/src/workflow.js +171 -0
  41. package/lib/tsconfig.tsbuildinfo +1 -0
  42. package/package.json +218 -4
  43. package/src/assets.ts +248 -0
  44. package/src/config.ts +98 -0
  45. package/src/dashboard.ts +295 -0
  46. package/src/data.ts +167 -0
  47. package/src/defaults.ts +61 -0
  48. package/src/generate.ts +250 -0
  49. package/src/genie.ts +111 -0
  50. package/src/kpi.ts +106 -0
  51. package/src/manifest.json +72 -0
  52. package/src/namespace.ts +192 -0
  53. package/src/operations.ts +171 -0
  54. package/src/palette.ts +81 -0
  55. package/src/plan.ts +59 -0
  56. package/src/plugin.ts +244 -0
  57. package/src/research.ts +382 -0
  58. package/src/schema.ts +114 -0
  59. package/src/structured.ts +54 -0
  60. package/src/workflow.ts +221 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,182 @@
1
- # Temporary Holding Version
1
+ # @dbx-tools/appkit-generator
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Generate researched brand contexts or provision a governed Databricks demo
4
+ environment from business questions. The package exposes every operation as an
5
+ AppKit tool and composes them through a registered Mastra workflow.
6
+
7
+ ## Register the plugin
8
+
9
+ Register `webSearch()`, `generator()`, and `mastra()` in the same AppKit application:
10
+
11
+ ```ts
12
+ import { createApp, server } from "@databricks/appkit";
13
+ import { generator } from "@dbx-tools/appkit-generator";
14
+ import { webSearch } from "@dbx-tools/appkit-web-search";
15
+ import { mastra } from "@dbx-tools/appkit-mastra";
16
+
17
+ const appkit = await createApp({
18
+ plugins: [server(), webSearch(), mastra(), generator()],
19
+ });
20
+
21
+ const generated = await appkit.generator.generateBrand({
22
+ name: "Databricks",
23
+ website: "https://www.databricks.com/",
24
+ });
25
+
26
+ const { brand: brandContext, sources } = generated;
27
+ ```
28
+
29
+ The generated package contains:
30
+
31
+ - Canonical and short names, tagline, and description.
32
+ - Application colors and CSS font stacks.
33
+ - Audience, tone, writing principles, and patterns to avoid.
34
+ - Official website, documentation, and repository links when found.
35
+ - Logo, icon, and favicon URLs discovered from official page markup.
36
+ - Supplemental iOS and Android app references used for visual direction.
37
+ - Source provenance, including whether each cited page was fetched.
38
+
39
+ The optional website disambiguates similarly named brands and is placed first
40
+ in the source candidates. Omit it when the brand has one clear public identity.
41
+
42
+ ## Give the tools to an agent
43
+
44
+ The plugin implements AppKit's `ToolProvider`. A native AppKit agent can opt in
45
+ to individual generator tools:
46
+
47
+ ```ts
48
+ import { createAgent } from "@databricks/appkit/beta";
49
+
50
+ export default createAgent({
51
+ name: "Brand researcher",
52
+ model: "databricks-gpt-6-1-sol",
53
+ instructions: "Research and generate approved Databricks demo assets.",
54
+ tools: (plugins) => ({ ...plugins.generator.toolkit({ prefix: "" }) }),
55
+ });
56
+ ```
57
+
58
+ Read-only tools cover brand and KPI research plus typed planning. Mutating tools
59
+ provision schemas, materialize data, and create dashboard or Genie assets under
60
+ the requesting user's OBO context. They are never auto-inherited.
61
+
62
+ ## Stream progress in a browser
63
+
64
+ The plugin publishes its mounted base path through `clientConfig()` and serves
65
+ `POST /generate` as Server-Sent Events. Use the browser-safe client instead of
66
+ hard-coding the route:
67
+
68
+ ```ts
69
+ import {
70
+ GENERATOR_PLUGIN_NAME,
71
+ GeneratorPluginClient,
72
+ type GeneratorClientConfig,
73
+ } from "@dbx-tools/shared-generator/brand";
74
+ import { usePluginClientConfig } from "@dbx-tools/ui/react";
75
+
76
+ const config = usePluginClientConfig<GeneratorClientConfig>(GENERATOR_PLUGIN_NAME);
77
+ const client = new GeneratorPluginClient(config);
78
+
79
+ for await (const event of client.generate({ name: "Databricks" })) {
80
+ if (event.type === "progress") updateActivity(event);
81
+ if (event.type === "result") applyBrand(event.package.brand);
82
+ }
83
+ ```
84
+
85
+ Progress stages report source search, page fetches, asset inspection, and
86
+ structured synthesis. The terminal result includes the generated context and
87
+ source provenance.
88
+
89
+ ## Run the demo-asset workflow
90
+
91
+ The registered `generatorDemoAssets` Mastra workflow accepts a company, purpose,
92
+ business questions, presentation mode, and bounded row count. It:
93
+
94
+ 1. Researches brand assets and KPIs from cited web sources.
95
+ 2. Produces a Zod-validated data plan without model-authored SQL.
96
+ 3. Suspends for approval before any mutation.
97
+ 4. Has the app service principal create and mark a deterministic per-user schema.
98
+ 5. Grants the active OBO user `ALL_PRIVILEGES` and `MANAGE`.
99
+ 6. Materializes deterministic Delta data and validates every KPI.
100
+ 7. Publishes an AI/BI dashboard with automatic companion Genie, or creates one
101
+ standalone Genie space when dashboard mode is not requested.
102
+
103
+ Schema names derive from the trusted user name, company, and purpose. Ownership
104
+ markers prevent a slug collision from adopting another user's schema.
105
+
106
+ ## How brand generation works
107
+
108
+ One request performs the following bounded workflow:
109
+
110
+ 1. `web_search` asks for first-party identity, voice, visual, and link evidence.
111
+ 2. Separate searches find relevant iOS App Store and Google Play listings.
112
+ 3. `web_fetch` reads up to four cited pages by default and visits matching app
113
+ listings for supplemental visual references.
114
+ 4. The likely official page is also fetched as HTML for deterministic logo,
115
+ icon, and favicon discovery.
116
+ 5. Representative app icons and screenshots are fetched and included in the
117
+ structured model call with the broader web evidence.
118
+ 6. The package normalizes action and text colors to WCAG AA contrast, then
119
+ `BrandContextSchema` validates the final portable context.
120
+
121
+ Fetched page text is treated as untrusted reference data. Embedded instructions
122
+ are excluded from the synthesis instructions. Link fields must use URLs present
123
+ in the research evidence. Asset URLs come from the official page markup, with
124
+ `/favicon.ico` on that origin as the icon fallback.
125
+
126
+ The package returns official brand asset URLs and mobile-reference metadata.
127
+ Mobile images are held in memory during synthesis so an exporter can persist
128
+ them separately as references. They are not substituted for the generated
129
+ brand identity and the package does not grant rights to third-party artwork.
130
+
131
+ ## Configure generation
132
+
133
+ Pass options to `brand()`:
134
+
135
+ ```ts
136
+ generator({
137
+ model: "databricks-claude-sonnet-4-6",
138
+ catalog: "main",
139
+ warehouseId: "abc123",
140
+ maxSources: 6,
141
+ sourceMaxLength: 12_000,
142
+ timeoutMs: 180_000,
143
+ });
144
+ ```
145
+
146
+ `model` accepts a deployed endpoint name or loose model request resolved by
147
+ `@dbx-tools/appkit-mastra`. When omitted, the live workspace model resolver
148
+ selects the endpoint.
149
+
150
+ The equivalent environment variables are:
151
+
152
+ - `GENERATOR_MODEL`
153
+ - `GENERATOR_CATALOG`
154
+ - `GENERATOR_MAX_SOURCES`
155
+ - `GENERATOR_SOURCE_MAX_LENGTH`
156
+ - `GENERATOR_TIMEOUT_MS`
157
+ - `DATABRICKS_WAREHOUSE_ID`
158
+
159
+ The source count is capped at eight and each excerpt at 20,000 characters.
160
+ Whole-package results are cached for six hours per AppKit execution identity.
161
+ Search and page reads keep the independent cache, retry, timeout, and URL-policy settings owned by
162
+ `@dbx-tools/appkit-web-search`.
163
+
164
+ ## Use the result
165
+
166
+ Apply the generated context with the shared React branding provider:
167
+
168
+ ```tsx
169
+ import type { BrandContext } from "@dbx-tools/shared-core/brand-utils";
170
+ import { BrandProvider } from "@dbx-tools/ui/branding/react";
171
+
172
+ export function App({ brand }: { brand: BrandContext }) {
173
+ return (
174
+ <BrandProvider context={brand} applyToDocument>
175
+ <Application />
176
+ </BrandProvider>
177
+ );
178
+ }
179
+ ```
180
+
181
+ The same context can be converted for delivered email with
182
+ `emailBrandFromContext` from `@dbx-tools/shared-email-template`.
package/index.ts ADDED
@@ -0,0 +1,44 @@
1
+ // GENERATED by projen watch - DO NOT EDIT.
2
+ // Regenerated from the exporting modules in ./src.
3
+ // Hand edits are overwritten on the next watch; this file is read-only.
4
+
5
+ export const PACKAGE_IDENTIFIER = "@dbx-tools/appkit-generator";
6
+ export const PACKAGE_VERSION = "0.9.138";
7
+ export * as assets from "./src/assets.ts";
8
+ export * as config from "./src/config.ts";
9
+ export * as dashboard from "./src/dashboard.ts";
10
+ export * as data from "./src/data.ts";
11
+ export * as defaults from "./src/defaults.ts";
12
+ export * as generate from "./src/generate.ts";
13
+ export * as genie from "./src/genie.ts";
14
+ export * as kpi from "./src/kpi.ts";
15
+ export * as namespace from "./src/namespace.ts";
16
+ export * as operations from "./src/operations.ts";
17
+ export * as palette from "./src/palette.ts";
18
+ export * as plan from "./src/plan.ts";
19
+ export * as plugin from "./src/plugin.ts";
20
+ export * as research from "./src/research.ts";
21
+ export * as schema from "./src/schema.ts";
22
+ export * as structured from "./src/structured.ts";
23
+ export * as workflow from "./src/workflow.ts";
24
+ export type { DiscoveredBrandAssets, DiscoveredMobileAppVisuals } from "./src/assets.ts";
25
+ export { DEFAULT_GENERATOR_TIMEOUT_MS, GENERATOR_CONFIG_SCHEMA } from "./src/config.ts";
26
+ export type { GeneratorPluginConfig, ResolvedGeneratorConfig } from "./src/config.ts";
27
+ export type { CreateGeneratorDashboardInput } from "./src/dashboard.ts";
28
+ export { BRAND_CACHE_TTL_SECONDS, BRAND_CACHE_VERSION, BRAND_GENERATION_ATTEMPTS } from "./src/defaults.ts";
29
+ export type { BrandExecuteConfig, BrandExecutionSettings } from "./src/defaults.ts";
30
+ export { BRAND_SYNTHESIS_INSTRUCTIONS } from "./src/generate.ts";
31
+ export type { BrandSynthesisInput, BrandSynthesizer, GenerateBrandPackageOptions } from "./src/generate.ts";
32
+ export type { CreateGeneratorGenieInput } from "./src/genie.ts";
33
+ export type { ResearchKpisOptions } from "./src/kpi.ts";
34
+ export type { ProvisionSchemaInput, GeneratorIdentity } from "./src/namespace.ts";
35
+ export { GeneratorOperations } from "./src/operations.ts";
36
+ export type { GeneratorOperationsOptions } from "./src/operations.ts";
37
+ export type { PlanGeneratorDataInput } from "./src/plan.ts";
38
+ export { GeneratorPlugin, generator } from "./src/plugin.ts";
39
+ export { DEFAULT_MAX_SOURCES, DEFAULT_SOURCE_MAX_LENGTH, MAX_SOURCES, MAX_SOURCE_MAX_LENGTH, ASSET_HTML_MAX_LENGTH } from "./src/research.ts";
40
+ export type { BrandResearchClient, BrandResearchOptions, BrandProgressReporter, BrandResearchSource, BrandResearch, BrandResearchVisualImage, BrandResearchVisualReference } from "./src/research.ts";
41
+ export { GENERATE_BRAND_TOOL_DESCRIPTION, GeneratedBrandProfileSchema } from "./src/schema.ts";
42
+ export type { GeneratedBrandProfile } from "./src/schema.ts";
43
+ export type { StructuredGenerationOptions } from "./src/structured.ts";
44
+ export type { GeneratorWorkflowOperations, GeneratorWorkflowOptions, GeneratorWorkflow } from "./src/workflow.ts";
package/lib/index.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ export declare const PACKAGE_IDENTIFIER = "@dbx-tools/appkit-generator";
2
+ export declare const PACKAGE_VERSION = "0.9.138";
3
+ export * as assets from "./src/assets.ts";
4
+ export * as config from "./src/config.ts";
5
+ export * as dashboard from "./src/dashboard.ts";
6
+ export * as data from "./src/data.ts";
7
+ export * as defaults from "./src/defaults.ts";
8
+ export * as generate from "./src/generate.ts";
9
+ export * as genie from "./src/genie.ts";
10
+ export * as kpi from "./src/kpi.ts";
11
+ export * as namespace from "./src/namespace.ts";
12
+ export * as operations from "./src/operations.ts";
13
+ export * as palette from "./src/palette.ts";
14
+ export * as plan from "./src/plan.ts";
15
+ export * as plugin from "./src/plugin.ts";
16
+ export * as research from "./src/research.ts";
17
+ export * as schema from "./src/schema.ts";
18
+ export * as structured from "./src/structured.ts";
19
+ export * as workflow from "./src/workflow.ts";
20
+ export type { DiscoveredBrandAssets, DiscoveredMobileAppVisuals } from "./src/assets.ts";
21
+ export { DEFAULT_GENERATOR_TIMEOUT_MS, GENERATOR_CONFIG_SCHEMA } from "./src/config.ts";
22
+ export type { GeneratorPluginConfig, ResolvedGeneratorConfig } from "./src/config.ts";
23
+ export type { CreateGeneratorDashboardInput } from "./src/dashboard.ts";
24
+ export { BRAND_CACHE_TTL_SECONDS, BRAND_CACHE_VERSION, BRAND_GENERATION_ATTEMPTS } from "./src/defaults.ts";
25
+ export type { BrandExecuteConfig, BrandExecutionSettings } from "./src/defaults.ts";
26
+ export { BRAND_SYNTHESIS_INSTRUCTIONS } from "./src/generate.ts";
27
+ export type { BrandSynthesisInput, BrandSynthesizer, GenerateBrandPackageOptions } from "./src/generate.ts";
28
+ export type { CreateGeneratorGenieInput } from "./src/genie.ts";
29
+ export type { ResearchKpisOptions } from "./src/kpi.ts";
30
+ export type { ProvisionSchemaInput, GeneratorIdentity } from "./src/namespace.ts";
31
+ export { GeneratorOperations } from "./src/operations.ts";
32
+ export type { GeneratorOperationsOptions } from "./src/operations.ts";
33
+ export type { PlanGeneratorDataInput } from "./src/plan.ts";
34
+ export { GeneratorPlugin, generator } from "./src/plugin.ts";
35
+ export { DEFAULT_MAX_SOURCES, DEFAULT_SOURCE_MAX_LENGTH, MAX_SOURCES, MAX_SOURCE_MAX_LENGTH, ASSET_HTML_MAX_LENGTH } from "./src/research.ts";
36
+ export type { BrandResearchClient, BrandResearchOptions, BrandProgressReporter, BrandResearchSource, BrandResearch, BrandResearchVisualImage, BrandResearchVisualReference } from "./src/research.ts";
37
+ export { GENERATE_BRAND_TOOL_DESCRIPTION, GeneratedBrandProfileSchema } from "./src/schema.ts";
38
+ export type { GeneratedBrandProfile } from "./src/schema.ts";
39
+ export type { StructuredGenerationOptions } from "./src/structured.ts";
40
+ export type { GeneratorWorkflowOperations, GeneratorWorkflowOptions, GeneratorWorkflow } from "./src/workflow.ts";
package/lib/index.js ADDED
@@ -0,0 +1,30 @@
1
+ // GENERATED by projen watch - DO NOT EDIT.
2
+ // Regenerated from the exporting modules in ./src.
3
+ // Hand edits are overwritten on the next watch; this file is read-only.
4
+ export const PACKAGE_IDENTIFIER = "@dbx-tools/appkit-generator";
5
+ export const PACKAGE_VERSION = "0.9.138";
6
+ export * as assets from "./src/assets.js";
7
+ export * as config from "./src/config.js";
8
+ export * as dashboard from "./src/dashboard.js";
9
+ export * as data from "./src/data.js";
10
+ export * as defaults from "./src/defaults.js";
11
+ export * as generate from "./src/generate.js";
12
+ export * as genie from "./src/genie.js";
13
+ export * as kpi from "./src/kpi.js";
14
+ export * as namespace from "./src/namespace.js";
15
+ export * as operations from "./src/operations.js";
16
+ export * as palette from "./src/palette.js";
17
+ export * as plan from "./src/plan.js";
18
+ export * as plugin from "./src/plugin.js";
19
+ export * as research from "./src/research.js";
20
+ export * as schema from "./src/schema.js";
21
+ export * as structured from "./src/structured.js";
22
+ export * as workflow from "./src/workflow.js";
23
+ export { DEFAULT_GENERATOR_TIMEOUT_MS, GENERATOR_CONFIG_SCHEMA } from "./src/config.js";
24
+ export { BRAND_CACHE_TTL_SECONDS, BRAND_CACHE_VERSION, BRAND_GENERATION_ATTEMPTS } from "./src/defaults.js";
25
+ export { BRAND_SYNTHESIS_INSTRUCTIONS } from "./src/generate.js";
26
+ export { GeneratorOperations } from "./src/operations.js";
27
+ export { GeneratorPlugin, generator } from "./src/plugin.js";
28
+ export { DEFAULT_MAX_SOURCES, DEFAULT_SOURCE_MAX_LENGTH, MAX_SOURCES, MAX_SOURCE_MAX_LENGTH, ASSET_HTML_MAX_LENGTH } from "./src/research.js";
29
+ export { GENERATE_BRAND_TOOL_DESCRIPTION, GeneratedBrandProfileSchema } from "./src/schema.js";
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwyQ0FBMkM7QUFDM0MsbURBQW1EO0FBQ25ELHdFQUF3RTtBQUV4RSxNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRyw2QkFBNkIsQ0FBQztBQUNoRSxNQUFNLENBQUMsTUFBTSxlQUFlLEdBQUcsU0FBUyxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxNQUFNLE1BQU0saUJBQWlCLENBQUM7QUFDMUMsT0FBTyxLQUFLLE1BQU0sTUFBTSxpQkFBaUIsQ0FBQztBQUMxQyxPQUFPLEtBQUssU0FBUyxNQUFNLG9CQUFvQixDQUFDO0FBQ2hELE9BQU8sS0FBSyxJQUFJLE1BQU0sZUFBZSxDQUFDO0FBQ3RDLE9BQU8sS0FBSyxRQUFRLE1BQU0sbUJBQW1CLENBQUM7QUFDOUMsT0FBTyxLQUFLL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
+ import type { BrandAssetSet } from "@dbx-tools/shared-core/brand-utils";
7
+ /** Asset references extracted from one official HTML page. */
8
+ export interface DiscoveredBrandAssets {
9
+ /** Theme-aware icon reference. */
10
+ icon: BrandAssetSet;
11
+ /** Theme-aware logo reference. */
12
+ logo: BrandAssetSet;
13
+ /** Browser favicon reference. */
14
+ favicon: string;
15
+ }
16
+ /** Visual references extracted from an official mobile-store page. */
17
+ export interface DiscoveredMobileAppVisuals {
18
+ /** Store listing application name. */
19
+ appName: string;
20
+ /** App icon and screenshot URLs in page order. */
21
+ imageUrls: string[];
22
+ }
23
+ /**
24
+ * Discover icon, logo, and favicon URLs from an official page.
25
+ *
26
+ * The function only returns URLs present in page metadata or markup. When the
27
+ * page omits an icon, it uses the conventional `/favicon.ico` URL on the same
28
+ * origin. The logo falls back to that icon so a generated context never points
29
+ * at the dbx-tools default artwork.
30
+ */
31
+ export declare function discoverBrandAssets(html: string, pageUrl: string): DiscoveredBrandAssets;
32
+ /** Extract an app name plus representative screenshots/icons from a store page. */
33
+ export declare function discoverMobileAppVisuals(html: string, pageUrl: string): DiscoveredMobileAppVisuals;