@lucern/contracts 1.0.48 → 1.0.51
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/CHANGELOG.md +9 -0
- package/dist/function-registry/beliefs.d.ts +77 -0
- package/dist/function-registry/beliefs.js +17 -12
- package/dist/function-registry/coding.d.ts +183 -0
- package/dist/function-registry/coding.js +66 -39
- package/dist/function-registry/context.d.ts +9 -0
- package/dist/function-registry/context.js +3 -2
- package/dist/function-registry/contracts.d.ts +16 -12
- package/dist/function-registry/contracts.js +5 -2
- package/dist/function-registry/coordination.d.ts +9 -0
- package/dist/function-registry/coordination.js +1 -0
- package/dist/function-registry/edges.d.ts +140 -0
- package/dist/function-registry/edges.js +13 -9
- package/dist/function-registry/embeddings.d.ts +4 -0
- package/dist/function-registry/embeddings.js +1 -0
- package/dist/function-registry/evidence.d.ts +251 -0
- package/dist/function-registry/evidence.js +99 -10
- package/dist/function-registry/graph.d.ts +15 -0
- package/dist/function-registry/graph.js +5 -4
- package/dist/function-registry/helpers.d.ts +2 -0
- package/dist/function-registry/helpers.js +1 -0
- package/dist/function-registry/hybrid.d.ts +6 -0
- package/dist/function-registry/hybrid.js +1 -0
- package/dist/function-registry/identity.d.ts +4 -0
- package/dist/function-registry/identity.js +1 -0
- package/dist/function-registry/index.js +1 -0
- package/dist/function-registry/judgments.d.ts +2 -0
- package/dist/function-registry/judgments.js +3 -2
- package/dist/function-registry/legacy.d.ts +1 -0
- package/dist/function-registry/legacy.js +1 -0
- package/dist/function-registry/lenses.d.ts +4 -0
- package/dist/function-registry/lenses.js +1 -0
- package/dist/function-registry/nodes.d.ts +203 -0
- package/dist/function-registry/nodes.js +17 -11
- package/dist/function-registry/ontologies.d.ts +11 -0
- package/dist/function-registry/ontologies.js +18 -12
- package/dist/function-registry/pipeline.d.ts +3 -0
- package/dist/function-registry/pipeline.js +1 -0
- package/dist/function-registry/policy.d.ts +1 -0
- package/dist/function-registry/policy.js +1 -0
- package/dist/function-registry/questions.d.ts +104 -0
- package/dist/function-registry/questions.js +17 -12
- package/dist/function-registry/tasks.d.ts +86 -0
- package/dist/function-registry/tasks.js +2 -1
- package/dist/function-registry/topics.d.ts +7 -0
- package/dist/function-registry/topics.js +7 -2
- package/dist/function-registry/types.d.ts +46 -0
- package/dist/function-registry/worktrees.d.ts +440 -0
- package/dist/function-registry/worktrees.js +9 -3
- package/dist/generated/convexSchemas.d.ts +10 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -2
- package/dist/infisical-runtime.base.js +5 -0
- package/dist/infisical-runtime.contract.js +5 -0
- package/dist/infisical-runtime.tenant-secrets.js +5 -0
- package/dist/manifests/infisical-runtime-manifest.js +5 -0
- package/dist/manifests/tenant-client-manifest.d.ts +5 -1
- package/dist/manifests/tenant-client-manifest.js +5 -0
- package/dist/operator-receipt.contract.d.ts +32 -0
- package/dist/operator-receipt.contract.js +1 -0
- package/dist/projections/create-evidence.projection.d.ts +12 -12
- package/dist/projections/index.d.ts +2 -2
- package/dist/proof-attestation.json +1 -1
- package/dist/tenant-client.contract.d.ts +5 -1
- package/dist/tenant-client.contract.js +5 -0
- package/dist/worktree-belief-adoption.contract.d.ts +22 -21
- package/dist/worktree-belief-adoption.contract.js +3 -2
- package/package.json +1 -1
|
@@ -1,10 +1,93 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const createTaskArgs: z.ZodObject<{
|
|
3
|
+
title: z.ZodString;
|
|
4
|
+
topicId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
taskType: z.ZodOptional<z.ZodEnum<["general", "find_evidence", "verify_claim", "research", "review", "interview", "analysis", "track_metrics"]>>;
|
|
7
|
+
priority: z.ZodOptional<z.ZodEnum<["urgent", "high", "medium", "low"]>>;
|
|
8
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "in_progress", "blocked", "done"]>>;
|
|
9
|
+
linkedWorktreeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
10
|
+
linkedBeliefId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
11
|
+
linkedQuestionId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
12
|
+
assigneeId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
dueDate: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
title: string;
|
|
18
|
+
priority?: "high" | "low" | "medium" | "urgent" | undefined;
|
|
19
|
+
metadata?: Record<string, unknown> | undefined;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
status?: "done" | "blocked" | "todo" | "in_progress" | undefined;
|
|
22
|
+
topicId?: string | undefined;
|
|
23
|
+
tags?: string[] | undefined;
|
|
24
|
+
taskType?: "analysis" | "general" | "find_evidence" | "verify_claim" | "research" | "review" | "interview" | "track_metrics" | undefined;
|
|
25
|
+
linkedWorktreeId?: string | undefined;
|
|
26
|
+
linkedBeliefId?: string | undefined;
|
|
27
|
+
linkedQuestionId?: string | undefined;
|
|
28
|
+
assigneeId?: string | undefined;
|
|
29
|
+
dueDate?: number | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
title: string;
|
|
32
|
+
priority?: "high" | "low" | "medium" | "urgent" | undefined;
|
|
33
|
+
metadata?: Record<string, unknown> | undefined;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
status?: "done" | "blocked" | "todo" | "in_progress" | undefined;
|
|
36
|
+
topicId?: string | undefined;
|
|
37
|
+
tags?: string[] | undefined;
|
|
38
|
+
taskType?: "analysis" | "general" | "find_evidence" | "verify_claim" | "research" | "review" | "interview" | "track_metrics" | undefined;
|
|
39
|
+
linkedWorktreeId?: string | undefined;
|
|
40
|
+
linkedBeliefId?: string | undefined;
|
|
41
|
+
linkedQuestionId?: string | undefined;
|
|
42
|
+
assigneeId?: string | undefined;
|
|
43
|
+
dueDate?: number | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export type CreateTaskArgs = z.infer<typeof createTaskArgs>;
|
|
46
|
+
export declare const updateTaskArgs: z.ZodObject<{
|
|
47
|
+
taskId: z.ZodString;
|
|
48
|
+
title: z.ZodOptional<z.ZodString>;
|
|
49
|
+
description: z.ZodOptional<z.ZodString>;
|
|
50
|
+
priority: z.ZodOptional<z.ZodEnum<["urgent", "high", "medium", "low"]>>;
|
|
51
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "in_progress", "blocked", "done"]>>;
|
|
52
|
+
linkedWorktreeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
53
|
+
linkedBeliefId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
54
|
+
linkedQuestionId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
55
|
+
assigneeId: z.ZodOptional<z.ZodString>;
|
|
56
|
+
blockedReason: z.ZodOptional<z.ZodString>;
|
|
57
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
taskId: string;
|
|
60
|
+
priority?: "high" | "low" | "medium" | "urgent" | undefined;
|
|
61
|
+
title?: string | undefined;
|
|
62
|
+
metadata?: Record<string, unknown> | undefined;
|
|
63
|
+
description?: string | undefined;
|
|
64
|
+
status?: "done" | "blocked" | "todo" | "in_progress" | undefined;
|
|
65
|
+
linkedWorktreeId?: string | undefined;
|
|
66
|
+
linkedBeliefId?: string | undefined;
|
|
67
|
+
linkedQuestionId?: string | undefined;
|
|
68
|
+
assigneeId?: string | undefined;
|
|
69
|
+
blockedReason?: string | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
taskId: string;
|
|
72
|
+
priority?: "high" | "low" | "medium" | "urgent" | undefined;
|
|
73
|
+
title?: string | undefined;
|
|
74
|
+
metadata?: Record<string, unknown> | undefined;
|
|
75
|
+
description?: string | undefined;
|
|
76
|
+
status?: "done" | "blocked" | "todo" | "in_progress" | undefined;
|
|
77
|
+
linkedWorktreeId?: string | undefined;
|
|
78
|
+
linkedBeliefId?: string | undefined;
|
|
79
|
+
linkedQuestionId?: string | undefined;
|
|
80
|
+
assigneeId?: string | undefined;
|
|
81
|
+
blockedReason?: string | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
export type UpdateTaskArgs = z.infer<typeof updateTaskArgs>;
|
|
2
84
|
export declare const tasksContracts: readonly [{
|
|
3
85
|
name: string;
|
|
4
86
|
kind: import("./types.js").FunctionKind;
|
|
5
87
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
6
88
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
7
89
|
invariants: readonly string[] | undefined;
|
|
90
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
8
91
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
9
92
|
domain: string;
|
|
10
93
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -50,6 +133,7 @@ export declare const tasksContracts: readonly [{
|
|
|
50
133
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
51
134
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
52
135
|
invariants: readonly string[] | undefined;
|
|
136
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
53
137
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
54
138
|
domain: string;
|
|
55
139
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -95,6 +179,7 @@ export declare const tasksContracts: readonly [{
|
|
|
95
179
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
96
180
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
97
181
|
invariants: readonly string[] | undefined;
|
|
182
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
98
183
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
99
184
|
domain: string;
|
|
100
185
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -140,6 +225,7 @@ export declare const tasksContracts: readonly [{
|
|
|
140
225
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
141
226
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
142
227
|
invariants: readonly string[] | undefined;
|
|
228
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
143
229
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
144
230
|
domain: string;
|
|
145
231
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -6194,6 +6194,7 @@ function surfaceContract(args) {
|
|
|
6194
6194
|
idempotent: args.idempotent ?? args.kind !== "query",
|
|
6195
6195
|
effects: resolvedEffects,
|
|
6196
6196
|
invariants: args.invariants,
|
|
6197
|
+
boundary: args.boundary,
|
|
6197
6198
|
surfaceIntent: manifestEntry.surfaceIntent,
|
|
6198
6199
|
domain: args.domain,
|
|
6199
6200
|
surfaceClass: manifestEntry.surfaceClass,
|
|
@@ -6387,4 +6388,4 @@ var tasksContracts = [
|
|
|
6387
6388
|
})
|
|
6388
6389
|
];
|
|
6389
6390
|
|
|
6390
|
-
export { tasksContracts };
|
|
6391
|
+
export { createTaskArgs, tasksContracts, updateTaskArgs };
|
|
@@ -5,6 +5,7 @@ export declare const topicsContracts: readonly [{
|
|
|
5
5
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
6
6
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
7
7
|
invariants: readonly string[] | undefined;
|
|
8
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
8
9
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
9
10
|
domain: string;
|
|
10
11
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -50,6 +51,7 @@ export declare const topicsContracts: readonly [{
|
|
|
50
51
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
51
52
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
52
53
|
invariants: readonly string[] | undefined;
|
|
54
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
53
55
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
54
56
|
domain: string;
|
|
55
57
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -95,6 +97,7 @@ export declare const topicsContracts: readonly [{
|
|
|
95
97
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
96
98
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
97
99
|
invariants: readonly string[] | undefined;
|
|
100
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
98
101
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
99
102
|
domain: string;
|
|
100
103
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -140,6 +143,7 @@ export declare const topicsContracts: readonly [{
|
|
|
140
143
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
141
144
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
142
145
|
invariants: readonly string[] | undefined;
|
|
146
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
143
147
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
144
148
|
domain: string;
|
|
145
149
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -185,6 +189,7 @@ export declare const topicsContracts: readonly [{
|
|
|
185
189
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
186
190
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
187
191
|
invariants: readonly string[] | undefined;
|
|
192
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
188
193
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
189
194
|
domain: string;
|
|
190
195
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -230,6 +235,7 @@ export declare const topicsContracts: readonly [{
|
|
|
230
235
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
231
236
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
232
237
|
invariants: readonly string[] | undefined;
|
|
238
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
233
239
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
234
240
|
domain: string;
|
|
235
241
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -275,6 +281,7 @@ export declare const topicsContracts: readonly [{
|
|
|
275
281
|
idempotent: import("./types.js").FunctionIdempotency;
|
|
276
282
|
effects: readonly import("../dsl.js").FunctionEffect[];
|
|
277
283
|
invariants: readonly string[] | undefined;
|
|
284
|
+
boundary: import("./types.js").BoundarySpec | undefined;
|
|
278
285
|
surfaceIntent: import("./types.js").FunctionSurfaceIntent;
|
|
279
286
|
domain: string;
|
|
280
287
|
surfaceClass: import("./types.js").SurfaceClass;
|
|
@@ -6161,6 +6161,7 @@ function surfaceContract(args) {
|
|
|
6161
6161
|
idempotent: args.idempotent ?? args.kind !== "query",
|
|
6162
6162
|
effects: resolvedEffects,
|
|
6163
6163
|
invariants: args.invariants,
|
|
6164
|
+
boundary: args.boundary,
|
|
6164
6165
|
surfaceIntent: manifestEntry.surfaceIntent,
|
|
6165
6166
|
domain: args.domain,
|
|
6166
6167
|
surfaceClass: manifestEntry.surfaceClass,
|
|
@@ -6210,6 +6211,8 @@ var topicVisibilitySchema = z.enum([
|
|
|
6210
6211
|
"public"
|
|
6211
6212
|
]);
|
|
6212
6213
|
var topicStatusSchema = z.enum(["active", "archived", "watching"]);
|
|
6214
|
+
var topicListReturns = z.array(z.record(z.unknown()));
|
|
6215
|
+
var topicTreeReturns = z.union([topicListReturns, z.null()]);
|
|
6213
6216
|
var topicTypeSchema = z.enum(TOPIC_TYPE_VALUES);
|
|
6214
6217
|
var createTopicArgs = z.object({
|
|
6215
6218
|
globalId: uuidV7StringSchema.optional().describe(
|
|
@@ -6338,7 +6341,8 @@ var topicsContracts = [
|
|
|
6338
6341
|
kind: "query",
|
|
6339
6342
|
inputProjection: listTopicsInput
|
|
6340
6343
|
},
|
|
6341
|
-
args: listTopicsArgs
|
|
6344
|
+
args: listTopicsArgs,
|
|
6345
|
+
returns: topicListReturns
|
|
6342
6346
|
}),
|
|
6343
6347
|
surfaceContract({
|
|
6344
6348
|
name: "update_topic",
|
|
@@ -6374,7 +6378,8 @@ var topicsContracts = [
|
|
|
6374
6378
|
kind: "query",
|
|
6375
6379
|
inputProjection: topicTreeInput
|
|
6376
6380
|
},
|
|
6377
|
-
args: getTopicTreeArgs
|
|
6381
|
+
args: getTopicTreeArgs,
|
|
6382
|
+
returns: topicTreeReturns
|
|
6378
6383
|
}),
|
|
6379
6384
|
surfaceContract({
|
|
6380
6385
|
name: "materialize_topic_graph",
|
|
@@ -42,6 +42,45 @@ export type FunctionMcpContract = McpToolContract & {
|
|
|
42
42
|
exposed: boolean;
|
|
43
43
|
toolName: string;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* The kinds of graph node a public identity can reference. Canonical home for
|
|
47
|
+
* the set the boundary's `UuidV7`/`GraphIdentity` brand and the resolver share.
|
|
48
|
+
*/
|
|
49
|
+
export type GraphIdentityKind = "topic" | "node" | "belief" | "question" | "evidence" | "edge" | "worktree" | "task" | "contradiction" | "ontology";
|
|
50
|
+
/** How a graph identity reference is resolved at the boundary. */
|
|
51
|
+
export type GraphIdentityResolveMode = "public-runtime" | "internal-migration";
|
|
52
|
+
/** One graph-identity argument the boundary must brand + resolve. */
|
|
53
|
+
export interface IdentityRefSpec {
|
|
54
|
+
array?: boolean;
|
|
55
|
+
kind: GraphIdentityKind;
|
|
56
|
+
/** Defaults to "public-runtime" (UUIDv7 globalId only; legacy _id forbidden). */
|
|
57
|
+
mode?: GraphIdentityResolveMode;
|
|
58
|
+
optional?: boolean;
|
|
59
|
+
/** Dot-path to the field in the contract args (e.g. "worktreeId", "beliefRelations.beliefId"). */
|
|
60
|
+
path: string;
|
|
61
|
+
}
|
|
62
|
+
export type ScopeRuleKey = "topic-required" | "worktree" | "task" | "global";
|
|
63
|
+
export interface ScopeSpec {
|
|
64
|
+
path?: string;
|
|
65
|
+
rule: ScopeRuleKey;
|
|
66
|
+
}
|
|
67
|
+
export type AdmissionRuleKey = "signed-evidence" | "no-floating-evidence" | "source-span" | "ontology-release" | "projection-parity" | "uuidv7-endpoints";
|
|
68
|
+
export type ReceiptRuleKey = "operator-v1" | "retrieval" | "write";
|
|
69
|
+
export interface ReceiptSpec {
|
|
70
|
+
rule: ReceiptRuleKey;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Declarative boundary semantics for a contract. The canonical Effect boundary
|
|
74
|
+
* codec (`@lucern/boundary`) reads this to compose identity → scope → admission
|
|
75
|
+
* → receipt refinements on top of the contract's Zod. This is the manifest
|
|
76
|
+
* self-describing its boundary; refinements are never hand-wired per surface.
|
|
77
|
+
*/
|
|
78
|
+
export interface BoundarySpec {
|
|
79
|
+
admission?: readonly AdmissionRuleKey[];
|
|
80
|
+
identity?: readonly IdentityRefSpec[];
|
|
81
|
+
receipts?: readonly ReceiptSpec[];
|
|
82
|
+
scope?: readonly ScopeSpec[];
|
|
83
|
+
}
|
|
45
84
|
export interface FunctionContract {
|
|
46
85
|
args: z.ZodTypeAny;
|
|
47
86
|
auth: {
|
|
@@ -67,6 +106,13 @@ export interface FunctionContract {
|
|
|
67
106
|
grantCore: "checkProjectAccessDetailed";
|
|
68
107
|
};
|
|
69
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* Declarative boundary semantics consumed by the canonical Effect boundary
|
|
111
|
+
* (`@lucern/boundary`). Optional during migration; the
|
|
112
|
+
* `all-contracts-have-boundary-codec` gate requires every graph-writing
|
|
113
|
+
* contract to populate it before the legacy facet decoders are deleted.
|
|
114
|
+
*/
|
|
115
|
+
boundary?: BoundarySpec;
|
|
70
116
|
cli?: {
|
|
71
117
|
subcommand: string;
|
|
72
118
|
description: string;
|