@sanity/ailf-studio 1.11.0 → 1.12.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/README.md +7 -7
- package/dist/index.d.ts +75 -2
- package/dist/index.js +1567 -1437
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -130,12 +130,12 @@ export default defineConfig({
|
|
|
130
130
|
Tasks created in Studio are automatically included in every pipeline run — no
|
|
131
131
|
registration step needed. There are four ways to execute tasks:
|
|
132
132
|
|
|
133
|
-
| Method | Trigger
|
|
134
|
-
| ------------------------------ |
|
|
135
|
-
| **Run Task Eval** action | Click ▶ on any `ailf.task` document
|
|
136
|
-
| **Run AI Eval** release action | Click button on a content release page
|
|
137
|
-
| **CLI
|
|
138
|
-
| **Scheduled pipeline** | GitHub Actions cron (daily + weekly)
|
|
133
|
+
| Method | Trigger | Scope |
|
|
134
|
+
| ------------------------------ | ------------------------------------------------------------ | ----------------------------- |
|
|
135
|
+
| **Run Task Eval** action | Click ▶ on any `ailf.task` document | Single task |
|
|
136
|
+
| **Run AI Eval** release action | Click button on a content release page | Tasks affected by the release |
|
|
137
|
+
| **CLI** | `ailf run` (with optional `--area`/`--task`/`--tag` filters) | All enabled tasks |
|
|
138
|
+
| **Scheduled pipeline** | GitHub Actions cron (daily + weekly) | All enabled tasks |
|
|
139
139
|
|
|
140
140
|
See the
|
|
141
141
|
[CONTRIBUTING_TASKS](https://github.com/sanity-labs/ai-literacy-framework/blob/main/docs/contributing-tasks.md#running-your-task)
|
|
@@ -222,7 +222,7 @@ export default defineConfig({
|
|
|
222
222
|
})
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
Reports are written by the evaluation pipeline (`ailf
|
|
225
|
+
Reports are written by the evaluation pipeline (`ailf run --publish`).
|
|
226
226
|
|
|
227
227
|
## Exported API
|
|
228
228
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import * as sanity from 'sanity';
|
|
2
2
|
import { DocumentActionComponent, ObjectInputProps, StringInputProps, ReleaseActionComponent, Tool } from 'sanity';
|
|
3
|
+
import { StructureResolver, StructureBuilder } from 'sanity/structure';
|
|
3
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
import * as react from 'react';
|
|
5
6
|
import { ReactNode } from 'react';
|
|
6
7
|
import { DocumentRef } from './document-ref.js';
|
|
7
8
|
|
|
9
|
+
/**
|
|
10
|
+
* actions/ArchiveTaskAction.tsx
|
|
11
|
+
*
|
|
12
|
+
* Document action that sets `status: "archived"` on an ailf.task.
|
|
13
|
+
* Archived tasks are excluded from pipeline runs and hidden from the
|
|
14
|
+
* default Active view, but their history and report references are
|
|
15
|
+
* preserved.
|
|
16
|
+
*
|
|
17
|
+
* Only visible on tasks whose current `status` is not already "archived".
|
|
18
|
+
* The twin RestoreTaskAction handles the reverse transition.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
declare const ArchiveTaskAction: DocumentActionComponent;
|
|
22
|
+
|
|
8
23
|
/**
|
|
9
24
|
* actions/GraduateToNativeAction.tsx
|
|
10
25
|
*
|
|
@@ -31,6 +46,16 @@ import { DocumentRef } from './document-ref.js';
|
|
|
31
46
|
|
|
32
47
|
declare const GraduateToNativeAction: DocumentActionComponent;
|
|
33
48
|
|
|
49
|
+
/**
|
|
50
|
+
* actions/RestoreTaskAction.tsx
|
|
51
|
+
*
|
|
52
|
+
* Document action that sets `status: "active"` on an archived ailf.task.
|
|
53
|
+
* Complements ArchiveTaskAction — only visible when the task's current
|
|
54
|
+
* `status` is "archived".
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
declare const RestoreTaskAction: DocumentActionComponent;
|
|
58
|
+
|
|
34
59
|
/**
|
|
35
60
|
* actions/RunTaskEvaluationAction.tsx
|
|
36
61
|
*
|
|
@@ -70,6 +95,46 @@ declare const GraduateToNativeAction: DocumentActionComponent;
|
|
|
70
95
|
*/
|
|
71
96
|
declare const RunTaskEvaluationAction: DocumentActionComponent;
|
|
72
97
|
|
|
98
|
+
/**
|
|
99
|
+
* structure.ts
|
|
100
|
+
*
|
|
101
|
+
* Structure helpers for the `ailf.task` document type. Exposes filtered
|
|
102
|
+
* list views so editors see only active tasks by default and can toggle
|
|
103
|
+
* into draft / paused / archived / all.
|
|
104
|
+
*
|
|
105
|
+
* ## Usage
|
|
106
|
+
*
|
|
107
|
+
* Replace your default structure with the one exported here:
|
|
108
|
+
*
|
|
109
|
+
* ```ts
|
|
110
|
+
* import { structureTool } from "sanity/structure"
|
|
111
|
+
* import { ailfStructure } from "@sanity/ailf-studio"
|
|
112
|
+
*
|
|
113
|
+
* export default defineConfig({
|
|
114
|
+
* // ...
|
|
115
|
+
* plugins: [ailfPlugin(), structureTool({ structure: ailfStructure })],
|
|
116
|
+
* })
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* `ailfStructure` renders a filtered "AILF Tasks" entry in place of the
|
|
120
|
+
* default `ailf.task` list item and preserves every other document type
|
|
121
|
+
* at its Studio default. Consumers who already maintain a custom
|
|
122
|
+
* structure can splice just the list item in via `ailfTaskStructureItem`.
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns the filtered "AILF Tasks" list item. Splice this into an
|
|
127
|
+
* existing structure's `items()` array when the consumer already has
|
|
128
|
+
* their own structure resolver.
|
|
129
|
+
*/
|
|
130
|
+
declare function ailfTaskStructureItem(S: StructureBuilder): ReturnType<StructureBuilder["listItem"]>;
|
|
131
|
+
/**
|
|
132
|
+
* Full structure resolver that replaces the default `ailf.task` entry
|
|
133
|
+
* with the filtered AILF Tasks item and keeps every other document
|
|
134
|
+
* type list item at its Studio default.
|
|
135
|
+
*/
|
|
136
|
+
declare const ailfStructure: StructureResolver;
|
|
137
|
+
|
|
73
138
|
declare function AssertionInput(props: ObjectInputProps): react_jsx_runtime.JSX.Element;
|
|
74
139
|
|
|
75
140
|
declare function CanonicalDocInput(props: ObjectInputProps): react_jsx_runtime.JSX.Element;
|
|
@@ -513,6 +578,14 @@ interface ArtifactRef {
|
|
|
513
578
|
entries?: ArtifactRefEntry[];
|
|
514
579
|
truncated?: boolean;
|
|
515
580
|
preview?: unknown;
|
|
581
|
+
/**
|
|
582
|
+
* D0040 / W0135 — when present, this ref's bytes physically live under a
|
|
583
|
+
* different run's GCS prefix. `path` is already authoritative for
|
|
584
|
+
* resolution; this field is a lineage marker only. Studio mirror uses
|
|
585
|
+
* `string` rather than the branded `RunId` since Studio types deliberately
|
|
586
|
+
* avoid pulling in core's branded-IDs module.
|
|
587
|
+
*/
|
|
588
|
+
sourceRunId?: string;
|
|
516
589
|
}
|
|
517
590
|
/** A single gap/recommendation from gap analysis */
|
|
518
591
|
interface RecommendationGap {
|
|
@@ -1077,7 +1150,7 @@ declare const reportSchema: {
|
|
|
1077
1150
|
* the pipeline; score appears inline when complete (~10–15 min).
|
|
1078
1151
|
* 2. **Run AI Eval** — click on a content release page. Auto-scopes to
|
|
1079
1152
|
* tasks whose canonical docs are in the release.
|
|
1080
|
-
* 3. **CLI** — `ailf
|
|
1153
|
+
* 3. **CLI** — `ailf run --task <id>` or `ailf run --area <area>`.
|
|
1081
1154
|
* 4. **Scheduled** — GitHub Actions cron (daily baseline, weekly full).
|
|
1082
1155
|
*
|
|
1083
1156
|
* Tasks can be authored natively in Studio or mirrored from external
|
|
@@ -1167,4 +1240,4 @@ declare function ailfTool(options?: AilfToolOptions): Tool;
|
|
|
1167
1240
|
*/
|
|
1168
1241
|
declare const ailfPlugin: sanity.Plugin<void>;
|
|
1169
1242
|
|
|
1170
|
-
export { AssertionInput, CanonicalDocInput, type ComparisonData, type ContentImpactItem, GLOSSARY, GraduateToNativeAction, HelpDrawer, HelpProvider, type HelpTopic, MirrorBanner, type PerModelData, type ProvenanceData, ReleasePicker, type ReportDetail, type ReportListItem, type RunEvaluationActionOptions, RunTaskEvaluationAction, type ScoreItem, type SummaryData, SyncStatusBadge, type TimelineDataPoint, ailfPlugin, ailfTool, articleSearchQuery, comparisonPairQuery, contentImpactQuery, createRunEvaluationAction, deriveHelpTopic, distinctAreasQuery, distinctModesQuery, distinctPerspectivesQuery, distinctSourcesQuery, distinctTargetDocumentsQuery, distinctTriggersQuery, evalRequestSchema, featureAreaSchema, findTopic, latestReportsQuery, recentDocumentEvalsQuery, referenceSolutionSchema, reportDetailQuery, reportSchema, scoreTimelineQuery, searchTopics, taskSchema, useHelp, webhookConfigSchema };
|
|
1243
|
+
export { ArchiveTaskAction, AssertionInput, CanonicalDocInput, type ComparisonData, type ContentImpactItem, GLOSSARY, GraduateToNativeAction, HelpDrawer, HelpProvider, type HelpTopic, MirrorBanner, type PerModelData, type ProvenanceData, ReleasePicker, type ReportDetail, type ReportListItem, RestoreTaskAction, type RunEvaluationActionOptions, RunTaskEvaluationAction, type ScoreItem, type SummaryData, SyncStatusBadge, type TimelineDataPoint, ailfPlugin, ailfStructure, ailfTaskStructureItem, ailfTool, articleSearchQuery, comparisonPairQuery, contentImpactQuery, createRunEvaluationAction, deriveHelpTopic, distinctAreasQuery, distinctModesQuery, distinctPerspectivesQuery, distinctSourcesQuery, distinctTargetDocumentsQuery, distinctTriggersQuery, evalRequestSchema, featureAreaSchema, findTopic, latestReportsQuery, recentDocumentEvalsQuery, referenceSolutionSchema, reportDetailQuery, reportSchema, scoreTimelineQuery, searchTopics, taskSchema, useHelp, webhookConfigSchema };
|