@geenius/ai-workflow 0.1.0
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.
- package/.changeset/config.json +11 -0
- package/.github/CODEOWNERS +1 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +16 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +11 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +10 -0
- package/.github/dependabot.yml +11 -0
- package/.github/workflows/ci.yml +23 -0
- package/.github/workflows/release.yml +29 -0
- package/.nvmrc +1 -0
- package/.project/ACCOUNT.yaml +4 -0
- package/.project/IDEAS.yaml +7 -0
- package/.project/PROJECT.yaml +11 -0
- package/.project/ROADMAP.yaml +15 -0
- package/CHANGELOG.md +11 -0
- package/CODE_OF_CONDUCT.md +16 -0
- package/CONTRIBUTING.md +26 -0
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/SECURITY.md +15 -0
- package/SUPPORT.md +8 -0
- package/package.json +74 -0
- package/packages/convex/README.md +1 -0
- package/packages/convex/package.json +12 -0
- package/packages/convex/src/convex.config.ts +3 -0
- package/packages/convex/src/index.ts +3 -0
- package/packages/convex/src/mutations.ts +36 -0
- package/packages/convex/src/queries.ts +19 -0
- package/packages/convex/src/schema.ts +24 -0
- package/packages/convex/tsconfig.json +25 -0
- package/packages/react/README.md +1 -0
- package/packages/react/package.json +46 -0
- package/packages/react/src/components/ApprovalModal.tsx +47 -0
- package/packages/react/src/components/StepConfigPanel.tsx +67 -0
- package/packages/react/src/components/StepConnector.tsx +47 -0
- package/packages/react/src/components/StepNode.tsx +38 -0
- package/packages/react/src/components/StepPalette.tsx +48 -0
- package/packages/react/src/components/WorkflowCanvas.tsx +42 -0
- package/packages/react/src/components/WorkflowRunPanel.tsx +64 -0
- package/packages/react/src/components/WorkflowToolbar.tsx +43 -0
- package/packages/react/src/components/index.ts +9 -0
- package/packages/react/src/hooks/index.ts +10 -0
- package/packages/react/src/hooks/useApprovalGate.ts +59 -0
- package/packages/react/src/hooks/useWorkflow.ts +39 -0
- package/packages/react/src/hooks/useWorkflowBuilder.ts +121 -0
- package/packages/react/src/hooks/useWorkflowRun.ts +75 -0
- package/packages/react/src/hooks/useWorkflowStep.ts +52 -0
- package/packages/react/src/hooks/useWorkflowTemplates.ts +54 -0
- package/packages/react/src/index.ts +16 -0
- package/packages/react/src/pages/WorkflowBuilderPage.tsx +81 -0
- package/packages/react/src/pages/WorkflowRunsPage.tsx +59 -0
- package/packages/react/src/pages/index.ts +3 -0
- package/packages/react/tsconfig.json +1 -0
- package/packages/react/tsup.config.ts +7 -0
- package/packages/react-css/README.md +1 -0
- package/packages/react-css/package.json +44 -0
- package/packages/react-css/src/components/ApprovalModal.tsx +6 -0
- package/packages/react-css/src/components/StepConfigPanel.tsx +7 -0
- package/packages/react-css/src/components/StepConnector.tsx +6 -0
- package/packages/react-css/src/components/StepNode.tsx +7 -0
- package/packages/react-css/src/components/StepPalette.tsx +6 -0
- package/packages/react-css/src/components/WorkflowCanvas.tsx +6 -0
- package/packages/react-css/src/components/WorkflowRunPanel.tsx +9 -0
- package/packages/react-css/src/components/WorkflowToolbar.tsx +4 -0
- package/packages/react-css/src/components/index.ts +9 -0
- package/packages/react-css/src/hooks/index.ts +3 -0
- package/packages/react-css/src/hooks/useWorkflow.ts +39 -0
- package/packages/react-css/src/hooks/useWorkflowBuilder.ts +121 -0
- package/packages/react-css/src/index.ts +7 -0
- package/packages/react-css/src/pages/WorkflowBuilderPage.tsx +16 -0
- package/packages/react-css/src/pages/WorkflowRunsPage.tsx +6 -0
- package/packages/react-css/src/pages/index.ts +3 -0
- package/packages/react-css/src/styles.css +945 -0
- package/packages/react-css/tsconfig.json +26 -0
- package/packages/react-css/tsup.config.ts +2 -0
- package/packages/shared/README.md +1 -0
- package/packages/shared/package.json +56 -0
- package/packages/shared/src/__tests__/ai-workflow.test.ts +217 -0
- package/packages/shared/src/config.ts +49 -0
- package/packages/shared/src/convex/index.ts +2 -0
- package/packages/shared/src/convex/schemas.ts +42 -0
- package/packages/shared/src/engine.test.ts +1 -0
- package/packages/shared/src/engine.ts +295 -0
- package/packages/shared/src/index.ts +43 -0
- package/packages/shared/src/steps.ts +68 -0
- package/packages/shared/src/templates.ts +172 -0
- package/packages/shared/src/types.ts +237 -0
- package/packages/shared/src/utils/cost.ts +79 -0
- package/packages/shared/src/utils/dag.ts +133 -0
- package/packages/shared/src/utils/index.ts +5 -0
- package/packages/shared/src/utils/interpolation.ts +53 -0
- package/packages/shared/src/validators.ts +215 -0
- package/packages/shared/tsconfig.json +1 -0
- package/packages/shared/tsup.config.ts +5 -0
- package/packages/shared/vitest.config.ts +4 -0
- package/packages/solidjs/README.md +1 -0
- package/packages/solidjs/package.json +45 -0
- package/packages/solidjs/src/components/ApprovalModal.tsx +18 -0
- package/packages/solidjs/src/components/StepConfigPanel.tsx +14 -0
- package/packages/solidjs/src/components/StepConnector.tsx +11 -0
- package/packages/solidjs/src/components/StepNode.tsx +12 -0
- package/packages/solidjs/src/components/StepPalette.tsx +22 -0
- package/packages/solidjs/src/components/WorkflowCanvas.tsx +23 -0
- package/packages/solidjs/src/components/WorkflowRunPanel.tsx +18 -0
- package/packages/solidjs/src/components/WorkflowToolbar.tsx +13 -0
- package/packages/solidjs/src/components/index.ts +9 -0
- package/packages/solidjs/src/index.ts +7 -0
- package/packages/solidjs/src/pages/WorkflowBuilderPage.tsx +37 -0
- package/packages/solidjs/src/pages/WorkflowRunsPage.tsx +20 -0
- package/packages/solidjs/src/pages/index.ts +3 -0
- package/packages/solidjs/src/primitives/createApprovalGate.ts +29 -0
- package/packages/solidjs/src/primitives/createWorkflow.ts +28 -0
- package/packages/solidjs/src/primitives/createWorkflowBuilder.ts +56 -0
- package/packages/solidjs/src/primitives/createWorkflowRun.ts +32 -0
- package/packages/solidjs/src/primitives/createWorkflowStep.ts +23 -0
- package/packages/solidjs/src/primitives/createWorkflowTemplates.ts +28 -0
- package/packages/solidjs/src/primitives/index.ts +8 -0
- package/packages/solidjs/tsconfig.json +1 -0
- package/packages/solidjs/tsup.config.ts +7 -0
- package/packages/solidjs-css/README.md +1 -0
- package/packages/solidjs-css/package.json +43 -0
- package/packages/solidjs-css/src/components/ApprovalModal.tsx +6 -0
- package/packages/solidjs-css/src/components/StepConfigPanel.tsx +7 -0
- package/packages/solidjs-css/src/components/StepConnector.tsx +6 -0
- package/packages/solidjs-css/src/components/StepNode.tsx +7 -0
- package/packages/solidjs-css/src/components/StepPalette.tsx +7 -0
- package/packages/solidjs-css/src/components/WorkflowCanvas.tsx +7 -0
- package/packages/solidjs-css/src/components/WorkflowRunPanel.tsx +8 -0
- package/packages/solidjs-css/src/components/WorkflowToolbar.tsx +5 -0
- package/packages/solidjs-css/src/components/index.ts +9 -0
- package/packages/solidjs-css/src/index.ts +7 -0
- package/packages/solidjs-css/src/pages/WorkflowBuilderPage.tsx +2 -0
- package/packages/solidjs-css/src/pages/WorkflowRunsPage.tsx +7 -0
- package/packages/solidjs-css/src/pages/index.ts +3 -0
- package/packages/solidjs-css/src/primitives/createWorkflow.ts +28 -0
- package/packages/solidjs-css/src/primitives/createWorkflowBuilder.ts +56 -0
- package/packages/solidjs-css/src/primitives/index.ts +1 -0
- package/packages/solidjs-css/src/styles.css +945 -0
- package/packages/solidjs-css/tsconfig.json +27 -0
- package/packages/solidjs-css/tsup.config.ts +2 -0
- package/pnpm-workspace.yaml +2 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "main",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @mxn2020
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
branches: [main]
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
check:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: pnpm/action-setup@v4
|
|
14
|
+
with:
|
|
15
|
+
version: 10
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version-file: '.nvmrc'
|
|
19
|
+
cache: 'pnpm'
|
|
20
|
+
- run: pnpm install --frozen-lockfile
|
|
21
|
+
- run: pnpm build
|
|
22
|
+
- run: pnpm lint
|
|
23
|
+
- run: pnpm test
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
|
|
6
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: pnpm/action-setup@v4
|
|
14
|
+
with:
|
|
15
|
+
version: 10
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version-file: '.nvmrc'
|
|
19
|
+
cache: 'pnpm'
|
|
20
|
+
registry-url: 'https://registry.npmjs.org'
|
|
21
|
+
- run: pnpm install --frozen-lockfile
|
|
22
|
+
- run: pnpm build
|
|
23
|
+
- uses: changesets/action@v1
|
|
24
|
+
with:
|
|
25
|
+
publish: pnpm changeset publish
|
|
26
|
+
version: pnpm changeset version
|
|
27
|
+
env:
|
|
28
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
22
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name: geenius-ai-workflow
|
|
2
|
+
description: "Geenius AI Workflow — Chained AI pipelines for Convex apps (React + SolidJS)"
|
|
3
|
+
category: library
|
|
4
|
+
priority: high
|
|
5
|
+
tags:
|
|
6
|
+
- geenius
|
|
7
|
+
- npm-package
|
|
8
|
+
- react
|
|
9
|
+
- solidjs
|
|
10
|
+
deploy_url: null
|
|
11
|
+
npm_scope: "@geenius-ai-workflow"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
version: "0.1"
|
|
2
|
+
milestones:
|
|
3
|
+
- name: "v0.1.0 — Initial Release"
|
|
4
|
+
status: in-progress
|
|
5
|
+
items:
|
|
6
|
+
- "Core shared types and logic"
|
|
7
|
+
- "React hooks and components"
|
|
8
|
+
- "SolidJS primitives"
|
|
9
|
+
- "npm publishing via Changesets"
|
|
10
|
+
- name: "v0.2.0 — Stability"
|
|
11
|
+
status: planned
|
|
12
|
+
items:
|
|
13
|
+
- "Test coverage ≥ 50%"
|
|
14
|
+
- "API documentation"
|
|
15
|
+
- "Convex adapter"
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-03-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
8
|
+
education, socio-economic status, nationality, personal appearance, race,
|
|
9
|
+
religion, or sexual identity and orientation.
|
|
10
|
+
|
|
11
|
+
## Enforcement
|
|
12
|
+
|
|
13
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
14
|
+
reported to the project team at conduct@geenius.app.
|
|
15
|
+
|
|
16
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Contributing to @geenius-ai-workflow
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing!
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/mxn2020/geenius-ai-workflow.git
|
|
9
|
+
cd geenius-ai-workflow
|
|
10
|
+
pnpm install
|
|
11
|
+
pnpm build
|
|
12
|
+
pnpm test
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Pull Request Process
|
|
16
|
+
|
|
17
|
+
1. Fork the repo and create a feature branch from `main`
|
|
18
|
+
2. Add or update tests as appropriate
|
|
19
|
+
3. Run `pnpm changeset` to describe your changes for the changelog
|
|
20
|
+
4. Open a PR against `main`
|
|
21
|
+
|
|
22
|
+
## Code Style
|
|
23
|
+
|
|
24
|
+
- TypeScript strict mode
|
|
25
|
+
- ESLint + Prettier formatting
|
|
26
|
+
- Conventional commits preferred
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Mehdi Nabhani
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ✦ geenius-ai-workflow\n\n> Geenius AI Workflow — Chained AI pipelines for Convex apps (React + SolidJS)\n\n---\n\n## Overview\nBuilt with Steve Jobs-level minimalism and Jony Ive-level craftsmanship, this package is designed to deliver unparalleled developer experience (DX) and rock-solid performance.\n\n## Installation\n\n```bash\npnpm add geenius-ai-workflow\n```\n\n## Usage\n\n```typescript\nimport { init } from 'geenius-ai-workflow';\n\n// Initialize the module with absolute precision\ninit({\n mode: 'premium',\n});\n```\n\n## Architecture\n- **Zero-config**: It just works.\n- **Strictly Typed**: Fully written in TypeScript for flawless IntelliSense.\n- **Framework Agnostic**: seamlessly integrates into the Geenius ecosystem.\n\n---\n\n*Designed by Antigravity HQ*\n
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
| Version | Supported |
|
|
6
|
+
| ------- | --------- |
|
|
7
|
+
| 0.x.x | ✅ |
|
|
8
|
+
|
|
9
|
+
## Reporting a Vulnerability
|
|
10
|
+
|
|
11
|
+
Please report security vulnerabilities by emailing **security@geenius.app**.
|
|
12
|
+
|
|
13
|
+
Do **not** open a public GitHub issue for security vulnerabilities.
|
|
14
|
+
|
|
15
|
+
We will acknowledge receipt within 48 hours and provide a detailed response within 5 business days.
|
package/SUPPORT.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
## Getting Help
|
|
4
|
+
|
|
5
|
+
- 📖 [Documentation](https://docs.geenius.app)
|
|
6
|
+
- 🐛 [Bug Reports](https://github.com/mxn2020/geenius-ai-workflow/issues/new?template=bug_report.md)
|
|
7
|
+
- 💡 [Feature Requests](https://github.com/mxn2020/geenius-ai-workflow/issues/new?template=feature_request.md)
|
|
8
|
+
- 📧 Email: support@geenius.app
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@geenius/ai-workflow",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Geenius AI Workflow — Chained AI pipelines for Convex apps (React + SolidJS)",
|
|
6
|
+
"author": "Antigravity HQ",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/mxn2020/geenius-ai-workflow.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ai",
|
|
14
|
+
"workflow",
|
|
15
|
+
"pipeline",
|
|
16
|
+
"convex",
|
|
17
|
+
"react",
|
|
18
|
+
"solidjs",
|
|
19
|
+
"geenius"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"dev": "pnpm -r --parallel type-check",
|
|
23
|
+
"build": "pnpm -r build",
|
|
24
|
+
"clean": "pnpm -r clean",
|
|
25
|
+
"lint": "pnpm -r --parallel type-check",
|
|
26
|
+
"test": "echo \"No tests configured yet\" && exit 0",
|
|
27
|
+
"type-check": "pnpm -r type-check",
|
|
28
|
+
"format": "prettier --write \"packages/*/src/**/*.{ts,tsx}\"",
|
|
29
|
+
"version:patch": "pnpm -r exec -- npm version patch --no-git-tag-version && npm version patch -m 'v%s'",
|
|
30
|
+
"version:minor": "pnpm -r exec -- npm version minor --no-git-tag-version && npm version minor -m 'v%s'",
|
|
31
|
+
"version:major": "pnpm -r exec -- npm version major --no-git-tag-version && npm version major -m 'v%s'",
|
|
32
|
+
"release": "git push && git push --tags",
|
|
33
|
+
"publish:all": "pnpm -r publish --access public"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"prettier": "^3.8.1",
|
|
37
|
+
"typescript": "~5.9.3"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=20.0.0"
|
|
41
|
+
},
|
|
42
|
+
"exports": {
|
|
43
|
+
".": {
|
|
44
|
+
"types": "./packages/shared/dist/index.d.ts",
|
|
45
|
+
"import": "./packages/shared/dist/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./shared": {
|
|
48
|
+
"types": "./packages/shared/dist/index.d.ts",
|
|
49
|
+
"import": "./packages/shared/dist/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./convex": {
|
|
52
|
+
"types": "./packages/convex/dist/index.d.ts",
|
|
53
|
+
"import": "./packages/convex/dist/index.js"
|
|
54
|
+
},
|
|
55
|
+
"./react": {
|
|
56
|
+
"types": "./packages/react/dist/index.d.ts",
|
|
57
|
+
"import": "./packages/react/dist/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./react-css": {
|
|
60
|
+
"types": "./packages/react-css/dist/index.d.ts",
|
|
61
|
+
"import": "./packages/react-css/dist/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./solidjs": {
|
|
64
|
+
"types": "./packages/solidjs/dist/index.d.ts",
|
|
65
|
+
"import": "./packages/solidjs/dist/index.js"
|
|
66
|
+
},
|
|
67
|
+
"./solidjs-css": {
|
|
68
|
+
"types": "./packages/solidjs-css/dist/index.d.ts",
|
|
69
|
+
"import": "./packages/solidjs-css/dist/index.js"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"main": "./packages/shared/dist/index.js",
|
|
73
|
+
"types": "./packages/shared/dist/index.d.ts"
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ✦ @geenius-ai-workflow/convex\n\n> A premium module for the Geenius Boilerplate Ecosystem.\n\n---\n\n## Overview\nBuilt with Steve Jobs-level minimalism and Jony Ive-level craftsmanship, this package is designed to deliver unparalleled developer experience (DX) and rock-solid performance.\n\n## Installation\n\n```bash\npnpm add @geenius-ai-workflow/convex\n```\n\n## Usage\n\n```typescript\nimport { init } from '@geenius-ai-workflow/convex';\n\n// Initialize the module with absolute precision\ninit({\n mode: 'premium',\n});\n```\n\n## Architecture\n- **Zero-config**: It just works.\n- **Strictly Typed**: Fully written in TypeScript for flawless IntelliSense.\n- **Framework Agnostic**: seamlessly integrates into the Geenius ecosystem.\n\n---\n\n*Designed by Antigravity HQ*\n
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
import { mutation } from "./_generated/server.js";
|
|
3
|
+
|
|
4
|
+
export const createWorkflows = mutation({
|
|
5
|
+
args: {
|
|
6
|
+
name: v.string(),
|
|
7
|
+
description: v.optional(v.string()),
|
|
8
|
+
steps: v.any(),
|
|
9
|
+
status: v.union(v.literal("draft"), v.literal("active"), v.literal("archived")),
|
|
10
|
+
createdBy: v.optional(v.string()),
|
|
11
|
+
createdAt: v.number(),
|
|
12
|
+
updatedAt: v.number(),
|
|
13
|
+
},
|
|
14
|
+
returns: v.id("workflows"),
|
|
15
|
+
handler: async (ctx, args) => {
|
|
16
|
+
return await ctx.db.insert("workflows", { ...args });
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const createWorkflowRuns = mutation({
|
|
21
|
+
args: {
|
|
22
|
+
workflowId: v.string(),
|
|
23
|
+
status: v.union(v.literal("pending"), v.literal("running"), v.literal("completed"), v.literal("failed")),
|
|
24
|
+
currentStep: v.number(),
|
|
25
|
+
input: v.optional(v.any()),
|
|
26
|
+
output: v.optional(v.any()),
|
|
27
|
+
startedAt: v.number(),
|
|
28
|
+
completedAt: v.optional(v.number()),
|
|
29
|
+
error: v.optional(v.string()),
|
|
30
|
+
},
|
|
31
|
+
returns: v.id("workflow_runs"),
|
|
32
|
+
handler: async (ctx, args) => {
|
|
33
|
+
return await ctx.db.insert("workflow_runs", { ...args });
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
import { query } from "./_generated/server.js";
|
|
3
|
+
|
|
4
|
+
export const listWorkflows = query({
|
|
5
|
+
args: {},
|
|
6
|
+
returns: v.array(v.any()),
|
|
7
|
+
handler: async (ctx) => {
|
|
8
|
+
return await ctx.db.query("workflows").collect();
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const listWorkflowRuns = query({
|
|
13
|
+
args: {},
|
|
14
|
+
returns: v.array(v.any()),
|
|
15
|
+
handler: async (ctx) => {
|
|
16
|
+
return await ctx.db.query("workflow_runs").collect();
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineSchema, defineTable } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
|
|
4
|
+
export default defineSchema({
|
|
5
|
+
workflows: defineTable({
|
|
6
|
+
name: v.string(),
|
|
7
|
+
description: v.optional(v.string()),
|
|
8
|
+
steps: v.any(),
|
|
9
|
+
status: v.union(v.literal("draft"), v.literal("active"), v.literal("archived")),
|
|
10
|
+
createdBy: v.optional(v.string()),
|
|
11
|
+
createdAt: v.number(),
|
|
12
|
+
updatedAt: v.number(),
|
|
13
|
+
}),
|
|
14
|
+
workflow_runs: defineTable({
|
|
15
|
+
workflowId: v.string(),
|
|
16
|
+
status: v.union(v.literal("pending"), v.literal("running"), v.literal("completed"), v.literal("failed")),
|
|
17
|
+
currentStep: v.number(),
|
|
18
|
+
input: v.optional(v.any()),
|
|
19
|
+
output: v.optional(v.any()),
|
|
20
|
+
startedAt: v.number(),
|
|
21
|
+
completedAt: v.optional(v.number()),
|
|
22
|
+
error: v.optional(v.string()),
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"outDir": "./dist",
|
|
10
|
+
"rootDir": "./src",
|
|
11
|
+
"strict": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"isolatedModules": true
|
|
17
|
+
},
|
|
18
|
+
"include": [
|
|
19
|
+
"src"
|
|
20
|
+
],
|
|
21
|
+
"exclude": [
|
|
22
|
+
"node_modules",
|
|
23
|
+
"dist"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ✦ @geenius-ai-workflow/react\n\n> Geenius AI Workflow — React hooks & components\n\n---\n\n## Overview\nBuilt with Steve Jobs-level minimalism and Jony Ive-level craftsmanship, this package is designed to deliver unparalleled developer experience (DX) and rock-solid performance.\n\n## Installation\n\n```bash\npnpm add @geenius-ai-workflow/react\n```\n\n## Usage\n\n```typescript\nimport { init } from '@geenius-ai-workflow/react';\n\n// Initialize the module with absolute precision\ninit({\n mode: 'premium',\n});\n```\n\n## Architecture\n- **Zero-config**: It just works.\n- **Strictly Typed**: Fully written in TypeScript for flawless IntelliSense.\n- **Framework Agnostic**: seamlessly integrates into the Geenius ecosystem.\n\n---\n\n*Designed by Antigravity HQ*\n
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@geenius-ai-workflow/react",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Geenius AI Workflow \u2014 React hooks & components",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsup",
|
|
22
|
+
"clean": "rm -rf dist",
|
|
23
|
+
"type-check": "tsc --noEmit",
|
|
24
|
+
"prepublishOnly": "pnpm clean && pnpm build"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@geenius-ai-workflow/shared": "workspace:*"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/react": "^19.0.0",
|
|
31
|
+
"react": "^19.2.4",
|
|
32
|
+
"tsup": "^8.5.1",
|
|
33
|
+
"typescript": "~5.9.3"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": ">=18.0.0"
|
|
37
|
+
},
|
|
38
|
+
"author": "Antigravity HQ",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=20.0.0"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// @geenius-ai-workflow/react — components/ApprovalModal.tsx
|
|
2
|
+
import type { ApprovalRequest } from '../hooks/useApprovalGate'
|
|
3
|
+
|
|
4
|
+
export interface ApprovalModalProps {
|
|
5
|
+
request: ApprovalRequest | null
|
|
6
|
+
onApprove: (id: string) => void
|
|
7
|
+
onReject: (id: string) => void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function ApprovalModal({ request, onApprove, onReject }: ApprovalModalProps) {
|
|
11
|
+
if (!request) return null
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div data-workflow="approval-modal" role="dialog" aria-modal="true" aria-label="Approval required">
|
|
15
|
+
<div data-workflow="approval-overlay" />
|
|
16
|
+
<div data-workflow="approval-dialog">
|
|
17
|
+
<div data-workflow="approval-header">
|
|
18
|
+
<span data-workflow="approval-icon">👤</span>
|
|
19
|
+
<h3 data-workflow="approval-title">Approval Required</h3>
|
|
20
|
+
</div>
|
|
21
|
+
<div data-workflow="approval-body">
|
|
22
|
+
<p data-workflow="approval-message">{request.message}</p>
|
|
23
|
+
<div data-workflow="approval-meta">
|
|
24
|
+
<span data-workflow="approval-step">Step: {request.stepId}</span>
|
|
25
|
+
<span data-workflow="approval-time">Requested: {new Date(request.requestedAt).toLocaleTimeString()}</span>
|
|
26
|
+
</div>
|
|
27
|
+
{request.approvers && request.approvers.length > 0 && (
|
|
28
|
+
<div data-workflow="approval-approvers">
|
|
29
|
+
<span>Authorized approvers: </span>
|
|
30
|
+
{request.approvers.map((a, i) => (
|
|
31
|
+
<span key={i} data-workflow="approval-approver-badge">{a}</span>
|
|
32
|
+
))}
|
|
33
|
+
</div>
|
|
34
|
+
)}
|
|
35
|
+
</div>
|
|
36
|
+
<div data-workflow="approval-actions">
|
|
37
|
+
<button data-workflow="approval-reject" onClick={() => onReject(request.id)}>
|
|
38
|
+
✕ Reject
|
|
39
|
+
</button>
|
|
40
|
+
<button data-workflow="approval-approve" onClick={() => onApprove(request.id)}>
|
|
41
|
+
✓ Approve
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// @geenius-ai-workflow/react — components/StepConfigPanel.tsx
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import type { WorkflowStepDef, StepType } from '@geenius-ai-workflow/shared'
|
|
4
|
+
|
|
5
|
+
export interface StepConfigPanelProps {
|
|
6
|
+
step: WorkflowStepDef
|
|
7
|
+
onUpdate: (stepId: string, updates: Partial<WorkflowStepDef>) => void
|
|
8
|
+
onDelete: (stepId: string) => void
|
|
9
|
+
onClose: () => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function StepConfigPanel({ step, onUpdate, onDelete, onClose }: StepConfigPanelProps) {
|
|
13
|
+
const [name, setName] = useState(step.name)
|
|
14
|
+
|
|
15
|
+
const handleNameBlur = () => {
|
|
16
|
+
if (name.trim() && name !== step.name) {
|
|
17
|
+
onUpdate(step.id, { name: name.trim() })
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div data-workflow="config-panel" role="complementary" aria-label="Step configuration">
|
|
23
|
+
<div data-workflow="config-header">
|
|
24
|
+
<h3 data-workflow="config-title">Configure Step</h3>
|
|
25
|
+
<button data-workflow="config-close" onClick={onClose} aria-label="Close panel">✕</button>
|
|
26
|
+
</div>
|
|
27
|
+
<div data-workflow="config-body">
|
|
28
|
+
<label data-workflow="config-label">
|
|
29
|
+
Step Name
|
|
30
|
+
<input
|
|
31
|
+
data-workflow="config-input"
|
|
32
|
+
value={name}
|
|
33
|
+
onChange={(e) => setName(e.target.value)}
|
|
34
|
+
onBlur={handleNameBlur}
|
|
35
|
+
/>
|
|
36
|
+
</label>
|
|
37
|
+
<div data-workflow="config-field">
|
|
38
|
+
<span data-workflow="config-field-label">Type</span>
|
|
39
|
+
<span data-workflow="config-field-value">{step.type}</span>
|
|
40
|
+
</div>
|
|
41
|
+
<div data-workflow="config-field">
|
|
42
|
+
<span data-workflow="config-field-label">ID</span>
|
|
43
|
+
<code data-workflow="config-field-code">{step.id}</code>
|
|
44
|
+
</div>
|
|
45
|
+
{step.optional !== undefined && (
|
|
46
|
+
<label data-workflow="config-checkbox">
|
|
47
|
+
<input
|
|
48
|
+
type="checkbox"
|
|
49
|
+
checked={step.optional}
|
|
50
|
+
onChange={(e) => onUpdate(step.id, { optional: e.target.checked })}
|
|
51
|
+
/>
|
|
52
|
+
Optional (skip on failure)
|
|
53
|
+
</label>
|
|
54
|
+
)}
|
|
55
|
+
<div data-workflow="config-json">
|
|
56
|
+
<span data-workflow="config-field-label">Configuration</span>
|
|
57
|
+
<pre data-workflow="config-json-view">{JSON.stringify(step.config, null, 2)}</pre>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div data-workflow="config-footer">
|
|
61
|
+
<button data-workflow="config-delete" onClick={() => { onDelete(step.id); onClose() }}>
|
|
62
|
+
🗑 Delete Step
|
|
63
|
+
</button>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
)
|
|
67
|
+
}
|