Initial import of LogDarioSeq baseline
Establishes version control for the personal Logseq DB fork before starting the server-client architecture migration and domain features described in docs/agent-guide and the approved implementation plan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
27
cli/spec/domain/block.mli
Normal file
27
cli/spec/domain/block.mli
Normal file
@@ -0,0 +1,27 @@
|
||||
type position = First_child | Last_child | Sibling
|
||||
|
||||
type t = {
|
||||
id : Cli_primitive.db_id option;
|
||||
uuid : Cli_primitive.uuid option;
|
||||
title : string option;
|
||||
name : string option;
|
||||
order : int option;
|
||||
parent : Selector.block option;
|
||||
page : Selector.page option;
|
||||
tags : Selector.tag Rrbvec.t;
|
||||
properties : Property.assignment Rrbvec.t;
|
||||
children : t Rrbvec.t;
|
||||
raw : Melange_edn_melange.any;
|
||||
}
|
||||
|
||||
type tree = { root : t }
|
||||
|
||||
val position_of_string : string -> position option
|
||||
|
||||
val make :
|
||||
?uuid:Cli_primitive.uuid -> ?title:string -> ?children:t Rrbvec.t -> unit -> t
|
||||
|
||||
val of_value : Melange_edn_melange.any -> t
|
||||
val to_value : t -> Melange_edn_melange.map Melange_edn_melange.t
|
||||
val flatten : t Rrbvec.t -> t Rrbvec.t
|
||||
val label : t -> string option
|
||||
17
cli/spec/domain/entity.mli
Normal file
17
cli/spec/domain/entity.mli
Normal file
@@ -0,0 +1,17 @@
|
||||
type kind = Page | Block | Tag | Property | Task | Asset | Unknown
|
||||
|
||||
type t = {
|
||||
id : Cli_primitive.db_id option;
|
||||
uuid : Cli_primitive.uuid option;
|
||||
ident : Cli_primitive.keyword option;
|
||||
name : string option;
|
||||
title : string option;
|
||||
kind : kind;
|
||||
tags : Cli_primitive.keyword Rrbvec.t;
|
||||
created_at : Time.date option;
|
||||
updated_at : Time.date option;
|
||||
deleted_at : Time.date option;
|
||||
raw : Melange_edn_melange.any;
|
||||
}
|
||||
|
||||
val of_value : Melange_edn_melange.any -> t
|
||||
11
cli/spec/domain/graph_types.mli
Normal file
11
cli/spec/domain/graph_types.mli
Normal file
@@ -0,0 +1,11 @@
|
||||
type graph_item_kind = Canonical | Legacy | Legacy_undecodable
|
||||
|
||||
type graph_item = {
|
||||
kind : graph_item_kind;
|
||||
graph_name : Cli_primitive.graph option;
|
||||
graph_dir : Cli_primitive.path option;
|
||||
legacy_dir : Cli_primitive.path option;
|
||||
target_graph_dir : Cli_primitive.path option;
|
||||
conflict : bool;
|
||||
reason : Cli_primitive.keyword option;
|
||||
}
|
||||
5
cli/spec/domain/id_parse.mli
Normal file
5
cli/spec/domain/id_parse.mli
Normal file
@@ -0,0 +1,5 @@
|
||||
type parsed = { ids : Cli_primitive.db_id Rrbvec.t; multi : bool }
|
||||
|
||||
val valid_id : Cli_primitive.db_id -> bool
|
||||
val parse_id_string : string -> parsed Error.build_result
|
||||
val to_single : parsed -> Cli_primitive.db_id option
|
||||
42
cli/spec/domain/property.mli
Normal file
42
cli/spec/domain/property.mli
Normal file
@@ -0,0 +1,42 @@
|
||||
type key =
|
||||
| Key_ident of Cli_primitive.keyword
|
||||
| Key_id of Cli_primitive.db_id
|
||||
| Key_name of string
|
||||
|
||||
type cardinality = One | Many
|
||||
|
||||
type kind =
|
||||
| Default
|
||||
| Page
|
||||
| Class
|
||||
| Property
|
||||
| Entity
|
||||
| Node
|
||||
| Date
|
||||
| Url
|
||||
| Checkbox
|
||||
| Number
|
||||
| Template
|
||||
| Other of Cli_primitive.keyword
|
||||
|
||||
type schema = {
|
||||
kind : kind option;
|
||||
cardinality : cardinality option;
|
||||
hidden : bool option;
|
||||
public : bool option;
|
||||
}
|
||||
|
||||
type assignment = { key : key; value : Melange_edn_melange.any }
|
||||
|
||||
type update_plan = {
|
||||
update_tags : Selector.tag Rrbvec.t;
|
||||
remove_tags : Selector.tag Rrbvec.t;
|
||||
update_properties : assignment Rrbvec.t;
|
||||
remove_properties : key Rrbvec.t;
|
||||
}
|
||||
|
||||
val empty_update_plan : update_plan
|
||||
val parse_key : Melange_edn_melange.any -> key option
|
||||
val kind_of_string : string -> kind option
|
||||
val string_of_kind : kind -> string
|
||||
val cardinality_of_string : string -> cardinality option
|
||||
26
cli/spec/domain/selector.mli
Normal file
26
cli/spec/domain/selector.mli
Normal file
@@ -0,0 +1,26 @@
|
||||
type block =
|
||||
| Block_id of Cli_primitive.db_id
|
||||
| Block_uuid of Cli_primitive.uuid
|
||||
|
||||
type page =
|
||||
| Page_id of Cli_primitive.db_id
|
||||
| Page_name of string
|
||||
| Page_uuid of Cli_primitive.uuid
|
||||
|
||||
type property =
|
||||
| Property_id of Cli_primitive.db_id
|
||||
| Property_ident of Cli_primitive.keyword
|
||||
| Property_name of string
|
||||
| Property_uuid of Cli_primitive.uuid
|
||||
|
||||
type tag =
|
||||
| Tag_id of Cli_primitive.db_id
|
||||
| Tag_name of string
|
||||
| Tag_ident of Cli_primitive.keyword
|
||||
| Tag_uuid of Cli_primitive.uuid
|
||||
|
||||
type entity =
|
||||
| Entity_id of Cli_primitive.db_id
|
||||
| Entity_uuid of Cli_primitive.uuid
|
||||
| Entity_ident of Cli_primitive.keyword
|
||||
| Entity_name of string
|
||||
12
cli/spec/domain/task_status.mli
Normal file
12
cli/spec/domain/task_status.mli
Normal file
@@ -0,0 +1,12 @@
|
||||
type status = { ident : Cli_primitive.keyword; value : string }
|
||||
|
||||
val status_closed_values_query :
|
||||
Melange_edn_melange.vector Melange_edn_melange.t
|
||||
|
||||
val normalize_available_statuses :
|
||||
Melange_edn_melange.any Rrbvec.t -> status Rrbvec.t
|
||||
|
||||
val resolve_status_ident :
|
||||
string -> status Rrbvec.t -> Cli_primitive.keyword option
|
||||
|
||||
val invalid_status_message : string -> status Rrbvec.t -> string
|
||||
Reference in New Issue
Block a user