-
Notifications
You must be signed in to change notification settings - Fork 1
F/sprint24 #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
F/sprint24 #14
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Commands | ||
|
|
||
| ```bash | ||
| npm run validate # Validate all components against schemas (run before every commit) | ||
| npm run build # Build runtime package (default) | ||
| npm run build:reference # Build reference package (exports only, for cross-domain usage) | ||
| npm run build:runtime # Explicitly build runtime package | ||
| npm test # Run tests | ||
| npm run sync-schema # Sync schema version from dependencies | ||
| ``` | ||
|
|
||
| ## Architecture Overview | ||
|
|
||
| This is a **vNext domain-driven workflow automation system**. The "core" domain defines workflows, tasks, views, schemas, functions, and extensions as JSON component files, which are deployed to a vNext Runtime engine. | ||
|
|
||
| ### Component Root | ||
|
|
||
| All components live under `core/` organized by type: | ||
| - `core/Workflows/` — State machine definitions; each workflow folder may contain a `src/` subfolder for C# mapping files (`.csx`) | ||
| - `core/Tasks/` — Reusable task definitions (HTTP, subprocess, script, service) | ||
| - `core/Views/` — UI component definitions bound to workflow states | ||
| - `core/Schemas/` — JSON Schema definitions for data validation | ||
| - `core/Functions/` — Reusable business logic callable from workflows | ||
| `core/Extensions/` — Runtime capability extensions | ||
|
|
||
| ### Standard Component JSON Shape | ||
|
|
||
| Every component regardless of type follows this envelope: | ||
|
|
||
| ```json | ||
| { | ||
| "key": "kebab-case-name", | ||
| "version": "1.0.0", | ||
| "domain": "core", | ||
| "flow": "sys-workflows", | ||
| "flowVersion": "1.0.0", | ||
| "tags": ["searchable", "tags"], | ||
| "attributes": { /* type-specific content */ } | ||
| } | ||
| ``` | ||
|
|
||
| **Flow type values**: `sys-workflows`, `sys-tasks`, `sys-schemas`, `sys-views`, `sys-functions`, `sys-extensions` | ||
|
|
||
| ### C# Mapping Files | ||
|
|
||
| Workflows reference C# script files (`.csx`) located in `src/` folders next to the workflow JSON. The vNext VS Code extension automatically handles base64-encoding these files into the workflow JSON when saving. **Never manually convert `.csx` files to base64.** | ||
|
|
||
| ### Build Outputs | ||
|
|
||
| - **Runtime build** (`@burgan-tech/vnext-core-runtime`) — Complete domain structure for engine deployment | ||
| - **Reference build** (`@burgan-tech/vnext-core-reference`) — Exported components only, for cross-domain usage | ||
|
|
||
| ### Local Development Servers | ||
|
|
||
| | Server | Port | Purpose | | ||
| |--------|------|---------| | ||
| | vNext Runtime | `localhost:4201` | Workflow engine; use for instance start, transitions, state queries | | ||
| | Mockoon | `localhost:3001` | External API mocks; all HTTP tasks point here | | ||
|
|
||
| **Never** call the Mockoon API (`localhost:3001`) for workflow operations, and **never** hardcode production URLs in HTTP task configs — always use Mockoon during development. | ||
|
|
||
| ### HTTP Test Files | ||
|
|
||
| Every workflow should have a `.http` test file demonstrating full instance progression. vNext Runtime API endpoints follow this pattern: | ||
|
|
||
| ```http | ||
| @baseUrl = http://localhost:4201 | ||
| @apiVersion = 1 | ||
| @domain = core | ||
|
|
||
| ### Start instance | ||
| POST {{baseUrl}}/api/v{{apiVersion}}/{{domain}}/workflows/{workflow-key}/instances/start | ||
|
|
||
| ### Execute transition | ||
| PATCH {{baseUrl}}/api/v{{apiVersion}}/{{domain}}/workflows/{workflow-key}/instances/{instanceKey}/transitions/{transitionKey} | ||
|
|
||
| ### Get state (long polling) | ||
| GET {{baseUrl}}/api/v{{apiVersion}}/{{domain}}/workflows/{workflow-key}/instances/{instanceKey}/functions/state | ||
| ``` | ||
|
|
||
| ### Mockoon Mock Organization | ||
|
|
||
| When adding new routes to `mockoon/`, always create a **folder with the domain name first**, then place routes inside. Endpoint pattern: `api/{domain}/{resource}/{action}`. Include success (2xx) and error (4xx/5xx) response scenarios with realistic latency (500–1000ms). | ||
|
|
||
| ## Critical Rules | ||
|
|
||
| - Each workflow must have **exactly one** initial state (defined by `startTransition.target`). | ||
| - Auto transitions (`triggerType: 1`) must come in complementary pairs with mutually exclusive conditions. A lone auto transition is only valid if its rule always returns true (unconditional). | ||
| - All component references use the format: `{domain}/{component-type}/{key}/{version}` — strict mode is enabled in `vnext.config.json`. | ||
| - Run `npm run validate` after any component change. It validates JSON syntax and schema compliance for all components. | ||
| - JSON files use **2-space indentation**, double quotes, no trailing commas. | ||
| - All keys and file names use **kebab-case**; C# class names use **PascalCase**. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 0 additions & 129 deletions
129
core/Extensions/task-test/src/HttpDataExtensionMapping.csx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list item is missing a leading hyphen. For formatting consistency with the rest of the list, please add one.