@mmon-co/ncept-default-theory 2.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tools.js CHANGED
@@ -9,8 +9,9 @@ import { readMissionPath } from "@mmon-co/ncept-core/theory/path";
9
9
  import { pathDefault } from "./path.js";
10
10
  import { event, refinePendingHomes } from "./event.js";
11
11
  import { isAttemptOutcome } from "./outcomes.js";
12
- import { activeDefaultRecords, completionNodeRef, electedObservations, assertDefaultRetraction, emptyNodeMemory, interpretationsDefault, isClaim, isDefaultObservation, isDemonstration, isRetrievalOpenerDemonstration, isTeaching, memoryDefault, stateDefault, DEFAULT_THEORY_REF, DEFAULT_PARAMETERS, } from "./state.js";
13
- import { defaultNodeState, defaultQueryTokens, indicatorsDefault, isDefaultKnown, isDefaultReviewable, } from "./tags.js";
12
+ import { learnerAttempt, posedTask } from "./evaluation.js";
13
+ import { activeDefaultRecords, completionNodeRef, electedObservations, assertDefaultRetraction, emptyNodeMemory, interpretationsDefault, isClaim, isDefaultObservation, isDemonstration, isRetrievalOpenerDemonstration, isTeaching, memoryDefault, stateDefault, DEFAULT_THEORY_REF, } from "./state.js";
14
+ import { defaultNodeState, defaultQueryTokens, indicatorsDefault, isDefaultKnown, isDefaultReviewable, isDefaultReviewDue, } from "./tags.js";
14
15
  const nodeProperty = { type: "string", pattern: "^node-.+" };
15
16
  const scopeProperties = { scope: { type: "array", items: nodeProperty } };
16
17
  const surfaceProperty = { type: "string", pattern: "^surface-.+" };
@@ -410,7 +411,7 @@ export const defaultInstrumentTools = [
410
411
  "1. demonstrated: the Node query holds. A Node with no completion is never demonstrated. Aided attempts count only as practice unless the query selects them.",
411
412
  "2. probably-known: an attached knows claim is newer than any failure on this Node.",
412
413
  "3. unknown: otherwise. Only demonstrated and probably-known count as known for routing.",
413
- "Retention is separate: the schedule replays the first unaided attempt per Node per UTC day as Good or Again. Unaided success also gives Good to direct prerequisites, at most once per day; failure never flows down. A diagnosed component regression supplies Again unless its slip is already recorded. An unresolved failure stays due for Review until an unaided success, independently of the forgetting curve. Claims start a short schedule without covering prerequisites. Review tags select ordinary acquired Nodes and scheduled completion-bound Nodes below the retention thresholds, excluding milestones and Nodes with pedagogy:review: false. Scheduled completion-bound Nodes remain eligible despite acquisition withdrawal; incomplete or expired reports do not supply Again.",
414
+ "Retention is separate: the schedule replays each Node's grade for the learner day. Unaided success also gives Good to direct prerequisites, at most once per day; failure never flows down. A diagnosed component regression supplies Again unless its slip is already recorded. An unresolved failure stays due for Review until an unaided success, independently of the forgetting curve. Claims start a short schedule without covering prerequisites. The pedagogy:review schedule is {kind: fsrs} for memory, {kind: never} for no Review, or {kind: interval, days: N} for a check N days after the last one. Unset means never for milestones and fsrs otherwise. Review tags select ordinary acquired Nodes and scheduled completion-bound Nodes below the retention thresholds. Scheduled completion-bound Nodes remain eligible despite acquisition withdrawal; incomplete or expired reports do not supply Again.",
414
415
  "A newer knows claim can follow failure; a later failure defeats that claim unless completion still holds.",
415
416
  ].join("\n"),
416
417
  *run(raw, ctx) {
@@ -427,9 +428,7 @@ export const defaultInstrumentTools = [
427
428
  .map((id) => candidate(ctx, id))),
428
429
  scopedTool("probes", "Claimed or due Nodes with acquisition and retention facts.", (ctx, scope) => readingNodes(ctx, scope).flatMap((id) => {
429
430
  const state = defaultNodeState(ctx.state, id);
430
- return state.label === "probably-known" ||
431
- (isDefaultReviewable(state) &&
432
- (state.schedule?.lapsed === true || (state.schedule?.retrievability ?? 1) < DEFAULT_PARAMETERS.retention.due))
431
+ return state.label === "probably-known" || (isDefaultReviewable(state) && isDefaultReviewDue(state))
433
432
  ? [{ ...candidate(ctx, id), schedule: state.schedule, rule: trail(ctx, id).rule }]
434
433
  : [];
435
434
  })),
@@ -516,7 +515,7 @@ const recordDemonstration = {
516
515
  name: "record_demonstration",
517
516
  description: [
518
517
  "Record one attempted posed check: a posed task with a determinable outcome and an attempt. Reading, explanation, a remark in passing, dialogue is not one. An explicit I don’t know response to a posed task is a dont-know demonstration; closing without answering is not.",
519
- "Use it for a free response, a requested Artifact section, an observed step, or an explicitly posed conversational check. Preserve task and response verbatim; grade success/failure with grader tutor. For a lesson-opening retrieval prompt, use record_retrieval_opener instead.",
518
+ "Use it for a free response, a requested Artifact section, an observed step, or an explicitly posed conversational check. Preserve the posed task and answer excerpt verbatim, including when grading directly after a judge error; grade success/failure with grader tutor. For a lesson-opening retrieval prompt, use record_retrieval_opener instead.",
520
519
  "Decide unaided when posing: the task must be at least as demanding as the Node's capability statement in every respect. Hints, candidates on a production capability, a missing required clock, or tools on a no-tool task make it aided. Help before outcome makes it aided; the completion after help is not a second attempt.",
521
520
  "For an answer to a Material item, use record_material_attempt. A runner records its own outcome; correct a wrong runner grade with evaluation_override and a reason. An option's optional error string remains verbatim in the response.",
522
521
  "Never infer prerequisite failures. Record a prerequisite only if its own posed step was attempted; the label query accounts for structural evidence.",
@@ -526,8 +525,8 @@ const recordDemonstration = {
526
525
  outcome: { enum: ["success", "failure", "dont-know"] },
527
526
  unaided: { type: "boolean" },
528
527
  grader: { enum: ["mechanical", "tutor", "learner"] },
529
- task: { type: "string" },
530
- response: { type: "string" },
528
+ task: posedTask,
529
+ response: learnerAttempt,
531
530
  }, ["node", "outcome", "unaided", "grader"]),
532
531
  *run(raw, ctx) {
533
532
  const input = args(raw, ["node", "outcome", "unaided", "grader", "task", "response"], ["node", "outcome", "unaided", "grader"]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mmon-co/ncept-default-theory",
3
- "version": "2.0.0",
4
- "license": "MIT",
3
+ "version": "3.0.1",
4
+ "license": "FSL-1.1-ALv2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/mmon-co/ncept.git",
@@ -13,6 +13,16 @@
13
13
  "LICENSE"
14
14
  ],
15
15
  "type": "module",
16
+ "imports": {
17
+ "#fsrs-scheduler": {
18
+ "types": "ts-fsrs",
19
+ "default": "@open-spaced-repetition/srs-kit"
20
+ },
21
+ "#fsrs-date": {
22
+ "types": "ts-fsrs",
23
+ "default": "@open-spaced-repetition/srs-kit/chrono/date"
24
+ }
25
+ },
16
26
  "exports": {
17
27
  ".": {
18
28
  "types": "./dist/index.d.ts",
@@ -40,8 +50,9 @@
40
50
  "prepack": "bun run build"
41
51
  },
42
52
  "dependencies": {
43
- "@mmon-co/ncept-core": "^0.3.0",
44
- "ts-fsrs": "^4.0.0",
53
+ "@mmon-co/ncept-core": "^0.4.0",
54
+ "@open-spaced-repetition/srs-kit": "1.0.0",
55
+ "ts-fsrs": "^6.0.0",
45
56
  "yaml": "^2.5.0"
46
57
  },
47
58
  "devDependencies": {