@shiplightai/mcp 0.1.45 → 0.1.47

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,25 @@
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "Shiplight AI",
4
+ "version": "0.1.0",
5
+ "description": "Attach Shiplight to your existing Chrome tab via a local CDP relay server.",
6
+ "icons": {
7
+ "16": "icons/icon16.png",
8
+ "32": "icons/icon32.png",
9
+ "48": "icons/icon48.png",
10
+ "128": "icons/icon128.png"
11
+ },
12
+ "permissions": ["debugger", "tabs", "activeTab", "storage", "alarms", "webNavigation"],
13
+ "host_permissions": ["http://127.0.0.1/*", "http://localhost/*"],
14
+ "background": { "service_worker": "background.js", "type": "module" },
15
+ "action": {
16
+ "default_title": "Shiplight AI (click to attach/detach)",
17
+ "default_icon": {
18
+ "16": "icons/icon16.png",
19
+ "32": "icons/icon32.png",
20
+ "48": "icons/icon48.png",
21
+ "128": "icons/icon128.png"
22
+ }
23
+ },
24
+ "options_ui": { "page": "options.html", "open_in_tab": true }
25
+ }
@@ -0,0 +1,103 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Shiplight AI - Options</title>
6
+ <style>
7
+ body {
8
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
9
+ max-width: 600px;
10
+ margin: 40px auto;
11
+ padding: 20px;
12
+ line-height: 1.6;
13
+ }
14
+ h1 {
15
+ color: #333;
16
+ border-bottom: 2px solid #FF5A36;
17
+ padding-bottom: 10px;
18
+ }
19
+ .setting {
20
+ margin: 20px 0;
21
+ }
22
+ label {
23
+ display: block;
24
+ margin-bottom: 5px;
25
+ font-weight: 600;
26
+ color: #555;
27
+ }
28
+ input[type="number"] {
29
+ width: 100%;
30
+ padding: 8px 12px;
31
+ border: 1px solid #ddd;
32
+ border-radius: 4px;
33
+ font-size: 14px;
34
+ box-sizing: border-box;
35
+ }
36
+ button {
37
+ background: #FF5A36;
38
+ color: white;
39
+ border: none;
40
+ padding: 10px 20px;
41
+ border-radius: 4px;
42
+ cursor: pointer;
43
+ font-size: 14px;
44
+ font-weight: 600;
45
+ }
46
+ button:hover {
47
+ background: #E64A26;
48
+ }
49
+ .status {
50
+ margin-top: 20px;
51
+ padding: 10px;
52
+ border-radius: 4px;
53
+ }
54
+ .status.success {
55
+ background: #E8F5E9;
56
+ color: #2E7D32;
57
+ }
58
+ .status.error {
59
+ background: #FFEBEE;
60
+ color: #C62828;
61
+ }
62
+ .help {
63
+ background: #F5F5F5;
64
+ padding: 15px;
65
+ border-radius: 4px;
66
+ margin-top: 30px;
67
+ font-size: 14px;
68
+ }
69
+ .help h3 {
70
+ margin-top: 0;
71
+ color: #333;
72
+ }
73
+ .help code {
74
+ background: #E0E0E0;
75
+ padding: 2px 6px;
76
+ border-radius: 3px;
77
+ font-family: 'Courier New', monospace;
78
+ }
79
+ </style>
80
+ </head>
81
+ <body>
82
+ <h1>Shiplight AI</h1>
83
+
84
+ <div class="setting">
85
+ <label for="relayPort">Relay Server Port</label>
86
+ <input type="number" id="relayPort" placeholder="e.g. 15170" min="1" max="65535">
87
+ <small>Enter the port from your MCP server's <code>--relay-port</code> flag.</small>
88
+ </div>
89
+
90
+ <button id="saveBtn">Save</button>
91
+
92
+ <div id="status" class="status" style="display:none;"></div>
93
+
94
+ <div class="help">
95
+ <h3>Setup</h3>
96
+ <p>1. Start MCP server with <code>--relay-port &lt;port&gt;</code></p>
97
+ <p>2. Enter the same port above and click Save</p>
98
+ <p>3. Click the Shiplight AI icon on any tab to attach</p>
99
+ </div>
100
+
101
+ <script src="options.js"></script>
102
+ </body>
103
+ </html>
@@ -0,0 +1,38 @@
1
+ const relayPortInput = document.getElementById('relayPort')
2
+ const saveBtn = document.getElementById('saveBtn')
3
+ const statusDiv = document.getElementById('status')
4
+
5
+ // Load saved settings
6
+ chrome.storage.local.get(['relayPort'], (result) => {
7
+ if (result.relayPort) {
8
+ relayPortInput.value = result.relayPort
9
+ }
10
+ })
11
+
12
+ // Save settings
13
+ saveBtn.addEventListener('click', async () => {
14
+ const raw = relayPortInput.value.trim()
15
+
16
+ if (!raw) {
17
+ // Clear port — disable relay
18
+ await chrome.storage.local.remove('relayPort')
19
+ showStatus('Port cleared. Relay disabled.', 'success')
20
+ return
21
+ }
22
+
23
+ const port = parseInt(raw, 10)
24
+ if (!port || port < 1 || port > 65535) {
25
+ showStatus('Invalid port number', 'error')
26
+ return
27
+ }
28
+
29
+ await chrome.storage.local.set({ relayPort: port })
30
+ showStatus('Settings saved!', 'success')
31
+ })
32
+
33
+ function showStatus(message, type) {
34
+ statusDiv.textContent = message
35
+ statusDiv.className = `status ${type}`
36
+ statusDiv.style.display = 'block'
37
+ setTimeout(() => { statusDiv.style.display = 'none' }, 3000)
38
+ }