Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and

## [Unreleased]

### Changed (schema)

- `EnvVar.inject_into_auth_data: bool = False` added — additive,
defaults to `False` (today's behavior preserved). When `True`, the
modulex runtime surfaces the value in `auth_data` at action time:
per-credential user input (`only_for_custom=False`) is persisted at
OAuth2 creation; server-level secrets (`only_for_custom=True`) are
injected from the server environment at tool execution. Fully
backward-compatible — every other integration dumps it as `False`
and the runtime injection is a no-op for them.

### Fixed

- `google_ads` / `google_merchant_center` — flagged
`GOOGLE_ADS_DEVELOPER_TOKEN` (`only_for_custom=True`) and
`GOOGLE_MERCHANT_CENTER_MERCHANT_ID` (`only_for_custom=False`) with
`inject_into_auth_data=True` so the developer token and merchant ID
reach `auth_data` at action time, fixing the "missing from auth_data"
errors on `list_account_id_options` / `create_product`. Requires the
matching modulex runtime change (external brief #021).

### Added

- `revolt` integration — 3 actions, auth: bearer_token. Revolt open-source
Expand Down
15 changes: 15 additions & 0 deletions src/modulex_integrations/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ class EnvVar(BaseModel):
required: bool = True
sensitive: bool = False
only_for_custom: bool = False
# When True, the runtime must guarantee this value is present in the
# credential's ``auth_data`` at action-execution time, so a ``tools.py``
# function can read it. The source is *derived*, not declared:
# - ``only_for_custom=False`` -> per-credential user input; the runtime
# persists the user-entered value into ``auth_data`` at credential
# creation (e.g. Google Merchant Center ``merchant_id``).
# - ``only_for_custom=True`` -> server-level secret; for the managed
# app the runtime resolves it from the server environment and injects
# it at credential-resolution time, while a bring-your-own-app user
# supplies their own (e.g. Google Ads ``developer_token``).
# Tools read the value via the normalized (prefix-stripped, lowercased)
# key. Default False preserves today's behavior: the EnvVar is used only
# for OAuth provider config and the credential test endpoint, never for
# action calls.
inject_into_auth_data: bool = False
sample_format: str | None = None
about_url: str | None = None

Expand Down
6 changes: 6 additions & 0 deletions src/modulex_integrations/tools/google_ads/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,12 @@
),
required=True,
sensitive=True,
# Server-level secret for the managed app (one token for all
# users; per-user access is via OAuth). The runtime resolves
# it from the server environment and injects it into
# auth_data; a bring-your-own-app user supplies their own.
only_for_custom=True,
inject_into_auth_data=True,
sample_format="xxxxxxxxxxxxxxxxxxxxxx",
about_url="https://developers.google.com/google-ads/api/docs/get-started/dev-token",
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@
description="Your Google Merchant Center account ID (numeric)",
required=True,
sensitive=False,
# Per-credential user input (every merchant has their own
# ID, so it can't be a server global). The runtime persists
# the user-entered value into auth_data at credential
# creation; tools.py reads it as auth_data["merchant_id"].
only_for_custom=False,
inject_into_auth_data=True,
sample_format="123456789",
about_url="https://merchants.google.com/mc/overview",
),
Expand Down
Loading