@arnilo/prism 0.5.3 → 0.5.5

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +10 -10
  3. package/dist/agent-run-state.d.ts +3 -2
  4. package/dist/agent-run-state.js +1 -2
  5. package/dist/agent-session/session/assemble.js +4 -2
  6. package/dist/contracts-core/run-limits.d.ts +30 -8
  7. package/dist/index.d.ts +2 -2
  8. package/dist/index.js +2 -2
  9. package/dist/run-limits.d.ts +27 -8
  10. package/dist/run-limits.js +93 -29
  11. package/docs/agent-session-runtime.md +1 -1
  12. package/docs/credential-storage.md +1 -1
  13. package/docs/graft.md +1 -1
  14. package/docs/{0.1.0-readiness.md → history/0.1.0-readiness.md} +8 -8
  15. package/docs/history/README.md +11 -0
  16. package/docs/{migrate-to-0.4.md → history/migrate-to-0.4.md} +4 -4
  17. package/docs/history/migration-0.0.md +738 -0
  18. package/docs/history/migration-0.1.md +151 -0
  19. package/docs/history/migration-0.2.md +173 -0
  20. package/docs/history/migration-0.3.md +39 -0
  21. package/docs/history/migration-0.4.md +6 -0
  22. package/docs/{persistence-credentials-multimodality-primitives.md → history/persistence-credentials-multimodality-primitives.md} +13 -13
  23. package/docs/history/release-handoffs.md +848 -0
  24. package/docs/{workflow-orchestration-primitives.md → history/workflow-orchestration-primitives.md} +11 -11
  25. package/docs/host-security.md +1 -1
  26. package/docs/index.md +157 -143
  27. package/docs/migrate-to-0.5.md +11 -1
  28. package/docs/migration.md +19 -1042
  29. package/docs/multimodal-content.md +1 -1
  30. package/docs/performance.md +1 -1
  31. package/docs/postgres-persistence.md +1 -1
  32. package/docs/provider-packages.md +20 -20
  33. package/docs/release-and-install.md +57 -842
  34. package/docs/runs-and-usage.md +2 -2
  35. package/docs/session-stores-and-branching.md +1 -122
  36. package/docs/sqlite-persistence.md +1 -1
  37. package/docs/workflows.md +1 -1
  38. package/package.json +1 -1
  39. /package/docs/{workflow-tui-primitives.md → history/workflow-tui-primitives.md} +0 -0
@@ -1,6 +1,6 @@
1
1
  # Migrate Prism 0.4 to 0.5
2
2
 
3
- > **Status: 0.5.3** (tool-result content fold, additive on the 2026-09-08 `v0.5.2` tag). 0.5.0 covers plans 055–065. 0.5.1 adds kernel provider-request construction. 0.5.2 coalesces stream tokens.
3
+ > **Status: 0.5.4** (run-limit HARD split from host policy, plan 067). 0.5.0 covers plans 055–065. 0.5.1 adds kernel provider-request construction. 0.5.2 coalesces stream tokens. 0.5.3 folds content-only tool results.
4
4
 
5
5
  ## What changes
6
6
 
@@ -126,6 +126,16 @@ What to do:
126
126
  4. Custom generate sites should call `applyDefaultProviderRequestOptions(request, { sessionId, thinkingLevel })`.
127
127
  5. Nothing persisted changes. Session/cache keys are correlation ids, never secrets.
128
128
 
129
+ ## 9. Run limits: HARD vs host policy (plan 067 / 0.5.4, export-shape break)
130
+
131
+ - **Removed export:** `HARD_MAX_RUN_COST` (delete the import; no replacement — `maxCost` now accepts any finite non-negative amount).
132
+ - **Reshaped export:** `HARD_RUN_LIMITS` is now `{ maxRequestBytes: 67108864, maxResponseBytes: 67108864 }` — the only process-safety caps (a giant provider frame cannot OOM the host). Product axes have no hard cap; hosts size them per workload.
133
+ - **New capability:** `RunLimits` policy axes (`maxTurns`, `maxProviderAttempts`, `maxToolRounds`, `maxToolCalls`, `maxWallTimeMs`, `maxInputTokens`, `maxOutputTokens`, `maxTotalTokens`) accept `number | null`. `null` disables the axis; omitted keys resolve to `DEFAULT_RUN_LIMITS` (unchanged fence: 16/24/8/32/120s/8 MiB/40k/10k/50k). Byte axes reject `null` and values above 64 MiB.
134
+ - **New type:** `ResolvedRunLimits` (`resolveRunLimits` return; policy axes `number | null`).
135
+ - **Resolution rules:** narrowing-only is kept — `null` acts as +Infinity, so agent `16` + run `null` → `16`; an omitted `maxProviderAttempts` lifts to `max(24, maxTurns)` (or `null` when `maxTurns` is `null`); explicitly set attempts lift only when both are finite.
136
+ - **Durable state:** runs with `maxWallTimeMs: null` persist checkpoints without `deadlineAt`; older checkpoints with a deadline still resume under it.
137
+ - **Documented ceiling:** vendors that omit usage charge zero to token counters; a configured `maxCost` stays the fail-closed envelope (missing/mixed-currency cost breaches immediately).
138
+
129
139
  ## Upgrade steps
130
140
 
131
141
  1. Bump every `@arnilo/*` dependency/peer to `^0.5.1` (0.5.0 hosts: `^0.5.0` still works until you want construction).