Skip to content

Commit 9691060

Browse files
committed
fix: correct license references (MIT→Apache 2.0), remove dead code, fix import docs
- Website: fix all MIT license references to Apache 2.0 (9 occurrences across 5 files) - README: fix monarch import description (CSV→data sources) - Remove dead staticProvider type and newStaticProvider from providers/registry.go - Isolate FakeSelector test double into dedicated file with documentation
1 parent 25bf238 commit 9691060

9 files changed

Lines changed: 39 additions & 78 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ money items list List linked provider items
9999
money items get <id> Get a linked provider item
100100
money items rename <id> <name> Rename a provider item alias
101101
money items remove <id> Remove a linked provider item with cascade delete
102-
money import <source> <file> Import transactions from CSV (source: monarch)
102+
money import <source> <file> Import data from external sources (source: monarch, csv)
103103
money cashflow Show cashflow summary by period
104104
money net-worth Show net worth breakdown
105105

internal/prompt/fake.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package prompt
2+
3+
import "fmt"
4+
5+
// FakeSelector is a test double for Selector. It is exported from production
6+
// code because Go test files (_test.go) cannot be imported across packages.
7+
// Tests in internal/cli and internal/plaidlogin depend on prompt.NewFake().
8+
type FakeSelector struct {
9+
choices []string
10+
}
11+
12+
func NewFake(choices ...string) *FakeSelector {
13+
return &FakeSelector{choices: choices}
14+
}
15+
16+
func (s *FakeSelector) Select(title string, choices []Choice) (string, error) {
17+
if len(s.choices) == 0 {
18+
return "", fmt.Errorf("no fake prompt choice queued for %q", title)
19+
}
20+
value := s.choices[0]
21+
s.choices = s.choices[1:]
22+
for _, choice := range choices {
23+
if choice.Value == value {
24+
return value, nil
25+
}
26+
}
27+
return "", fmt.Errorf("fake prompt choice %q is not available for %q", value, title)
28+
}

internal/prompt/prompt.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,3 @@ func (s HuhSelector) Select(title string, choices []Choice) (string, error) {
5151
}
5252
return value, nil
5353
}
54-
55-
type FakeSelector struct {
56-
choices []string
57-
}
58-
59-
func NewFake(choices ...string) *FakeSelector {
60-
return &FakeSelector{choices: choices}
61-
}
62-
63-
func (s *FakeSelector) Select(title string, choices []Choice) (string, error) {
64-
if len(s.choices) == 0 {
65-
return "", fmt.Errorf("no fake prompt choice queued for %q", title)
66-
}
67-
value := s.choices[0]
68-
s.choices = s.choices[1:]
69-
for _, choice := range choices {
70-
if choice.Value == value {
71-
return value, nil
72-
}
73-
}
74-
return "", fmt.Errorf("fake prompt choice %q is not available for %q", value, title)
75-
}

internal/providers/registry.go

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package providers
22

33
import (
4-
"context"
5-
64
"github.com/thedavidweng/money/internal/config"
75
)
86

@@ -21,46 +19,3 @@ func (r Registry) Get(name string) (Provider, bool) {
2119
provider, ok := r.providers[name]
2220
return provider, ok
2321
}
24-
25-
type staticProvider struct {
26-
name string
27-
cfg config.ProviderConfig
28-
requiredFields []string
29-
}
30-
31-
func newStaticProvider(name string, cfg config.ProviderConfig, requiredFields ...string) staticProvider {
32-
return staticProvider{name: name, cfg: cfg, requiredFields: requiredFields}
33-
}
34-
35-
func (p staticProvider) Name() string {
36-
return p.name
37-
}
38-
39-
func (p staticProvider) ValidateConfig(ctx context.Context) []ConfigDiagnostic {
40-
for _, field := range p.requiredFields {
41-
if p.cfg.Fields == nil || p.cfg.Fields[field] == "" {
42-
return []ConfigDiagnostic{{
43-
Code: "PROVIDER_CREDENTIALS_MISSING",
44-
Message: p.name + " credentials are missing.",
45-
Severity: "warn",
46-
}}
47-
}
48-
}
49-
return nil
50-
}
51-
52-
func (p staticProvider) SearchInstitutions(ctx context.Context, query string) ([]Institution, error) {
53-
return nil, ErrProviderNotImplemented
54-
}
55-
56-
func (p staticProvider) CreateLinkSession(ctx context.Context, request LinkRequest) (LinkSession, error) {
57-
return LinkSession{}, ErrProviderNotImplemented
58-
}
59-
60-
func (p staticProvider) ExchangeLinkToken(ctx context.Context, session LinkSession, callback LinkCallback) (LinkedItem, error) {
61-
return LinkedItem{}, ErrProviderNotImplemented
62-
}
63-
64-
func (p staticProvider) Sync(ctx context.Context, item ProviderItem, sink SyncSink) (SyncResult, error) {
65-
return SyncResult{}, ErrProviderNotImplemented
66-
}

website/src/pages/agent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const GET: APIRoute = async () => {
1212
description: 'A local-first, self-hostable personal finance backend for AI agents and power users.',
1313
url: siteUrl,
1414
repository: repo,
15-
license: 'MIT',
15+
license: 'Apache-2.0',
1616
version: '0.x (pre-release)',
1717
},
1818
services: [
@@ -46,7 +46,7 @@ export const GET: APIRoute = async () => {
4646
'CLI-first — human output by default, --json for automation',
4747
'Explicit sync boundary — read uses local data only',
4848
'Demo mode — try without credentials against sample data',
49-
'MIT licensed, single Go binary, no telemetry',
49+
'Apache 2.0 licensed, single Go binary, no telemetry',
5050
],
5151
documentation: [
5252
{ name: 'PRD', url: `${repo}/blob/main/docs/PRD.md` },

website/src/pages/index.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ money sync</pre>
197197
<li><a href={`${repo}/releases`}>Releases</a></li>
198198
</ul>
199199

200-
<p>MIT licensed · Single Go binary · No telemetry</p>
200+
<p>Apache 2.0 licensed · Single Go binary · No telemetry</p>
201201
</main>
202202
) : (
203203

@@ -252,7 +252,7 @@ money sync</pre>
252252
</a>
253253
</div>
254254
<div class="cta-meta">
255-
<span><span class="check">✓</span> MIT licensed</span>
255+
<span><span class="check">✓</span> Apache 2.0 licensed</span>
256256
<span><span class="check">✓</span> Single Go binary</span>
257257
<span><span class="check">✓</span> No telemetry</span>
258258
<a class="meta-link" href={`${repo}/releases`}>Releases →</a>
@@ -462,7 +462,7 @@ money sync</pre>
462462
</div>
463463
<div class="section-aside">
464464
<a href={repo}>Repository</a>
465-
<a href={docs('LICENSE')}>License (MIT)</a>
465+
<a href={docs('LICENSE')}>License (Apache 2.0)</a>
466466
<a href={`${repo}/issues`}>Issues</a>
467467
</div>
468468
</section>
@@ -478,7 +478,7 @@ money sync</pre>
478478
<p class="footer-meta">
479479
A local-first personal finance backend for external AI agents.
480480
<br />
481-
MIT licensed · <a href={repo}>github.com/thedavidweng/money</a>
481+
Apache 2.0 licensed · <a href={repo}>github.com/thedavidweng/money</a>
482482
</p>
483483
</div>
484484
<div class="footer-col">

website/src/pages/index.md.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A local-first, self-hostable personal finance backend for AI agents and power us
1616
1717
Pull accounts and transactions from providers you configure, store them in encrypted SQLite, and automate with stable CLI + JSON contracts. No embedded AI, no hosted ledger, no long-running server required.
1818
19-
- ✓ MIT licensed
19+
- ✓ Apache 2.0 licensed
2020
- ✓ Single Go binary
2121
- ✓ No telemetry
2222

website/src/pages/llms-full.txt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Read commands and sync support --json for machine-readable output. Manual write
116116
117117
- GitHub Issues: ${repo}/issues
118118
- Repository: ${repo}
119-
- License: MIT
119+
- License: Apache 2.0
120120
121121
## Machine-Readable Endpoints
122122

website/src/pages/llms.txt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ It does not embed AI chat, model providers, hosted billing, telemetry, or a requ
2424
- CLI-first — human output by default; --json when you need parseable stdout
2525
- Explicit sync boundary — read commands use local data only; network I/O only on link/sync
2626
- Demo mode — try without credentials: money demo accounts list --json
27-
- MIT licensed, single Go binary, no telemetry
27+
- Apache 2.0 licensed, single Go binary, no telemetry
2828
2929
## Quick start
3030
@@ -38,7 +38,7 @@ It does not embed AI chat, model providers, hosted billing, telemetry, or a requ
3838
3939
- GitHub Issues: ${repo}/issues
4040
- Repository: ${repo}
41-
- License: MIT
41+
- License: Apache 2.0
4242
4343
## Machine-Readable Endpoints
4444

0 commit comments

Comments
 (0)