@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.
- package/docs/guides/agent-dialogue.md +5 -4
- package/docs/guides/agent-guide.md +11 -5
- package/docs/guides/indexer-provider-and-customization.md +75 -20
- package/docs/guides/knowledge-updates.md +102 -4
- package/docs/guides/package-outputs.md +213 -47
- package/docs/reference/indexer-provider-protocol.md +19 -0
- package/docs/reference/project-api.md +53 -0
- package/index.d.ts +5 -1
- package/index.js +178 -84
- package/indexerArtifactPolicy.d.ts +4 -4
- package/indexerProtocolHash.d.ts +2 -0
- package/indexerProvider.d.ts +30 -30
- package/indexerRegistry.d.ts +606 -0
- package/indexerSemanticInput.d.ts +255 -951
- package/{readingStructure.d.ts → knowledgeMap.d.ts} +16 -16
- package/package.json +1 -1
- package/packageSite.d.ts +25 -0
|
@@ -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
|
|
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
|
|
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
|
|
102
|
-
protocol: z.ZodLiteral<"context.
|
|
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.
|
|
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.
|
|
162
|
+
protocol: "context.knowledge-map/v1";
|
|
163
163
|
revision: string;
|
|
164
164
|
}>;
|
|
165
|
-
export type
|
|
166
|
-
export type
|
|
167
|
-
export declare function
|
|
168
|
-
export declare function
|
|
169
|
-
export interface
|
|
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:
|
|
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
|
|
178
|
-
entries:
|
|
177
|
+
export declare function projectKnowledgeMap(structure: KnowledgeMap, targets: ReadonlyMap<string, string>): {
|
|
178
|
+
entries: ProjectedKnowledgeMapEntry[];
|
|
179
179
|
warnings: {
|
|
180
180
|
entry: string;
|
|
181
|
-
code: "
|
|
181
|
+
code: "knowledge-map-target-unavailable";
|
|
182
182
|
target: string;
|
|
183
183
|
}[];
|
|
184
184
|
};
|
|
185
|
-
export declare function
|
|
185
|
+
export declare function knowledgeMapTargetKey(target: {
|
|
186
186
|
artifact_ref: string;
|
|
187
187
|
section_key?: string | undefined;
|
|
188
188
|
}): string;
|
package/package.json
CHANGED
package/packageSite.d.ts
ADDED
|
@@ -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;
|