semantic-atlas 0.4.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/semantic-atlas/SKILL.md +134 -166
- package/.agents/skills/semantic-atlas/agents/openai.yaml +4 -0
- package/.agents/skills/semantic-atlas/references/observations.md +130 -0
- package/.agents/skills/semantic-atlas/scripts/query-context.mjs +110 -0
- package/.agents/skills/semantic-atlas-maintenance/SKILL.md +93 -0
- package/.agents/skills/semantic-atlas-maintenance/agents/openai.yaml +4 -0
- package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +56 -0
- package/README.md +133 -265
- package/dist/application/map-application.d.ts +24 -0
- package/dist/application/map-application.d.ts.map +1 -0
- package/dist/application/map-application.js +134 -0
- package/dist/application/map-application.js.map +1 -0
- package/dist/cli/bin.js +6 -42
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/observation-commands.d.ts +16 -0
- package/dist/cli/observation-commands.d.ts.map +1 -0
- package/dist/cli/observation-commands.js +118 -0
- package/dist/cli/observation-commands.js.map +1 -0
- package/dist/cli/projection-writer.d.ts +2 -0
- package/dist/cli/projection-writer.d.ts.map +1 -0
- package/dist/cli/projection-writer.js +9 -0
- package/dist/cli/projection-writer.js.map +1 -0
- package/dist/cli/reconciliation-command.d.ts +7 -0
- package/dist/cli/reconciliation-command.d.ts.map +1 -0
- package/dist/cli/reconciliation-command.js +33 -0
- package/dist/cli/reconciliation-command.js.map +1 -0
- package/dist/cli/run-cli.d.ts +21 -0
- package/dist/cli/run-cli.d.ts.map +1 -0
- package/dist/cli/run-cli.js +299 -0
- package/dist/cli/run-cli.js.map +1 -0
- package/dist/contracts/cli.d.ts +166 -1211
- package/dist/contracts/cli.d.ts.map +1 -1
- package/dist/contracts/cli.js +2 -232
- package/dist/contracts/cli.js.map +1 -0
- package/dist/contracts/insights.d.ts +39 -1
- package/dist/contracts/insights.d.ts.map +1 -1
- package/dist/contracts/insights.js +2 -1
- package/dist/contracts/insights.js.map +1 -0
- package/dist/contracts/map.d.ts +154 -0
- package/dist/contracts/map.d.ts.map +1 -0
- package/dist/contracts/map.js +60 -0
- package/dist/contracts/map.js.map +1 -0
- package/dist/contracts/observation.d.ts +414 -0
- package/dist/contracts/observation.d.ts.map +1 -0
- package/dist/contracts/observation.js +125 -0
- package/dist/contracts/observation.js.map +1 -0
- package/dist/contracts/projection.d.ts +7 -0
- package/dist/contracts/projection.d.ts.map +1 -0
- package/dist/contracts/projection.js +2 -0
- package/dist/contracts/projection.js.map +1 -0
- package/dist/contracts/reconciliation.d.ts +40 -0
- package/dist/contracts/reconciliation.d.ts.map +1 -0
- package/dist/contracts/reconciliation.js +2 -0
- package/dist/contracts/reconciliation.js.map +1 -0
- package/dist/index.d.ts +7 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -0
- package/dist/insights/insight-service.d.ts +14 -0
- package/dist/insights/insight-service.d.ts.map +1 -0
- package/dist/insights/insight-service.js +129 -0
- package/dist/insights/insight-service.js.map +1 -0
- package/dist/map/business-graph.d.ts +32 -0
- package/dist/map/business-graph.d.ts.map +1 -0
- package/dist/map/business-graph.js +122 -0
- package/dist/map/business-graph.js.map +1 -0
- package/dist/map/map-document-loader.d.ts +13 -0
- package/dist/map/map-document-loader.d.ts.map +1 -0
- package/dist/map/map-document-loader.js +86 -0
- package/dist/map/map-document-loader.js.map +1 -0
- package/dist/map/map-validator.d.ts +12 -0
- package/dist/map/map-validator.d.ts.map +1 -0
- package/dist/map/map-validator.js +322 -0
- package/dist/map/map-validator.js.map +1 -0
- package/dist/observations/observation-application.d.ts +23 -0
- package/dist/observations/observation-application.d.ts.map +1 -0
- package/dist/observations/observation-application.js +62 -0
- package/dist/observations/observation-application.js.map +1 -0
- package/dist/observations/observation-claim-manager.d.ts +17 -0
- package/dist/observations/observation-claim-manager.d.ts.map +1 -0
- package/dist/observations/observation-claim-manager.js +198 -0
- package/dist/observations/observation-claim-manager.js.map +1 -0
- package/dist/observations/observation-store.d.ts +43 -0
- package/dist/observations/observation-store.d.ts.map +1 -0
- package/dist/observations/observation-store.js +213 -0
- package/dist/observations/observation-store.js.map +1 -0
- package/dist/observations/repository-identity.d.ts +12 -0
- package/dist/observations/repository-identity.d.ts.map +1 -0
- package/dist/observations/repository-identity.js +108 -0
- package/dist/observations/repository-identity.js.map +1 -0
- package/dist/query/context-query-service.d.ts +15 -0
- package/dist/query/context-query-service.d.ts.map +1 -0
- package/dist/query/context-query-service.js +36 -0
- package/dist/query/context-query-service.js.map +1 -0
- package/dist/reconciliation/reconciliation-service.d.ts +10 -0
- package/dist/reconciliation/reconciliation-service.d.ts.map +1 -0
- package/dist/reconciliation/reconciliation-service.js +114 -0
- package/dist/reconciliation/reconciliation-service.js.map +1 -0
- package/dist/rendering/map-projector.d.ts +8 -0
- package/dist/rendering/map-projector.d.ts.map +1 -0
- package/dist/rendering/map-projector.js +386 -0
- package/dist/rendering/map-projector.js.map +1 -0
- package/dist/setup/managed-skill-installer.d.ts +60 -0
- package/dist/setup/managed-skill-installer.d.ts.map +1 -0
- package/dist/setup/managed-skill-installer.js +293 -0
- package/dist/setup/managed-skill-installer.js.map +1 -0
- package/dist/setup/package-identity.d.ts +6 -0
- package/dist/setup/package-identity.d.ts.map +1 -0
- package/dist/setup/package-identity.js +16 -0
- package/dist/setup/package-identity.js.map +1 -0
- package/dist/setup/package-upgrader.d.ts +10 -22
- package/dist/setup/package-upgrader.d.ts.map +1 -1
- package/dist/setup/package-upgrader.js +60 -76
- package/dist/setup/package-upgrader.js.map +1 -0
- package/docs/architecture.md +426 -0
- package/docs/evaluation.md +220 -174
- package/docs/index.md +27 -45
- package/docs/map-format.md +225 -0
- package/docs/observations.md +167 -0
- package/docs/product-contract.md +282 -165
- package/examples/commerce.yaml +204 -0
- package/package.json +31 -32
- package/.agents/skills/semantic-atlas/references/graph-patch.md +0 -190
- package/.agents/skills/semantic-atlas/references/product-feedback.md +0 -34
- package/.agents/skills/semantic-atlas/references/result-routing.md +0 -104
- package/.agents/skills/semantic-atlas/references/snapshot-bootstrap.md +0 -42
- package/.agents/skills/semantic-atlas-insights/SKILL.md +0 -55
- package/README.zh-CN.md +0 -296
- package/dist/business-flow/business-flow-derivation-service.d.ts +0 -11
- package/dist/business-flow/business-flow-derivation-service.d.ts.map +0 -1
- package/dist/business-flow/business-flow-derivation-service.js +0 -151
- package/dist/business-flow/business-flow-draft.d.ts +0 -16
- package/dist/business-flow/business-flow-draft.d.ts.map +0 -1
- package/dist/business-flow/business-flow-draft.js +0 -150
- package/dist/business-flow/framework-business-strategy.d.ts +0 -7
- package/dist/business-flow/framework-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/framework-business-strategy.js +0 -1
- package/dist/business-flow/strategies/bullmq-business-strategy.d.ts +0 -10
- package/dist/business-flow/strategies/bullmq-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/bullmq-business-strategy.js +0 -79
- package/dist/business-flow/strategies/called-operation-derivation.d.ts +0 -13
- package/dist/business-flow/strategies/called-operation-derivation.d.ts.map +0 -1
- package/dist/business-flow/strategies/called-operation-derivation.js +0 -32
- package/dist/business-flow/strategies/graphql-business-strategy.d.ts +0 -8
- package/dist/business-flow/strategies/graphql-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/graphql-business-strategy.js +0 -65
- package/dist/business-flow/strategies/nestjs-business-strategy.d.ts +0 -8
- package/dist/business-flow/strategies/nestjs-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/nestjs-business-strategy.js +0 -72
- package/dist/business-flow/strategies/strategy-helpers.d.ts +0 -32
- package/dist/business-flow/strategies/strategy-helpers.d.ts.map +0 -1
- package/dist/business-flow/strategies/strategy-helpers.js +0 -49
- package/dist/business-flow/strategies/typeorm-business-strategy.d.ts +0 -10
- package/dist/business-flow/strategies/typeorm-business-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/typeorm-business-strategy.js +0 -136
- package/dist/business-flow/strategies/verified-invariant-strategy.d.ts +0 -5
- package/dist/business-flow/strategies/verified-invariant-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/verified-invariant-strategy.js +0 -38
- package/dist/business-flow/strategies/verified-test-strategy.d.ts +0 -5
- package/dist/business-flow/strategies/verified-test-strategy.d.ts.map +0 -1
- package/dist/business-flow/strategies/verified-test-strategy.js +0 -26
- package/dist/business-flow/structural-flow-catalog.d.ts +0 -21
- package/dist/business-flow/structural-flow-catalog.d.ts.map +0 -1
- package/dist/business-flow/structural-flow-catalog.js +0 -125
- package/dist/business-flow/types.d.ts +0 -51
- package/dist/business-flow/types.d.ts.map +0 -1
- package/dist/business-flow/types.js +0 -1
- package/dist/cli/argument-parser.d.ts +0 -3
- package/dist/cli/argument-parser.d.ts.map +0 -1
- package/dist/cli/argument-parser.js +0 -200
- package/dist/cli/cli-application.d.ts +0 -39
- package/dist/cli/cli-application.d.ts.map +0 -1
- package/dist/cli/cli-application.js +0 -571
- package/dist/cli/cli-error.d.ts +0 -12
- package/dist/cli/cli-error.d.ts.map +0 -1
- package/dist/cli/cli-error.js +0 -44
- package/dist/cli/cli-presenter.d.ts +0 -14
- package/dist/cli/cli-presenter.d.ts.map +0 -1
- package/dist/cli/cli-presenter.js +0 -36
- package/dist/cli/insights-cli.d.ts +0 -6
- package/dist/cli/insights-cli.d.ts.map +0 -1
- package/dist/cli/insights-cli.js +0 -236
- package/dist/cli/main.d.ts +0 -3
- package/dist/cli/main.d.ts.map +0 -1
- package/dist/cli/main.js +0 -137
- package/dist/cli/standalone-cli.d.ts +0 -3
- package/dist/cli/standalone-cli.d.ts.map +0 -1
- package/dist/cli/standalone-cli.js +0 -104
- package/dist/cli/types.d.ts +0 -49
- package/dist/cli/types.d.ts.map +0 -1
- package/dist/cli/types.js +0 -1
- package/dist/cli/web-cli.d.ts +0 -9
- package/dist/cli/web-cli.d.ts.map +0 -1
- package/dist/cli/web-cli.js +0 -134
- package/dist/contracts/graph.d.ts +0 -266
- package/dist/contracts/graph.d.ts.map +0 -1
- package/dist/contracts/graph.js +0 -182
- package/dist/contracts/identifiers.d.ts +0 -4
- package/dist/contracts/identifiers.d.ts.map +0 -1
- package/dist/contracts/identifiers.js +0 -7
- package/dist/contracts/public-contracts.d.ts +0 -5
- package/dist/contracts/public-contracts.d.ts.map +0 -1
- package/dist/contracts/public-contracts.js +0 -4
- package/dist/evaluation/comparison.d.ts +0 -30
- package/dist/evaluation/comparison.d.ts.map +0 -1
- package/dist/evaluation/comparison.js +0 -108
- package/dist/evaluation/contracts.d.ts +0 -301
- package/dist/evaluation/contracts.d.ts.map +0 -1
- package/dist/evaluation/contracts.js +0 -413
- package/dist/graph/graph-store.d.ts +0 -55
- package/dist/graph/graph-store.d.ts.map +0 -1
- package/dist/graph/graph-store.js +0 -912
- package/dist/graph/types.d.ts +0 -189
- package/dist/graph/types.d.ts.map +0 -1
- package/dist/graph/types.js +0 -1
- package/dist/insights/contracts.d.ts +0 -266
- package/dist/insights/contracts.d.ts.map +0 -1
- package/dist/insights/contracts.js +0 -124
- package/dist/insights/insights-store.d.ts +0 -73
- package/dist/insights/insights-store.d.ts.map +0 -1
- package/dist/insights/insights-store.js +0 -246
- package/dist/knowledge/business-knowledge-service.d.ts +0 -24
- package/dist/knowledge/business-knowledge-service.d.ts.map +0 -1
- package/dist/knowledge/business-knowledge-service.js +0 -200
- package/dist/knowledge/graph-patch-conflict-error.d.ts +0 -8
- package/dist/knowledge/graph-patch-conflict-error.d.ts.map +0 -1
- package/dist/knowledge/graph-patch-conflict-error.js +0 -12
- package/dist/knowledge/structural-target-binding.d.ts +0 -14
- package/dist/knowledge/structural-target-binding.d.ts.map +0 -1
- package/dist/knowledge/structural-target-binding.js +0 -11
- package/dist/package-metadata.d.ts +0 -2
- package/dist/package-metadata.d.ts.map +0 -1
- package/dist/package-metadata.js +0 -9
- package/dist/repository/git-command.d.ts +0 -3
- package/dist/repository/git-command.d.ts.map +0 -1
- package/dist/repository/git-command.js +0 -25
- package/dist/repository/repository-inspector.d.ts +0 -8
- package/dist/repository/repository-inspector.d.ts.map +0 -1
- package/dist/repository/repository-inspector.js +0 -97
- package/dist/repository/repository-language-support.d.ts +0 -14
- package/dist/repository/repository-language-support.d.ts.map +0 -1
- package/dist/repository/repository-language-support.js +0 -64
- package/dist/repository/types.d.ts +0 -9
- package/dist/repository/types.d.ts.map +0 -1
- package/dist/repository/types.js +0 -1
- package/dist/runtime/sqlite-compatibility-process.d.ts +0 -8
- package/dist/runtime/sqlite-compatibility-process.d.ts.map +0 -1
- package/dist/runtime/sqlite-compatibility-process.js +0 -20
- package/dist/setup/skill-installer.d.ts +0 -20
- package/dist/setup/skill-installer.d.ts.map +0 -1
- package/dist/setup/skill-installer.js +0 -187
- package/dist/snapshots/repository-snapshot.d.ts +0 -4
- package/dist/snapshots/repository-snapshot.d.ts.map +0 -1
- package/dist/snapshots/repository-snapshot.js +0 -119
- package/dist/snapshots/types.d.ts +0 -30
- package/dist/snapshots/types.d.ts.map +0 -1
- package/dist/snapshots/types.js +0 -1
- package/dist/storage/atlas-database.d.ts +0 -25
- package/dist/storage/atlas-database.d.ts.map +0 -1
- package/dist/storage/atlas-database.js +0 -483
- package/dist/storage/snapshot-store.d.ts +0 -19
- package/dist/storage/snapshot-store.d.ts.map +0 -1
- package/dist/storage/snapshot-store.js +0 -74
- package/dist/structural-backend/codegraph-backend.d.ts +0 -57
- package/dist/structural-backend/codegraph-backend.d.ts.map +0 -1
- package/dist/structural-backend/codegraph-backend.js +0 -1230
- package/dist/structural-backend/codegraph-worker-client.d.ts +0 -5
- package/dist/structural-backend/codegraph-worker-client.d.ts.map +0 -1
- package/dist/structural-backend/codegraph-worker-client.js +0 -118
- package/dist/structural-backend/codegraph-worker-protocol.d.ts +0 -35
- package/dist/structural-backend/codegraph-worker-protocol.d.ts.map +0 -1
- package/dist/structural-backend/codegraph-worker-protocol.js +0 -1
- package/dist/structural-backend/codegraph-worker.d.ts +0 -2
- package/dist/structural-backend/codegraph-worker.d.ts.map +0 -1
- package/dist/structural-backend/codegraph-worker.js +0 -131
- package/dist/structural-backend/process-instance.d.ts +0 -18
- package/dist/structural-backend/process-instance.d.ts.map +0 -1
- package/dist/structural-backend/process-instance.js +0 -207
- package/dist/structural-backend/structural-fact-changes.d.ts +0 -7
- package/dist/structural-backend/structural-fact-changes.d.ts.map +0 -1
- package/dist/structural-backend/structural-fact-changes.js +0 -78
- package/dist/structural-backend/structural-projection-bootstrapper.d.ts +0 -10
- package/dist/structural-backend/structural-projection-bootstrapper.d.ts.map +0 -1
- package/dist/structural-backend/structural-projection-bootstrapper.js +0 -295
- package/dist/structural-backend/structural-publication.d.ts +0 -13
- package/dist/structural-backend/structural-publication.d.ts.map +0 -1
- package/dist/structural-backend/structural-publication.js +0 -255
- package/dist/structural-backend/structural-write-lock.d.ts +0 -8
- package/dist/structural-backend/structural-write-lock.d.ts.map +0 -1
- package/dist/structural-backend/structural-write-lock.js +0 -415
- package/dist/structural-backend/types.d.ts +0 -144
- package/dist/structural-backend/types.d.ts.map +0 -1
- package/dist/structural-backend/types.js +0 -11
- package/dist/web/application/atlas-read-service.d.ts +0 -27
- package/dist/web/application/atlas-read-service.d.ts.map +0 -1
- package/dist/web/application/atlas-read-service.js +0 -216
- package/dist/web/application/primary-repository-catalog.d.ts +0 -15
- package/dist/web/application/primary-repository-catalog.d.ts.map +0 -1
- package/dist/web/application/primary-repository-catalog.js +0 -202
- package/dist/web/application/types.d.ts +0 -41
- package/dist/web/application/types.d.ts.map +0 -1
- package/dist/web/application/types.js +0 -1
- package/dist/web/server/api-router.d.ts +0 -4
- package/dist/web/server/api-router.d.ts.map +0 -1
- package/dist/web/server/api-router.js +0 -151
- package/dist/web/server/local-web-server.d.ts +0 -12
- package/dist/web/server/local-web-server.d.ts.map +0 -1
- package/dist/web/server/local-web-server.js +0 -100
- package/dist/web-client/assets/index-DneaErDj.css +0 -1
- package/dist/web-client/assets/index-cze_4vtt.js +0 -2
- package/dist/web-client/assets/index-cze_4vtt.js.map +0 -1
- package/dist/web-client/index.html +0 -61
- package/dist/world/business-map-projector.d.ts +0 -14
- package/dist/world/business-map-projector.d.ts.map +0 -1
- package/dist/world/business-map-projector.js +0 -178
- package/dist/world/types.d.ts +0 -77
- package/dist/world/types.d.ts.map +0 -1
- package/dist/world/types.js +0 -1
- package/dist/world/world-graph-query.d.ts +0 -30
- package/dist/world/world-graph-query.d.ts.map +0 -1
- package/dist/world/world-graph-query.js +0 -252
- package/dist/world/world-model-service.d.ts +0 -21
- package/dist/world/world-model-service.d.ts.map +0 -1
- package/dist/world/world-model-service.js +0 -219
- package/dist/world/world-snapshot-store.d.ts +0 -41
- package/dist/world/world-snapshot-store.d.ts.map +0 -1
- package/dist/world/world-snapshot-store.js +0 -581
- package/docs/README.md +0 -30
- package/docs/architecture/codegraph-backend.md +0 -190
- package/docs/architecture/continuous-business-learning.md +0 -240
- package/docs/architecture/web-viewer.md +0 -225
- package/docs/contracts/cli-v1.md +0 -179
- package/docs/contracts/graph-model.md +0 -106
- package/docs/contracts/graph-patch-v1.md +0 -105
- package/docs/contracts/http-api-v1.md +0 -155
- package/docs/contracts/insights-v1.md +0 -84
- package/docs/log.md +0 -159
- package/docs/mindmaps/semantic-atlas-overview.drawio +0 -255
- package/docs/mindmaps/semantic-atlas-overview.png +0 -0
- package/docs/mindmaps/semantic-atlas-overview.zh-CN.drawio +0 -255
- package/docs/mindmaps/semantic-atlas-overview.zh-CN.png +0 -0
- package/schemas/cli-envelope-v1.schema.json +0 -1244
- package/schemas/evaluation-plan-v1.schema.json +0 -211
- package/schemas/evaluation-run-v1.schema.json +0 -659
- package/schemas/graph-patch-v1.schema.json +0 -392
- package/schemas/insights-envelope-v1.schema.json +0 -428
package/dist/graph/types.d.ts
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import type { z } from "zod";
|
|
2
|
-
import type { assertionCertaintySchema, businessNodeKindSchema, businessRelationTypeSchema, evidenceSchema, knowledgeValiditySchema, sourceRangeSchema, structuralNodeKindSchema, structuralRelationTypeSchema, structuralSupportSchema } from "../contracts/graph.js";
|
|
3
|
-
export type StructuralNodeKind = z.infer<typeof structuralNodeKindSchema>;
|
|
4
|
-
export type BusinessNodeKind = z.infer<typeof businessNodeKindSchema>;
|
|
5
|
-
export type StructuralRelationType = z.infer<typeof structuralRelationTypeSchema>;
|
|
6
|
-
export type BusinessRelationType = z.infer<typeof businessRelationTypeSchema>;
|
|
7
|
-
export type AssertionCertainty = z.infer<typeof assertionCertaintySchema>;
|
|
8
|
-
export type KnowledgeValidity = z.infer<typeof knowledgeValiditySchema>;
|
|
9
|
-
export type SourceRange = z.infer<typeof sourceRangeSchema>;
|
|
10
|
-
export type Evidence = z.infer<typeof evidenceSchema>;
|
|
11
|
-
type StructuralSupport = z.infer<typeof structuralSupportSchema>;
|
|
12
|
-
export interface GraphSourceLocation {
|
|
13
|
-
readonly file: string;
|
|
14
|
-
readonly range: SourceRange;
|
|
15
|
-
readonly contentHash: string;
|
|
16
|
-
}
|
|
17
|
-
export interface StructuralNodeInput {
|
|
18
|
-
readonly id: string;
|
|
19
|
-
readonly kind: Exclude<StructuralNodeKind, "UnknownBoundary">;
|
|
20
|
-
readonly label: string;
|
|
21
|
-
readonly locations: readonly GraphSourceLocation[];
|
|
22
|
-
}
|
|
23
|
-
export interface UnknownBoundaryInput {
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly kind: "UnknownBoundary";
|
|
26
|
-
readonly label: string;
|
|
27
|
-
readonly reason: string;
|
|
28
|
-
readonly location: GraphSourceLocation;
|
|
29
|
-
readonly candidates: readonly string[];
|
|
30
|
-
}
|
|
31
|
-
export type StructuralGraphNodeInput = StructuralNodeInput | UnknownBoundaryInput;
|
|
32
|
-
export interface BusinessNodeInput {
|
|
33
|
-
readonly key: string;
|
|
34
|
-
readonly kind: BusinessNodeKind;
|
|
35
|
-
readonly label: string;
|
|
36
|
-
readonly summary: string;
|
|
37
|
-
readonly aliases: readonly string[];
|
|
38
|
-
readonly certainty: AssertionCertainty;
|
|
39
|
-
readonly evidence: readonly Evidence[];
|
|
40
|
-
}
|
|
41
|
-
export interface StructuralNodeReference {
|
|
42
|
-
readonly domain: "structural";
|
|
43
|
-
readonly id: string;
|
|
44
|
-
}
|
|
45
|
-
export interface BusinessNodeReference {
|
|
46
|
-
readonly domain: "business";
|
|
47
|
-
readonly key: string;
|
|
48
|
-
}
|
|
49
|
-
export type GraphNodeReference = StructuralNodeReference | BusinessNodeReference;
|
|
50
|
-
export interface StructuralRelationInput {
|
|
51
|
-
readonly from: string;
|
|
52
|
-
readonly type: StructuralRelationType;
|
|
53
|
-
readonly to: string;
|
|
54
|
-
}
|
|
55
|
-
export interface BusinessRelationSelector {
|
|
56
|
-
readonly from: BusinessNodeReference;
|
|
57
|
-
readonly type: BusinessRelationType;
|
|
58
|
-
readonly to: GraphNodeReference;
|
|
59
|
-
}
|
|
60
|
-
export interface BusinessRelationInput extends BusinessRelationSelector {
|
|
61
|
-
readonly certainty: AssertionCertainty;
|
|
62
|
-
readonly evidence: readonly Evidence[];
|
|
63
|
-
}
|
|
64
|
-
export interface BusinessGraphMutation {
|
|
65
|
-
readonly baseSnapshotId: string;
|
|
66
|
-
readonly upsertNodes: readonly BusinessNodeInput[];
|
|
67
|
-
readonly removeNodeKeys: readonly string[];
|
|
68
|
-
readonly upsertRelations: readonly BusinessRelationInput[];
|
|
69
|
-
readonly removeRelations: readonly BusinessRelationSelector[];
|
|
70
|
-
}
|
|
71
|
-
export interface StructuralGraphNode {
|
|
72
|
-
readonly domain: "structural";
|
|
73
|
-
readonly id: string;
|
|
74
|
-
readonly kind: Exclude<StructuralNodeKind, "UnknownBoundary">;
|
|
75
|
-
readonly label: string;
|
|
76
|
-
readonly snapshotId: string;
|
|
77
|
-
readonly validity: KnowledgeValidity;
|
|
78
|
-
readonly locations: readonly GraphSourceLocation[];
|
|
79
|
-
readonly support: StructuralSupport;
|
|
80
|
-
}
|
|
81
|
-
export interface UnknownBoundary {
|
|
82
|
-
readonly domain: "structural";
|
|
83
|
-
readonly id: string;
|
|
84
|
-
readonly kind: "UnknownBoundary";
|
|
85
|
-
readonly label: string;
|
|
86
|
-
readonly snapshotId: string;
|
|
87
|
-
readonly validity: "unknown";
|
|
88
|
-
readonly owner: StructuralNodeReference;
|
|
89
|
-
readonly operation: string;
|
|
90
|
-
readonly reason: string;
|
|
91
|
-
readonly location: GraphSourceLocation;
|
|
92
|
-
readonly candidates: readonly string[];
|
|
93
|
-
readonly support: StructuralSupport;
|
|
94
|
-
}
|
|
95
|
-
export interface BusinessGraphNode {
|
|
96
|
-
readonly domain: "business";
|
|
97
|
-
readonly key: string;
|
|
98
|
-
readonly kind: BusinessNodeKind;
|
|
99
|
-
readonly label: string;
|
|
100
|
-
readonly summary: string;
|
|
101
|
-
readonly aliases: readonly string[];
|
|
102
|
-
readonly certainty: AssertionCertainty;
|
|
103
|
-
readonly validity: KnowledgeValidity;
|
|
104
|
-
readonly evidence: readonly Evidence[];
|
|
105
|
-
readonly baseSnapshotId: string;
|
|
106
|
-
}
|
|
107
|
-
export type GraphNode = StructuralGraphNode | UnknownBoundary | BusinessGraphNode;
|
|
108
|
-
export interface StructuralGraphRelation {
|
|
109
|
-
readonly domain: "structural";
|
|
110
|
-
readonly from: StructuralNodeReference;
|
|
111
|
-
readonly type: StructuralRelationType;
|
|
112
|
-
readonly to: StructuralNodeReference;
|
|
113
|
-
readonly snapshotId: string;
|
|
114
|
-
readonly certainty: null;
|
|
115
|
-
readonly validity: KnowledgeValidity;
|
|
116
|
-
readonly evidence: readonly [];
|
|
117
|
-
readonly support: StructuralSupport;
|
|
118
|
-
}
|
|
119
|
-
export interface BusinessGraphRelation extends BusinessRelationSelector {
|
|
120
|
-
readonly domain: "business";
|
|
121
|
-
readonly baseSnapshotId: string;
|
|
122
|
-
readonly certainty: AssertionCertainty;
|
|
123
|
-
readonly validity: KnowledgeValidity;
|
|
124
|
-
readonly evidence: readonly Evidence[];
|
|
125
|
-
}
|
|
126
|
-
export type GraphRelation = StructuralGraphRelation | BusinessGraphRelation;
|
|
127
|
-
export type TraversalDirection = "incoming" | "outgoing" | "both";
|
|
128
|
-
export interface GraphTraversalOptions {
|
|
129
|
-
readonly snapshotId: string;
|
|
130
|
-
readonly maxDepth?: number;
|
|
131
|
-
readonly direction?: TraversalDirection;
|
|
132
|
-
readonly relationTypes?: readonly (StructuralRelationType | BusinessRelationType)[];
|
|
133
|
-
}
|
|
134
|
-
export interface GraphNeighbor {
|
|
135
|
-
readonly depth: number;
|
|
136
|
-
readonly direction: Exclude<TraversalDirection, "both">;
|
|
137
|
-
readonly relation: GraphRelation;
|
|
138
|
-
readonly node: GraphNode;
|
|
139
|
-
}
|
|
140
|
-
export interface GraphSearchOptions {
|
|
141
|
-
readonly snapshotId: string;
|
|
142
|
-
readonly limit?: number;
|
|
143
|
-
}
|
|
144
|
-
export interface GraphSearchResult<Node extends GraphNode = GraphNode> {
|
|
145
|
-
readonly score: number;
|
|
146
|
-
readonly node: Node;
|
|
147
|
-
}
|
|
148
|
-
export interface BusinessGraphView {
|
|
149
|
-
readonly node: BusinessGraphNode;
|
|
150
|
-
readonly relations: readonly GraphNeighbor[];
|
|
151
|
-
}
|
|
152
|
-
export type BusinessMapRelationType = Exclude<BusinessRelationType, "part_of" | "realized_by" | "verified_by">;
|
|
153
|
-
export interface BusinessMapRelationSummary {
|
|
154
|
-
readonly type: BusinessMapRelationType;
|
|
155
|
-
readonly directCount: number;
|
|
156
|
-
readonly aggregatedCount: number;
|
|
157
|
-
readonly certainty: Readonly<Record<AssertionCertainty, number>>;
|
|
158
|
-
readonly validity: Readonly<Record<KnowledgeValidity, number>>;
|
|
159
|
-
}
|
|
160
|
-
export interface BusinessMapConnection {
|
|
161
|
-
readonly from: BusinessNodeReference;
|
|
162
|
-
readonly to: BusinessNodeReference;
|
|
163
|
-
readonly relations: readonly BusinessMapRelationSummary[];
|
|
164
|
-
}
|
|
165
|
-
export interface BusinessMapRegion {
|
|
166
|
-
readonly node: BusinessGraphNode;
|
|
167
|
-
readonly role: "root" | "child" | "context";
|
|
168
|
-
readonly childCount: number;
|
|
169
|
-
readonly expandable: boolean;
|
|
170
|
-
}
|
|
171
|
-
export interface BusinessMapView {
|
|
172
|
-
readonly focus: BusinessGraphNode | null;
|
|
173
|
-
readonly breadcrumbs: readonly BusinessGraphNode[];
|
|
174
|
-
readonly regions: readonly BusinessMapRegion[];
|
|
175
|
-
readonly connections: readonly BusinessMapConnection[];
|
|
176
|
-
}
|
|
177
|
-
export interface WorldGraphTraversalResult {
|
|
178
|
-
readonly neighbors: readonly GraphNeighbor[];
|
|
179
|
-
readonly unknowns: readonly UnknownBoundary[];
|
|
180
|
-
}
|
|
181
|
-
export type EvidenceOwner = {
|
|
182
|
-
readonly type: "node";
|
|
183
|
-
readonly node: BusinessNodeReference;
|
|
184
|
-
} | {
|
|
185
|
-
readonly type: "relation";
|
|
186
|
-
readonly relation: BusinessRelationSelector;
|
|
187
|
-
};
|
|
188
|
-
export {};
|
|
189
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graph/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,oBAAo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IACA,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;CACtC,GACC;IACA,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;CAC7C,CAAC"}
|
package/dist/graph/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const observedCommandSchema: z.ZodEnum<{
|
|
3
|
-
status: "status";
|
|
4
|
-
index: "index";
|
|
5
|
-
changes: "changes";
|
|
6
|
-
learn: "learn";
|
|
7
|
-
"map.view": "map.view";
|
|
8
|
-
"map.search": "map.search";
|
|
9
|
-
"map.show": "map.show";
|
|
10
|
-
"code.search": "code.search";
|
|
11
|
-
"feedback.report": "feedback.report";
|
|
12
|
-
}>;
|
|
13
|
-
export declare const commandOutcomeSchema: z.ZodEnum<{
|
|
14
|
-
error: "error";
|
|
15
|
-
ok: "ok";
|
|
16
|
-
partial: "partial";
|
|
17
|
-
}>;
|
|
18
|
-
export declare const feedbackKindSchema: z.ZodEnum<{
|
|
19
|
-
problem: "problem";
|
|
20
|
-
suggestion: "suggestion";
|
|
21
|
-
}>;
|
|
22
|
-
export declare const feedbackCategorySchema: z.ZodEnum<{
|
|
23
|
-
"misleading-result": "misleading-result";
|
|
24
|
-
"missing-knowledge": "missing-knowledge";
|
|
25
|
-
"workflow-friction": "workflow-friction";
|
|
26
|
-
performance: "performance";
|
|
27
|
-
"cli-error": "cli-error";
|
|
28
|
-
"skill-instruction": "skill-instruction";
|
|
29
|
-
}>;
|
|
30
|
-
export declare const feedbackImpactSchema: z.ZodEnum<{
|
|
31
|
-
minor: "minor";
|
|
32
|
-
blocked: "blocked";
|
|
33
|
-
slowed: "slowed";
|
|
34
|
-
}>;
|
|
35
|
-
export declare const feedbackStatusSchema: z.ZodEnum<{
|
|
36
|
-
new: "new";
|
|
37
|
-
triaged: "triaged";
|
|
38
|
-
resolved: "resolved";
|
|
39
|
-
dismissed: "dismissed";
|
|
40
|
-
}>;
|
|
41
|
-
export declare const insightsPeriodSchema: z.ZodEnum<{
|
|
42
|
-
today: "today";
|
|
43
|
-
yesterday: "yesterday";
|
|
44
|
-
"7d": "7d";
|
|
45
|
-
"30d": "30d";
|
|
46
|
-
all: "all";
|
|
47
|
-
}>;
|
|
48
|
-
export declare const feedbackReportInputSchema: z.ZodObject<{
|
|
49
|
-
kind: z.ZodEnum<{
|
|
50
|
-
problem: "problem";
|
|
51
|
-
suggestion: "suggestion";
|
|
52
|
-
}>;
|
|
53
|
-
category: z.ZodEnum<{
|
|
54
|
-
"misleading-result": "misleading-result";
|
|
55
|
-
"missing-knowledge": "missing-knowledge";
|
|
56
|
-
"workflow-friction": "workflow-friction";
|
|
57
|
-
performance: "performance";
|
|
58
|
-
"cli-error": "cli-error";
|
|
59
|
-
"skill-instruction": "skill-instruction";
|
|
60
|
-
}>;
|
|
61
|
-
impact: z.ZodEnum<{
|
|
62
|
-
minor: "minor";
|
|
63
|
-
blocked: "blocked";
|
|
64
|
-
slowed: "slowed";
|
|
65
|
-
}>;
|
|
66
|
-
observed: z.ZodString;
|
|
67
|
-
expected: z.ZodString;
|
|
68
|
-
suggestion: z.ZodOptional<z.ZodString>;
|
|
69
|
-
sourceConfirmed: z.ZodBoolean;
|
|
70
|
-
}, z.core.$strict>;
|
|
71
|
-
export declare const feedbackReportUpdateInputSchema: z.ZodObject<{
|
|
72
|
-
id: z.ZodString;
|
|
73
|
-
status: z.ZodEnum<{
|
|
74
|
-
triaged: "triaged";
|
|
75
|
-
resolved: "resolved";
|
|
76
|
-
dismissed: "dismissed";
|
|
77
|
-
}>;
|
|
78
|
-
note: z.ZodString;
|
|
79
|
-
}, z.core.$strict>;
|
|
80
|
-
export type ObservedCommand = z.infer<typeof observedCommandSchema>;
|
|
81
|
-
export type CommandOutcome = z.infer<typeof commandOutcomeSchema>;
|
|
82
|
-
export type FeedbackReportInput = z.infer<typeof feedbackReportInputSchema>;
|
|
83
|
-
export type FeedbackStatus = z.infer<typeof feedbackStatusSchema>;
|
|
84
|
-
export type InsightsPeriod = z.infer<typeof insightsPeriodSchema>;
|
|
85
|
-
export type FeedbackReportUpdateInput = z.infer<typeof feedbackReportUpdateInputSchema>;
|
|
86
|
-
export declare const feedbackReportResultSchema: z.ZodObject<{
|
|
87
|
-
id: z.ZodString;
|
|
88
|
-
kind: z.ZodEnum<{
|
|
89
|
-
problem: "problem";
|
|
90
|
-
suggestion: "suggestion";
|
|
91
|
-
}>;
|
|
92
|
-
category: z.ZodEnum<{
|
|
93
|
-
"misleading-result": "misleading-result";
|
|
94
|
-
"missing-knowledge": "missing-knowledge";
|
|
95
|
-
"workflow-friction": "workflow-friction";
|
|
96
|
-
performance: "performance";
|
|
97
|
-
"cli-error": "cli-error";
|
|
98
|
-
"skill-instruction": "skill-instruction";
|
|
99
|
-
}>;
|
|
100
|
-
impact: z.ZodEnum<{
|
|
101
|
-
minor: "minor";
|
|
102
|
-
blocked: "blocked";
|
|
103
|
-
slowed: "slowed";
|
|
104
|
-
}>;
|
|
105
|
-
sourceConfirmed: z.ZodBoolean;
|
|
106
|
-
status: z.ZodEnum<{
|
|
107
|
-
new: "new";
|
|
108
|
-
triaged: "triaged";
|
|
109
|
-
resolved: "resolved";
|
|
110
|
-
dismissed: "dismissed";
|
|
111
|
-
}>;
|
|
112
|
-
contextEventCount: z.ZodNumber;
|
|
113
|
-
createdAt: z.ZodISODateTime;
|
|
114
|
-
}, z.core.$strict>;
|
|
115
|
-
export declare const insightsEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
116
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
117
|
-
status: z.ZodLiteral<"ok">;
|
|
118
|
-
data: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
119
|
-
command: z.ZodLiteral<"insights.summary">;
|
|
120
|
-
range: z.ZodObject<{
|
|
121
|
-
from: z.ZodISODateTime;
|
|
122
|
-
to: z.ZodISODateTime;
|
|
123
|
-
}, z.core.$strict>;
|
|
124
|
-
summary: z.ZodObject<{
|
|
125
|
-
commands: z.ZodObject<{
|
|
126
|
-
total: z.ZodNumber;
|
|
127
|
-
outcomes: z.ZodObject<{
|
|
128
|
-
ok: z.ZodNumber;
|
|
129
|
-
partial: z.ZodNumber;
|
|
130
|
-
error: z.ZodNumber;
|
|
131
|
-
}, z.core.$strict>;
|
|
132
|
-
byCommand: z.ZodArray<z.ZodObject<{
|
|
133
|
-
command: z.ZodEnum<{
|
|
134
|
-
status: "status";
|
|
135
|
-
index: "index";
|
|
136
|
-
changes: "changes";
|
|
137
|
-
learn: "learn";
|
|
138
|
-
"map.view": "map.view";
|
|
139
|
-
"map.search": "map.search";
|
|
140
|
-
"map.show": "map.show";
|
|
141
|
-
"code.search": "code.search";
|
|
142
|
-
"feedback.report": "feedback.report";
|
|
143
|
-
}>;
|
|
144
|
-
count: z.ZodNumber;
|
|
145
|
-
}, z.core.$strict>>;
|
|
146
|
-
warningCodes: z.ZodArray<z.ZodObject<{
|
|
147
|
-
code: z.ZodString;
|
|
148
|
-
count: z.ZodNumber;
|
|
149
|
-
}, z.core.$strict>>;
|
|
150
|
-
}, z.core.$strict>;
|
|
151
|
-
feedback: z.ZodObject<{
|
|
152
|
-
total: z.ZodNumber;
|
|
153
|
-
byCategory: z.ZodArray<z.ZodObject<{
|
|
154
|
-
category: z.ZodEnum<{
|
|
155
|
-
"misleading-result": "misleading-result";
|
|
156
|
-
"missing-knowledge": "missing-knowledge";
|
|
157
|
-
"workflow-friction": "workflow-friction";
|
|
158
|
-
performance: "performance";
|
|
159
|
-
"cli-error": "cli-error";
|
|
160
|
-
"skill-instruction": "skill-instruction";
|
|
161
|
-
}>;
|
|
162
|
-
count: z.ZodNumber;
|
|
163
|
-
}, z.core.$strict>>;
|
|
164
|
-
}, z.core.$strict>;
|
|
165
|
-
}, z.core.$strict>;
|
|
166
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
167
|
-
command: z.ZodLiteral<"insights.feedback">;
|
|
168
|
-
range: z.ZodObject<{
|
|
169
|
-
from: z.ZodISODateTime;
|
|
170
|
-
to: z.ZodISODateTime;
|
|
171
|
-
}, z.core.$strict>;
|
|
172
|
-
reports: z.ZodArray<z.ZodObject<{
|
|
173
|
-
kind: z.ZodEnum<{
|
|
174
|
-
problem: "problem";
|
|
175
|
-
suggestion: "suggestion";
|
|
176
|
-
}>;
|
|
177
|
-
category: z.ZodEnum<{
|
|
178
|
-
"misleading-result": "misleading-result";
|
|
179
|
-
"missing-knowledge": "missing-knowledge";
|
|
180
|
-
"workflow-friction": "workflow-friction";
|
|
181
|
-
performance: "performance";
|
|
182
|
-
"cli-error": "cli-error";
|
|
183
|
-
"skill-instruction": "skill-instruction";
|
|
184
|
-
}>;
|
|
185
|
-
impact: z.ZodEnum<{
|
|
186
|
-
minor: "minor";
|
|
187
|
-
blocked: "blocked";
|
|
188
|
-
slowed: "slowed";
|
|
189
|
-
}>;
|
|
190
|
-
observed: z.ZodString;
|
|
191
|
-
expected: z.ZodString;
|
|
192
|
-
suggestion: z.ZodOptional<z.ZodString>;
|
|
193
|
-
sourceConfirmed: z.ZodBoolean;
|
|
194
|
-
id: z.ZodString;
|
|
195
|
-
repositoryId: z.ZodString;
|
|
196
|
-
snapshotId: z.ZodNullable<z.ZodString>;
|
|
197
|
-
contextEventIds: z.ZodArray<z.ZodString>;
|
|
198
|
-
status: z.ZodEnum<{
|
|
199
|
-
new: "new";
|
|
200
|
-
triaged: "triaged";
|
|
201
|
-
resolved: "resolved";
|
|
202
|
-
dismissed: "dismissed";
|
|
203
|
-
}>;
|
|
204
|
-
note: z.ZodNullable<z.ZodString>;
|
|
205
|
-
createdAt: z.ZodISODateTime;
|
|
206
|
-
updatedAt: z.ZodISODateTime;
|
|
207
|
-
}, z.core.$strict>>;
|
|
208
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
209
|
-
command: z.ZodLiteral<"insights.feedback.update">;
|
|
210
|
-
report: z.ZodObject<{
|
|
211
|
-
kind: z.ZodEnum<{
|
|
212
|
-
problem: "problem";
|
|
213
|
-
suggestion: "suggestion";
|
|
214
|
-
}>;
|
|
215
|
-
category: z.ZodEnum<{
|
|
216
|
-
"misleading-result": "misleading-result";
|
|
217
|
-
"missing-knowledge": "missing-knowledge";
|
|
218
|
-
"workflow-friction": "workflow-friction";
|
|
219
|
-
performance: "performance";
|
|
220
|
-
"cli-error": "cli-error";
|
|
221
|
-
"skill-instruction": "skill-instruction";
|
|
222
|
-
}>;
|
|
223
|
-
impact: z.ZodEnum<{
|
|
224
|
-
minor: "minor";
|
|
225
|
-
blocked: "blocked";
|
|
226
|
-
slowed: "slowed";
|
|
227
|
-
}>;
|
|
228
|
-
observed: z.ZodString;
|
|
229
|
-
expected: z.ZodString;
|
|
230
|
-
suggestion: z.ZodOptional<z.ZodString>;
|
|
231
|
-
sourceConfirmed: z.ZodBoolean;
|
|
232
|
-
id: z.ZodString;
|
|
233
|
-
repositoryId: z.ZodString;
|
|
234
|
-
snapshotId: z.ZodNullable<z.ZodString>;
|
|
235
|
-
contextEventIds: z.ZodArray<z.ZodString>;
|
|
236
|
-
status: z.ZodEnum<{
|
|
237
|
-
new: "new";
|
|
238
|
-
triaged: "triaged";
|
|
239
|
-
resolved: "resolved";
|
|
240
|
-
dismissed: "dismissed";
|
|
241
|
-
}>;
|
|
242
|
-
note: z.ZodNullable<z.ZodString>;
|
|
243
|
-
createdAt: z.ZodISODateTime;
|
|
244
|
-
updatedAt: z.ZodISODateTime;
|
|
245
|
-
}, z.core.$strict>;
|
|
246
|
-
}, z.core.$strict>], "command">;
|
|
247
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
248
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
249
|
-
status: z.ZodLiteral<"error">;
|
|
250
|
-
data: z.ZodObject<{
|
|
251
|
-
command: z.ZodNullable<z.ZodEnum<{
|
|
252
|
-
"insights.summary": "insights.summary";
|
|
253
|
-
"insights.feedback": "insights.feedback";
|
|
254
|
-
"insights.feedback.update": "insights.feedback.update";
|
|
255
|
-
}>>;
|
|
256
|
-
error: z.ZodObject<{
|
|
257
|
-
code: z.ZodString;
|
|
258
|
-
message: z.ZodString;
|
|
259
|
-
}, z.core.$strict>;
|
|
260
|
-
}, z.core.$strict>;
|
|
261
|
-
}, z.core.$strict>], "status">;
|
|
262
|
-
export type InsightsEnvelope = z.infer<typeof insightsEnvelopeSchema>;
|
|
263
|
-
export type InsightsSuccessData = Extract<InsightsEnvelope, {
|
|
264
|
-
readonly status: "ok";
|
|
265
|
-
}>["data"];
|
|
266
|
-
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/insights/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;;;;;;;EAUhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;EAAqC,CAAC;AAEvE,eAAO,MAAM,kBAAkB;;;EAAoC,CAAC;AACpE,eAAO,MAAM,sBAAsB;;;;;;;EAOjC,CAAC;AACH,eAAO,MAAM,oBAAoB;;;;EAAyC,CAAC;AAC3E,eAAO,MAAM,oBAAoB;;;;;EAAsD,CAAC;AACxF,eAAO,MAAM,oBAAoB;;;;;;EAAqD,CAAC;AAEvF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;kBAQpC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;kBAI1C,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AA4CxF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBASrC,CAAC;AAmBH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAiBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export const observedCommandSchema = z.enum([
|
|
3
|
-
"status",
|
|
4
|
-
"index",
|
|
5
|
-
"map.view",
|
|
6
|
-
"map.search",
|
|
7
|
-
"map.show",
|
|
8
|
-
"code.search",
|
|
9
|
-
"learn",
|
|
10
|
-
"changes",
|
|
11
|
-
"feedback.report",
|
|
12
|
-
]);
|
|
13
|
-
export const commandOutcomeSchema = z.enum(["ok", "partial", "error"]);
|
|
14
|
-
export const feedbackKindSchema = z.enum(["problem", "suggestion"]);
|
|
15
|
-
export const feedbackCategorySchema = z.enum([
|
|
16
|
-
"misleading-result",
|
|
17
|
-
"missing-knowledge",
|
|
18
|
-
"workflow-friction",
|
|
19
|
-
"performance",
|
|
20
|
-
"cli-error",
|
|
21
|
-
"skill-instruction",
|
|
22
|
-
]);
|
|
23
|
-
export const feedbackImpactSchema = z.enum(["blocked", "slowed", "minor"]);
|
|
24
|
-
export const feedbackStatusSchema = z.enum(["new", "triaged", "resolved", "dismissed"]);
|
|
25
|
-
export const insightsPeriodSchema = z.enum(["today", "yesterday", "7d", "30d", "all"]);
|
|
26
|
-
export const feedbackReportInputSchema = z.strictObject({
|
|
27
|
-
kind: feedbackKindSchema,
|
|
28
|
-
category: feedbackCategorySchema,
|
|
29
|
-
impact: feedbackImpactSchema,
|
|
30
|
-
observed: z.string().trim().min(1).max(4_000),
|
|
31
|
-
expected: z.string().trim().min(1).max(4_000),
|
|
32
|
-
suggestion: z.string().trim().min(1).max(4_000).optional(),
|
|
33
|
-
sourceConfirmed: z.boolean(),
|
|
34
|
-
});
|
|
35
|
-
export const feedbackReportUpdateInputSchema = z.strictObject({
|
|
36
|
-
id: z.string().uuid(),
|
|
37
|
-
status: z.enum(["triaged", "resolved", "dismissed"]),
|
|
38
|
-
note: z.string().trim().min(1).max(4_000),
|
|
39
|
-
});
|
|
40
|
-
const timestampSchema = z.iso.datetime();
|
|
41
|
-
const nonNegativeIntegerSchema = z.number().int().nonnegative();
|
|
42
|
-
const insightRangeSchema = z.strictObject({
|
|
43
|
-
from: timestampSchema,
|
|
44
|
-
to: timestampSchema,
|
|
45
|
-
});
|
|
46
|
-
const feedbackReportSchema = feedbackReportInputSchema.extend({
|
|
47
|
-
id: z.string().uuid(),
|
|
48
|
-
repositoryId: z.string().regex(/^[a-f0-9]{64}$/),
|
|
49
|
-
snapshotId: z.string().regex(/^[a-f0-9]{64}$/).nullable(),
|
|
50
|
-
contextEventIds: z.array(z.string().uuid()),
|
|
51
|
-
status: feedbackStatusSchema,
|
|
52
|
-
note: z.string().nullable(),
|
|
53
|
-
createdAt: timestampSchema,
|
|
54
|
-
updatedAt: timestampSchema,
|
|
55
|
-
});
|
|
56
|
-
const insightsSummarySchema = z.strictObject({
|
|
57
|
-
commands: z.strictObject({
|
|
58
|
-
total: nonNegativeIntegerSchema,
|
|
59
|
-
outcomes: z.strictObject({
|
|
60
|
-
ok: nonNegativeIntegerSchema,
|
|
61
|
-
partial: nonNegativeIntegerSchema,
|
|
62
|
-
error: nonNegativeIntegerSchema,
|
|
63
|
-
}),
|
|
64
|
-
byCommand: z.array(z.strictObject({
|
|
65
|
-
command: observedCommandSchema,
|
|
66
|
-
count: nonNegativeIntegerSchema,
|
|
67
|
-
})),
|
|
68
|
-
warningCodes: z.array(z.strictObject({
|
|
69
|
-
code: z.string().min(1),
|
|
70
|
-
count: nonNegativeIntegerSchema,
|
|
71
|
-
})),
|
|
72
|
-
}),
|
|
73
|
-
feedback: z.strictObject({
|
|
74
|
-
total: nonNegativeIntegerSchema,
|
|
75
|
-
byCategory: z.array(z.strictObject({
|
|
76
|
-
category: feedbackCategorySchema,
|
|
77
|
-
count: nonNegativeIntegerSchema,
|
|
78
|
-
})),
|
|
79
|
-
}),
|
|
80
|
-
});
|
|
81
|
-
export const feedbackReportResultSchema = z.strictObject({
|
|
82
|
-
id: z.string().uuid(),
|
|
83
|
-
kind: feedbackKindSchema,
|
|
84
|
-
category: feedbackCategorySchema,
|
|
85
|
-
impact: feedbackImpactSchema,
|
|
86
|
-
sourceConfirmed: z.boolean(),
|
|
87
|
-
status: feedbackStatusSchema,
|
|
88
|
-
contextEventCount: nonNegativeIntegerSchema,
|
|
89
|
-
createdAt: timestampSchema,
|
|
90
|
-
});
|
|
91
|
-
const insightsSuccessDataSchema = z.discriminatedUnion("command", [
|
|
92
|
-
z.strictObject({
|
|
93
|
-
command: z.literal("insights.summary"),
|
|
94
|
-
range: insightRangeSchema,
|
|
95
|
-
summary: insightsSummarySchema,
|
|
96
|
-
}),
|
|
97
|
-
z.strictObject({
|
|
98
|
-
command: z.literal("insights.feedback"),
|
|
99
|
-
range: insightRangeSchema,
|
|
100
|
-
reports: z.array(feedbackReportSchema),
|
|
101
|
-
}),
|
|
102
|
-
z.strictObject({
|
|
103
|
-
command: z.literal("insights.feedback.update"),
|
|
104
|
-
report: feedbackReportSchema,
|
|
105
|
-
}),
|
|
106
|
-
]);
|
|
107
|
-
export const insightsEnvelopeSchema = z.discriminatedUnion("status", [
|
|
108
|
-
z.strictObject({
|
|
109
|
-
schemaVersion: z.literal(1),
|
|
110
|
-
status: z.literal("ok"),
|
|
111
|
-
data: insightsSuccessDataSchema,
|
|
112
|
-
}),
|
|
113
|
-
z.strictObject({
|
|
114
|
-
schemaVersion: z.literal(1),
|
|
115
|
-
status: z.literal("error"),
|
|
116
|
-
data: z.strictObject({
|
|
117
|
-
command: z.enum(["insights.summary", "insights.feedback", "insights.feedback.update"]).nullable(),
|
|
118
|
-
error: z.strictObject({
|
|
119
|
-
code: z.string().regex(/^[A-Z][A-Z0-9_]*$/),
|
|
120
|
-
message: z.string().min(1),
|
|
121
|
-
}),
|
|
122
|
-
}),
|
|
123
|
-
}),
|
|
124
|
-
]);
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { DatabaseSync as NodeDatabaseSync } from "node:sqlite";
|
|
2
|
-
import { type CommandOutcome, type FeedbackReportInput, type FeedbackStatus, type ObservedCommand } from "./contracts.js";
|
|
3
|
-
export interface CommandObservationInput {
|
|
4
|
-
readonly repositoryId: string;
|
|
5
|
-
readonly command: ObservedCommand;
|
|
6
|
-
readonly outcome: CommandOutcome;
|
|
7
|
-
readonly exitCode: number;
|
|
8
|
-
readonly warningCodes: readonly string[];
|
|
9
|
-
readonly durationMs: number;
|
|
10
|
-
readonly snapshotId: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface CommandObservation extends CommandObservationInput {
|
|
13
|
-
readonly id: string;
|
|
14
|
-
readonly occurredAt: string;
|
|
15
|
-
}
|
|
16
|
-
export interface FeedbackReport extends FeedbackReportInput {
|
|
17
|
-
readonly id: string;
|
|
18
|
-
readonly repositoryId: string;
|
|
19
|
-
readonly snapshotId: string | null;
|
|
20
|
-
readonly contextEventIds: string[];
|
|
21
|
-
readonly status: FeedbackStatus;
|
|
22
|
-
readonly note: string | null;
|
|
23
|
-
readonly createdAt: string;
|
|
24
|
-
readonly updatedAt: string;
|
|
25
|
-
}
|
|
26
|
-
export interface InsightsRange {
|
|
27
|
-
readonly from: string;
|
|
28
|
-
readonly to: string;
|
|
29
|
-
}
|
|
30
|
-
export interface InsightsSummary {
|
|
31
|
-
readonly commands: {
|
|
32
|
-
readonly total: number;
|
|
33
|
-
readonly outcomes: Record<CommandOutcome, number>;
|
|
34
|
-
readonly byCommand: {
|
|
35
|
-
readonly command: ObservedCommand;
|
|
36
|
-
readonly count: number;
|
|
37
|
-
}[];
|
|
38
|
-
readonly warningCodes: {
|
|
39
|
-
readonly code: string;
|
|
40
|
-
readonly count: number;
|
|
41
|
-
}[];
|
|
42
|
-
};
|
|
43
|
-
readonly feedback: {
|
|
44
|
-
readonly total: number;
|
|
45
|
-
readonly byCategory: {
|
|
46
|
-
readonly category: FeedbackReport["category"];
|
|
47
|
-
readonly count: number;
|
|
48
|
-
}[];
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export declare class InsightsStore implements Disposable {
|
|
52
|
-
#private;
|
|
53
|
-
readonly databasePath: string;
|
|
54
|
-
readonly connection: NodeDatabaseSync;
|
|
55
|
-
constructor(databasePath?: string);
|
|
56
|
-
close(): void;
|
|
57
|
-
[Symbol.dispose](): void;
|
|
58
|
-
recordCommand(input: CommandObservationInput): CommandObservation;
|
|
59
|
-
recordFeedback(input: FeedbackReportInput & {
|
|
60
|
-
readonly repositoryId: string;
|
|
61
|
-
readonly snapshotId: string | null;
|
|
62
|
-
}): FeedbackReport;
|
|
63
|
-
listFeedback(range: InsightsRange, status?: FeedbackStatus): FeedbackReport[];
|
|
64
|
-
updateFeedback(input: {
|
|
65
|
-
readonly id: string;
|
|
66
|
-
readonly status: FeedbackStatus;
|
|
67
|
-
readonly note?: string;
|
|
68
|
-
}): FeedbackReport;
|
|
69
|
-
summary(range: InsightsRange): InsightsSummary;
|
|
70
|
-
private recentCommandEventIds;
|
|
71
|
-
private initializeSchema;
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=insights-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-store.d.ts","sourceRoot":"","sources":["../../src/insights/insights-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAQxB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,kBAAmB,SAAQ,uBAAuB;IACjE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IACnC,QAAQ,CAA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