Tcl Apple Intelligence Interface

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

9 check-ins

2026-06-28
18:50
Update README with set-transcript/get-transcript docs Leaf check-in: de4544928e user: seandeelywoods tags: trunk
18:28
Add session set-transcript/get-transcript commands set-transcript: inject arbitrary context into a session by creating a new LanguageModelSession with a Transcript built from flat {role text} pairs. Roles: system, user, assistant, reasoning, toolcall, tooloutput. UUIDs auto-generated. get-transcript: read back the session's transcript as the same flat {role text} format. Uses Mirror to access the internal entries property (not public in the SDK). Since session.transcript is get-only, set-transcript creates a new session with init(transcript:) and replaces it in SessionStore. Verified: model correctly remembers injected conversation history and get-transcript reads back the full transcript including new turns added by respond/ask. check-in: 15eb58c919 user: seandeelywoods tags: trunk
17:12
Bundle practcl snapshot in scripts/practcl The project now includes a self-contained copy of practcl in scripts/practcl/ so it can build without external dependencies. make.tcl looks for the local snapshot first, then falls back to searching the parent tree, then package require. check-in: 04e5a0c048 user: seandeelywoods tags: trunk
17:07
Add demo script; fix yield in coroutine wait The coroutine path in applefm::wait was missing a yield — it scheduled after callbacks but never yielded control back to the event loop, causing busy-looping. Added yield after scheduling. check-in: 14193da91a user: seandeelywoods tags: trunk
16:56
Update README with session/multi-turn docs check-in: 77bebd361e user: seandeelywoods tags: trunk
16:55
Add multi-turn session support LanguageModelSession maintains a transcript across respond() calls, so reusing the same session instance gives the model conversation history. Previously we created a fresh session per call, discarding all context. New commands: - applefm::session create ?-instructions sys? → sessionId - applefm::session respond $sessionId $prompt → string (sync) - applefm::session ask $sessionId $prompt → token (async) - applefm::session wait $token → string (polls) - applefm::session destroy $sessionId Added SessionStore (Swift) to hold LanguageModelSession instances keyed by integer id, mirroring the ResultStore pattern. The Tcl bootstrap adds ::applefm::session::* procs including a coroutine-safe wait helper. Verified: multi-turn conversation (sync+async mixed) correctly remembers context across turns. check-in: fe7bb96649 user: seandeelywoods tags: trunk
16:33
Add README.md with build instructions, usage examples, and architecture docs check-in: 9a06533ed6 user: seandeelywoods tags: trunk
16:16
Initial check-in: applefm Tcl extension bridging Apple FoundationModels A practcl-built Swift Tcl extension that provides on-device LLM access via Apple's FoundationModels framework (macOS 26+). Architecture: - generic/applefm.swift: Swift bridge using @_cdecl for the Init function, implements availability/respond (sync) and ask/ready/get (async promise pattern) - generic/module.modulemap + tcl_module_header.h: Swift module map wrapping Tcl's C API - cmodules/applefm/applefm.tcl: Tcl bootstrap via practcl's mechanism (high-level ::applefm::wait wrapper) - cmodules/applefm/module.ini: practcl module declaration - make.tcl + library.ini: practcl build driver - pkgIndex.tcl: Tcl package index The async path uses a promise/future pattern: applefm::ask returns a token, the Swift Task stores the result in a thread-safe ResultStore, and the Tcl side polls via applefm::wait (vwait/after loop, coroutine-safe). No Tcl_Eval or Tcl_AsyncMark from Swift. Build requires practcl with Swift toolset support (product.swiftfile, toolset/swift.tcl) and macOS 26 with Apple Intelligence enabled. check-in: 5abd86c79d user: seandeelywoods tags: trunk
16:16
initial empty check-in check-in: 9fea062194 user: seandeelywoods tags: trunk