skillhub/docs
青柠 246afa42f4 feat(namespace): auto-provision a personal namespace on registration
Self-hosted deployments want every new account to have somewhere of its
own to publish, without asking an administrator for a namespace first and
without pushing drafts into `global`.

Add an operator-controlled policy, off by default so upgrading changes no
behaviour. When enabled, an account that becomes usable gets a namespace
it owns. "Private" here means a team namespace whose only member is that
account: namespaces have no visibility flag, and skill visibility stays a
property of each skill.

Trigger points. UserActivatedEvent is published wherever an account first
becomes usable:

- LocalAuthService.register
- IdentityBindingService.bindOrCreate, for ACTIVE first logins
- AdminUserAppService.updateUserStatus, on a transition into ACTIVE

The third matters for deployments that gate access behind approval: those
accounts are created PENDING at the first OAuth attempt and only become
usable when an administrator approves them.

Why an AFTER_COMMIT listener rather than a call alongside
GlobalNamespaceMembershipService.ensureMember. Both namespace.created_by
and namespace_member.user_id reference user_account(id), which rules out
each obvious alternative:

- Joining the registration transaction lets a slug clash roll the
  registration back, so a namespace failure costs the user their account
  — or, on OAuth, their login.
- Suspending it with REQUIRES_NEW leaves the new transaction unable to see
  the uncommitted user_account row, so the foreign key check blocks on the
  outer transaction's row lock and the two wait on each other.

Provisioning after commit avoids both. The listener is deliberately not
@Async, so the namespace exists by the time the user's next request
arrives, and it swallows failures.

Naming. Two templates over ${username}, ${email_prefix} and ${user_id};
unknown placeholders are left in place so a typo is visible rather than
silently dropped. ${username} falls back to the email local part and then
to the user id. Slugs go through the existing slug rules, which is why the
console renders a live preview: underscores are not legal in a slug, so
`${username}_space` yields `alice-space`. A taken or reserved candidate
gets a numeric suffix, so `admin` becomes `admin-2`. Owning any non-global
namespace already skips provisioning, which keeps re-enabling an account
from handing out a second one.

The templates are not exposed in application.yml: they contain ${...},
which Spring would resolve as property references, and Boot 3.2 predates
placeholder escaping. Only the enable flag lives there; templates are set
in the console and default from PersonalNamespaceProvisioningProperties.

Updating the policy writes an audit entry with the before and after.
2026-08-28 15:10:07 +08:00
..
api test(auth): cover CLI session fallback (#605) 2026-07-28 15:22:11 +08:00
prds feat: File Browser Sidebar with Preview, Security Audit UI, and Syntax Highlighting (#145) 2026-03-23 14:38:47 +08:00
research feat(observability): add generic request correlation and tracing foundation (#664) 2026-08-04 10:26:42 +08:00
skillhub chore(deps): resolve dependabot npm alerts 2026-08-24 16:08:07 +08:00
superpowers chore(cli): integrate contributor merge update (#606) 2026-07-29 10:37:03 +08:00
00-product-direction.md docs(protocol): adopt .agents/skills (plural) as canonical universal fallback 2026-05-19 10:49:31 +08:00
01-system-architecture.md feat: add initial RISC-V image support (#725) 2026-08-24 16:37:34 +08:00
02-domain-model.md refactor(app): slim portal controllers and sync backend findings 2026-03-20 10:09:03 +08:00
03-authentication-design.md Merge pull request #609 from iflytek/fix/auth-revoked-token-validation 2026-07-29 03:37:47 +08:00
04-search-architecture.md feat: add search index rebuild workflow 2026-03-19 15:20:08 +08:00
05-business-flows.md fix(review): allow super admin self promotion review 2026-06-16 11:29:39 +08:00
06-api-design.md feat(namespace): auto-provision a personal namespace on registration 2026-08-28 15:10:07 +08:00
07-skill-protocol.md docs(compliance): document runtime integration contract (#704) 2026-08-11 13:43:42 +08:00
08-frontend-architecture.md refactor: skill lifecycle projection and docs (#78) 2026-03-18 13:39:22 +08:00
09-deployment.md feat(ratelimit): make thresholds runtime-configurable 2026-08-27 15:07:31 +08:00
10-delivery-roadmap.md refactor: skill lifecycle projection and docs (#78) 2026-03-18 13:39:22 +08:00
11-auth-extensibility-and-private-sso.md feat(auth): improve extensible login method metadata 2026-03-14 18:52:35 +08:00
12-private-sso-integration-playbook.md feat(auth): improve extensible login method metadata 2026-03-14 18:52:35 +08:00
13-parallel-workflow.md refactor(dev): replace agent-* commands with parallel-* workflow 2026-03-14 20:49:17 +08:00
14-skill-lifecycle.md refactor: skill lifecycle projection and docs (#78) 2026-03-18 13:39:22 +08:00
15-backend-time-governance-plan.md fix(audit): resolve 8-hour timezone offset in audit log timestamps (#472) 2026-06-05 15:28:12 +08:00
16-backend-time-inventory.md fix(audit): resolve 8-hour timezone offset in audit log timestamps (#472) 2026-06-05 15:28:12 +08:00
17-backend-annotation-findings.md refactor(app): clarify query boundaries and workflow owners 2026-03-20 11:33:32 +08:00
18-frontend-annotation-findings.md docs: enrich frontend code documentation 2026-03-19 13:37:21 +08:00
19-smtp-password-reset-email-setup.md feat(auth): 邮箱验证码重置密码与 SMTP 配置支持 (#273) 2026-04-13 20:27:00 +08:00
20-cloud-url-builtin-skills-setup.md feat(builtin-skills): add reviewed starter collection 2026-07-31 14:22:23 +08:00
21-official-starter-skills-plan.md feat(bootstrap): publish starter skills in runtime manifest 2026-07-31 18:27:25 +08:00
22-builtin-skills-candidate-pool.md feat(bootstrap): publish starter skills in runtime manifest 2026-07-31 18:27:25 +08:00
23-builtin-skills-first-round-test-report.md feat(builtin-skills): add reviewed starter collection 2026-07-31 14:22:23 +08:00
24-compliance-metadata-design.md feat(search): refine compliance discovery interactions 2026-08-10 10:42:19 +08:00
2026-03-20-skill-label-system-design.md docs(labels): document detail chip navigation and filter wrap 2026-07-29 22:57:51 +03:00
2026-04-08-issue-automation-design.md [codex] add issue triage automation mvp (#268) 2026-04-09 15:04:33 +08:00
2026-07-31-observability-construction-plan.md feat(observability): add generic request correlation and tracing foundation (#664) 2026-08-04 10:26:42 +08:00
2026-08-13-personal-namespace-provisioning.md feat(namespace): auto-provision a personal namespace on registration 2026-08-28 15:10:07 +08:00
CONTENT_SAFETY.md docs(governance): add DPGA policy evidence 2026-08-27 15:07:42 +08:00
dev-workflow.md test(smoke): decouple admin checks from bootstrap credentials (#686) 2026-08-04 19:20:34 +08:00
e2e.md test(e2e,ci): migrate web e2e to real API and add PR e2e workflow (#198) 2026-04-01 14:41:23 +08:00
hermes-integration-en.md docs(integrations): add Hermes Agent skill guide (#584) 2026-07-22 15:01:50 +08:00
hermes-integration.md docs(integrations): add Hermes Agent skill guide (#584) 2026-07-22 15:01:50 +08:00
observability-decision-map.md feat(observability): add generic request correlation and tracing foundation (#664) 2026-08-04 10:26:42 +08:00
observability-developer-guide.md feat(observability): add generic request correlation and tracing foundation (#664) 2026-08-04 10:26:42 +08:00
openclaw-integration-en.md Revert "feat(bootstrap): initialize built-in skills (#481)" (#487) 2026-06-05 11:25:02 +08:00
openclaw-integration.md Revert "feat(bootstrap): initialize built-in skills (#481)" (#487) 2026-06-05 11:25:02 +08:00
oss-01-core-contract-freeze.md feat(skill): add UPLOADED status for PRIVATE skill lifecycle (#290) 2026-04-13 11:39:45 +08:00
oss-02-core-semantic-rules.md fix(i18n): update version delete error message to include UPLOADED and SCAN_FAILED 2026-04-14 15:49:25 +08:00
pr-batch-test-runtime.md feat(ci): add PR batch test deployment workflow (#275) 2026-04-09 18:45:14 +08:00
PRIVACY_AND_DATA_GOVERNANCE.md docs(governance): add DPGA policy evidence 2026-08-27 15:07:42 +08:00
RISCV64.md feat: add initial RISC-V image support (#725) 2026-08-24 16:37:34 +08:00
security-scanning.md fix(scanner): backport local LLM base URL handling for #563 2026-06-29 14:34:55 +08:00