8 Commits

Author SHA1 Message Date
Jakub Zych
544aa287f0 chore: pin v0.1.0 release dependencies v0.1.0 2026-10-07 11:18:06 +02:00
Jakub Zych
9f60b6138c fix(14): WR-05 import every key of an object-shaped models repeater
A repeater saved with non-sequential keys was read only at keys 0 to
len-1, so a model at a higher key was dropped while the import reported
success and refused to run again. Every key is now read, numeric keys in
ascending order.
2026-10-04 08:08:44 +02:00
Jakub Zych
93b2b05476 fix(14): WR-04 require the AI key again when the endpoint changes
An admin who cannot read the write-only key could point base_url at
their own host, leave the key redacted and have it sent there on the
next call. An update that keeps the stored key may no longer change the
adapter or base URL; changing either needs the key re-entered.
2026-10-04 08:08:07 +02:00
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