@c4a/context 0.7.8 → 0.7.9

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.
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  /** Reader organization is independent of collections, source ownership and outputs. */
3
- export declare const readingStructureEntrySchema: z.ZodObject<{
3
+ export declare const knowledgeMapEntrySchema: z.ZodObject<{
4
4
  key: z.ZodString;
5
5
  parent: z.ZodNullable<z.ZodString>;
6
6
  title: z.ZodString;
@@ -34,7 +34,7 @@ export declare const readingStructureEntrySchema: z.ZodObject<{
34
34
  } | undefined;
35
35
  order?: number | undefined;
36
36
  }>;
37
- export declare const readingStructureUpdateSchema: z.ZodObject<{
37
+ export declare const knowledgeMapUpdateSchema: z.ZodObject<{
38
38
  expected_revision: z.ZodNullable<z.ZodString>;
39
39
  upsert: z.ZodDefault<z.ZodArray<z.ZodObject<{
40
40
  key: z.ZodString;
@@ -98,8 +98,8 @@ export declare const readingStructureUpdateSchema: z.ZodObject<{
98
98
  }[] | undefined;
99
99
  remove?: string[] | undefined;
100
100
  }>;
101
- export declare const readingStructureSchema: z.ZodObject<{
102
- protocol: z.ZodLiteral<"context.reading-structure/v1">;
101
+ export declare const knowledgeMapSchema: z.ZodObject<{
102
+ protocol: z.ZodLiteral<"context.knowledge-map/v1">;
103
103
  revision: z.ZodString;
104
104
  entries: z.ZodArray<z.ZodObject<{
105
105
  key: z.ZodString;
@@ -146,7 +146,7 @@ export declare const readingStructureSchema: z.ZodObject<{
146
146
  section_key?: string | undefined;
147
147
  } | undefined;
148
148
  }[];
149
- protocol: "context.reading-structure/v1";
149
+ protocol: "context.knowledge-map/v1";
150
150
  revision: string;
151
151
  }, {
152
152
  entries: {
@@ -159,30 +159,30 @@ export declare const readingStructureSchema: z.ZodObject<{
159
159
  } | undefined;
160
160
  order?: number | undefined;
161
161
  }[];
162
- protocol: "context.reading-structure/v1";
162
+ protocol: "context.knowledge-map/v1";
163
163
  revision: string;
164
164
  }>;
165
- export type ReadingStructure = z.infer<typeof readingStructureSchema>;
166
- export type ReadingStructureUpdate = z.infer<typeof readingStructureUpdateSchema>;
167
- export declare function validateReadingStructure(value: unknown): ReadingStructure;
168
- export declare function updateReadingStructure(current: ReadingStructure | undefined, value: unknown): ReadingStructure;
169
- export interface ProjectedReadingEntry {
165
+ export type KnowledgeMap = z.infer<typeof knowledgeMapSchema>;
166
+ export type KnowledgeMapUpdate = z.infer<typeof knowledgeMapUpdateSchema>;
167
+ export declare function validateKnowledgeMap(value: unknown): KnowledgeMap;
168
+ export declare function updateKnowledgeMap(current: KnowledgeMap | undefined, value: unknown): KnowledgeMap;
169
+ export interface ProjectedKnowledgeMapEntry {
170
170
  key: string;
171
171
  title: string;
172
172
  href?: string;
173
- children: ProjectedReadingEntry[];
173
+ children: ProjectedKnowledgeMapEntry[];
174
174
  }
175
175
  /** Target availability belongs to each channel. Omit pending/excluded entries and
176
176
  * empty groups without mutating shared organization or another channel's map. */
177
- export declare function projectReadingStructure(structure: ReadingStructure, targets: ReadonlyMap<string, string>): {
178
- entries: ProjectedReadingEntry[];
177
+ export declare function projectKnowledgeMap(structure: KnowledgeMap, targets: ReadonlyMap<string, string>): {
178
+ entries: ProjectedKnowledgeMapEntry[];
179
179
  warnings: {
180
180
  entry: string;
181
- code: "reading-target-unavailable";
181
+ code: "knowledge-map-target-unavailable";
182
182
  target: string;
183
183
  }[];
184
184
  };
185
- export declare function readingTargetKey(target: {
185
+ export declare function knowledgeMapTargetKey(target: {
186
186
  artifact_ref: string;
187
187
  section_key?: string | undefined;
188
188
  }): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/context",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "type": "module",
5
5
  "description": "Declarative SDK for Context knowledge sources, workflows, review, and package outputs",
6
6
  "license": "MIT",
@@ -0,0 +1,25 @@
1
+ import { z } from "zod";
2
+ /** Static website in a sibling dist/<name-without-trailing-kb>-site directory. */
3
+ export declare const packageSiteSchema: z.ZodObject<{
4
+ title: z.ZodOptional<z.ZodString>;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ lang: z.ZodDefault<z.ZodString>;
7
+ base: z.ZodDefault<z.ZodString>;
8
+ }, "strict", z.ZodTypeAny, {
9
+ lang: string;
10
+ base: string;
11
+ title?: string | undefined;
12
+ description?: string | undefined;
13
+ }, {
14
+ title?: string | undefined;
15
+ description?: string | undefined;
16
+ lang?: string | undefined;
17
+ base?: string | undefined;
18
+ }>;
19
+ export type PackageSiteDefinition = z.input<typeof packageSiteSchema>;
20
+ export declare function normalizePackageSite(value: PackageSiteDefinition | undefined): {
21
+ lang: string;
22
+ base: string;
23
+ title?: string | undefined;
24
+ description?: string | undefined;
25
+ } | undefined;