Commit Graph

5 Commits

Author SHA1 Message Date
Jakub Zych
6646d10ff5 test: TestGolemAdminSchemas refuses an AI model JSON with any api_key key, even redacted 2026-10-04 02:03:57 +02:00
Jakub Zych
70314b508d test: the AI models admin schemas compile with a write-only key, and golem:import-settings runs as the CLI runs it
- TestGolemAdminSchemas: no key column in the list, a password api_key
  field, the access_settings permission, a model that never serializes
  its key, the admin hooks' refusals
- TestGolemImportCommand: missing app or database, the notice path, a
  numbered repeater with PHP's scalar forms, a refused second run and
  malformed or missing files
2026-10-04 01:39:52 +02:00
Jakub Zych
c93e2d9142 feat: AI models admin, settings import, Anthropic adapter and the rest of AIService
- golem15_golem_models (encrypted write-only api_key) with its cabana list
  and form under golem15.golem.access_settings, and the Settings lookups
  (Models, DefaultModel with PHP's position-0 quirk, Vision, Image, File,
  ByName), every one Trusted
- golem:import-settings copies the WinterCMS golem_settings repeater once
- AnthropicAdapter; SendStream, SendFile/SendFilePath/SendFileReader,
  SendWithModel, SendToImageModel, SendToVisionModel, GenerateImage, Ask
- PromptFactory; README documents the config keys, the environment
  variable, the command and the admin screen
2026-10-03 23:09:02 +02:00
Jakub Zych
da9fcde725 feat: security.AssertSafeURL ports the SSRFGuard
https only, the golem15.golem.ssrf.allowed_hosts allowlist (overridden by
GOLEM15_SSRF_ALLOWED_HOSTS) with dotted-suffix entries, and a resolve-time
check that every address is public, judged by fetchguard.IsPrivateAddr.
Failures carry PHP's RuntimeException messages.
2026-10-03 23:09:02 +02:00
Jakub Zych
cd3f0f6c1c feat: golem15.golem plugin with the OpenAI-compatible adapter and AIService.Send
- Prompt, Payload and AIResponse value objects ported from Golem15.Golem
- OpenAIAdapter: chat completions mapping with PHP's response_format,
  max_completion_tokens and reasoning_effort rules
- AIService.Send through fetchguard (TrustedMode for operator models,
  PublicOnlyMode otherwise) with PHP's failure messages
- config defaults for the SSRF allowlist and the AI timeout, lang, README
2026-10-03 22:41:49 +02:00