@redaksjon/context 0.0.3
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/LICENSE.md +65 -0
- package/README.md +224 -0
- package/dist/index.cjs +27 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/index2.cjs +36 -0
- package/dist/index2.cjs.map +1 -0
- package/dist/index2.js +24 -0
- package/dist/index2.js.map +1 -0
- package/dist/index3.cjs +22 -0
- package/dist/index3.cjs.map +1 -0
- package/dist/index3.js +17 -0
- package/dist/index3.js.map +1 -0
- package/dist/index4.cjs +16 -0
- package/dist/index4.cjs.map +1 -0
- package/dist/index4.js +12 -0
- package/dist/index4.js.map +1 -0
- package/dist/index5.cjs +16 -0
- package/dist/index5.cjs.map +1 -0
- package/dist/index5.js +12 -0
- package/dist/index5.js.map +1 -0
- package/dist/index6.cjs +23 -0
- package/dist/index6.cjs.map +1 -0
- package/dist/index6.js +19 -0
- package/dist/index6.js.map +1 -0
- package/dist/index7.cjs +42 -0
- package/dist/index7.cjs.map +1 -0
- package/dist/index7.js +35 -0
- package/dist/index7.js.map +1 -0
- package/dist/index8.cjs +22 -0
- package/dist/index8.cjs.map +1 -0
- package/dist/index8.js +18 -0
- package/dist/index8.js.map +1 -0
- package/dist/schemas/company.d.ts +46 -0
- package/dist/schemas/company.d.ts.map +1 -0
- package/dist/schemas/ignored.d.ts +43 -0
- package/dist/schemas/ignored.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +346 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/person.d.ts +55 -0
- package/dist/schemas/person.d.ts.map +1 -0
- package/dist/schemas/project.d.ts +203 -0
- package/dist/schemas/project.d.ts.map +1 -0
- package/dist/schemas/term.d.ts +55 -0
- package/dist/schemas/term.d.ts.map +1 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +76 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Copyright 2025 Simran Jafari
|
|
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,224 @@
|
|
|
1
|
+
# @redaksjon/context
|
|
2
|
+
|
|
3
|
+
Shared context schemas for redaksjon tools (protokoll, kronologi, and future tools).
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This package provides Zod schemas for redaksjon entity types that are used across multiple tools in the redaksjon ecosystem. It integrates with [@theunwalked/overcontext](https://github.com/theunwalked/utilarium/tree/main/overcontext) for schema-driven context management.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @redaksjon/context @theunwalked/overcontext
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### With Overcontext
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { redaksjonSchemas, redaksjonPluralNames } from '@redaksjon/context';
|
|
21
|
+
import { discoverOvercontext } from '@theunwalked/overcontext';
|
|
22
|
+
|
|
23
|
+
// Discover context with redaksjon schemas
|
|
24
|
+
const ctx = await discoverOvercontext({
|
|
25
|
+
schemas: redaksjonSchemas,
|
|
26
|
+
pluralNames: redaksjonPluralNames,
|
|
27
|
+
contextDirName: '.protokoll',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Type-safe operations
|
|
31
|
+
const person = await ctx.get('person', 'john-doe');
|
|
32
|
+
const allProjects = await ctx.getAll('project');
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Direct Schema Usage
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { PersonSchema, ProjectSchema } from '@redaksjon/context';
|
|
39
|
+
|
|
40
|
+
// Validate data
|
|
41
|
+
const person = PersonSchema.parse({
|
|
42
|
+
id: 'john',
|
|
43
|
+
name: 'John Doe',
|
|
44
|
+
type: 'person',
|
|
45
|
+
company: 'acme-corp',
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Entity Types
|
|
50
|
+
|
|
51
|
+
### Person
|
|
52
|
+
|
|
53
|
+
Named individuals mentioned in transcripts or notes.
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
interface Person {
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
type: 'person';
|
|
60
|
+
firstName?: string;
|
|
61
|
+
lastName?: string;
|
|
62
|
+
company?: string; // Company ID reference
|
|
63
|
+
role?: string; // e.g., "Manager", "Developer"
|
|
64
|
+
sounds_like?: string[]; // Common mishearings
|
|
65
|
+
context?: string; // How user knows them
|
|
66
|
+
createdAt?: Date;
|
|
67
|
+
updatedAt?: Date;
|
|
68
|
+
notes?: string;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Project
|
|
73
|
+
|
|
74
|
+
Work contexts that affect routing and understanding.
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
interface Project {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
type: 'project';
|
|
81
|
+
description?: string;
|
|
82
|
+
classification: {
|
|
83
|
+
context_type: 'work' | 'personal' | 'mixed';
|
|
84
|
+
associated_people?: string[];
|
|
85
|
+
associated_companies?: string[];
|
|
86
|
+
topics?: string[];
|
|
87
|
+
explicit_phrases?: string[];
|
|
88
|
+
};
|
|
89
|
+
routing: {
|
|
90
|
+
destination?: string;
|
|
91
|
+
structure: 'none' | 'year' | 'month' | 'day';
|
|
92
|
+
filename_options: Array<'date' | 'time' | 'subject'>;
|
|
93
|
+
auto_tags?: string[];
|
|
94
|
+
};
|
|
95
|
+
sounds_like?: string[];
|
|
96
|
+
relationships?: {
|
|
97
|
+
parent?: string;
|
|
98
|
+
children?: string[];
|
|
99
|
+
siblings?: string[];
|
|
100
|
+
dependsOn?: string[];
|
|
101
|
+
relatedTerms?: string[];
|
|
102
|
+
};
|
|
103
|
+
active?: boolean;
|
|
104
|
+
createdAt?: Date;
|
|
105
|
+
updatedAt?: Date;
|
|
106
|
+
notes?: string;
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Company
|
|
111
|
+
|
|
112
|
+
Organizations referenced in notes.
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
interface Company {
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
type: 'company';
|
|
119
|
+
fullName?: string;
|
|
120
|
+
industry?: string;
|
|
121
|
+
sounds_like?: string[];
|
|
122
|
+
createdAt?: Date;
|
|
123
|
+
updatedAt?: Date;
|
|
124
|
+
notes?: string;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Term
|
|
129
|
+
|
|
130
|
+
Domain-specific terminology and acronyms.
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
interface Term {
|
|
134
|
+
id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
type: 'term';
|
|
137
|
+
expansion?: string; // Full form if acronym
|
|
138
|
+
domain?: string; // E.g., "engineering", "finance"
|
|
139
|
+
sounds_like?: string[];
|
|
140
|
+
projects?: string[]; // Associated project IDs
|
|
141
|
+
description?: string;
|
|
142
|
+
topics?: string[];
|
|
143
|
+
createdAt?: Date;
|
|
144
|
+
updatedAt?: Date;
|
|
145
|
+
notes?: string;
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### IgnoredTerm
|
|
150
|
+
|
|
151
|
+
Phrases to skip during processing.
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
interface IgnoredTerm {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
type: 'ignored';
|
|
158
|
+
reason?: string;
|
|
159
|
+
ignoredAt?: string; // ISO date string
|
|
160
|
+
createdAt?: Date;
|
|
161
|
+
updatedAt?: Date;
|
|
162
|
+
notes?: string;
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Directory Mapping
|
|
167
|
+
|
|
168
|
+
The package includes mappings between entity types and their storage directories:
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
import { TYPE_TO_DIRECTORY, DIRECTORY_TO_TYPE } from '@redaksjon/context';
|
|
172
|
+
|
|
173
|
+
TYPE_TO_DIRECTORY.person; // 'people'
|
|
174
|
+
TYPE_TO_DIRECTORY.company; // 'companies'
|
|
175
|
+
|
|
176
|
+
DIRECTORY_TO_TYPE.people; // 'person'
|
|
177
|
+
DIRECTORY_TO_TYPE.companies; // 'company'
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Integration with Redaksjon Tools
|
|
181
|
+
|
|
182
|
+
### Protokoll
|
|
183
|
+
|
|
184
|
+
Protokoll uses these schemas for managing context entities:
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
import { create } from './overcontext/adapter';
|
|
188
|
+
|
|
189
|
+
const storage = create();
|
|
190
|
+
await storage.load(['.protokoll/context']);
|
|
191
|
+
|
|
192
|
+
const person = storage.get('person', 'john');
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Kronologi
|
|
196
|
+
|
|
197
|
+
Kronologi uses these schemas for reading shared context:
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
import { initializeContext, lookupPerson } from './context';
|
|
201
|
+
|
|
202
|
+
await initializeContext();
|
|
203
|
+
const person = await lookupPerson('john');
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Development
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Install dependencies
|
|
210
|
+
npm install
|
|
211
|
+
|
|
212
|
+
# Build
|
|
213
|
+
npm run build
|
|
214
|
+
|
|
215
|
+
# Test
|
|
216
|
+
npm run test
|
|
217
|
+
|
|
218
|
+
# Lint
|
|
219
|
+
npm run lint
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## License
|
|
223
|
+
|
|
224
|
+
Apache-2.0
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const index = require('./index2.cjs');
|
|
6
|
+
const types = require('./index3.cjs');
|
|
7
|
+
const company = require('./index4.cjs');
|
|
8
|
+
const ignored = require('./index5.cjs');
|
|
9
|
+
const person = require('./index6.cjs');
|
|
10
|
+
const project = require('./index7.cjs');
|
|
11
|
+
const term = require('./index8.cjs');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.redaksjonPluralNames = index.redaksjonPluralNames;
|
|
16
|
+
exports.redaksjonSchemas = index.redaksjonSchemas;
|
|
17
|
+
exports.DIRECTORY_TO_TYPE = types.DIRECTORY_TO_TYPE;
|
|
18
|
+
exports.TYPE_TO_DIRECTORY = types.TYPE_TO_DIRECTORY;
|
|
19
|
+
exports.CompanySchema = company.CompanySchema;
|
|
20
|
+
exports.IgnoredTermSchema = ignored.IgnoredTermSchema;
|
|
21
|
+
exports.PersonSchema = person.PersonSchema;
|
|
22
|
+
exports.ProjectClassificationSchema = project.ProjectClassificationSchema;
|
|
23
|
+
exports.ProjectRelationshipsSchema = project.ProjectRelationshipsSchema;
|
|
24
|
+
exports.ProjectRoutingSchema = project.ProjectRoutingSchema;
|
|
25
|
+
exports.ProjectSchema = project.ProjectSchema;
|
|
26
|
+
exports.TermSchema = term.TermSchema;
|
|
27
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { redaksjonPluralNames, redaksjonSchemas } from './index2.js';
|
|
2
|
+
export { DIRECTORY_TO_TYPE, TYPE_TO_DIRECTORY } from './index3.js';
|
|
3
|
+
export { CompanySchema } from './index4.js';
|
|
4
|
+
export { IgnoredTermSchema } from './index5.js';
|
|
5
|
+
export { PersonSchema } from './index6.js';
|
|
6
|
+
export { ProjectClassificationSchema, ProjectRelationshipsSchema, ProjectRoutingSchema, ProjectSchema } from './index7.js';
|
|
7
|
+
export { TermSchema } from './index8.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/index2.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const person = require('./index6.cjs');
|
|
6
|
+
const project = require('./index7.cjs');
|
|
7
|
+
const company = require('./index4.cjs');
|
|
8
|
+
const term = require('./index8.cjs');
|
|
9
|
+
const ignored = require('./index5.cjs');
|
|
10
|
+
|
|
11
|
+
const redaksjonSchemas = {
|
|
12
|
+
person: person.PersonSchema,
|
|
13
|
+
project: project.ProjectSchema,
|
|
14
|
+
company: company.CompanySchema,
|
|
15
|
+
term: term.TermSchema,
|
|
16
|
+
ignored: ignored.IgnoredTermSchema
|
|
17
|
+
};
|
|
18
|
+
const redaksjonPluralNames = {
|
|
19
|
+
person: "people",
|
|
20
|
+
company: "companies",
|
|
21
|
+
term: "terms",
|
|
22
|
+
ignored: "ignored",
|
|
23
|
+
project: "projects"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.PersonSchema = person.PersonSchema;
|
|
27
|
+
exports.ProjectClassificationSchema = project.ProjectClassificationSchema;
|
|
28
|
+
exports.ProjectRelationshipsSchema = project.ProjectRelationshipsSchema;
|
|
29
|
+
exports.ProjectRoutingSchema = project.ProjectRoutingSchema;
|
|
30
|
+
exports.ProjectSchema = project.ProjectSchema;
|
|
31
|
+
exports.CompanySchema = company.CompanySchema;
|
|
32
|
+
exports.TermSchema = term.TermSchema;
|
|
33
|
+
exports.IgnoredTermSchema = ignored.IgnoredTermSchema;
|
|
34
|
+
exports.redaksjonPluralNames = redaksjonPluralNames;
|
|
35
|
+
exports.redaksjonSchemas = redaksjonSchemas;
|
|
36
|
+
//# sourceMappingURL=index2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.cjs","sources":["../src/schemas/index.ts"],"sourcesContent":["export * from './person';\nexport * from './project';\nexport * from './company';\nexport * from './term';\nexport * from './ignored';\n\nimport { PersonSchema } from './person';\nimport { ProjectSchema } from './project';\nimport { CompanySchema } from './company';\nimport { TermSchema } from './term';\nimport { IgnoredTermSchema } from './ignored';\n\n/**\n * All redaksjon schemas for use with overcontext.\n * \n * Usage:\n * ```typescript\n * import { redaksjonSchemas } from '@redaksjon/context';\n * import { discoverOvercontext } from '@theunwalked/overcontext';\n * \n * const ctx = await discoverOvercontext({\n * schemas: redaksjonSchemas,\n * pluralNames: redaksjonPluralNames,\n * });\n * ```\n */\nexport const redaksjonSchemas = {\n person: PersonSchema,\n project: ProjectSchema,\n company: CompanySchema,\n term: TermSchema,\n ignored: IgnoredTermSchema,\n};\n\n/**\n * Plural names for directory mapping.\n */\nexport const redaksjonPluralNames = {\n person: 'people',\n company: 'companies',\n term: 'terms',\n ignored: 'ignored',\n project: 'projects',\n};\n"],"names":["PersonSchema","ProjectSchema","CompanySchema","TermSchema","IgnoredTermSchema"],"mappings":";;;;;;;;;;AA0BO,MAAM,gBAAA,GAAmB;AAAA,EAC5B,MAAA,EAAQA,mBAAA;AAAA,EACR,OAAA,EAASC,qBAAA;AAAA,EACT,OAAA,EAASC,qBAAA;AAAA,EACT,IAAA,EAAMC,eAAA;AAAA,EACN,OAAA,EAASC;AACb;AAKO,MAAM,oBAAA,GAAuB;AAAA,EAChC,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,WAAA;AAAA,EACT,IAAA,EAAM,OAAA;AAAA,EACN,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS;AACb;;;;;;;;;;;;;"}
|
package/dist/index2.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PersonSchema } from './index6.js';
|
|
2
|
+
import { ProjectSchema } from './index7.js';
|
|
3
|
+
export { ProjectClassificationSchema, ProjectRelationshipsSchema, ProjectRoutingSchema } from './index7.js';
|
|
4
|
+
import { CompanySchema } from './index4.js';
|
|
5
|
+
import { TermSchema } from './index8.js';
|
|
6
|
+
import { IgnoredTermSchema } from './index5.js';
|
|
7
|
+
|
|
8
|
+
const redaksjonSchemas = {
|
|
9
|
+
person: PersonSchema,
|
|
10
|
+
project: ProjectSchema,
|
|
11
|
+
company: CompanySchema,
|
|
12
|
+
term: TermSchema,
|
|
13
|
+
ignored: IgnoredTermSchema
|
|
14
|
+
};
|
|
15
|
+
const redaksjonPluralNames = {
|
|
16
|
+
person: "people",
|
|
17
|
+
company: "companies",
|
|
18
|
+
term: "terms",
|
|
19
|
+
ignored: "ignored",
|
|
20
|
+
project: "projects"
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { CompanySchema, IgnoredTermSchema, PersonSchema, ProjectSchema, TermSchema, redaksjonPluralNames, redaksjonSchemas };
|
|
24
|
+
//# sourceMappingURL=index2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.js","sources":["../src/schemas/index.ts"],"sourcesContent":["export * from './person';\nexport * from './project';\nexport * from './company';\nexport * from './term';\nexport * from './ignored';\n\nimport { PersonSchema } from './person';\nimport { ProjectSchema } from './project';\nimport { CompanySchema } from './company';\nimport { TermSchema } from './term';\nimport { IgnoredTermSchema } from './ignored';\n\n/**\n * All redaksjon schemas for use with overcontext.\n * \n * Usage:\n * ```typescript\n * import { redaksjonSchemas } from '@redaksjon/context';\n * import { discoverOvercontext } from '@theunwalked/overcontext';\n * \n * const ctx = await discoverOvercontext({\n * schemas: redaksjonSchemas,\n * pluralNames: redaksjonPluralNames,\n * });\n * ```\n */\nexport const redaksjonSchemas = {\n person: PersonSchema,\n project: ProjectSchema,\n company: CompanySchema,\n term: TermSchema,\n ignored: IgnoredTermSchema,\n};\n\n/**\n * Plural names for directory mapping.\n */\nexport const redaksjonPluralNames = {\n person: 'people',\n company: 'companies',\n term: 'terms',\n ignored: 'ignored',\n project: 'projects',\n};\n"],"names":[],"mappings":";;;;;;;AA0BO,MAAM,gBAAA,GAAmB;AAAA,EAC5B,MAAA,EAAQ,YAAA;AAAA,EACR,OAAA,EAAS,aAAA;AAAA,EACT,OAAA,EAAS,aAAA;AAAA,EACT,IAAA,EAAM,UAAA;AAAA,EACN,OAAA,EAAS;AACb;AAKO,MAAM,oBAAA,GAAuB;AAAA,EAChC,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,WAAA;AAAA,EACT,IAAA,EAAM,OAAA;AAAA,EACN,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS;AACb;;;;"}
|
package/dist/index3.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const TYPE_TO_DIRECTORY = {
|
|
6
|
+
person: "people",
|
|
7
|
+
project: "projects",
|
|
8
|
+
company: "companies",
|
|
9
|
+
term: "terms",
|
|
10
|
+
ignored: "ignored"
|
|
11
|
+
};
|
|
12
|
+
const DIRECTORY_TO_TYPE = {
|
|
13
|
+
people: "person",
|
|
14
|
+
projects: "project",
|
|
15
|
+
companies: "company",
|
|
16
|
+
terms: "term",
|
|
17
|
+
ignored: "ignored"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.DIRECTORY_TO_TYPE = DIRECTORY_TO_TYPE;
|
|
21
|
+
exports.TYPE_TO_DIRECTORY = TYPE_TO_DIRECTORY;
|
|
22
|
+
//# sourceMappingURL=index3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index3.cjs","sources":["../src/types.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n PersonSchema,\n ProjectSchema,\n CompanySchema,\n TermSchema,\n IgnoredTermSchema,\n} from './schemas';\n\n// Inferred types from schemas\nexport type Person = z.infer<typeof PersonSchema>;\nexport type Project = z.infer<typeof ProjectSchema>;\nexport type Company = z.infer<typeof CompanySchema>;\nexport type Term = z.infer<typeof TermSchema>;\nexport type IgnoredTerm = z.infer<typeof IgnoredTermSchema>;\n\n// Union type\nexport type RedaksjonEntity = Person | Project | Company | Term | IgnoredTerm;\n\n// Entity type literal\nexport type RedaksjonEntityType = 'person' | 'project' | 'company' | 'term' | 'ignored';\n\n// Type-to-directory mapping (for backwards compatibility)\nexport const TYPE_TO_DIRECTORY: Record<RedaksjonEntityType, string> = {\n person: 'people',\n project: 'projects',\n company: 'companies',\n term: 'terms',\n ignored: 'ignored',\n};\n\n// Directory-to-type mapping\nexport const DIRECTORY_TO_TYPE: Record<string, RedaksjonEntityType> = {\n people: 'person',\n projects: 'project',\n companies: 'company',\n terms: 'term',\n ignored: 'ignored',\n};\n"],"names":[],"mappings":";;;;AAuBO,MAAM,iBAAA,GAAyD;AAAA,EAClE,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,UAAA;AAAA,EACT,OAAA,EAAS,WAAA;AAAA,EACT,IAAA,EAAM,OAAA;AAAA,EACN,OAAA,EAAS;AACb;AAGO,MAAM,iBAAA,GAAyD;AAAA,EAClE,MAAA,EAAQ,QAAA;AAAA,EACR,QAAA,EAAU,SAAA;AAAA,EACV,SAAA,EAAW,SAAA;AAAA,EACX,KAAA,EAAO,MAAA;AAAA,EACP,OAAA,EAAS;AACb;;;;;"}
|
package/dist/index3.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const TYPE_TO_DIRECTORY = {
|
|
2
|
+
person: "people",
|
|
3
|
+
project: "projects",
|
|
4
|
+
company: "companies",
|
|
5
|
+
term: "terms",
|
|
6
|
+
ignored: "ignored"
|
|
7
|
+
};
|
|
8
|
+
const DIRECTORY_TO_TYPE = {
|
|
9
|
+
people: "person",
|
|
10
|
+
projects: "project",
|
|
11
|
+
companies: "company",
|
|
12
|
+
terms: "term",
|
|
13
|
+
ignored: "ignored"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { DIRECTORY_TO_TYPE, TYPE_TO_DIRECTORY };
|
|
17
|
+
//# sourceMappingURL=index3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index3.js","sources":["../src/types.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n PersonSchema,\n ProjectSchema,\n CompanySchema,\n TermSchema,\n IgnoredTermSchema,\n} from './schemas';\n\n// Inferred types from schemas\nexport type Person = z.infer<typeof PersonSchema>;\nexport type Project = z.infer<typeof ProjectSchema>;\nexport type Company = z.infer<typeof CompanySchema>;\nexport type Term = z.infer<typeof TermSchema>;\nexport type IgnoredTerm = z.infer<typeof IgnoredTermSchema>;\n\n// Union type\nexport type RedaksjonEntity = Person | Project | Company | Term | IgnoredTerm;\n\n// Entity type literal\nexport type RedaksjonEntityType = 'person' | 'project' | 'company' | 'term' | 'ignored';\n\n// Type-to-directory mapping (for backwards compatibility)\nexport const TYPE_TO_DIRECTORY: Record<RedaksjonEntityType, string> = {\n person: 'people',\n project: 'projects',\n company: 'companies',\n term: 'terms',\n ignored: 'ignored',\n};\n\n// Directory-to-type mapping\nexport const DIRECTORY_TO_TYPE: Record<string, RedaksjonEntityType> = {\n people: 'person',\n projects: 'project',\n companies: 'company',\n terms: 'term',\n ignored: 'ignored',\n};\n"],"names":[],"mappings":"AAuBO,MAAM,iBAAA,GAAyD;AAAA,EAClE,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,UAAA;AAAA,EACT,OAAA,EAAS,WAAA;AAAA,EACT,IAAA,EAAM,OAAA;AAAA,EACN,OAAA,EAAS;AACb;AAGO,MAAM,iBAAA,GAAyD;AAAA,EAClE,MAAA,EAAQ,QAAA;AAAA,EACR,QAAA,EAAU,SAAA;AAAA,EACV,SAAA,EAAW,SAAA;AAAA,EACX,KAAA,EAAO,MAAA;AAAA,EACP,OAAA,EAAS;AACb;;;;"}
|
package/dist/index4.cjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const zod = require('zod');
|
|
6
|
+
const overcontext = require('@theunwalked/overcontext');
|
|
7
|
+
|
|
8
|
+
const CompanySchema = overcontext.BaseEntitySchema.extend({
|
|
9
|
+
type: zod.z.literal("company"),
|
|
10
|
+
fullName: zod.z.string().optional(),
|
|
11
|
+
industry: zod.z.string().optional(),
|
|
12
|
+
sounds_like: zod.z.array(zod.z.string()).optional()
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
exports.CompanySchema = CompanySchema;
|
|
16
|
+
//# sourceMappingURL=index4.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index4.cjs","sources":["../src/schemas/company.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseEntitySchema } from '@theunwalked/overcontext';\n\n/**\n * Company entity - organizations referenced in notes.\n */\nexport const CompanySchema = BaseEntitySchema.extend({\n type: z.literal('company'),\n \n fullName: z.string().optional(),\n industry: z.string().optional(),\n sounds_like: z.array(z.string()).optional(),\n});\n"],"names":["BaseEntitySchema","z"],"mappings":";;;;;;;AAMO,MAAM,aAAA,GAAgBA,6BAAiB,MAAA,CAAO;AAAA,EACjD,IAAA,EAAMC,KAAA,CAAE,OAAA,CAAQ,SAAS,CAAA;AAAA,EAEzB,QAAA,EAAUA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC9B,QAAA,EAAUA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC9B,aAAaA,KAAA,CAAE,KAAA,CAAMA,MAAE,MAAA,EAAQ,EAAE,QAAA;AACrC,CAAC;;;;"}
|
package/dist/index4.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEntitySchema } from '@theunwalked/overcontext';
|
|
3
|
+
|
|
4
|
+
const CompanySchema = BaseEntitySchema.extend({
|
|
5
|
+
type: z.literal("company"),
|
|
6
|
+
fullName: z.string().optional(),
|
|
7
|
+
industry: z.string().optional(),
|
|
8
|
+
sounds_like: z.array(z.string()).optional()
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { CompanySchema };
|
|
12
|
+
//# sourceMappingURL=index4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index4.js","sources":["../src/schemas/company.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseEntitySchema } from '@theunwalked/overcontext';\n\n/**\n * Company entity - organizations referenced in notes.\n */\nexport const CompanySchema = BaseEntitySchema.extend({\n type: z.literal('company'),\n \n fullName: z.string().optional(),\n industry: z.string().optional(),\n sounds_like: z.array(z.string()).optional(),\n});\n"],"names":[],"mappings":";;;AAMO,MAAM,aAAA,GAAgB,iBAAiB,MAAA,CAAO;AAAA,EACjD,IAAA,EAAM,CAAA,CAAE,OAAA,CAAQ,SAAS,CAAA;AAAA,EAEzB,QAAA,EAAU,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC9B,QAAA,EAAU,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC9B,aAAa,CAAA,CAAE,KAAA,CAAM,EAAE,MAAA,EAAQ,EAAE,QAAA;AACrC,CAAC;;;;"}
|
package/dist/index5.cjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const zod = require('zod');
|
|
6
|
+
const overcontext = require('@theunwalked/overcontext');
|
|
7
|
+
|
|
8
|
+
const IgnoredTermSchema = overcontext.BaseEntitySchema.extend({
|
|
9
|
+
type: zod.z.literal("ignored"),
|
|
10
|
+
reason: zod.z.string().optional(),
|
|
11
|
+
ignoredAt: zod.z.string().optional()
|
|
12
|
+
// ISO date string
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
exports.IgnoredTermSchema = IgnoredTermSchema;
|
|
16
|
+
//# sourceMappingURL=index5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index5.cjs","sources":["../src/schemas/ignored.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseEntitySchema } from '@theunwalked/overcontext';\n\n/**\n * Ignored term - phrases the user doesn't want to be prompted about.\n */\nexport const IgnoredTermSchema = BaseEntitySchema.extend({\n type: z.literal('ignored'),\n \n reason: z.string().optional(),\n ignoredAt: z.string().optional(), // ISO date string\n});\n"],"names":["BaseEntitySchema","z"],"mappings":";;;;;;;AAMO,MAAM,iBAAA,GAAoBA,6BAAiB,MAAA,CAAO;AAAA,EACrD,IAAA,EAAMC,KAAA,CAAE,OAAA,CAAQ,SAAS,CAAA;AAAA,EAEzB,MAAA,EAAQA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC5B,SAAA,EAAWA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS;AACnC,CAAC;;;;"}
|
package/dist/index5.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEntitySchema } from '@theunwalked/overcontext';
|
|
3
|
+
|
|
4
|
+
const IgnoredTermSchema = BaseEntitySchema.extend({
|
|
5
|
+
type: z.literal("ignored"),
|
|
6
|
+
reason: z.string().optional(),
|
|
7
|
+
ignoredAt: z.string().optional()
|
|
8
|
+
// ISO date string
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { IgnoredTermSchema };
|
|
12
|
+
//# sourceMappingURL=index5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index5.js","sources":["../src/schemas/ignored.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseEntitySchema } from '@theunwalked/overcontext';\n\n/**\n * Ignored term - phrases the user doesn't want to be prompted about.\n */\nexport const IgnoredTermSchema = BaseEntitySchema.extend({\n type: z.literal('ignored'),\n \n reason: z.string().optional(),\n ignoredAt: z.string().optional(), // ISO date string\n});\n"],"names":[],"mappings":";;;AAMO,MAAM,iBAAA,GAAoB,iBAAiB,MAAA,CAAO;AAAA,EACrD,IAAA,EAAM,CAAA,CAAE,OAAA,CAAQ,SAAS,CAAA;AAAA,EAEzB,MAAA,EAAQ,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC5B,SAAA,EAAW,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS;AACnC,CAAC;;;;"}
|
package/dist/index6.cjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const zod = require('zod');
|
|
6
|
+
const overcontext = require('@theunwalked/overcontext');
|
|
7
|
+
|
|
8
|
+
const PersonSchema = overcontext.BaseEntitySchema.extend({
|
|
9
|
+
type: zod.z.literal("person"),
|
|
10
|
+
firstName: zod.z.string().optional(),
|
|
11
|
+
lastName: zod.z.string().optional(),
|
|
12
|
+
company: zod.z.string().optional(),
|
|
13
|
+
// Company ID reference
|
|
14
|
+
role: zod.z.string().optional(),
|
|
15
|
+
// e.g., "Manager", "Developer"
|
|
16
|
+
sounds_like: zod.z.array(zod.z.string()).optional(),
|
|
17
|
+
// Common mishearings
|
|
18
|
+
context: zod.z.string().optional()
|
|
19
|
+
// How user knows them
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.PersonSchema = PersonSchema;
|
|
23
|
+
//# sourceMappingURL=index6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index6.cjs","sources":["../src/schemas/person.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseEntitySchema } from '@theunwalked/overcontext';\n\n/**\n * Person entity - named individuals the user frequently mentions.\n */\nexport const PersonSchema = BaseEntitySchema.extend({\n type: z.literal('person'),\n \n firstName: z.string().optional(),\n lastName: z.string().optional(),\n company: z.string().optional(), // Company ID reference\n role: z.string().optional(), // e.g., \"Manager\", \"Developer\"\n sounds_like: z.array(z.string()).optional(), // Common mishearings\n context: z.string().optional(), // How user knows them\n});\n"],"names":["BaseEntitySchema","z"],"mappings":";;;;;;;AAMO,MAAM,YAAA,GAAeA,6BAAiB,MAAA,CAAO;AAAA,EAChD,IAAA,EAAMC,KAAA,CAAE,OAAA,CAAQ,QAAQ,CAAA;AAAA,EAExB,SAAA,EAAWA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC/B,QAAA,EAAUA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC9B,OAAA,EAASA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAC7B,IAAA,EAAMA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAC1B,aAAaA,KAAA,CAAE,KAAA,CAAMA,MAAE,MAAA,EAAQ,EAAE,QAAA,EAAS;AAAA;AAAA,EAC1C,OAAA,EAASA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS;AACjC,CAAC;;;;"}
|
package/dist/index6.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEntitySchema } from '@theunwalked/overcontext';
|
|
3
|
+
|
|
4
|
+
const PersonSchema = BaseEntitySchema.extend({
|
|
5
|
+
type: z.literal("person"),
|
|
6
|
+
firstName: z.string().optional(),
|
|
7
|
+
lastName: z.string().optional(),
|
|
8
|
+
company: z.string().optional(),
|
|
9
|
+
// Company ID reference
|
|
10
|
+
role: z.string().optional(),
|
|
11
|
+
// e.g., "Manager", "Developer"
|
|
12
|
+
sounds_like: z.array(z.string()).optional(),
|
|
13
|
+
// Common mishearings
|
|
14
|
+
context: z.string().optional()
|
|
15
|
+
// How user knows them
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export { PersonSchema };
|
|
19
|
+
//# sourceMappingURL=index6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index6.js","sources":["../src/schemas/person.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseEntitySchema } from '@theunwalked/overcontext';\n\n/**\n * Person entity - named individuals the user frequently mentions.\n */\nexport const PersonSchema = BaseEntitySchema.extend({\n type: z.literal('person'),\n \n firstName: z.string().optional(),\n lastName: z.string().optional(),\n company: z.string().optional(), // Company ID reference\n role: z.string().optional(), // e.g., \"Manager\", \"Developer\"\n sounds_like: z.array(z.string()).optional(), // Common mishearings\n context: z.string().optional(), // How user knows them\n});\n"],"names":[],"mappings":";;;AAMO,MAAM,YAAA,GAAe,iBAAiB,MAAA,CAAO;AAAA,EAChD,IAAA,EAAM,CAAA,CAAE,OAAA,CAAQ,QAAQ,CAAA;AAAA,EAExB,SAAA,EAAW,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC/B,QAAA,EAAU,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC9B,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAC7B,IAAA,EAAM,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA;AAAA,EAC1B,aAAa,CAAA,CAAE,KAAA,CAAM,EAAE,MAAA,EAAQ,EAAE,QAAA,EAAS;AAAA;AAAA,EAC1C,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS;AACjC,CAAC;;;;"}
|