Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/web_build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Web directory build and test

on:
push:
branches: [ main ]
paths:
- 'web/**'
pull_request:
branches: [ main ]
paths:
- 'web/**'

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Cache .wireit
uses: actions/cache@v4
with:
path: web/.wireit
key: ${{ runner.os }}-wireit-${{ hashFiles('web/package-lock.json') }}
restore-keys: |
${{ runner.os }}-wireit-

- name: Install all workspaces' dependencies
working-directory: ./web
run: npm install --workspaces

- name: Build all workspaces
working-directory: ./web
run: npm run build --workspaces

- name: Run all tests
working-directory: ./web
run: npm run test --workspace=tests
2 changes: 1 addition & 1 deletion web/contact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"FORCE_COLOR": "1"
},
"dependencies": [
"../lib#build:tsc"
"../lib:build:tsc"
],
"files": [
"**/*.ts",
Expand Down
2 changes: 1 addition & 1 deletion web/editor/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A2UI Generator
# A2UI Editor / Generator

This is a UI to generate and visualize A2UI responses.

Expand Down
2 changes: 1 addition & 1 deletion web/editor/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { v0_8 } from "@a2ui/web-lib";

const catalog: v0_8.Types.ClientCapabilitiesDynamic = {
components:
v0_8.Schemas.A2UIProtocolMessage["properties"]["surfaceUpdate"][
v0_8.Schemas.A2UIClientEventMessage["properties"]["surfaceUpdate"][
"properties"
]["components"]["items"]["properties"]["component"]["properties"],
styles: {},
Expand Down
2 changes: 1 addition & 1 deletion web/editor/middleware/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function createA2UIPrompt(
`The user's layout request is: "${combinedInstructions.join('" and "')}"`,
`The Component Catalog you can use is: ${JSON.stringify(catalog)}`,
`The A2UI Protocol Message Schema: "${JSON.stringify(
v0_8.Schemas.A2UIProtocolMessage
v0_8.Schemas.A2UIClientEventMessage
)}"`,

`Please return a valid A2UI Protocol Message object necessary to build the
Expand Down
2 changes: 1 addition & 1 deletion web/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"FORCE_COLOR": "1"
},
"dependencies": [
"<dependencies>#build:tsc"
"../lib:build"
],
"files": [
"**/*.ts",
Expand Down
2 changes: 1 addition & 1 deletion web/inspector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"FORCE_COLOR": "1"
},
"dependencies": [
"<dependencies>#build:tsc"
"../lib:build:tsc"
],
"files": [
"**/*.ts",
Expand Down
8 changes: 4 additions & 4 deletions web/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
},
"wireit": {
"copy-spec": {
"command": "cp ../../specification/0.8/json/*.json ./src/0.8/schemas",
"command": "mkdir -p src/0.8/schemas && cp ../../specification/0.8/json/*.json src/0.8/schemas",
"files": [
"src/config.prod.js"
"../../specification/0.8/json/*.json"
],
"output": [
"dist/config.js"
"src/0.8/schemas/*.json"
]
},
"serve": {
Expand Down Expand Up @@ -100,4 +100,4 @@
"markdown-it": "^14.1.0",
"signal-utils": "^0.21.1"
}
}
}
4 changes: 4 additions & 0 deletions web/lib/src/0.8/schemas/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copied schema files
# (needed for the build but otherwise redundant)
*.json
!server_to_client_with_standard_catalog.json
6 changes: 1 addition & 5 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
"private": true,
"version": "0.1.0",
"description": "AI-first UI Toolkit Demo",
"main": "./dist/index.js",
"scripts": {
"build": "wireit"
},
"repository": {
"directory": "packages/a2ui",
"directory": "web",
"type": "git",
"url": "git+https://github.com/google/A2UI.git"
},
Expand Down
2 changes: 1 addition & 1 deletion web/restaurant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"FORCE_COLOR": "1"
},
"dependencies": [
"<dependencies>#build:tsc"
"../lib:build:tsc"
],
"files": [
"**/*.ts",
Expand Down
2 changes: 1 addition & 1 deletion web/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"FORCE_COLOR": "1"
},
"dependencies": [
"<dependencies>#build:tsc"
"../lib:build:tsc"
],
"files": [
"0.8/**/*.ts",
Expand Down