@oscharko-dev/keiko 0.3.13 → 0.3.15
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/ui/csp-hashes.json +6 -6
- package/dist/ui/static/404.html +1 -1
- package/dist/ui/static/__next.__PAGE__.txt +1 -1
- package/dist/ui/static/__next._full.txt +1 -1
- package/dist/ui/static/__next._head.txt +1 -1
- package/dist/ui/static/__next._index.txt +1 -1
- package/dist/ui/static/__next._tree.txt +1 -1
- package/dist/ui/static/_not-found/__next._full.txt +1 -1
- package/dist/ui/static/_not-found/__next._head.txt +1 -1
- package/dist/ui/static/_not-found/__next._index.txt +1 -1
- package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/ui/static/_not-found/__next._not-found.txt +1 -1
- package/dist/ui/static/_not-found/__next._tree.txt +1 -1
- package/dist/ui/static/_not-found.html +1 -1
- package/dist/ui/static/_not-found.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next._full.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next._head.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next._index.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.txt +1 -1
- package/dist/ui/static/atlassian-connectors.html +1 -1
- package/dist/ui/static/atlassian-connectors.txt +1 -1
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +1 -1
- package/dist/ui/static/launch/__next._full.txt +1 -1
- package/dist/ui/static/launch/__next._head.txt +1 -1
- package/dist/ui/static/launch/__next._index.txt +1 -1
- package/dist/ui/static/launch/__next._tree.txt +1 -1
- package/dist/ui/static/launch/__next.launch.__PAGE__.txt +1 -1
- package/dist/ui/static/launch/__next.launch.txt +1 -1
- package/dist/ui/static/launch.html +1 -1
- package/dist/ui/static/launch.txt +1 -1
- package/dist/ui/static/local-knowledge/__next._full.txt +1 -1
- package/dist/ui/static/local-knowledge/__next._head.txt +1 -1
- package/dist/ui/static/local-knowledge/__next._index.txt +1 -1
- package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +1 -1
- package/dist/ui/static/local-knowledge/__next.local-knowledge.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._head.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._index.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule.html +1 -1
- package/dist/ui/static/local-knowledge/capsule.txt +1 -1
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui.js +25 -6
- package/node_modules/@oscharko-dev/keiko-cli/package.json +13 -13
- package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.js +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
- package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/package.json +6 -6
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.js +3 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.js +341 -62
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.js +586 -132
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/types.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.d.ts +20 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.js +154 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.js +43 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts +15 -2
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +147 -15
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.js +188 -23
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts +27 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.js +180 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +339 -55
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +18 -5
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +141 -26
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncService.js +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.js +51 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +77 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.js +71 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +9 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.js +37 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/index.js +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.js +158 -36
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation-store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation-store.js +9 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.js +10 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-store-open.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-store-open.js +8 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/manual/manual-pod-service.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/manual/manual-pod-service.js +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.js +135 -36
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.js +9 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.js +57 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts +20 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.js +499 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.js +340 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.d.ts +49 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.js +449 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.d.ts +36 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.js +190 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.js +48 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/server.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/server.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/server.js +22 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.js +7 -2
- package/node_modules/@oscharko-dev/keiko-server/package.json +21 -21
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
- package/package.json +25 -25
- package/release-impact.catalog.json +117 -7
- package/vendor/{oscharko-dev-keiko-cli-0.3.13.tgz → oscharko-dev-keiko-cli-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-connectors-0.3.13.tgz → oscharko-dev-keiko-connectors-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-contracts-0.3.13.tgz → oscharko-dev-keiko-contracts-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-evaluations-0.3.13.tgz → oscharko-dev-keiko-evaluations-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-evidence-0.3.13.tgz → oscharko-dev-keiko-evidence-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-git-0.3.13.tgz → oscharko-dev-keiko-git-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-harness-0.3.13.tgz → oscharko-dev-keiko-harness-0.3.15.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-0.3.15.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-memory-capture-0.3.13.tgz → oscharko-dev-keiko-memory-capture-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-consolidation-0.3.13.tgz → oscharko-dev-keiko-memory-consolidation-0.3.15.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-memory-governance-0.3.15.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-memory-retrieval-0.3.13.tgz → oscharko-dev-keiko-memory-retrieval-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-vault-0.3.13.tgz → oscharko-dev-keiko-memory-vault-0.3.15.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-0.3.15.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-quality-intelligence-0.3.13.tgz → oscharko-dev-keiko-quality-intelligence-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sandbox-0.3.13.tgz → oscharko-dev-keiko-sandbox-0.3.15.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-sdk-0.3.15.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-security-0.3.13.tgz → oscharko-dev-keiko-security-0.3.15.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-server-0.3.15.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-tools-0.3.13.tgz → oscharko-dev-keiko-tools-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-verification-0.3.13.tgz → oscharko-dev-keiko-verification-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-workflows-0.3.13.tgz → oscharko-dev-keiko-workflows-0.3.15.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-workspace-0.3.13.tgz → oscharko-dev-keiko-workspace-0.3.15.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-0.3.13.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-governance-0.3.13.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-0.3.13.tgz +0 -0
- package/vendor/oscharko-dev-keiko-sdk-0.3.13.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-0.3.13.tgz +0 -0
- /package/dist/ui/static/_next/static/{iwhpaHGb663ka5R3lhZBj → 4j3JDaPBERRu_ZIgeR1VQ}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{iwhpaHGb663ka5R3lhZBj → 4j3JDaPBERRu_ZIgeR1VQ}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{iwhpaHGb663ka5R3lhZBj → 4j3JDaPBERRu_ZIgeR1VQ}/_ssgManifest.js +0 -0
|
@@ -7,6 +7,7 @@ import type { DiscoveryOptions } from "../discovery/index.js";
|
|
|
7
7
|
import { KnowledgeStoreError } from "../errors.js";
|
|
8
8
|
import type { ParserRegistry, ProgressiveExtractor } from "../parsers/index.js";
|
|
9
9
|
import type { AuditEventSink } from "../privacy/index.js";
|
|
10
|
+
import type { KnowledgeLogSink } from "../knowledge-log.js";
|
|
10
11
|
import type { KnowledgeStore } from "../store.js";
|
|
11
12
|
export declare const DEFAULT_INDEXING_BATCH_SIZE = 64;
|
|
12
13
|
export declare const DEFAULT_INDEXING_CONCURRENCY = 4;
|
|
@@ -18,6 +19,11 @@ export declare class IndexingError extends KnowledgeStoreError {
|
|
|
18
19
|
cause?: unknown;
|
|
19
20
|
});
|
|
20
21
|
}
|
|
22
|
+
export interface IndexingLogContext {
|
|
23
|
+
readonly jobId: string;
|
|
24
|
+
readonly capsuleIdDigest: string;
|
|
25
|
+
readonly documentIdDigest?: string | undefined;
|
|
26
|
+
}
|
|
21
27
|
export interface IndexingOptions {
|
|
22
28
|
readonly capsuleId: KnowledgeCapsuleId;
|
|
23
29
|
readonly sourceIds?: readonly KnowledgeSourceId[];
|
|
@@ -29,6 +35,7 @@ export interface IndexingOptions {
|
|
|
29
35
|
readonly signal?: AbortSignal;
|
|
30
36
|
readonly progress?: (event: IndexingEvent) => void;
|
|
31
37
|
readonly auditSink?: AuditEventSink;
|
|
38
|
+
readonly logSink?: KnowledgeLogSink;
|
|
32
39
|
readonly force?: boolean;
|
|
33
40
|
readonly batchSize?: number;
|
|
34
41
|
readonly concurrency?: number;
|
|
@@ -154,6 +161,8 @@ export interface EmbedBatchOptions {
|
|
|
154
161
|
readonly idSource: () => string;
|
|
155
162
|
readonly tokenizer?: LocalKnowledgeTokenizer;
|
|
156
163
|
readonly retry?: EmbedRetryOptions;
|
|
164
|
+
readonly logSink?: KnowledgeLogSink;
|
|
165
|
+
readonly logContext?: IndexingLogContext;
|
|
157
166
|
}
|
|
158
167
|
export interface EmbedBatchResult {
|
|
159
168
|
readonly vectors: readonly VectorRecord[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/indexing/types.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACV,sBAAsB,EACtB,gCAAgC,EAChC,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,2BAA2B,EAC3B,YAAY,EACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,KAAK,EAAE,gBA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,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,uBAAuB,CAAC;IAE7C,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAEnC,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAGpC,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAI1C,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC9C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type KnowledgeLogLevel = "debug" | "info" | "warn" | "error";
|
|
2
|
+
export type KnowledgeLogCategory = "embedding" | "indexing" | "search" | "diagnostic";
|
|
3
|
+
export interface KnowledgeLogEvent {
|
|
4
|
+
readonly level?: KnowledgeLogLevel | undefined;
|
|
5
|
+
readonly category: KnowledgeLogCategory;
|
|
6
|
+
readonly op: string;
|
|
7
|
+
readonly correlationId?: string | undefined;
|
|
8
|
+
readonly durationMs?: number | undefined;
|
|
9
|
+
readonly status?: number | undefined;
|
|
10
|
+
readonly errorKind?: string | undefined;
|
|
11
|
+
readonly extra?: Readonly<Record<string, unknown>> | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface KnowledgeLogSink {
|
|
14
|
+
readonly write: (event: KnowledgeLogEvent) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function nullKnowledgeLogSink(): KnowledgeLogSink;
|
|
17
|
+
export declare function startKnowledgeLogTimer(): () => number;
|
|
18
|
+
export declare function knowledgeErrorKind(error: unknown): string;
|
|
19
|
+
export declare function emitKnowledgeLogEvent(sink: KnowledgeLogSink | undefined, event: KnowledgeLogEvent): void;
|
|
20
|
+
//# sourceMappingURL=knowledge-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-log.d.ts","sourceRoot":"","sources":["../src/knowledge-log.ts"],"names":[],"mappings":"AAuBA,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEtF,MAAM,WAAW,iBAAiB;IAEhC,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;CAChE;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD;AAQD,wBAAgB,oBAAoB,IAAI,gBAAgB,CAEvD;AAKD,wBAAgB,sBAAsB,IAAI,MAAM,MAAM,CAGrD;AAwCD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGzD;AAmCD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,gBAAgB,GAAG,SAAS,EAClC,KAAK,EAAE,iBAAiB,GACvB,IAAI,CAON"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// Content-free activity-log seam for the local-knowledge package.
|
|
2
|
+
//
|
|
3
|
+
// WHY THIS FILE EXISTS INSTEAD OF AN IMPORT
|
|
4
|
+
//
|
|
5
|
+
// The server owns the process-wide logger and the file sink that writes `server.log`. This
|
|
6
|
+
// package sits BELOW `keiko-server` in the ADR-0019 dependency direction, so importing that
|
|
7
|
+
// logger would invert the arrow that `arch:check` enforces. The package therefore declares the
|
|
8
|
+
// structural shape it needs and accepts an optional sink through an options object the caller
|
|
9
|
+
// already passes; the server wires its own sink in at the composition root, and every call site
|
|
10
|
+
// degrades to a no-op when nothing is wired.
|
|
11
|
+
//
|
|
12
|
+
// The event shape is deliberately a STRUCTURAL SUBSET of the server's `ServerLogEvent`, so a
|
|
13
|
+
// `ServerLogSink` is assignable to `KnowledgeLogSink` with no adapter and no shared import. The
|
|
14
|
+
// category union is narrowed to the labels this package can legitimately emit — a routing label
|
|
15
|
+
// this layer cannot produce would only be a typo waiting to happen.
|
|
16
|
+
//
|
|
17
|
+
// REDACTION IS STRUCTURAL, NOT A CALLER PROMISE
|
|
18
|
+
//
|
|
19
|
+
// A field here carries counts, byte sizes, durations, HTTP statuses, error kinds, and the
|
|
20
|
+
// store's own opaque identifiers (ADR-0128 D6: identifiers, counts, and hashes only). Chunk
|
|
21
|
+
// text, document text, extracted content, prompts, embeddings, api keys, endpoints, and
|
|
22
|
+
// absolute filesystem paths never reach a field on this event.
|
|
23
|
+
const NULL_SINK = {
|
|
24
|
+
write(_event) {
|
|
25
|
+
// Explicit no-op: the default whenever no caller wired a sink.
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export function nullKnowledgeLogSink() {
|
|
29
|
+
return NULL_SINK;
|
|
30
|
+
}
|
|
31
|
+
// Monotonic elapsed milliseconds, rounded to 3 decimals so a line stays stable in width.
|
|
32
|
+
// `performance.now()` rather than `Date.now()` so a clock step cannot produce a negative
|
|
33
|
+
// duration in the middle of a long indexing run.
|
|
34
|
+
export function startKnowledgeLogTimer() {
|
|
35
|
+
const startedAt = performance.now();
|
|
36
|
+
return () => Math.round((performance.now() - startedAt) * 1000) / 1000;
|
|
37
|
+
}
|
|
38
|
+
// The shape an error KIND may have. Kept character-for-character identical to `ERROR_KIND_PATTERN`
|
|
39
|
+
// in `keiko-server/src/observability/server-logger.ts` and `keiko-model-gateway/src/observability.ts`,
|
|
40
|
+
// so the three reducers cannot drift into accepting different things: an identifier, a taxonomy
|
|
41
|
+
// code, a constructor name — never a sentence.
|
|
42
|
+
//
|
|
43
|
+
// Reading `code`/`name` instead of `message` is only HALF the guard, and this reducer used to ship
|
|
44
|
+
// with the other half missing. Neither property is reserved by the language: a provider client is
|
|
45
|
+
// free to construct `Object.assign(new Error(), { code: "input rejected: <the rejected text>" })`,
|
|
46
|
+
// and an aggregation layer routinely copies a remote `error.code` string straight out of a JSON
|
|
47
|
+
// body. Without a shape gate that sentence — including one echoing the very input that was
|
|
48
|
+
// rejected — was written verbatim into `errorKind`, which is an ENVELOPE field and therefore the
|
|
49
|
+
// one place a value is read before `extra` is redacted.
|
|
50
|
+
const ERROR_KIND_PATTERN = /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/;
|
|
51
|
+
// READING the property is itself a call into foreign code. `code` and `name` are ordinary
|
|
52
|
+
// properties on an object this layer did not build: an accessor, a Proxy `get` trap, or a
|
|
53
|
+
// `Object.defineProperty(error, "code", { get() { throw … } })` runs OUR stack frame. Every call
|
|
54
|
+
// site classifies the cause while it is handling a failure — inside a catch that is mid-recovery,
|
|
55
|
+
// about to rethrow, or accounting a retry — and the event is built BEFORE the write is attempted,
|
|
56
|
+
// so a throw here escapes ahead of any sink guard and replaces a diagnosable store or indexing
|
|
57
|
+
// failure with an accessor failure. An unreadable property is simply an unclassifiable one: it
|
|
58
|
+
// degrades to the next candidate, exactly like a property whose value fails the shape gate.
|
|
59
|
+
function errorKindProperty(error, key) {
|
|
60
|
+
let value;
|
|
61
|
+
try {
|
|
62
|
+
value = error[key];
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
return typeof value === "string" && ERROR_KIND_PATTERN.test(value) ? value : undefined;
|
|
68
|
+
}
|
|
69
|
+
// Classification only: the coded `code`, else the constructor `name`, else "unknown". The
|
|
70
|
+
// message is NEVER read — a thrown error's message routinely carries a path, an endpoint, or a
|
|
71
|
+
// fragment of the content that failed to parse — and neither `code` nor `name` is trusted to be a
|
|
72
|
+
// code just because it is called one: both must pass `ERROR_KIND_PATTERN` first. A `code` that
|
|
73
|
+
// fails the shape falls through to `name`, and a failing `name` falls through to "unknown", so a
|
|
74
|
+
// prose-carrying property degrades to a classification instead of leaking.
|
|
75
|
+
export function knowledgeErrorKind(error) {
|
|
76
|
+
if (typeof error !== "object" || error === null)
|
|
77
|
+
return "unknown";
|
|
78
|
+
return errorKindProperty(error, "code") ?? errorKindProperty(error, "name") ?? "unknown";
|
|
79
|
+
}
|
|
80
|
+
// ─── Writing a line must never become the failure it describes ────────────────
|
|
81
|
+
//
|
|
82
|
+
// Every write in this package goes through this one function, because two rules pull in opposite
|
|
83
|
+
// directions and BOTH hold.
|
|
84
|
+
//
|
|
85
|
+
// 1. A sink failure must never surface to the operation being logged. The sink is foreign code:
|
|
86
|
+
// the server's file sink can hit a full disk, a pod wrapper can be half-wired, a test double
|
|
87
|
+
// can throw outright. Several call sites sit inside a catch block that is mid-recovery
|
|
88
|
+
// (`store.ts` quarantine) or about to rethrow the cause the caller must see (`store.ts`
|
|
89
|
+
// encryption), and others sit inside a retry ladder whose accounting a throw would corrupt
|
|
90
|
+
// (`embedding-batcher.ts`) or a per-document loop (`orchestrator.ts`). Evidence about a
|
|
91
|
+
// failure must never replace the failure.
|
|
92
|
+
// 2. A permanently broken sink must never be invisible. Swallowing every write outright leaves
|
|
93
|
+
// an operator with exactly the picture the six-minute silent indexing run gave them: nothing.
|
|
94
|
+
//
|
|
95
|
+
// Both are satisfied by degrading in place rather than throwing, and reporting the degradation
|
|
96
|
+
// once per sink instance:
|
|
97
|
+
//
|
|
98
|
+
// * the same sink is first offered a minimal, envelope-only notice. The likelier failure is one
|
|
99
|
+
// SHAPE the transport could not take, not a dead transport, and that notice then lands in
|
|
100
|
+
// `server.log` beside the run it belongs to — which is where an operator is already looking.
|
|
101
|
+
// * if even that throws, the transport itself is down, so the report goes out on the one channel
|
|
102
|
+
// that is not the broken one: a single `process.emitWarning`. It is body-free — an op label
|
|
103
|
+
// this package owns as a literal, and a shape-gated error kind — and it is the reason a dead
|
|
104
|
+
// activity log announces itself instead of being inferred from silence.
|
|
105
|
+
//
|
|
106
|
+
// ONCE PER SINK, not once per line: a dead sink during a large indexing run would otherwise emit a
|
|
107
|
+
// warning per chunk and turn a degraded log into a flooded stderr. The report says the log is
|
|
108
|
+
// degraded; the log itself, once repaired, is where the detail lives. Keying a `WeakSet` on the
|
|
109
|
+
// sink instance keeps that per-sink rather than per-process, so a replaced sink is reported again,
|
|
110
|
+
// a test double never inherits another test's state, and nothing is retained.
|
|
111
|
+
const REPORTED_FAILED_SINKS = new WeakSet();
|
|
112
|
+
export function emitKnowledgeLogEvent(sink, event) {
|
|
113
|
+
if (sink === undefined)
|
|
114
|
+
return;
|
|
115
|
+
try {
|
|
116
|
+
sink.write(event);
|
|
117
|
+
}
|
|
118
|
+
catch (cause) {
|
|
119
|
+
reportFailedKnowledgeLogSink(sink, event.op, cause);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function reportFailedKnowledgeLogSink(sink, droppedOp, cause) {
|
|
123
|
+
if (REPORTED_FAILED_SINKS.has(sink))
|
|
124
|
+
return;
|
|
125
|
+
REPORTED_FAILED_SINKS.add(sink);
|
|
126
|
+
const errorKind = knowledgeErrorKind(cause);
|
|
127
|
+
try {
|
|
128
|
+
sink.write({
|
|
129
|
+
level: "error",
|
|
130
|
+
category: "diagnostic",
|
|
131
|
+
op: "knowledge.log.sink-failed",
|
|
132
|
+
errorKind,
|
|
133
|
+
extra: { droppedOp },
|
|
134
|
+
});
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
// The transport refuses this shape too, so it is the transport that is down — fall through to
|
|
139
|
+
// the only channel left.
|
|
140
|
+
}
|
|
141
|
+
warnFailedKnowledgeLogSink(droppedOp, errorKind);
|
|
142
|
+
}
|
|
143
|
+
function warnFailedKnowledgeLogSink(droppedOp, errorKind) {
|
|
144
|
+
try {
|
|
145
|
+
process.emitWarning("Keiko activity log sink is failing; log lines are being dropped.", {
|
|
146
|
+
type: "KeikoActivityLog",
|
|
147
|
+
code: "KEIKO_LOG_SINK_FAILED",
|
|
148
|
+
detail: `op=${droppedOp} errorKind=${errorKind}`,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
// The process warning channel is the last one there is; a report beyond it does not exist.
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -6,6 +6,7 @@ import { type HtmlManualIndexingProgress } from "./manual-pod-progress.js";
|
|
|
6
6
|
import type { AuditEventSink } from "./privacy/index.js";
|
|
7
7
|
import type { ParserRegistry } from "./parsers/index.js";
|
|
8
8
|
import type { KnowledgeStore } from "./store.js";
|
|
9
|
+
import type { KnowledgeLogSink } from "./knowledge-log.js";
|
|
9
10
|
export interface RefreshHtmlManualPodDeps {
|
|
10
11
|
readonly store: KnowledgeStore;
|
|
11
12
|
readonly parserRegistry: ParserRegistry;
|
|
@@ -17,6 +18,7 @@ export interface RefreshHtmlManualPodDeps {
|
|
|
17
18
|
readonly now?: () => number;
|
|
18
19
|
readonly idSource?: () => string;
|
|
19
20
|
readonly auditSink?: AuditEventSink;
|
|
21
|
+
readonly logSink?: KnowledgeLogSink | undefined;
|
|
20
22
|
readonly onCrawlEvent?: (event: ManualCrawlEvent) => void;
|
|
21
23
|
readonly onIndexEvent?: (event: IndexingEvent) => void;
|
|
22
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-pod-refresh.d.ts","sourceRoot":"","sources":["../src/manual-pod-refresh.ts"],"names":[],"mappings":"AAmBA,OAAO,EAOL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAGhF,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAS9F,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"manual-pod-refresh.d.ts","sourceRoot":"","sources":["../src/manual-pod-refresh.ts"],"names":[],"mappings":"AAmBA,OAAO,EAOL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAGhF,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAE1B,OAA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,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAElC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAE9C,QAAQ,CAAC,aAAa,EAAE,0BAA0B,CAAC;IAInD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAyMD,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,0BAA0B,CAAC,CAmDrC"}
|
|
@@ -103,6 +103,7 @@ function runRefreshIndexing(deps, rootPath, crawl) {
|
|
|
103
103
|
embeddingAdapter: deps.embeddingAdapter,
|
|
104
104
|
store: deps.store,
|
|
105
105
|
...(deps.auditSink !== undefined ? { auditSink: deps.auditSink } : {}),
|
|
106
|
+
...(deps.logSink !== undefined ? { logSink: deps.logSink } : {}),
|
|
106
107
|
...(deps.signal !== undefined ? { signal: deps.signal } : {}),
|
|
107
108
|
...(deps.now !== undefined ? { now: deps.now } : {}),
|
|
108
109
|
...(deps.idSource !== undefined ? { idSource: deps.idSource } : {}),
|
|
@@ -6,6 +6,7 @@ import { type HtmlManualIndexingProgress } from "./manual-pod-progress.js";
|
|
|
6
6
|
import type { AuditEventSink } from "./privacy/index.js";
|
|
7
7
|
import type { ParserRegistry } from "./parsers/index.js";
|
|
8
8
|
import type { KnowledgeStore } from "./store.js";
|
|
9
|
+
import type { KnowledgeLogSink } from "./knowledge-log.js";
|
|
9
10
|
export interface CreateHtmlManualPodDeps {
|
|
10
11
|
readonly store: KnowledgeStore;
|
|
11
12
|
readonly parserRegistry: ParserRegistry;
|
|
@@ -19,6 +20,7 @@ export interface CreateHtmlManualPodDeps {
|
|
|
19
20
|
readonly now?: () => number;
|
|
20
21
|
readonly idSource?: () => string;
|
|
21
22
|
readonly auditSink?: AuditEventSink;
|
|
23
|
+
readonly logSink?: KnowledgeLogSink | undefined;
|
|
22
24
|
readonly onCrawlEvent?: (event: ManualCrawlEvent) => void;
|
|
23
25
|
readonly onIndexEvent?: (event: IndexingEvent) => void;
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-pod.d.ts","sourceRoot":"","sources":["../src/manual-pod.ts"],"names":[],"mappings":"AASA,OAAO,EAKL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAKhF,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAO9F,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"manual-pod.d.ts","sourceRoot":"","sources":["../src/manual-pod.ts"],"names":[],"mappings":"AASA,OAAO,EAKL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAKhF,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM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,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAElC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IAEtC,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;CAC/C;AAsHD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,uBAAuB,EAC7B,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,yBAAyB,CAAC,CA4BpC"}
|
|
@@ -94,6 +94,7 @@ function runManualIndexing(deps, rootPath, crawl) {
|
|
|
94
94
|
embeddingAdapter: deps.embeddingAdapter,
|
|
95
95
|
store: deps.store,
|
|
96
96
|
...(deps.auditSink !== undefined ? { auditSink: deps.auditSink } : {}),
|
|
97
|
+
...(deps.logSink !== undefined ? { logSink: deps.logSink } : {}),
|
|
97
98
|
...(deps.signal !== undefined ? { signal: deps.signal } : {}),
|
|
98
99
|
...(deps.now !== undefined ? { now: deps.now } : {}),
|
|
99
100
|
...(deps.idSource !== undefined ? { idSource: deps.idSource } : {}),
|
|
@@ -7,6 +7,7 @@ import { type IndexingEvent, type IndexingResult } from "./indexing/index.js";
|
|
|
7
7
|
import type { ParserRegistry } from "./parsers/index.js";
|
|
8
8
|
import type { AuditEventSink } from "./privacy/index.js";
|
|
9
9
|
import type { KnowledgeStore } from "./store.js";
|
|
10
|
+
import type { KnowledgeLogSink } from "./knowledge-log.js";
|
|
10
11
|
export interface RepositoryPodDeps {
|
|
11
12
|
readonly store: KnowledgeStore;
|
|
12
13
|
readonly capsuleId: KnowledgeCapsuleId;
|
|
@@ -14,6 +15,7 @@ export interface RepositoryPodDeps {
|
|
|
14
15
|
readonly now?: (() => number) | undefined;
|
|
15
16
|
readonly idSource?: (() => string) | undefined;
|
|
16
17
|
readonly auditSink?: AuditEventSink | undefined;
|
|
18
|
+
readonly logSink?: KnowledgeLogSink | undefined;
|
|
17
19
|
}
|
|
18
20
|
export interface RepositoryPodIndexingDeps extends RepositoryPodDeps {
|
|
19
21
|
readonly parserRegistry: ParserRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-pod.d.ts","sourceRoot":"","sources":["../src/repository-pod.ts"],"names":[],"mappings":"AASA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAEtB,KAAK,wBAAwB,EAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAIjE,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAU9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"repository-pod.d.ts","sourceRoot":"","sources":["../src/repository-pod.ts"],"names":[],"mappings":"AASA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAEtB,KAAK,wBAAwB,EAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KA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QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,GAAG,EAAE,sBAAsB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;CACvC;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAoBD,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,6BAA6B,GACnC,mBAAmB,CA8BrB;AAoPD,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,yBAAyB,EAC/B,KAAK,GAAE,yBAA8B,GACpC,OAAO,CAAC,0BAA0B,CAAC,CAsCrC;AAMD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,kBAAkB,EAC7B,QAAQ,EAAE,iBAAiB,GAC1B,SAAS,sBAAsB,EAAE,CAuCnC;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAEjE"}
|
|
@@ -126,6 +126,7 @@ function runRepositoryIndexing(deps, discoveryOptions) {
|
|
|
126
126
|
store: deps.store,
|
|
127
127
|
discoveryOptions,
|
|
128
128
|
...(deps.auditSink === undefined ? {} : { auditSink: deps.auditSink }),
|
|
129
|
+
...(deps.logSink === undefined ? {} : { logSink: deps.logSink }),
|
|
129
130
|
...(deps.signal === undefined ? {} : { signal: deps.signal }),
|
|
130
131
|
...(deps.now === undefined ? {} : { now: deps.now }),
|
|
131
132
|
...(deps.idSource === undefined ? {} : { idSource: deps.idSource }),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DatabaseSync } from "node:sqlite";
|
|
2
|
+
import { type KnowledgeLogSink } from "./knowledge-log.js";
|
|
2
3
|
import { type StoreContentCipher } from "./store-content-cipher.js";
|
|
3
4
|
import type { VectorIndexOptions } from "./retrieval/vector-index.js";
|
|
4
5
|
export interface OpenKnowledgeStoreOptions {
|
|
@@ -6,6 +7,7 @@ export interface OpenKnowledgeStoreOptions {
|
|
|
6
7
|
readonly clock?: () => number;
|
|
7
8
|
readonly protection?: KnowledgeStoreProtectionOptions;
|
|
8
9
|
readonly vectorIndex?: VectorIndexOptions;
|
|
10
|
+
readonly logSink?: KnowledgeLogSink;
|
|
9
11
|
}
|
|
10
12
|
export interface KnowledgeStoreKeyProviderContext {
|
|
11
13
|
readonly dbPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAwB3C,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,+BAA+B,CAAC;IACtD,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAwB3C,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,OA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|
// KnowledgeStoreError-unwrap hook (see unwrapKnowledgeStoreError) resolves the sealed cause underneath.
|
|
22
22
|
import { SqliteQuickCheckError, errorRecord as sharedErrorRecord, isSqliteCorruptionError as sharedIsSqliteCorruptionError, } from "@oscharko-dev/keiko-security/sqlite-corruption";
|
|
23
23
|
import { KnowledgeStoreError } from "./errors.js";
|
|
24
|
+
import { emitKnowledgeLogEvent, knowledgeErrorKind, } from "./knowledge-log.js";
|
|
24
25
|
import { createEncryptedContentCipher, PLAINTEXT_CONTENT_CIPHER, } from "./store-content-cipher.js";
|
|
25
26
|
import { applyStoreContentEncryption } from "./store-content-encryption.js";
|
|
26
27
|
function defaultClock() {
|
|
@@ -301,12 +302,43 @@ function restrictStoreFilePermissions(dbPath) {
|
|
|
301
302
|
chmodIfPresent(`${dbPath}-wal`, FILE_MODE);
|
|
302
303
|
chmodIfPresent(`${dbPath}-shm`, FILE_MODE);
|
|
303
304
|
}
|
|
305
|
+
// Both log sites below sit inside a catch block whose contract is that it introduces NO new
|
|
306
|
+
// failure: the quarantine path is mid-recovery, and the encryption path is about to rethrow the
|
|
307
|
+
// cause the caller must see. An injected sink is foreign code — the server's file sink can hit a
|
|
308
|
+
// full disk, and a test double can throw outright — so an unguarded `write` there would replace a
|
|
309
|
+
// diagnosable store failure with a logging failure. Evidence about a failure must never become
|
|
310
|
+
// the failure.
|
|
311
|
+
//
|
|
312
|
+
// The write is NOT swallowed, though: quarantine is the one data-losing decision this file makes,
|
|
313
|
+
// and a lost line about it that nobody can see is how four releases shipped against silence.
|
|
314
|
+
// `emitKnowledgeLogEvent` owns both halves — it never throws at this call site, AND it reports a
|
|
315
|
+
// failing sink once through the sink itself, or through the process warning channel when the sink
|
|
316
|
+
// is dead. Keeping that logic in `knowledge-log.ts` rather than here is deliberate: the same
|
|
317
|
+
// guarantee is owed by the indexing orchestrator and the embedding batcher, and one implementation
|
|
318
|
+
// cannot drift from itself.
|
|
319
|
+
function writeStoreLog(opts, event) {
|
|
320
|
+
emitKnowledgeLogEvent(opts.logSink, event);
|
|
321
|
+
}
|
|
322
|
+
// Recovering from confirmed SQLite corruption trades the old database for an empty one. That is
|
|
323
|
+
// the correct fail-forward, but it is a DATA-LOSING decision, so it is recorded at `error` even
|
|
324
|
+
// when the reopen succeeds — and separately when the reopen does not.
|
|
325
|
+
function logStoreQuarantine(opts, cause, reopened) {
|
|
326
|
+
writeStoreLog(opts, {
|
|
327
|
+
level: "error",
|
|
328
|
+
category: "diagnostic",
|
|
329
|
+
op: "knowledge.store.quarantined",
|
|
330
|
+
errorKind: knowledgeErrorKind(cause),
|
|
331
|
+
extra: { reopened },
|
|
332
|
+
});
|
|
333
|
+
}
|
|
304
334
|
export function openKnowledgeStore(opts) {
|
|
305
335
|
ensureDirHardened(dirname(opts.dbPath));
|
|
306
336
|
let attempt = tryOpenAndMigrate(opts.dbPath);
|
|
307
337
|
if (attempt.status === "corrupt") {
|
|
308
|
-
|
|
338
|
+
const corruptionCause = attempt.cause;
|
|
339
|
+
quarantineFile(opts.dbPath, corruptionCause);
|
|
309
340
|
attempt = tryOpenAndMigrate(opts.dbPath);
|
|
341
|
+
logStoreQuarantine(opts, corruptionCause, attempt.status === "ok");
|
|
310
342
|
}
|
|
311
343
|
if (attempt.status !== "ok") {
|
|
312
344
|
throw new KnowledgeStoreError(`Failed to open knowledge-capsule store at ${opts.dbPath}.`, {
|
|
@@ -325,6 +357,16 @@ export function openKnowledgeStore(opts) {
|
|
|
325
357
|
}
|
|
326
358
|
catch (cause) {
|
|
327
359
|
db.close();
|
|
360
|
+
// Fail-closed: a wrong key or a missing provider for an already-encrypted store. The throw
|
|
361
|
+
// reaches the caller, but the reason is buried in a cause chain the server surfaces as an
|
|
362
|
+
// opaque failure — the kind belongs in the log where an operator will actually find it.
|
|
363
|
+
writeStoreLog(opts, {
|
|
364
|
+
level: "error",
|
|
365
|
+
category: "diagnostic",
|
|
366
|
+
op: "knowledge.store.encryption-rejected",
|
|
367
|
+
errorKind: knowledgeErrorKind(cause),
|
|
368
|
+
extra: { protectionMode: opts.protection?.mode ?? "plaintext-local-file-permissions" },
|
|
369
|
+
});
|
|
328
370
|
throw cause;
|
|
329
371
|
}
|
|
330
372
|
restrictStoreFilePermissions(opts.dbPath);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_LOCAL_KNOWLEDGE_VERSION: "0.3.
|
|
1
|
+
export declare const KEIKO_LOCAL_KNOWLEDGE_VERSION: "0.3.15";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Package version literal for @oscharko-dev/keiko-local-knowledge. Bumped lockstep with the
|
|
2
2
|
// package.json "version" field so a value-import gives consumers a single source of truth
|
|
3
3
|
// without parsing JSON at runtime.
|
|
4
|
-
export const KEIKO_LOCAL_KNOWLEDGE_VERSION = "0.3.
|
|
4
|
+
export const KEIKO_LOCAL_KNOWLEDGE_VERSION = "0.3.15";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-local-knowledge",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Internal local-knowledge package: on-disk capsule store (node:sqlite + WAL) and capsule/source/CapsuleSet lifecycle CRUD for the Local Knowledge Connector (Epic #189, Issue #193). Not published independently.",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"private": true,
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@oscharko-dev/keiko-contracts": "0.3.
|
|
36
|
-
"@oscharko-dev/keiko-model-gateway": "0.3.
|
|
37
|
-
"@oscharko-dev/keiko-security": "0.3.
|
|
38
|
-
"@oscharko-dev/keiko-workspace": "0.3.
|
|
35
|
+
"@oscharko-dev/keiko-contracts": "0.3.15",
|
|
36
|
+
"@oscharko-dev/keiko-model-gateway": "0.3.15",
|
|
37
|
+
"@oscharko-dev/keiko-security": "0.3.15",
|
|
38
|
+
"@oscharko-dev/keiko-workspace": "0.3.15"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_MEMORY_CAPTURE_VERSION: "0.3.
|
|
1
|
+
export declare const KEIKO_MEMORY_CAPTURE_VERSION: "0.3.15";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KEIKO_MEMORY_CAPTURE_VERSION = "0.3.
|
|
1
|
+
export const KEIKO_MEMORY_CAPTURE_VERSION = "0.3.15";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-memory-capture",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MemoriaViva — Internal memory-capture package: governed capture policy gate that turns raw user text and reviewed workflow outcomes into MemoryProposal / MemoryUpdate / MemoryForget / MemorySupersession envelopes. PRIMARY secret-prevention boundary (defence-in-depth on top of looksLikeSecretShape in keiko-contracts). Pure functions only; no IO, no clock, no randomness (caller supplies nowMs and newId via CaptureContext). ADR-0019 direction rule 3g (capture may depend only on keiko-contracts and keiko-security). Not published independently.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "0.3.
|
|
25
|
-
"@oscharko-dev/keiko-security": "0.3.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "0.3.15",
|
|
25
|
+
"@oscharko-dev/keiko-security": "0.3.15"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_MEMORY_CONSOLIDATION_VERSION: "0.3.
|
|
1
|
+
export declare const KEIKO_MEMORY_CONSOLIDATION_VERSION: "0.3.15";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KEIKO_MEMORY_CONSOLIDATION_VERSION = "0.3.
|
|
1
|
+
export const KEIKO_MEMORY_CONSOLIDATION_VERSION = "0.3.15";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-memory-consolidation",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MemoriaViva — Internal memory-consolidation package: pure-function engine that takes a bounded set of accepted MemoryRecords and returns proposed relationship edges, stale flags, and review items (multi-way duplicates and potential conflicts). The engine NEVER mutates accepted memories: every merge/supersession is routed through a ReviewItem so the caller (#211 MemoriaViva UI or a workflow) materializes the actual MemorySupersession envelope after explicit review. No IO, no clock, no randomness (caller supplies nowMs and id factories via ConsolidationOptions). ADR-0019 direction rule 3h (consolidation may depend only on keiko-contracts and keiko-security). Not published independently.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "0.3.
|
|
25
|
-
"@oscharko-dev/keiko-security": "0.3.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "0.3.15",
|
|
25
|
+
"@oscharko-dev/keiko-security": "0.3.15"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_MEMORY_GOVERNANCE_VERSION: "0.3.
|
|
1
|
+
export declare const KEIKO_MEMORY_GOVERNANCE_VERSION: "0.3.15";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KEIKO_MEMORY_GOVERNANCE_VERSION = "0.3.
|
|
1
|
+
export const KEIKO_MEMORY_GOVERNANCE_VERSION = "0.3.15";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-memory-governance",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MemoriaViva — Internal memory-governance package (Epic #204 child #209): pure-function envelope builders for user-driven corrections, conflict resolution, selective forgetting, expiration, pinning and archiving over Governed Enterprise Memory Vault records. Every public function returns a contracts-validated operation envelope (MemoryProposal / MemorySupersession / MemoryUpdate / MemoryForget / MemoryPin / MemoryUnpin / MemoryArchive) or a StatusTransition; the caller (vault #206, audit #214, MemoriaViva UI #211, retrieval #210) materialises the persistence side. Pinned memories cannot be silently selected for forget. No IO, no clock, no randomness (caller supplies nowMs). ADR-0019 direction rule 3i (governance may depend only on keiko-contracts and keiko-security). Not published independently.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "0.3.
|
|
25
|
-
"@oscharko-dev/keiko-security": "0.3.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "0.3.15",
|
|
25
|
+
"@oscharko-dev/keiko-security": "0.3.15"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_MEMORY_RETRIEVAL_VERSION: "0.3.
|
|
1
|
+
export declare const KEIKO_MEMORY_RETRIEVAL_VERSION: "0.3.15";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Single source of truth for the package version. Pinned as a literal so consumers can
|
|
2
2
|
// import it for telemetry or evidence persistence without parsing package.json at runtime.
|
|
3
3
|
// Bump in lockstep with package.json on every release.
|
|
4
|
-
export const KEIKO_MEMORY_RETRIEVAL_VERSION = "0.3.
|
|
4
|
+
export const KEIKO_MEMORY_RETRIEVAL_VERSION = "0.3.15";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-memory-retrieval",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MemoriaViva — Internal memory-retrieval package (Epic #204 child #210): pure-function scoped retrieval + hybrid ranking + token-budgeted context assembly over Governed Enterprise Memory Vault records. Caller supplies a MemoryQueryPort (no keiko-memory-vault import) so the vault remains injectable and this layer stays pure (no IO, no clock, no randomness; caller supplies nowMs). Ranking combines deterministic lexical relevance, recency decay, provenance confidence, pinned boost, correction boost, and graph proximity into a weighted sum. The context block carries inclusion/omission reasons per memory so downstream callers (Conversation Center #212, workflow agents #213) and audit (#214) can render fully explainable surfaces. Suppression check is duplicated inline (synced with @oscharko-dev/keiko-memory-governance/suppression.ts) to keep the dep graph on contracts+security only. ADR-0019 direction rule 3j enforces this scope. Not published independently.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "0.3.
|
|
25
|
-
"@oscharko-dev/keiko-security": "0.3.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "0.3.15",
|
|
25
|
+
"@oscharko-dev/keiko-security": "0.3.15"
|
|
26
26
|
}
|
|
27
27
|
}
|