Add working .star loader, Lisp API, and Star-CL constructors #37
No reviewers
Labels
No labels
bug
design
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/starintel-auto-research!37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/star-loader-url-import-star-cl-port"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changed
Lisp-first
.starloaderThe loader is a Common Lisp API. The shell command is now only a thin adapter over
star-lang.api.Public Lisp entry points include:
star-lang.api:load-starstar-lang.api:load-star-filestar-lang.api:load-star-urlstar-lang.api:load-star-runtimeThe loader safely reads one bounded top-level Star-Lang form, disables reader evaluation and dispatch syntax, recursively resolves local and HTTP(S) imports, verifies exact library identity and SHA-256 locks, detects cycles and conflicting identities, caches verified remote specifications, and supports offline cache reuse.
The CLI delegates to the same API:
Standalone Star-CL schema
org.starintel/star-cl@1as the canonical Star-Lang representation of Star-CLportandasndocument types referenced by legacy constructors but absent from the original class definitionsID policies and API
Documents may declare:
The Lisp API exports
make-ulid,make-uuidv4,make-digest-id, andgenerate-id. Legacy Star-CL types retain deterministic MD5 identity where applicable, general entities and relations use ULIDs, content-addressed records use SHA-256, and runtime events demonstrate UUIDv4.Generated constructor functions
Add a constructor generator that reads declarative constructor metadata from loaded
.starlibraries and installs real Common Lispdefuns into a selected package.The generator preserves old Star-CL constructor semantics and signatures, including:
new-personandnew-org(dataset &rest args)constructorsnew-email*local-part/domain splittingnew-relationkeyword defaults and the legacy predicate allowlistnew-targetkeyword defaultsnew-target-without-optionsnew-usernamefunction that was exported by old Star-CL but had no implementationExplicit compatibility constructors disable strict required-field validation to retain old sparse-construction behavior. Automatically generated constructors for other document types remain strict and use
(dataset &rest args).Constructor source can be emitted without installing it:
Document runtime
The runtime resolves inherited contracts, applies defaults and shared metadata, generates IDs from document policies, validates typed fields, supports CouchDB
_idand_rev, encodes camelCase/snake_case/native field names, decodes external keys case-insensitively, and creates typed relation documents.Primary functions:
compile-document-contractcreate-documentset-document-metavalidate-documentencode-documentdecode-documentrelate-documentsdocument-valueValidation
Four workflow tracks pass:
Deliberate boundaries
star-cl.starremains the canonical document schema. Constructor compatibility metadata currently lives in a digest-locked overlay,star-cl-constructors.star, which imports it. Consolidating that metadata into the canonical file is a later cleanup.document-instancevalues; it does not yet generate CLOS classes, slot accessors, ormake-instancecompatibility.md5sumandsha256sum; URL retrieval currently invokes systemcurl.