@tiangong-ai/cli 0.0.42 → 0.0.44
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 +3 -2
- package/README.md +87 -24
- package/dist/research/orchestration.js +318 -14
- package/dist/research/orchestration.js.map +1 -1
- package/dist/research/setup-command.js +13 -1
- package/dist/research/setup-command.js.map +1 -1
- package/dist/research/workspace/acquisition.d.ts +7 -0
- package/dist/research/workspace/acquisition.js +37 -10
- package/dist/research/workspace/acquisition.js.map +1 -1
- package/dist/research/workspace/audit-bundle.d.ts +18 -0
- package/dist/research/workspace/audit-bundle.js +100 -3
- package/dist/research/workspace/audit-bundle.js.map +1 -1
- package/dist/research/workspace/content-evidence.d.ts +98 -0
- package/dist/research/workspace/content-evidence.js +715 -0
- package/dist/research/workspace/content-evidence.js.map +1 -0
- package/dist/research/workspace/evidence-ledger.d.ts +1 -1
- package/dist/research/workspace/evidence-ledger.js +2 -0
- package/dist/research/workspace/evidence-ledger.js.map +1 -1
- package/dist/research/workspace/executor.d.ts +9 -0
- package/dist/research/workspace/executor.js +161 -4
- package/dist/research/workspace/executor.js.map +1 -1
- package/dist/research/workspace/inference.d.ts +69 -0
- package/dist/research/workspace/inference.js +360 -0
- package/dist/research/workspace/inference.js.map +1 -0
- package/dist/research/workspace/native-activity.js +14 -5
- package/dist/research/workspace/native-activity.js.map +1 -1
- package/dist/research/workspace/preflight.d.ts +2 -0
- package/dist/research/workspace/preflight.js +6 -2
- package/dist/research/workspace/preflight.js.map +1 -1
- package/dist/research/workspace/projects.js +17 -1
- package/dist/research/workspace/projects.js.map +1 -1
- package/dist/research/workspace/publication-workflow.d.ts +26 -0
- package/dist/research/workspace/publication-workflow.js +314 -3
- package/dist/research/workspace/publication-workflow.js.map +1 -1
- package/dist/research/workspace/review-executor.d.ts +50 -0
- package/dist/research/workspace/review-executor.js +854 -0
- package/dist/research/workspace/review-executor.js.map +1 -0
- package/dist/research/workspace/runtime.js +194 -45
- package/dist/research/workspace/runtime.js.map +1 -1
- package/dist/research/workspace/schemas.js +83 -4
- package/dist/research/workspace/schemas.js.map +1 -1
- package/dist/research/workspace/scientific-review.js +57 -0
- package/dist/research/workspace/scientific-review.js.map +1 -1
- package/dist/research/workspace/setup-catalog.js +22 -2
- package/dist/research/workspace/setup-catalog.js.map +1 -1
- package/dist/research/workspace/setup-declarative.d.ts +4 -0
- package/dist/research/workspace/setup-declarative.js +16 -1
- package/dist/research/workspace/setup-declarative.js.map +1 -1
- package/dist/research/workspace/setup-wizard.js +46 -3
- package/dist/research/workspace/setup-wizard.js.map +1 -1
- package/dist/research/workspace/setup.d.ts +3 -1
- package/dist/research/workspace/setup.js +77 -19
- package/dist/research/workspace/setup.js.map +1 -1
- package/dist/research/workspace/types.d.ts +43 -1
- package/dist/research/workspace/workspace.js +62 -5
- package/dist/research/workspace/workspace.js.map +1 -1
- package/package.json +1 -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-08-
|
|
21
|
-
lastReviewedCommit:
|
|
20
|
+
lastReviewedAt: 2026-08-19
|
|
21
|
+
lastReviewedCommit: cd92a737acbdfd05a36c0d0d5b14c7e531ae6ee7
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
# Tiangong AI CLI Contract
|
|
@@ -52,6 +52,7 @@ This repository owns the Tiangong AI command-line interface.
|
|
|
52
52
|
- `tiangong-ai research policy`
|
|
53
53
|
- `tiangong-ai research publication`
|
|
54
54
|
- `tiangong-ai research workspace`
|
|
55
|
+
- `tiangong-ai research reviewer`
|
|
55
56
|
- `tiangong-ai research capability`
|
|
56
57
|
- `tiangong-ai research project`
|
|
57
58
|
- `tiangong-ai research status`
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ checkPaths:
|
|
|
13
13
|
- bin/**
|
|
14
14
|
- src/**
|
|
15
15
|
lastReviewedAt: 2026-08-18
|
|
16
|
-
lastReviewedCommit:
|
|
16
|
+
lastReviewedCommit: 34a5c2a3af26fc56e9c9dc94fcbdabd91a6dd1d8
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# Tiangong AI CLI
|
|
@@ -376,7 +376,7 @@ binds the manifest and every document by SHA-256; edits, manifest tampering, or
|
|
|
376
376
|
expiry block preflight and all later stages until the Policy is reviewed and
|
|
377
377
|
approved again.
|
|
378
378
|
|
|
379
|
-
Before search, the current native Codex or
|
|
379
|
+
Before search, the current native Codex, Claude, WorkBuddy, or CodeBuddy host must author a
|
|
380
380
|
project-specific scientific design. The CLI owns the closed schema and rejects
|
|
381
381
|
designs that confuse model-to-model disagreement with observed truth, inflate
|
|
382
382
|
independent sample size through resampling, omit quantity/threshold semantics,
|
|
@@ -417,14 +417,17 @@ tiangong-ai research project init top-journal-paper \
|
|
|
417
417
|
--workspace /absolute/path/to/workspace --json
|
|
418
418
|
```
|
|
419
419
|
|
|
420
|
-
The base evidence lifecycle remains
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
The base evidence lifecycle remains producer-authored in the current interactive
|
|
421
|
+
Codex or Claude Code host, but its frozen control sequence is now
|
|
422
|
+
`discover -> acquire -> typed decomposition/atoms -> content freeze -> inference freeze -> analyze -> Claim-Evidence Graph -> synthesize -> review -> close`.
|
|
423
|
+
A fresh independent reviewer
|
|
423
424
|
must first pass three hash-bound scientific gates: `research-design` before
|
|
424
425
|
discovery, a real-record and outcome-blind `evidence-construct` canary after
|
|
425
|
-
acquisition
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
acquisition and typed-content freeze, and `pilot-methods` after that canary and
|
|
427
|
+
before analysis. Acquisition always freezes its exact result, including honest
|
|
428
|
+
gaps; a stopped acquisition/content gate prevents inference without discarding
|
|
429
|
+
the acquired evidence. Evidence-construct coverage may cite only frozen
|
|
430
|
+
snapshot source IDs and exact content atoms. Its JSON canary artifacts are promoted and
|
|
428
431
|
content-addressed through `--canary-artifacts`; reviewer prose cannot override
|
|
429
432
|
an invented ID, unbound digest, or other mechanical failure.
|
|
430
433
|
|
|
@@ -457,14 +460,23 @@ audit manifest separately records the raw stored packet-file digest. This keeps
|
|
|
457
460
|
packet identity and byte-level transfer verification explicit rather than
|
|
458
461
|
overloading one hash with both meanings.
|
|
459
462
|
|
|
460
|
-
After base closure, the current native host writes a final
|
|
461
|
-
schema-valid publication assessment
|
|
462
|
-
|
|
463
|
-
|
|
463
|
+
After base closure, the current native host writes a final Markdown/plain-text
|
|
464
|
+
manuscript, schema-valid publication assessment, and an explicit submission
|
|
465
|
+
manifest. The manuscript must contain Abstract, Introduction, Methods, Results,
|
|
466
|
+
Discussion, Data availability, Code availability, and References. The
|
|
467
|
+
submission manifest must bind distinct absolute files for cover letter, title
|
|
468
|
+
page, reporting checklist, data availability, code availability, and source
|
|
469
|
+
data; figure/table index, extended data, and supplementary methods are optional.
|
|
470
|
+
`research publication freeze` then content-addresses the Policy, scientific
|
|
471
|
+
design and early reviews, acquisition/content/inference snapshots, reproduced
|
|
472
|
+
analysis, Claim-Evidence Graph, base outputs, manuscript, assessment,
|
|
473
|
+
supplements, role-complete submission files, and reproducibility manifest.
|
|
464
474
|
Exactly four fresh independent sessions review that frozen generation:
|
|
465
475
|
evidence, methods/reproducibility, domain/novelty, and journal-editor. A revised
|
|
466
|
-
manuscript invalidates prior reviews
|
|
467
|
-
|
|
476
|
+
manuscript invalidates prior reviews. Every reviewer must use the configured
|
|
477
|
+
agent family that differs from the native producer; changing only the session
|
|
478
|
+
ID is not independent. Reviewer-session reuse is rejected from the append-only
|
|
479
|
+
journal even if mutable cache state is removed. The raw opaque
|
|
468
480
|
producer/reviewer session identifiers are accepted only at the command boundary;
|
|
469
481
|
generation, packet, review, journal, and closure objects persist only their
|
|
470
482
|
SHA-256 bindings.
|
|
@@ -474,6 +486,7 @@ tiangong-ai research schema show publication-assessment --json
|
|
|
474
486
|
tiangong-ai research publication freeze top-journal-paper \
|
|
475
487
|
--manuscript /absolute/path/to/final-manuscript.md \
|
|
476
488
|
--assessment /absolute/path/to/publication-assessment.json \
|
|
489
|
+
--submission /absolute/path/to/submission-package.json \
|
|
477
490
|
--producer-agent codex --producer-session OPAQUE_NATIVE_SESSION \
|
|
478
491
|
--workspace /absolute/path/to/workspace --json
|
|
479
492
|
tiangong-ai research publication status top-journal-paper \
|
|
@@ -486,9 +499,13 @@ The CLI returns a mechanically bounded ceiling:
|
|
|
486
499
|
it. None of these states predicts or guarantees editorial acceptance.
|
|
487
500
|
|
|
488
501
|
Before external handoff or archival, export and independently verify a portable
|
|
489
|
-
audit directory.
|
|
502
|
+
audit directory. Export first revalidates the semantic acquisition, content,
|
|
503
|
+
inference, graph, and publication objects; a copied but stale/tampered chain is
|
|
504
|
+
rejected. Its manifest exposes their intrinsic IDs and hashes under
|
|
505
|
+
`researchChain`. It contains the selected project, portable copies of admitted
|
|
490
506
|
inputs, formal evidence and artifact bytes, Policy/design/review objects,
|
|
491
|
-
outputs, environment fingerprints, and
|
|
507
|
+
outputs, environment fingerprints, and safe hash-preserving journal proof
|
|
508
|
+
derivatives. Credentials, setup
|
|
492
509
|
sources, browser profiles, native active state, capsules, unrelated projects,
|
|
493
510
|
and host-specific absolute paths are excluded.
|
|
494
511
|
|
|
@@ -585,13 +602,19 @@ The workspace stores its current protocol state under `.tiangong-research/`.
|
|
|
585
602
|
Each project follows the evidence-first sequence: broad discovery, strict
|
|
586
603
|
admission, acquisition audit, immutable evidence freeze, analysis, synthesis,
|
|
587
604
|
independent review, and mechanical closure. Discover, acquire, analyze, and
|
|
588
|
-
synthesize run in the current interactive Codex
|
|
589
|
-
session. The CLI never launches a nested producer process. Independent review
|
|
605
|
+
synthesize run in the current interactive Codex, Claude Code, WorkBuddy, or
|
|
606
|
+
CodeBuddy session. The CLI never launches a nested producer process. Independent review
|
|
590
607
|
runs through the other configured agent family's CLI, and execution is blocked
|
|
591
608
|
when the two roles use the same family.
|
|
592
609
|
|
|
593
|
-
Independent reviewer execution requires `/usr/bin/sandbox-exec` on macOS
|
|
594
|
-
Bubblewrap (`bwrap`) on Linux.
|
|
610
|
+
Independent reviewer execution always requires `/usr/bin/sandbox-exec` on macOS
|
|
611
|
+
or Bubblewrap (`bwrap`) on Linux. `reviewerExecution.transport=native-direct`
|
|
612
|
+
creates that capsule in the current process. `sandbox-bridge` sends one
|
|
613
|
+
hash-bound request to an owner-started, exact-version sidecar outside an IDE
|
|
614
|
+
sandbox; the sidecar creates the same capsule and returns an Ed25519-signed
|
|
615
|
+
attestation bound to workspace/config/runtime/capsule/request/result/model and
|
|
616
|
+
policy hashes. The two transports are explicit and never fall back to each
|
|
617
|
+
other. Windows can inspect and configure workspaces but
|
|
595
618
|
does not launch reviewer packages; smoke-test setup reports a non-blocking
|
|
596
619
|
warning there, while production readiness fails closed. The current native producer remains governed
|
|
597
620
|
by its host application's own permissions; the CLI supplies a hash-bound packet
|
|
@@ -611,7 +634,7 @@ tiangong-ai research run --workspace /absolute/path/to/workspace \
|
|
|
611
634
|
--project gpu-resource-impact --progress-jsonl
|
|
612
635
|
# When stopReason is native-stage-required, perform the returned stage here:
|
|
613
636
|
tiangong-ai research project stage prepare gpu-resource-impact \
|
|
614
|
-
--stage discover --host-agent
|
|
637
|
+
--stage discover --host-agent workbuddy \
|
|
615
638
|
--workspace /absolute/path/to/workspace --json
|
|
616
639
|
tiangong-ai research project stage submit gpu-resource-impact \
|
|
617
640
|
--session SESSION_ID --output /absolute/path/to/discover.json \
|
|
@@ -620,6 +643,36 @@ tiangong-ai research project stage submit gpu-resource-impact \
|
|
|
620
643
|
tiangong-ai research status --workspace /absolute/path/to/workspace --json
|
|
621
644
|
```
|
|
622
645
|
|
|
646
|
+
For WorkBuddy/CodeBuddy, keep Default Permission and start the sidecar from a
|
|
647
|
+
separate native terminal with a private non-symlink state directory outside the
|
|
648
|
+
workspace:
|
|
649
|
+
|
|
650
|
+
```bash
|
|
651
|
+
tiangong-ai research reviewer serve \
|
|
652
|
+
--workspace /absolute/path/to/workspace \
|
|
653
|
+
--state-dir /absolute/private/reviewer-sidecar --json
|
|
654
|
+
|
|
655
|
+
# From the sandboxed IDE:
|
|
656
|
+
tiangong-ai research reviewer status --workspace /absolute/path/to/workspace --json
|
|
657
|
+
tiangong-ai research reviewer doctor --confirm-agent-smoke-cost \
|
|
658
|
+
--workspace /absolute/path/to/workspace --json
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
Sidecar readiness includes real filesystem negative probes and a fixed
|
|
662
|
+
`execute|fingerprint|status` protocol. It has no arbitrary-command endpoint;
|
|
663
|
+
reviewer shell, browser, web, undeclared MCP, and Skill tools remain disabled.
|
|
664
|
+
Do not use Full Access, sandbox-disable flags, unsandboxed-command exceptions,
|
|
665
|
+
or silent transport fallback.
|
|
666
|
+
|
|
667
|
+
WorkBuddy/CodeBuddy capsule teardown never requests recursive bulk deletion
|
|
668
|
+
inside the outer IDE. Native stages remove only the single active-session
|
|
669
|
+
binding, while completed, aborted, handed-off, and reviewer/work-package
|
|
670
|
+
capsules are retained. The journal records
|
|
671
|
+
`capsuleDisposition=retained-outer-sandbox` plus a non-sensitive capsule ID.
|
|
672
|
+
Native Codex/Claude hosts keep the existing automatic capsule deletion behavior.
|
|
673
|
+
No path silently falls back to Full Access, and retained capsules are never
|
|
674
|
+
reported as active sessions.
|
|
675
|
+
|
|
623
676
|
The discover packet derives a bounded multi-channel plan from reviewed evidence
|
|
624
677
|
requirements. Required channels run first; exact repeated requests reuse the
|
|
625
678
|
project cache without another provider call but still consume a bounded context
|
|
@@ -673,9 +726,19 @@ resume criteria. Research then stops; it does not spend more budget on
|
|
|
673
726
|
low-yield substitutes. If no lawful remaining route exists, the user must narrow
|
|
674
727
|
or abandon the unsupported scope before a new reviewed generation can resume.
|
|
675
728
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
729
|
+
Acquisition freezes an immutable evidence snapshot even when lawful retrieval
|
|
730
|
+
ends with explicit gaps. Before inference, decompose every acquired PDF,
|
|
731
|
+
spreadsheet, archive, or structured file into exact lineage-bound producer-
|
|
732
|
+
readable artifacts; register line-range or JSON-Pointer evidence atoms; then
|
|
733
|
+
freeze `content-snapshot.json`. `research status --json` exposes acquisition,
|
|
734
|
+
content, inference, and graph state under `evidencePipeline` and does not direct
|
|
735
|
+
the operator to analysis while content preparation is missing or stopped.
|
|
736
|
+
Only passing acquisition/content gates and required scientific reviews can
|
|
737
|
+
freeze `inference-snapshot.json`. Analyze schema v2 binds that exact snapshot,
|
|
738
|
+
a reproduced analysis run, source IDs, atom IDs, and design claim IDs; the CLI
|
|
739
|
+
then creates `claim-evidence-graph.json` mechanically. The reviewer and
|
|
740
|
+
mechanical closure bind and recheck the full chain, ledger, receipts, selected
|
|
741
|
+
artifacts, excerpts, analysis, graph, and report. Refresh a
|
|
679
742
|
closed result with `research project addendum SOURCE --to TARGET`; the original
|
|
680
743
|
closure remains unchanged, the child snapshot records a mechanical delta, and
|
|
681
744
|
default status hides the superseded project (`research status --all` shows full
|