@longtable/cli 0.1.47 → 0.1.49

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.
@@ -1,4 +1,4 @@
1
- import type { DecisionRecord, InvocationRecord, LongTableQuestionObligation, ProviderKind, QuestionOption, QuestionCommitmentFamily, QuestionEpistemicBasis, QuestionGenerationResult, QuestionOpportunity, QuestionSurface, QuestionRecord, ResearchState } from "@longtable/core";
1
+ import type { DecisionRecord, EvidenceRecord, InvocationRecord, LongTableQuestionObligation, ProviderKind, QuestionOption, QuestionCommitmentFamily, QuestionEpistemicBasis, QuestionGenerationResult, QuestionOpportunity, QuestionSurface, QuestionRecord, ResearchSpecificationChange, ResearchSpecificationPatch, ResearchSpecificationPatchSource, ResearchSpecificationRevision, 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";
@@ -40,6 +40,9 @@ export interface ResearchSpecification {
40
40
  createdAt?: string;
41
41
  updatedAt?: string;
42
42
  sourceHookId?: string;
43
+ latestRevisionId?: string;
44
+ sourceEvidenceIds?: string[];
45
+ sectionEvidence?: Record<string, string[]>;
43
46
  researchDirection: {
44
47
  question?: string;
45
48
  purpose: string;
@@ -121,6 +124,10 @@ export type LongTableWorkspaceState = ResearchState & {
121
124
  hooks?: LongTableHookRun[];
122
125
  firstResearchShape?: FirstResearchShape;
123
126
  researchSpecification?: ResearchSpecification;
127
+ interviewTurns?: LongTableInterviewTurn[];
128
+ evidenceRecords?: EvidenceRecord[];
129
+ specPatches?: ResearchSpecificationPatch[];
130
+ specRevisions?: ResearchSpecificationRevision[];
124
131
  };
125
132
  export interface LongTableProjectRecord {
126
133
  schemaVersion: 1;
@@ -206,6 +213,10 @@ export interface LongTableWorkspaceInspection {
206
213
  pendingObligations: number;
207
214
  answeredQuestions: number;
208
215
  decisions: number;
216
+ interviewTurns?: number;
217
+ evidenceRecords?: number;
218
+ specPatches?: number;
219
+ specRevisions?: number;
209
220
  };
210
221
  recentInvocations?: Array<{
211
222
  id: string;
@@ -250,6 +261,25 @@ export interface LongTableWorkspaceInspection {
250
261
  }>;
251
262
  }
252
263
  export declare function loadWorkspaceState(context: LongTableProjectContext): Promise<LongTableWorkspaceState>;
264
+ export declare function diffResearchSpecifications(before: ResearchSpecification | undefined, after: ResearchSpecification): ResearchSpecificationChange[];
265
+ export declare function applyResearchSpecificationAuditUpdate(state: LongTableWorkspaceState, options: {
266
+ specification: ResearchSpecification;
267
+ timestamp: string;
268
+ source: ResearchSpecificationPatchSource;
269
+ title?: string;
270
+ rationale?: string;
271
+ sourceEvidenceIds?: string[];
272
+ patch?: ResearchSpecificationPatch;
273
+ questionRecordId?: string;
274
+ decisionRecordId?: string;
275
+ createDecisionRecord?: boolean;
276
+ }): {
277
+ state: LongTableWorkspaceState;
278
+ specification: ResearchSpecification;
279
+ patch: ResearchSpecificationPatch;
280
+ revision: ResearchSpecificationRevision;
281
+ decision?: DecisionRecord;
282
+ };
253
283
  export declare function syncCurrentWorkspaceView(context: LongTableProjectContext): Promise<string>;
254
284
  export declare function appendInvocationRecordToWorkspace(context: LongTableProjectContext, invocation: InvocationRecord, questions?: QuestionRecord[]): Promise<LongTableWorkspaceState>;
255
285
  export declare function beginLongTableInterview(options: {
@@ -298,6 +328,41 @@ export declare function summarizeLongTableResearchSpecification(options: {
298
328
  state: LongTableWorkspaceState;
299
329
  session: LongTableSessionRecord;
300
330
  }>;
331
+ export declare function proposeResearchSpecificationPatch(options: {
332
+ context: LongTableProjectContext;
333
+ specification: ResearchSpecification;
334
+ source?: ResearchSpecificationPatchSource;
335
+ rationale?: string;
336
+ sourceEvidenceIds?: string[];
337
+ }): Promise<{
338
+ patch: ResearchSpecificationPatch;
339
+ changes: ResearchSpecificationChange[];
340
+ state: LongTableWorkspaceState;
341
+ }>;
342
+ export declare function applyResearchSpecificationPatch(options: {
343
+ context: LongTableProjectContext;
344
+ patchId?: string;
345
+ specification?: ResearchSpecification;
346
+ source?: ResearchSpecificationPatchSource;
347
+ rationale?: string;
348
+ sourceEvidenceIds?: string[];
349
+ questionRecordId?: string;
350
+ decisionRecordId?: string;
351
+ }): Promise<{
352
+ patch: ResearchSpecificationPatch;
353
+ revision: ResearchSpecificationRevision;
354
+ specification: ResearchSpecification;
355
+ state: LongTableWorkspaceState;
356
+ session: LongTableSessionRecord;
357
+ decision?: DecisionRecord;
358
+ }>;
359
+ export declare function readResearchSpecificationHistory(context: LongTableProjectContext): Promise<{
360
+ specification?: ResearchSpecification;
361
+ revisions: ResearchSpecificationRevision[];
362
+ patches: ResearchSpecificationPatch[];
363
+ evidenceRecords: EvidenceRecord[];
364
+ }>;
365
+ export declare function findUnincorporatedResearchEvidence(context: LongTableProjectContext): Promise<EvidenceRecord[]>;
301
366
  export declare function listBlockingWorkspaceQuestions(context: LongTableProjectContext): Promise<QuestionRecord[]>;
302
367
  export declare function listBlockingWorkspaceObligations(context: LongTableProjectContext): Promise<LongTableQuestionObligation[]>;
303
368
  export declare function assertWorkspaceNotBlocked(context: LongTableProjectContext): Promise<void>;