upfynai-code 2.9.0 → 2.9.2
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/README.md +91 -66
- package/client/dist/api-docs.html +838 -0
- package/client/dist/assets/AppContent-BXZDeSIC.js +545 -0
- package/client/dist/assets/CanvasFullScreen-mnpCnLZ9.js +1 -0
- package/client/dist/assets/CanvasWorkspace-4CqmjAVQ.js +163 -0
- package/client/dist/assets/DashboardPanel-zFIFlw56.js +1 -0
- package/client/dist/assets/FileTree-B0c_GaB3.js +1 -0
- package/client/dist/assets/GitPanel-DUP4zVU4.js +2 -0
- package/client/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/client/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/client/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/client/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/client/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/client/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/client/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/client/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/client/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/client/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/client/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/client/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/client/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/client/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/client/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/client/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/client/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/client/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/client/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/client/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/client/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/client/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/client/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/client/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/client/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/client/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/client/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/client/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/client/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/client/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/client/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/client/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/client/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/client/dist/assets/LoginModal-BRycfsyD.js +13 -0
- package/client/dist/assets/MarkdownPreview-DHmk3qzu.js +1 -0
- package/client/dist/assets/MermaidBlock-BuBc_G-F.js +2 -0
- package/client/dist/assets/Onboarding-BcnaZZ0o.js +1 -0
- package/client/dist/assets/PreviewPanel-CqCa92Tf.js +32 -0
- package/client/dist/assets/SetupForm-S0g6u5yT.js +1 -0
- package/client/dist/assets/WorkflowsPanel-CouH9JDO.js +1 -0
- package/client/dist/assets/index-BFuqS0tY.css +1 -0
- package/client/dist/assets/index-CNDcVl2g.js +68 -0
- package/client/dist/assets/pdf-CE_K4jFx.js +12 -0
- package/client/dist/assets/vendor-canvas-BZV40eAE.css +1 -0
- package/client/dist/assets/vendor-canvas-D39yWul6.js +49 -0
- package/client/dist/assets/vendor-codemirror-CbtmxxaB.js +35 -0
- package/client/dist/assets/vendor-diff-DNQpbhrT.js +69 -0
- package/client/dist/assets/vendor-i18n-DCFGyhQR.js +1 -0
- package/client/dist/assets/vendor-icons-BaD0x9SL.js +711 -0
- package/client/dist/assets/vendor-markdown-CimbIo6Y.js +296 -0
- package/client/dist/assets/vendor-mermaid-CH7SGc99.js +2556 -0
- package/client/dist/assets/vendor-react-96lCPsRK.js +67 -0
- package/client/dist/assets/vendor-syntax-DuHI9Ok6.js +16 -0
- package/client/dist/assets/vendor-xterm-CZq1hqo1.js +66 -0
- package/client/dist/assets/vendor-xterm-qxJ8_QYu.css +32 -0
- package/client/dist/clear-cache.html +85 -0
- package/client/dist/convert-icons.md +53 -0
- package/client/dist/favicon.png +0 -0
- package/client/dist/favicon.svg +5 -0
- package/client/dist/generate-icons.js +49 -0
- package/client/dist/icons/claude-ai-icon.svg +1 -0
- package/client/dist/icons/codex-white.svg +3 -0
- package/client/dist/icons/codex.svg +3 -0
- package/client/dist/icons/cursor-white.svg +12 -0
- package/client/dist/icons/cursor.svg +1 -0
- package/client/dist/icons/icon-128x128.png +0 -0
- package/client/dist/icons/icon-128x128.svg +5 -0
- package/client/dist/icons/icon-144x144.png +0 -0
- package/client/dist/icons/icon-144x144.svg +5 -0
- package/client/dist/icons/icon-152x152.png +0 -0
- package/client/dist/icons/icon-152x152.svg +5 -0
- package/client/dist/icons/icon-192x192.png +0 -0
- package/client/dist/icons/icon-192x192.svg +5 -0
- package/client/dist/icons/icon-384x384.png +0 -0
- package/client/dist/icons/icon-384x384.svg +5 -0
- package/client/dist/icons/icon-512x512.png +0 -0
- package/client/dist/icons/icon-512x512.svg +5 -0
- package/client/dist/icons/icon-72x72.png +0 -0
- package/client/dist/icons/icon-72x72.svg +5 -0
- package/client/dist/icons/icon-96x96.png +0 -0
- package/client/dist/icons/icon-96x96.svg +5 -0
- package/client/dist/icons/icon-template.svg +5 -0
- package/client/dist/index.html +119 -0
- package/client/dist/logo-128.png +0 -0
- package/client/dist/logo-256.png +0 -0
- package/client/dist/logo-32.png +0 -0
- package/client/dist/logo-512.png +0 -0
- package/client/dist/logo-64.png +0 -0
- package/client/dist/logo.svg +14 -0
- package/client/dist/manifest.json +61 -0
- package/client/dist/mcp-docs.html +108 -0
- package/client/dist/offline.html +84 -0
- package/client/dist/screenshots/cli-selection.png +0 -0
- package/client/dist/screenshots/desktop-main.png +0 -0
- package/client/dist/screenshots/mobile-chat.png +0 -0
- package/client/dist/screenshots/tools-modal.png +0 -0
- package/client/dist/sw.js +82 -0
- package/commands/upfynai-connect.md +59 -0
- package/commands/upfynai-disconnect.md +31 -0
- package/commands/upfynai-doctor.md +99 -0
- package/commands/upfynai-export.md +49 -0
- package/commands/upfynai-local.md +82 -0
- package/commands/upfynai-status.md +75 -0
- package/commands/upfynai-stop.md +49 -0
- package/commands/upfynai-uninstall.md +58 -0
- package/commands/upfynai.md +69 -0
- package/package.json +143 -82
- package/scripts/build-client.js +17 -0
- package/scripts/fix-node-pty.js +67 -0
- package/scripts/install-commands.js +78 -0
- package/server/agent-loop.js +242 -0
- package/server/auto-compact.js +99 -0
- package/server/claude-sdk.js +797 -0
- package/server/cli-ui.js +785 -0
- package/server/cli.js +596 -0
- package/server/constants/config.js +31 -0
- package/server/cursor-cli.js +270 -0
- package/server/database/auth.db +0 -0
- package/server/database/db.js +1391 -0
- package/server/database/init.sql +70 -0
- package/server/index.js +3799 -0
- package/server/load-env.js +26 -0
- package/server/mcp-server.js +621 -0
- package/server/middleware/auth.js +176 -0
- package/server/middleware/relayHelpers.js +44 -0
- package/server/middleware/sandboxRouter.js +174 -0
- package/server/openai-codex.js +403 -0
- package/server/openrouter.js +137 -0
- package/server/projects.js +1807 -0
- package/server/provider-factory.js +174 -0
- package/server/relay-client.js +379 -0
- package/server/routes/agent.js +1226 -0
- package/server/routes/auth.js +554 -0
- package/server/routes/canvas.js +53 -0
- package/server/routes/cli-auth.js +263 -0
- package/server/routes/codex.js +396 -0
- package/server/routes/commands.js +707 -0
- package/server/routes/composio.js +176 -0
- package/server/routes/cursor.js +770 -0
- package/server/routes/dashboard.js +295 -0
- package/server/routes/git.js +1208 -0
- package/server/routes/keys.js +34 -0
- package/server/routes/mcp-utils.js +48 -0
- package/server/routes/mcp.js +661 -0
- package/server/routes/payments.js +227 -0
- package/server/routes/projects.js +655 -0
- package/server/routes/sessions.js +146 -0
- package/server/routes/settings.js +261 -0
- package/server/routes/taskmaster.js +1928 -0
- package/server/routes/user.js +106 -0
- package/server/routes/vapi-chat.js +624 -0
- package/server/routes/voice.js +235 -0
- package/server/routes/webhooks.js +166 -0
- package/server/routes/workflows.js +312 -0
- package/server/sandbox.js +120 -0
- package/server/services/composio.js +204 -0
- package/server/services/sessionRegistry.js +139 -0
- package/server/services/whisperService.js +84 -0
- package/server/services/workflowScheduler.js +206 -0
- package/server/tests/relay-flow.test.js +570 -0
- package/server/tests/sessions.test.js +259 -0
- package/server/utils/commandParser.js +303 -0
- package/server/utils/email.js +61 -0
- package/server/utils/gitConfig.js +24 -0
- package/server/utils/mcp-detector.js +198 -0
- package/server/utils/taskmaster-websocket.js +129 -0
- package/shared/integrationCatalog.d.ts +12 -0
- package/shared/integrationCatalog.js +172 -0
- package/shared/modelConstants.js +96 -0
- package/bin/cli.js +0 -97
- package/dist/agents/claude.js +0 -229
- package/dist/agents/codex.js +0 -48
- package/dist/agents/cursor.js +0 -48
- package/dist/agents/detect.js +0 -51
- package/dist/agents/exec.js +0 -31
- package/dist/agents/files.js +0 -105
- package/dist/agents/git.js +0 -18
- package/dist/agents/gitagent.js +0 -67
- package/dist/agents/index.js +0 -88
- package/dist/agents/shell.js +0 -38
- package/dist/agents/utils.js +0 -136
- package/scripts/postinstall.js +0 -9
- package/scripts/prepublish.js +0 -58
- package/src/animation.js +0 -228
- package/src/auth.js +0 -122
- package/src/config.js +0 -40
- package/src/connect.js +0 -416
- package/src/launch.js +0 -78
- package/src/mcp.js +0 -57
- package/src/permissions.js +0 -140
- package/src/persistent-shell.js +0 -261
- package/src/server.js +0 -54
- /package/{dist → shared}/gitagent/index.js +0 -0
- /package/{dist → shared}/gitagent/parser.js +0 -0
- /package/{dist → shared}/gitagent/prompt-builder.js +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Upfyn-Code MCP Integration</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root { --bg: #0d1117; --fg: #c9d1d9; --accent: #58a6ff; --card: #161b22; --border: #30363d; --code-bg: #1c2128; }
|
|
9
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
10
|
+
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; background: var(--bg); color: var(--fg); line-height: 1.6; padding: 2rem; max-width: 800px; margin: 0 auto; }
|
|
11
|
+
h1 { color: #fff; margin-bottom: 0.5rem; font-size: 2rem; }
|
|
12
|
+
h2 { color: var(--accent); margin: 2rem 0 1rem; font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
|
|
13
|
+
h3 { color: #fff; margin: 1.5rem 0 0.5rem; }
|
|
14
|
+
p { margin-bottom: 1rem; }
|
|
15
|
+
a { color: var(--accent); }
|
|
16
|
+
.subtitle { color: #8b949e; margin-bottom: 2rem; }
|
|
17
|
+
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1rem; overflow-x: auto; margin: 1rem 0; font-size: 0.9rem; }
|
|
18
|
+
code { font-family: 'SF Mono', 'Fira Code', monospace; color: #e6edf3; }
|
|
19
|
+
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; margin: 1rem 0; }
|
|
20
|
+
.tool { margin: 0.75rem 0; }
|
|
21
|
+
.tool-name { color: var(--accent); font-weight: 600; font-family: monospace; }
|
|
22
|
+
.tool-desc { color: #8b949e; margin-left: 1rem; }
|
|
23
|
+
.step { display: flex; gap: 1rem; margin: 1rem 0; }
|
|
24
|
+
.step-num { background: var(--accent); color: var(--bg); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
|
|
25
|
+
.warn { background: #3d1f00; border: 1px solid #6e3a00; border-radius: 6px; padding: 1rem; margin: 1rem 0; color: #f0883e; }
|
|
26
|
+
</style>
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<h1>Upfyn-Code MCP Server</h1>
|
|
30
|
+
<p class="subtitle">Connect any MCP client to control your Upfyn-Code instance</p>
|
|
31
|
+
|
|
32
|
+
<h2>Quick Start</h2>
|
|
33
|
+
|
|
34
|
+
<div class="step">
|
|
35
|
+
<div class="step-num">1</div>
|
|
36
|
+
<div><strong>Get your API key</strong> — Log into Upfyn-Code, go to Settings, then API Keys. Click "Generate New Key".</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="step">
|
|
39
|
+
<div class="step-num">2</div>
|
|
40
|
+
<div><strong>Add MCP config</strong> to your client (see examples below).</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="step">
|
|
43
|
+
<div class="step-num">3</div>
|
|
44
|
+
<div><strong>Start using tools</strong> — Your client can now send prompts, manage canvas, and control sessions.</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<h2>Client Configuration</h2>
|
|
48
|
+
|
|
49
|
+
<p>Get your personalized MCP configuration from the <strong>Dashboard</strong> at <code>cli.upfyn.com/dashboard</code>. It includes the exact URL and credentials for your account — just copy and paste into your AI tool's MCP settings.</p>
|
|
50
|
+
|
|
51
|
+
<h3>Claude Desktop</h3>
|
|
52
|
+
<p>Add to <code>~/.claude/mcp_servers.json</code>:</p>
|
|
53
|
+
<pre><code>{
|
|
54
|
+
"upfynai": {
|
|
55
|
+
"type": "streamable-http",
|
|
56
|
+
"url": "YOUR_MCP_URL",
|
|
57
|
+
"headers": {
|
|
58
|
+
"x-api-key": "YOUR_API_KEY_HERE"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}</code></pre>
|
|
62
|
+
|
|
63
|
+
<h3>Claude Code CLI</h3>
|
|
64
|
+
<pre><code>claude mcp add upfynai \
|
|
65
|
+
--transport streamable-http \
|
|
66
|
+
YOUR_MCP_URL \
|
|
67
|
+
--header "x-api-key: YOUR_API_KEY_HERE"</code></pre>
|
|
68
|
+
|
|
69
|
+
<h3>Cursor</h3>
|
|
70
|
+
<p>Add to <code>.cursor/mcp.json</code> in your project:</p>
|
|
71
|
+
<pre><code>{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"upfynai": {
|
|
74
|
+
"url": "YOUR_MCP_URL",
|
|
75
|
+
"headers": { "x-api-key": "YOUR_API_KEY_HERE" }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}</code></pre>
|
|
79
|
+
|
|
80
|
+
<h3>Any HTTP MCP Client</h3>
|
|
81
|
+
<pre><code>POST YOUR_MCP_URL
|
|
82
|
+
Headers:
|
|
83
|
+
Content-Type: application/json
|
|
84
|
+
x-api-key: YOUR_API_KEY_HERE</code></pre>
|
|
85
|
+
|
|
86
|
+
<h2>Capabilities</h2>
|
|
87
|
+
<div class="card">
|
|
88
|
+
<p>Once connected, your MCP client can:</p>
|
|
89
|
+
<div class="tool"><span class="tool-desc">Send AI prompts and receive streaming responses</span></div>
|
|
90
|
+
<div class="tool"><span class="tool-desc">Browse and manage your projects</span></div>
|
|
91
|
+
<div class="tool"><span class="tool-desc">View and manage active sessions</span></div>
|
|
92
|
+
<div class="tool"><span class="tool-desc">Interact with the Upfyn Canvas</span></div>
|
|
93
|
+
<div class="tool"><span class="tool-desc">Control running AI sessions</span></div>
|
|
94
|
+
<p style="margin-top: 1rem; color: #8b949e; font-size: 0.85rem;">The full list of available tools and resources is auto-discovered by your MCP client when it connects.</p>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<h2>Authentication</h2>
|
|
98
|
+
<p>All MCP requests require authentication using an API key:</p>
|
|
99
|
+
<div class="card">
|
|
100
|
+
<p><strong>API Key</strong>:<br><code>x-api-key: YOUR_API_KEY_HERE</code></p>
|
|
101
|
+
<p style="color: #8b949e; font-size: 0.85rem;">Generate API keys from Settings → API & Tokens in the web UI.</p>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div class="warn">
|
|
105
|
+
<strong>Security:</strong> Keep your API key secret. Each key is tied to your user account. You can revoke keys at any time from Settings.
|
|
106
|
+
</div>
|
|
107
|
+
</body>
|
|
108
|
+
</html>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
|
+
<title>Upfyn-Code — Offline</title>
|
|
7
|
+
<meta name="theme-color" content="#0a0f1e" />
|
|
8
|
+
<style>
|
|
9
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
10
|
+
body {
|
|
11
|
+
background: #0a0f1e;
|
|
12
|
+
color: #e2e8f0;
|
|
13
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
14
|
+
min-height: 100vh;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
padding: 2rem;
|
|
19
|
+
}
|
|
20
|
+
.container {
|
|
21
|
+
text-align: center;
|
|
22
|
+
max-width: 400px;
|
|
23
|
+
}
|
|
24
|
+
.icon {
|
|
25
|
+
width: 64px;
|
|
26
|
+
height: 64px;
|
|
27
|
+
margin: 0 auto 1.5rem;
|
|
28
|
+
background: #0d1117;
|
|
29
|
+
border-radius: 16px;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
border: 1px solid rgba(59, 130, 246, 0.2);
|
|
34
|
+
box-shadow: 0 4px 24px rgba(59, 130, 246, 0.15);
|
|
35
|
+
}
|
|
36
|
+
.icon svg {
|
|
37
|
+
width: 32px;
|
|
38
|
+
height: 32px;
|
|
39
|
+
color: #3b82f6;
|
|
40
|
+
}
|
|
41
|
+
h1 {
|
|
42
|
+
font-size: 1.5rem;
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
margin-bottom: 0.75rem;
|
|
45
|
+
}
|
|
46
|
+
p {
|
|
47
|
+
color: #94a3b8;
|
|
48
|
+
font-size: 0.9rem;
|
|
49
|
+
line-height: 1.5;
|
|
50
|
+
margin-bottom: 1.5rem;
|
|
51
|
+
}
|
|
52
|
+
.retry-btn {
|
|
53
|
+
display: inline-block;
|
|
54
|
+
padding: 12px 32px;
|
|
55
|
+
background: #3b82f6;
|
|
56
|
+
color: #fff;
|
|
57
|
+
border: none;
|
|
58
|
+
border-radius: 10px;
|
|
59
|
+
font-size: 0.95rem;
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
transition: background 0.2s;
|
|
63
|
+
}
|
|
64
|
+
.retry-btn:hover {
|
|
65
|
+
background: #2563eb;
|
|
66
|
+
}
|
|
67
|
+
.retry-btn:active {
|
|
68
|
+
transform: scale(0.97);
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
</head>
|
|
72
|
+
<body>
|
|
73
|
+
<div class="container">
|
|
74
|
+
<div class="icon">
|
|
75
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
76
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M18.364 5.636a9 9 0 010 12.728M5.636 18.364a9 9 0 010-12.728m2.828 9.9a5 5 0 010-7.072m7.072 0a5 5 0 010 7.072M13 12a1 1 0 11-2 0 1 1 0 012 0z" />
|
|
77
|
+
</svg>
|
|
78
|
+
</div>
|
|
79
|
+
<h1>You're offline</h1>
|
|
80
|
+
<p>Check your internet connection and try again. Upfyn-Code needs a network connection to work.</p>
|
|
81
|
+
<button class="retry-btn" onclick="location.reload()">Retry</button>
|
|
82
|
+
</div>
|
|
83
|
+
</body>
|
|
84
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Service Worker for Upfyn-Code
|
|
2
|
+
// v4 — proper caching: cache-first for static assets, network-first for navigation
|
|
3
|
+
|
|
4
|
+
const CACHE_NAME = 'upfyn-v4';
|
|
5
|
+
const PRECACHE_ASSETS = [
|
|
6
|
+
'/offline.html',
|
|
7
|
+
'/favicon.svg',
|
|
8
|
+
'/favicon.png',
|
|
9
|
+
'/manifest.json',
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
self.addEventListener('install', (event) => {
|
|
13
|
+
event.waitUntil(
|
|
14
|
+
caches.open(CACHE_NAME).then((cache) => cache.addAll(PRECACHE_ASSETS))
|
|
15
|
+
);
|
|
16
|
+
self.skipWaiting();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
self.addEventListener('activate', (event) => {
|
|
20
|
+
event.waitUntil(
|
|
21
|
+
caches.keys().then((names) =>
|
|
22
|
+
Promise.all(
|
|
23
|
+
names
|
|
24
|
+
.filter((n) => n !== CACHE_NAME)
|
|
25
|
+
.map((n) => caches.delete(n))
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
self.clients.claim();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
self.addEventListener('fetch', (event) => {
|
|
33
|
+
const { request } = event;
|
|
34
|
+
const url = new URL(request.url);
|
|
35
|
+
|
|
36
|
+
// API calls and WebSocket: pass through, no caching
|
|
37
|
+
if (
|
|
38
|
+
url.pathname.startsWith('/api/') ||
|
|
39
|
+
url.pathname.startsWith('/ws') ||
|
|
40
|
+
url.pathname.startsWith('/shell') ||
|
|
41
|
+
url.pathname.startsWith('/mcp')
|
|
42
|
+
) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Static assets (JS, CSS, images, fonts): cache-first
|
|
47
|
+
if (
|
|
48
|
+
request.destination === 'script' ||
|
|
49
|
+
request.destination === 'style' ||
|
|
50
|
+
request.destination === 'image' ||
|
|
51
|
+
request.destination === 'font' ||
|
|
52
|
+
url.pathname.startsWith('/icons/') ||
|
|
53
|
+
url.pathname.startsWith('/assets/')
|
|
54
|
+
) {
|
|
55
|
+
event.respondWith(
|
|
56
|
+
caches.match(request).then((cached) => {
|
|
57
|
+
if (cached) return cached;
|
|
58
|
+
return fetch(request).then((response) => {
|
|
59
|
+
if (response.ok) {
|
|
60
|
+
const clone = response.clone();
|
|
61
|
+
caches.open(CACHE_NAME).then((cache) => cache.put(request, clone));
|
|
62
|
+
}
|
|
63
|
+
return response;
|
|
64
|
+
}).catch(() => caches.match(request));
|
|
65
|
+
})
|
|
66
|
+
);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Navigation requests (HTML): network-first, offline fallback
|
|
71
|
+
if (request.mode === 'navigate') {
|
|
72
|
+
event.respondWith(
|
|
73
|
+
fetch(request).catch(() => caches.match('/offline.html'))
|
|
74
|
+
);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Everything else: network with cache fallback
|
|
79
|
+
event.respondWith(
|
|
80
|
+
fetch(request).catch(() => caches.match(request))
|
|
81
|
+
);
|
|
82
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Connect this Claude Code CLI session to Upfyn-Code web UI
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Upfyn-Code — Connect CLI to Web UI
|
|
6
|
+
|
|
7
|
+
You are the Upfyn-Code assistant. The user wants to connect their current Claude Code CLI session to the Upfyn-Code web UI.
|
|
8
|
+
|
|
9
|
+
## What to do
|
|
10
|
+
|
|
11
|
+
1. First check if there's a saved config with relay credentials:
|
|
12
|
+
```
|
|
13
|
+
cat ~/.upfynai/config.json 2>/dev/null || echo "NO_CONFIG"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
2. **If config exists with `server` and `relayKey`** — connect to hosted server:
|
|
17
|
+
- Read the server URL and relay key from the config
|
|
18
|
+
- Run the relay connection:
|
|
19
|
+
```
|
|
20
|
+
npx upfynai-code connect --server <server_from_config> --key <relayKey_from_config>
|
|
21
|
+
```
|
|
22
|
+
- This bridges the local machine to the hosted web UI at https://cli.upfyn.com
|
|
23
|
+
|
|
24
|
+
3. **If no config** — try connecting to local server:
|
|
25
|
+
- Check if the local server is running:
|
|
26
|
+
```
|
|
27
|
+
curl -s http://localhost:3001/health 2>/dev/null || echo "NOT_RUNNING"
|
|
28
|
+
```
|
|
29
|
+
- If not running, tell the user:
|
|
30
|
+
```
|
|
31
|
+
Local server is not running and no hosted config found.
|
|
32
|
+
|
|
33
|
+
Option A: Connect to hosted server:
|
|
34
|
+
uc connect --server https://upfynai-code-production.up.railway.app --key upfyn_your_token
|
|
35
|
+
|
|
36
|
+
Option B: Start local server first:
|
|
37
|
+
uc start
|
|
38
|
+
Then run /upfynai-connect again
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
4. Display connection confirmation:
|
|
42
|
+
```
|
|
43
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
OK Connected to Upfyn-Code!
|
|
45
|
+
|
|
46
|
+
Project: [current directory]
|
|
47
|
+
Server: [server URL]
|
|
48
|
+
Session: synced -- canvas will show your conversation
|
|
49
|
+
|
|
50
|
+
Your Claude Code session is now visible in the web UI.
|
|
51
|
+
Tool calls, responses, and permissions appear as canvas nodes.
|
|
52
|
+
|
|
53
|
+
Use /upfynai-disconnect to unlink this session
|
|
54
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If the user provided a custom URL or token as arguments, use those instead of the config values.
|
|
58
|
+
|
|
59
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Disconnect this CLI session from Upfyn-Code web UI
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Upfyn-Code — Disconnect from Web UI
|
|
6
|
+
|
|
7
|
+
You are the Upfyn-Code assistant. The user wants to disconnect their Claude Code CLI session from the Upfyn-Code web UI.
|
|
8
|
+
|
|
9
|
+
## What to do
|
|
10
|
+
|
|
11
|
+
1. Check if the server is running:
|
|
12
|
+
```
|
|
13
|
+
curl -s http://localhost:3001/health 2>/dev/null || echo "NOT_RUNNING"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
2. If running, notify the UI that this session is disconnecting. The server will handle cleanup.
|
|
17
|
+
|
|
18
|
+
3. Display confirmation:
|
|
19
|
+
```
|
|
20
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
21
|
+
🔌 Disconnected from Upfyn-Code
|
|
22
|
+
|
|
23
|
+
Your CLI session is no longer synced to the web UI.
|
|
24
|
+
The server is still running at http://localhost:3001
|
|
25
|
+
|
|
26
|
+
Use /upfynai-connect to reconnect
|
|
27
|
+
Use /upfynai-stop to shut down the server
|
|
28
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run Upfyn-Code diagnostics — check installation, server, connection, and project config
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Upfyn-Code — Doctor (Diagnostics)
|
|
6
|
+
|
|
7
|
+
You are the Upfyn-Code assistant. Run a full diagnostic check and report the results.
|
|
8
|
+
|
|
9
|
+
## Checks to perform
|
|
10
|
+
|
|
11
|
+
Run each check and report with ✅ (pass), ⚠️ (warning), or ❌ (fail):
|
|
12
|
+
|
|
13
|
+
1. **Package installed**: Check if `upfynai-code` is installed globally
|
|
14
|
+
```
|
|
15
|
+
npm list -g upfynai-code --depth=0 2>/dev/null
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. **Server running**: Check health endpoint
|
|
19
|
+
```
|
|
20
|
+
curl -s http://localhost:3001/health 2>/dev/null
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
3. **Claude Code CLI**: Verify `claude` CLI is available
|
|
24
|
+
```
|
|
25
|
+
which claude 2>/dev/null || where claude 2>/dev/null
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
4. **Node.js version**: Check node version (needs 18+)
|
|
29
|
+
```
|
|
30
|
+
node --version
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
5. **Project .claude directory**: Check if current project has `.claude/` folder
|
|
34
|
+
```
|
|
35
|
+
ls -la .claude/ 2>/dev/null || echo "NO_CLAUDE_DIR"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
6. **Project CLAUDE.md**: Check if project has CLAUDE.md instructions
|
|
39
|
+
```
|
|
40
|
+
ls CLAUDE.md 2>/dev/null || echo "NO_CLAUDE_MD"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
7. **User commands directory**: Check `~/.claude/commands/` exists
|
|
44
|
+
```
|
|
45
|
+
ls ~/.claude/commands/ 2>/dev/null || echo "NO_COMMANDS_DIR"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
8. **Upfyn-Code commands installed**: Check if upfynai slash commands are in `~/.claude/commands/`
|
|
49
|
+
```
|
|
50
|
+
ls ~/.claude/commands/upfynai*.md 2>/dev/null || echo "NOT_INSTALLED"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
9. **Database**: Check if auth.db exists
|
|
54
|
+
```
|
|
55
|
+
ls ~/.claude/upfynai-code/auth.db 2>/dev/null || echo "NO_DB"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
10. **Port availability**: Check if port 3001 is in use
|
|
59
|
+
```
|
|
60
|
+
lsof -i :3001 2>/dev/null || netstat -an | grep 3001 2>/dev/null || echo "PORT_FREE"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
11. **MCP servers**: Check if any MCP servers are configured in `.claude/`
|
|
64
|
+
```
|
|
65
|
+
cat .claude/mcp.json 2>/dev/null || echo "NO_MCP"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
12. **Settings**: Check Claude settings
|
|
69
|
+
```
|
|
70
|
+
cat ~/.claude/settings.json 2>/dev/null || echo "NO_SETTINGS"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Output format
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
77
|
+
Upfyn-Code Doctor — Diagnostics Report
|
|
78
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
79
|
+
|
|
80
|
+
[✅/❌] Package installed: [version or NOT FOUND]
|
|
81
|
+
[✅/❌] Server running: [status]
|
|
82
|
+
[✅/❌] Claude CLI: [path]
|
|
83
|
+
[✅/❌] Node.js: [version]
|
|
84
|
+
[✅/⚠️] Project .claude/: [found/missing]
|
|
85
|
+
[✅/⚠️] CLAUDE.md: [found/missing]
|
|
86
|
+
[✅/❌] Commands directory: [path]
|
|
87
|
+
[✅/⚠️] Upfyn-Code commands: [installed/missing]
|
|
88
|
+
[✅/⚠️] Database: [path/missing]
|
|
89
|
+
[✅/⚠️] Port 3001: [in use/free]
|
|
90
|
+
[✅/⚠️] MCP servers: [count or none]
|
|
91
|
+
[✅/⚠️] Settings: [found/missing]
|
|
92
|
+
|
|
93
|
+
Summary: X passed, Y warnings, Z failed
|
|
94
|
+
|
|
95
|
+
[If any failures, suggest fixes]
|
|
96
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Export current session or canvas data to file
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Upfyn-Code — Export Session/Canvas
|
|
6
|
+
|
|
7
|
+
You are the Upfyn-Code assistant. The user wants to export their session or canvas data.
|
|
8
|
+
|
|
9
|
+
## What to do
|
|
10
|
+
|
|
11
|
+
### Determine export type from arguments
|
|
12
|
+
- `$ARGUMENTS` may contain: `session`, `canvas`, `all`, or a file path
|
|
13
|
+
|
|
14
|
+
### Option 1: Export session conversation
|
|
15
|
+
1. Read the current session's conversation from Claude Code's session files:
|
|
16
|
+
```
|
|
17
|
+
ls ~/.claude/projects/*/sessions/ 2>/dev/null
|
|
18
|
+
```
|
|
19
|
+
2. Find the active session's JSONL file
|
|
20
|
+
3. Parse and format the conversation into readable markdown
|
|
21
|
+
4. Save to the specified path or default `./upfynai-export-[timestamp].md`
|
|
22
|
+
|
|
23
|
+
### Option 2: Export canvas state
|
|
24
|
+
1. If the server is running, fetch canvas state from the API:
|
|
25
|
+
```
|
|
26
|
+
curl -s http://localhost:3001/api/canvas-state 2>/dev/null
|
|
27
|
+
```
|
|
28
|
+
2. Format the canvas nodes as a structured JSON or markdown document
|
|
29
|
+
3. Include: node types, connections, tool calls, responses, timestamps
|
|
30
|
+
|
|
31
|
+
### Option 3: Export all (default)
|
|
32
|
+
Export both session conversation and canvas state.
|
|
33
|
+
|
|
34
|
+
### Output format
|
|
35
|
+
```
|
|
36
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
37
|
+
📤 Upfyn-Code Export
|
|
38
|
+
|
|
39
|
+
Type: [session/canvas/all]
|
|
40
|
+
File: [output path]
|
|
41
|
+
Nodes: [count]
|
|
42
|
+
Messages: [count]
|
|
43
|
+
Size: [file size]
|
|
44
|
+
|
|
45
|
+
Export saved successfully!
|
|
46
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Install Upfyn-Code locally for this project — sets up .claude integration, commands, and config
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Upfyn-Code — Local Installation
|
|
6
|
+
|
|
7
|
+
You are the Upfyn-Code assistant. The user wants to install Upfyn-Code locally for the current project. This sets up the full integration between this project's Claude Code CLI and the web UI.
|
|
8
|
+
|
|
9
|
+
## What to do
|
|
10
|
+
|
|
11
|
+
### Step 1: Install the npm package globally (if not already)
|
|
12
|
+
```
|
|
13
|
+
npm list -g upfynai-code --depth=0 2>/dev/null || npm install -g upfynai-code
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Step 2: Create user-level commands directory
|
|
17
|
+
```
|
|
18
|
+
mkdir -p ~/.claude/commands
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Step 3: Copy all Upfyn-Code slash commands to user commands
|
|
22
|
+
Copy the following command files from the upfynai-code package into `~/.claude/commands/`:
|
|
23
|
+
- `upfynai.md`
|
|
24
|
+
- `upfynai-connect.md`
|
|
25
|
+
- `upfynai-disconnect.md`
|
|
26
|
+
- `upfynai-doctor.md`
|
|
27
|
+
- `upfynai-local.md`
|
|
28
|
+
- `upfynai-uninstall.md`
|
|
29
|
+
- `upfynai-export.md`
|
|
30
|
+
- `upfynai-status.md`
|
|
31
|
+
- `upfynai-stop.md`
|
|
32
|
+
|
|
33
|
+
Find the package location:
|
|
34
|
+
```
|
|
35
|
+
npm root -g
|
|
36
|
+
```
|
|
37
|
+
Then copy from `[global_modules]/upfynai-code/commands/` to `~/.claude/commands/`.
|
|
38
|
+
|
|
39
|
+
### Step 4: Set up project .claude directory
|
|
40
|
+
```
|
|
41
|
+
mkdir -p .claude/commands
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Step 5: Read existing project configuration
|
|
45
|
+
If `.claude/` directory already exists, read and preserve:
|
|
46
|
+
- `CLAUDE.md` — project instructions
|
|
47
|
+
- `.claude/settings.json` — project settings
|
|
48
|
+
- `.claude/mcp.json` — MCP server config
|
|
49
|
+
- `.claude/commands/` — project-level custom commands
|
|
50
|
+
|
|
51
|
+
Report what was found to the user.
|
|
52
|
+
|
|
53
|
+
### Step 6: Create/update project CLAUDE.md with Upfyn-Code context
|
|
54
|
+
If CLAUDE.md exists, append an Upfyn-Code section. If not, mention that the user can create one.
|
|
55
|
+
Do NOT overwrite existing CLAUDE.md content.
|
|
56
|
+
|
|
57
|
+
### Step 7: Display completion
|
|
58
|
+
```
|
|
59
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
+
✅ Upfyn-Code installed locally!
|
|
61
|
+
|
|
62
|
+
📁 Project: [current directory]
|
|
63
|
+
📂 .claude/ directory: [found/created]
|
|
64
|
+
📄 CLAUDE.md: [found/created note]
|
|
65
|
+
🔧 MCP servers: [count found]
|
|
66
|
+
⚡ Slash commands installed to ~/.claude/commands/
|
|
67
|
+
|
|
68
|
+
Available commands:
|
|
69
|
+
/upfynai — Start the web UI server
|
|
70
|
+
/upfynai-connect — Connect this session to web UI
|
|
71
|
+
/upfynai-disconnect — Disconnect from web UI
|
|
72
|
+
/upfynai-status — Show connection status
|
|
73
|
+
/upfynai-doctor — Run diagnostics
|
|
74
|
+
/upfynai-export — Export session/canvas data
|
|
75
|
+
/upfynai-stop — Stop the web UI server
|
|
76
|
+
/upfynai-uninstall — Remove Upfyn-Code
|
|
77
|
+
|
|
78
|
+
Next step: Run /upfynai to start the web UI
|
|
79
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show Upfyn-Code connection status — server, sessions, project info
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Upfyn-Code — Status
|
|
6
|
+
|
|
7
|
+
You are the Upfyn-Code assistant. Show the current status of the Upfyn-Code system.
|
|
8
|
+
|
|
9
|
+
## What to do
|
|
10
|
+
|
|
11
|
+
Gather and display all of the following:
|
|
12
|
+
|
|
13
|
+
1. **Server status**: Check if the server is running
|
|
14
|
+
```
|
|
15
|
+
curl -s http://localhost:3001/health 2>/dev/null || echo "NOT_RUNNING"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. **Current project**: Show `pwd` and whether it has `.claude/` directory
|
|
19
|
+
```
|
|
20
|
+
pwd
|
|
21
|
+
ls -d .claude 2>/dev/null || echo "NO_CLAUDE_DIR"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
3. **Project CLAUDE.md**: Check for project instructions
|
|
25
|
+
```
|
|
26
|
+
test -f CLAUDE.md && echo "FOUND" || echo "NOT_FOUND"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
4. **Project .claude/settings.json**: Check project settings
|
|
30
|
+
```
|
|
31
|
+
cat .claude/settings.json 2>/dev/null || echo "NO_SETTINGS"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
5. **MCP servers**: Check configured MCP servers
|
|
35
|
+
```
|
|
36
|
+
cat .claude/mcp.json 2>/dev/null || echo "NO_MCP"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
6. **Active sessions**: If server is running, get session count
|
|
40
|
+
```
|
|
41
|
+
curl -s http://localhost:3001/api/projects 2>/dev/null
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
7. **Installed version**:
|
|
45
|
+
```
|
|
46
|
+
npm list -g upfynai-code --depth=0 2>/dev/null
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
8. **Slash commands**: Check which upfynai commands are installed
|
|
50
|
+
```
|
|
51
|
+
ls ~/.claude/commands/upfynai*.md 2>/dev/null
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Output format
|
|
55
|
+
```
|
|
56
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
57
|
+
Upfyn-Code — Status
|
|
58
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
59
|
+
|
|
60
|
+
Server: [🟢 Running at http://localhost:3001 / 🔴 Not running]
|
|
61
|
+
Version: [x.y.z]
|
|
62
|
+
Project: [current directory name]
|
|
63
|
+
.claude/: [✅ Found / ⚠️ Not found]
|
|
64
|
+
CLAUDE.md: [✅ Found / ⚠️ Not found]
|
|
65
|
+
MCP servers: [count or none]
|
|
66
|
+
Settings: [found/default]
|
|
67
|
+
Sessions: [count active]
|
|
68
|
+
Commands: [count installed] / 9 total
|
|
69
|
+
|
|
70
|
+
[If server running, show URL]
|
|
71
|
+
[If not running, suggest /upfynai to start]
|
|
72
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
$ARGUMENTS
|