mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-30 21:01:54 +08:00
Some checks are pending
all-good: Did all the other checks pass? / all-good (push) Waiting to run
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Waiting to run
Docker Server Build and Push / Docker Build and Push Server (push) Waiting to run
Docker Server Build and Run / docker (push) Waiting to run
Runs E2E API Tests (Local Emulator) / E2E Tests (Local Emulator, Node ${{ matrix.node-version }}) (22.x) (push) Waiting to run
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (mock, 22.x) (push) Waiting to run
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (prod, 22.x) (push) Waiting to run
Runs E2E API Tests with custom port prefix / build (22.x) (push) Waiting to run
Runs E2E Fallback Tests / E2E Fallback Tests (Node ${{ matrix.node-version }}) (22.x) (push) Waiting to run
Lint & build / lint_and_build (24) (push) Waiting to run
Publish npm packages / publish (push) Waiting to run
Publish Swift SDK to prerelease repo / publish (push) Waiting to run
TOC Generator / TOC Generator (push) Waiting to run
## Summary
Replace `parseHexclaveConfigFileContent` /
`evaluateStaticConfigExpression` (Babel AST walker) with
`evalConfigFileContent` using `jiti.evalModule()`. Move
`renderConfigFileContent` from `hexclave-config-file.ts` →
`config-rendering.ts`.
Added `jiti` dep to `@hexclave/shared` (already used in shared-backend,
dashboard, backend, cli).
Link to Devin session:
https://app.devin.ai/sessions/cb098b1fb62b4dfeaf3324bc2e1377f1
Requested by: @mantrakp04
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Migrates trusted config evaluation to `jiti` and moves GitHub config
edits to a server‑side repo agent running in a Vercel Sandbox with an
apply → review → commit flow. Adds run tracking, safer defaults, and a
dashboard diff review with clear, user‑facing errors.
- **New Features**
- Two‑phase flow and endpoints: POST `/internal/config/github/apply`,
`.../commit`, `.../cancel`, plus GET `.../run`; each run tracked by
`run_id` in `ConfigAgentRun` (status, stage, progress, diff, base
commit, sandbox id). Run ids validated as UUIDs.
- Repo agent runs in a fresh sandboxed clone; warm‑boot via base
snapshot (`apps/backend/scripts/config-agent/build-image.ts`,
`HEXCLAVE_CONFIG_AGENT_BASE_SNAPSHOT_ID`). Captures a unified diff and
base commit, stops the sandbox at review, then rebuilds files from the
stored diff on commit. Returns `commitSha`, uses a safe conflict error,
and strips OAuth tokens from git remotes.
- Dashboard: non‑dismissible progress and diff preview using
`@pierre/diffs` with a cross‑tab run watcher; blocks conflicting edits
and supports cancel/commit review flow. Adds an RDE “apply” path with
progress UI.
- AI proxy defaults to `/api/latest/integrations/ai-proxy` (production
passthrough via `PRODUCTION_AI_PROXY_BASE_URL`); adds
`anthropic/claude-haiku-4.5`.
- **Refactors and Fixes**
- Trusted eval via `@hexclave/shared` `config-eval` using `jiti`;
browser‑safe parsing for untrusted GitHub content; rendering remains in
`config-rendering`. Clear separation of Node‑only code into
`config-eval`.
- Shared agent/updater logic moved to `@hexclave/shared-backend`;
removed deterministic fast path so all writes go through the agent to
preserve authoring. CLI and emulator updated to use `config-eval`.
- Defaults/renames: config file `hexclave.config.ts` (CLI `config pull`
defaults to this path), workflow `hexclave-config-sync.yml`; env
prefixes standardized to `HEXCLAVE_*`.
- Integrity and UX: commit advancement gated to the current linked
repo/branch; cancel clears any captured diff; elapsed timer handles late
starts and the not‑started sentinel; loader vs invalid config export
errors separated for accurate messaging.
- Onboarding and seeds: wizard now uses environment‑based OAuth provider
setup with updated tests; corrected GitHub owner in dummy project
seeding.
<sup>Written for commit 6cf0e899a0.
Summary will update on new commits.</sup>
<a
href="https://cubic.dev/pr/hexclave/hexclave/pull/1661?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Improved configuration file parsing/validation by evaluating config
modules, supporting both string and object-based `config` exports and
ensuring the expected `config` export is present.
* Updated config rendering and import-package detection to consistently
generate the `config` export and handle legacy package entrypoints.
* Tightened handling of non-statically-resolvable forms during update
flows.
* **Tests**
* Updated and extended config parsing/validation tests to reflect the
new evaluation behavior and edge cases.
* **Chores**
* Added a Jiti-based dependency to support runtime evaluation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: mantra <mantra@stack-auth.com>
99 lines
2.3 KiB
JSON
99 lines
2.3 KiB
JSON
{
|
|
"name": "@hexclave/shared",
|
|
"version": "1.0.37",
|
|
"repository": "https://github.com/hexclave/hexclave",
|
|
"scripts": {
|
|
"build": "rimraf dist && tsdown",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"clean": "rimraf dist && rimraf node_modules",
|
|
"dev": "tsdown --watch",
|
|
"lint": "eslint --ext .tsx,.ts ."
|
|
},
|
|
"files": [
|
|
"README.md",
|
|
"dist",
|
|
"src",
|
|
"CHANGELOG.md",
|
|
"LICENSE"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"require": {
|
|
"default": "./dist/index.js"
|
|
},
|
|
"default": "./dist/esm/index.js"
|
|
},
|
|
"./config": {
|
|
"types": "./dist/config-authoring.d.ts",
|
|
"require": {
|
|
"default": "./dist/config-authoring.js"
|
|
},
|
|
"default": "./dist/esm/config-authoring.js"
|
|
},
|
|
"./dist/*": {
|
|
"types": "./dist/*.d.ts",
|
|
"require": {
|
|
"default": "./dist/*.js"
|
|
},
|
|
"default": "./dist/esm/*.js"
|
|
}
|
|
},
|
|
"peerDependencies": {
|
|
"@types/react": ">=19.0.0",
|
|
"@types/react-dom": ">=19.0.0",
|
|
"react": ">=19.0.0",
|
|
"react-dom": ">=19.0.0",
|
|
"yup": "^1.7.1"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"react": {
|
|
"optional": true
|
|
},
|
|
"@types/react": {
|
|
"optional": true
|
|
},
|
|
"@types/react-dom": {
|
|
"optional": true
|
|
},
|
|
"yup": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"@aws-sdk/client-kms": "^3.876.0",
|
|
"@aws-sdk/credential-provider-web-identity": "^3.972.27",
|
|
"@babel/core": "^7.28.5",
|
|
"@babel/generator": "^7.28.5",
|
|
"@babel/parser": "^7.28.5",
|
|
"@babel/traverse": "^7.28.5",
|
|
"@babel/types": "^7.28.5",
|
|
"@opentelemetry/api": "^1.9.0",
|
|
"@simplewebauthn/browser": "^13.2.2",
|
|
"@vercel/functions": "^2.0.0",
|
|
"async-mutex": "^0.5.0",
|
|
"bcryptjs": "^3.0.2",
|
|
"crc": "^4.3.2",
|
|
"elliptic": "^6.5.7",
|
|
"esbuild-wasm": "^0.20.2",
|
|
"ip-regex": "^5.0.0",
|
|
"jiti": "^2.4.2",
|
|
"jose": "^6.1.3",
|
|
"oauth4webapi": "^3.8.3",
|
|
"semver": "^7.6.3"
|
|
},
|
|
"devDependencies": {
|
|
"@sentry/nextjs": "^10.11.0",
|
|
"@types/babel__core": "^7.20.5",
|
|
"@types/babel__generator": "^7.27.0",
|
|
"@types/babel__traverse": "^7.28.0",
|
|
"@types/elliptic": "^6.4.18",
|
|
"@types/semver": "^7.5.8",
|
|
"react": "^19.0.1",
|
|
"react-dom": "^19.0.1",
|
|
"rimraf": "^6.1.2"
|
|
},
|
|
"packageManager": "pnpm@11.5.0"
|
|
}
|