@coasys/ad4m-connect 0.13.0-test-9 → 0.13.0-test-interpretation
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/core.js +354 -9
- package/dist/core.js.map +3 -3
- package/dist/index.js +354 -9
- package/dist/index.js.map +3 -3
- package/dist/utils.js +1 -1
- package/dist/web.js +353 -8
- package/dist/web.js.map +3 -3
- package/package.json +2 -2
package/dist/utils.js
CHANGED
package/dist/web.js
CHANGED
|
@@ -704,7 +704,7 @@ function autoBind(self, { include, exclude } = {}) {
|
|
|
704
704
|
}
|
|
705
705
|
|
|
706
706
|
// ../package.json
|
|
707
|
-
var version = "0.13.0-test-
|
|
707
|
+
var version = "0.13.0-test-interpretation";
|
|
708
708
|
|
|
709
709
|
// src/utils.ts
|
|
710
710
|
function localStorageSupported() {
|
|
@@ -1568,15 +1568,16 @@ var ApiClient = class {
|
|
|
1568
1568
|
if (this._wsReady)
|
|
1569
1569
|
await this._wsReady;
|
|
1570
1570
|
}
|
|
1571
|
-
async call(type, params) {
|
|
1571
|
+
async call(type, params, timeoutMs) {
|
|
1572
1572
|
await this._ready();
|
|
1573
1573
|
const id = nextId();
|
|
1574
1574
|
const message = { id, type, params: params || {} };
|
|
1575
|
+
const effectiveTimeout = timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
1575
1576
|
return new Promise((resolve, reject) => {
|
|
1576
1577
|
const timer = setTimeout(() => {
|
|
1577
1578
|
this._pendingCalls.delete(id);
|
|
1578
|
-
reject(new RpcError(408, `RPC call '${type}' timed out after ${
|
|
1579
|
-
},
|
|
1579
|
+
reject(new RpcError(408, `RPC call '${type}' timed out after ${effectiveTimeout}ms`));
|
|
1580
|
+
}, effectiveTimeout);
|
|
1580
1581
|
this._pendingCalls.set(id, {
|
|
1581
1582
|
resolve,
|
|
1582
1583
|
reject,
|
|
@@ -2299,6 +2300,13 @@ var SHACLShape = class {
|
|
|
2299
2300
|
target: `literal:string:${JSON.stringify(this.destructor_actions)}`
|
|
2300
2301
|
});
|
|
2301
2302
|
}
|
|
2303
|
+
if (this.interpretationHint) {
|
|
2304
|
+
links.push({
|
|
2305
|
+
source: this.nodeShapeUri,
|
|
2306
|
+
predicate: "ad4m://interpretation_hint",
|
|
2307
|
+
target: `literal:string:${this.interpretationHint}`
|
|
2308
|
+
});
|
|
2309
|
+
}
|
|
2302
2310
|
for (let i4 = 0; i4 < this.properties.length; i4++) {
|
|
2303
2311
|
const prop = this.properties[i4];
|
|
2304
2312
|
let propShapeId;
|
|
@@ -2487,6 +2495,20 @@ var SHACLShape = class {
|
|
|
2487
2495
|
target: `literal:string:${JSON.stringify(prop.transform)}`
|
|
2488
2496
|
});
|
|
2489
2497
|
}
|
|
2498
|
+
if (prop.interpretationHint) {
|
|
2499
|
+
links.push({
|
|
2500
|
+
source: propShapeId,
|
|
2501
|
+
predicate: "ad4m://interpretation_hint",
|
|
2502
|
+
target: `literal:string:${prop.interpretationHint}`
|
|
2503
|
+
});
|
|
2504
|
+
}
|
|
2505
|
+
if (prop.identity) {
|
|
2506
|
+
links.push({
|
|
2507
|
+
source: propShapeId,
|
|
2508
|
+
predicate: "ad4m://identity",
|
|
2509
|
+
target: `literal:string:true`
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2490
2512
|
}
|
|
2491
2513
|
return links;
|
|
2492
2514
|
}
|
|
@@ -2509,6 +2531,10 @@ var SHACLShape = class {
|
|
|
2509
2531
|
} catch (e7) {
|
|
2510
2532
|
}
|
|
2511
2533
|
}
|
|
2534
|
+
const classHintLink = links.find((l5) => l5.source === shapeUri && l5.predicate === "ad4m://interpretation_hint");
|
|
2535
|
+
if (classHintLink) {
|
|
2536
|
+
shape.interpretationHint = classHintLink.target.replace(/^literal:\/\/string:|^literal:string:/, "");
|
|
2537
|
+
}
|
|
2512
2538
|
const propShapeLinks = links.filter((l5) => l5.source === shapeUri && l5.predicate === "sh://property");
|
|
2513
2539
|
for (const propLink of propShapeLinks) {
|
|
2514
2540
|
const propShapeId = propLink.target;
|
|
@@ -2669,6 +2695,14 @@ var SHACLShape = class {
|
|
|
2669
2695
|
val = val.substring(8);
|
|
2670
2696
|
prop.filter = val === "true";
|
|
2671
2697
|
}
|
|
2698
|
+
const interpretationHintLink = links.find((l5) => l5.source === propShapeId && l5.predicate === "ad4m://interpretation_hint");
|
|
2699
|
+
if (interpretationHintLink) {
|
|
2700
|
+
prop.interpretationHint = interpretationHintLink.target.replace(/^literal:\/\/string:|^literal:string:/, "");
|
|
2701
|
+
}
|
|
2702
|
+
const identityLink = links.find((l5) => l5.source === propShapeId && l5.predicate === "ad4m://identity");
|
|
2703
|
+
if (identityLink) {
|
|
2704
|
+
prop.identity = identityLink.target.replace(/^literal:\/\/string:|^literal:string:/, "") === "true";
|
|
2705
|
+
}
|
|
2672
2706
|
const transformLink = links.find((l5) => l5.source === propShapeId && l5.predicate === "ad4m://transform");
|
|
2673
2707
|
if (transformLink) {
|
|
2674
2708
|
const jsonStr = transformLink.target.replace(/^literal:\/\/string:|^literal:string:/, "");
|
|
@@ -2691,6 +2725,7 @@ var SHACLShape = class {
|
|
|
2691
2725
|
node_shape_uri: this.nodeShapeUri,
|
|
2692
2726
|
target_class: this.targetClass,
|
|
2693
2727
|
parent_shapes: this.parentShapes.length > 0 ? this.parentShapes : void 0,
|
|
2728
|
+
interpretation_hint: this.interpretationHint,
|
|
2694
2729
|
properties: this.properties.map((p2) => ({
|
|
2695
2730
|
path: p2.path,
|
|
2696
2731
|
name: p2.name,
|
|
@@ -2717,7 +2752,8 @@ var SHACLShape = class {
|
|
|
2717
2752
|
where_filter: p2.whereFilter,
|
|
2718
2753
|
where_predicates: p2.wherePredicates,
|
|
2719
2754
|
filter: p2.filter,
|
|
2720
|
-
transform: p2.transform
|
|
2755
|
+
transform: p2.transform,
|
|
2756
|
+
interpretation_hint: p2.interpretationHint
|
|
2721
2757
|
})),
|
|
2722
2758
|
constructor_actions: this.constructor_actions,
|
|
2723
2759
|
destructor_actions: this.destructor_actions
|
|
@@ -2755,7 +2791,8 @@ var SHACLShape = class {
|
|
|
2755
2791
|
whereFilter: p2.where_filter,
|
|
2756
2792
|
wherePredicates: p2.where_predicates,
|
|
2757
2793
|
filter: p2.filter,
|
|
2758
|
-
transform: p2.transform
|
|
2794
|
+
transform: p2.transform,
|
|
2795
|
+
interpretationHint: p2.interpretation_hint
|
|
2759
2796
|
});
|
|
2760
2797
|
}
|
|
2761
2798
|
if (json.constructor_actions) {
|
|
@@ -2769,10 +2806,13 @@ var SHACLShape = class {
|
|
|
2769
2806
|
shape.addParentShape(ps);
|
|
2770
2807
|
}
|
|
2771
2808
|
}
|
|
2809
|
+
if (json.interpretation_hint) {
|
|
2810
|
+
shape.interpretationHint = json.interpretation_hint;
|
|
2811
|
+
}
|
|
2772
2812
|
return shape;
|
|
2773
2813
|
}
|
|
2774
2814
|
};
|
|
2775
|
-
function buildSHACL(subjectName, target, properties, allRelationsMeta, conformanceFilterFn, seedCache) {
|
|
2815
|
+
function buildSHACL(subjectName, target, properties, allRelationsMeta, conformanceFilterFn, seedCache, interpretationHint) {
|
|
2776
2816
|
const obj = target.prototype;
|
|
2777
2817
|
let namespace = "ad4m://";
|
|
2778
2818
|
if (Object.keys(properties).length > 0) {
|
|
@@ -2795,6 +2835,9 @@ function buildSHACL(subjectName, target, properties, allRelationsMeta, conforman
|
|
|
2795
2835
|
const shapeUri = `${namespace}${subjectName}Shape`;
|
|
2796
2836
|
const targetClass = `${namespace}${subjectName}`;
|
|
2797
2837
|
const shape = new SHACLShape(shapeUri, targetClass);
|
|
2838
|
+
if (interpretationHint) {
|
|
2839
|
+
shape.interpretationHint = interpretationHint;
|
|
2840
|
+
}
|
|
2798
2841
|
if (seedCache) {
|
|
2799
2842
|
seedCache({ shape, name: subjectName });
|
|
2800
2843
|
}
|
|
@@ -2855,6 +2898,12 @@ function buildSHACL(subjectName, target, properties, allRelationsMeta, conforman
|
|
|
2855
2898
|
if (propMeta.transform) {
|
|
2856
2899
|
propShape.transform = propMeta.transform;
|
|
2857
2900
|
}
|
|
2901
|
+
if (propMeta.interpretationHint) {
|
|
2902
|
+
propShape.interpretationHint = propMeta.interpretationHint;
|
|
2903
|
+
}
|
|
2904
|
+
if (propMeta.identity) {
|
|
2905
|
+
propShape.identity = true;
|
|
2906
|
+
}
|
|
2858
2907
|
if (propMeta.prologSetter) {
|
|
2859
2908
|
console.warn(`[SHACL Generation] Custom Prolog setter for property '${propName}' in class '${subjectName}' is not yet supported. The property will be created without setter actions. Consider using standard writable properties or provide explicit SHACL JSON.`);
|
|
2860
2909
|
} else if (propMeta.writable && propMeta.through) {
|
|
@@ -3146,6 +3195,61 @@ function buildConformanceFilter(relationPredicate, targetClass) {
|
|
|
3146
3195
|
return void 0;
|
|
3147
3196
|
}
|
|
3148
3197
|
}
|
|
3198
|
+
function applyPropertyMetadata(opts) {
|
|
3199
|
+
return function(target, key) {
|
|
3200
|
+
const writable = opts.readOnly ? false : opts.through ? true : false;
|
|
3201
|
+
if (opts.required && !opts.initial) {
|
|
3202
|
+
throw new Error("SubjectProperty requires an 'initial' option if 'required' is true");
|
|
3203
|
+
}
|
|
3204
|
+
if (!opts.through && !opts.prologGetter && !opts.getter) {
|
|
3205
|
+
throw new Error("SubjectProperty requires either 'through' or 'prologGetter' or 'getter' option");
|
|
3206
|
+
}
|
|
3207
|
+
const ctor = target.constructor;
|
|
3208
|
+
if (!propertyRegistry.has(ctor))
|
|
3209
|
+
propertyRegistry.set(ctor, {});
|
|
3210
|
+
propertyRegistry.get(ctor)[key] = { ...opts, writable };
|
|
3211
|
+
if (writable) {
|
|
3212
|
+
const value = key;
|
|
3213
|
+
target[`set${capitalize(value)}`] = () => {
|
|
3214
|
+
};
|
|
3215
|
+
}
|
|
3216
|
+
Object.defineProperty(target, key, { configurable: true, writable: true });
|
|
3217
|
+
};
|
|
3218
|
+
}
|
|
3219
|
+
function Optional(opts) {
|
|
3220
|
+
return applyPropertyMetadata({
|
|
3221
|
+
...opts,
|
|
3222
|
+
required: opts.required ?? false,
|
|
3223
|
+
readOnly: opts.readOnly ?? false
|
|
3224
|
+
});
|
|
3225
|
+
}
|
|
3226
|
+
function Flag(opts) {
|
|
3227
|
+
return function(target, key) {
|
|
3228
|
+
if (!opts.through && !opts.value) {
|
|
3229
|
+
throw new Error("SubjectFlag requires a 'through' and 'value' option");
|
|
3230
|
+
}
|
|
3231
|
+
if (!opts.through) {
|
|
3232
|
+
throw new Error("SubjectFlag requires a 'through' option");
|
|
3233
|
+
}
|
|
3234
|
+
if (!opts.value) {
|
|
3235
|
+
throw new Error("SubjectFlag requires a 'value' option");
|
|
3236
|
+
}
|
|
3237
|
+
const entry = {
|
|
3238
|
+
through: opts.through,
|
|
3239
|
+
required: true,
|
|
3240
|
+
initial: opts.value,
|
|
3241
|
+
flag: true,
|
|
3242
|
+
readOnly: true,
|
|
3243
|
+
writable: false
|
|
3244
|
+
};
|
|
3245
|
+
const ctor = target.constructor;
|
|
3246
|
+
if (!propertyRegistry.has(ctor))
|
|
3247
|
+
propertyRegistry.set(ctor, {});
|
|
3248
|
+
propertyRegistry.get(ctor)[key] = entry;
|
|
3249
|
+
target[key] = opts.value;
|
|
3250
|
+
Object.defineProperty(target, key, { configurable: true, writable: true });
|
|
3251
|
+
};
|
|
3252
|
+
}
|
|
3149
3253
|
function Model$1(opts) {
|
|
3150
3254
|
return function(target) {
|
|
3151
3255
|
target.prototype.className = opts.name;
|
|
@@ -3154,11 +3258,76 @@ function Model$1(opts) {
|
|
|
3154
3258
|
return buildSDNA(opts.name, target.prototype, getPropertiesMetadata(target), getRelationsMetadata(target));
|
|
3155
3259
|
};
|
|
3156
3260
|
target.generateSHACL = function() {
|
|
3157
|
-
return getMemoizedSHACL(target, (seed) => buildSHACL(opts.name, target, getPropertiesMetadata(target), getRelationsMetadata(target), buildConformanceFilter, seed));
|
|
3261
|
+
return getMemoizedSHACL(target, (seed) => buildSHACL(opts.name, target, getPropertiesMetadata(target), getRelationsMetadata(target), buildConformanceFilter, seed, opts.interpretationHint));
|
|
3158
3262
|
};
|
|
3159
3263
|
Object.defineProperty(target, "type", { configurable: true });
|
|
3160
3264
|
};
|
|
3161
3265
|
}
|
|
3266
|
+
function Property(opts) {
|
|
3267
|
+
const required = opts.required ?? false;
|
|
3268
|
+
return applyPropertyMetadata({
|
|
3269
|
+
...opts,
|
|
3270
|
+
required,
|
|
3271
|
+
readOnly: opts.readOnly ?? false,
|
|
3272
|
+
resolveLanguage: opts.resolveLanguage ?? "literal",
|
|
3273
|
+
initial: opts.initial ?? (required ? "literal:string:uninitialized" : void 0)
|
|
3274
|
+
});
|
|
3275
|
+
}
|
|
3276
|
+
function resolveRelationArgs(first, second) {
|
|
3277
|
+
const opts = typeof first === "function" ? { ...second || {}, target: first } : first;
|
|
3278
|
+
if (opts.getter) {
|
|
3279
|
+
if (opts.through) {
|
|
3280
|
+
throw new Error("Relation decorator: `getter` and `through` are mutually exclusive. Use `getter` alone for custom read-only relations, or `through` (with optional `target`) for standard link-based relations.");
|
|
3281
|
+
}
|
|
3282
|
+
if (opts.target) {
|
|
3283
|
+
throw new Error("Relation decorator: `getter` and `target` are mutually exclusive. `target` auto-generates a conformance getter from the model shape; providing both is contradictory.");
|
|
3284
|
+
}
|
|
3285
|
+
if (opts.where) {
|
|
3286
|
+
throw new Error("Relation decorator: `where` and `getter` are mutually exclusive. Use `where` for DSL-based filtering, or `getter` for raw getter expression.");
|
|
3287
|
+
}
|
|
3288
|
+
return opts;
|
|
3289
|
+
}
|
|
3290
|
+
if (!opts.through) {
|
|
3291
|
+
opts.through = "ad4m://has_child";
|
|
3292
|
+
}
|
|
3293
|
+
if (opts.where) {
|
|
3294
|
+
if (opts.filter === false) {
|
|
3295
|
+
throw new Error("Relation decorator: `where` and `filter: false` are contradictory. `where` adds filtering constraints; `filter: false` disables filtering.");
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
return opts;
|
|
3299
|
+
}
|
|
3300
|
+
function HasMany(first, second) {
|
|
3301
|
+
const opts = resolveRelationArgs(first, second);
|
|
3302
|
+
return function(target, key) {
|
|
3303
|
+
const ctor = target.constructor;
|
|
3304
|
+
if (!relationRegistry.has(ctor))
|
|
3305
|
+
relationRegistry.set(ctor, {});
|
|
3306
|
+
const map = relationRegistry.get(ctor);
|
|
3307
|
+
map[key] = {
|
|
3308
|
+
predicate: opts.through,
|
|
3309
|
+
target: opts.target,
|
|
3310
|
+
kind: "hasMany",
|
|
3311
|
+
local: opts.local,
|
|
3312
|
+
...opts.getter && { getter: opts.getter },
|
|
3313
|
+
...opts.filter !== void 0 && { filter: opts.filter },
|
|
3314
|
+
...opts.where && { where: opts.where }
|
|
3315
|
+
};
|
|
3316
|
+
const relKey = key;
|
|
3317
|
+
if (opts.through) {
|
|
3318
|
+
target[`add${capitalize(relKey)}`] = async function(arg, batchId) {
|
|
3319
|
+
return this.addRelationValue(relKey, arg, batchId);
|
|
3320
|
+
};
|
|
3321
|
+
target[`remove${capitalize(relKey)}`] = async function(arg, batchId) {
|
|
3322
|
+
return this.removeRelationValue(relKey, arg, batchId);
|
|
3323
|
+
};
|
|
3324
|
+
target[`set${capitalize(relKey)}`] = async function(arg, batchId) {
|
|
3325
|
+
return this.setRelationValues(relKey, arg, batchId);
|
|
3326
|
+
};
|
|
3327
|
+
}
|
|
3328
|
+
Object.defineProperty(target, relKey, { configurable: true, writable: true });
|
|
3329
|
+
};
|
|
3330
|
+
}
|
|
3162
3331
|
var cache = /* @__PURE__ */ new Map();
|
|
3163
3332
|
var DEFAULT_TTL_MS = 200;
|
|
3164
3333
|
function makeKey(perspectiveUUID, queryText) {
|
|
@@ -3666,6 +3835,24 @@ var PerspectiveProxy = class {
|
|
|
3666
3835
|
async get(query) {
|
|
3667
3836
|
return await __classPrivateFieldGet$a(this, _PerspectiveProxy_client, "f").queryLinks(__classPrivateFieldGet$a(this, _PerspectiveProxy_handle, "f").uuid, query);
|
|
3668
3837
|
}
|
|
3838
|
+
async runInterpretation(transcript, basePrefix, classes) {
|
|
3839
|
+
return await __classPrivateFieldGet$a(this, _PerspectiveProxy_client, "f").runInterpretation(__classPrivateFieldGet$a(this, _PerspectiveProxy_handle, "f").uuid, transcript, basePrefix, classes);
|
|
3840
|
+
}
|
|
3841
|
+
async addAutoProcessor(config) {
|
|
3842
|
+
return await __classPrivateFieldGet$a(this, _PerspectiveProxy_client, "f").addAutoProcessor(__classPrivateFieldGet$a(this, _PerspectiveProxy_handle, "f").uuid, config);
|
|
3843
|
+
}
|
|
3844
|
+
async interpretationOverlays() {
|
|
3845
|
+
return await __classPrivateFieldGet$a(this, _PerspectiveProxy_client, "f").interpretationOverlays(__classPrivateFieldGet$a(this, _PerspectiveProxy_handle, "f").uuid);
|
|
3846
|
+
}
|
|
3847
|
+
async acceptInterpretation(base, property) {
|
|
3848
|
+
return await __classPrivateFieldGet$a(this, _PerspectiveProxy_client, "f").acceptInterpretation(__classPrivateFieldGet$a(this, _PerspectiveProxy_handle, "f").uuid, base, property);
|
|
3849
|
+
}
|
|
3850
|
+
async rejectInterpretation(base, property) {
|
|
3851
|
+
return await __classPrivateFieldGet$a(this, _PerspectiveProxy_client, "f").rejectInterpretation(__classPrivateFieldGet$a(this, _PerspectiveProxy_handle, "f").uuid, base, property);
|
|
3852
|
+
}
|
|
3853
|
+
async addAutoProcessorEventListener(cb) {
|
|
3854
|
+
return await __classPrivateFieldGet$a(this, _PerspectiveProxy_client, "f").addAutoProcessorEventListener(__classPrivateFieldGet$a(this, _PerspectiveProxy_handle, "f").uuid, cb);
|
|
3855
|
+
}
|
|
3669
3856
|
async infer(query) {
|
|
3670
3857
|
return await __classPrivateFieldGet$a(this, _PerspectiveProxy_client, "f").queryProlog(__classPrivateFieldGet$a(this, _PerspectiveProxy_handle, "f").uuid, query);
|
|
3671
3858
|
}
|
|
@@ -4795,6 +4982,31 @@ var PerspectiveClient = class {
|
|
|
4795
4982
|
async linkMutations(uuid, mutations, status) {
|
|
4796
4983
|
return __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").call("perspective.linkMutations", { uuid, mutations, status });
|
|
4797
4984
|
}
|
|
4985
|
+
async runInterpretation(uuid, transcript, basePrefix, classes) {
|
|
4986
|
+
const RUN_INTERPRETATION_TIMEOUT_MS = 20 * 60 * 1e3;
|
|
4987
|
+
return __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").call("perspective.runInterpretation", { uuid, transcript, basePrefix, classes }, RUN_INTERPRETATION_TIMEOUT_MS);
|
|
4988
|
+
}
|
|
4989
|
+
async addAutoProcessor(uuid, config) {
|
|
4990
|
+
return __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").call("perspective.addAutoProcessor", { uuid, ...config });
|
|
4991
|
+
}
|
|
4992
|
+
async interpretationOverlays(uuid) {
|
|
4993
|
+
return __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").call("perspective.interpretationOverlays", { uuid });
|
|
4994
|
+
}
|
|
4995
|
+
async acceptInterpretation(uuid, base, property) {
|
|
4996
|
+
return __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").call("perspective.acceptInterpretation", { uuid, base, property });
|
|
4997
|
+
}
|
|
4998
|
+
async rejectInterpretation(uuid, base, property) {
|
|
4999
|
+
return __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").call("perspective.rejectInterpretation", { uuid, base, property });
|
|
5000
|
+
}
|
|
5001
|
+
async addAutoProcessorEventListener(uuid, cb) {
|
|
5002
|
+
const unsub = __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
5003
|
+
if (data.type === "auto-processor-event" && data.perspectiveUuid === uuid) {
|
|
5004
|
+
cb(data);
|
|
5005
|
+
}
|
|
5006
|
+
});
|
|
5007
|
+
__classPrivateFieldGet$9(this, _PerspectiveClient_unsubscribers, "f").push(unsub);
|
|
5008
|
+
await __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").waitForSubscription();
|
|
5009
|
+
}
|
|
4798
5010
|
async addLinkExpression(uuid, link, status = "shared", batchId) {
|
|
4799
5011
|
return __classPrivateFieldGet$9(this, _PerspectiveClient_apiClient, "f").call("perspective.addLinkExpression", { uuid, link, status, batchId });
|
|
4800
5012
|
}
|
|
@@ -11424,6 +11636,139 @@ var PerspectiveState;
|
|
|
11424
11636
|
PerspectiveState2["LinkLanguageInstalledButNotSynced"] = "LINK_LANGUAGE_INSTALLED_BUT_NOT_SYNCED";
|
|
11425
11637
|
PerspectiveState2["Synced"] = "SYNCED";
|
|
11426
11638
|
})(PerspectiveState || (PerspectiveState = {}));
|
|
11639
|
+
var __decorate = function(decorators, target, key, desc) {
|
|
11640
|
+
var c3 = arguments.length, r4 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
11641
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
11642
|
+
r4 = Reflect.decorate(decorators, target, key, desc);
|
|
11643
|
+
else
|
|
11644
|
+
for (var i4 = decorators.length - 1; i4 >= 0; i4--)
|
|
11645
|
+
if (d3 = decorators[i4])
|
|
11646
|
+
r4 = (c3 < 3 ? d3(r4) : c3 > 3 ? d3(target, key, r4) : d3(target, key)) || r4;
|
|
11647
|
+
return c3 > 3 && r4 && Object.defineProperty(target, key, r4), r4;
|
|
11648
|
+
};
|
|
11649
|
+
var __metadata = function(k2, v2) {
|
|
11650
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
11651
|
+
return Reflect.metadata(k2, v2);
|
|
11652
|
+
};
|
|
11653
|
+
var AutoProcessorConfig = class AutoProcessorConfig2 extends Ad4mModel {
|
|
11654
|
+
constructor() {
|
|
11655
|
+
super(...arguments);
|
|
11656
|
+
this.type = "ad4m://AutoProcessor";
|
|
11657
|
+
this.processorId = "";
|
|
11658
|
+
this.sourceScopeQuery = "";
|
|
11659
|
+
this.interpretationClasses = [];
|
|
11660
|
+
this.debounceMs = "200";
|
|
11661
|
+
this.batchMax = "32";
|
|
11662
|
+
this.claimTtlMs = "60000";
|
|
11663
|
+
}
|
|
11664
|
+
};
|
|
11665
|
+
__decorate([
|
|
11666
|
+
Flag({ through: "rdf://type", value: "ad4m://AutoProcessor" }),
|
|
11667
|
+
__metadata("design:type", String)
|
|
11668
|
+
], AutoProcessorConfig.prototype, "type", void 0);
|
|
11669
|
+
__decorate([
|
|
11670
|
+
Property({ through: "ad4m://processor_id", required: true, identity: true }),
|
|
11671
|
+
__metadata("design:type", String)
|
|
11672
|
+
], AutoProcessorConfig.prototype, "processorId", void 0);
|
|
11673
|
+
__decorate([
|
|
11674
|
+
Property({ through: "ad4m://source_scope_query", required: true }),
|
|
11675
|
+
__metadata("design:type", String)
|
|
11676
|
+
], AutoProcessorConfig.prototype, "sourceScopeQuery", void 0);
|
|
11677
|
+
__decorate([
|
|
11678
|
+
Optional({ through: "ad4m://base_prefix", resolveLanguage: "literal" }),
|
|
11679
|
+
__metadata("design:type", String)
|
|
11680
|
+
], AutoProcessorConfig.prototype, "basePrefix", void 0);
|
|
11681
|
+
__decorate([
|
|
11682
|
+
HasMany({ through: "ad4m://interpretation_class" }),
|
|
11683
|
+
__metadata("design:type", Array)
|
|
11684
|
+
], AutoProcessorConfig.prototype, "interpretationClasses", void 0);
|
|
11685
|
+
__decorate([
|
|
11686
|
+
Property({ through: "ad4m://debounce_ms", required: true }),
|
|
11687
|
+
__metadata("design:type", String)
|
|
11688
|
+
], AutoProcessorConfig.prototype, "debounceMs", void 0);
|
|
11689
|
+
__decorate([
|
|
11690
|
+
Optional({ through: "ad4m://batch_min", resolveLanguage: "literal" }),
|
|
11691
|
+
__metadata("design:type", String)
|
|
11692
|
+
], AutoProcessorConfig.prototype, "batchMin", void 0);
|
|
11693
|
+
__decorate([
|
|
11694
|
+
Property({ through: "ad4m://batch_max", required: true }),
|
|
11695
|
+
__metadata("design:type", String)
|
|
11696
|
+
], AutoProcessorConfig.prototype, "batchMax", void 0);
|
|
11697
|
+
__decorate([
|
|
11698
|
+
Optional({ through: "ad4m://max_wait_ms", resolveLanguage: "literal" }),
|
|
11699
|
+
__metadata("design:type", String)
|
|
11700
|
+
], AutoProcessorConfig.prototype, "maxWaitMs", void 0);
|
|
11701
|
+
__decorate([
|
|
11702
|
+
Property({ through: "ad4m://claim_ttl_ms", required: true }),
|
|
11703
|
+
__metadata("design:type", String)
|
|
11704
|
+
], AutoProcessorConfig.prototype, "claimTtlMs", void 0);
|
|
11705
|
+
__decorate([
|
|
11706
|
+
Optional({ through: "ad4m://source_window_ms", resolveLanguage: "literal" }),
|
|
11707
|
+
__metadata("design:type", String)
|
|
11708
|
+
], AutoProcessorConfig.prototype, "sourceWindowMs", void 0);
|
|
11709
|
+
__decorate([
|
|
11710
|
+
Optional({ through: "ad4m://dedup_strategy", resolveLanguage: "literal" }),
|
|
11711
|
+
__metadata("design:type", String)
|
|
11712
|
+
], AutoProcessorConfig.prototype, "dedupStrategy", void 0);
|
|
11713
|
+
AutoProcessorConfig = __decorate([
|
|
11714
|
+
Model$1({ name: "AutoProcessorConfig" })
|
|
11715
|
+
], AutoProcessorConfig);
|
|
11716
|
+
var InterpretationRun = class InterpretationRun2 extends Ad4mModel {
|
|
11717
|
+
constructor() {
|
|
11718
|
+
super(...arguments);
|
|
11719
|
+
this.type = "ad4m://interpretation-run";
|
|
11720
|
+
this.runId = "";
|
|
11721
|
+
this.sources = [];
|
|
11722
|
+
}
|
|
11723
|
+
};
|
|
11724
|
+
__decorate([
|
|
11725
|
+
Flag({ through: "ad4m://type", value: "ad4m://interpretation-run" }),
|
|
11726
|
+
__metadata("design:type", String)
|
|
11727
|
+
], InterpretationRun.prototype, "type", void 0);
|
|
11728
|
+
__decorate([
|
|
11729
|
+
Property({ through: "ad4m://interp/run_id", required: true, identity: true }),
|
|
11730
|
+
__metadata("design:type", String)
|
|
11731
|
+
], InterpretationRun.prototype, "runId", void 0);
|
|
11732
|
+
__decorate([
|
|
11733
|
+
Optional({ through: "ad4m://interp/model", resolveLanguage: "literal" }),
|
|
11734
|
+
__metadata("design:type", String)
|
|
11735
|
+
], InterpretationRun.prototype, "model", void 0);
|
|
11736
|
+
__decorate([
|
|
11737
|
+
Optional({ through: "ad4m://interp/prompt_version", resolveLanguage: "literal" }),
|
|
11738
|
+
__metadata("design:type", String)
|
|
11739
|
+
], InterpretationRun.prototype, "promptVersion", void 0);
|
|
11740
|
+
__decorate([
|
|
11741
|
+
Optional({ through: "ad4m://interp/ran_at", resolveLanguage: "literal" }),
|
|
11742
|
+
__metadata("design:type", String)
|
|
11743
|
+
], InterpretationRun.prototype, "ranAt", void 0);
|
|
11744
|
+
__decorate([
|
|
11745
|
+
Optional({ through: "ad4m://interp/processor", resolveLanguage: "literal" }),
|
|
11746
|
+
__metadata("design:type", String)
|
|
11747
|
+
], InterpretationRun.prototype, "processor", void 0);
|
|
11748
|
+
__decorate([
|
|
11749
|
+
HasMany({ through: "ad4m://interp/sources" }),
|
|
11750
|
+
__metadata("design:type", Array)
|
|
11751
|
+
], InterpretationRun.prototype, "sources", void 0);
|
|
11752
|
+
InterpretationRun = __decorate([
|
|
11753
|
+
Model$1({ name: "InterpretationRun" })
|
|
11754
|
+
], InterpretationRun);
|
|
11755
|
+
var InterpretationOverlay = class InterpretationOverlay2 extends Ad4mModel {
|
|
11756
|
+
constructor() {
|
|
11757
|
+
super(...arguments);
|
|
11758
|
+
this.kind = "";
|
|
11759
|
+
}
|
|
11760
|
+
};
|
|
11761
|
+
__decorate([
|
|
11762
|
+
Property({ through: "ad4m://interp/kind", required: true, resolveLanguage: "literal" }),
|
|
11763
|
+
__metadata("design:type", String)
|
|
11764
|
+
], InterpretationOverlay.prototype, "kind", void 0);
|
|
11765
|
+
__decorate([
|
|
11766
|
+
Optional({ through: "ad4m://interp/run", resolveLanguage: "literal" }),
|
|
11767
|
+
__metadata("design:type", String)
|
|
11768
|
+
], InterpretationOverlay.prototype, "run", void 0);
|
|
11769
|
+
InterpretationOverlay = __decorate([
|
|
11770
|
+
Model$1({ name: "InterpretationOverlay" })
|
|
11771
|
+
], InterpretationOverlay);
|
|
11427
11772
|
var PerspectiveDiffExpression = class extends ExpressionGeneric() {
|
|
11428
11773
|
};
|
|
11429
11774
|
var _SmartLiteral_perspective;
|