Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
eb42a64
test: add failing account package skeleton
christian-byrne Sep 2, 2026
cebd125
feat: add publishable account package skeleton
christian-byrne Sep 2, 2026
8978011
test: add failing account core claims
christian-byrne Sep 2, 2026
5292850
feat: prove account core and Vue contracts
christian-byrne Sep 2, 2026
7465caf
build: emit account package artifacts
christian-byrne Sep 2, 2026
7c6d949
chore: register account workspace package
christian-byrne Sep 2, 2026
c6ee121
fix: emit resolvable account package imports
christian-byrne Sep 2, 2026
b7a6510
fix(account): declare package entry points for knip
christian-byrne Sep 2, 2026
b88c80a
fix: re-mint credentials before replaying balance requests
christian-byrne Sep 2, 2026
8930262
chore(account): add CODEOWNERS entry for packages/account
christian-byrne Sep 2, 2026
ed428aa
fix(account): address lifecycle review findings
christian-byrne Sep 3, 2026
500048c
feat(account): add billing proof of concept
christian-byrne Sep 3, 2026
fefcf45
fix(account): open checkout through host port in poc
christian-byrne Sep 3, 2026
3db1d49
feat(account): export shared PoC seam contract
christian-byrne Sep 3, 2026
057d219
poc(account-layer): fix round 4 — add readiness contract
christian-byrne Sep 3, 2026
6955664
poc(account-layer): 08 fix-round-12 nonce billing attempts
christian-byrne Sep 3, 2026
52e4a13
poc(account-layer): 08 fix-round-13 align billing contract
christian-byrne Sep 3, 2026
a8530a0
poc(account-layer): 08 fix-round-15 align billing contract
christian-byrne Sep 3, 2026
6988c86
poc(account-layer): 08 fix-round-16 preserve billing errors
christian-byrne Sep 3, 2026
3cab7c7
poc(account-layer): 08 fix-round-19 tier-aware subscribe
christian-byrne Sep 3, 2026
7db13bf
poc(account-layer): 08 fix-round-20 preserve hosted checkout
christian-byrne Sep 3, 2026
212c24d
poc(account-layer): 08 fix-round-22 resume stored billing operation
christian-byrne Sep 3, 2026
26ba906
poc(account-layer): 08 fix-round-32 handle invoice actions
christian-byrne Sep 4, 2026
bd6a151
poc(account-layer): package-owned Firebase identity via @comfyorg/acc…
christian-byrne Sep 5, 2026
d059104
poc(account-layer): consume billing capabilities
christian-byrne Sep 6, 2026
75e50f5
poc(account-layer): firebase persistence only for package-created auth
christian-byrne Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
# Model-to-node mappings (cloud team)
/src/platform/assets/mappings/ @deepme987 @Comfy-Org/comfy_frontend_devs

# Account layer (auth, billing, subscriptions, credits) - owned by the billing codeowners; individual handles to be confirmed by the billing team (decision D-044 in the account-layer PoC run)
/packages/account/ @Comfy-Org/comfy_frontend_devs

# Translations - native-language reviewers
# NOTE: GitHub only honors a code owner that has WRITE access to this repo.
# Owners without write access are silently ignored: they are never auto-requested
Expand Down
20 changes: 20 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export default defineConfig([
'components.d.ts',
'coverage/*',
'dist/*',
'packages/*/dist/**',
'packages/registry-types/src/comfyRegistryTypes.ts',
'playwright-report/*',
'scripts/registry-census/detection-proof/**',
Expand Down Expand Up @@ -543,6 +544,25 @@ export default defineConfig([
}
},

{
files: ['packages/account/**/*.{ts,vue}'],
rules: {
'import-x/no-restricted-paths': [
'error',
{
zones: [
{
target: './packages/account/**',
from: './src/**',
message:
'packages/account cannot import producer application code; inject host behavior through public account contracts'
}
]
}
]
}
},

// src/lib/ holds vendored leaf libraries (litegraph). They may import from
// src/lib/ and from the shared base utilities, but never from an app layer —
// a vendored library depending on the app that vendors it is a dependency
Expand Down
4 changes: 4 additions & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ const config: KnipConfig = {
'packages/ingest-types': {
project: ['src/**/*.{js,ts}']
},
'packages/account': {
entry: ['src/core/index.ts', 'src/vue/index.ts'],
project: ['src/**/*.{js,ts}']
},
'apps/website': {
entry: ['src/scripts/**/*.ts']
},
Expand Down
7 changes: 7 additions & 0 deletions packages/account/docs/billing-command-eligibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Billing command eligibility

| Current status | Command behavior |
| --------------- | -------------------------------------------------------------------------------------------------------------------- |
| `FREE` | Subscribe creates a subscription checkout. Cancel may return `NO_ACTIVE_SUBSCRIPTION`. |
| `PRO`, active | Subscribe is a no-op; the payment portal remains available. Resubscribe may return `NOT_SCHEDULED_FOR_CANCELLATION`. |
| `PRO`, canceled | Subscribe uses the resubscribe endpoint. |
49 changes: 49 additions & 0 deletions packages/account/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "@comfyorg/account",
"version": "0.0.0-poc",
"files": [
"dist"
],
"type": "module",
"exports": {
"./core": {
"types": "./dist/core/index.d.ts",
"import": "./dist/core/index.js"
},
"./firebase": {
"types": "./dist/firebase/index.d.ts",
"import": "./dist/firebase/index.js"
},
"./vue": {
"types": "./dist/vue/index.d.ts",
"import": "./dist/vue/index.js"
}
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsc -p tsconfig.build.json",
"guard": "bash scripts/verify-import-guard.sh",
"typecheck": "tsc --noEmit",
"test": "vitest run --root ../.. packages/account/src"
},
"devDependencies": {
"firebase": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:",
"vue": "catalog:"
},
"peerDependencies": {
"firebase": ">=11 <13",
"vue": ">=3.5 <4"
},
"peerDependenciesMeta": {
"firebase": {
"optional": true
},
"vue": {
"optional": true
}
}
}
21 changes: 21 additions & 0 deletions packages/account/scripts/verify-import-guard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail

repo_root=$(git rev-parse --show-toplevel)
seed="$repo_root/packages/account/import-guard-seed.ts"
trap 'rm -f "$seed"' EXIT

for forbidden in "@/stores/authStore" "../../src/stores/authStore"; do
printf "import '%s'\n" "$forbidden" > "$seed"
if "$repo_root/node_modules/.bin/eslint" "$seed" >/dev/null 2>&1; then
echo "guard accepted forbidden import: $forbidden" >&2
exit 1
fi
done

if rg -n "from ['\"](vue|pinia|nuxt|astro|firebase)|\b(window|document|localStorage|sessionStorage)\b" "$repo_root/packages/account/src/core" --glob '*.ts'; then
echo 'core contains a forbidden framework, SDK, or browser-global dependency' >&2
exit 1
fi

echo 'guard rejected alias and relative src imports'
Loading
Loading