master
${ noResults }
7 Commits (48404bb0378f8bcb3715d52d1433d80b1a7e65f0)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
7f2577c8da |
Rename permissions→perm, formats→format; consolidate sium error infra
Two more module renames flipping the direction of the previous pass: - arts/permissions, libs/permissions, svrs/permissions, libs/svrs/permissions.ts → arts/perm, libs/perm, svrs/perm, libs/svrs/perm.ts. Alias: $permissions → $perm. Constants: PERMISSION_* → PERM_*. Wire: 'permissions::*' → 'perm::*'. Module value: 'perm'. Class names: Permission*Error → Perm*Error. Helper functions: permissionDecisionKey → permDecisionKey (and similar). - arts/formats → arts/format (with the four sub-modules currency, numbers, units, dates carried along). Alias: $formats → $format. Constants: FORMATS_* → FORMAT_*. Wire: 'formats::*' → 'format::*'. Class names: Formats*Error → Format*Error. Both follow the auth/http/dom precedent: short word as the canonical name. The earlier full-word forms (permissions, formats) created asymmetric prefixes (PERMISSION_* singular, PERMISSIONS_REFRESH plural) that were already showing as drift in this commit's call sites. Plus a fix to sium error structure that was carried over from the previous audit round but never fully consolidated: - arts/sium/errors.ts now owns the full error infra: SIUM_ERR seed, all SIUM_ERR_* codes, SIUM_ERROR_MESSAGES catalog, error classes (SiumValidationError, SiumAsyncSchemaError, SiumDiscriminatedUnionError), guards and the SIUM_ERROR_MESSAGES type. The legacy SIUM_ERRORS string catalog stays for the few non-thrown sites until those are migrated. - arts/sium/consts.ts no longer carries error codes — only module identifier and diagnostic events. - arts/sium/core/types.ts no longer carries error classes — only schema types. - All call sites in arts/sium/core/* and arts/sium/types/* now import the error classes from `../errors` instead of `../core/types` / `../consts`. This is the canonical pattern documented in conventions.md rule 6: all of a module's error infrastructure lives in a single errors.ts file; consts.ts is for module configuration that has nothing to do with errors. Sium is now compliant; the rest of the modules will follow in subsequent commits. All 1334 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
5 months ago |
|
|
4db6bd2b3b |
Rename modules from 4-letter aliases to full English words
Drops the 4-letter alias convention in favour of a single homogeneous
naming axis: full English words across filesystem, alias, wire format
and constants.
Module renames:
- arts/aapp → arts/active-app (libs/aapp also)
- arts/buss → arts/bus (libs/buss also)
- arts/cach → arts/cache (libs/cach + svrs/cach also)
- arts/conn → arts/connection
- arts/fend → arts/frontend
- arts/fmts → arts/formats (curr→currency, nums→numbers, unts→units)
- arts/logr → arts/logger (libs/logr also)
- arts/perm → arts/permissions (libs/perm + svrs/perm also)
- arts/sess → arts/session
- arts/stor → arts/storage
- arts/timr → arts/timer (libs/timers → libs/timer)
Modules left as-is: auth, dom, errs, http, lang, sium (already match
their canonical name or are proper names).
Special case: `aapp` could not become `app` because `$app` is reserved
by SvelteKit (`$app/stores`, `$app/navigation`, ...). Compromise:
- Filesystem and alias use `active-app` / `$active-app`.
- Constants and class names use `App` / `APP_*` (no `active-` prefix).
The `active-` prefix only disambiguates the alias from SvelteKit's
namespace; the module is App.
Special case: `permissions` keeps the plural for filesystem/alias/wire
but constants and classes use the singular `PERMISSION_*` /
`Permission*` because they describe the concept ("a permission
effect"), not the module collection.
Constants follow the new module name in caps: `STORAGE_*`, `BUS_*`,
`CACHE_*`, `CONNECTION_*`, `FORMATS_*`, `LOGGER_*`, `SESSION_*`,
`TIMER_*`, etc. Module values: `STORAGE_MODULE = 'storage'`,
`BUS_MODULE = 'bus'`, `APP_MODULE = 'app'`,
`PERMISSION_MODULE = 'permissions'`, etc.
Wire/code format moved accordingly: `'storage::*'`, `'bus::*'`,
`'session::*'`, `'permissions::*'`, etc. Diagnostic event values
updated: `'storage.error'`, `'bus.event.published'`,
`'connection.auth_failed'`, etc. App events use `'app.*'`:
`AAPP_EVENT_* → APP_EVENT_*` with values `'app.user.identity.changed'`.
Class renames (where they used the abbreviation):
- AappAlreadyCreatedError → AppAlreadyCreatedError
- BussError* → BusError* (where applicable)
- Cach* → Cache*
- Conn* → Connection* (e.g. ConnDisposedError → ConnectionDisposedError;
ConnConnection* collapsed to Connection*)
- Logr*Error → Logger*Error
- Sess* → Session* (SessInvalidSessionError → SessionInvalidError)
- Stor* → Storage*
- Timr* → Timer* (TimrInactiveTimerError → TimerInactiveError)
- AuthCachPort → AuthCachePort
- AuthClientCach* → AuthClientCache*
- AuthPermPort → AuthPermissionsPort
Property renames in option types:
- `cach?:` → `cache?:` in AuthClient options
- `logr:` → `logger:` in svrs/auth ports
- `timr:` → `timer:` in svrs/auth ports
`docs/conventions.md` rewritten:
- Rule 1 dropped the 4-letter alias mandate; lists the full English
module names and special-cases active-app, lang, sium, permissions.
- Rule 2 documents the new constant prefix convention and its two
exceptions (APP_* for active-app, PERMISSION_* singular for
permissions).
- Rule 6 codifies that all error infrastructure (codes, messages,
classes, guards) lives in a single `errors.ts` per module —
removing the `consts.ts` / `errors.ts` split for error-related
symbols.
`libs/errs` adds `ErrorMessages` type so every module can declare its
catalog as `<MOD>_ERROR_MESSAGES: ErrorMessages` instead of repeating
the `Readonly<Record<ErrCode, string | (...args) => string>>` shape.
Storage migrated as the first proof of the canonical pattern.
All 1334 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
5 months ago |
|
|
838d000f63 |
Rename APP_* constants to AAPP_* and align event values to aapp.*
Phase 2B.2 of the convention pass. Closes the inconsistency where arts/aapp used APP_* prefix while libs/aapp already used AAPP_*. After this commit every constant under arts/aapp and libs/aapp uses the canonical 4-letter alias `AAPP_` (rule 1 of docs/conventions.md). Constants renamed (~24 total): - APP_EVENT_* → AAPP_EVENT_* (the 6 public events) - APP_USER_IDENTITY_CAUSE_* → AAPP_USER_IDENTITY_CAUSE_* - APP_ORCHESTRATION_* → AAPP_ORCHESTRATION_* - APP_ERROR_* → AAPP_ERROR_* - APP_LOG_MSG_* → AAPP_LOG_MSG_* - APP_CONNECTION_CLOSE_REASON_* → AAPP_CONNECTION_CLOSE_REASON_* - APP_EVENT_RUNTIMES → AAPP_EVENT_RUNTIMES Wire-format change for the public app event values: - 'app.user.identity.changed' → 'aapp.user.identity.changed' - 'app.tenant.switched' → 'aapp.tenant.switched' - 'app.permissions.refresh.requested'→ 'aapp.permissions.refresh.requested' - 'app.connectivity.changed' → 'aapp.connectivity.changed' - 'app.cache.invalidate.requested' → 'aapp.cache.invalidate.requested' - 'app.dispose.starting' → 'aapp.dispose.starting' Per docs/conventions.md rule 5, every event-identifier string value must start with the module's 4-letter alias. Now that AAPP_MODULE = 'aapp' (set in phase 2B.1) is the canonical module identifier, the event scope follows. External observers of these events must update string filters from `app.*` to `aapp.*`. The framework has not been tagged 0.1 yet so the wire format is still in flight. Translation keys (`'app.title'`, `'app.cart'`, `'app.boot'`, etc. used by `App.Lang.t(...)` in the demo / ecosystem test pages) are NOT events and were intentionally left untouched — they're paths in the lang schema, independent of the AAPP module identity. Verification: svelte-check 1395 / 0 errors. Server 1230 tests, client 19 tests — all green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
5 months ago |
|
|
14fa92d38c |
Rename constant module prefixes to 4-letter aliases
Phase 2 of the convention pass documented in docs/conventions.md. Aligns every module-level constant's prefix with the bundler alias that already identifies the artifact (rule 1 of the convention): - BUS_* → BUSS_* (libs/buss + arts/buss) - CONNECTION_* → CONN_* (arts/conn + web consumers) - SESSION_* → SESS_* (arts/sess + libs/aapp + consumers) - PERMISSION_* → PERM_* (arts/perm, libs/perm, svrs/perm) - TIMER_* → TIMR_* (arts/timr + libs/timers) - CACHE_* → CACH_* (arts/cach + libs/cach + svrs/cach) - STORAGE_* → STOR_* (arts/stor + consumers) Mechanical sed pass with `\b<OLD>_` word-boundary anchor — this only matches at identifier start, never inside (e.g. AAPP_BUS_CONTEXT_KEY stays untouched because the boundary requirement is between non-word and word characters). Out of scope and deferred to phase 2B (per-module decisions, not bulk-applicable): - LOGGER_CATEGORY constants in each module's consts.ts must become the module's own LOG_CATEGORY (BUSS_LOG_CATEGORY = 'buss', CONN_LOG_CATEGORY = 'conn', etc.) — different rename per module, not a single sed pattern. - APP_* → AAPP_* (arts/aapp uses APP_ today; libs/aapp already uses AAPP_). - Ad-hoc constants without module prefix (DEFAULT_TIMER_*, EVENT_*, BROWSER_*, IDENTITY_*, ACTOR_*, REVOKE_SCOPE_*, etc. in arts/sess/consts.ts; AUTO_REAUTH_* in arts/conn). Note on web/ files: - src/web/routes/active/get-started/ai-agents/+page.svelte - src/web/routes/temp/c2/+page.svelte - src/web/routes/temp/c2/Curtain.svelte These three files contain pre-existing user modifications (work in progress unrelated to this rename) that the bulk sed touched on top because they referenced renamed identifiers. Excluding them would break compilation. Their content here is the intersection of both changes; the user's prior edits to these files are intentionally bundled in this commit. Verification: svelte-check 1395 files / 0 errors. Server 1230 tests, client 19 tests — all green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
5 months ago |
|
|
36868d3efe |
Add bus orchestration and ecosystem hardening
|
5 months ago |
|
|
e6e9c38f7c |
Prepare active 0.1 release gates
|
5 months ago |
|
|
eacf9e8e91 |
Add active ecosystem documentation
|
5 months ago |