@contractspec/lib.context-storage 0.7.5 → 0.7.8
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/README.md +46 -25
- package/dist/in-memory-store.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,42 +1,63 @@
|
|
|
1
1
|
# @contractspec/lib.context-storage
|
|
2
2
|
|
|
3
|
-
Website: https://contractspec.io
|
|
3
|
+
Website: https://contractspec.io
|
|
4
4
|
|
|
5
5
|
**Context pack and snapshot storage primitives.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## What It Provides
|
|
8
|
+
|
|
9
|
+
- **Layer**: lib.
|
|
10
|
+
- **Consumers**: module.context-storage.
|
|
11
|
+
- Related ContractSpec packages include `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
12
|
+
- Related ContractSpec packages include `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
8
13
|
|
|
9
14
|
## Installation
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
bun add @contractspec/lib.context-storage
|
|
13
|
-
```
|
|
16
|
+
`npm install @contractspec/lib.context-storage`
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
or
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
- `./store` -- `ContextSnapshotStore` interface (upsertPack, createSnapshot, listPacks, etc.)
|
|
19
|
-
- `./in-memory-store` -- `InMemoryContextSnapshotStore` class
|
|
20
|
-
- `./types` -- Domain types: `ContextPackRecord`, `ContextSnapshotRecord`, `ContextSnapshotItem`, queries, and list results
|
|
20
|
+
`bun add @contractspec/lib.context-storage`
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
Import the root entrypoint from `@contractspec/lib.context-storage`, or choose a documented subpath when you only need one part of the package surface.
|
|
25
|
+
|
|
26
|
+
## Architecture
|
|
27
|
+
|
|
28
|
+
- `src/in-memory-store.ts` is part of the package's public or composition surface.
|
|
29
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
30
|
+
- `src/store.ts` is part of the package's public or composition surface.
|
|
31
|
+
- `src/types.ts` is shared public type definitions.
|
|
32
|
+
|
|
33
|
+
## Public Entry Points
|
|
34
|
+
|
|
35
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
36
|
+
- Export `./in-memory-store` resolves through `./src/in-memory-store.ts`.
|
|
37
|
+
- Export `./store` resolves through `./src/store.ts`.
|
|
38
|
+
- Export `./types` resolves through `./src/types.ts`.
|
|
39
|
+
|
|
40
|
+
## Local Commands
|
|
41
|
+
|
|
42
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
43
|
+
- `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
|
|
44
|
+
- `bun run test` — bun test --pass-with-no-tests
|
|
45
|
+
- `bun run lint` — bun lint:fix
|
|
46
|
+
- `bun run lint:check` — biome check .
|
|
47
|
+
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
|
|
48
|
+
- `bun run typecheck` — tsc --noEmit
|
|
49
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
50
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
51
|
+
- `bun run clean` — rimraf dist .turbo
|
|
52
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
53
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
54
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
|
27
55
|
|
|
28
|
-
|
|
56
|
+
## Recent Updates
|
|
29
57
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
version: "1.0.0",
|
|
33
|
-
title: "Onboarding Context Pack",
|
|
34
|
-
tags: ["getting-started"],
|
|
35
|
-
createdAt: new Date().toISOString(),
|
|
36
|
-
};
|
|
58
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
59
|
+
- Add AI provider ranking system with ranking-driven model selection.
|
|
37
60
|
|
|
38
|
-
|
|
61
|
+
## Notes
|
|
39
62
|
|
|
40
|
-
|
|
41
|
-
console.log(result.packs);
|
|
42
|
-
```
|
|
63
|
+
- `Store` interface is the contract boundary for persistence adapters; do not change its shape without updating all adapters.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ContextPackListResult, ContextPackQuery, ContextPackRecord, ContextSnapshotItem, ContextSnapshotItemInput, ContextSnapshotListResult, ContextSnapshotQuery, ContextSnapshotRecord } from './types';
|
|
2
1
|
import type { ContextSnapshotStore } from './store';
|
|
2
|
+
import type { ContextPackListResult, ContextPackQuery, ContextPackRecord, ContextSnapshotItem, ContextSnapshotItemInput, ContextSnapshotListResult, ContextSnapshotQuery, ContextSnapshotRecord } from './types';
|
|
3
3
|
export declare class InMemoryContextSnapshotStore implements ContextSnapshotStore {
|
|
4
4
|
private readonly packs;
|
|
5
5
|
private readonly snapshots;
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.context-storage",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "Context pack and snapshot storage primitives",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
"dev": "contractspec-bun-build dev",
|
|
24
24
|
"clean": "rimraf dist .turbo",
|
|
25
25
|
"lint": "bun lint:fix",
|
|
26
|
-
"lint:fix": "
|
|
27
|
-
"lint:check": "
|
|
26
|
+
"lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
|
|
27
|
+
"lint:check": "biome check .",
|
|
28
28
|
"test": "bun test --pass-with-no-tests",
|
|
29
29
|
"prebuild": "contractspec-bun-build prebuild",
|
|
30
30
|
"typecheck": "tsc --noEmit"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@contractspec/tool.typescript": "3.7.
|
|
35
|
-
"@contractspec/tool.bun": "3.7.
|
|
34
|
+
"@contractspec/tool.typescript": "3.7.8",
|
|
35
|
+
"@contractspec/tool.bun": "3.7.8",
|
|
36
36
|
"typescript": "^5.9.3"
|
|
37
37
|
},
|
|
38
38
|
"exports": {
|