@lucern/sdk 0.2.0-alpha.13 → 0.2.0-alpha.3
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/README.md +112 -621
- package/dist/index.js +3447 -6249
- package/dist/index.js.map +1 -1
- package/dist/{contracts → lucern/contracts/src}/auth-session.contract.d.ts +12 -14
- package/dist/{contracts → lucern/contracts/src}/context-pack.contract.d.ts +58 -56
- package/dist/{contracts → lucern/contracts/src}/lens-filter.contract.d.ts +8 -10
- package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +84 -0
- package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +151 -0
- package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +161 -0
- package/dist/lucern/mcp-server/src/context-pack-policy.d.ts +119 -0
- package/dist/lucern/mcp-server/src/context-pack-schema.d.ts +18 -0
- package/dist/lucern/modules/graph-primitives/src/ontology-matching.d.ts +78 -0
- package/dist/lucern/modules/graph-primitives/src/text-matching.d.ts +53 -0
- package/dist/lucern/packages/client-core/src/beliefs.d.ts +30 -0
- package/dist/lucern/packages/client-core/src/context.d.ts +29 -0
- package/dist/lucern/packages/client-core/src/contradictions.d.ts +11 -0
- package/dist/lucern/packages/client-core/src/edges.d.ts +11 -0
- package/dist/lucern/packages/client-core/src/events.d.ts +9 -0
- package/dist/lucern/packages/client-core/src/evidence.d.ts +21 -0
- package/dist/lucern/packages/client-core/src/graph.d.ts +17 -0
- package/dist/lucern/packages/client-core/src/identity.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/ids.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/ontologies.d.ts +13 -0
- package/dist/lucern/packages/client-core/src/questions.d.ts +39 -0
- package/dist/lucern/packages/client-core/src/search.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/tasks.d.ts +13 -0
- package/dist/lucern/packages/client-core/src/topics.d.ts +17 -0
- package/dist/lucern/packages/client-core/src/webhooks.d.ts +35 -0
- package/dist/lucern/packages/client-core/src/worktrees.d.ts +17 -0
- package/dist/lucern/packages/domain-beliefs/src/beliefs.d.ts +283 -0
- package/dist/lucern/packages/domain-beliefs/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-context/src/compile.d.ts +11 -0
- package/dist/{contextPackCompiler.d.ts → lucern/packages/domain-context/src/context-pack-compiler.d.ts} +10 -11
- package/dist/lucern/packages/domain-context/src/index.d.ts +4 -0
- package/dist/lucern/packages/domain-context/src/ports.d.ts +58 -0
- package/dist/lucern/packages/domain-context/src/public-types.d.ts +1 -0
- package/dist/lucern/packages/domain-edges/src/contradictions.d.ts +59 -0
- package/dist/lucern/packages/domain-edges/src/edges.d.ts +91 -0
- package/dist/lucern/packages/domain-edges/src/index.d.ts +2 -0
- package/dist/lucern/packages/domain-evidence/src/evidence.d.ts +115 -0
- package/dist/lucern/packages/domain-evidence/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-graph/src/graph.d.ts +150 -0
- package/dist/lucern/packages/domain-identity/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-identity/src/whoami.d.ts +13 -0
- package/dist/lucern/packages/domain-ontologies/src/ontologies.d.ts +123 -0
- package/dist/lucern/packages/domain-questions/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-questions/src/questions.d.ts +147 -0
- package/dist/lucern/packages/domain-search/src/search.d.ts +97 -0
- package/dist/lucern/packages/domain-tasks/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-tasks/src/tasks.d.ts +102 -0
- package/dist/lucern/packages/domain-topics/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-topics/src/topics.d.ts +147 -0
- package/dist/lucern/packages/domain-worktrees/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-worktrees/src/worktrees.d.ts +185 -0
- package/dist/lucern/packages/events/src/index.d.ts +4 -0
- package/dist/lucern/packages/events/src/matching.d.ts +3 -0
- package/dist/lucern/packages/events/src/outbox.d.ts +15 -0
- package/dist/lucern/packages/events/src/types.d.ts +151 -0
- package/dist/lucern/packages/events/src/webhooks.d.ts +9 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/beliefs.d.ts +15 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/context.d.ts +12 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/contradictions.d.ts +7 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/edges.d.ts +7 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/events.d.ts +6 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/evidence.d.ts +21 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/graph.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/identity.d.ts +5 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/ontologies.d.ts +8 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/questions.d.ts +39 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/search.d.ts +5 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/tasks.d.ts +8 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/topics.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/webhooks.d.ts +16 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/worktrees.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/index.d.ts +28 -0
- package/dist/packages/sdk/src/adminClient.d.ts +89 -0
- package/dist/packages/sdk/src/answersClient.d.ts +5 -0
- package/dist/{audiencesClient.d.ts → packages/sdk/src/audiencesClient.d.ts} +18 -30
- package/dist/packages/sdk/src/auditClient.d.ts +21 -0
- package/dist/packages/sdk/src/beliefsClient.d.ts +52 -0
- package/dist/packages/sdk/src/client.d.ts +1558 -0
- package/dist/packages/sdk/src/contextClient.d.ts +9 -0
- package/dist/packages/sdk/src/contracts/api-enums.contract.d.ts +79 -0
- package/dist/{controlObjectOwnership.d.ts → packages/sdk/src/controlObjectOwnership.d.ts} +18 -35
- package/dist/{coreClient.d.ts → packages/sdk/src/coreClient.d.ts} +14 -38
- package/dist/packages/sdk/src/customTools.d.ts +65 -0
- package/dist/packages/sdk/src/decisionsClient.d.ts +97 -0
- package/dist/packages/sdk/src/graphClient.d.ts +191 -0
- package/dist/{harnessClient.d.ts → packages/sdk/src/harnessClient.d.ts} +33 -127
- package/dist/packages/sdk/src/identityClient.d.ts +104 -0
- package/dist/packages/sdk/src/index.d.ts +28 -0
- package/dist/packages/sdk/src/learningClient.d.ts +37 -0
- package/dist/{mcpParityClient.d.ts → packages/sdk/src/mcpParityClient.d.ts} +5 -11
- package/dist/packages/sdk/src/mcpParitySurface.d.ts +8 -0
- package/dist/{ontologyClient.d.ts → packages/sdk/src/ontologyClient.d.ts} +22 -44
- package/dist/packages/sdk/src/packsClient.d.ts +101 -0
- package/dist/{policyClient.d.ts → packages/sdk/src/policyClient.d.ts} +18 -113
- package/dist/packages/sdk/src/reportsClient.d.ts +31 -0
- package/dist/packages/sdk/src/schemaClient.d.ts +54 -0
- package/dist/packages/sdk/src/sdkSurface.d.ts +55 -0
- package/dist/packages/sdk/src/topicsClient.d.ts +45 -0
- package/dist/packages/sdk/src/types.d.ts +470 -0
- package/dist/packages/sdk/src/version.d.ts +2 -0
- package/dist/packages/sdk/src/workflowClient.d.ts +252 -0
- package/package.json +37 -92
- package/CHANGELOG.md +0 -13
- package/dist/adminClient.d.ts +0 -409
- package/dist/adminClient.js +0 -755
- package/dist/adminClient.js.map +0 -1
- package/dist/answersClient.d.ts +0 -23
- package/dist/answersClient.js +0 -333
- package/dist/answersClient.js.map +0 -1
- package/dist/audience/index.d.ts +0 -38
- package/dist/audience/index.js +0 -110
- package/dist/audience/index.js.map +0 -1
- package/dist/audiencesClient.js +0 -472
- package/dist/audiencesClient.js.map +0 -1
- package/dist/auditClient.d.ts +0 -29
- package/dist/auditClient.js +0 -386
- package/dist/auditClient.js.map +0 -1
- package/dist/beliefs/index.d.ts +0 -465
- package/dist/beliefs/index.js +0 -6433
- package/dist/beliefs/index.js.map +0 -1
- package/dist/beliefs/lifecycle.d.ts +0 -24
- package/dist/beliefs/lifecycle.js +0 -98
- package/dist/beliefs/lifecycle.js.map +0 -1
- package/dist/beliefsClient.d.ts +0 -241
- package/dist/beliefsClient.js +0 -646
- package/dist/beliefsClient.js.map +0 -1
- package/dist/client.d.ts +0 -2398
- package/dist/client.js +0 -6411
- package/dist/client.js.map +0 -1
- package/dist/contextClient.d.ts +0 -27
- package/dist/contextClient.js +0 -396
- package/dist/contextClient.js.map +0 -1
- package/dist/contextFacade.d.ts +0 -2
- package/dist/contextFacade.js +0 -73
- package/dist/contextFacade.js.map +0 -1
- package/dist/contextPackCompiler.js +0 -1091
- package/dist/contextPackCompiler.js.map +0 -1
- package/dist/contextPackPolicy.d.ts +0 -84
- package/dist/contextPackPolicy.js +0 -347
- package/dist/contextPackPolicy.js.map +0 -1
- package/dist/contextPackSchema.d.ts +0 -7
- package/dist/contextPackSchema.js +0 -203
- package/dist/contextPackSchema.js.map +0 -1
- package/dist/contextTypes.d.ts +0 -135
- package/dist/contextTypes.js +0 -3
- package/dist/contextTypes.js.map +0 -1
- package/dist/contracts/api-enums.contract.d.ts +0 -81
- package/dist/contracts/api-enums.contract.js +0 -98
- package/dist/contracts/api-enums.contract.js.map +0 -1
- package/dist/contracts/auth-session.contract.js +0 -48
- package/dist/contracts/auth-session.contract.js.map +0 -1
- package/dist/contracts/context-pack.contract.js +0 -98
- package/dist/contracts/context-pack.contract.js.map +0 -1
- package/dist/contracts/contextPack.d.ts +0 -1
- package/dist/contracts/contextPack.js +0 -98
- package/dist/contracts/contextPack.js.map +0 -1
- package/dist/contracts/index.d.ts +0 -9
- package/dist/contracts/index.js +0 -4928
- package/dist/contracts/index.js.map +0 -1
- package/dist/contracts/lens-filter.contract.js +0 -71
- package/dist/contracts/lens-filter.contract.js.map +0 -1
- package/dist/contracts/lens-workflow.contract.d.ts +0 -87
- package/dist/contracts/lens-workflow.contract.js +0 -123
- package/dist/contracts/lens-workflow.contract.js.map +0 -1
- package/dist/contracts/lensFilter.d.ts +0 -1
- package/dist/contracts/lensFilter.js +0 -71
- package/dist/contracts/lensFilter.js.map +0 -1
- package/dist/contracts/lensWorkflow.d.ts +0 -2
- package/dist/contracts/lensWorkflow.js +0 -123
- package/dist/contracts/lensWorkflow.js.map +0 -1
- package/dist/contracts/mcp-tools.contract.d.ts +0 -1
- package/dist/contracts/mcp-tools.contract.js +0 -3016
- package/dist/contracts/mcp-tools.contract.js.map +0 -1
- package/dist/contracts/mcpTools.d.ts +0 -1
- package/dist/contracts/mcpTools.js +0 -3016
- package/dist/contracts/mcpTools.js.map +0 -1
- package/dist/contracts/prompt.contract.d.ts +0 -26
- package/dist/contracts/prompt.contract.js +0 -12
- package/dist/contracts/prompt.contract.js.map +0 -1
- package/dist/contracts/prompt.d.ts +0 -1
- package/dist/contracts/prompt.js +0 -12
- package/dist/contracts/prompt.js.map +0 -1
- package/dist/contracts/sdk-tools.contract.d.ts +0 -2
- package/dist/contracts/sdk-tools.contract.js +0 -4164
- package/dist/contracts/sdk-tools.contract.js.map +0 -1
- package/dist/contracts/sdkTools.d.ts +0 -2
- package/dist/contracts/sdkTools.js +0 -4164
- package/dist/contracts/sdkTools.js.map +0 -1
- package/dist/contracts/workflow-runtime.contract.d.ts +0 -163
- package/dist/contracts/workflow-runtime.contract.js +0 -245
- package/dist/contracts/workflow-runtime.contract.js.map +0 -1
- package/dist/contracts/workflowRuntime.d.ts +0 -1
- package/dist/contracts/workflowRuntime.js +0 -245
- package/dist/contracts/workflowRuntime.js.map +0 -1
- package/dist/contradictions/index.d.ts +0 -158
- package/dist/contradictions/index.js +0 -6427
- package/dist/contradictions/index.js.map +0 -1
- package/dist/controlObjectOwnership.js +0 -215
- package/dist/controlObjectOwnership.js.map +0 -1
- package/dist/coreClient.js +0 -339
- package/dist/coreClient.js.map +0 -1
- package/dist/customTools.d.ts +0 -88
- package/dist/customTools.js +0 -248
- package/dist/customTools.js.map +0 -1
- package/dist/decisions/index.d.ts +0 -68
- package/dist/decisions/index.js +0 -6429
- package/dist/decisions/index.js.map +0 -1
- package/dist/decisionsClient.d.ts +0 -111
- package/dist/decisionsClient.js +0 -522
- package/dist/decisionsClient.js.map +0 -1
- package/dist/domainContext.d.ts +0 -1
- package/dist/domainContext.js +0 -3
- package/dist/domainContext.js.map +0 -1
- package/dist/edges/index.d.ts +0 -204
- package/dist/edges/index.js +0 -6428
- package/dist/edges/index.js.map +0 -1
- package/dist/events.d.ts +0 -178
- package/dist/events.js +0 -251
- package/dist/events.js.map +0 -1
- package/dist/eventsCore.d.ts +0 -49
- package/dist/eventsCore.js +0 -429
- package/dist/eventsCore.js.map +0 -1
- package/dist/evidence/index.d.ts +0 -295
- package/dist/evidence/index.js +0 -6428
- package/dist/evidence/index.js.map +0 -1
- package/dist/evidenceClient.d.ts +0 -119
- package/dist/evidenceClient.js +0 -350
- package/dist/evidenceClient.js.map +0 -1
- package/dist/facade/context.d.ts +0 -18
- package/dist/facade/context.js +0 -73
- package/dist/facade/context.js.map +0 -1
- package/dist/gatewayFacades.d.ts +0 -589
- package/dist/gatewayFacades.js +0 -2006
- package/dist/gatewayFacades.js.map +0 -1
- package/dist/graphClient.d.ts +0 -271
- package/dist/graphClient.js +0 -698
- package/dist/graphClient.js.map +0 -1
- package/dist/harnessClient.js +0 -607
- package/dist/harnessClient.js.map +0 -1
- package/dist/identityClient.d.ts +0 -140
- package/dist/identityClient.js +0 -497
- package/dist/identityClient.js.map +0 -1
- package/dist/index.d.ts +0 -45
- package/dist/learningClient.d.ts +0 -46
- package/dist/learningClient.js +0 -409
- package/dist/learningClient.js.map +0 -1
- package/dist/lenses/index.d.ts +0 -194
- package/dist/lenses/index.js +0 -6427
- package/dist/lenses/index.js.map +0 -1
- package/dist/mcpParityClient.js +0 -516
- package/dist/mcpParityClient.js.map +0 -1
- package/dist/mcpParitySurface.d.ts +0 -12
- package/dist/mcpParitySurface.js +0 -65
- package/dist/mcpParitySurface.js.map +0 -1
- package/dist/mcpTools-DPZxowDX.d.ts +0 -254
- package/dist/nodes/index.d.ts +0 -62
- package/dist/nodes/index.js +0 -6429
- package/dist/nodes/index.js.map +0 -1
- package/dist/ontologies/index.d.ts +0 -178
- package/dist/ontologies/index.js +0 -6430
- package/dist/ontologies/index.js.map +0 -1
- package/dist/ontologyClient.js +0 -513
- package/dist/ontologyClient.js.map +0 -1
- package/dist/opinion.d.ts +0 -11
- package/dist/opinion.js +0 -35
- package/dist/opinion.js.map +0 -1
- package/dist/packRuntime.d.ts +0 -2
- package/dist/packRuntime.js +0 -3
- package/dist/packRuntime.js.map +0 -1
- package/dist/packsClient.d.ts +0 -131
- package/dist/packsClient.js +0 -525
- package/dist/packsClient.js.map +0 -1
- package/dist/policyClient.js +0 -625
- package/dist/policyClient.js.map +0 -1
- package/dist/questions/index.d.ts +0 -297
- package/dist/questions/index.js +0 -6430
- package/dist/questions/index.js.map +0 -1
- package/dist/realtime/index.d.ts +0 -29
- package/dist/realtime/index.js +0 -23
- package/dist/realtime/index.js.map +0 -1
- package/dist/realtime/refs.d.ts +0 -17
- package/dist/realtime/refs.js +0 -9
- package/dist/realtime/refs.js.map +0 -1
- package/dist/reportsClient.d.ts +0 -41
- package/dist/reportsClient.js +0 -418
- package/dist/reportsClient.js.map +0 -1
- package/dist/schemaClient.d.ts +0 -64
- package/dist/schemaClient.js +0 -434
- package/dist/schemaClient.js.map +0 -1
- package/dist/sdkSurface.d.ts +0 -61
- package/dist/sdkSurface.js +0 -112
- package/dist/sdkSurface.js.map +0 -1
- package/dist/sdkTools-CwXJDACb.d.ts +0 -150
- package/dist/sourcesClient.d.ts +0 -24
- package/dist/sourcesClient.js +0 -339
- package/dist/sourcesClient.js.map +0 -1
- package/dist/topics/index.d.ts +0 -68
- package/dist/topics/index.js +0 -6428
- package/dist/topics/index.js.map +0 -1
- package/dist/topicsClient.d.ts +0 -84
- package/dist/topicsClient.js +0 -492
- package/dist/topicsClient.js.map +0 -1
- package/dist/types.d.ts +0 -715
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/version.d.ts +0 -4
- package/dist/version.js +0 -6
- package/dist/version.js.map +0 -1
- package/dist/workflowClient.d.ts +0 -316
- package/dist/workflowClient.js +0 -830
- package/dist/workflowClient.js.map +0 -1
- package/dist/worktrees/index.d.ts +0 -210
- package/dist/worktrees/index.js +0 -6430
- package/dist/worktrees/index.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { CompleteTaskInput, CreateTaskInput, ListTasksQuery, TaskListResult, TaskRecord, UpdateTaskInput } from "@/lucern/packages/domain-tasks/src/tasks";
|
|
3
|
+
export type TasksClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type TasksCreateResponse = PlatformGatewaySuccess<TaskRecord>;
|
|
5
|
+
export type TasksUpdateResponse = PlatformGatewaySuccess<TaskRecord>;
|
|
6
|
+
export type TasksCompleteResponse = PlatformGatewaySuccess<TaskRecord>;
|
|
7
|
+
export type TasksListResponse = PlatformGatewaySuccess<TaskListResult>;
|
|
8
|
+
export declare function createTasksClientCore(config?: TasksClientCoreConfig): {
|
|
9
|
+
create(input: CreateTaskInput, idempotencyKey?: string): Promise<TasksCreateResponse>;
|
|
10
|
+
update(input: UpdateTaskInput, idempotencyKey?: string): Promise<TasksUpdateResponse>;
|
|
11
|
+
complete(input: CompleteTaskInput, idempotencyKey?: string): Promise<TasksCompleteResponse>;
|
|
12
|
+
list(query: ListTasksQuery): Promise<TasksListResponse>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { CreateTopicInput, GetTopicCoverageInput, GetTopicTreeInput, ListTopicsQuery, TopicCoverageResult, TopicListResult, TopicRecord, TopicTreeResult, UpdateTopicInput } from "@/lucern/packages/domain-topics/src/topics";
|
|
3
|
+
export type TopicsClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type TopicsCreateResponse = PlatformGatewaySuccess<TopicRecord>;
|
|
5
|
+
export type TopicsGetResponse = PlatformGatewaySuccess<TopicRecord>;
|
|
6
|
+
export type TopicsListResponse = PlatformGatewaySuccess<TopicListResult>;
|
|
7
|
+
export type TopicsUpdateResponse = PlatformGatewaySuccess<TopicRecord>;
|
|
8
|
+
export type TopicsTreeResponse = PlatformGatewaySuccess<TopicTreeResult>;
|
|
9
|
+
export type TopicsCoverageResponse = PlatformGatewaySuccess<TopicCoverageResult>;
|
|
10
|
+
export declare function createTopicsClientCore(config?: TopicsClientCoreConfig): {
|
|
11
|
+
create(input: CreateTopicInput, idempotencyKey?: string): Promise<TopicsCreateResponse>;
|
|
12
|
+
get(id: string): Promise<TopicsGetResponse>;
|
|
13
|
+
list(query?: ListTopicsQuery): Promise<TopicsListResponse>;
|
|
14
|
+
update(input: UpdateTopicInput, idempotencyKey?: string): Promise<TopicsUpdateResponse>;
|
|
15
|
+
tree(input: GetTopicTreeInput): Promise<TopicsTreeResponse>;
|
|
16
|
+
coverage(input: GetTopicCoverageInput): Promise<TopicsCoverageResponse>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { WebhookCreateInput, WebhookDeliveriesResult, WebhookHealthResult, WebhookRecord, WebhookTestResult, WebhookUpdateInput } from "@/lucern/packages/events/src/types";
|
|
3
|
+
export type WebhooksClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type WebhookListQuery = {
|
|
5
|
+
topicId?: string;
|
|
6
|
+
};
|
|
7
|
+
export type WebhookDeliveriesQuery = {
|
|
8
|
+
limit?: number;
|
|
9
|
+
};
|
|
10
|
+
export type WebhookDeleteResult = {
|
|
11
|
+
webhookId: string;
|
|
12
|
+
deleted: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type WebhooksCreateResponse = PlatformGatewaySuccess<WebhookRecord>;
|
|
15
|
+
export type WebhooksListResponse = PlatformGatewaySuccess<{
|
|
16
|
+
webhooks: WebhookRecord[];
|
|
17
|
+
}>;
|
|
18
|
+
export type WebhooksGetResponse = PlatformGatewaySuccess<WebhookRecord>;
|
|
19
|
+
export type WebhooksUpdateResponse = PlatformGatewaySuccess<WebhookRecord>;
|
|
20
|
+
export type WebhooksDeleteResponse = PlatformGatewaySuccess<WebhookDeleteResult>;
|
|
21
|
+
export type WebhooksTestResponse = PlatformGatewaySuccess<WebhookTestResult>;
|
|
22
|
+
export type WebhooksDeliveriesResponse = PlatformGatewaySuccess<WebhookDeliveriesResult>;
|
|
23
|
+
export type WebhooksHealthResponse = PlatformGatewaySuccess<WebhookHealthResult>;
|
|
24
|
+
export declare function createWebhooksClientCore(config?: WebhooksClientCoreConfig): {
|
|
25
|
+
create(input: WebhookCreateInput, idempotencyKey?: string): Promise<WebhooksCreateResponse>;
|
|
26
|
+
list(query?: WebhookListQuery): Promise<WebhooksListResponse>;
|
|
27
|
+
get(id: string): Promise<WebhooksGetResponse>;
|
|
28
|
+
update(id: string, input: WebhookUpdateInput, idempotencyKey?: string): Promise<WebhooksUpdateResponse>;
|
|
29
|
+
delete(id: string, idempotencyKey?: string): Promise<WebhooksDeleteResponse>;
|
|
30
|
+
test(id: string, input?: {
|
|
31
|
+
topicId?: string;
|
|
32
|
+
}, idempotencyKey?: string): Promise<WebhooksTestResponse>;
|
|
33
|
+
deliveries(id: string, query?: WebhookDeliveriesQuery): Promise<WebhooksDeliveriesResponse>;
|
|
34
|
+
health(id: string): Promise<WebhooksHealthResponse>;
|
|
35
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { ActivateWorktreeInput, CreateWorktreeInput, ListWorktreesQuery, MergeWorktreeInput, MergeWorktreeResult, UpdateWorktreeInput, UpdateWorktreeTargetsInput, WorktreeListResult, WorktreeRecord } from "@/lucern/packages/domain-worktrees/src/worktrees";
|
|
3
|
+
export type WorktreesClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type WorktreesCreateResponse = PlatformGatewaySuccess<WorktreeRecord>;
|
|
5
|
+
export type WorktreesListResponse = PlatformGatewaySuccess<WorktreeListResult>;
|
|
6
|
+
export type WorktreesActivateResponse = PlatformGatewaySuccess<WorktreeRecord>;
|
|
7
|
+
export type WorktreesUpdateResponse = PlatformGatewaySuccess<WorktreeRecord>;
|
|
8
|
+
export type WorktreesTargetsResponse = PlatformGatewaySuccess<WorktreeRecord>;
|
|
9
|
+
export type WorktreesMergeResponse = PlatformGatewaySuccess<MergeWorktreeResult>;
|
|
10
|
+
export declare function createWorktreesClientCore(config?: WorktreesClientCoreConfig): {
|
|
11
|
+
create(input: CreateWorktreeInput, idempotencyKey?: string): Promise<WorktreesCreateResponse>;
|
|
12
|
+
list(query: ListWorktreesQuery): Promise<WorktreesListResponse>;
|
|
13
|
+
activate(input: ActivateWorktreeInput, idempotencyKey?: string): Promise<WorktreesActivateResponse>;
|
|
14
|
+
update(input: UpdateWorktreeInput, idempotencyKey?: string): Promise<WorktreesUpdateResponse>;
|
|
15
|
+
merge(input: MergeWorktreeInput, idempotencyKey?: string): Promise<WorktreesMergeResponse>;
|
|
16
|
+
updateTargets(input: UpdateWorktreeTargetsInput, idempotencyKey?: string): Promise<WorktreesTargetsResponse>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
type BeliefRecordStatus = "active" | "superseded" | "archived";
|
|
2
|
+
type BeliefScoringState = "unscored" | "scored";
|
|
3
|
+
type BeliefForkReason = "refinement" | "contradiction_response" | "scope_change" | "confidence_collapse" | "manual";
|
|
4
|
+
type BeliefConfidenceTrigger = "evidence_added" | "evidence_removed" | "contradiction_detected" | "contradiction_resolved" | "manual" | "decay" | "agent_assessment" | "worktree_outcome" | "worktree_completed";
|
|
5
|
+
type ContractConditionType = "assertion" | "temporal" | "evidential" | "threshold" | "composite";
|
|
6
|
+
type ContractDirection = "confirms" | "falsifies";
|
|
7
|
+
type ContractCompositeOperator = "all" | "any" | "majority";
|
|
8
|
+
type ContractEvaluationSchedule = "on_demand" | "on_evidence" | "periodic" | "event_driven";
|
|
9
|
+
type BisectExpectedDirection = "overconfident" | "underconfident";
|
|
10
|
+
export type BeliefRecord = {
|
|
11
|
+
id: string;
|
|
12
|
+
nodeId: string;
|
|
13
|
+
beliefId: string;
|
|
14
|
+
globalId?: string;
|
|
15
|
+
topicId?: string;
|
|
16
|
+
text: string;
|
|
17
|
+
canonicalText: string;
|
|
18
|
+
formulation: string;
|
|
19
|
+
status: BeliefRecordStatus;
|
|
20
|
+
scoringState: BeliefScoringState;
|
|
21
|
+
confidence?: number;
|
|
22
|
+
beliefStatus?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
sourceType?: string;
|
|
25
|
+
beliefType?: string;
|
|
26
|
+
createdAt?: number;
|
|
27
|
+
updatedAt?: number;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
};
|
|
30
|
+
export type BeliefListResult = {
|
|
31
|
+
beliefs: BeliefRecord[];
|
|
32
|
+
nextCursor: null;
|
|
33
|
+
};
|
|
34
|
+
export type BeliefLineageEntry = {
|
|
35
|
+
beliefId: string;
|
|
36
|
+
nodeId: string;
|
|
37
|
+
formulation: string;
|
|
38
|
+
forkReason?: string;
|
|
39
|
+
createdAt?: number;
|
|
40
|
+
};
|
|
41
|
+
export type BeliefLineageResult = {
|
|
42
|
+
beliefId: string;
|
|
43
|
+
lineage: BeliefLineageEntry[];
|
|
44
|
+
};
|
|
45
|
+
export type BeliefConfidenceHistoryEntry = {
|
|
46
|
+
id?: string;
|
|
47
|
+
confidence: number;
|
|
48
|
+
trigger: BeliefConfidenceTrigger | string;
|
|
49
|
+
rationale?: string;
|
|
50
|
+
timestamp?: number;
|
|
51
|
+
userId?: string;
|
|
52
|
+
opinion?: {
|
|
53
|
+
b?: number;
|
|
54
|
+
d?: number;
|
|
55
|
+
u?: number;
|
|
56
|
+
a?: number;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type BeliefConfidenceHistoryResult = {
|
|
60
|
+
beliefId: string;
|
|
61
|
+
entries: BeliefConfidenceHistoryEntry[];
|
|
62
|
+
nextCursor: null;
|
|
63
|
+
};
|
|
64
|
+
export type BeliefPropagationTarget = {
|
|
65
|
+
beliefId: string;
|
|
66
|
+
edgeType: "supports" | "depends_on";
|
|
67
|
+
direction: "incoming" | "outgoing";
|
|
68
|
+
confidence?: number;
|
|
69
|
+
formulation?: string;
|
|
70
|
+
};
|
|
71
|
+
export type BeliefConfidenceUpdateResult = {
|
|
72
|
+
beliefId: string;
|
|
73
|
+
nodeId: string;
|
|
74
|
+
previousConfidence: number;
|
|
75
|
+
newConfidence: number;
|
|
76
|
+
trigger: BeliefConfidenceTrigger;
|
|
77
|
+
rationale?: string;
|
|
78
|
+
requestId: string;
|
|
79
|
+
propagationSummary: {
|
|
80
|
+
mode: "scheduled";
|
|
81
|
+
bounded: true;
|
|
82
|
+
totalCandidateTargets: number;
|
|
83
|
+
inlineTargets: BeliefPropagationTarget[];
|
|
84
|
+
remainingTargetCount: number;
|
|
85
|
+
};
|
|
86
|
+
opinion?: {
|
|
87
|
+
b?: number;
|
|
88
|
+
d?: number;
|
|
89
|
+
u?: number;
|
|
90
|
+
a?: number;
|
|
91
|
+
};
|
|
92
|
+
historyEntry?: BeliefConfidenceHistoryEntry;
|
|
93
|
+
};
|
|
94
|
+
export type BeliefArchiveResult = BeliefRecord & {
|
|
95
|
+
previousStatus?: string;
|
|
96
|
+
newStatus: "archived";
|
|
97
|
+
};
|
|
98
|
+
export type BeliefRefineInput = {
|
|
99
|
+
id: string;
|
|
100
|
+
text: string;
|
|
101
|
+
rationale?: string;
|
|
102
|
+
};
|
|
103
|
+
export type BeliefContractCreateInput = {
|
|
104
|
+
title: string;
|
|
105
|
+
description?: string;
|
|
106
|
+
conditionType: ContractConditionType;
|
|
107
|
+
direction: ContractDirection;
|
|
108
|
+
condition: {
|
|
109
|
+
expression: string;
|
|
110
|
+
evaluator: string;
|
|
111
|
+
evaluatorConfig?: Record<string, unknown>;
|
|
112
|
+
};
|
|
113
|
+
deadline?: number;
|
|
114
|
+
compositeOf?: string[];
|
|
115
|
+
compositeOperator?: ContractCompositeOperator;
|
|
116
|
+
modulation: {
|
|
117
|
+
onConfirmed: {
|
|
118
|
+
delta: number;
|
|
119
|
+
ceiling?: number;
|
|
120
|
+
};
|
|
121
|
+
onDisconfirmed: {
|
|
122
|
+
delta: number;
|
|
123
|
+
floor?: number;
|
|
124
|
+
};
|
|
125
|
+
onExpired?: {
|
|
126
|
+
delta: number;
|
|
127
|
+
};
|
|
128
|
+
onPartial?: {
|
|
129
|
+
threshold: number;
|
|
130
|
+
delta: number;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
evaluationSchedule: ContractEvaluationSchedule;
|
|
134
|
+
periodicIntervalMs?: number;
|
|
135
|
+
};
|
|
136
|
+
export type BeliefContractCreateResult = {
|
|
137
|
+
id: string;
|
|
138
|
+
contractId: string;
|
|
139
|
+
beliefId: string;
|
|
140
|
+
status: string;
|
|
141
|
+
title: string;
|
|
142
|
+
storageId?: string;
|
|
143
|
+
};
|
|
144
|
+
export type BeliefBisectResult = {
|
|
145
|
+
beliefId: string;
|
|
146
|
+
expectedDirection: BisectExpectedDirection;
|
|
147
|
+
inflectionEntry: BeliefConfidenceHistoryEntry | null;
|
|
148
|
+
triggerEvent: string | null;
|
|
149
|
+
confidenceBefore: number | null;
|
|
150
|
+
confidenceAfter: number | null;
|
|
151
|
+
totalEntries: number;
|
|
152
|
+
inflectionIndex: number | null;
|
|
153
|
+
};
|
|
154
|
+
export type CreateBeliefInput = {
|
|
155
|
+
topicId: string;
|
|
156
|
+
text: string;
|
|
157
|
+
rationale?: string;
|
|
158
|
+
worktreeId?: string;
|
|
159
|
+
pillar?: string;
|
|
160
|
+
sourceBeliefIds?: string[];
|
|
161
|
+
sourceType?: string;
|
|
162
|
+
beliefType?: string;
|
|
163
|
+
reversibility?: string;
|
|
164
|
+
predictionMeta?: Record<string, unknown>;
|
|
165
|
+
metadata?: Record<string, unknown>;
|
|
166
|
+
};
|
|
167
|
+
export type ListBeliefsQuery = {
|
|
168
|
+
topicId?: string;
|
|
169
|
+
status?: string;
|
|
170
|
+
worktreeId?: string;
|
|
171
|
+
minConfidence?: number;
|
|
172
|
+
limit?: number;
|
|
173
|
+
cursor?: string;
|
|
174
|
+
includeEdgeAssociated?: boolean;
|
|
175
|
+
};
|
|
176
|
+
export type ForkBeliefInput = {
|
|
177
|
+
id: string;
|
|
178
|
+
text: string;
|
|
179
|
+
forkReason?: BeliefForkReason | string;
|
|
180
|
+
rationale?: string;
|
|
181
|
+
};
|
|
182
|
+
export type UpdateBeliefConfidenceInput = {
|
|
183
|
+
id: string;
|
|
184
|
+
confidence: number;
|
|
185
|
+
trigger?: string;
|
|
186
|
+
rationale: string;
|
|
187
|
+
certainty?: number;
|
|
188
|
+
maxInlinePropagationTargets?: number;
|
|
189
|
+
};
|
|
190
|
+
export type ArchiveBeliefInput = {
|
|
191
|
+
id: string;
|
|
192
|
+
reason?: string;
|
|
193
|
+
};
|
|
194
|
+
export type CreateBeliefContractRequest = {
|
|
195
|
+
id: string;
|
|
196
|
+
input: BeliefContractCreateInput;
|
|
197
|
+
};
|
|
198
|
+
export type BisectBeliefConfidenceInput = {
|
|
199
|
+
id: string;
|
|
200
|
+
expectedDirection: BisectExpectedDirection;
|
|
201
|
+
timeRange?: {
|
|
202
|
+
start: number;
|
|
203
|
+
end: number;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
type BeliefCreatePortInput = {
|
|
207
|
+
topicId: string;
|
|
208
|
+
text: string;
|
|
209
|
+
rationale?: string;
|
|
210
|
+
worktreeId?: string;
|
|
211
|
+
pillar?: string;
|
|
212
|
+
sourceBeliefRawIds?: string[];
|
|
213
|
+
sourceType?: string;
|
|
214
|
+
beliefType?: string;
|
|
215
|
+
reversibility?: string;
|
|
216
|
+
predictionMeta?: Record<string, unknown>;
|
|
217
|
+
metadata?: Record<string, unknown>;
|
|
218
|
+
};
|
|
219
|
+
type BeliefForkPortInput = {
|
|
220
|
+
beliefRawId: string;
|
|
221
|
+
text: string;
|
|
222
|
+
forkReason: BeliefForkReason;
|
|
223
|
+
rationale?: string;
|
|
224
|
+
};
|
|
225
|
+
type BeliefRefinePortInput = {
|
|
226
|
+
beliefRawId: string;
|
|
227
|
+
text: string;
|
|
228
|
+
rationale?: string;
|
|
229
|
+
};
|
|
230
|
+
type BeliefConfidencePortInput = {
|
|
231
|
+
beliefRawId: string;
|
|
232
|
+
confidence: number;
|
|
233
|
+
trigger: BeliefConfidenceTrigger;
|
|
234
|
+
rationale?: string;
|
|
235
|
+
certainty?: number;
|
|
236
|
+
};
|
|
237
|
+
type BeliefArchivePortInput = {
|
|
238
|
+
beliefRawId: string;
|
|
239
|
+
reason?: string;
|
|
240
|
+
};
|
|
241
|
+
type BeliefContractPortInput = {
|
|
242
|
+
beliefRawId: string;
|
|
243
|
+
input: BeliefContractCreateInput;
|
|
244
|
+
};
|
|
245
|
+
export type BeliefPort = {
|
|
246
|
+
fetchBelief: (rawId: string) => Promise<unknown | null>;
|
|
247
|
+
listBeliefsByTopic: (args: {
|
|
248
|
+
topicId: string;
|
|
249
|
+
status?: BeliefRecordStatus;
|
|
250
|
+
limit?: number;
|
|
251
|
+
includeEdgeAssociated?: boolean;
|
|
252
|
+
}) => Promise<unknown[]>;
|
|
253
|
+
createBelief: (input: BeliefCreatePortInput) => Promise<unknown>;
|
|
254
|
+
refineBelief: (input: BeliefRefinePortInput) => Promise<unknown>;
|
|
255
|
+
forkBelief: (input: BeliefForkPortInput) => Promise<unknown>;
|
|
256
|
+
modulateConfidence: (input: BeliefConfidencePortInput) => Promise<unknown>;
|
|
257
|
+
archiveBelief: (input: BeliefArchivePortInput) => Promise<unknown>;
|
|
258
|
+
getLineage: (rawId: string) => Promise<unknown[]>;
|
|
259
|
+
getConfidenceHistory: (rawId: string) => Promise<unknown[]>;
|
|
260
|
+
createContract: (input: BeliefContractPortInput) => Promise<unknown>;
|
|
261
|
+
getRelationships: (rawId: string) => Promise<unknown>;
|
|
262
|
+
};
|
|
263
|
+
export declare function createBelief(port: BeliefPort, input: CreateBeliefInput): Promise<BeliefRecord>;
|
|
264
|
+
export declare function getBelief(port: BeliefPort, args: {
|
|
265
|
+
id: string;
|
|
266
|
+
}): Promise<BeliefRecord>;
|
|
267
|
+
export declare function listBeliefs(port: BeliefPort, query: ListBeliefsQuery): Promise<BeliefListResult>;
|
|
268
|
+
export declare function refineBelief(port: BeliefPort, input: BeliefRefineInput): Promise<BeliefRecord>;
|
|
269
|
+
export declare function forkBelief(port: BeliefPort, input: ForkBeliefInput): Promise<BeliefRecord & {
|
|
270
|
+
parentBeliefId: string;
|
|
271
|
+
forkReason: BeliefForkReason;
|
|
272
|
+
}>;
|
|
273
|
+
export declare function updateBeliefConfidence(port: BeliefPort, input: UpdateBeliefConfidenceInput): Promise<BeliefConfidenceUpdateResult>;
|
|
274
|
+
export declare function archiveBelief(port: BeliefPort, input: ArchiveBeliefInput): Promise<BeliefArchiveResult>;
|
|
275
|
+
export declare function getBeliefLineage(port: BeliefPort, args: {
|
|
276
|
+
id: string;
|
|
277
|
+
}): Promise<BeliefLineageResult>;
|
|
278
|
+
export declare function getBeliefConfidenceHistory(port: BeliefPort, args: {
|
|
279
|
+
id: string;
|
|
280
|
+
}): Promise<BeliefConfidenceHistoryResult>;
|
|
281
|
+
export declare function createBeliefContract(port: BeliefPort, request: CreateBeliefContractRequest): Promise<BeliefContractCreateResult>;
|
|
282
|
+
export declare function bisectBeliefConfidence(port: BeliefPort, input: BisectBeliefConfidenceInput): Promise<BeliefBisectResult>;
|
|
283
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./beliefs";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ContextPackV1 } from "../../../contracts/src/context-pack.contract";
|
|
2
|
+
import { type CompileContextCommand, type CompileContextPorts } from "./ports";
|
|
3
|
+
import type { PublicCompiledContext } from "./public-types";
|
|
4
|
+
export declare class ContextCompileError extends Error {
|
|
5
|
+
readonly code: string;
|
|
6
|
+
readonly status: number;
|
|
7
|
+
constructor(code: string, message: string, status: number);
|
|
8
|
+
}
|
|
9
|
+
export declare function isContextCompileError(error: unknown): error is ContextCompileError;
|
|
10
|
+
export declare function toPublicCompiledContext(pack: ContextPackV1): PublicCompiledContext;
|
|
11
|
+
export declare function compileContext(ports: CompileContextPorts, input: CompileContextCommand): Promise<PublicCompiledContext>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { resolveEffectiveWeights } from
|
|
3
|
-
|
|
4
|
-
type ContextPackTopicRow = {
|
|
1
|
+
import { type ContextCompilationMode, type ContextPackV1, type PackWeightOverride } from "../../../contracts/src/context-pack.contract";
|
|
2
|
+
import { resolveEffectiveWeights } from "../../../mcp-server/src/context-pack-policy";
|
|
3
|
+
import { type ContextRankingProfile } from "../../../mcp-server/src/context-pack-schema";
|
|
4
|
+
export type ContextPackTopicRow = {
|
|
5
5
|
_id: string;
|
|
6
6
|
name?: string;
|
|
7
7
|
parentTopicId?: string;
|
|
@@ -64,7 +64,7 @@ type ContextPackFailureRow = {
|
|
|
64
64
|
updatedAt?: number;
|
|
65
65
|
createdAt?: number;
|
|
66
66
|
};
|
|
67
|
-
type CompileContextPackPlan = {
|
|
67
|
+
export type CompileContextPackPlan = {
|
|
68
68
|
topicId: string;
|
|
69
69
|
queryText?: string;
|
|
70
70
|
tokens: string[];
|
|
@@ -81,12 +81,12 @@ type CompileContextPackPlan = {
|
|
|
81
81
|
effectiveWeights: ReturnType<typeof resolveEffectiveWeights>;
|
|
82
82
|
scopedTopicIds: string[];
|
|
83
83
|
};
|
|
84
|
-
type CompileContextPackPlanInput = {
|
|
84
|
+
export type CompileContextPackPlanInput = {
|
|
85
85
|
args: Record<string, unknown> | undefined;
|
|
86
86
|
topic: ContextPackTopicRow;
|
|
87
87
|
allTopics: ContextPackTopicRow[];
|
|
88
88
|
};
|
|
89
|
-
type CompileContextPackSnapshot = {
|
|
89
|
+
export type CompileContextPackSnapshot = {
|
|
90
90
|
topic: ContextPackTopicRow;
|
|
91
91
|
plan: CompileContextPackPlan;
|
|
92
92
|
beliefs: ContextPackBeliefRow[];
|
|
@@ -96,7 +96,6 @@ type CompileContextPackSnapshot = {
|
|
|
96
96
|
entities: ContextPackEntityRow[];
|
|
97
97
|
failures?: ContextPackFailureRow[];
|
|
98
98
|
};
|
|
99
|
-
declare function planContextPackCompilation(input: CompileContextPackPlanInput): CompileContextPackPlan;
|
|
100
|
-
declare function compileContextPackFromSnapshot(snapshot: CompileContextPackSnapshot): ContextPackV1;
|
|
101
|
-
|
|
102
|
-
export { type CompileContextPackPlan, type CompileContextPackPlanInput, type CompileContextPackSnapshot, type ContextPackTopicRow, compileContextPackFromSnapshot, planContextPackCompilation };
|
|
99
|
+
export declare function planContextPackCompilation(input: CompileContextPackPlanInput): CompileContextPackPlan;
|
|
100
|
+
export declare function compileContextPackFromSnapshot(snapshot: CompileContextPackSnapshot): ContextPackV1;
|
|
101
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ContextCompilationMode, ContextPackV1, ContextRankingProfile, PackWeightOverride } from "../../../contracts/src/context-pack.contract";
|
|
2
|
+
export type CompileContextCommand = {
|
|
3
|
+
topicId?: string;
|
|
4
|
+
projectId?: string;
|
|
5
|
+
query?: string;
|
|
6
|
+
budget?: number;
|
|
7
|
+
ranking?: ContextRankingProfile;
|
|
8
|
+
limit?: number;
|
|
9
|
+
maxDepth?: number;
|
|
10
|
+
includeEntities?: boolean;
|
|
11
|
+
mode?: ContextCompilationMode;
|
|
12
|
+
includeFailures?: boolean;
|
|
13
|
+
worktreeId?: string;
|
|
14
|
+
sessionId?: string;
|
|
15
|
+
packWeightOverrides?: PackWeightOverride[];
|
|
16
|
+
/** @deprecated Use budget. */
|
|
17
|
+
tokenBudget?: number;
|
|
18
|
+
/** @deprecated Use ranking. */
|
|
19
|
+
rankingProfile?: ContextRankingProfile;
|
|
20
|
+
actorPrincipalId?: string;
|
|
21
|
+
policyTraceId?: string | null;
|
|
22
|
+
allowedTopicIds?: string[];
|
|
23
|
+
};
|
|
24
|
+
export type CompileContextPortInput = {
|
|
25
|
+
topicId: string;
|
|
26
|
+
projectId: string;
|
|
27
|
+
query?: string;
|
|
28
|
+
budget?: number;
|
|
29
|
+
ranking?: ContextRankingProfile;
|
|
30
|
+
limit?: number;
|
|
31
|
+
maxDepth?: number;
|
|
32
|
+
includeEntities?: boolean;
|
|
33
|
+
mode?: ContextCompilationMode;
|
|
34
|
+
includeFailures?: boolean;
|
|
35
|
+
worktreeId?: string;
|
|
36
|
+
sessionId?: string;
|
|
37
|
+
packWeightOverrides?: PackWeightOverride[];
|
|
38
|
+
allowedTopicIds: string[];
|
|
39
|
+
};
|
|
40
|
+
export type ContextCompilerPort = {
|
|
41
|
+
compile(input: CompileContextPortInput): Promise<ContextPackV1>;
|
|
42
|
+
};
|
|
43
|
+
export type ContextPolicyPort = {
|
|
44
|
+
filterReadableTopicIds(input: {
|
|
45
|
+
topicIds: string[];
|
|
46
|
+
actorPrincipalId: string;
|
|
47
|
+
traceId?: string | null;
|
|
48
|
+
}): Promise<string[]>;
|
|
49
|
+
listReadableTopicIds(input: {
|
|
50
|
+
actorPrincipalId: string;
|
|
51
|
+
traceId?: string | null;
|
|
52
|
+
}): Promise<string[]>;
|
|
53
|
+
};
|
|
54
|
+
export type CompileContextPorts = {
|
|
55
|
+
compiler: ContextCompilerPort;
|
|
56
|
+
policy?: ContextPolicyPort;
|
|
57
|
+
requireAuth?: boolean;
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PublicCompiledContext, PublicContextBelief, PublicContextContradiction, PublicContextEntity, PublicContextEvidence, PublicContextInjectionPolicy, PublicContextQuestion, } from "../../../contracts/src/context-pack.contract";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
type PublicSeverity = "low" | "medium" | "high" | "critical";
|
|
2
|
+
type DefeatType = "rebuts" | "undercuts" | "undermines";
|
|
3
|
+
export type ContradictionRecord = {
|
|
4
|
+
id: string;
|
|
5
|
+
contradictionId: string;
|
|
6
|
+
topicId?: string;
|
|
7
|
+
beliefA: string;
|
|
8
|
+
beliefB: string;
|
|
9
|
+
description: string;
|
|
10
|
+
severity: PublicSeverity;
|
|
11
|
+
status: string;
|
|
12
|
+
defeatType: DefeatType;
|
|
13
|
+
createdAt?: number;
|
|
14
|
+
updatedAt?: number;
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
export type ContradictionListResult = {
|
|
18
|
+
contradictions: ContradictionRecord[];
|
|
19
|
+
nextCursor: null;
|
|
20
|
+
};
|
|
21
|
+
export type FlagContradictionInput = {
|
|
22
|
+
beliefA: string;
|
|
23
|
+
beliefB: string;
|
|
24
|
+
description: string;
|
|
25
|
+
topicId: string;
|
|
26
|
+
severity?: string;
|
|
27
|
+
defeatType?: string;
|
|
28
|
+
};
|
|
29
|
+
export type ListContradictionsQuery = {
|
|
30
|
+
topicId: string;
|
|
31
|
+
status?: string;
|
|
32
|
+
limit?: number;
|
|
33
|
+
cursor?: string;
|
|
34
|
+
};
|
|
35
|
+
type PortSeverity = "critical" | "significant" | "minor";
|
|
36
|
+
type FlagContradictionPortInput = {
|
|
37
|
+
beliefARawId: string;
|
|
38
|
+
beliefBRawId: string;
|
|
39
|
+
description: string;
|
|
40
|
+
topicId: string;
|
|
41
|
+
severity: PortSeverity;
|
|
42
|
+
publicSeverity: PublicSeverity;
|
|
43
|
+
defeatType: DefeatType;
|
|
44
|
+
};
|
|
45
|
+
export type ContradictionsPort = {
|
|
46
|
+
fetchBelief: (rawId: string) => Promise<unknown | null>;
|
|
47
|
+
flagContradiction: (input: FlagContradictionPortInput) => Promise<unknown>;
|
|
48
|
+
listByTopic: (args: {
|
|
49
|
+
topicId: string;
|
|
50
|
+
limit?: number;
|
|
51
|
+
}) => Promise<unknown[]>;
|
|
52
|
+
getById: (id: string) => Promise<unknown | null>;
|
|
53
|
+
};
|
|
54
|
+
export declare function flagContradiction(deps: ContradictionsPort, input: FlagContradictionInput): Promise<ContradictionRecord>;
|
|
55
|
+
export declare function listContradictions(deps: ContradictionsPort, query: ListContradictionsQuery): Promise<ContradictionListResult>;
|
|
56
|
+
export declare function getContradiction(deps: ContradictionsPort, input: {
|
|
57
|
+
id: string;
|
|
58
|
+
}): Promise<ContradictionRecord>;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
type EdgeDirection = "up" | "down" | "both";
|
|
2
|
+
export type EdgeRecord = {
|
|
3
|
+
id: string;
|
|
4
|
+
edgeId: string;
|
|
5
|
+
globalId?: string;
|
|
6
|
+
sourceId: string;
|
|
7
|
+
targetId: string;
|
|
8
|
+
edgeType: string;
|
|
9
|
+
topicId?: string;
|
|
10
|
+
confidence?: number;
|
|
11
|
+
weight?: number;
|
|
12
|
+
context?: string;
|
|
13
|
+
fromLayer?: string;
|
|
14
|
+
toLayer?: string;
|
|
15
|
+
isDuplicate?: boolean;
|
|
16
|
+
createdAt?: number;
|
|
17
|
+
updatedAt?: number;
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
|
+
};
|
|
20
|
+
export type EdgeListResult = {
|
|
21
|
+
edges: EdgeRecord[];
|
|
22
|
+
nextCursor: null;
|
|
23
|
+
};
|
|
24
|
+
export type EdgeTraversalNode = {
|
|
25
|
+
id: string;
|
|
26
|
+
nodeId: string;
|
|
27
|
+
globalId?: string;
|
|
28
|
+
nodeType?: string;
|
|
29
|
+
text?: string;
|
|
30
|
+
confidence?: number;
|
|
31
|
+
depth?: number;
|
|
32
|
+
topicId?: string;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
};
|
|
35
|
+
export type EdgeTraversalResult = {
|
|
36
|
+
startNode: string;
|
|
37
|
+
direction: EdgeDirection;
|
|
38
|
+
maxDepth: number;
|
|
39
|
+
nodes: EdgeTraversalNode[];
|
|
40
|
+
edges: EdgeRecord[];
|
|
41
|
+
depth: number;
|
|
42
|
+
};
|
|
43
|
+
export type CreateEdgeInput = {
|
|
44
|
+
sourceId: string;
|
|
45
|
+
targetId: string;
|
|
46
|
+
edgeType: string;
|
|
47
|
+
topicId?: string;
|
|
48
|
+
confidence?: number;
|
|
49
|
+
weight?: number;
|
|
50
|
+
context?: string;
|
|
51
|
+
};
|
|
52
|
+
export type ListEdgesQuery = {
|
|
53
|
+
sourceId: string;
|
|
54
|
+
edgeType?: string;
|
|
55
|
+
limit?: number;
|
|
56
|
+
cursor?: string;
|
|
57
|
+
};
|
|
58
|
+
export type TraverseEdgesInput = {
|
|
59
|
+
startNode: string;
|
|
60
|
+
direction?: string;
|
|
61
|
+
maxDepth?: number;
|
|
62
|
+
topicId?: string;
|
|
63
|
+
};
|
|
64
|
+
type EdgeCreatePortInput = {
|
|
65
|
+
sourceRawId: string;
|
|
66
|
+
targetRawId: string;
|
|
67
|
+
edgeType: string;
|
|
68
|
+
topicId?: string;
|
|
69
|
+
confidence?: number;
|
|
70
|
+
weight?: number;
|
|
71
|
+
context?: string;
|
|
72
|
+
};
|
|
73
|
+
type EdgeTraversePortInput = {
|
|
74
|
+
startNode: string;
|
|
75
|
+
direction: EdgeDirection;
|
|
76
|
+
maxDepth: number;
|
|
77
|
+
topicId?: string;
|
|
78
|
+
};
|
|
79
|
+
export type EdgePort = {
|
|
80
|
+
createEdge: (input: EdgeCreatePortInput) => Promise<unknown>;
|
|
81
|
+
listEdgesBySource: (args: {
|
|
82
|
+
sourceRawId: string;
|
|
83
|
+
edgeType?: string;
|
|
84
|
+
limit?: number;
|
|
85
|
+
}) => Promise<unknown[]>;
|
|
86
|
+
traverseEdges: (input: EdgeTraversePortInput) => Promise<unknown>;
|
|
87
|
+
};
|
|
88
|
+
export declare function createEdge(deps: EdgePort, input: CreateEdgeInput): Promise<EdgeRecord>;
|
|
89
|
+
export declare function listEdges(deps: EdgePort, query: ListEdgesQuery): Promise<EdgeListResult>;
|
|
90
|
+
export declare function traverseEdges(deps: EdgePort, input: TraverseEdgesInput): Promise<EdgeTraversalResult>;
|
|
91
|
+
export {};
|