@tiangong-ai/cli 0.0.38 → 0.0.40

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.
@@ -0,0 +1,126 @@
1
+ import { type ApplyResearchSetupOptions, type ResearchSetupAgentRoutePlan, type ResearchSetupPlan, type ResearchSetupPlanInput, type ResearchSetupState } from "./setup.js";
2
+ import type { ResearchMode } from "./types.js";
3
+ type DeclarationRequirement = "required" | "conditional" | "optional";
4
+ type DeclarativeEvidenceProfile = "none" | "brave-baseline" | "brave-context" | "brave-media";
5
+ interface DeclarationSkillChoice {
6
+ enabled: boolean;
7
+ licenseId: string;
8
+ }
9
+ interface DeclarationCredentialChoice {
10
+ requirement: DeclarationRequirement;
11
+ appliesTo: string[];
12
+ enabled: boolean;
13
+ environment: string;
14
+ }
15
+ interface DeclarationSettingChoice {
16
+ requirement: DeclarationRequirement;
17
+ appliesTo: string[];
18
+ enabled: boolean;
19
+ value: string | null;
20
+ }
21
+ interface ResearchSetupDeclaration {
22
+ schemaVersion: 2;
23
+ kind: "tiangong-research-setup";
24
+ workspace: {
25
+ name?: string;
26
+ mode: ResearchMode;
27
+ };
28
+ install: {
29
+ scope: "project" | "global";
30
+ agents: Array<"codex" | "claude-code">;
31
+ };
32
+ selection: {
33
+ skills: Record<string, DeclarationSkillChoice>;
34
+ };
35
+ acceptedLicenseIds: string[];
36
+ credentials: Record<string, DeclarationCredentialChoice>;
37
+ settings: Record<string, DeclarationSettingChoice>;
38
+ agentRoutes: Partial<ResearchSetupAgentRoutePlan> & Pick<ResearchSetupAgentRoutePlan, "producerAgent" | "reviewerAgent">;
39
+ verification: {
40
+ live: boolean;
41
+ allowSyntheticUnstructureUpload: boolean;
42
+ agentSmoke: boolean;
43
+ };
44
+ confirmations: {
45
+ networkDownloads: boolean;
46
+ globalMutation: boolean;
47
+ agentSmokeCost: boolean;
48
+ };
49
+ replaceExistingPlan: boolean;
50
+ }
51
+ export interface LoadedResearchSetupDeclaration {
52
+ workspace: string;
53
+ configurationPath: string;
54
+ environmentPath: string | null;
55
+ configurationSha256: string;
56
+ planInput: Omit<ResearchSetupPlanInput, "workspace" | "environment">;
57
+ environment: NodeJS.ProcessEnv;
58
+ publicSummary: {
59
+ mode: ResearchMode;
60
+ evidenceProfile: DeclarativeEvidenceProfile;
61
+ selectedSkillIds: string[];
62
+ enabledCredentialIds: string[];
63
+ declaredCredentialIds: string[];
64
+ verification: ResearchSetupDeclaration["verification"];
65
+ environmentFileUsed: boolean;
66
+ };
67
+ }
68
+ interface DeclarativeSetupApplicationResult {
69
+ schemaVersion: 1;
70
+ plan: ResearchSetupPlan;
71
+ state: ResearchSetupState;
72
+ report: null | {
73
+ overallReadiness?: "READY" | "PARTIALLY_READY" | "BLOCKED";
74
+ [key: string]: unknown;
75
+ };
76
+ }
77
+ export interface ResearchSetupDeclarationOperations {
78
+ createPlan(input: ResearchSetupPlanInput): Promise<ResearchSetupPlan>;
79
+ loadPlan(planPath: string): Promise<ResearchSetupPlan>;
80
+ applyPlan(planPath: string, options: ApplyResearchSetupOptions): Promise<DeclarativeSetupApplicationResult>;
81
+ }
82
+ export declare function initializeResearchSetupDeclaration(workspace: string): Promise<{
83
+ schemaVersion: 1;
84
+ workspace: string;
85
+ configurationPath: string;
86
+ environmentExamplePath: string;
87
+ next: {
88
+ minimumAction: string;
89
+ setupCommand: string;
90
+ };
91
+ }>;
92
+ export declare function discoverResearchSetupDeclaration(workspace: string, options?: {
93
+ configurationPath?: string;
94
+ environmentPath?: string;
95
+ }): Promise<{
96
+ configurationPath: string;
97
+ environmentPath: string | null;
98
+ } | null>;
99
+ export declare function loadResearchSetupDeclaration(input: {
100
+ workspace: string;
101
+ configurationPath?: string;
102
+ environmentPath?: string;
103
+ environment?: NodeJS.ProcessEnv;
104
+ }): Promise<LoadedResearchSetupDeclaration>;
105
+ export declare function executeResearchSetupDeclaration(input: {
106
+ workspace: string;
107
+ configurationPath?: string;
108
+ environmentPath?: string;
109
+ environment?: NodeJS.ProcessEnv;
110
+ operations?: Partial<ResearchSetupDeclarationOperations>;
111
+ }): Promise<{
112
+ schemaVersion: 1;
113
+ mode: "declarative";
114
+ status: "ready" | "incomplete";
115
+ exitCode: 0 | 3;
116
+ reusedPlan: boolean;
117
+ configuration: {
118
+ path: string;
119
+ sha256: string;
120
+ environmentFileUsed: boolean;
121
+ };
122
+ plan: ResearchSetupPlan;
123
+ state: ResearchSetupState;
124
+ report: DeclarativeSetupApplicationResult["report"];
125
+ }>;
126
+ export {};