Commit Graph
12 Commits
Author SHA1 Message Date
Willie e9dc4d0360 feat(server)!: answer only at localhost, IP addresses and trusted origins (#811)
DNS rebinding lets a page point its own domain at the user's machine,
which makes its requests same-origin to the dashboard, so the CSRF
guard cannot refuse them. Only the MCP, Hooks and Plugins routes
required a localhost or IP Host, so such a page could still install,
sync and push. That rule also blocked those three pages for people who
run the dashboard behind their own reverse proxy (#809).

The dashboard now answers every route only at localhost, an IP address,
the --host name, and origins given with --trusted-origin or
SKILLSHARE_UI_TRUSTED_ORIGINS. Configuration stays outside config.yaml
so the dashboard cannot widen its own trust through its config API. A
trusted origin must match the Host with its scheme, and an Origin
header, when sent, must be that origin. A refused browser gets a page
with the exact setting to copy, the API gets it in the error, and the
server log names each refused Host once.

BREAKING CHANGE: a dashboard opened by a domain name, such as a reverse
proxy, a Tailscale or mDNS name, or a Docker service name, now returns
403 on every page until that address is trusted, for example with
`skillshare ui start --trusted-origin https://skills.example.com`.

Release-As: 0.30.0
2026-11-09 11:59:50 +08:00
Rusty Shackleford 5dd9925c98 fix(projects): keep registrations in machine-local state (#769)
Keep machine-specific project changes out of shared configuration while preserving shared registrations and making their origin visible. Handle missing replicated roots and preserve startup maintenance for mutating commands.
2026-11-05 15:23:28 +08:00
Willie 70cb287672 fix(plugin): find the Codex CLI the desktop app ships (#383)
* fix(plugin): find the Codex CLI the desktop app ships

Plugin commands ran the bare name `codex` from PATH, so a machine with only
the Codex desktop app, or a scheduled job started with a minimal PATH,
reported the CLI as missing. The account-only `cli` override did not help:
the default codex target cannot set it, and an absolute path in a config
shared between macOS and Windows is wrong on one of them.

When `codex` is not on PATH, look in Homebrew's folders and the CLI the app
installs (Codex.app on macOS, %LOCALAPPDATA%\OpenAI\Codex\bin on Windows).
SKILLSHARE_CODEX_CLI overrides the search on one machine without touching
the synced config. The missing-CLI error now lists every place searched, in
the CLI and the dashboard.

Refs #338

* docs(plugin): note where Skillshare finds the Codex CLI

The plugin reference and the sharing guide still said every native CLI must
be on PATH, and the built-in skill told agents a missing CLI has no
fallback. Codex now has one, plus a machine-local override that agents
should prefer over a path in a shared config.

Refs #338

* fix(plugin): look for the Codex CLI inside ChatGPT.app

Since the Codex desktop app merged with ChatGPT, macOS installs it as
ChatGPT.app, so an app-only Mac with a minimal PATH still reported Codex as
missing. Try ChatGPT.app before Codex.app in /Applications and
~/Applications, the order Codex's own desktop-app finder uses.

Refs #338

* fix(plugin): run the packaged CLI entrypoint of the ChatGPT app

ChatGPT Desktop 26.924 removed Contents/Resources/codex and ships the CLI
at the entrypoint its package manifest declares, codex-cli/bin/codex, so a
current app-only Mac still reported Codex as missing. Try that entrypoint
first in each app bundle and keep the old path for earlier builds.

Refs #338

* fix(plugin): find the Codex CLI from the Windows installer

The official PowerShell installer puts codex.exe in
%LOCALAPPDATA%\Programs\OpenAI\Codex\bin and adds it to the user PATH. A job
started without that PATH missed it, the same gap Homebrew's folders cover
on macOS. Try it before the desktop app's copy.

Refs #338

* fix(plugin): keep an account's cli even when it is codex

The Codex search ran whenever the executable was the bare name codex, so an
account that set cli: codex could get SKILLSHARE_CODEX_CLI or the app's CLI
instead, against the documented rule that an account's own cli is kept.
Search only when no account cli is set.

Refs #338
2026-10-04 15:16:14 +08:00
Willie 4415c7a75a docs(website): pin explicit anchors on headings that will be retranslated
These headings mix prose with technical terms (e.g. '.skillignore
(Optional)', 'Git Authentication', 'Target include/exclude filters')
and are referenced by anchor fragment from other pages. Translating
the prose changes the auto-generated slug and breaks the link, so
pin the current slug explicitly before the next translation batch.
2026-09-20 11:21:14 +08:00
Willie 296e80b745 docs: document Gitea and CNB tokens and host settings
The platform support merged without any docs, so a private repo on either
host failed with no hint about which token to set, and self-hosted
instances had no way to learn about gitea_hosts or cnb_hosts. Refs #168.
2026-09-20 03:36:56 +08:00
Willie e48a301623 feat: add azure_hosts config for Azure DevOps Server on-premises
Add azure_hosts config parameter (analogous to gitlab_hosts) that allows
users to register self-hosted Azure DevOps Server hostnames so they
receive proper URL parsing without appending .git to clone URLs.

- Add AzureHosts field to Config and ProjectConfig structs
- Add SKILLSHARE_AZURE_HOSTS env var support with merge semantics
- Generalize hostname validation into shared normalizeHostList/mergeHostsFromEnv
- Add azureOnPremPattern regex and parseAzureOnPrem for /_git/ URL routing
- Add isAzureHost for config-based host detection (no auto-detect)
- Update TrackName to handle on-prem Azure DevOps clone URLs
- Wire AzureHosts through InstallContext, ParseOptions, and Server
- Add JSON Schema, UI fieldDocs, and website documentation
- Add 19 new tests covering config, source parsing, and server

Closes #147
2026-05-05 18:33:07 +08:00
Willie 6d0ac1bf81 docs: add SKILLSHARE_UI_BASE_PATH to environment variables reference
Ref: #85
2026-03-18 22:35:02 +08:00
Willie 8f16a90e5f feat(config): add SKILLSHARE_GITLAB_HOSTS env var and cleanup
Support CI/CD pipelines that need gitlab_hosts without a config file.
The env var is comma-separated and merged (deduplicated) with config
file values in both global and project modes.

Also cleans up from review:
- Extract isValidGitLabHostname to share validation logic
- Remove redundant ToLower before EqualFold in isGitLabHost
- Revert 3 no-opts call sites back to ParseSource()
- Add parseOptsFromProjectConfig helper to reduce inline duplication
- Fix project mode LoadProject missing env var merge
- Add install.md tip about custom GitLab domains
2026-03-12 16:45:02 +08:00
Willie 272735c607 feat(install): detect SSL certificate errors and show actionable guidance
When git operations fail due to SSL certificate issues (self-signed certs,
internal CAs), the error message now suggests GIT_SSL_CAINFO, GIT_SSL_NO_VERIFY,
and SSH as alternatives instead of showing raw git stderr.

Env vars like GIT_SSL_CAINFO are already inherited via os.Environ() in
gitCommand() — the actual gap was error detection and user guidance.
2026-03-05 02:13:21 +08:00
Willie 1327586f30 docs: fix 17 factual errors across website documentation
Full content audit identified inaccuracies verified against source code:

Critical fixes:
- declarative-manifest: skills: migrated from config.yaml to registry.yaml
- private-enterprise-skills: fix token list, add --track, fix dir separator
- supported-targets: fix universal canonical name, kimi/replit paths, aliases
- with-multiple-tools: fix target list output format, opencode path

Moderate fixes:
- tracked-repositories, project-skills: update config examples for registry.yaml
- skill-format: name rule "underscore" -> "number" (per validSkillNameRegex)
- understand/index: fix opencode path in diagram, add copy mode
- comparison: ~/.cursor/rules -> ~/.cursor/skills
- configuration: fix backups path, add registry migration note
- with-devcontainer: add non-interactive flags for postCreateCommand
- migration: .source -> .skillshare-meta.json
- docker-sandbox: make --cmd -> ./scripts/test_docker.sh --cmd
- security: audit rule count 31 -> 32
- ci-cd-skill-validation: production -> CI docker image
- cross-machine-sync-recipe: replace unimplemented ignore with include/exclude
- environment-variables: add GH_TOKEN entry
2026-02-26 22:27:23 +08:00
Willie a88bb101c5 feat(auth): add AZURE_DEVOPS_TOKEN for Azure DevOps HTTPS authentication
Add PlatformAzureDevOps detection (dev.azure.com, ssh.dev.azure.com,
visualstudio.com) and AZURE_DEVOPS_TOKEN env var support. Token is
auto-injected via git config insteadOf rewrite, same pattern as
GITHUB_TOKEN/GITLAB_TOKEN/BITBUCKET_TOKEN.

Update error messages, sanitizeTokens redaction, environment-variables
docs with PAT creation guide and official Microsoft docs link, and
url-formats docs with Azure DevOps auth section.
2026-02-26 22:27:23 +08:00
Willie caa525b8aa feat(website): complete website revamp — Diátaxis IA, blog, recipes, quickstarts
Restructure the entire documentation site following the Diátaxis framework
(Learn / How-to / Understand / Reference) with new content across 110 files.

## Information Architecture (M1)
- Move all docs to Diátaxis directory structure (learn/, how-to/, understand/, reference/)
- Add client-redirects plugin for old URL compatibility
- Rewrite sidebar, navbar, and footer to match new IA
- Update all internal cross-references

## Homepage + Quickstarts (M2)
- Add scenario entry cards to homepage with hand-drawn design
- 5 quickstart pages: Claude Code, GitHub Copilot (with copy mode recommendation),
  Codex, Multiple Tools, Dev Containers, Playground

## Blog + Changelog (M3)
- Enable Docusaurus blog plugin with authors.yml
- 5 blog posts: 5-min tutorial, managing 50+ skills, skillshare vs vercel/skills
  comparison, team sharing patterns, write your first skill
- Static /changelog page from CHANGELOG.md

## Recipes + Philosophy (M4)
- 5 recipe pages: CI/CD validation, enterprise skills, project setup,
  cross-machine sync, team onboarding
- 3 philosophy pages: why-local-first, security-first, sync-modes-explained

## Content Polish
- Cross-validate all content against CLI source (19 inaccuracies fixed)
- Lowercase "skillshare" throughout (avoid brand conflict with Skillshare Inc.)
- Add registry.yaml to file structure and Key Paths docs
- Highlight multi-platform git support (GitHub, GitLab, Bitbucket, Gitea,
  Azure DevOps, AtomGit, Codeberg)
- Standardize brew install command
- Add AsciinemaPlayer component (cast recordings pending)
2026-02-26 22:27:23 +08:00