@feedmepos/mf-miniprogram-v2 0.1.0-dev.25 → 0.1.0-dev.26
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/{ControlPlaneView-BEYuTjG6.js → ControlPlaneView-BBd62o75.js} +4884 -4476
- package/dist/app.js +1 -1
- package/dist/package.json +2 -2
- package/dist/src/components/MessageItem.vue.d.ts +7 -1
- package/dist/src/composables/quickEdit.d.ts +6 -0
- package/dist/src/composables/types.d.ts +48 -0
- package/dist/src/composables/useChat.d.ts +7 -0
- package/dist/src/composables/useProject.d.ts +107 -3
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/app.js
CHANGED
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-miniprogram-v2",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@feedmepos/mf-common": "^1.27.9",
|
|
41
41
|
"@feedmepos/ui-library": "1.8.4",
|
|
42
|
-
"@opencode-ai/sdk": "
|
|
42
|
+
"@opencode-ai/sdk": "1.17.14",
|
|
43
43
|
"diff": "^9.0.0",
|
|
44
44
|
"dompurify": "^3.4.11",
|
|
45
45
|
"highlight.js": "^11.11.1",
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { ChatMessage } from '../composables/types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
message: ChatMessage;
|
|
4
|
+
canUndo?: boolean;
|
|
5
|
+
undoing?: boolean;
|
|
4
6
|
};
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
+
undo: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onUndo?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
12
|
declare const _default: typeof __VLS_export;
|
|
7
13
|
export default _default;
|
|
@@ -74,6 +74,12 @@ export interface QuickEditApplyResponse {
|
|
|
74
74
|
escalated: QuickEditApplyResult[];
|
|
75
75
|
results: QuickEditApplyResult[];
|
|
76
76
|
preview: boolean;
|
|
77
|
+
checkpoint?: {
|
|
78
|
+
id: string;
|
|
79
|
+
status: string;
|
|
80
|
+
contextStatus: string;
|
|
81
|
+
} | null;
|
|
82
|
+
checkpointError?: string | null;
|
|
77
83
|
}
|
|
78
84
|
export interface QuickEditHistoryItem {
|
|
79
85
|
component: string;
|
|
@@ -66,6 +66,10 @@ export interface ChatMessage {
|
|
|
66
66
|
export type ConnectionStatus = 'idle' | 'starting' | 'ready' | 'error';
|
|
67
67
|
export type ProjectProvisioningStatus = 'not_started' | 'provisioning' | 'ready' | 'failed';
|
|
68
68
|
export type ArchiveCodeAction = 'save' | 'discard';
|
|
69
|
+
export type CheckpointTrigger = 'manual' | 'turn_completed' | 'quick_edit' | 'interval' | 'archive' | 'pre_restore' | 'pre_discard' | 'turn_revert' | 'turn_unrevert' | 'restore' | 'release';
|
|
70
|
+
export type CheckpointStatus = 'capturing' | 'local_only' | 'pushed_verified' | 'failed';
|
|
71
|
+
export type CheckpointContextStatus = 'pending' | 'snapshotted' | 'failed' | 'unavailable';
|
|
72
|
+
export type WorkspaceSyncState = 'unavailable' | 'diverged' | 'behind' | 'uncommitted' | 'unpushed' | 'saving' | 'save_failed' | 'synced' | 'unknown';
|
|
69
73
|
export interface ProjectSummary {
|
|
70
74
|
businessId: string;
|
|
71
75
|
businessSlug: string | null;
|
|
@@ -94,6 +98,13 @@ export interface AgentSessionSummary {
|
|
|
94
98
|
archived_at: string | null;
|
|
95
99
|
last_event_chunk: number;
|
|
96
100
|
last_snapshot_at: string | null;
|
|
101
|
+
base_commit_sha: string | null;
|
|
102
|
+
last_checkpoint_id: string | null;
|
|
103
|
+
last_durable_commit_sha: string | null;
|
|
104
|
+
last_pushed_at: string | null;
|
|
105
|
+
dirty_since: string | null;
|
|
106
|
+
checkpoint_status: CheckpointStatus | null;
|
|
107
|
+
checkpoint_error: string | null;
|
|
97
108
|
attention_action?: string | null;
|
|
98
109
|
attention_error?: string | null;
|
|
99
110
|
release_count: number;
|
|
@@ -114,10 +125,47 @@ export interface SessionChangesSummary {
|
|
|
114
125
|
commitsBehindOrigin: number;
|
|
115
126
|
headSha: string | null;
|
|
116
127
|
originSha: string | null;
|
|
128
|
+
syncState: WorkspaceSyncState;
|
|
129
|
+
availability: 'available' | 'unavailable';
|
|
130
|
+
lastCheckpointId: string | null;
|
|
131
|
+
lastDurableCommitSha: string | null;
|
|
132
|
+
lastPushedAt: string | null;
|
|
133
|
+
dirtySince: string | null;
|
|
134
|
+
checkpointStatus: CheckpointStatus | null;
|
|
135
|
+
checkpointError: string | null;
|
|
136
|
+
lastSnapshotAt: string | null;
|
|
137
|
+
latestCheckpoint: SessionCheckpoint | null;
|
|
138
|
+
}
|
|
139
|
+
export interface SessionCheckpoint {
|
|
140
|
+
id: string;
|
|
141
|
+
business_id: string;
|
|
142
|
+
session_id: string;
|
|
143
|
+
sequence: number;
|
|
144
|
+
trigger: CheckpointTrigger;
|
|
145
|
+
status: CheckpointStatus;
|
|
146
|
+
context_status: CheckpointContextStatus;
|
|
147
|
+
base_sha: string | null;
|
|
148
|
+
commit_sha: string | null;
|
|
149
|
+
verified_remote_sha: string | null;
|
|
150
|
+
raw_opencode_message_id: string | null;
|
|
151
|
+
opencode_snapshot_key: string | null;
|
|
152
|
+
workspace_backup_key: string | null;
|
|
153
|
+
file_count: number;
|
|
154
|
+
additions: number;
|
|
155
|
+
deletions: number;
|
|
156
|
+
summary: string | null;
|
|
157
|
+
error_stage: string | null;
|
|
158
|
+
error_message: string | null;
|
|
159
|
+
created_at: string;
|
|
160
|
+
committed_at: string | null;
|
|
161
|
+
pushed_at: string | null;
|
|
162
|
+
context_snapshotted_at: string | null;
|
|
163
|
+
pinned: number;
|
|
117
164
|
}
|
|
118
165
|
export interface ReleaseSummary {
|
|
119
166
|
id: string;
|
|
120
167
|
source_commit_sha: string;
|
|
168
|
+
checkpoint_id: string | null;
|
|
121
169
|
created_from_session_id: string | null;
|
|
122
170
|
session_title: string | null;
|
|
123
171
|
status: 'draft' | 'preview' | 'published' | 'rolled_back';
|
|
@@ -12,6 +12,10 @@ export declare function useChat(): {
|
|
|
12
12
|
businessId: string | null;
|
|
13
13
|
readOnly: boolean;
|
|
14
14
|
disconnected: boolean;
|
|
15
|
+
checkpointRevision: number;
|
|
16
|
+
checkpointError: string | null;
|
|
17
|
+
checkpointSaving: boolean;
|
|
18
|
+
canUnrevert: boolean;
|
|
15
19
|
messagesOrder: string[];
|
|
16
20
|
messagesByKey: Record<string, ChatMessage>;
|
|
17
21
|
queuedMessages: {
|
|
@@ -148,6 +152,9 @@ export declare function useChat(): {
|
|
|
148
152
|
suspend: (message?: string) => void;
|
|
149
153
|
sendMessage: (text: string, attachments?: OutgoingAttachment[]) => boolean;
|
|
150
154
|
abort: () => Promise<void>;
|
|
155
|
+
revertTurn: (rawOpencodeMessageId: string) => Promise<boolean>;
|
|
156
|
+
unrevertTurn: () => Promise<boolean>;
|
|
157
|
+
reportCheckpointResult: (error?: string | null) => void;
|
|
151
158
|
restartPreviewServer: () => Promise<boolean>;
|
|
152
159
|
};
|
|
153
160
|
export type ChatStore = ReturnType<typeof useChat>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ArchiveCodeAction, ProjectSummary, ReleaseSummary, SessionChangesSummary } from './types';
|
|
1
|
+
import type { ArchiveCodeAction, CheckpointTrigger, ProjectSummary, ReleaseSummary, SessionCheckpoint, SessionChangesSummary } from './types';
|
|
2
2
|
export declare function useProject(): {
|
|
3
3
|
businessId: string;
|
|
4
4
|
project: {
|
|
@@ -29,6 +29,13 @@ export declare function useProject(): {
|
|
|
29
29
|
archived_at: string | null;
|
|
30
30
|
last_event_chunk: number;
|
|
31
31
|
last_snapshot_at: string | null;
|
|
32
|
+
base_commit_sha: string | null;
|
|
33
|
+
last_checkpoint_id: string | null;
|
|
34
|
+
last_durable_commit_sha: string | null;
|
|
35
|
+
last_pushed_at: string | null;
|
|
36
|
+
dirty_since: string | null;
|
|
37
|
+
checkpoint_status: import("./types").CheckpointStatus | null;
|
|
38
|
+
checkpoint_error: string | null;
|
|
32
39
|
attention_action?: string | null | undefined;
|
|
33
40
|
attention_error?: string | null | undefined;
|
|
34
41
|
release_count: number;
|
|
@@ -39,6 +46,7 @@ export declare function useProject(): {
|
|
|
39
46
|
releases: {
|
|
40
47
|
id: string;
|
|
41
48
|
source_commit_sha: string;
|
|
49
|
+
checkpoint_id: string | null;
|
|
42
50
|
created_from_session_id: string | null;
|
|
43
51
|
session_title: string | null;
|
|
44
52
|
status: "draft" | "preview" | "published" | "rolled_back";
|
|
@@ -52,6 +60,82 @@ export declare function useProject(): {
|
|
|
52
60
|
build_created_at: string | null;
|
|
53
61
|
build_completed_at: string | null;
|
|
54
62
|
}[];
|
|
63
|
+
workspaceState: {
|
|
64
|
+
businessId: string;
|
|
65
|
+
sessionId: string;
|
|
66
|
+
workspaceExists: boolean;
|
|
67
|
+
dirty: boolean;
|
|
68
|
+
hasUncommittedChanges: boolean;
|
|
69
|
+
hasUnpushedCommits: boolean;
|
|
70
|
+
headDiffersFromOrigin: boolean;
|
|
71
|
+
statusCount: number;
|
|
72
|
+
commitsAheadOrigin: number;
|
|
73
|
+
commitsBehindOrigin: number;
|
|
74
|
+
headSha: string | null;
|
|
75
|
+
originSha: string | null;
|
|
76
|
+
syncState: import("./types").WorkspaceSyncState;
|
|
77
|
+
availability: "available" | "unavailable";
|
|
78
|
+
lastCheckpointId: string | null;
|
|
79
|
+
lastDurableCommitSha: string | null;
|
|
80
|
+
lastPushedAt: string | null;
|
|
81
|
+
dirtySince: string | null;
|
|
82
|
+
checkpointStatus: import("./types").CheckpointStatus | null;
|
|
83
|
+
checkpointError: string | null;
|
|
84
|
+
lastSnapshotAt: string | null;
|
|
85
|
+
latestCheckpoint: {
|
|
86
|
+
id: string;
|
|
87
|
+
business_id: string;
|
|
88
|
+
session_id: string;
|
|
89
|
+
sequence: number;
|
|
90
|
+
trigger: CheckpointTrigger;
|
|
91
|
+
status: import("./types").CheckpointStatus;
|
|
92
|
+
context_status: import("./types").CheckpointContextStatus;
|
|
93
|
+
base_sha: string | null;
|
|
94
|
+
commit_sha: string | null;
|
|
95
|
+
verified_remote_sha: string | null;
|
|
96
|
+
raw_opencode_message_id: string | null;
|
|
97
|
+
opencode_snapshot_key: string | null;
|
|
98
|
+
workspace_backup_key: string | null;
|
|
99
|
+
file_count: number;
|
|
100
|
+
additions: number;
|
|
101
|
+
deletions: number;
|
|
102
|
+
summary: string | null;
|
|
103
|
+
error_stage: string | null;
|
|
104
|
+
error_message: string | null;
|
|
105
|
+
created_at: string;
|
|
106
|
+
committed_at: string | null;
|
|
107
|
+
pushed_at: string | null;
|
|
108
|
+
context_snapshotted_at: string | null;
|
|
109
|
+
pinned: number;
|
|
110
|
+
} | null;
|
|
111
|
+
} | null;
|
|
112
|
+
checkpoints: {
|
|
113
|
+
id: string;
|
|
114
|
+
business_id: string;
|
|
115
|
+
session_id: string;
|
|
116
|
+
sequence: number;
|
|
117
|
+
trigger: CheckpointTrigger;
|
|
118
|
+
status: import("./types").CheckpointStatus;
|
|
119
|
+
context_status: import("./types").CheckpointContextStatus;
|
|
120
|
+
base_sha: string | null;
|
|
121
|
+
commit_sha: string | null;
|
|
122
|
+
verified_remote_sha: string | null;
|
|
123
|
+
raw_opencode_message_id: string | null;
|
|
124
|
+
opencode_snapshot_key: string | null;
|
|
125
|
+
workspace_backup_key: string | null;
|
|
126
|
+
file_count: number;
|
|
127
|
+
additions: number;
|
|
128
|
+
deletions: number;
|
|
129
|
+
summary: string | null;
|
|
130
|
+
error_stage: string | null;
|
|
131
|
+
error_message: string | null;
|
|
132
|
+
created_at: string;
|
|
133
|
+
committed_at: string | null;
|
|
134
|
+
pushed_at: string | null;
|
|
135
|
+
context_snapshotted_at: string | null;
|
|
136
|
+
pinned: number;
|
|
137
|
+
}[];
|
|
138
|
+
checkpointBusy: boolean;
|
|
55
139
|
busy: boolean;
|
|
56
140
|
statusText: string;
|
|
57
141
|
activeReleaseId: string | null;
|
|
@@ -59,6 +143,7 @@ export declare function useProject(): {
|
|
|
59
143
|
latestRelease: {
|
|
60
144
|
id: string;
|
|
61
145
|
source_commit_sha: string;
|
|
146
|
+
checkpoint_id: string | null;
|
|
62
147
|
created_from_session_id: string | null;
|
|
63
148
|
session_title: string | null;
|
|
64
149
|
status: "draft" | "preview" | "published" | "rolled_back";
|
|
@@ -88,21 +173,40 @@ export declare function useProject(): {
|
|
|
88
173
|
sessionId: string;
|
|
89
174
|
previewUrl: string;
|
|
90
175
|
}>;
|
|
91
|
-
sessionChanges: (sessionId: string) => Promise<SessionChangesSummary>;
|
|
176
|
+
sessionChanges: (sessionId: string, refreshRemote?: boolean) => Promise<SessionChangesSummary>;
|
|
177
|
+
refreshWorkspaceState: (sessionId: string, refreshRemote?: boolean) => Promise<SessionChangesSummary>;
|
|
178
|
+
refreshCheckpoints: (sessionId: string) => Promise<SessionCheckpoint[]>;
|
|
179
|
+
checkpointSession: (sessionId: string, options?: {
|
|
180
|
+
trigger?: CheckpointTrigger;
|
|
181
|
+
idempotencyKey?: string;
|
|
182
|
+
rawOpencodeMessageId?: string;
|
|
183
|
+
summary?: string;
|
|
184
|
+
}) => Promise<{
|
|
185
|
+
checkpoint: SessionCheckpoint;
|
|
186
|
+
sourceCommitSha: string;
|
|
187
|
+
reused: boolean;
|
|
188
|
+
}>;
|
|
189
|
+
restoreCheckpoint: (sessionId: string, checkpointId: string) => Promise<{
|
|
190
|
+
checkpoint: SessionCheckpoint;
|
|
191
|
+
sourceCommitSha: string;
|
|
192
|
+
}>;
|
|
92
193
|
resumeSession: (sessionId: string) => Promise<{
|
|
93
194
|
sessionId: string;
|
|
94
195
|
previewUrl: string;
|
|
95
196
|
}>;
|
|
96
197
|
renameSession: (sessionId: string, title: string) => Promise<void>;
|
|
97
198
|
commitSession: (sessionId: string) => Promise<{
|
|
199
|
+
checkpoint: SessionCheckpoint;
|
|
98
200
|
sourceCommitSha: string;
|
|
201
|
+
reused: boolean;
|
|
99
202
|
}>;
|
|
100
|
-
createRelease: (
|
|
203
|
+
createRelease: (checkpointId: string, sessionId?: string) => Promise<{
|
|
101
204
|
releaseId: string;
|
|
102
205
|
buildJobId: string;
|
|
103
206
|
previewUrl: string;
|
|
104
207
|
}>;
|
|
105
208
|
publish: (releaseId?: string | null) => Promise<void>;
|
|
209
|
+
rollbackToRelease: (releaseId: string) => Promise<void>;
|
|
106
210
|
rollbackToV1: () => Promise<void>;
|
|
107
211
|
};
|
|
108
212
|
export type ProjectStore = ReturnType<typeof useProject>;
|