@ximatai/muyun-web-app 0.26.13 → 0.26.15
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/{BusinessActivityLogView-UC4rH4Fn.js → BusinessActivityLogView-DVzrZW1X.js} +1 -1
- package/dist/BusinessLogListDrawer-D-R3wnWr.js +825 -0
- package/dist/{LoginAuditLogView-Cjrp8MKX.js → LoginAuditLogView-BP1eaEPw.js} +1 -1
- package/dist/{ModuleActionManagementView-Dkb35QXc.js → ModuleActionManagementView-D17iKVQv.js} +214 -196
- package/dist/{ModuleGovernanceView-Dx43QvGf.js → ModuleGovernanceView-LkWCtops.js} +13509 -8472
- package/dist/{RequestErrorLogView-WnGvMWiF.js → RequestErrorLogView-LzN94-Tk.js} +1 -1
- package/dist/{RoleDetailWorkspaceView-DPDb_QOn.js → RoleDetailWorkspaceView-BXA-bzFu.js} +173 -164
- package/dist/{RuntimeLogView-BRl4ZDkU.js → RuntimeLogView-DUpu2q2w.js} +48 -81
- package/dist/index.css +1 -1
- package/dist/index.js +562 -497
- package/dist/moduleGovernanceWorkspaceView-COjWtJMr.js +639 -0
- package/dist/{platform-components-1cvOeHmo.js → platform-components-Hs3DrTqE.js} +5260 -3344
- package/dist/platform-workbench-C-kE-Yqq.js +19755 -0
- package/dist/{http-B0TC0pJB.js → sse-Q1wa3p_k.js} +34 -4
- package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +1 -1
- package/dist/types/app/useWorkbenchMenuRefresh.d.ts +4 -0
- package/dist/types/app/workbenchMenuRefresh.d.ts +14 -0
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -2
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +3 -3
- package/dist/types/dynamic-page-runtime/ModuleDataExchangeSurface.vue.d.ts +17 -0
- package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +712 -22
- package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +3 -2
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +782 -60
- package/dist/types/dynamic-page-runtime/ModulePageListExpansionSurface.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansion.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansions.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +5 -2
- package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +9 -7
- package/dist/types/dynamic-page-runtime/RecordFormSurface.vue.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/assistantBusinessScope.d.ts +3 -0
- package/dist/types/dynamic-page-runtime/assistantQueryCapabilities.d.ts +34 -0
- package/dist/types/dynamic-page-runtime/assistantRecordEditorPolicy.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageFormContributionRuntime.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageListSession.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +94 -4
- package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/formComputeCoordinator.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/modulePageAssistantScope.d.ts +20 -0
- package/dist/types/dynamic-page-runtime/modulePageAssistantSurface.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/recordCreationReadiness.d.ts +17 -0
- package/dist/types/dynamic-page-runtime/recordDisplayProjection.d.ts +59 -0
- package/dist/types/dynamic-page-runtime/recordFormAssistantCapabilities.d.ts +59 -0
- package/dist/types/dynamic-page-runtime/recordFormDraftAccess.d.ts +33 -0
- package/dist/types/dynamic-page-runtime/recordMutationPayload.d.ts +2 -2
- package/dist/types/dynamic-page-runtime/recordReferenceDisplay.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/recordSaveRecovery.d.ts +12 -0
- package/dist/types/dynamic-page-runtime/relationDraftAssistantCapabilities.d.ts +9 -0
- package/dist/types/dynamic-page-runtime/relationDraftController.d.ts +23 -0
- package/dist/types/dynamic-page-runtime/relationFormComputeCoordinator.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +404 -12
- package/dist/types/dynamic-page-runtime/useTenantScopeController.d.ts +1 -0
- package/dist/types/formula/FormulaRuntime.d.ts +3 -1
- package/dist/types/platform-admin-runtime/backendHttp.d.ts +5 -1
- package/dist/types/platform-admin-runtime/module-menu/ModuleMenuEditor.vue.d.ts +17 -0
- package/dist/types/platform-admin-runtime/module-menu/ModuleMenuGovernanceSurface.vue.d.ts +6 -0
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuClient.d.ts +6 -2
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuReceiptStore.d.ts +5 -0
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuSession.d.ts +61 -0
- package/dist/types/platform-admin-runtime/module-menu/moduleMenuWorkspace.d.ts +180 -0
- package/dist/types/platform-admin-runtime/workspaceViewSessions.d.ts +1 -1
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +11 -7
- package/dist/types/platform-components/DictionaryPicker.vue.d.ts +2 -0
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +1 -1
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +6 -4
- package/dist/types/platform-components/ManagementTabs.vue.d.ts +20 -0
- package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +2 -0
- package/dist/types/platform-components/QueryValueEditor.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +15 -9
- package/dist/types/platform-components/RecordExplorerTools.vue.d.ts +27 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +5 -1
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +9 -1
- package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordRelationTabs.vue.d.ts +1 -0
- package/dist/types/platform-components/ReferencePicker.vue.d.ts +2 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +2 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +5 -2
- package/dist/types/platform-components/index.d.ts +9 -1
- package/dist/types/platform-components/optionFieldOptionCache.d.ts +1 -1
- package/dist/types/platform-components/queryNumericValue.d.ts +3 -0
- package/dist/types/platform-components/querySettlementController.d.ts +5 -0
- package/dist/types/platform-components/recordDetailFieldModel.d.ts +2 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +22 -0
- package/dist/types/platform-components/recordQueryListColumnModel.d.ts +8 -0
- package/dist/types/platform-components/recordQueryListQueryController.d.ts +53 -0
- package/dist/types/platform-components/recordQueryListStandardQuery.d.ts +3 -0
- package/dist/types/platform-components/recordTreeQueryController.d.ts +18 -0
- package/dist/types/platform-components/recycleBinState.d.ts +17 -0
- package/dist/types/platform-components/referencePickerModel.d.ts +3 -0
- package/dist/types/platform-workbench/AssistantMarkdownContent.vue.d.ts +6 -0
- package/dist/types/platform-workbench/AssistantSelectionCard.vue.d.ts +15 -0
- package/dist/types/platform-workbench/ConstructionPlanCard.vue.d.ts +8 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +12 -2
- package/dist/types/platform-workbench/WorkbenchAssistantPanel.vue.d.ts +18 -0
- package/dist/types/platform-workbench/assistantMarkdown.d.ts +1 -0
- package/dist/types/platform-workbench/configurationCollaboration.d.ts +23 -0
- package/dist/types/platform-workbench/constructionDelivery.d.ts +3 -0
- package/dist/types/platform-workbench/constructionFields.d.ts +5 -0
- package/dist/types/platform-workbench/constructionInitialization.d.ts +4 -0
- package/dist/types/platform-workbench/constructionPlanGuard.d.ts +21 -0
- package/dist/types/platform-workbench/constructionPlanSession.d.ts +95 -0
- package/dist/types/platform-workbench/constructionReferenceDiscovery.d.ts +3 -0
- package/dist/types/platform-workbench/index.d.ts +1 -0
- package/dist/types/platform-workbench/useAssistantConversation.d.ts +360 -0
- package/dist/types/platform-workbench/useAssistantConversationArchive.d.ts +47 -0
- package/dist/types/platform-workbench/workbenchAssistantCapabilities.d.ts +22 -0
- package/dist/types/views/BusinessLogRetentionControl.vue.d.ts +7 -0
- package/dist/types/views/MetadataSourceTree.vue.d.ts +7 -3
- package/dist/types/views/ModuleRuntimeActivationStatus.vue.d.ts +11 -0
- package/dist/types/views/PageCompositionDescriptorPreview.vue.d.ts +8 -8
- package/dist/types/views/PageCompositionEditor.vue.d.ts +10 -0
- package/dist/types/views/PageCompositionTree.vue.d.ts +19 -13
- package/dist/types/views/businessLogClient.d.ts +3 -0
- package/dist/types/views/businessLogRetentionClient.d.ts +25 -0
- package/dist/types/views/businessRuleAssistantSurface.d.ts +7 -0
- package/dist/types/views/businessRuleEditor.d.ts +22 -0
- package/dist/types/views/businessRuleGovernance.d.ts +7 -1
- package/dist/types/views/businessRuleSession.d.ts +63 -0
- package/dist/types/views/businessRuleWorkspace.d.ts +144 -0
- package/dist/types/views/configurationEditorNavigation.d.ts +2 -0
- package/dist/types/views/metadataChangeSetSubmission.d.ts +10 -0
- package/dist/types/views/metadataEditorSession.d.ts +652 -0
- package/dist/types/views/metadataGovernanceAssistantSurface.d.ts +4 -0
- package/dist/types/views/metadataGovernanceEditor.d.ts +220 -0
- package/dist/types/views/metadataModelChangeSetClient.d.ts +36 -0
- package/dist/types/views/metadataModelEditSession.d.ts +26 -1
- package/dist/types/views/metadataNaming.d.ts +11 -1
- package/dist/types/views/metadataOrchestrationState.d.ts +22 -0
- package/dist/types/views/metadataWorkspace.d.ts +1316 -0
- package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +1 -1
- package/dist/types/views/moduleRuntimeActivation.d.ts +11 -0
- package/dist/types/views/pageCompositionAssistantSurface.d.ts +27 -0
- package/dist/types/views/pageCompositionCandidate.d.ts +47 -0
- package/dist/types/views/pageCompositionComponents.d.ts +42 -0
- package/dist/types/views/pageCompositionDraftState.d.ts +277 -8
- package/dist/types/views/pageCompositionDragPayload.d.ts +7 -1
- package/dist/types/views/pageCompositionMode.d.ts +1 -1
- package/dist/types/views/pageCompositionPlacement.d.ts +6 -1
- package/dist/types/views/pageCompositionPublication.d.ts +37 -0
- package/dist/types/views/pageCompositionSession.d.ts +1341 -0
- package/dist/types/views/pageCompositionWorkspace.d.ts +2555 -0
- package/dist/types/views/roleAuthorizationWorkspaceSession.d.ts +1 -1
- package/dist/types/views/roleDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/views/runtimeLogSse.d.ts +3 -13
- package/dist/types/views/usePageCompositionComponents.d.ts +68 -0
- package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +1 -0
- package/dist/types/vue-ui-antdv/components/UiSearchInput.vue.d.ts +2 -0
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +2 -0
- package/dist/types/vue-ui-antdv/components/UiTextArea.vue.d.ts +4 -0
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +2 -0
- package/dist/types/vue-ui-antdv/types.d.ts +4 -0
- package/dist/types/web-contracts/assistant.d.ts +87 -0
- package/dist/types/web-contracts/constructionPlan.d.ts +212 -0
- package/dist/types/web-contracts/index.d.ts +33 -0
- package/dist/types/web-contracts/operation.d.ts +33 -0
- package/dist/types/web-contracts/referenceTarget.d.ts +13 -0
- package/dist/types/web-core/assistantCapabilityCatalog.d.ts +22 -0
- package/dist/types/web-core/assistantCatalogPage.d.ts +12 -0
- package/dist/types/web-core/assistantConfirmation.d.ts +23 -0
- package/dist/types/web-core/assistantConversationClient.d.ts +42 -0
- package/dist/types/web-core/assistantRuntime.d.ts +123 -0
- package/dist/types/web-core/assistantSurface.d.ts +162 -0
- package/dist/types/web-core/assistantTurnClient.d.ts +16 -0
- package/dist/types/web-core/constructionPlanClient.d.ts +55 -0
- package/dist/types/web-core/errors.d.ts +2 -0
- package/dist/types/web-core/http.d.ts +1 -0
- package/dist/types/web-core/index.d.ts +12 -0
- package/dist/types/web-core/module/dataExchangeClient.d.ts +53 -0
- package/dist/types/web-core/module/index.d.ts +1 -0
- package/dist/types/web-core/module/staticModuleClient.d.ts +12 -2
- package/dist/types/web-core/operationConfirmation.d.ts +28 -0
- package/dist/types/web-core/operationErrors.d.ts +9 -0
- package/dist/types/web-core/operationReceipt.d.ts +10 -0
- package/dist/types/web-core/sse.d.ts +9 -0
- package/dist/types/web-core/uuid.d.ts +2 -0
- package/dist/{workspaceViews-CCg6V0pr.js → workspaceViews-CHsgLFwY.js} +783 -1189
- package/package.json +1 -1
- package/dist/BusinessLogListDrawer-BtaXVJKz.js +0 -564
- package/dist/moduleGovernanceWorkspaceView-4V_UW-Bt.js +0 -40
- package/dist/platform-workbench-Cu14Xd9d.js +0 -10299
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { OperationReceiptReference, OperationPresentation } from '../web-contracts/index';
|
|
2
|
+
import { type OperationProposal, type OperationConfirmation } from './operationConfirmation';
|
|
3
|
+
export { OperationRejectedError as AssistantOperationRejectedError } from './operationConfirmation';
|
|
4
|
+
export type { OperationConfirmationState as AssistantConfirmationState } from './operationConfirmation';
|
|
5
|
+
/** Assistant-only explanation and continuation decorate a platform command. */
|
|
6
|
+
export interface AssistantOperationProposal extends OperationProposal {
|
|
7
|
+
modelSummary?: string;
|
|
8
|
+
continuation?: {
|
|
9
|
+
message: string;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
isCurrent(): boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface AssistantOperationConfirmation extends OperationConfirmation {
|
|
15
|
+
readonly modelSummary: string;
|
|
16
|
+
readonly receiptReference?: OperationReceiptReference;
|
|
17
|
+
readonly continuationReadOnly?: boolean;
|
|
18
|
+
readonly continuationIsCurrent?: () => boolean;
|
|
19
|
+
takeContinuation(): string | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare function createAssistantOperationConfirmation(proposal: AssistantOperationProposal, scopeIsCurrent: () => boolean, now?: () => number): AssistantOperationConfirmation;
|
|
22
|
+
/** Recovered results have no execute path, expiry renewal, or automatic continuation. */
|
|
23
|
+
export declare function restoreAssistantOperationReceipt(reference: OperationReceiptReference, lookup: () => Promise<OperationPresentation | undefined>, scopeIsCurrent: () => boolean): AssistantOperationConfirmation;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { OperationReceiptReference, OperationPresentation } from '../web-contracts/index';
|
|
2
|
+
import type { HttpClient } from './http';
|
|
3
|
+
import type { AssistantConversationMessage } from '../web-contracts/index';
|
|
4
|
+
export interface AssistantConfigurationTask {
|
|
5
|
+
goal: string;
|
|
6
|
+
mode: 'conversation' | 'visual';
|
|
7
|
+
}
|
|
8
|
+
export interface AssistantConversationContent {
|
|
9
|
+
configurationTask?: AssistantConfigurationTask;
|
|
10
|
+
/** Scope of model history, not conversation ownership or permission. */
|
|
11
|
+
executionScopeKey?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
messages: Array<{
|
|
14
|
+
role: 'user' | 'assistant' | 'status';
|
|
15
|
+
text: string;
|
|
16
|
+
operationReceipt?: {
|
|
17
|
+
reference: OperationReceiptReference;
|
|
18
|
+
executionScopeKey: string;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
history: AssistantConversationMessage[];
|
|
22
|
+
planId?: string;
|
|
23
|
+
pendingRequest?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface AssistantConversationSnapshot {
|
|
26
|
+
id: string;
|
|
27
|
+
revision: number;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
content: AssistantConversationContent;
|
|
30
|
+
}
|
|
31
|
+
export interface AssistantConversationSummary {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
}
|
|
36
|
+
export interface AssistantConversationClient {
|
|
37
|
+
lookupOperation?(reference: OperationReceiptReference): Promise<OperationPresentation | undefined>;
|
|
38
|
+
list(scopeKey: string, page: number): Promise<AssistantConversationSummary[]>;
|
|
39
|
+
read(id: string, scopeKey: string): Promise<AssistantConversationSnapshot>;
|
|
40
|
+
save(id: string, scopeKey: string, expectedRevision: number, content: AssistantConversationContent): Promise<AssistantConversationSnapshot>;
|
|
41
|
+
}
|
|
42
|
+
export declare function createAssistantConversationClient(http: HttpClient): AssistantConversationClient;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { AssistantModelRequestObservation } from './assistantTurnClient';
|
|
2
|
+
import type { AssistantOperationConfirmation } from './assistantConfirmation';
|
|
3
|
+
import type { AssistantCapabilityResult, AssistantConversationMessage, AssistantSelectionResponse, AssistantTurnOutput } from '../web-contracts/index';
|
|
4
|
+
import { type AssistantInvocationToken, type AssistantCapabilitySelection, type AssistantExecutionPolicy, type AssistantSurfaceRegistry } from './assistantSurface';
|
|
5
|
+
/** Shared transport limits: newest dialogue and display observations fit the existing history contract. */
|
|
6
|
+
export declare function boundedAssistantConversationHistory(history: AssistantConversationMessage[]): AssistantConversationMessage[];
|
|
7
|
+
/** Ephemeral, display-only evidence within the existing conversation budget. Never archived or executable. */
|
|
8
|
+
export declare function createAssistantDisplayObservations(): {
|
|
9
|
+
clear: () => void;
|
|
10
|
+
forScope: (token: AssistantInvocationToken | undefined) => {
|
|
11
|
+
role: "status";
|
|
12
|
+
text: string;
|
|
13
|
+
}[];
|
|
14
|
+
record(token: AssistantInvocationToken, observation: {
|
|
15
|
+
pageInstanceKey: string;
|
|
16
|
+
text: string;
|
|
17
|
+
}): void;
|
|
18
|
+
};
|
|
19
|
+
export type AssistantDisplayObservations = ReturnType<typeof createAssistantDisplayObservations>;
|
|
20
|
+
export interface AssistantRuntimeStepResult {
|
|
21
|
+
output: AssistantTurnOutput;
|
|
22
|
+
confirmations?: AssistantOperationConfirmation[];
|
|
23
|
+
results: AssistantCapabilityResult[];
|
|
24
|
+
contextChanged: boolean;
|
|
25
|
+
/** Successful capability invocations that committed an effect through applyEffect in this step. */
|
|
26
|
+
appliedEffectCount: number;
|
|
27
|
+
}
|
|
28
|
+
export interface AssistantConversationOptions {
|
|
29
|
+
/** Bounded schema names owned by the current conversation, never persisted or replayed. */
|
|
30
|
+
capabilitySelection?: AssistantCapabilitySelection;
|
|
31
|
+
displayObservations?: AssistantDisplayObservations;
|
|
32
|
+
executionPolicy?: AssistantExecutionPolicy;
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
maxSteps?: number;
|
|
35
|
+
/** Completed dialogue before the current user message. */
|
|
36
|
+
history?: AssistantConversationMessage[];
|
|
37
|
+
/** Structured answer to a selection shown by the immediately preceding assistant message. */
|
|
38
|
+
selectionResponse?: AssistantSelectionResponse;
|
|
39
|
+
onStep?(step: AssistantRuntimeStepResult): void | Promise<void>;
|
|
40
|
+
/** A validated navigation crossed execution scopes; previous model observations were discarded. */
|
|
41
|
+
onExecutionScopeChange?(): void;
|
|
42
|
+
onTextDelta?(text: string, stepIndex: number): void;
|
|
43
|
+
onTextDiscard?(stepIndex: number): void;
|
|
44
|
+
onActivity?(phase: AssistantActivityPhase, stepIndex: number): void;
|
|
45
|
+
/** Receives content-free execution facts for local diagnostics or a governed telemetry adapter. */
|
|
46
|
+
onDiagnostic?(event: AssistantRuntimeDiagnosticEvent): void | Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
export type AssistantActivityPhase = 'understanding' | 'executing' | 'responding';
|
|
49
|
+
type AssistantDiagnosticSurface = 'workbench' | 'module-page' | 'metadata-governance' | 'other';
|
|
50
|
+
type AssistantDiagnosticFinishReason = 'stop' | 'tool_calls' | 'length' | 'content_filter' | 'other';
|
|
51
|
+
export type AssistantRuntimeDiagnosticEvent = ({
|
|
52
|
+
type: 'model.request.completed';
|
|
53
|
+
phase: 'work' | 'summary';
|
|
54
|
+
stepIndex: number;
|
|
55
|
+
} & AssistantModelRequestObservation) | {
|
|
56
|
+
type: 'capability.elapsed';
|
|
57
|
+
stepIndex: number;
|
|
58
|
+
capabilityCode: string;
|
|
59
|
+
durationMs: number;
|
|
60
|
+
} | {
|
|
61
|
+
type: 'decision.started';
|
|
62
|
+
stepIndex: number;
|
|
63
|
+
surface: AssistantDiagnosticSurface;
|
|
64
|
+
backgroundContextRefreshed: boolean;
|
|
65
|
+
} | {
|
|
66
|
+
type: 'decision.completed';
|
|
67
|
+
usage?: AssistantTurnOutput['usage'];
|
|
68
|
+
stepIndex: number;
|
|
69
|
+
finishReason?: AssistantDiagnosticFinishReason;
|
|
70
|
+
toolCallCount: number;
|
|
71
|
+
hasText: boolean;
|
|
72
|
+
} | {
|
|
73
|
+
type: 'decision.restarted';
|
|
74
|
+
stepIndex: number;
|
|
75
|
+
attempt: number;
|
|
76
|
+
reason: 'background-context-refresh' | 'formal-surface-ready' | 'undeclared-tool';
|
|
77
|
+
} | {
|
|
78
|
+
type: 'decision.failed';
|
|
79
|
+
stepIndex: number;
|
|
80
|
+
reason: 'context-changed' | 'cancelled' | 'surface-unavailable' | 'surface-settlement-failed' | 'model-request-failed';
|
|
81
|
+
} | {
|
|
82
|
+
type: 'capability.completed';
|
|
83
|
+
stepIndex: number;
|
|
84
|
+
capabilityCode: string;
|
|
85
|
+
outcome: 'succeeded' | 'failed' | 'replayed';
|
|
86
|
+
pageEffectApplied: boolean;
|
|
87
|
+
} | {
|
|
88
|
+
type: 'budget.progress';
|
|
89
|
+
stepIndex: number;
|
|
90
|
+
newObservations: number;
|
|
91
|
+
appliedEffects: number;
|
|
92
|
+
extended: boolean;
|
|
93
|
+
} | {
|
|
94
|
+
type: 'summary.completed';
|
|
95
|
+
usage?: AssistantTurnOutput['usage'];
|
|
96
|
+
succeeded: boolean;
|
|
97
|
+
reason?: 'truncated' | 'undeclared-tool' | 'provider-rejected' | 'invalid-summary' | 'request-failed';
|
|
98
|
+
} | {
|
|
99
|
+
type: 'conversation.completed';
|
|
100
|
+
stepCount: number;
|
|
101
|
+
bounded: boolean;
|
|
102
|
+
};
|
|
103
|
+
export interface AssistantConversationResult {
|
|
104
|
+
steps: AssistantRuntimeStepResult[];
|
|
105
|
+
termination: 'stopped' | 'waiting-for-user' | 'repeated-call' | 'step-limit';
|
|
106
|
+
}
|
|
107
|
+
export declare class AssistantConversationInterruptedError extends Error {
|
|
108
|
+
readonly steps: readonly AssistantRuntimeStepResult[];
|
|
109
|
+
readonly termination: 'cancelled' | 'context-changed' | 'execution-interrupted' | 'model-failed';
|
|
110
|
+
constructor(steps: readonly AssistantRuntimeStepResult[], cause: unknown, termination?: 'cancelled' | 'context-changed' | 'execution-interrupted' | 'model-failed');
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Runs the bounded tool loop for one user message. Every step takes a fresh
|
|
114
|
+
* Surface snapshot so navigation and draft changes are observed before the
|
|
115
|
+
* model decides its next action.
|
|
116
|
+
*/
|
|
117
|
+
export declare function runAssistantConversation(registry: AssistantSurfaceRegistry, message: string, options?: AssistantConversationOptions): Promise<AssistantConversationResult>;
|
|
118
|
+
/**
|
|
119
|
+
* Executes one bounded model step. A context-changing capability ends the step;
|
|
120
|
+
* the caller starts the next turn from a fresh Surface snapshot.
|
|
121
|
+
*/
|
|
122
|
+
export declare function runAssistantStep(registry: AssistantSurfaceRegistry, message: string, previousResults?: AssistantCapabilityResult[], signal?: AbortSignal): Promise<AssistantRuntimeStepResult>;
|
|
123
|
+
export {};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { type AssistantOperationProposal, type AssistantOperationConfirmation } from './assistantConfirmation';
|
|
2
|
+
import type { AssistantCapabilityCall, AssistantResultPresentation, AssistantCapabilityDescriptor, AssistantSurfaceContext, AssistantTurnInput, AssistantTurnOutput } from '../web-contracts/index';
|
|
3
|
+
import type { AssistantTurnProgress } from './assistantTurnClient';
|
|
4
|
+
export interface AssistantCapability<TInput = unknown, TOutput = unknown> {
|
|
5
|
+
descriptor: AssistantCapabilityDescriptor;
|
|
6
|
+
/** Trusted adapter hint for a small current-surface schema set; never execution authority. */
|
|
7
|
+
schemaDiscovery?: 'eager';
|
|
8
|
+
/** Trusted implementation effect boundary; read capabilities cannot mutate the page. */
|
|
9
|
+
effect: 'read' | 'page' | 'draft' | 'configuration-draft';
|
|
10
|
+
/** Descriptive boundary for reads that replace selection/candidate state; never authority. */
|
|
11
|
+
changesReadState?: boolean;
|
|
12
|
+
present?(output: TOutput): AssistantResultPresentation;
|
|
13
|
+
propose?(output: TOutput): AssistantOperationProposal;
|
|
14
|
+
parseInput(input: unknown): TInput;
|
|
15
|
+
execute(input: TInput, context: AssistantCapabilityExecutionContext): Promise<TOutput>;
|
|
16
|
+
}
|
|
17
|
+
export declare function emptyAssistantCapabilityInputSchema(): Record<string, unknown>;
|
|
18
|
+
export declare function parseEmptyAssistantCapabilityInput(input: unknown): Record<string, never>;
|
|
19
|
+
export interface AssistantCapabilityExecutionContext {
|
|
20
|
+
signal: AbortSignal;
|
|
21
|
+
/** Explicit caller cancellation; unlike signal, it is not aborted by an expected Surface replacement. */
|
|
22
|
+
cancellationSignal?: AbortSignal;
|
|
23
|
+
isCurrent(): boolean;
|
|
24
|
+
/** Commit invocation-local guarded state without claiming a user-visible page effect. */
|
|
25
|
+
commitInternalState<T>(commit: () => T): T;
|
|
26
|
+
/**
|
|
27
|
+
* Synchronously commit a page effect, retaining its scope while background work settles.
|
|
28
|
+
* Async preparation belongs before this call; background completion belongs in settle.
|
|
29
|
+
* Navigation adapters may return the token of an explicitly validated replacement surface.
|
|
30
|
+
*/
|
|
31
|
+
applyEffect<T>(effect: () => T extends PromiseLike<unknown> ? never : T, settle?: () => Promise<void | AssistantInvocationToken>): T;
|
|
32
|
+
}
|
|
33
|
+
export interface AssistantSurface {
|
|
34
|
+
describe(): AssistantSurfaceContext;
|
|
35
|
+
/** Authorized display facts only: no extra queries, execution inputs, IDs or authority. */
|
|
36
|
+
observationSummary?(): string | undefined;
|
|
37
|
+
capabilities(): AssistantCapability[];
|
|
38
|
+
requestTurn(input: AssistantTurnInput, signal: AbortSignal, progress?: AssistantTurnProgress): Promise<AssistantTurnOutput>;
|
|
39
|
+
}
|
|
40
|
+
export interface AssistantSurfaceRegistration {
|
|
41
|
+
pageInstanceKey: string;
|
|
42
|
+
/** Opaque execution-data boundary, never sent to the model. */
|
|
43
|
+
executionScopeKey?(): string;
|
|
44
|
+
/** A fallback awaiting its real page transport must not issue model requests. */
|
|
45
|
+
executionScopePending?: boolean;
|
|
46
|
+
fallback?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Waits for background page transitions to finish before the model receives a
|
|
49
|
+
* context snapshot. It must not wait for missing user input or mutate page state.
|
|
50
|
+
*/
|
|
51
|
+
settle?(signal: AbortSignal): Promise<void>;
|
|
52
|
+
contextRevision(): string;
|
|
53
|
+
/**
|
|
54
|
+
* User-controlled execution scope. Background refreshes must leave this stable
|
|
55
|
+
* so the runtime can safely refresh context without discarding the user's goal.
|
|
56
|
+
*/
|
|
57
|
+
interactionRevision?(): string;
|
|
58
|
+
surface: AssistantSurface;
|
|
59
|
+
}
|
|
60
|
+
export interface AssistantInvocationToken {
|
|
61
|
+
identityScopeKey?: string;
|
|
62
|
+
executionScopePending?: boolean;
|
|
63
|
+
executionScopeKey?: string;
|
|
64
|
+
pageInstanceKey: string;
|
|
65
|
+
surfaceGeneration: number;
|
|
66
|
+
/** Invalidates observations when selection or candidate state changes without a page effect. */
|
|
67
|
+
readStateRevision?: number;
|
|
68
|
+
contextRevision: string;
|
|
69
|
+
interactionRevision?: string;
|
|
70
|
+
fallback: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface AssistantSurfaceSnapshot {
|
|
73
|
+
token: AssistantInvocationToken;
|
|
74
|
+
context: AssistantSurfaceContext;
|
|
75
|
+
/** Historical display evidence; never an executable context or capability. */
|
|
76
|
+
observationSummary?: string;
|
|
77
|
+
capabilities: AssistantCapabilityDescriptor[];
|
|
78
|
+
}
|
|
79
|
+
/** Per-request restriction selected by the caller, never by model output. */
|
|
80
|
+
export interface AssistantExecutionPolicy {
|
|
81
|
+
readOnly?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/** Conversation-local schema choices; never business observations, inputs or execution authority. */
|
|
84
|
+
export interface AssistantCapabilitySelection {
|
|
85
|
+
forScope(token: AssistantInvocationToken | undefined): string[];
|
|
86
|
+
remember(token: AssistantInvocationToken, codes: string[]): void;
|
|
87
|
+
clear(): void;
|
|
88
|
+
}
|
|
89
|
+
export declare function createAssistantCapabilitySelection(): AssistantCapabilitySelection;
|
|
90
|
+
export interface AssistantSurfaceRegistry {
|
|
91
|
+
register(registration: AssistantSurfaceRegistration): () => void;
|
|
92
|
+
activate(pageInstanceKey: string | undefined): void;
|
|
93
|
+
snapshot(): AssistantSurfaceSnapshot | undefined;
|
|
94
|
+
/** Observe registration and active-page changes; read the current snapshot when notified. */
|
|
95
|
+
subscribe(listener: () => void): () => void;
|
|
96
|
+
waitForActiveSurface(options?: {
|
|
97
|
+
pageInstanceKey?: string;
|
|
98
|
+
requireFormal?: boolean;
|
|
99
|
+
signal?: AbortSignal;
|
|
100
|
+
timeoutMs?: number;
|
|
101
|
+
}): Promise<AssistantSurfaceSnapshot>;
|
|
102
|
+
/** Waits for the current page to settle and returns a fresh, execution-compatible snapshot. */
|
|
103
|
+
settleActiveSurface(token: AssistantInvocationToken, signal?: AbortSignal): Promise<AssistantSurfaceSnapshot>;
|
|
104
|
+
requestTurn(input: Omit<AssistantTurnInput, 'context' | 'capabilities'> & {
|
|
105
|
+
capabilitySelection?: AssistantCapabilitySelection;
|
|
106
|
+
/** Missing declarations from a rejected decision; filtered through the current allowed catalog. */
|
|
107
|
+
declarationRecoveryCodes?: string[];
|
|
108
|
+
}, token: AssistantInvocationToken, signal?: AbortSignal, progress?: AssistantTurnProgress, policy?: AssistantExecutionPolicy): Promise<AssistantTurnOutput>;
|
|
109
|
+
invoke(call: AssistantCapabilityCall, token: AssistantInvocationToken, signal?: AbortSignal, policy?: AssistantExecutionPolicy): Promise<{
|
|
110
|
+
value: unknown;
|
|
111
|
+
contextChanged: boolean;
|
|
112
|
+
readStateChanged?: boolean;
|
|
113
|
+
presentation?: AssistantResultPresentation;
|
|
114
|
+
confirmation?: AssistantOperationConfirmation;
|
|
115
|
+
}>;
|
|
116
|
+
}
|
|
117
|
+
/** Current live editor state; never restored from conversation history. */
|
|
118
|
+
export interface AssistantConfigurationEditor {
|
|
119
|
+
kind?: 'metadata' | 'page' | 'rules';
|
|
120
|
+
openingCapability?: string;
|
|
121
|
+
moduleAlias?: string;
|
|
122
|
+
title: string;
|
|
123
|
+
hasUnsavedChanges: boolean;
|
|
124
|
+
visible: boolean;
|
|
125
|
+
open?(): void;
|
|
126
|
+
}
|
|
127
|
+
/** Workbench-owned context and capabilities contributed by a configuration editor or other domain. */
|
|
128
|
+
export interface AssistantWorkspaceContribution {
|
|
129
|
+
editor?(): AssistantConfigurationEditor | undefined;
|
|
130
|
+
current(): {
|
|
131
|
+
revision: string;
|
|
132
|
+
facts: Record<string, unknown>;
|
|
133
|
+
};
|
|
134
|
+
capabilities(settleNavigation?: (signal?: AbortSignal, requireFormal?: boolean) => Promise<void | AssistantInvocationToken>): AssistantCapability[];
|
|
135
|
+
}
|
|
136
|
+
export interface AssistantSurfaceHost {
|
|
137
|
+
registry: AssistantSurfaceRegistry;
|
|
138
|
+
activePageInstanceKey(): string | undefined;
|
|
139
|
+
capabilities?(): AssistantCapability[];
|
|
140
|
+
}
|
|
141
|
+
export declare function provideAssistantSurfaceHost(host: AssistantSurfaceHost): void;
|
|
142
|
+
export declare function useAssistantSurfaceHost(): AssistantSurfaceHost | undefined;
|
|
143
|
+
export declare class StaleAssistantInvocationError extends Error {
|
|
144
|
+
constructor();
|
|
145
|
+
}
|
|
146
|
+
import { OperationUsageError } from './operationErrors';
|
|
147
|
+
/** Preserves the public assistant error contract at the adapter boundary. */
|
|
148
|
+
export declare class AssistantCapabilityUsageError extends OperationUsageError {
|
|
149
|
+
constructor(message: string, code?: OperationUsageError['code']);
|
|
150
|
+
}
|
|
151
|
+
/** An effect started before interruption. Contains no business output from an obsolete scope. */
|
|
152
|
+
export declare class AssistantEffectInterruptedError extends Error {
|
|
153
|
+
readonly token: AssistantInvocationToken;
|
|
154
|
+
readonly execution: 'effect-applied' | 'unknown';
|
|
155
|
+
constructor(token: AssistantInvocationToken, execution: 'effect-applied' | 'unknown', cause: unknown);
|
|
156
|
+
}
|
|
157
|
+
export declare function createAssistantSurfaceRegistry(identityScope?: () => string, workspaceContext?: () => {
|
|
158
|
+
revision: string;
|
|
159
|
+
facts: Record<string, unknown>;
|
|
160
|
+
}): AssistantSurfaceRegistry;
|
|
161
|
+
/** Compares page identity and revisions, independently of object property order. */
|
|
162
|
+
export declare function sameAssistantInvocationToken(left: AssistantInvocationToken | undefined, right: AssistantInvocationToken | undefined): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AssistantTurnInput, AssistantTurnOutput, AssistantTokenUsage } from '../web-contracts/index';
|
|
2
|
+
import { type HttpClient } from './http';
|
|
3
|
+
export interface AssistantTurnProgress {
|
|
4
|
+
onTextDelta?(text: string): void;
|
|
5
|
+
/** Observed before stale response rejection; never a business receipt. */
|
|
6
|
+
onRequestCompleted?(observation: AssistantModelRequestObservation): void | Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export interface AssistantModelRequestObservation {
|
|
9
|
+
durationMs: number;
|
|
10
|
+
outcome: 'received' | 'failed';
|
|
11
|
+
usage?: AssistantTokenUsage;
|
|
12
|
+
toolCallCount?: number;
|
|
13
|
+
}
|
|
14
|
+
export type AssistantTurnRequester = (input: AssistantTurnInput, signal: AbortSignal, progress?: AssistantTurnProgress) => Promise<AssistantTurnOutput>;
|
|
15
|
+
/** Uses the supplied transport as-is so page-owned tenant scope remains authoritative. */
|
|
16
|
+
export declare function createAssistantTurnRequester(http: HttpClient): AssistantTurnRequester;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ConstructionPlanContent, ReferenceTargetFieldCatalog, ConstructionTask, ConstructionAcceptancePreview, ConstructionAcceptanceReceipt, ConstructionDeliveryReceipt, ConstructionProgress, ConstructionFieldDescription, ConstructionFieldResult, ConstructionInitializationResult, ConstructionPlanSnapshot, ConstructionPlanSummary } from '../web-contracts/index';
|
|
2
|
+
import type { HttpClient } from './http';
|
|
3
|
+
export interface ConstructionPlanClient {
|
|
4
|
+
designContract(): Promise<{
|
|
5
|
+
recordName: {
|
|
6
|
+
fieldName: string;
|
|
7
|
+
columnName: string;
|
|
8
|
+
fieldType: string;
|
|
9
|
+
};
|
|
10
|
+
inheritedFields: string[];
|
|
11
|
+
declarableCapabilities: {
|
|
12
|
+
capabilities: string[];
|
|
13
|
+
metadataFields: {
|
|
14
|
+
fieldName: string;
|
|
15
|
+
columnName: string;
|
|
16
|
+
fieldSpecAlias: string;
|
|
17
|
+
defaultKind: string;
|
|
18
|
+
defaultDescription: string;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
businessObjects(): Promise<{
|
|
23
|
+
alias: string;
|
|
24
|
+
title: string;
|
|
25
|
+
applicationAlias: string;
|
|
26
|
+
applicationTitle: string | null;
|
|
27
|
+
kind: string;
|
|
28
|
+
referenceReady: boolean;
|
|
29
|
+
explanation: string;
|
|
30
|
+
}[]>;
|
|
31
|
+
referenceTarget(moduleAlias: string): Promise<ReferenceTargetFieldCatalog>;
|
|
32
|
+
task(id: string): Promise<ConstructionTask>;
|
|
33
|
+
previewAcceptance(id: string, objectKey: string): Promise<ConstructionAcceptancePreview>;
|
|
34
|
+
confirmAcceptance(id: string, command: {
|
|
35
|
+
requestId: string;
|
|
36
|
+
objectKey: string;
|
|
37
|
+
fingerprint: string;
|
|
38
|
+
}): Promise<ConstructionAcceptanceReceipt>;
|
|
39
|
+
acceptance(id: string, requestId: string): Promise<ConstructionAcceptanceReceipt | undefined>;
|
|
40
|
+
delivery(id: string, requestId: string): Promise<ConstructionDeliveryReceipt | undefined>;
|
|
41
|
+
progress(id: string, objectKey: string): Promise<ConstructionProgress>;
|
|
42
|
+
describeFields(id: string, objectKey: string): Promise<ConstructionFieldDescription>;
|
|
43
|
+
fieldChange(id: string, requestId: string): Promise<ConstructionFieldResult | undefined>;
|
|
44
|
+
initialization(id: string, objectKey: string): Promise<ConstructionInitializationResult | undefined>;
|
|
45
|
+
list(): Promise<ConstructionPlanSummary[]>;
|
|
46
|
+
read(id: string): Promise<ConstructionPlanSnapshot>;
|
|
47
|
+
history(id: string): Promise<ConstructionPlanSnapshot[]>;
|
|
48
|
+
confirm(id: string, command: {
|
|
49
|
+
requestId: string;
|
|
50
|
+
expectedRevision: number;
|
|
51
|
+
content: ConstructionPlanContent;
|
|
52
|
+
}): Promise<ConstructionPlanSnapshot>;
|
|
53
|
+
confirmation(id: string, requestId: string): Promise<ConstructionPlanSnapshot | undefined>;
|
|
54
|
+
}
|
|
55
|
+
export declare function createConstructionPlanClient(http: HttpClient): ConstructionPlanClient;
|
|
@@ -62,4 +62,6 @@ export declare class AppError extends Error {
|
|
|
62
62
|
export declare function normalizeError(error: unknown): AppError;
|
|
63
63
|
export declare function resolveGlobalErrorPresentation(error: AppError, context?: ErrorUiContext): GlobalErrorPresentation;
|
|
64
64
|
export declare function userFacingErrorMessage(error: AppError): string;
|
|
65
|
+
/** Fixed explanations for known model failures; never expose arbitrary upstream 5xx text. */
|
|
66
|
+
export declare function modelFailureMessage(error: AppError): string | undefined;
|
|
65
67
|
export declare function isUnexpectedPlatformError(error: AppError): boolean;
|
|
@@ -13,6 +13,7 @@ export interface HttpRequestOptions {
|
|
|
13
13
|
path: string;
|
|
14
14
|
query?: Record<string, RouteQueryValue>;
|
|
15
15
|
body?: unknown;
|
|
16
|
+
responseType?: 'json' | 'blob';
|
|
16
17
|
headers?: Record<string, string>;
|
|
17
18
|
/** Cancels the underlying Fetch request, including a long-lived response stream. */
|
|
18
19
|
signal?: AbortSignal;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export * from './errors';
|
|
2
2
|
export * from './http';
|
|
3
|
+
export * from './sse';
|
|
3
4
|
export * from './query';
|
|
4
5
|
export * from './actionResult';
|
|
6
|
+
export * from './assistantSurface';
|
|
7
|
+
export * from './assistantCatalogPage';
|
|
8
|
+
export * from './assistantRuntime';
|
|
9
|
+
export * from './assistantTurnClient';
|
|
5
10
|
export * from './businessNotifications';
|
|
6
11
|
export * from './dataChanges';
|
|
7
12
|
export * from './realtime';
|
|
@@ -10,3 +15,10 @@ export * from './referenceResolveClient';
|
|
|
10
15
|
export { userPreferences } from './userPreferences';
|
|
11
16
|
export type { UserPreferenceOptions, UserPreferenceStore } from './userPreferences';
|
|
12
17
|
export * from './module/index';
|
|
18
|
+
export * from './assistantConfirmation';
|
|
19
|
+
export * from './constructionPlanClient';
|
|
20
|
+
export * from './assistantConversationClient';
|
|
21
|
+
export * from './operationConfirmation';
|
|
22
|
+
export * from './operationErrors';
|
|
23
|
+
export * from './operationReceipt';
|
|
24
|
+
export * from './uuid';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { HttpClient } from '../http';
|
|
2
|
+
import type { WebQueryRequest } from '../../web-contracts/index';
|
|
3
|
+
export type ImportDuplicateStrategy = 'ERROR' | 'SKIP' | 'OVERWRITE';
|
|
4
|
+
export interface ImportSheet {
|
|
5
|
+
sheetName: string;
|
|
6
|
+
entityAlias: string;
|
|
7
|
+
main: boolean;
|
|
8
|
+
rowCount: number;
|
|
9
|
+
fields: Array<{
|
|
10
|
+
fieldName: string;
|
|
11
|
+
title: string;
|
|
12
|
+
matchKeyCandidate: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export interface ImportParseResult {
|
|
16
|
+
sheets: ImportSheet[];
|
|
17
|
+
}
|
|
18
|
+
export interface ImportExecutionCommand {
|
|
19
|
+
mainSheet: {
|
|
20
|
+
matchFieldName: string;
|
|
21
|
+
duplicateStrategy: ImportDuplicateStrategy;
|
|
22
|
+
};
|
|
23
|
+
childSheets: Array<{
|
|
24
|
+
entityAlias: string;
|
|
25
|
+
matchFieldName: string;
|
|
26
|
+
duplicateStrategy: ImportDuplicateStrategy;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
export interface ImportExecutionResult {
|
|
30
|
+
created: number;
|
|
31
|
+
updated: number;
|
|
32
|
+
skipped: number;
|
|
33
|
+
errorCount: number;
|
|
34
|
+
summaries?: Record<string, {
|
|
35
|
+
entityAlias: string;
|
|
36
|
+
created: number;
|
|
37
|
+
updated: number;
|
|
38
|
+
skipped: number;
|
|
39
|
+
errors: number;
|
|
40
|
+
}>;
|
|
41
|
+
partialSuccess: boolean;
|
|
42
|
+
message: string;
|
|
43
|
+
errorFileName?: string;
|
|
44
|
+
errorFileToken?: string;
|
|
45
|
+
}
|
|
46
|
+
/** Dynamic EXCHANGE transport; domain execution remains behind the module's standard action scope. */
|
|
47
|
+
export declare function createDataExchangeClient(http: HttpClient, moduleAlias: string): {
|
|
48
|
+
template: () => Promise<Blob>;
|
|
49
|
+
parse(file: File): Promise<ImportParseResult>;
|
|
50
|
+
execute(file: File, command: ImportExecutionCommand): Promise<ImportExecutionResult>;
|
|
51
|
+
errorFile: (token: string) => Promise<Blob>;
|
|
52
|
+
exportData(request: WebQueryRequest): Promise<Blob>;
|
|
53
|
+
};
|
|
@@ -11,13 +11,23 @@ export interface QuerySchemaRequestOptions {
|
|
|
11
11
|
uiConfigId?: string;
|
|
12
12
|
queryTemplateId?: string;
|
|
13
13
|
}
|
|
14
|
+
export interface RecordSaveRequestOptions {
|
|
15
|
+
requestId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RecordSaveReceipt {
|
|
18
|
+
committed: boolean;
|
|
19
|
+
recordId?: string;
|
|
20
|
+
recordVersion?: number;
|
|
21
|
+
actionCode?: string;
|
|
22
|
+
}
|
|
14
23
|
/** Source-neutral client for a platform module's standard CRUD contract. */
|
|
15
24
|
export interface ModuleCrudClient<TRecord> {
|
|
16
25
|
querySchema(options?: QuerySchemaRequestOptions): Promise<QuerySchema>;
|
|
17
26
|
query(request?: WebQueryRequest): Promise<WebPageResponse<TRecord>>;
|
|
18
27
|
view(id: string): Promise<TRecord>;
|
|
19
|
-
insert(record: TRecord): Promise<StaticRecordMutationResult<TRecord>>;
|
|
20
|
-
update(id: string, record: TRecord): Promise<StaticRecordMutationResult<TRecord>>;
|
|
28
|
+
insert(record: TRecord, options?: RecordSaveRequestOptions): Promise<StaticRecordMutationResult<TRecord>>;
|
|
29
|
+
update(id: string, record: TRecord, options?: RecordSaveRequestOptions): Promise<StaticRecordMutationResult<TRecord>>;
|
|
30
|
+
saveReceipt?(requestId: string): Promise<RecordSaveReceipt>;
|
|
21
31
|
delete(id: string, request: RecordActionRequest): Promise<StaticCountMutationResult>;
|
|
22
32
|
enable(id: string, request: RecordActionRequest): Promise<StaticCountMutationResult>;
|
|
23
33
|
disable(id: string, request: RecordActionRequest): Promise<StaticCountMutationResult>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { OperationPresentation, OperationReceiptReference } from '../web-contracts/index';
|
|
2
|
+
/** Captured platform command. The caller owns the candidate and execution scope. */
|
|
3
|
+
export interface OperationProposal {
|
|
4
|
+
receiptReference?: OperationReceiptReference;
|
|
5
|
+
presentation: OperationPresentation;
|
|
6
|
+
confirmLabel?: string;
|
|
7
|
+
expiresAt: number;
|
|
8
|
+
isCurrent(): boolean;
|
|
9
|
+
/** Submits the captured payload using the same durable request identity on every attempt. */
|
|
10
|
+
execute(): Promise<OperationPresentation>;
|
|
11
|
+
/** A missing receipt is not permission to automatically resubmit. */
|
|
12
|
+
lookup(): Promise<OperationPresentation | undefined>;
|
|
13
|
+
}
|
|
14
|
+
export type OperationConfirmationState = 'pending' | 'executing' | 'checking' | 'succeeded' | 'unknown' | 'cancelled' | 'expired' | 'rejected';
|
|
15
|
+
/** Adapter proof that no persistent operation was accepted (validation or authorization rejection). */
|
|
16
|
+
export declare class OperationRejectedError extends Error {
|
|
17
|
+
}
|
|
18
|
+
export interface OperationConfirmation {
|
|
19
|
+
readonly confirmLabel: string;
|
|
20
|
+
readonly presentation: OperationPresentation;
|
|
21
|
+
readonly state: OperationConfirmationState;
|
|
22
|
+
readonly result: OperationPresentation | undefined;
|
|
23
|
+
confirm(): Promise<void>;
|
|
24
|
+
check(): Promise<void>;
|
|
25
|
+
cancel(): void;
|
|
26
|
+
}
|
|
27
|
+
/** Explicit confirmation, duplicate-click protection and read-only recovery of uncertain writes. */
|
|
28
|
+
export declare function createOperationConfirmation(proposal: OperationProposal, scopeIsCurrent: () => boolean, now?: () => number): OperationConfirmation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** A rejected editor operation with safe, bounded feedback for callers. */
|
|
2
|
+
export declare class OperationUsageError extends Error {
|
|
3
|
+
readonly code: 'CAPABILITY_USAGE_INVALID' | 'CANDIDATE_AMBIGUOUS' | 'CANDIDATE_EXPIRED' | 'PRECONDITION_FAILED';
|
|
4
|
+
constructor(message: string, code?: 'CAPABILITY_USAGE_INVALID' | 'CANDIDATE_AMBIGUOUS' | 'CANDIDATE_EXPIRED' | 'PRECONDITION_FAILED');
|
|
5
|
+
}
|
|
6
|
+
/** A staged draft was rejected before publication; no draft or display state was changed. */
|
|
7
|
+
export declare class DraftUpdateRejectedError extends OperationUsageError {
|
|
8
|
+
constructor(failure: OperationUsageError);
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OperationPresentation, OperationReceiptReference } from '../web-contracts/index';
|
|
2
|
+
import type { HttpClient } from './http';
|
|
3
|
+
/** Only query identities survive a conversation. Payloads, permissions and confirmation are never restored. */
|
|
4
|
+
export declare function parseOperationReceiptReference(value: unknown): OperationReceiptReference;
|
|
5
|
+
export declare function pagePublicationDigest(revision: {
|
|
6
|
+
templateAlias?: string;
|
|
7
|
+
templateVersion?: number;
|
|
8
|
+
uiTreeJson?: string;
|
|
9
|
+
}): Promise<string>;
|
|
10
|
+
export declare function lookupOperationReceipt(http: HttpClient, input: OperationReceiptReference): Promise<OperationPresentation | undefined>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SseEvent {
|
|
2
|
+
event: string;
|
|
3
|
+
data: string;
|
|
4
|
+
}
|
|
5
|
+
/** Incrementally decodes the SSE framing shared by authenticated platform streams. */
|
|
6
|
+
export declare function createSseParser(emit: (event: SseEvent) => void): {
|
|
7
|
+
push(chunk: string): void;
|
|
8
|
+
finish(): void;
|
|
9
|
+
};
|