@opengeni/contracts 0.28.1 → 0.31.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/dist/{chunk-3Q5FLMOD.js → chunk-H4NRLOOX.js} +2539 -2431
- package/dist/chunk-H4NRLOOX.js.map +1 -0
- package/dist/google-drive.js +1 -1
- package/dist/index.d.ts +104 -1
- package/dist/index.js +31 -1
- package/dist/scoped-knowledge.d.ts +233 -0
- package/package.json +1 -1
- package/src/index.ts +132 -36
- package/src/scoped-knowledge.ts +216 -0
- package/dist/chunk-3Q5FLMOD.js.map +0 -1
package/dist/google-drive.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2395,6 +2395,42 @@ export declare const McpServerConnectionRef: z.ZodObject<{
|
|
|
2395
2395
|
}>>;
|
|
2396
2396
|
}, z.core.$strict>;
|
|
2397
2397
|
export type McpServerConnectionRef = z.infer<typeof McpServerConnectionRef>;
|
|
2398
|
+
/** Internal frozen authority for one personal MCP connection. */
|
|
2399
|
+
export declare const McpPersonalConnectionDelegation: z.ZodObject<{
|
|
2400
|
+
serverId: z.ZodString;
|
|
2401
|
+
connectionId: z.ZodString;
|
|
2402
|
+
ownerSubjectId: z.ZodString;
|
|
2403
|
+
providerDomain: z.ZodString;
|
|
2404
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
2405
|
+
api_key: "api_key";
|
|
2406
|
+
app_install: "app_install";
|
|
2407
|
+
delegated: "delegated";
|
|
2408
|
+
oauth2: "oauth2";
|
|
2409
|
+
}>>;
|
|
2410
|
+
}, z.core.$strict>;
|
|
2411
|
+
export type McpPersonalConnectionDelegation = z.infer<typeof McpPersonalConnectionDelegation>;
|
|
2412
|
+
/**
|
|
2413
|
+
* Exact personal MCP authority frozen on one causal turn or scheduled task.
|
|
2414
|
+
* One server can have at most one grant; bounded validation keeps corrupt JSON
|
|
2415
|
+
* from becoming executable credential authority at a DB read boundary.
|
|
2416
|
+
*/
|
|
2417
|
+
export declare const McpPersonalConnectionDelegations: z.ZodArray<z.ZodObject<{
|
|
2418
|
+
serverId: z.ZodString;
|
|
2419
|
+
connectionId: z.ZodString;
|
|
2420
|
+
ownerSubjectId: z.ZodString;
|
|
2421
|
+
providerDomain: z.ZodString;
|
|
2422
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
2423
|
+
api_key: "api_key";
|
|
2424
|
+
app_install: "app_install";
|
|
2425
|
+
delegated: "delegated";
|
|
2426
|
+
oauth2: "oauth2";
|
|
2427
|
+
}>>;
|
|
2428
|
+
}, z.core.$strict>>;
|
|
2429
|
+
export declare const McpPersonalConnectionSummary: z.ZodObject<{
|
|
2430
|
+
serverId: z.ZodString;
|
|
2431
|
+
providerDomain: z.ZodString;
|
|
2432
|
+
}, z.core.$strict>;
|
|
2433
|
+
export type McpPersonalConnectionSummary = z.infer<typeof McpPersonalConnectionSummary>;
|
|
2398
2434
|
export type McpCredentialsRequest = {
|
|
2399
2435
|
accountId: string;
|
|
2400
2436
|
workspaceId: string;
|
|
@@ -2419,7 +2455,7 @@ export type McpCredentialsRequest = {
|
|
|
2419
2455
|
connectionRef: McpServerConnectionRef;
|
|
2420
2456
|
forceRefresh: boolean;
|
|
2421
2457
|
};
|
|
2422
|
-
export type McpCredentialAuthNeededReason = CredentialAuthNeededReason | "unsupported_auth" | "resource_scope_unavailable";
|
|
2458
|
+
export type McpCredentialAuthNeededReason = CredentialAuthNeededReason | "personal_authority_unavailable" | "unsupported_auth" | "resource_scope_unavailable";
|
|
2423
2459
|
export type McpCredentialResolution = {
|
|
2424
2460
|
status: "ok";
|
|
2425
2461
|
/** Scope echoes are mandatory and verified before any header is used. */
|
|
@@ -4017,6 +4053,10 @@ export declare const SessionTurn: z.ZodObject<{
|
|
|
4017
4053
|
}>;
|
|
4018
4054
|
}, z.core.$strip>;
|
|
4019
4055
|
initiatorContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
4056
|
+
personalConnections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
4057
|
+
serverId: z.ZodString;
|
|
4058
|
+
providerDomain: z.ZodString;
|
|
4059
|
+
}, z.core.$strict>>>;
|
|
4020
4060
|
cancelledBy: z.ZodNullable<z.ZodString>;
|
|
4021
4061
|
cancelReason: z.ZodNullable<z.ZodString>;
|
|
4022
4062
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -5197,6 +5237,10 @@ export declare const SessionQueueSnapshot: z.ZodObject<{
|
|
|
5197
5237
|
quiescencePendingCount: z.ZodNumber;
|
|
5198
5238
|
}, z.core.$strip>>;
|
|
5199
5239
|
}, z.core.$strip>;
|
|
5240
|
+
activePersonalConnections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
5241
|
+
serverId: z.ZodString;
|
|
5242
|
+
providerDomain: z.ZodString;
|
|
5243
|
+
}, z.core.$strict>>>;
|
|
5200
5244
|
stoppingPreviousAttempt: z.ZodBoolean;
|
|
5201
5245
|
items: z.ZodArray<z.ZodObject<{
|
|
5202
5246
|
id: z.ZodString;
|
|
@@ -5305,6 +5349,10 @@ export declare const SessionQueueSnapshot: z.ZodObject<{
|
|
|
5305
5349
|
}>;
|
|
5306
5350
|
}, z.core.$strip>;
|
|
5307
5351
|
initiatorContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
5352
|
+
personalConnections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
5353
|
+
serverId: z.ZodString;
|
|
5354
|
+
providerDomain: z.ZodString;
|
|
5355
|
+
}, z.core.$strict>>>;
|
|
5308
5356
|
cancelledBy: z.ZodNullable<z.ZodString>;
|
|
5309
5357
|
cancelReason: z.ZodNullable<z.ZodString>;
|
|
5310
5358
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -5859,6 +5907,19 @@ export declare const ScheduledTask: z.ZodObject<{
|
|
|
5859
5907
|
}, z.core.$strip>>;
|
|
5860
5908
|
maxNestedAgentDepth: z.ZodOptional<z.ZodNumber>;
|
|
5861
5909
|
}, z.core.$strip>;
|
|
5910
|
+
createdBy: z.ZodDefault<z.ZodObject<{
|
|
5911
|
+
subjectId: z.ZodString;
|
|
5912
|
+
label: z.ZodOptional<z.ZodString>;
|
|
5913
|
+
kind: z.ZodEnum<{
|
|
5914
|
+
service: "service";
|
|
5915
|
+
subject: "subject";
|
|
5916
|
+
}>;
|
|
5917
|
+
}, z.core.$strip>>;
|
|
5918
|
+
createdByContext: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5919
|
+
personalConnections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
5920
|
+
serverId: z.ZodString;
|
|
5921
|
+
providerDomain: z.ZodString;
|
|
5922
|
+
}, z.core.$strict>>>;
|
|
5862
5923
|
reusableSessionId: z.ZodNullable<z.ZodString>;
|
|
5863
5924
|
variableSetId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
5864
5925
|
environmentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -6244,6 +6305,11 @@ export declare const CapabilityPack: z.ZodPreprocess<z.ZodObject<{
|
|
|
6244
6305
|
category: z.ZodString;
|
|
6245
6306
|
version: z.ZodString;
|
|
6246
6307
|
sandboxImage: z.ZodOptional<z.ZodString>;
|
|
6308
|
+
sandboxProviderImages: z.ZodOptional<z.ZodObject<{
|
|
6309
|
+
modal: z.ZodOptional<z.ZodObject<{
|
|
6310
|
+
imageId: z.ZodString;
|
|
6311
|
+
}, z.core.$strict>>;
|
|
6312
|
+
}, z.core.$strict>>;
|
|
6247
6313
|
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6248
6314
|
name: z.ZodString;
|
|
6249
6315
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -6334,6 +6400,11 @@ export declare const RegisterCapabilityPackRequest: z.ZodPreprocess<z.ZodObject<
|
|
|
6334
6400
|
category: z.ZodString;
|
|
6335
6401
|
version: z.ZodString;
|
|
6336
6402
|
sandboxImage: z.ZodOptional<z.ZodString>;
|
|
6403
|
+
sandboxProviderImages: z.ZodOptional<z.ZodObject<{
|
|
6404
|
+
modal: z.ZodOptional<z.ZodObject<{
|
|
6405
|
+
imageId: z.ZodString;
|
|
6406
|
+
}, z.core.$strict>>;
|
|
6407
|
+
}, z.core.$strict>>;
|
|
6337
6408
|
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6338
6409
|
name: z.ZodString;
|
|
6339
6410
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -6427,6 +6498,11 @@ export declare const WorkspaceRegisteredPack: z.ZodObject<{
|
|
|
6427
6498
|
category: z.ZodString;
|
|
6428
6499
|
version: z.ZodString;
|
|
6429
6500
|
sandboxImage: z.ZodOptional<z.ZodString>;
|
|
6501
|
+
sandboxProviderImages: z.ZodOptional<z.ZodObject<{
|
|
6502
|
+
modal: z.ZodOptional<z.ZodObject<{
|
|
6503
|
+
imageId: z.ZodString;
|
|
6504
|
+
}, z.core.$strict>>;
|
|
6505
|
+
}, z.core.$strict>>;
|
|
6430
6506
|
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
6431
6507
|
name: z.ZodString;
|
|
6432
6508
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -6732,6 +6808,11 @@ export declare function comparePersonalSlackCanonicalConnections(left: PersonalS
|
|
|
6732
6808
|
export declare function selectCanonicalPersonalSlackConnection<T extends PersonalSlackCanonicalConnection>(connections: readonly T[]): T | null;
|
|
6733
6809
|
export declare const ConnectionCredentialBundle: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6734
6810
|
export type ConnectionCredentialBundle = z.infer<typeof ConnectionCredentialBundle>;
|
|
6811
|
+
export declare const ConnectionOwnership: z.ZodEnum<{
|
|
6812
|
+
personal: "personal";
|
|
6813
|
+
workspace: "workspace";
|
|
6814
|
+
}>;
|
|
6815
|
+
export type ConnectionOwnership = z.infer<typeof ConnectionOwnership>;
|
|
6735
6816
|
export declare const CreateConnectionRequest: z.ZodObject<{
|
|
6736
6817
|
providerDomain: z.ZodString;
|
|
6737
6818
|
kind: z.ZodEnum<{
|
|
@@ -6740,6 +6821,10 @@ export declare const CreateConnectionRequest: z.ZodObject<{
|
|
|
6740
6821
|
delegated: "delegated";
|
|
6741
6822
|
oauth2: "oauth2";
|
|
6742
6823
|
}>;
|
|
6824
|
+
ownership: z.ZodOptional<z.ZodEnum<{
|
|
6825
|
+
personal: "personal";
|
|
6826
|
+
workspace: "workspace";
|
|
6827
|
+
}>>;
|
|
6743
6828
|
subjectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6744
6829
|
credential: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6745
6830
|
grantedScopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -6854,6 +6939,10 @@ export declare const OAuthStartRequest: z.ZodObject<{
|
|
|
6854
6939
|
requestedScopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
6855
6940
|
returnPath: z.ZodOptional<z.ZodString>;
|
|
6856
6941
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
6942
|
+
ownership: z.ZodOptional<z.ZodEnum<{
|
|
6943
|
+
personal: "personal";
|
|
6944
|
+
workspace: "workspace";
|
|
6945
|
+
}>>;
|
|
6857
6946
|
oauthClient: z.ZodOptional<z.ZodObject<{
|
|
6858
6947
|
clientId: z.ZodString;
|
|
6859
6948
|
clientSecret: z.ZodOptional<z.ZodString>;
|
|
@@ -9566,6 +9655,7 @@ export declare const ToolAuthNeededPayload: z.ZodObject<{
|
|
|
9566
9655
|
expired: "expired";
|
|
9567
9656
|
insufficient_scope: "insufficient_scope";
|
|
9568
9657
|
missing_connection: "missing_connection";
|
|
9658
|
+
personal_authority_unavailable: "personal_authority_unavailable";
|
|
9569
9659
|
refresh_failed: "refresh_failed";
|
|
9570
9660
|
resource_scope_unavailable: "resource_scope_unavailable";
|
|
9571
9661
|
unsupported_auth: "unsupported_auth";
|
|
@@ -11305,6 +11395,10 @@ export declare const SessionQueueMutationResponse: z.ZodObject<{
|
|
|
11305
11395
|
quiescencePendingCount: z.ZodNumber;
|
|
11306
11396
|
}, z.core.$strip>>;
|
|
11307
11397
|
}, z.core.$strip>;
|
|
11398
|
+
activePersonalConnections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
11399
|
+
serverId: z.ZodString;
|
|
11400
|
+
providerDomain: z.ZodString;
|
|
11401
|
+
}, z.core.$strict>>>;
|
|
11308
11402
|
stoppingPreviousAttempt: z.ZodBoolean;
|
|
11309
11403
|
items: z.ZodArray<z.ZodObject<{
|
|
11310
11404
|
id: z.ZodString;
|
|
@@ -11413,6 +11507,10 @@ export declare const SessionQueueMutationResponse: z.ZodObject<{
|
|
|
11413
11507
|
}>;
|
|
11414
11508
|
}, z.core.$strip>;
|
|
11415
11509
|
initiatorContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11510
|
+
personalConnections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
11511
|
+
serverId: z.ZodString;
|
|
11512
|
+
providerDomain: z.ZodString;
|
|
11513
|
+
}, z.core.$strict>>>;
|
|
11416
11514
|
cancelledBy: z.ZodNullable<z.ZodString>;
|
|
11417
11515
|
cancelReason: z.ZodNullable<z.ZodString>;
|
|
11418
11516
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -12368,6 +12466,10 @@ export declare const SteerSessionMessageResponse: z.ZodObject<{
|
|
|
12368
12466
|
}>;
|
|
12369
12467
|
}, z.core.$strip>;
|
|
12370
12468
|
initiatorContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
12469
|
+
personalConnections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12470
|
+
serverId: z.ZodString;
|
|
12471
|
+
providerDomain: z.ZodString;
|
|
12472
|
+
}, z.core.$strict>>>;
|
|
12371
12473
|
cancelledBy: z.ZodNullable<z.ZodString>;
|
|
12372
12474
|
cancelReason: z.ZodNullable<z.ZodString>;
|
|
12373
12475
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -14605,3 +14707,4 @@ export * from "./secret-redaction";
|
|
|
14605
14707
|
export * from "./workspace-instruction-policies";
|
|
14606
14708
|
export * from "./workspace-state";
|
|
14607
14709
|
export * from "./preference-registry";
|
|
14710
|
+
export * from "./scoped-knowledge";
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
ConnectionCredentialBundle,
|
|
54
54
|
ConnectionKind,
|
|
55
55
|
ConnectionMetadata,
|
|
56
|
+
ConnectionOwnership,
|
|
56
57
|
ConnectionResponse,
|
|
57
58
|
ConnectionStatus,
|
|
58
59
|
CorrectPreferenceRegistryRequest,
|
|
@@ -215,12 +216,21 @@ import {
|
|
|
215
216
|
InsightsSpendDriver,
|
|
216
217
|
InsightsWarmGroupRow,
|
|
217
218
|
IntegrationClientMetadata,
|
|
219
|
+
KnowledgeChangeProposalTargetKind,
|
|
220
|
+
KnowledgeClaimEvidencePolarity,
|
|
221
|
+
KnowledgeClaimOrigin,
|
|
222
|
+
KnowledgeClaimRelationType,
|
|
223
|
+
KnowledgeClaimReviewState,
|
|
224
|
+
KnowledgeFactObjectKind,
|
|
225
|
+
KnowledgeLifecycleEventType,
|
|
226
|
+
KnowledgeLifecycleState,
|
|
218
227
|
KnowledgeMemory,
|
|
219
228
|
KnowledgeMemoryKind,
|
|
220
229
|
KnowledgeMemorySearchRequest,
|
|
221
230
|
KnowledgeMemoryStatus,
|
|
222
231
|
KnowledgeSourceKind,
|
|
223
232
|
KnowledgeSourceRef,
|
|
233
|
+
KnowledgeSyncRunState,
|
|
224
234
|
LatencyMode,
|
|
225
235
|
LimitAction,
|
|
226
236
|
LimitDecision,
|
|
@@ -237,6 +247,9 @@ import {
|
|
|
237
247
|
ManagedAccount,
|
|
238
248
|
MarketingDailyAnalysisTaskRequest,
|
|
239
249
|
McpConnectionResourceScope,
|
|
250
|
+
McpPersonalConnectionDelegation,
|
|
251
|
+
McpPersonalConnectionDelegations,
|
|
252
|
+
McpPersonalConnectionSummary,
|
|
240
253
|
McpServerConnectionRef,
|
|
241
254
|
MetricSample,
|
|
242
255
|
MintEnrollTokenRequest,
|
|
@@ -383,6 +396,8 @@ import {
|
|
|
383
396
|
ScheduledTaskScheduleSpec,
|
|
384
397
|
ScheduledTaskStatus,
|
|
385
398
|
ScheduledTaskTriggerType,
|
|
399
|
+
ScopedKnowledgeActorKind,
|
|
400
|
+
ScopedKnowledgeScopeKind,
|
|
386
401
|
ServiceTurnInitiator,
|
|
387
402
|
ServiceTurnInitiatorContext,
|
|
388
403
|
Session,
|
|
@@ -688,7 +703,7 @@ import {
|
|
|
688
703
|
verifyRelayToken,
|
|
689
704
|
verifyStreamToken,
|
|
690
705
|
workspaceControlUtf8Bytes
|
|
691
|
-
} from "./chunk-
|
|
706
|
+
} from "./chunk-H4NRLOOX.js";
|
|
692
707
|
import {
|
|
693
708
|
OPENGENI_SLACK_BOT_FORBIDDEN_SCOPES,
|
|
694
709
|
OPENGENI_SLACK_BOT_REQUIRED_SCOPES,
|
|
@@ -751,6 +766,7 @@ export {
|
|
|
751
766
|
ConnectionCredentialBundle,
|
|
752
767
|
ConnectionKind,
|
|
753
768
|
ConnectionMetadata,
|
|
769
|
+
ConnectionOwnership,
|
|
754
770
|
ConnectionResponse,
|
|
755
771
|
ConnectionStatus,
|
|
756
772
|
CorrectPreferenceRegistryRequest,
|
|
@@ -913,12 +929,21 @@ export {
|
|
|
913
929
|
InsightsSpendDriver,
|
|
914
930
|
InsightsWarmGroupRow,
|
|
915
931
|
IntegrationClientMetadata,
|
|
932
|
+
KnowledgeChangeProposalTargetKind,
|
|
933
|
+
KnowledgeClaimEvidencePolarity,
|
|
934
|
+
KnowledgeClaimOrigin,
|
|
935
|
+
KnowledgeClaimRelationType,
|
|
936
|
+
KnowledgeClaimReviewState,
|
|
937
|
+
KnowledgeFactObjectKind,
|
|
938
|
+
KnowledgeLifecycleEventType,
|
|
939
|
+
KnowledgeLifecycleState,
|
|
916
940
|
KnowledgeMemory,
|
|
917
941
|
KnowledgeMemoryKind,
|
|
918
942
|
KnowledgeMemorySearchRequest,
|
|
919
943
|
KnowledgeMemoryStatus,
|
|
920
944
|
KnowledgeSourceKind,
|
|
921
945
|
KnowledgeSourceRef,
|
|
946
|
+
KnowledgeSyncRunState,
|
|
922
947
|
LatencyMode,
|
|
923
948
|
LimitAction,
|
|
924
949
|
LimitDecision,
|
|
@@ -935,6 +960,9 @@ export {
|
|
|
935
960
|
ManagedAccount,
|
|
936
961
|
MarketingDailyAnalysisTaskRequest,
|
|
937
962
|
McpConnectionResourceScope,
|
|
963
|
+
McpPersonalConnectionDelegation,
|
|
964
|
+
McpPersonalConnectionDelegations,
|
|
965
|
+
McpPersonalConnectionSummary,
|
|
938
966
|
McpServerConnectionRef,
|
|
939
967
|
MetricSample,
|
|
940
968
|
MintEnrollTokenRequest,
|
|
@@ -1084,6 +1112,8 @@ export {
|
|
|
1084
1112
|
ScheduledTaskScheduleSpec,
|
|
1085
1113
|
ScheduledTaskStatus,
|
|
1086
1114
|
ScheduledTaskTriggerType,
|
|
1115
|
+
ScopedKnowledgeActorKind,
|
|
1116
|
+
ScopedKnowledgeScopeKind,
|
|
1087
1117
|
ServiceTurnInitiator,
|
|
1088
1118
|
ServiceTurnInitiatorContext,
|
|
1089
1119
|
Session,
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Tenant scope for normalized knowledge and source provenance. */
|
|
3
|
+
export declare const ScopedKnowledgeScopeKind: z.ZodEnum<{
|
|
4
|
+
organization: "organization";
|
|
5
|
+
personal: "personal";
|
|
6
|
+
workspace: "workspace";
|
|
7
|
+
}>;
|
|
8
|
+
export type ScopedKnowledgeScopeKind = z.infer<typeof ScopedKnowledgeScopeKind>;
|
|
9
|
+
export type ScopedKnowledgeScope = {
|
|
10
|
+
kind: "organization";
|
|
11
|
+
workspaceId: null;
|
|
12
|
+
subjectId: null;
|
|
13
|
+
} | {
|
|
14
|
+
kind: "workspace";
|
|
15
|
+
workspaceId: string;
|
|
16
|
+
subjectId: null;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "personal";
|
|
19
|
+
workspaceId: string | null;
|
|
20
|
+
subjectId: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const ScopedKnowledgeActorKind: z.ZodEnum<{
|
|
23
|
+
human: "human";
|
|
24
|
+
service: "service";
|
|
25
|
+
}>;
|
|
26
|
+
export type ScopedKnowledgeActorKind = z.infer<typeof ScopedKnowledgeActorKind>;
|
|
27
|
+
/**
|
|
28
|
+
* Immutable write provenance. A service actor may retain a causal human, but
|
|
29
|
+
* the service identity never substitutes for that human on personal reads.
|
|
30
|
+
*/
|
|
31
|
+
export type ScopedKnowledgeActor = {
|
|
32
|
+
kind: ScopedKnowledgeActorKind;
|
|
33
|
+
subjectId: string;
|
|
34
|
+
initiatingHumanSubjectId: string | null;
|
|
35
|
+
};
|
|
36
|
+
export declare const KnowledgeLifecycleState: z.ZodEnum<{
|
|
37
|
+
active: "active";
|
|
38
|
+
deleted: "deleted";
|
|
39
|
+
revoked: "revoked";
|
|
40
|
+
}>;
|
|
41
|
+
export type KnowledgeLifecycleState = z.infer<typeof KnowledgeLifecycleState>;
|
|
42
|
+
export declare const KnowledgeLifecycleEventType: z.ZodEnum<{
|
|
43
|
+
acl_changed: "acl_changed";
|
|
44
|
+
deleted: "deleted";
|
|
45
|
+
object_version_added: "object_version_added";
|
|
46
|
+
restored: "restored";
|
|
47
|
+
revoked: "revoked";
|
|
48
|
+
sync_failed: "sync_failed";
|
|
49
|
+
sync_succeeded: "sync_succeeded";
|
|
50
|
+
}>;
|
|
51
|
+
export type KnowledgeLifecycleEventType = z.infer<typeof KnowledgeLifecycleEventType>;
|
|
52
|
+
export declare const KnowledgeSyncRunState: z.ZodEnum<{
|
|
53
|
+
failed: "failed";
|
|
54
|
+
started: "started";
|
|
55
|
+
succeeded: "succeeded";
|
|
56
|
+
}>;
|
|
57
|
+
export type KnowledgeSyncRunState = z.infer<typeof KnowledgeSyncRunState>;
|
|
58
|
+
export declare const KnowledgeClaimOrigin: z.ZodEnum<{
|
|
59
|
+
explicit: "explicit";
|
|
60
|
+
inferred: "inferred";
|
|
61
|
+
}>;
|
|
62
|
+
export type KnowledgeClaimOrigin = z.infer<typeof KnowledgeClaimOrigin>;
|
|
63
|
+
export declare const KnowledgeClaimRelationType: z.ZodEnum<{
|
|
64
|
+
conflicts_with: "conflicts_with";
|
|
65
|
+
supersedes: "supersedes";
|
|
66
|
+
}>;
|
|
67
|
+
export type KnowledgeClaimRelationType = z.infer<typeof KnowledgeClaimRelationType>;
|
|
68
|
+
export declare const KnowledgeClaimEvidencePolarity: z.ZodEnum<{
|
|
69
|
+
contradicts: "contradicts";
|
|
70
|
+
supports: "supports";
|
|
71
|
+
}>;
|
|
72
|
+
export type KnowledgeClaimEvidencePolarity = z.infer<typeof KnowledgeClaimEvidencePolarity>;
|
|
73
|
+
export declare const KnowledgeClaimReviewState: z.ZodEnum<{
|
|
74
|
+
approved: "approved";
|
|
75
|
+
proposed: "proposed";
|
|
76
|
+
rejected: "rejected";
|
|
77
|
+
revoked: "revoked";
|
|
78
|
+
}>;
|
|
79
|
+
export type KnowledgeClaimReviewState = z.infer<typeof KnowledgeClaimReviewState>;
|
|
80
|
+
export declare const KnowledgeFactObjectKind: z.ZodEnum<{
|
|
81
|
+
boolean: "boolean";
|
|
82
|
+
entity: "entity";
|
|
83
|
+
json: "json";
|
|
84
|
+
number: "number";
|
|
85
|
+
text: "text";
|
|
86
|
+
timestamp: "timestamp";
|
|
87
|
+
}>;
|
|
88
|
+
export type KnowledgeFactObjectKind = z.infer<typeof KnowledgeFactObjectKind>;
|
|
89
|
+
export declare const KnowledgeChangeProposalTargetKind: z.ZodEnum<{
|
|
90
|
+
instruction_policy: "instruction_policy";
|
|
91
|
+
preference: "preference";
|
|
92
|
+
}>;
|
|
93
|
+
export type KnowledgeChangeProposalTargetKind = z.infer<typeof KnowledgeChangeProposalTargetKind>;
|
|
94
|
+
export type KnowledgeProviderRecord = {
|
|
95
|
+
id: string;
|
|
96
|
+
accountId: string;
|
|
97
|
+
scope: ScopedKnowledgeScope;
|
|
98
|
+
providerKey: string;
|
|
99
|
+
externalTenantId: string;
|
|
100
|
+
lifecycleState: KnowledgeLifecycleState;
|
|
101
|
+
lifecycleGeneration: number;
|
|
102
|
+
createdAt: string;
|
|
103
|
+
updatedAt: string;
|
|
104
|
+
};
|
|
105
|
+
export type KnowledgeSourceRecord = {
|
|
106
|
+
id: string;
|
|
107
|
+
accountId: string;
|
|
108
|
+
providerId: string;
|
|
109
|
+
scope: ScopedKnowledgeScope;
|
|
110
|
+
externalSourceId: string;
|
|
111
|
+
sourceKind: string;
|
|
112
|
+
sourceUri: string | null;
|
|
113
|
+
currentAclGeneration: number | null;
|
|
114
|
+
syncGeneration: number;
|
|
115
|
+
syncCursor: string | null;
|
|
116
|
+
lifecycleState: KnowledgeLifecycleState;
|
|
117
|
+
lifecycleGeneration: number;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
updatedAt: string;
|
|
120
|
+
};
|
|
121
|
+
export type KnowledgeSourceAclVersionRecord = {
|
|
122
|
+
id: string;
|
|
123
|
+
accountId: string;
|
|
124
|
+
sourceId: string;
|
|
125
|
+
generation: number;
|
|
126
|
+
aclVersion: string | null;
|
|
127
|
+
aclHash: string;
|
|
128
|
+
audience: ScopedKnowledgeScope;
|
|
129
|
+
agentAccess: boolean;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
};
|
|
132
|
+
export type KnowledgeSyncRunRecord = {
|
|
133
|
+
id: string;
|
|
134
|
+
accountId: string;
|
|
135
|
+
sourceId: string;
|
|
136
|
+
operationId: string;
|
|
137
|
+
state: KnowledgeSyncRunState;
|
|
138
|
+
inputSyncGeneration: number;
|
|
139
|
+
inputLifecycleGeneration: number;
|
|
140
|
+
inputCursor: string | null;
|
|
141
|
+
outputCursor: string | null;
|
|
142
|
+
watermark: string | null;
|
|
143
|
+
metadata: Record<string, unknown>;
|
|
144
|
+
errorCode: string | null;
|
|
145
|
+
startedAt: string;
|
|
146
|
+
completedAt: string | null;
|
|
147
|
+
};
|
|
148
|
+
export type KnowledgeSourceObjectRecord = {
|
|
149
|
+
id: string;
|
|
150
|
+
accountId: string;
|
|
151
|
+
sourceId: string;
|
|
152
|
+
scope: ScopedKnowledgeScope;
|
|
153
|
+
externalObjectId: string;
|
|
154
|
+
documentId: string | null;
|
|
155
|
+
lifecycleState: KnowledgeLifecycleState;
|
|
156
|
+
lifecycleGeneration: number;
|
|
157
|
+
versionGeneration: number;
|
|
158
|
+
currentVersionId: string | null;
|
|
159
|
+
createdAt: string;
|
|
160
|
+
updatedAt: string;
|
|
161
|
+
};
|
|
162
|
+
export type KnowledgeDocumentVersionRecord = {
|
|
163
|
+
id: string;
|
|
164
|
+
accountId: string;
|
|
165
|
+
sourceId: string;
|
|
166
|
+
objectId: string;
|
|
167
|
+
scope: ScopedKnowledgeScope;
|
|
168
|
+
versionGeneration: number;
|
|
169
|
+
externalVersionId: string;
|
|
170
|
+
contentSha256: string;
|
|
171
|
+
ingestionKey: string;
|
|
172
|
+
aclVersionId: string;
|
|
173
|
+
aclGeneration: number;
|
|
174
|
+
documentId: string | null;
|
|
175
|
+
fileId: string | null;
|
|
176
|
+
createdAt: string;
|
|
177
|
+
};
|
|
178
|
+
export type KnowledgeEntityRecord = {
|
|
179
|
+
id: string;
|
|
180
|
+
accountId: string;
|
|
181
|
+
scope: ScopedKnowledgeScope;
|
|
182
|
+
entityType: string;
|
|
183
|
+
normalizedKey: string;
|
|
184
|
+
displayName: string;
|
|
185
|
+
createdAt: string;
|
|
186
|
+
};
|
|
187
|
+
export type KnowledgeFactRecord = {
|
|
188
|
+
id: string;
|
|
189
|
+
accountId: string;
|
|
190
|
+
scope: ScopedKnowledgeScope;
|
|
191
|
+
subjectEntityId: string;
|
|
192
|
+
predicateKey: string;
|
|
193
|
+
objectKind: KnowledgeFactObjectKind;
|
|
194
|
+
objectEntityId: string | null;
|
|
195
|
+
objectValue: unknown | null;
|
|
196
|
+
objectHash: string;
|
|
197
|
+
createdAt: string;
|
|
198
|
+
};
|
|
199
|
+
export type KnowledgeClaimRecord = {
|
|
200
|
+
id: string;
|
|
201
|
+
accountId: string;
|
|
202
|
+
scope: ScopedKnowledgeScope;
|
|
203
|
+
factId: string;
|
|
204
|
+
origin: KnowledgeClaimOrigin;
|
|
205
|
+
confidenceBps: number;
|
|
206
|
+
effectiveAt: string;
|
|
207
|
+
expiresAt: string | null;
|
|
208
|
+
extractionMethod: string;
|
|
209
|
+
modelProvider: string | null;
|
|
210
|
+
modelName: string | null;
|
|
211
|
+
modelVersion: string | null;
|
|
212
|
+
createdAt: string;
|
|
213
|
+
};
|
|
214
|
+
export type EligibleKnowledgeClaim = {
|
|
215
|
+
claim: KnowledgeClaimRecord;
|
|
216
|
+
fact: KnowledgeFactRecord;
|
|
217
|
+
reviewState: "approved";
|
|
218
|
+
supportingEvidenceCount: number;
|
|
219
|
+
};
|
|
220
|
+
export type KnowledgeChangeProposalRecord = {
|
|
221
|
+
id: string;
|
|
222
|
+
accountId: string;
|
|
223
|
+
scope: ScopedKnowledgeScope;
|
|
224
|
+
targetKind: KnowledgeChangeProposalTargetKind;
|
|
225
|
+
targetScope: string;
|
|
226
|
+
targetKey: string | null;
|
|
227
|
+
content: string;
|
|
228
|
+
contentHash: string;
|
|
229
|
+
claimId: string;
|
|
230
|
+
evidenceId: string;
|
|
231
|
+
status: "proposed";
|
|
232
|
+
createdAt: string;
|
|
233
|
+
};
|