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

@seal-sdk/playable

v0.13.0

Published

Executable learning-flow orchestration for the SEAL SDK.

Readme

@seal-sdk/playable

Executable learning-flow orchestration for the SEAL SDK.

@seal-sdk/playable connects Activity, Session, Interaction, Evidence, Assessment, Progress and Mastery into a learner-facing activity flow.

Applications normally access this capability through PlatformBuilder().build().playable.

Installation

For the recommended Platform composition:

npm install @seal-sdk/platform

For direct custom composition:

npm install @seal-sdk/playable

Quick start

import {
  PlatformBuilder,
} from "@seal-sdk/platform";

const seal =
  new PlatformBuilder().build();

const activity = {
  id: "activity-1",
  title: "Build the sentence",
  type: "sentence-construction",
  level: "sentence",
  pattern: "SVO",
  availableUnits: [
    "music",
    "Anna",
    "likes",
  ],
  expectedUnits: [
    "Anna",
    "likes",
    "music",
  ],
  skillIds: [
    "basic-svo-construction",
  ],
};

seal.activity.register(activity);

const session =
  await seal.playable.startActivity({
    learnerId: "student-1",
    activityId: activity.id,
  });

const result =
  await seal.playable.submitAnswer({
    sessionId: session.sessionId,
    submittedUnits: [
      "Anna",
      "likes",
      "music",
    ],
  });

console.log(result.correct);
console.log(result.score);
console.log(result.mastery);
console.log(result.recommendation);

For presentation and text rendering, use @seal-sdk/playable-ui.

PlayableLearningFlow

PlayableLearningFlow is the public orchestration contract.

It exposes:

  • startActivity(input);
  • submitAnswer(input);
  • findActivityForSkill(skillId).

The Platform exposes an implementation through platform.playable.

Starting an activity

startActivity(input)

Starts a Playable session for a learner and activity.

const session =
  await seal.playable.startActivity({
    learnerId: "student-1",
    activityId: "activity-1",
  });

The returned PlayableSession contains:

  • sessionId;
  • learnerId;
  • activityId.

Submitting an answer

submitAnswer(input)

Submits ordered units for an active Playable session.

const result =
  await seal.playable.submitAnswer({
    sessionId: session.sessionId,
    submittedUnits: [
      "Anna",
      "likes",
      "music",
    ],
  });

The flow:

  1. creates a submit-answer Interaction;
  2. captures Evidence;
  3. assesses the submitted units;
  4. records Assessment progress for every activity skill;
  5. updates Mastery for the primary skill;
  6. produces unit feedback and a recommendation.

The returned PlayableTurnResult contains:

  • correct;
  • numeric score;
  • feedback;
  • mastery;
  • unitFeedback;
  • correctAnswer;
  • recommendation;
  • optional nextActivity;
  • optional nextSession.

Recommendations

A PlayableRecommendation contains an action, skillId and reason.

Current actions are:

  • continue: the activity skill is mastered or proficient;
  • review: the answer is partially correct, or correct while mastery is still developing;
  • retry: the answer is incorrect with no partial score.

When review finds another incomplete activity for the same skill, the result can include nextActivity and a newly created nextSession.

When continuing, an incomplete activity referenced by the current activity's nextActivityId can be returned in the same way.

Finding an activity by skill

findActivityForSkill(skillId)

Returns the first registered activity whose skillIds contains the requested skill.

const activity =
  await seal.playable.findActivityForSkill(
    "basic-svo-construction",
  );

The result is undefined when no matching activity exists.

Direct composition

DefaultPlayableLearningFlow is the default implementation of PlayableLearningFlow.

Its constructor requires these engine contracts:

  • Activity;
  • Session;
  • Evidence;
  • Assessment;
  • Progress;
  • Mastery.

Most applications should use PlatformBuilder, which creates and connects these dependencies. Direct construction is intended for custom composition.

Errors

submitAnswer() throws a SealError when:

  • the Playable session does not exist;
  • the registered activity cannot be found;
  • the activity does not define a skill.

Public types

The package exports:

  • StartActivityInput;
  • PlayableSession;
  • SubmitPlayableAnswerInput;
  • PlayableUnitFeedback;
  • PlayableRecommendation;
  • PlayableTurnResult;
  • PlayableLearningFlow;
  • DefaultPlayableLearningFlow.