84c1b8a
feat(tasks): add Eisenhower semantic builder API
Click to expand commit body
Replaces raw int eisenhower values with typed Eisenhower constants and
adds intuitive builder methods (.Important(), .Urgent(),
.NotImportant(), .NotUrgent()) that compute the correct quadrant at
create/update time.
Consumers can now use:
client.NewTask("x").Important().Urgent().Create(ctx) // DoNow
client.NewTask("x").Important().Create(ctx) // DoLater
Reading tasks also benefits from helper methods:
task.Eisenhower.IsImportant()
task.Eisenhower.IsUrgent()
Assisted-by: Claude Opus 4.5 via Crush
Amolith
created
7dbcb31
test(integration): add live API validation tests
Click to expand commit body
Adds build-tagged integration tests that run against the live Lunatask
API. Requires LUNATASK_API_KEY and LUNATASK_TEST_AREA environment
variables.
Tests cover ping, list operations, and full create/read/update/delete
round-trips for tasks and notes.
Also excludes dupl and goconst linters from test files and updates
coverage badge.
Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>
ae0941f
refactor(client): move builders to Client methods
Click to expand commit body
Builders are now created via client.NewX() instead of lunatask.NewX(),
and Create/Update methods no longer require a client parameter.
Before: lunatask.NewTask("x").Create(ctx, client) After:
client.NewTask("x").Create(ctx)
Assisted-by: Claude Sonnet 4 via Crush
Add coverage badge to README and task to update it automatically.
Assisted-by: Claude Opus 4.5 via Crush
Amolith
created
47bac30
test: add comprehensive API endpoint tests
Click to expand commit body
Cover all major client methods with unit tests:
- helpers_test.go: shared mock servers and assertions
- Individual test files for habits, journal, notes, people, ping, tasks,
timeline
Include two small fixes discovered during testing:
- Remove client-side name validation for tasks (API says it's optional,
if impractical)
- Use value receiver for Date.MarshalJSON to support non-pointer dates
Assisted-by: Claude Opus 4.5 via Crush
Amolith
created
c81f221
refactor(client): drop With prefix from options
Click to expand commit body
Functional options now use plain names (HTTPClient, BaseURL, UserAgent)
to distinguish them from builder pattern methods (WithNote, WithStatus).
Updated package docs and README with UserAgent example.
Assisted-by: Claude Opus 4.5 via Crush
Amolith
created
69026b1
feat(client): add dynamic version and UA option
Click to expand commit body
Version is now determined at runtime via debug.ReadBuildInfo() instead
of being hardcoded. WithUserAgent option allows consumers to set a
custom User-Agent prefix; the library identifier is always appended.
Assisted-by: Claude Opus 4.5 via Crush
Amolith
created
a1ba550
fix(journal): validate date_on is required
Click to expand commit body
Assisted-by: Claude Opus 4.5 via Crush
Amolith
created
6c35add
refactor(people): require name in NewPerson
Click to expand commit body
Assisted-by: Claude Opus 4.5 via Crush
Amolith
created
309d7c6
feat(notes): add Pinned field to Note struct
Add MotivationUnknown constant for clearing/unsetting motivation.
Document default values for StatusLater, RelationshipCasualFriend, and
MotivationUnknown. Clarify Eisenhower quadrant meanings and task
duplicate detection constraints.
Assisted-by: Claude Opus 4.5 via Crush
c5d2d01
refactor: use direct Create/Update on builders
Click to expand commit body
- Add generic CRUD helpers in crud.go to reduce duplication
- Move builders from builders.go into their respective domain files
- Builders now call Create/Update directly instead of returning request
structs
- Make request types unexported (createTaskRequest, etc.)
- Update examples in README and AGENTS.md
Assisted-by: Claude Sonnet 4 via Crush
- Fix PersonBuilder example to use RelationshipCloseFriend constant
- Add godoc links for RelationshipCloseFriend, ErrUnauthorized
Assisted-by: Claude Sonnet 4 via Crush
Amolith
created
8bc2980
feat(tasks): add TaskStatus and Motivation types
Click to expand commit body
Replace raw strings with typed constants for better discoverability and
compile-time safety.
- TaskStatus: StatusLater, StatusNext, StatusStarted, StatusWaiting,
StatusCompleted
- Motivation: MotivationMust, MotivationShould, MotivationWant
Assisted-by: Claude Sonnet 4 via Crush
152fc32
feat(people): typed enums, custom field support
Click to expand commit body
- Add RelationshipStrength type with constants for valid values
- Add CustomFields map for arbitrary fields (email, birthday, phone,
etc.)
- Custom MarshalJSON flattens CustomFields to top-level JSON
- Add WithCustomField builder method
Assisted-by: Claude Opus 4.5 via Crush