Skip to content

Make the @logicsrc packages publishable - #134

Merged
ralyodio merged 1 commit into
masterfrom
opencontext-packaging
Aug 9, 2026
Merged

Make the @logicsrc packages publishable#134
ralyodio merged 1 commit into
masterfrom
opencontext-packaging

Conversation

@ralyodio

@ralyodio ralyodio commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@logicsrc/opencontext could not be installed from npm. Found while attempting to publish after #132. (Replaces #133, which carried pre-squash history and so read as conflicted.)

Three defects, each of which alone breaks a published tarball:

  1. opencontext had a file: dependency. It declared "@logicsrc/validators": "file:../validators". A file: specifier is unresolvable for anyone installing from the registry, so npm install @logicsrc/opencontext failed outright.

  2. validators imported schemas by a path that escapes its own package. All 50 schemas came in via "../../schemas/schemas/*.json" — correct inside the monorepo, outside the tarball once published. An installed @logicsrc/validators could not load a single schema. Now imported through @logicsrc/schemas package exports, with a real dependency declared.

  3. Three schemas had no export entry. repo, pull-request, and openprd-prd were unreachable by package specifier. Added. The exports map is now sorted so it stays readable as it grows.

validators also gained files, publishConfig, and license so it publishes the way its siblings do.

Verification

Verified the way a stranger would, not just by building:

npm pack --workspace @logicsrc/schemas --workspace @logicsrc/validators --workspace @logicsrc/opencontext
# install the three tarballs into a clean project outside the monorepo
opencontext version           -> 1.0
opencontext init demo         -> project created
opencontext validate --strict -> No problems found.   (exercises schema loading)
opencontext resolve --explain -> resolves, with a digest

validate --strict is the important one: it loads every schema through the package exports, which is exactly the path that was broken.

Full workspace test suite green.

@logicsrc/opencontext could not be installed from npm. Three defects, each of
which alone breaks a published tarball:

1. opencontext depended on "@logicsrc/validators": "file:../validators". A
   file: specifier is unresolvable for anyone installing from the registry, so
   `npm install @logicsrc/opencontext` failed outright.

2. validators imported all 50 schemas by relative path across the repository
   ("../../schemas/schemas/*.json"). That resolves inside the monorepo and
   escapes the package once published, so an installed validators could not
   load a single schema. Now imported through @logicsrc/schemas package
   exports, with a real dependency declared.

3. Three of those schemas — repo, pull-request, openprd-prd — had no entry in
   the schemas exports map, so they were unreachable by package specifier.
   Added; the map is now sorted so it stays readable as it grows.

validators also gained files/publishConfig/license so it publishes the same way
its siblings do.

Verified the way a stranger would: npm pack all three, install the tarballs
into a clean project outside the monorepo, and run the installed binary —
version, init, validate --strict (which exercises schema loading through the
package exports), and resolve --explain all succeed. Full workspace suite green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

80 finding(s)

HIGH/CRITICAL: 9 | MEDIUM: 48 | LOW: 23

Severity Rule Location
HIGH manifest-typosquat apps/commandboard-web/package.json:20
HIGH manifest-typosquat apps/logicsrc-web/package.json:28
HIGH manifest-typosquat apps/pwa/package.json:19
HIGH js-ssrf-outbound-request apps/pwa/public/sw.js:45
HIGH secret-generic-credential plugins/agentgit/src/index.ts:12
HIGH secret-generic-credential plugins/c0mpute/src/index.ts:12
HIGH secret-generic-credential plugins/coinpay/src/index.ts:12
HIGH secret-generic-credential plugins/sh1pt/src/index.ts:11
HIGH secret-generic-credential plugins/ugig/src/index.ts:11
MEDIUM js-unescaped-html-sink apps/commandboard-web/src/main.ts:19
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/app/[[...slug]]/page.tsx:73
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/app/blog/[slug]/page.tsx:120
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/app/docs/[slug]/page.tsx:55
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/app/layout.tsx:83
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/app/pricing/page.tsx:46
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/components/site-shell.tsx:46
MEDIUM sql-template-interpolation packages/cli/src/index.ts:846
MEDIUM sql-template-interpolation packages/cli/src/index.ts:848
MEDIUM sql-template-interpolation packages/cli/src/index.ts:855
MEDIUM sql-template-interpolation packages/cli/src/teams.ts:286
MEDIUM sql-template-interpolation packages/cli/src/teams.ts:439
MEDIUM sql-template-interpolation packages/cli/src/teams.ts:442
MEDIUM sql-template-interpolation packages/opencontext/src/adapters/sqlite.ts:104
MEDIUM redos-nested-quantifier packages/opencontext/src/ids.ts:10
MEDIUM redos-nested-quantifier packages/opencontext/src/ids.ts:11
MEDIUM redos-nested-quantifier packages/opencontext/src/validate.ts:104
MEDIUM redos-nested-quantifier packages/openontology/src/ids.ts:20
MEDIUM redos-nested-quantifier packages/openprd/src/validate.ts:41
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-account-audit-event.schema.json:23
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-account-grant.schema.json:23
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-account-grant.schema.json:35
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-account-provider.schema.json:20
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-connected-account.schema.json:30
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-credential-audit-event.schema.json:14
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-bundle.schema.json:206
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-decision.schema.json:12
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-decision.schema.json:131
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-decision.schema.json:137
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-decision.schema.json:193
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-decision.schema.json:196
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-decision.schema.json:200
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-decision.schema.json:225
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-diagnostic.schema.json:47
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-manifest.schema.json:333
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-object.schema.json:197
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-object.schema.json:203
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-object.schema.json:306
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-provenance.schema.json:16
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-provenance.schema.json:36
MEDIUM redos-nested-quantifier packages/schemas/schemas/logicsrc-opencontext-provenance.schema.json:70

…and 30 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 7eba9ef into master Aug 9, 2026
6 checks passed
@ralyodio
ralyodio deleted the opencontext-packaging branch August 9, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant