@utilarium/overcontext 0.0.4-dev.0

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.
Files changed (87) hide show
  1. package/LICENSE +65 -0
  2. package/README.md +286 -0
  3. package/dist/api/builder.d.ts +26 -0
  4. package/dist/api/builder.js +24 -0
  5. package/dist/api/builder.js.map +1 -0
  6. package/dist/api/context.d.ts +90 -0
  7. package/dist/api/context.js +94 -0
  8. package/dist/api/context.js.map +1 -0
  9. package/dist/api/index.d.ts +6 -0
  10. package/dist/api/query-builder.d.ts +51 -0
  11. package/dist/api/query-builder.js +95 -0
  12. package/dist/api/query-builder.js.map +1 -0
  13. package/dist/api/query.d.ts +32 -0
  14. package/dist/api/search.d.ts +20 -0
  15. package/dist/api/search.js +112 -0
  16. package/dist/api/search.js.map +1 -0
  17. package/dist/api/slug.d.ts +10 -0
  18. package/dist/api/slug.js +55 -0
  19. package/dist/api/slug.js.map +1 -0
  20. package/dist/cli/builder.d.ts +74 -0
  21. package/dist/cli/builder.js +42 -0
  22. package/dist/cli/builder.js.map +1 -0
  23. package/dist/cli/commands.d.ts +53 -0
  24. package/dist/cli/commands.js +57 -0
  25. package/dist/cli/commands.js.map +1 -0
  26. package/dist/cli/formatters.d.ts +15 -0
  27. package/dist/cli/formatters.js +50 -0
  28. package/dist/cli/formatters.js.map +1 -0
  29. package/dist/cli/index.d.ts +3 -0
  30. package/dist/discovery/context-root.d.ts +31 -0
  31. package/dist/discovery/context-root.js +48 -0
  32. package/dist/discovery/context-root.js.map +1 -0
  33. package/dist/discovery/hierarchical-provider.d.ts +13 -0
  34. package/dist/discovery/hierarchical-provider.js +102 -0
  35. package/dist/discovery/hierarchical-provider.js.map +1 -0
  36. package/dist/discovery/index.d.ts +18 -0
  37. package/dist/discovery/index.js +47 -0
  38. package/dist/discovery/index.js.map +1 -0
  39. package/dist/discovery/walker.d.ts +36 -0
  40. package/dist/discovery/walker.js +87 -0
  41. package/dist/discovery/walker.js.map +1 -0
  42. package/dist/index.cjs +1763 -0
  43. package/dist/index.cjs.map +1 -0
  44. package/dist/index.d.ts +9 -0
  45. package/dist/index.js +24 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/namespace/index.d.ts +3 -0
  48. package/dist/namespace/multi-context.d.ts +40 -0
  49. package/dist/namespace/multi-context.js +72 -0
  50. package/dist/namespace/multi-context.js.map +1 -0
  51. package/dist/namespace/resolver.d.ts +33 -0
  52. package/dist/namespace/resolver.js +85 -0
  53. package/dist/namespace/resolver.js.map +1 -0
  54. package/dist/namespace/types.d.ts +41 -0
  55. package/dist/overcontext.d.ts +7 -0
  56. package/dist/schema/base.d.ts +29 -0
  57. package/dist/schema/base.js +24 -0
  58. package/dist/schema/base.js.map +1 -0
  59. package/dist/schema/builder.d.ts +28 -0
  60. package/dist/schema/builder.js +39 -0
  61. package/dist/schema/builder.js.map +1 -0
  62. package/dist/schema/index.d.ts +5 -0
  63. package/dist/schema/inference.d.ts +49 -0
  64. package/dist/schema/inference.js +15 -0
  65. package/dist/schema/inference.js.map +1 -0
  66. package/dist/schema/registry.d.ts +74 -0
  67. package/dist/schema/registry.js +117 -0
  68. package/dist/schema/registry.js.map +1 -0
  69. package/dist/schema/validation.d.ts +26 -0
  70. package/dist/schema/validation.js +51 -0
  71. package/dist/schema/validation.js.map +1 -0
  72. package/dist/storage/errors.d.ts +35 -0
  73. package/dist/storage/errors.js +58 -0
  74. package/dist/storage/errors.js.map +1 -0
  75. package/dist/storage/events.d.ts +50 -0
  76. package/dist/storage/filesystem.d.ts +10 -0
  77. package/dist/storage/filesystem.js +284 -0
  78. package/dist/storage/filesystem.js.map +1 -0
  79. package/dist/storage/index.d.ts +6 -0
  80. package/dist/storage/interface.d.ts +109 -0
  81. package/dist/storage/memory.d.ts +7 -0
  82. package/dist/storage/memory.js +128 -0
  83. package/dist/storage/memory.js.map +1 -0
  84. package/dist/storage/observable.d.ts +6 -0
  85. package/dist/storage/observable.js +98 -0
  86. package/dist/storage/observable.js.map +1 -0
  87. package/package.json +85 -0
package/LICENSE ADDED
@@ -0,0 +1,65 @@
1
+ Copyright 2026 Tim O'Brien
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+
15
+ Apache License
16
+ Version 2.0, January 2004
17
+ http://www.apache.org/licenses/
18
+
19
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
20
+
21
+ 1. Definitions.
22
+
23
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
24
+
25
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
26
+
27
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
28
+
29
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
32
+
33
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
38
+
39
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
40
+
41
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
42
+
43
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
44
+
45
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
46
+
47
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
48
+
49
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
50
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
51
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
52
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
53
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
54
+
55
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
56
+
57
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
58
+
59
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
60
+
61
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
62
+
63
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
64
+
65
+ END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,286 @@
1
+ # Overcontext
2
+
3
+ > Schema-driven framework for context management
4
+
5
+ Overcontext provides infrastructure for defining and managing custom entity schemas. Unlike a library with predefined types, overcontext lets you define your own entity schemas using Zod and provides the storage, validation, discovery, and CLI building blocks to work with them.
6
+
7
+ ## Features
8
+
9
+ - **Schema-Driven**: Register any Zod schema, get type-safe CRUD operations
10
+ - **Storage Agnostic**: Filesystem and in-memory providers included
11
+ - **Hierarchical Discovery**: Walk directory trees to find context at multiple levels
12
+ - **Namespace Support**: Organize entities across multiple namespaces
13
+ - **CLI Framework**: Reusable command builders for creating CLIs
14
+ - **Type-Safe**: Full TypeScript type inference from schemas
15
+ - **Observable**: Event-driven patterns with storage events
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ npm install @utilarium/overcontext zod
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ```typescript
26
+ import { z } from 'zod';
27
+ import { discoverOvercontext, BaseEntitySchema } from '@utilarium/overcontext';
28
+
29
+ // Define your schemas
30
+ const PersonSchema = BaseEntitySchema.extend({
31
+ type: z.literal('person'),
32
+ company: z.string().optional(),
33
+ email: z.string().email().optional(),
34
+ });
35
+
36
+ const TermSchema = BaseEntitySchema.extend({
37
+ type: z.literal('term'),
38
+ expansion: z.string().optional(),
39
+ });
40
+
41
+ // Discover context directories and create API
42
+ const ctx = await discoverOvercontext({
43
+ schemas: {
44
+ person: PersonSchema,
45
+ term: TermSchema,
46
+ },
47
+ pluralNames: {
48
+ person: 'people', // Optional: custom directory names
49
+ },
50
+ });
51
+
52
+ // Type-safe operations
53
+ const person = await ctx.create('person', {
54
+ name: 'John Doe',
55
+ company: 'Acme Corp',
56
+ email: 'john@acme.com',
57
+ });
58
+
59
+ // Search and query
60
+ const results = await ctx.search({
61
+ type: 'person',
62
+ search: 'acme',
63
+ searchFields: ['company'],
64
+ });
65
+
66
+ // Get all entities
67
+ const allPeople = await ctx.getAll('person');
68
+ ```
69
+
70
+ ## Core Concepts
71
+
72
+ ### Schema-Driven Architecture
73
+
74
+ You define entity types using Zod schemas. Overcontext provides the infrastructure:
75
+
76
+ ```typescript
77
+ // You define the schema
78
+ const ProjectSchema = BaseEntitySchema.extend({
79
+ type: z.literal('project'),
80
+ status: z.enum(['active', 'completed', 'archived']),
81
+ owner: z.string(),
82
+ });
83
+
84
+ // Overcontext handles storage, validation, and operations
85
+ const ctx = await discoverOvercontext({
86
+ schemas: { project: ProjectSchema },
87
+ });
88
+ ```
89
+
90
+ ### Hierarchical Context
91
+
92
+ Context can exist at multiple directory levels. Closer context overrides distant:
93
+
94
+ ```
95
+ /workspace/context/ # Workspace-wide entities
96
+ /workspace/project/context/ # Project-specific (overrides workspace)
97
+ ```
98
+
99
+ ```typescript
100
+ // Automatically discovers and merges context from multiple levels
101
+ const ctx = await discoverOvercontext({
102
+ schemas: { person: PersonSchema },
103
+ startDir: process.cwd(), // Starts here, walks up
104
+ });
105
+ ```
106
+
107
+ ### Namespaces
108
+
109
+ Organize entities by domain:
110
+
111
+ ```typescript
112
+ // Work-related entities
113
+ await ctx.create('person', { name: 'Colleague' }, { namespace: 'work' });
114
+
115
+ // Personal entities
116
+ await ctx.create('person', { name: 'Friend' }, { namespace: 'personal' });
117
+
118
+ // Query specific namespace
119
+ const workPeople = await ctx.getAll('person', 'work');
120
+ ```
121
+
122
+ ### Storage Providers
123
+
124
+ - **Filesystem**: YAML files in directory structure
125
+ - **Memory**: In-memory for testing
126
+ - **Hierarchical**: Multi-level discovery with override behavior
127
+ - **Custom**: Implement your own
128
+
129
+ ## API Overview
130
+
131
+ ### CRUD Operations
132
+
133
+ ```typescript
134
+ // Create
135
+ const entity = await ctx.create('person', {
136
+ name: 'John Doe',
137
+ company: 'Acme',
138
+ });
139
+
140
+ // Read
141
+ const person = await ctx.get('person', 'john-doe');
142
+ const allPeople = await ctx.getAll('person');
143
+
144
+ // Update
145
+ await ctx.update('person', 'john-doe', {
146
+ company: 'NewCo',
147
+ });
148
+
149
+ // Delete
150
+ await ctx.delete('person', 'john-doe');
151
+ ```
152
+
153
+ ### Search and Query
154
+
155
+ ```typescript
156
+ // Simple search
157
+ const results = await ctx.quickSearch('john');
158
+
159
+ // Advanced query
160
+ const results = await ctx.search({
161
+ type: ['person', 'term'],
162
+ search: 'api',
163
+ searchFields: ['company', 'expansion'],
164
+ limit: 20,
165
+ sort: [{ field: 'name', direction: 'asc' }],
166
+ });
167
+
168
+ // Query builder
169
+ import { query } from '@utilarium/overcontext';
170
+
171
+ const q = query()
172
+ .type('person')
173
+ .search('acme', ['company'])
174
+ .sortBy('name', 'desc')
175
+ .limit(10)
176
+ .build();
177
+
178
+ const results = await ctx.search(q);
179
+ ```
180
+
181
+ ### CLI Building
182
+
183
+ ```typescript
184
+ import { createCLIBuilder } from '@utilarium/overcontext';
185
+
186
+ const cli = createCLIBuilder({ api: ctx });
187
+
188
+ // List entities
189
+ const output = await cli.list({
190
+ type: 'person',
191
+ format: 'table',
192
+ });
193
+ console.log(output);
194
+
195
+ // Get entity
196
+ const entity = await cli.get({
197
+ type: 'person',
198
+ id: 'john-doe',
199
+ format: 'yaml',
200
+ });
201
+ ```
202
+
203
+ ## Documentation
204
+
205
+ - [Defining Schemas](./guide/defining-schemas.md)
206
+ - [Storage Providers](./guide/storage-providers.md)
207
+ - [Namespaces](./guide/namespaces.md)
208
+ - [Building a CLI](./guide/building-cli.md)
209
+
210
+ Full documentation: [https://utilarium.github.io/overcontext/](https://utilarium.github.io/overcontext/)
211
+
212
+ ## Example: Personal Knowledge Management
213
+
214
+ ```typescript
215
+ import { z } from 'zod';
216
+ import { discoverOvercontext, BaseEntitySchema } from '@utilarium/overcontext';
217
+
218
+ // Define your domain
219
+ const PersonSchema = BaseEntitySchema.extend({
220
+ type: z.literal('person'),
221
+ company: z.string().optional(),
222
+ role: z.string().optional(),
223
+ email: z.string().email().optional(),
224
+ });
225
+
226
+ const ProjectSchema = BaseEntitySchema.extend({
227
+ type: z.literal('project'),
228
+ status: z.enum(['active', 'completed', 'archived']),
229
+ owner: z.string().optional(),
230
+ repository: z.string().url().optional(),
231
+ });
232
+
233
+ const TermSchema = BaseEntitySchema.extend({
234
+ type: z.literal('term'),
235
+ expansion: z.string(),
236
+ category: z.string().optional(),
237
+ });
238
+
239
+ // Create context
240
+ const ctx = await discoverOvercontext({
241
+ schemas: {
242
+ person: PersonSchema,
243
+ project: ProjectSchema,
244
+ term: TermSchema,
245
+ },
246
+ pluralNames: {
247
+ person: 'people',
248
+ },
249
+ });
250
+
251
+ // Use it
252
+ await ctx.create('person', {
253
+ name: 'Alice Johnson',
254
+ company: 'Acme Corp',
255
+ role: 'Engineering Manager',
256
+ email: 'alice@acme.com',
257
+ });
258
+
259
+ await ctx.create('project', {
260
+ name: 'Overcontext',
261
+ status: 'active',
262
+ owner: 'alice-johnson',
263
+ repository: 'https://github.com/utilarium/overcontext',
264
+ });
265
+
266
+ await ctx.create('term', {
267
+ name: 'API',
268
+ expansion: 'Application Programming Interface',
269
+ category: 'technology',
270
+ });
271
+
272
+ // Search across types
273
+ const results = await ctx.search({
274
+ search: 'acme',
275
+ searchFields: ['company', 'owner'],
276
+ });
277
+ ```
278
+
279
+ ## Requirements
280
+
281
+ - Node.js >= 24.0.0
282
+ - TypeScript >= 5.0.0 (for type safety)
283
+
284
+ ## License
285
+
286
+ Apache-2.0 © Tim O'Brien
@@ -0,0 +1,26 @@
1
+ import { SchemaMap } from '../schema/registry';
2
+ import { StorageProvider } from '../storage/interface';
3
+ import { OvercontextAPI } from './context';
4
+ /**
5
+ * Helper to create a type-safe API from schemas.
6
+ *
7
+ * @example
8
+ * const api = await createTypedAPI({
9
+ * schemas: {
10
+ * person: PersonSchema,
11
+ * term: TermSchema,
12
+ * },
13
+ * provider,
14
+ * });
15
+ *
16
+ * // Types flow through
17
+ * const person = await api.get('person', 'john'); // Returns Person
18
+ */
19
+ export interface TypedAPIOptions<TSchemas extends SchemaMap> {
20
+ schemas: TSchemas;
21
+ provider: StorageProvider;
22
+ defaultNamespace?: string;
23
+ /** Custom plural names for directory mapping */
24
+ pluralNames?: Partial<Record<keyof TSchemas, string>>;
25
+ }
26
+ export declare const createTypedAPI: <TSchemas extends SchemaMap>(options: TypedAPIOptions<TSchemas>) => OvercontextAPI<TSchemas>;
@@ -0,0 +1,24 @@
1
+ import { createSchemaRegistry } from '../schema/registry.js';
2
+ import { createContext } from './context.js';
3
+
4
+ const createTypedAPI = (options)=>{
5
+ const { schemas, provider, defaultNamespace, pluralNames = {} } = options;
6
+ // Create registry from schemas
7
+ const registry = createSchemaRegistry();
8
+ for (const [type, schema] of Object.entries(schemas)){
9
+ registry.register({
10
+ type,
11
+ schema: schema,
12
+ pluralName: pluralNames[type]
13
+ });
14
+ }
15
+ return createContext({
16
+ provider,
17
+ registry,
18
+ schemas,
19
+ defaultNamespace
20
+ });
21
+ };
22
+
23
+ export { createTypedAPI };
24
+ //# sourceMappingURL=builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.js","sources":["../../src/api/builder.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseEntity } from '../schema/base';\nimport { SchemaMap, createSchemaRegistry } from '../schema/registry';\nimport { StorageProvider } from '../storage/interface';\nimport { OvercontextAPI, createContext } from './context';\n\n/**\n * Helper to create a type-safe API from schemas.\n * \n * @example\n * const api = await createTypedAPI({\n * schemas: {\n * person: PersonSchema,\n * term: TermSchema,\n * },\n * provider,\n * });\n * \n * // Types flow through\n * const person = await api.get('person', 'john'); // Returns Person\n */\nexport interface TypedAPIOptions<TSchemas extends SchemaMap> {\n schemas: TSchemas;\n provider: StorageProvider;\n defaultNamespace?: string;\n\n /** Custom plural names for directory mapping */\n pluralNames?: Partial<Record<keyof TSchemas, string>>;\n}\n\nexport const createTypedAPI = <TSchemas extends SchemaMap>(\n options: TypedAPIOptions<TSchemas>\n): OvercontextAPI<TSchemas> => {\n const { schemas, provider, defaultNamespace, pluralNames = {} } = options;\n\n // Create registry from schemas\n const registry = createSchemaRegistry();\n\n for (const [type, schema] of Object.entries(schemas)) {\n registry.register({\n type,\n schema: schema as z.ZodType<BaseEntity>,\n pluralName: (pluralNames as Record<string, string>)[type],\n });\n }\n\n return createContext({\n provider,\n registry,\n schemas,\n defaultNamespace,\n });\n};\n"],"names":["createTypedAPI","options","schemas","provider","defaultNamespace","pluralNames","registry","createSchemaRegistry","type","schema","Object","entries","register","pluralName","createContext"],"mappings":";;;AA8BO,MAAMA,iBAAiB,CAC1BC,OAAAA,GAAAA;IAEA,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,WAAAA,GAAc,EAAE,EAAE,GAAGJ,OAAAA;;AAGlE,IAAA,MAAMK,QAAAA,GAAWC,oBAAAA,EAAAA;IAEjB,KAAK,MAAM,CAACC,IAAAA,EAAMC,MAAAA,CAAO,IAAIC,MAAAA,CAAOC,OAAO,CAACT,OAAAA,CAAAA,CAAU;AAClDI,QAAAA,QAAAA,CAASM,QAAQ,CAAC;AACdJ,YAAAA,IAAAA;YACAC,MAAAA,EAAQA,MAAAA;YACRI,UAAAA,EAAaR,WAAsC,CAACG,IAAAA;AACxD,SAAA,CAAA;AACJ,IAAA;AAEA,IAAA,OAAOM,aAAAA,CAAc;AACjBX,QAAAA,QAAAA;AACAG,QAAAA,QAAAA;AACAJ,QAAAA,OAAAA;AACAE,QAAAA;AACJ,KAAA,CAAA;AACJ;;;;"}
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod';
2
+ import { BaseEntity } from '../schema/base';
3
+ import { SchemaRegistry, SchemaMap } from '../schema/registry';
4
+ import { StorageProvider } from '../storage/interface';
5
+ import { QueryOptions, QueryResult } from './query';
6
+ /**
7
+ * Options for creating an entity.
8
+ */
9
+ export interface CreateOptions {
10
+ /** Override auto-generated ID */
11
+ id?: string;
12
+ /** Namespace to create in */
13
+ namespace?: string;
14
+ /** Whether to generate unique ID on collision */
15
+ generateUniqueId?: boolean;
16
+ }
17
+ /**
18
+ * Main context API for entity operations.
19
+ * Type safety flows from registered schemas.
20
+ */
21
+ export interface OvercontextAPI<TSchemas extends SchemaMap = SchemaMap> {
22
+ /**
23
+ * The underlying storage provider.
24
+ */
25
+ readonly provider: StorageProvider;
26
+ /**
27
+ * The schema registry.
28
+ */
29
+ readonly registry: SchemaRegistry;
30
+ /**
31
+ * Default namespace for operations.
32
+ */
33
+ readonly defaultNamespace?: string;
34
+ /**
35
+ * Get an entity by type and ID.
36
+ */
37
+ get<K extends keyof TSchemas & string>(type: K, id: string, namespace?: string): Promise<z.infer<TSchemas[K]> | undefined>;
38
+ /**
39
+ * Get all entities of a type.
40
+ */
41
+ getAll<K extends keyof TSchemas & string>(type: K, namespace?: string): Promise<z.infer<TSchemas[K]>[]>;
42
+ /**
43
+ * Check if an entity exists.
44
+ */
45
+ exists(type: string, id: string, namespace?: string): Promise<boolean>;
46
+ /**
47
+ * Create a new entity.
48
+ */
49
+ create<K extends keyof TSchemas & string>(type: K, data: Omit<z.infer<TSchemas[K]>, 'id' | 'type'> & {
50
+ name: string;
51
+ }, options?: CreateOptions): Promise<z.infer<TSchemas[K]>>;
52
+ /**
53
+ * Update an existing entity.
54
+ */
55
+ update<K extends keyof TSchemas & string>(type: K, id: string, updates: Partial<Omit<z.infer<TSchemas[K]>, 'id' | 'type'>>, namespace?: string): Promise<z.infer<TSchemas[K]>>;
56
+ /**
57
+ * Create or update an entity.
58
+ */
59
+ upsert<K extends keyof TSchemas & string>(type: K, entity: Omit<z.infer<TSchemas[K]>, 'type'> & {
60
+ id: string;
61
+ name: string;
62
+ }, namespace?: string): Promise<z.infer<TSchemas[K]>>;
63
+ /**
64
+ * Delete an entity.
65
+ */
66
+ delete(type: string, id: string, namespace?: string): Promise<boolean>;
67
+ /**
68
+ * List all registered entity types.
69
+ */
70
+ types(): string[];
71
+ /**
72
+ * Create a namespaced context.
73
+ */
74
+ withNamespace(namespace: string): OvercontextAPI<TSchemas>;
75
+ /**
76
+ * Search entities.
77
+ */
78
+ search<T extends BaseEntity>(options: QueryOptions): Promise<QueryResult<T>>;
79
+ /**
80
+ * Quick search by name.
81
+ */
82
+ quickSearch<T extends BaseEntity>(query: string, options?: Pick<QueryOptions, 'type' | 'namespace' | 'limit'>): Promise<T[]>;
83
+ }
84
+ export interface CreateContextOptions<TSchemas extends SchemaMap> {
85
+ provider: StorageProvider;
86
+ registry: SchemaRegistry;
87
+ schemas: TSchemas;
88
+ defaultNamespace?: string;
89
+ }
90
+ export declare const createContext: <TSchemas extends SchemaMap>(options: CreateContextOptions<TSchemas>) => OvercontextAPI<TSchemas>;
@@ -0,0 +1,94 @@
1
+ import { EntityNotFoundError } from '../storage/errors.js';
2
+ import { generateUniqueId, slugify } from './slug.js';
3
+ import { createSearchEngine } from './search.js';
4
+
5
+ const createContext = (options)=>{
6
+ const { provider, registry, defaultNamespace } = options;
7
+ const resolveNamespace = (ns)=>ns !== null && ns !== void 0 ? ns : defaultNamespace;
8
+ const searchEngine = createSearchEngine({
9
+ provider,
10
+ registry,
11
+ defaultNamespace
12
+ });
13
+ const api = {
14
+ provider,
15
+ registry,
16
+ defaultNamespace,
17
+ async get (type, id, namespace) {
18
+ return provider.get(type, id, resolveNamespace(namespace));
19
+ },
20
+ async getAll (type, namespace) {
21
+ return provider.getAll(type, resolveNamespace(namespace));
22
+ },
23
+ async exists (type, id, namespace) {
24
+ return provider.exists(type, id, resolveNamespace(namespace));
25
+ },
26
+ async create (type, data, options = {}) {
27
+ var _options_generateUniqueId;
28
+ const namespace = resolveNamespace(options.namespace);
29
+ const shouldGenerateUnique = (_options_generateUniqueId = options.generateUniqueId) !== null && _options_generateUniqueId !== void 0 ? _options_generateUniqueId : true;
30
+ let id;
31
+ if (options.id) {
32
+ id = options.id;
33
+ } else if (shouldGenerateUnique) {
34
+ id = await generateUniqueId(data.name, (testId)=>provider.exists(type, testId, namespace));
35
+ } else {
36
+ id = slugify(data.name);
37
+ }
38
+ const entity = {
39
+ ...data,
40
+ id,
41
+ type,
42
+ createdAt: new Date(),
43
+ updatedAt: new Date()
44
+ };
45
+ return provider.save(entity, namespace);
46
+ },
47
+ async update (type, id, updates, namespace) {
48
+ const ns = resolveNamespace(namespace);
49
+ const existing = await provider.get(type, id, ns);
50
+ if (!existing) {
51
+ throw new EntityNotFoundError(type, id, ns);
52
+ }
53
+ const updated = {
54
+ ...existing,
55
+ ...updates,
56
+ id,
57
+ type,
58
+ updatedAt: new Date()
59
+ };
60
+ return provider.save(updated, ns);
61
+ },
62
+ async upsert (type, entity, namespace) {
63
+ const ns = resolveNamespace(namespace);
64
+ const existing = await provider.get(type, entity.id, ns);
65
+ const now = new Date();
66
+ const toSave = {
67
+ ...existing,
68
+ ...entity,
69
+ type,
70
+ createdAt: (existing === null || existing === void 0 ? void 0 : existing.createdAt) || now,
71
+ updatedAt: now
72
+ };
73
+ return provider.save(toSave, ns);
74
+ },
75
+ async delete (type, id, namespace) {
76
+ return provider.delete(type, id, resolveNamespace(namespace));
77
+ },
78
+ types () {
79
+ return registry.types();
80
+ },
81
+ withNamespace (namespace) {
82
+ return createContext({
83
+ ...options,
84
+ defaultNamespace: namespace
85
+ });
86
+ },
87
+ search: searchEngine.search.bind(searchEngine),
88
+ quickSearch: searchEngine.quickSearch.bind(searchEngine)
89
+ };
90
+ return api;
91
+ };
92
+
93
+ export { createContext };
94
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sources":["../../src/api/context.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseEntity } from '../schema/base';\nimport { SchemaRegistry, SchemaMap } from '../schema/registry';\nimport { StorageProvider } from '../storage/interface';\nimport { EntityNotFoundError } from '../storage/errors';\nimport { generateUniqueId, slugify } from './slug';\nimport { createSearchEngine } from './search';\nimport { QueryOptions, QueryResult } from './query';\n\n/**\n * Options for creating an entity.\n */\nexport interface CreateOptions {\n /** Override auto-generated ID */\n id?: string;\n\n /** Namespace to create in */\n namespace?: string;\n\n /** Whether to generate unique ID on collision */\n generateUniqueId?: boolean;\n}\n\n/**\n * Main context API for entity operations.\n * Type safety flows from registered schemas.\n */\nexport interface OvercontextAPI<TSchemas extends SchemaMap = SchemaMap> {\n /**\n * The underlying storage provider.\n */\n readonly provider: StorageProvider;\n\n /**\n * The schema registry.\n */\n readonly registry: SchemaRegistry;\n\n /**\n * Default namespace for operations.\n */\n readonly defaultNamespace?: string;\n\n // --- Generic Operations ---\n\n /**\n * Get an entity by type and ID.\n */\n get<K extends keyof TSchemas & string>(\n type: K,\n id: string,\n namespace?: string\n ): Promise<z.infer<TSchemas[K]> | undefined>;\n\n /**\n * Get all entities of a type.\n */\n getAll<K extends keyof TSchemas & string>(\n type: K,\n namespace?: string\n ): Promise<z.infer<TSchemas[K]>[]>;\n\n /**\n * Check if an entity exists.\n */\n exists(\n type: string,\n id: string,\n namespace?: string\n ): Promise<boolean>;\n\n /**\n * Create a new entity.\n */\n create<K extends keyof TSchemas & string>(\n type: K,\n data: Omit<z.infer<TSchemas[K]>, 'id' | 'type'> & { name: string },\n options?: CreateOptions\n ): Promise<z.infer<TSchemas[K]>>;\n\n /**\n * Update an existing entity.\n */\n update<K extends keyof TSchemas & string>(\n type: K,\n id: string,\n updates: Partial<Omit<z.infer<TSchemas[K]>, 'id' | 'type'>>,\n namespace?: string\n ): Promise<z.infer<TSchemas[K]>>;\n\n /**\n * Create or update an entity.\n */\n upsert<K extends keyof TSchemas & string>(\n type: K,\n entity: Omit<z.infer<TSchemas[K]>, 'type'> & { id: string; name: string },\n namespace?: string\n ): Promise<z.infer<TSchemas[K]>>;\n\n /**\n * Delete an entity.\n */\n delete(\n type: string,\n id: string,\n namespace?: string\n ): Promise<boolean>;\n\n /**\n * List all registered entity types.\n */\n types(): string[];\n\n /**\n * Create a namespaced context.\n */\n withNamespace(namespace: string): OvercontextAPI<TSchemas>;\n\n /**\n * Search entities.\n */\n search<T extends BaseEntity>(options: QueryOptions): Promise<QueryResult<T>>;\n\n /**\n * Quick search by name.\n */\n quickSearch<T extends BaseEntity>(\n query: string,\n options?: Pick<QueryOptions, 'type' | 'namespace' | 'limit'>\n ): Promise<T[]>;\n}\n\nexport interface CreateContextOptions<TSchemas extends SchemaMap> {\n provider: StorageProvider;\n registry: SchemaRegistry;\n schemas: TSchemas;\n defaultNamespace?: string;\n}\n\nexport const createContext = <TSchemas extends SchemaMap>(\n options: CreateContextOptions<TSchemas>\n): OvercontextAPI<TSchemas> => {\n const { provider, registry, defaultNamespace } = options;\n\n const resolveNamespace = (ns?: string) => ns ?? defaultNamespace;\n\n const searchEngine = createSearchEngine({\n provider,\n registry,\n defaultNamespace,\n });\n\n const api: OvercontextAPI<TSchemas> = {\n provider,\n registry,\n defaultNamespace,\n\n async get<K extends keyof TSchemas & string>(\n type: K,\n id: string,\n namespace?: string\n ): Promise<z.infer<TSchemas[K]> | undefined> {\n return provider.get(type, id, resolveNamespace(namespace));\n },\n\n async getAll<K extends keyof TSchemas & string>(\n type: K,\n namespace?: string\n ): Promise<z.infer<TSchemas[K]>[]> {\n return provider.getAll(type, resolveNamespace(namespace));\n },\n\n async exists(\n type: string,\n id: string,\n namespace?: string\n ): Promise<boolean> {\n return provider.exists(type, id, resolveNamespace(namespace));\n },\n\n async create<K extends keyof TSchemas & string>(\n type: K,\n data: Omit<z.infer<TSchemas[K]>, 'id' | 'type'> & { name: string },\n options: CreateOptions = {}\n ): Promise<z.infer<TSchemas[K]>> {\n const namespace = resolveNamespace(options.namespace);\n const shouldGenerateUnique = options.generateUniqueId ?? true;\n\n let id: string;\n if (options.id) {\n id = options.id;\n } else if (shouldGenerateUnique) {\n id = await generateUniqueId(\n data.name,\n (testId) => provider.exists(type, testId, namespace)\n );\n } else {\n id = slugify(data.name);\n }\n\n const entity = {\n ...data,\n id,\n type,\n createdAt: new Date(),\n updatedAt: new Date(),\n } as z.infer<TSchemas[K]>;\n\n return provider.save(entity, namespace);\n },\n\n async update<K extends keyof TSchemas & string>(\n type: K,\n id: string,\n updates: Partial<Omit<z.infer<TSchemas[K]>, 'id' | 'type'>>,\n namespace?: string\n ): Promise<z.infer<TSchemas[K]>> {\n const ns = resolveNamespace(namespace);\n const existing = await provider.get(type, id, ns);\n\n if (!existing) {\n throw new EntityNotFoundError(type, id, ns);\n }\n\n const updated = {\n ...existing,\n ...updates,\n id,\n type,\n updatedAt: new Date(),\n } as z.infer<TSchemas[K]>;\n\n return provider.save(updated, ns);\n },\n\n async upsert<K extends keyof TSchemas & string>(\n type: K,\n entity: Omit<z.infer<TSchemas[K]>, 'type'> & { id: string; name: string },\n namespace?: string\n ): Promise<z.infer<TSchemas[K]>> {\n const ns = resolveNamespace(namespace);\n const existing = await provider.get(type, entity.id, ns);\n\n const now = new Date();\n const toSave = {\n ...existing,\n ...entity,\n type,\n createdAt: existing?.createdAt || now,\n updatedAt: now,\n } as z.infer<TSchemas[K]>;\n\n return provider.save(toSave, ns);\n },\n\n async delete(\n type: string,\n id: string,\n namespace?: string\n ): Promise<boolean> {\n return provider.delete(type, id, resolveNamespace(namespace));\n },\n\n types(): string[] {\n return registry.types();\n },\n\n withNamespace(namespace: string): OvercontextAPI<TSchemas> {\n return createContext({\n ...options,\n defaultNamespace: namespace,\n });\n },\n\n search: searchEngine.search.bind(searchEngine),\n quickSearch: searchEngine.quickSearch.bind(searchEngine),\n };\n\n return api;\n};\n"],"names":["createContext","options","provider","registry","defaultNamespace","resolveNamespace","ns","searchEngine","createSearchEngine","api","get","type","id","namespace","getAll","exists","create","data","shouldGenerateUnique","generateUniqueId","name","testId","slugify","entity","createdAt","Date","updatedAt","save","update","updates","existing","EntityNotFoundError","updated","upsert","now","toSave","delete","types","withNamespace","search","bind","quickSearch"],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ export * from './slug';
2
+ export * from './context';
3
+ export * from './builder';
4
+ export * from './query';
5
+ export * from './search';
6
+ export * from './query-builder';