Commit Graph

89 Enmetoj

Author SHA1 Message Date
Jaidyn Ann ecc8b6f46c Add FETCH, and Webfinger data from JSON-objects
Now, Webfinger data is generated from JSON-LD
objects in an overridable fashion (methods).

Also defines the callback FETCH, which should be
defined by the user of activity-servist.
2024-09-05 22:27:37 -05:00
Jaidyn Ann f98b5d81a9 Rename JSON-LD-OBJECT & LITEPUB-OBJECT
JSON-LD:JSON-LD-OBJECT → JSON-LD:OBJECT
and
LITEPUB:LITEPUB-OBJECT → LITEPUB:OBJECT

More succinct, no?
2024-09-05 12:09:56 -05:00
Jaidyn Ann 4905c0be95 Add export definition for Litepub package 2024-09-05 12:04:56 -05:00
Jaidyn Ann 4978dfb7ee Rename JSON-LD slots & accessors
The slot .ETC is renamed to @ETC; accessors are
renamed from JSON-LD-CONTEXT (for example) to
simply the slot-name, @CONTEXT.
2024-09-05 12:01:57 -05:00
Jaidyn Ann a0f4d6ba36 Rename accessors from “CLASS-SLOT” to simply “SLOT”
JSON-LD would automatically name accessors
“CLASS-SLOT” which… gets a little bit clunky, no?
Simply “SLOT” is nicer, IMO.
2024-09-05 11:52:16 -05:00
Jaidyn Ann 5cc249ffa9 Tweak Litepub-vocab’s class hierarchy
Keep ACTOR-slots in the OBJECT class.
2024-09-04 15:18:42 -05:00
Jaidyn Ann e8858ef773 Treat solely tables with-@TYPE items as AP objects
By default, at least. @TYPE is considered a
requirement for a proper node object, as per the
spec.
2024-09-04 15:12:34 -05:00
Jaidyn Ann cd0545be52 Add core properties of AP Actor type 2024-09-04 15:11:43 -05:00
Jaidyn Ann 86b8d0a514 Docstrings and package-renaming
No functional changes; simply adds a couple
docstrings and renames
…/ACTIVITY-VOCABULARY → [AS]/VOCAB/ACTIVITY
…/LITEPUB → ACTIVITYPUB-SERVIST/VOCAB/LITEPUB
2024-09-03 12:09:18 -05:00
Jaidyn Ann b15c138378 Add PUBLIC-KEY slot to Litepub’s PERSON 2024-09-03 11:33:55 -05:00
Jaidyn Ann ce557da89c Add :ALWAYS-ITEM parsing-option
When toggled, /everything/ will be parsed as a
JSON-LD object, even if it an invalid one.
2024-09-03 11:10:50 -05:00
Jaidyn Ann 8faeb1afd2 Fix encoding of aliased @ID, @CONTEXT, and @TYPE
Previously, aliasing them (like ActivityVocab’s
ID→@ID) would cause them to get encoded twice.
2024-09-03 11:05:59 -05:00
Jaidyn Ann 22ad087a97 Fix use of class-options in Litepub vocabulary
Apparently (:OPTION VALUE)(:OPTION VALUE) is
correct, not (:OPTION VALUE :OPTION VALUE),
according to DEFCLASS!
2024-08-30 18:45:26 -05:00
Jaidyn Ann 3e2f0d3b62 Begin support for Pleroma-flavour “Litepub” vocab
This includes common node-types and properties
used by Pleroma, Mastodon, Misskey, et. al.
2024-08-30 08:42:02 -05:00
Jaidyn Ann c90f63d765 Fix :UPDATE and inheritance of @ID and @TYPE slots 2024-08-30 08:39:40 -05:00
Jaidyn Ann de0fd8845c Add :UPDATE class-option to DEFINE-JSON-TYPE
This allows one to add slots to a JSON type
without having to re-specify the old ones; for
convenience.
2024-08-25 10:56:20 -05:00
Jaidyn Ann ba1d62ceb2 Update system definitions and package nicknames 2024-08-24 15:36:24 -05:00
Jaidyn Ann 6fa9b9e03a Tweaks ActivityVocabulary types/inheritance
Now most all parsing+encoding tests pass! Hura!
2024-08-24 15:20:10 -05:00
Jaidyn Ann f2522f9ae5 Adds *DEFAULT-JSON-TYPE* to JSON-LD
Allows customization of the type assumed for an
unrecognized JSON-LD object-type.
2024-08-24 15:01:24 -05:00
Jaidyn Ann 4964c679ee Normalize/flatten @contexts before encoding
So that json-ld-objects contained in other
jons-ld-objects don’t have their @contexs
repeated a million times unnecessarily.
2024-08-24 12:23:36 -05:00
Jaidyn Ann e1c1be096a Tweak package/test definitions
No functional change.
2024-08-22 12:07:56 -05:00
Jaidyn Ann f7a86b86da Add type→@type & id→@id to Object type-definition
That is ActivityVocab standard, after all. :^)
2024-08-22 12:06:59 -05:00
Jaidyn Ann 2132a00a6a Remove reverse-context and related functions
There is a simpler way of doing this!
2024-08-22 11:12:13 -05:00
Jaidyn Ann b2e9e5340d Add YASON:ENCODE, for encoding of nested objects 2024-08-22 11:11:15 -05:00
Jaidyn Ann cc81dee054 Remove ActivityStreams package; reorganize tests
The ActivityStreams package solely held the Object
JSON-type, which is now in the ActivityVocabulary
package.

Files and system definitions have been shuffled
around accordingly.
2024-08-21 23:37:11 -05:00
Jaidyn Ann c1e1da9a3b Redefine ActivityVocab. types to new JSON-LD lib
This is much cleaner. Compared to previous
version, we also add docstrings »ploinked« from
the ActivityVocabulary specification.
2024-08-21 23:19:25 -05:00
Jaidyn Ann 4df575610e Remove old JSON-LD system; move OBJECT to new one
Our old JSON-LD encoder/decoder was bad, and not
CLOS. This removes it from activity-streams.lisp,
and replaces its definition of the ActivityStreams
Object type to our new system.
2024-08-21 18:00:08 -05:00
Jaidyn Ann bae4fbbd13 Fix slot-inheritance during JSON type-registration
Previously, only direct-slots were registered; now
those of parent classes are also registered to
*JSON-TYPES*.
2024-08-21 17:59:22 -05:00
Jaidyn Ann 6fab9f42d3 Functional parsing of JSON nodes into CLOS objects
The class hierarchy should be tweaked a bit; and
the activity-vocabulary class definitions need to
be updated to use the new framework — but it’s
functional!
2024-08-19 22:54:39 -05:00
Jaidyn Ann 14f2f8f4da Reformatting/factoring; no functional changes 2024-08-16 23:59:17 -05:00
Jaidyn Ann 7be6b396ee Begin CLOS-based system for JSON-LD encoding/etc
So far, defining a JSON-LD node-type automagically
defines a CLOS class and a YASON-encoder; what
remains is the decoder.

… and also @context-propagation  in the encoder.
2024-08-16 22:35:36 -05:00
Jaidyn Ann 0f93516cab Support terms with ld-keywords as values
Like “type” → “@type”
2024-07-07 16:16:35 -05:00
Jaidyn Ann 29a9814008 Support parsing of expanded term definitions
Also adds some descriptive conditions used in
parsing; and changes the format of context
hash-tables.
2024-07-07 10:42:54 -05:00
Jaidyn Ann a5567e043e Reorganization, commenting; no functional change 2024-06-30 09:45:20 -05:00
Jaidyn Ann 66e70f327e Support for remote JSON-LD contexts 2024-06-29 23:03:44 -05:00
Jaidyn Ann 1340707f1c Begin a “good-enough” JSON-LD parser 2024-06-29 19:11:29 -05:00
Jaidyn Ann 54a5b1f434 Add new @id & @type slots, make @context a method 2024-06-28 00:08:07 -05:00
Jaidyn Ann 71f0c6442c Retain unsupported ActivityStreams properties
So that parsing foreign objects at least doesn’t
cause us to lose any data.
2024-06-24 15:22:59 -05:00
Jaidyn Ann 16613eba51 ActivityVocabulary class and example-test tweaks 2024-06-23 22:49:11 -05:00
Jaidyn Ann bb361465c3 Parse even unknown ActivityStreams classes
By means of a *default-class* that is a catch-all.
2024-06-23 22:47:55 -05:00
Jaidyn Ann a2aec426ab Add tests for remaining ActivityVocabulary types 2024-06-23 21:02:16 -05:00
Jaidyn Ann 56d4706557 Split activity-vocab package into two
Now, ACTIVITY-VOCABULARY solely contains class
definitions; all parsing/encoding is handled by
the ACTIVITY-STREAMS package.
2024-06-23 14:56:19 -05:00
Jaidyn Ann 5f1903b741 Add comprehensive testing package
… actually, this should’ve been committed a few
commits back. I guess I forgot to add the file!
Well, no need to edit git history just for that.
2024-06-23 12:58:01 -05:00
Jaidyn Ann 39b941e013 Rename project to activity-servist
Slightly less wrong, feels slightly less redundant!
2024-06-23 12:49:58 -05:00
Jaidyn Ann 4c9de6677e Fix testing of nested objects 2024-06-23 12:18:41 -05:00
Jaidyn Ann 3f3370c194 Add base class AS-OBJECT in the hierarchy
This way, LINK (which as per ActivityVocabulary
spec doesn’t inherent OBJECT) can still be
generalized.
2024-06-23 12:17:40 -05:00
Jaidyn Ann 2501e3e0de Fix handling of keys w multiple-words-like-this. 2024-06-23 12:16:56 -05:00
Jaidyn Ann 373f8a1194 Improve Makefile “test”, add general TEST package 2024-06-22 17:44:08 -05:00
Jaidyn Ann bf404c7605 Add core object tests to ACTIVITY-VOCABULARY
… also add RUN function to both test packages.
2024-06-22 15:07:58 -05:00
Jaidyn Ann fdbda3672f Fix JSON serialization issue with double-commas
… I forgot to add an output to YASON:ENCODE!
2024-06-22 13:33:05 -05:00