@tiangong-ai/cli 0.0.51 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +22 -2
- package/README.md +171 -7
- package/dist/cli.js +10 -1
- package/dist/cli.js.map +1 -1
- package/dist/data/builtins.d.ts +1 -0
- package/dist/data/builtins.js +40 -0
- package/dist/data/builtins.js.map +1 -0
- package/dist/data/catalog.d.ts +25 -0
- package/dist/data/catalog.js +305 -0
- package/dist/data/catalog.js.map +1 -0
- package/dist/data/commands.d.ts +9 -0
- package/dist/data/commands.js +307 -0
- package/dist/data/commands.js.map +1 -0
- package/dist/data/connectors/airnow-hourly-observations.d.ts +2 -0
- package/dist/data/connectors/airnow-hourly-observations.js +522 -0
- package/dist/data/connectors/airnow-hourly-observations.js.map +1 -0
- package/dist/data/connectors/airnow-hourly-observations.schemas.d.ts +299 -0
- package/dist/data/connectors/airnow-hourly-observations.schemas.js +188 -0
- package/dist/data/connectors/airnow-hourly-observations.schemas.js.map +1 -0
- package/dist/data/connectors/bluesky-public-posts.d.ts +2 -0
- package/dist/data/connectors/bluesky-public-posts.js +705 -0
- package/dist/data/connectors/bluesky-public-posts.js.map +1 -0
- package/dist/data/connectors/bluesky-public-posts.schemas.d.ts +733 -0
- package/dist/data/connectors/bluesky-public-posts.schemas.js +422 -0
- package/dist/data/connectors/bluesky-public-posts.schemas.js.map +1 -0
- package/dist/data/connectors/epa-eis-records.d.ts +2 -0
- package/dist/data/connectors/epa-eis-records.js +566 -0
- package/dist/data/connectors/epa-eis-records.js.map +1 -0
- package/dist/data/connectors/epa-eis-records.schemas.d.ts +199 -0
- package/dist/data/connectors/epa-eis-records.schemas.js +146 -0
- package/dist/data/connectors/epa-eis-records.schemas.js.map +1 -0
- package/dist/data/connectors/federal-register-documents.d.ts +2 -0
- package/dist/data/connectors/federal-register-documents.js +517 -0
- package/dist/data/connectors/federal-register-documents.js.map +1 -0
- package/dist/data/connectors/federal-register-documents.schemas.d.ts +357 -0
- package/dist/data/connectors/federal-register-documents.schemas.js +243 -0
- package/dist/data/connectors/federal-register-documents.schemas.js.map +1 -0
- package/dist/data/connectors/gdelt-doc-search.d.ts +2 -0
- package/dist/data/connectors/gdelt-doc-search.js +658 -0
- package/dist/data/connectors/gdelt-doc-search.js.map +1 -0
- package/dist/data/connectors/gdelt-doc-search.schemas.d.ts +446 -0
- package/dist/data/connectors/gdelt-doc-search.schemas.js +330 -0
- package/dist/data/connectors/gdelt-doc-search.schemas.js.map +1 -0
- package/dist/data/connectors/gdelt-file-feeds.d.ts +4 -0
- package/dist/data/connectors/gdelt-file-feeds.js +591 -0
- package/dist/data/connectors/gdelt-file-feeds.js.map +1 -0
- package/dist/data/connectors/gdelt-file-feeds.schemas.d.ts +40 -0
- package/dist/data/connectors/gdelt-file-feeds.schemas.js +256 -0
- package/dist/data/connectors/gdelt-file-feeds.schemas.js.map +1 -0
- package/dist/data/connectors/nasa-firms-fire.d.ts +2 -0
- package/dist/data/connectors/nasa-firms-fire.js +578 -0
- package/dist/data/connectors/nasa-firms-fire.js.map +1 -0
- package/dist/data/connectors/nasa-firms-fire.schemas.d.ts +369 -0
- package/dist/data/connectors/nasa-firms-fire.schemas.js +238 -0
- package/dist/data/connectors/nasa-firms-fire.schemas.js.map +1 -0
- package/dist/data/connectors/open-meteo-air-quality.d.ts +2 -0
- package/dist/data/connectors/open-meteo-air-quality.js +401 -0
- package/dist/data/connectors/open-meteo-air-quality.js.map +1 -0
- package/dist/data/connectors/open-meteo-air-quality.schemas.d.ts +335 -0
- package/dist/data/connectors/open-meteo-air-quality.schemas.js +225 -0
- package/dist/data/connectors/open-meteo-air-quality.schemas.js.map +1 -0
- package/dist/data/connectors/open-meteo-flood.d.ts +2 -0
- package/dist/data/connectors/open-meteo-flood.js +446 -0
- package/dist/data/connectors/open-meteo-flood.js.map +1 -0
- package/dist/data/connectors/open-meteo-flood.schemas.d.ts +388 -0
- package/dist/data/connectors/open-meteo-flood.schemas.js +227 -0
- package/dist/data/connectors/open-meteo-flood.schemas.js.map +1 -0
- package/dist/data/connectors/open-meteo-historical-weather.d.ts +2 -0
- package/dist/data/connectors/open-meteo-historical-weather.js +468 -0
- package/dist/data/connectors/open-meteo-historical-weather.js.map +1 -0
- package/dist/data/connectors/open-meteo-historical-weather.schemas.d.ts +420 -0
- package/dist/data/connectors/open-meteo-historical-weather.schemas.js +282 -0
- package/dist/data/connectors/open-meteo-historical-weather.schemas.js.map +1 -0
- package/dist/data/connectors/openaq-air-quality.d.ts +2 -0
- package/dist/data/connectors/openaq-air-quality.js +734 -0
- package/dist/data/connectors/openaq-air-quality.js.map +1 -0
- package/dist/data/connectors/openaq-air-quality.schemas.d.ts +1067 -0
- package/dist/data/connectors/openaq-air-quality.schemas.js +512 -0
- package/dist/data/connectors/openaq-air-quality.schemas.js.map +1 -0
- package/dist/data/connectors/regulations-gov-attachments.d.ts +2 -0
- package/dist/data/connectors/regulations-gov-attachments.js +486 -0
- package/dist/data/connectors/regulations-gov-attachments.js.map +1 -0
- package/dist/data/connectors/regulations-gov-attachments.schemas.d.ts +270 -0
- package/dist/data/connectors/regulations-gov-attachments.schemas.js +181 -0
- package/dist/data/connectors/regulations-gov-attachments.schemas.js.map +1 -0
- package/dist/data/connectors/regulations-gov-comments.d.ts +2 -0
- package/dist/data/connectors/regulations-gov-comments.js +718 -0
- package/dist/data/connectors/regulations-gov-comments.js.map +1 -0
- package/dist/data/connectors/regulations-gov-comments.schemas.d.ts +717 -0
- package/dist/data/connectors/regulations-gov-comments.schemas.js +389 -0
- package/dist/data/connectors/regulations-gov-comments.schemas.js.map +1 -0
- package/dist/data/connectors/usbr-project-records.d.ts +2 -0
- package/dist/data/connectors/usbr-project-records.js +467 -0
- package/dist/data/connectors/usbr-project-records.js.map +1 -0
- package/dist/data/connectors/usbr-project-records.schemas.d.ts +194 -0
- package/dist/data/connectors/usbr-project-records.schemas.js +137 -0
- package/dist/data/connectors/usbr-project-records.schemas.js.map +1 -0
- package/dist/data/connectors/usbr-rise.d.ts +2 -0
- package/dist/data/connectors/usbr-rise.js +625 -0
- package/dist/data/connectors/usbr-rise.js.map +1 -0
- package/dist/data/connectors/usbr-rise.schemas.d.ts +623 -0
- package/dist/data/connectors/usbr-rise.schemas.js +407 -0
- package/dist/data/connectors/usbr-rise.schemas.js.map +1 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.d.ts +2 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.js +521 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.js.map +1 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.schemas.d.ts +496 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.schemas.js +309 -0
- package/dist/data/connectors/usgs-water-instantaneous-values.schemas.js.map +1 -0
- package/dist/data/connectors/youtube-public-content.d.ts +2 -0
- package/dist/data/connectors/youtube-public-content.js +974 -0
- package/dist/data/connectors/youtube-public-content.js.map +1 -0
- package/dist/data/connectors/youtube-public-content.schemas.d.ts +773 -0
- package/dist/data/connectors/youtube-public-content.schemas.js +567 -0
- package/dist/data/connectors/youtube-public-content.schemas.js.map +1 -0
- package/dist/data/contracts.d.ts +374 -0
- package/dist/data/contracts.js +10 -0
- package/dist/data/contracts.js.map +1 -0
- package/dist/data/runtime/artifacts.d.ts +6 -0
- package/dist/data/runtime/artifacts.js +103 -0
- package/dist/data/runtime/artifacts.js.map +1 -0
- package/dist/data/runtime/bounded-http.d.ts +10 -0
- package/dist/data/runtime/bounded-http.js +403 -0
- package/dist/data/runtime/bounded-http.js.map +1 -0
- package/dist/data/runtime/canonical-json.d.ts +3 -0
- package/dist/data/runtime/canonical-json.js +59 -0
- package/dist/data/runtime/canonical-json.js.map +1 -0
- package/dist/data/runtime/credentials.d.ts +14 -0
- package/dist/data/runtime/credentials.js +67 -0
- package/dist/data/runtime/credentials.js.map +1 -0
- package/dist/data/runtime/csv.d.ts +4 -0
- package/dist/data/runtime/csv.js +51 -0
- package/dist/data/runtime/csv.js.map +1 -0
- package/dist/data/runtime/errors.d.ts +22 -0
- package/dist/data/runtime/errors.js +101 -0
- package/dist/data/runtime/errors.js.map +1 -0
- package/dist/data/runtime/execute.d.ts +11 -0
- package/dist/data/runtime/execute.js +358 -0
- package/dist/data/runtime/execute.js.map +1 -0
- package/dist/data/runtime/receipts.d.ts +13 -0
- package/dist/data/runtime/receipts.js +38 -0
- package/dist/data/runtime/receipts.js.map +1 -0
- package/dist/data/schemas/catalog.v1.json +73 -0
- package/dist/data/schemas/core-receipt.v1.json +117 -0
- package/dist/data/schemas/describe.v1.json +24 -0
- package/dist/data/schemas/discovery.v1.json +130 -0
- package/dist/data/schemas/doctor.v1.json +40 -0
- package/dist/data/schemas/error.v1.json +48 -0
- package/dist/data/schemas/manifest.v1.json +174 -0
- package/dist/data/schemas/run-request.v1.json +37 -0
- package/dist/data/schemas/run-result.v1.json +77 -0
- package/dist/data/schemas.d.ts +27 -0
- package/dist/data/schemas.js +69 -0
- package/dist/data/schemas.js.map +1 -0
- package/dist/env.js.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/http.js.map +1 -1
- package/dist/kb/config.js.map +1 -1
- package/dist/kb/pipeline-health.js.map +1 -1
- package/dist/research/orchestration.js +54 -7
- package/dist/research/orchestration.js.map +1 -1
- package/dist/research/workspace/acquisition.js.map +1 -1
- package/dist/research/workspace/audit-bundle.js +7 -2
- package/dist/research/workspace/audit-bundle.js.map +1 -1
- package/dist/research/workspace/broker.js.map +1 -1
- package/dist/research/workspace/constants.js.map +1 -1
- package/dist/research/workspace/credentials.d.ts +3 -0
- package/dist/research/workspace/credentials.js +20 -3
- package/dist/research/workspace/credentials.js.map +1 -1
- package/dist/research/workspace/data-evidence-adapter.d.ts +60 -0
- package/dist/research/workspace/data-evidence-adapter.js +314 -0
- package/dist/research/workspace/data-evidence-adapter.js.map +1 -0
- package/dist/research/workspace/discovery-status.js +10 -7
- package/dist/research/workspace/discovery-status.js.map +1 -1
- package/dist/research/workspace/discovery.js +12 -11
- package/dist/research/workspace/discovery.js.map +1 -1
- package/dist/research/workspace/evidence-ledger.d.ts +8 -1
- package/dist/research/workspace/evidence-ledger.js +46 -2
- package/dist/research/workspace/evidence-ledger.js.map +1 -1
- package/dist/research/workspace/evidence.d.ts +31 -0
- package/dist/research/workspace/evidence.js +77 -0
- package/dist/research/workspace/evidence.js.map +1 -1
- package/dist/research/workspace/executor.js.map +1 -1
- package/dist/research/workspace/external-skills.d.ts +49 -49
- package/dist/research/workspace/external-skills.js.map +1 -1
- package/dist/research/workspace/platform-capabilities.js.map +1 -1
- package/dist/research/workspace/preflight.d.ts +4 -4
- package/dist/research/workspace/preflight.js +33 -8
- package/dist/research/workspace/preflight.js.map +1 -1
- package/dist/research/workspace/projects.js.map +1 -1
- package/dist/research/workspace/publication.js.map +1 -1
- package/dist/research/workspace/research-policy-wizard.js.map +1 -1
- package/dist/research/workspace/research-policy.js.map +1 -1
- package/dist/research/workspace/runtime.d.ts +7 -0
- package/dist/research/workspace/runtime.js +77 -20
- package/dist/research/workspace/runtime.js.map +1 -1
- package/dist/research/workspace/sanitization.js.map +1 -1
- package/dist/research/workspace/schemas.js +1 -1
- package/dist/research/workspace/schemas.js.map +1 -1
- package/dist/research/workspace/scientific-design.js.map +1 -1
- package/dist/research/workspace/scientific-review.js.map +1 -1
- package/dist/research/workspace/setup-catalog.d.ts +9 -9
- package/dist/research/workspace/setup-catalog.js +2 -2
- package/dist/research/workspace/setup-catalog.js.map +1 -1
- package/dist/research/workspace/setup-declarative.js.map +1 -1
- package/dist/research/workspace/setup-instructions.d.ts +42 -0
- package/dist/research/workspace/setup-instructions.js +413 -0
- package/dist/research/workspace/setup-instructions.js.map +1 -0
- package/dist/research/workspace/setup-invocation.js.map +1 -1
- package/dist/research/workspace/setup-wizard.js +7 -0
- package/dist/research/workspace/setup-wizard.js.map +1 -1
- package/dist/research/workspace/setup.d.ts +18 -15
- package/dist/research/workspace/setup.js +68 -3
- package/dist/research/workspace/setup.js.map +1 -1
- package/dist/research/workspace/workspace.js.map +1 -1
- package/package.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -17,8 +17,8 @@ checkPaths:
|
|
|
17
17
|
- .docpact/config.yaml
|
|
18
18
|
- docs/agents/**
|
|
19
19
|
- src/**
|
|
20
|
-
lastReviewedAt: 2026-
|
|
21
|
-
lastReviewedCommit:
|
|
20
|
+
lastReviewedAt: 2026-09-01
|
|
21
|
+
lastReviewedCommit: 6f0dcb2407991994d2ff9476f6bc2d5c6546df42
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
# Tiangong AI CLI Contract
|
|
@@ -40,6 +40,10 @@ This repository owns the Tiangong AI command-line interface.
|
|
|
40
40
|
|
|
41
41
|
- `tiangong-ai --version`
|
|
42
42
|
- `tiangong-ai doctor`
|
|
43
|
+
- `tiangong-ai data catalog`
|
|
44
|
+
- `tiangong-ai data describe`
|
|
45
|
+
- `tiangong-ai data doctor`
|
|
46
|
+
- `tiangong-ai data run`
|
|
43
47
|
- `tiangong-ai kb ingest`
|
|
44
48
|
- `tiangong-ai kb ingest bulk`
|
|
45
49
|
- `tiangong-ai kb ingest jobs`
|
|
@@ -61,6 +65,16 @@ This repository owns the Tiangong AI command-line interface.
|
|
|
61
65
|
- `tiangong-ai research search`
|
|
62
66
|
- `tiangong-ai education search`
|
|
63
67
|
|
|
68
|
+
The built-in atomic data catalog currently contains 19 independently
|
|
69
|
+
discoverable capabilities for public environmental, regulatory, news-event,
|
|
70
|
+
social, video, and water-project data, including bounded USBR RISE and project
|
|
71
|
+
record capabilities.
|
|
72
|
+
Connector execution, normalization, schemas, provider limits, and
|
|
73
|
+
source/license restrictions belong under `src/data/**`. The execution manifest
|
|
74
|
+
digest is deliberately separate from the Agent-facing discovery metadata
|
|
75
|
+
digest; Skills may bind to execution contracts but must not copy connector
|
|
76
|
+
logic or treat discovery wording as runtime drift.
|
|
77
|
+
|
|
64
78
|
## Validation
|
|
65
79
|
|
|
66
80
|
Run before delivery:
|
|
@@ -68,6 +82,7 @@ Run before delivery:
|
|
|
68
82
|
```bash
|
|
69
83
|
npm run test:clean:cold
|
|
70
84
|
npm run lint
|
|
85
|
+
npm run typecheck
|
|
71
86
|
npm run build
|
|
72
87
|
npm test
|
|
73
88
|
npm run test:platform
|
|
@@ -106,3 +121,8 @@ test, coverage, and pack checks before publishing.
|
|
|
106
121
|
skill handoff boundaries.
|
|
107
122
|
- Read `docs/agents/repo-validation.md` before changing package scripts,
|
|
108
123
|
coverage thresholds, CI, or docpact configuration.
|
|
124
|
+
- Read `docs/agents/data-runtime-architecture.md` before changing proposed
|
|
125
|
+
atomic data commands, connectors, machine schemas, receipts, credentials, or
|
|
126
|
+
the Skills/Research data boundary.
|
|
127
|
+
- Read `docs/agents/data-runtime-implementation-plan.md` before starting or
|
|
128
|
+
sequencing the TypeScript 7 and atomic data migration work packages.
|
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@ checkPaths:
|
|
|
12
12
|
- package.json
|
|
13
13
|
- bin/**
|
|
14
14
|
- src/**
|
|
15
|
-
lastReviewedAt: 2026-
|
|
16
|
-
lastReviewedCommit:
|
|
15
|
+
lastReviewedAt: 2026-09-01
|
|
16
|
+
lastReviewedCommit: e387a5e66221ab91920a6e6c960cc717919caecb
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# Tiangong AI CLI
|
|
@@ -39,6 +39,132 @@ tiangong-ai --version
|
|
|
39
39
|
tiangong-ai -v
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
## Atomic Data Runtime
|
|
43
|
+
|
|
44
|
+
Inspect the built-in, versioned data capability catalog without network access:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
tiangong-ai data catalog --json
|
|
48
|
+
tiangong-ai data describe <capability-id> --json
|
|
49
|
+
tiangong-ai data doctor <capability-id> --json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Only explicit `doctor --live` and `run` operations may contact a provider. A
|
|
53
|
+
run accepts one closed request envelope from a file or stdin:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
tiangong-ai data run <capability-id> <operation-id> \
|
|
57
|
+
--input /absolute/path/to/request.json --json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The command-line capability and operation must match the versions in the input
|
|
61
|
+
envelope. Credentials are never accepted in argv or input JSON. Each connector
|
|
62
|
+
declares exact logical environment-variable bindings, HTTPS endpoint scopes,
|
|
63
|
+
and execution limits in its execution manifest. Data commands deliberately do
|
|
64
|
+
not load a cwd `.env` file.
|
|
65
|
+
|
|
66
|
+
`data catalog` also returns a concise capability summary, what the capability
|
|
67
|
+
provides and does not provide, operation summaries, and a separate discovery
|
|
68
|
+
digest. `data describe` expands that layer with source ownership, coverage,
|
|
69
|
+
granularity, selection hints, typical uses, official documentation, freshness,
|
|
70
|
+
license restrictions, and operation descriptions. Narrative discovery changes
|
|
71
|
+
do not change the execution manifest digest used for compatibility binding.
|
|
72
|
+
Operation input schemas include field-level descriptions and examples.
|
|
73
|
+
|
|
74
|
+
JSON exits are `0` for success, `2` for request/contract errors, `3` for a
|
|
75
|
+
blocked execution, and `4` for an explicit partial result. Public machine
|
|
76
|
+
schemas ship under `dist/data/schemas/`.
|
|
77
|
+
|
|
78
|
+
The built-in capabilities are:
|
|
79
|
+
|
|
80
|
+
- `airnow.hourly-observations` / `fetch-hourly`: fetches official AirNow
|
|
81
|
+
`HourlyAQObs` files for a bounded UTC-hour window, bounding box, and pollutant
|
|
82
|
+
list. Results retain source-file lineage and always state that AirNow data are
|
|
83
|
+
preliminary and unsuitable as regulatory-grade AQS evidence.
|
|
84
|
+
- `bluesky.public-posts` / `fetch-cascades`: fetches bounded public Bluesky
|
|
85
|
+
post seeds from search, an author feed, a custom feed, or a list feed and can
|
|
86
|
+
flatten visible reply cascades. Ranking, counters, moderation visibility, and
|
|
87
|
+
missing nodes remain explicit mutable AppView limitations.
|
|
88
|
+
- `epa.eis-records` / `search`: retrieves bounded official EPA EIS Database
|
|
89
|
+
common-search or UI-created search pages and parses title, CEQ/provider IDs,
|
|
90
|
+
document type, dates, agencies, state, detail links, and document-availability
|
|
91
|
+
cues. It does not fetch or assess linked EIS documents.
|
|
92
|
+
- `federal-register.documents` / `search`: searches bounded
|
|
93
|
+
FederalRegister.gov document metadata by publication date plus term, agency,
|
|
94
|
+
document type, topic, docket, or RIN filters. It does not follow result links,
|
|
95
|
+
fetch document full text, or provide legal interpretation.
|
|
96
|
+
- `gdelt.doc-search` / `search`: searches the rolling GDELT DOC 2.0 index for
|
|
97
|
+
bounded article-link metadata or supported aggregate timelines. Automated
|
|
98
|
+
multilingual extraction and uneven monitored-source coverage are explicit;
|
|
99
|
+
it does not retrieve article bodies or establish ground-truth facts.
|
|
100
|
+
- `gdelt.events`, `gdelt.gkg`, and `gdelt.mentions` / `fetch`: independently
|
|
101
|
+
discoverable GDELT 2.0 table capabilities backed by one bounded TypeScript
|
|
102
|
+
file-feed core. They fetch either the latest provider entry or at most twenty
|
|
103
|
+
aligned 15-minute files, verify ZIP/CRC and advertised latest-file checksums,
|
|
104
|
+
and emit closed named columns without persisting downloaded files.
|
|
105
|
+
- `nasa-firms.active-fire` / `fetch-area`: retrieves bounded NASA FIRMS MODIS,
|
|
106
|
+
VIIRS, or Landsat active-fire point detections, optionally validates source
|
|
107
|
+
availability, and exposes chunk-level partial coverage. Hotspots are thermal
|
|
108
|
+
anomalies, not fire perimeters or confirmed incident identities.
|
|
109
|
+
- `open-meteo.air-quality` / `fetch-hourly`: retrieves bounded GMT hourly CAMS
|
|
110
|
+
model-grid air-quality series for known coordinates; these are modeled
|
|
111
|
+
background values rather than station observations.
|
|
112
|
+
- `open-meteo.flood` / `fetch-daily`: retrieves bounded daily GloFAS simulated
|
|
113
|
+
river-discharge series for the represented river grid; it is neither gauge
|
|
114
|
+
data nor a flood-alert service.
|
|
115
|
+
- `open-meteo.historical-weather` / `fetch`: retrieves bounded GMT hourly and/or
|
|
116
|
+
daily historical weather reanalysis for one controlled model and known
|
|
117
|
+
coordinates. ERA5 or ERA5-Land should be selected when multi-decade model
|
|
118
|
+
consistency matters.
|
|
119
|
+
- `openaq.air-quality` / `search-locations` and `fetch-sensor-measurements`:
|
|
120
|
+
discovers filtered OpenAQ v3 locations and retrieves a bounded raw, hourly,
|
|
121
|
+
or daily series for one sensor. It preserves provider/license context but
|
|
122
|
+
does not calculate AQI or make health or regulatory determinations.
|
|
123
|
+
- `regulations-gov.comments` / `search` and `fetch-details`: searches bounded
|
|
124
|
+
Regulations.gov public-comment metadata and retrieves curated details for
|
|
125
|
+
explicit comment IDs. It omits named personal-profile fields, never submits
|
|
126
|
+
comments, and returns attachment metadata without downloading file bytes.
|
|
127
|
+
- `regulations-gov.attachments` / `download`: retrieves attachment metadata for
|
|
128
|
+
exact public comment IDs and writes bounded files only from the official
|
|
129
|
+
Regulations.gov download origin. It requires `--artifact-dir`, refuses to
|
|
130
|
+
overwrite files, and commits SHA-256-bound relative files plus a manifest;
|
|
131
|
+
it does not scan, open, extract, or interpret the untrusted bytes.
|
|
132
|
+
- `usbr.project-records` / `fetch`: inventories caller-supplied official
|
|
133
|
+
`www.usbr.gov` project or program pages plus bounded same-origin links. It
|
|
134
|
+
preserves page response provenance but does not follow, download, parse, or
|
|
135
|
+
assess linked records and is not USBR-wide search.
|
|
136
|
+
- `usbr.rise` / `discover-items` and `fetch-results`: scans bounded Bureau of
|
|
137
|
+
Reclamation RISE catalog pages for client-filtered candidate item IDs, then
|
|
138
|
+
retrieves bounded result rows for explicitly selected items. Provider scan
|
|
139
|
+
order is not ranking, and operational values require item metadata and domain
|
|
140
|
+
context before interpretation.
|
|
141
|
+
- `usgs.water-instantaneous-values` / `fetch`: retrieves bounded legacy USGS
|
|
142
|
+
WaterServices instantaneous observations while preserving site, parameter,
|
|
143
|
+
qualifier, provisional status, and source lifecycle warnings.
|
|
144
|
+
- `youtube.public-content` / `search-videos` and `fetch-comments`: discovers
|
|
145
|
+
public YouTube videos with detail enrichment and fetches bounded visible
|
|
146
|
+
comment/reply text for explicit video IDs. It does not download media or
|
|
147
|
+
transcripts and does not treat ranking or comments as representative opinion.
|
|
148
|
+
|
|
149
|
+
Fourteen capabilities are keyless. NASA FIRMS requires `NASA_FIRMS_MAP_KEY`, which the
|
|
150
|
+
CLI injects as a protected provider path segment; OpenAQ requires
|
|
151
|
+
`OPENAQ_API_KEY`, Regulations.gov requires `REGGOV_API_KEY`, and YouTube requires
|
|
152
|
+
`YOUTUBE_API_KEY`; the CLI injects all three as protected provider headers, with
|
|
153
|
+
YouTube using `X-Goog-Api-Key` rather than a URL parameter. No secret is accepted
|
|
154
|
+
in argv or input JSON. Exact input and output schemas,
|
|
155
|
+
endpoint scopes and limits are available through the execution manifest, while
|
|
156
|
+
source notes, coverage, selection guidance and license restrictions are
|
|
157
|
+
available in the discovery metadata returned by `data describe`; static
|
|
158
|
+
`data doctor` remains offline and reports a missing required credential without
|
|
159
|
+
making a network request.
|
|
160
|
+
|
|
161
|
+
Operations that declare local artifact output must be invoked with
|
|
162
|
+
`data run ... --artifact-dir <absolute-existing-directory>`. The path is an
|
|
163
|
+
out-of-band execution parameter and is excluded from the request, result, and
|
|
164
|
+
receipt. Files are staged under hidden temporary names, validated before an
|
|
165
|
+
atomic no-overwrite commit, and rolled back when execution or output validation
|
|
166
|
+
is blocked.
|
|
167
|
+
|
|
42
168
|
## KB Ingest
|
|
43
169
|
|
|
44
170
|
Required environment:
|
|
@@ -235,6 +361,18 @@ the default; global writes, network downloads, live provider checks, synthetic
|
|
|
235
361
|
document uploads, and paid agent smokes each require their applicable
|
|
236
362
|
confirmation.
|
|
237
363
|
|
|
364
|
+
When the orchestrator is selected with project scope, the reviewed plan also
|
|
365
|
+
binds its host-routing instructions. Codex receives one bounded managed block
|
|
366
|
+
in the workspace-root `AGENTS.md`; setup preserves every owner byte outside
|
|
367
|
+
that block. Claude Code receives the dedicated
|
|
368
|
+
`.claude/rules/tiangong-auto-research.md` file and setup never replaces an
|
|
369
|
+
owner `CLAUDE.md`. Existing conflicting, modified, linked, or otherwise unsafe
|
|
370
|
+
targets stop apply before mutation. Replacement plans remove only routing
|
|
371
|
+
bytes still proven to be setup-owned. Status and Doctor verify the installed
|
|
372
|
+
bytes and report that a new native-host session is required before the routing
|
|
373
|
+
instruction becomes active. Global-scope Skill installation does not create
|
|
374
|
+
project instruction files.
|
|
375
|
+
|
|
238
376
|
### Declarative setup
|
|
239
377
|
|
|
240
378
|
For repeatable provisioning without a TTY, generate a safe workspace-local
|
|
@@ -940,26 +1078,48 @@ records and JSONL progress preserve sanitized accounting mode, event/item
|
|
|
940
1078
|
counts, provider turns, tool calls, reasoning tokens, and bounded provider
|
|
941
1079
|
errors.
|
|
942
1080
|
|
|
943
|
-
Every evidence source must resolve to an admitted input
|
|
944
|
-
receipt
|
|
1081
|
+
Every evidence source must resolve to an admitted input, a completed broker
|
|
1082
|
+
receipt, or a completed structured data-runtime receipt. Successful broker and
|
|
1083
|
+
data results are immutable content-addressed objects under
|
|
945
1084
|
`.tiangong-research/evidence/objects`; receipts are project-scoped and verified
|
|
946
1085
|
for existence, size, and SHA-256 before every capsule stages them. Independent
|
|
947
1086
|
review binds the requirements, receipts, permanent evidence objects, inputs,
|
|
948
1087
|
and artifact hashes. Its exact packet and merged bounded evidence context are
|
|
949
1088
|
also content-addressed under the project `review/packets/` and
|
|
950
1089
|
`review/contexts/` directories. Mechanical closure re-verifies the packet,
|
|
951
|
-
context,
|
|
1090
|
+
context, evidence objects, and registered local input hashes before recording
|
|
952
1091
|
their safe locators. Capsule deletion therefore does not delete the durable
|
|
953
1092
|
review chain.
|
|
954
1093
|
|
|
955
1094
|
Native discovery preparation embeds the exact staged capability manifest and
|
|
956
|
-
each external Skill's top-level `SKILL.md`.
|
|
957
|
-
|
|
1095
|
+
each external Skill's top-level `SKILL.md`. It also projects every built-in data
|
|
1096
|
+
operation dynamically, with no per-provider Research adapter. The current host
|
|
1097
|
+
may fetch generic broker evidence with `research project evidence fetch`, whose bounded request file
|
|
958
1098
|
contains logical IDs but no credential values. The manifest includes the locked,
|
|
959
1099
|
non-secret HTTPS endpoint rather than only its host, and each response returns
|
|
960
1100
|
the exact bounded context plus a hash-bound receipt while retaining the raw
|
|
961
1101
|
object in the permanent evidence store. Host web/search/database tools cannot
|
|
962
1102
|
substitute for a required broker receipt.
|
|
1103
|
+
|
|
1104
|
+
For structured sources, inspect the packet catalog and the selected operation
|
|
1105
|
+
with `tiangong-ai data describe`, then run the exact request through:
|
|
1106
|
+
|
|
1107
|
+
```bash
|
|
1108
|
+
tiangong-ai research project evidence data run <project-id> \
|
|
1109
|
+
--request /absolute/path/to/data-run-request.json \
|
|
1110
|
+
--workspace /absolute/path/to/workspace --json
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
This Research command calls the same TypeScript data service in-process; it does
|
|
1114
|
+
not spawn `tiangong-ai data run`. It preserves the core data and receipt digest,
|
|
1115
|
+
then adds the project budget, namespaced owner-only credential mapping,
|
|
1116
|
+
content-addressed evidence/optional artifacts, candidate, ledger, journal, and
|
|
1117
|
+
review bindings. Research data execution never inherits provider credentials
|
|
1118
|
+
from the CLI host environment and does not fall back to `process.env`; every
|
|
1119
|
+
credentialed operation must resolve its namespaced logical credential from the
|
|
1120
|
+
workspace's owner-only store or it is blocked before any provider request.
|
|
1121
|
+
Standalone `tiangong-ai data run` keeps its separate manifest-declared
|
|
1122
|
+
environment-variable policy. A blocked data result is not promoted to evidence.
|
|
963
1123
|
Analyze and synthesize packets contain bounded, hash-verified prior-stage
|
|
964
1124
|
artifacts and require no external evidence calls. Review is tool-free and uses the
|
|
965
1125
|
reviewer's route-specific structured-output turn cap:
|
|
@@ -1191,12 +1351,16 @@ transitions.
|
|
|
1191
1351
|
## Validation
|
|
1192
1352
|
|
|
1193
1353
|
```bash
|
|
1354
|
+
npm run test:clean:cold
|
|
1194
1355
|
npm run lint
|
|
1356
|
+
npm run typecheck
|
|
1195
1357
|
npm test
|
|
1196
1358
|
npm run test:platform
|
|
1197
1359
|
npm run test:coverage
|
|
1198
1360
|
npm run audit:research-setup-pins
|
|
1361
|
+
npm pack --dry-run
|
|
1199
1362
|
docpact validate-config --root . --strict
|
|
1363
|
+
docpact lint --root . --worktree --mode enforce
|
|
1200
1364
|
```
|
|
1201
1365
|
|
|
1202
1366
|
## Release
|
package/dist/cli.js
CHANGED
|
@@ -12,6 +12,7 @@ import { isObject, responseData, stringField } from "./data.js";
|
|
|
12
12
|
import { firstEnv, loadDotenv } from "./env.js";
|
|
13
13
|
import { CliError, HttpError, toErrorPayload } from "./errors.js";
|
|
14
14
|
import { jsonRequest } from "./http.js";
|
|
15
|
+
import { runDataCommand } from "./data/commands.js";
|
|
15
16
|
import { runEducationCommand } from "./education/commands.js";
|
|
16
17
|
import { collectionKey, collectionPath, listCollections, resolveCollection, resolveSelectorFields, } from "./kb/client.js";
|
|
17
18
|
import { resolveKbConfig as resolveConfig } from "./kb/config.js";
|
|
@@ -62,12 +63,15 @@ export async function runCli(argv, io) {
|
|
|
62
63
|
write(io.stdout, `${CLI_VERSION}\n`);
|
|
63
64
|
return 0;
|
|
64
65
|
}
|
|
65
|
-
loadDotenv(io.env);
|
|
66
66
|
if (argv.length === 0 || argv[0] === "--help" || argv[0] === "-h") {
|
|
67
67
|
write(io.stdout, topHelp());
|
|
68
68
|
return 0;
|
|
69
69
|
}
|
|
70
70
|
const [command, subcommand, ...rest] = argv;
|
|
71
|
+
if (command === "data") {
|
|
72
|
+
return await runDataCommand(subcommand ? [subcommand, ...rest] : rest, io);
|
|
73
|
+
}
|
|
74
|
+
loadDotenv(io.env);
|
|
71
75
|
if (command === "doctor") {
|
|
72
76
|
if (subcommand === "--help" || subcommand === "-h") {
|
|
73
77
|
write(io.stdout, "Usage: tiangong-ai doctor\n");
|
|
@@ -2712,6 +2716,10 @@ Usage:
|
|
|
2712
2716
|
tiangong-ai kb ingest status <document-id>
|
|
2713
2717
|
tiangong-ai kb collections list [--capability upload]
|
|
2714
2718
|
tiangong-ai kb course fulltext --document-id <id> --tags <tag>
|
|
2719
|
+
tiangong-ai data catalog [--json]
|
|
2720
|
+
tiangong-ai data describe <capability-id> [--json]
|
|
2721
|
+
tiangong-ai data doctor <capability-id> [--live] [--json]
|
|
2722
|
+
tiangong-ai data run <capability-id> <operation-id> --input <path|-> [--json]
|
|
2715
2723
|
tiangong-ai research workspace init <absolute-path>
|
|
2716
2724
|
tiangong-ai research run [--workspace <absolute-path>] [--project <project-id>] [--max-parallel 1]
|
|
2717
2725
|
tiangong-ai research search --input <request.json>|--query <query> [--sources default|all|sci|report|patent|esg]
|
|
@@ -2722,6 +2730,7 @@ Options:
|
|
|
2722
2730
|
-v, --version Show the CLI version.
|
|
2723
2731
|
|
|
2724
2732
|
Run "tiangong-ai kb --help" for KB options.
|
|
2733
|
+
Run "tiangong-ai data --help" for atomic data options.
|
|
2725
2734
|
Run "tiangong-ai research --help" for research options.
|
|
2726
2735
|
Run "tiangong-ai education --help" for education options.
|
|
2727
2736
|
`;
|