aura-code 0.3.7 → 0.5.0

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.
Files changed (109) hide show
  1. package/README.md +54 -2
  2. package/dist/agent/compactor.d.ts +26 -0
  3. package/dist/agent/compactor.js +156 -0
  4. package/dist/agent/compactor.js.map +1 -0
  5. package/dist/agent/design.d.ts +17 -0
  6. package/dist/agent/design.js +175 -0
  7. package/dist/agent/design.js.map +1 -0
  8. package/dist/agent/loop.js +8 -1
  9. package/dist/agent/loop.js.map +1 -1
  10. package/dist/agent/system-prompt.d.ts +1 -1
  11. package/dist/agent/system-prompt.js +5 -2
  12. package/dist/agent/system-prompt.js.map +1 -1
  13. package/dist/cli/display.js +40 -4
  14. package/dist/cli/display.js.map +1 -1
  15. package/dist/cli/index.js +258 -44
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/config/defaults.js +1 -1
  18. package/dist/config/defaults.js.map +1 -1
  19. package/dist/config/project-config.d.ts +6 -0
  20. package/dist/config/project-config.js +2 -0
  21. package/dist/config/project-config.js.map +1 -1
  22. package/dist/dream/dream.d.ts +48 -0
  23. package/dist/dream/dream.js +187 -0
  24. package/dist/dream/dream.js.map +1 -0
  25. package/dist/kanban/index.d.ts +5 -0
  26. package/dist/kanban/index.js +11 -0
  27. package/dist/kanban/index.js.map +1 -0
  28. package/dist/kanban/pipeline.d.ts +16 -0
  29. package/dist/kanban/pipeline.js +910 -0
  30. package/dist/kanban/pipeline.js.map +1 -0
  31. package/dist/kanban/server.d.ts +5 -0
  32. package/dist/kanban/server.js +820 -0
  33. package/dist/kanban/server.js.map +1 -0
  34. package/dist/kanban/types.d.ts +75 -0
  35. package/dist/kanban/types.js +6 -0
  36. package/dist/kanban/types.js.map +1 -0
  37. package/dist/learnlight/driven.d.ts +2 -0
  38. package/dist/learnlight/driven.js +109 -0
  39. package/dist/learnlight/driven.js.map +1 -0
  40. package/dist/learnlight/index.d.ts +4 -0
  41. package/dist/learnlight/index.js +32 -0
  42. package/dist/learnlight/index.js.map +1 -0
  43. package/dist/learnlight/lesson-prep.d.ts +36 -0
  44. package/dist/learnlight/lesson-prep.js +224 -0
  45. package/dist/learnlight/lesson-prep.js.map +1 -0
  46. package/dist/learnlight/report.d.ts +2 -0
  47. package/dist/learnlight/report.js +37 -0
  48. package/dist/learnlight/report.js.map +1 -0
  49. package/dist/learnlight/types.d.ts +72 -0
  50. package/dist/learnlight/types.js +6 -0
  51. package/dist/learnlight/types.js.map +1 -0
  52. package/dist/perception/graph-store.d.ts +11 -0
  53. package/dist/perception/graph-store.js +33 -0
  54. package/dist/perception/graph-store.js.map +1 -1
  55. package/dist/perception/index.d.ts +1 -1
  56. package/dist/perception/index.js +2 -1
  57. package/dist/perception/index.js.map +1 -1
  58. package/dist/providers/factory.d.ts +16 -0
  59. package/dist/providers/factory.js +72 -0
  60. package/dist/providers/factory.js.map +1 -1
  61. package/dist/providers/openai-compatible.js +80 -49
  62. package/dist/providers/openai-compatible.js.map +1 -1
  63. package/dist/research/council.d.ts +26 -0
  64. package/dist/research/council.js +225 -0
  65. package/dist/research/council.js.map +1 -0
  66. package/dist/research/research.d.ts +24 -0
  67. package/dist/research/research.js +116 -0
  68. package/dist/research/research.js.map +1 -0
  69. package/dist/ruby/alternator.d.ts +36 -1
  70. package/dist/ruby/alternator.js +40 -31
  71. package/dist/ruby/alternator.js.map +1 -1
  72. package/dist/ruby/stats.js +10 -11
  73. package/dist/ruby/stats.js.map +1 -1
  74. package/dist/ruby/types.js +1 -1
  75. package/dist/ruby/types.js.map +1 -1
  76. package/dist/safety/permissions.d.ts +8 -0
  77. package/dist/safety/permissions.js +12 -0
  78. package/dist/safety/permissions.js.map +1 -1
  79. package/dist/setup/provider-registry.js +14 -0
  80. package/dist/setup/provider-registry.js.map +1 -1
  81. package/dist/setup/provider-test.js +24 -2
  82. package/dist/setup/provider-test.js.map +1 -1
  83. package/dist/setup/telegram-wizard.d.ts +57 -0
  84. package/dist/setup/telegram-wizard.js +343 -0
  85. package/dist/setup/telegram-wizard.js.map +1 -0
  86. package/dist/tools/audio-transcribe.d.ts +20 -0
  87. package/dist/tools/audio-transcribe.js +39 -28
  88. package/dist/tools/audio-transcribe.js.map +1 -1
  89. package/dist/tools/gmail-tool.d.ts +11 -0
  90. package/dist/tools/gmail-tool.js +221 -0
  91. package/dist/tools/gmail-tool.js.map +1 -0
  92. package/dist/tools/read-file.js +13 -0
  93. package/dist/tools/read-file.js.map +1 -1
  94. package/dist/tools/telegram-bot.js +103 -18
  95. package/dist/tools/telegram-bot.js.map +1 -1
  96. package/dist/tools/telegram-voice.d.ts +22 -0
  97. package/dist/tools/telegram-voice.js +203 -0
  98. package/dist/tools/telegram-voice.js.map +1 -0
  99. package/dist/tools/telegram.d.ts +6 -1
  100. package/dist/tools/telegram.js +115 -5
  101. package/dist/tools/telegram.js.map +1 -1
  102. package/dist/tools/video-render.d.ts +11 -0
  103. package/dist/tools/video-render.js +189 -0
  104. package/dist/tools/video-render.js.map +1 -0
  105. package/dist/util/errors.js +6 -0
  106. package/dist/util/errors.js.map +1 -1
  107. package/dist/viz/index.js +816 -30
  108. package/dist/viz/index.js.map +1 -1
  109. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/kanban/server.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yBAAyB;AACzB,0EAA0E;AAC1E,gDAAgD;AAChD,gFAAgF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBhF,8CA0FC;AAzGD,2CAA6B;AAC7B,sDAA8B;AAC9B,2BAAgD;AAChD,+CAA2D;AAYpD,KAAK,UAAU,iBAAiB,CAAC,IAAyB;IAC/D,MAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;IACtB,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,GAAG,GAAG,IAAI,oBAAe,CAAC,EAAE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,OAAO,KAAK,CAAC,UAAU,SAAS,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClG,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;oBACjB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAClB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;oBACzB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACpB,CAAC;gBACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;IAE9D,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,SAAS,GAAG,CAAC,CAAS;IACpB,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACtG,CAAC"}
@@ -0,0 +1,75 @@
1
+ /** The five pipeline columns. */
2
+ export type PipelinePhase = 'read' | 'plan' | 'execute' | 'verify' | 'report';
3
+ /** The four swim-lane rows. */
4
+ export type PipelineRow = 'orchestrate' | 'architect' | 'verify' | 'ruby-alternator';
5
+ /** Status of a task card within the pipeline. */
6
+ export type TaskStatus = 'pending' | 'running' | 'done' | 'failed' | 'skipped';
7
+ /** A single task card on the board. */
8
+ export interface KanbanTask {
9
+ /** Unique id. */
10
+ id: string;
11
+ /** Pipeline phase this task starts in. */
12
+ phase: PipelinePhase;
13
+ /** Swim-lane row. */
14
+ row: PipelineRow;
15
+ /** Badge / context label (e.g. "Agent: Researcher"). */
16
+ badge: string;
17
+ /** Human-readable title. */
18
+ title: string;
19
+ /** Detailed description. */
20
+ description: string;
21
+ /** Provider / runtime tag (e.g. "Claude-3.5", "Vitest"). */
22
+ tag: string;
23
+ /** Whether the card uses the high-priority (red) style. */
24
+ highPriority: boolean;
25
+ }
26
+ /** Per-phase result for a single task. */
27
+ export interface PhaseResult {
28
+ phase: PipelinePhase;
29
+ status: TaskStatus;
30
+ output: string;
31
+ durationMs: number;
32
+ error?: string;
33
+ }
34
+ /** Full pipeline execution record for one task. */
35
+ export interface TaskExecution {
36
+ task: KanbanTask;
37
+ phases: PhaseResult[];
38
+ /** Overall status derived from phases. */
39
+ status: TaskStatus;
40
+ startedAt: number;
41
+ completedAt?: number;
42
+ }
43
+ /** The report produced at the end of a pipeline run. */
44
+ export interface PipelineReport {
45
+ /** ISO timestamp. */
46
+ generatedAt: string;
47
+ /** Wall-clock total. */
48
+ totalDurationMs: number;
49
+ /** Per-row execution records. */
50
+ rows: RowReport[];
51
+ /** Aggregate stats. */
52
+ stats: {
53
+ totalTasks: number;
54
+ completed: number;
55
+ failed: number;
56
+ skipped: number;
57
+ };
58
+ }
59
+ /** Report for one swim-lane row. */
60
+ export interface RowReport {
61
+ row: PipelineRow;
62
+ label: string;
63
+ executions: TaskExecution[];
64
+ status: TaskStatus;
65
+ }
66
+ /** Real-time progress event pushed over WebSocket. */
67
+ export interface ProgressEvent {
68
+ type: 'phase_start' | 'phase_done' | 'row_done' | 'pipeline_done' | 'error';
69
+ taskId?: string;
70
+ phase?: PipelinePhase;
71
+ row?: PipelineRow;
72
+ status?: TaskStatus;
73
+ output?: string;
74
+ message?: string;
75
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // ─────────────────────────────────────────────────────────────────────────────
3
+ // Kanban Board Pipeline Types
4
+ // ─────────────────────────────────────────────────────────────────────────────
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/kanban/types.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,8BAA8B;AAC9B,gFAAgF"}
@@ -0,0 +1,2 @@
1
+ import { LLMProvider } from '../providers/types.js';
2
+ export declare function generateDrivenMaterial(topic: string, level: string, provider: LLMProvider, projectRoot: string): Promise<string>;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.generateDrivenMaterial = generateDrivenMaterial;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const child_process_1 = require("child_process");
40
+ const util_1 = require("util");
41
+ const execAsync = (0, util_1.promisify)(child_process_1.exec);
42
+ async function generateDrivenMaterial(topic, level, provider, projectRoot) {
43
+ const systemPrompt = `You are an expert English curriculum designer. Create a full lesson material similar to "Learnlight" materials for the given topic and level.
44
+
45
+ Topic: ${topic}
46
+ Level: ${level}
47
+
48
+ Output the material as a strict JSON object with this exact structure (no markdown, just JSON):
49
+ {
50
+ "title": "A catchy title for the lesson",
51
+ "subtitle": "By the end of the session, you will be able to...",
52
+ "level": "${level}",
53
+ "beforeWeStart": {
54
+ "keyLanguage": ["word1", "word2", "word3"],
55
+ "questions": ["Question 1", "Question 2"]
56
+ },
57
+ "vocabularyBoost": {
58
+ "title": "Vocabulary Section Title",
59
+ "words": ["word4 - definition/context", "word5 - definition/context"],
60
+ "questions": ["Discussion question 1", "Discussion question 2"]
61
+ },
62
+ "shareExperience": {
63
+ "title": "Share your experience",
64
+ "questions": ["Experience question 1", "Experience question 2"]
65
+ },
66
+ "discoverAndLearn": {
67
+ "title": "Discover and learn section",
68
+ "exercises": ["Exercise 1 description", "Exercise 2 description"]
69
+ },
70
+ "spotlight": {
71
+ "title": "Spotlight (Tips/Tricks)",
72
+ "tips": ["Tip 1", "Tip 2", "Tip 3"]
73
+ },
74
+ "yourTurn": {
75
+ "title": "Your turn (Roleplay/Practice)",
76
+ "scenarios": ["Scenario 1", "Scenario 2"]
77
+ }
78
+ }`;
79
+ const history = [
80
+ { role: 'user', content: 'Generate the lesson material.' }
81
+ ];
82
+ let text = '';
83
+ for await (const chunk of provider.stream(systemPrompt, history, [])) {
84
+ if (chunk.type === 'text')
85
+ text += chunk.text;
86
+ if (chunk.type === 'done')
87
+ break;
88
+ }
89
+ let jsonText = text.trim();
90
+ if (jsonText.startsWith('```json')) {
91
+ jsonText = jsonText.replace(/^```json\n/, '').replace(/\n```$/, '');
92
+ }
93
+ else if (jsonText.startsWith('```')) {
94
+ jsonText = jsonText.replace(/^```\n/, '').replace(/\n```$/, '');
95
+ }
96
+ const lessonData = JSON.parse(jsonText);
97
+ const jsonPath = path.join(projectRoot, 'temp_lesson.json');
98
+ fs.writeFileSync(jsonPath, JSON.stringify(lessonData, null, 2));
99
+ const pyScript = path.join(projectRoot, 'generate_lesson_pdf.py');
100
+ const safeTitle = lessonData.title.replace(/[^a-zA-Z0-9]/g, '_');
101
+ const outPdf = path.join(projectRoot, `Lesson_${safeTitle}.pdf`);
102
+ await execAsync(`python3 "${pyScript}" "${jsonPath}" "${outPdf}"`);
103
+ try {
104
+ fs.unlinkSync(jsonPath);
105
+ }
106
+ catch (e) { }
107
+ return outPdf;
108
+ }
109
+ //# sourceMappingURL=driven.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"driven.js","sourceRoot":"","sources":["../../src/learnlight/driven.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wDAsEC;AA7ED,uCAAyB;AACzB,2CAA6B;AAC7B,iDAAqC;AACrC,+BAAiC;AAEjC,MAAM,SAAS,GAAG,IAAA,gBAAS,EAAC,oBAAI,CAAC,CAAC;AAE3B,KAAK,UAAU,sBAAsB,CAAC,KAAa,EAAE,KAAa,EAAE,QAAqB,EAAE,WAAmB;IACnH,MAAM,YAAY,GAAG;;SAEd,KAAK;SACL,KAAK;;;;;;cAMA,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BjB,CAAC;IAED,MAAM,OAAO,GAAqB;QAChC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,+BAA+B,EAAE;KAC3D,CAAC;IAEF,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;QACrE,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;YAAE,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC;QAC9C,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;YAAE,MAAM;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+1,4 @@
1
+ export * from './types.js';
2
+ export { createLessonPrepWorkflow, runLessonPrepWorkflow, resumeLessonPrepWorkflow, sampleBusinessEnglishInput, sampleGeneralEnglishInput, } from './lesson-prep.js';
3
+ export { generateSessionReport } from './report.js';
4
+ export { generateDrivenMaterial } from './driven.js';
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ // ─────────────────────────────────────────────────────────────────────────────
3
+ // LearnLight Lesson Preparation Module
4
+ // ─────────────────────────────────────────────────────────────────────────────
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.generateDrivenMaterial = exports.generateSessionReport = exports.sampleGeneralEnglishInput = exports.sampleBusinessEnglishInput = exports.resumeLessonPrepWorkflow = exports.runLessonPrepWorkflow = exports.createLessonPrepWorkflow = void 0;
21
+ __exportStar(require("./types.js"), exports);
22
+ var lesson_prep_js_1 = require("./lesson-prep.js");
23
+ Object.defineProperty(exports, "createLessonPrepWorkflow", { enumerable: true, get: function () { return lesson_prep_js_1.createLessonPrepWorkflow; } });
24
+ Object.defineProperty(exports, "runLessonPrepWorkflow", { enumerable: true, get: function () { return lesson_prep_js_1.runLessonPrepWorkflow; } });
25
+ Object.defineProperty(exports, "resumeLessonPrepWorkflow", { enumerable: true, get: function () { return lesson_prep_js_1.resumeLessonPrepWorkflow; } });
26
+ Object.defineProperty(exports, "sampleBusinessEnglishInput", { enumerable: true, get: function () { return lesson_prep_js_1.sampleBusinessEnglishInput; } });
27
+ Object.defineProperty(exports, "sampleGeneralEnglishInput", { enumerable: true, get: function () { return lesson_prep_js_1.sampleGeneralEnglishInput; } });
28
+ var report_js_1 = require("./report.js");
29
+ Object.defineProperty(exports, "generateSessionReport", { enumerable: true, get: function () { return report_js_1.generateSessionReport; } });
30
+ var driven_js_1 = require("./driven.js");
31
+ Object.defineProperty(exports, "generateDrivenMaterial", { enumerable: true, get: function () { return driven_js_1.generateDrivenMaterial; } });
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/learnlight/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,uCAAuC;AACvC,gFAAgF;;;;;;;;;;;;;;;;;AAEhF,6CAA2B;AAC3B,mDAM0B;AALxB,0HAAA,wBAAwB,OAAA;AACxB,uHAAA,qBAAqB,OAAA;AACrB,0HAAA,wBAAwB,OAAA;AACxB,4HAAA,0BAA0B,OAAA;AAC1B,2HAAA,yBAAyB,OAAA;AAE3B,yCAAoD;AAA3C,kHAAA,qBAAqB,OAAA;AAC9B,yCAAqD;AAA5C,mHAAA,sBAAsB,OAAA"}
@@ -0,0 +1,36 @@
1
+ import type { StepResult, WorkflowState } from '../workflows/types.js';
2
+ import type { LessonPrepInput } from './types.js';
3
+ /**
4
+ * Creates a LearnLight lesson preparation workflow.
5
+ * The workflow is persisted to disk and ready to be run.
6
+ *
7
+ * @param input - The lesson preparation input parameters.
8
+ * @returns The created workflow state.
9
+ */
10
+ export declare function createLessonPrepWorkflow(input: LessonPrepInput): Promise<WorkflowState>;
11
+ /**
12
+ * Run a lesson preparation workflow from start to finish.
13
+ * Uses the provided runStep callback to execute each step.
14
+ *
15
+ * @param state - The workflow state (from createLessonPrepWorkflow).
16
+ * @param runStep - Callback that runs a single step's task and returns the result.
17
+ * @returns The final workflow state.
18
+ */
19
+ export declare function runLessonPrepWorkflow(state: WorkflowState, runStep: (task: string, stepIndex: number, previousResults: StepResult[]) => Promise<StepResult>): Promise<WorkflowState>;
20
+ /**
21
+ * Resume a previously-paused or failed lesson preparation workflow.
22
+ *
23
+ * @param id - The workflow ID to resume.
24
+ * @param runStep - Callback that runs a single step's task.
25
+ * @returns The final workflow state, or null if the workflow was not found.
26
+ */
27
+ export declare function resumeLessonPrepWorkflow(id: string, runStep: (task: string, stepIndex: number, previousResults: StepResult[]) => Promise<StepResult>): Promise<WorkflowState | null>;
28
+ /**
29
+ * Creates a sample lesson prep input for a Business English student.
30
+ * Useful for testing or demonstrations.
31
+ */
32
+ export declare function sampleBusinessEnglishInput(): LessonPrepInput;
33
+ /**
34
+ * Creates a sample lesson prep input for a General English learner.
35
+ */
36
+ export declare function sampleGeneralEnglishInput(): LessonPrepInput;
@@ -0,0 +1,224 @@
1
+ "use strict";
2
+ // ─────────────────────────────────────────────────────────────────────────────
3
+ // LearnLight Lesson Preparation Workflow
4
+ // Creates a structured lesson plan using the Aura workflow engine.
5
+ // ─────────────────────────────────────────────────────────────────────────────
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.createLessonPrepWorkflow = createLessonPrepWorkflow;
8
+ exports.runLessonPrepWorkflow = runLessonPrepWorkflow;
9
+ exports.resumeLessonPrepWorkflow = resumeLessonPrepWorkflow;
10
+ exports.sampleBusinessEnglishInput = sampleBusinessEnglishInput;
11
+ exports.sampleGeneralEnglishInput = sampleGeneralEnglishInput;
12
+ const engine_js_1 = require("../workflows/engine.js");
13
+ // ─────────────────────────────────────────────────────────────────────────────
14
+ // Workflow step definitions
15
+ // ─────────────────────────────────────────────────────────────────────────────
16
+ /**
17
+ * Builds the ordered workflow steps for a LearnLight lesson preparation.
18
+ * Each step is a prompt sent to the agent loop.
19
+ */
20
+ function buildLessonPrepSteps(input) {
21
+ const { topic, student, durationMinutes = 50, focusAreas, notes } = input;
22
+ const focusStr = focusAreas?.length ? focusAreas.join(', ') : 'balanced';
23
+ const studentDesc = `${student.name} – Level ${student.level} (${student.ageGroup})` +
24
+ `, native: ${student.nativeLanguage}` +
25
+ `, goals: ${student.goals.join('; ')}` +
26
+ `, interests: ${student.interests.join('; ')}` +
27
+ (student.previousNotes ? `, notes: ${student.previousNotes}` : '');
28
+ return [
29
+ // ── Step 1: Analyse ──────────────────────────────────────────────────
30
+ {
31
+ name: 'Analyse Student Profile',
32
+ task: `You are a senior language tutor preparing a LearnLight lesson.
33
+
34
+ Student profile: ${studentDesc}
35
+ Topic: "${topic}"
36
+ Target duration: ${durationMinutes} minutes
37
+ Focus areas: ${focusStr}
38
+ ${notes ? `Additional notes: ${notes}` : ''}
39
+ ${student.weaknesses.length ? `Known weaknesses: ${student.weaknesses.join('; ')}` : ''}
40
+
41
+ Analyse this student profile and topic. Produce a structured analysis covering:
42
+ 1. **Relevance** — why this topic suits the student's level and goals
43
+ 2. **Prerequisites** — what the student should already know
44
+ 3. **Challenges** — anticipated difficulties (grammar, vocabulary, pronunciation)
45
+ 4. **Opportunities** — how to leverage the student's interests for engagement
46
+
47
+ Output plain text analysis — no JSON. Use markdown headings.`,
48
+ },
49
+ // ── Step 2: Define Objectives ─────────────────────────────────────────
50
+ {
51
+ name: 'Define Learning Objectives',
52
+ task: `Based on the analysis from the previous step, write 3–5 SMART learning objectives for a ${durationMinutes}-minute LearnLight lesson on "${topic}" at ${student.level} level.
53
+
54
+ Each objective must be:
55
+ - **Specific** — exactly what the student will be able to do
56
+ - **Measurable** — how success will be observed
57
+ - **Achievable** — realistic for the student's level and time
58
+ - **Relevant** — tied to the student's goals and interests
59
+ - **Time-bound** — achievable within ${durationMinutes} minutes
60
+
61
+ Format as a numbered list with a 1-sentence justification for each.`,
62
+ },
63
+ // ── Step 3: Design Activities ─────────────────────────────────────────
64
+ {
65
+ name: 'Design Lesson Activities',
66
+ task: `Design a ${durationMinutes}-minute LearnLight lesson on "${topic}" for a ${student.level} student.
67
+
68
+ Create a timed activity sequence. Include:
69
+ 1. **Warm-up** (5–7 min) — engaging lead-in that activates prior knowledge
70
+ 2. **Presentation** (10–15 min) — introduce new language/input
71
+ 3. **Practice** (15–20 min) — controlled and freer practice activities
72
+ 4. **Production** (10–15 min) — communicative task using the target language
73
+ 5. **Wrap-up & Feedback** (3–5 min) — review, Q&A, homework assignment
74
+
75
+ For each activity specify:
76
+ - Name and duration
77
+ - Detailed instructions (as if telling the teacher what to do)
78
+ - Interaction type (teacher-led, pair-work, group-work, individual, whole-class)
79
+ - Materials needed (whiteboard, handout, online tool, etc.)
80
+ - Differentiation: how to adapt if the student finds it too easy or too hard
81
+
82
+ Output in markdown. Total must sum to ${durationMinutes} minutes.`,
83
+ },
84
+ // ── Step 4: Vocabulary & Materials ────────────────────────────────────
85
+ {
86
+ name: 'Prepare Vocabulary & Materials',
87
+ task: `Generate a vocabulary list and materials checklist for a ${student.level} LearnLight lesson on "${topic}".
88
+
89
+ **Vocabulary** — list 8–12 key words/phrases. For each include:
90
+ - Word/phrase
91
+ - Part of speech
92
+ - Simple definition suitable for ${student.level} level
93
+ - Example sentence relevant to the topic
94
+ - Collocations or common phrases (where applicable)
95
+
96
+ **Materials checklist** — list everything the teacher needs to prepare:
97
+ - Handouts, slides, or digital resources
98
+ - Audio/video links (suggest real URLs or searchable titles)
99
+ - Props, images, or realia
100
+ - Online tools or apps
101
+
102
+ **Homework suggestion** — 1–2 tasks that reinforce the lesson.
103
+
104
+ Format as structured markdown lists.`,
105
+ },
106
+ // ── Step 5: Teacher Notes ─────────────────────────────────────────────
107
+ {
108
+ name: 'Write Teacher Notes & Delivery Tips',
109
+ task: `Write concise teacher notes for delivering a ${student.level} LearnLight lesson on "${topic}" (planned for ${durationMinutes} minutes).
110
+
111
+ Cover:
112
+ 1. **Pacing guide** — rough timing for a ${durationMinutes}-minute lesson, when to speed up or slow down
113
+ 2. **ICQs (Instruction-Check Questions)** — 2–3 questions to verify the student understands task instructions
114
+ 3. **CCQs (Concept-Check Questions)** — 2–3 questions to verify the student understands the target language
115
+ 4. **Error correction strategy** — when and how to correct (immediate vs. delayed, reformulation vs. elicitation)
116
+ 5. **Extension ideas** — what to do if you finish early or the student is especially engaged
117
+ 6. **Contingency plan** — what to skip if time is running short
118
+
119
+ Keep it practical and actionable. Markdown format.`,
120
+ },
121
+ ];
122
+ }
123
+ // ─────────────────────────────────────────────────────────────────────────────
124
+ // Public API
125
+ // ─────────────────────────────────────────────────────────────────────────────
126
+ /**
127
+ * Creates a LearnLight lesson preparation workflow.
128
+ * The workflow is persisted to disk and ready to be run.
129
+ *
130
+ * @param input - The lesson preparation input parameters.
131
+ * @returns The created workflow state.
132
+ */
133
+ async function createLessonPrepWorkflow(input) {
134
+ const steps = buildLessonPrepSteps(input);
135
+ const description = `LearnLight lesson: "${input.topic}" for ${input.student.name} (${input.student.level})`;
136
+ return (0, engine_js_1.createWorkflow)({
137
+ name: `LearnLight: ${input.topic}`,
138
+ description,
139
+ steps,
140
+ });
141
+ }
142
+ /**
143
+ * Run a lesson preparation workflow from start to finish.
144
+ * Uses the provided runStep callback to execute each step.
145
+ *
146
+ * @param state - The workflow state (from createLessonPrepWorkflow).
147
+ * @param runStep - Callback that runs a single step's task and returns the result.
148
+ * @returns The final workflow state.
149
+ */
150
+ async function runLessonPrepWorkflow(state, runStep) {
151
+ return (0, engine_js_1.runWorkflow)(state, runStep);
152
+ }
153
+ /**
154
+ * Resume a previously-paused or failed lesson preparation workflow.
155
+ *
156
+ * @param id - The workflow ID to resume.
157
+ * @param runStep - Callback that runs a single step's task.
158
+ * @returns The final workflow state, or null if the workflow was not found.
159
+ */
160
+ async function resumeLessonPrepWorkflow(id, runStep) {
161
+ return (0, engine_js_1.resumeWorkflow)(id, runStep);
162
+ }
163
+ // ─────────────────────────────────────────────────────────────────────────────
164
+ // Utility: build a sample LessonPrepInput for quick testing
165
+ // ─────────────────────────────────────────────────────────────────────────────
166
+ /**
167
+ * Creates a sample lesson prep input for a Business English student.
168
+ * Useful for testing or demonstrations.
169
+ */
170
+ function sampleBusinessEnglishInput() {
171
+ return {
172
+ topic: 'Giving a Presentation — Structuring Your Talk',
173
+ student: {
174
+ name: 'Maria',
175
+ level: 'B2',
176
+ ageGroup: 'adult',
177
+ nativeLanguage: 'Spanish',
178
+ goals: [
179
+ 'Feel confident in client meetings',
180
+ 'Reduce filler words and hesitations',
181
+ 'Use more professional vocabulary',
182
+ ],
183
+ weaknesses: [
184
+ 'Long pauses mid-sentence',
185
+ 'Overuse of "um" and "like"',
186
+ 'Rarely uses signposting language',
187
+ ],
188
+ interests: ['Technology', 'Startups', 'Tennis'],
189
+ previousNotes: 'Maria is motivated but nervous about formal presentations. She responds well to clear structure and positive reinforcement.',
190
+ },
191
+ durationMinutes: 50,
192
+ focusAreas: ['speaking', 'business', 'vocabulary'],
193
+ notes: 'Focus on signposting language (first, next, finally, etc.). Include a mock presentation segment.',
194
+ };
195
+ }
196
+ /**
197
+ * Creates a sample lesson prep input for a General English learner.
198
+ */
199
+ function sampleGeneralEnglishInput() {
200
+ return {
201
+ topic: 'Talking About Travel Experiences — Present Perfect vs. Past Simple',
202
+ student: {
203
+ name: 'Yuki',
204
+ level: 'A2',
205
+ ageGroup: 'adult',
206
+ nativeLanguage: 'Japanese',
207
+ goals: [
208
+ 'Communicate confidently while travelling',
209
+ 'Understand and use basic verb tenses',
210
+ 'Build vocabulary for everyday situations',
211
+ ],
212
+ weaknesses: [
213
+ 'Confuses present perfect and past simple',
214
+ 'Limited travel-related vocabulary',
215
+ 'Hesitates when forming questions',
216
+ ],
217
+ interests: ['Travel', 'Photography', 'Cooking'],
218
+ },
219
+ durationMinutes: 50,
220
+ focusAreas: ['grammar', 'speaking', 'vocabulary'],
221
+ notes: 'Use visuals (photos) to stimulate conversation. Keep grammar explanations minimal — use examples and drilling.',
222
+ };
223
+ }
224
+ //# sourceMappingURL=lesson-prep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lesson-prep.js","sourceRoot":"","sources":["../../src/learnlight/les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jD,KAAK,EAAE,gHAAgH;KACxH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { LLMProvider } from '../providers/types.js';
2
+ export declare function generateSessionReport(query: string, provider: LLMProvider): Promise<string>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateSessionReport = generateSessionReport;
4
+ async function generateSessionReport(query, provider) {
5
+ if (!query.trim()) {
6
+ return 'Type something after :report — a word, a phrase, or a sentence with a mistake.';
7
+ }
8
+ const systemPrompt = `You are an English tutor. The user gives you input and you respond directly — no session analysis, no extra sections.
9
+
10
+ Follow these rules based on the input:
11
+
12
+ - If input is ONE WORD → just say: word = /pronunciation/
13
+ e.g., smile = /smīl/
14
+
15
+ - If input is TWO WORDS (a phrase) → say: phrase = Example *phrase* in a sentence.
16
+ e.g., she does = She *does* like that meal.
17
+
18
+ - If input is a SENTENCE WITH A MISTAKE → correct it with the wrong part in *asterisks* like this:
19
+ Original *mistake* sentence - Correct *fixed* sentence.
20
+ e.g., I *lunched* with my colleague - I *had a lunch* with my colleague.
21
+
22
+ - If input is a QUESTION or OTHER → answer it directly. If you don't know, say "I don't know" — do NOT make anything up.
23
+
24
+ Keep responses short and helpful. No commentary. No markdown headers. Just the answer.`;
25
+ const reportHistory = [
26
+ { role: 'user', content: query }
27
+ ];
28
+ let text = '';
29
+ for await (const chunk of provider.stream(systemPrompt, reportHistory, [])) {
30
+ if (chunk.type === 'text')
31
+ text += chunk.text;
32
+ if (chunk.type === 'done')
33
+ break;
34
+ }
35
+ return text + '\n\n---\n> ⚠️ AI can make mistakes. Verify important information.';
36
+ }
37
+ //# sourceMappingURL=report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/learnlight/report.ts"],"names":[],"mappings":";;AAEA,sDAiCC;AAjCM,KAAK,UAAU,qBAAqB,CAAC,KAAa,EAAE,QAAqB;IAC9E,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAClB,OAAO,gFAAgF,CAAC;IAC1F,CAAC;IAED,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;uFAgBgE,CAAC;IAEtF,MAAM,aAAa,GAAqB;QACtC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE;KACjC,CAAC;IAEF,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,aAAa,EAAE,EAAE,CAAC,EAAE,CAAC;QAC3E,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;YAAE,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC;QAC9C,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;YAAE,MAAM;IACnC,CAAC;IACD,OAAO,IAAI,GAAG,mEAAmE,CAAC;AACpF,CAAC"}