Tiangong KB Report Search
Use this skill for Tiangong report-source retrieval. It is intentionally
single-source: always search report, never all, sci, or patent.
In Auto Research, an industry-report requirement must name the reviewed report
capability in requiredCapabilityIds; Brave or SCI results cannot stand in for
it. If that capability is absent, stop at preflight and have the owner import,
configure, license, credential, lock, and smoke the exact report capability.
The standalone wrapper never reads the workspace broker credential store.
Prerequisites
- The standalone wrapper defaults to its separately tested CLI version
0.0.62; this is not the Auto Research workspace runtime. Set
TIANGONG_AI_CLI or TIANGONG_AI_CLI_BIN only to intentionally override the
standalone entrypoint.
- Set
TIANGONG_REPORT_APIKEY or the common fallback
TIANGONG_AI_APIKEY. Credentials are rejected recursively in wrapper JSON,
request files, URL query parameters, and CLI arguments.
- When
request_file / input_file is provided, the wrapper loads .env from
that file's directory by default. env_file can point to a different dotenv
file. It must be owner-only, regular, and non-symlinked; only documented
Tiangong report credential, endpoint, region, and timeout variables are
loaded, and existing environment values win.
- Optionally set
TIANGONG_AI_API_BASE_URL; the CLI accepts a Supabase project
root, /functions/v1, or /rest/v1 and derives Functions URLs.
Search
For normal searches, pass a query:
./scripts/report_search.sh '{
"query": "mechanical recycling policy report",
"top_k": 5
}'
When the current directory is inside a managed workspace, this command is
blocked before credential loading or network. Only a user who explicitly asks
for one isolated query may add "execution_mode":"standalone"; the wrapper
then emits a non-secret audit event.
The script calls:
npx --yes --package "@tiangong-ai/cli@0.0.62" -- tiangong-ai research search --query <query> --sources report --json
For exact edge-function payloads, provide request_file or input_file:
./scripts/report_search.sh '{
"request_file": "./report-request.json",
"dry_run": true
}'
Raw Payload Filters
Wrapper JSON can include inline raw report_search fields; the wrapper will
forward them through the CLI --input path. The same payload can also be put in
request_file / input_file:
{
"query": "mechanical recycling policy report",
"filter": {
"source": ["IEA"]
},
"topK": 5,
"extK": 2
}
filter: metadata term filters, shaped as { "field": ["value"] }.
topK, extK: raw edge-function names for result count and adjacent chunk
expansion.
datefilter and getMeta are not supported by report_search.
Input Fields
query, input, or claim: convenience query text.
request_file or input_file: JSON body forwarded unchanged.
env_file: optional dotenv file. Without it, request_file /
input_file causes the wrapper to load .env from that file's directory.
execution_mode: only standalone, and only after an explicit isolated
owner request when a managed workspace is detected.
filter, topK, extK: optional inline raw payload fields for report
search.
sources: optional compatibility field; only report or default is
accepted.
dry_run: true to return the exact request plan with masked credentials.
api_base_url; credentials must come from allowed owner environment
variables or an owner-only env file.
report_url, region, timeout.
top_k, ext_k: only used in query mode.
1---2name: tiangong-kb-report-search-23description: Perform one isolated owner-requested Tiangong report search outside Auto Research, or provide report-source method guidance for a separately reviewed locked broker capability. Searches only `report`. If an ancestor contains `.tiangong-research` and the request is open-ended, multi-source, analytical, builds on prior outputs, or produces a conclusion/artifact, route to `tiangong-auto-research` and do not execute this standalone wrapper. Inside a managed workspace, standalone use requires the user's explicit isolated-query request and `execution_mode=standalone`.4---56# Tiangong KB Report Search78Use this skill for Tiangong report-source retrieval. It is intentionally9single-source: always search `report`, never `all`, `sci`, or `patent`.1011In Auto Research, an industry-report requirement must name the reviewed report12capability in `requiredCapabilityIds`; Brave or SCI results cannot stand in for13it. If that capability is absent, stop at preflight and have the owner import,14configure, license, credential, lock, and smoke the exact report capability.15The standalone wrapper never reads the workspace broker credential store.1617## Prerequisites1819- The standalone wrapper defaults to its separately tested CLI version20 `0.0.62`; this is not the Auto Research workspace runtime. Set21 `TIANGONG_AI_CLI` or `TIANGONG_AI_CLI_BIN` only to intentionally override the22 standalone entrypoint.23- Set `TIANGONG_REPORT_APIKEY` or the common fallback24 `TIANGONG_AI_APIKEY`. Credentials are rejected recursively in wrapper JSON,25 request files, URL query parameters, and CLI arguments.26- When `request_file` / `input_file` is provided, the wrapper loads `.env` from27 that file's directory by default. `env_file` can point to a different dotenv28 file. It must be owner-only, regular, and non-symlinked; only documented29 Tiangong report credential, endpoint, region, and timeout variables are30 loaded, and existing environment values win.31- Optionally set `TIANGONG_AI_API_BASE_URL`; the CLI accepts a Supabase project32 root, `/functions/v1`, or `/rest/v1` and derives Functions URLs.3334## Search3536For normal searches, pass a query:3738```bash39./scripts/report_search.sh '{40 "query": "mechanical recycling policy report",41 "top_k": 542}'43```4445When the current directory is inside a managed workspace, this command is46blocked before credential loading or network. Only a user who explicitly asks47for one isolated query may add `"execution_mode":"standalone"`; the wrapper48then emits a non-secret audit event.4950The script calls:5152```bash53npx --yes --package "@tiangong-ai/cli@0.0.62" -- tiangong-ai research search --query <query> --sources report --json54```5556For exact edge-function payloads, provide `request_file` or `input_file`:5758```bash59./scripts/report_search.sh '{60 "request_file": "./report-request.json",61 "dry_run": true62}'63```6465## Raw Payload Filters6667Wrapper JSON can include inline raw `report_search` fields; the wrapper will68forward them through the CLI `--input` path. The same payload can also be put in69`request_file` / `input_file`:7071```json72{73 "query": "mechanical recycling policy report",74 "filter": {75 "source": ["IEA"]76 },77 "topK": 5,78 "extK": 279}80```8182- `filter`: metadata term filters, shaped as `{ "field": ["value"] }`.83- `topK`, `extK`: raw edge-function names for result count and adjacent chunk84 expansion.85- `datefilter` and `getMeta` are not supported by `report_search`.8687## Input Fields8889- `query`, `input`, or `claim`: convenience query text.90- `request_file` or `input_file`: JSON body forwarded unchanged.91- `env_file`: optional dotenv file. Without it, `request_file` /92 `input_file` causes the wrapper to load `.env` from that file's directory.93- `execution_mode`: only `standalone`, and only after an explicit isolated94 owner request when a managed workspace is detected.95- `filter`, `topK`, `extK`: optional inline raw payload fields for report96 search.97- `sources`: optional compatibility field; only `report` or `default` is98 accepted.99- `dry_run`: true to return the exact request plan with masked credentials.100- `api_base_url`; credentials must come from allowed owner environment101 variables or an owner-only env file.102- `report_url`, `region`, `timeout`.103- `top_k`, `ext_k`: only used in query mode.