@ystemsrx/cfshare 0.1.1 → 0.1.3

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,5 @@
1
+ export declare function renderMarkdownPreviewTemplate(params: {
2
+ title: string;
3
+ payload: string;
4
+ }): string;
5
+ //# sourceMappingURL=markdownPreviewTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdownPreviewTemplate.d.ts","sourceRoot":"","sources":["../../../src/templates/markdownPreviewTemplate.ts"],"names":[],"mappings":"AASA,wBAAgB,6BAA6B,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CA0OhG"}
@@ -0,0 +1,243 @@
1
+ function escapeHtml(input) {
2
+ return input
3
+ .replace(/&/g, "&")
4
+ .replace(/</g, "&lt;")
5
+ .replace(/>/g, "&gt;")
6
+ .replace(/\"/g, "&quot;")
7
+ .replace(/'/g, "&#39;");
8
+ }
9
+ export function renderMarkdownPreviewTemplate(params) {
10
+ const title = escapeHtml(params.title);
11
+ return `<!doctype html>
12
+ <html lang="zh">
13
+ <head>
14
+ <meta charset="UTF-8" />
15
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
16
+ <title>${title}</title>
17
+ <script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
18
+ <script src="https://cdn.jsdelivr.net/npm/markdown-it-footnote/dist/markdown-it-footnote.min.js"></script>
19
+ <script src="https://cdn.jsdelivr.net/npm/markdown-it-task-lists/dist/markdown-it-task-lists.min.js"></script>
20
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs/themes/prism.css" />
21
+ <script src="https://cdn.jsdelivr.net/npm/prismjs/prism.js"></script>
22
+ <script src="https://cdn.jsdelivr.net/npm/prismjs/components/prism-core.min.js"></script>
23
+ <script src="https://cdn.jsdelivr.net/npm/prismjs/plugins/autoloader/prism-autoloader.min.js"></script>
24
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" />
25
+ <script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
26
+ <script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"></script>
27
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
28
+ <style>
29
+ :root { color-scheme: light; }
30
+ * { box-sizing: border-box; }
31
+ body {
32
+ margin: 0;
33
+ background: #f7f7f8;
34
+ color: #1f2937;
35
+ font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
36
+ }
37
+ .container {
38
+ max-width: 960px;
39
+ margin: 0 auto;
40
+ padding: 20px 16px 40px;
41
+ }
42
+ .header {
43
+ margin-bottom: 14px;
44
+ color: #6b7280;
45
+ font-size: 13px;
46
+ }
47
+ #preview {
48
+ background: #ffffff;
49
+ border: 1px solid #e5e7eb;
50
+ border-radius: 10px;
51
+ padding: 20px;
52
+ }
53
+ pre {
54
+ margin: 0.9em 0;
55
+ overflow: auto;
56
+ font-size: 13px;
57
+ background: #f5f5f5 !important;
58
+ border-radius: 6px;
59
+ padding: 0;
60
+ }
61
+ pre code {
62
+ display: block;
63
+ padding: 0.85em;
64
+ font-family: "Consolas", "Fira Code", monospace;
65
+ }
66
+ code:not(pre > code) {
67
+ background: #f2f4f7;
68
+ border-radius: 4px;
69
+ padding: 0.15em 0.4em;
70
+ }
71
+ table {
72
+ width: 100%;
73
+ border-collapse: collapse;
74
+ }
75
+ th, td {
76
+ border: 1px solid #ddd;
77
+ padding: 8px;
78
+ }
79
+ blockquote {
80
+ margin: 0.8em 0;
81
+ border-left: 4px solid #d1d5db;
82
+ padding: 0.3em 1em;
83
+ color: #4b5563;
84
+ background: #f9fafb;
85
+ }
86
+ .mermaid-container {
87
+ border: 1px solid #ddd;
88
+ border-radius: 6px;
89
+ overflow: hidden;
90
+ margin: 0.9em 0;
91
+ }
92
+ .mermaid-header {
93
+ background: #f9fafb;
94
+ border-bottom: 1px solid #ddd;
95
+ padding: 7px 10px;
96
+ display: flex;
97
+ justify-content: space-between;
98
+ align-items: center;
99
+ font-size: 12px;
100
+ color: #6b7280;
101
+ }
102
+ .mermaid-toggle {
103
+ border: 0;
104
+ background: #2563eb;
105
+ color: #fff;
106
+ border-radius: 4px;
107
+ padding: 4px 8px;
108
+ cursor: pointer;
109
+ }
110
+ .mermaid-content {
111
+ background: #fff;
112
+ padding: 10px;
113
+ }
114
+ .mermaid-code {
115
+ display: none;
116
+ }
117
+ .error {
118
+ color: #dc2626;
119
+ font-size: 13px;
120
+ }
121
+ </style>
122
+ </head>
123
+ <body>
124
+ <div class="container">
125
+ <div class="header">cfshare preview: ${title}</div>
126
+ <div id="preview"></div>
127
+ </div>
128
+ <script>
129
+ Prism.plugins.autoloader.languages_path = "https://cdn.jsdelivr.net/npm/prismjs/components/";
130
+ mermaid.initialize({ startOnLoad: false, theme: "default", securityLevel: "loose" });
131
+
132
+ const markdownBase64 = "${params.payload}";
133
+ const bytes = Uint8Array.from(atob(markdownBase64), function (char) { return char.charCodeAt(0); });
134
+ const source = new TextDecoder("utf-8").decode(bytes);
135
+ let mermaidSeq = 0;
136
+ let md = window.markdownit({ html: true, linkify: true, typographer: true });
137
+ if (window.markdownitFootnote) {
138
+ md = md.use(window.markdownitFootnote);
139
+ }
140
+ if (window.markdownitTaskLists) {
141
+ md = md.use(window.markdownitTaskLists, { enabled: true, label: true });
142
+ }
143
+
144
+ function processMermaidBlock(codeBlock) {
145
+ const mermaidCode = codeBlock.textContent || "";
146
+ const preElement = codeBlock.parentNode;
147
+
148
+ const container = document.createElement("div");
149
+ container.className = "mermaid-container";
150
+
151
+ const header = document.createElement("div");
152
+ header.className = "mermaid-header";
153
+ const title = document.createElement("span");
154
+ title.textContent = "Mermaid";
155
+ const toggle = document.createElement("button");
156
+ toggle.className = "mermaid-toggle";
157
+ toggle.textContent = "查看代码";
158
+ header.appendChild(title);
159
+ header.appendChild(toggle);
160
+
161
+ const content = document.createElement("div");
162
+ content.className = "mermaid-content";
163
+ const diagram = document.createElement("div");
164
+ const codeView = document.createElement("div");
165
+ codeView.className = "mermaid-code";
166
+ const pre = document.createElement("pre");
167
+ pre.innerHTML = "<code class=\\"language-mermaid\\"></code>";
168
+ const codeEl = pre.querySelector("code");
169
+ if (codeEl) codeEl.textContent = mermaidCode;
170
+ codeView.appendChild(pre);
171
+ content.appendChild(diagram);
172
+ content.appendChild(codeView);
173
+
174
+ container.appendChild(header);
175
+ container.appendChild(content);
176
+ if (preElement.parentNode) {
177
+ preElement.parentNode.replaceChild(container, preElement);
178
+ }
179
+
180
+ mermaid.render("cfshare-mermaid-" + String(++mermaidSeq), mermaidCode).then(function (result) {
181
+ diagram.innerHTML = result.svg;
182
+ }).catch(function (error) {
183
+ diagram.innerHTML = "<div class=\\"error\\">Mermaid 渲染失败: " + String(error && error.message ? error.message : error) + "</div>";
184
+ });
185
+
186
+ toggle.addEventListener("click", function () {
187
+ const showingDiagram = diagram.style.display !== "none";
188
+ if (showingDiagram) {
189
+ diagram.style.display = "none";
190
+ codeView.style.display = "block";
191
+ toggle.textContent = "查看图表";
192
+ if (codeEl) Prism.highlightElement(codeEl);
193
+ } else {
194
+ diagram.style.display = "block";
195
+ codeView.style.display = "none";
196
+ toggle.textContent = "查看代码";
197
+ }
198
+ });
199
+ }
200
+
201
+ function highlightAndRender(preview) {
202
+ preview.querySelectorAll("pre code").forEach(function (block) {
203
+ const match = (block.className || "").match(/language-([a-zA-Z0-9_-]+)/);
204
+ const lang = match ? match[1].toLowerCase() : "";
205
+ if (lang === "mermaid") {
206
+ processMermaidBlock(block);
207
+ } else if (lang) {
208
+ Prism.highlightElement(block);
209
+ }
210
+ });
211
+ }
212
+
213
+ const preview = document.getElementById("preview");
214
+ const backslash = String.fromCharCode(92);
215
+ const latexBlockStart = backslash + "[";
216
+ const latexBlockEnd = backslash + "]";
217
+ const latexInlineStart = backslash + "(";
218
+ const latexInlineEnd = backslash + ")";
219
+ const protectedSource = source
220
+ .replaceAll(latexBlockStart, "⟦LATEX_BLOCK_START⟧")
221
+ .replaceAll(latexBlockEnd, "⟦LATEX_BLOCK_END⟧")
222
+ .replaceAll(latexInlineStart, "⟦LATEX_INLINE_START⟧")
223
+ .replaceAll(latexInlineEnd, "⟦LATEX_INLINE_END⟧");
224
+ let rendered = md.render(protectedSource);
225
+ rendered = rendered
226
+ .replaceAll("⟦LATEX_BLOCK_START⟧", latexBlockStart)
227
+ .replaceAll("⟦LATEX_BLOCK_END⟧", latexBlockEnd)
228
+ .replaceAll("⟦LATEX_INLINE_START⟧", latexInlineStart)
229
+ .replaceAll("⟦LATEX_INLINE_END⟧", latexInlineEnd);
230
+ preview.innerHTML = rendered;
231
+ highlightAndRender(preview);
232
+ renderMathInElement(preview, {
233
+ delimiters: [
234
+ { left: "$$", right: "$$", display: true },
235
+ { left: "\\\\[", right: "\\\\]", display: true },
236
+ { left: "$", right: "$", display: false },
237
+ { left: "\\\\(", right: "\\\\)", display: false }
238
+ ]
239
+ });
240
+ </script>
241
+ </body>
242
+ </html>`;
243
+ }
@@ -0,0 +1,3 @@
1
+ import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
2
+ export declare function registerCfshareTools(api: OpenClawPluginApi): void;
3
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAsP7D,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,iBAAiB,QAiB1D"}
@@ -0,0 +1,138 @@
1
+ import { jsonResult } from "openclaw/plugin-sdk";
2
+ import { CfshareManager } from "./manager.js";
3
+ import { AuditExportSchema, AuditQuerySchema, EnvCheckSchema, ExposeFilesSchema, ExposePortSchema, ExposureGetSchema, ExposureListSchema, ExposureLogsSchema, ExposureStopSchema, MaintenanceSchema, } from "./schemas.js";
4
+ let managerSingleton = null;
5
+ function getManager(api) {
6
+ if (!managerSingleton) {
7
+ managerSingleton = new CfshareManager(api);
8
+ }
9
+ return managerSingleton;
10
+ }
11
+ function registerToolsForContext(api, ctx) {
12
+ const manager = getManager(api);
13
+ return [
14
+ {
15
+ name: "env_check",
16
+ label: "CFShare Env Check",
17
+ description: "Check cloudflared runtime, defaults, and policy capabilities",
18
+ parameters: EnvCheckSchema,
19
+ async execute() {
20
+ return jsonResult(await manager.envCheck());
21
+ },
22
+ },
23
+ {
24
+ name: "expose_port",
25
+ label: "CFShare Expose Port",
26
+ description: "Expose an existing local service port through Cloudflare Quick Tunnel with optional auth and origin protection",
27
+ parameters: ExposePortSchema,
28
+ async execute(_toolCallId, params) {
29
+ return jsonResult(await manager.exposePort(params));
30
+ },
31
+ },
32
+ {
33
+ name: "expose_files",
34
+ label: "CFShare Expose Files",
35
+ description: "Expose one or more files/directories by creating a temporary local static server and tunneling it",
36
+ parameters: ExposeFilesSchema,
37
+ async execute(_toolCallId, params) {
38
+ return jsonResult(await manager.exposeFiles(params, ctx));
39
+ },
40
+ },
41
+ {
42
+ name: "exposure_list",
43
+ label: "CFShare Exposure List",
44
+ description: "List all active and tracked exposure sessions",
45
+ parameters: ExposureListSchema,
46
+ async execute() {
47
+ return jsonResult(manager.exposureList());
48
+ },
49
+ },
50
+ {
51
+ name: "exposure_get",
52
+ label: "CFShare Exposure Get",
53
+ description: "Get detailed exposure info by id(s) or filter, with optional field projection",
54
+ parameters: ExposureGetSchema,
55
+ async execute(_toolCallId, params) {
56
+ return jsonResult(await manager.exposureGet(params));
57
+ },
58
+ },
59
+ {
60
+ name: "exposure_stop",
61
+ label: "CFShare Exposure Stop",
62
+ description: "Stop one exposure, multiple exposures, or all exposures; terminate processes and clean temporary resources",
63
+ parameters: ExposureStopSchema,
64
+ async execute(_toolCallId, params) {
65
+ const target = params.ids ?? params.id;
66
+ if (!target) {
67
+ return jsonResult({
68
+ stopped: [],
69
+ failed: [{ id: "unknown", error: "id or ids is required" }],
70
+ cleaned: [],
71
+ });
72
+ }
73
+ return jsonResult(await manager.stopExposure(target, params.opts));
74
+ },
75
+ },
76
+ {
77
+ name: "exposure_logs",
78
+ label: "CFShare Exposure Logs",
79
+ description: "Fetch merged logs from cloudflared and origin components for one or many exposures",
80
+ parameters: ExposureLogsSchema,
81
+ async execute(_toolCallId, params) {
82
+ const target = params.ids ?? params.id;
83
+ if (!target) {
84
+ return jsonResult({
85
+ items: [],
86
+ missing_ids: [],
87
+ error: "id or ids is required",
88
+ });
89
+ }
90
+ return jsonResult(manager.exposureLogs(target, params.opts));
91
+ },
92
+ },
93
+ {
94
+ name: "maintenance",
95
+ label: "CFShare Maintenance",
96
+ description: "Run guard lifecycle actions, garbage collection, or policy updates for cfshare runtime",
97
+ parameters: MaintenanceSchema,
98
+ async execute(_toolCallId, params) {
99
+ return jsonResult(await manager.maintenance(params.action, params.opts));
100
+ },
101
+ },
102
+ {
103
+ name: "audit_query",
104
+ label: "CFShare Audit Query",
105
+ description: "Query cfshare audit records with filters",
106
+ parameters: AuditQuerySchema,
107
+ async execute(_toolCallId, params) {
108
+ return jsonResult(await manager.auditQuery(params.filters));
109
+ },
110
+ },
111
+ {
112
+ name: "audit_export",
113
+ label: "CFShare Audit Export",
114
+ description: "Export filtered audit records to a local JSONL file",
115
+ parameters: AuditExportSchema,
116
+ async execute(_toolCallId, params) {
117
+ return jsonResult(await manager.auditExport(params.range));
118
+ },
119
+ },
120
+ ];
121
+ }
122
+ export function registerCfshareTools(api) {
123
+ const names = [
124
+ "env_check",
125
+ "expose_port",
126
+ "expose_files",
127
+ "exposure_list",
128
+ "exposure_get",
129
+ "exposure_stop",
130
+ "exposure_logs",
131
+ "maintenance",
132
+ "audit_query",
133
+ "audit_export",
134
+ ];
135
+ api.registerTool((ctx) => registerToolsForContext(api, ctx), {
136
+ names,
137
+ });
138
+ }
@@ -0,0 +1,100 @@
1
+ import type { ChildProcessWithoutNullStreams } from "node:child_process";
2
+ import type { Server } from "node:http";
3
+ export type AccessMode = "token" | "basic" | "none";
4
+ export type ExposureType = "port" | "files";
5
+ export type ExposureStatus = "starting" | "running" | "stopped" | "error" | "expired";
6
+ export type LogComponent = "tunnel" | "origin" | "manager";
7
+ export type FilePresentationMode = "download" | "preview" | "raw";
8
+ export type RateLimitPolicy = {
9
+ enabled: boolean;
10
+ windowMs: number;
11
+ maxRequests: number;
12
+ };
13
+ export type CfsharePolicy = {
14
+ defaultTtlSeconds: number;
15
+ maxTtlSeconds: number;
16
+ defaultExposePortAccess: AccessMode;
17
+ defaultExposeFilesAccess: AccessMode;
18
+ blockedPorts: number[];
19
+ allowedPathRoots: string[];
20
+ tunnel: {
21
+ edgeIpVersion: "4" | "6" | "auto";
22
+ protocol: "http2" | "quic" | "auto";
23
+ };
24
+ rateLimit: RateLimitPolicy;
25
+ };
26
+ export type CfsharePluginConfig = Partial<CfsharePolicy> & {
27
+ stateDir?: string;
28
+ cloudflaredPath?: string;
29
+ policyFile?: string;
30
+ ignoreFile?: string;
31
+ };
32
+ export type LogEntry = {
33
+ ts: string;
34
+ component: LogComponent;
35
+ line: string;
36
+ };
37
+ export type ExposureStats = {
38
+ requests: number;
39
+ downloads: number;
40
+ bytesSent: number;
41
+ lastAccessAt?: string;
42
+ };
43
+ export type AccessState = {
44
+ mode: AccessMode;
45
+ protectOrigin: boolean;
46
+ token?: string;
47
+ username?: string;
48
+ password?: string;
49
+ allowlistPaths: string[];
50
+ };
51
+ export type ManifestEntry = {
52
+ name: string;
53
+ size: number;
54
+ sha256: string;
55
+ relative_url: string;
56
+ modified_at?: string;
57
+ is_binary?: boolean;
58
+ preview_supported?: boolean;
59
+ };
60
+ export type ExposureSession = {
61
+ id: string;
62
+ type: ExposureType;
63
+ status: ExposureStatus;
64
+ createdAt: string;
65
+ expiresAt: string;
66
+ localUrl: string;
67
+ publicUrl?: string;
68
+ originPort: number;
69
+ tunnelPort: number;
70
+ sourcePort?: number;
71
+ workspaceDir?: string;
72
+ manifest?: ManifestEntry[];
73
+ fileMode?: "normal" | "zip";
74
+ filePresentation?: FilePresentationMode;
75
+ maxDownloads?: number;
76
+ process?: ChildProcessWithoutNullStreams;
77
+ originServer?: Server;
78
+ proxyServer?: Server;
79
+ timeoutHandle?: NodeJS.Timeout;
80
+ logs: LogEntry[];
81
+ stats: ExposureStats;
82
+ access: AccessState;
83
+ lastError?: string;
84
+ };
85
+ export type AuditEvent = {
86
+ ts: string;
87
+ event: string;
88
+ id?: string;
89
+ type?: ExposureType;
90
+ details?: Record<string, unknown>;
91
+ };
92
+ export type ExposureRecord = {
93
+ id: string;
94
+ type: ExposureType;
95
+ status: ExposureStatus;
96
+ public_url?: string;
97
+ local_url: string;
98
+ expires_at: string;
99
+ };
100
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5C,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AACtF,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC3D,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,SAAS,GAAG,KAAK,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MA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CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "@ystemsrx/cfshare",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin to safely expose local ports/files via Cloudflare Quick Tunnel",
6
6
  "license": "MIT",
7
+ "bin": {
8
+ "cfshare": "dist/src/cli.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc -p tsconfig.build.json",
12
+ "prepare": "npm run build",
13
+ "prepack": "npm run build"
14
+ },
7
15
  "files": [
16
+ "dist",
8
17
  "index.ts",
9
18
  "src",
10
19
  "skills",
@@ -22,7 +22,7 @@ Expose local services, ports, files, or directories as temporary public `https:/
22
22
 
23
23
  **This tool is useful when you need to:**
24
24
 
25
- 1. Share files;
25
+ 1. Share or send files;
26
26
  2. Present web pages, services, lengthy Markdown content, PDFs, images, audio, video, and other media.
27
27
 
28
28
  ---