@equationalapplications/core-llm-wiki 7.11.0 → 7.11.2
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/{chunk-IJFOAWPS.mjs → chunk-522SCN2E.mjs} +18 -6
- package/dist/chunk-522SCN2E.mjs.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{testing-C-WsBxLh.d.mts → testing-B0UtFCq1.d.mts} +2 -0
- package/dist/{testing-C-WsBxLh.d.ts → testing-B0UtFCq1.d.ts} +2 -0
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +16 -4
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-IJFOAWPS.mjs.map +0 -1
|
@@ -2612,6 +2612,8 @@ declare class PromptService {
|
|
|
2612
2612
|
private appendGrounding;
|
|
2613
2613
|
private hydrate;
|
|
2614
2614
|
private hasOntologyPlaceholders;
|
|
2615
|
+
/** Removes ontology placeholders until none remain, so a nested form cannot reassemble one (closes CodeQL #11). */
|
|
2616
|
+
private stripOntologyPlaceholders;
|
|
2615
2617
|
private buildSystemPrompt;
|
|
2616
2618
|
private appendOntology;
|
|
2617
2619
|
buildIngestPrompt(documentChunk: string, runtimeOverride?: string, ontologyContext?: OntologyPromptContext | null): {
|
|
@@ -2612,6 +2612,8 @@ declare class PromptService {
|
|
|
2612
2612
|
private appendGrounding;
|
|
2613
2613
|
private hydrate;
|
|
2614
2614
|
private hasOntologyPlaceholders;
|
|
2615
|
+
/** Removes ontology placeholders until none remain, so a nested form cannot reassemble one (closes CodeQL #11). */
|
|
2616
|
+
private stripOntologyPlaceholders;
|
|
2615
2617
|
private buildSystemPrompt;
|
|
2616
2618
|
private appendOntology;
|
|
2617
2619
|
buildIngestPrompt(documentChunk: string, runtimeOverride?: string, ontologyContext?: OntologyPromptContext | null): {
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { aB as EmbeddingService, aC as ImportExportService, aD as IngestionService, aE as JobManager, aE as JobManagerType, aF as MaintenanceService, aG as RetrievalService, aH as SearchService, aH as SearchServiceType, ar as WikiMemoryTestAccess, aI as WriteService } from './testing-
|
|
1
|
+
export { aB as EmbeddingService, aC as ImportExportService, aD as IngestionService, aE as JobManager, aE as JobManagerType, aF as MaintenanceService, aG as RetrievalService, aH as SearchService, aH as SearchServiceType, ar as WikiMemoryTestAccess, aI as WriteService } from './testing-B0UtFCq1.mjs';
|
|
2
2
|
import '@equationalapplications/core-okf';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { aB as EmbeddingService, aC as ImportExportService, aD as IngestionService, aE as JobManager, aE as JobManagerType, aF as MaintenanceService, aG as RetrievalService, aH as SearchService, aH as SearchServiceType, ar as WikiMemoryTestAccess, aI as WriteService } from './testing-
|
|
1
|
+
export { aB as EmbeddingService, aC as ImportExportService, aD as IngestionService, aE as JobManager, aE as JobManagerType, aF as MaintenanceService, aG as RetrievalService, aH as SearchService, aH as SearchServiceType, ar as WikiMemoryTestAccess, aI as WriteService } from './testing-B0UtFCq1.js';
|
|
2
2
|
import '@equationalapplications/core-okf';
|
package/dist/testing.js
CHANGED
|
@@ -1709,12 +1709,24 @@ ${groundingEvidenceBlock(writer, cfg)}` : systemPrompt;
|
|
|
1709
1709
|
hasOntologyPlaceholders(template) {
|
|
1710
1710
|
return /\{\{\s*ontology(?:Manifest|ModeInstructions)\s*\}\}/.test(template);
|
|
1711
1711
|
}
|
|
1712
|
+
/** Removes ontology placeholders until none remain, so a nested form cannot reassemble one (closes CodeQL #11). */
|
|
1713
|
+
stripOntologyPlaceholders(template) {
|
|
1714
|
+
let out = template;
|
|
1715
|
+
let prev;
|
|
1716
|
+
do {
|
|
1717
|
+
prev = out;
|
|
1718
|
+
out = out.replace(/\{\{\s*ontology(?:Manifest|ModeInstructions)\s*\}\}/g, "");
|
|
1719
|
+
} while (out !== prev);
|
|
1720
|
+
return out;
|
|
1721
|
+
}
|
|
1712
1722
|
buildSystemPrompt(template, variables, ontologyContext) {
|
|
1723
|
+
const hasOntologyPlaceholders = this.hasOntologyPlaceholders(template);
|
|
1724
|
+
const effective = hasOntologyPlaceholders && ontologyContext == null ? this.stripOntologyPlaceholders(template) : template;
|
|
1713
1725
|
const shouldHydrate = Object.keys(variables).some(
|
|
1714
|
-
(key) => new RegExp(`\\{\\{\\s*${key}\\s*\\}\\}`).test(
|
|
1715
|
-
) || ontologyContext != null &&
|
|
1716
|
-
const hydrated = shouldHydrate ? this.hydrate(
|
|
1717
|
-
return
|
|
1726
|
+
(key) => new RegExp(`\\{\\{\\s*${key}\\s*\\}\\}`).test(effective)
|
|
1727
|
+
) || ontologyContext != null && hasOntologyPlaceholders;
|
|
1728
|
+
const hydrated = shouldHydrate ? this.hydrate(effective, { ...variables, ...ontologyContext ?? {} }) : effective;
|
|
1729
|
+
return hasOntologyPlaceholders ? hydrated : this.appendOntology(hydrated, ontologyContext);
|
|
1718
1730
|
}
|
|
1719
1731
|
appendOntology(systemPrompt, ctx) {
|
|
1720
1732
|
if (!ctx) return systemPrompt;
|