@tiangong-ai/cli 0.0.32 → 0.0.34
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 +7 -2
- package/README.md +72 -19
- package/dist/research/commands.js +58 -1
- package/dist/research/commands.js.map +1 -1
- package/dist/research/orchestration.js +388 -31
- package/dist/research/orchestration.js.map +1 -1
- package/dist/research/workspace/acquisition.d.ts +71 -0
- package/dist/research/workspace/acquisition.js +593 -0
- package/dist/research/workspace/acquisition.js.map +1 -0
- package/dist/research/workspace/artifacts.d.ts +43 -0
- package/dist/research/workspace/artifacts.js +544 -0
- package/dist/research/workspace/artifacts.js.map +1 -0
- package/dist/research/workspace/broker.js +265 -56
- package/dist/research/workspace/broker.js.map +1 -1
- package/dist/research/workspace/constants.d.ts +1 -0
- package/dist/research/workspace/constants.js +4 -2
- package/dist/research/workspace/constants.js.map +1 -1
- package/dist/research/workspace/context.js +106 -11
- package/dist/research/workspace/context.js.map +1 -1
- package/dist/research/workspace/discovery-planning.d.ts +25 -0
- package/dist/research/workspace/discovery-planning.js +106 -0
- package/dist/research/workspace/discovery-planning.js.map +1 -0
- package/dist/research/workspace/discovery-status.d.ts +46 -0
- package/dist/research/workspace/discovery-status.js +183 -0
- package/dist/research/workspace/discovery-status.js.map +1 -0
- package/dist/research/workspace/discovery.d.ts +25 -0
- package/dist/research/workspace/discovery.js +268 -0
- package/dist/research/workspace/discovery.js.map +1 -0
- package/dist/research/workspace/downloads.d.ts +76 -0
- package/dist/research/workspace/downloads.js +274 -0
- package/dist/research/workspace/downloads.js.map +1 -0
- package/dist/research/workspace/evidence-ledger.d.ts +52 -0
- package/dist/research/workspace/evidence-ledger.js +487 -0
- package/dist/research/workspace/evidence-ledger.js.map +1 -0
- package/dist/research/workspace/evidence.d.ts +1 -0
- package/dist/research/workspace/evidence.js +2 -0
- package/dist/research/workspace/evidence.js.map +1 -1
- package/dist/research/workspace/input-plan.js +4 -0
- package/dist/research/workspace/input-plan.js.map +1 -1
- package/dist/research/workspace/native-activity.d.ts +65 -0
- package/dist/research/workspace/native-activity.js +153 -0
- package/dist/research/workspace/native-activity.js.map +1 -0
- package/dist/research/workspace/preflight.d.ts +5 -0
- package/dist/research/workspace/preflight.js +37 -17
- package/dist/research/workspace/preflight.js.map +1 -1
- package/dist/research/workspace/projects.d.ts +3 -1
- package/dist/research/workspace/projects.js +346 -5
- package/dist/research/workspace/projects.js.map +1 -1
- package/dist/research/workspace/runtime.d.ts +106 -4
- package/dist/research/workspace/runtime.js +947 -80
- package/dist/research/workspace/runtime.js.map +1 -1
- package/dist/research/workspace/sanitization.js +28 -6
- package/dist/research/workspace/sanitization.js.map +1 -1
- package/dist/research/workspace/schemas.d.ts +3 -0
- package/dist/research/workspace/schemas.js +206 -33
- package/dist/research/workspace/schemas.js.map +1 -1
- package/dist/research/workspace/setup-catalog.js +5 -5
- package/dist/research/workspace/setup-invocation.d.ts +11 -0
- package/dist/research/workspace/setup-invocation.js +34 -0
- package/dist/research/workspace/setup-invocation.js.map +1 -0
- package/dist/research/workspace/setup-wizard.js +10 -4
- package/dist/research/workspace/setup-wizard.js.map +1 -1
- package/dist/research/workspace/setup.d.ts +55 -7
- package/dist/research/workspace/setup.js +603 -32
- package/dist/research/workspace/setup.js.map +1 -1
- package/dist/research/workspace/types.d.ts +52 -3
- package/dist/research/workspace/workspace.js +45 -6
- package/dist/research/workspace/workspace.js.map +1 -1
- package/package.json +4 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DiscoveryProgress } from "./discovery-status.js";
|
|
1
2
|
import { type AgentExecutionRequest } from "./executor.js";
|
|
2
3
|
import type { AgentRoute, ExecutionResult, OutputRecord, ProjectState, ResearchProgressEvent } from "./types.js";
|
|
3
4
|
export interface RunOptions {
|
|
@@ -13,8 +14,8 @@ export interface WorkspaceRunResult {
|
|
|
13
14
|
workspace: string;
|
|
14
15
|
requestId: string;
|
|
15
16
|
projectId: string | null;
|
|
16
|
-
status: "complete" | "blocked" | "ready" | "dry-run";
|
|
17
|
-
stopReason: "dry-run" | "all-projects-complete" | "project-blocked" | "native-stage-required" | "cycle-limit" | "no-ready-work" | "no-projects";
|
|
17
|
+
status: "complete" | "blocked" | "waiting" | "ready" | "dry-run";
|
|
18
|
+
stopReason: "dry-run" | "all-projects-complete" | "project-blocked" | "handoff-required" | "native-stage-required" | "cycle-limit" | "no-ready-work" | "no-projects";
|
|
18
19
|
cycles: number;
|
|
19
20
|
executed: Array<{
|
|
20
21
|
projectId: string;
|
|
@@ -28,6 +29,53 @@ export interface WorkspaceRunResult {
|
|
|
28
29
|
usage: ProjectState["usage"];
|
|
29
30
|
}>;
|
|
30
31
|
}
|
|
32
|
+
export declare const researchHandoffRecordSchema: {
|
|
33
|
+
readonly $id: "https://schemas.tiangong.ai/research/handoff-request-v1.json";
|
|
34
|
+
readonly type: "object";
|
|
35
|
+
readonly additionalProperties: false;
|
|
36
|
+
readonly required: readonly ["schemaVersion", "state", "reasonCode", "summary", "requestedActions", "evidenceGaps"];
|
|
37
|
+
readonly properties: {
|
|
38
|
+
readonly schemaVersion: {
|
|
39
|
+
readonly type: "integer";
|
|
40
|
+
readonly const: 1;
|
|
41
|
+
};
|
|
42
|
+
readonly state: {
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly enum: readonly ["user-action-required", "external-response-required"];
|
|
45
|
+
};
|
|
46
|
+
readonly reasonCode: {
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
|
|
49
|
+
};
|
|
50
|
+
readonly summary: {
|
|
51
|
+
readonly type: "string";
|
|
52
|
+
readonly minLength: 8;
|
|
53
|
+
readonly maxLength: 1000;
|
|
54
|
+
};
|
|
55
|
+
readonly requestedActions: {
|
|
56
|
+
readonly type: "array";
|
|
57
|
+
readonly minItems: 1;
|
|
58
|
+
readonly maxItems: 10;
|
|
59
|
+
readonly uniqueItems: true;
|
|
60
|
+
readonly items: {
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
readonly minLength: 1;
|
|
63
|
+
readonly maxLength: 500;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly evidenceGaps: {
|
|
67
|
+
readonly type: "array";
|
|
68
|
+
readonly minItems: 1;
|
|
69
|
+
readonly maxItems: 50;
|
|
70
|
+
readonly uniqueItems: true;
|
|
71
|
+
readonly items: {
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly minLength: 1;
|
|
74
|
+
readonly maxLength: 500;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
31
79
|
export declare function runResearchWorkspace(root: string, options: RunOptions, packageExecutor?: PackageExecutor): Promise<WorkspaceRunResult>;
|
|
32
80
|
/** @internal Test-only seam for exercising deterministic package admission with fake agents. */
|
|
33
81
|
export declare function runResearchWorkspaceWithInjectedProducerForTesting(root: string, options: RunOptions, packageExecutor: PackageExecutor): Promise<WorkspaceRunResult>;
|
|
@@ -37,13 +85,14 @@ export interface NativeStagePacket {
|
|
|
37
85
|
sessionId: string;
|
|
38
86
|
projectId: string;
|
|
39
87
|
packageId: string;
|
|
40
|
-
stage: "discover" | "analyze" | "synthesize";
|
|
88
|
+
stage: "discover" | "acquire" | "analyze" | "synthesize";
|
|
41
89
|
hostAgent: AgentRoute["agent"];
|
|
42
90
|
expectedModel: string | null;
|
|
43
91
|
preparedAt: string;
|
|
44
92
|
bindingSha256: string;
|
|
45
93
|
prompt: string;
|
|
46
94
|
outputSchema: Record<string, unknown>;
|
|
95
|
+
discovery: DiscoveryProgress | null;
|
|
47
96
|
limits: {
|
|
48
97
|
maxOutputBytes: number;
|
|
49
98
|
maxOutputTokens: number;
|
|
@@ -56,6 +105,31 @@ export interface NativeStagePacket {
|
|
|
56
105
|
argv: string[];
|
|
57
106
|
requestSchema: Record<string, unknown>;
|
|
58
107
|
} | null;
|
|
108
|
+
recordActivity: {
|
|
109
|
+
argv: string[];
|
|
110
|
+
recordSchema: Record<string, unknown>;
|
|
111
|
+
} | null;
|
|
112
|
+
registerCandidate: {
|
|
113
|
+
argv: string[];
|
|
114
|
+
recordSchema: Record<string, unknown>;
|
|
115
|
+
} | null;
|
|
116
|
+
recordAssessment: {
|
|
117
|
+
argv: string[];
|
|
118
|
+
recordSchema: Record<string, unknown>;
|
|
119
|
+
} | null;
|
|
120
|
+
bindDownload: {
|
|
121
|
+
argv: string[];
|
|
122
|
+
recordSchema: Record<string, unknown>;
|
|
123
|
+
} | null;
|
|
124
|
+
requestHandoff: {
|
|
125
|
+
argv: string[];
|
|
126
|
+
recordSchema: Record<string, unknown>;
|
|
127
|
+
};
|
|
128
|
+
registerArtifact: {
|
|
129
|
+
argv: string[];
|
|
130
|
+
supportedMediaTypes: string[];
|
|
131
|
+
optionalMetadataFields: string[];
|
|
132
|
+
} | null;
|
|
59
133
|
submit: {
|
|
60
134
|
argv: string[];
|
|
61
135
|
};
|
|
@@ -66,10 +140,19 @@ export interface NativeStagePacket {
|
|
|
66
140
|
rules: string[];
|
|
67
141
|
packetSha256: string;
|
|
68
142
|
}
|
|
143
|
+
export interface NativeStageStatus {
|
|
144
|
+
status: "none" | "active" | "stale" | "invalid";
|
|
145
|
+
sessionId: string | null;
|
|
146
|
+
stage: string | null;
|
|
147
|
+
preparedAt: string | null;
|
|
148
|
+
reasonCode: string | null;
|
|
149
|
+
recommendedAction: string | null;
|
|
150
|
+
}
|
|
151
|
+
export declare function inspectNativeResearchStage(root: string, project: ProjectState): Promise<NativeStageStatus>;
|
|
69
152
|
export declare function prepareNativeResearchStage(input: {
|
|
70
153
|
root: string;
|
|
71
154
|
projectId: string;
|
|
72
|
-
stage: "discover" | "analyze" | "synthesize";
|
|
155
|
+
stage: "discover" | "acquire" | "analyze" | "synthesize";
|
|
73
156
|
hostAgent: AgentRoute["agent"];
|
|
74
157
|
}): Promise<NativeStagePacket>;
|
|
75
158
|
export declare function submitNativeResearchStage(input: {
|
|
@@ -95,3 +178,22 @@ export declare function abortNativeResearchStage(input: {
|
|
|
95
178
|
packageId: string;
|
|
96
179
|
status: "ready" | "blocked";
|
|
97
180
|
}>;
|
|
181
|
+
export declare function requestResearchHandoff(input: {
|
|
182
|
+
root: string;
|
|
183
|
+
projectId: string;
|
|
184
|
+
value: Record<string, unknown>;
|
|
185
|
+
}): Promise<{
|
|
186
|
+
projectId: string;
|
|
187
|
+
status: "waiting-user" | "waiting-external";
|
|
188
|
+
handoff: ProjectState["handoff"];
|
|
189
|
+
resolveCommand: string;
|
|
190
|
+
}>;
|
|
191
|
+
export declare function resolveResearchHandoff(input: {
|
|
192
|
+
root: string;
|
|
193
|
+
projectId: string;
|
|
194
|
+
note: string;
|
|
195
|
+
}): Promise<{
|
|
196
|
+
projectId: string;
|
|
197
|
+
status: ProjectState["status"];
|
|
198
|
+
handoff: ProjectState["handoff"];
|
|
199
|
+
}>;
|