···3131 Files []*RepoTree_TreeEntry `json:"files" cborgen:"files"`
3232 // parent: The parent path in the tree
3333 Parent *string `json:"parent,omitempty" cborgen:"parent,omitempty"`
3434+ // readme: Readme for this file tree
3535+ Readme *RepoTree_Readme `json:"readme,omitempty" cborgen:"readme,omitempty"`
3436 // ref: The git reference used
3537 Ref string `json:"ref" cborgen:"ref"`
3838+}
3939+4040+// RepoTree_Readme is a "readme" in the sh.tangled.repo.tree schema.
4141+type RepoTree_Readme struct {
4242+ // contents: Contents of the readme file
4343+ Contents string `json:"contents" cborgen:"contents"`
4444+ // filename: Name of the readme file
4545+ Filename string `json:"filename" cborgen:"filename"`
3646}
37473848// RepoTree_TreeEntry is a "treeEntry" in the sh.tangled.repo.tree schema.
···11+**Last updated:** September 26, 2025
22+33+This Privacy Policy describes how Tangled ("we," "us," or "our")
44+collects, uses, and shares your personal information when you use our
55+platform and services (the "Service").
66+77+## 1. Information We Collect
88+99+### Account Information
1010+1111+When you create an account, we collect:
1212+1313+- Your chosen username
1414+- Email address
1515+- Profile information you choose to provide
1616+- Authentication data
1717+1818+### Content and Activity
1919+2020+We store:
2121+2222+- Code repositories and associated metadata
2323+- Issues, pull requests, and comments
2424+- Activity logs and usage patterns
2525+- Public keys for authentication
2626+2727+## 2. Data Location and Hosting
2828+2929+### EU Data Hosting
3030+3131+**All Tangled service data is hosted within the European Union.**
3232+Specifically:
3333+3434+- **Personal Data Servers (PDS):** Accounts hosted on Tangled PDS
3535+ (*.tngl.sh) are located in Finland
3636+- **Application Data:** All other service data is stored on EU-based
3737+ servers
3838+- **Data Processing:** All data processing occurs within EU
3939+ jurisdiction
4040+4141+### External PDS Notice
4242+4343+**Important:** If your account is hosted on Bluesky's PDS or other
4444+self-hosted Personal Data Servers (not *.tngl.sh), we do not control
4545+that data. The data protection, storage location, and privacy
4646+practices for such accounts are governed by the respective PDS
4747+provider's policies, not this Privacy Policy. We only control data
4848+processing within our own services and infrastructure.
4949+5050+## 3. Third-Party Data Processors
5151+5252+We only share your data with the following third-party processors:
5353+5454+### Resend (Email Services)
5555+5656+- **Purpose:** Sending transactional emails (account verification,
5757+ notifications)
5858+- **Data Shared:** Email address and necessary message content
5959+6060+### Cloudflare (Image Caching)
6161+6262+- **Purpose:** Caching and optimizing image delivery
6363+- **Data Shared:** Public images and associated metadata for caching
6464+ purposes
6565+6666+### Posthog (Usage Metrics Tracking)
6767+6868+- **Purpose:** Tracking usage and platform metrics
6969+- **Data Shared:** Anonymous usage data, IP addresses, DIDs, and browser
7070+ information
7171+7272+## 4. How We Use Your Information
7373+7474+We use your information to:
7575+7676+- Provide and maintain the Service
7777+- Process your transactions and requests
7878+- Send you technical notices and support messages
7979+- Improve and develop new features
8080+- Ensure security and prevent fraud
8181+- Comply with legal obligations
8282+8383+## 5. Data Sharing and Disclosure
8484+8585+We do not sell, trade, or rent your personal information. We may share
8686+your information only in the following circumstances:
8787+8888+- With the third-party processors listed above
8989+- When required by law or legal process
9090+- To protect our rights, property, or safety, or that of our users
9191+- In connection with a merger, acquisition, or sale of assets (with
9292+ appropriate protections)
9393+9494+## 6. Data Security
9595+9696+We implement appropriate technical and organizational measures to
9797+protect your personal information against unauthorized access,
9898+alteration, disclosure, or destruction. However, no method of
9999+transmission over the Internet is 100% secure.
100100+101101+## 7. Data Retention
102102+103103+We retain your personal information for as long as necessary to provide
104104+the Service and fulfill the purposes outlined in this Privacy Policy,
105105+unless a longer retention period is required by law.
106106+107107+## 8. Your Rights
108108+109109+Under applicable data protection laws, you have the right to:
110110+111111+- Access your personal information
112112+- Correct inaccurate information
113113+- Request deletion of your information
114114+- Object to processing of your information
115115+- Data portability
116116+- Withdraw consent (where applicable)
117117+118118+## 9. Cookies and Tracking
119119+120120+We use cookies and similar technologies to:
121121+122122+- Maintain your login session
123123+- Remember your preferences
124124+- Analyze usage patterns to improve the Service
125125+126126+You can control cookie settings through your browser preferences.
127127+128128+## 10. Children's Privacy
129129+130130+The Service is not intended for children under 16 years of age. We do
131131+not knowingly collect personal information from children under 16. If
132132+we become aware that we have collected such information, we will take
133133+steps to delete it.
134134+135135+## 11. International Data Transfers
136136+137137+While all our primary data processing occurs within the EU, some of our
138138+third-party processors may process data outside the EU. When this
139139+occurs, we ensure appropriate safeguards are in place, such as Standard
140140+Contractual Clauses or adequacy decisions.
141141+142142+## 12. Changes to This Privacy Policy
143143+144144+We may update this Privacy Policy from time to time. We will notify you
145145+of any changes by posting the new Privacy Policy on this page and
146146+updating the "Last updated" date.
147147+148148+## 13. Contact Information
149149+150150+If you have any questions about this Privacy Policy or wish to exercise
151151+your rights, please contact us through our platform or via email.
152152+153153+---
154154+155155+This Privacy Policy complies with the EU General Data Protection
156156+Regulation (GDPR) and other applicable data protection laws.
+107
appview/pages/legal/terms.md
···11+**Last updated:** September 26, 2025
22+33+Welcome to Tangled. These Terms of Service ("Terms") govern your access
44+to and use of the Tangled platform and services (the "Service")
55+operated by us ("Tangled," "we," "us," or "our").
66+77+## 1. Acceptance of Terms
88+99+By accessing or using our Service, you agree to be bound by these Terms.
1010+If you disagree with any part of these terms, then you may not access
1111+the Service.
1212+1313+## 2. Account Registration
1414+1515+To use certain features of the Service, you must register for an
1616+account. You agree to provide accurate, current, and complete
1717+information during the registration process and to update such
1818+information to keep it accurate, current, and complete.
1919+2020+## 3. Account Termination
2121+2222+> **Important Notice**
2323+>
2424+> **We reserve the right to terminate, suspend, or restrict access to
2525+> your account at any time, for any reason, or for no reason at all, at
2626+> our sole discretion.** This includes, but is not limited to,
2727+> termination for violation of these Terms, inappropriate conduct, spam,
2828+> abuse, or any other behavior we deem harmful to the Service or other
2929+> users.
3030+>
3131+> Account termination may result in the loss of access to your
3232+> repositories, data, and other content associated with your account. We
3333+> are not obligated to provide advance notice of termination, though we
3434+> may do so in our discretion.
3535+3636+## 4. Acceptable Use
3737+3838+You agree not to use the Service to:
3939+4040+- Violate any applicable laws or regulations
4141+- Infringe upon the rights of others
4242+- Upload, store, or share content that is illegal, harmful, threatening,
4343+ abusive, harassing, defamatory, vulgar, obscene, or otherwise
4444+ objectionable
4545+- Engage in spam, phishing, or other deceptive practices
4646+- Attempt to gain unauthorized access to the Service or other users'
4747+ accounts
4848+- Interfere with or disrupt the Service or servers connected to the
4949+ Service
5050+5151+## 5. Content and Intellectual Property
5252+5353+You retain ownership of the content you upload to the Service. By
5454+uploading content, you grant us a non-exclusive, worldwide, royalty-free
5555+license to use, reproduce, modify, and distribute your content as
5656+necessary to provide the Service.
5757+5858+## 6. Privacy
5959+6060+Your privacy is important to us. Please review our [Privacy
6161+Policy](/privacy), which also governs your use of the Service.
6262+6363+## 7. Disclaimers
6464+6565+The Service is provided on an "AS IS" and "AS AVAILABLE" basis. We make
6666+no warranties, expressed or implied, and hereby disclaim and negate all
6767+other warranties including without limitation, implied warranties or
6868+conditions of merchantability, fitness for a particular purpose, or
6969+non-infringement of intellectual property or other violation of rights.
7070+7171+## 8. Limitation of Liability
7272+7373+In no event shall Tangled, nor its directors, employees, partners,
7474+agents, suppliers, or affiliates, be liable for any indirect,
7575+incidental, special, consequential, or punitive damages, including
7676+without limitation, loss of profits, data, use, goodwill, or other
7777+intangible losses, resulting from your use of the Service.
7878+7979+## 9. Indemnification
8080+8181+You agree to defend, indemnify, and hold harmless Tangled and its
8282+affiliates, officers, directors, employees, and agents from and against
8383+any and all claims, damages, obligations, losses, liabilities, costs,
8484+or debt, and expenses (including attorney's fees).
8585+8686+## 10. Governing Law
8787+8888+These Terms shall be interpreted and governed by the laws of Finland,
8989+without regard to its conflict of law provisions.
9090+9191+## 11. Changes to Terms
9292+9393+We reserve the right to modify or replace these Terms at any time. If a
9494+revision is material, we will try to provide at least 30 days notice
9595+prior to any new terms taking effect.
9696+9797+## 12. Contact Information
9898+9999+If you have any questions about these Terms of Service, please contact
100100+us through our platform or via email.
101101+102102+---
103103+104104+These terms are effective as of the last updated date shown above and
105105+will remain in effect except with respect to any changes in their
106106+provisions in the future, which will be in effect immediately after
107107+being posted on this page.
+15-17
appview/pages/markup/format.go
···11package markup
2233-import "strings"
33+import (
44+ "regexp"
55+)
4657type Format string
68···1012)
11131214var FileTypes map[Format][]string = map[Format][]string{
1313- FormatMarkdown: []string{".md", ".markdown", ".mdown", ".mkdn", ".mkd"},
1515+ FormatMarkdown: {".md", ".markdown", ".mdown", ".mkdn", ".mkd"},
1416}
15171616-// ReadmeFilenames contains the list of common README filenames to search for,
1717-// in order of preference. Only includes well-supported formats.
1818-var ReadmeFilenames = []string{
1919- "README.md", "readme.md",
2020- "README",
2121- "readme",
2222- "README.markdown",
2323- "readme.markdown",
2424- "README.txt",
2525- "readme.txt",
1818+var FileTypePatterns = map[Format]*regexp.Regexp{
1919+ FormatMarkdown: regexp.MustCompile(`(?i)\.(md|markdown|mdown|mkdn|mkd)$`),
2020+}
2121+2222+var ReadmePattern = regexp.MustCompile(`(?i)^readme(\.(md|markdown|txt))?$`)
2323+2424+func IsReadmeFile(filename string) bool {
2525+ return ReadmePattern.MatchString(filename)
2626}
27272828func GetFormat(filename string) Format {
2929- for format, extensions := range FileTypes {
3030- for _, extension := range extensions {
3131- if strings.HasSuffix(filename, extension) {
3232- return format
3333- }
2929+ for format, pattern := range FileTypePatterns {
3030+ if pattern.MatchString(filename) {
3131+ return format
3432 }
3533 }
3634 // default format
···2121 - `manual`: The workflow can be triggered manually.
2222- `branch`: This is a **required** field that defines which branches the workflow should run for. If used with the `push` event, commits to the branch(es) listed here will trigger the workflow. If used with the `pull_request` event, updates to pull requests targeting the branch(es) listed here will trigger the workflow. This field has no effect with the `manual` event.
23232424-For example, if you'd like define a workflow that runs when commits are pushed to the `main` and `develop` branches, or when pull requests that target the `main` branch are updated, or manually, you can do so with:
2424+For example, if you'd like to define a workflow that runs when commits are pushed to the `main` and `develop` branches, or when pull requests that target the `main` branch are updated, or manually, you can do so with:
25252626```yaml
2727when:
···44444545 contents, err := gr.RawContent(treePath)
4646 if err != nil {
4747- x.Logger.Error("file content", "error", err.Error())
4747+ x.Logger.Error("file content", "error", err.Error(), "treePath", treePath)
4848 writeError(w, xrpcerr.NewXrpcError(
4949 xrpcerr.WithTag("FileNotFound"),
5050 xrpcerr.WithMessage("file not found at the specified path"),
+24
knotserver/xrpc/repo_tree.go
···44 "net/http"
55 "path/filepath"
66 "time"
77+ "unicode/utf8"
7889 "tangled.org/core/api/tangled"
1010+ "tangled.org/core/appview/pages/markup"
911 "tangled.org/core/knotserver/git"
1012 xrpcerr "tangled.org/core/xrpc/errors"
1113)
···4345 return
4446 }
45474848+ // if any of these files are a readme candidate, pass along its blob contents too
4949+ var readmeFileName string
5050+ var readmeContents string
5151+ for _, file := range files {
5252+ if markup.IsReadmeFile(file.Name) {
5353+ contents, err := gr.RawContent(filepath.Join(path, file.Name))
5454+ if err != nil {
5555+ x.Logger.Error("failed to read contents of file", "path", path, "file", file.Name)
5656+ }
5757+5858+ if utf8.Valid(contents) {
5959+ readmeFileName = file.Name
6060+ readmeContents = string(contents)
6161+ break
6262+ }
6363+ }
6464+ }
6565+4666 // convert NiceTree -> tangled.RepoTree_TreeEntry
4767 treeEntries := make([]*tangled.RepoTree_TreeEntry, len(files))
4868 for i, file := range files {
···83103 Parent: parentPtr,
84104 Dotdot: dotdotPtr,
85105 Files: treeEntries,
106106+ Readme: &tangled.RepoTree_Readme{
107107+ Filename: readmeFileName,
108108+ Contents: readmeContents,
109109+ },
86110 }
8711188112 writeJson(w, response)
-158
legal/privacy.md
···11-# Privacy Policy
22-33-**Last updated:** January 15, 2025
44-55-This Privacy Policy describes how Tangled ("we," "us," or "our")
66-collects, uses, and shares your personal information when you use our
77-platform and services (the "Service").
88-99-## 1. Information We Collect
1010-1111-### Account Information
1212-1313-When you create an account, we collect:
1414-1515-- Your chosen username
1616-- Email address
1717-- Profile information you choose to provide
1818-- Authentication data
1919-2020-### Content and Activity
2121-2222-We store:
2323-2424-- Code repositories and associated metadata
2525-- Issues, pull requests, and comments
2626-- Activity logs and usage patterns
2727-- Public keys for authentication
2828-2929-## 2. Data Location and Hosting
3030-3131-### EU Data Hosting
3232-3333-**All Tangled service data is hosted within the European Union.**
3434-Specifically:
3535-3636-- **Personal Data Servers (PDS):** Accounts hosted on Tangled PDS
3737- (*.tngl.sh) are located in Finland
3838-- **Application Data:** All other service data is stored on EU-based
3939- servers
4040-- **Data Processing:** All data processing occurs within EU
4141- jurisdiction
4242-4343-### External PDS Notice
4444-4545-**Important:** If your account is hosted on Bluesky's PDS or other
4646-self-hosted Personal Data Servers (not *.tngl.sh), we do not control
4747-that data. The data protection, storage location, and privacy
4848-practices for such accounts are governed by the respective PDS
4949-provider's policies, not this Privacy Policy. We only control data
5050-processing within our own services and infrastructure.
5151-5252-## 3. Third-Party Data Processors
5353-5454-We only share your data with the following third-party processors:
5555-5656-### Resend (Email Services)
5757-5858-- **Purpose:** Sending transactional emails (account verification,
5959- notifications)
6060-- **Data Shared:** Email address and necessary message content
6161-6262-### Cloudflare (Image Caching)
6363-6464-- **Purpose:** Caching and optimizing image delivery
6565-- **Data Shared:** Public images and associated metadata for caching
6666- purposes
6767-6868-### Posthog (Usage Metrics Tracking)
6969-7070-- **Purpose:** Tracking usage and platform metrics
7171-- **Data Shared:** Anonymous usage data, IP addresses, DIDs, and browser
7272- information
7373-7474-## 4. How We Use Your Information
7575-7676-We use your information to:
7777-7878-- Provide and maintain the Service
7979-- Process your transactions and requests
8080-- Send you technical notices and support messages
8181-- Improve and develop new features
8282-- Ensure security and prevent fraud
8383-- Comply with legal obligations
8484-8585-## 5. Data Sharing and Disclosure
8686-8787-We do not sell, trade, or rent your personal information. We may share
8888-your information only in the following circumstances:
8989-9090-- With the third-party processors listed above
9191-- When required by law or legal process
9292-- To protect our rights, property, or safety, or that of our users
9393-- In connection with a merger, acquisition, or sale of assets (with
9494- appropriate protections)
9595-9696-## 6. Data Security
9797-9898-We implement appropriate technical and organizational measures to
9999-protect your personal information against unauthorized access,
100100-alteration, disclosure, or destruction. However, no method of
101101-transmission over the Internet is 100% secure.
102102-103103-## 7. Data Retention
104104-105105-We retain your personal information for as long as necessary to provide
106106-the Service and fulfill the purposes outlined in this Privacy Policy,
107107-unless a longer retention period is required by law.
108108-109109-## 8. Your Rights
110110-111111-Under applicable data protection laws, you have the right to:
112112-113113-- Access your personal information
114114-- Correct inaccurate information
115115-- Request deletion of your information
116116-- Object to processing of your information
117117-- Data portability
118118-- Withdraw consent (where applicable)
119119-120120-## 9. Cookies and Tracking
121121-122122-We use cookies and similar technologies to:
123123-124124-- Maintain your login session
125125-- Remember your preferences
126126-- Analyze usage patterns to improve the Service
127127-128128-You can control cookie settings through your browser preferences.
129129-130130-## 10. Children's Privacy
131131-132132-The Service is not intended for children under 16 years of age. We do
133133-not knowingly collect personal information from children under 16. If
134134-we become aware that we have collected such information, we will take
135135-steps to delete it.
136136-137137-## 11. International Data Transfers
138138-139139-While all our primary data processing occurs within the EU, some of our
140140-third-party processors may process data outside the EU. When this
141141-occurs, we ensure appropriate safeguards are in place, such as Standard
142142-Contractual Clauses or adequacy decisions.
143143-144144-## 12. Changes to This Privacy Policy
145145-146146-We may update this Privacy Policy from time to time. We will notify you
147147-of any changes by posting the new Privacy Policy on this page and
148148-updating the "Last updated" date.
149149-150150-## 13. Contact Information
151151-152152-If you have any questions about this Privacy Policy or wish to exercise
153153-your rights, please contact us through our platform or via email.
154154-155155----
156156-157157-This Privacy Policy complies with the EU General Data Protection
158158-Regulation (GDPR) and other applicable data protection laws.
-109
legal/terms.md
···11-# Terms of Service
22-33-**Last updated:** January 15, 2025
44-55-Welcome to Tangled. These Terms of Service ("Terms") govern your access
66-to and use of the Tangled platform and services (the "Service")
77-operated by us ("Tangled," "we," "us," or "our").
88-99-## 1. Acceptance of Terms
1010-1111-By accessing or using our Service, you agree to be bound by these Terms.
1212-If you disagree with any part of these terms, then you may not access
1313-the Service.
1414-1515-## 2. Account Registration
1616-1717-To use certain features of the Service, you must register for an
1818-account. You agree to provide accurate, current, and complete
1919-information during the registration process and to update such
2020-information to keep it accurate, current, and complete.
2121-2222-## 3. Account Termination
2323-2424-> **Important Notice**
2525->
2626-> **We reserve the right to terminate, suspend, or restrict access to
2727-> your account at any time, for any reason, or for no reason at all, at
2828-> our sole discretion.** This includes, but is not limited to,
2929-> termination for violation of these Terms, inappropriate conduct, spam,
3030-> abuse, or any other behavior we deem harmful to the Service or other
3131-> users.
3232->
3333-> Account termination may result in the loss of access to your
3434-> repositories, data, and other content associated with your account. We
3535-> are not obligated to provide advance notice of termination, though we
3636-> may do so in our discretion.
3737-3838-## 4. Acceptable Use
3939-4040-You agree not to use the Service to:
4141-4242-- Violate any applicable laws or regulations
4343-- Infringe upon the rights of others
4444-- Upload, store, or share content that is illegal, harmful, threatening,
4545- abusive, harassing, defamatory, vulgar, obscene, or otherwise
4646- objectionable
4747-- Engage in spam, phishing, or other deceptive practices
4848-- Attempt to gain unauthorized access to the Service or other users'
4949- accounts
5050-- Interfere with or disrupt the Service or servers connected to the
5151- Service
5252-5353-## 5. Content and Intellectual Property
5454-5555-You retain ownership of the content you upload to the Service. By
5656-uploading content, you grant us a non-exclusive, worldwide, royalty-free
5757-license to use, reproduce, modify, and distribute your content as
5858-necessary to provide the Service.
5959-6060-## 6. Privacy
6161-6262-Your privacy is important to us. Please review our [Privacy
6363-Policy](/privacy), which also governs your use of the Service.
6464-6565-## 7. Disclaimers
6666-6767-The Service is provided on an "AS IS" and "AS AVAILABLE" basis. We make
6868-no warranties, expressed or implied, and hereby disclaim and negate all
6969-other warranties including without limitation, implied warranties or
7070-conditions of merchantability, fitness for a particular purpose, or
7171-non-infringement of intellectual property or other violation of rights.
7272-7373-## 8. Limitation of Liability
7474-7575-In no event shall Tangled, nor its directors, employees, partners,
7676-agents, suppliers, or affiliates, be liable for any indirect,
7777-incidental, special, consequential, or punitive damages, including
7878-without limitation, loss of profits, data, use, goodwill, or other
7979-intangible losses, resulting from your use of the Service.
8080-8181-## 9. Indemnification
8282-8383-You agree to defend, indemnify, and hold harmless Tangled and its
8484-affiliates, officers, directors, employees, and agents from and against
8585-any and all claims, damages, obligations, losses, liabilities, costs,
8686-or debt, and expenses (including attorney's fees).
8787-8888-## 10. Governing Law
8989-9090-These Terms shall be interpreted and governed by the laws of Finland,
9191-without regard to its conflict of law provisions.
9292-9393-## 11. Changes to Terms
9494-9595-We reserve the right to modify or replace these Terms at any time. If a
9696-revision is material, we will try to provide at least 30 days notice
9797-prior to any new terms taking effect.
9898-9999-## 12. Contact Information
100100-101101-If you have any questions about these Terms of Service, please contact
102102-us through our platform or via email.
103103-104104----
105105-106106-These terms are effective as of the last updated date shown above and
107107-will remain in effect except with respect to any changes in their
108108-provisions in the future, which will be in effect immediately after
109109-being posted on this page.