Skip to content

Commit 0ba5e06

Browse files
feat(scenarios): gallery export owes the template mode — unmanaged install with the sample data copied (#38646)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9St4eUWHFcCKuRUrCZPperJ)_ Fixes #35266 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:应用市场图库里的每个应用,上架前都要先像试用客户那样以"可编辑副本"方式装一遍,带着示例数据回答问数问题;导出的应用包本身也声明成可编辑副本安装的模板。 - 为什么做:属于"客户可以从应用市场中下载安装试用"这条路,替图库发布(下一步上架到应用市场)先证明试用装得上、装上就能用。 - 出错会怎样:试用安装被拒或副本上答错的应用不会进图库,原因写在图库 PR 的"Refused"一节;这是内部图库流水线,改动可整体回退。 - 要你做什么:无。 ## What changes - **Runner, `--template-sample-data`** (`src/runner/orchestrate.ts`, `cli.ts`, `app.ts`, `scorecard.ts`): template mode installs the passing scratch build unmanaged with the card's seed rows as the package's `data[]` (the same `sampleDataOf` rows the export writes) and the install door's seed copy on (`seedSampleData: true`). The fresh copies a Run half moves to install the same way. The Run half then seeds nothing (`seedFromCopy`). It reads the card's rows back from the copy, and a row the copy does not hold is refused by name, so `seedDependence` leaves every turn that reads it not measured. It binds the copied rows to the persona users it creates after the copy: `owner_id`, a persona record's `user` field and a user-handle field, one data-API update per row, only where they differ. Then it asks over those rows. The record keeps the door's report (`seed.copied`), the bound fields (`seed.bound`) and `template.seedSampleData`. The scorecard's Seed cell reads `N/M copied by the install`. Without the flag nothing changes, and the flag is refused when `--modes` leaves template out. - **Refresh** (`src/export/refresh.ts`): `runnerArgv` asks for `--modes scratch,template --template-sample-data`, and the PR body's Run line says so. - **Pass rule** (`src/export/pass.ts`): the record owes the template mode run that way. Each of these keeps the card out with a reason of its own, which `refreshPrBody` lists under `Refused`: no template mode; a template mode without the copy; a skipped template mode; an unmanaged install the door refused (its status, code and message); a template half that did not pass. - **Trial package** (`src/export/trial-package.ts`, new `src/export/stack-config.ts`): the config's `manifest` literal gains `installModes: ['unmanaged']` through an AST splice, every other byte kept, and `objectstack.manifest.json` gains `solutionType: 'template'`. The export is refused, each case with its reason, when the manifest cannot be read as written, when it declares install modes without `unmanaged`, or when the build carries code `plugins` (`defineStack` refuses that install mode beside code). Install modes already declared with `unmanaged` are kept. - **Check** (`src/export/check.ts`): new finding `app-install-modes`. It fires when the `manifest:` literal of `source/objectstack.config.ts`, read as written, has no `installModes` containing `'unmanaged'`. The TypeScript API loads only when a config is judged, so an empty gallery still loads none. - README (modes table, refresh steps, check list) and one `patch` changeset. ## Tests The card's four pins, each ablated once and restored. Every mutation landed through `scripts/ablation-replace.mjs`, and each restore was proved by blob equal to HEAD and an empty `git diff HEAD`: 1. **A template-half refusal keeps a card out** (`exporter.test.ts`, `[#35266] the gallery owes the template half…`). A 422 `UNMANAGED_INSTALL_UNCOPYABLE` install answer gives the door's words as the first reason, followed by the three template halves `not-run`. Nothing is exported, and the refresh PR body lists the card under `## Refused (1)`. A failed template half, a record with no template mode, and a template mode without the copy are each refused too. Ablation: `pass.ts` install-refusal branch replaced with `else if (false)`, so 1 of 1 failed; restored. 2. **The sample-data questions run over the copied rows** (`orchestrate.test.ts`, `runCard — --template-sample-data…`). Every template-mode app holds exactly `sampleDataOf(card).datasets` and made 0 runner seed loads. `seed.copied` is `{ mode: 'inline', inserted: 8, errors: 0 }`, and Sam's accounts are bound to the sdr's user. When the copy does not hold a row, the template half's contact questions are not measured while the scratch half, which uses the runner's own seed, measures them. A copy that did not load refuses all 8 rows with the door's reason. Without the flag the half seeds as before. Ablation: `seedCopy ? seedFromCopy(` replaced with `false ? …`, so 4 of 5 failed; restored. 3. **The exporter writes both manifest keys** (`exporter.test.ts`, the trial-package describes). Ablation (a) dropped `withInstallModes` from the config write: 2 failed. Ablation (b) deleted `solutionType`: 3 failed. Both restored. 4. **`--check` refuses a manifest without `unmanaged`** (`check.test.ts`, `checkGallery — install modes…`). The finding fires for no `installModes`, for `['managed']`, for a non-literal list and for a non-literal manifest. `['managed', 'unmanaged']` passes clean, and so does the exporter's own output. Ablation: the `checkInstallModes` call deleted, so 3 failed; restored. Also smoke-run on the **built** bin: `node bin/objectstack-scenarios.js export-gallery --check` on the exporter's clean tree printed `gallery check: clean`, exit 0. The same tree with the spliced line removed printed one `app-install-modes` finding, exit 1. <details><summary>Package suite and typecheck at 6e32cf7</summary> - `pnpm --filter @objectstack/scenarios build && pnpm --filter @objectstack/scenarios test` under the verify lock: `Test Files 45 passed (45)`, `Tests 1424 passed (1424)`, `VERDICT command-exit 0`. - `tsc --noEmit -p packages/qa/scenarios/tsconfig.json`: exit 0. </details> ## Acceptance notes - **The persona binding after the copy is the runner's.** The copied rows are the trial package's rows, owned by the installer, with user-handle fields left unset. The persona users do not exist until the half creates them, so the runner sets only the owner, the persona record's `user` field and the handle fields, the same values its own seed writes, before asking. Without that step every persona-scoped question would read rows nobody owns. No row content comes from the runner. - **What the template half installs is the scratch FIRST build**, as template mode always has (`runCard`'s `verified`). The iterate change is then applied to the copy. The exported `source/` is the scratch project after its own iterate, so the unmanaged install of that exact iterated tree is not itself installed by the run. The new `plugins` refusal and the check cover the two keys that decide `defineStack`'s verdict. - **NOT MEASURED live**: the seed copy's answer shape (`data.seeded` counts with no per-row list), the copy keeping the card's row ids, and the admin's data-API update of `owner_id`. These were read from the install door's source (`marketplace-install-local-plugin.ts`, `loadUnmanagedCopySeeds`) and its dogfood (`install-local-unmanaged-seed-copy`). The card's own verification comment measured the ids kept on a real install. No live AI driver run was made, per the dispatch. The proof is the package's doubles. - In copy mode the sample rows already exist while the agent authors the iterate change, as they would for a trial user. In runner-seeded mode they arrive after it. - The scorecard already drew one column per mode. A record now holds the template mode, so `scorecard.md` shows it, and its Seed cell says the rows were copied. - The gallery's existing export (`asset_lifecycle`) carries an `app-install-modes` finding under the next published check until the next refresh rewrites it. The changeset says so. - Outside this card, reported to the seat: the blank scaffold on `main` now declares `data: [articles]` (`packages/create-objectstack/src/templates/blank/objectstack.config.ts`). The exporter's existing `withSampleData` refuses such a config with "already declares `data:`" (probe on this tree: `REFUSED`). So once that scaffold reaches a stable release, every card built on it would stay out of the gallery. Not fixed here. ## Verification Read first, by risk: `src/runner/orchestrate.ts` (`seedFromCopy` and the `withInstalledBuild` hunk that adds `data` after the collections and the baseline are read), `src/export/pass.ts` (`judgeRecord`'s template reasons), `src/export/stack-config.ts`. Two minutes: `pnpm --filter @objectstack/scenarios exec vitest run test/runner/orchestrate.test.ts -t template-sample-data`. Expect 5 passed, with no `--` before the filter. <details><summary>Gates (local subset, at 6e32cf7)</summary> - Derived with `node scripts/pm/dispatch-gates.mjs --commands` at `6e32cf71e`: 70 families. All 70 were run, and 69 exited 0. - `node scripts/check-plugin-teardown-shape.mjs --self-test` first exited 3 because this shallow clone could not reach its pinned fixture commit. I fetched that one commit (`--depth=1`) and reran it: exit 0, `48 cases pass`. - `pnpm check:dual-build-cjs-loads`: exit 3, **NOT MEASURED**, reason `PREREQUISITE NOT MET`: 63 packages have no `dist/`, and a full-repo build is CI's job. Its `--self-test` passed (94 cases). As a narrower local probe, every built CJS entry of `@objectstack/scenarios` loads with `require` (`bin`, `cli`, `export-check`, `export`, `index`, `runner`, `score-full`, `score`). The CI check-run is the verdict. - `dispatch-gates --ran` with each exit code recorded: `70 derived famil(ies) accounted for — 69 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)`. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE <!-- signed: repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent b28e22f commit 0ba5e06

17 files changed

Lines changed: 734 additions & 96 deletions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
feat(scenarios): a gallery app exports only when it also installs as a trial copy, with its sample data, and answers there
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`gallery-refresh` now runs `run-scenarios --modes scratch,template --template-sample-data`. The new `--template-sample-data` flag makes template mode install the passing scratch build unmanaged with the card's seed rows as the package's sample data (the same rows the export writes into `source/src/sample-data.json`) and the install door's seed copy on (`seedSampleData: true`). Its Run half then seeds nothing itself: it reads the card's rows back from the copy, binds the copied rows to the persona users it creates afterwards (`owner_id`, a persona record's `user` field, a user-handle field), and asks every question and operation over those rows. A card row the copy does not hold is refused by name, so every turn that reads it is not measured. The record keeps the door's report (`seed.copied`) and the bound fields (`seed.bound`), `template.seedSampleData` says the install asked for the copy, and the scorecard's Seed cell reads `N/M copied by the install`. Without the flag, template mode seeds as before. The flag is refused when `--modes` leaves template out.
11+
12+
The exporter's pass rule now owes the template mode run that way, beside scratch mode's six halves. A record without it, a template mode run without the sample data copied, a refused unmanaged install (the door's status, code and message are the reason) or a failed template half keeps the card out of the gallery. The reason shows in the refresh PR body under `Refused`.
13+
14+
The exported `source/` now installs as the customer's own editable copy. `objectstack.config.ts`'s `manifest` gains `installModes: ['unmanaged']` and `objectstack.manifest.json` gains `solutionType: 'template'`. A build that carries code `plugins` is refused, because `defineStack` refuses that install mode beside code. Install modes the build already declares with `'unmanaged'` are kept as they are.
15+
16+
`export-gallery --check` gains the `app-install-modes` finding: an app whose `source/objectstack.config.ts` `manifest:` literal, read as written, declares no `installModes` containing `'unmanaged'`. A gallery tree exported before this release carries that finding until the next refresh rewrites it.

‎packages/qa/scenarios/README.md‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ npx @objectstack/scenarios help # the comma
471471
| Mode | Steps |
472472
|:---|:---|
473473
| `scratch` | `create-objectstack` → the agent builds from the card prompt and the runner's data contract (`prompts.ts`) → `objectstack validate` / `build` / `verify` (proofs chosen from the tags) → score → `objectstack dev --fresh` → seed, one user + permission-set grant + API key per persona → every question as every persona it names and every operation as its persona, over the app's MCP → the iterate change → rebuild, re-score, re-run |
474-
| `template` | a blank host project (`host<code>`) → boot → install the card's verified build **unmanaged** (`/api/v1/marketplace/install-local`, `installMode: 'unmanaged'`) → the agent applies the iterate change to the installed copy → score → seed → Run. A refused install is a finding in the record |
474+
| `template` | a blank host project (`host<code>`) → boot → install the card's verified build **unmanaged** (`/api/v1/marketplace/install-local`, `installMode: 'unmanaged'`) → the agent applies the iterate change to the installed copy → score → seed → Run. A refused install is a finding in the record. With `--template-sample-data` (the gallery's run) the install carries the card's seed rows as the package's sample data, exactly as the gallery exports them, with the door's seed copy on (`seedSampleData: true`, `template.seedSampleData` in the record), and the Run half seeds nothing: it reads the card's rows back from the copy (one not there is refused by name, so what reads it is not measured), binds the copied rows to the persona users it creates after the copy (`owner_id`, a persona record's `user` field, a user-handle field, one update each; `seed.bound`), and asks over them. The scorecard's Seed cell reads `N/M copied by the install` |
475475
| `ask` | the same install of the same verified build as `template`, into a blank host of its own → seed → Run, and nothing else: no authoring turn, no score, no iterate. Ask mode edits nothing, so a build the unmanaged door refuses `UNMANAGED_INSTALL_UNCOPYABLE` (it carries an item no environment row can hold, such as a `capability`) is installed unchanged through the same door with `installMode: 'managed'`; the record's `template.installMode` says which mode the run used, and `template.unmanagedRefusal` keeps the refusal it fell back from. No other refusal falls back, and template mode never does. Off by default (`--modes ask`, or `--modes scratch,ask`) |
476476

477477
- **Ask mode** (`orchestrate.ts`, `scorecard.ts`): `--modes ask` runs only the Run half — every question (with
@@ -798,16 +798,21 @@ that version, it prints one `skip: …` line and exits 0, having run nothing. It
798798
`export/<version>` branch exists: that refresh was pushed and awaits review. Otherwise it:
799799

800800
1. runs every card the gallery may show (origin `generic`, tier `starter` or `delivery`; `--debut`: the first of them
801-
by id) with `run-scenarios --modes scratch --packages published --create-version <version>`, so the apps are built
802-
on exactly that release, the turns recorded;
803-
2. exports with screenshots into the checkout (`export-gallery`'s rules: only a run that passed every half). Each
801+
by id) with `run-scenarios --modes scratch,template --template-sample-data --packages published --create-version
802+
<version>`, so the apps are built on exactly that release, the turns recorded, and each passing scratch build is
803+
installed as a trial user installs it: unmanaged, the card's seed rows copied by the install, the iterate change
804+
applied to the copy and the questions asked over the copied rows;
805+
2. exports with screenshots into the checkout (`export-gallery`'s rules: only a run that passed every half, scratch
806+
mode's and template mode's; a record without the template mode run so, a refused install or a failed template half
807+
keeps the card out, its reason in the PR body under `Refused`; the scorecard shows both columns). Each
804808
app's `source/` is written as a package a customer installs to try, after scoring so the build is never graded on
805809
it (`src/export/trial-package.ts`): `objectstack.manifest.json` carries the card's English title and one-sentence
806810
requirement as `displayName` and `description`, the Chinese pair under `translations.zh`, and the card's
807811
`businessFunctions`; `src/sample-data.json` carries the card's seed rows as stack `data:` datasets (namespaced
808812
objects, `externalId: 'id'`, a user-handle field left out), which `objectstack.config.ts` imports into its `data:`.
809-
`installModes` and `solutionType` are not written: `installModes: ['unmanaged']` makes `defineStack` refuse an app
810-
that carries code `plugins` or `capability` items, which an app on the standard scaffold does;
813+
The config's `manifest` gains `installModes: ['unmanaged']` and the listing `solutionType: 'template'`, so the
814+
package installs as the customer's own editable copy; a build that carries code `plugins` is refused, since
815+
`defineStack` refuses that install mode beside code;
811816
3. creates the branch `export/<version>`, commits `apps/` and `index.json` under the checkout's own git identity, and
812817
prints the branch, the commit and a ready PR body.
813818

@@ -875,7 +880,9 @@ tree: `index.json` that does not validate (absent is an empty gallery); an entry
875880
(README, run record, scorecard and transcript in JSON and Markdown, `source/objectstack.config.ts`, at least one
876881
screenshot, every listed screenshot on disk and none unlisted); an app whose package arrives with no sample data (no
877882
`source/src/sample-data.json`, one that is not a non-empty list of stack `data:` datasets the spec's `SeedSchema`
878-
accepts, each with a record, or a `source/objectstack.config.ts` that does not import it); a directory under `apps/` no entry lists; a
883+
accepts, each with a record, or a `source/objectstack.config.ts` that does not import it); an app whose package does
884+
not install as an editable copy (`app-install-modes`: the `manifest:` literal of `source/objectstack.config.ts`, read as
885+
written, declares no `installModes` containing `'unmanaged'`); a directory under `apps/` no entry lists; a
879886
`framework.version` that is not a stable release published for `@objectstack/cli` (read with `npm view … versions`,
880887
only when the index lists an app); and anywhere in the tree a `.env*` name, a `node_modules` directory, a symbolic link
881888
or a text file naming a local absolute path.

‎packages/qa/scenarios/src/export/check.ts‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
* valid against the spec's `SeedSchema`, each with at
2727
* least one record), or `source/objectstack.config.ts`
2828
* does not import it ({@link SAMPLE_DATA_SPECIFIER}).
29+
* app-install-modes an entry's package does not install as an editable copy:
30+
* `source/objectstack.config.ts`'s default-exported
31+
* `defineStack({ … })` literal has no `manifest:` literal
32+
* whose `installModes`, read as written
33+
* ({@link declaredInstallModes}), contains `unmanaged`
34+
* (absent reads as `['managed']`, which a trial cannot
35+
* install).
2936
* app-screenshots an entry lists no screenshot, a listed screenshot is not
3037
* on disk, or `screenshots/` holds a file the entry does
3138
* not list.
@@ -53,18 +60,21 @@
5360

5461
import { execFileSync } from 'node:child_process';
5562
import { existsSync, lstatSync, readdirSync, readFileSync } from 'node:fs';
63+
import { createRequire } from 'node:module';
5664
import { join } from 'node:path';
5765

5866
import { SeedSchema } from '@objectstack/spec/data';
5967

6068
import { APP_LAYOUT, FRAMEWORK_PACKAGE, SAMPLE_DATA_FILE, SAMPLE_DATA_SPECIFIER, STABLE_VERSION } from './contract.js';
6169
import { GalleryIndexSchema, type GalleryApp } from './manifest.js';
70+
import { declaredInstallModes, type Ts } from './stack-config.js';
6271

6372
export const FINDING_CODES = [
6473
'index-json',
6574
'app-missing',
6675
'app-incomplete',
6776
'app-sample-data',
77+
'app-install-modes',
6878
'app-screenshots',
6979
'app-unlisted',
7080
'framework-version',
@@ -172,6 +182,7 @@ export function checkGallery(dir: string, opts: CheckOptions): GalleryFinding[]
172182
add('app-incomplete', `${rel}/${APP_LAYOUT.source}`, `a complete app directory holds its metadata source, ${APP_LAYOUT.source}/${SOURCE_REQUIRED} at least, and this one does not`);
173183
}
174184
checkSampleData(dir, app, add);
185+
checkInstallModes(dir, app, add);
175186
checkScreenshots(dir, app, add);
176187
}
177188
const v = app.framework.version;
@@ -226,6 +237,23 @@ function checkSampleData(dir: string, app: GalleryApp, add: AddFinding): void {
226237
}
227238
}
228239

240+
/** The TypeScript compiler API, loaded the first time a config is judged (a check of an empty gallery never loads it). */
241+
let typescript: Ts | undefined;
242+
const loadTs = (): Ts => (typescript ??= createRequire(import.meta.url)('typescript') as Ts);
243+
244+
/** The trial package installs as an editable copy: the config's `manifest.installModes`, as written, contains `unmanaged`. */
245+
function checkInstallModes(dir: string, app: GalleryApp, add: AddFinding): void {
246+
const rel = `apps/${app.id}/${APP_LAYOUT.source}/${SOURCE_REQUIRED}`;
247+
const config = join(dir, rel);
248+
if (!isFile(config)) return; // an incomplete source is `app-incomplete` already
249+
const read = declaredInstallModes(loadTs(), readFileSync(config, 'utf8'));
250+
const trial = 'a gallery app is a package a customer installs to try, as an editable copy, so its `manifest.installModes` contains \'unmanaged\'';
251+
if ('refusal' in read) add('app-install-modes', rel, `${trial}; ${read.refusal}`);
252+
else if (!read.modes.includes('unmanaged')) {
253+
add('app-install-modes', rel, `${trial}, and ${read.declared ? `this one declares [${read.modes.map((m) => `'${m}'`).join(', ')}]` : 'this one declares none, which installs managed only'}`);
254+
}
255+
}
256+
229257
function checkScreenshots(dir: string, app: GalleryApp, add: AddFinding): void {
230258
const rel = `apps/${app.id}/${APP_LAYOUT.screenshots}`;
231259
if (app.screenshots.length === 0) add('app-screenshots', rel, `index.json lists no screenshot for \`${app.id}\`: an app is shown with its screenshots`);

‎packages/qa/scenarios/src/export/exporter.ts‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@
1111
* 1. the card is loaded, marked generic and of a gallery tier ({@link GalleryGuard});
1212
* 2. ⛔ the run was on published packages ({@link unpublishedRunRefusal}): a
1313
* `--packages workspace` run is never exported or shown;
14-
* 3. the record passed every half ({@link judgeRecord});
14+
* 3. the record passed every half ({@link judgeRecord}): scratch mode's, and
15+
* template mode's, run as a trial user installs the app (unmanaged, the
16+
* card's sample data copied by the install), so a refused install or a
17+
* failed template half keeps the card out;
1518
* 4. the run's scratch project is still on disk, with its build, and its
1619
* source can be made the trial package ({@link trialPackageSource}): its
1720
* config default-exports a `defineStack({ … })` literal that declares no
18-
* `data:` of its own, and the build declares every object the card seeds;
21+
* `data:` of its own and a `manifest:` literal the unmanaged install mode
22+
* can be written into, the build carries no code `plugins`, and it
23+
* declares every object the card seeds;
1924
* 5. its transcript joins with the recording ({@link buildTranscript});
2025
* 6. its screenshots were taken, unless the caller turned them off.
2126
*
@@ -26,7 +31,8 @@
2631
* apps/<id>/README.md what the app is, the driver that ran it ({@link driverText}), what its authoring cost
2732
* ({@link authorCostText}: stated only when every authoring turn reported a cost), its scorecard, the files
2833
* apps/<id>/source/… the authored metadata source (`source.ts`), as a trial package: the
29-
* card's listing text, facet and sample data added after scoring
34+
* card's listing text, facet and sample data, the unmanaged install
35+
* mode and the `template` solution type added after scoring
3036
* (`trial-package.ts`)
3137
* apps/<id>/run-record.json the run record, the work directories redacted (`workDirsOf`)
3238
* apps/<id>/scorecard.json|.md the per-half scorecard
@@ -165,7 +171,7 @@ function appReadme(scenario: LoadedScenario, record: ScenarioRunRecord, entry: G
165171
'',
166172
'## Files',
167173
'',
168-
`- [\`${APP_LAYOUT.source}/\`](./${APP_LAYOUT.source}/) — the app's metadata source, as the AI wrote it (after the change request), with the package's listing text in \`objectstack.manifest.json\` and the card's seed rows as its sample data (\`${SAMPLE_DATA_FILE}\`, read into \`data:\`), both added after scoring`,
174+
`- [\`${APP_LAYOUT.source}/\`](./${APP_LAYOUT.source}/) — the app's metadata source, as the AI wrote it (after the change request), with the package's listing text and solution type in \`objectstack.manifest.json\`, the unmanaged install mode in \`objectstack.config.ts\`, and the card's seed rows as its sample data (\`${SAMPLE_DATA_FILE}\`, read into \`data:\`), all added after scoring`,
169175
`- [\`${APP_LAYOUT.transcriptMd}\`](./${APP_LAYOUT.transcriptMd}) — every data question, each persona's answer and its grade ([JSON](./${APP_LAYOUT.transcriptJson}))`,
170176
`- [\`${APP_LAYOUT.scorecardMd}\`](./${APP_LAYOUT.scorecardMd}) — the scorecard ([JSON](./${APP_LAYOUT.scorecardJson}))`,
171177
`- [\`${APP_LAYOUT.runRecord}\`](./${APP_LAYOUT.runRecord}) — the full run record`,
@@ -304,7 +310,8 @@ async function exportOne(
304310
const authored = readAuthoredSource(projectDir);
305311
// The trial package's listing text, facet and sample data: added to the exported copy only, after scoring.
306312
const builtObjects = new Set(((artifact as { objects?: Array<{ name?: unknown }> }).objects ?? []).map((o) => o?.name).filter((n): n is string => typeof n === 'string'));
307-
const source = await trialPackageSource(authored.files, card, builtObjects);
313+
const plugins = (artifact as { plugins?: unknown }).plugins;
314+
const source = await trialPackageSource(authored.files, card, builtObjects, { plugins: Array.isArray(plugins) ? plugins.length : 0 });
308315
const frameworkVersion = projectFrameworkVersion(projectDir);
309316
const redact = <T,>(v: T): T => redactWorkDir(v, workDirsOf(record.evidenceDir, opts.workDir));
310317
const transcript = redact(buildTranscript(scenario, record, turns));

0 commit comments

Comments
 (0)