@sanity/ailf 4.3.0 → 4.3.1
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/dist/_vendor/ailf-core/schemas/pipeline-request.d.ts +4 -0
- package/dist/_vendor/ailf-core/schemas/pipeline-request.js +7 -0
- package/dist/_vendor/ailf-core/types/pipeline-request.d.ts +1 -0
- package/dist/adapters/api-client/build-request.d.ts +1 -0
- package/dist/adapters/api-client/build-request.js +3 -0
- package/dist/commands/remote-pipeline.js +1 -0
- package/dist/pipeline/map-request-to-config.js +1 -0
- package/package.json +1 -1
|
@@ -43,6 +43,10 @@ export declare const PipelineRequestSchema: z.ZodObject<{
|
|
|
43
43
|
sample: z.ZodOptional<z.ZodNumber>;
|
|
44
44
|
}, z.core.$strip>]>>;
|
|
45
45
|
gapAnalysis: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
graderContext: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
"rubric-only": "rubric-only";
|
|
48
|
+
"with-docs": "with-docs";
|
|
49
|
+
}>>;
|
|
46
50
|
graderReplications: z.ZodOptional<z.ZodNumber>;
|
|
47
51
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
48
52
|
inlineTasks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -106,6 +106,13 @@ export const PipelineRequestSchema = z.object({
|
|
|
106
106
|
dataset: z.string().optional(),
|
|
107
107
|
debug: z.union([z.boolean(), DebugOptionsSchema]).optional(),
|
|
108
108
|
gapAnalysis: z.boolean().optional(),
|
|
109
|
+
/**
|
|
110
|
+
* Grader-context policy (W0196 / DOC-2117). When `"with-docs"`, the
|
|
111
|
+
* canonical reference is injected into the LLM grader's `rubricPrompt`
|
|
112
|
+
* as authoritative ground truth. When omitted or `"rubric-only"`, the
|
|
113
|
+
* grader sees only the rubric template (legacy behavior).
|
|
114
|
+
*/
|
|
115
|
+
graderContext: z.enum(["rubric-only", "with-docs"]).optional(),
|
|
109
116
|
graderReplications: z.number().int().positive().optional(),
|
|
110
117
|
headers: z.record(z.string(), z.string()).optional(),
|
|
111
118
|
inlineTasks: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
@@ -85,6 +85,7 @@ export interface PipelineRequest {
|
|
|
85
85
|
debug?: PipelineRequestDebug | boolean;
|
|
86
86
|
executor?: PipelineRequestCallerExecutor;
|
|
87
87
|
gapAnalysis?: boolean;
|
|
88
|
+
graderContext?: "rubric-only" | "with-docs";
|
|
88
89
|
graderReplications?: number;
|
|
89
90
|
headers?: Record<string, string>;
|
|
90
91
|
inlineTasks?: Record<string, unknown>[];
|
|
@@ -57,6 +57,7 @@ export interface RemoteConfigSlice {
|
|
|
57
57
|
datasetOverride?: string;
|
|
58
58
|
projectIdOverride?: string;
|
|
59
59
|
perspectiveOverride?: string;
|
|
60
|
+
graderContext?: "rubric-only" | "with-docs";
|
|
60
61
|
graderReplications?: number;
|
|
61
62
|
gapAnalysisEnabled?: boolean;
|
|
62
63
|
noRemoteCache?: boolean;
|
|
@@ -124,6 +124,9 @@ export async function buildRemoteRequest(options) {
|
|
|
124
124
|
if (config.perspectiveOverride)
|
|
125
125
|
raw.perspective = config.perspectiveOverride;
|
|
126
126
|
// Advanced
|
|
127
|
+
if (config.graderContext) {
|
|
128
|
+
raw.graderContext = config.graderContext;
|
|
129
|
+
}
|
|
127
130
|
if (config.graderReplications) {
|
|
128
131
|
raw.graderReplications = config.graderReplications;
|
|
129
132
|
}
|
|
@@ -140,6 +140,7 @@ function toConfigSlice(opts) {
|
|
|
140
140
|
datasetOverride: opts.datasetOverride,
|
|
141
141
|
projectIdOverride: opts.projectIdOverride,
|
|
142
142
|
perspectiveOverride: opts.perspectiveOverride,
|
|
143
|
+
graderContext: opts.graderContext,
|
|
143
144
|
graderReplications: opts.graderReplications,
|
|
144
145
|
gapAnalysisEnabled: opts.gapAnalysisEnabled,
|
|
145
146
|
noRemoteCache: opts.noRemoteCache,
|
|
@@ -52,6 +52,7 @@ export function mapRequestToConfig(request, rootDir) {
|
|
|
52
52
|
noAutoScope: request.noAutoScope ?? false,
|
|
53
53
|
noCache: request.noCache ?? false,
|
|
54
54
|
noRemoteCache: request.noRemoteCache ?? false,
|
|
55
|
+
graderContext: request.graderContext,
|
|
55
56
|
graderReplications: request.graderReplications,
|
|
56
57
|
urls: request.urls,
|
|
57
58
|
headers: request.headers,
|