@tiangong-ai/cli 0.0.57 → 0.0.59
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 +8 -2
- package/CONTRIBUTING.md +79 -0
- package/README.md +116 -3
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -1
- package/dist/research/orchestration.js +96 -26
- package/dist/research/orchestration.js.map +1 -1
- package/dist/research/workspace/acquisition-forecast.d.ts +18 -0
- package/dist/research/workspace/acquisition-forecast.js +116 -0
- package/dist/research/workspace/acquisition-forecast.js.map +1 -0
- package/dist/research/workspace/acquisition.d.ts +13 -1
- package/dist/research/workspace/acquisition.js +71 -62
- package/dist/research/workspace/acquisition.js.map +1 -1
- package/dist/research/workspace/artifacts.d.ts +18 -0
- package/dist/research/workspace/artifacts.js +40 -2
- package/dist/research/workspace/artifacts.js.map +1 -1
- package/dist/research/workspace/content-evidence.d.ts +37 -0
- package/dist/research/workspace/content-evidence.js +287 -137
- package/dist/research/workspace/content-evidence.js.map +1 -1
- package/dist/research/workspace/downloads.js +2 -2
- package/dist/research/workspace/downloads.js.map +1 -1
- package/dist/research/workspace/evidence-content-schema.d.ts +14 -0
- package/dist/research/workspace/evidence-content-schema.js +123 -0
- package/dist/research/workspace/evidence-content-schema.js.map +1 -0
- package/dist/research/workspace/evidence-ledger.d.ts +1 -1
- package/dist/research/workspace/evidence-ledger.js.map +1 -1
- package/dist/research/workspace/evidence-role-coverage.d.ts +35 -0
- package/dist/research/workspace/evidence-role-coverage.js +81 -0
- package/dist/research/workspace/evidence-role-coverage.js.map +1 -0
- package/dist/research/workspace/journal.d.ts +2 -0
- package/dist/research/workspace/journal.js +6 -0
- package/dist/research/workspace/journal.js.map +1 -1
- package/dist/research/workspace/preflight.d.ts +2 -0
- package/dist/research/workspace/preflight.js +14 -5
- package/dist/research/workspace/preflight.js.map +1 -1
- package/dist/research/workspace/projects.d.ts +7 -0
- package/dist/research/workspace/projects.js +65 -19
- package/dist/research/workspace/projects.js.map +1 -1
- package/dist/research/workspace/review-executor.d.ts +2 -0
- package/dist/research/workspace/review-executor.js +69 -1
- package/dist/research/workspace/review-executor.js.map +1 -1
- package/dist/research/workspace/runtime.d.ts +8 -1
- package/dist/research/workspace/runtime.js +54 -28
- package/dist/research/workspace/runtime.js.map +1 -1
- package/dist/research/workspace/schemas.js +10 -2
- package/dist/research/workspace/schemas.js.map +1 -1
- package/dist/research/workspace/scientific-design.d.ts +2 -1
- package/dist/research/workspace/scientific-design.js +39 -2
- package/dist/research/workspace/scientific-design.js.map +1 -1
- package/dist/research/workspace/scientific-review-execution.d.ts +19 -0
- package/dist/research/workspace/scientific-review-execution.js +445 -0
- package/dist/research/workspace/scientific-review-execution.js.map +1 -0
- package/dist/research/workspace/scientific-review.d.ts +110 -3
- package/dist/research/workspace/scientific-review.js +113 -20
- package/dist/research/workspace/scientific-review.js.map +1 -1
- package/dist/research/workspace/setup-catalog.js +3 -3
- package/dist/research/workspace/types.d.ts +4 -1
- package/dist/research/workspace/types.js +14 -1
- package/dist/research/workspace/types.js.map +1 -1
- package/dist/research/workspace/workspace.js +13 -1
- package/dist/research/workspace/workspace.js.map +1 -1
- package/package.json +2 -1
package/AGENTS.md
CHANGED
|
@@ -17,8 +17,8 @@ checkPaths:
|
|
|
17
17
|
- .docpact/config.yaml
|
|
18
18
|
- docs/agents/**
|
|
19
19
|
- src/**
|
|
20
|
-
lastReviewedAt: 2026-09-
|
|
21
|
-
lastReviewedCommit:
|
|
20
|
+
lastReviewedAt: 2026-09-02
|
|
21
|
+
lastReviewedCommit: 8a18ba69f432d2c639517549157ef29545722cff
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
# Tiangong AI CLI Contract
|
|
@@ -126,3 +126,9 @@ test, coverage, and pack checks before publishing.
|
|
|
126
126
|
the Skills/Research data boundary.
|
|
127
127
|
- Read `docs/agents/data-runtime-implementation-plan.md` before starting or
|
|
128
128
|
sequencing the TypeScript 7 and atomic data migration work packages.
|
|
129
|
+
|
|
130
|
+
## User Feedback
|
|
131
|
+
|
|
132
|
+
`CONTRIBUTING.md` implements the shared workspace reporting policy. Keep the
|
|
133
|
+
core form fields aligned with Skills and preserve offline help and packaged
|
|
134
|
+
reporting guidance. User reports do not require a root-cause diagnosis.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
docType: guide
|
|
3
|
+
scope: repo
|
|
4
|
+
status: current
|
|
5
|
+
authoritative: true
|
|
6
|
+
owner: cli
|
|
7
|
+
language: en
|
|
8
|
+
whenToUse: "When reporting bugs or requesting capabilities in cli."
|
|
9
|
+
whenToUpdate: "When reporting forms, feedback entrypoints, or the shared reporting contract change."
|
|
10
|
+
checkPaths:
|
|
11
|
+
- CONTRIBUTING.md
|
|
12
|
+
- .github/ISSUE_TEMPLATE/**
|
|
13
|
+
- README.md
|
|
14
|
+
lastReviewedAt: 2026-09-02
|
|
15
|
+
lastReviewedCommit: 4472738acc78eab396fb1f4c7f5e76af9ac703be
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Contributing Feedback / 提交反馈
|
|
19
|
+
|
|
20
|
+
Chinese and English reports are welcome. Start with the
|
|
21
|
+
[Bug report](https://github.com/tiangong-ai/cli/issues/new?template=bug_report.yml)
|
|
22
|
+
or [Feature request](https://github.com/tiangong-ai/cli/issues/new?template=feature_request.yml).
|
|
23
|
+
These implement the shared [reporting contract v1](https://github.com/tiangong-ai/workspace/blob/main/_docs/contracts/issue-reporting-policy.md).
|
|
24
|
+
本仓库与另一个项目使用同一套核心字段;可以用中文或英文填写。
|
|
25
|
+
|
|
26
|
+
## Where To Report / 提交到哪里
|
|
27
|
+
|
|
28
|
+
- Skill instructions, prompt orchestration, references, and agent routing:
|
|
29
|
+
[Skills](https://github.com/tiangong-ai/skills/issues/new/choose).
|
|
30
|
+
- Commands, setup/install failures, runtime errors, locks, and package issues:
|
|
31
|
+
[CLI](https://github.com/tiangong-ai/cli/issues/new/choose).
|
|
32
|
+
- Uncertain or cross-component problems: use CLI and select `Unsure / 不确定`
|
|
33
|
+
when the component is unknown. Maintainers handle transfers or linked tasks.
|
|
34
|
+
无法判断归属时提交到 CLI;不需要在两个仓库重复提交。
|
|
35
|
+
|
|
36
|
+
## Useful Reports / 填写原则
|
|
37
|
+
|
|
38
|
+
Search existing issues first. Report one problem or capability at a time.
|
|
39
|
+
Describe what you wanted to do, what you expected, and what actually happened.
|
|
40
|
+
A root-cause diagnosis or implementation plan is optional. Unknown versions and
|
|
41
|
+
unreproducible failures are accepted: explain what is known and what is missing.
|
|
42
|
+
先查重复,聚焦一个问题;无需先找出根因,无法复现也可提交已有证据。
|
|
43
|
+
|
|
44
|
+
For bugs, fill Summary, Goal, Component, Versions, Environment, Stage,
|
|
45
|
+
Reproduction, Expected result, and Actual result. Evidence is optional. Include
|
|
46
|
+
the actual CLI and Skill versions used by the failing run, native host/model,
|
|
47
|
+
OS, and installation method when known. A managed workspace's locked CLI can
|
|
48
|
+
differ from `tiangong-ai --version` in a global shell; use existing run records
|
|
49
|
+
or read-only lock inspection and label the source. Do not update the workspace
|
|
50
|
+
just to obtain a version. 填写出错时使用的实际版本,不要用升级后的版本替代。
|
|
51
|
+
|
|
52
|
+
For features, fill Summary, Component, Use case, Current limitation, Proposed
|
|
53
|
+
capability, and Success criteria; Alternatives is optional. No fault logs are
|
|
54
|
+
required. 功能建议说明场景、障碍、期望能力和成功示例即可。
|
|
55
|
+
|
|
56
|
+
Share only minimal sanitized logs, commands, or prompt excerpts. Remove keys,
|
|
57
|
+
tokens, authorization headers, private paths, private research data, and
|
|
58
|
+
unrelated conversation text. Do not attach an entire research directory or
|
|
59
|
+
environment dump. Optional audit exports require review before sharing; do not
|
|
60
|
+
run paid provider/model checks or repeat research solely to file an issue.
|
|
61
|
+
仅提供最少量脱敏证据,不要上传密钥、整个工作区或完整私有对话。
|
|
62
|
+
|
|
63
|
+
## Agent-Assisted Reports / 让 Agent 协助
|
|
64
|
+
|
|
65
|
+
Ask the installed Auto Research Skill to prepare an issue report. It carries a
|
|
66
|
+
local reporting reference and Markdown templates; a workspace source checkout
|
|
67
|
+
is unnecessary. Preserve the same English section labels as the form while
|
|
68
|
+
writing the content in either language. State `Unknown` or `Not applicable`
|
|
69
|
+
with a reason instead of inventing details. An agent may draft locally; it posts
|
|
70
|
+
or uploads only with user authorization, including authorization already given
|
|
71
|
+
in the session. 可以先生成草稿;实际提交遵循用户已给出的授权。
|
|
72
|
+
|
|
73
|
+
## Maintainer Handoff / 维护者接手
|
|
74
|
+
|
|
75
|
+
Maintainers preserve the original report, verify component ownership, link
|
|
76
|
+
duplicates, and add development scope, TODOs, acceptance criteria, validation,
|
|
77
|
+
and integration requirements before starting implementation. Reporters do not
|
|
78
|
+
need Project access or knowledge of internal delivery rules.
|
|
79
|
+
维护者负责把反馈整理为可执行任务,不把内部交付要求转嫁给反馈者。
|
package/README.md
CHANGED
|
@@ -12,14 +12,24 @@ checkPaths:
|
|
|
12
12
|
- package.json
|
|
13
13
|
- bin/**
|
|
14
14
|
- src/**
|
|
15
|
-
lastReviewedAt: 2026-09-
|
|
16
|
-
lastReviewedCommit:
|
|
15
|
+
lastReviewedAt: 2026-09-02
|
|
16
|
+
lastReviewedCommit: 8a18ba69f432d2c639517549157ef29545722cff
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# Tiangong AI CLI
|
|
20
20
|
|
|
21
21
|
Package: `@tiangong-ai/cli` Executable: `tiangong-ai` Node: `>=24`
|
|
22
22
|
|
|
23
|
+
## Feedback
|
|
24
|
+
|
|
25
|
+
Use the [Bug and feature forms](https://github.com/tiangong-ai/cli/issues/new/choose)
|
|
26
|
+
and [reporting guide](https://github.com/tiangong-ai/cli/blob/main/CONTRIBUTING.md).
|
|
27
|
+
Chinese and English reports are welcome; unknown versions or incomplete
|
|
28
|
+
reproduction are accepted with an explanation. CLI help exposes these links,
|
|
29
|
+
and the npm package includes `CONTRIBUTING.md`. For Skill instructions and
|
|
30
|
+
orchestration, use the [Skills forms](https://github.com/tiangong-ai/skills/issues/new/choose);
|
|
31
|
+
uncertain ownership can be reported here for maintainer triage.
|
|
32
|
+
|
|
23
33
|
## Run From This Repository
|
|
24
34
|
|
|
25
35
|
```bash
|
|
@@ -650,7 +660,33 @@ tiangong-ai research project scientific review submit top-journal-paper \
|
|
|
650
660
|
--workspace /absolute/path/to/workspace --json
|
|
651
661
|
```
|
|
652
662
|
|
|
653
|
-
|
|
663
|
+
For a prepared packet, use explicit isolated execution instead of writing a
|
|
664
|
+
custom reviewer runner:
|
|
665
|
+
|
|
666
|
+
```bash
|
|
667
|
+
tiangong-ai research reviewer status --workspace /absolute/path/to/workspace --json
|
|
668
|
+
tiangong-ai research project scientific review execute top-journal-paper \
|
|
669
|
+
--role research-design --confirm-review-cost \
|
|
670
|
+
--workspace /absolute/path/to/workspace --json
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
Confirm the bounded cost before execution. The command uses the configured
|
|
674
|
+
`native-direct` or `sandbox-bridge` reviewer, copies exact hash-verified packet
|
|
675
|
+
inputs and human Policy documents into its capsule, and submits only a
|
|
676
|
+
schema-valid, packet/session-bound review. A saved successful execution is
|
|
677
|
+
replayed without another model call after revalidating its immutable proof.
|
|
678
|
+
Failures require explicit `--retry` and remain bounded by the attempt budget;
|
|
679
|
+
unreported usage and interrupted wall time retain conservative reservations.
|
|
680
|
+
A nonpassing mechanical packet can receive an independent stop verdict, never
|
|
681
|
+
an override. The existing manual submit command remains available for an exact
|
|
682
|
+
independent review.
|
|
683
|
+
|
|
684
|
+
Reviewer status is read-only and transport-aware. Native-direct does not
|
|
685
|
+
require a bridge connection. Smoke configuration readiness is explicitly not
|
|
686
|
+
production readiness and does not demand an attestation that smoke mode never
|
|
687
|
+
writes. Production still requires its current reviewer doctor attestation.
|
|
688
|
+
|
|
689
|
+
Repeat the same prepare/execute route for `evidence-construct`, adding an
|
|
654
690
|
owner-reviewed JSON array of absolute canonical canary paths with
|
|
655
691
|
`--canary-artifacts /absolute/path/to/canary-paths.json`, and then for
|
|
656
692
|
`pilot-methods` at its stage boundary. A top-journal fork or addendum is a
|
|
@@ -966,6 +1002,25 @@ resume criteria. Research then stops; it does not spend more budget on
|
|
|
966
1002
|
low-yield substitutes. If no lawful remaining route exists, the user must narrow
|
|
967
1003
|
or abandon the unsupported scope before a new reviewed generation can resume.
|
|
968
1004
|
|
|
1005
|
+
Before submitting an acquisition audit, inspect its exact current eligibility:
|
|
1006
|
+
|
|
1007
|
+
```bash
|
|
1008
|
+
tiangong-ai research project evidence content forecast PROJECT \
|
|
1009
|
+
--input /absolute/path/acquisition-audit.json --workspace /absolute/workspace --json
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
This read-only check uses the freeze path's source projection and coverage
|
|
1013
|
+
rules, checks registered artifact bytes and provenance, and forecasts required
|
|
1014
|
+
roles from potentially assignable source dimensions. Exit `3` identifies known
|
|
1015
|
+
deficits; exit `0` means only potential eligibility, never successful atom
|
|
1016
|
+
registration, content freeze, independence certification, or review. Pending
|
|
1017
|
+
input materialization, decomposition, and exact atom assignments remain
|
|
1018
|
+
explicit. Re-run after material acquisition changes, not after every atom.
|
|
1019
|
+
Flat `sourceTypeRequirements` arrays mean **all-of**. A design may instead use
|
|
1020
|
+
`{"allOf":["academic-paper"],"anyOf":["government","industry"],"atLeast":{"count":2,"from":["academic-paper","government","industry"]}}`;
|
|
1021
|
+
every present group applies, and counts use distinct types. Forecast, typed
|
|
1022
|
+
content, and scientific review use the same source-type evaluator.
|
|
1023
|
+
|
|
969
1024
|
Acquisition freezes an immutable evidence snapshot even when lawful retrieval
|
|
970
1025
|
ends with explicit gaps. Before inference, decompose every acquired PDF,
|
|
971
1026
|
spreadsheet, archive, or structured file into exact lineage-bound producer-
|
|
@@ -984,6 +1039,46 @@ closure remains unchanged, the child snapshot records a mechanical delta, and
|
|
|
984
1039
|
default status hides the superseded project (`research status --all` shows full
|
|
985
1040
|
lineage).
|
|
986
1041
|
|
|
1042
|
+
For many content records, use `research project evidence decomposition batch
|
|
1043
|
+
<project-id> --record <absolute-json>` or `research project evidence atom batch
|
|
1044
|
+
<project-id> --record <absolute-json>`, with `--workspace` and `--json` as needed.
|
|
1045
|
+
The input is `{"schemaVersion":1,"records":[...]}`; each item has exactly the same
|
|
1046
|
+
schema and validation as the corresponding single-record command. A batch is
|
|
1047
|
+
bounded to 500 records and 4 MiB of input. The CLI verifies acquisition/artifact
|
|
1048
|
+
bindings once per batch, groups atoms by artifact to read and parse each referenced
|
|
1049
|
+
document once without retaining all files in memory, and commits one hash-bound
|
|
1050
|
+
immutable envelope through one ledger event. A bad item commits nothing; identical
|
|
1051
|
+
replay is idempotent and a changed ID is rejected. Uncommitted envelopes are never
|
|
1052
|
+
visible and a retry can safely complete their commit. `work` reports deterministic
|
|
1053
|
+
verification, read, and append counts; no persistent verification cache is trusted.
|
|
1054
|
+
|
|
1055
|
+
Retrieve these CLI-owned input schemas with `research schema show evidence-atom`,
|
|
1056
|
+
`artifact-decomposition`, `evidence-atom-batch`, or `artifact-decomposition-batch`
|
|
1057
|
+
and `--json`. Help and command intake share the batch-limit constants. Schemas
|
|
1058
|
+
validate structure; execution still checks exact artifact/lineage bindings,
|
|
1059
|
+
locator semantics, stage, and sensitive content. A schema pass is not admission.
|
|
1060
|
+
|
|
1061
|
+
Before a potentially large download, use the offline command
|
|
1062
|
+
`research project evidence artifact preflight --bytes <known-bytes> --workspace
|
|
1063
|
+
<path> --json`, or replace `--bytes` with `--path <exact-local-file>` for a stat-only
|
|
1064
|
+
check. `budget.maxBytesPerArtifact` bounds one acquired/downloaded file;
|
|
1065
|
+
`budget.maxBytesPerPackage` separately bounds aggregate generated stage outputs.
|
|
1066
|
+
Both are exposed in preflight, and native packets expose `maxArtifactBytes` beside
|
|
1067
|
+
`maxOutputBytes`. Their defaults remain 20 MiB in smoke mode and 512 MiB in
|
|
1068
|
+
production. A missing artifact field in an existing configuration retains its
|
|
1069
|
+
existing package limit in memory without rewriting the owner's file; an explicit
|
|
1070
|
+
invalid limit is rejected. Preflight exit 3 means stop and request a provider-side
|
|
1071
|
+
subset/filter or smaller official export preserving required variables/provenance.
|
|
1072
|
+
A size pass is not content acceptance: download binding, format, archive-expansion,
|
|
1073
|
+
SHA-256, and snapshot checks still apply. This is not a large-file streaming or
|
|
1074
|
+
external-reference bypass.
|
|
1075
|
+
|
|
1076
|
+
Use acquisition `gaps` only for unresolved blocking evidence deficiencies;
|
|
1077
|
+
`limitations` holds non-blocking scope constraints and intentionally sealed
|
|
1078
|
+
outcomes. Future Policy obligations stay in the scientific design and appear
|
|
1079
|
+
in `futureGateObligations`, including ordinary planned rules without pending
|
|
1080
|
+
model/uncertainty objects. Their declared gate remains authoritative.
|
|
1081
|
+
|
|
987
1082
|
Accepted local inputs are normalized into immutable input-backed artifacts while
|
|
988
1083
|
the acquire package is still active. JSON, CSV, Markdown, and plain-text inputs
|
|
989
1084
|
therefore have an atom-capable identity even when the producer omitted an
|
|
@@ -1001,6 +1096,12 @@ JSON/JSONL `projectId`, so historical blocked siblings do not alter its exit
|
|
|
1001
1096
|
status. Omit `--project` and use `--max-parallel` only for an intentional
|
|
1002
1097
|
workspace-wide run.
|
|
1003
1098
|
|
|
1099
|
+
Run/status share the same due scientific-gate decision: pending/prepared review,
|
|
1100
|
+
revision-required, and stopped are distinct from a runnable native stage.
|
|
1101
|
+
Future gates do not prevent earlier discovery or acquisition. Legitimate
|
|
1102
|
+
historical and user/external-wait project states remain doctor-readable;
|
|
1103
|
+
unknown states and broken evidence bindings still block readiness.
|
|
1104
|
+
|
|
1004
1105
|
Inputs are admitted by SHA-256. Native producer preparation creates an
|
|
1005
1106
|
ephemeral, hash-bound packet directory but does not copy agent authentication
|
|
1006
1107
|
or start an agent. The independent reviewer runs with a dedicated capsule HOME
|
|
@@ -1279,6 +1380,18 @@ pilot-methods reviews before analysis. `research status --all` marks any legacy
|
|
|
1279
1380
|
fork directory without a `project.forked` commit marker as
|
|
1280
1381
|
`authority.state = "invalid"` rather than authoritative.
|
|
1281
1382
|
|
|
1383
|
+
To repair completed acquisition before analysis, use
|
|
1384
|
+
`research project fork SOURCE --to TARGET --resume-through discover`. This
|
|
1385
|
+
preserves the original frozen audit, inherits verified discovery/receipts and
|
|
1386
|
+
exact acquired artifacts, and opens TARGET's acquire stage. Reuse the returned
|
|
1387
|
+
artifact IDs from the source acquisition audit, run
|
|
1388
|
+
`project evidence content forecast TARGET --input AUDIT`,
|
|
1389
|
+
then prepare/submit TARGET's acquire stage and rebuild typed content. There is
|
|
1390
|
+
no need to repeat paid searches or download unchanged files. Top-journal
|
|
1391
|
+
recovery additionally requires a Policy approved for TARGET and `--design`,
|
|
1392
|
+
`--design-producer-agent`, and `--design-producer-session`; new generation
|
|
1393
|
+
reviews cannot inherit the source generation's scientific approval.
|
|
1394
|
+
|
|
1282
1395
|
## Research Search
|
|
1283
1396
|
|
|
1284
1397
|
Forward research-oriented search requests to SCI, report, patent, and ESG edge
|
package/dist/cli.js
CHANGED
|
@@ -2733,6 +2733,11 @@ Run "tiangong-ai kb --help" for KB options.
|
|
|
2733
2733
|
Run "tiangong-ai data --help" for atomic data options.
|
|
2734
2734
|
Run "tiangong-ai research --help" for research options.
|
|
2735
2735
|
Run "tiangong-ai education --help" for education options.
|
|
2736
|
+
|
|
2737
|
+
Report a problem or suggest a capability:
|
|
2738
|
+
https://github.com/tiangong-ai/cli/issues/new/choose
|
|
2739
|
+
Reporting guide:
|
|
2740
|
+
https://github.com/tiangong-ai/cli/blob/main/CONTRIBUTING.md
|
|
2736
2741
|
`;
|
|
2737
2742
|
}
|
|
2738
2743
|
function kbHelp() {
|