@lssm/module.lifecycle-core 0.0.0-canary-20251217052941 → 0.0.0-canary-20251217060433
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/adapters/analytics-adapter.d.ts +13 -0
- package/dist/adapters/intent-adapter.d.ts +11 -0
- package/dist/adapters/questionnaire-adapter.d.ts +13 -0
- package/dist/collectors/signal-collector.d.ts +24 -0
- package/dist/index.d.ts +8 -0
- package/dist/orchestrator/lifecycle-orchestrator.d.ts +21 -0
- package/dist/planning/milestone-planner.d.ts +10 -0
- package/dist/scoring/stage-scorer.d.ts +26 -0
- package/package.json +5 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LifecycleAxes, LifecycleMetricSnapshot, LifecycleSignal } from "@lssm/lib.lifecycle";
|
|
2
|
+
|
|
3
|
+
//#region src/adapters/analytics-adapter.d.ts
|
|
4
|
+
interface AnalyticsAdapterResult {
|
|
5
|
+
metrics?: LifecycleMetricSnapshot;
|
|
6
|
+
signals?: LifecycleSignal[];
|
|
7
|
+
axes?: Partial<LifecycleAxes>;
|
|
8
|
+
}
|
|
9
|
+
interface AnalyticsAdapter {
|
|
10
|
+
fetch(): Promise<AnalyticsAdapterResult>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { AnalyticsAdapter, AnalyticsAdapterResult };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LifecycleSignal } from "@lssm/lib.lifecycle";
|
|
2
|
+
|
|
3
|
+
//#region src/adapters/intent-adapter.d.ts
|
|
4
|
+
interface IntentAdapterResult {
|
|
5
|
+
signals?: LifecycleSignal[];
|
|
6
|
+
}
|
|
7
|
+
interface IntentAdapter {
|
|
8
|
+
fetch(): Promise<IntentAdapterResult>;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { IntentAdapter, IntentAdapterResult };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LifecycleAxes, LifecycleSignal } from "@lssm/lib.lifecycle";
|
|
2
|
+
|
|
3
|
+
//#region src/adapters/questionnaire-adapter.d.ts
|
|
4
|
+
interface QuestionnaireAdapterResult {
|
|
5
|
+
axes?: Partial<LifecycleAxes>;
|
|
6
|
+
signals?: LifecycleSignal[];
|
|
7
|
+
answers?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
interface QuestionnaireAdapter {
|
|
10
|
+
fetch(): Promise<QuestionnaireAdapterResult>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { QuestionnaireAdapter, QuestionnaireAdapterResult };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AnalyticsAdapter } from "../adapters/analytics-adapter.js";
|
|
2
|
+
import { QuestionnaireAdapter } from "../adapters/questionnaire-adapter.js";
|
|
3
|
+
import { IntentAdapter } from "../adapters/intent-adapter.js";
|
|
4
|
+
import { LifecycleAssessmentInput, LifecycleAxes, LifecycleMetricSnapshot, LifecycleSignal } from "@lssm/lib.lifecycle";
|
|
5
|
+
|
|
6
|
+
//#region src/collectors/signal-collector.d.ts
|
|
7
|
+
interface StageSignalCollectorOptions {
|
|
8
|
+
analyticsAdapter?: AnalyticsAdapter;
|
|
9
|
+
questionnaireAdapter?: QuestionnaireAdapter;
|
|
10
|
+
intentAdapter?: IntentAdapter;
|
|
11
|
+
}
|
|
12
|
+
interface StageSignalCollectorResult {
|
|
13
|
+
axes: LifecycleAxes;
|
|
14
|
+
metrics: LifecycleMetricSnapshot;
|
|
15
|
+
signals: LifecycleSignal[];
|
|
16
|
+
questionnaireAnswers?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
declare class StageSignalCollector {
|
|
19
|
+
private readonly options;
|
|
20
|
+
constructor(options: StageSignalCollectorOptions);
|
|
21
|
+
collect(input?: LifecycleAssessmentInput): Promise<StageSignalCollectorResult>;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { StageSignalCollector, StageSignalCollectorOptions, StageSignalCollectorResult };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AnalyticsAdapter, AnalyticsAdapterResult } from "./adapters/analytics-adapter.js";
|
|
2
|
+
import { QuestionnaireAdapter, QuestionnaireAdapterResult } from "./adapters/questionnaire-adapter.js";
|
|
3
|
+
import { IntentAdapter, IntentAdapterResult } from "./adapters/intent-adapter.js";
|
|
4
|
+
import { StageSignalCollector, StageSignalCollectorOptions, StageSignalCollectorResult } from "./collectors/signal-collector.js";
|
|
5
|
+
import { StageScoreInput, StageScorer } from "./scoring/stage-scorer.js";
|
|
6
|
+
import { LifecycleMilestonePlanner } from "./planning/milestone-planner.js";
|
|
7
|
+
import { LifecycleOrchestrator, LifecycleOrchestratorOptions } from "./orchestrator/lifecycle-orchestrator.js";
|
|
8
|
+
export { AnalyticsAdapter, AnalyticsAdapterResult, IntentAdapter, IntentAdapterResult, LifecycleMilestonePlanner, LifecycleOrchestrator, LifecycleOrchestratorOptions, QuestionnaireAdapter, QuestionnaireAdapterResult, StageScoreInput, StageScorer, StageSignalCollector, StageSignalCollectorOptions, StageSignalCollectorResult };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StageSignalCollector } from "../collectors/signal-collector.js";
|
|
2
|
+
import { StageScorer } from "../scoring/stage-scorer.js";
|
|
3
|
+
import { LifecycleMilestonePlanner } from "../planning/milestone-planner.js";
|
|
4
|
+
import { LifecycleAssessment, LifecycleAssessmentInput, LifecycleMilestone, LifecycleStage } from "@lssm/lib.lifecycle";
|
|
5
|
+
|
|
6
|
+
//#region src/orchestrator/lifecycle-orchestrator.d.ts
|
|
7
|
+
interface LifecycleOrchestratorOptions {
|
|
8
|
+
collector: StageSignalCollector;
|
|
9
|
+
scorer: StageScorer;
|
|
10
|
+
milestonePlanner?: LifecycleMilestonePlanner;
|
|
11
|
+
}
|
|
12
|
+
declare class LifecycleOrchestrator {
|
|
13
|
+
private readonly collector;
|
|
14
|
+
private readonly scorer;
|
|
15
|
+
private readonly planner?;
|
|
16
|
+
constructor(options: LifecycleOrchestratorOptions);
|
|
17
|
+
run(input?: LifecycleAssessmentInput): Promise<LifecycleAssessment>;
|
|
18
|
+
getUpcomingMilestones(stage: LifecycleStage, completedMilestoneIds?: string[], limit?: number): LifecycleMilestone[];
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { LifecycleOrchestrator, LifecycleOrchestratorOptions };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LifecycleMilestone, LifecycleStage } from "@lssm/lib.lifecycle";
|
|
2
|
+
|
|
3
|
+
//#region src/planning/milestone-planner.d.ts
|
|
4
|
+
declare class LifecycleMilestonePlanner {
|
|
5
|
+
private readonly milestones;
|
|
6
|
+
constructor(customCatalog?: LifecycleMilestone[]);
|
|
7
|
+
getUpcoming(stage: LifecycleStage, completedIds?: string[], limit?: number): LifecycleMilestone[];
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { LifecycleMilestonePlanner };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LifecycleMetricSnapshot, LifecycleScore, LifecycleSignal } from "@lssm/lib.lifecycle";
|
|
2
|
+
|
|
3
|
+
//#region src/scoring/stage-scorer.d.ts
|
|
4
|
+
type NumericMetricKey = Extract<{ [Key in keyof LifecycleMetricSnapshot]: LifecycleMetricSnapshot[Key] extends number | undefined ? Key : never }[keyof LifecycleMetricSnapshot], string>;
|
|
5
|
+
interface MetricWeightConfig {
|
|
6
|
+
weight: number;
|
|
7
|
+
threshold: number;
|
|
8
|
+
direction?: 'gte' | 'lte';
|
|
9
|
+
}
|
|
10
|
+
interface StageWeightConfig {
|
|
11
|
+
base: number;
|
|
12
|
+
metrics?: Partial<Record<NumericMetricKey, MetricWeightConfig>>;
|
|
13
|
+
signalKinds?: Partial<Record<string, number>>;
|
|
14
|
+
}
|
|
15
|
+
type StageWeights = Record<string, StageWeightConfig>;
|
|
16
|
+
interface StageScoreInput {
|
|
17
|
+
metrics: LifecycleMetricSnapshot;
|
|
18
|
+
signals: LifecycleSignal[];
|
|
19
|
+
}
|
|
20
|
+
declare class StageScorer {
|
|
21
|
+
private readonly weights;
|
|
22
|
+
constructor(weights?: StageWeights);
|
|
23
|
+
score(input: StageScoreInput): LifecycleScore[];
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { StageScoreInput, StageScorer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/module.lifecycle-core",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217060433",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"test": "bun run"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@lssm/lib.lifecycle": "0.0.0-canary-
|
|
27
|
+
"@lssm/lib.lifecycle": "0.0.0-canary-20251217060433"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
31
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
30
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251217060433",
|
|
31
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251217060433",
|
|
32
32
|
"tsdown": "^0.17.4",
|
|
33
33
|
"typescript": "^5.9.3"
|
|
34
34
|
},
|
|
35
35
|
"exports": {
|
|
36
|
-
".": "./
|
|
36
|
+
".": "./dist/index.js",
|
|
37
37
|
"./*": "./*"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|