Bundle Assets
Overview
Sección titulada «Overview»Bundle Assets is a generic, capability-based mechanism that lets bundles carry their own files (skins, templates, embed snippets, locales) in a standard ./assets/ directory. Packs that need access to these files declare a capability, and the runtime grants read-only access at load time.
How It Works
Sección titulada «How It Works»The bundle assets system has three moving parts:
- Capability declaration — the bundle’s JSON AnswerDocument (or wizard prompts) declares which asset capabilities are enabled.
- Scaffold —
gtc wizardorgtc setupautomatically copies eligibleassets/webchat-gui/files from extension.gtpackfiles into the bundle’s./assets/directory. - Overlay — at runtime, files in the bundle’s
./assets/directory override matching files from the pack’s built-in defaults. This lets you customize skins, templates, and locale strings without modifying the pack itself.
Capabilities
Sección titulada «Capabilities»Each capability unlocks a specific set of assets and behaviors. Capabilities follow the naming convention greentic.cap.{category}.v{N}.
| Capability ID | Purpose | What It Enables |
|---|---|---|
greentic.cap.bundle_assets.read.v1 | Bundle-level asset directory | Creates the ./assets/ directory structure and scaffolds eligible default skin files from extension packs |
greentic.cap.webchat.oauth.v1 | OAuth authentication for WebChat | Adds OAuth auth provider configuration to tenant config files |
greentic.cap.webchat.i18n.v1 | Multi-language WebChat | Enables locale picker and scaffolds locale JSON files under ./assets/ |
greentic.cap.webchat.embed.v1 | Embeddable WebChat widget | Generates embed HTML snippets (fullpage link, inline iframe, chat bubble) per tenant |
Wizard Prompts
Sección titulada «Wizard Prompts»When you run gtc wizard, the wizard prompts for each capability:
? Enable bundle-level assets (./assets/)? [Y/n]? Enable OAuth login for WebChat GUI? [y/N]? Enable multi-language for WebChat GUI? [y/N]? Enable embeddable WebChat widget? [y/N]Answering “yes” to a capability adds it to the generated bundle and triggers the corresponding scaffold step.
You can also set capabilities directly in a JSON AnswerDocument without interactive prompts (see Configuration below).
Configuration
Sección titulada «Configuration»In the Wizard AnswerDocument
Sección titulada «In the Wizard AnswerDocument»Start from the live schema instead of copying old examples:
gtc wizard --schemagtc wizard --schema prints the current launcher schema, including the embedded greentic-bundle answer schema. Coding agents should fetch that schema first, fill a JSON AnswerDocument, validate it, then apply it.
{ "wizard_id": "greentic-dev.wizard.launcher.main", "schema_id": "greentic-dev.launcher.main", "schema_version": "1.0.0", "locale": "en", "answers": { "selected_action": "bundle", "delegate_answer_document": { "wizard_id": "greentic-bundle.wizard.run", "schema_id": "greentic-bundle.wizard.answers", "schema_version": "1.0.0", "locale": "en", "answers": { "bundle_name": "My Digital Worker", "bundle_id": "my-digital-worker", "output_dir": "./my-digital-worker", "extension_providers": [ "messaging-webchat" ], "capabilities": [ "greentic.cap.bundle_assets.read.v1", "greentic.cap.webchat.oauth.v1", "greentic.cap.webchat.i18n.v1", "greentic.cap.webchat.embed.v1" ] }, "locks": { "execution": "execute" } } }, "locks": { "execution": "execute" }}gtc wizard validate --answers bundle-assets-create-answers.jsongtc wizard apply --answers bundle-assets-create-answers.json --yesThe answers file for gtc wizard is JSON only. The generated workspace still contains bundle.yaml; that file is runtime workspace state, not the wizard replay format.
In bundle.yaml
Sección titulada «In bundle.yaml»Capabilities are also recorded in the generated bundle.yaml so the runtime knows which features are active:
name: my-digital-workerversion: "1.0.0"
capabilities: - greentic.cap.bundle_assets.read.v1 - greentic.cap.webchat.oauth.v1 - greentic.cap.webchat.i18n.v1 - greentic.cap.webchat.embed.v1
extension_providers: - "messaging-webchat"How Scaffold Works
Sección titulada «How Scaffold Works»When a capability is enabled, the wizard (or setup) runs a scaffold step that populates the bundle’s ./assets/ directory with default files. The scaffold process:
-
Reads eligible files from extension packs
Extension
.gtpackfiles can ship files underassets/webchat-gui/, including skin JSON, HTML templates, CSS, locale JSON, and embed snippets. Bundle asset scaffold intentionally copies only this public webchat asset subtree; internal pack assets such as fixtures, schemas, and secret requirement files are not copied. -
Copies public assets into the bundle
The scaffold writes matching files to the same relative path under the bundle root, for example
assets/webchat-gui/skins/demo/skin.json. -
Preserves existing customizations
Existing files are not overwritten. This is deliberate: once a team customizes
./assets/, setup and wizard reruns should not destroy those edits. -
Generates embed snippets
When
greentic.cap.webchat.embed.v1is enabled and the selected WebChat extension provides embed assets, those snippets are made available underassets/webchat-gui/embed/.
Directory Structure After Scaffold
Sección titulada «Directory Structure After Scaffold»With all four capabilities enabled and a single tenant demo, the bundle looks like this:
my-digital-worker/├── bundle.yaml├── providers/│ └── messaging/│ ├── messaging-webchat.gtpack│ └── messaging-telegram.gtpack├── assets/│ └── webchat-gui/│ ├── skins/│ │ └── demo/ # Per-tenant skin (copied from pack defaults)│ │ ├── skin.json # Theme colors, title, logo, feature flags│ │ ├── fullpage/│ │ │ ├── index.html # Fullpage chat HTML│ │ │ └── page.css # Fullpage custom CSS│ │ ├── embed/│ │ │ └── bubble.css # Chat bubble custom CSS│ │ └── i18n/│ │ ├── en.json # English locale strings│ │ └── id.json # Indonesian locale strings│ └── embed/│ └── demo.html # Generated embed snippets for tenant├── tenants/│ └── demo/│ ├── tenant.gmap│ └── teams/│ └── default/│ └── team.gmap└── seeds.yamlOverlay Mechanism
Sección titulada «Overlay Mechanism»At runtime, the Greentic platform resolves asset files using an overlay strategy:
- Bundle files take priority. If a file exists in
./assets/webchat-gui/skins/{tenant}/skin.json, it is used instead of the pack’s built-inskins/default/skin.json. - Pack defaults are the fallback. If the bundle does not override a file, the pack’s built-in version is used.
- Overlay is per-file. You can override
skin.jsonwhile keeping the pack’s defaultpage.css. There is no all-or-nothing requirement.
This means you can safely edit files in ./assets/ to customize your deployment without forking or rebuilding the pack.
Example: Customizing the WebChat Skin
Sección titulada «Example: Customizing the WebChat Skin»After scaffold, edit the skin configuration to match your brand:
{ "title": "Acme Support", "subtitle": "We are here to help", "logo": "/assets/webchat-gui/skins/demo/logo.png", "primaryColor": "#E63946", "backgroundColor": "#F1FAEE", "showLocalePicker": true, "showOAuthLogin": true, "embedEnabled": true}The runtime serves this skin when a user connects to the WebChat for the demo tenant. No pack rebuild is needed.
Next Steps
Sección titulada «Next Steps»- WebChat Embedding — embed types and configuration reference
- WebChat Extension — full WebChat setup and features
- Packs — how packs declare and consume capabilities
- gtc wizard — wizard answers file reference