@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/LICENSE +105 -21
- package/README.md +4 -4
- package/dist/catalog.js +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +29 -11
- package/dist/evaluation.d.ts +8 -0
- package/dist/evaluation.js +12 -3
- package/dist/implementation.d.ts +7 -4
- package/dist/index.d.ts +8 -5
- package/dist/index.js +2 -2
- package/dist/migrations.d.ts +11 -3
- package/dist/migrations.js +89 -4
- package/dist/path.d.ts +3 -1
- package/dist/path.js +12 -8
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/schedules.d.ts +51 -0
- package/dist/schedules.js +170 -0
- package/dist/skills/sources.d.ts +3 -3
- package/dist/skills/sources.js +3 -3
- package/dist/state.d.ts +3 -21
- package/dist/state.js +16 -76
- package/dist/tags.d.ts +1 -0
- package/dist/tags.js +7 -8
- package/dist/tools.js +8 -9
- package/package.json +15 -4
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 {
|
|
13
|
-
import {
|
|
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
|
|
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
|
|
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:
|
|
530
|
-
response:
|
|
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": "
|
|
4
|
-
"license": "
|
|
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.
|
|
44
|
-
"
|
|
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": {
|