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

Closed
oliver.maklott wants to merge 1 commit from tk06-vendor into main

TK06 (Plan 26, Teil AZ, D516): libraries in packs. Stacked on #635 (TK05) and #634 (pin); merge those first.

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) and #634 (pin); merge those first. 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
TK04: @aivopod/skills 1.5.0 – sheets.cells and sheets.types (Plan 26, D518)
All checks were successful
check / check (pull_request) Successful in 14m0s
e2e / e2e (pull_request) Successful in 26m14s
publish / release (push) Successful in 2m46s
check / check (push) Successful in 17m2s
e2e / e2e (push) Successful in 28m3s
7b48291740
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: 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
TK06: libraries in packs – aivopod.vendor, checked copies, appInlineScript (Plan 26, D516)
Some checks failed
check / check (pull_request) Failing after 16m24s
e2e / e2e (pull_request) Successful in 29m4s
7c0bafd6fe
- 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
Author
Owner

Replaced by #637 (restacked onto the TK05 fix).

Replaced by #637 (restacked onto the TK05 fix).
oliver.maklott closed this pull request 2026-11-10 16:09:31 +01:00
Some checks failed
check / check (pull_request) Failing after 16m24s
e2e / e2e (pull_request) Successful in 29m4s

Pull request closed

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!636
No description provided.