@beignet/cli 0.0.29 → 0.0.31
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
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @beignet/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d77e367: New `@beignet/core/memo` subpath: `createMemo(fn)` deduplicates a lookup for the lifetime of one request — the first call runs, later calls with the same arguments (from context, policies, use cases) share the same value and in-flight promise. The server scopes every HTTP request and `runServiceContext(...)` execution automatically; the cache dies with the request, so there is no TTL, no invalidation policy, and no cross-request staleness. Mutations pair with `memoized.invalidate(...)`, `runMemoScope(fn)` scopes scripts and tests, and devtools records `memo.hit`/`memo.miss` events with fill durations. The generated CLAUDE/AGENTS capability index now points at it.
|
|
8
|
+
- Updated dependencies [d77e367]
|
|
9
|
+
- @beignet/core@0.0.31
|
|
10
|
+
|
|
11
|
+
## 0.0.30
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [38d1770]
|
|
16
|
+
- Updated dependencies [b601494]
|
|
17
|
+
- @beignet/core@0.0.30
|
|
18
|
+
|
|
3
19
|
## 0.0.29
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/templates/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/templates/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAwIrD;AAeD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CASrD"}
|
package/dist/templates/agents.js
CHANGED
|
@@ -77,7 +77,8 @@ apps have reimplemented by accident:
|
|
|
77
77
|
| Rate limiting or idempotency on a route | Declare \`metadata.rateLimit\` / \`metadata.idempotency\` on the contract (or the \`pipeline\` option on raw routes); hooks enforce it. |
|
|
78
78
|
| Route-level tests that exercise real hooks | \`createTestApp\` / \`createTestRequester\` from \`@beignet/web/testing\`. Bind the rate-limit and idempotency ports in the test app when asserting 429s or replay. |
|
|
79
79
|
| Environment configuration | \`lib/env.ts\` (\`createEnv\`), never ad-hoc \`process.env\` reads in app code. |
|
|
80
|
-
|
|
|
80
|
+
| The same lookup runs several times in one request — context, policy, use case | Wrap the repository read in \`createMemo(...)\` from \`@beignet/core/memo\` where the adapter is wired in infra. The cache lives for exactly one request; pair mutations with \`.invalidate(...)\`. Never hand-roll per-request caches. |
|
|
81
|
+
| Request feels slow | Open devtools; every request span breaks down into per-stage bars (context creation is the usual serverless culprit), and \`memo.hit\`/\`memo.miss\` events expose duplicate lookups. |
|
|
81
82
|
|
|
82
83
|
## Validation loop
|
|
83
84
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/templates/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAC;AAExE;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAoB;IAC3C,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,IAAI,GACR,GAAG,CAAC,cAAc,KAAK,KAAK;QAC1B,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,GAAG,GAAG,CAAC,cAAc,WAAW,CAAC;IACvC,M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AAc;QACxE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA2BqB,GAAG;CACrC,CAAC;AACF,CAAC;AAED,SAAS,YAAY,CAAC,GAAoB;IACxC,QAAQ,GAAG,CAAC,cAAc,EAAE,CAAC;QAC3B,KAAK,KAAK;YACR,OAAO,6BAA6B,CAAC;QACvC,KAAK,MAAM;YACT,OAAO,kCAAkC,CAAC;QAC5C,KAAK,MAAM;YACT,OAAO,kCAAkC,CAAC;QAC5C;YACE,OAAO,8BAA8B,CAAC;IAC1C,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAqB;IAC3C,OAAO,IAAI,CAAC;QACV,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,OAAO,EAAE,6BAA6B;gBACtC,IAAI,EAAE,CAAC,KAAK,CAAC;aACd;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beignet/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for creating and maintaining Beignet apps.",
|
|
6
6
|
"main": "./dist/lib.js",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"typescript": "^5.3.0"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@beignet/core": "^0.0.
|
|
71
|
+
"@beignet/core": "^0.0.31",
|
|
72
72
|
"@clack/prompts": "^1.5.1",
|
|
73
73
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
74
74
|
"@stricli/core": "^1.2.7",
|
package/src/templates/agents.ts
CHANGED
|
@@ -83,7 +83,8 @@ apps have reimplemented by accident:
|
|
|
83
83
|
| Rate limiting or idempotency on a route | Declare \`metadata.rateLimit\` / \`metadata.idempotency\` on the contract (or the \`pipeline\` option on raw routes); hooks enforce it. |
|
|
84
84
|
| Route-level tests that exercise real hooks | \`createTestApp\` / \`createTestRequester\` from \`@beignet/web/testing\`. Bind the rate-limit and idempotency ports in the test app when asserting 429s or replay. |
|
|
85
85
|
| Environment configuration | \`lib/env.ts\` (\`createEnv\`), never ad-hoc \`process.env\` reads in app code. |
|
|
86
|
-
|
|
|
86
|
+
| The same lookup runs several times in one request — context, policy, use case | Wrap the repository read in \`createMemo(...)\` from \`@beignet/core/memo\` where the adapter is wired in infra. The cache lives for exactly one request; pair mutations with \`.invalidate(...)\`. Never hand-roll per-request caches. |
|
|
87
|
+
| Request feels slow | Open devtools; every request span breaks down into per-stage bars (context creation is the usual serverless culprit), and \`memo.hit\`/\`memo.miss\` events expose duplicate lookups. |
|
|
87
88
|
|
|
88
89
|
## Validation loop
|
|
89
90
|
|