@longtable/core 0.1.9 → 0.1.11

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +138 -0
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -8,8 +8,15 @@ export type NarrativeTraceType = "experience" | "judgment" | "voice" | "context"
8
8
  export type NarrativeTraceVisibility = "explicit" | "inferred";
9
9
  export type HypothesisStatus = "unconfirmed" | "confirmed" | "rejected";
10
10
  export type ProviderKind = "claude" | "codex";
11
+ export type RoleKey = string;
12
+ export type InvocationKind = "single_role" | "panel" | "status";
13
+ export type InvocationSurface = "native_parallel" | "generated_skill" | "prompt_alias" | "sequential_fallback" | "mcp_transport";
14
+ export type InvocationStatus = "planned" | "running" | "completed" | "blocked" | "degraded" | "error";
15
+ export type PanelVisibility = "synthesis_only" | "show_on_conflict" | "always_visible";
16
+ export type CheckpointSensitivity = "low" | "medium" | "high";
11
17
  export type CheckpointLevel = "universal_required" | "adaptive_required" | "recommended" | "log_only" | "none";
12
18
  export type PromptStyle = "structured_choice" | "confirm_or_revise" | "advisory_summary" | "passive_log";
19
+ export type QuestionSurface = "native_structured" | "numbered" | "terminal_selector" | "web_form";
13
20
  export type GuidanceQuestionType = "clarifying" | "boundary" | "tension" | "narrative";
14
21
  export type ClosureDisposition = "delay" | "tentative" | "strong" | "strongest";
15
22
  export interface ResearcherConfidenceByDomain {
@@ -31,6 +38,95 @@ export interface ResearcherProfile {
31
38
  relaxCheckpointsOn?: string[];
32
39
  confidenceByDomain?: Partial<ResearcherConfidenceByDomain>;
33
40
  }
41
+ export interface RoleDefinition {
42
+ key: RoleKey;
43
+ label: string;
44
+ shortDescription: string;
45
+ triggerMode: "auto-callable" | "explicit-only";
46
+ synonyms: string[];
47
+ defaultPanelMember: boolean;
48
+ checkpointSensitivity: CheckpointSensitivity;
49
+ supportedModes: InteractionMode[];
50
+ }
51
+ export interface ProviderCapabilities {
52
+ provider: ProviderKind;
53
+ nativeStructuredQuestions: boolean;
54
+ generatedSkills: "stable" | "available" | "unavailable";
55
+ promptAliases: "stable" | "available" | "unavailable";
56
+ nativeParallelSubagents: "stable" | "session_dependent" | "unavailable";
57
+ sequentialFallback: boolean;
58
+ mcpTransport: "stable" | "available" | "planned" | "unavailable";
59
+ notes: string[];
60
+ }
61
+ export interface InvocationIntent {
62
+ id: string;
63
+ kind: InvocationKind;
64
+ mode: InteractionMode;
65
+ prompt: string;
66
+ roles: RoleKey[];
67
+ provider?: ProviderKind;
68
+ requestedSurface?: InvocationSurface;
69
+ visibility: PanelVisibility;
70
+ checkpointSensitivity: CheckpointSensitivity;
71
+ rationale: string[];
72
+ }
73
+ export interface PanelMember {
74
+ role: RoleKey;
75
+ label: string;
76
+ reason: string;
77
+ required: boolean;
78
+ }
79
+ export interface PanelPlan {
80
+ id: string;
81
+ createdAt: string;
82
+ mode: InteractionMode;
83
+ prompt: string;
84
+ members: PanelMember[];
85
+ visibility: PanelVisibility;
86
+ preferredSurface: InvocationSurface;
87
+ fallbackSurface: "sequential_fallback";
88
+ checkpointSensitivity: CheckpointSensitivity;
89
+ rationale: string[];
90
+ }
91
+ export interface PanelMemberResult {
92
+ role: RoleKey;
93
+ label: string;
94
+ status: InvocationStatus;
95
+ summary?: string;
96
+ claims?: string[];
97
+ objections?: string[];
98
+ openQuestions?: string[];
99
+ evidenceRefs?: string[];
100
+ error?: string;
101
+ }
102
+ export interface PanelResult {
103
+ id: string;
104
+ planId: string;
105
+ createdAt: string;
106
+ updatedAt: string;
107
+ provider?: ProviderKind;
108
+ surface: InvocationSurface;
109
+ status: InvocationStatus;
110
+ memberResults: PanelMemberResult[];
111
+ synthesis?: string;
112
+ conflictSummary?: string;
113
+ decisionPrompt?: string;
114
+ linkedQuestionRecordIds: string[];
115
+ linkedDecisionRecordIds: string[];
116
+ }
117
+ export interface InvocationRecord {
118
+ id: string;
119
+ createdAt: string;
120
+ updatedAt: string;
121
+ intent: InvocationIntent;
122
+ status: InvocationStatus;
123
+ provider?: ProviderKind;
124
+ surface: InvocationSurface;
125
+ panelPlan?: PanelPlan;
126
+ panelResult?: PanelResult;
127
+ degradationReason?: string;
128
+ error?: string;
129
+ }
34
130
  export interface InferredHypothesis {
35
131
  hypothesis: string;
36
132
  confidence: number;
@@ -49,6 +145,46 @@ export interface DecisionRecord {
49
145
  explicitStateUpdates?: Record<string, unknown>;
50
146
  studyContractId?: string;
51
147
  }
148
+ export interface QuestionOption {
149
+ value: string;
150
+ label: string;
151
+ description?: string;
152
+ }
153
+ export type QuestionPromptType = "single_choice" | "multi_choice" | "free_text";
154
+ export interface QuestionPrompt {
155
+ id: string;
156
+ checkpointKey?: string;
157
+ title: string;
158
+ question: string;
159
+ type: QuestionPromptType;
160
+ options: QuestionOption[];
161
+ allowOther: boolean;
162
+ otherLabel?: string;
163
+ required: boolean;
164
+ source: "checkpoint" | "setup" | "runtime_guidance" | "manual";
165
+ rationale: string[];
166
+ preferredSurfaces: QuestionSurface[];
167
+ }
168
+ export interface QuestionAnswer {
169
+ promptId: string;
170
+ selectedValues: string[];
171
+ selectedLabels: string[];
172
+ otherText?: string;
173
+ rationale?: string;
174
+ provider?: ProviderKind;
175
+ surface: QuestionSurface;
176
+ }
177
+ export type QuestionRecordStatus = "pending" | "answered" | "cleared" | "error";
178
+ export interface QuestionRecord {
179
+ id: string;
180
+ createdAt: string;
181
+ updatedAt: string;
182
+ status: QuestionRecordStatus;
183
+ prompt: QuestionPrompt;
184
+ answer?: QuestionAnswer;
185
+ error?: string;
186
+ decisionRecordId?: string;
187
+ }
52
188
  export interface ArtifactRecord {
53
189
  id: string;
54
190
  timestamp: string;
@@ -104,6 +240,8 @@ export interface ResearchState {
104
240
  inferredHypotheses: InferredHypothesis[];
105
241
  openTensions: string[];
106
242
  decisionLog: DecisionRecord[];
243
+ invocationLog: InvocationRecord[];
244
+ questionLog: QuestionRecord[];
107
245
  artifactRecords: ArtifactRecord[];
108
246
  narrativeTraces: NarrativeTrace[];
109
247
  studyContract?: StudyContract;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longtable/core",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "private": false,
5
5
  "description": "Provider-neutral domain models and contracts for LongTable",
6
6
  "type": "module",