@geenius/ai-workflow 0.1.0 → 0.4.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/CHANGELOG.md +7 -0
- package/README.md +69 -1
- package/package.json +60 -27
- package/packages/convex/dist/index.d.ts +363 -0
- package/packages/convex/dist/index.js +200 -0
- package/packages/convex/dist/index.js.map +1 -0
- package/packages/react/dist/index.d.ts +466 -0
- package/packages/react/dist/index.js +13914 -0
- package/packages/react/dist/index.js.map +1 -0
- package/packages/react-css/{src/styles.css → dist/index.css} +107 -253
- package/packages/react-css/dist/index.css.map +1 -0
- package/packages/react-css/dist/index.d.ts +495 -0
- package/packages/react-css/dist/index.js +13901 -0
- package/packages/react-css/dist/index.js.map +1 -0
- package/packages/shared/dist/index.d.ts +1368 -0
- package/packages/shared/dist/index.js +1681 -0
- package/packages/shared/dist/index.js.map +1 -0
- package/packages/solidjs/dist/index.d.ts +452 -0
- package/packages/solidjs/dist/index.js +13830 -0
- package/packages/solidjs/dist/index.js.map +1 -0
- package/packages/solidjs-css/{src/styles.css → dist/index.css} +107 -253
- package/packages/solidjs-css/dist/index.css.map +1 -0
- package/packages/solidjs-css/dist/index.d.ts +471 -0
- package/packages/solidjs-css/dist/index.js +13774 -0
- package/packages/solidjs-css/dist/index.js.map +1 -0
- package/.changeset/config.json +0 -11
- package/.github/CODEOWNERS +0 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -16
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -11
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -10
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/ci.yml +0 -23
- package/.github/workflows/release.yml +0 -29
- package/.nvmrc +0 -1
- package/.project/ACCOUNT.yaml +0 -4
- package/.project/IDEAS.yaml +0 -7
- package/.project/PROJECT.yaml +0 -11
- package/.project/ROADMAP.yaml +0 -15
- package/CODE_OF_CONDUCT.md +0 -16
- package/CONTRIBUTING.md +0 -26
- package/SECURITY.md +0 -15
- package/SUPPORT.md +0 -8
- package/packages/convex/README.md +0 -1
- package/packages/convex/package.json +0 -12
- package/packages/convex/src/convex.config.ts +0 -3
- package/packages/convex/src/index.ts +0 -3
- package/packages/convex/src/mutations.ts +0 -36
- package/packages/convex/src/queries.ts +0 -19
- package/packages/convex/src/schema.ts +0 -24
- package/packages/convex/tsconfig.json +0 -25
- package/packages/react/README.md +0 -1
- package/packages/react/package.json +0 -46
- package/packages/react/src/components/ApprovalModal.tsx +0 -47
- package/packages/react/src/components/StepConfigPanel.tsx +0 -67
- package/packages/react/src/components/StepConnector.tsx +0 -47
- package/packages/react/src/components/StepNode.tsx +0 -38
- package/packages/react/src/components/StepPalette.tsx +0 -48
- package/packages/react/src/components/WorkflowCanvas.tsx +0 -42
- package/packages/react/src/components/WorkflowRunPanel.tsx +0 -64
- package/packages/react/src/components/WorkflowToolbar.tsx +0 -43
- package/packages/react/src/components/index.ts +0 -9
- package/packages/react/src/hooks/index.ts +0 -10
- package/packages/react/src/hooks/useApprovalGate.ts +0 -59
- package/packages/react/src/hooks/useWorkflow.ts +0 -39
- package/packages/react/src/hooks/useWorkflowBuilder.ts +0 -121
- package/packages/react/src/hooks/useWorkflowRun.ts +0 -75
- package/packages/react/src/hooks/useWorkflowStep.ts +0 -52
- package/packages/react/src/hooks/useWorkflowTemplates.ts +0 -54
- package/packages/react/src/index.ts +0 -16
- package/packages/react/src/pages/WorkflowBuilderPage.tsx +0 -81
- package/packages/react/src/pages/WorkflowRunsPage.tsx +0 -59
- package/packages/react/src/pages/index.ts +0 -3
- package/packages/react/tsconfig.json +0 -1
- package/packages/react/tsup.config.ts +0 -7
- package/packages/react-css/README.md +0 -1
- package/packages/react-css/package.json +0 -44
- package/packages/react-css/src/components/ApprovalModal.tsx +0 -6
- package/packages/react-css/src/components/StepConfigPanel.tsx +0 -7
- package/packages/react-css/src/components/StepConnector.tsx +0 -6
- package/packages/react-css/src/components/StepNode.tsx +0 -7
- package/packages/react-css/src/components/StepPalette.tsx +0 -6
- package/packages/react-css/src/components/WorkflowCanvas.tsx +0 -6
- package/packages/react-css/src/components/WorkflowRunPanel.tsx +0 -9
- package/packages/react-css/src/components/WorkflowToolbar.tsx +0 -4
- package/packages/react-css/src/components/index.ts +0 -9
- package/packages/react-css/src/hooks/index.ts +0 -3
- package/packages/react-css/src/hooks/useWorkflow.ts +0 -39
- package/packages/react-css/src/hooks/useWorkflowBuilder.ts +0 -121
- package/packages/react-css/src/index.ts +0 -7
- package/packages/react-css/src/pages/WorkflowBuilderPage.tsx +0 -16
- package/packages/react-css/src/pages/WorkflowRunsPage.tsx +0 -6
- package/packages/react-css/src/pages/index.ts +0 -3
- package/packages/react-css/tsconfig.json +0 -26
- package/packages/react-css/tsup.config.ts +0 -2
- package/packages/shared/README.md +0 -1
- package/packages/shared/package.json +0 -56
- package/packages/shared/src/__tests__/ai-workflow.test.ts +0 -217
- package/packages/shared/src/config.ts +0 -49
- package/packages/shared/src/convex/index.ts +0 -2
- package/packages/shared/src/convex/schemas.ts +0 -42
- package/packages/shared/src/engine.test.ts +0 -1
- package/packages/shared/src/engine.ts +0 -295
- package/packages/shared/src/index.ts +0 -43
- package/packages/shared/src/steps.ts +0 -68
- package/packages/shared/src/templates.ts +0 -172
- package/packages/shared/src/types.ts +0 -237
- package/packages/shared/src/utils/cost.ts +0 -79
- package/packages/shared/src/utils/dag.ts +0 -133
- package/packages/shared/src/utils/index.ts +0 -5
- package/packages/shared/src/utils/interpolation.ts +0 -53
- package/packages/shared/src/validators.ts +0 -215
- package/packages/shared/tsconfig.json +0 -1
- package/packages/shared/tsup.config.ts +0 -5
- package/packages/shared/vitest.config.ts +0 -4
- package/packages/solidjs/README.md +0 -1
- package/packages/solidjs/package.json +0 -45
- package/packages/solidjs/src/components/ApprovalModal.tsx +0 -18
- package/packages/solidjs/src/components/StepConfigPanel.tsx +0 -14
- package/packages/solidjs/src/components/StepConnector.tsx +0 -11
- package/packages/solidjs/src/components/StepNode.tsx +0 -12
- package/packages/solidjs/src/components/StepPalette.tsx +0 -22
- package/packages/solidjs/src/components/WorkflowCanvas.tsx +0 -23
- package/packages/solidjs/src/components/WorkflowRunPanel.tsx +0 -18
- package/packages/solidjs/src/components/WorkflowToolbar.tsx +0 -13
- package/packages/solidjs/src/components/index.ts +0 -9
- package/packages/solidjs/src/index.ts +0 -7
- package/packages/solidjs/src/pages/WorkflowBuilderPage.tsx +0 -37
- package/packages/solidjs/src/pages/WorkflowRunsPage.tsx +0 -20
- package/packages/solidjs/src/pages/index.ts +0 -3
- package/packages/solidjs/src/primitives/createApprovalGate.ts +0 -29
- package/packages/solidjs/src/primitives/createWorkflow.ts +0 -28
- package/packages/solidjs/src/primitives/createWorkflowBuilder.ts +0 -56
- package/packages/solidjs/src/primitives/createWorkflowRun.ts +0 -32
- package/packages/solidjs/src/primitives/createWorkflowStep.ts +0 -23
- package/packages/solidjs/src/primitives/createWorkflowTemplates.ts +0 -28
- package/packages/solidjs/src/primitives/index.ts +0 -8
- package/packages/solidjs/tsconfig.json +0 -1
- package/packages/solidjs/tsup.config.ts +0 -7
- package/packages/solidjs-css/README.md +0 -1
- package/packages/solidjs-css/package.json +0 -43
- package/packages/solidjs-css/src/components/ApprovalModal.tsx +0 -6
- package/packages/solidjs-css/src/components/StepConfigPanel.tsx +0 -7
- package/packages/solidjs-css/src/components/StepConnector.tsx +0 -6
- package/packages/solidjs-css/src/components/StepNode.tsx +0 -7
- package/packages/solidjs-css/src/components/StepPalette.tsx +0 -7
- package/packages/solidjs-css/src/components/WorkflowCanvas.tsx +0 -7
- package/packages/solidjs-css/src/components/WorkflowRunPanel.tsx +0 -8
- package/packages/solidjs-css/src/components/WorkflowToolbar.tsx +0 -5
- package/packages/solidjs-css/src/components/index.ts +0 -9
- package/packages/solidjs-css/src/index.ts +0 -7
- package/packages/solidjs-css/src/pages/WorkflowBuilderPage.tsx +0 -2
- package/packages/solidjs-css/src/pages/WorkflowRunsPage.tsx +0 -7
- package/packages/solidjs-css/src/pages/index.ts +0 -3
- package/packages/solidjs-css/src/primitives/createWorkflow.ts +0 -28
- package/packages/solidjs-css/src/primitives/createWorkflowBuilder.ts +0 -56
- package/packages/solidjs-css/src/primitives/index.ts +0 -1
- package/packages/solidjs-css/tsconfig.json +0 -27
- package/packages/solidjs-css/tsup.config.ts +0 -2
- package/pnpm-workspace.yaml +0 -2
package/.changeset/config.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
package/.github/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @mxn2020
|
package/.github/dependabot.yml
DELETED
package/.github/workflows/ci.yml
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
|
@@ -1,29 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22
|
package/.project/ACCOUNT.yaml
DELETED
package/.project/IDEAS.yaml
DELETED
package/.project/PROJECT.yaml
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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"
|
package/.project/ROADMAP.yaml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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/SECURITY.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|
package/packages/react/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// @geenius-ai-workflow/react — components/StepConnector.tsx
|
|
2
|
-
|
|
3
|
-
export interface StepConnectorProps {
|
|
4
|
-
from: { x: number; y: number }
|
|
5
|
-
to: { x: number; y: number }
|
|
6
|
-
label?: string
|
|
7
|
-
isActive?: boolean
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const NODE_WIDTH = 200
|
|
11
|
-
const NODE_HEIGHT = 80
|
|
12
|
-
|
|
13
|
-
export function StepConnector({ from, to, label, isActive }: StepConnectorProps) {
|
|
14
|
-
const x1 = from.x + NODE_WIDTH
|
|
15
|
-
const y1 = from.y + NODE_HEIGHT / 2
|
|
16
|
-
const x2 = to.x
|
|
17
|
-
const y2 = to.y + NODE_HEIGHT / 2
|
|
18
|
-
const midX = (x1 + x2) / 2
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<g data-workflow="connector" data-active={isActive || undefined}>
|
|
22
|
-
<path
|
|
23
|
-
d={`M ${x1} ${y1} C ${midX} ${y1}, ${midX} ${y2}, ${x2} ${y2}`}
|
|
24
|
-
fill="none"
|
|
25
|
-
stroke={isActive ? 'oklch(0.7 0.2 145)' : 'oklch(0.5 0.02 260)'}
|
|
26
|
-
strokeWidth={isActive ? 3 : 2}
|
|
27
|
-
markerEnd="url(#arrowhead)"
|
|
28
|
-
/>
|
|
29
|
-
{label && (
|
|
30
|
-
<text
|
|
31
|
-
x={midX}
|
|
32
|
-
y={(y1 + y2) / 2 - 8}
|
|
33
|
-
textAnchor="middle"
|
|
34
|
-
fill="oklch(0.7 0.02 260)"
|
|
35
|
-
fontSize="12"
|
|
36
|
-
>
|
|
37
|
-
{label}
|
|
38
|
-
</text>
|
|
39
|
-
)}
|
|
40
|
-
<defs>
|
|
41
|
-
<marker id="arrowhead" markerWidth="10" markerHeight="7" refX="10" refY="3.5" orient="auto">
|
|
42
|
-
<polygon points="0 0, 10 3.5, 0 7" fill="oklch(0.5 0.02 260)" />
|
|
43
|
-
</marker>
|
|
44
|
-
</defs>
|
|
45
|
-
</g>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// @geenius-ai-workflow/react — components/StepNode.tsx
|
|
2
|
-
import type { WorkflowStepDef, StepType } from '@geenius-ai-workflow/shared'
|
|
3
|
-
|
|
4
|
-
const STEP_ICONS: Record<StepType, string> = {
|
|
5
|
-
'llm-call': '🤖', transform: '⚙️', condition: '🔀', 'human-approval': '👤',
|
|
6
|
-
webhook: '🌐', delay: '⏱️', parallel: '⚡', loop: '🔄', 'sub-workflow': '📋', custom: '🔧',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface StepNodeProps {
|
|
10
|
-
step: WorkflowStepDef
|
|
11
|
-
isSelected?: boolean
|
|
12
|
-
status?: string
|
|
13
|
-
onClick?: () => void
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function StepNode({ step, isSelected, status, onClick }: StepNodeProps) {
|
|
17
|
-
return (
|
|
18
|
-
<div
|
|
19
|
-
data-workflow="step-node"
|
|
20
|
-
data-step-type={step.type}
|
|
21
|
-
data-selected={isSelected || undefined}
|
|
22
|
-
data-status={status}
|
|
23
|
-
role="button"
|
|
24
|
-
tabIndex={0}
|
|
25
|
-
onClick={onClick}
|
|
26
|
-
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onClick?.() }}
|
|
27
|
-
style={step.position ? { position: 'absolute', left: step.position.x, top: step.position.y } : undefined}
|
|
28
|
-
>
|
|
29
|
-
<div data-workflow="step-header">
|
|
30
|
-
<span data-workflow="step-icon">{STEP_ICONS[step.type]}</span>
|
|
31
|
-
<span data-workflow="step-name">{step.name}</span>
|
|
32
|
-
</div>
|
|
33
|
-
<div data-workflow="step-type-badge">{step.type}</div>
|
|
34
|
-
{step.optional && <span data-workflow="step-optional-badge">Optional</span>}
|
|
35
|
-
{step.retries && <span data-workflow="step-retry-badge">↻ {step.retries.maxAttempts}</span>}
|
|
36
|
-
</div>
|
|
37
|
-
)
|
|
38
|
-
}
|