PSAnthropic.psd1
|
@{ # Module manifest for PSAnthropic # PowerShell client for the Anthropic Messages API # Script module or binary module file associated with this manifest. RootModule = 'PSAnthropic.psm1' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # This ensures classes/enums are available to module consumers. ScriptsToProcess = @('Classes.ps1') # Version number of this module. ModuleVersion = '0.1.0' # ID used to uniquely identify this module GUID = 'a7b8c9d0-e1f2-3a4b-5c6d-7e8f9a0b1c2d' # Author of this module Author = 'Chris Taylor' # Company or vendor of this module CompanyName = 'ChrisTaylorCodes' # Copyright statement for this module Copyright = '(c) 2026 Chris Taylor. MIT License.' # Description of the functionality provided by this module Description = 'PowerShell client for the Anthropic Messages API. Works with Ollama, Anthropic Cloud, and any compatible endpoint. Supports messages, streaming, tools, and images.' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '7.0' # Functions to export from this module - explicit list (no wildcards) FunctionsToExport = @('Connect-Anthropic','Disconnect-Anthropic','New-AnthropicImageContent','Invoke-AnthropicMessage','Invoke-AnthropicWebRequest','Add-AnthropicMessage','New-AnthropicConversation','New-AnthropicMessage','Clear-AnthropicRouterConfig','Get-AnthropicRouterConfig','Get-AnthropicRouterLog','Invoke-AnthropicRouted','Set-AnthropicRouterConfig','Get-AnthropicStandardTools','Invoke-AnthropicStandardTool','New-AnthropicTool','New-AnthropicToolFromCommand','New-AnthropicToolResult','Clear-AnthropicRunspaceCache','Get-AnthropicConnection','Get-AnthropicModel','Get-AnthropicResponseText','Test-AnthropicEndpoint') # Cmdlets to export from this module CmdletsToExport = @() # Variables to export from this module VariablesToExport = @() # Aliases to export from this module AliasesToExport = @() # Private data to pass to the module specified in RootModule/ModuleToProcess PrivateData = @{ PSData = @{ # Tags applied to this module for discoverability Tags = @('Anthropic', 'Ollama', 'LLM', 'AI', 'API', 'Messages', 'Claude', 'LocalLLM', 'ChrisTaylorCodes') # License URI LicenseUri = 'https://github.com/christaylorcodes/PSAnthropic/blob/main/LICENSE' # Project URI ProjectUri = 'https://github.com/christaylorcodes/PSAnthropic' # Release notes ReleaseNotes = @('## [0.1.0] - 2026-03-12 ### Added - Build automation with Sampler/ModuleBuilder framework - CI/CD pipeline for automated testing and publishing to PSGallery - PSScriptAnalyzer code quality checks - Local pre-push validation script (`test-local.ps1`) - Contributing guidelines and issue templates ### Changed - (nothing yet) ### Fixed - (nothing yet) ','## [0.1.0] - 2026-01-23 ### Added #### Core Messaging - `Invoke-AnthropicMessage` - Send messages to Anthropic-compatible APIs - `Invoke-AnthropicWebRequest` - Low-level HTTP handler with retry logic - `New-AnthropicMessage` - Create message objects - `New-AnthropicConversation` - Start conversations with system prompts - `Add-AnthropicMessage` - Add messages to existing conversations - `Get-AnthropicResponseText` - Extract text from API responses - Streaming support via Server-Sent Events (SSE) - Extended thinking mode (`-Thinking`, `-ThinkingBudget`) #### Authentication - `Connect-Anthropic` - Initialize connection to API endpoints - `Disconnect-Anthropic` - Clear connection state - `Get-AnthropicConnection` - View current connection info - `Test-AnthropicEndpoint` - Health check endpoints - Environment variable support (`ANTHROPIC_BASE_URL`, `ANTHROPIC_API_KEY`, `ANTHROPIC_MODEL`) #### Tool Support - `New-AnthropicTool` - Create custom tool definitions - `New-AnthropicToolResult` - Format tool execution results - `Get-AnthropicStandardTools` - Pre-built standard tools (8 tools) - `Invoke-AnthropicStandardTool` - Execute standard tool calls - Shell safety levels (Restricted, ReadOnly, Standard, Full, Unsafe) - Sandboxed PowerShell execution via ConstrainedLanguage mode #### Content - `New-AnthropicImageContent` - Create base64 image content blocks - Support for PNG, JPEG, GIF, WebP formats - Vision model integration #### Model Router - `Set-AnthropicRouterConfig` - Configure task-to-model mappings - `Get-AnthropicRouterConfig` - View router configuration - `Clear-AnthropicRouterConfig` - Reset router state - `Invoke-AnthropicRouted` - Automatic model selection by task type - `Get-AnthropicRouterLog` - View routing decision history - CSV logging support #### Utilities - `Get-AnthropicModel` - List available models from server - Retry logic with exponential backoff for 5xx errors - `-WhatIf` support on state-changing functions ### Standard Tools Included - `pwsh` - PowerShell command execution - `str_replace_editor` - Text editor (view/create/replace/insert) - `read_file` - Read file contents - `list_directory` - List directory contents - `search_files` - Search files by name pattern - `search_content` - Search text within files - `get_current_time` - Get current date/time - `web_fetch` - Fetch and parse URL content ### Compatibility - PowerShell 7.0+ required - Ollama Anthropic compatibility layer - Direct Anthropic API support - Any Anthropic-compatible endpoint [0.1.0]: https://github.com/christaylorcodes/PSAnthropic/releases/tag/v0.1.0 ') } } } |