@feedmepos/mf-miniprogram-v2 0.1.0-dev.3 → 0.1.0-dev.30

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 (31) hide show
  1. package/dist/ControlPlaneView-BR5SKjnN.js +13403 -0
  2. package/dist/app.js +1 -1
  3. package/dist/package.json +4 -2
  4. package/dist/src/api/controlPlane.d.ts +3 -1
  5. package/dist/src/components/AnnotationColorField.vue.d.ts +14 -0
  6. package/dist/src/components/AnnotationMessage.vue.d.ts +7 -0
  7. package/dist/src/components/AnnotationPropertyPanel.vue.d.ts +32 -0
  8. package/dist/src/components/AnnotationStyleControl.vue.d.ts +14 -0
  9. package/dist/src/components/BrandKitPanel.vue.d.ts +9 -0
  10. package/dist/src/components/BrandKitProposalCard.vue.d.ts +7 -0
  11. package/dist/src/components/ChatTextPart.vue.d.ts +6 -0
  12. package/dist/src/components/DiffCard.vue.d.ts +9 -0
  13. package/dist/src/components/MarkdownContent.vue.d.ts +6 -0
  14. package/dist/src/components/MessageItem.vue.d.ts +7 -1
  15. package/dist/src/components/StatusBadge.vue.d.ts +21 -0
  16. package/dist/src/components/ToolCallGroup.vue.d.ts +11 -0
  17. package/dist/src/composables/annotationEditing.d.ts +130 -0
  18. package/dist/src/composables/brandkitProposal.d.ts +14 -0
  19. package/dist/src/composables/imageAttachments.d.ts +23 -0
  20. package/dist/src/composables/localPreference.d.ts +10 -0
  21. package/dist/src/composables/previewAnnotations.d.ts +23 -0
  22. package/dist/src/composables/promptQueue.d.ts +20 -0
  23. package/dist/src/composables/status.d.ts +11 -0
  24. package/dist/src/composables/types.d.ts +124 -4
  25. package/dist/src/composables/useBrandKit.d.ts +45 -0
  26. package/dist/src/composables/useChat.d.ts +140 -2
  27. package/dist/src/composables/useIdleSuspend.d.ts +6 -0
  28. package/dist/src/composables/useProject.d.ts +110 -30
  29. package/dist/style.css +1 -1
  30. package/package.json +4 -2
  31. package/dist/ControlPlaneView-DzD3SfCY.js +0 -9484
@@ -0,0 +1,45 @@
1
+ export interface BrandKitField {
2
+ path: string;
3
+ label: string;
4
+ group: string;
5
+ hint?: string;
6
+ }
7
+ export declare const COLOR_FIELDS: BrandKitField[];
8
+ export declare const FONT_FIELDS: BrandKitField[];
9
+ export declare function isHexColor(value: string): boolean;
10
+ export declare function toInputHex(value: string): string;
11
+ type KitObject = Record<string, unknown>;
12
+ declare function load(force?: boolean): Promise<void>;
13
+ declare function save(): Promise<void>;
14
+ declare function revertLastSave(): Promise<void>;
15
+ declare function applyProposal(proposal: {
16
+ name?: string;
17
+ colors: Record<string, string>;
18
+ fonts: Record<string, string>;
19
+ }): Promise<void>;
20
+ declare function discardEdits(): void;
21
+ export declare function useBrandKit(): {
22
+ state: {
23
+ panelOpen: boolean;
24
+ loading: boolean;
25
+ saving: boolean;
26
+ loaded: boolean;
27
+ error: string | null;
28
+ businessId: string | null;
29
+ colors: Record<string, string>;
30
+ fonts: Record<string, string>;
31
+ savedColors: Record<string, string>;
32
+ savedFonts: Record<string, string>;
33
+ revertKit: KitObject | null;
34
+ appliedProposal: string | null;
35
+ };
36
+ dirtyCount: import("vue").ComputedRef<number>;
37
+ hasInvalidColor: import("vue").ComputedRef<boolean>;
38
+ load: typeof load;
39
+ save: typeof save;
40
+ revertLastSave: typeof revertLastSave;
41
+ applyProposal: typeof applyProposal;
42
+ discardEdits: typeof discardEdits;
43
+ };
44
+ export type BrandKitStore = ReturnType<typeof useBrandKit>;
45
+ export {};
@@ -1,15 +1,147 @@
1
- import type { ChatMessage, ConnectionStatus } from './types';
1
+ import type { ChatMessage, ConnectionStatus, OutgoingAttachment } from './types';
2
2
  export declare function useChat(): {
3
3
  status: ConnectionStatus;
4
4
  statusText: string;
5
5
  previewUrl: string | null;
6
+ restartingPreview: boolean;
7
+ previewRestartError: string | null;
6
8
  sending: boolean;
9
+ agentBusy: boolean;
7
10
  sessionId: string | null;
8
11
  workspaceSessionId: string | null;
12
+ businessId: string | null;
9
13
  readOnly: boolean;
10
14
  disconnected: boolean;
15
+ checkpointRevision: number;
16
+ checkpointError: string | null;
17
+ checkpointSaving: boolean;
18
+ canUnrevert: boolean;
11
19
  messagesOrder: string[];
12
20
  messagesByKey: Record<string, ChatMessage>;
21
+ queuedMessages: {
22
+ key: string;
23
+ id: string | null;
24
+ role: "user" | "assistant";
25
+ parentId: string | null;
26
+ createdAt: number;
27
+ parts: ({
28
+ kind: "text";
29
+ id: string;
30
+ text: string;
31
+ } | {
32
+ kind: "reasoning";
33
+ id: string;
34
+ text: string;
35
+ } | {
36
+ kind: "tool";
37
+ id: string;
38
+ tool: string;
39
+ state: {
40
+ status: "pending";
41
+ input: {
42
+ [key: string]: unknown;
43
+ };
44
+ raw: string;
45
+ } | {
46
+ status: "running";
47
+ input: {
48
+ [key: string]: unknown;
49
+ };
50
+ title?: string | undefined;
51
+ metadata?: {
52
+ [key: string]: unknown;
53
+ } | undefined;
54
+ time: {
55
+ start: number;
56
+ };
57
+ } | {
58
+ status: "completed";
59
+ input: {
60
+ [key: string]: unknown;
61
+ };
62
+ output: string;
63
+ title: string;
64
+ metadata: {
65
+ [key: string]: unknown;
66
+ };
67
+ time: {
68
+ start: number;
69
+ end: number;
70
+ compacted?: number | undefined;
71
+ };
72
+ attachments?: {
73
+ id: string;
74
+ sessionID: string;
75
+ messageID: string;
76
+ type: "file";
77
+ mime: string;
78
+ filename?: string | undefined;
79
+ url: string;
80
+ source?: {
81
+ text: {
82
+ value: string;
83
+ start: number;
84
+ end: number;
85
+ };
86
+ type: "file";
87
+ path: string;
88
+ } | {
89
+ text: {
90
+ value: string;
91
+ start: number;
92
+ end: number;
93
+ };
94
+ type: "symbol";
95
+ path: string;
96
+ range: {
97
+ start: {
98
+ line: number;
99
+ character: number;
100
+ };
101
+ end: {
102
+ line: number;
103
+ character: number;
104
+ };
105
+ };
106
+ name: string;
107
+ kind: number;
108
+ } | undefined;
109
+ }[] | undefined;
110
+ } | {
111
+ status: "error";
112
+ input: {
113
+ [key: string]: unknown;
114
+ };
115
+ error: string;
116
+ metadata?: {
117
+ [key: string]: unknown;
118
+ } | undefined;
119
+ time: {
120
+ start: number;
121
+ end: number;
122
+ };
123
+ };
124
+ } | {
125
+ kind: "file";
126
+ id: string;
127
+ mime: string;
128
+ filename?: string | undefined;
129
+ url: string;
130
+ })[];
131
+ changedFiles: string[];
132
+ diffs: {
133
+ file: string;
134
+ patch?: string | undefined;
135
+ status?: "added" | "deleted" | "modified" | undefined;
136
+ before?: string | undefined;
137
+ after?: string | undefined;
138
+ additions: number;
139
+ deletions: number;
140
+ }[];
141
+ busy: boolean;
142
+ promptState?: import("./types").PromptState | undefined;
143
+ errorText?: string | undefined;
144
+ }[];
13
145
  revision: number;
14
146
  init: (options?: {
15
147
  businessId?: string;
@@ -17,6 +149,12 @@ export declare function useChat(): {
17
149
  readOnly?: boolean;
18
150
  }) => Promise<void>;
19
151
  reset: (message?: string) => void;
20
- sendMessage: (text: string) => Promise<void>;
152
+ suspend: (message?: string) => void;
153
+ sendMessage: (text: string, attachments?: OutgoingAttachment[]) => boolean;
154
+ abort: () => Promise<void>;
155
+ revertTurn: (rawOpencodeMessageId: string) => Promise<boolean>;
156
+ unrevertTurn: () => Promise<boolean>;
157
+ reportCheckpointResult: (error?: string | null) => void;
158
+ restartPreviewServer: () => Promise<boolean>;
21
159
  };
22
160
  export type ChatStore = ReturnType<typeof useChat>;
@@ -0,0 +1,6 @@
1
+ export declare function useIdleSuspend(options: {
2
+ timeoutMs: number;
3
+ isEligible: () => boolean;
4
+ isActive: () => boolean;
5
+ onSuspend: () => void;
6
+ }): void;
@@ -1,4 +1,4 @@
1
- import type { ProjectSummary, ReleaseSummary } 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,14 +60,90 @@ 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;
58
142
  activeReleasePreviewUrl: string | null;
59
- activeBuildJobId: string | null;
60
143
  latestRelease: {
61
144
  id: string;
62
145
  source_commit_sha: string;
146
+ checkpoint_id: string | null;
63
147
  created_from_session_id: string | null;
64
148
  session_title: string | null;
65
149
  status: "draft" | "preview" | "published" | "rolled_back";
@@ -73,26 +157,7 @@ export declare function useProject(): {
73
157
  build_created_at: string | null;
74
158
  build_completed_at: string | null;
75
159
  } | null;
76
- activeRelease: {
77
- id: string;
78
- source_commit_sha: string;
79
- created_from_session_id: string | null;
80
- session_title: string | null;
81
- status: "draft" | "preview" | "published" | "rolled_back";
82
- artifact_prefix: string;
83
- created_at: string;
84
- published_at: string | null;
85
- is_live: 0 | 1;
86
- build_job_id: string | null;
87
- build_status: "queued" | "running" | "succeeded" | "failed" | null;
88
- build_logs_url: string | null;
89
- build_created_at: string | null;
90
- build_completed_at: string | null;
91
- } | null;
92
- activeBuildStatus: "failed" | "queued" | "running" | "succeeded" | null;
93
- activeBuildLogsUrl: string | null;
94
160
  isProvisioned: boolean;
95
- isProvisioning: boolean;
96
161
  provisioningFailed: boolean;
97
162
  syncBusiness: () => void;
98
163
  refreshProject: () => Promise<ProjectSummary>;
@@ -102,31 +167,46 @@ export declare function useProject(): {
102
167
  releases: ReleaseSummary[];
103
168
  }>;
104
169
  selectRelease: (releaseId: string) => Promise<void>;
105
- createSession: () => Promise<{
170
+ createSession: (options?: {
171
+ archiveCodeAction?: ArchiveCodeAction;
172
+ }) => Promise<{
106
173
  sessionId: string;
107
174
  previewUrl: string;
108
175
  }>;
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
+ }>;
109
193
  resumeSession: (sessionId: string) => Promise<{
110
194
  sessionId: string;
111
195
  previewUrl: string;
112
196
  }>;
113
197
  renameSession: (sessionId: string, title: string) => Promise<void>;
114
- forkSession: (sessionId: string) => Promise<{
115
- sessionId: string;
116
- previewUrl: string;
117
- forkedFrom: string;
118
- }>;
119
- archive: (sessionId: string) => Promise<void>;
120
198
  commitSession: (sessionId: string) => Promise<{
199
+ checkpoint: SessionCheckpoint;
121
200
  sourceCommitSha: string;
201
+ reused: boolean;
122
202
  }>;
123
- createRelease: (sourceCommitSha: string, sessionId?: string) => Promise<{
203
+ createRelease: (checkpointId: string, sessionId?: string) => Promise<{
124
204
  releaseId: string;
125
205
  buildJobId: string;
126
206
  previewUrl: string;
127
207
  }>;
128
208
  publish: (releaseId?: string | null) => Promise<void>;
129
- rollbackToV1: () => Promise<void>;
130
209
  rollbackToRelease: (releaseId: string) => Promise<void>;
210
+ rollbackToV1: () => Promise<void>;
131
211
  };
132
212
  export type ProjectStore = ReturnType<typeof useProject>;