Skip to content

v0.5.0-beta.10: Model capabilities, test harness, and packaging fixes#10

Merged
sbaker merged 11 commits intomainfrom
0.5.0-beta.10
Mar 31, 2026
Merged

v0.5.0-beta.10: Model capabilities, test harness, and packaging fixes#10
sbaker merged 11 commits intomainfrom
0.5.0-beta.10

Conversation

@sbaker
Copy link
Copy Markdown
Member

@sbaker sbaker commented Mar 31, 2026

Summary

  • Model Capabilities system — new ModelCapabilities interface with per-model flags (useMaxCompletionTokens, noTemperature, noSystemMessage, supportsThinking, supportsVision, supportsTools, etc.)
  • Updated model registry — added gpt-4.1/mini/nano, o1, o3, o3-mini, o4-mini, Claude 4 Sonnet/Opus, Gemini 2.5 Pro/Flash with full capability annotations
  • Provider layer uses capabilitiesOpenAICompatibleProvider sends max_completion_tokens vs max_tokens, skips temperature/system messages based on model flags, with prefix-matching for date-suffixed model IDs
  • TestHarness interface — extensible contract for test frameworks (@prompd/test) with plugin registration via registerTestHarness()
  • Frontmatter hints — metadata hints for IDE integration
  • Include path resolution fix — correct relative path handling for {% include %} directives
  • Binary asset pre-extraction — xlsx, docx, pdf extracted during packaging stage
  • prompd.json dependency manifest — standardized manifest format

Test plan

  • gpt-4.1-nano uses max_completion_tokens instead of max_tokens
  • o1/o3 models skip temperature parameter and system messages
  • Prefix matching works for date-suffixed model IDs (e.g., gpt-4.1-nano-2025-04-14)
  • TestHarness registration and execution via @prompd/test
  • Include path resolution with nested directory structures
  • Package creation with binary asset extraction

🤖 Generated with Claude Code

sbaker and others added 9 commits March 10, 2026 15:27
Binary assets referenced in .prmd context fields are now converted
to text during packaging instead of being included as raw binaries.
This prevents registry security validation rejections.

- xlsx/xls → CSV text (.csv.txt)
- docx → plain text (.txt)
- pdf → plain text (.txt)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ate stage

Resolve relative {% include %} paths to absolute when merging parent content
into child prompts, preventing broken references when parent/child are in
different directories. Apply default values with type coercion for parameters
inherited from parent prompts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…andling

- Support @namespace/package@version/path/to/file.prmd format in run and compile commands
- Add parsePackageReferenceWithPath() for extracting file path from package refs
- Clean semver v-prefix (v0.0.1 -> 0.0.1) in both package-resolver and registry
- Strip file path suffix before registry install/download operations
- Security: validate file paths within packages, reject traversal attempts
- Bump version to 0.5.0-beta.6

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rness

- Add ModelCapabilities system for per-model API request building
- Update model lists: GPT-4.1, o1/o3/o4-mini, Claude 4, Gemini 2.5
- Support frontmatter execution hints (provider, model, temperature, max_tokens)
- Pass temperature/maxTokens through workflow executePrompt pipeline
- Validate parent file references during inheritance compilation
- Validate package file dependencies in prompd.json explicit files list
- Add pluggable TestHarness interface for @prompd/test integration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b53d37f86c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +46 to +47
const compilationContext = await compiler.compileWithContext(filePath, compilationOptions);
let content = (compilationContext.compiledResult as string) || '';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve compile error gating before LLM execution

Switching to compileWithContext() here removes the previous failure guard from compile(): compilation diagnostics are no longer surfaced as an exception before sending a prompt. When a .prmd has template/asset/dependency errors, compiledResult can be empty or partial and the executor will still call the model, causing incorrect runs and unnecessary API spend instead of failing fast.

Useful? React with 👍 / 👎.

Comment on lines +1279 to +1281
const newZipPath = (dirName === '.' ? '' : dirName + '/') + baseName + extracted.newExtension;
pathRenames[zipPath] = newZipPath;
zipPath = newZipPath;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep referenced asset filenames stable in packaged output

Renaming extracted binary assets (for example manual.pdf to manual.txt) changes archive paths without rewriting .prmd metadata references that still point to the original filenames. Any packaged prompt using system/context/task/...: ./file.pdf|.docx|.xlsx will fail at runtime with file-not-found during asset extraction because only the renamed file exists in the package.

Useful? React with 👍 / 👎.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sbaker sbaker merged commit 2491cc5 into main Mar 31, 2026
11 checks passed
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