diff --git a/README.md b/README.md index a671364..ffc5a20 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The current repository proves the core shape: - Runtime-scoped resources - Resource reload and invalidation - Resource cache phase 2 (staleTime, deduplicate, cache.key, ResourceKey) +- Resource cache phase 3 (cacheTime — single-runtime stale value retention and eviction) - Independent executable actions - Keyboard Enter default action - Accessible Enter hints @@ -40,17 +41,17 @@ It is not production-ready yet. The goal right now is to keep the foundation sma Intent is available as experimental alpha packages on npm: ```sh -pnpm add @intent-framework/core@0.1.0-alpha.9 @intent-framework/dom@0.1.0-alpha.9 @intent-framework/router@0.1.0-alpha.9 @intent-framework/testing@0.1.0-alpha.9 +pnpm add @intent-framework/core@0.1.0-alpha.10 @intent-framework/dom@0.1.0-alpha.10 @intent-framework/router@0.1.0-alpha.10 @intent-framework/testing@0.1.0-alpha.10 ``` ```sh -npm install @intent-framework/core@0.1.0-alpha.9 @intent-framework/dom@0.1.0-alpha.9 @intent-framework/router@0.1.0-alpha.9 @intent-framework/testing@0.1.0-alpha.9 +npm install @intent-framework/core@0.1.0-alpha.10 @intent-framework/dom@0.1.0-alpha.10 @intent-framework/router@0.1.0-alpha.10 @intent-framework/testing@0.1.0-alpha.10 ``` The quickstart pins the current alpha version so examples match the published APIs. ```txt -Current alpha: v0.1.0-alpha.9 +Current alpha: v0.1.0-alpha.10 First public alpha: v0.1.0-alpha.0 GitHub Releases: https://github.com/intent-framework/intent/releases ``` @@ -255,7 +256,7 @@ The repository includes five runnable examples, each demonstrating a different s |---------|---------------------| | [`canonical-invite`](examples/canonical-invite) | Minimal screen: text ask, primary action, validation, blocked reasons, feedback, `inspectScreen()`. Matches the Quickstart one-to-one. | | [`choice-form`](examples/choice-form) | All state kinds (text, choice, boolean) and ask kinds (`asChoice()`, `asSecret()`, `hint()`), multiple surfaces per screen, flow diagnostics, full test coverage. | -| [`resource-lifecycle`](examples/resource-lifecycle) | Full resource lifecycle: autoLoad, manual load, reload, invalidation, stale detection, failed state, action-driven invalidation with `.invalidates()`. | +| [`resource-lifecycle`](examples/resource-lifecycle) | Full resource lifecycle: autoLoad, manual load, reload, invalidation, stale detection, failed state, action-driven invalidation with `.invalidates()`, staleTime, cache.key, cacheTime. | | [`secret-vault`](examples/secret-vault) | Multi-step flows (3+ steps), `asSecret()` + `private()`, `BooleanState` toggles, multi-screen router app, flow diagnostics. | | [`web-basic`](examples/web-basic) | Multi-screen team invite demo with router, resources, diagnostics panel, feedback, and keyboard default action. | @@ -347,7 +348,7 @@ Current limitations include: * No native renderer yet * No SSR story yet * No backend persistence yet -* Resource cache is phase 2 (staleTime, deduplicate, cache.key); cacheTime, swr, and cross-navigation cache are future +* Resource cache is phase 3 (staleTime, deduplicate, cache.key, cacheTime); swr and cross-navigation cache are future * No DevTools package yet * Automated version PR workflow and manual publish workflow are set up (Changesets configured) * Demo side panels use manual DOM diff --git a/docs/Quickstart.md b/docs/Quickstart.md index 7be9b94..6c9c1d9 100644 --- a/docs/Quickstart.md +++ b/docs/Quickstart.md @@ -7,16 +7,16 @@ This guide shows the fastest path from zero to a semantic screen using published ## 1. Install ```sh -pnpm add @intent-framework/core@0.1.0-alpha.9 @intent-framework/dom@0.1.0-alpha.9 @intent-framework/testing@0.1.0-alpha.9 +pnpm add @intent-framework/core@0.1.0-alpha.10 @intent-framework/dom@0.1.0-alpha.10 @intent-framework/testing@0.1.0-alpha.10 ``` Or with npm: ```sh -npm install @intent-framework/core@0.1.0-alpha.9 @intent-framework/dom@0.1.0-alpha.9 @intent-framework/testing@0.1.0-alpha.9 +npm install @intent-framework/core@0.1.0-alpha.10 @intent-framework/dom@0.1.0-alpha.10 @intent-framework/testing@0.1.0-alpha.10 ``` -The quickstart pins `0.1.0-alpha.9` so the examples match the APIs shown below. +The quickstart pins `0.1.0-alpha.10` so the examples match the APIs shown below. You also need `typescript` and `vitest` for type checking and tests. diff --git a/docs/agent/RELEASE-STATE.md b/docs/agent/RELEASE-STATE.md index 9122e1f..e8c74ca 100644 --- a/docs/agent/RELEASE-STATE.md +++ b/docs/agent/RELEASE-STATE.md @@ -4,10 +4,10 @@ | Package | Version | Published | Notes | |---------|---------|-----------|-------| -| `@intent-framework/core` | `0.1.0-alpha.9` | Yes | alpha prerelease | -| `@intent-framework/dom` | `0.1.0-alpha.9` | Yes | alpha prerelease | -| `@intent-framework/router` | `0.1.0-alpha.9` | Yes | alpha prerelease | -| `@intent-framework/testing` | `0.1.0-alpha.9` | Yes | alpha prerelease | +| `@intent-framework/core` | `0.1.0-alpha.10` | Yes | alpha prerelease | +| `@intent-framework/dom` | `0.1.0-alpha.10` | Yes | alpha prerelease | +| `@intent-framework/router` | `0.1.0-alpha.10` | Yes | alpha prerelease | +| `@intent-framework/testing` | `0.1.0-alpha.10` | Yes | alpha prerelease | | `@intent-framework/server` | `0.1.0` | No | private workspace package | `@intent-framework/server` must remain `"private": true`. Never publish it. diff --git a/examples/resource-lifecycle/index.html b/examples/resource-lifecycle/index.html index 1838a65..de35299 100644 --- a/examples/resource-lifecycle/index.html +++ b/examples/resource-lifecycle/index.html @@ -20,7 +20,7 @@
Demonstrates autoLoad, manual load, reload, invalidation, stale state, failed state, and action-driven invalidation.
+Demonstrates autoLoad, manual load, reload, invalidation, stale state, failed state, action-driven invalidation, staleTime, cache.key, and cacheTime.
Loading...@@ -39,6 +39,9 @@
inspectScreen())failed status and error.cache.cacheTime retains stale value until eviction timeout.cacheTime expiry, stale resource transitions from ready to idle.cacheTime timers.