npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

halfcode-compiler.xnl

v0.2.3

Published

Compile XNL-described applications into runtime-ready skill capsules.

Downloads

418

Readme

halfcode-compiler.xnl

The single public npm package for compiling XNL-described applications into runtime-ready skill capsules.

npm install halfcode-compiler.xnl

Use the package root for the high-level application assembly and skill capsule APIs:

import {
  resolveApplicationAssembly,
  compileResourceSkillCapsule,
  type PageObjectResource,
} from "halfcode-compiler.xnl"

Multi-capsule distribution is an additive plan/apply surface. Planning resolves exact sibling dependencies, captures every output as canonical immutable contentBase64, preflights the complete closure, and does not mutate the target. PlannedSkillFile.content remains a compatibility byte view, but every read returns a defensive copy; projection, validation, and apply use the canonical string authority. Applying rejects empty or disconnected closures before any live mutation and consumes only that plan plus a caller-selected output root:

import {
  applySkillCapsuleDistributionPlan,
  planSkillCapsuleDistribution,
  type SkillCapsuleDependency,
  type SkillCapsuleDistributionPlan,
} from "halfcode-compiler.xnl"

const plan: SkillCapsuleDistributionPlan = await planSkillCapsuleDistribution({
  assembly,
  rootSkillFqns: ["example.resource_lifecycle.skill.devops"],
})

await applySkillCapsuleDistributionPlan(plan, { outputRoot })

Each capsule identity includes the XNL apiVersion and version. The planner generates exactly one references/.halfcode/provenance.json per capsule with the source identity, halfcode.skill-distribution/v1 generator and every payload file digest. The applier reconstructs and validates this manifest before any target mutation.

The legacy compileSkillCapsule and compileResourceSkillCapsule APIs remain available from both the package root and halfcode-compiler.xnl/skill-capsule. The subpath also exports the new plan/apply APIs and SkillCapsuleDependency type.

The package root also exposes the canonical Resource DSL system Skill in two forms. Use the module descriptor when composing it as a typed sibling dependency in a larger application assembly; use the immutable bundled plan when installing it directly:

import {
  loadHalfcodeResourceDslSystemSkillModule,
  loadHalfcodeResourceDslSystemSkillPlan,
} from "halfcode-compiler.xnl"

const resourceDslModule = loadHalfcodeResourceDslSystemSkillModule()
const readyToInstall = await loadHalfcodeResourceDslSystemSkillPlan()

The module's resource root is contained in the installed npm package. Both forms are generated from that same packaged ResourcePackage during build, while sys-halfcode-resource-dsl keeps its independent 1.0.0 Skill version.

Lower-level APIs are available through explicit subpaths such as halfcode-compiler.xnl/resource-core and halfcode-compiler.xnl/authoring-runtime.

The resource-core subpath preserves the single-package loader and adds deterministic, read-only composition APIs:

import {
  loadResourceTree,
  composeLayeredResourceRegistry,
  resolveEffectiveResourceContentIdentities,
  buildResourceDependencySnapshot,
} from "halfcode-compiler.xnl/resource-core"

loadResourceTree() returns an additive LoadedResourceTree whose content identities come from the same raw-byte read used for fatal UTF-8 decoding and XNL parsing. resolveEffectiveResourceContentIdentities() accepts only the canonical registry and exact loaded layers, selects each effective authority identity, and merges only explicit Kind-owned digest contributions.

Layer order, tombstones, dependency edges, and digest contributions are explicit caller-owned facts. Resource core does not assign semantics to layer names, infer dependencies from arbitrary strings, or own host installation paths. Structural ResourceTree values remain valid for generic layer composition; the new identity projector requires authentic loaded trees.

EffectiveResourceRegistry.compositionRevision binds ordered identity/presence/layer/shadow/tombstone, selected KindDefinition authority identity/contract, and canonical logical-origin facts, but deliberately excludes descriptor/node/metadata bytes; its revision field remains an exact compatibility alias. Snapshot construction accepts only the immutable registry returned by the canonical composer, copies/freeze its own origin facts, and rejects inconsistent structural projections. ResourceDependencySnapshot.registryRevision additionally binds the revalidated content digests of every effective resource, while snapshotRevision binds the selected roots, reachable closure, and participating typed edges. Duplicate contribution keys fail closed, and all canonical ordering uses fixed UTF-16 code-unit order rather than locale-dependent sorting.