Skip to content

Feature/typedoc - #66

Merged
magmacomputing merged 6 commits into
mainfrom
feature/typedoc
Jul 25, 2026
Merged

Feature/typedoc#66
magmacomputing merged 6 commits into
mainfrom
feature/typedoc

Conversation

@magmacomputing

@magmacomputing magmacomputing commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added the experimental ParseAI plugin for natural-language date parsing, including provider fallback, caching, and rate-limit visibility.
    • Introduced a silent configuration option to suppress verbose native parse error output.
    • Experimental plugins are now surfaced as “Experimental” in the plugin catalog.
  • Bug Fixes
    • Hardened enumify to prevent prototype/registry corruption from invalid execution contexts.
  • Tests
    • Expanded CI plugin test coverage and improved plugin test reliability.
  • Documentation
    • Added detailed ParseAI docs (setup, security, architecture, context, rate limits).
  • Chores
    • Version bumped to 3.10.2 across packages and updated API/documentation build navigation/output.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 64f27d36-3181-49c4-85ee-8d0e6ad252f2

📥 Commits

Reviewing files that changed from the base of the PR and between 6937ad5 and 1f565ea.

📒 Files selected for processing (4)
  • packages/plugins/parseAI/doc/context.md
  • packages/plugins/parseAI/src/cache.ts
  • packages/plugins/parseAI/src/index.ts
  • packages/plugins/parseAI/test/index.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/plugins/parseAI/src/cache.ts
  • packages/plugins/parseAI/test/index.spec.ts
  • packages/plugins/parseAI/src/index.ts

📝 Walkthrough

Walkthrough

Changes

AI parsing plugin

Layer / File(s) Summary
Plugin contracts and runtime
packages/plugins/parseAI/src/*, packages/plugins/parseAI/package.json, packages/plugins/parseAI/ts*
Adds provider configuration, errors, native-first parsing, bounded caching, rate-limit tracking, fallback requests, and Tempo result construction.
Plugin validation and CI wiring
packages/plugins/parseAI/test/*, .github/workflows/ci.yml
Tests parsing, caching, errors, rate limits, fallback, and plugin workspace execution.
Plugin documentation and catalog
packages/plugins/parseAI/*, packages/plugins/.setup/*, packages/tempo/.vitepress/theme/*
Adds plugin documentation, licensing, catalog metadata, experimental styling, and community template guidance.

Tempo integration and release

Layer / File(s) Summary
Silent parsing and test resolution
packages/tempo/src/support/*, packages/tempo/vitest.config.ts, vitest.config.ts
Adds the silent configuration option and aligns Tempo and plugin test resolution.
API documentation output and navigation
packages/tempo/typedoc*.json, packages/tempo/.vitepress/config.ts, .gitignore, packages/tempo/package.json
Moves generated API output under public/api, updates TypeDoc settings and dependencies, and replaces generated sidebar links with fixed API links.
Tempo catalog and release documentation
packages/tempo/.vitepress/theme/*, packages/tempo/CHANGELOG.md, packages/tempo/doc/...
Registers parseAI as experimental and documents the 3.10.2 release changes.

Library hardening and maintenance

Layer / File(s) Summary
Enumify context validation
packages/library/src/common/enumerate.library.ts, packages/library/test/common/enumerate.test.ts, packages/library/CHANGELOG.md
Validates enumify execution context before prototype selection and adds focused regression coverage.
Tempo typing and maintenance notes
packages/tempo/src/tempo.class.ts, packages/tempo/src/interval.class.ts, packages/tempo/plan/*
Adds internal annotations, tightens formatter and tag types, updates interval documentation, and adds a shelved ordinal-offset parsing plan.
Package release versions
package.json, packages/library/package.json, packages/tempo/package.json, packages/tempo/src/tempo.version.ts
Updates package versions to 3.10.2 and records the canonical Tempo version.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant parseAI
  participant Tempo
  participant AIProvider
  Caller->>parseAI: Submit natural-language input
  parseAI->>Tempo: Attempt native parsing
  parseAI->>AIProvider: Send contextual JSON request
  AIProvider-->>parseAI: Return ISO result or provider error
  parseAI->>Tempo: Construct Tempo instance
  parseAI-->>Caller: Return parsed result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too vague and generic to clearly describe the main change in this PR. Rename it to a concise, specific summary of the primary change, such as adding the parseAI plugin and updating TypeDoc outputs.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/typedoc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

🧹 Nitpick comments (3)
packages/library/src/common/enumerate.library.ts (1)

73-91: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add regression coverage for the hardened caller-context check.

Please test the exact invalid Module context that previously caused prototype corruption, and separately verify that normal enum .extend() calls still inherit the enum methods. This protects both sides of the new getType(this) / isFunction(this?.has) branch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/library/src/common/enumerate.library.ts` around lines 73 - 91, Add
regression tests for enumify’s caller-context branching: invoke enumify with the
invalid Module context that previously corrupted the prototype and assert it
uses the safe enum prototype, then verify a normal enum’s extend flow still
inherits and exposes the expected enum methods. Anchor the coverage to enumify
and the existing .extend behavior without changing unrelated functionality.
packages/plugins/parseAI/src/index.ts (2)

11-19: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Unbounded in-memory cache growth.

_state.cache is a module-level Map with no size cap or TTL eviction; every distinct (string, date) pair parsed accumulates indefinitely unless a caller manually invokes clearAiCache. For a long-running server process this is an unbounded memory growth path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/plugins/parseAI/src/index.ts` around lines 11 - 19, Bound the
module-level cache managed through _state.cache so entries cannot accumulate
indefinitely: add and enforce a maximum size and/or TTL eviction when parsing
caches distinct results, while preserving cache reuse and clearAiCache behavior.
Ensure eviction occurs automatically during normal cache access or insertion.

193-194: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Model-name string sniffing for token-limit param is brittle.

isNewOpenAi hardcodes gpt-5/o1/o3 prefixes to decide max_completion_tokens vs max_tokens. Future OpenAI-compatible models (e.g. a hypothetical o4, gpt-6) won't match and will silently use the wrong param name, likely causing a 400 from the provider.

Consider making this configurable per-provider (e.g. an AiProvider.tokenParam field or provider.options override) instead of name-sniffing.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/plugins/parseAI/src/index.ts` around lines 193 - 194, The
token-limit selection in the model request should not depend on hardcoded model
prefixes. Replace the isNewOpenAi name-sniffing in the surrounding
provider/request flow with a configurable provider-level token parameter, such
as AiProvider.tokenParam or an existing provider.options override, and use that
configured value when constructing tokenLimit so future OpenAI-compatible models
select the correct parameter.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 60-61: Align the CI secret and parseAI integration tests so real
network tests execute: update .github/workflows/ci.yml lines 60-61 and
packages/plugins/parseAI/test/index.spec.ts lines 1-133 consistently to use
either OPENAI_API_KEY with the openai provider or GROQ_API_KEY with the groq
provider. Ensure hasKey, initAI, and provider configuration reference the same
key and provider supplied by CI, while preserving the no-key error test’s
behavior.

In `@packages/plugins/parseAI/doc/context.md`:
- Around line 31-35: The “Decoupled Output Bridge” documentation uses an
incorrect timezone-qualified ISO example. Update the example to a local ISO
string without an offset or Z suffix, and explicitly state that provider
responses must omit timezone suffixes to match the contract enforced by the
parseAI implementation.

In `@packages/plugins/parseAI/doc/index.md`:
- Around line 17-19: Fix the blockquote formatting in the parseAI documentation
by removing the blank line between the two quoted paragraphs or prefixing that
line with `>` so the entire note and security warning remains a single valid
blockquote.
- Around line 51-56: Update the “Global Debugging” documentation around initAI
to clearly mark debug: true as development-only. Warn that prompts, localized
context, and raw LLM responses may contain user-supplied or sensitive data, and
recommend disabling debug logging or redacting sensitive values in production.

In `@packages/plugins/parseAI/doc/rate-limits.md`:
- Around line 83-92: Update the “Extensible Caching (Enterprise)” documentation
to match the cache’s synchronous Map<string, string> contract: either document
only synchronous adapters or first define and export a synchronous CacheAdapter
interface for custom stores, and remove or revise the Redis/Edge KV example
unless it implements that contract. Do not describe async adapter methods
without updating the cache implementation to await them.

In `@packages/plugins/parseAI/src/index.ts`:
- Around line 137-165: Update the cache salt and cacheKey construction in the
parseAI flow to include the resolved tz, cal, loc, and sph values alongside the
anchor date. Ensure calls with different timeZone, calendar, locale, or sphere
contexts produce distinct keys while preserving cache hits for identical
resolved contexts; apply the same context-aware keying to the related cache
write around the parsed result.
- Around line 243-262: Validate the LLM response shape before accessing it in
the response-processing flow: ensure data.choices[0].message.content is a
string, and ensure parsedData.iso is a string before using replace. Convert any
missing or invalid fields into TempoAiError failures with the existing 422
contract, while preserving the current JSON parsing and INVALID handling.
- Around line 196-213: Update the provider fetch flow in parseAI to use an
AbortController-based timeout for each fetch(url, ...) request. Ensure the
timeout aborts slow or hanging providers and is handled as a provider failure so
the existing sequential fallback loop can continue to the next provider.

In `@packages/tempo/doc/8-project-and-support/releases/v3.x.md`:
- Around line 5-7: Update the “Observability & Control” entry for the AI plugin
to explicitly describe debug: true as verbose logging that may expose user
input, prompts/context, and raw provider responses; warn users to enable it only
with non-sensitive inputs and avoid implying it is safe for production use.

In `@packages/tempo/src/tempo.class.ts`:
- Line 1206: Update the private `#fmt` declaration and the public fmt getter in
packages/tempo/src/tempo.class.ts at lines 1206 and 1626 to use a partial string
map, reflecting that `#setDelegator`('fmt') may return undefined or omit
registered formats; preserve the existing delegation behavior while allowing
missing format values in both type declarations.

In `@packages/tempo/typedoc.json`:
- Around line 2-4: Update the `API Overview` navigation entry in the VitePress
configuration to target `/api/index.html`, matching the TypeDoc output
configured by `typedoc.json`; alternatively, add an explicit compatibility
redirect from `/doc/api/` to that generated path.

---

Nitpick comments:
In `@packages/library/src/common/enumerate.library.ts`:
- Around line 73-91: Add regression tests for enumify’s caller-context
branching: invoke enumify with the invalid Module context that previously
corrupted the prototype and assert it uses the safe enum prototype, then verify
a normal enum’s extend flow still inherits and exposes the expected enum
methods. Anchor the coverage to enumify and the existing .extend behavior
without changing unrelated functionality.

In `@packages/plugins/parseAI/src/index.ts`:
- Around line 11-19: Bound the module-level cache managed through _state.cache
so entries cannot accumulate indefinitely: add and enforce a maximum size and/or
TTL eviction when parsing caches distinct results, while preserving cache reuse
and clearAiCache behavior. Ensure eviction occurs automatically during normal
cache access or insertion.
- Around line 193-194: The token-limit selection in the model request should not
depend on hardcoded model prefixes. Replace the isNewOpenAi name-sniffing in the
surrounding provider/request flow with a configurable provider-level token
parameter, such as AiProvider.tokenParam or an existing provider.options
override, and use that configured value when constructing tokenLimit so future
OpenAI-compatible models select the correct parameter.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 39c40d10-c104-4749-95e4-38480a5ac81b

📥 Commits

Reviewing files that changed from the base of the PR and between 7d2278f and 50064da.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (39)
  • .github/workflows/ci.yml
  • .gitignore
  • package.json
  • packages/library/CHANGELOG.md
  • packages/library/package.json
  • packages/library/src/common/enumerate.library.ts
  • packages/plugins/.setup/catalog.json
  • packages/plugins/.setup/community-plugin-template.md
  • packages/plugins/parseAI/CHANGELOG.md
  • packages/plugins/parseAI/LICENSE
  • packages/plugins/parseAI/README.md
  • packages/plugins/parseAI/doc/architecture.md
  • packages/plugins/parseAI/doc/context.md
  • packages/plugins/parseAI/doc/index.md
  • packages/plugins/parseAI/doc/rate-limits.md
  • packages/plugins/parseAI/package.json
  • packages/plugins/parseAI/src/error.ts
  • packages/plugins/parseAI/src/index.ts
  • packages/plugins/parseAI/src/parseAI.type.ts
  • packages/plugins/parseAI/test/index.spec.ts
  • packages/plugins/parseAI/test/tsconfig.json
  • packages/plugins/parseAI/tsconfig.json
  • packages/plugins/parseAI/tsup.config.ts
  • packages/tempo/.vitepress/config.ts
  • packages/tempo/.vitepress/theme/components/CatalogList.vue
  • packages/tempo/.vitepress/theme/data/catalog.json
  • packages/tempo/CHANGELOG.md
  • packages/tempo/doc/8-project-and-support/releases/v3.x.md
  • packages/tempo/package.json
  • packages/tempo/plan/ordinal-offset-parsing.md
  • packages/tempo/src/interval.class.ts
  • packages/tempo/src/support/support.default.ts
  • packages/tempo/src/support/support.enum.ts
  • packages/tempo/src/tempo.class.ts
  • packages/tempo/src/tempo.version.ts
  • packages/tempo/typedoc.json
  • packages/tempo/typedoc.library.json
  • packages/tempo/vitest.config.ts
  • vitest.config.ts

Comment thread .github/workflows/ci.yml Outdated
Comment thread packages/plugins/parseAI/doc/context.md Outdated
Comment thread packages/plugins/parseAI/doc/index.md
Comment thread packages/plugins/parseAI/doc/index.md Outdated
Comment thread packages/plugins/parseAI/doc/rate-limits.md
Comment thread packages/plugins/parseAI/src/index.ts Outdated
Comment thread packages/plugins/parseAI/src/index.ts
Comment thread packages/tempo/doc/8-project-and-support/releases/v3.x.md Outdated
Comment thread packages/tempo/src/tempo.class.ts Outdated
Comment thread packages/tempo/typedoc.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/plugins/parseAI/test/index.spec.ts (1)

89-107: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the live-mode rate-limit test issue its own request.

When LIVE_AI_TEST is enabled, this test skips parseAI() and asserts rate-limit state produced by earlier tests. Execute a forced request in both modes so the test is isolated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/plugins/parseAI/test/index.spec.ts` around lines 89 - 107, Update
the “should expose rate limits after a request” test to call parseAI with force
enabled in both live and mocked modes, removing the live-mode skip while
preserving the existing mocked fetch setup for non-live tests. Ensure the
rate-limit assertions use state produced by this test’s own request.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/plugins/parseAI/doc/context.md`:
- Line 35: Soften the final sentence in the parseAI documentation to claim only
that the bridge eliminates AST-construction ambiguity, not general LLM
hallucinations. Preserve the existing description of the local ISO contract and
native Tempo conversion.

In `@packages/plugins/parseAI/src/cache.ts`:
- Around line 35-39: Update the LRU access logic around super.get(key) so
entries whose stored value is undefined are still recognized as present and
refreshed. Use an existence check such as super.has(key) before deleting and
resetting the key, while preserving the existing behavior for missing keys.

In `@packages/plugins/parseAI/test/index.spec.ts`:
- Around line 211-215: Update the “should update BoundedCache options via
initAI” test to assert the cache configuration after each initAI call. Use the
created BoundedCache instance or its observable eviction behavior to verify both
maxCacheSize and cacheTtl values, and remove the unused local setup if it is not
the cache instance configured by initAI.

---

Outside diff comments:
In `@packages/plugins/parseAI/test/index.spec.ts`:
- Around line 89-107: Update the “should expose rate limits after a request”
test to call parseAI with force enabled in both live and mocked modes, removing
the live-mode skip while preserving the existing mocked fetch setup for non-live
tests. Ensure the rate-limit assertions use state produced by this test’s own
request.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6135a950-2674-4ec3-b671-6273371c4b97

📥 Commits

Reviewing files that changed from the base of the PR and between 50064da and 6937ad5.

📒 Files selected for processing (12)
  • .github/workflows/ci.yml
  • packages/library/test/common/enumerate.test.ts
  • packages/plugins/parseAI/doc/context.md
  • packages/plugins/parseAI/doc/index.md
  • packages/plugins/parseAI/doc/rate-limits.md
  • packages/plugins/parseAI/src/cache.ts
  • packages/plugins/parseAI/src/index.ts
  • packages/plugins/parseAI/src/parseAI.type.ts
  • packages/plugins/parseAI/test/index.spec.ts
  • packages/tempo/doc/8-project-and-support/releases/v3.x.md
  • packages/tempo/src/tempo.class.ts
  • packages/tempo/typedoc.json
💤 Files with no reviewable changes (1)
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/tempo/typedoc.json
  • packages/plugins/parseAI/src/parseAI.type.ts
  • packages/plugins/parseAI/doc/index.md
  • packages/tempo/doc/8-project-and-support/releases/v3.x.md
  • packages/plugins/parseAI/doc/rate-limits.md
  • packages/tempo/src/tempo.class.ts
  • packages/plugins/parseAI/src/index.ts

Comment thread packages/plugins/parseAI/doc/context.md Outdated
Comment thread packages/plugins/parseAI/src/cache.ts Outdated
Comment thread packages/plugins/parseAI/test/index.spec.ts
@magmacomputing
magmacomputing merged commit 0acb779 into main Jul 25, 2026
5 checks passed
@magmacomputing
magmacomputing deleted the feature/typedoc branch July 25, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant