@nshipster/sosumi 1.0.0 → 1.0.4

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/public/index.html CHANGED
@@ -223,18 +223,24 @@
223
223
  }
224
224
 
225
225
  #clients .interface-tabs,
226
- #clients .client-tabs {
226
+ #clients .mcp-tabs,
227
+ #cli .cli-tabs,
228
+ #skill .skill-tabs {
227
229
  background: var(--surface-inset);
228
230
  border-radius: 0.5rem;
229
231
  overflow: hidden;
230
232
  }
231
233
 
232
- #clients .tab-buttons {
234
+ #clients .mcp-tabs .tab-buttons,
235
+ #cli .cli-tabs .tab-buttons,
236
+ #skill .skill-tabs .tab-buttons {
233
237
  display: flex;
234
238
  border-bottom: 1px solid var(--border);
235
239
  }
236
240
 
237
- #clients .tab-button {
241
+ #clients .mcp-tabs .tab-button,
242
+ #cli .cli-tabs .tab-button,
243
+ #skill .skill-tabs .tab-button {
238
244
  flex: 1;
239
245
  padding: 1rem 1.5rem;
240
246
  background: transparent;
@@ -247,72 +253,93 @@
247
253
  border-bottom: 2px solid transparent;
248
254
  }
249
255
 
250
- #clients .tab-button:hover {
256
+ #clients .mcp-tabs .tab-button:hover,
257
+ #cli .cli-tabs .tab-button:hover,
258
+ #skill .skill-tabs .tab-button:hover {
251
259
  color: var(--text);
252
260
  background: var(--surface-inset-deep);
253
261
  }
254
262
 
255
- #clients .tab-button.active {
263
+ #clients .mcp-tabs .tab-button.active,
264
+ #cli .cli-tabs .tab-button.active,
265
+ #skill .skill-tabs .tab-button.active {
256
266
  color: var(--text);
257
267
  border-bottom-color: var(--accent);
258
268
  background: var(--surface);
259
269
  }
260
270
 
261
- #clients .tab-content {
271
+ #clients .mcp-tabs .tab-content,
272
+ #skill .skill-tabs .tab-content {
262
273
  position: relative;
263
274
  }
264
275
 
265
- #clients .tab-pane {
276
+ #clients .mcp-tabs .tab-pane,
277
+ #cli .cli-tabs .tab-pane,
278
+ #skill .skill-tabs .tab-pane {
266
279
  display: none;
267
280
  padding: 1.5rem;
268
281
  }
269
282
 
270
- #clients .tab-pane.active {
283
+ #clients .mcp-tabs .tab-pane.active,
284
+ #cli .cli-tabs .tab-pane.active,
285
+ #skill .skill-tabs .tab-pane.active {
271
286
  display: block;
272
287
  }
273
288
 
274
- #clients .tab-pane h3 {
289
+ #clients .mcp-tabs .tab-pane h3 {
275
290
  margin-top: 0;
276
291
  margin-bottom: 1rem;
277
292
  color: var(--text);
278
293
  }
279
294
 
280
- #clients .tab-pane h4 {
295
+ #clients .mcp-tabs .tab-pane h4 {
281
296
  margin-top: 1.5rem;
282
297
  margin-bottom: 0.75rem;
283
298
  color: var(--text-secondary);
284
299
  font-size: 1rem;
285
300
  }
286
301
 
287
- #clients .tab-pane ol {
302
+ #clients .mcp-tabs .tab-pane ol {
288
303
  margin: 0.75rem 0;
289
304
  padding-left: 1.5rem;
290
305
  }
291
306
 
292
- #clients .tab-pane li {
307
+ #clients .mcp-tabs .tab-pane li {
293
308
  margin-bottom: 0.5rem;
294
309
  }
295
310
 
296
- #clients .tab-pane p {
311
+ #clients .mcp-tabs .tab-pane p,
312
+ #cli .cli-tabs .tab-pane p,
313
+ #skill .skill-tabs .tab-pane p {
297
314
  margin: 0.75rem 0;
298
315
  }
299
316
 
300
- #clients .tab-pane em {
317
+ #clients .mcp-tabs .tab-pane em {
301
318
  color: var(--text-secondary);
302
319
  font-style: italic;
303
320
  }
304
321
 
322
+ #cli .cli-tabs {
323
+ margin-top: 1.5rem;
324
+ }
325
+
305
326
  @media (max-width: 768px) {
306
- #clients .tab-buttons {
327
+ #clients .mcp-tabs .tab-buttons,
328
+ #cli .cli-tabs .tab-buttons,
329
+ #skill .skill-tabs .tab-buttons {
307
330
  flex-direction: column;
308
331
  }
309
332
 
310
- #clients .tab-button {
333
+ #clients .mcp-tabs .tab-button,
334
+ #cli .cli-tabs .tab-button,
335
+ #skill .skill-tabs .tab-button {
311
336
  border-bottom: 1px solid var(--border);
312
337
  border-right: none;
313
338
  }
314
339
 
315
- #clients .tab-button.active {
340
+ #clients .mcp-tabs .tab-button.active,
341
+ #cli .cli-tabs .tab-button.active,
342
+ #skill .skill-tabs .tab-button.active {
316
343
  border-bottom-color: var(--border);
317
344
  border-right: 2px solid var(--accent);
318
345
  }
@@ -342,6 +369,20 @@
342
369
  overflow-wrap: break-word;
343
370
  }
344
371
 
372
+ pre {
373
+ background: var(--surface-inset);
374
+ padding: 1.25rem;
375
+ border-radius: 0.5rem;
376
+ overflow-x: auto;
377
+ }
378
+
379
+ pre code {
380
+ background: none;
381
+ padding: 0;
382
+ word-break: normal;
383
+ overflow-wrap: normal;
384
+ }
385
+
345
386
  main header {
346
387
  margin-bottom: 2rem;
347
388
  }
@@ -418,6 +459,11 @@
418
459
  color: var(--code-punctuation-color);
419
460
  }
420
461
 
462
+ pre code .comment {
463
+ color: var(--text-tertiary);
464
+ font-style: italic;
465
+ }
466
+
421
467
  pre code .sosumi-entry {
422
468
  background-color: var(--surface-inset-deep);
423
469
  display: block;
@@ -514,20 +560,17 @@
514
560
  });
515
561
  });
516
562
 
517
- // Client tabs (Cursor, VSCode, etc.)
518
- const clientTabButtons = document.querySelectorAll('.client-tabs .tab-button');
519
- const clientTabPanes = document.querySelectorAll('.client-tabs .tab-pane');
520
- clientTabButtons.forEach(button => {
521
- button.addEventListener('click', function () {
522
- const targetTab = this.getAttribute('data-tab');
523
-
524
- // Remove active class from all client buttons and panes
525
- clientTabButtons.forEach(btn => btn.classList.remove('active'));
526
- clientTabPanes.forEach(pane => pane.classList.remove('active'));
527
-
528
- // Add active class to clicked button and corresponding pane
529
- this.classList.add('active');
530
- document.getElementById(targetTab + '-tab').classList.add('active');
563
+ document.querySelectorAll('.mcp-tabs, .cli-tabs, .skill-tabs').forEach(tabGroup => {
564
+ const buttons = tabGroup.querySelectorAll('.tab-button');
565
+ const panes = tabGroup.querySelectorAll('.tab-pane');
566
+ buttons.forEach(button => {
567
+ button.addEventListener('click', function () {
568
+ const targetTab = this.getAttribute('data-tab');
569
+ buttons.forEach(btn => btn.classList.remove('active'));
570
+ panes.forEach(pane => pane.classList.remove('active'));
571
+ this.classList.add('active');
572
+ document.getElementById(targetTab + '-tab').classList.add('active');
573
+ });
531
574
  });
532
575
  });
533
576
  });
@@ -571,6 +614,9 @@
571
614
  <p>
572
615
  This service translates Apple Developer documentation, Human Interface Guidelines, WWDC sessions, and external Swift-DocC sites into AI-friendly Markdown.
573
616
  </p>
617
+ <p>
618
+ Access it in your <a href="#http">browser</a>, over <a href="#mcp">MCP</a>, from the <a href="#cli">command line</a>, as an <a href="#skill">AI skill</a>, or with an unofficial <a href="https://chromewebstore.google.com/detail/donffakeimppgoehccpfhlchmbfdmfpj" rel="noopener noreferrer">Chrome extension</a>.
619
+ </p>
574
620
  </header>
575
621
 
576
622
  <section id="http">
@@ -610,25 +656,6 @@
610
656
  </section>
611
657
 
612
658
 
613
- <section id="bot">
614
- <header>
615
- <h2>Bot & Crawling Policy</h2>
616
- <p>
617
- Fetches are made with the user agent
618
- <code class="no-wrap">sosumi-ai/1.0 (+https://sosumi.ai/#bot)</code>.
619
- </p>
620
- <p>
621
- For external Swift-DocC hosts, sosumi honors
622
- <code class="no-wrap">robots.txt</code> rules and opt-out response directives such as
623
- <code class="no-wrap">X-Robots-Tag: noai</code>.
624
- </p>
625
- <p>
626
- Questions or issues: <a href="mailto:info@sosumi.ai">info@sosumi.ai</a>
627
- </p>
628
- </header>
629
- </section>
630
-
631
-
632
659
  <section id="mcp">
633
660
  <header>
634
661
  <h2>MCP Usage</h2>
@@ -638,7 +665,7 @@
638
665
  </p>
639
666
 
640
667
  <figure id="clients">
641
- <div class="client-tabs">
668
+ <div class="mcp-tabs">
642
669
  <div class="tab-buttons">
643
670
  <button class="tab-button active" data-tab="copilot-xcode">GitHub Copilot for Xcode</button>
644
671
  <button class="tab-button" data-tab="cursor">Cursor</button>
@@ -807,21 +834,19 @@
807
834
  </li>
808
835
  </ul>
809
836
  </div>
810
- </section>
811
-
812
837
 
813
- <div class="troubleshooting">
814
- <h3>Troubleshooting</h3>
815
- <p>
816
- If you're experiencing connection timeouts or network issues with the MCP server,
817
- you may need to configure a proxy.
818
- This is particularly common in corporate environments
819
- or regions with restricted internet access.
820
- </p>
821
- <p>
822
- Configure your MCP client to use a proxy by adding environment variables:
823
- </p>
824
- <pre><code class="mcp-config"><span class="dimmed"><span class="punctuation">{</span></span>
838
+ <div class="troubleshooting">
839
+ <h3>Troubleshooting</h3>
840
+ <p>
841
+ If you're experiencing connection timeouts or network issues with the MCP server,
842
+ you may need to configure a proxy.
843
+ This is particularly common in corporate environments
844
+ or regions with restricted internet access.
845
+ </p>
846
+ <p>
847
+ Configure your MCP client to use a proxy by adding environment variables:
848
+ </p>
849
+ <pre><code class="mcp-config"><span class="dimmed"><span class="punctuation">{</span></span>
825
850
  <span class="dimmed"> <span class="key">"mcpServers"</span><span class="punctuation">:</span> <span class="punctuation">{</span></span>
826
851
  <span class="sosumi-entry"> <span class="key">"sosumi"</span><span class="punctuation">:</span> <span class="punctuation">{</span>
827
852
  <span class="key">"command"</span><span class="punctuation">:</span> <span class="string">"npx"</span><span class="punctuation">,</span>
@@ -836,12 +861,140 @@
836
861
  <span class="punctuation">}</span>
837
862
  <span class="punctuation">}</span></span><span class="dimmed"> <span class="punctuation">}</span></span>
838
863
  <span class="dimmed"><span class="punctuation">}</span></span></code></pre>
864
+ <p>
865
+ Replace <code>proxy.example.com:8080</code> with your actual proxy server details.
866
+ For authenticated proxies, use the format:
867
+ <code>http://username:password@proxy.example.com:8080</code>
868
+ </p>
869
+ </div>
870
+ </section>
871
+
872
+
873
+ <section id="cli">
874
+ <header>
875
+ <h2>CLI Usage</h2>
876
+ <p>
877
+ Sosumi also provides a CLI that complements MCP.
878
+ </p>
879
+ </header>
880
+
881
+ <div class="cli-tabs">
882
+ <div class="tab-buttons">
883
+ <button class="tab-button active" data-tab="rt-node">Node.js</button>
884
+ <button class="tab-button" data-tab="rt-bun">Bun</button>
885
+ <button class="tab-button" data-tab="rt-deno">Deno</button>
886
+ </div>
887
+
888
+ <div class="tab-pane active" id="rt-node-tab">
889
+ <p>Run directly with <a href="https://docs.npmjs.com/cli/commands/npx" rel="noopener noreferrer"><code>npx</code></a>
890
+ (included with <a href="https://nodejs.org/" rel="noopener noreferrer">Node.js</a>):</p>
891
+ <pre><code>npx @nshipster/sosumi fetch https://developer.apple.com/documentation/swift/array</code></pre>
892
+ <p>If you use it regularly, install it once:</p>
893
+ <pre><code>npm i -g @nshipster/sosumi</code></pre>
894
+ </div>
895
+
896
+ <div class="tab-pane" id="rt-bun-tab">
897
+ <p>Run directly with <a href="https://bun.sh/docs/cli/bunx" rel="noopener noreferrer"><code>bunx</code></a>
898
+ (included with <a href="https://bun.sh/" rel="noopener noreferrer">Bun</a>):</p>
899
+ <pre><code>bunx @nshipster/sosumi fetch https://developer.apple.com/documentation/swift/array</code></pre>
900
+ <p>If you use it regularly, install it once:</p>
901
+ <pre><code>bun i -g @nshipster/sosumi</code></pre>
902
+ </div>
903
+
904
+ <div class="tab-pane" id="rt-deno-tab">
905
+ <p>Run directly with <a href="https://docs.deno.com/runtime/reference/cli/run/" rel="noopener noreferrer"><code>deno run</code></a>:</p>
906
+ <pre><code>deno run -A npm:@nshipster/sosumi fetch https://developer.apple.com/documentation/swift/array</code></pre>
907
+ <p>If you use it regularly, install it once:</p>
908
+ <pre><code>deno install -g -A npm:@nshipster/sosumi</code></pre>
909
+ </div>
910
+ </div>
911
+
912
+ <h3>Fetching Documentation</h3>
839
913
  <p>
840
- Replace <code>proxy.example.com:8080</code> with your actual proxy server details.
841
- For authenticated proxies, use the format:
842
- <code>http://username:password@proxy.example.com:8080</code>
914
+ Fetch any content type supported by the MCP tools —
915
+ API docs, Human Interface Guidelines, WWDC sessions, and external Swift-DocC pages:
843
916
  </p>
844
- </div>
917
+ <pre><code>sosumi fetch /documentation/swift/array
918
+ sosumi fetch /design/human-interface-guidelines/color
919
+ sosumi fetch /videos/play/wwdc2021/10133
920
+ sosumi fetch https://apple.github.io/swift-argument-parser/documentation/argumentparser</code></pre>
921
+
922
+ <h3>Searching</h3>
923
+ <p>Search Apple Developer documentation:</p>
924
+ <pre><code>sosumi search "SwiftData"</code></pre>
925
+
926
+ <h3>JSON Output</h3>
927
+ <p>
928
+ By default, output is plain text / Markdown.
929
+ Add <code>--json</code> for scripts:
930
+ </p>
931
+ <pre><code>sosumi fetch /documentation/swift/array --json
932
+ sosumi search "SwiftData" --json</code></pre>
933
+
934
+ <h3>Local Server</h3>
935
+ <p>Run a local instance of the server from the published package:</p>
936
+ <pre><code>sosumi serve
937
+ sosumi serve --port 8787</code></pre>
938
+ </section>
939
+
940
+ <section id="skill">
941
+ <header>
942
+ <h2>AI Agent Skill</h2>
943
+ <p>
944
+ Teach your coding assistant to use Sosumi consistently with:
945
+ <code class="no-wrap"><a href="https://sosumi.ai/SKILL.md">https://sosumi.ai/SKILL.md</a></code>
946
+ </p>
947
+ <p>
948
+ Spec-compliant clients can also discover the skill from this domain:
949
+ </p>
950
+ <pre><code>npx skills add https://sosumi.ai</code></pre>
951
+ </header>
952
+
953
+ <div class="skill-tabs">
954
+ <div class="tab-buttons">
955
+ <button class="tab-button active" data-tab="skill-claude-code">Claude Code</button>
956
+ <button class="tab-button" data-tab="skill-codex">Codex</button>
957
+ <button class="tab-button" data-tab="skill-cursor">Cursor</button>
958
+ <button class="tab-button" data-tab="skill-agents">Other</button>
959
+ </div>
960
+
961
+ <div class="tab-content">
962
+ <div class="tab-pane active" id="skill-claude-code-tab">
963
+ <p>Install as a reusable skill (personal or project-level):</p>
964
+ <pre><code><span class="comment"># Personal skill (all your projects)</span>
965
+ mkdir -p ~/.claude/skills/sosumi
966
+ curl -o ~/.claude/skills/sosumi/SKILL.md https://sosumi.ai/SKILL.md
967
+
968
+ <span class="comment"># Project skill (just this project)</span>
969
+ mkdir -p .claude/skills/sosumi
970
+ curl -o .claude/skills/sosumi/SKILL.md https://sosumi.ai/SKILL.md</code></pre>
971
+ </div>
972
+
973
+ <div class="tab-pane" id="skill-codex-tab">
974
+ <p>Install globally:</p>
975
+ <pre><code><span class="comment"># Global instructions (all your projects)</span>
976
+ mkdir -p ~/.agents/skills/sosumi
977
+ curl -o ~/.agents/skills/sosumi/SKILL.md https://sosumi.ai/SKILL.md</code></pre>
978
+ </div>
979
+
980
+ <div class="tab-pane" id="skill-cursor-tab">
981
+ <p>Install as a Cursor skill (global or project-level):</p>
982
+ <pre><code><span class="comment"># Personal skill (all your projects)</span>
983
+ mkdir -p ~/.cursor/skills/sosumi
984
+ curl -o ~/.cursor/skills/sosumi/SKILL.md https://sosumi.ai/SKILL.md
985
+
986
+ <span class="comment"># Project skill (just this project)</span>
987
+ mkdir -p .cursor/skills/sosumi
988
+ curl -o .cursor/skills/sosumi/SKILL.md https://sosumi.ai/SKILL.md</code></pre>
989
+ </div>
990
+
991
+ <div class="tab-pane" id="skill-agents-tab">
992
+ <p>For AGENTS-compatible tools, install as a reusable skill:</p>
993
+ <pre><code>mkdir -p ~/.agents/skills/sosumi
994
+ curl -o ~/.agents/skills/sosumi/SKILL.md https://sosumi.ai/SKILL.md</code></pre>
995
+ </div>
996
+ </div>
997
+ </div>
845
998
  </section>
846
999
  </main>
847
1000
 
@@ -876,6 +1029,13 @@
876
1029
  You are solely responsible for how you access and use Apple's content through this tool.
877
1030
  Do not use this service to circumvent technical measures or for redistribution.
878
1031
  </p>
1032
+ <p id="bot">
1033
+ Fetches are made with the user agent
1034
+ <code class="no-wrap">sosumi-ai/1.0 (+https://sosumi.ai/#bot)</code>.
1035
+ For external Swift-DocC hosts, sosumi honors
1036
+ <code class="no-wrap">robots.txt</code> rules and opt-out response directives such as
1037
+ <code class="no-wrap">X-Robots-Tag: noai</code>.
1038
+ </p>
879
1039
  <p>
880
1040
  <strong>Contact:</strong> <a href="mailto:info@sosumi.ai">info@sosumi.ai</a>
881
1041
  </p>