TK06: libraries in packs (aivopod.vendor, appInlineScript) #637

Merged
oliver.maklott merged 1 commit from tk06-libraries into main 2026-11-10 16:56:09 +01:00

TK06 (Plan 26, Teil AZ, D516): libraries in packs. Stacked on #635 (TK05); merge that first. Replaces #636 (same commit, restacked onto the TK05 test fix without rewriting #636).

Acceptance

  • aivopod.vendor in package.json: only @aivopod/, exact versions (a range like ^1.0.0 → vendor.invalid, foreign scope → vendor.scope)
  • vendor.ts reads node_modules/<pkg>/aivopod-vendor.json; wrong version → vendor.versionMismatch, edited file → vendor.modified (tests)
  • an app of the library is an app of the pack with the same limits; browser → apps/<app>/vendor/; name clash → vendor.appClash (test)
  • <pkg>/check allowed and bundled (pack and pack tests); without aivopod.vendor still importForbidden (test)
  • manifest vendor: [{ name, version, sha256 }] (schema in @aivopod/shared)
  • hint appInlineScript for all apps (test)
  • smoke build against the published @aivopod/sheets 1.0.0: app tabellen-bruecke with 7 scripts, checker core bundled, Safari 15.4 check passes, no inline-script hint

Deviation (D516): pack preview in the CLI already serves apps from the build result, so vendored apps need no CLI code. The CLI (0.50.0, after platform 0.69.0) bumps the packtools pin and sends work files on pack publish.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PVUe4i6vEUY3kHe9imoS6j

TK06 (Plan 26, Teil AZ, D516): libraries in packs. Stacked on #635 (TK05); merge that first. Replaces #636 (same commit, restacked onto the TK05 test fix without rewriting #636). Acceptance - [x] `aivopod.vendor` in `package.json`: only `@aivopod/`, exact versions (a range like `^1.0.0` → `vendor.invalid`, foreign scope → `vendor.scope`) - [x] `vendor.ts` reads `node_modules/<pkg>/aivopod-vendor.json`; wrong version → `vendor.versionMismatch`, edited file → `vendor.modified` (tests) - [x] an app of the library is an app of the pack with the same limits; `browser` → `apps/<app>/vendor/`; name clash → `vendor.appClash` (test) - [x] `<pkg>/check` allowed and bundled (pack and pack tests); without `aivopod.vendor` still `importForbidden` (test) - [x] manifest `vendor: [{ name, version, sha256 }]` (schema in `@aivopod/shared`) - [x] hint `appInlineScript` for all apps (test) - [x] smoke build against the published `@aivopod/sheets` 1.0.0: app `tabellen-bruecke` with 7 scripts, checker core bundled, Safari 15.4 check passes, no inline-script hint Deviation (D516): `pack preview` in the CLI already serves apps from the build result, so vendored apps need no CLI code. The CLI (0.50.0, after platform 0.69.0) bumps the packtools pin and sends work files on `pack publish`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PVUe4i6vEUY3kHe9imoS6j
TK05: work files of packs – downloads/, step field downloads, served by the API and logged (Plan 26, D515)
Some checks failed
check / check (pull_request) Failing after 15m43s
e2e / e2e (pull_request) Has been cancelled
98ff9f39ff
- shared: downloads.ts (names, types, downloads.json, limits); checkDownload in
  @aivopod/shared/zip: a real .xlsx without macros, external links, embedded
  objects or ActiveX; CSV as UTF-8 or Windows-1252 without NUL. StepRef and the
  authoring step get `downloads` (at most five per step).
- SDK: validates `downloads` (invalid-downloads), the manifest names them.
- packtools: reads downloads/ with the same check, download.unknown for a name
  no file has, warning downloadUnused, downloads.json and assets/<hash>.
- API: migration 0102 (pack_downloads, step_events, store_pack with the work
  files); install and publish read and re-check them, stored under
  downloads/<hash>.<ext>, which the assets host never serves. Routes
  GET /api/assignments/:id/steps/:stepId/downloads/:name (own assignment, the
  version she works with, only what the step hands out; logged once per 10 s)
  and GET /api/teacher/packs/:packId/downloads/:name; attachment, sandbox,
  private no-store. schoolPacks lists the newest version's work files.
- Export: records download and help in „Meine Daten“ and the teacher's export;
  archive format 57 carries pack_downloads and step_events.
- Web: links above the task with the sentence about Excel's protected view;
  work files on the teacher's pack list; „Was die Plattform aufzeichnet“.
- SPEC section 5 „Arbeitsdateien“, section 3 export records, D515 refined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4i6vEUY3kHe9imoS6j
TK05: browser tests know the work files – pack list and the recorded list
Some checks failed
check / check (pull_request) Successful in 16m54s
e2e / e2e (pull_request) Successful in 25m37s
publish / release (push) Successful in 2m10s
check / check (push) Has been cancelled
e2e / e2e (push) Has been cancelled
d736d95a3c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4i6vEUY3kHe9imoS6j
TK06: libraries in packs – aivopod.vendor, checked copies, appInlineScript (Plan 26, D516)
All checks were successful
check / check (pull_request) Successful in 16m20s
e2e / e2e (pull_request) Successful in 24m8s
publish / release (push) Successful in 2m22s
check / check (push) Successful in 16m45s
e2e / e2e (push) Successful in 26m2s
f977194682
- project: `aivopod.vendor` – only @aivopod/ packages, exact versions, parts app,
  browser and check.
- vendor.ts: takes the package from node_modules (as the bundler resolves),
  checks version and aivopod-vendor.json, every file against its sha256;
  errors vendor.missing, versionMismatch, manifest, modified, scope, invalid,
  noPart, appClash, noApp.
- readApps: an app of a library becomes an app of the pack with the same
  limits; `browser` puts the scripts into apps/<app>/vendor/.
- bundle: `<package>/check` is allowed in the pack and in its tests and is
  bundled; pack test checks the libraries like pack build.
- manifest: `vendor: [{ name, version, sha256 }]`.
- hint appInlineScript for inline scripts, on… attributes and javascript: links
  in any app's HTML.
- SPEC section 5 „Bibliotheken in Packs“, D516 refined. Checked against the
  published @aivopod/sheets 1.0.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4i6vEUY3kHe9imoS6j
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
aivopod/aivopod-app!637
No description provided.