···31 Files []*RepoTree_TreeEntry `json:"files" cborgen:"files"`
32 // parent: The parent path in the tree
33 Parent *string `json:"parent,omitempty" cborgen:"parent,omitempty"`
0034 // ref: The git reference used
35 Ref string `json:"ref" cborgen:"ref"`
0000000036}
3738// RepoTree_TreeEntry is a "treeEntry" in the sh.tangled.repo.tree schema.
···31 Files []*RepoTree_TreeEntry `json:"files" cborgen:"files"`
32 // parent: The parent path in the tree
33 Parent *string `json:"parent,omitempty" cborgen:"parent,omitempty"`
34+ // readme: Readme for this file tree
35+ Readme *RepoTree_Readme `json:"readme,omitempty" cborgen:"readme,omitempty"`
36 // ref: The git reference used
37 Ref string `json:"ref" cborgen:"ref"`
38+}
39+40+// RepoTree_Readme is a "readme" in the sh.tangled.repo.tree schema.
41+type RepoTree_Readme struct {
42+ // contents: Contents of the readme file
43+ Contents string `json:"contents" cborgen:"contents"`
44+ // filename: Name of the readme file
45+ Filename string `json:"filename" cborgen:"filename"`
46}
4748// RepoTree_TreeEntry is a "treeEntry" in the sh.tangled.repo.tree schema.
···1+**Last updated:** September 26, 2025
2+3+This Privacy Policy describes how Tangled ("we," "us," or "our")
4+collects, uses, and shares your personal information when you use our
5+platform and services (the "Service").
6+7+## 1. Information We Collect
8+9+### Account Information
10+11+When you create an account, we collect:
12+13+- Your chosen username
14+- Email address
15+- Profile information you choose to provide
16+- Authentication data
17+18+### Content and Activity
19+20+We store:
21+22+- Code repositories and associated metadata
23+- Issues, pull requests, and comments
24+- Activity logs and usage patterns
25+- Public keys for authentication
26+27+## 2. Data Location and Hosting
28+29+### EU Data Hosting
30+31+**All Tangled service data is hosted within the European Union.**
32+Specifically:
33+34+- **Personal Data Servers (PDS):** Accounts hosted on Tangled PDS
35+ (*.tngl.sh) are located in Finland
36+- **Application Data:** All other service data is stored on EU-based
37+ servers
38+- **Data Processing:** All data processing occurs within EU
39+ jurisdiction
40+41+### External PDS Notice
42+43+**Important:** If your account is hosted on Bluesky's PDS or other
44+self-hosted Personal Data Servers (not *.tngl.sh), we do not control
45+that data. The data protection, storage location, and privacy
46+practices for such accounts are governed by the respective PDS
47+provider's policies, not this Privacy Policy. We only control data
48+processing within our own services and infrastructure.
49+50+## 3. Third-Party Data Processors
51+52+We only share your data with the following third-party processors:
53+54+### Resend (Email Services)
55+56+- **Purpose:** Sending transactional emails (account verification,
57+ notifications)
58+- **Data Shared:** Email address and necessary message content
59+60+### Cloudflare (Image Caching)
61+62+- **Purpose:** Caching and optimizing image delivery
63+- **Data Shared:** Public images and associated metadata for caching
64+ purposes
65+66+### Posthog (Usage Metrics Tracking)
67+68+- **Purpose:** Tracking usage and platform metrics
69+- **Data Shared:** Anonymous usage data, IP addresses, DIDs, and browser
70+ information
71+72+## 4. How We Use Your Information
73+74+We use your information to:
75+76+- Provide and maintain the Service
77+- Process your transactions and requests
78+- Send you technical notices and support messages
79+- Improve and develop new features
80+- Ensure security and prevent fraud
81+- Comply with legal obligations
82+83+## 5. Data Sharing and Disclosure
84+85+We do not sell, trade, or rent your personal information. We may share
86+your information only in the following circumstances:
87+88+- With the third-party processors listed above
89+- When required by law or legal process
90+- To protect our rights, property, or safety, or that of our users
91+- In connection with a merger, acquisition, or sale of assets (with
92+ appropriate protections)
93+94+## 6. Data Security
95+96+We implement appropriate technical and organizational measures to
97+protect your personal information against unauthorized access,
98+alteration, disclosure, or destruction. However, no method of
99+transmission over the Internet is 100% secure.
100+101+## 7. Data Retention
102+103+We retain your personal information for as long as necessary to provide
104+the Service and fulfill the purposes outlined in this Privacy Policy,
105+unless a longer retention period is required by law.
106+107+## 8. Your Rights
108+109+Under applicable data protection laws, you have the right to:
110+111+- Access your personal information
112+- Correct inaccurate information
113+- Request deletion of your information
114+- Object to processing of your information
115+- Data portability
116+- Withdraw consent (where applicable)
117+118+## 9. Cookies and Tracking
119+120+We use cookies and similar technologies to:
121+122+- Maintain your login session
123+- Remember your preferences
124+- Analyze usage patterns to improve the Service
125+126+You can control cookie settings through your browser preferences.
127+128+## 10. Children's Privacy
129+130+The Service is not intended for children under 16 years of age. We do
131+not knowingly collect personal information from children under 16. If
132+we become aware that we have collected such information, we will take
133+steps to delete it.
134+135+## 11. International Data Transfers
136+137+While all our primary data processing occurs within the EU, some of our
138+third-party processors may process data outside the EU. When this
139+occurs, we ensure appropriate safeguards are in place, such as Standard
140+Contractual Clauses or adequacy decisions.
141+142+## 12. Changes to This Privacy Policy
143+144+We may update this Privacy Policy from time to time. We will notify you
145+of any changes by posting the new Privacy Policy on this page and
146+updating the "Last updated" date.
147+148+## 13. Contact Information
149+150+If you have any questions about this Privacy Policy or wish to exercise
151+your rights, please contact us through our platform or via email.
152+153+---
154+155+This Privacy Policy complies with the EU General Data Protection
156+Regulation (GDPR) and other applicable data protection laws.
···1+**Last updated:** September 26, 2025
2+3+Welcome to Tangled. These Terms of Service ("Terms") govern your access
4+to and use of the Tangled platform and services (the "Service")
5+operated by us ("Tangled," "we," "us," or "our").
6+7+## 1. Acceptance of Terms
8+9+By accessing or using our Service, you agree to be bound by these Terms.
10+If you disagree with any part of these terms, then you may not access
11+the Service.
12+13+## 2. Account Registration
14+15+To use certain features of the Service, you must register for an
16+account. You agree to provide accurate, current, and complete
17+information during the registration process and to update such
18+information to keep it accurate, current, and complete.
19+20+## 3. Account Termination
21+22+> **Important Notice**
23+>
24+> **We reserve the right to terminate, suspend, or restrict access to
25+> your account at any time, for any reason, or for no reason at all, at
26+> our sole discretion.** This includes, but is not limited to,
27+> termination for violation of these Terms, inappropriate conduct, spam,
28+> abuse, or any other behavior we deem harmful to the Service or other
29+> users.
30+>
31+> Account termination may result in the loss of access to your
32+> repositories, data, and other content associated with your account. We
33+> are not obligated to provide advance notice of termination, though we
34+> may do so in our discretion.
35+36+## 4. Acceptable Use
37+38+You agree not to use the Service to:
39+40+- Violate any applicable laws or regulations
41+- Infringe upon the rights of others
42+- Upload, store, or share content that is illegal, harmful, threatening,
43+ abusive, harassing, defamatory, vulgar, obscene, or otherwise
44+ objectionable
45+- Engage in spam, phishing, or other deceptive practices
46+- Attempt to gain unauthorized access to the Service or other users'
47+ accounts
48+- Interfere with or disrupt the Service or servers connected to the
49+ Service
50+51+## 5. Content and Intellectual Property
52+53+You retain ownership of the content you upload to the Service. By
54+uploading content, you grant us a non-exclusive, worldwide, royalty-free
55+license to use, reproduce, modify, and distribute your content as
56+necessary to provide the Service.
57+58+## 6. Privacy
59+60+Your privacy is important to us. Please review our [Privacy
61+Policy](/privacy), which also governs your use of the Service.
62+63+## 7. Disclaimers
64+65+The Service is provided on an "AS IS" and "AS AVAILABLE" basis. We make
66+no warranties, expressed or implied, and hereby disclaim and negate all
67+other warranties including without limitation, implied warranties or
68+conditions of merchantability, fitness for a particular purpose, or
69+non-infringement of intellectual property or other violation of rights.
70+71+## 8. Limitation of Liability
72+73+In no event shall Tangled, nor its directors, employees, partners,
74+agents, suppliers, or affiliates, be liable for any indirect,
75+incidental, special, consequential, or punitive damages, including
76+without limitation, loss of profits, data, use, goodwill, or other
77+intangible losses, resulting from your use of the Service.
78+79+## 9. Indemnification
80+81+You agree to defend, indemnify, and hold harmless Tangled and its
82+affiliates, officers, directors, employees, and agents from and against
83+any and all claims, damages, obligations, losses, liabilities, costs,
84+or debt, and expenses (including attorney's fees).
85+86+## 10. Governing Law
87+88+These Terms shall be interpreted and governed by the laws of Finland,
89+without regard to its conflict of law provisions.
90+91+## 11. Changes to Terms
92+93+We reserve the right to modify or replace these Terms at any time. If a
94+revision is material, we will try to provide at least 30 days notice
95+prior to any new terms taking effect.
96+97+## 12. Contact Information
98+99+If you have any questions about these Terms of Service, please contact
100+us through our platform or via email.
101+102+---
103+104+These terms are effective as of the last updated date shown above and
105+will remain in effect except with respect to any changes in their
106+provisions in the future, which will be in effect immediately after
107+being posted on this page.
+15-17
appview/pages/markup/format.go
···1package markup
23-import "strings"
0045type Format string
6···10)
1112var FileTypes map[Format][]string = map[Format][]string{
13- FormatMarkdown: []string{".md", ".markdown", ".mdown", ".mkdn", ".mkd"},
14}
1516-// ReadmeFilenames contains the list of common README filenames to search for,
17-// in order of preference. Only includes well-supported formats.
18-var ReadmeFilenames = []string{
19- "README.md", "readme.md",
20- "README",
21- "readme",
22- "README.markdown",
23- "readme.markdown",
24- "README.txt",
25- "readme.txt",
26}
2728func GetFormat(filename string) Format {
29- for format, extensions := range FileTypes {
30- for _, extension := range extensions {
31- if strings.HasSuffix(filename, extension) {
32- return format
33- }
34 }
35 }
36 // default format
···1package markup
23+import (
4+ "regexp"
5+)
67type Format string
8···12)
1314var FileTypes map[Format][]string = map[Format][]string{
15+ FormatMarkdown: {".md", ".markdown", ".mdown", ".mkdn", ".mkd"},
16}
1718+var FileTypePatterns = map[Format]*regexp.Regexp{
19+ FormatMarkdown: regexp.MustCompile(`(?i)\.(md|markdown|mdown|mkdn|mkd)$`),
20+}
21+22+var ReadmePattern = regexp.MustCompile(`(?i)^readme(\.(md|markdown|txt))?$`)
23+24+func IsReadmeFile(filename string) bool {
25+ return ReadmePattern.MatchString(filename)
0026}
2728func GetFormat(filename string) Format {
29+ for format, pattern := range FileTypePatterns {
30+ if pattern.MatchString(filename) {
31+ return format
0032 }
33 }
34 // default format
···1-// adapted from https://tangled.sh/icyphox.sh/atproto-oauth
23package main
4
···1+// adapted from https://tangled.org/anirudh.fi/atproto-oauth
23package main
4
+1-1
docs/spindle/pipeline.md
···21 - `manual`: The workflow can be triggered manually.
22- `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.
2324-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:
2526```yaml
27when:
···21 - `manual`: The workflow can be triggered manually.
22- `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.
2324+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:
2526```yaml
27when:
···4 "net/http"
5 "path/filepath"
6 "time"
7+ "unicode/utf8"
89 "tangled.org/core/api/tangled"
10+ "tangled.org/core/appview/pages/markup"
11 "tangled.org/core/knotserver/git"
12 xrpcerr "tangled.org/core/xrpc/errors"
13)
···45 return
46 }
4748+ // if any of these files are a readme candidate, pass along its blob contents too
49+ var readmeFileName string
50+ var readmeContents string
51+ for _, file := range files {
52+ if markup.IsReadmeFile(file.Name) {
53+ contents, err := gr.RawContent(filepath.Join(path, file.Name))
54+ if err != nil {
55+ x.Logger.Error("failed to read contents of file", "path", path, "file", file.Name)
56+ }
57+58+ if utf8.Valid(contents) {
59+ readmeFileName = file.Name
60+ readmeContents = string(contents)
61+ break
62+ }
63+ }
64+ }
65+66 // convert NiceTree -> tangled.RepoTree_TreeEntry
67 treeEntries := make([]*tangled.RepoTree_TreeEntry, len(files))
68 for i, file := range files {
···103 Parent: parentPtr,
104 Dotdot: dotdotPtr,
105 Files: treeEntries,
106+ Readme: &tangled.RepoTree_Readme{
107+ Filename: readmeFileName,
108+ Contents: readmeContents,
109+ },
110 }
111112 writeJson(w, response)
-158
legal/privacy.md
···1-# Privacy Policy
2-3-**Last updated:** January 15, 2025
4-5-This Privacy Policy describes how Tangled ("we," "us," or "our")
6-collects, uses, and shares your personal information when you use our
7-platform and services (the "Service").
8-9-## 1. Information We Collect
10-11-### Account Information
12-13-When you create an account, we collect:
14-15-- Your chosen username
16-- Email address
17-- Profile information you choose to provide
18-- Authentication data
19-20-### Content and Activity
21-22-We store:
23-24-- Code repositories and associated metadata
25-- Issues, pull requests, and comments
26-- Activity logs and usage patterns
27-- Public keys for authentication
28-29-## 2. Data Location and Hosting
30-31-### EU Data Hosting
32-33-**All Tangled service data is hosted within the European Union.**
34-Specifically:
35-36-- **Personal Data Servers (PDS):** Accounts hosted on Tangled PDS
37- (*.tngl.sh) are located in Finland
38-- **Application Data:** All other service data is stored on EU-based
39- servers
40-- **Data Processing:** All data processing occurs within EU
41- jurisdiction
42-43-### External PDS Notice
44-45-**Important:** If your account is hosted on Bluesky's PDS or other
46-self-hosted Personal Data Servers (not *.tngl.sh), we do not control
47-that data. The data protection, storage location, and privacy
48-practices for such accounts are governed by the respective PDS
49-provider's policies, not this Privacy Policy. We only control data
50-processing within our own services and infrastructure.
51-52-## 3. Third-Party Data Processors
53-54-We only share your data with the following third-party processors:
55-56-### Resend (Email Services)
57-58-- **Purpose:** Sending transactional emails (account verification,
59- notifications)
60-- **Data Shared:** Email address and necessary message content
61-62-### Cloudflare (Image Caching)
63-64-- **Purpose:** Caching and optimizing image delivery
65-- **Data Shared:** Public images and associated metadata for caching
66- purposes
67-68-### Posthog (Usage Metrics Tracking)
69-70-- **Purpose:** Tracking usage and platform metrics
71-- **Data Shared:** Anonymous usage data, IP addresses, DIDs, and browser
72- information
73-74-## 4. How We Use Your Information
75-76-We use your information to:
77-78-- Provide and maintain the Service
79-- Process your transactions and requests
80-- Send you technical notices and support messages
81-- Improve and develop new features
82-- Ensure security and prevent fraud
83-- Comply with legal obligations
84-85-## 5. Data Sharing and Disclosure
86-87-We do not sell, trade, or rent your personal information. We may share
88-your information only in the following circumstances:
89-90-- With the third-party processors listed above
91-- When required by law or legal process
92-- To protect our rights, property, or safety, or that of our users
93-- In connection with a merger, acquisition, or sale of assets (with
94- appropriate protections)
95-96-## 6. Data Security
97-98-We implement appropriate technical and organizational measures to
99-protect your personal information against unauthorized access,
100-alteration, disclosure, or destruction. However, no method of
101-transmission over the Internet is 100% secure.
102-103-## 7. Data Retention
104-105-We retain your personal information for as long as necessary to provide
106-the Service and fulfill the purposes outlined in this Privacy Policy,
107-unless a longer retention period is required by law.
108-109-## 8. Your Rights
110-111-Under applicable data protection laws, you have the right to:
112-113-- Access your personal information
114-- Correct inaccurate information
115-- Request deletion of your information
116-- Object to processing of your information
117-- Data portability
118-- Withdraw consent (where applicable)
119-120-## 9. Cookies and Tracking
121-122-We use cookies and similar technologies to:
123-124-- Maintain your login session
125-- Remember your preferences
126-- Analyze usage patterns to improve the Service
127-128-You can control cookie settings through your browser preferences.
129-130-## 10. Children's Privacy
131-132-The Service is not intended for children under 16 years of age. We do
133-not knowingly collect personal information from children under 16. If
134-we become aware that we have collected such information, we will take
135-steps to delete it.
136-137-## 11. International Data Transfers
138-139-While all our primary data processing occurs within the EU, some of our
140-third-party processors may process data outside the EU. When this
141-occurs, we ensure appropriate safeguards are in place, such as Standard
142-Contractual Clauses or adequacy decisions.
143-144-## 12. Changes to This Privacy Policy
145-146-We may update this Privacy Policy from time to time. We will notify you
147-of any changes by posting the new Privacy Policy on this page and
148-updating the "Last updated" date.
149-150-## 13. Contact Information
151-152-If you have any questions about this Privacy Policy or wish to exercise
153-your rights, please contact us through our platform or via email.
154-155----
156-157-This Privacy Policy complies with the EU General Data Protection
158-Regulation (GDPR) and other applicable data protection laws.
···1-# Terms of Service
2-3-**Last updated:** January 15, 2025
4-5-Welcome to Tangled. These Terms of Service ("Terms") govern your access
6-to and use of the Tangled platform and services (the "Service")
7-operated by us ("Tangled," "we," "us," or "our").
8-9-## 1. Acceptance of Terms
10-11-By accessing or using our Service, you agree to be bound by these Terms.
12-If you disagree with any part of these terms, then you may not access
13-the Service.
14-15-## 2. Account Registration
16-17-To use certain features of the Service, you must register for an
18-account. You agree to provide accurate, current, and complete
19-information during the registration process and to update such
20-information to keep it accurate, current, and complete.
21-22-## 3. Account Termination
23-24-> **Important Notice**
25->
26-> **We reserve the right to terminate, suspend, or restrict access to
27-> your account at any time, for any reason, or for no reason at all, at
28-> our sole discretion.** This includes, but is not limited to,
29-> termination for violation of these Terms, inappropriate conduct, spam,
30-> abuse, or any other behavior we deem harmful to the Service or other
31-> users.
32->
33-> Account termination may result in the loss of access to your
34-> repositories, data, and other content associated with your account. We
35-> are not obligated to provide advance notice of termination, though we
36-> may do so in our discretion.
37-38-## 4. Acceptable Use
39-40-You agree not to use the Service to:
41-42-- Violate any applicable laws or regulations
43-- Infringe upon the rights of others
44-- Upload, store, or share content that is illegal, harmful, threatening,
45- abusive, harassing, defamatory, vulgar, obscene, or otherwise
46- objectionable
47-- Engage in spam, phishing, or other deceptive practices
48-- Attempt to gain unauthorized access to the Service or other users'
49- accounts
50-- Interfere with or disrupt the Service or servers connected to the
51- Service
52-53-## 5. Content and Intellectual Property
54-55-You retain ownership of the content you upload to the Service. By
56-uploading content, you grant us a non-exclusive, worldwide, royalty-free
57-license to use, reproduce, modify, and distribute your content as
58-necessary to provide the Service.
59-60-## 6. Privacy
61-62-Your privacy is important to us. Please review our [Privacy
63-Policy](/privacy), which also governs your use of the Service.
64-65-## 7. Disclaimers
66-67-The Service is provided on an "AS IS" and "AS AVAILABLE" basis. We make
68-no warranties, expressed or implied, and hereby disclaim and negate all
69-other warranties including without limitation, implied warranties or
70-conditions of merchantability, fitness for a particular purpose, or
71-non-infringement of intellectual property or other violation of rights.
72-73-## 8. Limitation of Liability
74-75-In no event shall Tangled, nor its directors, employees, partners,
76-agents, suppliers, or affiliates, be liable for any indirect,
77-incidental, special, consequential, or punitive damages, including
78-without limitation, loss of profits, data, use, goodwill, or other
79-intangible losses, resulting from your use of the Service.
80-81-## 9. Indemnification
82-83-You agree to defend, indemnify, and hold harmless Tangled and its
84-affiliates, officers, directors, employees, and agents from and against
85-any and all claims, damages, obligations, losses, liabilities, costs,
86-or debt, and expenses (including attorney's fees).
87-88-## 10. Governing Law
89-90-These Terms shall be interpreted and governed by the laws of Finland,
91-without regard to its conflict of law provisions.
92-93-## 11. Changes to Terms
94-95-We reserve the right to modify or replace these Terms at any time. If a
96-revision is material, we will try to provide at least 30 days notice
97-prior to any new terms taking effect.
98-99-## 12. Contact Information
100-101-If you have any questions about these Terms of Service, please contact
102-us through our platform or via email.
103-104----
105-106-These terms are effective as of the last updated date shown above and
107-will remain in effect except with respect to any changes in their
108-provisions in the future, which will be in effect immediately after
109-being posted on this page.