@uibot/application 0.0.0-stage → 0.2.1

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 (74) hide show
  1. package/dist/collection-application.d.ts +3 -0
  2. package/dist/collection-application.js +25 -0
  3. package/dist/compose-system-prompt.d.ts +104 -0
  4. package/dist/composition.d.ts +24 -0
  5. package/dist/context-service.d.ts +42 -0
  6. package/dist/creation-annotations.d.ts +5 -0
  7. package/dist/creation-assets.d.ts +15 -0
  8. package/dist/creation-brand-http.d.ts +9 -0
  9. package/dist/creation-brand.d.ts +25 -0
  10. package/dist/creation-copy.d.ts +11 -0
  11. package/dist/creation-domains.d.ts +25 -0
  12. package/dist/creation-facts.d.ts +8 -0
  13. package/dist/creation-http-helpers.d.ts +35 -0
  14. package/dist/creation-http.d.ts +99 -0
  15. package/dist/creation-layout.d.ts +4 -0
  16. package/dist/creation-legacy-flat-spec.d.ts +42 -0
  17. package/dist/creation-prompt.d.ts +33 -0
  18. package/dist/creation-requirements.d.ts +6 -0
  19. package/dist/creation-routes.d.ts +26 -0
  20. package/dist/creation-runner.d.ts +20 -0
  21. package/dist/creation-schema-ids.d.ts +6 -0
  22. package/dist/creation-spec-prompt.d.ts +3 -0
  23. package/dist/creation-store.d.ts +121 -0
  24. package/dist/creation-theme-http.d.ts +13 -0
  25. package/dist/creation-theme.d.ts +16 -0
  26. package/dist/creation-web-data-prompt.d.ts +15 -0
  27. package/dist/discovery-protocol.d.ts +25 -0
  28. package/dist/gap-orchestrator.d.ts +19 -0
  29. package/dist/grounded-brief.d.ts +37 -0
  30. package/dist/html-preview/config.d.ts +14 -0
  31. package/dist/html-preview/index.d.ts +11 -0
  32. package/dist/html-preview/link-interceptor.d.ts +10 -0
  33. package/dist/html-preview/proxy.d.ts +57 -0
  34. package/dist/html-preview/render.d.ts +39 -0
  35. package/dist/html-preview/routes.d.ts +27 -0
  36. package/dist/html-preview/session-store.d.ts +44 -0
  37. package/dist/hub-client.d.ts +25 -0
  38. package/dist/index.d.ts +32 -0
  39. package/dist/index.js +819 -0
  40. package/dist/live-runtime-adapter.d.ts +11 -0
  41. package/dist/playground-session-http.d.ts +24 -0
  42. package/dist/prompt.d.ts +17 -0
  43. package/dist/resource-apply.d.ts +18 -0
  44. package/dist/runtime.d.ts +37 -0
  45. package/dist/studio-artifact-export-http.d.ts +52 -0
  46. package/dist/studio-compose-context.d.ts +47 -0
  47. package/dist/studio-compose-http.d.ts +31 -0
  48. package/dist/studio-design-http.d.ts +164 -0
  49. package/dist/studio-design-md-export-http.d.ts +11 -0
  50. package/dist/studio-http-shared.d.ts +34 -0
  51. package/dist/studio-http.d.ts +359 -0
  52. package/dist/studio-logo.d.ts +24 -0
  53. package/dist/studio-pages/agents-page.d.ts +48 -0
  54. package/dist/studio-pages/catalog-page.d.ts +22 -0
  55. package/dist/studio-pages/design-md-page.d.ts +55 -0
  56. package/dist/studio-pages/evolution-page.d.ts +111 -0
  57. package/dist/studio-pages/governance-page.d.ts +65 -0
  58. package/dist/studio-pages/index.d.ts +82 -0
  59. package/dist/studio-pages/models-page.d.ts +76 -0
  60. package/dist/studio-pages/operations-page.d.ts +61 -0
  61. package/dist/studio-pages/overview-page.d.ts +90 -0
  62. package/dist/studio-pages/plugins-page.d.ts +36 -0
  63. package/dist/studio-pages/shared.d.ts +25 -0
  64. package/dist/studio-pages/skills-page.d.ts +59 -0
  65. package/dist/studio-pages/spec-page.d.ts +33 -0
  66. package/dist/studio-project-design-http.d.ts +41 -0
  67. package/dist/studio-project-specs.d.ts +11 -0
  68. package/dist/studio-resource-index-http.d.ts +17 -0
  69. package/dist/studio-spec-recover-http.d.ts +45 -0
  70. package/dist/studio-spec-sync-http.d.ts +43 -0
  71. package/dist/studio.d.ts +64 -0
  72. package/dist/ui-craft-baseline.d.ts +14 -0
  73. package/package.json +49 -4
  74. package/README.md +0 -3
@@ -0,0 +1,43 @@
1
+ export declare const SPEC_SYNC_SCHEMA: "uibot.spec.sync.v1";
2
+ export declare const SPEC_SYNC_DEFAULT_PATH = "/api/studio/spec-sync";
3
+ export declare const SPEC_SYNC_DEFAULT_PROJECT_ID = "default";
4
+ export interface SpecSyncFileEntry {
5
+ path: string;
6
+ content: string;
7
+ sha256: string;
8
+ }
9
+ export interface SpecSyncTreeResponse {
10
+ schema: typeof SPEC_SYNC_SCHEMA;
11
+ projectId: string;
12
+ digest: string;
13
+ files: SpecSyncFileEntry[];
14
+ updatedAt: string;
15
+ }
16
+ export interface SpecSyncPutBody {
17
+ schema?: string;
18
+ files: {
19
+ path: string;
20
+ content: string;
21
+ }[];
22
+ }
23
+ export interface CreateUIBotStudioSpecSyncHandlerOptions {
24
+ /** Workspace root; Specs live under `.uibot/linked-specs/`. */
25
+ rootDir: string;
26
+ /** Base path. Defaults to `/api/studio/spec-sync`. */
27
+ path?: string;
28
+ }
29
+ /** Resolve + contain a relative YAML path under projectDir. */
30
+ export declare function assertSpecSyncRelativePath(relativePath: string, projectDir: string): string;
31
+ export declare function normalizeSpecSyncProjectId(raw: string | null | undefined): string;
32
+ /** Same digest material as CLI `computeSpecDigest` (paths + per-file sha256). */
33
+ export declare function computeSpecSyncDigest(files: {
34
+ path: string;
35
+ sha256: string;
36
+ }[]): string;
37
+ /**
38
+ * Factory for Spec-as-code sync endpoints used by `uibot sync push|pull`
39
+ * when `controlPlaneUrl` is configured.
40
+ */
41
+ export declare function createUIBotStudioSpecSyncHandler(options: CreateUIBotStudioSpecSyncHandlerOptions): (request: Request) => Promise<Response>;
42
+ /** Test helper: wipe a project's Spec tree under rootDir. */
43
+ export declare function resetSpecSyncProject(rootDir: string, projectId?: string): void;
@@ -0,0 +1,64 @@
1
+ import type { UIBotStudioArchitecture, UIBotStudioDiagnosticsSummary, UIBotStudioTimelineEvent, UIBotStudioGovernanceSummary, UIBotStudioOperationsSummary, UIBotStudioAgentsSummary, UIBotStudioSkillsSummary, UIBotStudioDesignMdsSummary, UIBotStudioPagesMap, UIBotStudioSnapshot } from "@uibot/contracts";
2
+ export { assertUIBotStudioSnapshot, type UIBotStudioArchitecture, type UIBotStudioDiagnosticCheck, type UIBotStudioDiagnosticsSummary, type UIBotStudioTimelineEvent, type UIBotStudioRiskLevel, type UIBotStudioGovernancePolicyCheck, type UIBotStudioGovernanceDecision, type UIBotStudioGovernanceSummary, type UIBotStudioWorkflowSnapshot, type UIBotStudioTaskSnapshot, type UIBotStudioOperationsSummary, type UIBotStudioDesignMdEntry, type UIBotStudioDesignMdsSummary, type UIBotStudioAgentEntry, type UIBotStudioAgentsSummary, type UIBotStudioSkillEntry, type UIBotStudioSkillsSummary, type UIBotStudioPagesMap, type UIBotStudioSnapshot, } from "@uibot/contracts";
3
+ export interface UIBotStudioService<TRuntime = unknown, TModels = unknown, TDiagnostics = UIBotStudioDiagnosticsSummary | null, TTimeline extends readonly UIBotStudioTimelineEvent[] = readonly UIBotStudioTimelineEvent[], TGovernance = UIBotStudioGovernanceSummary | null, TOperations = UIBotStudioOperationsSummary | null, TAgents = UIBotStudioAgentsSummary | null, TSkills = UIBotStudioSkillsSummary | null, TDesignMds = UIBotStudioDesignMdsSummary | null, TPages extends UIBotStudioPagesMap = UIBotStudioPagesMap> {
4
+ getSnapshot(): Promise<UIBotStudioSnapshot<TRuntime, TModels, TDiagnostics, TTimeline, TGovernance, TOperations, TAgents, TSkills, TDesignMds, TPages>>;
5
+ }
6
+ export interface CreateUIBotStudioServiceOptions<TRuntime, TModels, TDiagnostics = UIBotStudioDiagnosticsSummary | null, TTimeline extends readonly UIBotStudioTimelineEvent[] = readonly UIBotStudioTimelineEvent[], TGovernance = UIBotStudioGovernanceSummary | null, TOperations = UIBotStudioOperationsSummary | null, TAgents = UIBotStudioAgentsSummary | null, TSkills = UIBotStudioSkillsSummary | null, TDesignMds = UIBotStudioDesignMdsSummary | null, TPages extends UIBotStudioPagesMap = UIBotStudioPagesMap> {
7
+ architecture: UIBotStudioArchitecture;
8
+ getRuntimeSnapshot: () => Promise<TRuntime> | TRuntime;
9
+ getModelSnapshot: () => Promise<TModels> | TModels;
10
+ getDiagnostics?: (input: {
11
+ runtime: TRuntime;
12
+ models: TModels;
13
+ }) => Promise<TDiagnostics> | TDiagnostics;
14
+ getTimeline?: (input: {
15
+ runtime: TRuntime;
16
+ models: TModels;
17
+ diagnostics: TDiagnostics;
18
+ }) => Promise<TTimeline> | TTimeline;
19
+ getGovernance?: (input: {
20
+ runtime: TRuntime;
21
+ models: TModels;
22
+ diagnostics: TDiagnostics;
23
+ timeline: TTimeline;
24
+ }) => Promise<TGovernance> | TGovernance;
25
+ getOperations?: (input: {
26
+ runtime: TRuntime;
27
+ models: TModels;
28
+ diagnostics: TDiagnostics;
29
+ timeline: TTimeline;
30
+ governance: TGovernance;
31
+ }) => Promise<TOperations> | TOperations;
32
+ getAgents?: (input: {
33
+ runtime: TRuntime;
34
+ models: TModels;
35
+ }) => Promise<TAgents> | TAgents;
36
+ getSkills?: (input: {
37
+ runtime: TRuntime;
38
+ models: TModels;
39
+ }) => Promise<TSkills> | TSkills;
40
+ getDesignMds?: (input: {
41
+ runtime: TRuntime;
42
+ models: TModels;
43
+ }) => Promise<TDesignMds> | TDesignMds;
44
+ resolveGeneratedAt?: (input: {
45
+ runtime: TRuntime;
46
+ models: TModels;
47
+ diagnostics: TDiagnostics;
48
+ timeline: TTimeline;
49
+ governance: TGovernance;
50
+ operations: TOperations;
51
+ }) => string;
52
+ getPages?: (input: {
53
+ runtime: TRuntime;
54
+ models: TModels;
55
+ diagnostics: TDiagnostics;
56
+ timeline: TTimeline;
57
+ governance: TGovernance;
58
+ operations: TOperations;
59
+ agents: TAgents;
60
+ skills: TSkills;
61
+ designMds: TDesignMds;
62
+ }) => Promise<TPages> | TPages;
63
+ }
64
+ export declare function createUIBotStudioService<TRuntime, TModels, TDiagnostics = UIBotStudioDiagnosticsSummary | null, TTimeline extends readonly UIBotStudioTimelineEvent[] = readonly UIBotStudioTimelineEvent[], TGovernance = UIBotStudioGovernanceSummary | null, TOperations = UIBotStudioOperationsSummary | null, TAgents = UIBotStudioAgentsSummary | null, TSkills = UIBotStudioSkillsSummary | null, TDesignMds = UIBotStudioDesignMdsSummary | null, TPages extends UIBotStudioPagesMap = UIBotStudioPagesMap>(options: CreateUIBotStudioServiceOptions<TRuntime, TModels, TDiagnostics, TTimeline, TGovernance, TOperations, TAgents, TSkills, TDesignMds, TPages>): UIBotStudioService<TRuntime, TModels, TDiagnostics, TTimeline, TGovernance, TOperations, TAgents, TSkills, TDesignMds, TPages>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Durable UI Craft baseline injected into every Spec / page-UI generation
3
+ * prompt. This is a prompt fragment, not a second design system: brand and
4
+ * house-style tokens still come from design-md. The baseline only forces
5
+ * lane selection, anti-slop bans, and UIBot Spec hygiene when no guide
6
+ * matches (and still applies when one does).
7
+ *
8
+ * Adapted from community frontend-design skills (Microsoft agent-academy,
9
+ * Anthropic skills) plus UIBot runtime constraints. See
10
+ * `packages/design-md/content/frontend-principles.design.md`.
11
+ */
12
+ export declare const DEFAULT_FORCE_INCLUDE_DESIGN_MD_IDS: readonly ["frontend-principles"];
13
+ export declare const UI_CRAFT_BASELINE_HEADING = "## UI Craft Baseline";
14
+ export declare const UI_CRAFT_BASELINE = "## UI Craft Baseline\n\nChoose a lane first, then pixels. This baseline is always on. A matched design-md\nis the aesthetic source of truth for that lane \u2014 do not invent a parallel brand.\n\n### Lane (pick one)\n\n- **control / ops console** \u2014 restrained, status-first, dense, token-driven.\n Shell recedes, canvas is the page, color is for status. Layer quota / tasks /\n hourly with hairlines and 4px meters; grouped settings nav; selected item is\n a neutral mix, not accent wash. Pair with `control-console` or\n `shadcn-admin-dashboard`.\n- **marketing / landing** \u2014 one named aesthetic, bold hero, honest copy. Pair\n with a brand design-md (stripe / vercel / figma / \u2026). Never default purple-SaaS.\n- **admin / SaaS chrome** \u2014 sidebar + page header + table/form. Carbon-like\n restraint (ibm-design) or shadcn density. Status and empty states before chrome.\n- **UIBot Spec** \u2014 when a design-md is selected or auto-matched, execute that\n guide's tokens, type, and recipes. Do not remix another brand on top.\n\n### Before pixels (write the plan, then build)\n\n1. Visual direction in one sentence (not \"clean modern SaaS\").\n2. Differentiator: the one thing someone will remember.\n3. Typography: 1\u20132 families with roles (display / body / meta).\n4. Color tokens: 4\u20136 named hex roles (bg, surface, fg, muted, accent, danger).\n5. Layout rhythm: spacing scale + 375 / 768 / 1440 intent.\n6. Motion: 0\u20132 moments that signal change. No scattered card fades.\n\n### Hard bans\n\n- Inter / Roboto / Arial / generic system-ui as the **default marketing** look.\n Product chrome may use a restrained sans when the selected design-md says so.\n- Purple-gradient-on-white SaaS slop unless the brief or design-md asks for it.\n- Fake metrics, zeroed KPIs, or invented logos for unknown data \u2014 use honest\n placeholders (`\u2014`, `n/a`, empty-state copy).\n- Nested buttons (button inside button / clickable card wrapping a Button).\n- Unscoped global CSS (`html, body, *` resets, unprefixed element selectors).\n Style via Spec tokens, `className`, and runtime-understood props.\n\n### Catalog recipes (prefer L2/L3 blocks)\n\nMarketing / landing \u2014 when the aesthetic fits (Schematic Editorial / amber\nmarketing tokens via `--marketing-accent`, `--font-display`), prefer\n`Hero`, `SectionHeader`, `FeatureGrid`, `PricingTable`, `CtaBand`,\n`Steps`, `LogoCloud`, `BrowserFrame`. A selected brand design-md\n(vercel / stripe / \u2026) owns hex and type; still prefer those catalog blocks\nover hand-rolled `Box`+`Card` grids for features and pricing.\n\nAdmin / ops \u2014 prefer `PageLayout` + `PageSiderMenu`, `StatGrid`, `Toast`,\n`Table` / `SearchableTable` with `emptyText`, `TrendChart`,\n`TimelineList`, `BadgeGroup`. See `control-console`.\n\nHard rule: never hand-roll a 3-tier pricing grid from `Card`+`Stat` when\n`PricingTable` is in the catalog. Never invent block types.\n\n### UIBot Spec hygiene\n\n- Prefer existing catalog / resource blocks over invented types.\n- Style through tokens and classes the runtime understands; do not emit\n executable JS (`_js` is rejected).\n- Empty, loading, and error must be visually distinct \u2014 never a blank card.\n- Check 375 / 768 / 1440: stack, readable type, no horizontal overflow.\n- One CTA hierarchy per region. Copy is UI: sentence case, specific verbs.\n\n\u4E2D\u6587\u6458\u8981\uFF1A\u5148\u9009\u8D5B\u9053\uFF0C\u518D\u9009 design-md\uFF1B\u7981\u6B62\u9ED8\u8BA4 Inter/\u7D2B\u6E10\u53D8\u8425\u9500\u8138\u3001\u5047\u6570\u636E\u3001\u5D4C\u5957\u6309\u94AE\u3001\n\u65E0\u4F5C\u7528\u57DF\u5168\u5C40 CSS\uFF1B\u8425\u9500\u4F18\u5148 Hero/FeatureGrid/PricingTable/CtaBand\uFF0C\u540E\u53F0\u4F18\u5148\nPageLayout/StatGrid/Table emptyText\uFF1B\u7981\u6B62\u5728\u6709 PricingTable \u65F6\u7528\u624B\u5199 Card+Stat\n\u5B9A\u4EF7\u6805\u683C\uFF1BUIBot \u53EA\u7528\u73B0\u6709\u5757\u548C\u8FD0\u884C\u65F6\u8BA4\u8BC6\u7684 token/class\uFF1B\u7A7A/\u52A0\u8F7D/\u9519\u8BEF\u4E09\u5206\uFF1B\n\u6309 375/768/1440 \u68C0\u67E5\u3002\n";
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@uibot/application",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.1",
4
+ "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/Foundj/uibot.git",
8
+ "directory": "packages/application"
9
+ },
10
+ "type": "module",
11
+ "main": "./dist/index.js",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./collection-application": {
20
+ "types": "./dist/collection-application.d.ts",
21
+ "default": "./dist/collection-application.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "!dist/**/*.map",
27
+ "!dist/**/*.test.d.ts",
28
+ "!dist/**/*.spec.d.ts"
29
+ ],
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "dependencies": {
34
+ "@uibot/artifact-exporters": "^0.2.1",
35
+ "@uibot/compiler": "^0.2.1",
36
+ "@uibot/context": "^0.2.1",
37
+ "@uibot/context-code": "^0.2.1",
38
+ "@uibot/contracts": "^0.2.1",
39
+ "@uibot/design-md": "^0.2.1",
40
+ "@uibot/registry": "^0.2.1",
41
+ "@uibot/renderer-react": "^0.2.1",
42
+ "@uibot/runtime": "^0.2.1",
43
+ "parse5": "7.3.0",
44
+ "@uibot/page-annotation": "^0.2.1"
45
+ },
46
+ "scripts": {
47
+ "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",
48
+ "typecheck": "bun x tsc -p tsconfig.json --noEmit",
49
+ "test": "bun test"
50
+ }
51
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
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.