@warlock.js/core 5.34.1 → 5.34.2

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 CHANGED
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  > ⚠ **Versioning: `@warlock.js/*` does not follow SemVer strictly — breaking changes may ship in a minor.** This is a deliberate decision, not an oversight: the framework is pre-adoption and the cost of a major per behaviour fix currently outweighs the benefit. **Pin an exact version or a tilde range (`~4.13.0`) if you need to opt into changes rather than receive them.** Every breaking change is marked **BREAKING** in its entry and summarised in an _Upgrading_ section at the top of the release. **This policy will change once the framework has consumers beyond its author.**
8
8
 
9
+ ## 5.34.2 - 2026-10-19
10
+
11
+ ### Fixed
12
+
13
+ - Export framework issue-reporting guidance as a proper skill topic; complete index coverage for browser testing and upgrade guidance, and include package orientation in LLM projections.
14
+
9
15
  ## 5.34.1 - 2026-10-19
10
16
 
11
17
  ### Added
package/llms-full.txt CHANGED
@@ -4,6 +4,47 @@
4
4
 
5
5
  > Generated artifact. Concatenates every SKILL.md and reference file under `@warlock.js/core/skills/`. Re-run `node scripts/generate-llms.mjs` after any change.
6
6
 
7
+ ## Package orientation
8
+
9
+ ---
10
+ description: "The Warlock server framework: HTTP routes, controllers, responses, resources, repositories, CLI, mail, storage, security helpers. Exports `router`, `Request`, `Response`, `RequestHandler`, `useCase`, `RepositoryManager`, `defineResource`, `defineConfig`, `storage`, `sendMail`, `hashPassword`, `command`. Use for: add a route, write a controller, return a JSON response, hide a field from the response, upload a file, send an email, hash a password, add a CLI command, generate an OpenAPI document, type an API response, wire a socket, run or configure the app. Not this package: database models/queries → @warlock.js/cascade; input schemas → @warlock.js/seal; SSR pages → @warlock.js/web."
11
+ ---
12
+
13
+ # @warlock.js/core
14
+
15
+ Core is the application runtime: it boots the app, auto-loads each module's special files, serves HTTP, and provides the helpers every feature layer uses. Features live in `src/app/<module>/` and flow one way: `routes.ts → controllers → services → repositories → models`; resources map output at the edge. Start with `warlock-conventions.md`, which every other topic assumes.
16
+
17
+ ## The 80% path
18
+
19
+ 1. Scaffold a module (`create-module.md`), then declare routes in its `routes.ts` (`register-route.md`, `warlock-routes.md`).
20
+ 2. Write a thin controller (`create-controller.md`); validate input with a schema attached to the handler (`validate-input.md`).
21
+ 3. Put logic in a service or use case (`write-use-case.md`), and data access in a repository (`use-repository.md`).
22
+ 4. Return via `response.*` (`send-response.md`) and shape output with a resource (`define-resource.md`); declare `responseSchema` for typed clients and docs (`create-controller.md`, `generate-openapi.md`).
23
+ 5. Configure and run (`configure-app.md`, `run-app.md`); check setup with `warlock-doctor.md`, read the app with `warlock-inspect.md` (or serve it to an agent with `warlock-mcp.md`), verify a change with `warlock-check.md`, and a request's runtime behaviour with `warlock-trace.md`.
24
+
25
+ When the framework is wrong or missing a capability, follow the `report-framework-issue` topic to prepare a public report and ask the user before filing.
26
+
27
+ ## Topics by area
28
+
29
+ - **Foundations:** warlock-conventions, create-module, make-endpoint, configure-app, use-app-context, resolve-path, build-url, update-packages, lower-stage3-decorators, upgrade-from-5-29
30
+ - **HTTP & routing:** register-route, warlock-routes, create-controller, use-middleware, write-middleware, validate-input, use-request-locals, build-restful, wire-socket
31
+ - **Responses & resources:** send-response, define-resource, use-model-transformers, use-localization
32
+ - **Domain layers:** write-use-case, use-repository, write-seeder
33
+ - **CLI & running the app:** run-app, write-cli-command, add-connector, health-checks, warlock-doctor, warlock-inspect, warlock-check, generate-openapi
34
+ - **Agent tooling:** warlock-mcp, warlock-trace, warlock-agents-md, warlock-board
35
+ - **Storage, files & mail:** store-file, upload-file, process-image, send-mail
36
+ - **Security & utilities:** hash-password, encrypt-data, store-secrets, retry-operation, benchmark-code, request-memo, request-tracing
37
+ - **Testing:** test-browser, test-http, test-service, test-fakes, model-factories
38
+
39
+ ## Conventions and pitfalls
40
+
41
+ - Several files are auto-loaded (`routes.ts`, `main.ts`, `events/*`, `utils/locales.ts`, `src/config/*`); never import them by hand.
42
+ - Core does NOT re-export `v`/`Infer` (import from `@warlock.js/seal`), or `Model`/`Migration` (from `@warlock.js/cascade`).
43
+ - Controllers stay thin: no business logic, transactions, or external API calls. Resources are output-only.
44
+ - No per-action `*.request.ts` files; schema files export the value and the inferred type together.
45
+ - Prefer typed model getters over scattered `.get<T>("field")` casts.
46
+
47
+
7
48
  ## add-connector `@warlock.js/core/add-connector/SKILL.md`
8
49
 
9
50
  ---
@@ -3745,6 +3786,169 @@ router.get("/webhooks/status", webhookStatusController, { rateLimit: false });
3745
3786
  - The `warlock-conventions` topic — module layout, the `guarded` convention, path aliases.
3746
3787
 
3747
3788
 
3789
+ ## report-framework-issue `@warlock.js/core/report-framework-issue/SKILL.md`
3790
+
3791
+ ---
3792
+ name: report-framework-issue
3793
+ description: "Report a confirmed Warlock.js framework bug or missing capability. Read when behavior contradicts the installed docs, a crash appears to originate in @warlock.js packages, or no documented API meets a requirement; covers minimal reproduction, duplicate searches, sanitized warlock issue output and user approval before filing."
3794
+ ---
3795
+
3796
+ # Report a Warlock.js framework issue
3797
+
3798
+ Use this topic when behavior contradicts the installed version's docs or skills,
3799
+ a crash originates inside `@warlock.js/*`, or a needed framework capability is
3800
+ missing. Framework reports belong at <https://github.com/warlockjs/framework>.
3801
+
3802
+ ## Confirm and search first
3803
+
3804
+ 1. Reduce the problem to a minimal reproduction in a clean, generic app. Isolate
3805
+ application logic, third-party packages and configuration mistakes; a stack
3806
+ frame in the framework alone does not prove a framework bug.
3807
+ 2. Read the **installed version's** package `CHANGELOG.md` and skills. Confirm
3808
+ that the documented API exists in that version and check whether a later
3809
+ release already addresses it. For a feature, describe the missing capability
3810
+ and why the documented APIs or an app-level workaround are insufficient.
3811
+ 3. Run `warlock doctor --json` (see `warlock-doctor.md`). Fix app/environment
3812
+ findings first. If boot fails, retain only the sanitized failure; `warlock
3813
+ issue` itself does not boot the app.
3814
+ 4. Search existing reports, including closed issues, using distinctive public
3815
+ terms. If a matching issue exists, show its link and help draft a useful
3816
+ follow-up instead of opening a duplicate. Ask before posting that follow-up.
3817
+
3818
+ ```bash
3819
+ gh issue list -R warlockjs/framework --state all --search "public error or capability"
3820
+ ```
3821
+
3822
+ Without GitHub CLI, use
3823
+ <https://github.com/warlockjs/framework/issues?q=is%3Aissue> and enter those terms.
3824
+
3825
+ ## Collect and protect
3826
+
3827
+ ```bash
3828
+ warlock issue --type bug --title "Public description of the failure"
3829
+ warlock issue --type feature --title "Public description of the capability" --json
3830
+ ```
3831
+
3832
+ Collect affected package names and **installed versions**, Node and package
3833
+ manager versions, OS/architecture, TypeScript version, the reviewed `warlock
3834
+ issue` environment output, a minimal reproduction with exact steps, expected
3835
+ versus actual behavior, and relevant sanitized logs / `warlock doctor --json`
3836
+ output. If a tool cannot run or there are no relevant logs, explain why.
3837
+
3838
+ **Never paste secrets, tokens, `.env` contents, customer data, proprietary code or
3839
+ private app names** into titles, bodies, logs, screenshots, repro repositories,
3840
+ search queries or URLs. Replace the original app with a minimal generic repro.
3841
+ Review even generated environment output and stack traces; remove local paths,
3842
+ hostnames and identifying details. The command reads installed package metadata
3843
+ and a static config summary; it never reads `.env` or executes the app/config.
3844
+ Do not attach the app's full config or diagnostic report without sanitizing it.
3845
+
3846
+ ## Draft and get consent
3847
+
3848
+ Choose one template below, replace every prompt with concrete evidence, and
3849
+ write the sanitized body to a local UTF-8 file such as `framework-issue.md`.
3850
+ **Always show the complete drafted title and body to the user and explicitly ask
3851
+ before filing.** Generating a draft or URL is not consent to publish. If the user
3852
+ requests edits, show the revised draft and obtain approval for that version.
3853
+
3854
+ ### Bug body
3855
+
3856
+ ```markdown
3857
+ ### Summary
3858
+
3859
+ Public description of the framework failure and affected packages.
3860
+
3861
+ ### Environment / warlock issue output
3862
+
3863
+ Reviewed environment output: installed @warlock.js package versions, Node,
3864
+ package manager + version, OS/arch, TypeScript, static config summary.
3865
+
3866
+ ### Minimal reproduction
3867
+
3868
+ Public minimal code or repro link, setup commands and exact steps.
3869
+
3870
+ ### Expected behavior
3871
+
3872
+ What should happen, with the installed version's docs/skills reference.
3873
+
3874
+ ### Actual / current behavior
3875
+
3876
+ What happens instead, including the error and impact.
3877
+
3878
+ ### Sanitized logs / doctor output
3879
+
3880
+ Relevant logs and warlock doctor --json, or why unavailable / not applicable.
3881
+
3882
+ ### Checks
3883
+
3884
+ - [ ] Searched existing issues and checked installed-version CHANGELOG and skills.
3885
+ - [ ] Removed secrets, tokens, .env, customer data, proprietary code and private app names.
3886
+ - [ ] User reviewed this complete draft and approved filing.
3887
+ ```
3888
+
3889
+ ### Feature request body
3890
+
3891
+ ```markdown
3892
+ ### Problem / use case
3893
+
3894
+ Public description of the missing framework capability and affected packages.
3895
+
3896
+ ### Environment / warlock issue output
3897
+
3898
+ Reviewed environment output: installed @warlock.js package versions, Node,
3899
+ package manager + version, OS/arch, TypeScript, static config summary.
3900
+
3901
+ ### Minimal reproduction
3902
+
3903
+ Minimal public example of the capability that cannot currently be expressed.
3904
+
3905
+ ### Proposed behavior
3906
+
3907
+ Desired API/behavior, with an example and why it belongs in the framework.
3908
+
3909
+ ### Actual / current behavior
3910
+
3911
+ Current limitation and relevant installed-version docs/skills.
3912
+
3913
+ ### Alternatives considered
3914
+
3915
+ Existing APIs, app-level workarounds and their limitations.
3916
+
3917
+ ### Sanitized logs / doctor output
3918
+
3919
+ Relevant logs and warlock doctor --json, or why unavailable / not applicable.
3920
+
3921
+ ### Checks
3922
+
3923
+ - [ ] Searched existing issues and checked installed-version CHANGELOG and skills.
3924
+ - [ ] Removed secrets, tokens, .env, customer data, proprietary code and private app names.
3925
+ - [ ] User reviewed this complete draft and approved filing.
3926
+ ```
3927
+
3928
+ Only check a box after completing that step, including obtaining consent.
3929
+
3930
+ ## File the approved draft
3931
+
3932
+ Check `gh --version` and `gh auth status --hostname github.com`. If GitHub CLI is
3933
+ available and authenticated, **after approval** run:
3934
+
3935
+ ```bash
3936
+ gh issue create -R warlockjs/framework --title "Approved public title" --body-file framework-issue.md
3937
+ ```
3938
+
3939
+ Return the created issue's link. If GitHub CLI is unavailable or unauthenticated,
3940
+ give the user the pre-filled new-issue URL printed by `warlock issue` together
3941
+ with the approved body. The URL selects `bug.yml` or `feature.yml` and prefills
3942
+ the environment field; the user must complete the remaining form fields. URLs
3943
+ are capped at 7,500 characters and may include a truncation note: restore the
3944
+ remaining reviewed output manually. Never claim the issue was filed from merely
3945
+ printing or opening a URL. `warlock issue` never sends anything itself.
3946
+
3947
+ GitHub CLI flags: [list](https://cli.github.com/manual/gh_issue_list),
3948
+ [create](https://cli.github.com/manual/gh_issue_create),
3949
+ [authentication](https://cli.github.com/manual/gh_auth_status).
3950
+
3951
+
3748
3952
  ## request-memo `@warlock.js/core/request-memo/SKILL.md`
3749
3953
 
3750
3954
  ---
@@ -11319,7 +11523,7 @@ const types = runTypecheck({ files: ["src/app/posts/services/publish.service.ts"
11319
11523
 
11320
11524
  ## See also
11321
11525
 
11322
- - `report-framework-issue.md` — confirm a framework bug or missing capability, collect `warlock issue` output, and get the user's approval before filing.
11526
+ - the `report-framework-issue` topic — confirm a framework bug or missing capability, collect `warlock issue` output, and get the user's approval before filing.
11323
11527
  - The `warlock-doctor` topic — boot-time diagnostics; `doctor --json` uses the same codes and fields.
11324
11528
  - The `warlock-inspect` topic — the app's routes, models and config as JSON.
11325
11529
  - The `warlock-conventions` topic — the rules behind `WL9001`–`WL9012`, with the fix for each.
package/llms.txt CHANGED
@@ -6,6 +6,7 @@
6
6
 
7
7
  ## Skills
8
8
 
9
+ - [Package orientation](@warlock.js/core/skills/index.md): The Warlock server framework: HTTP routes, controllers, responses, resources, repositories, CLI, mail, storage, security helpers. Exports `router`, `Request`, `Response`, `RequestHandler`, `useCase`, `RepositoryManager`, `defineResource`, `defineConfig`, `storage`, `sendMail`, `hashPassword`, `command`. Use for: add a route, write a controller, return a JSON response, hide a field from the response, upload a file, send an email, hash a password, add a CLI command, generate an OpenAPI document, type an API response, wire a socket, run or configure the app. Not this package: database models/queries → @warlock.js/cascade; input schemas → @warlock.js/seal; SSR pages → @warlock.js/web.
9
10
  - [add-connector](@warlock.js/core/add-connector/SKILL.md): Extend Warlock with a `BaseConnector` subclass and register its instance in `warlock.config.ts > connectors`. Covers runtime lifecycle (`boot`, `start`, `shutdown`, priority, phase, watched files) and the optional static `build.generate` / `build.emit` contribution used by `warlock build`. Triggers: `BaseConnector`, `connectors`, `ConnectorLifecyclePhase`, `ConnectorBuildContribution`, `build.generate`, `build.emit`; "add a queue worker", "wire a subsystem into bootstrap", "contribute files to warlock build", "control startup ordering", "graceful shutdown hook". Skip: app context accessors — the `use-app-context` topic; general config shape — the `configure-app` topic; competing pattern: hand-rolled process signal blocks, NestJS lifecycle hooks.
10
11
  - [benchmark-code](@warlock.js/core/benchmark-code/SKILL.md): Wrap a function with `measure(name, fn, options?)` to time it and classify the latency — onComplete/onError/onFinish hooks, `latencyRange` thresholds, `BenchmarkProfiler` for percentiles, `BenchmarkSnapshots` for raw captures. Triggers: `measure`, `BenchmarkProfiler`, `BenchmarkSnapshots`, `BenchmarkChannel`, `ConsoleChannel`, `latencyRange`, `shouldBenchmarkError`; "time this operation", "profile a slow service", "emit p50/p95/p99 metrics", "classify latency against thresholds"; typical import `import { measure, BenchmarkProfiler } from "@warlock.js/core"`. Skip: retry composition — the `retry-operation` topic; benchmark config wiring — the `configure-app` topic; competing libs `prom-client`, `pino`, `perf_hooks`, `console.time`.
11
12
  - [build-restful](@warlock.js/core/build-restful/SKILL.md): Generate standard CRUD endpoints — via `router.route(path).list().show().create().update().destroy()` chain or the `Restful` base class. Pick the chain by default; reach for `Restful` when you want repository-bound defaults. Triggers: `router.route`, `Restful`, `router.restfulResource`, `RouteResource`, `.crud`, `.nest`, `beforeCreate`, `onCreate`; "build a CRUD API", "register list/show/create/update/destroy", "repository-bound default handlers", "override a single REST action"; typical import `import { router, Restful } from "@warlock.js/core"`. Skip: wider router surface — the `register-route` topic; per-action controllers — the `create-controller` topic; wire mapping — the `define-resource` topic; competing pattern: hand-rolled controllers, `@nestjs/swagger` decorator-driven CRUD.
@@ -23,6 +24,7 @@
23
24
  - [model-factories](@warlock.js/core/model-factories/SKILL.md): Deterministic model factories for tests and seeders — `defineFactory(Model, (seed) => attributes)` with `make()`, `makeMany(n)`, `create()`, `create(n)`, `createMany(n)`, named states via `.state()` / `.with()`, and a faker-free seed (`seed.text`, `seed.email`, `seed.uuid`, `seed.date`, `seed.number`, `seed.pick`). Triggers: `defineFactory`, `Factory`, `FactorySeed`, `resetFactorySequences`, `userFactory`; "test fixtures", "create test users", "factory states", "deterministic test data", "build a request body for a test". Typical import `import { defineFactory } from "@warlock.js/core/tests"`. Skip: seeding a real database for development — the `write-seeder` topic; fakes — the `test-fakes` topic.
24
25
  - [process-image](@warlock.js/core/process-image/SKILL.md): Transform images with the `Image` class — resize, crop, rotate, format, quality, watermark, blur, etc. — using a deferred pipeline that runs only at `save()` / `toBuffer()` / `toBase64()` / `toDataUrl()` time. Requires sharp via `warlock add image`. Triggers: `Image`, `Image.fromFile`, `Image.fromBuffer`, `Image.fromUrl`, `.resize`, `.crop`, `.watermark`, `.toBuffer`, `.toDataUrl`, `.apply`; "resize an image", "generate a thumbnail", "watermark a product photo", "build an image pipeline"; typical import `import { Image } from "@warlock.js/core"`. Skip: multipart upload entry — the `upload-file` topic; storage persistence — the `store-file` topic; competing libs `sharp` direct, `jimp`, `imagemagick`, `gm`.
25
26
  - [register-route](@warlock.js/core/register-route/SKILL.md): Register HTTP routes via @warlock.js/core's router — single routes, prefix groups, middleware-guarded blocks, and RESTful resource chains. Routes always live in `src/app/<module>/routes.ts`. Triggers: `router.get`, `router.post`, `router.prefix`, `router.group`, `router.route`, `guarded`; "add a route", "wire a controller to a URL", "group routes by prefix", "register a RESTful resource"; typical import `import { router } from "@warlock.js/core"`. Skip: handler shape — the `create-controller` topic; CRUD chain details — the `build-restful` topic; middleware authoring — the `write-middleware` topic; competing libs `express`, `fastify`, `koa`, `@nestjs/common`.
27
+ - [report-framework-issue](@warlock.js/core/report-framework-issue/SKILL.md): Report a confirmed Warlock.js framework bug or missing capability. Read when behavior contradicts the installed docs, a crash appears to originate in @warlock.js packages, or no documented API meets a requirement; covers minimal reproduction, duplicate searches, sanitized warlock issue output and user approval before filing.
26
28
  - [request-memo](@warlock.js/core/request-memo/SKILL.md): Memoize async work for one HTTP request with `requestMemo<T>(key, fn)` — the v5 replacement for removed `fromRequest`, with single-flight promise sharing, settled-success reuse, rejection eviction, and no cross-request fallback. Triggers: `requestMemo`, `fromRequest`, `fromRequest removed`, `request-scoped cache`, `single-flight`, `current request memo`; "migrate off fromRequest", "load this once per request", "deduplicate concurrent loaders", "cache a repository lookup during one request"; typical import `import { requestMemo } from "@warlock.js/core"`. Skip: middleware-written request state — the `use-request-locals` topic; process-wide or cross-request caching — the `use-middleware` topic; competing patterns: dynamic `request[key]` properties, module-global `Map`, payload `request.get()` / `request.set()`.
27
29
  - [request-tracing](@warlock.js/core/request-tracing/SKILL.md): Vendor-neutral request tracing hooks (`http.tracing`) — observe request start/end and named phase spans (`route.match`, `middleware`, `validation`, `handler`, `response.write`) without adopting an OTel/vendor dependency in `core`. Covers the `TracingHooks` shape, trace id derivation from an inbound W3C `traceparent` vs `request.id`, that a throwing hook is caught and reported once (never breaks the request), and zero overhead when disabled. Triggers: `http.tracing`, `TracingHooks`, `onRequestStart`, `onRequestEnd`, `onPhase`, `traceparent`, `traceId`, `dispatchPhase`, "instrument requests", "trace a request", "slow phase logging", "APM / OTel bridge for Warlock". Skip: request-id header echo/inheritance (`X-Request-Id`) — the `use-middleware` topic; app-level structured logging — the `logger-basics` topic of the `warlock-js-logger` skill; competing libs `@opentelemetry/api` direct instrumentation, `express-request-id`, hand-rolled `X-Trace-Id` middleware.
28
30
  - [resolve-path](@warlock.js/core/resolve-path/SKILL.md): Path helpers anchored at `process.cwd()` — `rootPath`, `srcPath`, `appPath`, `configPath`, `publicPath`, `storagePath`, `uploadsPath`, `cachePath`, `logsPath`, `tempPath`, `warlockPath`, `sanitizePath`. Optional `uploads.root` config overrides the uploads anchor. Triggers: `appPath`, `configPath`, `uploadsPath`, `storagePath`, `publicPath`, `cachePath`, `logsPath`, `tempPath`, `sanitizePath`, `paths`; "resolve a path inside src/app", "absolute upload destination", "sanitize a user filename", "ship uploads to a mounted volume"; typical import `import { appPath, uploadsPath } from "@warlock.js/core"`. Skip: HTTP URL helpers — the `build-url` topic; app metadata — the `use-app-context` topic; storage abstraction — the `store-file` topic; competing patterns: `path.join(process.cwd(), ...)`, hand-rolled directory constants.
package/package.json CHANGED
@@ -25,12 +25,12 @@
25
25
  "@mongez/slug": "^1.0.7",
26
26
  "@mongez/supportive-is": "^3.0.0",
27
27
  "@mongez/time-wizard": "^1.0.6",
28
- "@warlock.js/cache": "5.34.1",
29
- "@warlock.js/cascade": "5.34.1",
30
- "@warlock.js/context": "5.34.1",
31
- "@warlock.js/fs": "5.34.1",
32
- "@warlock.js/logger": "5.34.1",
33
- "@warlock.js/seal": "5.34.1",
28
+ "@warlock.js/cache": "5.34.2",
29
+ "@warlock.js/cascade": "5.34.2",
30
+ "@warlock.js/context": "5.34.2",
31
+ "@warlock.js/fs": "5.34.2",
32
+ "@warlock.js/logger": "5.34.2",
33
+ "@warlock.js/seal": "5.34.2",
34
34
  "bcryptjs": "^3.0.3",
35
35
  "chokidar": "^5.0.0",
36
36
  "dayjs": "^1.11.19",
@@ -55,12 +55,12 @@
55
55
  "@aws-sdk/lib-storage": "^3.955.0",
56
56
  "@aws-sdk/s3-request-presigner": "^3.955.0",
57
57
  "@react-email/render": "^2.0.5",
58
- "@warlock.js/access": "5.34.1",
59
- "@warlock.js/ai": "5.34.1",
60
- "@warlock.js/ai-tools": "5.34.1",
61
- "@warlock.js/devtools": "5.34.1",
62
- "@warlock.js/herald": "5.34.1",
63
- "@warlock.js/notifications": "5.34.1",
58
+ "@warlock.js/access": "5.34.2",
59
+ "@warlock.js/ai": "5.34.2",
60
+ "@warlock.js/ai-tools": "5.34.2",
61
+ "@warlock.js/devtools": "5.34.2",
62
+ "@warlock.js/herald": "5.34.2",
63
+ "@warlock.js/notifications": "5.34.2",
64
64
  "nodemailer": "^8.0.5",
65
65
  "react": "^19.2.3",
66
66
  "react-dom": "^19.2.3",
@@ -145,7 +145,7 @@
145
145
  "engines": {
146
146
  "node": ">=22.15"
147
147
  },
148
- "version": "5.34.1",
148
+ "version": "5.34.2",
149
149
  "type": "module",
150
150
  "main": "./esm/index.mjs",
151
151
  "module": "./esm/index.mjs",
package/skills/index.md CHANGED
@@ -14,11 +14,11 @@ Core is the application runtime: it boots the app, auto-loads each module's spec
14
14
  4. Return via `response.*` (`send-response.md`) and shape output with a resource (`define-resource.md`); declare `responseSchema` for typed clients and docs (`create-controller.md`, `generate-openapi.md`).
15
15
  5. Configure and run (`configure-app.md`, `run-app.md`); check setup with `warlock-doctor.md`, read the app with `warlock-inspect.md` (or serve it to an agent with `warlock-mcp.md`), verify a change with `warlock-check.md`, and a request's runtime behaviour with `warlock-trace.md`.
16
16
 
17
- When the framework is wrong or missing a capability, follow `report-framework-issue.md` to prepare a public report and ask the user before filing.
17
+ When the framework is wrong or missing a capability, follow the `report-framework-issue` topic to prepare a public report and ask the user before filing.
18
18
 
19
19
  ## Topics by area
20
20
 
21
- - **Foundations:** warlock-conventions, create-module, make-endpoint, configure-app, use-app-context, resolve-path, build-url, update-packages, lower-stage3-decorators
21
+ - **Foundations:** warlock-conventions, create-module, make-endpoint, configure-app, use-app-context, resolve-path, build-url, update-packages, lower-stage3-decorators, upgrade-from-5-29
22
22
  - **HTTP & routing:** register-route, warlock-routes, create-controller, use-middleware, write-middleware, validate-input, use-request-locals, build-restful, wire-socket
23
23
  - **Responses & resources:** send-response, define-resource, use-model-transformers, use-localization
24
24
  - **Domain layers:** write-use-case, use-repository, write-seeder
@@ -26,7 +26,7 @@ When the framework is wrong or missing a capability, follow `report-framework-is
26
26
  - **Agent tooling:** warlock-mcp, warlock-trace, warlock-agents-md, warlock-board
27
27
  - **Storage, files & mail:** store-file, upload-file, process-image, send-mail
28
28
  - **Security & utilities:** hash-password, encrypt-data, store-secrets, retry-operation, benchmark-code, request-memo, request-tracing
29
- - **Testing:** test-http, test-service, test-fakes, model-factories
29
+ - **Testing:** test-browser, test-http, test-service, test-fakes, model-factories
30
30
 
31
31
  ## Conventions and pitfalls
32
32
 
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: report-framework-issue
3
+ description: "Report a confirmed Warlock.js framework bug or missing capability. Read when behavior contradicts the installed docs, a crash appears to originate in @warlock.js packages, or no documented API meets a requirement; covers minimal reproduction, duplicate searches, sanitized warlock issue output and user approval before filing."
4
+ ---
5
+
1
6
  # Report a Warlock.js framework issue
2
7
 
3
8
  Use this topic when behavior contradicts the installed version's docs or skills,
@@ -127,7 +127,7 @@ const types = runTypecheck({ files: ["src/app/posts/services/publish.service.ts"
127
127
 
128
128
  ## See also
129
129
 
130
- - `report-framework-issue.md` — confirm a framework bug or missing capability, collect `warlock issue` output, and get the user's approval before filing.
130
+ - the `report-framework-issue` topic — confirm a framework bug or missing capability, collect `warlock issue` output, and get the user's approval before filing.
131
131
  - The `warlock-doctor` topic — boot-time diagnostics; `doctor --json` uses the same codes and fields.
132
132
  - The `warlock-inspect` topic — the app's routes, models and config as JSON.
133
133
  - The `warlock-conventions` topic — the rules behind `WL9001`–`WL9012`, with the fix for each.
package/skills/README.md DELETED
@@ -1,76 +0,0 @@
1
- # @warlock.js/core — skills index
2
-
3
- Each folder holds one `SKILL.md` (an agent-facing how-to for a single task). The `llms.txt` / `llms-full.txt` at the package root are **generated projections** of this folder — run `node scripts/generate-llms.mjs` from the package root after any skill change; never hand-edit them.
4
-
5
- ## HTTP layer
6
-
7
- - `register-route` — register single routes, prefix groups, middleware-guarded blocks, and RESTful resource chains.
8
- - `build-restful` — generate standard CRUD endpoints via the `router.route(...)` chain or the `Restful` base class.
9
- - `create-controller` — author HTTP controllers: `RequestHandler` signature, validated input, response helpers, middleware, `responseSchema` response types.
10
- - `send-response` — `Response` helpers: success/error variants, status helpers, redirects, files, streams, SSE.
11
- - `validate-input` — author seal schemas, attach them to controllers, infer types, layer DTOs.
12
- - `use-middleware` — attach built-in HTTP middleware (rateLimit, concurrencyLimit, maxBodySize, …) via the `middleware` namespace.
13
- - `write-middleware` — author HTTP middleware: the `({ request, response })` signature, short-circuit, request enrichment.
14
- - `build-url` — HTTP URL helpers (`url`, `publicUrl`, `assetsUrl`, `uploadsUrl`) anchored at `app.baseUrl`.
15
- - `upload-file` — handle multipart uploads: `request.file()`, `v.file()` validation, `UploadedFile.save()`.
16
- - `health-checks` — built-in `/health` + `/ready` endpoints, the `health` registry, and graceful request draining.
17
-
18
- ## Data layer
19
-
20
- - `use-repository` — subclass `RepositoryManager`: `source`/`filterBy`/`defaultOptions`, list/find/CRUD, cached/cursor variants, and the `filterBy`-aware aggregates (`sum`/`avg`/`min`/`max`/`groupBy`/`aggregate`).
21
- - `use-model-transformers` — schema-side helpers: `useHashedPassword()`, `useComputedSlug()`, and friends.
22
- - `define-resource` — map model fields to wire-shape via `defineResource()` / `Resource` subclasses (output-only); typed output with `ResourceOutput`, `Serialized<T, W>` and `ModelResourceRegistry`.
23
- - `write-seeder` — author a seed file with `seeder()` — `name`/`dependsOn`/`once`/`order`/`batchSize`, `run({ track, now, batchSize })`, `warlock seed --drop`.
24
-
25
- ## Files, media, mail
26
-
27
- - `store-file` — read/write/delete files via the `storage` singleton (local/S3/R2/DO Spaces), `StorageFile` handles, presigned URLs.
28
- - `process-image` — transform images with the `Image` class (resize, crop, rotate, format, watermark, …) on a deferred pipeline.
29
- - `send-mail` — send transactional email: the `Mail` fluent builder, `sendMail()`, React Email, test-mode capture.
30
-
31
- ## App, config, lifecycle
32
-
33
- - `configure-app` — the two config layers (`warlock.config.ts` vs `src/config/*.ts`), `.env` + `env()`.
34
- - `use-app-context` — read app-wide context via the `Application` static class and the `app` runtime accessor.
35
- - `add-connector` — extend the lifecycle with a `BaseConnector` subclass (`start`/`shutdown`/`watchedFiles`).
36
- - `wire-socket` — configure Socket.IO, reach the live server via `getSocketServer()` / `app.socket`.
37
- - `use-localization` — multi-locale translations: `groupedTranslations`, `t()` (always, never `request.t()`), locale resolution.
38
-
39
- ## Use-cases & services
40
-
41
- - `write-use-case` — author `useCase()` pipelines: guards, schema, before/after, retry, benchmark, broadcast, lifecycle.
42
- - `create-module` — scaffold a feature module under `src/app/<name>/` via `warlock generate.module` + follow-up generators.
43
- - `make-endpoint` — `warlock make endpoint <module>/<name>`: one spec-first endpoint (schema → service, resource, controller, route, locale key, OpenAPI response, HTTP test); `--dry-run` / `--json` on every generator.
44
-
45
- ## CLI & operations
46
-
47
- - `warlock-doctor` — `warlock doctor`: read-only diagnostics (routes/config/connectors/optional-peers/health/release-hygiene) with a pass/warn/fail report and non-zero exit on failure.
48
- - `warlock-inspect` — `warlock inspect [--json] [--section ...]`: the app's routes, models, resources, config keys, events, pages, jobs, schedules and package versions from the booted registries, as a versioned JSON report; `inspectApp()` from `@warlock.js/core/tooling`.
49
- - `warlock-check` — `warlock check` / `typecheck` / `explain`: one verify command (typecheck, lint, affected tests, conventions) with one JSON object per problem, stable `WL` error codes, and exit 1 for your code vs 2 for this machine.
50
- - `warlock-mcp` — `warlock mcp [--http] [--allow-writes]` and `warlock dev --mcp`: the app as an MCP server for coding agents — `inspect_*`, `db_schema`, offline `docs_search` over installed skills, `explain`, `check_run`, `test_run`, devtools `requests_recent`, and `generate_make` / `generate_add` that return a diff by default.
51
- - `warlock-trace` — `warlock trace <method> <url> [--json]`: send one request to the running dev server and print its devtools timeline (middleware, validation, queries with N+1 flags, logs, response, timings).
52
- - `warlock-agents-md` — `warlock agents-md [--write]`: the app-specific AGENTS.md section between `warlock:generated` markers, refreshed by `warlock dev`.
53
- - `warlock-board` — `warlock board init|add|status|send|watch`: a git-ignored task board with review states and append-only messages for an implementer and a reviewer agent.
54
- - `warlock-routes` — `warlock routes`: list the registered HTTP routes as a verb-colored table (method/path/name/action/middleware/source); filter by method/path/name or emit JSON. Read-only, no connectors.
55
- - `write-cli-command` — author a custom `warlock <cmd>` via the `command()` factory, or inspect built-in `warlock add` feature scaffolding such as the Web starter.
56
- - `generate-openapi` — `warlock generate.openapi`: an OpenAPI 3.1 document from the routes (validation, `responseSchema`, auth), plus the dev-only API docs page.
57
- - `run-app` — `warlock dev` / `warlock build` / `warlock start` operational commands.
58
- - `update-packages` — bump every `@warlock.js/*` dependency with `warlock update`.
59
-
60
- ## Testing
61
-
62
- - `test-http` — integration tests against a real HTTP server (`startHttpTestServer()`, `testGet` / `testPost`).
63
- - `test-service` — pure unit tests against services/repositories/models/use-cases via `setupTest({ connectors })`.
64
- - `store-secrets` — app-scoped credentials, lazy keychain/environment/encrypted file storage, memory backends and safe errors.
65
- - `test-fakes` — mail, queue, cache, storage, clock, ids and secrets fakes, on by default in tests, and their assertions; opting out.
66
- - `model-factories` — `defineFactory(Model, (seed) => attrs)`: deterministic `make()` / `create(n)` / states.
67
-
68
- ## Utilities
69
-
70
- - `encrypt-data` — reversible AES-256-GCM `encrypt`/`decrypt`, plus one-way `hmacHash` fingerprints.
71
- - `hash-password` — one-way bcrypt `hashPassword`/`verifyPassword` and the `useHashedPassword()` transformer.
72
- - `resolve-path` — path helpers anchored at `process.cwd()` (`rootPath`, `srcPath`, `appPath`, …).
73
- - `benchmark-code` — time a function with `measure(name, fn, options?)` and classify the latency.
74
- - `retry-operation` — wrap a flaky operation with `retry(fn, options)` (now from `@mongez/reinforcements`).
75
- - `lower-stage3-decorators` — the `lowerStage3Decorators()` Vite/Vitest plugin for native decorators.
76
- - `warlock-conventions` — framework-wide invariants: module layout, canonical imports, layered flow, file naming.