@project-ava-supernova/core 0.2.71
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/agent/agent.d.ts +623 -0
- package/dist/agent/agent.d.ts.map +1 -0
- package/dist/agent/agent.js +3558 -0
- package/dist/agent/agent.js.map +1 -0
- package/dist/agent/claims-auditor.d.ts +54 -0
- package/dist/agent/claims-auditor.d.ts.map +1 -0
- package/dist/agent/claims-auditor.js +125 -0
- package/dist/agent/claims-auditor.js.map +1 -0
- package/dist/agent/context-continuity.d.ts +125 -0
- package/dist/agent/context-continuity.d.ts.map +1 -0
- package/dist/agent/context-continuity.js +231 -0
- package/dist/agent/context-continuity.js.map +1 -0
- package/dist/agent/conversation.d.ts +26 -0
- package/dist/agent/conversation.d.ts.map +1 -0
- package/dist/agent/conversation.js +86 -0
- package/dist/agent/conversation.js.map +1 -0
- package/dist/agent/design-reinjection.d.ts +93 -0
- package/dist/agent/design-reinjection.d.ts.map +1 -0
- package/dist/agent/design-reinjection.js +235 -0
- package/dist/agent/design-reinjection.js.map +1 -0
- package/dist/agent/error-loop-detector.d.ts +59 -0
- package/dist/agent/error-loop-detector.d.ts.map +1 -0
- package/dist/agent/error-loop-detector.js +124 -0
- package/dist/agent/error-loop-detector.js.map +1 -0
- package/dist/agent/fresh-eyes.d.ts +52 -0
- package/dist/agent/fresh-eyes.d.ts.map +1 -0
- package/dist/agent/fresh-eyes.js +118 -0
- package/dist/agent/fresh-eyes.js.map +1 -0
- package/dist/agent/intent-classifier.d.ts +51 -0
- package/dist/agent/intent-classifier.d.ts.map +1 -0
- package/dist/agent/intent-classifier.js +125 -0
- package/dist/agent/intent-classifier.js.map +1 -0
- package/dist/agent/post-edit-verify.d.ts +79 -0
- package/dist/agent/post-edit-verify.d.ts.map +1 -0
- package/dist/agent/post-edit-verify.js +143 -0
- package/dist/agent/post-edit-verify.js.map +1 -0
- package/dist/agent/recover-written-calls.d.ts +90 -0
- package/dist/agent/recover-written-calls.d.ts.map +1 -0
- package/dist/agent/recover-written-calls.js +257 -0
- package/dist/agent/recover-written-calls.js.map +1 -0
- package/dist/agent/social-craft.d.ts +76 -0
- package/dist/agent/social-craft.d.ts.map +1 -0
- package/dist/agent/social-craft.js +210 -0
- package/dist/agent/social-craft.js.map +1 -0
- package/dist/agent/stop-command.d.ts +23 -0
- package/dist/agent/stop-command.d.ts.map +1 -0
- package/dist/agent/stop-command.js +59 -0
- package/dist/agent/stop-command.js.map +1 -0
- package/dist/agent/system-prompt.d.ts +125 -0
- package/dist/agent/system-prompt.d.ts.map +1 -0
- package/dist/agent/system-prompt.js +1334 -0
- package/dist/agent/system-prompt.js.map +1 -0
- package/dist/agent/task-classifier.d.ts +50 -0
- package/dist/agent/task-classifier.d.ts.map +1 -0
- package/dist/agent/task-classifier.js +187 -0
- package/dist/agent/task-classifier.js.map +1 -0
- package/dist/agent/text-tool-parser.d.ts +34 -0
- package/dist/agent/text-tool-parser.d.ts.map +1 -0
- package/dist/agent/text-tool-parser.js +96 -0
- package/dist/agent/text-tool-parser.js.map +1 -0
- package/dist/agent/vision-bridge.d.ts +29 -0
- package/dist/agent/vision-bridge.d.ts.map +1 -0
- package/dist/agent/vision-bridge.js +143 -0
- package/dist/agent/vision-bridge.js.map +1 -0
- package/dist/audit/cost.d.ts +18 -0
- package/dist/audit/cost.d.ts.map +1 -0
- package/dist/audit/cost.js +170 -0
- package/dist/audit/cost.js.map +1 -0
- package/dist/audit/export.d.ts +30 -0
- package/dist/audit/export.d.ts.map +1 -0
- package/dist/audit/export.js +155 -0
- package/dist/audit/export.js.map +1 -0
- package/dist/audit/index.d.ts +11 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +9 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/integrity.d.ts +7 -0
- package/dist/audit/integrity.d.ts.map +1 -0
- package/dist/audit/integrity.js +78 -0
- package/dist/audit/integrity.js.map +1 -0
- package/dist/audit/logger.d.ts +18 -0
- package/dist/audit/logger.d.ts.map +1 -0
- package/dist/audit/logger.js +113 -0
- package/dist/audit/logger.js.map +1 -0
- package/dist/audit/patterns.d.ts +34 -0
- package/dist/audit/patterns.d.ts.map +1 -0
- package/dist/audit/patterns.js +104 -0
- package/dist/audit/patterns.js.map +1 -0
- package/dist/audit/security.d.ts +8 -0
- package/dist/audit/security.d.ts.map +1 -0
- package/dist/audit/security.js +56 -0
- package/dist/audit/security.js.map +1 -0
- package/dist/audit/summary.d.ts +22 -0
- package/dist/audit/summary.d.ts.map +1 -0
- package/dist/audit/summary.js +51 -0
- package/dist/audit/summary.js.map +1 -0
- package/dist/audit/types.d.ts +104 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +11 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/auto/aurora-router.d.ts +71 -0
- package/dist/auto/aurora-router.d.ts.map +1 -0
- package/dist/auto/aurora-router.js +138 -0
- package/dist/auto/aurora-router.js.map +1 -0
- package/dist/auto/auto-coordinator.d.ts +232 -0
- package/dist/auto/auto-coordinator.d.ts.map +1 -0
- package/dist/auto/auto-coordinator.js +1260 -0
- package/dist/auto/auto-coordinator.js.map +1 -0
- package/dist/auto/brief-generator.d.ts +10 -0
- package/dist/auto/brief-generator.d.ts.map +1 -0
- package/dist/auto/brief-generator.js +67 -0
- package/dist/auto/brief-generator.js.map +1 -0
- package/dist/auto/changes-summary.d.ts +19 -0
- package/dist/auto/changes-summary.d.ts.map +1 -0
- package/dist/auto/changes-summary.js +45 -0
- package/dist/auto/changes-summary.js.map +1 -0
- package/dist/auto/context-tracker.d.ts +27 -0
- package/dist/auto/context-tracker.d.ts.map +1 -0
- package/dist/auto/context-tracker.js +56 -0
- package/dist/auto/context-tracker.js.map +1 -0
- package/dist/auto/coordinator-model.d.ts +31 -0
- package/dist/auto/coordinator-model.d.ts.map +1 -0
- package/dist/auto/coordinator-model.js +68 -0
- package/dist/auto/coordinator-model.js.map +1 -0
- package/dist/auto/index.d.ts +12 -0
- package/dist/auto/index.d.ts.map +1 -0
- package/dist/auto/index.js +11 -0
- package/dist/auto/index.js.map +1 -0
- package/dist/auto/intent-gate.d.ts +85 -0
- package/dist/auto/intent-gate.d.ts.map +1 -0
- package/dist/auto/intent-gate.js +247 -0
- package/dist/auto/intent-gate.js.map +1 -0
- package/dist/auto/longxiang-router.d.ts +123 -0
- package/dist/auto/longxiang-router.d.ts.map +1 -0
- package/dist/auto/longxiang-router.js +184 -0
- package/dist/auto/longxiang-router.js.map +1 -0
- package/dist/auto/model-router.d.ts +42 -0
- package/dist/auto/model-router.d.ts.map +1 -0
- package/dist/auto/model-router.js +208 -0
- package/dist/auto/model-router.js.map +1 -0
- package/dist/auto/routing-modes.d.ts +33 -0
- package/dist/auto/routing-modes.d.ts.map +1 -0
- package/dist/auto/routing-modes.js +34 -0
- package/dist/auto/routing-modes.js.map +1 -0
- package/dist/auto/supernova-router.d.ts +50 -0
- package/dist/auto/supernova-router.d.ts.map +1 -0
- package/dist/auto/supernova-router.js +116 -0
- package/dist/auto/supernova-router.js.map +1 -0
- package/dist/auto/task-classifier.d.ts +10 -0
- package/dist/auto/task-classifier.d.ts.map +1 -0
- package/dist/auto/task-classifier.js +116 -0
- package/dist/auto/task-classifier.js.map +1 -0
- package/dist/auto/task-executor.d.ts +86 -0
- package/dist/auto/task-executor.d.ts.map +1 -0
- package/dist/auto/task-executor.js +271 -0
- package/dist/auto/task-executor.js.map +1 -0
- package/dist/auto/types.d.ts +57 -0
- package/dist/auto/types.d.ts.map +1 -0
- package/dist/auto/types.js +2 -0
- package/dist/auto/types.js.map +1 -0
- package/dist/awareness/tick-engine.d.ts +73 -0
- package/dist/awareness/tick-engine.d.ts.map +1 -0
- package/dist/awareness/tick-engine.js +156 -0
- package/dist/awareness/tick-engine.js.map +1 -0
- package/dist/billing/credits.d.ts +213 -0
- package/dist/billing/credits.d.ts.map +1 -0
- package/dist/billing/credits.js +535 -0
- package/dist/billing/credits.js.map +1 -0
- package/dist/billing/meter.d.ts +43 -0
- package/dist/billing/meter.d.ts.map +1 -0
- package/dist/billing/meter.js +67 -0
- package/dist/billing/meter.js.map +1 -0
- package/dist/billing/plans.d.ts +34 -0
- package/dist/billing/plans.d.ts.map +1 -0
- package/dist/billing/plans.js +108 -0
- package/dist/billing/plans.js.map +1 -0
- package/dist/briefing/briefing-engine.d.ts +51 -0
- package/dist/briefing/briefing-engine.d.ts.map +1 -0
- package/dist/briefing/briefing-engine.js +289 -0
- package/dist/briefing/briefing-engine.js.map +1 -0
- package/dist/briefing/index.d.ts +3 -0
- package/dist/briefing/index.d.ts.map +1 -0
- package/dist/briefing/index.js +2 -0
- package/dist/briefing/index.js.map +1 -0
- package/dist/briefing/types.d.ts +49 -0
- package/dist/briefing/types.d.ts.map +1 -0
- package/dist/briefing/types.js +8 -0
- package/dist/briefing/types.js.map +1 -0
- package/dist/checkpoint/checkpoint-manager.d.ts +33 -0
- package/dist/checkpoint/checkpoint-manager.d.ts.map +1 -0
- package/dist/checkpoint/checkpoint-manager.js +144 -0
- package/dist/checkpoint/checkpoint-manager.js.map +1 -0
- package/dist/config/config.d.ts +10 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +169 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/personality.d.ts +32 -0
- package/dist/config/personality.d.ts.map +1 -0
- package/dist/config/personality.js +96 -0
- package/dist/config/personality.js.map +1 -0
- package/dist/config/project-config.d.ts +17 -0
- package/dist/config/project-config.d.ts.map +1 -0
- package/dist/config/project-config.js +38 -0
- package/dist/config/project-config.js.map +1 -0
- package/dist/config/project.d.ts +155 -0
- package/dist/config/project.d.ts.map +1 -0
- package/dist/config/project.js +746 -0
- package/dist/config/project.js.map +1 -0
- package/dist/config/schema.d.ts +61 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +11 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/core/constants.d.ts +13 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +15 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/dates.d.ts +35 -0
- package/dist/core/dates.d.ts.map +1 -0
- package/dist/core/dates.js +45 -0
- package/dist/core/dates.js.map +1 -0
- package/dist/core/errors.d.ts +27 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +172 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/file-lock.d.ts +22 -0
- package/dist/core/file-lock.d.ts.map +1 -0
- package/dist/core/file-lock.js +120 -0
- package/dist/core/file-lock.js.map +1 -0
- package/dist/core/logger.d.ts +9 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +32 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/types.d.ts +157 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +13 -0
- package/dist/core/types.js.map +1 -0
- package/dist/creative/index.d.ts +50 -0
- package/dist/creative/index.d.ts.map +1 -0
- package/dist/creative/index.js +178 -0
- package/dist/creative/index.js.map +1 -0
- package/dist/dataset/capture.d.ts +15 -0
- package/dist/dataset/capture.d.ts.map +1 -0
- package/dist/dataset/capture.js +203 -0
- package/dist/dataset/capture.js.map +1 -0
- package/dist/dataset/config.d.ts +33 -0
- package/dist/dataset/config.d.ts.map +1 -0
- package/dist/dataset/config.js +60 -0
- package/dist/dataset/config.js.map +1 -0
- package/dist/dataset/consumer.d.ts +33 -0
- package/dist/dataset/consumer.d.ts.map +1 -0
- package/dist/dataset/consumer.js +97 -0
- package/dist/dataset/consumer.js.map +1 -0
- package/dist/dataset/emitter.d.ts +153 -0
- package/dist/dataset/emitter.d.ts.map +1 -0
- package/dist/dataset/emitter.js +157 -0
- package/dist/dataset/emitter.js.map +1 -0
- package/dist/dataset/events.d.ts +360 -0
- package/dist/dataset/events.d.ts.map +1 -0
- package/dist/dataset/events.js +30 -0
- package/dist/dataset/events.js.map +1 -0
- package/dist/dataset/generation-emit.d.ts +72 -0
- package/dist/dataset/generation-emit.d.ts.map +1 -0
- package/dist/dataset/generation-emit.js +94 -0
- package/dist/dataset/generation-emit.js.map +1 -0
- package/dist/dataset/redactor.d.ts +22 -0
- package/dist/dataset/redactor.d.ts.map +1 -0
- package/dist/dataset/redactor.js +68 -0
- package/dist/dataset/redactor.js.map +1 -0
- package/dist/dataset/routing.d.ts +17 -0
- package/dist/dataset/routing.d.ts.map +1 -0
- package/dist/dataset/routing.js +77 -0
- package/dist/dataset/routing.js.map +1 -0
- package/dist/dataset/summarizers.d.ts +47 -0
- package/dist/dataset/summarizers.d.ts.map +1 -0
- package/dist/dataset/summarizers.js +98 -0
- package/dist/dataset/summarizers.js.map +1 -0
- package/dist/dataset/verification.d.ts +29 -0
- package/dist/dataset/verification.d.ts.map +1 -0
- package/dist/dataset/verification.js +70 -0
- package/dist/dataset/verification.js.map +1 -0
- package/dist/desktop/budget.d.ts +66 -0
- package/dist/desktop/budget.d.ts.map +1 -0
- package/dist/desktop/budget.js +159 -0
- package/dist/desktop/budget.js.map +1 -0
- package/dist/desktop/capability.d.ts +28 -0
- package/dist/desktop/capability.d.ts.map +1 -0
- package/dist/desktop/capability.js +39 -0
- package/dist/desktop/capability.js.map +1 -0
- package/dist/desktop/conductor.d.ts +104 -0
- package/dist/desktop/conductor.d.ts.map +1 -0
- package/dist/desktop/conductor.js +876 -0
- package/dist/desktop/conductor.js.map +1 -0
- package/dist/desktop/fork-points.d.ts +56 -0
- package/dist/desktop/fork-points.d.ts.map +1 -0
- package/dist/desktop/fork-points.js +138 -0
- package/dist/desktop/fork-points.js.map +1 -0
- package/dist/desktop/index.d.ts +22 -0
- package/dist/desktop/index.d.ts.map +1 -0
- package/dist/desktop/index.js +21 -0
- package/dist/desktop/index.js.map +1 -0
- package/dist/desktop/perception.d.ts +24 -0
- package/dist/desktop/perception.d.ts.map +1 -0
- package/dist/desktop/perception.js +106 -0
- package/dist/desktop/perception.js.map +1 -0
- package/dist/desktop/personas.d.ts +30 -0
- package/dist/desktop/personas.d.ts.map +1 -0
- package/dist/desktop/personas.js +206 -0
- package/dist/desktop/personas.js.map +1 -0
- package/dist/desktop/safety.d.ts +86 -0
- package/dist/desktop/safety.d.ts.map +1 -0
- package/dist/desktop/safety.js +272 -0
- package/dist/desktop/safety.js.map +1 -0
- package/dist/desktop/screen-key.d.ts +54 -0
- package/dist/desktop/screen-key.d.ts.map +1 -0
- package/dist/desktop/screen-key.js +187 -0
- package/dist/desktop/screen-key.js.map +1 -0
- package/dist/desktop/types.d.ts +141 -0
- package/dist/desktop/types.d.ts.map +1 -0
- package/dist/desktop/types.js +8 -0
- package/dist/desktop/types.js.map +1 -0
- package/dist/docs/adapter.d.ts +71 -0
- package/dist/docs/adapter.d.ts.map +1 -0
- package/dist/docs/adapter.js +75 -0
- package/dist/docs/adapter.js.map +1 -0
- package/dist/docs/content/concepts.d.ts +3 -0
- package/dist/docs/content/concepts.d.ts.map +1 -0
- package/dist/docs/content/concepts.js +304 -0
- package/dist/docs/content/concepts.js.map +1 -0
- package/dist/docs/content/features.d.ts +3 -0
- package/dist/docs/content/features.d.ts.map +1 -0
- package/dist/docs/content/features.js +275 -0
- package/dist/docs/content/features.js.map +1 -0
- package/dist/docs/content/index.d.ts +3 -0
- package/dist/docs/content/index.d.ts.map +1 -0
- package/dist/docs/content/index.js +15 -0
- package/dist/docs/content/index.js.map +1 -0
- package/dist/docs/content/reference.d.ts +3 -0
- package/dist/docs/content/reference.d.ts.map +1 -0
- package/dist/docs/content/reference.js +220 -0
- package/dist/docs/content/reference.js.map +1 -0
- package/dist/docs/content/start.d.ts +3 -0
- package/dist/docs/content/start.d.ts.map +1 -0
- package/dist/docs/content/start.js +203 -0
- package/dist/docs/content/start.js.map +1 -0
- package/dist/docs/content/troubleshooting.d.ts +3 -0
- package/dist/docs/content/troubleshooting.d.ts.map +1 -0
- package/dist/docs/content/troubleshooting.js +98 -0
- package/dist/docs/content/troubleshooting.js.map +1 -0
- package/dist/docs/corpus.d.ts +7 -0
- package/dist/docs/corpus.d.ts.map +1 -0
- package/dist/docs/corpus.js +18 -0
- package/dist/docs/corpus.js.map +1 -0
- package/dist/docs/data/capabilities.d.ts +24 -0
- package/dist/docs/data/capabilities.d.ts.map +1 -0
- package/dist/docs/data/capabilities.js +63 -0
- package/dist/docs/data/capabilities.js.map +1 -0
- package/dist/docs/data/modes.d.ts +11 -0
- package/dist/docs/data/modes.d.ts.map +1 -0
- package/dist/docs/data/modes.js +60 -0
- package/dist/docs/data/modes.js.map +1 -0
- package/dist/docs/data/permissions.d.ts +12 -0
- package/dist/docs/data/permissions.d.ts.map +1 -0
- package/dist/docs/data/permissions.js +62 -0
- package/dist/docs/data/permissions.js.map +1 -0
- package/dist/docs/data/personas.d.ts +13 -0
- package/dist/docs/data/personas.d.ts.map +1 -0
- package/dist/docs/data/personas.js +42 -0
- package/dist/docs/data/personas.js.map +1 -0
- package/dist/docs/data/providers.d.ts +21 -0
- package/dist/docs/data/providers.d.ts.map +1 -0
- package/dist/docs/data/providers.js +210 -0
- package/dist/docs/data/providers.js.map +1 -0
- package/dist/docs/data/shortcuts.d.ts +9 -0
- package/dist/docs/data/shortcuts.d.ts.map +1 -0
- package/dist/docs/data/shortcuts.js +18 -0
- package/dist/docs/data/shortcuts.js.map +1 -0
- package/dist/docs/data/tasks.d.ts +17 -0
- package/dist/docs/data/tasks.d.ts.map +1 -0
- package/dist/docs/data/tasks.js +64 -0
- package/dist/docs/data/tasks.js.map +1 -0
- package/dist/docs/data/tools.d.ts +12 -0
- package/dist/docs/data/tools.d.ts.map +1 -0
- package/dist/docs/data/tools.js +100 -0
- package/dist/docs/data/tools.js.map +1 -0
- package/dist/docs/filter.d.ts +35 -0
- package/dist/docs/filter.d.ts.map +1 -0
- package/dist/docs/filter.js +68 -0
- package/dist/docs/filter.js.map +1 -0
- package/dist/docs/i18n/translations.d.ts +2 -0
- package/dist/docs/i18n/translations.d.ts.map +1 -0
- package/dist/docs/i18n/translations.js +4 -0
- package/dist/docs/i18n/translations.js.map +1 -0
- package/dist/docs/i18n.d.ts +15 -0
- package/dist/docs/i18n.d.ts.map +1 -0
- package/dist/docs/i18n.js +88 -0
- package/dist/docs/i18n.js.map +1 -0
- package/dist/docs/index.d.ts +16 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +15 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/docs/product-knowledge.d.ts +45 -0
- package/dist/docs/product-knowledge.d.ts.map +1 -0
- package/dist/docs/product-knowledge.js +147 -0
- package/dist/docs/product-knowledge.js.map +1 -0
- package/dist/docs/types.d.ts +138 -0
- package/dist/docs/types.d.ts.map +1 -0
- package/dist/docs/types.js +14 -0
- package/dist/docs/types.js.map +1 -0
- package/dist/events/event-detector.d.ts +39 -0
- package/dist/events/event-detector.d.ts.map +1 -0
- package/dist/events/event-detector.js +223 -0
- package/dist/events/event-detector.js.map +1 -0
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +2 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/types.d.ts +35 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/events/types.js +8 -0
- package/dist/events/types.js.map +1 -0
- package/dist/exercises/index.d.ts +249 -0
- package/dist/exercises/index.d.ts.map +1 -0
- package/dist/exercises/index.js +181 -0
- package/dist/exercises/index.js.map +1 -0
- package/dist/health/aisles.d.ts +33 -0
- package/dist/health/aisles.d.ts.map +1 -0
- package/dist/health/aisles.js +417 -0
- package/dist/health/aisles.js.map +1 -0
- package/dist/health/cooking.d.ts +13 -0
- package/dist/health/cooking.d.ts.map +1 -0
- package/dist/health/cooking.js +19 -0
- package/dist/health/cooking.js.map +1 -0
- package/dist/health/duplicate.d.ts +47 -0
- package/dist/health/duplicate.d.ts.map +1 -0
- package/dist/health/duplicate.js +136 -0
- package/dist/health/duplicate.js.map +1 -0
- package/dist/health/index.d.ts +7 -0
- package/dist/health/index.d.ts.map +1 -0
- package/dist/health/index.js +10 -0
- package/dist/health/index.js.map +1 -0
- package/dist/health/node-store.d.ts +30 -0
- package/dist/health/node-store.d.ts.map +1 -0
- package/dist/health/node-store.js +250 -0
- package/dist/health/node-store.js.map +1 -0
- package/dist/health/prep.d.ts +86 -0
- package/dist/health/prep.d.ts.map +1 -0
- package/dist/health/prep.js +152 -0
- package/dist/health/prep.js.map +1 -0
- package/dist/health/profile-fields.d.ts +46 -0
- package/dist/health/profile-fields.d.ts.map +1 -0
- package/dist/health/profile-fields.js +194 -0
- package/dist/health/profile-fields.js.map +1 -0
- package/dist/health/session-store.d.ts +30 -0
- package/dist/health/session-store.d.ts.map +1 -0
- package/dist/health/session-store.js +20 -0
- package/dist/health/session-store.js.map +1 -0
- package/dist/health/session-summary.d.ts +10 -0
- package/dist/health/session-summary.d.ts.map +1 -0
- package/dist/health/session-summary.js +106 -0
- package/dist/health/session-summary.js.map +1 -0
- package/dist/health/session-types.d.ts +74 -0
- package/dist/health/session-types.d.ts.map +1 -0
- package/dist/health/session-types.js +53 -0
- package/dist/health/session-types.js.map +1 -0
- package/dist/health/shopping-list.d.ts +226 -0
- package/dist/health/shopping-list.d.ts.map +1 -0
- package/dist/health/shopping-list.js +432 -0
- package/dist/health/shopping-list.js.map +1 -0
- package/dist/health/starters.d.ts +155 -0
- package/dist/health/starters.d.ts.map +1 -0
- package/dist/health/starters.js +270 -0
- package/dist/health/starters.js.map +1 -0
- package/dist/health/store.d.ts +59 -0
- package/dist/health/store.d.ts.map +1 -0
- package/dist/health/store.js +17 -0
- package/dist/health/store.js.map +1 -0
- package/dist/health/types.d.ts +213 -0
- package/dist/health/types.d.ts.map +1 -0
- package/dist/health/types.js +11 -0
- package/dist/health/types.js.map +1 -0
- package/dist/history/conversation-title.d.ts +67 -0
- package/dist/history/conversation-title.d.ts.map +1 -0
- package/dist/history/conversation-title.js +184 -0
- package/dist/history/conversation-title.js.map +1 -0
- package/dist/history/history-manager.d.ts +50 -0
- package/dist/history/history-manager.d.ts.map +1 -0
- package/dist/history/history-manager.js +168 -0
- package/dist/history/history-manager.js.map +1 -0
- package/dist/history/storage.d.ts +41 -0
- package/dist/history/storage.d.ts.map +1 -0
- package/dist/history/storage.js +133 -0
- package/dist/history/storage.js.map +1 -0
- package/dist/i18n/index.d.ts +41 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +188 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/keep-english.d.ts +12 -0
- package/dist/i18n/keep-english.d.ts.map +1 -0
- package/dist/i18n/keep-english.js +351 -0
- package/dist/i18n/keep-english.js.map +1 -0
- package/dist/i18n/locales/ar.d.ts +4 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -0
- package/dist/i18n/locales/ar.js +4143 -0
- package/dist/i18n/locales/ar.js.map +1 -0
- package/dist/i18n/locales/de.d.ts +4 -0
- package/dist/i18n/locales/de.d.ts.map +1 -0
- package/dist/i18n/locales/de.js +4133 -0
- package/dist/i18n/locales/de.js.map +1 -0
- package/dist/i18n/locales/en.d.ts +4068 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +4347 -0
- package/dist/i18n/locales/en.js.map +1 -0
- package/dist/i18n/locales/es.d.ts +4 -0
- package/dist/i18n/locales/es.d.ts.map +1 -0
- package/dist/i18n/locales/es.js +4128 -0
- package/dist/i18n/locales/es.js.map +1 -0
- package/dist/i18n/locales/fr.d.ts +4 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -0
- package/dist/i18n/locales/fr.js +4140 -0
- package/dist/i18n/locales/fr.js.map +1 -0
- package/dist/i18n/locales/hi.d.ts +4 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -0
- package/dist/i18n/locales/hi.js +4143 -0
- package/dist/i18n/locales/hi.js.map +1 -0
- package/dist/i18n/locales/id.d.ts +4 -0
- package/dist/i18n/locales/id.d.ts.map +1 -0
- package/dist/i18n/locales/id.js +4142 -0
- package/dist/i18n/locales/id.js.map +1 -0
- package/dist/i18n/locales/it.d.ts +4 -0
- package/dist/i18n/locales/it.d.ts.map +1 -0
- package/dist/i18n/locales/it.js +4143 -0
- package/dist/i18n/locales/it.js.map +1 -0
- package/dist/i18n/locales/ja.d.ts +4 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -0
- package/dist/i18n/locales/ja.js +4144 -0
- package/dist/i18n/locales/ja.js.map +1 -0
- package/dist/i18n/locales/ko.d.ts +4 -0
- package/dist/i18n/locales/ko.d.ts.map +1 -0
- package/dist/i18n/locales/ko.js +4143 -0
- package/dist/i18n/locales/ko.js.map +1 -0
- package/dist/i18n/locales/nl.d.ts +4 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -0
- package/dist/i18n/locales/nl.js +4143 -0
- package/dist/i18n/locales/nl.js.map +1 -0
- package/dist/i18n/locales/pl.d.ts +4 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -0
- package/dist/i18n/locales/pl.js +4133 -0
- package/dist/i18n/locales/pl.js.map +1 -0
- package/dist/i18n/locales/pt.d.ts +4 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -0
- package/dist/i18n/locales/pt.js +4141 -0
- package/dist/i18n/locales/pt.js.map +1 -0
- package/dist/i18n/locales/ru.d.ts +4 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -0
- package/dist/i18n/locales/ru.js +4143 -0
- package/dist/i18n/locales/ru.js.map +1 -0
- package/dist/i18n/locales/th.d.ts +4 -0
- package/dist/i18n/locales/th.d.ts.map +1 -0
- package/dist/i18n/locales/th.js +4143 -0
- package/dist/i18n/locales/th.js.map +1 -0
- package/dist/i18n/locales/tr.d.ts +4 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -0
- package/dist/i18n/locales/tr.js +4143 -0
- package/dist/i18n/locales/tr.js.map +1 -0
- package/dist/i18n/locales/uk.d.ts +4 -0
- package/dist/i18n/locales/uk.d.ts.map +1 -0
- package/dist/i18n/locales/uk.js +4133 -0
- package/dist/i18n/locales/uk.js.map +1 -0
- package/dist/i18n/locales/vi.d.ts +4 -0
- package/dist/i18n/locales/vi.d.ts.map +1 -0
- package/dist/i18n/locales/vi.js +4143 -0
- package/dist/i18n/locales/vi.js.map +1 -0
- package/dist/i18n/locales/zh-CN.d.ts +4 -0
- package/dist/i18n/locales/zh-CN.d.ts.map +1 -0
- package/dist/i18n/locales/zh-CN.js +4133 -0
- package/dist/i18n/locales/zh-CN.js.map +1 -0
- package/dist/i18n/locales/zh-TW.d.ts +4 -0
- package/dist/i18n/locales/zh-TW.d.ts.map +1 -0
- package/dist/i18n/locales/zh-TW.js +4143 -0
- package/dist/i18n/locales/zh-TW.js.map +1 -0
- package/dist/i18n/types.d.ts +5 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +46 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/index.d.ts +142 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +159 -0
- package/dist/index.js.map +1 -0
- package/dist/indexer/project-indexer.d.ts +66 -0
- package/dist/indexer/project-indexer.d.ts.map +1 -0
- package/dist/indexer/project-indexer.js +574 -0
- package/dist/indexer/project-indexer.js.map +1 -0
- package/dist/indexer/symbol-indexer.d.ts +56 -0
- package/dist/indexer/symbol-indexer.d.ts.map +1 -0
- package/dist/indexer/symbol-indexer.js +579 -0
- package/dist/indexer/symbol-indexer.js.map +1 -0
- package/dist/journal/journal-manager.d.ts +143 -0
- package/dist/journal/journal-manager.d.ts.map +1 -0
- package/dist/journal/journal-manager.js +472 -0
- package/dist/journal/journal-manager.js.map +1 -0
- package/dist/journal/platform-sync.d.ts +17 -0
- package/dist/journal/platform-sync.d.ts.map +1 -0
- package/dist/journal/platform-sync.js +21 -0
- package/dist/journal/platform-sync.js.map +1 -0
- package/dist/journal/types.d.ts +78 -0
- package/dist/journal/types.d.ts.map +1 -0
- package/dist/journal/types.js +74 -0
- package/dist/journal/types.js.map +1 -0
- package/dist/knowledge/index.d.ts +2 -0
- package/dist/knowledge/index.d.ts.map +1 -0
- package/dist/knowledge/index.js +2 -0
- package/dist/knowledge/index.js.map +1 -0
- package/dist/learning/index.d.ts +6 -0
- package/dist/learning/index.d.ts.map +1 -0
- package/dist/learning/index.js +9 -0
- package/dist/learning/index.js.map +1 -0
- package/dist/learning/learner-context.d.ts +11 -0
- package/dist/learning/learner-context.d.ts.map +1 -0
- package/dist/learning/learner-context.js +57 -0
- package/dist/learning/learner-context.js.map +1 -0
- package/dist/learning/library-fork.d.ts +33 -0
- package/dist/learning/library-fork.d.ts.map +1 -0
- package/dist/learning/library-fork.js +92 -0
- package/dist/learning/library-fork.js.map +1 -0
- package/dist/learning/progression-export.d.ts +4 -0
- package/dist/learning/progression-export.d.ts.map +1 -0
- package/dist/learning/progression-export.js +21 -0
- package/dist/learning/progression-export.js.map +1 -0
- package/dist/learning/progression-markdown.d.ts +14 -0
- package/dist/learning/progression-markdown.d.ts.map +1 -0
- package/dist/learning/progression-markdown.js +73 -0
- package/dist/learning/progression-markdown.js.map +1 -0
- package/dist/learning/progression.d.ts +65 -0
- package/dist/learning/progression.d.ts.map +1 -0
- package/dist/learning/progression.js +186 -0
- package/dist/learning/progression.js.map +1 -0
- package/dist/memory/ambient-capture.d.ts +26 -0
- package/dist/memory/ambient-capture.d.ts.map +1 -0
- package/dist/memory/ambient-capture.js +174 -0
- package/dist/memory/ambient-capture.js.map +1 -0
- package/dist/memory/auto-extract.d.ts +54 -0
- package/dist/memory/auto-extract.d.ts.map +1 -0
- package/dist/memory/auto-extract.js +499 -0
- package/dist/memory/auto-extract.js.map +1 -0
- package/dist/memory/config.d.ts +47 -0
- package/dist/memory/config.d.ts.map +1 -0
- package/dist/memory/config.js +52 -0
- package/dist/memory/config.js.map +1 -0
- package/dist/memory/consolidation.d.ts +60 -0
- package/dist/memory/consolidation.d.ts.map +1 -0
- package/dist/memory/consolidation.js +311 -0
- package/dist/memory/consolidation.js.map +1 -0
- package/dist/memory/embedding-service.d.ts +50 -0
- package/dist/memory/embedding-service.d.ts.map +1 -0
- package/dist/memory/embedding-service.js +86 -0
- package/dist/memory/embedding-service.js.map +1 -0
- package/dist/memory/embedding-store.d.ts +31 -0
- package/dist/memory/embedding-store.d.ts.map +1 -0
- package/dist/memory/embedding-store.js +109 -0
- package/dist/memory/embedding-store.js.map +1 -0
- package/dist/memory/graph-engine.d.ts +145 -0
- package/dist/memory/graph-engine.d.ts.map +1 -0
- package/dist/memory/graph-engine.js +628 -0
- package/dist/memory/graph-engine.js.map +1 -0
- package/dist/memory/insights.d.ts +39 -0
- package/dist/memory/insights.d.ts.map +1 -0
- package/dist/memory/insights.js +138 -0
- package/dist/memory/insights.js.map +1 -0
- package/dist/memory/memory-agent.d.ts +93 -0
- package/dist/memory/memory-agent.d.ts.map +1 -0
- package/dist/memory/memory-agent.js +475 -0
- package/dist/memory/memory-agent.js.map +1 -0
- package/dist/memory/memory-manager.d.ts +232 -0
- package/dist/memory/memory-manager.d.ts.map +1 -0
- package/dist/memory/memory-manager.js +1633 -0
- package/dist/memory/memory-manager.js.map +1 -0
- package/dist/memory/migration-v3.d.ts +22 -0
- package/dist/memory/migration-v3.d.ts.map +1 -0
- package/dist/memory/migration-v3.js +193 -0
- package/dist/memory/migration-v3.js.map +1 -0
- package/dist/memory/mode-recall.d.ts +20 -0
- package/dist/memory/mode-recall.d.ts.map +1 -0
- package/dist/memory/mode-recall.js +104 -0
- package/dist/memory/mode-recall.js.map +1 -0
- package/dist/memory/patterns.d.ts +92 -0
- package/dist/memory/patterns.d.ts.map +1 -0
- package/dist/memory/patterns.js +389 -0
- package/dist/memory/patterns.js.map +1 -0
- package/dist/memory/platform-sync.d.ts +54 -0
- package/dist/memory/platform-sync.d.ts.map +1 -0
- package/dist/memory/platform-sync.js +176 -0
- package/dist/memory/platform-sync.js.map +1 -0
- package/dist/memory/procedural.d.ts +47 -0
- package/dist/memory/procedural.d.ts.map +1 -0
- package/dist/memory/procedural.js +182 -0
- package/dist/memory/procedural.js.map +1 -0
- package/dist/memory/project-brain.d.ts +27 -0
- package/dist/memory/project-brain.d.ts.map +1 -0
- package/dist/memory/project-brain.js +158 -0
- package/dist/memory/project-brain.js.map +1 -0
- package/dist/memory/self-improvement.d.ts +45 -0
- package/dist/memory/self-improvement.d.ts.map +1 -0
- package/dist/memory/self-improvement.js +178 -0
- package/dist/memory/self-improvement.js.map +1 -0
- package/dist/memory/tfidf.d.ts +71 -0
- package/dist/memory/tfidf.d.ts.map +1 -0
- package/dist/memory/tfidf.js +223 -0
- package/dist/memory/tfidf.js.map +1 -0
- package/dist/memory/training-export.d.ts +51 -0
- package/dist/memory/training-export.d.ts.map +1 -0
- package/dist/memory/training-export.js +122 -0
- package/dist/memory/training-export.js.map +1 -0
- package/dist/memory/types.d.ts +380 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +99 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/news/index.d.ts +163 -0
- package/dist/news/index.d.ts.map +1 -0
- package/dist/news/index.js +184 -0
- package/dist/news/index.js.map +1 -0
- package/dist/papers/arxiv-client.d.ts +21 -0
- package/dist/papers/arxiv-client.d.ts.map +1 -0
- package/dist/papers/arxiv-client.js +130 -0
- package/dist/papers/arxiv-client.js.map +1 -0
- package/dist/papers/crossref-client.d.ts +3 -0
- package/dist/papers/crossref-client.d.ts.map +1 -0
- package/dist/papers/crossref-client.js +96 -0
- package/dist/papers/crossref-client.js.map +1 -0
- package/dist/papers/discipline.d.ts +19 -0
- package/dist/papers/discipline.d.ts.map +1 -0
- package/dist/papers/discipline.js +96 -0
- package/dist/papers/discipline.js.map +1 -0
- package/dist/papers/index.d.ts +10 -0
- package/dist/papers/index.d.ts.map +1 -0
- package/dist/papers/index.js +7 -0
- package/dist/papers/index.js.map +1 -0
- package/dist/papers/openalex-client.d.ts +13 -0
- package/dist/papers/openalex-client.d.ts.map +1 -0
- package/dist/papers/openalex-client.js +206 -0
- package/dist/papers/openalex-client.js.map +1 -0
- package/dist/papers/paper-fetcher.d.ts +37 -0
- package/dist/papers/paper-fetcher.d.ts.map +1 -0
- package/dist/papers/paper-fetcher.js +75 -0
- package/dist/papers/paper-fetcher.js.map +1 -0
- package/dist/papers/types.d.ts +80 -0
- package/dist/papers/types.d.ts.map +1 -0
- package/dist/papers/types.js +25 -0
- package/dist/papers/types.js.map +1 -0
- package/dist/personas/conductor.d.ts +184 -0
- package/dist/personas/conductor.d.ts.map +1 -0
- package/dist/personas/conductor.js +871 -0
- package/dist/personas/conductor.js.map +1 -0
- package/dist/personas/definitions.d.ts +48 -0
- package/dist/personas/definitions.d.ts.map +1 -0
- package/dist/personas/definitions.js +828 -0
- package/dist/personas/definitions.js.map +1 -0
- package/dist/personas/index.d.ts +4 -0
- package/dist/personas/index.d.ts.map +1 -0
- package/dist/personas/index.js +3 -0
- package/dist/personas/index.js.map +1 -0
- package/dist/personas/types.d.ts +148 -0
- package/dist/personas/types.d.ts.map +1 -0
- package/dist/personas/types.js +5 -0
- package/dist/personas/types.js.map +1 -0
- package/dist/personas/verification-matrix.d.ts +44 -0
- package/dist/personas/verification-matrix.d.ts.map +1 -0
- package/dist/personas/verification-matrix.js +232 -0
- package/dist/personas/verification-matrix.js.map +1 -0
- package/dist/portability/bundle.d.ts +80 -0
- package/dist/portability/bundle.d.ts.map +1 -0
- package/dist/portability/bundle.js +155 -0
- package/dist/portability/bundle.js.map +1 -0
- package/dist/portability/crypto.d.ts +42 -0
- package/dist/portability/crypto.d.ts.map +1 -0
- package/dist/portability/crypto.js +89 -0
- package/dist/portability/crypto.js.map +1 -0
- package/dist/portability/data-types.d.ts +54 -0
- package/dist/portability/data-types.d.ts.map +1 -0
- package/dist/portability/data-types.js +281 -0
- package/dist/portability/data-types.js.map +1 -0
- package/dist/portability/index.d.ts +35 -0
- package/dist/portability/index.d.ts.map +1 -0
- package/dist/portability/index.js +41 -0
- package/dist/portability/index.js.map +1 -0
- package/dist/providers/base-provider.d.ts +65 -0
- package/dist/providers/base-provider.d.ts.map +1 -0
- package/dist/providers/base-provider.js +305 -0
- package/dist/providers/base-provider.js.map +1 -0
- package/dist/providers/catalog.d.ts +25 -0
- package/dist/providers/catalog.d.ts.map +1 -0
- package/dist/providers/catalog.js +53 -0
- package/dist/providers/catalog.js.map +1 -0
- package/dist/providers/deepseek/index.d.ts +9 -0
- package/dist/providers/deepseek/index.d.ts.map +1 -0
- package/dist/providers/deepseek/index.js +19 -0
- package/dist/providers/deepseek/index.js.map +1 -0
- package/dist/providers/deepseek/models.d.ts +3 -0
- package/dist/providers/deepseek/models.d.ts.map +1 -0
- package/dist/providers/deepseek/models.js +56 -0
- package/dist/providers/deepseek/models.js.map +1 -0
- package/dist/providers/generic/index.d.ts +25 -0
- package/dist/providers/generic/index.d.ts.map +1 -0
- package/dist/providers/generic/index.js +51 -0
- package/dist/providers/generic/index.js.map +1 -0
- package/dist/providers/generic/models.d.ts +3 -0
- package/dist/providers/generic/models.d.ts.map +1 -0
- package/dist/providers/generic/models.js +13 -0
- package/dist/providers/generic/models.js.map +1 -0
- package/dist/providers/health-tracker.d.ts +44 -0
- package/dist/providers/health-tracker.d.ts.map +1 -0
- package/dist/providers/health-tracker.js +110 -0
- package/dist/providers/health-tracker.js.map +1 -0
- package/dist/providers/kimi/index.d.ts +9 -0
- package/dist/providers/kimi/index.d.ts.map +1 -0
- package/dist/providers/kimi/index.js +13 -0
- package/dist/providers/kimi/index.js.map +1 -0
- package/dist/providers/kimi/models.d.ts +3 -0
- package/dist/providers/kimi/models.d.ts.map +1 -0
- package/dist/providers/kimi/models.js +60 -0
- package/dist/providers/kimi/models.js.map +1 -0
- package/dist/providers/minimax/index.d.ts +9 -0
- package/dist/providers/minimax/index.d.ts.map +1 -0
- package/dist/providers/minimax/index.js +13 -0
- package/dist/providers/minimax/index.js.map +1 -0
- package/dist/providers/minimax/models.d.ts +3 -0
- package/dist/providers/minimax/models.d.ts.map +1 -0
- package/dist/providers/minimax/models.js +65 -0
- package/dist/providers/minimax/models.js.map +1 -0
- package/dist/providers/mistral/index.d.ts +11 -0
- package/dist/providers/mistral/index.d.ts.map +1 -0
- package/dist/providers/mistral/index.js +24 -0
- package/dist/providers/mistral/index.js.map +1 -0
- package/dist/providers/mistral/models.d.ts +3 -0
- package/dist/providers/mistral/models.d.ts.map +1 -0
- package/dist/providers/mistral/models.js +65 -0
- package/dist/providers/mistral/models.js.map +1 -0
- package/dist/providers/nvidia/index.d.ts +16 -0
- package/dist/providers/nvidia/index.d.ts.map +1 -0
- package/dist/providers/nvidia/index.js +20 -0
- package/dist/providers/nvidia/index.js.map +1 -0
- package/dist/providers/nvidia/models.d.ts +3 -0
- package/dist/providers/nvidia/models.d.ts.map +1 -0
- package/dist/providers/nvidia/models.js +56 -0
- package/dist/providers/nvidia/models.js.map +1 -0
- package/dist/providers/platform/index.d.ts +10 -0
- package/dist/providers/platform/index.d.ts.map +1 -0
- package/dist/providers/platform/index.js +16 -0
- package/dist/providers/platform/index.js.map +1 -0
- package/dist/providers/platform/models.d.ts +3 -0
- package/dist/providers/platform/models.d.ts.map +1 -0
- package/dist/providers/platform/models.js +233 -0
- package/dist/providers/platform/models.js.map +1 -0
- package/dist/providers/provider-registry.d.ts +44 -0
- package/dist/providers/provider-registry.d.ts.map +1 -0
- package/dist/providers/provider-registry.js +197 -0
- package/dist/providers/provider-registry.js.map +1 -0
- package/dist/providers/qwen/index.d.ts +9 -0
- package/dist/providers/qwen/index.d.ts.map +1 -0
- package/dist/providers/qwen/index.js +13 -0
- package/dist/providers/qwen/index.js.map +1 -0
- package/dist/providers/qwen/models.d.ts +3 -0
- package/dist/providers/qwen/models.d.ts.map +1 -0
- package/dist/providers/qwen/models.js +164 -0
- package/dist/providers/qwen/models.js.map +1 -0
- package/dist/providers/request-shaping/index.d.ts +29 -0
- package/dist/providers/request-shaping/index.d.ts.map +1 -0
- package/dist/providers/request-shaping/index.js +31 -0
- package/dist/providers/request-shaping/index.js.map +1 -0
- package/dist/providers/request-shaping/messages.d.ts +61 -0
- package/dist/providers/request-shaping/messages.d.ts.map +1 -0
- package/dist/providers/request-shaping/messages.js +114 -0
- package/dist/providers/request-shaping/messages.js.map +1 -0
- package/dist/providers/request-shaping/model-ids.d.ts +44 -0
- package/dist/providers/request-shaping/model-ids.d.ts.map +1 -0
- package/dist/providers/request-shaping/model-ids.js +96 -0
- package/dist/providers/request-shaping/model-ids.js.map +1 -0
- package/dist/providers/request-shaping/params.d.ts +38 -0
- package/dist/providers/request-shaping/params.d.ts.map +1 -0
- package/dist/providers/request-shaping/params.js +79 -0
- package/dist/providers/request-shaping/params.js.map +1 -0
- package/dist/providers/resilient-provider.d.ts +44 -0
- package/dist/providers/resilient-provider.d.ts.map +1 -0
- package/dist/providers/resilient-provider.js +141 -0
- package/dist/providers/resilient-provider.js.map +1 -0
- package/dist/providers/tencent/index.d.ts +19 -0
- package/dist/providers/tencent/index.d.ts.map +1 -0
- package/dist/providers/tencent/index.js +50 -0
- package/dist/providers/tencent/index.js.map +1 -0
- package/dist/providers/tencent/models.d.ts +3 -0
- package/dist/providers/tencent/models.d.ts.map +1 -0
- package/dist/providers/tencent/models.js +29 -0
- package/dist/providers/tencent/models.js.map +1 -0
- package/dist/providers/types.d.ts +98 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/providers/xiaomi/index.d.ts +9 -0
- package/dist/providers/xiaomi/index.d.ts.map +1 -0
- package/dist/providers/xiaomi/index.js +16 -0
- package/dist/providers/xiaomi/index.js.map +1 -0
- package/dist/providers/xiaomi/models.d.ts +3 -0
- package/dist/providers/xiaomi/models.d.ts.map +1 -0
- package/dist/providers/xiaomi/models.js +37 -0
- package/dist/providers/xiaomi/models.js.map +1 -0
- package/dist/providers/zhipu/index.d.ts +11 -0
- package/dist/providers/zhipu/index.d.ts.map +1 -0
- package/dist/providers/zhipu/index.js +44 -0
- package/dist/providers/zhipu/index.js.map +1 -0
- package/dist/providers/zhipu/models.d.ts +3 -0
- package/dist/providers/zhipu/models.d.ts.map +1 -0
- package/dist/providers/zhipu/models.js +37 -0
- package/dist/providers/zhipu/models.js.map +1 -0
- package/dist/recipes/index.d.ts +215 -0
- package/dist/recipes/index.d.ts.map +1 -0
- package/dist/recipes/index.js +232 -0
- package/dist/recipes/index.js.map +1 -0
- package/dist/remote/client.d.ts +67 -0
- package/dist/remote/client.d.ts.map +1 -0
- package/dist/remote/client.js +202 -0
- package/dist/remote/client.js.map +1 -0
- package/dist/remote/index.d.ts +9 -0
- package/dist/remote/index.d.ts.map +1 -0
- package/dist/remote/index.js +7 -0
- package/dist/remote/index.js.map +1 -0
- package/dist/remote/schema.d.ts +152 -0
- package/dist/remote/schema.d.ts.map +1 -0
- package/dist/remote/schema.js +26 -0
- package/dist/remote/schema.js.map +1 -0
- package/dist/security/index.d.ts +6 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +5 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/scanner.d.ts +67 -0
- package/dist/security/scanner.d.ts.map +1 -0
- package/dist/security/scanner.js +422 -0
- package/dist/security/scanner.js.map +1 -0
- package/dist/social/day-plan.d.ts +38 -0
- package/dist/social/day-plan.d.ts.map +1 -0
- package/dist/social/day-plan.js +16 -0
- package/dist/social/day-plan.js.map +1 -0
- package/dist/social/index.d.ts +290 -0
- package/dist/social/index.d.ts.map +1 -0
- package/dist/social/index.js +96 -0
- package/dist/social/index.js.map +1 -0
- package/dist/tasks/platform-sync.d.ts +22 -0
- package/dist/tasks/platform-sync.d.ts.map +1 -0
- package/dist/tasks/platform-sync.js +132 -0
- package/dist/tasks/platform-sync.js.map +1 -0
- package/dist/tasks/task-manager.d.ts +164 -0
- package/dist/tasks/task-manager.d.ts.map +1 -0
- package/dist/tasks/task-manager.js +643 -0
- package/dist/tasks/task-manager.js.map +1 -0
- package/dist/tasks/types.d.ts +105 -0
- package/dist/tasks/types.d.ts.map +1 -0
- package/dist/tasks/types.js +23 -0
- package/dist/tasks/types.js.map +1 -0
- package/dist/tools/analyze-architecture.d.ts +17 -0
- package/dist/tools/analyze-architecture.d.ts.map +1 -0
- package/dist/tools/analyze-architecture.js +316 -0
- package/dist/tools/analyze-architecture.js.map +1 -0
- package/dist/tools/apply-plan.d.ts +12 -0
- package/dist/tools/apply-plan.d.ts.map +1 -0
- package/dist/tools/apply-plan.js +119 -0
- package/dist/tools/apply-plan.js.map +1 -0
- package/dist/tools/ask-user.d.ts +11 -0
- package/dist/tools/ask-user.d.ts.map +1 -0
- package/dist/tools/ask-user.js +32 -0
- package/dist/tools/ask-user.js.map +1 -0
- package/dist/tools/audit-dependencies.d.ts +13 -0
- package/dist/tools/audit-dependencies.d.ts.map +1 -0
- package/dist/tools/audit-dependencies.js +156 -0
- package/dist/tools/audit-dependencies.js.map +1 -0
- package/dist/tools/authoring/doc-model.d.ts +128 -0
- package/dist/tools/authoring/doc-model.d.ts.map +1 -0
- package/dist/tools/authoring/doc-model.js +82 -0
- package/dist/tools/authoring/doc-model.js.map +1 -0
- package/dist/tools/authoring/frontmatter.d.ts +51 -0
- package/dist/tools/authoring/frontmatter.d.ts.map +1 -0
- package/dist/tools/authoring/frontmatter.js +203 -0
- package/dist/tools/authoring/frontmatter.js.map +1 -0
- package/dist/tools/authoring/image-size.d.ts +17 -0
- package/dist/tools/authoring/image-size.d.ts.map +1 -0
- package/dist/tools/authoring/image-size.js +47 -0
- package/dist/tools/authoring/image-size.js.map +1 -0
- package/dist/tools/authoring/index.d.ts +34 -0
- package/dist/tools/authoring/index.d.ts.map +1 -0
- package/dist/tools/authoring/index.js +44 -0
- package/dist/tools/authoring/index.js.map +1 -0
- package/dist/tools/authoring/md-parse.d.ts +18 -0
- package/dist/tools/authoring/md-parse.d.ts.map +1 -0
- package/dist/tools/authoring/md-parse.js +262 -0
- package/dist/tools/authoring/md-parse.js.map +1 -0
- package/dist/tools/authoring/render-docx.d.ts +18 -0
- package/dist/tools/authoring/render-docx.d.ts.map +1 -0
- package/dist/tools/authoring/render-docx.js +272 -0
- package/dist/tools/authoring/render-docx.js.map +1 -0
- package/dist/tools/authoring/render-md.d.ts +13 -0
- package/dist/tools/authoring/render-md.d.ts.map +1 -0
- package/dist/tools/authoring/render-md.js +139 -0
- package/dist/tools/authoring/render-md.js.map +1 -0
- package/dist/tools/authoring/render-pdf.d.ts +16 -0
- package/dist/tools/authoring/render-pdf.d.ts.map +1 -0
- package/dist/tools/authoring/render-pdf.js +298 -0
- package/dist/tools/authoring/render-pdf.js.map +1 -0
- package/dist/tools/authoring/sections.d.ts +35 -0
- package/dist/tools/authoring/sections.d.ts.map +1 -0
- package/dist/tools/authoring/sections.js +81 -0
- package/dist/tools/authoring/sections.js.map +1 -0
- package/dist/tools/authoring/templates/builtins.d.ts +11 -0
- package/dist/tools/authoring/templates/builtins.d.ts.map +1 -0
- package/dist/tools/authoring/templates/builtins.js +478 -0
- package/dist/tools/authoring/templates/builtins.js.map +1 -0
- package/dist/tools/authoring/templates/index.d.ts +15 -0
- package/dist/tools/authoring/templates/index.d.ts.map +1 -0
- package/dist/tools/authoring/templates/index.js +25 -0
- package/dist/tools/authoring/templates/index.js.map +1 -0
- package/dist/tools/authoring/templates/store.d.ts +15 -0
- package/dist/tools/authoring/templates/store.d.ts.map +1 -0
- package/dist/tools/authoring/templates/store.js +63 -0
- package/dist/tools/authoring/templates/store.js.map +1 -0
- package/dist/tools/authoring/templates/template-model.d.ts +44 -0
- package/dist/tools/authoring/templates/template-model.d.ts.map +1 -0
- package/dist/tools/authoring/templates/template-model.js +39 -0
- package/dist/tools/authoring/templates/template-model.js.map +1 -0
- package/dist/tools/bash.d.ts +34 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +353 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/benchmark.d.ts +12 -0
- package/dist/tools/benchmark.d.ts.map +1 -0
- package/dist/tools/benchmark.js +147 -0
- package/dist/tools/benchmark.js.map +1 -0
- package/dist/tools/browse-library.d.ts +12 -0
- package/dist/tools/browse-library.d.ts.map +1 -0
- package/dist/tools/browse-library.js +188 -0
- package/dist/tools/browse-library.js.map +1 -0
- package/dist/tools/browser-click.d.ts +12 -0
- package/dist/tools/browser-click.d.ts.map +1 -0
- package/dist/tools/browser-click.js +58 -0
- package/dist/tools/browser-click.js.map +1 -0
- package/dist/tools/browser-close.d.ts +11 -0
- package/dist/tools/browser-close.d.ts.map +1 -0
- package/dist/tools/browser-close.js +27 -0
- package/dist/tools/browser-close.js.map +1 -0
- package/dist/tools/browser-navigate.d.ts +12 -0
- package/dist/tools/browser-navigate.d.ts.map +1 -0
- package/dist/tools/browser-navigate.js +66 -0
- package/dist/tools/browser-navigate.js.map +1 -0
- package/dist/tools/browser-snapshot.d.ts +11 -0
- package/dist/tools/browser-snapshot.d.ts.map +1 -0
- package/dist/tools/browser-snapshot.js +56 -0
- package/dist/tools/browser-snapshot.js.map +1 -0
- package/dist/tools/browser-type.d.ts +12 -0
- package/dist/tools/browser-type.d.ts.map +1 -0
- package/dist/tools/browser-type.js +68 -0
- package/dist/tools/browser-type.js.map +1 -0
- package/dist/tools/browser.d.ts +29 -0
- package/dist/tools/browser.d.ts.map +1 -0
- package/dist/tools/browser.js +307 -0
- package/dist/tools/browser.js.map +1 -0
- package/dist/tools/conversation-recall.d.ts +43 -0
- package/dist/tools/conversation-recall.d.ts.map +1 -0
- package/dist/tools/conversation-recall.js +177 -0
- package/dist/tools/conversation-recall.js.map +1 -0
- package/dist/tools/creative-asset-sync.d.ts +33 -0
- package/dist/tools/creative-asset-sync.d.ts.map +1 -0
- package/dist/tools/creative-asset-sync.js +39 -0
- package/dist/tools/creative-asset-sync.js.map +1 -0
- package/dist/tools/curator.d.ts +34 -0
- package/dist/tools/curator.d.ts.map +1 -0
- package/dist/tools/curator.js +191 -0
- package/dist/tools/curator.js.map +1 -0
- package/dist/tools/database-query.d.ts +11 -0
- package/dist/tools/database-query.d.ts.map +1 -0
- package/dist/tools/database-query.js +228 -0
- package/dist/tools/database-query.js.map +1 -0
- package/dist/tools/day-plan.d.ts +27 -0
- package/dist/tools/day-plan.d.ts.map +1 -0
- package/dist/tools/day-plan.js +207 -0
- package/dist/tools/day-plan.js.map +1 -0
- package/dist/tools/debug-logs.d.ts +13 -0
- package/dist/tools/debug-logs.d.ts.map +1 -0
- package/dist/tools/debug-logs.js +141 -0
- package/dist/tools/debug-logs.js.map +1 -0
- package/dist/tools/deploy-manifest.d.ts +37 -0
- package/dist/tools/deploy-manifest.d.ts.map +1 -0
- package/dist/tools/deploy-manifest.js +71 -0
- package/dist/tools/deploy-manifest.js.map +1 -0
- package/dist/tools/design-studio-tools.d.ts +83 -0
- package/dist/tools/design-studio-tools.d.ts.map +1 -0
- package/dist/tools/design-studio-tools.js +761 -0
- package/dist/tools/design-studio-tools.js.map +1 -0
- package/dist/tools/desktop-click-by-name.d.ts +12 -0
- package/dist/tools/desktop-click-by-name.d.ts.map +1 -0
- package/dist/tools/desktop-click-by-name.js +64 -0
- package/dist/tools/desktop-click-by-name.js.map +1 -0
- package/dist/tools/desktop-focus-window.d.ts +12 -0
- package/dist/tools/desktop-focus-window.d.ts.map +1 -0
- package/dist/tools/desktop-focus-window.js +59 -0
- package/dist/tools/desktop-focus-window.js.map +1 -0
- package/dist/tools/desktop-key-press.d.ts +12 -0
- package/dist/tools/desktop-key-press.d.ts.map +1 -0
- package/dist/tools/desktop-key-press.js +73 -0
- package/dist/tools/desktop-key-press.js.map +1 -0
- package/dist/tools/desktop-launch-app.d.ts +12 -0
- package/dist/tools/desktop-launch-app.d.ts.map +1 -0
- package/dist/tools/desktop-launch-app.js +58 -0
- package/dist/tools/desktop-launch-app.js.map +1 -0
- package/dist/tools/desktop-list-elements.d.ts +11 -0
- package/dist/tools/desktop-list-elements.d.ts.map +1 -0
- package/dist/tools/desktop-list-elements.js +65 -0
- package/dist/tools/desktop-list-elements.js.map +1 -0
- package/dist/tools/desktop-plan-approve.d.ts +30 -0
- package/dist/tools/desktop-plan-approve.d.ts.map +1 -0
- package/dist/tools/desktop-plan-approve.js +135 -0
- package/dist/tools/desktop-plan-approve.js.map +1 -0
- package/dist/tools/desktop-providers.d.ts +144 -0
- package/dist/tools/desktop-providers.d.ts.map +1 -0
- package/dist/tools/desktop-providers.js +12 -0
- package/dist/tools/desktop-providers.js.map +1 -0
- package/dist/tools/desktop-safety-gate.d.ts +84 -0
- package/dist/tools/desktop-safety-gate.d.ts.map +1 -0
- package/dist/tools/desktop-safety-gate.js +171 -0
- package/dist/tools/desktop-safety-gate.js.map +1 -0
- package/dist/tools/desktop-tools.d.ts +22 -0
- package/dist/tools/desktop-tools.d.ts.map +1 -0
- package/dist/tools/desktop-tools.js +71 -0
- package/dist/tools/desktop-tools.js.map +1 -0
- package/dist/tools/desktop-type.d.ts +12 -0
- package/dist/tools/desktop-type.d.ts.map +1 -0
- package/dist/tools/desktop-type.js +63 -0
- package/dist/tools/desktop-type.js.map +1 -0
- package/dist/tools/detect-language.d.ts +11 -0
- package/dist/tools/detect-language.d.ts.map +1 -0
- package/dist/tools/detect-language.js +235 -0
- package/dist/tools/detect-language.js.map +1 -0
- package/dist/tools/discover-news.d.ts +11 -0
- package/dist/tools/discover-news.d.ts.map +1 -0
- package/dist/tools/discover-news.js +261 -0
- package/dist/tools/discover-news.js.map +1 -0
- package/dist/tools/doc-generate.d.ts +17 -0
- package/dist/tools/doc-generate.d.ts.map +1 -0
- package/dist/tools/doc-generate.js +222 -0
- package/dist/tools/doc-generate.js.map +1 -0
- package/dist/tools/docs-lookup.d.ts +38 -0
- package/dist/tools/docs-lookup.d.ts.map +1 -0
- package/dist/tools/docs-lookup.js +174 -0
- package/dist/tools/docs-lookup.js.map +1 -0
- package/dist/tools/document-author.d.ts +40 -0
- package/dist/tools/document-author.d.ts.map +1 -0
- package/dist/tools/document-author.js +465 -0
- package/dist/tools/document-author.js.map +1 -0
- package/dist/tools/document-manage.d.ts +43 -0
- package/dist/tools/document-manage.d.ts.map +1 -0
- package/dist/tools/document-manage.js +665 -0
- package/dist/tools/document-manage.js.map +1 -0
- package/dist/tools/document-styling.d.ts +132 -0
- package/dist/tools/document-styling.d.ts.map +1 -0
- package/dist/tools/document-styling.js +360 -0
- package/dist/tools/document-styling.js.map +1 -0
- package/dist/tools/document-templates.d.ts +32 -0
- package/dist/tools/document-templates.d.ts.map +1 -0
- package/dist/tools/document-templates.js +95 -0
- package/dist/tools/document-templates.js.map +1 -0
- package/dist/tools/email-draft.d.ts +20 -0
- package/dist/tools/email-draft.d.ts.map +1 -0
- package/dist/tools/email-draft.js +191 -0
- package/dist/tools/email-draft.js.map +1 -0
- package/dist/tools/env-write.d.ts +32 -0
- package/dist/tools/env-write.d.ts.map +1 -0
- package/dist/tools/env-write.js +145 -0
- package/dist/tools/env-write.js.map +1 -0
- package/dist/tools/error-guidance.d.ts +38 -0
- package/dist/tools/error-guidance.d.ts.map +1 -0
- package/dist/tools/error-guidance.js +261 -0
- package/dist/tools/error-guidance.js.map +1 -0
- package/dist/tools/exercise-repair.d.ts +89 -0
- package/dist/tools/exercise-repair.d.ts.map +1 -0
- package/dist/tools/exercise-repair.js +350 -0
- package/dist/tools/exercise-repair.js.map +1 -0
- package/dist/tools/fact-check.d.ts +24 -0
- package/dist/tools/fact-check.d.ts.map +1 -0
- package/dist/tools/fact-check.js +78 -0
- package/dist/tools/fact-check.js.map +1 -0
- package/dist/tools/file-edit.d.ts +11 -0
- package/dist/tools/file-edit.d.ts.map +1 -0
- package/dist/tools/file-edit.js +166 -0
- package/dist/tools/file-edit.js.map +1 -0
- package/dist/tools/file-read.d.ts +12 -0
- package/dist/tools/file-read.d.ts.map +1 -0
- package/dist/tools/file-read.js +98 -0
- package/dist/tools/file-read.js.map +1 -0
- package/dist/tools/file-write.d.ts +13 -0
- package/dist/tools/file-write.d.ts.map +1 -0
- package/dist/tools/file-write.js +163 -0
- package/dist/tools/file-write.js.map +1 -0
- package/dist/tools/find-symbol.d.ts +13 -0
- package/dist/tools/find-symbol.d.ts.map +1 -0
- package/dist/tools/find-symbol.js +144 -0
- package/dist/tools/find-symbol.js.map +1 -0
- package/dist/tools/generate-image.d.ts +19 -0
- package/dist/tools/generate-image.d.ts.map +1 -0
- package/dist/tools/generate-image.js +438 -0
- package/dist/tools/generate-image.js.map +1 -0
- package/dist/tools/generate-video.d.ts +21 -0
- package/dist/tools/generate-video.d.ts.map +1 -0
- package/dist/tools/generate-video.js +197 -0
- package/dist/tools/generate-video.js.map +1 -0
- package/dist/tools/generate-voice.d.ts +13 -0
- package/dist/tools/generate-voice.d.ts.map +1 -0
- package/dist/tools/generate-voice.js +156 -0
- package/dist/tools/generate-voice.js.map +1 -0
- package/dist/tools/generation-manager.d.ts +75 -0
- package/dist/tools/generation-manager.d.ts.map +1 -0
- package/dist/tools/generation-manager.js +150 -0
- package/dist/tools/generation-manager.js.map +1 -0
- package/dist/tools/get-datetime.d.ts +11 -0
- package/dist/tools/get-datetime.d.ts.map +1 -0
- package/dist/tools/get-datetime.js +59 -0
- package/dist/tools/get-datetime.js.map +1 -0
- package/dist/tools/git-commit.d.ts +13 -0
- package/dist/tools/git-commit.d.ts.map +1 -0
- package/dist/tools/git-commit.js +136 -0
- package/dist/tools/git-commit.js.map +1 -0
- package/dist/tools/git-create-pr.d.ts +13 -0
- package/dist/tools/git-create-pr.d.ts.map +1 -0
- package/dist/tools/git-create-pr.js +134 -0
- package/dist/tools/git-create-pr.js.map +1 -0
- package/dist/tools/git-diff.d.ts +12 -0
- package/dist/tools/git-diff.d.ts.map +1 -0
- package/dist/tools/git-diff.js +134 -0
- package/dist/tools/git-diff.js.map +1 -0
- package/dist/tools/git.d.ts +11 -0
- package/dist/tools/git.d.ts.map +1 -0
- package/dist/tools/git.js +89 -0
- package/dist/tools/git.js.map +1 -0
- package/dist/tools/glob.d.ts +11 -0
- package/dist/tools/glob.d.ts.map +1 -0
- package/dist/tools/glob.js +64 -0
- package/dist/tools/glob.js.map +1 -0
- package/dist/tools/grep.d.ts +11 -0
- package/dist/tools/grep.d.ts.map +1 -0
- package/dist/tools/grep.js +131 -0
- package/dist/tools/grep.js.map +1 -0
- package/dist/tools/health-catalogue-search.d.ts +11 -0
- package/dist/tools/health-catalogue-search.d.ts.map +1 -0
- package/dist/tools/health-catalogue-search.js +179 -0
- package/dist/tools/health-catalogue-search.js.map +1 -0
- package/dist/tools/health-plan-create.d.ts +24 -0
- package/dist/tools/health-plan-create.d.ts.map +1 -0
- package/dist/tools/health-plan-create.js +325 -0
- package/dist/tools/health-plan-create.js.map +1 -0
- package/dist/tools/health-plan-delete.d.ts +11 -0
- package/dist/tools/health-plan-delete.d.ts.map +1 -0
- package/dist/tools/health-plan-delete.js +97 -0
- package/dist/tools/health-plan-delete.js.map +1 -0
- package/dist/tools/health-plan-list.d.ts +11 -0
- package/dist/tools/health-plan-list.d.ts.map +1 -0
- package/dist/tools/health-plan-list.js +123 -0
- package/dist/tools/health-plan-list.js.map +1 -0
- package/dist/tools/health-plan-update-day.d.ts +18 -0
- package/dist/tools/health-plan-update-day.d.ts.map +1 -0
- package/dist/tools/health-plan-update-day.js +134 -0
- package/dist/tools/health-plan-update-day.js.map +1 -0
- package/dist/tools/health-plan-update.d.ts +11 -0
- package/dist/tools/health-plan-update.d.ts.map +1 -0
- package/dist/tools/health-plan-update.js +103 -0
- package/dist/tools/health-plan-update.js.map +1 -0
- package/dist/tools/health-profile-ask.d.ts +21 -0
- package/dist/tools/health-profile-ask.d.ts.map +1 -0
- package/dist/tools/health-profile-ask.js +50 -0
- package/dist/tools/health-profile-ask.js.map +1 -0
- package/dist/tools/http-request.d.ts +12 -0
- package/dist/tools/http-request.d.ts.map +1 -0
- package/dist/tools/http-request.js +329 -0
- package/dist/tools/http-request.js.map +1 -0
- package/dist/tools/journal.d.ts +17 -0
- package/dist/tools/journal.d.ts.map +1 -0
- package/dist/tools/journal.js +159 -0
- package/dist/tools/journal.js.map +1 -0
- package/dist/tools/learning.d.ts +154 -0
- package/dist/tools/learning.d.ts.map +1 -0
- package/dist/tools/learning.js +1344 -0
- package/dist/tools/learning.js.map +1 -0
- package/dist/tools/list-directory.d.ts +11 -0
- package/dist/tools/list-directory.d.ts.map +1 -0
- package/dist/tools/list-directory.js +95 -0
- package/dist/tools/list-directory.js.map +1 -0
- package/dist/tools/memory-delete.d.ts +11 -0
- package/dist/tools/memory-delete.d.ts.map +1 -0
- package/dist/tools/memory-delete.js +54 -0
- package/dist/tools/memory-delete.js.map +1 -0
- package/dist/tools/memory-recall.d.ts +11 -0
- package/dist/tools/memory-recall.d.ts.map +1 -0
- package/dist/tools/memory-recall.js +101 -0
- package/dist/tools/memory-recall.js.map +1 -0
- package/dist/tools/memory-save.d.ts +11 -0
- package/dist/tools/memory-save.d.ts.map +1 -0
- package/dist/tools/memory-save.js +110 -0
- package/dist/tools/memory-save.js.map +1 -0
- package/dist/tools/memory-update.d.ts +11 -0
- package/dist/tools/memory-update.d.ts.map +1 -0
- package/dist/tools/memory-update.js +88 -0
- package/dist/tools/memory-update.js.map +1 -0
- package/dist/tools/news.d.ts +11 -0
- package/dist/tools/news.d.ts.map +1 -0
- package/dist/tools/news.js +137 -0
- package/dist/tools/news.js.map +1 -0
- package/dist/tools/open-design-studio.d.ts +20 -0
- package/dist/tools/open-design-studio.d.ts.map +1 -0
- package/dist/tools/open-design-studio.js +45 -0
- package/dist/tools/open-design-studio.js.map +1 -0
- package/dist/tools/open-health-room.d.ts +19 -0
- package/dist/tools/open-health-room.d.ts.map +1 -0
- package/dist/tools/open-health-room.js +44 -0
- package/dist/tools/open-health-room.js.map +1 -0
- package/dist/tools/open-learning-room.d.ts +20 -0
- package/dist/tools/open-learning-room.d.ts.map +1 -0
- package/dist/tools/open-learning-room.js +44 -0
- package/dist/tools/open-learning-room.js.map +1 -0
- package/dist/tools/paper-fetch.d.ts +11 -0
- package/dist/tools/paper-fetch.d.ts.map +1 -0
- package/dist/tools/paper-fetch.js +236 -0
- package/dist/tools/paper-fetch.js.map +1 -0
- package/dist/tools/post-performance.d.ts +17 -0
- package/dist/tools/post-performance.d.ts.map +1 -0
- package/dist/tools/post-performance.js +58 -0
- package/dist/tools/post-performance.js.map +1 -0
- package/dist/tools/present-plan.d.ts +34 -0
- package/dist/tools/present-plan.d.ts.map +1 -0
- package/dist/tools/present-plan.js +117 -0
- package/dist/tools/present-plan.js.map +1 -0
- package/dist/tools/project-index.d.ts +11 -0
- package/dist/tools/project-index.d.ts.map +1 -0
- package/dist/tools/project-index.js +88 -0
- package/dist/tools/project-index.js.map +1 -0
- package/dist/tools/propose-hooks.d.ts +17 -0
- package/dist/tools/propose-hooks.d.ts.map +1 -0
- package/dist/tools/propose-hooks.js +71 -0
- package/dist/tools/propose-hooks.js.map +1 -0
- package/dist/tools/propose-tool.d.ts +11 -0
- package/dist/tools/propose-tool.d.ts.map +1 -0
- package/dist/tools/propose-tool.js +155 -0
- package/dist/tools/propose-tool.js.map +1 -0
- package/dist/tools/recipe-repair.d.ts +116 -0
- package/dist/tools/recipe-repair.d.ts.map +1 -0
- package/dist/tools/recipe-repair.js +404 -0
- package/dist/tools/recipe-repair.js.map +1 -0
- package/dist/tools/record-machine-rule.d.ts +24 -0
- package/dist/tools/record-machine-rule.d.ts.map +1 -0
- package/dist/tools/record-machine-rule.js +60 -0
- package/dist/tools/record-machine-rule.js.map +1 -0
- package/dist/tools/release-notes.d.ts +11 -0
- package/dist/tools/release-notes.d.ts.map +1 -0
- package/dist/tools/release-notes.js +59 -0
- package/dist/tools/release-notes.js.map +1 -0
- package/dist/tools/remove-background.d.ts +15 -0
- package/dist/tools/remove-background.d.ts.map +1 -0
- package/dist/tools/remove-background.js +117 -0
- package/dist/tools/remove-background.js.map +1 -0
- package/dist/tools/report-generate.d.ts +30 -0
- package/dist/tools/report-generate.d.ts.map +1 -0
- package/dist/tools/report-generate.js +325 -0
- package/dist/tools/report-generate.js.map +1 -0
- package/dist/tools/research-post.d.ts +20 -0
- package/dist/tools/research-post.d.ts.map +1 -0
- package/dist/tools/research-post.js +87 -0
- package/dist/tools/research-post.js.map +1 -0
- package/dist/tools/research-story.d.ts +29 -0
- package/dist/tools/research-story.d.ts.map +1 -0
- package/dist/tools/research-story.js +78 -0
- package/dist/tools/research-story.js.map +1 -0
- package/dist/tools/rollback.d.ts +11 -0
- package/dist/tools/rollback.d.ts.map +1 -0
- package/dist/tools/rollback.js +81 -0
- package/dist/tools/rollback.js.map +1 -0
- package/dist/tools/scan-industry.d.ts +19 -0
- package/dist/tools/scan-industry.d.ts.map +1 -0
- package/dist/tools/scan-industry.js +82 -0
- package/dist/tools/scan-industry.js.map +1 -0
- package/dist/tools/screenshot.d.ts +11 -0
- package/dist/tools/screenshot.d.ts.map +1 -0
- package/dist/tools/screenshot.js +82 -0
- package/dist/tools/screenshot.js.map +1 -0
- package/dist/tools/secret-request.d.ts +24 -0
- package/dist/tools/secret-request.d.ts.map +1 -0
- package/dist/tools/secret-request.js +75 -0
- package/dist/tools/secret-request.js.map +1 -0
- package/dist/tools/security.d.ts +26 -0
- package/dist/tools/security.d.ts.map +1 -0
- package/dist/tools/security.js +78 -0
- package/dist/tools/security.js.map +1 -0
- package/dist/tools/self-inspect.d.ts +34 -0
- package/dist/tools/self-inspect.d.ts.map +1 -0
- package/dist/tools/self-inspect.js +427 -0
- package/dist/tools/self-inspect.js.map +1 -0
- package/dist/tools/suggest-beats.d.ts +17 -0
- package/dist/tools/suggest-beats.d.ts.map +1 -0
- package/dist/tools/suggest-beats.js +71 -0
- package/dist/tools/suggest-beats.js.map +1 -0
- package/dist/tools/suggest-stories.d.ts +26 -0
- package/dist/tools/suggest-stories.d.ts.map +1 -0
- package/dist/tools/suggest-stories.js +102 -0
- package/dist/tools/suggest-stories.js.map +1 -0
- package/dist/tools/support-request.d.ts +11 -0
- package/dist/tools/support-request.d.ts.map +1 -0
- package/dist/tools/support-request.js +110 -0
- package/dist/tools/support-request.js.map +1 -0
- package/dist/tools/switch-mode.d.ts +21 -0
- package/dist/tools/switch-mode.d.ts.map +1 -0
- package/dist/tools/switch-mode.js +57 -0
- package/dist/tools/switch-mode.js.map +1 -0
- package/dist/tools/task-manage.d.ts +16 -0
- package/dist/tools/task-manage.d.ts.map +1 -0
- package/dist/tools/task-manage.js +256 -0
- package/dist/tools/task-manage.js.map +1 -0
- package/dist/tools/task-suggest.d.ts +27 -0
- package/dist/tools/task-suggest.d.ts.map +1 -0
- package/dist/tools/task-suggest.js +70 -0
- package/dist/tools/task-suggest.js.map +1 -0
- package/dist/tools/test-generate.d.ts +20 -0
- package/dist/tools/test-generate.d.ts.map +1 -0
- package/dist/tools/test-generate.js +259 -0
- package/dist/tools/test-generate.js.map +1 -0
- package/dist/tools/test-run.d.ts +13 -0
- package/dist/tools/test-run.d.ts.map +1 -0
- package/dist/tools/test-run.js +177 -0
- package/dist/tools/test-run.js.map +1 -0
- package/dist/tools/todo-write.d.ts +11 -0
- package/dist/tools/todo-write.d.ts.map +1 -0
- package/dist/tools/todo-write.js +70 -0
- package/dist/tools/todo-write.js.map +1 -0
- package/dist/tools/tool-registry.d.ts +84 -0
- package/dist/tools/tool-registry.d.ts.map +1 -0
- package/dist/tools/tool-registry.js +728 -0
- package/dist/tools/tool-registry.js.map +1 -0
- package/dist/tools/types.d.ts +128 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/verification-trust.d.ts +39 -0
- package/dist/tools/verification-trust.d.ts.map +1 -0
- package/dist/tools/verification-trust.js +135 -0
- package/dist/tools/verification-trust.js.map +1 -0
- package/dist/tools/verify-change.d.ts +11 -0
- package/dist/tools/verify-change.d.ts.map +1 -0
- package/dist/tools/verify-change.js +775 -0
- package/dist/tools/verify-change.js.map +1 -0
- package/dist/tools/weather.d.ts +11 -0
- package/dist/tools/weather.d.ts.map +1 -0
- package/dist/tools/weather.js +96 -0
- package/dist/tools/weather.js.map +1 -0
- package/dist/tools/web-search.d.ts +12 -0
- package/dist/tools/web-search.d.ts.map +1 -0
- package/dist/tools/web-search.js +137 -0
- package/dist/tools/web-search.js.map +1 -0
- package/dist/tools/write-article.d.ts +33 -0
- package/dist/tools/write-article.d.ts.map +1 -0
- package/dist/tools/write-article.js +206 -0
- package/dist/tools/write-article.js.map +1 -0
- package/dist/tools/write-exercise.d.ts +31 -0
- package/dist/tools/write-exercise.d.ts.map +1 -0
- package/dist/tools/write-exercise.js +278 -0
- package/dist/tools/write-exercise.js.map +1 -0
- package/dist/tools/write-post-image.d.ts +31 -0
- package/dist/tools/write-post-image.d.ts.map +1 -0
- package/dist/tools/write-post-image.js +102 -0
- package/dist/tools/write-post-image.js.map +1 -0
- package/dist/tools/write-post.d.ts +20 -0
- package/dist/tools/write-post.d.ts.map +1 -0
- package/dist/tools/write-post.js +113 -0
- package/dist/tools/write-post.js.map +1 -0
- package/dist/tools/write-recipe.d.ts +29 -0
- package/dist/tools/write-recipe.d.ts.map +1 -0
- package/dist/tools/write-recipe.js +262 -0
- package/dist/tools/write-recipe.js.map +1 -0
- package/dist/tools/write-video-post.d.ts +25 -0
- package/dist/tools/write-video-post.d.ts.map +1 -0
- package/dist/tools/write-video-post.js +238 -0
- package/dist/tools/write-video-post.js.map +1 -0
- package/dist/tools/write-voiceover.d.ts +29 -0
- package/dist/tools/write-voiceover.d.ts.map +1 -0
- package/dist/tools/write-voiceover.js +98 -0
- package/dist/tools/write-voiceover.js.map +1 -0
- package/dist/workflows/index.d.ts +4 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/index.js +2 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/types.d.ts +112 -0
- package/dist/workflows/types.d.ts.map +1 -0
- package/dist/workflows/types.js +10 -0
- package/dist/workflows/types.js.map +1 -0
- package/dist/workflows/workflow-manager.d.ts +54 -0
- package/dist/workflows/workflow-manager.d.ts.map +1 -0
- package/dist/workflows/workflow-manager.js +277 -0
- package/dist/workflows/workflow-manager.js.map +1 -0
- package/package.json +223 -0
|
@@ -0,0 +1,1344 @@
|
|
|
1
|
+
// ── Storage helpers ──────────────────────────────────────────────────
|
|
2
|
+
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
const LEARNING_FILENAME = 'learning.json';
|
|
5
|
+
const DEFAULT_MILESTONES = [
|
|
6
|
+
{ title: 'Quarter way!', at_percent: 25, reached: false, reached_at: null },
|
|
7
|
+
{ title: 'Halfway!', at_percent: 50, reached: false, reached_at: null },
|
|
8
|
+
{ title: 'Almost there!', at_percent: 75, reached: false, reached_at: null },
|
|
9
|
+
{ title: 'Complete!', at_percent: 100, reached: false, reached_at: null },
|
|
10
|
+
];
|
|
11
|
+
async function loadStore(globalDir) {
|
|
12
|
+
try {
|
|
13
|
+
const raw = await readFile(join(globalDir, LEARNING_FILENAME), 'utf-8');
|
|
14
|
+
const store = JSON.parse(raw);
|
|
15
|
+
// Migrate: add streaks if missing
|
|
16
|
+
if (!store.streaks)
|
|
17
|
+
store.streaks = { current: 0, longest: 0, lastActiveDate: null };
|
|
18
|
+
// Migrate: add new fields to existing curriculums
|
|
19
|
+
for (const c of store.curriculums) {
|
|
20
|
+
if (!c.completed_at)
|
|
21
|
+
c.completed_at = c.status === 'completed' ? c.updated_at : null;
|
|
22
|
+
if (!c.adaptive_level)
|
|
23
|
+
c.adaptive_level = null;
|
|
24
|
+
if (!c.milestones)
|
|
25
|
+
c.milestones = DEFAULT_MILESTONES.map(m => ({ ...m }));
|
|
26
|
+
if (!c.curriculum_learning_objectives)
|
|
27
|
+
c.curriculum_learning_objectives = [];
|
|
28
|
+
if (!c.curriculum_prerequisites)
|
|
29
|
+
c.curriculum_prerequisites = '';
|
|
30
|
+
if (!c.target_audience)
|
|
31
|
+
c.target_audience = '';
|
|
32
|
+
for (const mod of c.modules) {
|
|
33
|
+
for (const l of mod.lessons) {
|
|
34
|
+
if (l.time_spent_minutes === undefined)
|
|
35
|
+
l.time_spent_minutes = 0;
|
|
36
|
+
if (l.started_at === undefined)
|
|
37
|
+
l.started_at = null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return store;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return { curriculums: [], streaks: { current: 0, longest: 0, lastActiveDate: null } };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function saveStore(globalDir, store) {
|
|
48
|
+
await mkdir(globalDir, { recursive: true });
|
|
49
|
+
await writeFile(join(globalDir, LEARNING_FILENAME), JSON.stringify(store, null, 2), 'utf-8');
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Save the learning store locally, then (if Data Mode allows and the user
|
|
53
|
+
* is signed in to the platform) fire an idempotent sync to the cloud so
|
|
54
|
+
* the same curriculums appear on other devices and in the web dashboard.
|
|
55
|
+
*
|
|
56
|
+
* Local-first is sacred: the local write always happens first and its
|
|
57
|
+
* errors surface. The cloud push is fire-and-forget — a failed sync
|
|
58
|
+
* never rolls back the on-disk copy.
|
|
59
|
+
*
|
|
60
|
+
* Gated on two pieces of sharedState wired by the extension host:
|
|
61
|
+
* - platformKey — user is signed in
|
|
62
|
+
* - learningLocalOnly — Data Mode toggle resolved to local (or the
|
|
63
|
+
* user turned off learning sync specifically)
|
|
64
|
+
*
|
|
65
|
+
* When either is missing or localOnly is truthy, we skip cloud entirely
|
|
66
|
+
* — matches how Memory / Tasks / Journal behave.
|
|
67
|
+
*/
|
|
68
|
+
async function persist(globalDir, store, _context) {
|
|
69
|
+
// Learning is LOCAL-ONLY by design — the user's curriculums + progress live
|
|
70
|
+
// only in ~/.ava/learning.json and never leave the device. No cloud push:
|
|
71
|
+
// local-first is sacred here, and cloud storage of user data is being sunset.
|
|
72
|
+
// (Previously this POSTed the full store to /api/learning/sync for signed-in
|
|
73
|
+
// users — removed; that contradicted "local only" and left orphaned cloud
|
|
74
|
+
// copies that re-appeared after a local delete.)
|
|
75
|
+
await saveStore(globalDir, store);
|
|
76
|
+
}
|
|
77
|
+
function generateId() {
|
|
78
|
+
return crypto.randomUUID();
|
|
79
|
+
}
|
|
80
|
+
function recalculateProgress(curriculum) {
|
|
81
|
+
for (const mod of curriculum.modules) {
|
|
82
|
+
if (mod.lessons.length === 0)
|
|
83
|
+
continue;
|
|
84
|
+
const completed = mod.lessons.filter(l => l.status === 'completed').length;
|
|
85
|
+
mod.progress_percent = Math.round((completed / mod.lessons.length) * 100);
|
|
86
|
+
mod.status = mod.progress_percent === 100 ? 'completed'
|
|
87
|
+
: completed > 0 || mod.lessons.some(l => l.status === 'in_progress') ? 'in_progress'
|
|
88
|
+
: mod.status === 'locked' ? 'locked' : 'available';
|
|
89
|
+
// Recalculate module estimated time from lessons
|
|
90
|
+
const lessonsWithTime = mod.lessons.filter(l => l.estimated_minutes);
|
|
91
|
+
if (lessonsWithTime.length > 0) {
|
|
92
|
+
mod.estimated_minutes = lessonsWithTime.reduce((sum, l) => sum + (l.estimated_minutes || 0), 0);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (curriculum.modules.length === 0)
|
|
96
|
+
return;
|
|
97
|
+
curriculum.progress_percent = Math.round(curriculum.modules.reduce((sum, m) => sum + m.progress_percent, 0) / curriculum.modules.length);
|
|
98
|
+
curriculum.status = curriculum.progress_percent === 100 ? 'completed' : 'active';
|
|
99
|
+
// Unlock next module when current completes — but only if the gate
|
|
100
|
+
// quiz (if present) has been passed. A module whose final lesson is a
|
|
101
|
+
// quiz uses that quiz as the unlock gate; a passing score (≥70) is
|
|
102
|
+
// required before the next module becomes available. Modules without
|
|
103
|
+
// a final quiz unlock on lesson-completion alone, as before.
|
|
104
|
+
for (let i = 0; i < curriculum.modules.length - 1; i++) {
|
|
105
|
+
const current = curriculum.modules[i];
|
|
106
|
+
const next = curriculum.modules[i + 1];
|
|
107
|
+
if (current.status !== 'completed' || next.status !== 'locked')
|
|
108
|
+
continue;
|
|
109
|
+
const lastLesson = current.lessons[current.lessons.length - 1];
|
|
110
|
+
const hasGateQuiz = lastLesson && lastLesson.type === 'quiz';
|
|
111
|
+
if (hasGateQuiz && (lastLesson.best_score ?? 0) < 70) {
|
|
112
|
+
// Final quiz exists but hasn't been passed at threshold — keep the
|
|
113
|
+
// next module locked. The learner needs to retry the quiz first.
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
next.status = 'available';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/** Check milestones and return any newly reached ones */
|
|
120
|
+
function checkMilestones(curriculum) {
|
|
121
|
+
const reached = [];
|
|
122
|
+
for (const m of curriculum.milestones) {
|
|
123
|
+
if (!m.reached && curriculum.progress_percent >= m.at_percent) {
|
|
124
|
+
m.reached = true;
|
|
125
|
+
m.reached_at = new Date().toISOString();
|
|
126
|
+
reached.push(m.title);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return reached;
|
|
130
|
+
}
|
|
131
|
+
/** Get adaptive difficulty based on recent performance */
|
|
132
|
+
function getAdaptiveDifficulty(curriculum) {
|
|
133
|
+
const scored = [];
|
|
134
|
+
for (const mod of curriculum.modules) {
|
|
135
|
+
for (const l of mod.lessons) {
|
|
136
|
+
if (l.best_score !== null)
|
|
137
|
+
scored.push(l.best_score);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const recent = scored.slice(-3);
|
|
141
|
+
if (recent.length === 0)
|
|
142
|
+
return 'medium';
|
|
143
|
+
const avg = recent.reduce((a, b) => a + b, 0) / recent.length;
|
|
144
|
+
if (avg >= 90)
|
|
145
|
+
return 'hard';
|
|
146
|
+
if (avg >= 70)
|
|
147
|
+
return 'medium';
|
|
148
|
+
return 'easy';
|
|
149
|
+
}
|
|
150
|
+
/** Update learning streak */
|
|
151
|
+
function updateStreak(store) {
|
|
152
|
+
const today = new Date().toISOString().split('T')[0];
|
|
153
|
+
if (store.streaks.lastActiveDate === today)
|
|
154
|
+
return;
|
|
155
|
+
const yesterday = new Date(Date.now() - 86400000).toISOString().split('T')[0];
|
|
156
|
+
if (store.streaks.lastActiveDate === yesterday) {
|
|
157
|
+
store.streaks.current++;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
store.streaks.current = 1;
|
|
161
|
+
}
|
|
162
|
+
store.streaks.longest = Math.max(store.streaks.longest, store.streaks.current);
|
|
163
|
+
store.streaks.lastActiveDate = today;
|
|
164
|
+
}
|
|
165
|
+
/** Track time spent on a lesson */
|
|
166
|
+
function trackTime(lesson) {
|
|
167
|
+
if (lesson.started_at) {
|
|
168
|
+
const elapsed = (Date.now() - new Date(lesson.started_at).getTime()) / 60000;
|
|
169
|
+
lesson.time_spent_minutes += Math.min(elapsed, 120); // Cap at 2 hours
|
|
170
|
+
lesson.started_at = null;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/** Generate recommendations based on completed curriculums */
|
|
174
|
+
function generateRecommendations(store) {
|
|
175
|
+
const recs = [];
|
|
176
|
+
const completed = store.curriculums.filter(c => c.status === 'completed');
|
|
177
|
+
const active = store.curriculums.filter(c => c.status === 'active');
|
|
178
|
+
// Suggest next level for completed curriculums
|
|
179
|
+
for (const c of completed) {
|
|
180
|
+
if (c.level === 'beginner')
|
|
181
|
+
recs.push(`You completed "${c.title}" (beginner). Consider an intermediate ${c.subject} curriculum.`);
|
|
182
|
+
if (c.level === 'intermediate')
|
|
183
|
+
recs.push(`You completed "${c.title}" (intermediate). Ready for advanced ${c.subject}?`);
|
|
184
|
+
}
|
|
185
|
+
// Find weak areas from quizzes
|
|
186
|
+
for (const c of [...completed, ...active]) {
|
|
187
|
+
for (const mod of c.modules) {
|
|
188
|
+
for (const l of mod.lessons) {
|
|
189
|
+
if (l.type === 'quiz' && l.best_score !== null && l.best_score < 70) {
|
|
190
|
+
recs.push(`You scored ${l.best_score}% on "${l.title}" in ${c.title}. A focused review might help.`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// Suggest related topics based on tags
|
|
196
|
+
const allTags = new Set(store.curriculums.flatMap(c => c.tags));
|
|
197
|
+
if (allTags.has('python') && !allTags.has('data-science'))
|
|
198
|
+
recs.push('You know Python — consider learning Data Science or Machine Learning.');
|
|
199
|
+
if (allTags.has('javascript') && !allTags.has('typescript'))
|
|
200
|
+
recs.push('You know JavaScript — TypeScript would be a natural next step.');
|
|
201
|
+
if (allTags.has('react') && !allTags.has('nextjs'))
|
|
202
|
+
recs.push('You know React — Next.js would expand your full-stack skills.');
|
|
203
|
+
return recs.slice(0, 5);
|
|
204
|
+
}
|
|
205
|
+
/** Generate a completion certificate */
|
|
206
|
+
function generateCertificate(curriculum) {
|
|
207
|
+
const totalLessons = curriculum.modules.reduce((s, m) => s + m.lessons.length, 0);
|
|
208
|
+
const totalQuizzes = curriculum.modules.reduce((s, m) => s + m.lessons.filter(l => l.type === 'quiz').length, 0);
|
|
209
|
+
const totalTime = curriculum.modules.reduce((s, m) => s + m.lessons.reduce((ls, l) => ls + l.time_spent_minutes, 0), 0);
|
|
210
|
+
const scores = curriculum.modules.flatMap(m => m.lessons.filter(l => l.best_score !== null).map(l => l.best_score));
|
|
211
|
+
const avgScore = scores.length > 0 ? Math.round(scores.reduce((a, b) => a + b, 0) / scores.length) : 0;
|
|
212
|
+
const hours = Math.floor(totalTime / 60);
|
|
213
|
+
const mins = Math.round(totalTime % 60);
|
|
214
|
+
return `# 🎓 Certificate of Completion\n\nThis certifies that you have successfully completed:\n\n` +
|
|
215
|
+
`## **${curriculum.title}**\n\n` +
|
|
216
|
+
`| | |\n|---|---|\n` +
|
|
217
|
+
`| **Subject** | ${curriculum.subject} |\n` +
|
|
218
|
+
`| **Level** | ${curriculum.level} |\n` +
|
|
219
|
+
`| **Modules** | ${curriculum.modules.length} |\n` +
|
|
220
|
+
`| **Lessons** | ${totalLessons} |\n` +
|
|
221
|
+
`| **Quizzes** | ${totalQuizzes} |\n` +
|
|
222
|
+
`| **Average Score** | ${avgScore}% |\n` +
|
|
223
|
+
`| **Time Spent** | ${hours}h ${mins}m |\n` +
|
|
224
|
+
`| **Completed** | ${curriculum.completed_at || new Date().toISOString()} |\n\n` +
|
|
225
|
+
`---\n\n*Awarded by **Ava Supernova** — Your AI learning companion*`;
|
|
226
|
+
}
|
|
227
|
+
// ── Quiz answer matching helpers ─────────────────────────────────────
|
|
228
|
+
// Exact-string matching is too brittle for open-ended answers — "node js"
|
|
229
|
+
// fails against "Node.js", "javascripts" fails against "JavaScript". A
|
|
230
|
+
// typing learner shouldn't be marked wrong for a punctuation difference
|
|
231
|
+
// or a one-character typo. These helpers normalize formatting and allow
|
|
232
|
+
// a small edit-distance for short answers, while keeping the strict
|
|
233
|
+
// matcher for letter-keyed multiple choice.
|
|
234
|
+
/**
|
|
235
|
+
* Normalize an answer for comparison: lowercase, collapse whitespace,
|
|
236
|
+
* strip surrounding punctuation. Preserves alphanumerics and math/code
|
|
237
|
+
* tokens (+, -, =, *, /, _) that often carry meaning in technical
|
|
238
|
+
* answers ("a + b", "x = y").
|
|
239
|
+
*/
|
|
240
|
+
function normalizeAnswer(s) {
|
|
241
|
+
return s
|
|
242
|
+
.toLowerCase()
|
|
243
|
+
.replace(/[\s.\-_]+/g, '')
|
|
244
|
+
.replace(/[^\p{L}\p{N}+=*/]/gu, '')
|
|
245
|
+
.trim();
|
|
246
|
+
}
|
|
247
|
+
/** Standard iterative Levenshtein distance. O(n·m). */
|
|
248
|
+
function levenshtein(a, b) {
|
|
249
|
+
if (a === b)
|
|
250
|
+
return 0;
|
|
251
|
+
if (!a.length)
|
|
252
|
+
return b.length;
|
|
253
|
+
if (!b.length)
|
|
254
|
+
return a.length;
|
|
255
|
+
let prev = new Array(b.length + 1).fill(0).map((_, j) => j);
|
|
256
|
+
let curr = new Array(b.length + 1).fill(0);
|
|
257
|
+
for (let i = 1; i <= a.length; i++) {
|
|
258
|
+
curr[0] = i;
|
|
259
|
+
for (let j = 1; j <= b.length; j++) {
|
|
260
|
+
const cost = a.charCodeAt(i - 1) === b.charCodeAt(j - 1) ? 0 : 1;
|
|
261
|
+
curr[j] = Math.min(curr[j - 1] + 1, prev[j] + 1, prev[j - 1] + cost);
|
|
262
|
+
}
|
|
263
|
+
[prev, curr] = [curr, prev];
|
|
264
|
+
}
|
|
265
|
+
return prev[b.length];
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Decide whether a user's answer matches the correct answer with a bit
|
|
269
|
+
* of forgiveness for typos and formatting. Strategy:
|
|
270
|
+
* 1. Exact lowercased trim match → pass.
|
|
271
|
+
* 2. Normalized equality (drops punctuation, whitespace) → pass.
|
|
272
|
+
* 3. For short answers (≤20 chars after normalization), allow a small
|
|
273
|
+
* edit-distance: ≤1 typo for ≤6 chars, ≤2 for ≤12 chars, ≤3 for ≤20.
|
|
274
|
+
* Rejects bigger differences so unrelated answers don't slip through.
|
|
275
|
+
*
|
|
276
|
+
* Multiple-choice grading still uses letter-to-option mapping in the
|
|
277
|
+
* caller; this is the open-ended-text fallback.
|
|
278
|
+
*/
|
|
279
|
+
function answersMatch(userAnswer, correctAnswer) {
|
|
280
|
+
const u = userAnswer.trim().toLowerCase();
|
|
281
|
+
const c = correctAnswer.trim().toLowerCase();
|
|
282
|
+
if (u === c)
|
|
283
|
+
return true;
|
|
284
|
+
const un = normalizeAnswer(userAnswer);
|
|
285
|
+
const cn = normalizeAnswer(correctAnswer);
|
|
286
|
+
if (un === cn && un.length > 0)
|
|
287
|
+
return true;
|
|
288
|
+
// Edit-distance forgiveness scaled by length so short-answer typos
|
|
289
|
+
// don't fail the learner but unrelated long answers don't pass.
|
|
290
|
+
if (un.length === 0 || cn.length === 0)
|
|
291
|
+
return false;
|
|
292
|
+
const refLen = Math.max(un.length, cn.length);
|
|
293
|
+
if (refLen > 20)
|
|
294
|
+
return false;
|
|
295
|
+
const allowed = refLen <= 6 ? 1 : refLen <= 12 ? 2 : 3;
|
|
296
|
+
return levenshtein(un, cn) <= allowed;
|
|
297
|
+
}
|
|
298
|
+
// Find lessons due for spaced repetition review
|
|
299
|
+
function getLessonsForReview(curriculum) {
|
|
300
|
+
const now = Date.now();
|
|
301
|
+
const results = [];
|
|
302
|
+
for (const mod of curriculum.modules) {
|
|
303
|
+
for (const lesson of mod.lessons) {
|
|
304
|
+
// Spaced review is for MASTERED material only. `needs_review` is
|
|
305
|
+
// the failed-quiz retry state — those lessons surface via
|
|
306
|
+
// `next_lesson` as the next thing to do, not via the spaced-review
|
|
307
|
+
// path. Mixing the two double-surfaces the same lesson and
|
|
308
|
+
// confuses the Tutor about what to deliver.
|
|
309
|
+
if (lesson.status !== 'completed')
|
|
310
|
+
continue;
|
|
311
|
+
if (!lesson.completed_at)
|
|
312
|
+
continue;
|
|
313
|
+
// Spaced repetition intervals: 1 day, 3 days, 7 days, 14 days, 30 days
|
|
314
|
+
const intervals = [1, 3, 7, 14, 30];
|
|
315
|
+
const reviewIndex = Math.min(lesson.review_count, intervals.length - 1);
|
|
316
|
+
const daysSinceReview = lesson.last_reviewed_at
|
|
317
|
+
? (now - new Date(lesson.last_reviewed_at).getTime()) / (1000 * 60 * 60 * 24)
|
|
318
|
+
: (now - new Date(lesson.completed_at).getTime()) / (1000 * 60 * 60 * 24);
|
|
319
|
+
if (daysSinceReview >= intervals[reviewIndex]) {
|
|
320
|
+
results.push({ module: mod, lesson });
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return results;
|
|
325
|
+
}
|
|
326
|
+
// ── AVA_HOME resolution ──────────────────────────────────────────────
|
|
327
|
+
function getGlobalDir(context) {
|
|
328
|
+
const mgr = context.sharedState?.memoryManager;
|
|
329
|
+
return mgr?.globalDir ?? join(process.env.HOME || process.env.USERPROFILE || '.', '.ava');
|
|
330
|
+
}
|
|
331
|
+
// Pre-curriculum diagnostic. Runs before any curriculum exists, so it
|
|
332
|
+
// intentionally takes no curriculum/lesson arguments and returns a question
|
|
333
|
+
// set the Tutor can ask in chat. After answers are gathered, the model
|
|
334
|
+
// follows up with learning_create at the appropriate level.
|
|
335
|
+
function runAssessment(subject, claimedLevel) {
|
|
336
|
+
const ASSESSMENT_QUESTIONS = {
|
|
337
|
+
beginner: [
|
|
338
|
+
'What experience do you have with this topic?',
|
|
339
|
+
'Have you built anything with it before?',
|
|
340
|
+
'What do you want to be able to do after learning this?',
|
|
341
|
+
],
|
|
342
|
+
intermediate: [
|
|
343
|
+
"Describe a project you've built with this technology.",
|
|
344
|
+
'What concepts do you find most challenging?',
|
|
345
|
+
'What specific area do you want to deepen?',
|
|
346
|
+
],
|
|
347
|
+
advanced: [
|
|
348
|
+
"What's your experience with advanced patterns in this area?",
|
|
349
|
+
'Have you contributed to open source projects using this?',
|
|
350
|
+
'What specific edge cases or performance issues have you encountered?',
|
|
351
|
+
],
|
|
352
|
+
};
|
|
353
|
+
const level = claimedLevel in ASSESSMENT_QUESTIONS
|
|
354
|
+
? claimedLevel
|
|
355
|
+
: 'beginner';
|
|
356
|
+
const questions = ASSESSMENT_QUESTIONS[level];
|
|
357
|
+
return {
|
|
358
|
+
success: true,
|
|
359
|
+
output: `**Assessment: ${subject}** (claimed level: ${level})\n\n` +
|
|
360
|
+
`Before creating a curriculum, I need to understand where you are. Please answer these:\n\n` +
|
|
361
|
+
questions.map((q, i) => `${i + 1}. ${q}`).join('\n') +
|
|
362
|
+
`\n\nBased on your answers, I'll create a curriculum that starts at the right level — ` +
|
|
363
|
+
`not too easy (boring), not too hard (frustrating). If you're a complete beginner, that's perfectly fine.` +
|
|
364
|
+
`\n\nAfter assessing, use learning_create to build the curriculum at the appropriate level.`,
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
// ══════════════════════════════════════════════════════════════════════
|
|
368
|
+
// Tool 1: learning_create — Ava builds a curriculum from conversation
|
|
369
|
+
// ══════════════════════════════════════════════════════════════════════
|
|
370
|
+
export class LearningCreateTool {
|
|
371
|
+
name = 'learning_create';
|
|
372
|
+
description = 'Create a structured learning curriculum with modules and lessons for the user';
|
|
373
|
+
riskLevel = 'write';
|
|
374
|
+
requiresConfirmation = true;
|
|
375
|
+
schema = {
|
|
376
|
+
name: 'learning_create',
|
|
377
|
+
description: 'Create a learning curriculum skeleton. Ask the user what they want to learn, their level, and goals FIRST. ' +
|
|
378
|
+
'Keep the tool call SMALL — just titles, types, and difficulty for each lesson. ' +
|
|
379
|
+
'Do NOT include lesson content here — use learning_teach with action "write_content" to add content per-lesson after creation. ' +
|
|
380
|
+
'This keeps the response fast and avoids timeouts.',
|
|
381
|
+
parameters: {
|
|
382
|
+
type: 'object',
|
|
383
|
+
properties: {
|
|
384
|
+
title: { type: 'string', description: 'Curriculum title (e.g., "Python Fundamentals")' },
|
|
385
|
+
description: { type: 'string', description: 'Brief description' },
|
|
386
|
+
subject: { type: 'string', description: 'Subject area' },
|
|
387
|
+
level: { type: 'string', enum: ['beginner', 'intermediate', 'advanced', 'mixed'] },
|
|
388
|
+
goal: { type: 'string', description: 'What the user wants to achieve' },
|
|
389
|
+
estimated_hours: { type: 'number', description: 'Estimated total hours' },
|
|
390
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
391
|
+
learning_objectives: { type: 'array', items: { type: 'string' }, description: 'What the user will learn overall' },
|
|
392
|
+
prerequisites: { type: 'string', description: 'What the user should already know' },
|
|
393
|
+
target_audience: { type: 'string', description: 'Who this curriculum is designed for' },
|
|
394
|
+
modules: {
|
|
395
|
+
type: 'array',
|
|
396
|
+
description: 'Ordered modules. Keep lessons lightweight — title, type, difficulty only. Content is added later via learning_teach.',
|
|
397
|
+
items: {
|
|
398
|
+
type: 'object',
|
|
399
|
+
properties: {
|
|
400
|
+
title: { type: 'string' },
|
|
401
|
+
description: { type: 'string' },
|
|
402
|
+
lessons: {
|
|
403
|
+
type: 'array',
|
|
404
|
+
items: {
|
|
405
|
+
type: 'object',
|
|
406
|
+
properties: {
|
|
407
|
+
title: { type: 'string' },
|
|
408
|
+
type: { type: 'string', enum: ['concept', 'exercise', 'project', 'quiz', 'recap', 'challenge'] },
|
|
409
|
+
difficulty: { type: 'string', enum: ['easy', 'medium', 'hard'] },
|
|
410
|
+
estimated_minutes: { type: 'number' },
|
|
411
|
+
},
|
|
412
|
+
required: ['title', 'type'],
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
required: ['title', 'lessons'],
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
required: ['title', 'subject', 'level', 'modules'],
|
|
421
|
+
},
|
|
422
|
+
};
|
|
423
|
+
async execute(args, context) {
|
|
424
|
+
const globalDir = getGlobalDir(context);
|
|
425
|
+
const store = await loadStore(globalDir);
|
|
426
|
+
const curriculum = {
|
|
427
|
+
id: generateId(),
|
|
428
|
+
title: args.title,
|
|
429
|
+
description: args.description ?? null,
|
|
430
|
+
subject: args.subject,
|
|
431
|
+
level: args.level,
|
|
432
|
+
goal: args.goal ?? null,
|
|
433
|
+
estimated_hours: args.estimated_hours ?? null,
|
|
434
|
+
status: 'active',
|
|
435
|
+
progress_percent: 0,
|
|
436
|
+
tags: args.tags ?? [],
|
|
437
|
+
created_at: new Date().toISOString(),
|
|
438
|
+
updated_at: new Date().toISOString(),
|
|
439
|
+
completed_at: null,
|
|
440
|
+
adaptive_level: null,
|
|
441
|
+
milestones: DEFAULT_MILESTONES.map(m => ({ ...m })),
|
|
442
|
+
curriculum_learning_objectives: args.learning_objectives ?? [],
|
|
443
|
+
curriculum_prerequisites: args.prerequisites ?? '',
|
|
444
|
+
target_audience: args.target_audience ?? '',
|
|
445
|
+
modules: (args.modules || []).map((mod, mi) => ({
|
|
446
|
+
id: generateId(),
|
|
447
|
+
title: mod.title,
|
|
448
|
+
description: mod.description ?? null,
|
|
449
|
+
status: mi === 0 ? 'available' : 'locked',
|
|
450
|
+
progress_percent: 0,
|
|
451
|
+
estimated_minutes: null,
|
|
452
|
+
learning_objectives: mod.learning_objectives ?? [],
|
|
453
|
+
lessons: (mod.lessons || []).map(lesson => ({
|
|
454
|
+
id: generateId(),
|
|
455
|
+
title: lesson.title,
|
|
456
|
+
content: lesson.content ?? null,
|
|
457
|
+
type: lesson.type || 'concept',
|
|
458
|
+
status: 'not_started',
|
|
459
|
+
difficulty: lesson.difficulty || 'medium',
|
|
460
|
+
estimated_minutes: lesson.estimated_minutes ?? null,
|
|
461
|
+
learning_objectives: [],
|
|
462
|
+
prerequisites: [],
|
|
463
|
+
resources: [],
|
|
464
|
+
quiz_questions: [],
|
|
465
|
+
score: null,
|
|
466
|
+
attempts: 0,
|
|
467
|
+
best_score: null,
|
|
468
|
+
ava_feedback: null,
|
|
469
|
+
completed_at: null,
|
|
470
|
+
last_reviewed_at: null,
|
|
471
|
+
review_count: 0,
|
|
472
|
+
tags: [],
|
|
473
|
+
time_spent_minutes: 0,
|
|
474
|
+
started_at: null,
|
|
475
|
+
})),
|
|
476
|
+
})),
|
|
477
|
+
};
|
|
478
|
+
// Auto difficulty progression within modules
|
|
479
|
+
for (const mod of curriculum.modules) {
|
|
480
|
+
const lessonCount = mod.lessons.length;
|
|
481
|
+
if (lessonCount >= 3) {
|
|
482
|
+
mod.lessons.forEach((l, i) => {
|
|
483
|
+
if (!l.difficulty || l.difficulty === 'medium') {
|
|
484
|
+
const position = i / (lessonCount - 1);
|
|
485
|
+
if (position < 0.33)
|
|
486
|
+
l.difficulty = 'easy';
|
|
487
|
+
else if (position < 0.67)
|
|
488
|
+
l.difficulty = 'medium';
|
|
489
|
+
else
|
|
490
|
+
l.difficulty = 'hard';
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
// Auto-calculate estimated_hours from lesson minutes if not provided
|
|
496
|
+
if (!curriculum.estimated_hours) {
|
|
497
|
+
const totalMins = curriculum.modules.reduce((s, m) => s + m.lessons.reduce((ls, l) => ls + (l.estimated_minutes || 15), 0), 0);
|
|
498
|
+
curriculum.estimated_hours = Math.round(totalMins / 60 * 10) / 10;
|
|
499
|
+
}
|
|
500
|
+
// Check prior curriculums for adaptive difficulty
|
|
501
|
+
if (store.curriculums.length > 0) {
|
|
502
|
+
const priorLevel = getAdaptiveDifficulty(store.curriculums[0]);
|
|
503
|
+
curriculum.adaptive_level = priorLevel;
|
|
504
|
+
}
|
|
505
|
+
// Recalculate module estimated times
|
|
506
|
+
recalculateProgress(curriculum);
|
|
507
|
+
// Enforce single-active: a freshly created course becomes THE active one;
|
|
508
|
+
// pause any previously-active course (its progress is kept).
|
|
509
|
+
for (const c of store.curriculums) {
|
|
510
|
+
if (c.status === 'active')
|
|
511
|
+
c.status = 'paused';
|
|
512
|
+
}
|
|
513
|
+
store.curriculums.unshift(curriculum);
|
|
514
|
+
await persist(globalDir, store, context);
|
|
515
|
+
// Record what they're learning to memory so Ava knows across EVERY mode —
|
|
516
|
+
// the main chat (which doesn't load the Teach learning-context) can recall
|
|
517
|
+
// "they're currently learning X" and weave it into help / brainstorming.
|
|
518
|
+
// Best-effort: never fail the course creation if memory is unavailable.
|
|
519
|
+
try {
|
|
520
|
+
const memoryManager = context.sharedState?.memoryManager;
|
|
521
|
+
if (memoryManager?.saveEntry) {
|
|
522
|
+
await memoryManager.saveEntry({
|
|
523
|
+
scope: 'global',
|
|
524
|
+
content: `Currently learning ${curriculum.subject} — taking the course "${curriculum.title}" (${curriculum.level})` +
|
|
525
|
+
(curriculum.goal ? `. Goal: ${curriculum.goal}` : '') + '.',
|
|
526
|
+
category: 'general',
|
|
527
|
+
tags: ['learning', curriculum.subject],
|
|
528
|
+
sourceConversationId: context.conversationId,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
catch { /* memory is additive — course creation must still succeed */ }
|
|
533
|
+
const totalLessons = curriculum.modules.reduce((sum, m) => sum + m.lessons.length, 0);
|
|
534
|
+
const totalQuizzes = curriculum.modules.reduce((sum, m) => sum + m.lessons.filter(l => l.type === 'quiz').length, 0);
|
|
535
|
+
const totalMinutes = curriculum.modules.reduce((sum, m) => sum + m.lessons.reduce((s, l) => s + (l.estimated_minutes || 0), 0), 0);
|
|
536
|
+
return {
|
|
537
|
+
success: true,
|
|
538
|
+
output: `Created curriculum: "${curriculum.title}"\n` +
|
|
539
|
+
`Subject: ${curriculum.subject} | Level: ${curriculum.level}\n` +
|
|
540
|
+
`${curriculum.modules.length} modules, ${totalLessons} lessons, ${totalQuizzes} quizzes` +
|
|
541
|
+
(totalMinutes > 0 ? ` (~${Math.round(totalMinutes / 60)}h ${totalMinutes % 60}m)` : '') +
|
|
542
|
+
(curriculum.goal ? `\nGoal: ${curriculum.goal}` : '') +
|
|
543
|
+
`\n\nModules:\n${curriculum.modules.map((m, i) => {
|
|
544
|
+
const time = m.estimated_minutes ? ` (~${m.estimated_minutes}m)` : '';
|
|
545
|
+
return ` ${i + 1}. ${m.title} (${m.lessons.length} lessons${time})`;
|
|
546
|
+
}).join('\n')}` +
|
|
547
|
+
`\n\nThe first module is unlocked. Now use learning_teach with action "write_content" to add ` +
|
|
548
|
+
`teaching content to the first lesson, then deliver it. Build content as the user progresses — ` +
|
|
549
|
+
`don't try to write all lessons at once.`,
|
|
550
|
+
metadata: { id: curriculum.id, modules: curriculum.modules.length, lessons: totalLessons },
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
// ══════════════════════════════════════════════════════════════════════
|
|
555
|
+
// Tool 2: learning_teach — Ava delivers a lesson or quiz
|
|
556
|
+
// ══════════════════════════════════════════════════════════════════════
|
|
557
|
+
export class LearningTeachTool {
|
|
558
|
+
name = 'learning_teach';
|
|
559
|
+
description = 'Deliver a lesson, write teaching content, give feedback, run a quiz, or trigger a review for the user\'s active curriculum';
|
|
560
|
+
riskLevel = 'write';
|
|
561
|
+
requiresConfirmation = false;
|
|
562
|
+
schema = {
|
|
563
|
+
name: 'learning_teach',
|
|
564
|
+
description: 'Teach the user by delivering lesson content, providing feedback, running quizzes, or triggering reviews. ' +
|
|
565
|
+
'Use this after the user says they want to continue learning or asks about a specific topic. ' +
|
|
566
|
+
'Actions: assess (diagnostic before creating curriculum — pass subject + assessment_level only, no curriculum_id needed), deliver (present lesson), write_content (author the lesson — pass `steps` for the interactive teach→do→check loop (preferred), following the step template returned for the lesson type), ' +
|
|
567
|
+
'set_quiz (persist quiz questions on a lesson — call this when you generate quiz questions so they survive restarts), ' +
|
|
568
|
+
'feedback (give feedback — pass or fail), quiz (run quiz questions and grade), review (spaced repetition review of completed lessons).',
|
|
569
|
+
parameters: {
|
|
570
|
+
type: 'object',
|
|
571
|
+
properties: {
|
|
572
|
+
curriculum_id: { type: 'string', description: 'ID of the curriculum' },
|
|
573
|
+
lesson_id: { type: 'string', description: 'ID of the lesson to teach or update' },
|
|
574
|
+
action: {
|
|
575
|
+
type: 'string',
|
|
576
|
+
enum: ['assess', 'set_active', 'deliver', 'feedback', 'write_content', 'set_quiz', 'quiz', 'review'],
|
|
577
|
+
description: 'assess = diagnostic before curriculum creation (pass subject+assessment_level, no curriculum_id required), set_active = make this the ONE active course Ava is teaching (pass curriculum_id only — pauses the others, keeps their progress; use when the learner wants to switch courses), deliver = present lesson, feedback = pass/fail, write_content = author the lesson as interactive `steps` (preferred) or legacy `content`, set_quiz = persist quiz questions on a lesson, quiz = run quiz, review = spaced repetition',
|
|
578
|
+
},
|
|
579
|
+
subject: { type: 'string', description: 'For assess: the subject to assess knowledge in' },
|
|
580
|
+
assessment_level: { type: 'string', enum: ['beginner', 'intermediate', 'advanced'], description: 'For assess: claimed level to verify' },
|
|
581
|
+
content: { type: 'string', description: 'For write_content (legacy fallback — prefer `steps`): markdown teaching content. For feedback: Ava\'s feedback text.' },
|
|
582
|
+
passed: { type: 'boolean', description: 'For feedback: did the user pass? true = completed, false = needs_review (retry)' },
|
|
583
|
+
score: { type: 'number', description: 'For feedback/quiz: score 0-100' },
|
|
584
|
+
quiz_answers: {
|
|
585
|
+
type: 'array',
|
|
586
|
+
items: { type: 'string' },
|
|
587
|
+
description: 'For quiz: user\'s answers in order matching quiz_questions',
|
|
588
|
+
},
|
|
589
|
+
questions: {
|
|
590
|
+
type: 'array',
|
|
591
|
+
description: 'For set_quiz: the quiz questions to persist on this lesson. Replaces any existing questions. Fails if the array is empty.',
|
|
592
|
+
items: {
|
|
593
|
+
type: 'object',
|
|
594
|
+
properties: {
|
|
595
|
+
question: { type: 'string', description: 'The question text' },
|
|
596
|
+
options: { type: 'array', items: { type: 'string' }, description: 'Multiple-choice options (optional for open-ended questions)' },
|
|
597
|
+
correct_answer: { type: 'string', description: 'The correct answer. For multiple-choice, either the letter (A/B/C/D) or the full option text.' },
|
|
598
|
+
explanation: { type: 'string', description: 'Why this answer is correct — shown to the learner after grading. Makes the quiz itself teach.' },
|
|
599
|
+
},
|
|
600
|
+
required: ['question', 'correct_answer'],
|
|
601
|
+
},
|
|
602
|
+
},
|
|
603
|
+
steps: {
|
|
604
|
+
type: 'array',
|
|
605
|
+
description: 'For write_content: the interactive teach→do→check steps (the Brilliant-style loop). PREFERRED over `content`. Each step teaches one small bite, then has the learner DO something you check live. Aim for 3-6 steps that build to the learner doing the whole skill on their own example. Follow the step template returned for the lesson type.',
|
|
606
|
+
items: {
|
|
607
|
+
type: 'object',
|
|
608
|
+
properties: {
|
|
609
|
+
teach: { type: 'string', description: 'The bite of concept to present before the learner acts — ONE idea, ~1-2 sentences, markdown. Not a wall of text.' },
|
|
610
|
+
interaction: {
|
|
611
|
+
type: 'object',
|
|
612
|
+
properties: {
|
|
613
|
+
kind: { type: 'string', enum: ['choice', 'free_text', 'code', 'predict'], description: 'choice = pick an option; free_text = type an answer Ava grades; code = write + run real code; predict = guess an outcome, then see it.' },
|
|
614
|
+
prompt: { type: 'string', description: 'What you ask the learner to DO — concrete and small.' },
|
|
615
|
+
options: { type: 'array', items: { type: 'string' }, description: 'For kind=choice: the options shown.' },
|
|
616
|
+
answer: { type: 'string', description: 'For choice/predict: the canonical correct answer (deterministic check).' },
|
|
617
|
+
evaluation: { type: 'string', description: 'For free_text/code where there is no single right answer: the rubric you grade the learner\'s REAL attempt against, e.g. "has context + a task + a constraint, applied to a situation of their own". This is what lets Ava tutor open answers — always set it on free_text/code steps.' },
|
|
618
|
+
starter: { type: 'string', description: 'For kind=code: starter code placed in the sandbox.' },
|
|
619
|
+
},
|
|
620
|
+
required: ['kind', 'prompt'],
|
|
621
|
+
},
|
|
622
|
+
feedback: {
|
|
623
|
+
type: 'object',
|
|
624
|
+
description: 'For choice/predict deterministic checks: what to say on right vs wrong.',
|
|
625
|
+
properties: {
|
|
626
|
+
correct: { type: 'string' },
|
|
627
|
+
incorrect: { type: 'string' },
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
},
|
|
631
|
+
required: ['teach', 'interaction'],
|
|
632
|
+
},
|
|
633
|
+
},
|
|
634
|
+
},
|
|
635
|
+
required: ['action'],
|
|
636
|
+
},
|
|
637
|
+
};
|
|
638
|
+
async execute(args, context) {
|
|
639
|
+
const globalDir = getGlobalDir(context);
|
|
640
|
+
const store = await loadStore(globalDir);
|
|
641
|
+
const currId = args.curriculum_id;
|
|
642
|
+
const lessonId = args.lesson_id;
|
|
643
|
+
const action = args.action;
|
|
644
|
+
const content = args.content;
|
|
645
|
+
const passed = args.passed;
|
|
646
|
+
const score = args.score;
|
|
647
|
+
const quizAnswers = args.quiz_answers;
|
|
648
|
+
const questions = args.questions;
|
|
649
|
+
const steps = args.steps;
|
|
650
|
+
// The 'assess' action runs BEFORE a curriculum exists — it generates
|
|
651
|
+
// diagnostic questions for a subject the learner is about to start.
|
|
652
|
+
// Skip the curriculum/lesson lookup that every other action needs.
|
|
653
|
+
if (action === 'assess') {
|
|
654
|
+
const subject = args.subject || 'general';
|
|
655
|
+
const claimedLevel = args.assessment_level || 'beginner';
|
|
656
|
+
return runAssessment(subject, claimedLevel);
|
|
657
|
+
}
|
|
658
|
+
// set_active makes ONE course the active one Ava teaches — pauses the rest
|
|
659
|
+
// (their progress is kept). Needs only curriculum_id, so handle it before the
|
|
660
|
+
// lesson lookup. Completed courses stay completed.
|
|
661
|
+
if (action === 'set_active') {
|
|
662
|
+
if (!currId)
|
|
663
|
+
return { success: false, output: 'curriculum_id is required for set_active' };
|
|
664
|
+
const target = store.curriculums.find(c => c.id === currId);
|
|
665
|
+
if (!target)
|
|
666
|
+
return { success: false, output: `Curriculum not found: ${currId}` };
|
|
667
|
+
for (const c of store.curriculums) {
|
|
668
|
+
if (c.status === 'completed')
|
|
669
|
+
continue;
|
|
670
|
+
c.status = c.id === currId ? 'active' : 'paused';
|
|
671
|
+
}
|
|
672
|
+
if (target.status === 'completed')
|
|
673
|
+
target.status = 'active'; // re-activating a finished course to revisit
|
|
674
|
+
await persist(globalDir, store, context);
|
|
675
|
+
return { success: true, output: `Active course is now **${target.title}**. The others are paused (progress kept).` };
|
|
676
|
+
}
|
|
677
|
+
if (!currId || !lessonId) {
|
|
678
|
+
return { success: false, output: `curriculum_id and lesson_id are required for action "${action}"` };
|
|
679
|
+
}
|
|
680
|
+
const curriculum = store.curriculums.find(c => c.id === currId);
|
|
681
|
+
if (!curriculum)
|
|
682
|
+
return { success: false, output: `Curriculum not found: ${currId}` };
|
|
683
|
+
let lesson;
|
|
684
|
+
let parentModule;
|
|
685
|
+
for (const mod of curriculum.modules) {
|
|
686
|
+
lesson = mod.lessons.find(l => l.id === lessonId);
|
|
687
|
+
if (lesson) {
|
|
688
|
+
parentModule = mod;
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
if (!lesson || !parentModule)
|
|
693
|
+
return { success: false, output: `Lesson not found: ${lessonId}` };
|
|
694
|
+
switch (action) {
|
|
695
|
+
case 'deliver': {
|
|
696
|
+
// Check prerequisites
|
|
697
|
+
if (lesson.prerequisites.length > 0) {
|
|
698
|
+
const allLessons = curriculum.modules.flatMap(m => m.lessons);
|
|
699
|
+
const unmet = lesson.prerequisites.filter(pre => {
|
|
700
|
+
const prereq = allLessons.find(l => l.title.toLowerCase() === pre.toLowerCase());
|
|
701
|
+
return !prereq || prereq.status !== 'completed';
|
|
702
|
+
});
|
|
703
|
+
if (unmet.length > 0) {
|
|
704
|
+
return { success: false, output: `Prerequisites not met: ${unmet.join(', ')}. Complete these first.` };
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
lesson.status = 'in_progress';
|
|
708
|
+
lesson.started_at = new Date().toISOString();
|
|
709
|
+
curriculum.updated_at = new Date().toISOString();
|
|
710
|
+
// Refresh the adaptive signal from recent quiz performance so the
|
|
711
|
+
// Tutor's delivery this turn matches where the learner actually
|
|
712
|
+
// is, not where they were when the curriculum was created.
|
|
713
|
+
curriculum.adaptive_level = getAdaptiveDifficulty(curriculum);
|
|
714
|
+
updateStreak(store);
|
|
715
|
+
recalculateProgress(curriculum);
|
|
716
|
+
await persist(globalDir, store, context);
|
|
717
|
+
let out = `**${lesson.title}** (${lesson.type} · ${lesson.difficulty})`;
|
|
718
|
+
if (lesson.estimated_minutes)
|
|
719
|
+
out += ` · ~${lesson.estimated_minutes} min`;
|
|
720
|
+
out += '\n';
|
|
721
|
+
// Adaptive pacing signal for the Tutor. The Tutor's prompt tells
|
|
722
|
+
// it to "adapt pace to the learner" — this gives it concrete
|
|
723
|
+
// data based on recent quiz scores rather than guessing.
|
|
724
|
+
const ADAPTIVE_GUIDANCE = {
|
|
725
|
+
easy: 'Recent quiz performance is below 70% — slow down. Add more worked examples, check understanding more often, and don\'t rush to harder lessons. Reinforce foundations before pushing forward.',
|
|
726
|
+
medium: 'Recent quiz performance is solid (70-90%). Continue at standard pace.',
|
|
727
|
+
hard: 'Recent quiz performance is excellent (≥90%) — push harder. Skip introductory framing, go straight to edge cases, ask deeper why-questions. The learner is ready for stretch material.',
|
|
728
|
+
};
|
|
729
|
+
const adaptive = curriculum.adaptive_level;
|
|
730
|
+
if (adaptive && adaptive in ADAPTIVE_GUIDANCE) {
|
|
731
|
+
out += `\n_Adaptive guidance: ${ADAPTIVE_GUIDANCE[adaptive]}_\n`;
|
|
732
|
+
}
|
|
733
|
+
if (lesson.steps && lesson.steps.length > 0) {
|
|
734
|
+
// Interactive lesson — the Tutor RUNS the teach→do→check loop, one
|
|
735
|
+
// step at a time, in conversation. Serve the steps + how to run them.
|
|
736
|
+
out += '\n**This is an interactive lesson — run it as a loop, ONE step at a time. Do NOT dump all the steps at once.**\n';
|
|
737
|
+
out += '\nFor each step: present its `teach` (a bite), then its `do` prompt, and STOP — wait for the learner\'s real answer before the next step.\n';
|
|
738
|
+
out += '\nGrading:\n';
|
|
739
|
+
out += '- `choice`/`predict`: check against `answer`; use the step\'s feedback if present.\n';
|
|
740
|
+
out += '- `free_text`/`code`: there is no single right answer — judge the learner\'s ACTUAL attempt against `evaluation`. ';
|
|
741
|
+
out += 'Be firm on the outcome but soft on the path: if they fall short, do NOT just say "wrong" — scaffold down (a smaller hint, a simpler sub-step, break it in half) and let them try again. ';
|
|
742
|
+
out += 'Push harder when they\'re cruising, give more support when they struggle. Move on once they\'ve shown it once.\n';
|
|
743
|
+
out += '\nWhen every step is done, call learning_teach action "feedback" with passed:true (and a score) — mastery earned because you watched them do it, not because they scrolled.\n';
|
|
744
|
+
const masteredCount = lesson.steps.filter(s => s.status === 'mastered').length;
|
|
745
|
+
if (masteredCount > 0) {
|
|
746
|
+
out += `\n_Returning learner: ${masteredCount}/${lesson.steps.length} steps already mastered. Pick up at the first un-mastered step — acknowledge what they've done, don't re-teach it. Their last attempts are shown below so you can reference them naturally ("last time you wrote …")._\n`;
|
|
747
|
+
}
|
|
748
|
+
out += '\n**Steps:**';
|
|
749
|
+
out += lesson.steps.map((s, i) => {
|
|
750
|
+
let str = `\n\n${i + 1}. teach: ${s.teach}\n do (${s.interaction.kind}): ${s.interaction.prompt}`;
|
|
751
|
+
if (s.interaction.options?.length)
|
|
752
|
+
str += `\n options: ${s.interaction.options.join(' | ')}`;
|
|
753
|
+
if (s.interaction.answer)
|
|
754
|
+
str += `\n answer: ${s.interaction.answer}`;
|
|
755
|
+
if (s.interaction.evaluation)
|
|
756
|
+
str += `\n evaluation (grade their real answer against this): ${s.interaction.evaluation}`;
|
|
757
|
+
if (s.interaction.starter)
|
|
758
|
+
str += `\n starter code: ${s.interaction.starter}`;
|
|
759
|
+
if (s.status && s.status !== 'not_started')
|
|
760
|
+
str += `\n [learner progress: ${s.status}${s.last_attempt ? ` — last attempt: "${s.last_attempt}"` : ''}]`;
|
|
761
|
+
return str;
|
|
762
|
+
}).join('');
|
|
763
|
+
}
|
|
764
|
+
else if (lesson.content) {
|
|
765
|
+
out += `\n${lesson.content}`;
|
|
766
|
+
}
|
|
767
|
+
else {
|
|
768
|
+
out += `\nThis lesson has no content yet. Use action "write_content" to add teaching material.`;
|
|
769
|
+
}
|
|
770
|
+
if (lesson.resources.length > 0) {
|
|
771
|
+
out += '\n\n**Resources:**\n';
|
|
772
|
+
out += lesson.resources.map(r => `- ${r.title}${r.url ? ` — ${r.url}` : ''} [${r.type}]`).join('\n');
|
|
773
|
+
}
|
|
774
|
+
if (lesson.quiz_questions.length > 0 && lesson.type === 'quiz') {
|
|
775
|
+
out += '\n\n**Quiz:**\n';
|
|
776
|
+
out += lesson.quiz_questions.map((q, i) => {
|
|
777
|
+
let qStr = `${i + 1}. ${q.question}`;
|
|
778
|
+
if (q.options)
|
|
779
|
+
qStr += '\n' + q.options.map((o, j) => ` ${String.fromCharCode(65 + j)}) ${o}`).join('\n');
|
|
780
|
+
return qStr;
|
|
781
|
+
}).join('\n\n');
|
|
782
|
+
}
|
|
783
|
+
return { success: true, output: out };
|
|
784
|
+
}
|
|
785
|
+
case 'write_content': {
|
|
786
|
+
// Step templates — the Brilliant-style teach→do→check loop. This is the
|
|
787
|
+
// guidance that makes a *generated* lesson feel crafted: small bites,
|
|
788
|
+
// the learner doing the thing immediately, Ava grading their real
|
|
789
|
+
// answer. Returned to the writer when the steps are thin or missing.
|
|
790
|
+
const stepTemplates = {
|
|
791
|
+
concept: '**Step template — Concept (teach→do→check loop)**\n' +
|
|
792
|
+
'Break the idea into 3-6 small steps. Each: teach ONE bite (≤2 sentences), then have the learner USE it right away.\n' +
|
|
793
|
+
'1. Open with a `predict` or `choice` that makes them FEEL the idea before you name it.\n' +
|
|
794
|
+
'2. Then `free_text` steps where they apply it to THEIR OWN example — set an `evaluation` rubric so you grade their real answer (e.g. "has X, Y and Z").\n' +
|
|
795
|
+
'3. End on a synthesis step: they do the whole skill unaided on something real to them — that is the mastery check.\n' +
|
|
796
|
+
'They learn by doing, not reading — never more than a bite of teach before an interaction.',
|
|
797
|
+
exercise: '**Step template — Exercise**\n' +
|
|
798
|
+
'Walk them INTO the solution, do not hand it over. `teach` the goal + first sub-step, then a `code`/`free_text` step for it (with `answer` or an `evaluation` rubric). Build up one checked sub-step at a time; final step assembles the whole thing, graded against acceptance criteria in `evaluation`.',
|
|
799
|
+
project: '**Step template — Project**\n' +
|
|
800
|
+
'A sequence of build milestones, each a `code` step the learner runs. `teach` the requirement + provide `starter` code; each milestone is a `code` interaction with an `evaluation` rubric ("does it do X?"); final step: it all works together.',
|
|
801
|
+
challenge: '**Step template — Challenge**\n' +
|
|
802
|
+
'Less scaffolding — they apply what they learned. One `teach` setting the problem + constraints, then a `code`/`free_text` step where they solve it with a tough `evaluation` rubric (and a bonus criterion). Hints only on a wrong attempt.',
|
|
803
|
+
recap: '**Step template — Recap**\n' +
|
|
804
|
+
'Active recall, not a summary to read. `predict`/`choice`/`free_text` steps that make them RETRIEVE each key idea from earlier lessons (with `answer` or `evaluation`), then an open step connecting them.',
|
|
805
|
+
quiz: '**Quiz lessons** use action "set_quiz" for the questions; `write_content` only sets a short intro shown above them.',
|
|
806
|
+
};
|
|
807
|
+
// ── Preferred path: interactive steps (teach→do→check) ──
|
|
808
|
+
if (steps && steps.length > 0) {
|
|
809
|
+
const w = [];
|
|
810
|
+
if (steps.length < 3 && lesson.type !== 'quiz')
|
|
811
|
+
w.push('A lesson is a loop, not a card or two — aim for 3-6 steps that build to the learner doing the whole skill.');
|
|
812
|
+
if (steps.some(s => !s.teach || s.teach.trim().length < 8))
|
|
813
|
+
w.push('Every step should teach a bite before it asks the learner to act.');
|
|
814
|
+
if (steps.some(s => !s.interaction?.kind || !s.interaction?.prompt))
|
|
815
|
+
w.push('Every step needs an interaction (kind + prompt) — that is the "do" in teach→do→check.');
|
|
816
|
+
const openNoRubric = steps.filter(s => (s.interaction?.kind === 'free_text' || s.interaction?.kind === 'code') && !s.interaction?.evaluation?.trim());
|
|
817
|
+
if (openNoRubric.length)
|
|
818
|
+
w.push(`${openNoRubric.length} open step(s) have no \`evaluation\` rubric — without it you can't grade the learner's real answer. That is the whole point; add one to each.`);
|
|
819
|
+
const detNoAnswer = steps.filter(s => (s.interaction?.kind === 'choice' || s.interaction?.kind === 'predict') && !s.interaction?.answer?.trim());
|
|
820
|
+
if (detNoAnswer.length)
|
|
821
|
+
w.push(`${detNoAnswer.length} choice/predict step(s) have no \`answer\` for the check — add it.`);
|
|
822
|
+
if (!steps.some(s => s.interaction?.kind === 'free_text' || s.interaction?.kind === 'code'))
|
|
823
|
+
w.push('No open step where the learner applies the skill to their OWN example — add at least one free_text/code step with an evaluation rubric. That is what makes it more than a clickthrough.');
|
|
824
|
+
lesson.steps = steps.map(s => ({
|
|
825
|
+
id: generateId(),
|
|
826
|
+
teach: s.teach,
|
|
827
|
+
interaction: {
|
|
828
|
+
kind: s.interaction.kind,
|
|
829
|
+
prompt: s.interaction.prompt,
|
|
830
|
+
options: s.interaction.options,
|
|
831
|
+
answer: s.interaction.answer,
|
|
832
|
+
evaluation: s.interaction.evaluation,
|
|
833
|
+
starter: s.interaction.starter,
|
|
834
|
+
},
|
|
835
|
+
feedback: s.feedback && (s.feedback.correct || s.feedback.incorrect)
|
|
836
|
+
? { correct: s.feedback.correct ?? '', incorrect: s.feedback.incorrect ?? '' }
|
|
837
|
+
: undefined,
|
|
838
|
+
status: 'not_started',
|
|
839
|
+
attempts: 0,
|
|
840
|
+
last_attempt: null,
|
|
841
|
+
}));
|
|
842
|
+
curriculum.updated_at = new Date().toISOString();
|
|
843
|
+
await persist(globalDir, store, context);
|
|
844
|
+
let out = `Wrote ${steps.length} interactive step${steps.length === 1 ? '' : 's'} for "${lesson.title}".`;
|
|
845
|
+
if (w.length)
|
|
846
|
+
out += `\n\n⚠️ Make it land:\n${w.map(x => `- ${x}`).join('\n')}\n\n${stepTemplates[lesson.type] || stepTemplates.concept}`;
|
|
847
|
+
return { success: true, output: out };
|
|
848
|
+
}
|
|
849
|
+
// ── Legacy path: markdown content blob (read-then-test) ──
|
|
850
|
+
if (!content)
|
|
851
|
+
return { success: false, output: 'Provide `steps` (preferred — the interactive teach→do→check loop) or `content` (legacy markdown).' };
|
|
852
|
+
const warnings = [];
|
|
853
|
+
if (content.length < 100 && lesson.type !== 'quiz')
|
|
854
|
+
warnings.push('Content seems short. Good lessons have depth — examples, explanations, edge cases.');
|
|
855
|
+
if (lesson.type === 'concept' && !content.includes('example') && !content.includes('Example') && !content.includes('```')) {
|
|
856
|
+
warnings.push('Concept lessons should include examples. Add code samples or real-world analogies.');
|
|
857
|
+
}
|
|
858
|
+
if (lesson.type === 'exercise' && !content.includes('expected') && !content.includes('output') && !content.includes('should')) {
|
|
859
|
+
warnings.push('Exercises should have clear expected outcomes. What should the result look like?');
|
|
860
|
+
}
|
|
861
|
+
warnings.push('Prefer `steps` — an interactive teach→do→check loop the learner works through, not a blob they read.');
|
|
862
|
+
lesson.content = content;
|
|
863
|
+
curriculum.updated_at = new Date().toISOString();
|
|
864
|
+
await persist(globalDir, store, context);
|
|
865
|
+
let out = `Updated content for "${lesson.title}" (${content.length} chars)`;
|
|
866
|
+
if (warnings.length > 0) {
|
|
867
|
+
out += `\n\n⚠️ Quality notes:\n${warnings.map(x => `- ${x}`).join('\n')}`;
|
|
868
|
+
out += `\n\n${stepTemplates[lesson.type] || ''}`;
|
|
869
|
+
}
|
|
870
|
+
return { success: true, output: out };
|
|
871
|
+
}
|
|
872
|
+
case 'set_quiz': {
|
|
873
|
+
if (!questions || questions.length === 0) {
|
|
874
|
+
return { success: false, output: 'set_quiz requires at least one question. Pass `questions` as a non-empty array.' };
|
|
875
|
+
}
|
|
876
|
+
// Validate each question has the required fields. Fail loudly on
|
|
877
|
+
// malformed input so the Quiz Master notices rather than silently
|
|
878
|
+
// persisting an unusable quiz.
|
|
879
|
+
for (let i = 0; i < questions.length; i++) {
|
|
880
|
+
const q = questions[i];
|
|
881
|
+
if (!q.question || !q.correct_answer) {
|
|
882
|
+
return { success: false, output: `Question ${i + 1} is missing question or correct_answer.` };
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
lesson.quiz_questions = questions.map(q => ({
|
|
886
|
+
question: q.question,
|
|
887
|
+
options: q.options,
|
|
888
|
+
correct_answer: q.correct_answer,
|
|
889
|
+
explanation: q.explanation,
|
|
890
|
+
}));
|
|
891
|
+
curriculum.updated_at = new Date().toISOString();
|
|
892
|
+
await persist(globalDir, store, context);
|
|
893
|
+
return {
|
|
894
|
+
success: true,
|
|
895
|
+
output: `Persisted ${questions.length} quiz question${questions.length === 1 ? '' : 's'} on "${lesson.title}". ` +
|
|
896
|
+
`They now survive restarts and sync to the cloud when Data Mode allows.`,
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
case 'feedback': {
|
|
900
|
+
if (content)
|
|
901
|
+
lesson.ava_feedback = content;
|
|
902
|
+
if (score !== undefined) {
|
|
903
|
+
lesson.score = score;
|
|
904
|
+
lesson.best_score = Math.max(lesson.best_score ?? 0, score);
|
|
905
|
+
}
|
|
906
|
+
lesson.attempts++;
|
|
907
|
+
trackTime(lesson);
|
|
908
|
+
updateStreak(store);
|
|
909
|
+
if (passed === false) {
|
|
910
|
+
lesson.status = 'needs_review';
|
|
911
|
+
curriculum.updated_at = new Date().toISOString();
|
|
912
|
+
curriculum.adaptive_level = getAdaptiveDifficulty(curriculum);
|
|
913
|
+
recalculateProgress(curriculum);
|
|
914
|
+
await persist(globalDir, store, context);
|
|
915
|
+
return {
|
|
916
|
+
success: true,
|
|
917
|
+
output: `"${lesson.title}" — needs more work.` +
|
|
918
|
+
(score !== undefined ? ` Score: ${score}% (attempt ${lesson.attempts})` : '') +
|
|
919
|
+
(lesson.time_spent_minutes > 0 ? ` Time: ${Math.round(lesson.time_spent_minutes)}m` : '') +
|
|
920
|
+
`\n${content || 'Review the material and try again when ready.'}` +
|
|
921
|
+
`\nThe lesson stays unlocked — tell the user they can retry anytime.` +
|
|
922
|
+
(store.streaks.current > 1 ? `\n🔥 Learning streak: ${store.streaks.current} days!` : ''),
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
// Passed
|
|
926
|
+
lesson.status = 'completed';
|
|
927
|
+
lesson.completed_at = new Date().toISOString();
|
|
928
|
+
curriculum.updated_at = new Date().toISOString();
|
|
929
|
+
curriculum.adaptive_level = getAdaptiveDifficulty(curriculum);
|
|
930
|
+
recalculateProgress(curriculum);
|
|
931
|
+
const newMilestones = checkMilestones(curriculum);
|
|
932
|
+
if (curriculum.progress_percent === 100 && !curriculum.completed_at) {
|
|
933
|
+
curriculum.completed_at = new Date().toISOString();
|
|
934
|
+
curriculum.status = 'completed';
|
|
935
|
+
}
|
|
936
|
+
await persist(globalDir, store, context);
|
|
937
|
+
let feedbackOut = `"${lesson.title}" — completed!` +
|
|
938
|
+
(score !== undefined ? ` Score: ${score}%` : '') +
|
|
939
|
+
(lesson.attempts > 1 ? ` (${lesson.attempts} attempts)` : '') +
|
|
940
|
+
(lesson.time_spent_minutes > 0 ? ` Time: ${Math.round(lesson.time_spent_minutes)}m` : '') +
|
|
941
|
+
`\nCurriculum progress: ${curriculum.progress_percent}%`;
|
|
942
|
+
if (newMilestones.length > 0)
|
|
943
|
+
feedbackOut += `\n🎯 Milestone: ${newMilestones.join(', ')}`;
|
|
944
|
+
if (store.streaks.current > 1)
|
|
945
|
+
feedbackOut += `\n🔥 Learning streak: ${store.streaks.current} days!`;
|
|
946
|
+
if (content)
|
|
947
|
+
feedbackOut += `\n\n${content}`;
|
|
948
|
+
return { success: true, output: feedbackOut };
|
|
949
|
+
}
|
|
950
|
+
case 'quiz': {
|
|
951
|
+
if (!quizAnswers || quizAnswers.length === 0) {
|
|
952
|
+
// No answers yet — deliver the quiz
|
|
953
|
+
if (lesson.quiz_questions.length === 0) {
|
|
954
|
+
return { success: false, output: 'This lesson has no quiz questions. Add them with write_content or create a new quiz lesson.' };
|
|
955
|
+
}
|
|
956
|
+
lesson.status = 'in_progress';
|
|
957
|
+
curriculum.updated_at = new Date().toISOString();
|
|
958
|
+
await persist(globalDir, store, context);
|
|
959
|
+
let out = `**Quiz: ${lesson.title}**\n\n`;
|
|
960
|
+
out += lesson.quiz_questions.map((q, i) => {
|
|
961
|
+
let qStr = `**${i + 1}.** ${q.question}`;
|
|
962
|
+
if (q.options)
|
|
963
|
+
qStr += '\n' + q.options.map((o, j) => ` ${String.fromCharCode(65 + j)}) ${o}`).join('\n');
|
|
964
|
+
return qStr;
|
|
965
|
+
}).join('\n\n');
|
|
966
|
+
out += '\n\nAsk the user to answer each question. Then call this tool again with quiz_answers to grade.';
|
|
967
|
+
return { success: true, output: out };
|
|
968
|
+
}
|
|
969
|
+
// Grade the quiz
|
|
970
|
+
let correct = 0;
|
|
971
|
+
const results = [];
|
|
972
|
+
for (let i = 0; i < lesson.quiz_questions.length; i++) {
|
|
973
|
+
const q = lesson.quiz_questions[i];
|
|
974
|
+
const userAnswer = quizAnswers[i] || '';
|
|
975
|
+
q.user_answer = userAnswer;
|
|
976
|
+
// Multiple-choice: user can answer with the letter (A/B/C/D)
|
|
977
|
+
// or the option text. Stays strict on the letter mapping.
|
|
978
|
+
let isCorrect = false;
|
|
979
|
+
if (q.options && /^[a-d]$/i.test(userAnswer.trim())) {
|
|
980
|
+
const idx = userAnswer.trim().toUpperCase().charCodeAt(0) - 65;
|
|
981
|
+
if (idx >= 0 && idx < q.options.length) {
|
|
982
|
+
isCorrect = answersMatch(q.options[idx], q.correct_answer);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
// Open-ended (or option text typed out): forgiving match —
|
|
986
|
+
// case / punctuation / whitespace insensitive plus a small
|
|
987
|
+
// edit-distance budget for typos on short answers. See
|
|
988
|
+
// answersMatch above for the strategy.
|
|
989
|
+
if (!isCorrect) {
|
|
990
|
+
isCorrect = answersMatch(userAnswer, q.correct_answer);
|
|
991
|
+
}
|
|
992
|
+
q.is_correct = isCorrect;
|
|
993
|
+
if (isCorrect)
|
|
994
|
+
correct++;
|
|
995
|
+
results.push(`${i + 1}. ${isCorrect ? '✓' : '✗'} ${q.question}\n` +
|
|
996
|
+
` Your answer: ${userAnswer}\n` +
|
|
997
|
+
(isCorrect ? '' : ` Correct: ${q.correct_answer}\n`) +
|
|
998
|
+
(q.explanation ? ` ${q.explanation}` : ''));
|
|
999
|
+
}
|
|
1000
|
+
const quizScore = Math.round((correct / lesson.quiz_questions.length) * 100);
|
|
1001
|
+
lesson.score = quizScore;
|
|
1002
|
+
lesson.best_score = Math.max(lesson.best_score ?? 0, quizScore);
|
|
1003
|
+
lesson.attempts++;
|
|
1004
|
+
const passThreshold = 70;
|
|
1005
|
+
if (quizScore >= passThreshold) {
|
|
1006
|
+
lesson.status = 'completed';
|
|
1007
|
+
lesson.completed_at = new Date().toISOString();
|
|
1008
|
+
}
|
|
1009
|
+
else {
|
|
1010
|
+
lesson.status = 'needs_review';
|
|
1011
|
+
}
|
|
1012
|
+
curriculum.updated_at = new Date().toISOString();
|
|
1013
|
+
recalculateProgress(curriculum);
|
|
1014
|
+
await persist(globalDir, store, context);
|
|
1015
|
+
return {
|
|
1016
|
+
success: true,
|
|
1017
|
+
output: `**Quiz Results: ${lesson.title}**\n` +
|
|
1018
|
+
`Score: ${quizScore}% (${correct}/${lesson.quiz_questions.length})` +
|
|
1019
|
+
(lesson.attempts > 1 ? ` · Attempt ${lesson.attempts} · Best: ${lesson.best_score}%` : '') +
|
|
1020
|
+
`\n${quizScore >= passThreshold ? '🎉 Passed!' : '📚 Needs review — 70% required to pass.'}\n\n` +
|
|
1021
|
+
results.join('\n\n') +
|
|
1022
|
+
`\n\nCurriculum progress: ${curriculum.progress_percent}%`,
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
case 'review': {
|
|
1026
|
+
// Mark as reviewed for spaced repetition
|
|
1027
|
+
lesson.last_reviewed_at = new Date().toISOString();
|
|
1028
|
+
lesson.review_count++;
|
|
1029
|
+
curriculum.updated_at = new Date().toISOString();
|
|
1030
|
+
await persist(globalDir, store, context);
|
|
1031
|
+
let out = `**Review: ${lesson.title}** (review #${lesson.review_count})\n\n`;
|
|
1032
|
+
if (lesson.content) {
|
|
1033
|
+
out += lesson.content;
|
|
1034
|
+
}
|
|
1035
|
+
if (lesson.quiz_questions.length > 0) {
|
|
1036
|
+
out += '\n\n**Quick review questions:**\n';
|
|
1037
|
+
// Show a subset for review
|
|
1038
|
+
const reviewQs = lesson.quiz_questions.slice(0, 3);
|
|
1039
|
+
out += reviewQs.map((q, i) => `${i + 1}. ${q.question}`).join('\n');
|
|
1040
|
+
}
|
|
1041
|
+
out += '\n\nAsk the user if they remember the key concepts. Use feedback action to record how they did.';
|
|
1042
|
+
return { success: true, output: out };
|
|
1043
|
+
}
|
|
1044
|
+
default:
|
|
1045
|
+
return { success: false, output: `Unknown action: ${action}` };
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
// ══════════════════════════════════════════════════════════════════════
|
|
1050
|
+
// Tool 3: learning_progress — View and manage learning progress
|
|
1051
|
+
// ══════════════════════════════════════════════════════════════════════
|
|
1052
|
+
export class LearningProgressTool {
|
|
1053
|
+
name = 'learning_progress';
|
|
1054
|
+
description = 'View learning progress, list curriculums, find next lesson, check review schedule, or search across learning content';
|
|
1055
|
+
riskLevel = 'safe';
|
|
1056
|
+
requiresConfirmation = false;
|
|
1057
|
+
schema = {
|
|
1058
|
+
name: 'learning_progress',
|
|
1059
|
+
description: 'Check the user\'s learning progress. Can list all curriculums, show details of a specific one, ' +
|
|
1060
|
+
'find the next available lesson, check what needs review (spaced repetition), or search across ' +
|
|
1061
|
+
'all learning content by keyword/tag.',
|
|
1062
|
+
parameters: {
|
|
1063
|
+
type: 'object',
|
|
1064
|
+
properties: {
|
|
1065
|
+
action: {
|
|
1066
|
+
type: 'string',
|
|
1067
|
+
enum: ['list', 'detail', 'next_lesson', 'needs_review', 'search', 'stats', 'recommend', 'certificate', 'library_search', 'library_recommend'],
|
|
1068
|
+
description: 'list = all curriculums, detail = specific curriculum, next_lesson = next available, needs_review = spaced repetition due, search = keyword/tag search, stats = learning statistics, recommend = suggest what to learn next, certificate = completion certificate, library_search = search public Learning Library, library_recommend = get library recommendations based on your learning history',
|
|
1069
|
+
},
|
|
1070
|
+
curriculum_id: { type: 'string', description: 'For detail/next_lesson: which curriculum' },
|
|
1071
|
+
query: { type: 'string', description: 'For search: keyword or tag to search for' },
|
|
1072
|
+
},
|
|
1073
|
+
required: ['action'],
|
|
1074
|
+
},
|
|
1075
|
+
};
|
|
1076
|
+
async execute(args, context) {
|
|
1077
|
+
const globalDir = getGlobalDir(context);
|
|
1078
|
+
const store = await loadStore(globalDir);
|
|
1079
|
+
const action = args.action;
|
|
1080
|
+
const currId = args.curriculum_id;
|
|
1081
|
+
const query = args.query;
|
|
1082
|
+
switch (action) {
|
|
1083
|
+
case 'list': {
|
|
1084
|
+
if (store.curriculums.length === 0) {
|
|
1085
|
+
return { success: true, output: 'No learning paths yet. Ask the user what they want to learn and create one with learning_create.' };
|
|
1086
|
+
}
|
|
1087
|
+
const list = store.curriculums.map(c => {
|
|
1088
|
+
const totalLessons = c.modules.reduce((s, m) => s + m.lessons.length, 0);
|
|
1089
|
+
const completedLessons = c.modules.reduce((s, m) => s + m.lessons.filter(l => l.status === 'completed').length, 0);
|
|
1090
|
+
return `- **${c.title}** (${c.subject}, ${c.level}) — ${completedLessons}/${totalLessons} lessons, ${Math.round(c.progress_percent)}% [${c.status}]\n ${c.tags.length > 0 ? `Tags: ${c.tags.join(', ')} · ` : ''}ID: ${c.id}`;
|
|
1091
|
+
}).join('\n');
|
|
1092
|
+
return { success: true, output: `**Learning paths:**\n${list}` };
|
|
1093
|
+
}
|
|
1094
|
+
case 'detail': {
|
|
1095
|
+
if (!currId)
|
|
1096
|
+
return { success: false, output: 'curriculum_id is required for detail action' };
|
|
1097
|
+
const curriculum = store.curriculums.find(c => c.id === currId);
|
|
1098
|
+
if (!curriculum)
|
|
1099
|
+
return { success: false, output: `Curriculum not found: ${currId}` };
|
|
1100
|
+
let out = `# ${curriculum.title}\n`;
|
|
1101
|
+
out += `Subject: ${curriculum.subject} | Level: ${curriculum.level} | Progress: ${Math.round(curriculum.progress_percent)}%\n`;
|
|
1102
|
+
if (curriculum.goal)
|
|
1103
|
+
out += `Goal: ${curriculum.goal}\n`;
|
|
1104
|
+
if (curriculum.tags.length > 0)
|
|
1105
|
+
out += `Tags: ${curriculum.tags.join(', ')}\n`;
|
|
1106
|
+
out += '\n';
|
|
1107
|
+
for (const mod of curriculum.modules) {
|
|
1108
|
+
const icon = mod.status === 'completed' ? '✓' : mod.status === 'locked' ? '🔒' : '▶';
|
|
1109
|
+
const time = mod.estimated_minutes ? ` (~${mod.estimated_minutes}m)` : '';
|
|
1110
|
+
out += `${icon} **${mod.title}** (${Math.round(mod.progress_percent)}%${time})\n`;
|
|
1111
|
+
if (mod.learning_objectives.length > 0) {
|
|
1112
|
+
out += ` Objectives: ${mod.learning_objectives.join(', ')}\n`;
|
|
1113
|
+
}
|
|
1114
|
+
for (const lesson of mod.lessons) {
|
|
1115
|
+
const lIcon = lesson.status === 'completed' ? ' ✓'
|
|
1116
|
+
: lesson.status === 'needs_review' ? ' ⟳'
|
|
1117
|
+
: lesson.status === 'in_progress' ? ' ▶' : ' ○';
|
|
1118
|
+
const scoreStr = lesson.best_score !== null ? ` (best: ${lesson.best_score}%)` : '';
|
|
1119
|
+
const timeStr = lesson.estimated_minutes ? ` ~${lesson.estimated_minutes}m` : '';
|
|
1120
|
+
out += `${lIcon} ${lesson.title} [${lesson.type}·${lesson.difficulty}${timeStr}]${scoreStr} [id: ${lesson.id}]\n`;
|
|
1121
|
+
}
|
|
1122
|
+
out += '\n';
|
|
1123
|
+
}
|
|
1124
|
+
return { success: true, output: out, metadata: { id: curriculum.id } };
|
|
1125
|
+
}
|
|
1126
|
+
case 'next_lesson': {
|
|
1127
|
+
const curriculum = currId
|
|
1128
|
+
? store.curriculums.find(c => c.id === currId)
|
|
1129
|
+
: store.curriculums.find(c => c.status === 'active');
|
|
1130
|
+
if (!curriculum)
|
|
1131
|
+
return { success: true, output: 'No active curriculum found.' };
|
|
1132
|
+
// Check for lessons needing review first
|
|
1133
|
+
const reviewDue = getLessonsForReview(curriculum);
|
|
1134
|
+
if (reviewDue.length > 0) {
|
|
1135
|
+
const r = reviewDue[0];
|
|
1136
|
+
return {
|
|
1137
|
+
success: true,
|
|
1138
|
+
output: `Before continuing, there's a lesson due for review:\n` +
|
|
1139
|
+
`Module: ${r.module.title}\n` +
|
|
1140
|
+
`Lesson: ${r.lesson.title} (${r.lesson.type}) — last reviewed ${r.lesson.last_reviewed_at || r.lesson.completed_at}\n` +
|
|
1141
|
+
`[curriculum_id: ${curriculum.id}, lesson_id: ${r.lesson.id}]\n\n` +
|
|
1142
|
+
`Use learning_teach with action "review" to review this lesson, or skip to the next new lesson.`,
|
|
1143
|
+
metadata: { curriculum_id: curriculum.id, lesson_id: r.lesson.id, is_review: true },
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
// Find next incomplete lesson
|
|
1147
|
+
for (const mod of curriculum.modules) {
|
|
1148
|
+
if (mod.status === 'locked')
|
|
1149
|
+
continue;
|
|
1150
|
+
const next = mod.lessons.find(l => l.status !== 'completed');
|
|
1151
|
+
if (next) {
|
|
1152
|
+
return {
|
|
1153
|
+
success: true,
|
|
1154
|
+
output: `Next lesson in "${curriculum.title}":\n` +
|
|
1155
|
+
`Module: ${mod.title}\n` +
|
|
1156
|
+
`Lesson: ${next.title} (${next.type} · ${next.difficulty})` +
|
|
1157
|
+
(next.estimated_minutes ? ` ~${next.estimated_minutes}m` : '') +
|
|
1158
|
+
(next.status === 'needs_review' ? ' ⟳ RETRY' : '') +
|
|
1159
|
+
`\n[curriculum_id: ${curriculum.id}, lesson_id: ${next.id}]\n` +
|
|
1160
|
+
(next.content ? `\n\nReady to start? Use learning_teach with action "deliver".` : '\nNo content yet — use learning_teach with action "write_content" first.'),
|
|
1161
|
+
metadata: { curriculum_id: curriculum.id, lesson_id: next.id, type: next.type },
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
return { success: true, output: `"${curriculum.title}" is complete! 🎉 Congratulations to the user.` };
|
|
1166
|
+
}
|
|
1167
|
+
case 'needs_review': {
|
|
1168
|
+
const results = [];
|
|
1169
|
+
for (const curr of store.curriculums) {
|
|
1170
|
+
if (curr.status !== 'active')
|
|
1171
|
+
continue;
|
|
1172
|
+
const reviews = getLessonsForReview(curr);
|
|
1173
|
+
if (reviews.length > 0) {
|
|
1174
|
+
results.push(`**${curr.title}:**`);
|
|
1175
|
+
for (const r of reviews) {
|
|
1176
|
+
results.push(` - ${r.lesson.title} (${r.module.title}) — ${r.lesson.review_count} reviews done`);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
if (results.length === 0) {
|
|
1181
|
+
return { success: true, output: 'No lessons due for review. The spaced repetition schedule is on track.' };
|
|
1182
|
+
}
|
|
1183
|
+
return { success: true, output: `**Lessons due for review:**\n${results.join('\n')}` };
|
|
1184
|
+
}
|
|
1185
|
+
case 'search': {
|
|
1186
|
+
if (!query)
|
|
1187
|
+
return { success: false, output: 'query is required for search action' };
|
|
1188
|
+
const q = query.toLowerCase();
|
|
1189
|
+
const results = [];
|
|
1190
|
+
for (const curr of store.curriculums) {
|
|
1191
|
+
for (const mod of curr.modules) {
|
|
1192
|
+
for (const lesson of mod.lessons) {
|
|
1193
|
+
const matches = lesson.title.toLowerCase().includes(q) ||
|
|
1194
|
+
(lesson.content || '').toLowerCase().includes(q) ||
|
|
1195
|
+
lesson.tags.some(t => t.toLowerCase().includes(q));
|
|
1196
|
+
if (matches) {
|
|
1197
|
+
results.push(`- **${lesson.title}** [${lesson.type}] in ${curr.title} > ${mod.title} [id: ${lesson.id}]`);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
if (results.length === 0) {
|
|
1203
|
+
return { success: true, output: `No lessons found matching "${query}".` };
|
|
1204
|
+
}
|
|
1205
|
+
return { success: true, output: `**Search results for "${query}":**\n${results.join('\n')}` };
|
|
1206
|
+
}
|
|
1207
|
+
case 'stats': {
|
|
1208
|
+
let totalLessons = 0;
|
|
1209
|
+
let completedLessons = 0;
|
|
1210
|
+
let totalQuizzes = 0;
|
|
1211
|
+
let totalScore = 0;
|
|
1212
|
+
let scoredQuizzes = 0;
|
|
1213
|
+
let totalMinutesEstimated = 0;
|
|
1214
|
+
let totalReviews = 0;
|
|
1215
|
+
for (const curr of store.curriculums) {
|
|
1216
|
+
for (const mod of curr.modules) {
|
|
1217
|
+
for (const lesson of mod.lessons) {
|
|
1218
|
+
totalLessons++;
|
|
1219
|
+
if (lesson.status === 'completed')
|
|
1220
|
+
completedLessons++;
|
|
1221
|
+
if (lesson.type === 'quiz')
|
|
1222
|
+
totalQuizzes++;
|
|
1223
|
+
if (lesson.best_score !== null) {
|
|
1224
|
+
totalScore += lesson.best_score;
|
|
1225
|
+
scoredQuizzes++;
|
|
1226
|
+
}
|
|
1227
|
+
if (lesson.estimated_minutes)
|
|
1228
|
+
totalMinutesEstimated += lesson.estimated_minutes;
|
|
1229
|
+
totalReviews += lesson.review_count;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
let totalTimeSpent = 0;
|
|
1234
|
+
for (const curr of store.curriculums) {
|
|
1235
|
+
for (const mod of curr.modules) {
|
|
1236
|
+
for (const lesson of mod.lessons) {
|
|
1237
|
+
totalTimeSpent += lesson.time_spent_minutes;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
const spentH = Math.floor(totalTimeSpent / 60);
|
|
1242
|
+
const spentM = Math.round(totalTimeSpent % 60);
|
|
1243
|
+
return {
|
|
1244
|
+
success: true,
|
|
1245
|
+
output: `**Learning Statistics:**\n` +
|
|
1246
|
+
`Curriculums: ${store.curriculums.length} (${store.curriculums.filter(c => c.status === 'active').length} active)\n` +
|
|
1247
|
+
`Lessons: ${completedLessons}/${totalLessons} completed\n` +
|
|
1248
|
+
`Quizzes: ${totalQuizzes} (avg score: ${scoredQuizzes > 0 ? Math.round(totalScore / scoredQuizzes) : 'N/A'}%)\n` +
|
|
1249
|
+
`Estimated time: ~${Math.round(totalMinutesEstimated / 60)}h ${totalMinutesEstimated % 60}m\n` +
|
|
1250
|
+
`Actual time spent: ${spentH}h ${spentM}m\n` +
|
|
1251
|
+
`Reviews completed: ${totalReviews}\n` +
|
|
1252
|
+
`Current streak: ${store.streaks.current} days (longest: ${store.streaks.longest})`,
|
|
1253
|
+
};
|
|
1254
|
+
}
|
|
1255
|
+
case 'recommend': {
|
|
1256
|
+
const recs = generateRecommendations(store);
|
|
1257
|
+
if (recs.length === 0) {
|
|
1258
|
+
return { success: true, output: 'No recommendations yet. Complete some lessons and I\'ll suggest what to learn next.' };
|
|
1259
|
+
}
|
|
1260
|
+
return { success: true, output: `**Recommendations:**\n${recs.map((r, i) => `${i + 1}. ${r}`).join('\n')}` };
|
|
1261
|
+
}
|
|
1262
|
+
case 'certificate': {
|
|
1263
|
+
if (!currId)
|
|
1264
|
+
return { success: false, output: 'curriculum_id is required for certificate action' };
|
|
1265
|
+
const cert = store.curriculums.find(c => c.id === currId);
|
|
1266
|
+
if (!cert)
|
|
1267
|
+
return { success: false, output: `Curriculum not found: ${currId}` };
|
|
1268
|
+
if (cert.progress_percent < 100) {
|
|
1269
|
+
return { success: false, output: `Curriculum is ${Math.round(cert.progress_percent)}% complete. Finish all lessons to earn your certificate.` };
|
|
1270
|
+
}
|
|
1271
|
+
return { success: true, output: generateCertificate(cert) };
|
|
1272
|
+
}
|
|
1273
|
+
case 'library_search': {
|
|
1274
|
+
const query = args.query;
|
|
1275
|
+
if (!query)
|
|
1276
|
+
return { success: false, output: 'query is required for library_search' };
|
|
1277
|
+
const platformKey = context.sharedState?.platformKey;
|
|
1278
|
+
if (!platformKey) {
|
|
1279
|
+
return { success: true, output: 'The Learning Library is available on the Ava platform. Connect your account or browse the Library tab in your dashboard to explore curated and community learning paths.' };
|
|
1280
|
+
}
|
|
1281
|
+
try {
|
|
1282
|
+
const res = await fetch(`https://avasupernova.com/api/learning/library?search=${encodeURIComponent(query)}&limit=5`, {
|
|
1283
|
+
headers: { 'Authorization': `Bearer ${platformKey}` },
|
|
1284
|
+
signal: AbortSignal.timeout(8000),
|
|
1285
|
+
});
|
|
1286
|
+
if (!res.ok)
|
|
1287
|
+
return { success: false, output: 'Failed to search library' };
|
|
1288
|
+
const data = await res.json();
|
|
1289
|
+
if (!data.paths?.length)
|
|
1290
|
+
return { success: true, output: `No library paths found for "${query}". Try a different search term, or I can create a custom learning path for you.` };
|
|
1291
|
+
const results = data.paths.map((p, i) => {
|
|
1292
|
+
const rating = p.rating_count > 0 ? `${(p.rating_sum / p.rating_count).toFixed(1)}/5` : 'No ratings yet';
|
|
1293
|
+
const badge = p.source === 'curated' ? ' [Curated by Ava]' : '';
|
|
1294
|
+
return `${i + 1}. **${p.title}**${badge}\n ${p.subject} · ${p.level} · ${p.estimated_hours || '?'}h · ${p.fork_count} learners · ${rating}\n ${p.description?.slice(0, 120) || ''}`;
|
|
1295
|
+
}).join('\n\n');
|
|
1296
|
+
return { success: true, output: `**Learning Library — "${query}"**\n\n${results}\n\nSay "start [title]" to fork a path and begin learning, or I can create a custom one.` };
|
|
1297
|
+
}
|
|
1298
|
+
catch {
|
|
1299
|
+
return { success: false, output: 'Library search timed out. Try again or browse the Library tab in your dashboard.' };
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
case 'library_recommend': {
|
|
1303
|
+
const platformKey = context.sharedState?.platformKey;
|
|
1304
|
+
const localRecs = generateRecommendations(store);
|
|
1305
|
+
let libraryRecs = '';
|
|
1306
|
+
if (platformKey) {
|
|
1307
|
+
try {
|
|
1308
|
+
const completedLevels = store.curriculums
|
|
1309
|
+
.filter(c => c.status === 'completed')
|
|
1310
|
+
.map(c => c.level);
|
|
1311
|
+
const nextLevel = completedLevels.includes('beginner') && !completedLevels.includes('intermediate')
|
|
1312
|
+
? 'intermediate'
|
|
1313
|
+
: completedLevels.includes('intermediate') && !completedLevels.includes('advanced')
|
|
1314
|
+
? 'advanced'
|
|
1315
|
+
: 'beginner';
|
|
1316
|
+
const res = await fetch(`https://avasupernova.com/api/learning/library?sort=popular&level=${nextLevel}&limit=3`, {
|
|
1317
|
+
headers: { 'Authorization': `Bearer ${platformKey}` },
|
|
1318
|
+
signal: AbortSignal.timeout(5000),
|
|
1319
|
+
});
|
|
1320
|
+
if (res.ok) {
|
|
1321
|
+
const data = await res.json();
|
|
1322
|
+
if (data.paths?.length) {
|
|
1323
|
+
libraryRecs = '\n\n**From the Learning Library:**\n' + data.paths.map((p, i) => {
|
|
1324
|
+
const badge = p.source === 'curated' ? ' [Curated]' : '';
|
|
1325
|
+
return `${i + 1}. ${p.title}${badge} (${p.level}, ${p.fork_count} learners)`;
|
|
1326
|
+
}).join('\n');
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
catch { /* non-fatal */ }
|
|
1331
|
+
}
|
|
1332
|
+
const output = localRecs.length > 0
|
|
1333
|
+
? localRecs.join('\n') + libraryRecs
|
|
1334
|
+
: libraryRecs
|
|
1335
|
+
? 'Based on your learning history:' + libraryRecs
|
|
1336
|
+
: 'Start your first learning path! Say "teach me [topic]" or browse the Learning Library in your dashboard.';
|
|
1337
|
+
return { success: true, output };
|
|
1338
|
+
}
|
|
1339
|
+
default:
|
|
1340
|
+
return { success: false, output: `Unknown action: ${action}` };
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
//# sourceMappingURL=learning.js.map
|