@longtable/cli 0.1.31 → 0.1.33
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/README.md +16 -13
- package/dist/cli.js +265 -36
- package/dist/codex-hooks.d.ts +22 -0
- package/dist/codex-hooks.js +240 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/longtable-codex-native-hook.d.ts +4 -0
- package/dist/longtable-codex-native-hook.js +314 -0
- package/dist/project-session.d.ts +108 -3
- package/dist/project-session.js +420 -23
- package/dist/prompt-aliases.js +5 -5
- package/dist/question-obligations.d.ts +22 -0
- package/dist/question-obligations.js +112 -0
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DecisionRecord, InvocationRecord, ProviderKind, QuestionOption, QuestionSurface, QuestionRecord, ResearchState } from "@longtable/core";
|
|
1
|
+
import type { DecisionRecord, InvocationRecord, LongTableQuestionObligation, ProviderKind, QuestionOption, QuestionSurface, QuestionRecord, ResearchState } from "@longtable/core";
|
|
2
2
|
import type { SetupPersistedOutput } from "@longtable/setup";
|
|
3
3
|
export type ProjectDisagreementPreference = "synthesis_only" | "show_on_conflict" | "always_visible";
|
|
4
4
|
export type StartInterviewSignal = "phenomenon" | "audience" | "artifact" | "evidence" | "assumption" | "decision_risk" | "voice";
|
|
@@ -19,6 +19,53 @@ export interface StartInterviewSession {
|
|
|
19
19
|
inferredSignals: StartInterviewSignal[];
|
|
20
20
|
summary: string;
|
|
21
21
|
}
|
|
22
|
+
export type InterviewTurnQuality = "thin" | "usable" | "rich";
|
|
23
|
+
export type InterviewDepth = "gathering_context" | "forming_first_handle" | "ready_to_summarize";
|
|
24
|
+
export interface FirstResearchShape {
|
|
25
|
+
handle: string;
|
|
26
|
+
currentGoal: string;
|
|
27
|
+
currentBlocker?: string;
|
|
28
|
+
researchObject?: string;
|
|
29
|
+
gapRisk?: string;
|
|
30
|
+
protectedDecision?: string;
|
|
31
|
+
openQuestions: string[];
|
|
32
|
+
nextAction: string;
|
|
33
|
+
confidence: "low" | "medium" | "high";
|
|
34
|
+
sourceHookId?: string;
|
|
35
|
+
confirmedAt?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface LongTableInterviewTurn {
|
|
38
|
+
id: string;
|
|
39
|
+
index: number;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
question: string;
|
|
42
|
+
answer: string;
|
|
43
|
+
reflection?: string;
|
|
44
|
+
quality: InterviewTurnQuality;
|
|
45
|
+
needsFollowUp: boolean;
|
|
46
|
+
followUpQuestion?: string;
|
|
47
|
+
rationale?: string[];
|
|
48
|
+
}
|
|
49
|
+
export interface LongTableHookRun {
|
|
50
|
+
id: string;
|
|
51
|
+
kind: "longtable_interview" | "quality_probe" | "checkpoint" | "panel_decision";
|
|
52
|
+
status: "pending" | "active" | "ready_to_confirm" | "confirmed" | "deferred" | "cancelled";
|
|
53
|
+
createdAt: string;
|
|
54
|
+
updatedAt: string;
|
|
55
|
+
targetOutcome?: "first_research_handle" | string;
|
|
56
|
+
depth?: InterviewDepth;
|
|
57
|
+
provider?: ProviderKind;
|
|
58
|
+
turns?: LongTableInterviewTurn[];
|
|
59
|
+
firstResearchShape?: FirstResearchShape;
|
|
60
|
+
qualityNotes?: string[];
|
|
61
|
+
rationale?: string[];
|
|
62
|
+
linkedQuestionRecordIds?: string[];
|
|
63
|
+
linkedDecisionRecordIds?: string[];
|
|
64
|
+
}
|
|
65
|
+
export type LongTableWorkspaceState = ResearchState & {
|
|
66
|
+
hooks?: LongTableHookRun[];
|
|
67
|
+
firstResearchShape?: FirstResearchShape;
|
|
68
|
+
};
|
|
22
69
|
export interface LongTableProjectRecord {
|
|
23
70
|
schemaVersion: 1;
|
|
24
71
|
product: "LongTable";
|
|
@@ -52,6 +99,7 @@ export interface LongTableSessionRecord {
|
|
|
52
99
|
nextAction?: string;
|
|
53
100
|
openQuestions?: string[];
|
|
54
101
|
startInterview?: StartInterviewSession;
|
|
102
|
+
firstResearchShape?: FirstResearchShape;
|
|
55
103
|
requestedPerspectives: string[];
|
|
56
104
|
disagreementPreference: ProjectDisagreementPreference;
|
|
57
105
|
activeModes?: string[];
|
|
@@ -93,6 +141,7 @@ export interface LongTableWorkspaceInspection {
|
|
|
93
141
|
invocations: number;
|
|
94
142
|
questions: number;
|
|
95
143
|
pendingQuestions: number;
|
|
144
|
+
pendingObligations: number;
|
|
96
145
|
answeredQuestions: number;
|
|
97
146
|
decisions: number;
|
|
98
147
|
};
|
|
@@ -113,6 +162,13 @@ export interface LongTableWorkspaceInspection {
|
|
|
113
162
|
options: string[];
|
|
114
163
|
required: boolean;
|
|
115
164
|
}>;
|
|
165
|
+
pendingObligations?: Array<{
|
|
166
|
+
id: string;
|
|
167
|
+
kind: string;
|
|
168
|
+
prompt: string;
|
|
169
|
+
reason: string;
|
|
170
|
+
questionId?: string;
|
|
171
|
+
}>;
|
|
116
172
|
recentDecisions?: Array<{
|
|
117
173
|
id: string;
|
|
118
174
|
checkpointKey: string;
|
|
@@ -127,10 +183,45 @@ export interface LongTableWorkspaceInspection {
|
|
|
127
183
|
suggestion?: string;
|
|
128
184
|
}>;
|
|
129
185
|
}
|
|
130
|
-
export declare function loadWorkspaceState(context: LongTableProjectContext): Promise<
|
|
186
|
+
export declare function loadWorkspaceState(context: LongTableProjectContext): Promise<LongTableWorkspaceState>;
|
|
131
187
|
export declare function syncCurrentWorkspaceView(context: LongTableProjectContext): Promise<string>;
|
|
132
|
-
export declare function appendInvocationRecordToWorkspace(context: LongTableProjectContext, invocation: InvocationRecord, questions?: QuestionRecord[]): Promise<
|
|
188
|
+
export declare function appendInvocationRecordToWorkspace(context: LongTableProjectContext, invocation: InvocationRecord, questions?: QuestionRecord[]): Promise<LongTableWorkspaceState>;
|
|
189
|
+
export declare function beginLongTableInterview(options: {
|
|
190
|
+
context: LongTableProjectContext;
|
|
191
|
+
provider?: ProviderKind;
|
|
192
|
+
openingQuestion?: string;
|
|
193
|
+
seedAnswer?: string;
|
|
194
|
+
}): Promise<{
|
|
195
|
+
hook: LongTableHookRun;
|
|
196
|
+
state: LongTableWorkspaceState;
|
|
197
|
+
}>;
|
|
198
|
+
export declare function appendLongTableInterviewTurn(options: {
|
|
199
|
+
context: LongTableProjectContext;
|
|
200
|
+
hookId?: string;
|
|
201
|
+
question: string;
|
|
202
|
+
answer: string;
|
|
203
|
+
reflection?: string;
|
|
204
|
+
quality?: InterviewTurnQuality;
|
|
205
|
+
needsFollowUp?: boolean;
|
|
206
|
+
followUpQuestion?: string;
|
|
207
|
+
rationale?: string[];
|
|
208
|
+
}): Promise<{
|
|
209
|
+
hook: LongTableHookRun;
|
|
210
|
+
turn: NonNullable<LongTableHookRun["turns"]>[number];
|
|
211
|
+
state: LongTableWorkspaceState;
|
|
212
|
+
}>;
|
|
213
|
+
export declare function summarizeLongTableInterview(options: {
|
|
214
|
+
context: LongTableProjectContext;
|
|
215
|
+
hookId?: string;
|
|
216
|
+
shape: FirstResearchShape;
|
|
217
|
+
}): Promise<{
|
|
218
|
+
hook: LongTableHookRun;
|
|
219
|
+
shape: FirstResearchShape;
|
|
220
|
+
state: LongTableWorkspaceState;
|
|
221
|
+
session: LongTableSessionRecord;
|
|
222
|
+
}>;
|
|
133
223
|
export declare function listBlockingWorkspaceQuestions(context: LongTableProjectContext): Promise<QuestionRecord[]>;
|
|
224
|
+
export declare function listBlockingWorkspaceObligations(context: LongTableProjectContext): Promise<LongTableQuestionObligation[]>;
|
|
134
225
|
export declare function assertWorkspaceNotBlocked(context: LongTableProjectContext): Promise<void>;
|
|
135
226
|
export declare function createWorkspaceFollowUpQuestions(options: {
|
|
136
227
|
context: LongTableProjectContext;
|
|
@@ -170,6 +261,20 @@ export declare function answerWorkspaceQuestion(options: {
|
|
|
170
261
|
decision: DecisionRecord;
|
|
171
262
|
state: ResearchState;
|
|
172
263
|
}>;
|
|
264
|
+
export declare function clearWorkspaceQuestion(options: {
|
|
265
|
+
context: LongTableProjectContext;
|
|
266
|
+
questionId: string;
|
|
267
|
+
reason: string;
|
|
268
|
+
}): Promise<{
|
|
269
|
+
question: QuestionRecord;
|
|
270
|
+
state: ResearchState;
|
|
271
|
+
}>;
|
|
272
|
+
export declare function repairWorkspaceStateConsistency(options: {
|
|
273
|
+
context: LongTableProjectContext;
|
|
274
|
+
}): Promise<{
|
|
275
|
+
state: ResearchState;
|
|
276
|
+
repaired: string[];
|
|
277
|
+
}>;
|
|
173
278
|
export declare function createOrUpdateProjectWorkspace(options: {
|
|
174
279
|
projectName: string;
|
|
175
280
|
projectPath: string;
|