Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@seedprotocol/mapping

Latest version: v0.8.4-next.1913.g77fa9da

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: kaxline
6 Stars
0 Forks
78 Versions
6.9K Downloads
TypeScript Repo language

Scan summary

@seedprotocol/mapping was last scanned on 24 Nov 2026 at version 0.8.4-next.1913.g77fa9da. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 78 versions; the latest 4 were published within 5 days (20–24 Nov 2026).
  • Findings: No rules fired in version 0.8.4-next.1913.g77fa9da.
  • Downloads: 6,871 downloads.

Versions

78 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.8.4-next.1913.g77fa9da LATEST 24 Nov 2026 No rules fired
0.8.3 23 Nov 2026 No rules fired
0.8.3-next.1883.gdf94512 23 Nov 2026 No rules fired
0.8.3-next.1882.g7cfcdbb 20 Nov 2026 Not shown
0.8.2 10 Nov 2026 Not shown

No rules fired in 0.8.4-next.1913.g77fa9da

Findings

Findings for v0.8.4-next.1913.g77fa9da. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.8.4-next.1913.g77fa9da; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@seedprotocol/mapping

npm

Source → Seed model property mapping helpers and a props-driven React UI. Part of Seed Protocol; the mapped property bag is what you write to items with @seedprotocol/sdk.

Use this package to:

  1. Parse markdown or RSS/Atom into SourceNode[]
  2. Optionally expand URL sources with buildResolvedSourceNodes (extract / file candidates)
  3. Author FieldMapping edges (manually, via autoMap, or via FieldMapper)
  4. applyMapping (sync copy + stored lookup) or applyMappingAsync (host extract/file callback) → property bag

Mappings are an edge list: one source may fan out to multiple properties (e.g. RSS link → importUrl and canonicalUrl). Each property is exclusive — at most one source may map to it. resolve: 'extract' | 'file' is applied by the host callback. resolve: 'lookup' is a stored string → ref table on the edge — the package never fetches, runs Readability, or loads Seed Identity items. resolve: 'derive' | 'assemble' are host-applied transforms persisted on the edge (derive.from is a property name; assemble.blocks is a host-owned string list). A derive-only edge may omit sourceId. Sync and async applyMapping skip these jobs.

Installation

npm install @seedprotocol/mapping

The default entry (@seedprotocol/mapping) is headless — no React peer required. For FieldMapper, also install the optional React peers (react and react-dom, 18 or 19) and import from @seedprotocol/mapping/react:

npm install react react-dom

RSS parsing uses rss-parser with the same custom fields as @seedprotocol/feed parseRssString (aligned, no hard dependency on the feed package barrel).

Headless API

import {
  markdownToSources,
  rssXmlToSources,
  autoMap,
  applyMapping,
  applyMappingAsync,
  buildResolvedSourceNodes,
  classifyUrl,
  type TargetProperty,
  type MappingDocument,
} from '@seedprotocol/mapping'

const sources = markdownToSources(markdown)
const targets: TargetProperty[] = [
  { name: 'title', dataType: 'String' },
  { name: 'body', dataType: 'Text' },
]
const mappings = autoMap(sources, targets)
const properties = applyMapping(sources, mappings, targets)

const doc: MappingDocument = {
  version: 1,
  sourceKind: 'markdown',
  mappings,
}

RSS with resolve jobs. rssXmlToSources parses with rss-parser, which imports Node's timers; in a Vite browser build, use seedVitePlugin({ includeNodePolyfills: true }) from @seedprotocol/vite, which polyfills it.

const { items } = await rssXmlToSources(xml)
const itemSources = items[0]!
const expanded = buildResolvedSourceNodes(itemSources)
const postTargets: TargetProperty[] = [
  { name: 'importUrl', dataType: 'String' },
  { name: 'canonicalUrl', dataType: 'String' },
  { name: 'html', dataType: 'Html' },
  { name: 'featureImage', dataType: 'Image' },
  { name: 'title', dataType: 'String' },
]
const mappings = autoMap(itemSources, postTargets)
// link → importUrl/canonicalUrl (copy); missing body → link extract→html;
// image URLs → featureImage with resolve:'file'

// Sync preview applies lookup entries; extract/file stay pending:
const preview = applyMapping(itemSources, mappings, postTargets)

// Publish path — host owns HTTP / extract / store:
const { properties, errors } = await applyMappingAsync(
  itemSources,
  mappings,
  postTargets,
  {
    resolve: async ({ job, url, contentType, rawValue }) => {
      if (job === 'extract') return await hostExtractHtml(url!)
      return await hostFetchAndStoreFile(url!, contentType)
    },
  },
)
// `resolve` is only called for extract/file edges; lookup edges apply their
// stored `lookup.entries` (see below).
Relation lookup (resolve: 'lookup')

Map a string source (e.g. RSS author) onto a Relation or List-of-Relation target (e.g. authors → Identity) via stored entries on the edge. Use Seed model vocabulary — not a multiple flag:

const postTargets: TargetProperty[] = [
  {
    name: 'authors',
    dataType: 'List',
    refValueType: 'Relation',
    ref: 'Identity',
  },
]

const mappings = [
  {
    sourceId: 'rss-author',
    propertyName: 'authors',
    resolve: 'lookup' as const,
    lookup: {
      entries: [{ value: 'Jane Doe', refs: ['identity-seed-uid'] }],
    },
  },
]

const doc: MappingDocument = {
  version: 1,
  sourceKind: 'rss',
  mappings,
}

// Sync apply emits refs from stored entries (extract/file still skipped):
const bag = applyMapping(itemSources, mappings, postTargets)
// bag.authors === ['identity-seed-uid']

const { properties, errors } = await applyMappingAsync(
  itemSources,
  mappings,
  postTargets,
)
// Unmatched values are omitted from the bag and listed in errors[].
// Do not fetch identities inside apply — persist the assignment, then apply.

// Sync apply reports the misses through a callback:
applyMapping(itemSources, mappings, postTargets, {
  onUnmatched: ({ propertyName, value }) => holdItem(propertyName, value),
})

An entry maps one string to an ordered list of refs, so a joint byline such as "Mira Chen and Sam Ortiz" can name both people, lead first. A document saved with { value, ref } entries reads as refs: [ref]; lookupEntriesFromMapping returns entries in the refs shape. A Relation target holds one ref, so an entry with several gives it the first.

Set split on a lookup edge to look up the parts of a string that has no entry of its own:

{
  sourceId: 'rss-author',
  propertyName: 'authors',
  resolve: 'lookup',
  split: { separators: ['and', '&'] }, // DEFAULT_LOOKUP_SEPARATORS
  lookup: { entries: [{ value: 'Mira Chen', refs: ['mira'] }, { value: 'Sam Ortiz', refs: ['sam'] }] },
}
// "Sam Ortiz & Mira Chen" applies as ['sam', 'mira']

The whole string's own entry wins; only a string without one is split. and splits only as a word with spaces around it, in any case, and , is available but left out of the default because feeds print "Chen, Mira". The refs of the parts that have entries are applied in the string's order, and each part without one is reported to onUnmatched with splitFrom set to the whole string (applyMappingAsync lists it in errors). useFieldMapper's setLookupSplit(rowId, separators) and a lookup row's onSplitChange set or clear it; splitLookupValue and resolveLookup expose the same rules to a host that matches strings itself.

A field that repeats in the feed is a list, not a joined string. rssXmlToSources keeps every dc:creator (RSS) and author (RSS or Atom): the source's value is the first and values holds them all, in document order, without repeats. A lookup edge looks up each one, and split applies to each. Refs apply in that order without repeats, and each value without an entry is reported to onUnmatched (applyMappingAsync lists it in errors), so a partly known byline applies its known people. A Relation target takes the first ref. Copy edges read value. A host that passes rssItemToSources its own items gets the list from parseRssString in @seedprotocol/feed.

A source value matches an entry when their lookupKey is the same: NFC, internal whitespace collapsed, trimmed and case-folded, so mira chen finds the Mira Chen entry. Entries are stored with case kept (normalizeLookupKey). An empty source value is no lookup: it is neither applied nor reported as unmatched. collectLookupValues(items, mapping) lists every distinct value a lookup's source holds across a feed's items, for an editor that assigns them all.

autoMap pairs alias matches such as author → authors with resolve: 'lookup' and empty entries. It never invents refs. Pass the current mappings as its third argument and a property that stays a lookup keeps its entries; useFieldMapper does. Moving a lookup to another source (withPreservedExtras) keeps its entries too.

classifyUrl({ url, contentType? }) is a pure MIME/extension classifier (html | image | audio | video | unknown). Enclosure nodes expose meta.url, meta.contentType, and meta.class (not a stringified object).

FieldMapper UI

Props-driven only — no Seed hooks or routing. Import from @seedprotocol/mapping/react.

Two layouts share the same persisted FieldMapping[]. layout defaults to "rows".

layout Behavior
"rows" (default) Row-based authoring. Pass origin sources only — transforms are chosen per row (no @extract/@file cards).
"wires" (deprecated) Two-pane click-to-connect with SVG connectors. Pass buildResolvedSourceNodes(sources) so extract/file candidates appear as source cards. Still supported for one minor.

When layout="rows", rowKey picks orientation:

rowKey Behavior
"property" (default) One row per target property; source + transform inside the row. Structurally property-exclusive.
"source" One row per edge (insertion order); conflict banner when two rows claim one property; coverage banner for missing required targets.

Mark targets with required: true so coverage / default filters surface missing fields. Default visible set for property mode is mapped + required (defaultRows="requiredAndMapped").

import { useState } from 'react'
import {
  buildResolvedSourceNodes,
  markdownToSources,
  rssItemToSources,
  applyMappingAsync,
  type FieldMapping,
} from '@seedprotocol/mapping'
import { FieldMapper, useFieldMapper } from '@seedprotocol/mapping/react'

// Rows — property-keyed (default layout; recommended)
<FieldMapper
  rowKey="property"
  sources={rssItemToSources(item)} // origin sources; no buildResolvedSourceNodes
  targets={postTargets} // e.g. { name: 'html', dataType: 'Html', required: true }
  mappings={mappings}
  onChange={setMappings}
  slots={{ lookups: 'row', preview: 'row' }}
  renderRowAccessory={(row) =>
    row.mapping?.resolve === 'extract' || row.mapping?.resolve === 'file'
      ? <button type="button">Preview</button>
      : null
  }
  renderLookup={(row) => (
    <IdentityLookup
      values={row.sampleValues} // every value the row needs an entry for
      entries={row.mapping?.lookup?.entries ?? []}
      onChange={row.onLookupChange}
    />
  )}
  renderRowExpansion={(row) =>
    row.mapping?.resolve === 'assemble' ? <AssembleStack row={row} /> : null
  }
  transformOptions={(row, defaults) =>
    row.target?.name === 'slug'
      ? [...defaults, { value: 'derive', label: 'from title' }]
      : defaults
  }
/>

// Rows — source-keyed
<FieldMapper rowKey="source" sources={itemSources} targets={targets} mappings={mappings} onChange={setMappings} />

// Wires (deprecated — opt in explicitly)
<FieldMapper
  layout="wires"
  sources={buildResolvedSourceNodes(markdownToSources(markdown))}
  targets={targets}
  mappings={mappings}
  onChange={setMappings}
  theme="none"
/>

Headless mechanics (same package):

const mapper = useFieldMapper({
  sources,
  targets,
  mappings,
  onChange: setMappings,
  rowKey: 'property',
})
// mapper.rows, mapper.coverage, mapper.setSource, mapper.setTransform, …

Connecting a source to a Relation / List-of-Relation target sets resolve: 'lookup'. Pass renderLookup to paint the host picker (Identity, etc.) on that row, or after the rows with slots.lookups: 'section'. Without it the package's uid text editor is shown; slots.lookups: false hides it. Entries are stored in lookup.entries on the edge. A row stays needsLookup until each of row.sampleValues has an entry, except that a single Relation is mapped once one of them has.

A document saved before 0.8.0 may keep its entries in a top-level lookups table, which 0.8.0 ignores. migrateMappingLookups(document) moves them onto the edges; save the document it returns.

Row and JSON previews match sync applyMapping output. Lookup hits appear in the bag; extract/file/derive/assemble stay under _pendingResolve. JSON sits behind a disclosure.

derive and assemble are first-class resolve words. The package persists the keys and treats a source-less derive edge as mapped. Hosts own apply (slugify, named-block HTML) and product labels (e.g. from title via transformOptions). Do not invent a leftover source named “from title”. Package autoMap does not default html to assemble.

Theming

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @seedprotocol/mapping

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229