Skip to content

Add MiniMax music generation provider#1

Closed
octo-patch wants to merge 9 commits into
mainfrom
octo/20260717-multimodal-music-tool-recvpz1iX60Iez-v2
Closed

Add MiniMax music generation provider#1
octo-patch wants to merge 9 commits into
mainfrom
octo/20260717-multimodal-music-tool-recvpz1iX60Iez-v2

Conversation

@octo-patch

Copy link
Copy Markdown
Owner

Reason: Add MiniMax music generation to the media provider registry.

Implemented global and China endpoint routing, Bearer authentication, request controls, output formats, and response parsing for MiniMax music generation.

Checks: python3 -m py_compile sdk/python/agentfield/media_providers.py; PYTHONPATH=sdk/python pytest -q sdk/python/tests/test_media_providers.py -q

dependabot Bot and others added 9 commits July 16, 2026 13:05
…dates (Agent-Field#779)

Bumps the npm_and_yarn group with 2 updates in the /desktop directory: [electron](https://github.com/electron/electron) and [tar](https://github.com/isaacs/node-tar).


Updates `electron` from 33.4.11 to 39.8.5
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](electron/electron@v33.4.11...v39.8.5)

Updates `tar` from 6.2.1 to 7.5.20
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.2.1...v7.5.20)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 39.8.5
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-version: 7.5.20
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lan: Santosh's recommendations) (Agent-Field#784)

* feat(agentic): ranked reasoner search + ambient load metadata

Two beta-plan items ("Santosh's recommendations") for the sub-harness
flow, where a coding agent drives AgentField through `af agent` and the
agentfield-use skill:

1. Reasoner discovery at scale. With hundreds of reasoners installed
   the brain must search, not list. New GET /api/v1/agentic/reasoners
   ?q=<free text>&agent=<id>&limit=<1..50> ranks reasoners with a
   dependency-free BM25F-lite index built per request from the same
   registration data discovery serves (id boost 3.0, tags 2.0, agent
   1.5, metadata description 1.0; snake/kebab/camelCase-aware
   tokenizer; deterministic tie-break). Each hit carries
   invocation_target + agent_health so the brain dispatches with no
   second lookup. CLI: `af agent search "<text>" [--agent] [--limit]`.

2. Ambient machine-load metadata. Every agentic response now carries
   meta.load = {running_agents, total_agents, active_executions,
   cpu_cores, recommended_max_concurrent} via a load provider stamped
   into respondOK (2s TTL cache; omitted silently on error — never
   fails a response). recommended_max_concurrent = max(1, cores/2),
   cores-based; memory-aware refinement noted as follow-up. The
   `af agent` CLI already forwards server meta, so the driving agent
   gets load data with zero extra round-trips.

The agentfield-use skill (v0.2.0 -> v0.3.0, embedded mirror synced)
teaches both: search-first discovery past ~20 reasoners, and pacing —
if active_executions >= recommended_max_concurrent, finish in-flight
work before launching more.

Verified end-to-end on a live control plane with 78 registered
reasoners: "review pull request" ranks pr-af-go:review_dimension /
review on top, --agent filters, empty q -> structured missing_query,
meta.load rides every response (16 cores -> recommendation 8).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(agentic): constant allocation cap for reasoner search results

CodeQL (go/uncontrolled-allocation-size) does not track the limit clamp
through getIntQuery. Allocate at the constant max (50) instead - the
loop still stops at the requested limit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…, and --json lifecycle output (Agent-Field#751)

* feat(control-plane): authenticated approval resolution endpoint by execution ID

Approvals could previously only be resolved through the HMAC-signed
webhook (POST /api/v1/webhooks/approval-response), whose secret is held
by the external approval service. Extract the resolution core
(idempotency, state transitions, approval bookkeeping, events, agent
callback) into webhookApprovalController.applyApprovalDecision and add
POST /api/v1/executions/:execution_id/approval-response under the
authenticated agentAPI group, so operators and CLIs holding an API key
can approve/reject/request_changes directly. Webhook behavior is
unchanged; 'expired' stays webhook-only since expiry is not an operator
decision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(control-plane): af agent exec steering verbs in agent-mode CLI

Add 'af agent exec pause|resume|cancel|restart|approval-status|approve'
as thin wrappers over the existing /api/v1/executions/:execution_id/*
endpoints, emitting the standard AgentResponse envelope with non-zero
exit on error. approve wires --decision approved|rejected|
request_changes [--reason] to the new authenticated approval-response
endpoint.

proxyToServer now normalizes legacy string errors ({"error":"..."},
optionally with a sibling message) into the structured envelope error
object {code,message,hint}, deriving the code from the HTTP status when
the handler didn't provide one — so agents scripting against 'af agent'
always get {ok:false,error:{...}} on failures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(control-plane): events resource in agentic unified query

Expose persisted execution lifecycle events (workflow_execution_events)
through POST /api/v1/agentic/query as resource=events so agents can
poll event history from a shell loop instead of consuming SSE. Queries
require filters.execution_id (direct per-execution listing) or
filters.run_id (fan-out over the run's execution records); results are
sorted by emitted_at ascending with sequence tie-breaking, honor
since/until RFC3339 bounds, and paginate with limit/offset (total is
the pre-pagination count). No new persistence layer or storage
interface methods — this composes the existing QueryExecutionRecords
and ListWorkflowExecutionEvents queries.

CLI: 'af agent query -r events --execution-id X | --run-id Y' with a
new --execution-id filter flag; help documents that this is a pollable
snapshot of the SSE stream, not a live subscription.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(control-plane): --json envelopes for node lifecycle commands

Add a --json flag to af list, af install, af run, af stop, and af logs
that emits the agent-mode {ok,data,error:{code,message,hint}} envelope
on stdout with non-zero exit on error. Default human output is
unchanged.

- list: {nodes:[{name,version,status,port,description}], total}
- install/run: envelope on the real stdout; service-layer progress
  prints are redirected to stderr for the duration
- stop: {node, status: stopped|not_running}; progress output is
  suppressed via a Quiet flag on AgentNodeStopper (printf wrapper only,
  no changes to the signal/liveness logic)
- logs: {node, log_path, lines:[...]} honoring --tail via a Go-native
  tail (no external tail binary); --follow with --json is rejected as
  invalid_flags since a stream cannot be a JSON snapshot

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(control-plane): persist recorded_at on workflow execution events

The raw INSERT in storeWorkflowExecutionEventTx omitted recorded_at
(the GORM model's autoCreateTime does not apply to raw SQL), leaving
NULL in SQLite/Postgres. ListWorkflowExecutionEvents scanned the column
into a non-nullable time.Time, so listing any stored event failed with
'unsupported Scan, storing driver.Value type <nil>'. Nothing exercised
this listing path end-to-end until the agentic events query resource;
the existing storage test masked the bug with a manual UPDATE of
recorded_at before listing.

Write recorded_at in the INSERT and scan it through sql.NullTime,
falling back to emitted_at for legacy NULL rows so old databases keep
listing cleanly. Found via runtime verification of
'af agent query -r events' against a local control plane.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(control-plane): in-process unit tests for proxy error normalization

structuredErrorFromString and defaultCodeForStatus were exercised only
through subprocess exit-path tests, which record no coverage. Add
direct table-driven tests so the patch-coverage gate sees these lines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(control-plane): list approval-response endpoint in discover catalog

Register POST /api/v1/executions/:execution_id/approval-response in the
agentic API catalog so 'af agent discover' surfaces the new resolution
endpoint alongside the other approval routes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(storage): persist recorded_at on the execution_logs raw INSERT too

storeExecutionLogEntryTx — the single writer behind both
StoreExecutionLogEntry and StoreExecutionLogEntries — omitted recorded_at
from its raw INSERT, so every execution-log row landed NULL and every read
silently took the legacy emitted_at fallback: the server-ingestion timestamp
was never actually stored. It also stamped entry.RecordedAt only AFTER the
insert, mutating the caller's struct with a value that never reached the
database. This is the same bug this branch already fixed for
workflow_execution_events (the GORM model's autoCreateTime does not apply to
raw INSERTs); the sibling path was missed.

The default is now stamped before the query is built and recorded_at is
bound explicitly, mirroring storeWorkflowExecutionEventTx. The regression
test uses distinct emitted_at/recorded_at values so the NULL-read fallback
cannot masquerade as persistence, and covers the batch path's zero-value
stamping; it fails against the previous INSERT.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(storage): align clinch execution-log test with persisted recorded_at

The recorded_at-persistence fix (raw INSERT no longer leaves the column
NULL) made the legacy assertion here fail: it expected the NULL-read
fallback (recorded_at -> emitted_at) for a freshly stored entry. Give
the entry an explicit RecordedAt and assert it round-trips; the NULL
fallback branch is still covered by the forced-NULL UPDATE above.

Latent in the branch before the main merge - conflict state had kept
full CI from running on the previous head.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@octo-patch

Copy link
Copy Markdown
Owner Author

Opened in the fork by mistake; the corrected upstream pull request is Agent-Field#789.

@octo-patch octo-patch closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants