@feedmepos/mf-miniprogram-v2 0.1.0-dev.0

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.
@@ -0,0 +1,9 @@
1
+ const s = (t, r) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [c, e] of r)
4
+ o[c] = e;
5
+ return o;
6
+ };
7
+ export {
8
+ s as _
9
+ };
package/dist/app.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type { DefineComponent } from 'vue';
2
+
3
+ export { routes } from './src/router/shared';
4
+ export declare const i18nMessages: Record<string, never>;
5
+ export declare const FmApp: DefineComponent;
package/dist/app.js ADDED
@@ -0,0 +1,17 @@
1
+ import { defineAsyncComponent as o } from "vue";
2
+ const n = [
3
+ {
4
+ path: "/",
5
+ name: "miniprogram-v2-control",
6
+ component: () => import("./ControlPlaneView-DUEDpmae.js")
7
+ },
8
+ {
9
+ path: "/:pathMatch(.*)*",
10
+ redirect: { name: "miniprogram-v2-control" }
11
+ }
12
+ ], r = {}, m = o(() => import("./App-CaNGbhK8.js"));
13
+ export {
14
+ m as FmApp,
15
+ r as i18nMessages,
16
+ n as routes
17
+ };
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@feedmepos/mf-miniprogram-v2",
3
+ "version": "0.1.0-dev.0",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "access": "public",
7
+ "registry": "https://registry.npmjs.org/"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "module": "./dist/app.js",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/app.js",
16
+ "types": "./dist/app.d.ts"
17
+ },
18
+ "./style": "./dist/style.css"
19
+ },
20
+ "scripts": {
21
+ "dev": "vite --mode dev",
22
+ "prod": "vite --mode prod",
23
+ "build": "npm run type-check && npm run build-only:dev",
24
+ "build:prod": "npm run type-check && npm run build-only:prod",
25
+ "preview": "vite preview",
26
+ "type-check": "vue-tsc --build --force",
27
+ "typecheck": "npm run type-check",
28
+ "build:mf:dev": "vite build --mode fmmf:dev",
29
+ "build:mf:prod": "vite build --mode fmmf:prod",
30
+ "build:dts": "vue-tsc --declaration --emitDeclarationOnly --noEmit false -p tsconfig.app.json --outDir ./dist && node scripts/write-entry-dts.mjs",
31
+ "clean": "rm -rf dist node_modules/.tmp/tsconfig.app.tsbuildinfo",
32
+ "build-only:dev": "npm run clean && npm run build:mf:dev && npm run build:dts && cp package.json ./dist",
33
+ "build-only:prod": "npm run clean && npm run build:mf:prod && npm run build:dts && cp package.json ./dist",
34
+ "publish:npm": "node scripts/publish-npm.mjs",
35
+ "deploy:npm:dev": "npm run build-only:dev && npm run publish:npm -- beta",
36
+ "deploy:npm:prod": "npm run build-only:prod && npm run publish:npm -- latest"
37
+ },
38
+ "dependencies": {
39
+ "@feedmepos/mf-common": "^1.27.9",
40
+ "@feedmepos/ui-library": "1.8.4",
41
+ "@opencode-ai/sdk": "*",
42
+ "dompurify": "^3.4.11",
43
+ "highlight.js": "^11.11.1",
44
+ "marked": "^18.0.5",
45
+ "marked-highlight": "^2.2.4",
46
+ "pinia": "^2.1.7",
47
+ "vue": "^3.5.39",
48
+ "vue-router": "^4.6.4"
49
+ },
50
+ "devDependencies": {
51
+ "@tsconfig/node20": "^20.1.6",
52
+ "@vitejs/plugin-vue": "^5.0.4",
53
+ "@vue/tsconfig": "^0.8.1",
54
+ "autoprefixer": "^10.4.19",
55
+ "npm-run-all2": "^8.0.4",
56
+ "postcss": "^8.4.38",
57
+ "tailwindcss": "^3.4.3",
58
+ "typescript": "^5.9.3",
59
+ "vite": "^5.2.11",
60
+ "vite-plugin-vue-devtools": "^7.0.25",
61
+ "vue-tsc": "^3.3.6"
62
+ }
63
+ }
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type MaybeBusiness = {
2
+ _id?: string;
3
+ id?: string;
4
+ slug?: string;
5
+ name?: string;
6
+ };
7
+ export declare const DEFAULT_BUSINESS_ID = "69cde0740c0106001ca83dff";
8
+ export declare function controlPlaneBaseUrl(): string;
9
+ export declare function controlPlaneUrl(path: string): string;
10
+ export declare function currentBusiness(): MaybeBusiness | undefined;
11
+ export declare function currentBusinessId(): string;
12
+ export declare function currentBusinessLabel(): string;
13
+ export declare function currentBusinessSlug(): string | undefined;
14
+ export declare function controlPlaneAuthorizationHeader(): Promise<string | null>;
15
+ export declare function authorizedFetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
16
+ export declare function controlPlaneFetch<T>(path: string, init?: RequestInit): Promise<T>;
17
+ export {};
@@ -0,0 +1,4 @@
1
+ import './assets/main.css';
2
+ export { routes } from './router/shared';
3
+ export declare const i18nMessages: {};
4
+ export declare const FmApp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,7 @@
1
+ import type { ChatStore } from '../composables/useChat';
2
+ type __VLS_Props = {
3
+ chat: ChatStore;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { ChatMessage } from '../composables/types';
2
+ type __VLS_Props = {
3
+ message: ChatMessage;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { ChatStore } from '../composables/useChat';
2
+ type __VLS_Props = {
3
+ chat: ChatStore;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ initialTitle?: string | null;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
+ close: () => any;
6
+ submit: (title: string) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onClose?: (() => any) | undefined;
9
+ onSubmit?: ((title: string) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import type { ChatPart } from '../composables/types';
2
+ type __VLS_Props = {
3
+ part: Extract<ChatPart, {
4
+ kind: 'tool';
5
+ }>;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export declare function renderMarkdown(text: string): string;
2
+ export declare function highlightCode(code: string, lang: string): string;
@@ -0,0 +1,63 @@
1
+ import type { ToolState } from '@opencode-ai/sdk';
2
+ export type ChatPart = {
3
+ kind: 'text';
4
+ id: string;
5
+ text: string;
6
+ } | {
7
+ kind: 'reasoning';
8
+ id: string;
9
+ text: string;
10
+ } | {
11
+ kind: 'tool';
12
+ id: string;
13
+ tool: string;
14
+ state: ToolState;
15
+ };
16
+ 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. */
21
+ key: string;
22
+ id: string | null;
23
+ role: 'user' | 'assistant';
24
+ createdAt: number;
25
+ parts: ChatPart[];
26
+ busy: boolean;
27
+ errorText?: string;
28
+ }
29
+ export type ConnectionStatus = 'starting' | 'ready' | 'error';
30
+ export interface AgentSessionSummary {
31
+ id: string;
32
+ title: string | null;
33
+ forked_from: string | null;
34
+ raw_opencode_session_id: string | null;
35
+ branch_name: string;
36
+ sandbox_id: string | null;
37
+ status: 'active' | 'archived' | 'needs_attention';
38
+ archived_at: string | null;
39
+ last_event_chunk: number;
40
+ last_snapshot_at: string | null;
41
+ attention_action?: string | null;
42
+ attention_error?: string | null;
43
+ release_count: number;
44
+ has_live_release: number;
45
+ created_at: string;
46
+ updated_at: string;
47
+ }
48
+ export interface ReleaseSummary {
49
+ id: string;
50
+ source_commit_sha: string;
51
+ created_from_session_id: string | null;
52
+ session_title: string | null;
53
+ status: 'draft' | 'preview' | 'published' | 'rolled_back';
54
+ artifact_prefix: string;
55
+ created_at: string;
56
+ published_at: string | null;
57
+ is_live: 0 | 1;
58
+ build_job_id: string | null;
59
+ build_status: 'queued' | 'running' | 'succeeded' | 'failed' | null;
60
+ build_logs_url: string | null;
61
+ build_created_at: string | null;
62
+ build_completed_at: string | null;
63
+ }
@@ -0,0 +1,21 @@
1
+ import type { ChatMessage, ConnectionStatus } from './types';
2
+ export declare function useChat(): {
3
+ status: ConnectionStatus;
4
+ statusText: string;
5
+ previewUrl: string | null;
6
+ sending: boolean;
7
+ sessionId: string | null;
8
+ workspaceSessionId: string | null;
9
+ readOnly: boolean;
10
+ disconnected: boolean;
11
+ messagesOrder: string[];
12
+ messagesByKey: Record<string, ChatMessage>;
13
+ revision: number;
14
+ init: (options?: {
15
+ businessId?: string;
16
+ sessionId?: string;
17
+ readOnly?: boolean;
18
+ }) => Promise<void>;
19
+ sendMessage: (text: string) => Promise<void>;
20
+ };
21
+ export type ChatStore = ReturnType<typeof useChat>;
@@ -0,0 +1,110 @@
1
+ import type { ReleaseSummary } from './types';
2
+ export declare function useProject(): {
3
+ businessId: string;
4
+ sessions: {
5
+ id: string;
6
+ title: string | null;
7
+ forked_from: string | null;
8
+ raw_opencode_session_id: string | null;
9
+ branch_name: string;
10
+ sandbox_id: string | null;
11
+ status: "active" | "archived" | "needs_attention";
12
+ archived_at: string | null;
13
+ last_event_chunk: number;
14
+ last_snapshot_at: string | null;
15
+ attention_action?: string | null | undefined;
16
+ attention_error?: string | null | undefined;
17
+ release_count: number;
18
+ has_live_release: number;
19
+ created_at: string;
20
+ updated_at: string;
21
+ }[];
22
+ releases: {
23
+ id: string;
24
+ source_commit_sha: string;
25
+ created_from_session_id: string | null;
26
+ session_title: string | null;
27
+ status: "draft" | "preview" | "published" | "rolled_back";
28
+ artifact_prefix: string;
29
+ created_at: string;
30
+ published_at: string | null;
31
+ is_live: 0 | 1;
32
+ build_job_id: string | null;
33
+ build_status: "queued" | "running" | "succeeded" | "failed" | null;
34
+ build_logs_url: string | null;
35
+ build_created_at: string | null;
36
+ build_completed_at: string | null;
37
+ }[];
38
+ busy: boolean;
39
+ statusText: string;
40
+ activeReleaseId: string | null;
41
+ activeReleasePreviewUrl: string | null;
42
+ activeBuildJobId: string | null;
43
+ latestRelease: {
44
+ id: string;
45
+ source_commit_sha: string;
46
+ created_from_session_id: string | null;
47
+ session_title: string | null;
48
+ status: "draft" | "preview" | "published" | "rolled_back";
49
+ artifact_prefix: string;
50
+ created_at: string;
51
+ published_at: string | null;
52
+ is_live: 0 | 1;
53
+ build_job_id: string | null;
54
+ build_status: "queued" | "running" | "succeeded" | "failed" | null;
55
+ build_logs_url: string | null;
56
+ build_created_at: string | null;
57
+ build_completed_at: string | null;
58
+ } | null;
59
+ activeRelease: {
60
+ id: string;
61
+ source_commit_sha: string;
62
+ created_from_session_id: string | null;
63
+ session_title: string | null;
64
+ status: "draft" | "preview" | "published" | "rolled_back";
65
+ artifact_prefix: string;
66
+ created_at: string;
67
+ published_at: string | null;
68
+ is_live: 0 | 1;
69
+ build_job_id: string | null;
70
+ build_status: "queued" | "running" | "succeeded" | "failed" | null;
71
+ build_logs_url: string | null;
72
+ build_created_at: string | null;
73
+ build_completed_at: string | null;
74
+ } | null;
75
+ activeBuildStatus: "queued" | "running" | "succeeded" | "failed" | null;
76
+ activeBuildLogsUrl: string | null;
77
+ syncBusiness: () => void;
78
+ refreshSessions: () => Promise<void>;
79
+ refreshReleases: () => Promise<{
80
+ releases: ReleaseSummary[];
81
+ }>;
82
+ selectRelease: (releaseId: string) => Promise<void>;
83
+ createSession: () => Promise<{
84
+ sessionId: string;
85
+ previewUrl: string;
86
+ }>;
87
+ resumeSession: (sessionId: string) => Promise<{
88
+ sessionId: string;
89
+ previewUrl: string;
90
+ }>;
91
+ renameSession: (sessionId: string, title: string) => Promise<void>;
92
+ forkSession: (sessionId: string) => Promise<{
93
+ sessionId: string;
94
+ previewUrl: string;
95
+ forkedFrom: string;
96
+ }>;
97
+ archive: (sessionId: string) => Promise<void>;
98
+ commitSession: (sessionId: string) => Promise<{
99
+ sourceCommitSha: string;
100
+ }>;
101
+ createRelease: (sourceCommitSha: string, sessionId?: string) => Promise<{
102
+ releaseId: string;
103
+ buildJobId: string;
104
+ previewUrl: string;
105
+ }>;
106
+ publish: (releaseId?: string | null) => Promise<void>;
107
+ rollbackToV1: () => Promise<void>;
108
+ rollbackToRelease: (releaseId: string) => Promise<void>;
109
+ };
110
+ export type ProjectStore = ReturnType<typeof useProject>;
@@ -0,0 +1,3 @@
1
+ import '@mpv2/assets/main.css';
2
+ import '@mpv2/assets/standalone.css';
3
+ import '@feedmepos/mf-common/style.css';
@@ -0,0 +1,2 @@
1
+ declare const router: import("vue-router").Router;
2
+ export default router;
@@ -0,0 +1,2 @@
1
+ import type { RouteRecordRaw } from 'vue-router';
2
+ export declare const routes: RouteRecordRaw[];
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;