Skip to content

Releases: MyPrototypeWhat/context-chef

@context-chef/tanstack-ai@0.2.4

30 Apr 05:59
c54ebe6

Choose a tag to compare

Patch Changes

  • Updated dependencies [6500178]:
    • @context-chef/core@3.3.0

@context-chef/core@3.3.0

30 Apr 05:59
c54ebe6

Choose a tag to compare

Minor Changes

  • 6500178 Thanks @MyPrototypeWhat! - feat(offloader): add VFS lifecycle management

    Adds cleanup() / cleanupAsync() for sweeping expired or over-cap entries, and reconcile() / reconcileAsync() for adopting orphan files after process restart (modeled on npm cache verify).

    New VFSConfig fields: maxAge (ms since createdAt), maxFiles, maxBytes (true UTF-8 byte length via Buffer.byteLength), onVFSEvicted hook (errors logged and swallowed).

    VFSStorageAdapter gains optional list() / delete() methods — capability-checked at runtime so existing custom adapters keep working unchanged. FileSystemAdapter implements both.

    Eviction: maxAge sweep first, then single-pass LRU by accessedAt until both count and bytes caps are satisfied. Cleanup is never auto-triggered — call from your agent loop or wire to compile:done.

    Public additions: chef.getOffloader(), Offloader.cleanup/cleanupAsync/reconcile/reconcileAsync/getEntries, VFSEntryMeta, VFSCleanupResult, VFSEvictionReason, VFSCleanupNotSupportedError, CleanupOptions.

@context-chef/ai-sdk-middleware@1.1.6

30 Apr 05:59
c54ebe6

Choose a tag to compare

Patch Changes

  • Updated dependencies [6500178]:
    • @context-chef/core@3.3.0

@context-chef/tanstack-ai@0.2.3

27 Apr 11:58
1eebf86

Choose a tag to compare

Patch Changes

  • ac6460f Thanks @MyPrototypeWhat! - Add skill option to inject the active Skill's instructions, mirroring the existing dynamicState pattern.

    contextChefMiddleware({
      contextWindow: 128_000,
      skill: planningSkill, // static
      // or
      skill: () => myActiveSkill, // dynamic — re-evaluated per request
      // or
      skill: async () => fetchActiveSkill(), // async resolver supported
    });

    Skill instructions are appended to the TanStack systemPrompts: string[] channel (the idiomatic place for additional system instructions), positioned after user system prompts and before any dynamicState injection, matching @context-chef/core's compile() ordering (SKILL_SPEC §6.3). Empty or whitespace-only instructions are skipped to avoid emitting an empty entry and creating a needless cache breakpoint.

    Decoupled from tool restriction: skill.allowedTools is annotation only — the middleware does NOT consult it (Claude Code semantics). Wire it to Pruner.setBlockedTools yourself in user code if you want skill-driven tool gating.

    No breaking changes.

@context-chef/tanstack-ai@0.2.2

27 Apr 08:43
ff596e7

Choose a tag to compare

Patch Changes

  • Updated dependencies [05d713c]:
    • @context-chef/core@3.2.1

@context-chef/core@3.2.1

27 Apr 08:43
ff596e7

Choose a tag to compare

Patch Changes

  • 05d713c Thanks @MyPrototypeWhat! - Add Pruner blocklist + Skill primitive (two independent additions, no breaking changes).

    Pruner blocklistsetBlockedTools(names) + checkToolCall(call) for runtime tool restriction (permission, environment, sandbox, rate-limiting). KV-cache preserved across blocklist changes; enforcement happens at dispatch time, not by mutating the compiled tools array.

    Skill primitive — SKILL.md-compatible behavior bundle. loadSkill / loadSkillsDir / formatSkillListing load and render skills; chef.registerSkills + chef.activateSkill activate them, injecting instructions as a dedicated { role: 'system' } message between the user system prompt and the memory block.

    Decoupled by designactivateSkill does NOT touch the Pruner. Skill.allowedTools is annotation only (Claude Code semantics); wire it to setBlockedTools yourself if you want skill-driven tool gating. See SKILL_SPEC.md for the full design and recipes.

    New public API: Pruner.setBlockedTools / Pruner.getBlockedTools / ContextChef.checkToolCall / ToolCallCheckResult / Skill / SkillLoadResult / FormatSkillListingOptions / loadSkill / loadSkillsDir / formatSkillListing / ContextChef.registerSkills / ContextChef.getRegisteredSkills / ContextChef.activateSkill / ContextChef.getActiveSkill. New snapshot fields: ChefSnapshot.activeSkillName / ChefSnapshot.skillInstructions. New meta field: CompileMeta.activeSkillName.

@context-chef/ai-sdk-middleware@1.1.5

27 Apr 11:58
1eebf86

Choose a tag to compare

Patch Changes

  • ac6460f Thanks @MyPrototypeWhat! - Add skill option to inject the active Skill's instructions as a dedicated system message, mirroring the existing dynamicState pattern.

    contextChefMiddleware({
      contextWindow: 128_000,
      skill: planningSkill, // static
      // or
      skill: () => myActiveSkill, // dynamic — re-evaluated per request
      // or
      skill: async () => fetchActiveSkill(), // async resolver supported
    });

    Skill instructions are inserted as { role: 'system', content: skill.instructions } between the user-provided system messages and the conversation history, matching @context-chef/core's compile() ordering (SKILL_SPEC §6.3). Empty or whitespace-only instructions are skipped to avoid emitting an empty system message and creating a needless cache breakpoint.

    Decoupled from tool restriction: skill.allowedTools is annotation only — the middleware does NOT consult it (Claude Code semantics). Wire it to Pruner.setBlockedTools yourself in user code if you want skill-driven tool gating.

    No breaking changes.

@context-chef/ai-sdk-middleware@1.1.4

27 Apr 08:43
ff596e7

Choose a tag to compare

Patch Changes

  • Updated dependencies [05d713c]:
    • @context-chef/core@3.2.1

@context-chef/tanstack-ai@0.2.1

20 Apr 13:44
5d2f90a

Choose a tag to compare

Patch Changes

  • 2e13c66 Thanks @MyPrototypeWhat! - Bump @context-chef/core peer to pick up the new media-aware compression strategy (attachments are now stripped to [image] / [document] text placeholders before reaching the compression model). No source changes in this package — multimodal compression behavior is driven entirely by core.

  • Updated dependencies [2e13c66]:

    • @context-chef/core@3.2.0

@context-chef/core@3.2.0

20 Apr 13:44
5d2f90a

Choose a tag to compare

Minor Changes

  • 2e13c66 Thanks @MyPrototypeWhat! - ### Compression now strips media attachments to text placeholders

    Janitor.executeCompression() no longer ships binary attachment data through the compression call. Each attachment in the messages being compressed is replaced inline with a [image] / [image: photo.png] / [document] / [document: report.pdf] text marker before the compressionModel is invoked. The summarizer sees that media existed at this point in the conversation without being asked to process raw base64.

    • Modeled on Claude Code's stripImagesFromMessages strategy
    • Avoids prompt-too-long failures on the compression call itself when histories contain many images
    • Empty mediaType produces [attachment] instead of misleading [document]
    • toKeep (the recent messages preserved verbatim) is untouched — its attachments still reach the main model through the target adapter

    Removed Prompts.MEDIA_DESCRIPTION_INSTRUCTION

    The constant is gone from the exported Prompts object. It was previously appended to the compression prompt when attachments were detected, asking the compression model to "describe the visual content." In practice this never worked — compressionModel is a (Message[]) => Promise<string> function with no adapter pipeline, so the binary data on Message.attachments was never actually forwarded to the LLM. The new placeholder-based strategy supersedes it.

    If you imported Prompts.MEDIA_DESCRIPTION_INSTRUCTION directly, remove the reference — the behavior it described was already a no-op.