Commit Graph

20 Commits

Author SHA1 Message Date
eliaskohout 21a01e9412 fix: include client_secret in device authorization request
Build and Publish APK Package / build-apk (arm64, aarch64) (push) Failing after 46s
Build and Publish Arch Package / build-arch (arm64, aarch64) (push) Successful in 1m2s
Build and Publish APK Package / build-apk (amd64, x86_64) (push) Waiting to run
Build and Push Docker Container / build-and-push (push) Has been cancelled
Build and Publish Arch Package / build-arch (amd64, x86_64) (push) Has been cancelled
2026-04-14 00:48:16 +02:00
eliaskohout 77e2610fe8 feat: add RFC 8628 device authorization flow for out-of-VPN authentication
Build and Publish APK Package / build-apk (amd64, x86_64) (push) Successful in 52s
Build and Publish APK Package / build-apk (arm64, aarch64) (push) Successful in 43s
Build and Publish Arch Package / build-arch (amd64, x86_64) (push) Successful in 2m11s
Build and Publish Arch Package / build-arch (arm64, aarch64) (push) Successful in 1m6s
Build and Push Docker Container / build-and-push (push) Successful in 20m0s
2026-04-13 23:32:18 +02:00
eliaskohout 2c48c75387 fix: use FindDataRoot in FindOrInitSQLiteStore for consistent database location
Build and Publish APK Package / build-apk (arm64, aarch64) (push) Has been cancelled
Build and Publish APK Package / build-apk (amd64, x86_64) (push) Has been cancelled
Build and Push Docker Container / build-and-push (push) Successful in 17m44s
Build and Publish Arch Package / build-arch (amd64, x86_64) (push) Failing after 58s
Build and Publish Arch Package / build-arch (arm64, aarch64) (push) Failing after 1m0s
2026-04-02 14:26:13 +02:00
eliaskohout 24fb3a8b62 fix: prevent segfault in login command when session doesn't exist
LoadSession() was returning nil when the session file didn't exist (first login).
The login command then tried to dereference nil when setting session.Token,
causing a panic. Now LoadSession() returns an empty Session with the path set,
so callers can always use the returned session.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-02 13:23:34 +02:00
eliaskohout 89432e608b feat: replace in_namespace relation with ownership-based namespace membership
Remove the in_namespace edge relation. A node now belongs to a namespace if that
namespace has has_ownership on it. This simplifies the model: namespace membership
is determined by the ownership chain rather than a separate relation type.

Changes:
- Remove RelInNamespace constant
- Add Namespace fields to AddInput, UpdateInput, and ListFilter
- Update Add() to resolve namespace from input and assign it as owner
- Update List() to filter by namespace ownership instead of in_namespace edges
- Update() can now transfer nodes between namespaces via ownership transfer
- Remove in_namespace self-references from ensureNamespace/ensureGlobalNamespace

The ownership chain now fully describes both permissions and namespace membership,
reducing redundancy. All tests pass with the new model.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-02 13:20:03 +02:00
eliaskohout 63044a697d feat: change node ownership to namespace instead of creator
Build and Publish APK Package / build-apk (amd64, x86_64) (push) Successful in 44s
Build and Publish APK Package / build-apk (arm64, aarch64) (push) Successful in 51s
Build and Publish Arch Package / build-arch (amd64, x86_64) (push) Successful in 58s
Build and Publish Arch Package / build-arch (arm64, aarch64) (push) Successful in 1m5s
Build and Push Docker Container / build-and-push (push) Failing after 10m5s
When a node is created in a namespace, the namespace now owns it rather than the creator. This allows namespaces to manage content ownership. Namespace nodes themselves remain owned by their creator. Users retain transitive ownership through their default namespace: user→has_ownership→namespace→has_ownership→node.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-02 05:41:13 +02:00
eliaskohout ea8a9ca0c3 feat: add global user namespace for shared access
Create a special _global namespace that every new user automatically
gets can_create_rel access to (inclusive of can_read). This provides
a shared space where all users can see and interact with published nodes.

- ensureGlobalNamespace creates _global on first use with self-ownership
- ensureUser grants can_create_rel to each new user on the global namespace
- User visibility still relies on existing post-BFS global readability

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-02 05:31:04 +02:00
eliaskohout f2521be158 feat: add due date filters for list command
- --due: show only nodes with a due date set
- --due-within N: show only nodes due within N days (includes overdue)

Implemented in service layer with post-fetch filtering, threaded through
API client and server, and exposed via CLI flags.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-02 05:06:35 +02:00
eliaskohout 8357c80e75 feat: add due date to list sorting priority
Sort nodes by: status → priority → due date (soonest first).
Nodes without due dates sort last.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-02 04:57:51 +02:00
eliaskohout a30c703efa feat: add colored due date indicators to list and show views
- List view: show relative due date (+12d, -3d, today) after namespace
- Show view: colorize full due date based on urgency
- Color scheme: red (overdue), yellow (due within 3 days), green (4+ days)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-02 04:54:15 +02:00
eliaskohout 4374befa42 refactor: remove AX_DB_PATH env var support from store layer
Build and Push Docker Container / build-and-push (push) Has been cancelled
Build and Publish APK Package / build-apk (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 03:07:42 +02:00
eliaskohout 252503a572 refactor: move e2e tests into src/e2e directory 2026-04-02 02:23:00 +02:00
eliaskohout 6821112c8f refactor: remove AX_DB_PATH env var, fix Dockerfile for src/ layout 2026-04-02 02:19:48 +02:00
eliaskohout 921f4913f8 fix: correct GetProperty bug, init to use .ax/, add default aliases, split e2e tests, add due date tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 01:58:48 +02:00
eliaskohout 5969a2591c feat: reduce default node ID length to 3 and auto-grow when exhausted
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 01:21:00 +02:00
eliaskohout 2a48ea046b fix: invert FindAndOpenSQLiteStore existence check
The condition was backwards — it exited with "database already exists"
when the file was found, and tried to open it when it did not exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 01:09:38 +02:00
eliaskohout 51341eeb84 refactor: remove service factory wrappers, call store init methods directly
Replace InitNodeService/GetNodeService/GetNodeServiceForUser with thin
NewLocalNodeService/NewRemoteNodeService constructors; move wiring logic
into cmd/root.go (getNodeService helper) and an inline closure in serve.go.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 00:56:45 +02:00
eliaskohout 03a896d23f refactor: consolidate packages - move output to cmd, config/session to store, rename Store to GraphStore 2026-04-02 00:42:55 +02:00
eliaskohout 2bcc310c6d move funcs from cmd/rel.go to cmd/root.go 2026-04-01 22:39:44 +02:00
eliaskohout e42397cc7a move src file to seperate direcotry 2026-04-01 22:29:20 +02:00