@feedmepos/mf-miniprogram-v2 0.1.0-dev.4 → 0.1.0-dev.40

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 (36) hide show
  1. package/dist/ControlPlaneView-DcNJs7QW.js +19228 -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 +8 -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/QuestionPrompt.vue.d.ts +16 -0
  16. package/dist/src/components/StatusBadge.vue.d.ts +21 -0
  17. package/dist/src/components/ToolCallGroup.vue.d.ts +11 -0
  18. package/dist/src/composables/annotationEditing.d.ts +130 -0
  19. package/dist/src/composables/annotationTray.d.ts +73 -0
  20. package/dist/src/composables/brandkitProposal.d.ts +14 -0
  21. package/dist/src/composables/imageAttachments.d.ts +23 -0
  22. package/dist/src/composables/latestPoller.d.ts +14 -0
  23. package/dist/src/composables/localPreference.d.ts +10 -0
  24. package/dist/src/composables/previewAnnotations.d.ts +38 -0
  25. package/dist/src/composables/promptQueue.d.ts +20 -0
  26. package/dist/src/composables/questionAnswers.d.ts +4 -0
  27. package/dist/src/composables/status.d.ts +11 -0
  28. package/dist/src/composables/types.d.ts +109 -4
  29. package/dist/src/composables/useAgentBridge.d.ts +35 -0
  30. package/dist/src/composables/useBrandKit.d.ts +45 -0
  31. package/dist/src/composables/useChat.d.ts +181 -2
  32. package/dist/src/composables/useIdleSuspend.d.ts +6 -0
  33. package/dist/src/composables/useProject.d.ts +108 -26
  34. package/dist/style.css +1 -1
  35. package/package.json +4 -2
  36. package/dist/ControlPlaneView-CYpEC-C4.js +0 -9487
@@ -1,4 +1,16 @@
1
1
  import type { ToolState } from '@opencode-ai/sdk';
2
+ /** OpenCode 1.17.14's server emits a unified `patch`, while the generated SDK
3
+ * still declares the older `before`/`after` shape. Keep both so current and
4
+ * already-archived sessions render through the same UI. */
5
+ export interface CodeFileDiff {
6
+ file: string;
7
+ patch?: string;
8
+ status?: 'added' | 'deleted' | 'modified';
9
+ before?: string;
10
+ after?: string;
11
+ additions: number;
12
+ deletions: number;
13
+ }
2
14
  export type ChatPart = {
3
15
  kind: 'text';
4
16
  id: string;
@@ -12,23 +24,72 @@ export type ChatPart = {
12
24
  id: string;
13
25
  tool: string;
14
26
  state: ToolState;
27
+ } | {
28
+ kind: 'file';
29
+ id: string;
30
+ mime: string;
31
+ filename?: string;
32
+ url: string;
15
33
  };
34
+ /** An image attached to an outgoing prompt. `url` is a data: URI so the file
35
+ * rides inline in the OpenCode prompt JSON through the transparent proxy. */
36
+ export interface OutgoingAttachment {
37
+ mime: string;
38
+ filename?: string;
39
+ url: string;
40
+ }
41
+ export interface PreviewBridgeElement {
42
+ tag: string;
43
+ selector: string;
44
+ text: string;
45
+ nearbyText?: string;
46
+ attrs: Record<string, string>;
47
+ rect: {
48
+ x: number;
49
+ y: number;
50
+ width: number;
51
+ height: number;
52
+ };
53
+ computed: Record<string, string>;
54
+ canEditText?: boolean;
55
+ sourceInspector?: {
56
+ file: string;
57
+ line: number;
58
+ column: number;
59
+ } | null;
60
+ sourceInspectorRaw?: string | null;
61
+ }
62
+ export type PromptState = 'queued' | 'submitting' | 'running' | 'failed';
16
63
  export interface ChatMessage {
17
- /** Stable render key. Starts as `local-{partId}` for our own just-sent
18
- * messages (the real message id isn't known until the server echoes it
19
- * back over the event stream) and never changes after that, so v-for
20
- * keys stay stable even once `id` is reconciled to the real one. */
64
+ /** Stable render key. Starts as `local-{uuid}` for queued prompts and never
65
+ * changes; the OpenCode message id is assigned only when that prompt reaches
66
+ * the head of the FIFO, so v-for identity remains stable after dispatch. */
21
67
  key: string;
22
68
  id: string | null;
23
69
  role: 'user' | 'assistant';
70
+ /** Assistant messages point back to the user turn that spawned them. OpenCode
71
+ * stores the turn's final file diff on that user message, so this relation
72
+ * lets the UI render it beside the agent work that produced it. */
73
+ parentId: string | null;
24
74
  createdAt: number;
25
75
  parts: ChatPart[];
76
+ /** Patch parts arrive before the complete before/after diff is summarized.
77
+ * Keep their file names so the UI can show useful live progress. */
78
+ changedFiles: string[];
79
+ diffs: CodeFileDiff[];
26
80
  busy: boolean;
81
+ /** Present only on locally-originated user prompts while they are waiting
82
+ * for, or being handled by, the OpenCode session runner. */
83
+ promptState?: PromptState;
27
84
  errorText?: string;
28
85
  }
29
86
  export type ConnectionStatus = 'idle' | 'starting' | 'ready' | 'error';
30
87
  export type ProjectProvisioningStatus = 'not_started' | 'provisioning' | 'ready' | 'failed';
31
88
  export type ArchiveCodeAction = 'save' | 'discard';
89
+ export type CheckpointTrigger = 'manual' | 'turn_completed' | 'interval' | 'archive' | 'pre_restore' | 'pre_discard' | 'turn_revert' | 'turn_unrevert' | 'restore' | 'release';
90
+ export type CheckpointStatus = 'capturing' | 'local_only' | 'pushed_verified' | 'failed';
91
+ export type CheckpointContextStatus = 'pending' | 'snapshotted' | 'failed' | 'unavailable';
92
+ export type WorkspaceSyncState = 'unavailable' | 'diverged' | 'behind' | 'uncommitted' | 'unpushed' | 'saving' | 'save_failed' | 'synced' | 'unknown';
32
93
  export interface ProjectSummary {
33
94
  businessId: string;
34
95
  businessSlug: string | null;
@@ -57,6 +118,13 @@ export interface AgentSessionSummary {
57
118
  archived_at: string | null;
58
119
  last_event_chunk: number;
59
120
  last_snapshot_at: string | null;
121
+ base_commit_sha: string | null;
122
+ last_checkpoint_id: string | null;
123
+ last_durable_commit_sha: string | null;
124
+ last_pushed_at: string | null;
125
+ dirty_since: string | null;
126
+ checkpoint_status: CheckpointStatus | null;
127
+ checkpoint_error: string | null;
60
128
  attention_action?: string | null;
61
129
  attention_error?: string | null;
62
130
  release_count: number;
@@ -77,10 +145,47 @@ export interface SessionChangesSummary {
77
145
  commitsBehindOrigin: number;
78
146
  headSha: string | null;
79
147
  originSha: string | null;
148
+ syncState: WorkspaceSyncState;
149
+ availability: 'available' | 'unavailable';
150
+ lastCheckpointId: string | null;
151
+ lastDurableCommitSha: string | null;
152
+ lastPushedAt: string | null;
153
+ dirtySince: string | null;
154
+ checkpointStatus: CheckpointStatus | null;
155
+ checkpointError: string | null;
156
+ lastSnapshotAt: string | null;
157
+ latestCheckpoint: SessionCheckpoint | null;
158
+ }
159
+ export interface SessionCheckpoint {
160
+ id: string;
161
+ business_id: string;
162
+ session_id: string;
163
+ sequence: number;
164
+ trigger: CheckpointTrigger;
165
+ status: CheckpointStatus;
166
+ context_status: CheckpointContextStatus;
167
+ base_sha: string | null;
168
+ commit_sha: string | null;
169
+ verified_remote_sha: string | null;
170
+ raw_opencode_message_id: string | null;
171
+ opencode_snapshot_key: string | null;
172
+ workspace_backup_key: string | null;
173
+ file_count: number;
174
+ additions: number;
175
+ deletions: number;
176
+ summary: string | null;
177
+ error_stage: string | null;
178
+ error_message: string | null;
179
+ created_at: string;
180
+ committed_at: string | null;
181
+ pushed_at: string | null;
182
+ context_snapshotted_at: string | null;
183
+ pinned: number;
80
184
  }
81
185
  export interface ReleaseSummary {
82
186
  id: string;
83
187
  source_commit_sha: string;
188
+ checkpoint_id: string | null;
84
189
  created_from_session_id: string | null;
85
190
  session_title: string | null;
86
191
  status: 'draft' | 'preview' | 'published' | 'rolled_back';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Presence + command channel for the agent's preview tools.
3
+ *
4
+ * The agent cannot see a rendered SPA from inside its sandbox, so its
5
+ * preview_* tools are executed by a browser: the control plane pushes the
6
+ * command down this WebSocket and this tab relays it into the preview iframe.
7
+ *
8
+ * Several tabs can watch one session. Exactly one of them holds control and is
9
+ * the only one the agent ever drives — fanning a click out to every open tab
10
+ * would both duplicate the action and race the answers back. Control follows
11
+ * the conversation: sending a prompt moves it to the tab that sent it (see
12
+ * useChat.sendMessage), which is why there is no manual takeover control.
13
+ *
14
+ * The server owns the election; this composable only reflects it. It is a
15
+ * module-level singleton because two consumers need the same socket — the
16
+ * preview panel, which executes commands against its iframe, and the chat send
17
+ * path, which claims control — and only one workspace is ever open per page.
18
+ */
19
+ export type AgentBridgePresence = {
20
+ clientCount: number;
21
+ controllerId: string | null;
22
+ };
23
+ /** Runs one command against this tab's preview iframe. */
24
+ export type AgentCommandExecutor = (command: string, args: Record<string, unknown>) => Promise<unknown>;
25
+ export declare function useAgentBridge(): {
26
+ connected: import("vue").Ref<boolean, boolean>;
27
+ isController: import("vue").Ref<boolean, boolean>;
28
+ clientCount: import("vue").Ref<number, number>;
29
+ lastError: import("vue").Ref<string | null, string | null>;
30
+ attach: (businessId: string, sessionId: string) => Promise<void>;
31
+ detach: () => void;
32
+ setExecutor: (fn: AgentCommandExecutor | null) => void;
33
+ takeControl: () => boolean;
34
+ };
35
+ export type AgentBridgeStore = ReturnType<typeof useAgentBridge>;
@@ -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,186 @@
1
- import type { ChatMessage, ConnectionStatus } from './types';
1
+ import { type QuestionAnswer } from '@opencode-ai/sdk/v2/client';
2
+ import type { ChatMessage, ConnectionStatus, OutgoingAttachment } from './types';
2
3
  export declare function useChat(): {
3
4
  status: ConnectionStatus;
4
5
  statusText: string;
5
6
  previewUrl: string | null;
7
+ restartingPreview: boolean;
8
+ previewRestartError: string | null;
6
9
  sending: boolean;
10
+ agentBusy: boolean;
7
11
  sessionId: string | null;
8
12
  workspaceSessionId: string | null;
13
+ businessId: string | null;
9
14
  readOnly: boolean;
10
15
  disconnected: boolean;
16
+ checkpointRevision: number;
17
+ checkpointError: string | null;
18
+ checkpointSaving: boolean;
19
+ canUnrevert: boolean;
20
+ pendingQuestions: {
21
+ id: string;
22
+ sessionID: string;
23
+ questions: {
24
+ question: string;
25
+ header: string;
26
+ options: {
27
+ label: string;
28
+ description: string;
29
+ }[];
30
+ multiple?: boolean | undefined;
31
+ custom?: boolean | undefined;
32
+ }[];
33
+ tool?: {
34
+ messageID: string;
35
+ callID: string;
36
+ } | undefined;
37
+ }[];
38
+ activeQuestion: {
39
+ id: string;
40
+ sessionID: string;
41
+ questions: {
42
+ question: string;
43
+ header: string;
44
+ options: {
45
+ label: string;
46
+ description: string;
47
+ }[];
48
+ multiple?: boolean | undefined;
49
+ custom?: boolean | undefined;
50
+ }[];
51
+ tool?: {
52
+ messageID: string;
53
+ callID: string;
54
+ } | undefined;
55
+ } | null;
56
+ answeringQuestionId: string | null;
57
+ questionError: string | null;
11
58
  messagesOrder: string[];
12
59
  messagesByKey: Record<string, ChatMessage>;
60
+ queuedMessages: {
61
+ key: string;
62
+ id: string | null;
63
+ role: "user" | "assistant";
64
+ parentId: string | null;
65
+ createdAt: number;
66
+ parts: ({
67
+ kind: "text";
68
+ id: string;
69
+ text: string;
70
+ } | {
71
+ kind: "reasoning";
72
+ id: string;
73
+ text: string;
74
+ } | {
75
+ kind: "tool";
76
+ id: string;
77
+ tool: string;
78
+ state: {
79
+ status: "pending";
80
+ input: {
81
+ [key: string]: unknown;
82
+ };
83
+ raw: string;
84
+ } | {
85
+ status: "running";
86
+ input: {
87
+ [key: string]: unknown;
88
+ };
89
+ title?: string | undefined;
90
+ metadata?: {
91
+ [key: string]: unknown;
92
+ } | undefined;
93
+ time: {
94
+ start: number;
95
+ };
96
+ } | {
97
+ status: "completed";
98
+ input: {
99
+ [key: string]: unknown;
100
+ };
101
+ output: string;
102
+ title: string;
103
+ metadata: {
104
+ [key: string]: unknown;
105
+ };
106
+ time: {
107
+ start: number;
108
+ end: number;
109
+ compacted?: number | undefined;
110
+ };
111
+ attachments?: {
112
+ id: string;
113
+ sessionID: string;
114
+ messageID: string;
115
+ type: "file";
116
+ mime: string;
117
+ filename?: string | undefined;
118
+ url: string;
119
+ source?: {
120
+ text: {
121
+ value: string;
122
+ start: number;
123
+ end: number;
124
+ };
125
+ type: "file";
126
+ path: string;
127
+ } | {
128
+ text: {
129
+ value: string;
130
+ start: number;
131
+ end: number;
132
+ };
133
+ type: "symbol";
134
+ path: string;
135
+ range: {
136
+ start: {
137
+ line: number;
138
+ character: number;
139
+ };
140
+ end: {
141
+ line: number;
142
+ character: number;
143
+ };
144
+ };
145
+ name: string;
146
+ kind: number;
147
+ } | undefined;
148
+ }[] | undefined;
149
+ } | {
150
+ status: "error";
151
+ input: {
152
+ [key: string]: unknown;
153
+ };
154
+ error: string;
155
+ metadata?: {
156
+ [key: string]: unknown;
157
+ } | undefined;
158
+ time: {
159
+ start: number;
160
+ end: number;
161
+ };
162
+ };
163
+ } | {
164
+ kind: "file";
165
+ id: string;
166
+ mime: string;
167
+ filename?: string | undefined;
168
+ url: string;
169
+ })[];
170
+ changedFiles: string[];
171
+ diffs: {
172
+ file: string;
173
+ patch?: string | undefined;
174
+ status?: "added" | "deleted" | "modified" | undefined;
175
+ before?: string | undefined;
176
+ after?: string | undefined;
177
+ additions: number;
178
+ deletions: number;
179
+ }[];
180
+ busy: boolean;
181
+ promptState?: import("./types").PromptState | undefined;
182
+ errorText?: string | undefined;
183
+ }[];
13
184
  revision: number;
14
185
  init: (options?: {
15
186
  businessId?: string;
@@ -17,6 +188,14 @@ export declare function useChat(): {
17
188
  readOnly?: boolean;
18
189
  }) => Promise<void>;
19
190
  reset: (message?: string) => void;
20
- sendMessage: (text: string) => Promise<void>;
191
+ suspend: (message?: string) => void;
192
+ sendMessage: (text: string, attachments?: OutgoingAttachment[]) => boolean;
193
+ abort: () => Promise<void>;
194
+ answerQuestion: (requestID: string, answers: QuestionAnswer[]) => Promise<boolean>;
195
+ rejectQuestion: (requestID: string) => Promise<boolean>;
196
+ revertTurn: (rawOpencodeMessageId: string) => Promise<boolean>;
197
+ unrevertTurn: () => Promise<boolean>;
198
+ reportCheckpointResult: (error?: string | null) => void;
199
+ restartPreviewServer: () => Promise<boolean>;
21
200
  };
22
201
  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 { 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,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,32 +157,13 @@ 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>;
99
164
  provisionProject: () => Promise<ProjectSummary>;
100
165
  refreshSessions: () => Promise<void>;
101
- refreshReleases: () => Promise<{
166
+ refreshReleases: (signal?: AbortSignal) => Promise<{
102
167
  releases: ReleaseSummary[];
103
168
  }>;
104
169
  selectRelease: (releaseId: string) => Promise<void>;
@@ -108,23 +173,40 @@ export declare function useProject(): {
108
173
  sessionId: string;
109
174
  previewUrl: string;
110
175
  }>;
111
- 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
+ }>;
112
193
  resumeSession: (sessionId: string) => Promise<{
113
194
  sessionId: string;
114
195
  previewUrl: string;
115
196
  }>;
116
197
  renameSession: (sessionId: string, title: string) => Promise<void>;
117
- archive: (sessionId: string, codeAction?: ArchiveCodeAction) => Promise<void>;
118
198
  commitSession: (sessionId: string) => Promise<{
199
+ checkpoint: SessionCheckpoint;
119
200
  sourceCommitSha: string;
201
+ reused: boolean;
120
202
  }>;
121
- createRelease: (sourceCommitSha: string, sessionId?: string) => Promise<{
203
+ createRelease: (checkpointId: string, sessionId?: string) => Promise<{
122
204
  releaseId: string;
123
205
  buildJobId: string;
124
206
  previewUrl: string;
125
207
  }>;
126
208
  publish: (releaseId?: string | null) => Promise<void>;
127
- rollbackToV1: () => Promise<void>;
128
209
  rollbackToRelease: (releaseId: string) => Promise<void>;
210
+ rollbackToV1: () => Promise<void>;
129
211
  };
130
212
  export type ProjectStore = ReturnType<typeof useProject>;