@compilr-dev/sdk 0.10.13 → 0.10.14
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/dist/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export type { ProjectType, ProjectStatus, RepoPattern, WorkflowMode, LifecycleSt
|
|
|
57
57
|
export { createSQLiteRepositories, SQLiteProjectRepository, SQLiteWorkItemRepository, SQLiteDocumentRepository, SQLitePlanRepository, SQLiteCommentRepository, getDatabase, closeDatabase, closeAllDatabases, databaseExists, SCHEMA_VERSION, SCHEMA_SQL, } from './platform/index.js';
|
|
58
58
|
export type { SQLiteRepositories, CreateSQLiteRepositoriesOptions, ProjectDeleteHooks, ProjectRecord, WorkItemRecord, ProjectDocumentRecord, WorkItemCommentRecord, } from './platform/index.js';
|
|
59
59
|
export { createAskUserTool, createAskUserSimpleTool, createProposeAlternativesTool, createInteractiveFlowTool, validateFlow, INTERACTIVE_FLOW_INPUT_SCHEMA, } from './tools/index.js';
|
|
60
|
-
export type { AskUserQuestion, AskUserInput, AskUserResult, AskUserHandler, AskUserSimpleInput, AskUserSimpleResult, AskUserSimpleHandler, Alternative, ProposeAlternativesInput, ProposeAlternativesResult, ProposeAlternativesHandler, Flow, FlowTone, FlowNode, QuestionNode, InfoNode, BranchNode, SummaryNode, QuestionInput, Choice, Proposal, NextRef, BranchRoute, BranchCondition, NodeId, IconName, Tint, RenderVariant, AnswerValue, InteractiveFlowInput, InteractiveFlowResult, InteractiveFlowHandler, FlowValidationResult, FlowValidationError, FlowErrorCode, } from './tools/index.js';
|
|
60
|
+
export type { AskUserQuestion, AskUserInput, AskUserResult, AskUserHandler, AskUserSimpleInput, AskUserSimpleResult, AskUserSimpleHandler, Alternative, ProposeAlternativesInput, ProposeAlternativesResult, ProposeAlternativesHandler, Flow, FlowTone, FlowNode, QuestionNode, InfoNode, BranchNode, SummaryNode, QuestionInput, Choice, Proposal, NextRef, BranchRoute, BranchCondition, NodeId, IconName, Tint, RenderVariant, AnswerValue, AbortReason, InteractiveFlowInput, InteractiveFlowResult, InteractiveFlowHandler, FlowValidationResult, FlowValidationError, FlowErrorCode, } from './tools/index.js';
|
|
61
61
|
export { EntitlementCache, UNLIMITED, OFFLINE_FALLBACK_LIMITS, DailyCounter, formatLimitMessage, formatTimeUntilReset, formatUpgradeHint, } from './entitlements/index.js';
|
|
62
62
|
export type { TierLimits, EntitlementResponse, LimitCheckResult, IEntitlementStore, EntitlementCacheConfig, } from './entitlements/index.js';
|
|
63
63
|
export { detectProject, suggestProjectType, detectCommon } from './detection/index.js';
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export { createProposeAlternativesTool } from './propose-alternatives-tool.js';
|
|
|
9
9
|
export { createInteractiveFlowTool, validateFlow, INTERACTIVE_FLOW_INPUT_SCHEMA, } from './interactive-flow-tool.js';
|
|
10
10
|
export type { AskUserQuestion, AskUserInput, AskUserResult, AskUserHandler, AskUserSimpleInput, AskUserSimpleResult, AskUserSimpleHandler, } from './ask-user-tools.js';
|
|
11
11
|
export type { Alternative, ProposeAlternativesInput, ProposeAlternativesResult, ProposeAlternativesHandler, } from './propose-alternatives-tool.js';
|
|
12
|
-
export type { Flow, FlowTone, Node as FlowNode, QuestionNode, InfoNode, BranchNode, SummaryNode, QuestionInput, Choice, Proposal, NextRef, BranchRoute, BranchCondition, NodeId, IconName, Tint, RenderVariant, AnswerValue, InteractiveFlowInput, InteractiveFlowResult, InteractiveFlowHandler, FlowValidationResult, FlowValidationError, FlowErrorCode, } from './interactive-flow-tool.js';
|
|
12
|
+
export type { Flow, FlowTone, Node as FlowNode, QuestionNode, InfoNode, BranchNode, SummaryNode, QuestionInput, Choice, Proposal, NextRef, BranchRoute, BranchCondition, NodeId, IconName, Tint, RenderVariant, AnswerValue, AbortReason, InteractiveFlowInput, InteractiveFlowResult, InteractiveFlowHandler, FlowValidationResult, FlowValidationError, FlowErrorCode, } from './interactive-flow-tool.js';
|
|
@@ -143,15 +143,39 @@ export interface InteractiveFlowInput {
|
|
|
143
143
|
}
|
|
144
144
|
/** Value collected from a node (Question only — info/branch/summary don't produce values) */
|
|
145
145
|
export type AnswerValue = string | string[];
|
|
146
|
+
/** Why the flow ended without completion */
|
|
147
|
+
export type AbortReason =
|
|
148
|
+
/** User pressed Escape */
|
|
149
|
+
'escape'
|
|
150
|
+
/** User clicked the X (close) button */
|
|
151
|
+
| 'close-button'
|
|
152
|
+
/** User clicked outside the modal */
|
|
153
|
+
| 'backdrop'
|
|
154
|
+
/** Conversation tab closed or project switched mid-flow */
|
|
155
|
+
| 'conversation-closed'
|
|
156
|
+
/** Catch-all (renderer not destroyed, but no explicit reason recorded) */
|
|
157
|
+
| 'unknown';
|
|
146
158
|
export interface InteractiveFlowResult {
|
|
147
159
|
/** False if the user aborted (closed modal, switched conversation, etc.) */
|
|
148
160
|
completed: boolean;
|
|
149
161
|
/** Every node visited, in order — including backtracked nodes */
|
|
150
162
|
path: NodeId[];
|
|
151
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* Final answers (IDs / strings — what you compare in `BranchCondition`).
|
|
165
|
+
* Wiped downstream of any backtrack point.
|
|
166
|
+
*/
|
|
152
167
|
answers: Record<NodeId, AnswerValue>;
|
|
168
|
+
/**
|
|
169
|
+
* Human-readable labels for the answers above — use this when summarizing
|
|
170
|
+
* the user's choices back to them. For text-mode answers, label == value.
|
|
171
|
+
* For single/multi/proposal modes, this is the visible label the user saw.
|
|
172
|
+
*/
|
|
173
|
+
answerLabels: Record<NodeId, AnswerValue>;
|
|
153
174
|
/** Present iff !completed — the node where the user aborted */
|
|
154
175
|
abortedAt?: NodeId;
|
|
176
|
+
/** Present iff !completed — how the abort happened (helps the agent
|
|
177
|
+
* differentiate "user closed the modal" from "tab was closed externally") */
|
|
178
|
+
abortReason?: AbortReason;
|
|
155
179
|
/** Wall-clock time the user spent */
|
|
156
180
|
durationMs: number;
|
|
157
181
|
/** Validator warnings that didn't block execution (e.g., orphan nodes) */
|